Skip to content

Commit 629a3b9

Browse files
GiniGini
authored andcommitted
docs: define Cowork API gold path
1 parent 8120e70 commit 629a3b9

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

docs/COWORK_E2B_ACP_PLAN.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,60 @@ model-provider keys, enterprise OAuth tokens, E2B credentials, or registry
8282
passwords. E2B template build credentials are short-lived and supplied only to
8383
the build command.
8484

85+
## Near-term acceptance goal: Cowork API Gold Path
86+
87+
Before investing further in UI polish, qualify one complete session through the
88+
real API. The session must use the E2B Cowork profile, a real Codex or OpenCode
89+
ACP process, and the governed LiteLLM route. Fixtures may be used for negative
90+
tests, but never for the successful path.
91+
92+
### Required scenario
93+
94+
1. Create one owned Cowork session with an idempotency key and receive a
95+
session-scoped identifier (not a durable workspace launch).
96+
2. Send a basic question and receive an ordered streaming response containing
97+
a real assistant answer and a terminal event.
98+
3. Send a follow-up question that depends on the first turn; prove that the
99+
same ACP session retains context.
100+
4. Ask the agent to use the sandbox Python interpreter to create:
101+
- a valid `.docx` using the pinned `python-docx` runtime;
102+
- a valid `.xlsx` using the pinned `openpyxl` runtime; and
103+
- a valid `.pptx` using the existing presentation toolchain.
104+
5. Register each file as a session-owned artifact with byte size, SHA-256
105+
digest, MIME type, and provenance linking it to the generating turn.
106+
6. Retrieve each artifact through the authenticated API and validate the Office
107+
ZIP/package structure. The browser must not be the source of truth for file
108+
validity.
109+
7. Capture at least one real browser PNG from inside E2B, hash-link it to an
110+
activity sequence, and retrieve it through the session VCR endpoint.
111+
8. Cancel a second turn and prove that the ACP process terminates without a
112+
fabricated assistant message or dangling stream.
113+
9. Destroy/expire the session and prove that new turns, captures, and artifact
114+
mutations fail closed, the E2B sandbox is killed, and no durable workspace
115+
or credential remains.
116+
117+
### Gold Path exit criteria
118+
119+
The goal is achieved only when all of the following are true in one API E2E
120+
run:
121+
122+
- Codex and OpenCode each pass the chat and artifact scenario;
123+
- SSE replay has monotonic sequence numbers, correct session/turn binding, and
124+
an explicit terminal event;
125+
- the answer, Office files, and PNG are non-empty real outputs, not fixtures;
126+
- Python execution is path-confined, bounded, and has no host filesystem or
127+
provider-key access;
128+
- cross-user reads return `404`, expired-session mutations fail closed, and no
129+
secret appears in events, artifacts, logs, or ACP transcript records;
130+
- the E2B sandbox cleanup and grant revocation are evidenced after the run;
131+
- the browser E2E is then run as a projection of this already-passing API
132+
session.
133+
134+
This is the first meaningful Manus-like milestone: a user can ask, converse,
135+
and receive useful Word/Excel/PowerPoint deliverables from a disposable Cowork
136+
session while Control retains truthful streaming, evidence, ownership, and
137+
cleanup guarantees.
138+
85139
### Application-scoped VCR
86140

87141
Cowork VCR means “what the agent did in the application,” not “a streamed

0 commit comments

Comments
 (0)