Self-improving AI Employees for everyone
Python ai-agentsai-employeeai-employeesassistantautonomous-agentsco-employeescompanygrok-botinstinctloop-agentsmuseown-your-datapersonalself-hosted
docs(diagrams): fold the 14 architecture diagrams into the one set
trohitg287731f10388
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.mdindex 9eef3ab6..81bd8d88 100644--- a/CONTRIBUTING.md+++ b/CONTRIBUTING.md@@ -40,6 +40,27 @@ Direct chat completions and every new agent execution use the native SDK layer iDeep dives: [agent_architecture.md](docs-internal/agent_architecture.md) - [native_llm_sdk.md](docs-internal/native_llm_sdk.md) - [agent_teams.md](docs-internal/agent_teams.md) - [memory_compaction.md](docs-internal/memory_compaction.md) - [cli_agent_framework.md](docs-internal/cli_agent_framework.md)+## More Diagrams++Fourteen source-backed architecture and product-panel diagrams live next to the ones above in [docs/diagrams/](docs/diagrams/). Each carries the source files it was drawn from in its `<desc>`.++| Diagram | What it shows |+|---|---|+| [System context](docs/diagrams/system-context.svg) | Who uses OpenCompany and which external capabilities it orchestrates |+| [Runtime and trust topology](docs/diagrams/runtime-trust-topology.svg) | Browser, desktop and CLI clients, the authenticated REST / WebSocket / MCP / webhook surfaces, Temporal and the lazy sidecars |+| [Workflow execution routing](docs/diagrams/workflow-execution-routing.svg) | Temporal, parallel and sequential branches converging on the NodeExecutor pipeline |+| [Durable deployment and events](docs/diagrams/durable-deployment-events.svg) | Generation snapshots, WorkflowControlWorkflow, push / poll / cron triggers, CloudEvents dispatch |+| [Plugin, agent and team composition](docs/diagrams/plugin-agent-team-composition.svg) | How plugins become chat-model and agent nodes, assemble context, skills and tools, and form teams |+| [Persistence and secret plane](docs/diagrams/persistence-secret-plane.svg) | workflow.db versus the encrypted credentials.db boundary |+| [Workspace anatomy](docs/diagrams/workspace-anatomy.svg) | Immutable id to mutable slug directories, contained I/O, CLI worktrees and materialized skills |+| [Node configuration anatomy](docs/diagrams/node-configuration-anatomy.svg) | The Input / Parameters / Output modal, local draft, save-before-run and correlated output |+| [Credentials architecture](docs/diagrams/credentials-architecture.svg) | Server-owned catalogue, WebSocket handlers, AuthService and encrypted storage |+| [Team operations](docs/diagrams/team-operations.svg) | Task Manager lifecycle from blocked and queued through submission, review and finish |+| [Agent context versus memory](docs/diagrams/agent-context-memory.svg) | The stored conversation (RFC-0002) beside the explicit Memory tool |+| [Master Skill editor](docs/diagrams/master-skill-editor.svg) | Skill sources, the catalogue and instruction panes, expansion and runtime badges |+| [Workspace files](docs/diagrams/workspace-files.svg) | The Gallery node panel: WebSocket listing, HTTP content and the FileRef output |+| [Runtime observability dock](docs/diagrams/runtime-observability-dock.svg) | Chat, Console and Terminal producers, retention and the dock UI |+## Repository Map| Directory | What lives here | Start reading |diff --git a/docs-internal/design-system/HANDOFF.md b/docs-internal/design-system/HANDOFF.mdindex b0e33876..f8b40133 100644--- a/docs-internal/design-system/HANDOFF.md+++ b/docs-internal/design-system/HANDOFF.md@@ -300,7 +300,7 @@ Also: canvas node icons are **36px** everywhere, and the size is a token, not a## Assets`assets/product-canvas-screenshot.png` — the real running canvas; the fidelity target for node/edge rendering.-[`docs/diagrams/*.svg`](../../docs/diagrams/) — the six diagrams (node anatomy, execution flow, AI agent routing, system overview, default workflows, how-it-works). They live at the repo root only; `assets/diagrams/` holds a pointer, not copies.+[`docs/diagrams/*.svg`](../../docs/diagrams/) — the 20 diagrams: six overview diagrams (node anatomy, execution flow, AI agent routing, system overview, default workflows, how-it-works) plus 14 source-backed architecture and product-panel diagrams indexed in `CONTRIBUTING.md`. They live at the repo root only; `assets/diagrams/` holds a pointer, not copies.## Filesdiff --git a/docs-internal/design-system/readme.md b/docs-internal/design-system/readme.mdindex c0c267ce..fbe8fc9d 100644--- a/docs-internal/design-system/readme.md+++ b/docs-internal/design-system/readme.md@@ -68,7 +68,7 @@ The app ships 12 visual themes (light, dark, Renaissance, Cyber, Edo, Steampunk- `reference/themes/` — pointer README only; the snapshots went stale and were retired in favor of the authoritative `client/src/themes/`.- `HANDOFF.md` — merged design-handoff brief + recorded product amendments (read alongside `IMPLEMENTATION.md`).- `reference-mockup/` — 17-panel × 12-theme fidelity target (`Panel Theme Matrix.dc.html`, open in a browser).-- `assets/` — `product-canvas-screenshot.png`; `diagrams/` is a pointer to the live [`docs/diagrams/`](../../docs/diagrams/), the only copy of the six diagrams.+- `assets/` — `product-canvas-screenshot.png`; `diagrams/` is a pointer to the live [`docs/diagrams/`](../../docs/diagrams/), the only copy of the 20 diagrams.- `components/buttons/` — ActionButton (6 intents), Button (shadcn variants).- `components/forms/` — Input, Select, RadioGroup, Textarea, Switch, Checkbox, Slider, ApiKeyInput.- `components/display/` — Badge, Card, Tabs, Avatar, Kbd, LogLine, ChatBubble.diff --git a/docs/diagrams/README.md b/docs/diagrams/README.mdnew file mode 100644index 00000000..9660c2b5--- /dev/null+++ b/docs/diagrams/README.md@@ -0,0 +1,23 @@+# Diagrams++One set, dark theme, all SVG. This folder is the only copy; nothing under+`docs-internal/` vendors these files.++**Overview diagrams** (linked from the README and CONTRIBUTING):++- `how-it-works.svg`, `default-workflows.svg` (README)+- `system-overview.svg`, `execution-flow.svg`, `ai-agent-routing.svg`, `node-anatomy.svg` (CONTRIBUTING)++**Architecture and product-panel diagrams** (indexed in CONTRIBUTING under+"More Diagrams"): `system-context`, `runtime-trust-topology`,+`workflow-execution-routing`, `durable-deployment-events`,+`plugin-agent-team-composition`, `persistence-secret-plane`,+`workspace-anatomy`, `node-configuration-anatomy`, `credentials-architecture`,+`team-operations`, `agent-context-memory`, `master-skill-editor`,+`workspace-files`, `runtime-observability-dock`. Each file's `<desc>` lists+the source files it was drawn from.++Facts on every diagram were checked against the code in September 2026.+Counts come from the live registries (`len(NODE_METADATA)`,+`len(CREDENTIAL_REGISTRY)`, `config/llm_defaults.json`), and ports are+named by their `.env.template` variables rather than numbers.diff --git a/docs/diagrams/agent-context-memory.svg b/docs/diagrams/agent-context-memory.svgnew file mode 100644index 00000000..6c92b38c--- /dev/null+++ b/docs/diagrams/agent-context-memory.svg@@ -0,0 +1,25 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080" width="100%" role="img" aria-labelledby="title desc">+<title id="title">Agent Context vs. Simple Memory</title>+<desc id="desc">Agent Context is the plain stored conversation: one agent_conversations row per (workflow, generation, agent node), loaded at run start and saved after every turn, so each firing continues the same conversation; the Context node on input-context is the opt-in switch and viewing panel. Simple Memory is a separate explicit tool on input-tools: the model or a human remembers, recalls, updates or forgets versioned facts in an isolated namespace, and those items are never injected automatically. Sources: server/nodes/context/__init__.py; server/nodes/context/_descriptor.py; server/services/agent_context/conversation.py; server/services/agent_context/listeners.py; server/nodes/context/_handlers.py; server/nodes/tool/simple_memory/__init__.py; server/services/memory/tool_store.py; client/src/components/parameterPanel/ContextPanel.tsx; client/src/components/parameterPanel/MemoryToolPanel.tsx</desc>+<defs>+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto"><path d="M0,0 L10,5 L0,10 z" fill="#e8eaed"/></marker>+ <style>+ .title { fill:#e8eaed; font:700 30px Geist,system-ui,sans-serif; }+ .subtitle { fill:#9aa1ac; font:400 18px Geist,system-ui,sans-serif; }+ .group-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:1.2px; }+ .type-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:.8px; }+ .node-label { fill:#e8eaed; font:650 20px Geist,system-ui,sans-serif; }+ .node-detail { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .edge-label { fill:#e8eaed; font:500 16px Geist,system-ui,sans-serif; }+ .edge-protocol { fill:#9aa1ac; font:500 16px 'JetBrains Mono',ui-monospace,monospace; }+ .callout-title { fill:#e8eaed; font:650 18px Geist,system-ui,sans-serif; }+ .callout-text { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .legend { fill:#9aa1ac; font:500 16px Geist,system-ui,sans-serif; }+ </style>+</defs>+<rect width="1920" height="1080" fill="#0d0f13"/>+<text x="72" y="58" class="title">Agent Context vs. Simple Memory</text>+<text x="72" y="91" class="subtitle">Stored-conversation continuity and explicit durable knowledge are separate systems</text>+<g data-group-id="context-plane"><rect x="72" y="140" width="720" height="800" rx="18" fill="#15171c" stroke="#bd93f9" stroke-width="2"/><text x="92" y="172" class="group-label">AGENT CONTEXT · STORED CONVERSATION</text></g><g data-group-id="memory-plane"><rect x="1128" y="140" width="720" height="800" rx="18" fill="#15171c" stroke="#50fa7b" stroke-width="2"/><text x="1148" y="172" class="group-label">SIMPLE MEMORY · EXPLICIT TOOL</text></g><g data-relationship-id="context-binds-runtime"><title>opt in at input-context</title><path d="M 400 300.0 L 430 430 L 790 430 L 810 520.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="481.6" y="415.0" width="236.79999999999998" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="600" y="433" class="edge-label" text-anchor="middle">opt in at input-context</text></g><g data-relationship-id="runtime-appends-context"><title>save messages after each turn</title><path d="M 810 520.0 L 650 520 L 650 603 L 420 602.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="524.0" y="505.0" width="252.0" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="650" y="523" class="edge-label" text-anchor="middle">save messages after each turn</text></g><g data-relationship-id="journal-compacts"><title>compact at COMPACTION_RATIO</title><path d="M 270.0 695 L 270 725 L 590 725 L 590.0 760" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="315.4" y="710.0" width="229.2" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="430" y="728" class="edge-label" text-anchor="middle">compact at COMPACTION_RATIO</text></g><g data-relationship-id="checkpoint-replays"><title>summary + current request seed</title><path d="M 740 835.0 L 780 835 L 780 700 L 960 700 L 960.0 645" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="694.0" y="705.0" width="252.0" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="820" y="723" class="edge-label" text-anchor="middle">summary + current request seed</text></g><g data-relationship-id="memory-registers-tool"><title>register tool at input-tools</title><path d="M 1520 300.0 L 1490 430 L 1130 430 L 1110 520.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1201.6" y="415.0" width="236.79999999999998" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1320" y="433" class="edge-label" text-anchor="middle" textLength="218.8" lengthAdjust="spacingAndGlyphs">register tool at input-tools</text></g><g data-relationship-id="runtime-invokes-memory"><title>remember / recall / update / forget</title><path d="M 1110 520.0 L 1290 520 L 1290 603 L 1500 602.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1145.0" y="505.0" width="290.0" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1290" y="523" class="edge-label" text-anchor="middle" textLength="272.0" lengthAdjust="spacingAndGlyphs">remember / recall / update / forget</text></g><g data-relationship-id="memory-persists-items"><title>persist isolated versioned items</title><path d="M 1650.0 695 L 1650 725 L 1330 725 L 1330.0 760" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1356.4" y="710.0" width="267.2" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1490" y="728" class="edge-label" text-anchor="middle" textLength="249.2" lengthAdjust="spacingAndGlyphs">persist isolated versioned items</text></g><g data-relationship-id="memory-returns-items"><title>return selected recalled items</title><path d="M 1180 835.0 L 1140 835 L 1140 700 L 960 700 L 960.0 645" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="974.0" y="665.0" width="252.0" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1100" y="683" class="edge-label" text-anchor="middle" textLength="234.0" lengthAdjust="spacingAndGlyphs">return selected recalled items</text></g><g data-component-id="context-node"><title>Context Node</title><rect x="120" y="220" width="280" height="160" rx="12" fill="#1b1e25" stroke="#bd93f9" stroke-width="2"/><rect x="120" y="220" width="280" height="7" rx="4" fill="#bd93f9"/><text x="138" y="246" class="type-label">OPT-IN SWITCH + PANEL</text><text x="138" y="272" class="node-label">Context Node</text><text x="138" y="298" class="node-detail" textLength="244.0" lengthAdjust="spacingAndGlyphs">output-context → input-context</text><text x="138" y="318" class="node-detail">view, clear, reset; no params</text></g><g data-component-id="context-journal"><title>agent_conversations</title><rect x="120" y="510" width="300" height="185" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="120" y="510" width="300" height="7" rx="4" fill="#ff79c6"/><text x="138" y="536" class="type-label">CONVERSATION STORE</text><text x="138" y="562" class="node-label">agent_conversations</text><text x="138" y="588" class="node-detail">one row per generation + agent</text><text x="138" y="608" class="node-detail">messages JSON, ts per message</text><text x="138" y="628" class="node-detail">loud loads, best-effort saves</text></g><g data-component-id="context-checkpoint"><title>Compaction summary</title><rect x="440" y="760" width="300" height="150" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="440" y="760" width="300" height="7" rx="4" fill="#ffb86c"/><text x="458" y="786" class="type-label">CONTEXT STATE</text><text x="458" y="812" class="node-label">Compaction summary</text><text x="458" y="838" class="node-detail">system prompt kept verbatim</text><text x="458" y="858" class="node-detail">summary rides a user turn</text></g><g data-component-id="agent-runtime"><title>Agent Runtime</title><rect x="810" y="395" width="300" height="250" rx="12" fill="#1b1e25" stroke="#bd93f9" stroke-width="2"/><rect x="810" y="395" width="300" height="7" rx="4" fill="#bd93f9"/><text x="828" y="421" class="type-label">SHARED CONSUMER</text><text x="828" y="447" class="node-label">Agent Runtime</text><text x="828" y="473" class="node-detail">sends the stored conversation</text><text x="828" y="493" class="node-detail">invokes Memory explicitly</text><text x="828" y="513" class="node-detail">keeps both namespaces separate</text></g><g data-component-id="memory-node"><title>Simple Memory</title><rect x="1520" y="220" width="280" height="160" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="1520" y="220" width="280" height="7" rx="4" fill="#50fa7b"/><text x="1538" y="246" class="type-label">LOCKED TOOL</text><text x="1538" y="272" class="node-label">Simple Memory</text><text x="1538" y="298" class="node-detail">output-tool → input-tools</text><text x="1538" y="318" class="node-detail">remember · recall · list</text><text x="1538" y="338" class="node-detail">get · update · forget</text></g><g data-component-id="memory-store"><title>MemoryToolStore</title><rect x="1500" y="510" width="300" height="185" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="1500" y="510" width="300" height="7" rx="4" fill="#ff79c6"/><text x="1518" y="536" class="type-label">DURABLE DATA</text><text x="1518" y="562" class="node-label">MemoryToolStore</text><text x="1518" y="588" class="node-detail">owner / workflow / node scope</text><text x="1518" y="608" class="node-detail">versioned idempotent mutations</text><text x="1518" y="628" class="node-detail">lexical + optional embedding</text></g><g data-component-id="memory-items"><title>Facts & Decisions</title><rect x="1180" y="760" width="300" height="150" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="1180" y="760" width="300" height="7" rx="4" fill="#50fa7b"/><text x="1198" y="786" class="type-label">MEMORY ITEMS</text><text x="1198" y="812" class="node-label">Facts & Decisions</text><text x="1198" y="838" class="node-detail">returned only when recalled</text><text x="1198" y="858" class="node-detail">never automatic transcript</text></g><g data-callout-id="context-invariant"><rect x="440" y="220" width="300" height="160" rx="10" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2" stroke-dasharray="7 6"/><text x="456" y="250" class="callout-title">Automatic continuity</text><text x="456" y="276" class="callout-text" textLength="268.0" lengthAdjust="spacingAndGlyphs">System managed; no model tool call</text><text x="456" y="298" class="callout-text">Same conversation across firings</text><text x="456" y="320" class="callout-text">Reset starts a new generation</text></g><g data-callout-id="memory-invariant"><rect x="1180" y="220" width="300" height="160" rx="10" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2" stroke-dasharray="7 6"/><text x="1196" y="250" class="callout-title">Explicit knowledge</text><text x="1196" y="276" class="callout-text" textLength="268.0" lengthAdjust="spacingAndGlyphs">Model or human chooses mutations</text><text x="1196" y="298" class="callout-text">Stable facts and decisions only</text><text x="1196" y="320" class="callout-text" textLength="268.0" lengthAdjust="spacingAndGlyphs">Clear never clears Agent Context</text></g>+<g aria-label="Legend"><circle cx="72" cy="1038" r="7" fill="#bd93f9"/><text x="86" y="1044" class="legend">Agents / system</text><circle cx="317" cy="1038" r="7" fill="#8be9fd"/><text x="331" y="1044" class="legend">Models / interfaces</text><circle cx="562" cy="1038" r="7" fill="#50fa7b"/><text x="576" y="1044" class="legend">Tools / results</text><circle cx="807" cy="1038" r="7" fill="#ff79c6"/><text x="821" y="1044" class="legend">Triggers / events</text><circle cx="1052" cy="1038" r="7" fill="#ffb86c"/><text x="1066" y="1044" class="legend">Workflow / runtime</text><circle cx="1297" cy="1038" r="7" fill="#f1fa8c"/><text x="1311" y="1044" class="legend">Security note</text></g>+</svg>diff --git a/docs/diagrams/credentials-architecture.svg b/docs/diagrams/credentials-architecture.svgnew file mode 100644index 00000000..8361f3ad--- /dev/null+++ b/docs/diagrams/credentials-architecture.svg@@ -0,0 +1,25 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080" width="100%" role="img" aria-labelledby="title desc">+<title id="title">Credentials Architecture</title>+<desc id="desc">Credential configuration flows from the server-owned provider catalogue through modular client panels and registered WebSocket handlers. AuthService is the only plaintext access boundary; CredentialsDatabase encrypts separate API-key and OAuth-token records with the process-held Fernet service, while status events invalidate every connected client's catalogue. Sources: client/src/components/credentials/CredentialsModal.tsx; client/src/components/credentials/useCredentialPanel.ts; server/services/credentials/handlers.py; server/services/plugin/credential.py; server/services/auth.py; server/core/credentials_database.py; server/core/encryption.py; server/services/status_broadcaster.py</desc>+<defs>+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto"><path d="M0,0 L10,5 L0,10 z" fill="#e8eaed"/></marker>+ <style>+ .title { fill:#e8eaed; font:700 30px Geist,system-ui,sans-serif; }+ .subtitle { fill:#9aa1ac; font:400 18px Geist,system-ui,sans-serif; }+ .group-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:1.2px; }+ .type-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:.8px; }+ .node-label { fill:#e8eaed; font:650 20px Geist,system-ui,sans-serif; }+ .node-detail { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .edge-label { fill:#e8eaed; font:500 16px Geist,system-ui,sans-serif; }+ .edge-protocol { fill:#9aa1ac; font:500 16px 'JetBrains Mono',ui-monospace,monospace; }+ .callout-title { fill:#e8eaed; font:650 18px Geist,system-ui,sans-serif; }+ .callout-text { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .legend { fill:#9aa1ac; font:500 16px Geist,system-ui,sans-serif; }+ </style>+</defs>+<rect width="1920" height="1080" fill="#0d0f13"/>+<text x="72" y="58" class="title">Credentials Architecture</text>+<text x="72" y="91" class="subtitle">Server-owned catalogue, WebSocket orchestration, and encrypted storage</text>+<g data-group-id="client-plane"><rect x="72" y="150" width="650" height="780" rx="18" fill="#15171c" stroke="#8be9fd" stroke-width="2"/><text x="92" y="182" class="group-label">CLIENT CONTROL PLANE</text></g><g data-group-id="server-plane"><rect x="760" y="150" width="1088" height="780" rx="18" fill="#15171c" stroke="#bd93f9" stroke-width="2"/><text x="780" y="182" class="group-label">SERVER SECURITY PLANE</text></g><g data-relationship-id="modal-uses-client-state"><title>panel actions + cached status · via React Query</title><path d="M 380 315.0 L 420 315.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 400.0 205.0 L 490 151" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="367.8" y="127.0" width="244.39999999999998" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="490" y="148" class="edge-label" text-anchor="middle" textLength="226.4" lengthAdjust="spacingAndGlyphs">panel actions + cached status</text><text x="490" y="168" class="edge-protocol" text-anchor="middle">via React Query</text></g><g data-relationship-id="client-calls-handlers"><title>catalogue + credential RPC · via WebSocket</title><path d="M 680 315.0 L 800 315.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 740.0 315.0 L 740 477" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="629.2" y="453.0" width="221.6" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="740" y="474" class="edge-label" text-anchor="middle" textLength="203.6" lengthAdjust="spacingAndGlyphs">catalogue + credential RPC</text><text x="740" y="494" class="edge-protocol" text-anchor="middle">via WebSocket</text></g><g data-relationship-id="handlers-dispatch-registry"><title>dispatch validation</title><path d="M 1070 315.0 L 1130 315.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1100.0 205.0 L 1190 205" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1105.8" y="190.0" width="168.4" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1190" y="208" class="edge-label" text-anchor="middle" textLength="150.4" lengthAdjust="spacingAndGlyphs">dispatch validation</text></g><g data-relationship-id="handlers-use-auth-service"><title>get · save · delete</title><path d="M 935.0 400 L 935 450 L 1215 450 L 1215.0 500" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="990.8" y="435.0" width="168.4" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1075" y="453" class="edge-label" text-anchor="middle" textLength="150.4" lengthAdjust="spacingAndGlyphs">get · save · delete</text></g><g data-relationship-id="registry-stores-valid-result"><title>store valid probe result</title><path d="M 1280.0 400 L 1215.0 500" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1280.0 480.0 L 1280 426" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1176.8" y="411.0" width="206.39999999999998" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1280" y="429" class="edge-label" text-anchor="middle" textLength="188.4" lengthAdjust="spacingAndGlyphs">store valid probe result</text></g><g data-relationship-id="registry-publishes-status"><title>publish validation status</title><path d="M 1430 315.0 L 1500 315.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1358.0" y="190.0" width="214.0" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1465" y="208" class="edge-label" text-anchor="middle" textLength="196.0" lengthAdjust="spacingAndGlyphs">publish validation status</text></g><g data-relationship-id="auth-publishes-mutation"><title>catalogue version + mutation event</title><path d="M 1400 595.0 L 1450 595 L 1450 440 L 1650 440 L 1650.0 400" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1418.8" y="425.0" width="282.4" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1560" y="443" class="edge-label" text-anchor="middle" textLength="264.4" lengthAdjust="spacingAndGlyphs">catalogue version + mutation event</text></g><g data-relationship-id="auth-canonical-crud"><title>canonical encrypted CRUD</title><path d="M 1215.0 690 L 1415.0 760" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1156.8" y="700.0" width="206.39999999999998" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1260" y="718" class="edge-label" text-anchor="middle" textLength="188.4" lengthAdjust="spacingAndGlyphs">canonical encrypted CRUD</text></g><g data-relationship-id="db-uses-encryption"><title>encrypt / decrypt payloads · via Fernet</title><path d="M 1415.0 760 L 1415 720 L 1645 720 L 1645.0 690" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1580.0 720.0 L 1580 966.0" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1469.2" y="942.0" width="221.6" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1580" y="963.0" class="edge-label" text-anchor="middle" textLength="203.6" lengthAdjust="spacingAndGlyphs">encrypt / decrypt payloads</text><text x="1580" y="983.0" class="edge-protocol" text-anchor="middle">via Fernet</text></g><g data-relationship-id="broadcast-invalidates-client"><title>push status + invalidate catalogue · via WebSocket</title><path d="M 1650.0 230 L 1650 115 L 550 115 L 550.0 230" fill="none" stroke="#e8eaed" stroke-width="2" stroke-dasharray="10 8" marker-end="url(#arrow)"/><path d="M 1100.0 115.0 L 1190 148.0" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1048.8" y="124.0" width="282.4" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1190" y="145.0" class="edge-label" text-anchor="middle" textLength="264.4" lengthAdjust="spacingAndGlyphs">push status + invalidate catalogue</text><text x="1190" y="165.0" class="edge-protocol" text-anchor="middle">via WebSocket</text></g><g data-component-id="credentials-modal"><title>Credentials Modal</title><rect x="110" y="230" width="270" height="170" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="110" y="230" width="270" height="7" rx="4" fill="#8be9fd"/><text x="128" y="256" class="type-label">UI</text><text x="128" y="282" class="node-label">Credentials Modal</text><text x="128" y="308" class="node-detail" textLength="234.0" lengthAdjust="spacingAndGlyphs">server catalogue + IDB warm-start</text><text x="128" y="328" class="node-detail" textLength="234.0" lengthAdjust="spacingAndGlyphs">search palette + lazy panels</text></g><g data-component-id="client-state"><title>WebSocket + Query State</title><rect x="420" y="230" width="260" height="170" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="420" y="230" width="260" height="7" rx="4" fill="#8be9fd"/><text x="438" y="256" class="type-label">CLIENT</text><text x="438" y="282" class="node-label">WebSocket +</text><text x="438" y="304" class="node-label">Query State</text><text x="438" y="330" class="node-detail">request / response RPC</text><text x="438" y="350" class="node-detail">catalogue invalidation</text></g><g data-component-id="ws-handlers"><title>Credential WS Handlers</title><rect x="800" y="230" width="270" height="170" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="800" y="230" width="270" height="7" rx="4" fill="#ffb86c"/><text x="818" y="256" class="type-label">ROUTER</text><text x="818" y="282" class="node-label">Credential WS</text><text x="818" y="304" class="node-label">Handlers</text><text x="818" y="330" class="node-detail" textLength="234.0" lengthAdjust="spacingAndGlyphs">validate · get · save · delete</text><text x="818" y="350" class="node-detail" textLength="234.0" lengthAdjust="spacingAndGlyphs">idempotent mutation envelope</text></g><g data-component-id="credential-registries"><title>Credential Registries</title><rect x="1130" y="230" width="300" height="170" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="1130" y="230" width="300" height="7" rx="4" fill="#ffb86c"/><text x="1148" y="256" class="type-label">REGISTRY</text><text x="1148" y="282" class="node-label">Credential Registries</text><text x="1148" y="308" class="node-detail" textLength="264.0" lengthAdjust="spacingAndGlyphs">catalogue metadata + stored flags</text><text x="1148" y="328" class="node-detail">credential classes + probes</text></g><g data-component-id="status-broadcaster"><title>Status Broadcaster</title><rect x="1500" y="230" width="300" height="170" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="1500" y="230" width="300" height="7" rx="4" fill="#ff79c6"/><text x="1518" y="256" class="type-label">EVENTS</text><text x="1518" y="282" class="node-label">Status Broadcaster</text><text x="1518" y="308" class="node-detail">api_key_status</text><text x="1518" y="328" class="node-detail">credential_catalogue_updated</text></g><g data-component-id="auth-service"><title>AuthService</title><rect x="1030" y="500" width="370" height="190" rx="12" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2"/><rect x="1030" y="500" width="370" height="7" rx="4" fill="#f1fa8c"/><text x="1048" y="526" class="type-label">SECURITY SERVICE</text><text x="1048" y="552" class="node-label">AuthService</text><text x="1048" y="578" class="node-detail">only credential access point</text><text x="1048" y="598" class="node-detail">separate API-key + OAuth caches</text><text x="1048" y="618" class="node-detail">refresh tokens never cached</text></g><g data-component-id="encryption-service"><title>Encryption Service</title><rect x="1490" y="500" width="310" height="190" rx="12" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2"/><rect x="1490" y="500" width="310" height="7" rx="4" fill="#f1fa8c"/><text x="1508" y="526" class="type-label">CRYPTO</text><text x="1508" y="552" class="node-label">Encryption Service</text><text x="1508" y="578" class="node-detail">PBKDF2-SHA256 · 600k</text><text x="1508" y="598" class="node-detail">Fernet key held in process</text><text x="1508" y="618" class="node-detail">server key + install salt</text></g><g data-component-id="credentials-db"><title>credentials.db</title><rect x="1180" y="760" width="470" height="150" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="1180" y="760" width="470" height="7" rx="4" fill="#ff79c6"/><text x="1198" y="786" class="type-label">ENCRYPTED SQLITE</text><text x="1198" y="812" class="node-label">credentials.db</text><text x="1198" y="838" class="node-detail">EncryptedAPIKey · EncryptedOAuthToken</text><text x="1198" y="858" class="node-detail">credentials_metadata encryption salt</text></g><g data-callout-id="storage-split"><rect x="800" y="735" width="330" height="175" rx="10" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2" stroke-dasharray="7 6"/><text x="816" y="765" class="callout-title">Two non-interchangeable stores</text><text x="816" y="791" class="callout-text">API keys: session + provider</text><text x="816" y="813" class="callout-text">OAuth tokens: provider + customer</text><text x="816" y="835" class="callout-text" textLength="298.0" lengthAdjust="spacingAndGlyphs">Access tokens may cache; refresh tokens do not</text></g>+<g aria-label="Legend"><circle cx="72" cy="1038" r="7" fill="#bd93f9"/><text x="86" y="1044" class="legend">Agents / system</text><circle cx="317" cy="1038" r="7" fill="#8be9fd"/><text x="331" y="1044" class="legend">Models / interfaces</text><circle cx="562" cy="1038" r="7" fill="#50fa7b"/><text x="576" y="1044" class="legend">Tools / results</text><circle cx="807" cy="1038" r="7" fill="#ff79c6"/><text x="821" y="1044" class="legend">Triggers / events</text><circle cx="1052" cy="1038" r="7" fill="#ffb86c"/><text x="1066" y="1044" class="legend">Workflow / runtime</text><circle cx="1297" cy="1038" r="7" fill="#f1fa8c"/><text x="1311" y="1044" class="legend">Security note</text></g>+</svg>diff --git a/docs/diagrams/durable-deployment-events.svg b/docs/diagrams/durable-deployment-events.svgnew file mode 100644index 00000000..563d6b5b--- /dev/null+++ b/docs/diagrams/durable-deployment-events.svg@@ -0,0 +1,25 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080" width="100%" role="img" aria-labelledby="title desc">+<title id="title">Durable Deployment and Events</title>+<desc id="desc">A deployment lifecycle and event-flow view showing Start/Pause/Resume/Reset controls, immutable per-generation graph snapshots, the long-lived WorkflowControlWorkflow, push/poll/cron trigger paths, CloudEvents dispatch, and child graph execution. Sources: server/services/deployment/handlers.py; server/services/deployment/control.py; server/services/deployment/triggers.py; server/services/temporal/workflow_control_workflow.py; server/services/events/envelope.py; server/services/events/dispatch.py; server/services/temporal/schedules.py; server/nodes/scheduler/cron_scheduler/_workflow.py; server/services/workflow.py</desc>+<defs>+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto"><path d="M0,0 L10,5 L0,10 z" fill="#e8eaed"/></marker>+ <style>+ .title { fill:#e8eaed; font:700 30px Geist,system-ui,sans-serif; }+ .subtitle { fill:#9aa1ac; font:400 18px Geist,system-ui,sans-serif; }+ .group-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:1.2px; }+ .type-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:.8px; }+ .node-label { fill:#e8eaed; font:650 20px Geist,system-ui,sans-serif; }+ .node-detail { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .edge-label { fill:#e8eaed; font:500 16px Geist,system-ui,sans-serif; }+ .edge-protocol { fill:#9aa1ac; font:500 16px 'JetBrains Mono',ui-monospace,monospace; }+ .callout-title { fill:#e8eaed; font:650 18px Geist,system-ui,sans-serif; }+ .callout-text { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .legend { fill:#9aa1ac; font:500 16px Geist,system-ui,sans-serif; }+ </style>+</defs>+<rect width="1920" height="1080" fill="#0d0f13"/>+<text x="72" y="58" class="title">Durable Deployment and Events</text>+<text x="72" y="91" class="subtitle">Generation snapshots, trigger admission, controller signals and child workflow runs</text>+<g data-group-id="control-plane"><rect x="45" y="145" width="610" height="815" rx="18" fill="#15171c" stroke="#f1fa8c" stroke-width="2"/><text x="65" y="177" class="group-label">DEPLOYMENT CONTROL PLANE</text></g><g data-group-id="trigger-plane"><rect x="690" y="145" width="710" height="815" rx="18" fill="#15171c" stroke="#ff79c6" stroke-width="2"/><text x="710" y="177" class="group-label">TRIGGER AND EVENT PLANE</text></g><g data-group-id="execution-plane"><rect x="1435" y="145" width="440" height="815" rx="18" fill="#15171c" stroke="#ffb86c" stroke-width="2"/><text x="1455" y="177" class="group-label">DURABLE EXECUTION</text></g><g data-relationship-id="r-controls-service"><title>Requests lifecycle transition · via WebSocket command</title><path d="M 340 275.0 L 370 275.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="227.8" y="366.0" width="244.39999999999998" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="350" y="387" class="edge-label" text-anchor="middle" textLength="226.4" lengthAdjust="spacingAndGlyphs">Requests lifecycle transition</text><text x="350" y="407" class="edge-protocol" text-anchor="middle">via WebSocket command</text></g><g data-relationship-id="r-service-snapshot"><title>Allocates or CAS-updates · via workflow database</title><path d="M 495.0 345 L 495 405 L 210 405 L 210.0 485" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 350.0 405.0 L 115.19999999999999 405" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="12.0" y="381.0" width="206.39999999999998" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="115.19999999999999" y="402" class="edge-label" text-anchor="middle" textLength="188.4" lengthAdjust="spacingAndGlyphs">Allocates or CAS-updates</text><text x="115.19999999999999" y="422" class="edge-protocol" text-anchor="middle" textLength="188.4" lengthAdjust="spacingAndGlyphs">via workflow database</text></g><g data-relationship-id="r-snapshot-controller"><title>Starts with immutable graph snapshot · via Temporal gRPC</title><path d="M 340 562.5 L 370 562.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="201.20000000000002" y="676.0" width="297.59999999999997" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="350" y="697" class="edge-label" text-anchor="middle" textLength="279.6" lengthAdjust="spacingAndGlyphs">Starts with immutable graph snapshot</text><text x="350" y="717" class="edge-protocol" text-anchor="middle">via Temporal gRPC</text></g><g data-relationship-id="r-controls-controller"><title>Updates pause/resume or signals reset · via Temporal Update / Signal</title><path d="M 495.0 345 L 495.0 485" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 495.0 405.0 L 675 405" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="522.4" y="381.0" width="305.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="675" y="402" class="edge-label" text-anchor="middle" textLength="287.2" lengthAdjust="spacingAndGlyphs">Updates pause/resume or signals reset</text><text x="675" y="422" class="edge-protocol" text-anchor="middle">via Temporal Update / Signal</text></g><g data-relationship-id="r-service-local-state"><title>Projects admission state · via in-process</title><path d="M 495.0 345 L 640 415 L 640 735 L 355 735 L 355.0 775" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 550.0 735.0 L 640 735" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="536.8" y="711.0" width="206.39999999999998" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="640" y="732" class="edge-label" text-anchor="middle" textLength="188.4" lengthAdjust="spacingAndGlyphs">Projects admission state</text><text x="640" y="752" class="edge-protocol" text-anchor="middle">via in-process</text></g><g data-relationship-id="r-push-event"><title>Normalizes inbound event · via CloudEvents 1.0</title><path d="M 825.0 320 L 855.0 455" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 825.0 385.0 L 1005 385" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="901.8" y="361.0" width="206.39999999999998" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1005" y="382" class="edge-label" text-anchor="middle" textLength="188.4" lengthAdjust="spacingAndGlyphs">Normalizes inbound event</text><text x="1005" y="402" class="edge-protocol" text-anchor="middle">via CloudEvents 1.0</text></g><g data-relationship-id="r-event-dispatch"><title>Emits envelope · via async dispatch</title><path d="M 980 520.0 L 1040 520.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="929.6" y="621.0" width="160.79999999999998" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1010" y="642" class="edge-label" text-anchor="middle">Emits envelope</text><text x="1010" y="662" class="edge-protocol" text-anchor="middle" textLength="142.8" lengthAdjust="spacingAndGlyphs">via async dispatch</text></g><g data-relationship-id="r-dispatch-controller"><title>Signals matching controller · via Visibility + on_event</title><path d="M 1040 520.0 L 1010 520 L 675 520 L 620 562.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 825.0 520.0 L 735 682" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="620.4" y="658.0" width="229.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="735" y="679" class="edge-label" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">Signals matching controller</text><text x="735" y="699" class="edge-protocol" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">via Visibility + on_event</text></g><g data-relationship-id="r-poll-controller"><title>Registers durable poll loop · via register_trigger signal</title><path d="M 1045.0 320 L 1045 365 L 675 365 L 675 562 L 620 562.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 835.0 365.0 L 1285 365" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1170.4" y="341.0" width="229.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1285" y="362" class="edge-label" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">Registers durable poll loop</text><text x="1285" y="382" class="edge-protocol" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">via register_trigger signal</text></g><g data-relationship-id="r-cron-action"><title>Fires scheduled action · via Temporal Schedule</title><path d="M 1360 262.5 L 1415 262 L 1415 642 L 1480 642.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1415.0 465.0 L 1415 519" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1319.4" y="495.0" width="191.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1415" y="516" class="edge-label" text-anchor="middle" textLength="173.2" lengthAdjust="spacingAndGlyphs">Fires scheduled action</text><text x="1415" y="536" class="edge-protocol" text-anchor="middle" textLength="173.2" lengthAdjust="spacingAndGlyphs">via Temporal Schedule</text></g><g data-relationship-id="r-registration-controller"><title>Registers definitions and pause state · via Temporal Signal</title><path d="M 875 805.0 L 675 805 L 675 562 L 620 562.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 675.0 720.0 L 675 828" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="522.4" y="804.0" width="305.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="675" y="825" class="edge-label" text-anchor="middle" textLength="287.2" lengthAdjust="spacingAndGlyphs">Registers definitions and pause state</text><text x="675" y="845" class="edge-protocol" text-anchor="middle">via Temporal Signal</text></g><g data-relationship-id="r-controller-child"><title>Spawns admitted event or poll run · via Temporal child workflow</title><path d="M 620 562.5 L 1410 562 L 1410 367 L 1480 367.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1225.0 367.0 L 1315 421" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1177.6" y="397.0" width="274.79999999999995" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1315" y="418" class="edge-label" text-anchor="middle" textLength="256.8" lengthAdjust="spacingAndGlyphs">Spawns admitted event or poll run</text><text x="1315" y="438" class="edge-protocol" text-anchor="middle" textLength="256.8" lengthAdjust="spacingAndGlyphs">via Temporal child workflow</text></g><g data-relationship-id="r-cron-child"><title>Launches snapshotted graph · via Temporal child workflow</title><path d="M 1655.0 570 L 1655.0 440" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1540.4" y="481.0" width="229.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1655" y="502" class="edge-label" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">Launches snapshotted graph</text><text x="1655" y="522" class="edge-protocol" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">via Temporal child workflow</text></g><g data-relationship-id="r-child-status"><title>Persists and broadcasts run state · via database + WebSocket</title><path d="M 1655.0 440 L 1655.0 810" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1517.6" y="736.0" width="274.79999999999995" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1655" y="757" class="edge-label" text-anchor="middle" textLength="256.8" lengthAdjust="spacingAndGlyphs">Persists and broadcasts run state</text><text x="1655" y="777" class="edge-protocol" text-anchor="middle">via database + WebSocket</text></g><g data-relationship-id="r-cron-status"><title>Reports scheduled run state · via Temporal + WebSocket</title><path d="M 1655.0 715 L 1655.0 810" fill="none" stroke="#e8eaed" stroke-width="2" stroke-dasharray="10 8" marker-end="url(#arrow)"/><path d="M 1775.0 760.0 L 1775 966.0" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1660.4" y="942.0" width="229.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1775" y="963.0" class="edge-label" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">Reports scheduled run state</text><text x="1775" y="983.0" class="edge-protocol" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">via Temporal + WebSocket</text></g><g data-component-id="lifecycle-controls"><title>Start · Pause · Resume · Reset</title><rect x="80" y="205" width="260" height="140" rx="12" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2"/><rect x="80" y="205" width="260" height="7" rx="4" fill="#f1fa8c"/><text x="98" y="231" class="type-label">OPERATOR CONTROLS</text><text x="98" y="257" class="node-label">Start · Pause</text><text x="98" y="279" class="node-label">Resume · Reset</text><text x="98" y="305" class="node-detail">Revision-aware commands</text></g><g data-component-id="workflow-control-service"><title>WorkflowControlService</title><rect x="370" y="205" width="250" height="140" rx="12" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2"/><rect x="370" y="205" width="250" height="7" rx="4" fill="#f1fa8c"/><text x="388" y="231" class="type-label">CONTROL SERVICE</text><text x="388" y="257" class="node-label" textLength="214.0" lengthAdjust="spacingAndGlyphs">WorkflowControlService</text><text x="388" y="283" class="node-detail" textLength="214.0" lengthAdjust="spacingAndGlyphs">CAS lifecycle transitions</text></g><g data-component-id="generation-snapshot"><title>Generation control row</title><rect x="80" y="485" width="260" height="155" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="80" y="485" width="260" height="7" rx="4" fill="#ff79c6"/><text x="98" y="511" class="type-label">DURABLE DATA</text><text x="98" y="537" class="node-label">Generation control</text><text x="98" y="559" class="node-label">row</text><text x="98" y="585" class="node-detail">graph_snapshot + owner_id</text><text x="98" y="605" class="node-detail">generation + revision</text></g><g data-component-id="controller"><title>WorkflowControlWorkflow</title><rect x="370" y="485" width="250" height="155" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="370" y="485" width="250" height="7" rx="4" fill="#ffb86c"/><text x="388" y="511" class="type-label">LONG-LIVED WORKFLOW</text><text x="388" y="537" class="node-label">WorkflowControl</text><text x="388" y="559" class="node-label">Workflow</text><text x="388" y="585" class="node-detail" textLength="214.0" lengthAdjust="spacingAndGlyphs">Signals, poll loops, event queue</text><text x="388" y="605" class="node-detail">continue-as-new</text></g><g data-component-id="local-runtime-state"><title>Local admission state</title><rect x="215" y="775" width="280" height="120" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="215" y="775" width="280" height="7" rx="4" fill="#ffb86c"/><text x="233" y="801" class="type-label">PROCESS PROJECTION</text><text x="233" y="827" class="node-label">Local admission state</text><text x="233" y="853" class="node-detail">running / paused projection</text></g><g data-component-id="push-trigger"><title>Push trigger</title><rect x="730" y="205" width="190" height="115" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="730" y="205" width="190" height="7" rx="4" fill="#ff79c6"/><text x="748" y="231" class="type-label" textLength="154.0" lengthAdjust="spacingAndGlyphs">TRIGGER DEFINITION</text><text x="748" y="257" class="node-label">Push trigger</text><text x="748" y="283" class="node-detail" textLength="154.0" lengthAdjust="spacingAndGlyphs">Webhook or platform event</text></g><g data-component-id="poll-trigger"><title>Poll trigger</title><rect x="950" y="205" width="190" height="115" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="950" y="205" width="190" height="7" rx="4" fill="#ff79c6"/><text x="968" y="231" class="type-label" textLength="154.0" lengthAdjust="spacingAndGlyphs">TRIGGER DEFINITION</text><text x="968" y="257" class="node-label">Poll trigger</text><text x="968" y="283" class="node-detail" textLength="154.0" lengthAdjust="spacingAndGlyphs">Controller timer + activity</text></g><g data-component-id="cron-trigger"><title>Cron trigger</title><rect x="1170" y="205" width="190" height="115" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="1170" y="205" width="190" height="7" rx="4" fill="#ff79c6"/><text x="1188" y="231" class="type-label" textLength="154.0" lengthAdjust="spacingAndGlyphs">TRIGGER DEFINITION</text><text x="1188" y="257" class="node-label">Cron trigger</text><text x="1188" y="283" class="node-detail">Temporal Schedule</text></g><g data-component-id="cloudevent"><title>WorkflowEvent</title><rect x="730" y="455" width="250" height="130" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="730" y="455" width="250" height="7" rx="4" fill="#ff79c6"/><text x="748" y="481" class="type-label">CLOUDEVENTS 1.0</text><text x="748" y="507" class="node-label">WorkflowEvent</text><text x="748" y="533" class="node-detail" textLength="214.0" lengthAdjust="spacingAndGlyphs">id · source · type · subject</text></g><g data-component-id="event-dispatch"><title>dispatch.emit</title><rect x="1040" y="455" width="250" height="130" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="1040" y="455" width="250" height="7" rx="4" fill="#ff79c6"/><text x="1058" y="481" class="type-label">EVENT ROUTER</text><text x="1058" y="507" class="node-label">dispatch.emit</text><text x="1058" y="533" class="node-detail" textLength="214.0" lengthAdjust="spacingAndGlyphs">Visibility query + signal</text></g><g data-component-id="trigger-registration"><title>Trigger registration</title><rect x="875" y="745" width="300" height="120" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="875" y="745" width="300" height="7" rx="4" fill="#ff79c6"/><text x="893" y="771" class="type-label">CONTROL SIGNAL</text><text x="893" y="797" class="node-label">Trigger registration</text><text x="893" y="823" class="node-detail">register_trigger + pause flags</text></g><g data-component-id="child-graph-workflow"><title>Child graph workflow</title><rect x="1480" y="295" width="350" height="145" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="1480" y="295" width="350" height="7" rx="4" fill="#ffb86c"/><text x="1498" y="321" class="type-label">TEMPORAL WORKFLOW</text><text x="1498" y="347" class="node-label">Child graph workflow</text><text x="1498" y="373" class="node-detail">Snapshotted nodes and edges</text></g><g data-component-id="cron-action-workflow"><title>Cron action workflow</title><rect x="1480" y="570" width="350" height="145" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="1480" y="570" width="350" height="7" rx="4" fill="#ffb86c"/><text x="1498" y="596" class="type-label">TEMPORAL WORKFLOW</text><text x="1498" y="622" class="node-label">Cron action workflow</text><text x="1498" y="648" class="node-detail">Schedule-owned graph launch</text></g><g data-component-id="execution-status"><title>Run status and events</title><rect x="1515" y="810" width="280" height="115" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="1515" y="810" width="280" height="7" rx="4" fill="#50fa7b"/><text x="1533" y="836" class="type-label">OBSERVABLE RESULT</text><text x="1533" y="862" class="node-label">Run status and events</text><text x="1533" y="888" class="node-detail">Database + WebSocket</text></g><g data-callout-id="legacy-fallback"><rect x="735" y="885" width="630" height="65" rx="10" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2" stroke-dasharray="7 6"/><text x="751" y="915" class="callout-title">Canvas path</text><text x="751" y="941" class="callout-text">Per-node Run waits on the in-memory event_waiter; only Start deploys.</text></g>+<g aria-label="Legend"><circle cx="72" cy="1038" r="7" fill="#bd93f9"/><text x="86" y="1044" class="legend">Agents / system</text><circle cx="317" cy="1038" r="7" fill="#8be9fd"/><text x="331" y="1044" class="legend">Models / interfaces</text><circle cx="562" cy="1038" r="7" fill="#50fa7b"/><text x="576" y="1044" class="legend">Tools / results</text><circle cx="807" cy="1038" r="7" fill="#ff79c6"/><text x="821" y="1044" class="legend">Triggers / events</text><circle cx="1052" cy="1038" r="7" fill="#ffb86c"/><text x="1066" y="1044" class="legend">Workflow / runtime</text><circle cx="1297" cy="1038" r="7" fill="#f1fa8c"/><text x="1311" y="1044" class="legend">Security note</text></g>+</svg>diff --git a/docs/diagrams/master-skill-editor.svg b/docs/diagrams/master-skill-editor.svgnew file mode 100644index 00000000..0840381c--- /dev/null+++ b/docs/diagrams/master-skill-editor.svg@@ -0,0 +1,25 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080" width="100%" role="img" aria-labelledby="title desc">+<title id="title">Master Skill Editor</title>+<desc id="desc">Source-backed anatomy of the Master Skill editor: built-in and user skill sources flow through WebSocket handlers and TanStack caches into the catalogue and instruction editor, while enabled skills persist in skills_config, expand for a connected agent, and report safe runtime badges back to the exact Master Skill row. Sources: client/src/components/parameterPanel/MasterSkillEditor.tsx; client/src/hooks/useFolderSkills.ts; server/services/skills/handlers.py; server/nodes/skill/master_skill/__init__.py; server/nodes/skill/_expander.py; server/services/skill_runtime.py; server/nodes/skill/master_skill/_events.py; client/src/contexts/WebSocketContext.tsx</desc>+<defs>+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto"><path d="M0,0 L10,5 L0,10 z" fill="#e8eaed"/></marker>+ <style>+ .title { fill:#e8eaed; font:700 30px Geist,system-ui,sans-serif; }+ .subtitle { fill:#9aa1ac; font:400 18px Geist,system-ui,sans-serif; }+ .group-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:1.2px; }+ .type-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:.8px; }+ .node-label { fill:#e8eaed; font:650 20px Geist,system-ui,sans-serif; }+ .node-detail { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .edge-label { fill:#e8eaed; font:500 16px Geist,system-ui,sans-serif; }+ .edge-protocol { fill:#9aa1ac; font:500 16px 'JetBrains Mono',ui-monospace,monospace; }+ .callout-title { fill:#e8eaed; font:650 18px Geist,system-ui,sans-serif; }+ .callout-text { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .legend { fill:#9aa1ac; font:500 16px Geist,system-ui,sans-serif; }+ </style>+</defs>+<rect width="1920" height="1080" fill="#0d0f13"/>+<text x="72" y="58" class="title">Master Skill Editor</text>+<text x="72" y="91" class="subtitle">One split panel joins the skill catalogue, authoritative instructions, node configuration, and live retrieval state.</text>+<g data-group-id="skill-sources"><rect x="70" y="130" width="500" height="700" rx="18" fill="#15171c" stroke="#ff79c6" stroke-width="2"/><text x="90" y="162" class="group-label">SKILL SOURCES + WIRE HANDLERS</text></g><g data-group-id="editor-surface"><rect x="610" y="130" width="760" height="700" rx="18" fill="#15171c" stroke="#8be9fd" stroke-width="2"/><text x="630" y="162" class="group-label">MASTER SKILL EDITOR</text></g><g data-group-id="agent-runtime"><rect x="1410" y="130" width="440" height="700" rx="18" fill="#15171c" stroke="#ffb86c" stroke-width="2"/><text x="1430" y="162" class="group-label">CONNECTED AGENT RUNTIME</text></g><g data-relationship-id="handlers-scan-builtins"><title>scan and load metadata + instructions · via filesystem</title><path d="M 320.0 360 L 220 390 L 208 390 L 207.5 430" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 205.0 390.0 L 164.6 390" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="12.0" y="366.0" width="305.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="164.6" y="387" class="edge-label" text-anchor="middle" textLength="287.2" lengthAdjust="spacingAndGlyphs">scan and load metadata + instructions</text><text x="164.6" y="407" class="edge-protocol" text-anchor="middle">via filesystem</text></g><g data-relationship-id="handlers-crud-user-skills"><title>list and mutate custom skills · via database</title><path d="M 320.0 360 L 430 390 L 433 390 L 432.5 430" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 430.0 390.0 L 520 390" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="397.8" y="366.0" width="244.39999999999998" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="520" y="387" class="edge-label" text-anchor="middle" textLength="226.4" lengthAdjust="spacingAndGlyphs">list and mutate custom skills</text><text x="520" y="407" class="edge-protocol" text-anchor="middle">via database</text></g><g data-relationship-id="handlers-refresh-cache"><title>query results and lifecycle invalidation · via WebSocket</title><path d="M 110 280.0 L 90 280 L 90 715 L 110 715.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="106.0" y="591.0" width="328.0" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="270" y="612" class="edge-label" text-anchor="middle" textLength="310.0" lengthAdjust="spacingAndGlyphs">query results and lifecycle invalidation</text><text x="270" y="632" class="edge-protocol" text-anchor="middle">via WebSocket</text></g><g data-relationship-id="cache-builds-projection"><title>cached folder, user, and content records</title><path d="M 530 715.0 L 650 695.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 590.0 690.0 L 590 852" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="426.0" y="837.0" width="328.0" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="590" y="855" class="edge-label" text-anchor="middle" textLength="310.0" lengthAdjust="spacingAndGlyphs">cached folder, user, and content records</text></g><g data-relationship-id="projection-populates-catalogue"><title>render and filter rows</title><path d="M 810.0 620 L 810.0 530" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="714.4" y="560.0" width="191.2" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="810" y="578" class="edge-label" text-anchor="middle" textLength="173.2" lengthAdjust="spacingAndGlyphs">render and filter rows</text></g><g data-relationship-id="catalogue-selects-editor"><title>select skill</title><path d="M 970 365.0 L 1010 365.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 990.0 350.0 L 990 139.0" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="930.0" y="124.0" width="120" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="990" y="142.0" class="edge-label" text-anchor="middle" textLength="102.0" lengthAdjust="spacingAndGlyphs">select skill</text></g><g data-relationship-id="catalogue-writes-toggle"><title>toggle enabled / keep required</title><path d="M 810.0 530 L 810 570 L 990 570 L 990 695 L 1010 695.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 900.0 560.0 L 1080 560" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="954.0" y="545.0" width="252.0" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1080" y="563" class="edge-label" text-anchor="middle" textLength="234.0" lengthAdjust="spacingAndGlyphs">toggle enabled / keep required</text></g><g data-relationship-id="editor-writes-instructions"><title>write instructions + customized flag</title><path d="M 1170.0 530 L 1170.0 620" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1170.0 575.0 L 1170 845" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1021.2" y="830.0" width="297.59999999999997" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1170" y="848" class="edge-label" text-anchor="middle" textLength="279.6" lengthAdjust="spacingAndGlyphs">write instructions + customized flag</text></g><g data-relationship-id="editor-user-skill-crud"><title>create / update / delete user skill · via WebSocket</title><path d="M 1170.0 200 L 1170 170 L 320 170 L 320.0 200" fill="none" stroke="#e8eaed" stroke-width="2" stroke-dasharray="10 8" marker-end="url(#arrow)"/><path d="M 750.0 165.0 L 1200 165" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1055.0" y="141.0" width="290.0" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1200" y="162" class="edge-label" text-anchor="middle" textLength="272.0" lengthAdjust="spacingAndGlyphs">create / update / delete user skill</text><text x="1200" y="182" class="edge-protocol" text-anchor="middle">via WebSocket</text></g><g data-relationship-id="config-expands"><title>expand enabled entries</title><path d="M 1330 695.0 L 1385 695 L 1385 275 L 1450 275.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1385.0 485.0 L 1295 593" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1199.4" y="578.0" width="191.2" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1295" y="596" class="edge-label" text-anchor="middle" textLength="173.2" lengthAdjust="spacingAndGlyphs">expand enabled entries</text></g><g data-relationship-id="expander-builds-runtime"><title>descriptors + Skill tool catalogue</title><path d="M 1630.0 350 L 1630.0 430" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1488.8" y="375.0" width="282.4" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1630" y="393" class="edge-label" text-anchor="middle" textLength="264.4" lengthAdjust="spacingAndGlyphs">descriptors + Skill tool catalogue</text></g><g data-relationship-id="runtime-publishes-status"><title>loading / loaded / used / failed · via node status + CloudEvents</title><path d="M 1630.0 590 L 1630.0 660" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1496.4" y="601.0" width="267.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1630" y="622" class="edge-label" text-anchor="middle" textLength="249.2" lengthAdjust="spacingAndGlyphs">loading / loaded / used / failed</text><text x="1630" y="642" class="edge-protocol" text-anchor="middle" textLength="249.2" lengthAdjust="spacingAndGlyphs">via node status + CloudEvents</text></g><g data-relationship-id="status-back-to-catalogue"><title>project safe state onto matching row</title><path d="M 1630.0 780 L 1630 840 L 595 840 L 595 365 L 650 365.0" fill="none" stroke="#e8eaed" stroke-width="2" stroke-dasharray="10 8" marker-end="url(#arrow)"/><path d="M 1090.0 835.0 L 1540 835" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1391.2" y="820.0" width="297.59999999999997" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1540" y="838" class="edge-label" text-anchor="middle" textLength="279.6" lengthAdjust="spacingAndGlyphs">project safe state onto matching row</text></g><g data-component-id="skill-ws-handlers"><title>Skill WebSocket handlers</title><rect x="110" y="200" width="420" height="160" rx="12" fill="#1b1e25" stroke="#bd93f9" stroke-width="2"/><rect x="110" y="200" width="420" height="7" rx="4" fill="#bd93f9"/><text x="128" y="226" class="type-label">SERVICE</text><text x="128" y="252" class="node-label">Skill WebSocket</text><text x="128" y="274" class="node-label">handlers</text><text x="128" y="300" class="node-detail">list / scan / get content</text><text x="128" y="320" class="node-detail">create / update / delete</text><text x="128" y="340" class="node-detail">skill_lifecycle broadcasts</text></g><g data-component-id="builtin-skill-files"><title>Built-in SKILL.md</title><rect x="110" y="430" width="195" height="150" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="110" y="430" width="195" height="7" rx="4" fill="#ff79c6"/><text x="128" y="456" class="type-label">SOURCE</text><text x="128" y="482" class="node-label">Built-in</text><text x="128" y="504" class="node-label">SKILL.md</text><text x="128" y="530" class="node-detail">server/skills/*</text><text x="128" y="550" class="node-detail" textLength="159.0" lengthAdjust="spacingAndGlyphs">metadata + instructions</text></g><g data-component-id="user-skill-store"><title>User skill store</title><rect x="335" y="430" width="195" height="150" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="335" y="430" width="195" height="7" rx="4" fill="#ff79c6"/><text x="353" y="456" class="type-label">DATABASE</text><text x="353" y="482" class="node-label">User skill</text><text x="353" y="504" class="node-label">store</text><text x="353" y="530" class="node-detail">custom records</text><text x="353" y="550" class="node-detail" textLength="159.0" lengthAdjust="spacingAndGlyphs">display + instructions</text></g><g data-component-id="tanstack-skill-cache"><title>TanStack skill caches</title><rect x="110" y="650" width="420" height="130" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="110" y="650" width="420" height="7" rx="4" fill="#ff79c6"/><text x="128" y="676" class="type-label">CLIENT STATE</text><text x="128" y="702" class="node-label">TanStack skill caches</text><text x="128" y="728" class="node-detail">userSkills · folderSkills</text><text x="128" y="748" class="node-detail">skillContent by name</text></g><g data-component-id="skill-catalogue-pane"><title>Skills catalogue pane</title><rect x="650" y="200" width="320" height="330" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="650" y="200" width="320" height="7" rx="4" fill="#8be9fd"/><text x="668" y="226" class="type-label">INTERFACE</text><text x="668" y="252" class="node-label">Skills catalogue</text><text x="668" y="274" class="node-label">pane</text><text x="668" y="300" class="node-detail">folder selector + search</text><text x="668" y="320" class="node-detail">enable / required / custom</text><text x="668" y="340" class="node-detail">Loading · Loaded · Failed</text><text x="668" y="360" class="node-detail">enabled count + create</text></g><g data-component-id="instructions-editor-pane"><title>Instructions editor pane</title><rect x="1010" y="200" width="320" height="330" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="1010" y="200" width="320" height="7" rx="4" fill="#8be9fd"/><text x="1028" y="226" class="type-label">INTERFACE</text><text x="1028" y="252" class="node-label">Instructions editor</text><text x="1028" y="274" class="node-label">pane</text><text x="1028" y="300" class="node-detail">authoritative markdown</text><text x="1028" y="320" class="node-detail">create / edit / delete</text><text x="1028" y="340" class="node-detail">reset built-in default</text><text x="1028" y="360" class="node-detail">customized state</text></g><g data-component-id="query-projection"><title>Catalogue projection</title><rect x="650" y="620" width="320" height="150" rx="12" fill="#1b1e25" stroke="#9aa1ac" stroke-width="2"/><rect x="650" y="620" width="320" height="7" rx="4" fill="#9aa1ac"/><text x="668" y="646" class="type-label">VIEW MODEL</text><text x="668" y="672" class="node-label">Catalogue projection</text><text x="668" y="698" class="node-detail">folder rows + user rows</text><text x="668" y="718" class="node-detail">selected skill buffer</text></g><g data-component-id="skills-config"><title>Master Skill skills_config</title><rect x="1010" y="620" width="320" height="150" rx="12" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2"/><rect x="1010" y="620" width="320" height="7" rx="4" fill="#f1fa8c"/><text x="1028" y="646" class="type-label">NODE PARAMS</text><text x="1028" y="672" class="node-label">Master Skill</text><text x="1028" y="694" class="node-label">skills_config</text><text x="1028" y="720" class="node-detail">enabled · instructions</text><text x="1028" y="740" class="node-detail">isCustomized · required</text></g><g data-component-id="master-skill-expander"><title>Master Skill expander</title><rect x="1450" y="200" width="360" height="150" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="1450" y="200" width="360" height="7" rx="4" fill="#ffb86c"/><text x="1468" y="226" class="type-label">RUNTIME</text><text x="1468" y="252" class="node-label">Master Skill</text><text x="1468" y="274" class="node-label">expander</text><text x="1468" y="300" class="node-detail">enabled entries only</text><text x="1468" y="320" class="node-detail">per-skill descriptors</text></g><g data-component-id="agent-skill-runtime"><title>Agent Skill runtime</title><rect x="1450" y="430" width="360" height="160" rx="12" fill="#1b1e25" stroke="#bd93f9" stroke-width="2"/><rect x="1450" y="430" width="360" height="7" rx="4" fill="#bd93f9"/><text x="1468" y="456" class="type-label">TOOL RUNTIME</text><text x="1468" y="482" class="node-label">Agent Skill runtime</text><text x="1468" y="508" class="node-detail">progressive load</text><text x="1468" y="528" class="node-detail">declared resources</text><text x="1468" y="548" class="node-detail">bounded safe events</text></g><g data-component-id="skill-status-projection"><title>Exact-node status projection</title><rect x="1450" y="660" width="360" height="120" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="1450" y="660" width="360" height="7" rx="4" fill="#ff79c6"/><text x="1468" y="686" class="type-label">OBSERVABILITY</text><text x="1468" y="712" class="node-label">Exact-node status</text><text x="1468" y="734" class="node-label">projection</text><text x="1468" y="760" class="node-detail">active_skills / last_skills</text></g><g data-callout-id="master-skill-invariant"><rect x="70" y="880" width="1780" height="90" rx="10" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2" stroke-dasharray="7 6"/><text x="86" y="910" class="callout-title">Configuration is authoritative; observability is sanitized</text><text x="86" y="936" class="callout-text">skills_config keeps the enabled flag and instruction body used by the connected agent.</text><text x="86" y="958" class="callout-text">Runtime events expose names and states only—never prompts, arguments, results, secrets, or raw exceptions.</text></g>+<g aria-label="Legend"><circle cx="72" cy="1038" r="7" fill="#bd93f9"/><text x="86" y="1044" class="legend">Agents / system</text><circle cx="317" cy="1038" r="7" fill="#8be9fd"/><text x="331" y="1044" class="legend">Models / interfaces</text><circle cx="562" cy="1038" r="7" fill="#50fa7b"/><text x="576" y="1044" class="legend">Tools / results</text><circle cx="807" cy="1038" r="7" fill="#ff79c6"/><text x="821" y="1044" class="legend">Triggers / events</text><circle cx="1052" cy="1038" r="7" fill="#ffb86c"/><text x="1066" y="1044" class="legend">Workflow / runtime</text><circle cx="1297" cy="1038" r="7" fill="#f1fa8c"/><text x="1311" y="1044" class="legend">Security note</text></g>+</svg>diff --git a/docs/diagrams/node-configuration-anatomy.svg b/docs/diagrams/node-configuration-anatomy.svgnew file mode 100644index 00000000..50adfd7d--- /dev/null+++ b/docs/diagrams/node-configuration-anatomy.svg@@ -0,0 +1,25 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080" width="100%" role="img" aria-labelledby="title desc">+<title id="title">Node Configuration Anatomy</title>+<desc id="desc">An anatomy of the Node Configuration modal showing the real header actions, the 0.7 / 1.6 / 0.7 Input–Parameters–Output layout, NodeSpec-driven variants, local edit-buffer persistence, save-before-run execution, and WebSocket-correlated output handling. Sources: client/src/ParameterPanel.tsx; client/src/components/parameterPanel/ParameterPanelLayout.tsx; client/src/components/parameterPanel/InputSection.tsx; client/src/components/parameterPanel/MiddleSection.tsx; client/src/components/parameterPanel/OutputSection.tsx; client/src/hooks/useParameterPanel.ts; client/src/hooks/useNodeParamsQuery.ts; client/src/services/executionService.ts; server/routers/websocket.py; server/core/database.py</desc>+<defs>+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto"><path d="M0,0 L10,5 L0,10 z" fill="#e8eaed"/></marker>+ <style>+ .title { fill:#e8eaed; font:700 30px Geist,system-ui,sans-serif; }+ .subtitle { fill:#9aa1ac; font:400 18px Geist,system-ui,sans-serif; }+ .group-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:1.2px; }+ .type-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:.8px; }+ .node-label { fill:#e8eaed; font:650 20px Geist,system-ui,sans-serif; }+ .node-detail { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .edge-label { fill:#e8eaed; font:500 16px Geist,system-ui,sans-serif; }+ .edge-protocol { fill:#9aa1ac; font:500 16px 'JetBrains Mono',ui-monospace,monospace; }+ .callout-title { fill:#e8eaed; font:650 18px Geist,system-ui,sans-serif; }+ .callout-text { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .legend { fill:#9aa1ac; font:500 16px Geist,system-ui,sans-serif; }+ </style>+</defs>+<rect width="1920" height="1080" fill="#0d0f13"/>+<text x="72" y="58" class="title">Node Configuration Anatomy</text>+<text x="72" y="91" class="subtitle">A schema-driven modal combines draggable upstream data, a local parameter draft, per-node execution, and correlated live output</text>+<g data-group-id="configuration-modal"><rect x="50" y="125" width="1820" height="620" rx="18" fill="#15171c" stroke="#8be9fd" stroke-width="2"/><text x="70" y="157" class="group-label">NODE CONFIGURATION MODAL</text></g><g data-group-id="panel-data-plane"><rect x="50" y="775" width="1820" height="180" rx="18" fill="#15171c" stroke="#ffb86c" stroke-width="2"/><text x="70" y="807" class="group-label">LIVE DATA & PERSISTENCE</text></g><g data-relationship-id="r-spec-identity"><title>supplies icon and display name</title><path d="M 255.0 820 L 255 760 L 370 760 L 370.0 285" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="244.0" y="745.0" width="252.0" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="370" y="763" class="edge-label" text-anchor="middle" textLength="234.0" lengthAdjust="spacingAndGlyphs">supplies icon and display name</text></g><g data-relationship-id="r-spec-parameters"><title>renders fields and panel variants</title><path d="M 255.0 820 L 255 720 L 940 720 L 940.0 690" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="462.6" y="705.0" width="274.79999999999995" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="600" y="723" class="edge-label" text-anchor="middle" textLength="256.8" lengthAdjust="spacingAndGlyphs">renders fields and panel variants</text></g><g data-relationship-id="r-input-parameters"><title>drag template variable</title><path d="M 305.0 350 L 305 320 L 940 320 L 940.0 350" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="524.4" y="305.0" width="191.2" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="620" y="323" class="edge-label" text-anchor="middle" textLength="173.2" lengthAdjust="spacingAndGlyphs">drag template variable</text></g><g data-relationship-id="r-parameters-draft"><title>onParameterChange updates local draft</title><path d="M 940.0 690 L 940 750 L 690 750 L 690.0 820" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="662.4" y="735.0" width="305.2" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="815" y="753" class="edge-label" text-anchor="middle" textLength="287.2" lengthAdjust="spacingAndGlyphs">onParameterChange updates local draft</text></g><g data-relationship-id="r-save-draft"><title>handleSave commits draft</title><path d="M 810.0 285 L 810 310 L 460 310 L 460 760 L 690 760 L 690.0 820" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 575.0 760.0 L 575 975.0" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="471.8" y="960.0" width="206.39999999999998" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="575" y="978.0" class="edge-label" text-anchor="middle" textLength="188.4" lengthAdjust="spacingAndGlyphs">handleSave commits draft</text></g><g data-relationship-id="r-run-execution"><title>save if dirty, then execute node</title><path d="M 1070.0 285 L 1070 310 L 1120 760 L 1120.0 820" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="986.4" y="745.0" width="267.2" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1120" y="763" class="edge-label" text-anchor="middle" textLength="249.2" lengthAdjust="spacingAndGlyphs">save if dirty, then execute node</text></g><g data-relationship-id="r-execution-output"><title>appends correlated ExecutionResult</title><path d="M 1120.0 820 L 1120 735 L 1595 735 L 1595.0 690" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1370.0 735.0 L 1460 735" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1318.8" y="720.0" width="282.4" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1460" y="738" class="edge-label" text-anchor="middle" textLength="264.4" lengthAdjust="spacingAndGlyphs">appends correlated ExecutionResult</text></g><g data-relationship-id="r-websocket-output"><title>broadcasts node status and output · via execution_id</title><path d="M 1600.0 820 L 1600 780 L 1760 780 L 1760 720 L 1595 720 L 1595.0 690" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1705.0 720.0 L 1705 774" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1567.6" y="750.0" width="274.79999999999995" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1705" y="771" class="edge-label" text-anchor="middle" textLength="256.8" lengthAdjust="spacingAndGlyphs">broadcasts node status and output</text><text x="1705" y="791" class="edge-protocol" text-anchor="middle">via execution_id</text></g><g data-relationship-id="r-cancel-websocket"><title>cancel wait or close draft</title><path d="M 1355.0 285 L 1355 310 L 1850 310 L 1850 760 L 1600 760 L 1600.0 820" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1720.0 760.0 L 1720 975.0" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1609.2" y="960.0" width="221.6" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1720" y="978.0" class="edge-label" text-anchor="middle" textLength="203.6" lengthAdjust="spacingAndGlyphs">cancel wait or close draft</text></g><g data-relationship-id="r-draft-database"><title>save_node_parameters · via TanStack Query + WS</title><path d="M 690.0 945 L 690 970 L 1600 970 L 1600.0 945" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1045.6" y="942.0" width="198.79999999999998" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1145" y="963.0" class="edge-label" text-anchor="middle">save_node_parameters</text><text x="1145" y="983.0" class="edge-protocol" text-anchor="middle" textLength="180.8" lengthAdjust="spacingAndGlyphs">via TanStack Query + WS</text></g><g data-component-id="node-identity"><title>Node identity</title><rect x="90" y="175" width="560" height="110" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="90" y="175" width="560" height="7" rx="4" fill="#8be9fd"/><text x="108" y="201" class="type-label">MODAL HEADER</text><text x="108" y="227" class="node-label">Node identity</text><text x="108" y="253" class="node-detail">Icon · display name · dirty marker</text></g><g data-component-id="save-action"><title>Save</title><rect x="700" y="175" width="220" height="110" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="700" y="175" width="220" height="7" rx="4" fill="#ff79c6"/><text x="718" y="201" class="type-label">HEADER ACTION</text><text x="718" y="227" class="node-label">Save</text><text x="718" y="253" class="node-detail" textLength="184.0" lengthAdjust="spacingAndGlyphs">Disabled when clean or canvas locked</text></g><g data-component-id="run-action"><title>Run</title><rect x="960" y="175" width="220" height="110" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="960" y="175" width="220" height="7" rx="4" fill="#ff79c6"/><text x="978" y="201" class="type-label">HEADER ACTION</text><text x="978" y="227" class="node-label">Run</text><text x="978" y="253" class="node-detail" textLength="184.0" lengthAdjust="spacingAndGlyphs">Hidden by uiHints when passive</text></g><g data-component-id="cancel-action"><title>Cancel / Stop</title><rect x="1220" y="175" width="270" height="110" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="1220" y="175" width="270" height="7" rx="4" fill="#ff79c6"/><text x="1238" y="201" class="type-label">HEADER ACTION</text><text x="1238" y="227" class="node-label">Cancel / Stop</text><text x="1238" y="253" class="node-detail" textLength="234.0" lengthAdjust="spacingAndGlyphs">Revert draft or cancel active wait</text></g><g data-component-id="close-action"><title>Close (X)</title><rect x="1530" y="175" width="300" height="110" rx="12" fill="#1b1e25" stroke="#9aa1ac" stroke-width="2"/><rect x="1530" y="175" width="300" height="7" rx="4" fill="#9aa1ac"/><text x="1548" y="201" class="type-label">MODAL ACTION</text><text x="1548" y="227" class="node-label">Close (X)</text><text x="1548" y="253" class="node-detail">Cancel draft and deselect node</text></g><g data-component-id="input-column"><title>Input Data & Variables</title><rect x="90" y="350" width="430" height="340" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="90" y="350" width="430" height="7" rx="4" fill="#8be9fd"/><text x="108" y="376" class="type-label">LEFT COLUMN · 0.7</text><text x="108" y="402" class="node-label">Input Data &</text><text x="108" y="424" class="node-label">Variables</text><text x="108" y="450" class="node-detail">Upstream execution values or output schema</text><text x="108" y="470" class="node-detail">Recursive object and array fields</text><text x="108" y="490" class="node-detail">Drag template variables into parameters</text></g><g data-component-id="parameters-column"><title>Parameters</title><rect x="560" y="350" width="760" height="340" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="560" y="350" width="760" height="7" rx="4" fill="#8be9fd"/><text x="578" y="376" class="type-label">MIDDLE COLUMN · 1.6</text><text x="578" y="402" class="node-label">Parameters</text><text x="578" y="428" class="node-detail">Schema-rendered local edit buffer</text><text x="578" y="448" class="node-detail">Specialized middle panels selected by uiHints</text><text x="578" y="468" class="node-detail">Connected Skills · Token Usage · Console</text></g><g data-component-id="output-column"><title>Output</title><rect x="1360" y="350" width="470" height="340" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="1360" y="350" width="470" height="7" rx="4" fill="#50fa7b"/><text x="1378" y="376" class="type-label">RIGHT COLUMN · 0.7</text><text x="1378" y="402" class="node-label">Output</text><text x="1378" y="428" class="node-detail">Local run results + WebSocket status</text><text x="1378" y="448" class="node-detail">Deduplicates matching execution_id</text><text x="1378" y="468" class="node-detail">Clear results without changing parameters</text></g><g data-component-id="node-spec"><title>NodeSpec metadata</title><rect x="90" y="820" width="330" height="110" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="90" y="820" width="330" height="7" rx="4" fill="#ff79c6"/><text x="108" y="846" class="type-label">SCHEMA SOURCE</text><text x="108" y="872" class="node-label">NodeSpec metadata</text><text x="108" y="898" class="node-detail">properties · handles · uiHints</text></g><g data-component-id="parameter-state"><title>Parameter query + draft</title><rect x="500" y="820" width="380" height="125" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="500" y="820" width="380" height="7" rx="4" fill="#ffb86c"/><text x="518" y="846" class="type-label">CLIENT STATE</text><text x="518" y="872" class="node-label">Parameter query</text><text x="518" y="894" class="node-label">+ draft</text><text x="518" y="920" class="node-detail">defaults + saved params</text><text x="518" y="940" class="node-detail">dirty edit buffer + query cache</text></g><g data-component-id="execution-service"><title>ExecutionService</title><rect x="940" y="820" width="360" height="110" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="940" y="820" width="360" height="7" rx="4" fill="#ffb86c"/><text x="958" y="846" class="type-label">PER-NODE RUNTIME</text><text x="958" y="872" class="node-label">ExecutionService</text><text x="958" y="898" class="node-detail">save-before-run · executeNode</text><text x="958" y="918" class="node-detail">per-node reducer</text></g><g data-component-id="websocket-database"><title>WebSocket + workflow.db</title><rect x="1370" y="820" width="460" height="125" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="1370" y="820" width="460" height="7" rx="4" fill="#ff79c6"/><text x="1388" y="846" class="type-label">LIVE DATA PLANE</text><text x="1388" y="872" class="node-label">WebSocket +</text><text x="1388" y="894" class="node-label">workflow.db</text><text x="1388" y="920" class="node-detail">node_parameters · node_outputs</text><text x="1388" y="940" class="node-detail">node status + wait cancellation</text></g>+<g aria-label="Legend"><circle cx="72" cy="1038" r="7" fill="#bd93f9"/><text x="86" y="1044" class="legend">Agents / system</text><circle cx="317" cy="1038" r="7" fill="#8be9fd"/><text x="331" y="1044" class="legend">Models / interfaces</text><circle cx="562" cy="1038" r="7" fill="#50fa7b"/><text x="576" y="1044" class="legend">Tools / results</text><circle cx="807" cy="1038" r="7" fill="#ff79c6"/><text x="821" y="1044" class="legend">Triggers / events</text><circle cx="1052" cy="1038" r="7" fill="#ffb86c"/><text x="1066" y="1044" class="legend">Workflow / runtime</text><circle cx="1297" cy="1038" r="7" fill="#f1fa8c"/><text x="1311" y="1044" class="legend">Security note</text></g>+</svg>diff --git a/docs/diagrams/persistence-secret-plane.svg b/docs/diagrams/persistence-secret-plane.svgnew file mode 100644index 00000000..aa1340a6--- /dev/null+++ b/docs/diagrams/persistence-secret-plane.svg@@ -0,0 +1,25 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080" width="100%" role="img" aria-labelledby="title desc">+<title id="title">Persistence & Secret Plane</title>+<desc id="desc">A two-plane architecture view separating ordinary workflow, execution, context, and team persistence from the credential path in which AuthService caches narrowly, CredentialsDatabase encrypts fields, and credentials.db stores only Fernet tokens plus derivation metadata. Sources: server/core/container.py; server/main.py; server/core/database.py; server/models/database.py; server/services/auth.py; server/core/credentials_database.py; server/core/encryption.py; server/services/plugin/credential.py; server/core/config.py</desc>+<defs>+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto"><path d="M0,0 L10,5 L0,10 z" fill="#e8eaed"/></marker>+ <style>+ .title { fill:#e8eaed; font:700 30px Geist,system-ui,sans-serif; }+ .subtitle { fill:#9aa1ac; font:400 18px Geist,system-ui,sans-serif; }+ .group-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:1.2px; }+ .type-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:.8px; }+ .node-label { fill:#e8eaed; font:650 20px Geist,system-ui,sans-serif; }+ .node-detail { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .edge-label { fill:#e8eaed; font:500 16px Geist,system-ui,sans-serif; }+ .edge-protocol { fill:#9aa1ac; font:500 16px 'JetBrains Mono',ui-monospace,monospace; }+ .callout-title { fill:#e8eaed; font:650 18px Geist,system-ui,sans-serif; }+ .callout-text { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .legend { fill:#9aa1ac; font:500 16px Geist,system-ui,sans-serif; }+ </style>+</defs>+<rect width="1920" height="1080" fill="#0d0f13"/>+<text x="72" y="58" class="title">Persistence & Secret Plane</text>+<text x="72" y="91" class="subtitle">Operational state lives in workflow.db; API keys and OAuth tokens cross a separate encrypted credential boundary</text>+<g data-group-id="state-plane"><rect x="50" y="125" width="750" height="830" rx="18" fill="#15171c" stroke="#ff79c6" stroke-width="2"/><text x="70" y="157" class="group-label">APPLICATION PERSISTENCE · workflow.db</text></g><g data-group-id="secret-plane"><rect x="840" y="125" width="1030" height="830" rx="18" fill="#15171c" stroke="#f1fa8c" stroke-width="2"/><text x="860" y="157" class="group-label">SECRET PLANE · credentials.db</text></g><g data-relationship-id="r-runtime-database"><title>persists operational state</title><path d="M 245.0 340 L 245 400 L 610 400 L 610.0 340" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="314.2" y="385.0" width="221.6" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="425" y="403" class="edge-label" text-anchor="middle" textLength="203.6" lengthAdjust="spacingAndGlyphs">persists operational state</text></g><g data-relationship-id="r-database-workflow"><title>reads and writes SQLModel rows · via sqlite+aiosqlite</title><path d="M 610.0 340 L 610 450 L 445 450 L 445.0 540" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="399.0" y="426.0" width="252.0" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="525" y="447" class="edge-label" text-anchor="middle" textLength="234.0" lengthAdjust="spacingAndGlyphs">reads and writes SQLModel rows</text><text x="525" y="467" class="edge-protocol" text-anchor="middle">via sqlite+aiosqlite</text></g><g data-relationship-id="r-plugin-auth"><title>requests secret resolution</title><path d="M 995.0 340 L 995 400 L 1295 400 L 1295.0 340" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1034.2" y="385.0" width="221.6" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1145" y="403" class="edge-label" text-anchor="middle" textLength="203.6" lengthAdjust="spacingAndGlyphs">requests secret resolution</text></g><g data-relationship-id="r-auth-cache"><title>populates safe cache</title><path d="M 1420 265.0 L 1570 265.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1495.0 265.0 L 1495 157" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1407.0" y="142.0" width="176.0" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1495" y="160" class="edge-label" text-anchor="middle" textLength="158.0" lengthAdjust="spacingAndGlyphs">populates safe cache</text></g><g data-relationship-id="r-auth-credentials"><title>save · retrieve · delete</title><path d="M 1295.0 340 L 1330.0 490" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1335.0 415.0 L 975 469" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="871.8" y="454.0" width="206.39999999999998" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="975" y="472" class="edge-label" text-anchor="middle" textLength="188.4" lengthAdjust="spacingAndGlyphs">save · retrieve · delete</text></g><g data-relationship-id="r-key-encryption"><title>derives in-memory Fernet key</title><path d="M 995.0 660 L 995.0 750" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="876.6" y="695.0" width="236.79999999999998" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="995" y="713" class="edge-label" text-anchor="middle" textLength="218.8" lengthAdjust="spacingAndGlyphs">derives in-memory Fernet key</text></g><g data-relationship-id="r-credentials-encryption"><title>calls encrypt / decrypt per field</title><path d="M 1330.0 670 L 1330 700 L 1190 700 L 1190 825 L 1120 825.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1142.6" y="685.0" width="274.79999999999995" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1280" y="703" class="edge-label" text-anchor="middle" textLength="256.8" lengthAdjust="spacingAndGlyphs">calls encrypt / decrypt per field</text></g><g data-relationship-id="r-credentials-store"><title>stores ciphertext rows and salt · via SQLite</title><path d="M 1330.0 670 L 1330 690 L 1695 690 L 1695.0 710" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1515.0 690.0 L 1335 744" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1205.2" y="720.0" width="259.6" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1335" y="741" class="edge-label" text-anchor="middle" textLength="241.6" lengthAdjust="spacingAndGlyphs">stores ciphertext rows and salt</text><text x="1335" y="761" class="edge-protocol" text-anchor="middle">via SQLite</text></g><g data-component-id="runtime-services"><title>Runtime services</title><rect x="100" y="190" width="290" height="150" rx="12" fill="#1b1e25" stroke="#bd93f9" stroke-width="2"/><rect x="100" y="190" width="290" height="7" rx="4" fill="#bd93f9"/><text x="118" y="216" class="type-label">APPLICATION CALLERS</text><text x="118" y="242" class="node-label">Runtime services</text><text x="118" y="268" class="node-detail" textLength="254.0" lengthAdjust="spacingAndGlyphs">Workflows · nodes · deployments</text><text x="118" y="288" class="node-detail">Context · teams · settings</text></g><g data-component-id="database-service"><title>Database</title><rect x="470" y="190" width="280" height="150" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="470" y="190" width="280" height="7" rx="4" fill="#ff79c6"/><text x="488" y="216" class="type-label">PERSISTENCE SERVICE</text><text x="488" y="242" class="node-label">Database</text><text x="488" y="268" class="node-detail">Async SQLModel / SQLite</text><text x="488" y="288" class="node-detail" textLength="244.0" lengthAdjust="spacingAndGlyphs">One operational access surface</text></g><g data-component-id="workflow-db"><title>workflow.db</title><rect x="280" y="540" width="330" height="200" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="280" y="540" width="330" height="7" rx="4" fill="#ff79c6"/><text x="298" y="566" class="type-label">SQLITE DATA STORE</text><text x="298" y="592" class="node-label">workflow.db</text><text x="298" y="618" class="node-detail">Workflows · node params · outputs</text><text x="298" y="638" class="node-detail">Executions · context · teams</text><text x="298" y="658" class="node-detail">No encrypted credential tables</text></g><g data-component-id="credential-callers"><title>Plugin credentials</title><rect x="870" y="190" width="250" height="150" rx="12" fill="#1b1e25" stroke="#bd93f9" stroke-width="2"/><rect x="870" y="190" width="250" height="7" rx="4" fill="#bd93f9"/><text x="888" y="216" class="type-label">SECRET CONSUMERS</text><text x="888" y="242" class="node-label">Plugin credentials</text><text x="888" y="268" class="node-detail">Credential.resolve</text><text x="888" y="288" class="node-detail" textLength="214.0" lengthAdjust="spacingAndGlyphs">Connection / provider clients</text></g><g data-component-id="auth-service"><title>AuthService</title><rect x="1170" y="190" width="250" height="150" rx="12" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2"/><rect x="1170" y="190" width="250" height="7" rx="4" fill="#f1fa8c"/><text x="1188" y="216" class="type-label">SECRET FACADE</text><text x="1188" y="242" class="node-label">AuthService</text><text x="1188" y="268" class="node-detail" textLength="214.0" lengthAdjust="spacingAndGlyphs">Only service-level credential route</text><text x="1188" y="288" class="node-detail">Store · resolve · remove</text></g><g data-component-id="credential-caches"><title>Process caches</title><rect x="1570" y="190" width="250" height="150" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="1570" y="190" width="250" height="7" rx="4" fill="#ffb86c"/><text x="1588" y="216" class="type-label">BOUNDED SECRET CACHE</text><text x="1588" y="242" class="node-label">Process caches</text><text x="1588" y="268" class="node-detail" textLength="214.0" lengthAdjust="spacingAndGlyphs">API keys + model metadata</text><text x="1588" y="288" class="node-detail" textLength="214.0" lengthAdjust="spacingAndGlyphs">OAuth access/display fields only</text></g><g data-component-id="credentials-database"><title>CredentialsDatabase</title><rect x="1170" y="490" width="320" height="180" rx="12" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2"/><rect x="1170" y="490" width="320" height="7" rx="4" fill="#f1fa8c"/><text x="1188" y="516" class="type-label">ENCRYPTED PERSISTENCE</text><text x="1188" y="542" class="node-label">CredentialsDatabase</text><text x="1188" y="568" class="node-detail">EncryptedAPIKey</text><text x="1188" y="588" class="node-detail">EncryptedOAuthToken</text><text x="1188" y="608" class="node-detail">credentials_metadata</text></g><g data-component-id="encryption-password"><title>API_KEY_ENCRYPTION_KEY</title><rect x="870" y="510" width="250" height="150" rx="12" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2"/><rect x="870" y="510" width="250" height="7" rx="4" fill="#f1fa8c"/><text x="888" y="536" class="type-label">SERVER CONFIGURATION</text><text x="888" y="562" class="node-label">API_KEY_</text><text x="888" y="584" class="node-label">ENCRYPTION_KEY</text><text x="888" y="610" class="node-detail">Minimum 32 characters</text><text x="888" y="630" class="node-detail">Loaded at startup</text></g><g data-component-id="encryption-service"><title>EncryptionService</title><rect x="870" y="750" width="250" height="150" rx="12" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2"/><rect x="870" y="750" width="250" height="7" rx="4" fill="#f1fa8c"/><text x="888" y="776" class="type-label" textLength="214.0" lengthAdjust="spacingAndGlyphs">CRYPTOGRAPHIC BOUNDARY</text><text x="888" y="802" class="node-label">EncryptionService</text><text x="888" y="828" class="node-detail">PBKDF2-SHA256 · 600,000</text><text x="888" y="848" class="node-detail">Fernet encrypt / decrypt</text></g><g data-component-id="credentials-db"><title>credentials.db</title><rect x="1560" y="710" width="270" height="190" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="1560" y="710" width="270" height="7" rx="4" fill="#ff79c6"/><text x="1578" y="736" class="type-label">ENCRYPTED SQLITE</text><text x="1578" y="762" class="node-label">credentials.db</text><text x="1578" y="788" class="node-detail">Ciphertext fields only</text><text x="1578" y="808" class="node-detail">32-byte salt in metadata</text><text x="1578" y="828" class="node-detail">Separate from workflow.db</text></g><g data-callout-id="state-boundary-note"><rect x="100" y="800" width="650" height="110" rx="10" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2" stroke-dasharray="7 6"/><text x="116" y="830" class="callout-title">Blast-radius boundary</text><text x="116" y="856" class="callout-text">A workflow.db dump carries operational state,</text><text x="116" y="878" class="callout-text">but never the encrypted API-key or OAuth tables.</text></g><g data-callout-id="refresh-token-note"><rect x="1525" y="395" width="305" height="115" rx="10" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2" stroke-dasharray="7 6"/><text x="1541" y="425" class="callout-title">Refresh-token rule</text><text x="1541" y="451" class="callout-text" textLength="273.0" lengthAdjust="spacingAndGlyphs">Refresh tokens are never cached.</text><text x="1541" y="473" class="callout-text">AuthService reads them from</text><text x="1541" y="495" class="callout-text">credentials.db for every use.</text></g>+<g aria-label="Legend"><circle cx="72" cy="1038" r="7" fill="#bd93f9"/><text x="86" y="1044" class="legend">Agents / system</text><circle cx="317" cy="1038" r="7" fill="#8be9fd"/><text x="331" y="1044" class="legend">Models / interfaces</text><circle cx="562" cy="1038" r="7" fill="#50fa7b"/><text x="576" y="1044" class="legend">Tools / results</text><circle cx="807" cy="1038" r="7" fill="#ff79c6"/><text x="821" y="1044" class="legend">Triggers / events</text><circle cx="1052" cy="1038" r="7" fill="#ffb86c"/><text x="1066" y="1044" class="legend">Workflow / runtime</text><circle cx="1297" cy="1038" r="7" fill="#f1fa8c"/><text x="1311" y="1044" class="legend">Security note</text></g>+</svg>diff --git a/docs/diagrams/plugin-agent-team-composition.svg b/docs/diagrams/plugin-agent-team-composition.svgnew file mode 100644index 00000000..fd112407--- /dev/null+++ b/docs/diagrams/plugin-agent-team-composition.svg@@ -0,0 +1,25 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080" width="100%" role="img" aria-labelledby="title desc">+<title id="title">Plugin → Agent → Team Composition</title>+<desc id="desc">A source-backed composition view showing how BaseNode plugins branch into standalone chat-model and agent plugins, how agents assemble context, skills, and tools before entering the shared LLM runtime, and how team leads turn teammate edges into durable delegation surfaces. Sources: server/services/plugin/base.py; server/nodes/model/_base.py; server/nodes/agent/_specialized.py; server/nodes/agent/_handles.py; server/services/plugin/edge_walker.py; server/services/llm/unifier.py; server/services/agent_team.py; server/models/database.py</desc>+<defs>+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto"><path d="M0,0 L10,5 L0,10 z" fill="#e8eaed"/></marker>+ <style>+ .title { fill:#e8eaed; font:700 30px Geist,system-ui,sans-serif; }+ .subtitle { fill:#9aa1ac; font:400 18px Geist,system-ui,sans-serif; }+ .group-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:1.2px; }+ .type-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:.8px; }+ .node-label { fill:#e8eaed; font:650 20px Geist,system-ui,sans-serif; }+ .node-detail { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .edge-label { fill:#e8eaed; font:500 16px Geist,system-ui,sans-serif; }+ .edge-protocol { fill:#9aa1ac; font:500 16px 'JetBrains Mono',ui-monospace,monospace; }+ .callout-title { fill:#e8eaed; font:650 18px Geist,system-ui,sans-serif; }+ .callout-text { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .legend { fill:#9aa1ac; font:500 16px Geist,system-ui,sans-serif; }+ </style>+</defs>+<rect width="1920" height="1080" fill="#0d0f13"/>+<text x="72" y="58" class="title">Plugin → Agent → Team Composition</text>+<text x="72" y="91" class="subtitle">Self-registering node plugins compose provider-backed agents, edge-connected capabilities, and execution-scoped teams</text>+<g data-group-id="plugin-layer"><rect x="50" y="125" width="500" height="830" rx="18" fill="#15171c" stroke="#bd93f9" stroke-width="2"/><text x="70" y="157" class="group-label">PLUGIN & MODEL LAYER</text></g><g data-group-id="agent-layer"><rect x="590" y="125" width="700" height="830" rx="18" fill="#15171c" stroke="#bd93f9" stroke-width="2"/><text x="610" y="157" class="group-label">AGENT COMPOSITION</text></g><g data-group-id="team-layer"><rect x="1330" y="125" width="540" height="830" rx="18" fill="#15171c" stroke="#ffb86c" stroke-width="2"/><text x="1350" y="157" class="group-label">TEAM COMPOSITION</text></g><g data-relationship-id="r-base-model"><title>specializes as model plugin</title><path d="M 300.0 325 L 300.0 400" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="185.4" y="350.0" width="229.2" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="300" y="368" class="edge-label" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">specializes as model plugin</text></g><g data-relationship-id="r-base-agent"><title>specializes as agent plugin</title><path d="M 300.0 325 L 300 360 L 610 360 L 610 265 L 640 265.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 475.0 360.0 L 475 144" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="360.4" y="129.0" width="229.2" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="475" y="147" class="edge-label" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">specializes as agent plugin</text></g><g data-relationship-id="r-model-unifier"><title>dispatches chat · via provider + model</title><path d="M 300.0 550 L 300.0 730" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="212.0" y="616.0" width="176.0" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="300" y="637" class="edge-label" text-anchor="middle">dispatches chat</text><text x="300" y="657" class="edge-protocol" text-anchor="middle" textLength="158.0" lengthAdjust="spacingAndGlyphs">via provider + model</text></g><g data-relationship-id="r-agent-prepare"><title>prepares execution payload</title><path d="M 940.0 345 L 940 385 L 940 680 L 940.0 720" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="829.2" y="635.0" width="221.6" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="940" y="653" class="edge-label" text-anchor="middle" textLength="203.6" lengthAdjust="spacingAndGlyphs">prepares execution payload</text></g><g data-relationship-id="r-context-prepare"><title>adds context descriptor</title><path d="M 727.5 575 L 727 620 L 620 620 L 620 805 L 650 805.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="520.6" y="650.0" width="198.79999999999998" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="620" y="668" class="edge-label" text-anchor="middle" textLength="180.8" lengthAdjust="spacingAndGlyphs">adds context descriptor</text></g><g data-relationship-id="r-skills-prepare"><title>enabled skills via Skill tool</title><path d="M 937.5 575 L 937 630 L 940.0 720" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="814.8" y="605.0" width="244.39999999999998" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="937" y="623" class="edge-label" text-anchor="middle">enabled skills via Skill tool</text></g><g data-relationship-id="r-tools-prepare"><title>builds tool surface</title><path d="M 1150.0 575 L 1150 620 L 1260 620 L 1260 805 L 1230 805.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1175.8" y="650.0" width="168.4" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1260" y="668" class="edge-label" text-anchor="middle" textLength="150.4" lengthAdjust="spacingAndGlyphs">builds tool surface</text></g><g data-relationship-id="r-prepare-unifier"><title>routes selected provider and model</title><path d="M 940.0 890 L 940 920 L 300 920 L 300.0 890" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="478.8" y="905.0" width="282.4" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="620" y="923" class="edge-label" text-anchor="middle" textLength="264.4" lengthAdjust="spacingAndGlyphs">routes selected provider and model</text></g><g data-relationship-id="r-teammates-lead"><title>connect via input-teammates</title><path d="M 1600.0 430 L 1600.0 335" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1485.4" y="367.0" width="229.2" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1600" y="385" class="edge-label" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">connect via input-teammates</text></g><g data-relationship-id="r-lead-runtime"><title>executes through shared agent runtime</title><path d="M 1380 260.0 L 1320 260 L 1320 650 L 1260 650 L 1260 805 L 1230 805.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1195.0 650.0 L 1195 380" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1042.4" y="365.0" width="305.2" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1195" y="383" class="edge-label" text-anchor="middle" textLength="287.2" lengthAdjust="spacingAndGlyphs">executes through shared agent runtime</text></g><g data-relationship-id="r-lead-manager"><title>auto-binds intrinsic tool</title><path d="M 1600.0 335 L 1600 650 L 1475 650 L 1475.0 710" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1408.0" y="635.0" width="214.0" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1515" y="653" class="edge-label" text-anchor="middle" textLength="196.0" lengthAdjust="spacingAndGlyphs">auto-binds intrinsic tool</text></g><g data-relationship-id="r-teammates-state"><title>registers execution members</title><path d="M 1600.0 580 L 1600 640 L 1715 640 L 1715.0 710" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1700.0 640.0 L 1790 640" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1675.4" y="625.0" width="229.2" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1790" y="643" class="edge-label" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">registers execution members</text></g><g data-relationship-id="r-manager-state"><title>persists task lifecycle</title><path d="M 1475.0 880 L 1475 920 L 1715 920 L 1715.0 880" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1495.6" y="905.0" width="198.79999999999998" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1595" y="923" class="edge-label" text-anchor="middle" textLength="180.8" lengthAdjust="spacingAndGlyphs">persists task lifecycle</text></g><g data-component-id="base-node"><title>BaseNode plugin contract</title><rect x="90" y="185" width="420" height="140" rx="12" fill="#1b1e25" stroke="#bd93f9" stroke-width="2"/><rect x="90" y="185" width="420" height="7" rx="4" fill="#bd93f9"/><text x="108" y="211" class="type-label">PLUGIN CONTRACT</text><text x="108" y="237" class="node-label">BaseNode plugin contract</text><text x="108" y="263" class="node-detail">Params · Output · handles · uiHints</text><text x="108" y="283" class="node-detail">Auto-registers subclasses on import</text></g><g data-component-id="model-plugins"><title>Chat-model plugins</title><rect x="90" y="400" width="420" height="150" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="90" y="400" width="420" height="7" rx="4" fill="#8be9fd"/><text x="108" y="426" class="type-label">MODEL PLUGIN</text><text x="108" y="452" class="node-label">Chat-model plugins</text><text x="108" y="478" class="node-detail">ChatModelBase provider subclasses</text><text x="108" y="498" class="node-detail">Standalone output-model nodes</text></g><g data-component-id="chat-unifier"><title>ChatUnifier</title><rect x="90" y="730" width="420" height="160" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="90" y="730" width="420" height="7" rx="4" fill="#8be9fd"/><text x="108" y="756" class="type-label">LLM FACADE</text><text x="108" y="782" class="node-label">ChatUnifier</text><text x="108" y="808" class="node-detail">Provider registry + native SDK adapters</text><text x="108" y="828" class="node-detail">Shared model and agent dispatch path</text></g><g data-component-id="agent-plugins"><title>Agent plugins</title><rect x="640" y="185" width="600" height="160" rx="12" fill="#1b1e25" stroke="#bd93f9" stroke-width="2"/><rect x="640" y="185" width="600" height="7" rx="4" fill="#bd93f9"/><text x="658" y="211" class="type-label">AGENT PLUGIN</text><text x="658" y="237" class="node-label">Agent plugins</text><text x="658" y="263" class="node-detail">provider · model · prompt · options</text><text x="658" y="283" class="node-detail">Base, specialized, CLI, and team-lead variants</text></g><g data-component-id="context-node"><title>Context</title><rect x="640" y="430" width="175" height="145" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="640" y="430" width="175" height="7" rx="4" fill="#ff79c6"/><text x="658" y="456" class="type-label" textLength="139.0" lengthAdjust="spacingAndGlyphs">CONNECTED CONFIG</text><text x="658" y="482" class="node-label">Context</text><text x="658" y="508" class="node-detail">input-context</text><text x="658" y="528" class="node-detail">stored conversation</text></g><g data-component-id="skill-nodes"><title>Skills</title><rect x="850" y="430" width="175" height="145" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="850" y="430" width="175" height="7" rx="4" fill="#50fa7b"/><text x="868" y="456" class="type-label" textLength="139.0" lengthAdjust="spacingAndGlyphs">CONNECTED CAPABILITY</text><text x="868" y="482" class="node-label">Skills</text><text x="868" y="508" class="node-detail">input-skill</text><text x="868" y="528" class="node-detail" textLength="139.0" lengthAdjust="spacingAndGlyphs">direct or Master Skill</text></g><g data-component-id="tool-nodes"><title>Tools</title><rect x="1060" y="430" width="180" height="145" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="1060" y="430" width="180" height="7" rx="4" fill="#50fa7b"/><text x="1078" y="456" class="type-label" textLength="144.0" lengthAdjust="spacingAndGlyphs">CONNECTED CAPABILITY</text><text x="1078" y="482" class="node-label">Tools</text><text x="1078" y="508" class="node-detail">input-tools</text><text x="1078" y="528" class="node-detail" textLength="144.0" lengthAdjust="spacingAndGlyphs">plugin tool schemas</text></g><g data-component-id="prepared-agent-call"><title>Prepared agent call</title><rect x="650" y="720" width="580" height="170" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="650" y="720" width="580" height="7" rx="4" fill="#ffb86c"/><text x="668" y="746" class="type-label">RUNTIME PAYLOAD</text><text x="668" y="772" class="node-label">Prepared agent call</text><text x="668" y="798" class="node-detail">Edge walk + task/prompt assembly</text><text x="668" y="818" class="node-detail">Provider-neutral tools and skill content</text></g><g data-component-id="team-lead"><title>Orchestrator / AI Employee</title><rect x="1380" y="185" width="440" height="150" rx="12" fill="#1b1e25" stroke="#bd93f9" stroke-width="2"/><rect x="1380" y="185" width="440" height="7" rx="4" fill="#bd93f9"/><text x="1398" y="211" class="type-label">TEAM-LEAD AGENT</text><text x="1398" y="237" class="node-label">Orchestrator /</text><text x="1398" y="259" class="node-label">AI Employee</text><text x="1398" y="285" class="node-detail">Same agent runtime</text><text x="1398" y="305" class="node-detail">Adds input-teammates handle</text></g><g data-component-id="teammates"><title>Connected teammate agents</title><rect x="1380" y="430" width="440" height="150" rx="12" fill="#1b1e25" stroke="#bd93f9" stroke-width="2"/><rect x="1380" y="430" width="440" height="7" rx="4" fill="#bd93f9"/><text x="1398" y="456" class="type-label">AGENT SET</text><text x="1398" y="482" class="node-label">Connected teammate</text><text x="1398" y="504" class="node-label">agents</text><text x="1398" y="530" class="node-detail">Specialized or custom aiAgent</text><text x="1398" y="550" class="node-detail">assigned only via Task Manager</text></g><g data-component-id="task-manager"><title>Task Manager</title><rect x="1380" y="710" width="190" height="170" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="1380" y="710" width="190" height="7" rx="4" fill="#50fa7b"/><text x="1398" y="736" class="type-label">INTRINSIC TOOL</text><text x="1398" y="762" class="node-label">Task Manager</text><text x="1398" y="788" class="node-detail">Auto-bound</text><text x="1398" y="808" class="node-detail">Lead-only control</text></g><g data-component-id="durable-team"><title>Durable team state</title><rect x="1610" y="710" width="210" height="170" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="1610" y="710" width="210" height="7" rx="4" fill="#ff79c6"/><text x="1628" y="736" class="type-label">EXECUTION DATA</text><text x="1628" y="762" class="node-label">Durable team</text><text x="1628" y="784" class="node-label">state</text><text x="1628" y="810" class="node-detail">Members · tasks</text><text x="1628" y="830" class="node-detail">Attempts · messages</text></g>+<g aria-label="Legend"><circle cx="72" cy="1038" r="7" fill="#bd93f9"/><text x="86" y="1044" class="legend">Agents / system</text><circle cx="317" cy="1038" r="7" fill="#8be9fd"/><text x="331" y="1044" class="legend">Models / interfaces</text><circle cx="562" cy="1038" r="7" fill="#50fa7b"/><text x="576" y="1044" class="legend">Tools / results</text><circle cx="807" cy="1038" r="7" fill="#ff79c6"/><text x="821" y="1044" class="legend">Triggers / events</text><circle cx="1052" cy="1038" r="7" fill="#ffb86c"/><text x="1066" y="1044" class="legend">Workflow / runtime</text><circle cx="1297" cy="1038" r="7" fill="#f1fa8c"/><text x="1311" y="1044" class="legend">Security note</text></g>+</svg>diff --git a/docs/diagrams/runtime-observability-dock.svg b/docs/diagrams/runtime-observability-dock.svgnew file mode 100644index 00000000..e194f037--- /dev/null+++ b/docs/diagrams/runtime-observability-dock.svg@@ -0,0 +1,25 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080" width="100%" role="img" aria-labelledby="title desc">+<title id="title">Runtime Observability Dock</title>+<desc id="desc">Source-backed topology of the collapsible Chat / Console dock: chat messages, Console node records, and terminal logs use distinct producers and retention paths, converge in WebSocketContext state, and render in a resizable chat pane plus Console and Terminal tabs with targeted filters and clear actions. Sources: client/src/components/ui/ConsolePanel.tsx; client/src/contexts/WebSocketContext.tsx; server/nodes/utility/console/__init__.py; server/services/status_broadcaster.py; server/routers/websocket.py; server/nodes/trigger/chat_trigger/_events.py; server/services/process_service.py; server/core/logging.py; docs-internal/node-logic-flows/chat_utility/console.md</desc>+<defs>+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto"><path d="M0,0 L10,5 L0,10 z" fill="#e8eaed"/></marker>+ <style>+ .title { fill:#e8eaed; font:700 30px Geist,system-ui,sans-serif; }+ .subtitle { fill:#9aa1ac; font:400 18px Geist,system-ui,sans-serif; }+ .group-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:1.2px; }+ .type-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:.8px; }+ .node-label { fill:#e8eaed; font:650 20px Geist,system-ui,sans-serif; }+ .node-detail { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .edge-label { fill:#e8eaed; font:500 16px Geist,system-ui,sans-serif; }+ .edge-protocol { fill:#9aa1ac; font:500 16px 'JetBrains Mono',ui-monospace,monospace; }+ .callout-title { fill:#e8eaed; font:650 18px Geist,system-ui,sans-serif; }+ .callout-text { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .legend { fill:#9aa1ac; font:500 16px Geist,system-ui,sans-serif; }+ </style>+</defs>+<rect width="1920" height="1080" fill="#0d0f13"/>+<text x="72" y="58" class="title">Runtime Observability Dock</text>+<text x="72" y="91" class="subtitle">One resizable dock combines workflow chat, Console-node output, and live server/process logs without conflating their scopes.</text>+<g data-group-id="runtime-producers"><rect x="70" y="130" width="460" height="700" rx="18" fill="#15171c" stroke="#ffb86c" stroke-width="2"/><text x="90" y="162" class="group-label">RUNTIME PRODUCERS + CONSUMERS</text></g><g data-group-id="observability-transport"><rect x="570" y="130" width="590" height="700" rx="18" fill="#15171c" stroke="#bd93f9" stroke-width="2"/><text x="590" y="162" class="group-label">TRANSPORT + RETAINED STATE</text></g><g data-group-id="observability-dock"><rect x="1200" y="130" width="650" height="700" rx="18" fill="#15171c" stroke="#8be9fd" stroke-width="2"/><text x="1220" y="162" class="group-label">COLLAPSIBLE CHAT / CONSOLE DOCK</text></g><g data-relationship-id="console-broadcasts-log"><title>broadcast_console_log</title><path d="M 490 275.0 L 610 280.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 550.0 265.0 L 460 373" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="368.2" y="358.0" width="183.6" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="460" y="376" class="edge-label" text-anchor="middle" textLength="165.6" lengthAdjust="spacingAndGlyphs">broadcast_console_log</text></g><g data-relationship-id="runtime-broadcasts-terminal"><title>broadcast_terminal_log</title><path d="M 490 505.0 L 550 505 L 550 315 L 610 280.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 550.0 410.0 L 640 410" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="544.4" y="395.0" width="191.2" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="640" y="413" class="edge-label" text-anchor="middle" textLength="173.2" lengthAdjust="spacingAndGlyphs">broadcast_terminal_log</text></g><g data-relationship-id="broadcaster-persists-console"><title>persist Console records</title><path d="M 730.0 360 L 730.0 440" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 730.0 400.0 L 910 400" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="810.6" y="385.0" width="198.79999999999998" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="910" y="403" class="edge-label" text-anchor="middle" textLength="180.8" lengthAdjust="spacingAndGlyphs">persist Console records</text></g><g data-relationship-id="broadcaster-retains-terminal"><title>retain latest Terminal records</title><path d="M 850 280.0 L 870 280 L 870 405 L 1005 405 L 1005.0 440" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 920.0 395.0 L 920 611" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="794.0" y="596.0" width="252.0" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="920" y="614" class="edge-label" text-anchor="middle" textLength="234.0" lengthAdjust="spacingAndGlyphs">retain latest Terminal records</text></g><g data-relationship-id="handlers-query-db"><title>get / clear scoped history</title><path d="M 1005.0 360 L 1005 400 L 870 400 L 870 505 L 850 505.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 885.0 390.0 L 1065 174" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="954.2" y="159.0" width="221.6" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1065" y="177" class="edge-label" text-anchor="middle" textLength="203.6" lengthAdjust="spacingAndGlyphs">get / clear scoped history</text></g><g data-relationship-id="handlers-query-terminal-cache"><title>get / clear terminal history</title><path d="M 1005.0 360 L 1005.0 440" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1005.0 400.0 L 1005 139.0" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="886.6" y="124.0" width="236.79999999999998" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1005" y="142.0" class="edge-label" text-anchor="middle" textLength="218.8" lengthAdjust="spacingAndGlyphs">get / clear terminal history</text></g><g data-relationship-id="handlers-dispatch-chat-trigger"><title>dispatch chat_message_received · via workflow-scoped CloudEvent</title><path d="M 890 280.0 L 560 280 L 560 720 L 490 720.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 560.0 600.0 L 560 816" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="434.0" y="792.0" width="252.0" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="560" y="813" class="edge-label" text-anchor="middle" textLength="234.0" lengthAdjust="spacingAndGlyphs">dispatch chat_message_received</text><text x="560" y="833" class="edge-protocol" text-anchor="middle" textLength="234.0" lengthAdjust="spacingAndGlyphs">via workflow-scoped CloudEvent</text></g><g data-relationship-id="live-events-update-context"><title>live console_log / terminal_log · via WebSocket broadcast</title><path d="M 610 280.0 L 590 280 L 590 720 L 760 720.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 675.0 625.0 L 585 625" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="455.2" y="601.0" width="259.6" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="585" y="622" class="edge-label" text-anchor="middle" textLength="241.6" lengthAdjust="spacingAndGlyphs">live console_log / terminal_log</text><text x="585" y="642" class="edge-protocol" text-anchor="middle">via WebSocket broadcast</text></g><g data-relationship-id="handlers-hydrate-context"><title>hydrate on connect or workflow switch</title><path d="M 1120 280.0 L 1140 280 L 1140 630 L 890 630 L 890.0 660" fill="none" stroke="#e8eaed" stroke-width="2" stroke-dasharray="10 8" marker-end="url(#arrow)"/><path d="M 1135.0 520.0 L 1045 790" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="892.4" y="775.0" width="305.2" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1045" y="793" class="edge-label" text-anchor="middle" textLength="287.2" lengthAdjust="spacingAndGlyphs">hydrate on connect or workflow switch</text></g><g data-relationship-id="chat-sends-handler-request"><title>send_chat_message / clear chat · via WebSocket request</title><path d="M 1370.0 200 L 1370 165 L 1005 165 L 1005.0 200" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1190.0 160.0 L 1640 148.0" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1514.0" y="124.0" width="252.0" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1640" y="145.0" class="edge-label" text-anchor="middle" textLength="234.0" lengthAdjust="spacingAndGlyphs">send_chat_message / clear chat</text><text x="1640" y="165.0" class="edge-protocol" text-anchor="middle">via WebSocket request</text></g><g data-relationship-id="context-renders-chat"><title>chat messages</title><path d="M 1020 720.0 L 1180 720 L 1180 450 L 1240 450.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1180.0 585.0 L 1090 693" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1028.6" y="678.0" width="122.8" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1090" y="696" class="edge-label" text-anchor="middle" textLength="104.8" lengthAdjust="spacingAndGlyphs">chat messages</text></g><g data-relationship-id="context-renders-console"><title>Console records</title><path d="M 890.0 660 L 890 610 L 1175 610 L 1175 145 L 1675 145 L 1675.0 200" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1510.0 140.0 L 1839.0 140" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1770.0" y="125.0" width="138.0" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1839.0" y="143" class="edge-label" text-anchor="middle" textLength="120.0" lengthAdjust="spacingAndGlyphs">Console records</text></g><g data-relationship-id="context-renders-terminal"><title>Terminal records</title><path d="M 890.0 780 L 890 845 L 1675 845 L 1675.0 700" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1407.2" y="825.0" width="145.6" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1480" y="843" class="edge-label" text-anchor="middle" textLength="127.6" lengthAdjust="spacingAndGlyphs">Terminal records</text></g><g data-relationship-id="prefs-shape-chat-pane"><title>height + split width + font</title><path d="M 1240 765.0 L 1220 775 L 1220 720 L 1370 720 L 1370.0 700" fill="none" stroke="#e8eaed" stroke-width="2" stroke-dasharray="10 8" marker-end="url(#arrow)"/><path d="M 1300.0 715.0 L 1030 823" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="915.4" y="808.0" width="229.2" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1030" y="826" class="edge-label" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">height + split width + font</text></g><g data-relationship-id="prefs-select-log-tab"><title>selected Console / Terminal tab</title><path d="M 1810 765.0 L 1830 775 L 1830 720 L 1675 720 L 1675.0 700" fill="none" stroke="#e8eaed" stroke-width="2" stroke-dasharray="10 8" marker-end="url(#arrow)"/><path d="M 1725.0 715.0 L 1778.2 445" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1648.4" y="430.0" width="259.6" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1778.2" y="448" class="edge-label" text-anchor="middle" textLength="241.6" lengthAdjust="spacingAndGlyphs">selected Console / Terminal tab</text></g><g data-component-id="console-node-producer"><title>Console node output</title><rect x="110" y="200" width="380" height="150" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="110" y="200" width="380" height="7" rx="4" fill="#ffb86c"/><text x="128" y="226" class="type-label">WORKFLOW</text><text x="128" y="252" class="node-label">Console node output</text><text x="128" y="278" class="node-detail">label · format · formatted data</text><text x="128" y="298" class="node-detail">workflow + source node IDs</text></g><g data-component-id="terminal-log-producers"><title>Server / process / CLI logs</title><rect x="110" y="430" width="380" height="150" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="110" y="430" width="380" height="7" rx="4" fill="#ffb86c"/><text x="128" y="456" class="type-label">RUNTIME</text><text x="128" y="482" class="node-label">Server / process / CLI</text><text x="128" y="504" class="node-label">logs</text><text x="128" y="530" class="node-detail">level · message · source</text><text x="128" y="550" class="node-detail">optional details</text></g><g data-component-id="chat-trigger-consumers"><title>chatTrigger consumers</title><rect x="110" y="660" width="380" height="120" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="110" y="660" width="380" height="7" rx="4" fill="#ff79c6"/><text x="128" y="686" class="type-label">TRIGGER</text><text x="128" y="712" class="node-label">chatTrigger consumers</text><text x="128" y="738" class="node-detail">workflow-scoped CloudEvent</text></g><g data-component-id="status-broadcaster"><title>StatusBroadcaster</title><rect x="610" y="200" width="240" height="160" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="610" y="200" width="240" height="7" rx="4" fill="#ff79c6"/><text x="628" y="226" class="type-label">EVENT BUS</text><text x="628" y="252" class="node-label">StatusBroadcaster</text><text x="628" y="278" class="node-detail">console_log</text><text x="628" y="298" class="node-detail">terminal_log</text><text x="628" y="318" class="node-detail">clear broadcasts</text></g><g data-component-id="dock-ws-handlers"><title>Dock WebSocket handlers</title><rect x="890" y="200" width="230" height="160" rx="12" fill="#1b1e25" stroke="#bd93f9" stroke-width="2"/><rect x="890" y="200" width="230" height="7" rx="4" fill="#bd93f9"/><text x="908" y="226" class="type-label">SERVICE</text><text x="908" y="252" class="node-label">Dock WebSocket</text><text x="908" y="274" class="node-label">handlers</text><text x="908" y="300" class="node-detail">send / get / clear</text><text x="908" y="320" class="node-detail" textLength="194.0" lengthAdjust="spacingAndGlyphs">chat · console · terminal</text></g><g data-component-id="workflow-history-db"><title>Workflow history DB</title><rect x="610" y="440" width="240" height="130" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="610" y="440" width="240" height="7" rx="4" fill="#ff79c6"/><text x="628" y="466" class="type-label">DATABASE</text><text x="628" y="492" class="node-label" textLength="204.0" lengthAdjust="spacingAndGlyphs">Workflow history DB</text><text x="628" y="518" class="node-detail">chat_messages</text><text x="628" y="538" class="node-detail">console_logs</text></g><g data-component-id="terminal-ring-buffer"><title>Terminal ring buffer</title><rect x="890" y="440" width="230" height="130" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="890" y="440" width="230" height="7" rx="4" fill="#ff79c6"/><text x="908" y="466" class="type-label">MEMORY</text><text x="908" y="492" class="node-label">Terminal ring</text><text x="908" y="514" class="node-label">buffer</text><text x="908" y="540" class="node-detail">latest 200 entries</text><text x="908" y="560" class="node-detail">global in process</text></g><g data-component-id="websocket-context-state"><title>WebSocketContext state</title><rect x="760" y="660" width="260" height="120" rx="12" fill="#1b1e25" stroke="#bd93f9" stroke-width="2"/><rect x="760" y="660" width="260" height="7" rx="4" fill="#bd93f9"/><text x="778" y="686" class="type-label">CLIENT STATE</text><text x="778" y="712" class="node-label">WebSocketContext</text><text x="778" y="734" class="node-label">state</text><text x="778" y="760" class="node-detail" textLength="224.0" lengthAdjust="spacingAndGlyphs">chat · console · terminal arrays</text></g><g data-component-id="chat-pane"><title>Chat pane</title><rect x="1240" y="200" width="260" height="500" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="1240" y="200" width="260" height="7" rx="4" fill="#8be9fd"/><text x="1258" y="226" class="type-label">INTERFACE</text><text x="1258" y="252" class="node-label">Chat pane</text><text x="1258" y="278" class="node-detail" textLength="224.0" lengthAdjust="spacingAndGlyphs">All Triggers or one target</text><text x="1258" y="298" class="node-detail">user + assistant messages</text><text x="1258" y="318" class="node-detail">Enter to send</text><text x="1258" y="338" class="node-detail">clear current workflow</text></g><g data-component-id="console-tab"><title>Console tab</title><rect x="1540" y="200" width="270" height="230" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="1540" y="200" width="270" height="7" rx="4" fill="#8be9fd"/><text x="1558" y="226" class="type-label">INTERFACE</text><text x="1558" y="252" class="node-label">Console tab</text><text x="1558" y="278" class="node-detail">filter by Console node</text><text x="1558" y="298" class="node-detail">search + pretty print</text><text x="1558" y="318" class="node-detail">workflow-scoped clear</text></g><g data-component-id="terminal-tab"><title>Terminal tab</title><rect x="1540" y="470" width="270" height="230" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="1540" y="470" width="270" height="7" rx="4" fill="#8be9fd"/><text x="1558" y="496" class="type-label">INTERFACE</text><text x="1558" y="522" class="node-label">Terminal tab</text><text x="1558" y="548" class="node-detail">level threshold</text><text x="1558" y="568" class="node-detail">message / source search</text><text x="1558" y="588" class="node-detail">global clear</text></g><g data-component-id="dock-preferences"><title>Persisted dock preferences</title><rect x="1240" y="720" width="570" height="90" rx="12" fill="#1b1e25" stroke="#9aa1ac" stroke-width="2"/><rect x="1240" y="720" width="570" height="7" rx="4" fill="#9aa1ac"/><text x="1258" y="746" class="type-label">LOCAL STATE</text><text x="1258" y="772" class="node-label">Persisted dock preferences</text><text x="1258" y="798" class="node-detail">height · split width · font · autoscroll · pretty print · tab</text></g><g data-callout-id="observability-scope-contract"><rect x="70" y="880" width="1780" height="90" rx="10" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2" stroke-dasharray="7 6"/><text x="86" y="910" class="callout-title">Scope and retention stay deliberately distinct</text><text x="86" y="936" class="callout-text">Chat and Console history are persisted and scoped to the current workflow; Terminal history is a process-wide in-memory buffer of the latest 200 entries.</text><text x="86" y="958" class="callout-text">The dock persists only presentation preferences in localStorage—panel height, split width, font size, auto-scroll, pretty print, and selected log tab.</text></g>+<g aria-label="Legend"><circle cx="72" cy="1038" r="7" fill="#bd93f9"/><text x="86" y="1044" class="legend">Agents / system</text><circle cx="317" cy="1038" r="7" fill="#8be9fd"/><text x="331" y="1044" class="legend">Models / interfaces</text><circle cx="562" cy="1038" r="7" fill="#50fa7b"/><text x="576" y="1044" class="legend">Tools / results</text><circle cx="807" cy="1038" r="7" fill="#ff79c6"/><text x="821" y="1044" class="legend">Triggers / events</text><circle cx="1052" cy="1038" r="7" fill="#ffb86c"/><text x="1066" y="1044" class="legend">Workflow / runtime</text><circle cx="1297" cy="1038" r="7" fill="#f1fa8c"/><text x="1311" y="1044" class="legend">Security note</text></g>+</svg>diff --git a/docs/diagrams/runtime-trust-topology.svg b/docs/diagrams/runtime-trust-topology.svgnew file mode 100644index 00000000..91631c1e--- /dev/null+++ b/docs/diagrams/runtime-trust-topology.svg@@ -0,0 +1,25 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080" width="100%" role="img" aria-labelledby="title desc">+<title id="title">Runtime and Trust Topology</title>+<desc id="desc">A runtime topology that distinguishes the browser and CLI clients, Vite development proxy, FastAPI application, protected and restricted protocol surfaces, Temporal orchestration, and lazily started helper processes. Sources: .env.template; client/vite.config.js; server/main.py; server/middleware/auth.py; server/routers/websocket.py; server/services/authz/ws_surface.py; server/services/cli_agent/mcp_server.py; server/services/temporal/lifecycle.py; server/nodes/code/_runtime.py</desc>+<defs>+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto"><path d="M0,0 L10,5 L0,10 z" fill="#e8eaed"/></marker>+ <style>+ .title { fill:#e8eaed; font:700 30px Geist,system-ui,sans-serif; }+ .subtitle { fill:#9aa1ac; font:400 18px Geist,system-ui,sans-serif; }+ .group-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:1.2px; }+ .type-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:.8px; }+ .node-label { fill:#e8eaed; font:650 20px Geist,system-ui,sans-serif; }+ .node-detail { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .edge-label { fill:#e8eaed; font:500 16px Geist,system-ui,sans-serif; }+ .edge-protocol { fill:#9aa1ac; font:500 16px 'JetBrains Mono',ui-monospace,monospace; }+ .callout-title { fill:#e8eaed; font:650 18px Geist,system-ui,sans-serif; }+ .callout-text { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .legend { fill:#9aa1ac; font:500 16px Geist,system-ui,sans-serif; }+ </style>+</defs>+<rect width="1920" height="1080" fill="#0d0f13"/>+<text x="72" y="58" class="title">Runtime and Trust Topology</text>+<text x="72" y="91" class="subtitle">Development and production paths, authenticated surfaces, durable orchestration and lazy helpers</text>+<g data-group-id="client-zone"><rect x="40" y="135" width="350" height="830" rx="18" fill="#15171c" stroke="#f1fa8c" stroke-width="2"/><text x="60" y="167" class="group-label">CLIENTS AND PUBLIC SENDERS</text></g><g data-group-id="app-zone"><rect x="425" y="135" width="1050" height="830" rx="18" fill="#15171c" stroke="#bd93f9" stroke-width="2"/><text x="445" y="167" class="group-label">OPENCOMPANY APPLICATION</text></g><g data-group-id="runtime-zone"><rect x="1510" y="135" width="370" height="830" rx="18" fill="#15171c" stroke="#ffb86c" stroke-width="2"/><text x="1530" y="167" class="group-label">DURABLE AND LAZY RUNTIMES</text></g><g data-relationship-id="r-browser-vite"><title>Loads SPA in development · via HTTP</title><path d="M 360 272.5 L 455 257.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 405.0 238.0 L 315 400" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="211.8" y="376.0" width="206.39999999999998" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="315" y="397" class="edge-label" text-anchor="middle" textLength="188.4" lengthAdjust="spacingAndGlyphs">Loads SPA in development</text><text x="315" y="417" class="edge-protocol" text-anchor="middle">via HTTP</text></g><g data-relationship-id="r-vite-fastapi"><title>Proxies /api /ws /webhook /health /mcp · via HTTP / WS</title><path d="M 735 257.5 L 820 257.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 780.0 340.0 L 780 556" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="623.6" y="532.0" width="312.8" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="780" y="553" class="edge-label" text-anchor="middle" textLength="294.8" lengthAdjust="spacingAndGlyphs">Proxies /api /ws /webhook /health /mcp</text><text x="780" y="573" class="edge-protocol" text-anchor="middle">via HTTP / WS</text></g><g data-relationship-id="r-cli-fastapi"><title>Launches and administers · via Typer / process</title><path d="M 360 527.5 L 405 527 L 405 365 L 790 365 L 790 257 L 820 257.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="486.8" y="341.0" width="206.39999999999998" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="590" y="362" class="edge-label" text-anchor="middle" textLength="188.4" lengthAdjust="spacingAndGlyphs">Launches and administers</text><text x="590" y="382" class="edge-protocol" text-anchor="middle">via Typer / process</text></g><g data-relationship-id="r-browser-rest"><title>Calls protected routes · via HTTPS + JWT cookie</title><path d="M 360 272.5 L 405 272 L 405 460 L 455 460.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 405.0 395.0 L 495 557" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="399.4" y="533.0" width="191.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="495" y="554" class="edge-label" text-anchor="middle" textLength="173.2" lengthAdjust="spacingAndGlyphs">Calls protected routes</text><text x="495" y="574" class="edge-protocol" text-anchor="middle">via HTTPS + JWT cookie</text></g><g data-relationship-id="r-browser-status"><title>Commands and receives status · via WebSocket + cookie</title><path d="M 360 272.5 L 400 272 L 400 580 L 780 580 L 780 460 L 820 460.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 585.0 580.0 L 315 634" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="196.60000000000002" y="610.0" width="236.79999999999998" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="315" y="631" class="edge-label" text-anchor="middle" textLength="218.8" lengthAdjust="spacingAndGlyphs">Commands and receives status</text><text x="315" y="651" class="edge-protocol" text-anchor="middle">via WebSocket + cookie</text></g><g data-relationship-id="r-cli-mcp"><title>Invokes scoped tools · via MCP over HTTP + Bearer</title><path d="M 360 527.5 L 405 527 L 405 715 L 455 715.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 405.0 635.0 L 315 689" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="204.2" y="665.0" width="221.6" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="315" y="686" class="edge-label" text-anchor="middle">Invokes scoped tools</text><text x="315" y="706" class="edge-protocol" text-anchor="middle" textLength="203.6" lengthAdjust="spacingAndGlyphs">via MCP over HTTP + Bearer</text></g><g data-relationship-id="r-webhook-ingress"><title>Delivers provider events · via HTTPS webhook</title><path d="M 360 792.5 L 820 715.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 585.0 815.0 L 405 923" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="301.8" y="899.0" width="206.39999999999998" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="405" y="920" class="edge-label" text-anchor="middle" textLength="188.4" lengthAdjust="spacingAndGlyphs">Delivers provider events</text><text x="405" y="940" class="edge-protocol" text-anchor="middle">via HTTPS webhook</text></g><g data-relationship-id="r-surfaces-app"><title>Dispatches request · via ASGI</title><path d="M 595.0 400 L 595 365 L 970 365 L 970.0 325" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="704.6" y="341.0" width="160.79999999999998" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="785" y="362" class="edge-label" text-anchor="middle" textLength="142.8" lengthAdjust="spacingAndGlyphs">Dispatches request</text><text x="785" y="382" class="edge-protocol" text-anchor="middle">via ASGI</text></g><g data-relationship-id="r-status-app"><title>Dispatches authenticated message · via ASGI WebSocket</title><path d="M 960.0 400 L 970.0 325" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 970.0 365.0 L 1060 365" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="926.4" y="341.0" width="267.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1060" y="362" class="edge-label" text-anchor="middle" textLength="249.2" lengthAdjust="spacingAndGlyphs">Dispatches authenticated message</text><text x="1060" y="382" class="edge-protocol" text-anchor="middle">via ASGI WebSocket</text></g><g data-relationship-id="r-temporal-internal"><title>Calls legacy node handlers · via WebSocket</title><path d="M 1540 282.5 L 1500 282 L 1500 460 L 1445 460.0" fill="none" stroke="#e8eaed" stroke-width="2" stroke-dasharray="10 8" marker-end="url(#arrow)"/><path d="M 1500.0 390.0 L 1590 390" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1479.2" y="366.0" width="221.6" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1590" y="387" class="edge-label" text-anchor="middle" textLength="203.6" lengthAdjust="spacingAndGlyphs">Calls legacy node handlers</text><text x="1590" y="407" class="edge-protocol" text-anchor="middle">via WebSocket</text></g><g data-relationship-id="r-fastapi-temporal"><title>Starts workflows and polls tasks · via Temporal gRPC</title><path d="M 1120 257.5 L 1540 282.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1191.4" y="231.0" width="267.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1325" y="252" class="edge-label" text-anchor="middle" textLength="249.2" lengthAdjust="spacingAndGlyphs">Starts workflows and polls tasks</text><text x="1325" y="272" class="edge-protocol" text-anchor="middle">via Temporal gRPC</text></g><g data-relationship-id="r-fastapi-nodejs"><title>Starts on demand and executes JavaScript · via HTTP</title><path d="M 1120 257.5 L 1485 257 L 1485 537 L 1540 537.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1390.0 537.0 L 1300 591" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1136.0" y="567.0" width="328.0" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1300" y="588" class="edge-label" text-anchor="middle" textLength="310.0" lengthAdjust="spacingAndGlyphs">Starts on demand and executes JavaScript</text><text x="1300" y="608" class="edge-protocol" text-anchor="middle">via HTTP</text></g><g data-relationship-id="r-fastapi-whatsapp"><title>Starts on demand and sends commands · via RPC</title><path d="M 1120 257.5 L 1460 257 L 1460 797 L 1540 797.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1395.0 797.0 L 1575 905" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1430.0" y="881.0" width="290.0" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1575" y="902" class="edge-label" text-anchor="middle" textLength="272.0" lengthAdjust="spacingAndGlyphs">Starts on demand and sends commands</text><text x="1575" y="922" class="edge-protocol" text-anchor="middle">via RPC</text></g><g data-relationship-id="r-fastapi-spa"><title>Serves production fallback · via StaticFiles / HTML</title><path d="M 970.0 325 L 970 605 L 1305 605 L 1305.0 655" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1140.0 605.0 L 960 605" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="849.2" y="581.0" width="221.6" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="960" y="602" class="edge-label" text-anchor="middle" textLength="203.6" lengthAdjust="spacingAndGlyphs">Serves production fallback</text><text x="960" y="622" class="edge-protocol" text-anchor="middle" textLength="203.6" lengthAdjust="spacingAndGlyphs">via StaticFiles / HTML</text></g><g data-component-id="browser-spa"><title>Browser SPA</title><rect x="70" y="215" width="290" height="115" rx="12" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2"/><rect x="70" y="215" width="290" height="7" rx="4" fill="#f1fa8c"/><text x="88" y="241" class="type-label">CLIENT</text><text x="88" y="267" class="node-label">Browser SPA</text><text x="88" y="293" class="node-detail">browser tab or desktop app</text></g><g data-component-id="opencompany-cli"><title>OpenCompany CLI</title><rect x="70" y="470" width="290" height="115" rx="12" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2"/><rect x="70" y="470" width="290" height="7" rx="4" fill="#f1fa8c"/><text x="88" y="496" class="type-label">CLIENT</text><text x="88" y="522" class="node-label">OpenCompany CLI</text><text x="88" y="548" class="node-detail" textLength="254.0" lengthAdjust="spacingAndGlyphs">Typer launcher and agent client</text></g><g data-component-id="webhook-senders"><title>Webhook senders</title><rect x="70" y="735" width="290" height="115" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="70" y="735" width="290" height="7" rx="4" fill="#ff79c6"/><text x="88" y="761" class="type-label">EXTERNAL</text><text x="88" y="787" class="node-label">Webhook senders</text><text x="88" y="813" class="node-detail">Provider callbacks</text></g><g data-component-id="vite-dev"><title>Vite development server</title><rect x="455" y="190" width="280" height="135" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="455" y="190" width="280" height="7" rx="4" fill="#8be9fd"/><text x="473" y="216" class="type-label">CONTAINER</text><text x="473" y="242" class="node-label">Vite development</text><text x="473" y="264" class="node-label">server</text><text x="473" y="290" class="node-detail">app port · development only</text></g><g data-component-id="fastapi-app"><title>FastAPI application</title><rect x="820" y="190" width="300" height="135" rx="12" fill="#1b1e25" stroke="#bd93f9" stroke-width="2"/><rect x="820" y="190" width="300" height="7" rx="4" fill="#bd93f9"/><text x="838" y="216" class="type-label">CONTAINER</text><text x="838" y="242" class="node-label">FastAPI application</text><text x="838" y="268" class="node-detail">PYTHON_BACKEND_PORT</text></g><g data-component-id="rest-surface"><title>Protected REST API</title><rect x="455" y="400" width="280" height="120" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="455" y="400" width="280" height="7" rx="4" fill="#8be9fd"/><text x="473" y="426" class="type-label">INTERFACE</text><text x="473" y="452" class="node-label">Protected REST API</text><text x="473" y="478" class="node-detail">Authenticated /api routes</text></g><g data-component-id="status-socket"><title>/ws/status</title><rect x="820" y="400" width="280" height="120" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="820" y="400" width="280" height="7" rx="4" fill="#8be9fd"/><text x="838" y="426" class="type-label">WEBSOCKET</text><text x="838" y="452" class="node-label">/ws/status</text><text x="838" y="478" class="node-detail">Cookie-derived user identity</text></g><g data-component-id="internal-socket"><title>/ws/internal</title><rect x="1165" y="400" width="280" height="120" rx="12" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2"/><rect x="1165" y="400" width="280" height="7" rx="4" fill="#f1fa8c"/><text x="1183" y="426" class="type-label">WEBSOCKET</text><text x="1183" y="452" class="node-label">/ws/internal</text><text x="1183" y="478" class="node-detail" textLength="244.0" lengthAdjust="spacingAndGlyphs">Local allowlist · payload identity</text></g><g data-component-id="mcp-surface"><title>/mcp/ide/mcp</title><rect x="455" y="655" width="280" height="120" rx="12" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2"/><rect x="455" y="655" width="280" height="7" rx="4" fill="#f1fa8c"/><text x="473" y="681" class="type-label">MCP ENDPOINT</text><text x="473" y="707" class="node-label">/mcp/ide/mcp</text><text x="473" y="733" class="node-detail">Per-batch bearer token</text></g><g data-component-id="webhook-ingress"><title>/webhook/*</title><rect x="820" y="655" width="280" height="120" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="820" y="655" width="280" height="7" rx="4" fill="#ff79c6"/><text x="838" y="681" class="type-label">HTTP INGRESS</text><text x="838" y="707" class="node-label">/webhook/*</text><text x="838" y="733" class="node-detail" textLength="244.0" lengthAdjust="spacingAndGlyphs">Public route · provider verification</text></g><g data-component-id="production-spa"><title>Production SPA assets</title><rect x="1165" y="655" width="280" height="120" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="1165" y="655" width="280" height="7" rx="4" fill="#8be9fd"/><text x="1183" y="681" class="type-label">STATIC CONTENT</text><text x="1183" y="707" class="node-label">Production SPA assets</text><text x="1183" y="733" class="node-detail">Served by FastAPI</text></g><g data-component-id="temporal-runtime"><title>Temporal server and worker</title><rect x="1540" y="210" width="310" height="145" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="1540" y="210" width="310" height="7" rx="4" fill="#ffb86c"/><text x="1558" y="236" class="type-label">DURABLE RUNTIME</text><text x="1558" y="262" class="node-label">Temporal server</text><text x="1558" y="284" class="node-label">and worker</text><text x="1558" y="310" class="node-detail">ports from .env.template</text></g><g data-component-id="nodejs-sidecar"><title>JS/TS executor (bun)</title><rect x="1540" y="475" width="310" height="125" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="1540" y="475" width="310" height="7" rx="4" fill="#ffb86c"/><text x="1558" y="501" class="type-label">LAZY SIDECAR</text><text x="1558" y="527" class="node-label">JS/TS executor (bun)</text><text x="1558" y="553" class="node-detail">HTTP · NODEJS_EXECUTOR_PORT</text></g><g data-component-id="whatsapp-sidecar"><title>WhatsApp RPC</title><rect x="1540" y="735" width="310" height="125" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="1540" y="735" width="310" height="7" rx="4" fill="#ffb86c"/><text x="1558" y="761" class="type-label">LAZY SIDECAR</text><text x="1558" y="787" class="node-label">WhatsApp RPC</text><text x="1558" y="813" class="node-detail">RPC · WHATSAPP_RPC_PORT</text></g><g data-callout-id="trust-rules"><rect x="535" y="795" width="835" height="155" rx="10" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2" stroke-dasharray="7 6"/><text x="551" y="825" class="callout-title">Trust rules</text><text x="551" y="851" class="callout-text">REST and /ws/status use authenticated server-owned identity.</text><text x="551" y="873" class="callout-text">/ws/internal is local-only, unauthenticated, and restricted to</text><text x="551" y="895" class="callout-text">execute_node, execute_ai_node, and ping.</text><text x="551" y="917" class="callout-text">/mcp/ide/mcp uses a short-lived per-batch Bearer token;</text><text x="551" y="939" class="callout-text">/webhook/* verifies provider signatures where configured.</text></g>+<g aria-label="Legend"><circle cx="72" cy="1038" r="7" fill="#bd93f9"/><text x="86" y="1044" class="legend">Agents / system</text><circle cx="317" cy="1038" r="7" fill="#8be9fd"/><text x="331" y="1044" class="legend">Models / interfaces</text><circle cx="562" cy="1038" r="7" fill="#50fa7b"/><text x="576" y="1044" class="legend">Tools / results</text><circle cx="807" cy="1038" r="7" fill="#ff79c6"/><text x="821" y="1044" class="legend">Triggers / events</text><circle cx="1052" cy="1038" r="7" fill="#ffb86c"/><text x="1066" y="1044" class="legend">Workflow / runtime</text><circle cx="1297" cy="1038" r="7" fill="#f1fa8c"/><text x="1311" y="1044" class="legend">Security note</text></g>+</svg>diff --git a/docs/diagrams/system-context.svg b/docs/diagrams/system-context.svgnew file mode 100644index 00000000..8f779b61--- /dev/null+++ b/docs/diagrams/system-context.svg@@ -0,0 +1,25 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080" width="100%" role="img" aria-labelledby="title desc">+<title id="title">OpenCompany System Context</title>+<desc id="desc">A C4-style system context view of OpenCompany as an automation workspace between human users and external model, productivity, messaging, device, developer, and retrieval services. Sources: README.md; server/nodes/groups.py; server/config/credential_providers.json; server/main.py</desc>+<defs>+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto"><path d="M0,0 L10,5 L0,10 z" fill="#e8eaed"/></marker>+ <style>+ .title { fill:#e8eaed; font:700 30px Geist,system-ui,sans-serif; }+ .subtitle { fill:#9aa1ac; font:400 18px Geist,system-ui,sans-serif; }+ .group-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:1.2px; }+ .type-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:.8px; }+ .node-label { fill:#e8eaed; font:650 20px Geist,system-ui,sans-serif; }+ .node-detail { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .edge-label { fill:#e8eaed; font:500 16px Geist,system-ui,sans-serif; }+ .edge-protocol { fill:#9aa1ac; font:500 16px 'JetBrains Mono',ui-monospace,monospace; }+ .callout-title { fill:#e8eaed; font:650 18px Geist,system-ui,sans-serif; }+ .callout-text { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .legend { fill:#9aa1ac; font:500 16px Geist,system-ui,sans-serif; }+ </style>+</defs>+<rect width="1920" height="1080" fill="#0d0f13"/>+<text x="72" y="58" class="title">OpenCompany System Context</text>+<text x="72" y="91" class="subtitle">Who uses the system and which external capabilities it orchestrates</text>+<g data-group-id="opencompany-boundary"><rect x="420" y="145" width="930" height="800" rx="18" fill="#15171c" stroke="#bd93f9" stroke-width="2"/><text x="440" y="177" class="group-label">OPENCOMPANY SYSTEM BOUNDARY</text></g><g data-relationship-id="r-authors-design"><title>Design and run automations · via Browser UI / CLI</title><path d="M 340 327.5 L 510 327 L 510 445 L 665 487.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="389.2" y="341.0" width="221.6" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="500" y="362" class="edge-label" text-anchor="middle" textLength="203.6" lengthAdjust="spacingAndGlyphs">Design and run automations</text><text x="500" y="382" class="edge-protocol" text-anchor="middle">via Browser UI / CLI</text></g><g data-relationship-id="r-operators-control"><title>Control deployed workflows · via Browser UI / WebSocket</title><path d="M 340 702.5 L 535 702 L 535 535 L 665 487.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="394.2" y="641.0" width="221.6" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="505" y="662" class="edge-label" text-anchor="middle" textLength="203.6" lengthAdjust="spacingAndGlyphs">Control deployed workflows</text><text x="505" y="682" class="edge-protocol" text-anchor="middle" textLength="203.6" lengthAdjust="spacingAndGlyphs">via Browser UI / WebSocket</text></g><g data-relationship-id="r-opencompany-llm"><title>Requests inference · via Provider SDK / HTTPS</title><path d="M 1105 487.5 L 1210 487 L 1210 182 L 1480 182.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1221.8" y="158.0" width="206.39999999999998" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1325" y="179" class="edge-label" text-anchor="middle">Requests inference</text><text x="1325" y="199" class="edge-protocol" text-anchor="middle" textLength="188.4" lengthAdjust="spacingAndGlyphs">via Provider SDK / HTTPS</text></g><g data-relationship-id="r-opencompany-productivity"><title>Reads and updates work · via OAuth / HTTPS</title><path d="M 1105 487.5 L 1240 487 L 1240 327 L 1480 327.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1254.4" y="303.0" width="191.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1350" y="324" class="edge-label" text-anchor="middle" textLength="173.2" lengthAdjust="spacingAndGlyphs">Reads and updates work</text><text x="1350" y="344" class="edge-protocol" text-anchor="middle">via OAuth / HTTPS</text></g><g data-relationship-id="r-opencompany-messaging"><title>Sends and receives messages · via Webhooks / RPC</title><path d="M 1105 487.5 L 1270 487 L 1270 472 L 1480 472.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1365.0 472.0 L 1275 472" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1160.4" y="448.0" width="229.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1275" y="469" class="edge-label" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">Sends and receives messages</text><text x="1275" y="489" class="edge-protocol" text-anchor="middle">via Webhooks / RPC</text></g><g data-relationship-id="r-opencompany-devices"><title>Invokes device actions · via RPC / platform APIs</title><path d="M 1105 487.5 L 1270 487 L 1270 617 L 1480 617.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1260.6" y="593.0" width="198.79999999999998" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1360" y="614" class="edge-label" text-anchor="middle" textLength="180.8" lengthAdjust="spacingAndGlyphs">Invokes device actions</text><text x="1360" y="634" class="edge-protocol" text-anchor="middle" textLength="180.8" lengthAdjust="spacingAndGlyphs">via RPC / platform APIs</text></g><g data-relationship-id="r-opencompany-developer"><title>Uses code and dev tools · via MCP / CLI / HTTPS</title><path d="M 1105 487.5 L 1240 487 L 1240 762 L 1480 762.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1250.6" y="738.0" width="198.79999999999998" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1350" y="759" class="edge-label" text-anchor="middle" textLength="180.8" lengthAdjust="spacingAndGlyphs">Uses code and dev tools</text><text x="1350" y="779" class="edge-protocol" text-anchor="middle" textLength="180.8" lengthAdjust="spacingAndGlyphs">via MCP / CLI / HTTPS</text></g><g data-relationship-id="r-opencompany-search"><title>Indexes and retrieves knowledge · via HTTPS / vector API</title><path d="M 1105 487.5 L 1210 487 L 1210 910 L 1480 910.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1210.2" y="886.0" width="259.6" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1340" y="907" class="edge-label" text-anchor="middle" textLength="241.6" lengthAdjust="spacingAndGlyphs">Indexes and retrieves knowledge</text><text x="1340" y="927" class="edge-protocol" text-anchor="middle">via HTTPS / vector API</text></g><g data-component-id="workflow-authors"><title>Workflow authors</title><rect x="55" y="265" width="285" height="125" rx="12" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2"/><rect x="55" y="265" width="285" height="7" rx="4" fill="#f1fa8c"/><text x="73" y="291" class="type-label">PERSON</text><text x="73" y="317" class="node-label">Workflow authors</text><text x="73" y="343" class="node-detail">Build and test automations</text></g><g data-component-id="workflow-operators"><title>Workflow operators</title><rect x="55" y="640" width="285" height="125" rx="12" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2"/><rect x="55" y="640" width="285" height="7" rx="4" fill="#f1fa8c"/><text x="73" y="666" class="type-label">PERSON</text><text x="73" y="692" class="node-label">Workflow operators</text><text x="73" y="718" class="node-detail">Deploy and supervise runs</text></g><g data-component-id="opencompany"><title>OpenCompany</title><rect x="665" y="385" width="440" height="205" rx="12" fill="#1b1e25" stroke="#bd93f9" stroke-width="2"/><rect x="665" y="385" width="440" height="7" rx="4" fill="#bd93f9"/><text x="683" y="411" class="type-label">SOFTWARE SYSTEM</text><text x="683" y="437" class="node-label">OpenCompany</text><text x="683" y="463" class="node-detail">Visual workflow workspace</text><text x="683" y="483" class="node-detail">Agents, tools, triggers and durable runs</text></g><g data-component-id="llm-providers"><title>LLM providers</title><rect x="1480" y="130" width="365" height="105" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="1480" y="130" width="365" height="7" rx="4" fill="#8be9fd"/><text x="1498" y="156" class="type-label">EXTERNAL SYSTEM</text><text x="1498" y="182" class="node-label">LLM providers</text><text x="1498" y="208" class="node-detail">Hosted and local inference - text + image input</text></g><g data-component-id="productivity-services"><title>Productivity services</title><rect x="1480" y="275" width="365" height="105" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="1480" y="275" width="365" height="7" rx="4" fill="#50fa7b"/><text x="1498" y="301" class="type-label">EXTERNAL SYSTEM</text><text x="1498" y="327" class="node-label">Productivity services</text><text x="1498" y="353" class="node-detail">Mail, calendar, docs and CRM</text></g><g data-component-id="messaging-channels"><title>Messaging channels</title><rect x="1480" y="420" width="365" height="105" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="1480" y="420" width="365" height="7" rx="4" fill="#50fa7b"/><text x="1498" y="446" class="type-label">EXTERNAL SYSTEM</text><text x="1498" y="472" class="node-label">Messaging channels</text><text x="1498" y="498" class="node-detail">Chat and social platforms</text></g><g data-component-id="connected-devices"><title>Connected devices</title><rect x="1480" y="565" width="365" height="105" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="1480" y="565" width="365" height="7" rx="4" fill="#50fa7b"/><text x="1498" y="591" class="type-label">EXTERNAL SYSTEM</text><text x="1498" y="617" class="node-label">Connected devices</text><text x="1498" y="643" class="node-detail">Android and device services</text></g><g data-component-id="developer-services"><title>Developer services</title><rect x="1480" y="710" width="365" height="105" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="1480" y="710" width="365" height="7" rx="4" fill="#8be9fd"/><text x="1498" y="736" class="type-label">EXTERNAL SYSTEM</text><text x="1498" y="762" class="node-label">Developer services</text><text x="1498" y="788" class="node-detail">Code, CLI and MCP tools</text></g><g data-component-id="search-vector-stores"><title>Search and vector stores</title><rect x="1480" y="855" width="365" height="110" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="1480" y="855" width="365" height="7" rx="4" fill="#ff79c6"/><text x="1498" y="881" class="type-label">EXTERNAL SYSTEM</text><text x="1498" y="907" class="node-label">Search and</text><text x="1498" y="929" class="node-label">vector stores</text><text x="1498" y="955" class="node-detail">Retrieval and knowledge indexes</text></g><g data-callout-id="system-purpose"><rect x="615" y="700" width="540" height="135" rx="10" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2" stroke-dasharray="7 6"/><text x="631" y="730" class="callout-title">System responsibility</text><text x="631" y="756" class="callout-text">Compose external capabilities as directed graphs.</text><text x="631" y="778" class="callout-text">Keep execution, credentials and observability</text><text x="631" y="800" class="callout-text">inside one user-scoped workspace.</text></g>+<g aria-label="Legend"><circle cx="72" cy="1038" r="7" fill="#bd93f9"/><text x="86" y="1044" class="legend">Agents / system</text><circle cx="317" cy="1038" r="7" fill="#8be9fd"/><text x="331" y="1044" class="legend">Models / interfaces</text><circle cx="562" cy="1038" r="7" fill="#50fa7b"/><text x="576" y="1044" class="legend">Tools / results</text><circle cx="807" cy="1038" r="7" fill="#ff79c6"/><text x="821" y="1044" class="legend">Triggers / events</text><circle cx="1052" cy="1038" r="7" fill="#ffb86c"/><text x="1066" y="1044" class="legend">Workflow / runtime</text><circle cx="1297" cy="1038" r="7" fill="#f1fa8c"/><text x="1311" y="1044" class="legend">Security note</text></g>+</svg>diff --git a/docs/diagrams/team-operations.svg b/docs/diagrams/team-operations.svgnew file mode 100644index 00000000..3f5fde51--- /dev/null+++ b/docs/diagrams/team-operations.svg@@ -0,0 +1,25 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080" width="100%" role="img" aria-labelledby="title desc">+<title id="title">Team Operations</title>+<desc id="desc">A team lead uses its intrinsic Task Manager to persist bounded work for graph-connected teammates. AgentTeamService enforces workflow, lead, execution, assignee, and optimistic-revision boundaries while tasks advance from blocked or queued through worker submission and explicit lead acceptance; Task Manager and Team Monitor expose mutable and read-only views of the same durable state. Sources: server/nodes/tool/task_manager/__init__.py; server/services/agent_team.py; server/services/agent_teams/handlers.py; server/services/temporal/agent_workflow.py; client/src/components/parameterPanel/TaskManagerPanel.tsx; client/src/components/parameterPanel/TeamMonitorPanel.tsx</desc>+<defs>+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto"><path d="M0,0 L10,5 L0,10 z" fill="#e8eaed"/></marker>+ <style>+ .title { fill:#e8eaed; font:700 30px Geist,system-ui,sans-serif; }+ .subtitle { fill:#9aa1ac; font:400 18px Geist,system-ui,sans-serif; }+ .group-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:1.2px; }+ .type-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:.8px; }+ .node-label { fill:#e8eaed; font:650 20px Geist,system-ui,sans-serif; }+ .node-detail { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .edge-label { fill:#e8eaed; font:500 16px Geist,system-ui,sans-serif; }+ .edge-protocol { fill:#9aa1ac; font:500 16px 'JetBrains Mono',ui-monospace,monospace; }+ .callout-title { fill:#e8eaed; font:650 18px Geist,system-ui,sans-serif; }+ .callout-text { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .legend { fill:#9aa1ac; font:500 16px Geist,system-ui,sans-serif; }+ </style>+</defs>+<rect width="1920" height="1080" fill="#0d0f13"/>+<text x="72" y="58" class="title">Team Operations</text>+<text x="72" y="91" class="subtitle">Execution-scoped durable tasks: assign, run, review, recover, and finish</text>+<g data-group-id="operation-surfaces"><rect x="72" y="140" width="1776" height="235" rx="18" fill="#15171c" stroke="#ffb86c" stroke-width="2"/><text x="92" y="172" class="group-label">OPERATION SURFACES</text></g><g data-group-id="task-lifecycle"><rect x="72" y="410" width="1776" height="535" rx="18" fill="#15171c" stroke="#ffb86c" stroke-width="2"/><text x="92" y="442" class="group-label">DURABLE TASK LIFECYCLE</text></g><g data-relationship-id="lead-calls-task-manager"><title>call public operations</title><path d="M 410 275.0 L 500 275.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="359.4" y="165.0" width="191.2" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="455" y="183" class="edge-label" text-anchor="middle" textLength="173.2" lengthAdjust="spacingAndGlyphs">call public operations</text></g><g data-relationship-id="task-manager-uses-service"><title>scoped durable mutation</title><path d="M 830 275.0 L 920 275.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="775.6" y="165.0" width="198.79999999999998" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="875" y="183" class="edge-label" text-anchor="middle" textLength="180.8" lengthAdjust="spacingAndGlyphs">scoped durable mutation</text></g><g data-relationship-id="human-manages-service"><title>inspect + permitted review actions · via WebSocket</title><path d="M 1390 275.0 L 1280 275.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1335.0 245.0 L 1335 148.0" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1193.8" y="124.0" width="282.4" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1335" y="145.0" class="edge-label" text-anchor="middle" textLength="264.4" lengthAdjust="spacingAndGlyphs">inspect + permitted review actions</text><text x="1335" y="165.0" class="edge-protocol" text-anchor="middle">via WebSocket</text></g><g data-relationship-id="service-updates-human"><title>snapshots + lifecycle events</title><path d="M 1100.0 345 L 1100 365 L 1570 365 L 1570.0 345" fill="none" stroke="#e8eaed" stroke-width="2" stroke-dasharray="10 8" marker-end="url(#arrow)"/><path d="M 1335.0 365.0 L 1335 419" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1216.6" y="404.0" width="236.79999999999998" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1335" y="422" class="edge-label" text-anchor="middle" textLength="218.8" lengthAdjust="spacingAndGlyphs">snapshots + lifecycle events</text></g><g data-relationship-id="service-assigns-ready"><title>assign_task persists ready work</title><path d="M 1100.0 345 L 1100 395 L 565 395 L 565.0 520" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="700.2" y="380.0" width="259.6" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="830" y="398" class="edge-label" text-anchor="middle" textLength="241.6" lengthAdjust="spacingAndGlyphs">assign_task persists ready work</text></g><g data-relationship-id="dependencies-unblock"><title>dependencies accepted</title><path d="M 360 590.0 L 440 590.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="308.2" y="480.0" width="183.6" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="400" y="498" class="edge-label" text-anchor="middle" textLength="165.6" lengthAdjust="spacingAndGlyphs">dependencies accepted</text></g><g data-relationship-id="worker-claims"><title>worker claims task</title><path d="M 690 590.0 L 770 590.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="649.6" y="480.0" width="160.79999999999998" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="730" y="498" class="edge-label" text-anchor="middle" textLength="142.8" lengthAdjust="spacingAndGlyphs">worker claims task</text></g><g data-relationship-id="worker-submits"><title>worker succeeds</title><path d="M 1020 590.0 L 1100 590.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="991.0" y="480.0" width="138.0" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1060" y="498" class="edge-label" text-anchor="middle" textLength="120.0" lengthAdjust="spacingAndGlyphs">worker succeeds</text></g><g data-relationship-id="lead-accepts"><title>accept_task</title><path d="M 1350 590.0 L 1430 590.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1330.0" y="480.0" width="120" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1390" y="498" class="edge-label" text-anchor="middle">accept_task</text></g><g data-relationship-id="worker-fails"><title>worker errors</title><path d="M 895.0 660 L 895.0 760" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="833.6" y="695.0" width="122.8" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="895" y="713" class="edge-label" text-anchor="middle" textLength="104.8" lengthAdjust="spacingAndGlyphs">worker errors</text></g><g data-relationship-id="failed-requeues"><title>retry_task / reassign_task</title><path d="M 770 830.0 L 720 700 L 565 700 L 565.0 660" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="529.2" y="685.0" width="221.6" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="640" y="703" class="edge-label" text-anchor="middle" textLength="203.6" lengthAdjust="spacingAndGlyphs">retry_task / reassign_task</text></g><g data-relationship-id="submitted-requeues"><title>retry_task / reassign_task</title><path d="M 1225.0 520 L 1225 455 L 565 455 L 565.0 520" fill="none" stroke="#e8eaed" stroke-width="2" stroke-dasharray="10 8" marker-end="url(#arrow)"/><rect x="784.2" y="440.0" width="221.6" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="895" y="458" class="edge-label" text-anchor="middle" textLength="203.6" lengthAdjust="spacingAndGlyphs">retry_task / reassign_task</text></g><g data-relationship-id="cancelled-requeues"><title>retry_task / reassign_task</title><path d="M 1225.0 900 L 1225 925 L 700 925 L 700 700 L 565.0 660" fill="none" stroke="#e8eaed" stroke-width="2" stroke-dasharray="10 8" marker-end="url(#arrow)"/><rect x="784.2" y="910.0" width="221.6" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="895" y="928" class="edge-label" text-anchor="middle" textLength="203.6" lengthAdjust="spacingAndGlyphs">retry_task / reassign_task</text></g><g data-relationship-id="accepted-finishes-team"><title>finish_team when all resolved</title><path d="M 1555.0 660 L 1555.0 760" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1432.8" y="675.0" width="244.39999999999998" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1555" y="693" class="edge-label" text-anchor="middle" textLength="226.4" lengthAdjust="spacingAndGlyphs">finish_team when all resolved</text></g><g data-relationship-id="cancelled-is-resolved"><title>cancelled also counts resolved</title><path d="M 1350 830.0 L 1430 830.0" fill="none" stroke="#e8eaed" stroke-width="2" stroke-dasharray="10 8" marker-end="url(#arrow)"/><rect x="1264.0" y="720.0" width="252.0" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1390" y="738" class="edge-label" text-anchor="middle" textLength="234.0" lengthAdjust="spacingAndGlyphs">cancelled also counts resolved</text></g><g data-component-id="team-lead"><title>Team Lead</title><rect x="110" y="205" width="300" height="140" rx="12" fill="#1b1e25" stroke="#bd93f9" stroke-width="2"/><rect x="110" y="205" width="300" height="7" rx="4" fill="#bd93f9"/><text x="128" y="231" class="type-label">AGENT</text><text x="128" y="257" class="node-label">Team Lead</text><text x="128" y="283" class="node-detail">Orchestrator or AI Employee</text><text x="128" y="303" class="node-detail" textLength="264.0" lengthAdjust="spacingAndGlyphs">connected teammates are authority</text></g><g data-component-id="task-manager"><title>Task Manager</title><rect x="500" y="205" width="330" height="140" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="500" y="205" width="330" height="7" rx="4" fill="#50fa7b"/><text x="518" y="231" class="type-label">INTRINSIC TOOL</text><text x="518" y="257" class="node-label">Task Manager</text><text x="518" y="283" class="node-detail">assign · inspect · review</text><text x="518" y="303" class="node-detail">retry · reassign · cancel · finish</text></g><g data-component-id="agent-team-service"><title>AgentTeamService</title><rect x="920" y="205" width="360" height="140" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="920" y="205" width="360" height="7" rx="4" fill="#ffb86c"/><text x="938" y="231" class="type-label">DURABLE SERVICE</text><text x="938" y="257" class="node-label">AgentTeamService</text><text x="938" y="283" class="node-detail">workflow + lead + execution scope</text><text x="938" y="303" class="node-detail">optimistic revision transitions</text></g><g data-component-id="human-views"><title>Task Manager + Team Monitor</title><rect x="1390" y="205" width="360" height="140" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="1390" y="205" width="360" height="7" rx="4" fill="#8be9fd"/><text x="1408" y="231" class="type-label">HUMAN UI</text><text x="1408" y="257" class="node-label">Task Manager +</text><text x="1408" y="279" class="node-label">Team Monitor</text><text x="1408" y="305" class="node-detail">authorized mutations + trace</text><text x="1408" y="325" class="node-detail">read-only lifecycle snapshot</text></g><g data-component-id="blocked"><title>Blocked</title><rect x="110" y="520" width="250" height="140" rx="12" fill="#1b1e25" stroke="#9aa1ac" stroke-width="2"/><rect x="110" y="520" width="250" height="7" rx="4" fill="#9aa1ac"/><text x="128" y="546" class="type-label">TASK STATE</text><text x="128" y="572" class="node-label">Blocked</text><text x="128" y="598" class="node-detail">dependencies unresolved</text></g><g data-component-id="queued"><title>Queued</title><rect x="440" y="520" width="250" height="140" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="440" y="520" width="250" height="7" rx="4" fill="#ffb86c"/><text x="458" y="546" class="type-label">TASK STATE</text><text x="458" y="572" class="node-label">Queued</text><text x="458" y="598" class="node-detail">durably persisted</text><text x="458" y="618" class="node-detail">awaiting admission</text></g><g data-component-id="running"><title>Running</title><rect x="770" y="520" width="250" height="140" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="770" y="520" width="250" height="7" rx="4" fill="#ffb86c"/><text x="788" y="546" class="type-label">TASK STATE</text><text x="788" y="572" class="node-label">Running</text><text x="788" y="598" class="node-detail">worker claimed task</text><text x="788" y="618" class="node-detail">detached child execution</text></g><g data-component-id="submitted"><title>Submitted</title><rect x="1100" y="520" width="250" height="140" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="1100" y="520" width="250" height="7" rx="4" fill="#ff79c6"/><text x="1118" y="546" class="type-label">TASK STATE</text><text x="1118" y="572" class="node-label">Submitted</text><text x="1118" y="598" class="node-detail" textLength="214.0" lengthAdjust="spacingAndGlyphs">worker result awaits review</text></g><g data-component-id="accepted"><title>Accepted</title><rect x="1430" y="520" width="250" height="140" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="1430" y="520" width="250" height="7" rx="4" fill="#50fa7b"/><text x="1448" y="546" class="type-label">TASK STATE</text><text x="1448" y="572" class="node-label">Accepted</text><text x="1448" y="598" class="node-detail">lead-approved Done state</text></g><g data-component-id="failed"><title>Failed</title><rect x="770" y="760" width="250" height="140" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="770" y="760" width="250" height="7" rx="4" fill="#ff79c6"/><text x="788" y="786" class="type-label">TASK STATE</text><text x="788" y="812" class="node-label">Failed</text><text x="788" y="838" class="node-detail" textLength="214.0" lengthAdjust="spacingAndGlyphs">error retained for recovery</text></g><g data-component-id="cancelled"><title>Cancelled</title><rect x="1100" y="760" width="250" height="140" rx="12" fill="#1b1e25" stroke="#9aa1ac" stroke-width="2"/><rect x="1100" y="760" width="250" height="7" rx="4" fill="#9aa1ac"/><text x="1118" y="786" class="type-label">TASK STATE</text><text x="1118" y="812" class="node-label">Cancelled</text><text x="1118" y="838" class="node-detail" textLength="214.0" lengthAdjust="spacingAndGlyphs">intentional terminal state</text></g><g data-component-id="team-completed"><title>Team Completed</title><rect x="1430" y="760" width="250" height="140" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="1430" y="760" width="250" height="7" rx="4" fill="#50fa7b"/><text x="1448" y="786" class="type-label">EXECUTION STATE</text><text x="1448" y="812" class="node-label">Team Completed</text><text x="1448" y="838" class="node-detail" textLength="214.0" lengthAdjust="spacingAndGlyphs">all tasks accepted or cancelled</text></g><g data-callout-id="permitted-mutations"><rect x="110" y="740" width="550" height="165" rx="10" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2" stroke-dasharray="7 6"/><text x="126" y="770" class="callout-title">State-aware controls</text><text x="126" y="796" class="callout-text">modify_task: blocked or queued</text><text x="126" y="818" class="callout-text">cancel_task: blocked, queued, or running</text><text x="126" y="840" class="callout-text">list/get/inspect never mutate task state</text></g>+<g aria-label="Legend"><circle cx="72" cy="1038" r="7" fill="#bd93f9"/><text x="86" y="1044" class="legend">Agents / system</text><circle cx="317" cy="1038" r="7" fill="#8be9fd"/><text x="331" y="1044" class="legend">Models / interfaces</text><circle cx="562" cy="1038" r="7" fill="#50fa7b"/><text x="576" y="1044" class="legend">Tools / results</text><circle cx="807" cy="1038" r="7" fill="#ff79c6"/><text x="821" y="1044" class="legend">Triggers / events</text><circle cx="1052" cy="1038" r="7" fill="#ffb86c"/><text x="1066" y="1044" class="legend">Workflow / runtime</text><circle cx="1297" cy="1038" r="7" fill="#f1fa8c"/><text x="1311" y="1044" class="legend">Security note</text></g>+</svg>diff --git a/docs/diagrams/workflow-execution-routing.svg b/docs/diagrams/workflow-execution-routing.svgnew file mode 100644index 00000000..fb21e32d--- /dev/null+++ b/docs/diagrams/workflow-execution-routing.svg@@ -0,0 +1,25 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080" width="100%" role="img" aria-labelledby="title desc">+<title id="title">Workflow Execution Routing</title>+<desc id="desc">A directed execution flow covering direct single-node execution, the WorkflowService routing decision, Temporal, Redis-backed parallel, and sequential orchestration paths, plus the canonical NodeExecutor pipeline and status persistence. Sources: server/services/workflow.py; server/services/node_executor.py; server/services/execution/executor.py; server/services/temporal/executor.py; server/services/temporal/workflow.py; server/services/status_broadcaster.py; server/routers/workflow.py; server/routers/websocket.py</desc>+<defs>+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto"><path d="M0,0 L10,5 L0,10 z" fill="#e8eaed"/></marker>+ <style>+ .title { fill:#e8eaed; font:700 30px Geist,system-ui,sans-serif; }+ .subtitle { fill:#9aa1ac; font:400 18px Geist,system-ui,sans-serif; }+ .group-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:1.2px; }+ .type-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:.8px; }+ .node-label { fill:#e8eaed; font:650 20px Geist,system-ui,sans-serif; }+ .node-detail { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .edge-label { fill:#e8eaed; font:500 16px Geist,system-ui,sans-serif; }+ .edge-protocol { fill:#9aa1ac; font:500 16px 'JetBrains Mono',ui-monospace,monospace; }+ .callout-title { fill:#e8eaed; font:650 18px Geist,system-ui,sans-serif; }+ .callout-text { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .legend { fill:#9aa1ac; font:500 16px Geist,system-ui,sans-serif; }+ </style>+</defs>+<rect width="1920" height="1080" fill="#0d0f13"/>+<text x="72" y="58" class="title">Workflow Execution Routing</text>+<text x="72" y="91" class="subtitle">Single-node requests and whole-graph runs converge on the same plugin execution pipeline</text>+<g data-group-id="entry-zone"><rect x="45" y="150" width="300" height="790" rx="18" fill="#15171c" stroke="#8be9fd" stroke-width="2"/><text x="65" y="182" class="group-label">ENTRY</text></g><g data-group-id="routing-zone"><rect x="385" y="150" width="775" height="790" rx="18" fill="#15171c" stroke="#ffb86c" stroke-width="2"/><text x="405" y="182" class="group-label">GRAPH ORCHESTRATION</text></g><g data-group-id="node-pipeline-zone"><rect x="1200" y="150" width="675" height="790" rx="18" fill="#15171c" stroke="#ffb86c" stroke-width="2"/><text x="1220" y="182" class="group-label">NODEEXECUTOR PIPELINE</text></g><g data-relationship-id="r-single-pipeline"><title>Executes directly · via WorkflowService.execute_node</title><path d="M 315 312.5 L 360 312 L 360 120 L 1180 120 L 1180 257 L 1240 257.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 780.0 120.0 L 780 148.0" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="646.4" y="124.0" width="267.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="780" y="145.0" class="edge-label" text-anchor="middle">Executes directly</text><text x="780" y="165.0" class="edge-protocol" text-anchor="middle" textLength="249.2" lengthAdjust="spacingAndGlyphs">via WorkflowService.execute_node</text></g><g data-relationship-id="r-whole-routing"><title>Submits nodes, edges and identity · via WorkflowService.execute_workflow</title><path d="M 315 687.5 L 365 687 L 365 322 L 455 322.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="216.20000000000002" y="481.0" width="297.59999999999997" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="365" y="502" class="edge-label" text-anchor="middle" textLength="279.6" lengthAdjust="spacingAndGlyphs">Submits nodes, edges and identity</text><text x="365" y="522" class="edge-protocol" text-anchor="middle" textLength="279.6" lengthAdjust="spacingAndGlyphs">via WorkflowService.execute_workflow</text></g><g data-relationship-id="r-routing-temporal"><title>Chooses when requested and wired · via Temporal</title><path d="M 755 322.5 L 820 267.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 790.0 235.0 L 1060 148.0" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="926.4" y="124.0" width="267.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1060" y="145.0" class="edge-label" text-anchor="middle" textLength="249.2" lengthAdjust="spacingAndGlyphs">Chooses when requested and wired</text><text x="1060" y="165.0" class="edge-protocol" text-anchor="middle">via Temporal</text></g><g data-relationship-id="r-routing-parallel"><title>Else chooses when parallel and Redis enabled · via in-process + Redis</title><path d="M 755 322.5 L 785 322 L 785 492 L 820 492.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 790.0 405.0 L 790 621" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="610.8" y="597.0" width="358.4" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="790" y="618" class="edge-label" text-anchor="middle" textLength="340.4" lengthAdjust="spacingAndGlyphs">Else chooses when parallel and Redis enabled</text><text x="790" y="638" class="edge-protocol" text-anchor="middle">via in-process + Redis</text></g><g data-relationship-id="r-routing-sequential"><title>Otherwise falls back · via in-process</title><path d="M 755 322.5 L 785 322 L 785 742 L 820 742.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 790.0 640.0 L 700 694" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="612.0" y="670.0" width="176.0" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="700" y="691" class="edge-label" text-anchor="middle" textLength="158.0" lengthAdjust="spacingAndGlyphs">Otherwise falls back</text><text x="700" y="711" class="edge-protocol" text-anchor="middle">via in-process</text></g><g data-relationship-id="r-temporal-node"><title>Schedules node activities · via Temporal task queue</title><path d="M 1105 267.5 L 1240 257.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1170.0 225.0 L 1170 387" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1063.0" y="363.0" width="214.0" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1170" y="384" class="edge-label" text-anchor="middle" textLength="196.0" lengthAdjust="spacingAndGlyphs">Schedules node activities</text><text x="1170" y="404" class="edge-protocol" text-anchor="middle" textLength="196.0" lengthAdjust="spacingAndGlyphs">via Temporal task queue</text></g><g data-relationship-id="r-parallel-node"><title>Calls node adapter with retries · via async callback</title><path d="M 1105 492.5 L 1170 492 L 1170 257 L 1240 257.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1170.0 385.0 L 900 385" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="770.2" y="361.0" width="259.6" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="900" y="382" class="edge-label" text-anchor="middle" textLength="241.6" lengthAdjust="spacingAndGlyphs">Calls node adapter with retries</text><text x="900" y="402" class="edge-protocol" text-anchor="middle">via async callback</text></g><g data-relationship-id="r-sequential-node"><title>Calls each ready node · via await</title><path d="M 1105 742.5 L 1170 742 L 1170 257 L 1240 257.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1170.0 650.0 L 1260 650" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1168.2" y="626.0" width="183.6" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1260" y="647" class="edge-label" text-anchor="middle" textLength="165.6" lengthAdjust="spacingAndGlyphs">Calls each ready node</text><text x="1260" y="667" class="edge-protocol" text-anchor="middle">via await</text></g><g data-relationship-id="r-prepare-resolve"><title>Passes validated parameters · via Python dict</title><path d="M 1525 257.5 L 1560 257.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1542.0 347.0 L 1542 401" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1427.4" y="377.0" width="229.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1542" y="398" class="edge-label" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">Passes validated parameters</text><text x="1542" y="418" class="edge-protocol" text-anchor="middle">via Python dict</text></g><g data-relationship-id="r-resolve-dispatch"><title>Builds handler context · via NodeContext</title><path d="M 1697.5 320 L 1697 380 L 1382 380 L 1382.5 455" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1540.0 380.0 L 1810 380" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1714.4" y="356.0" width="191.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1810" y="377" class="edge-label" text-anchor="middle" textLength="173.2" lengthAdjust="spacingAndGlyphs">Builds handler context</text><text x="1810" y="397" class="edge-protocol" text-anchor="middle">via NodeContext</text></g><g data-relationship-id="r-dispatch-result"><title>Returns standardized result · via ExecutionResult</title><path d="M 1525 527.5 L 1560 527.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1427.4" y="641.0" width="229.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1542" y="662" class="edge-label" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">Returns standardized result</text><text x="1542" y="682" class="edge-protocol" text-anchor="middle">via ExecutionResult</text></g><g data-relationship-id="r-result-store"><title>Persists successful outputs · via database callback</title><path d="M 1697.5 600 L 1697 680 L 1382 680 L 1382.5 745" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1540.0 680.0 L 1793.4 680" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1678.8000000000002" y="656.0" width="229.2" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1793.4" y="677" class="edge-label" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">Persists successful outputs</text><text x="1793.4" y="697" class="edge-protocol" text-anchor="middle">via database callback</text></g><g data-relationship-id="r-store-broadcast"><title>Publishes execution state · via WebSocket broadcast</title><path d="M 1525 807.5 L 1560 807.5" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1435.0" y="901.0" width="214.0" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1542" y="922" class="edge-label" text-anchor="middle" textLength="196.0" lengthAdjust="spacingAndGlyphs">Publishes execution state</text><text x="1542" y="942" class="edge-protocol" text-anchor="middle" textLength="196.0" lengthAdjust="spacingAndGlyphs">via WebSocket broadcast</text></g><g data-component-id="single-node-request"><title>Single-node request</title><rect x="75" y="250" width="240" height="125" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="75" y="250" width="240" height="7" rx="4" fill="#8be9fd"/><text x="93" y="276" class="type-label">ENTRY POINT</text><text x="93" y="302" class="node-label" textLength="204.0" lengthAdjust="spacingAndGlyphs">Single-node request</text><text x="93" y="328" class="node-detail" textLength="204.0" lengthAdjust="spacingAndGlyphs">WebSocket or internal REST</text></g><g data-component-id="whole-workflow-request"><title>Whole-workflow run</title><rect x="75" y="625" width="240" height="125" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="75" y="625" width="240" height="7" rx="4" fill="#8be9fd"/><text x="93" y="651" class="type-label">ENTRY POINT</text><text x="93" y="677" class="node-label">Whole-workflow run</text><text x="93" y="703" class="node-detail">Interactive or deployed</text></g><g data-component-id="routing-decision"><title>WorkflowService routing</title><rect x="455" y="250" width="300" height="145" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="455" y="250" width="300" height="7" rx="4" fill="#ffb86c"/><text x="473" y="276" class="type-label">DECISION</text><text x="473" y="302" class="node-label">WorkflowService routing</text><text x="473" y="328" class="node-detail" textLength="264.0" lengthAdjust="spacingAndGlyphs">Temporal → parallel → sequential</text></g><g data-component-id="temporal-branch"><title>Temporal branch</title><rect x="820" y="205" width="285" height="125" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="820" y="205" width="285" height="7" rx="4" fill="#ffb86c"/><text x="838" y="231" class="type-label">DURABLE ORCHESTRATOR</text><text x="838" y="257" class="node-label">Temporal branch</text><text x="838" y="283" class="node-detail">Temporal executor is wired</text></g><g data-component-id="redis-parallel-branch"><title>Redis-parallel branch</title><rect x="820" y="420" width="285" height="145" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="820" y="420" width="285" height="7" rx="4" fill="#ffb86c"/><text x="838" y="446" class="type-label">GRAPH ORCHESTRATOR</text><text x="838" y="472" class="node-label">Redis-parallel</text><text x="838" y="494" class="node-label">branch</text><text x="838" y="520" class="node-detail">WorkflowExecutor</text></g><g data-component-id="sequential-branch"><title>Sequential fallback</title><rect x="820" y="680" width="285" height="125" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="820" y="680" width="285" height="7" rx="4" fill="#ffb86c"/><text x="838" y="706" class="type-label">GRAPH ORCHESTRATOR</text><text x="838" y="732" class="node-label">Sequential fallback</text><text x="838" y="758" class="node-detail">Topological loop</text></g><g data-component-id="parameter-preparation"><title>Prepare parameters</title><rect x="1240" y="195" width="285" height="125" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="1240" y="195" width="285" height="7" rx="4" fill="#ffb86c"/><text x="1258" y="221" class="type-label">PIPELINE STAGE</text><text x="1258" y="247" class="node-label">Prepare parameters</text><text x="1258" y="273" class="node-detail" textLength="249.0" lengthAdjust="spacingAndGlyphs">DB defaults + request overrides</text><text x="1258" y="293" class="node-detail" textLength="249.0" lengthAdjust="spacingAndGlyphs">Pydantic Params + credentials</text></g><g data-component-id="template-resolution"><title>Resolve templates</title><rect x="1560" y="195" width="275" height="125" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="1560" y="195" width="275" height="7" rx="4" fill="#ffb86c"/><text x="1578" y="221" class="type-label">PIPELINE STAGE</text><text x="1578" y="247" class="node-label">Resolve templates</text><text x="1578" y="273" class="node-detail">Graph and upstream outputs</text></g><g data-component-id="plugin-dispatch"><title>Dispatch plugin operation</title><rect x="1240" y="455" width="285" height="145" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="1240" y="455" width="285" height="7" rx="4" fill="#50fa7b"/><text x="1258" y="481" class="type-label">PIPELINE STAGE</text><text x="1258" y="507" class="node-label">Dispatch plugin</text><text x="1258" y="529" class="node-label">operation</text><text x="1258" y="555" class="node-detail">Node registry handler</text></g><g data-component-id="validated-result"><title>Validated execution result</title><rect x="1560" y="455" width="275" height="145" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="1560" y="455" width="275" height="7" rx="4" fill="#50fa7b"/><text x="1578" y="481" class="type-label">PIPELINE STAGE</text><text x="1578" y="507" class="node-label">Validated execution</text><text x="1578" y="529" class="node-label">result</text><text x="1578" y="555" class="node-detail">Success or typed error</text></g><g data-component-id="output-store"><title>Output store</title><rect x="1240" y="745" width="285" height="125" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="1240" y="745" width="285" height="7" rx="4" fill="#ff79c6"/><text x="1258" y="771" class="type-label">PERSISTENCE</text><text x="1258" y="797" class="node-label">Output store</text><text x="1258" y="823" class="node-detail">output_main / top / 0</text></g><g data-component-id="status-broadcast"><title>Status broadcasts</title><rect x="1560" y="745" width="275" height="125" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="1560" y="745" width="275" height="7" rx="4" fill="#50fa7b"/><text x="1578" y="771" class="type-label">OBSERVABLE RESULT</text><text x="1578" y="797" class="node-label">Status broadcasts</text><text x="1578" y="823" class="node-detail" textLength="239.0" lengthAdjust="spacingAndGlyphs">Per-workflow WebSocket stream</text></g><g data-callout-id="routing-invariant"><rect x="455" y="830" width="650" height="110" rx="10" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2" stroke-dasharray="7 6"/><text x="471" y="860" class="callout-title">Routing invariant</text><text x="471" y="886" class="callout-text">Temporal requested but not wired is logged at INFO, then falls through.</text><text x="471" y="908" class="callout-text">The next eligible path is Redis-parallel or sequential.</text><text x="471" y="930" class="callout-text">Every branch invokes WorkflowService.execute_node → NodeExecutor.</text></g>+<g aria-label="Legend"><circle cx="72" cy="1038" r="7" fill="#bd93f9"/><text x="86" y="1044" class="legend">Agents / system</text><circle cx="317" cy="1038" r="7" fill="#8be9fd"/><text x="331" y="1044" class="legend">Models / interfaces</text><circle cx="562" cy="1038" r="7" fill="#50fa7b"/><text x="576" y="1044" class="legend">Tools / results</text><circle cx="807" cy="1038" r="7" fill="#ff79c6"/><text x="821" y="1044" class="legend">Triggers / events</text><circle cx="1052" cy="1038" r="7" fill="#ffb86c"/><text x="1066" y="1044" class="legend">Workflow / runtime</text><circle cx="1297" cy="1038" r="7" fill="#f1fa8c"/><text x="1311" y="1044" class="legend">Security note</text></g>+</svg>diff --git a/docs/diagrams/workspace-anatomy.svg b/docs/diagrams/workspace-anatomy.svgnew file mode 100644index 00000000..7b1b0d2e--- /dev/null+++ b/docs/diagrams/workspace-anatomy.svg@@ -0,0 +1,25 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080" width="100%" role="img" aria-labelledby="title desc">+<title id="title">Workspace Anatomy</title>+<desc id="desc">A source-backed anatomy of per-workflow workspaces: the database-backed id-to-slug resolver selects a DATA_DIR-rooted directory, contained consumers read and write artifacts through traversal-safe helpers, and CLI agents receive the workspace for worktrees and per-workflow skill discovery. Sources: server/core/paths.py; server/services/workspace_locator.py; server/services/workflow.py; server/services/workflow_storage/handlers.py; server/routers/workspace.py; server/nodes/filesystem/_backend.py; server/services/media/workspace.py; server/nodes/agent/claude_code_agent/_skills.py; server/services/cli_agent/session.py</desc>+<defs>+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto"><path d="M0,0 L10,5 L0,10 z" fill="#e8eaed"/></marker>+ <style>+ .title { fill:#e8eaed; font:700 30px Geist,system-ui,sans-serif; }+ .subtitle { fill:#9aa1ac; font:400 18px Geist,system-ui,sans-serif; }+ .group-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:1.2px; }+ .type-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:.8px; }+ .node-label { fill:#e8eaed; font:650 20px Geist,system-ui,sans-serif; }+ .node-detail { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .edge-label { fill:#e8eaed; font:500 16px Geist,system-ui,sans-serif; }+ .edge-protocol { fill:#9aa1ac; font:500 16px 'JetBrains Mono',ui-monospace,monospace; }+ .callout-title { fill:#e8eaed; font:650 18px Geist,system-ui,sans-serif; }+ .callout-text { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .legend { fill:#9aa1ac; font:500 16px Geist,system-ui,sans-serif; }+ </style>+</defs>+<rect width="1920" height="1080" fill="#0d0f13"/>+<text x="72" y="58" class="title">Workspace Anatomy</text>+<text x="72" y="91" class="subtitle">Immutable workflow IDs resolve to mutable slug directories that isolate files, generated media, CLI worktrees, and materialized skills</text>+<g data-group-id="workspace-resolution"><rect x="50" y="125" width="500" height="830" rx="18" fill="#15171c" stroke="#ffb86c" stroke-width="2"/><text x="70" y="157" class="group-label">IDENTITY & ROOT RESOLUTION</text></g><g data-group-id="workspace-boundary"><rect x="590" y="125" width="710" height="830" rx="18" fill="#15171c" stroke="#ff79c6" stroke-width="2"/><text x="610" y="157" class="group-label">PER-WORKFLOW WORKSPACE</text></g><g data-group-id="workspace-consumers"><rect x="1340" y="125" width="530" height="830" rx="18" fill="#15171c" stroke="#50fa7b" stroke-width="2"/><text x="1360" y="157" class="group-label">CONTAINED CONSUMERS</text></g><g data-relationship-id="r-workflow-locator"><title>lookup by immutable workflow id</title><path d="M 300.0 340 L 300.0 430" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="170.2" y="370.0" width="259.6" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="300" y="388" class="edge-label" text-anchor="middle" textLength="241.6" lengthAdjust="spacingAndGlyphs">lookup by immutable workflow id</text></g><g data-relationship-id="r-locator-base"><title>selects mutable slug below root</title><path d="M 300.0 600 L 300.0 720" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="170.2" y="650.0" width="259.6" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="300" y="668" class="edge-label" text-anchor="middle" textLength="241.6" lengthAdjust="spacingAndGlyphs">selects mutable slug below root</text></g><g data-relationship-id="r-base-workspace"><title>contains one slug directory</title><path d="M 300.0 720 L 300 680 L 945 680 L 945.0 350" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="560.4" y="665.0" width="229.2" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="675" y="683" class="edge-label" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">contains one slug directory</text></g><g data-relationship-id="r-workspace-files"><title>contains runtime artifacts</title><path d="M 945.0 350 L 945 410 L 780 410 L 780.0 470" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="669.2" y="395.0" width="221.6" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="780" y="413" class="edge-label" text-anchor="middle" textLength="203.6" lengthAdjust="spacingAndGlyphs">contains runtime artifacts</text></g><g data-relationship-id="r-workspace-skills"><title>contains isolated skill tree</title><path d="M 945.0 350 L 945 410 L 1110 410 L 1110.0 470" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="991.6" y="395.0" width="236.79999999999998" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1110" y="413" class="edge-label" text-anchor="middle" textLength="218.8" lengthAdjust="spacingAndGlyphs">contains isolated skill tree</text></g><g data-relationship-id="r-workspace-worktrees"><title>contains per-node task worktrees</title><path d="M 945.0 350 L 945 690 L 960.0 730" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="811.4" y="675.0" width="267.2" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="945" y="693" class="edge-label" text-anchor="middle" textLength="249.2" lengthAdjust="spacingAndGlyphs">contains per-node task worktrees</text></g><g data-relationship-id="r-routes-resolve"><title>resolves workflow id before file access · via workspace locator</title><path d="M 1600.0 340 L 1600 400 L 945 400 L 945.0 350" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1320.0 400.0 L 1410 400" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1249.8" y="376.0" width="320.4" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1410" y="397" class="edge-label" text-anchor="middle" textLength="302.4" lengthAdjust="spacingAndGlyphs">resolves workflow id before file access</text><text x="1410" y="417" class="edge-protocol" text-anchor="middle">via workspace locator</text></g><g data-relationship-id="r-filesystem-files"><title>reads and writes contained paths</title><path d="M 1380 545.0 L 920 555.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1150.0 545.0 L 1240 707" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1106.4" y="692.0" width="267.2" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1240" y="710" class="edge-label" text-anchor="middle" textLength="249.2" lengthAdjust="spacingAndGlyphs">reads and writes contained paths</text></g><g data-relationship-id="r-skills-cli"><title>auto-discovers enabled skills · via --add-dir</title><path d="M 1110.0 640 L 1110 680 L 1320 680 L 1320 805 L 1380 805.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1215.0 680.0 L 1215 950" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1092.8" y="926.0" width="244.39999999999998" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1215" y="947" class="edge-label" text-anchor="middle" textLength="226.4" lengthAdjust="spacingAndGlyphs">auto-discovers enabled skills</text><text x="1215" y="967" class="edge-protocol" text-anchor="middle">via --add-dir</text></g><g data-relationship-id="r-workspace-cli"><title>passes workspace_dir</title><path d="M 945.0 350 L 1270 350 L 1270 690 L 1600 690 L 1600.0 730" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1450.0 690.0 L 1540 690" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1452.0" y="675.0" width="176.0" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1540" y="693" class="edge-label" text-anchor="middle" textLength="158.0" lengthAdjust="spacingAndGlyphs">passes workspace_dir</text></g><g data-component-id="workflow-record"><title>Workflow record</title><rect x="90" y="190" width="420" height="150" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="90" y="190" width="420" height="7" rx="4" fill="#ff79c6"/><text x="108" y="216" class="type-label">DATABASE IDENTITY</text><text x="108" y="242" class="node-label">Workflow record</text><text x="108" y="268" class="node-detail">Immutable id · mutable slug</text><text x="108" y="288" class="node-detail">Stable references carry the id</text></g><g data-component-id="workspace-locator"><title>Workspace locator</title><rect x="90" y="430" width="420" height="170" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="90" y="430" width="420" height="7" rx="4" fill="#ffb86c"/><text x="108" y="456" class="type-label">PATH RESOLVER</text><text x="108" y="482" class="node-label">Workspace locator</text><text x="108" y="508" class="node-detail">Looks up id → slug in workflow.db</text><text x="108" y="528" class="node-detail">Read-only misses may use default</text><text x="108" y="548" class="node-detail">Mutations fail if id cannot resolve</text></g><g data-component-id="workspace-base"><title>DATA_DIR / workspaces</title><rect x="90" y="720" width="420" height="150" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="90" y="720" width="420" height="7" rx="4" fill="#ff79c6"/><text x="108" y="746" class="type-label">FILESYSTEM ROOT</text><text x="108" y="772" class="node-label">DATA_DIR /</text><text x="108" y="794" class="node-label">workspaces</text><text x="108" y="820" class="node-detail">~/.opencompany/workspaces by default</text><text x="108" y="840" class="node-detail">WORKSPACE_BASE_DIR remains configurable</text></g><g data-component-id="workflow-workspace"><title>workspaces/<workflow.slug>/</title><rect x="640" y="190" width="610" height="160" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="640" y="190" width="610" height="7" rx="4" fill="#ff79c6"/><text x="658" y="216" class="type-label">WORKSPACE ROOT</text><text x="658" y="242" class="node-label">workspaces/<workflow.slug>/</text><text x="658" y="268" class="node-detail">Created for one workflow</text><text x="658" y="288" class="node-detail">Directory moves when the slug changes</text></g><g data-component-id="workspace-files"><title>Workspace files</title><rect x="640" y="470" width="280" height="170" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="640" y="470" width="280" height="7" rx="4" fill="#ff79c6"/><text x="658" y="496" class="type-label">RUNTIME ARTIFACTS</text><text x="658" y="522" class="node-label">Workspace files</text><text x="658" y="548" class="node-detail">Uploads · generated media</text><text x="658" y="568" class="node-detail" textLength="244.0" lengthAdjust="spacingAndGlyphs">Documents · code · nested files</text></g><g data-component-id="workspace-skills"><title>.claude/skills/<name>/</title><rect x="970" y="470" width="280" height="170" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="970" y="470" width="280" height="7" rx="4" fill="#50fa7b"/><text x="988" y="496" class="type-label">MATERIALIZED SKILLS</text><text x="988" y="522" class="node-label">.claude/skills/</text><text x="988" y="544" class="node-label"><name>/</text><text x="988" y="570" class="node-detail">SKILL.md</text><text x="988" y="590" class="node-detail" textLength="244.0" lengthAdjust="spacingAndGlyphs">scripts/ + references/ preserved</text></g><g data-component-id="cli-worktrees"><title><node_id>/wt_<task_id>/</title><rect x="810" y="730" width="300" height="150" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="810" y="730" width="300" height="7" rx="4" fill="#ffb86c"/><text x="828" y="756" class="type-label">CLI WORKTREE</text><text x="828" y="782" class="node-label"><node_id>/</text><text x="828" y="804" class="node-label">wt_<task_id>/</text><text x="828" y="830" class="node-detail">task or session worktree</text><text x="828" y="850" class="node-detail" textLength="264.0" lengthAdjust="spacingAndGlyphs">Lives under the workflow workspace</text></g><g data-component-id="workspace-routes"><title>Workspace HTTP routes</title><rect x="1380" y="190" width="440" height="150" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="1380" y="190" width="440" height="7" rx="4" fill="#8be9fd"/><text x="1398" y="216" class="type-label">INTERFACE</text><text x="1398" y="242" class="node-label">Workspace HTTP</text><text x="1398" y="264" class="node-label">routes</text><text x="1398" y="290" class="node-detail">Serve file by workflow id + path</text><text x="1398" y="310" class="node-detail">Accept bounded uploads</text></g><g data-component-id="filesystem-media"><title>Filesystem & media nodes</title><rect x="1380" y="460" width="440" height="170" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="1380" y="460" width="440" height="7" rx="4" fill="#50fa7b"/><text x="1398" y="486" class="type-label">CONTAINED I/O</text><text x="1398" y="512" class="node-label">Filesystem &</text><text x="1398" y="534" class="node-label">media nodes</text><text x="1398" y="560" class="node-detail">resolve_within containment</text><text x="1398" y="580" class="node-detail">Traversal + symlink/junction defense</text><text x="1398" y="600" class="node-detail">Atomic workspace writes</text></g><g data-component-id="cli-agent-session"><title>CLI agent session</title><rect x="1380" y="730" width="440" height="150" rx="12" fill="#1b1e25" stroke="#bd93f9" stroke-width="2"/><rect x="1380" y="730" width="440" height="7" rx="4" fill="#bd93f9"/><text x="1398" y="756" class="type-label">AGENT CONSUMER</text><text x="1398" y="782" class="node-label">CLI agent session</text><text x="1398" y="808" class="node-detail">Receives workspace_dir / --add-dir</text><text x="1398" y="828" class="node-detail">Discovers skills and owns worktrees</text></g>+<g aria-label="Legend"><circle cx="72" cy="1038" r="7" fill="#bd93f9"/><text x="86" y="1044" class="legend">Agents / system</text><circle cx="317" cy="1038" r="7" fill="#8be9fd"/><text x="331" y="1044" class="legend">Models / interfaces</text><circle cx="562" cy="1038" r="7" fill="#50fa7b"/><text x="576" y="1044" class="legend">Tools / results</text><circle cx="807" cy="1038" r="7" fill="#ff79c6"/><text x="821" y="1044" class="legend">Triggers / events</text><circle cx="1052" cy="1038" r="7" fill="#ffb86c"/><text x="1066" y="1044" class="legend">Workflow / runtime</text><circle cx="1297" cy="1038" r="7" fill="#f1fa8c"/><text x="1311" y="1044" class="legend">Security note</text></g>+</svg>diff --git a/docs/diagrams/workspace-files.svg b/docs/diagrams/workspace-files.svgnew file mode 100644index 00000000..3015d908--- /dev/null+++ b/docs/diagrams/workspace-files.svg@@ -0,0 +1,25 @@+<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1920 1080" width="100%" role="img" aria-labelledby="title desc">+<title id="title">Workspace Files</title>+<desc id="desc">Source-backed anatomy of the Gallery node’s Workspace Files panel, separating WebSocket listing/search from HTTP content and upload routes while showing how controlled path and selection parameters drive the Gallery node’s FileRef output. Sources: client/src/components/parameterPanel/GalleryPanel.tsx; client/src/components/parameterPanel/gallery/WorkspaceBrowser.tsx; server/nodes/filesystem/gallery/_handlers.py; server/nodes/filesystem/gallery/_service.py; server/nodes/filesystem/gallery/__init__.py; server/nodes/filesystem/_backend.py; server/routers/workspace.py; docs-internal/node-logic-flows/code_fs_process/gallery.md</desc>+<defs>+ <marker id="arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="8" markerHeight="8" orient="auto"><path d="M0,0 L10,5 L0,10 z" fill="#e8eaed"/></marker>+ <style>+ .title { fill:#e8eaed; font:700 30px Geist,system-ui,sans-serif; }+ .subtitle { fill:#9aa1ac; font:400 18px Geist,system-ui,sans-serif; }+ .group-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:1.2px; }+ .type-label { fill:#9aa1ac; font:600 16px 'JetBrains Mono',ui-monospace,monospace; letter-spacing:.8px; }+ .node-label { fill:#e8eaed; font:650 20px Geist,system-ui,sans-serif; }+ .node-detail { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .edge-label { fill:#e8eaed; font:500 16px Geist,system-ui,sans-serif; }+ .edge-protocol { fill:#9aa1ac; font:500 16px 'JetBrains Mono',ui-monospace,monospace; }+ .callout-title { fill:#e8eaed; font:650 18px Geist,system-ui,sans-serif; }+ .callout-text { fill:#9aa1ac; font:400 16px Geist,system-ui,sans-serif; }+ .legend { fill:#9aa1ac; font:500 16px Geist,system-ui,sans-serif; }+ </style>+</defs>+<rect width="1920" height="1080" fill="#0d0f13"/>+<text x="72" y="58" class="title">Workspace Files</text>+<text x="72" y="91" class="subtitle">Browse, search, upload, preview, pin, and emit files from the workflow’s contained workspace.</text>+<g data-group-id="workspace-panel"><rect x="70" y="130" width="900" height="700" rx="18" fill="#15171c" stroke="#8be9fd" stroke-width="2"/><text x="90" y="162" class="group-label">GALLERY NODE · WORKSPACE FILES PANEL</text></g><g data-group-id="workspace-transport"><rect x="1010" y="130" width="840" height="420" rx="18" fill="#15171c" stroke="#bd93f9" stroke-width="2"/><text x="1030" y="162" class="group-label">WORKSPACE TRANSPORT + STORAGE</text></g><g data-group-id="gallery-execution"><rect x="1010" y="590" width="840" height="240" rx="18" fill="#15171c" stroke="#ffb86c" stroke-width="2"/><text x="1030" y="622" class="group-label">WORKFLOW EXECUTION PATH</text></g><g data-relationship-id="header-opens-upload"><title>Upload action</title><path d="M 520.0 300 L 790 325 L 790.0 350" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="728.6" y="310.0" width="122.8" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="790" y="328" class="edge-label" text-anchor="middle" textLength="104.8" lengthAdjust="spacingAndGlyphs">Upload action</text></g><g data-relationship-id="browser-activates-file"><title>activate, pin, or drag file</title><path d="M 610 525.0 L 650 525.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 630.0 505.0 L 1080 559" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="965.4" y="544.0" width="229.2" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1080" y="562" class="edge-label" text-anchor="middle" textLength="211.2" lengthAdjust="spacingAndGlyphs">activate, pin, or drag file</text></g><g data-relationship-id="browser-requests-listing"><title>browse path or send debounced search · via WebSocket</title><path d="M 360.0 350 L 360 325 L 990 325 L 990 265 L 1050 265.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 780.0 315.0 L 780 153" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="631.2" y="129.0" width="297.59999999999997" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="780" y="150" class="edge-label" text-anchor="middle" textLength="279.6" lengthAdjust="spacingAndGlyphs">browse path or send debounced search</text><text x="780" y="170" class="edge-protocol" text-anchor="middle">via WebSocket</text></g><g data-relationship-id="handler-selects-listing-mode"><title>directory list or recursive search</title><path d="M 1220.0 330 L 1220.0 390" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1078.8" y="345.0" width="282.4" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1220" y="363" class="edge-label" text-anchor="middle" textLength="264.4" lengthAdjust="spacingAndGlyphs">directory list or recursive search</text></g><g data-relationship-id="listing-reads-workspace"><title>contained ls_info / glob_info · via async filesystem</title><path d="M 1390 455.0 L 1450 455.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1420.0 450.0 L 1420 558" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1297.8" y="534.0" width="244.39999999999998" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1420" y="555" class="edge-label" text-anchor="middle" textLength="226.4" lengthAdjust="spacingAndGlyphs">contained ls_info / glob_info</text><text x="1420" y="575" class="edge-protocol" text-anchor="middle">via async filesystem</text></g><g data-relationship-id="actions-use-http"><title>upload, preview, or download · via HTTP</title><path d="M 930 525.0 L 990 525 L 990 265 L 1450 265.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 990.0 385.0 L 1440 148.0" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1321.6" y="124.0" width="236.79999999999998" height="48" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1440" y="145.0" class="edge-label" text-anchor="middle" textLength="218.8" lengthAdjust="spacingAndGlyphs">upload, preview, or download</text><text x="1440" y="165.0" class="edge-protocol" text-anchor="middle">via HTTP</text></g><g data-relationship-id="http-reads-writes-workspace"><title>write upload or stream content</title><path d="M 1630.0 330 L 1630.0 390" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="1504.0" y="345.0" width="252.0" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1630" y="363" class="edge-label" text-anchor="middle" textLength="234.0" lengthAdjust="spacingAndGlyphs">write upload or stream content</text></g><g data-relationship-id="browser-controls-path"><title>navigation writes path</title><path d="M 360.0 700 L 360 720 L 280 720 L 280 775 L 300 775.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 355.0 715.0 L 175 769" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="79.4" y="754.0" width="191.2" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="175" y="772" class="edge-label" text-anchor="middle" textLength="173.2" lengthAdjust="spacingAndGlyphs">navigation writes path</text></g><g data-relationship-id="actions-control-selection"><title>pinning writes selection</title><path d="M 790.0 700 L 790 720 L 760 720 L 760 775 L 740 775.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 760.0 715.0 L 940 823" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="836.8" y="808.0" width="206.39999999999998" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="940" y="826" class="edge-label" text-anchor="middle" textLength="188.4" lengthAdjust="spacingAndGlyphs">pinning writes selection</text></g><g data-relationship-id="params-drive-gallery-run"><title>run with path / selection</title><path d="M 740 775.0 L 980 775 L 980 710 L 1050 710.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><rect x="768.0" y="750.0" width="214.0" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="875" y="768" class="edge-label" text-anchor="middle" textLength="196.0" lengthAdjust="spacingAndGlyphs">run with path / selection</text></g><g data-relationship-id="gallery-reuses-listing-service"><title>reuse listing and FileRef conversion</title><path d="M 1220.0 650 L 1220.0 520" fill="none" stroke="#e8eaed" stroke-width="2" stroke-dasharray="10 8" marker-end="url(#arrow)"/><path d="M 1220.0 585.0 L 1220 801" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1071.2" y="786.0" width="297.59999999999997" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1220" y="804" class="edge-label" text-anchor="middle" textLength="279.6" lengthAdjust="spacingAndGlyphs">reuse listing and FileRef conversion</text></g><g data-relationship-id="gallery-emits-output"><title>emit selected or listed files</title><path d="M 1390 710.0 L 1450 710.0" fill="none" stroke="#e8eaed" stroke-width="2" marker-end="url(#arrow)"/><path d="M 1420.0 710.0 L 1420 602" fill="none" stroke="#9aa1ac" stroke-width="1" stroke-dasharray="3 4" opacity=".7"/><rect x="1297.8" y="587.0" width="244.39999999999998" height="30" rx="7" fill="#15171c" stroke="#2b2f37"/><text x="1420" y="605" class="edge-label" text-anchor="middle" textLength="226.4" lengthAdjust="spacingAndGlyphs">emit selected or listed files</text></g><g data-component-id="workspace-panel-header"><title>Workspace Files header</title><rect x="110" y="200" width="820" height="100" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="110" y="200" width="820" height="7" rx="4" fill="#8be9fd"/><text x="128" y="226" class="type-label">INTERFACE</text><text x="128" y="252" class="node-label">Workspace Files header</text><text x="128" y="278" class="node-detail">workflow-produced files · Upload action</text></g><g data-component-id="workspace-browser"><title>WorkspaceBrowser</title><rect x="110" y="350" width="500" height="350" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="110" y="350" width="500" height="7" rx="4" fill="#8be9fd"/><text x="128" y="376" class="type-label">INTERFACE</text><text x="128" y="402" class="node-label">WorkspaceBrowser</text><text x="128" y="428" class="node-detail">breadcrumbs + directory navigation</text><text x="128" y="448" class="node-detail">250 ms search · whole workspace</text><text x="128" y="468" class="node-detail">grid / list · refresh · 5 s poll</text><text x="128" y="488" class="node-detail">empty, missing, truncated states</text></g><g data-component-id="workspace-file-actions"><title>File actions</title><rect x="650" y="350" width="280" height="350" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="650" y="350" width="280" height="7" rx="4" fill="#50fa7b"/><text x="668" y="376" class="type-label">INTERFACE</text><text x="668" y="402" class="node-label">File actions</text><text x="668" y="428" class="node-detail">upload one or many</text><text x="668" y="448" class="node-detail">preview / download</text><text x="668" y="468" class="node-detail">pin for node output</text><text x="668" y="488" class="node-detail">FileRef drag payload</text></g><g data-component-id="gallery-node-parameters"><title>Node params: path + selection</title><rect x="300" y="740" width="440" height="70" rx="12" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2"/><rect x="300" y="740" width="440" height="7" rx="4" fill="#f1fa8c"/><text x="318" y="766" class="type-label">NODE PARAMS</text><text x="318" y="792" class="node-label">Node params · path + selection</text></g><g data-component-id="list-workspace-files-handler"><title>list_workspace_files</title><rect x="1050" y="200" width="340" height="130" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="1050" y="200" width="340" height="7" rx="4" fill="#ff79c6"/><text x="1068" y="226" class="type-label">WEBSOCKET</text><text x="1068" y="252" class="node-label">list_workspace_files</text><text x="1068" y="278" class="node-detail">path or workspace-wide search</text><text x="1068" y="298" class="node-detail">limit 500 from panel</text></g><g data-component-id="workspace-http-routes"><title>Workspace HTTP routes</title><rect x="1450" y="200" width="360" height="130" rx="12" fill="#1b1e25" stroke="#8be9fd" stroke-width="2"/><rect x="1450" y="200" width="360" height="7" rx="4" fill="#8be9fd"/><text x="1468" y="226" class="type-label">HTTP</text><text x="1468" y="252" class="node-label">Workspace HTTP routes</text><text x="1468" y="278" class="node-detail">POST uploads</text><text x="1468" y="298" class="node-detail">GET content · Range</text></g><g data-component-id="workspace-listing-service"><title>Workspace listing service</title><rect x="1050" y="390" width="340" height="130" rx="12" fill="#1b1e25" stroke="#bd93f9" stroke-width="2"/><rect x="1050" y="390" width="340" height="7" rx="4" fill="#bd93f9"/><text x="1068" y="416" class="type-label">SERVICE</text><text x="1068" y="442" class="node-label">Workspace listing</text><text x="1068" y="464" class="node-label">service</text><text x="1068" y="490" class="node-detail">directory or recursive glob</text><text x="1068" y="510" class="node-detail">sort, cap, crumbs, preview</text></g><g data-component-id="contained-workspace-root"><title>Contained workflow workspace</title><rect x="1450" y="390" width="360" height="130" rx="12" fill="#1b1e25" stroke="#ff79c6" stroke-width="2"/><rect x="1450" y="390" width="360" height="7" rx="4" fill="#ff79c6"/><text x="1468" y="416" class="type-label">FILESYSTEM</text><text x="1468" y="442" class="node-label">Contained workflow</text><text x="1468" y="464" class="node-label">workspace</text><text x="1468" y="490" class="node-detail">WorkspaceBackend</text><text x="1468" y="510" class="node-detail">workspace-relative paths</text></g><g data-component-id="gallery-node-runtime"><title>Gallery node execution</title><rect x="1050" y="650" width="340" height="120" rx="12" fill="#1b1e25" stroke="#ffb86c" stroke-width="2"/><rect x="1050" y="650" width="340" height="7" rx="4" fill="#ffb86c"/><text x="1068" y="676" class="type-label">RUNTIME</text><text x="1068" y="702" class="node-label">Gallery node</text><text x="1068" y="724" class="node-label">execution</text><text x="1068" y="750" class="node-detail">selection > pattern > directory</text></g><g data-component-id="gallery-file-ref-output"><title>Downstream FileRef output</title><rect x="1450" y="650" width="360" height="120" rx="12" fill="#1b1e25" stroke="#50fa7b" stroke-width="2"/><rect x="1450" y="650" width="360" height="7" rx="4" fill="#50fa7b"/><text x="1468" y="676" class="type-label">RESULT</text><text x="1468" y="702" class="node-label">Downstream FileRef</text><text x="1468" y="724" class="node-label">output</text><text x="1468" y="750" class="node-detail">files · directories · missing[]</text></g><g data-callout-id="workspace-channel-contract"><rect x="70" y="880" width="1780" height="90" rx="10" fill="#1b1e25" stroke="#f1fa8c" stroke-width="2" stroke-dasharray="7 6"/><text x="86" y="910" class="callout-title">Two channels, one contained workspace</text><text x="86" y="936" class="callout-text">WebSocket owns listing and search; HTTP owns upload and file bytes for preview, download, and Range requests.</text><text x="86" y="958" class="callout-text">Rows arrive with a server-built FileRef and preview verdict, so the client does not duplicate path or security decisions.</text></g>+<g aria-label="Legend"><circle cx="72" cy="1038" r="7" fill="#bd93f9"/><text x="86" y="1044" class="legend">Agents / system</text><circle cx="317" cy="1038" r="7" fill="#8be9fd"/><text x="331" y="1044" class="legend">Models / interfaces</text><circle cx="562" cy="1038" r="7" fill="#50fa7b"/><text x="576" y="1044" class="legend">Tools / results</text><circle cx="807" cy="1038" r="7" fill="#ff79c6"/><text x="821" y="1044" class="legend">Triggers / events</text><circle cx="1052" cy="1038" r="7" fill="#ffb86c"/><text x="1066" y="1044" class="legend">Workflow / runtime</text><circle cx="1297" cy="1038" r="7" fill="#f1fa8c"/><text x="1311" y="1044" class="legend">Security note</text></g>+</svg>