Plan: .agents/plans/2026-07-04-detach-canvas-pipeline.md (WS-2)
Make the AI pipeline Node-API-free so it runs in browser SW.
- Drop Mastra entirely (Node deps block SW). Replace with plain async pipeline.
- Move steps from apps/server/src/workflows/steps/ -> packages/pipeline/src/steps/
- Upgrade AI SDK v6->v7 (npx @ai-sdk/codemod v7). ToolLoopAgent available.
- Reimplement SSE streaming via ReadableStream + data-workflow parts (replace handleWorkflowStream).
- Browser SW runner: ToolLoopAgent per stage, Web Fetch, no fs/child_process.
Effort: L (~4d). Blocks WS-5 (observability instruments this pipeline). Related #8
Plan: .agents/plans/2026-07-04-detach-canvas-pipeline.md (WS-2)
Make the AI pipeline Node-API-free so it runs in browser SW.
Effort: L (~4d). Blocks WS-5 (observability instruments this pipeline). Related #8