From 0c1564c8e7954f3d80cc0b59da4a1947a774d3cb Mon Sep 17 00:00:00 2001 From: btipling Date: Thu, 3 Sep 2026 04:35:57 +0000 Subject: [PATCH 1/2] docs(feature-divide): durable-turn ownership row (H23) Extend the Workflow run/step row to make the durable-turn ownership explicit and timeless: the Workflow run owns the turn; tools are steps (one 'use step' = one model round OR one tool execution OR one persist, never a mega-step); the worker is the Blob writer (persist/checkpoint segment) when the viewport is detached. Stop/cancel (detach != cancel, cancel = G22) and the /api/agent legacy truth (post-D17) were already present; no change needed there. Docs-only; no test gate. Fixes #817 Refs #794 --- docs/feature-divide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature-divide.md b/docs/feature-divide.md index 25c58ffe..9bca6758 100644 --- a/docs/feature-divide.md +++ b/docs/feature-divide.md @@ -40,7 +40,7 @@ optional login chrome). | Per-user MCP tools (connect + execute) | **Vercel backend** | `lib/mcp/*`; keys under tenant DEK; never Wasm/client | | `search` code-grep tool | **Vercel backend** | Read-grant-only; runs `rg` argv-only in the sandbox jail; no Wasm/bridge change | | Builtin HTTPS fetch (`http_get`) | **Vercel backend** | Always-available when a running HTTP instance exists; attach-only (Settings Create HTTP instance); see [builtin-http.md](builtin-http.md) | -| Workflow run/step (backend-agents) | **Vercel backend** | Server-only fixtures (`lib/workflows/*`, `"use workflow"` orchestration via the `workflow` SDK + `withWorkflow` in `next.config.js`), authed smoke (`app/api/workflows/smoke`), Vercel Workflows platform (Functions + Queues, dashboard-visible Observability). Durable-turn SSE uses the same `AgentStreamEvent` types as `/api/agent`; stream write/close run in `'use step'` only (not in the `'use workflow'` orchestrator). Never Wasm/DOM; never the tab-owned `/api/agent` as the smoke path. Verify via GHA `workflows-smoke` | +| Workflow run/step (backend-agents) | **Vercel backend** | Server-only fixtures (`lib/workflows/*`, `"use workflow"` orchestration via the `workflow` SDK + `withWorkflow` in `next.config.js`), authed smoke (`app/api/workflows/smoke`), Vercel Workflows platform (Functions + Queues, dashboard-visible Observability). **The Workflow run owns the turn** — it is the durable turn owner, independent of any attached viewport. **Tools are steps:** one `'use step'` = one model round **or** one tool execution **or** one persist — never a mega-step and never wrap `runAgentStream` in a single step. The **worker is the Blob writer**: when the viewport is detached the worker persists the transcript/checkpoint segment to Blob itself (the detach only closes a reader; it never stops the run). Durable-turn SSE uses the same `AgentStreamEvent` types as `/api/agent`; stream write/close run in `'use step'` only (not in the `'use workflow'` orchestrator). Never Wasm/DOM; never the tab-owned `/api/agent` as the smoke path. Verify via GHA `workflows-smoke` | | **Transcript (read messages)** | **Wasm** | Primary UX; rich MD + images + math + diff/patch fence paint in-canvas (`rich/*`) — no DOM markdown | | Transcript left rail (collapsible session list) | **Wasm** | Inside the transcript band only (canvas top → composer). Default closed: 40 px icon strip. Open: 220 px TEAL column with the session list (scroll). Host pushes summaries (`GET /api/sessions`); Wasm paints and raises a pending switch; host hydrates. New session / Persona / Clear stay in DOM `AppNav`. No host CSS sidebar. | | Image bytes (fetch/decode) | **DOM host** | Browser fetch → RGBA → `inv_image_cache_put`; paint stays Wasm | From faa41468bb6777e2cd3f8db1fea6af4926f86b22 Mon Sep 17 00:00:00 2001 From: btipling Date: Thu, 3 Sep 2026 04:48:22 +0000 Subject: [PATCH 2/2] docs(feature-divide): step grain is toolCalls batch, not one tool MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Align the Workflow run/step cell with architecture.md and toolExecuteStep: one 'use step' is one model round, one toolExecuteStep (that round's toolCalls / waves), or one persist — never one tool execution. Co-authored-by: Bjorn --- docs/feature-divide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/feature-divide.md b/docs/feature-divide.md index 9bca6758..d4a5d6bb 100644 --- a/docs/feature-divide.md +++ b/docs/feature-divide.md @@ -40,7 +40,7 @@ optional login chrome). | Per-user MCP tools (connect + execute) | **Vercel backend** | `lib/mcp/*`; keys under tenant DEK; never Wasm/client | | `search` code-grep tool | **Vercel backend** | Read-grant-only; runs `rg` argv-only in the sandbox jail; no Wasm/bridge change | | Builtin HTTPS fetch (`http_get`) | **Vercel backend** | Always-available when a running HTTP instance exists; attach-only (Settings Create HTTP instance); see [builtin-http.md](builtin-http.md) | -| Workflow run/step (backend-agents) | **Vercel backend** | Server-only fixtures (`lib/workflows/*`, `"use workflow"` orchestration via the `workflow` SDK + `withWorkflow` in `next.config.js`), authed smoke (`app/api/workflows/smoke`), Vercel Workflows platform (Functions + Queues, dashboard-visible Observability). **The Workflow run owns the turn** — it is the durable turn owner, independent of any attached viewport. **Tools are steps:** one `'use step'` = one model round **or** one tool execution **or** one persist — never a mega-step and never wrap `runAgentStream` in a single step. The **worker is the Blob writer**: when the viewport is detached the worker persists the transcript/checkpoint segment to Blob itself (the detach only closes a reader; it never stops the run). Durable-turn SSE uses the same `AgentStreamEvent` types as `/api/agent`; stream write/close run in `'use step'` only (not in the `'use workflow'` orchestrator). Never Wasm/DOM; never the tab-owned `/api/agent` as the smoke path. Verify via GHA `workflows-smoke` | +| Workflow run/step (backend-agents) | **Vercel backend** | Server-only fixtures (`lib/workflows/*`, `"use workflow"` orchestration via the `workflow` SDK + `withWorkflow` in `next.config.js`), authed smoke (`app/api/workflows/smoke`), Vercel Workflows platform (Functions + Queues, dashboard-visible Observability). **The Workflow run owns the turn** — it is the durable turn owner, independent of any attached viewport. One `'use step'` = one model round **or** one **`toolExecuteStep` (one model round's `toolCalls` / waves)** **or** one persist — never a mega-step and never wrap `runAgentStream`. The **worker is the Blob writer**: when the viewport is detached the worker persists the transcript/checkpoint segment to Blob itself (the detach only closes a reader; it never stops the run). Durable-turn SSE uses the same `AgentStreamEvent` types as `/api/agent`; stream write/close run in `'use step'` only (not in the `'use workflow'` orchestrator). Never Wasm/DOM; never the tab-owned `/api/agent` as the smoke path. Verify via GHA `workflows-smoke` | | **Transcript (read messages)** | **Wasm** | Primary UX; rich MD + images + math + diff/patch fence paint in-canvas (`rich/*`) — no DOM markdown | | Transcript left rail (collapsible session list) | **Wasm** | Inside the transcript band only (canvas top → composer). Default closed: 40 px icon strip. Open: 220 px TEAL column with the session list (scroll). Host pushes summaries (`GET /api/sessions`); Wasm paints and raises a pending switch; host hydrates. New session / Persona / Clear stay in DOM `AppNav`. No host CSS sidebar. | | Image bytes (fetch/decode) | **DOM host** | Browser fetch → RGBA → `inv_image_cache_put`; paint stays Wasm |