Skip to content

Self-improving AI Employees for everyone

docs: second-pass drift audit across service, core, ops docs and node cards

trohitg23c6e72c0e11
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 324b88ff..5a1da52f 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -48,7 +48,7 @@ Deep dives: [agent_architecture.md](docs-internal/agent_architecture.md) - [nati
| `client/src/components/` | React Flow canvas, parameter panel, modals | [CLAUDE.md](CLAUDE.md) |
| `server/services/` | WorkflowService, NodeExecutor, AI service | [DESIGN.md](docs-internal/DESIGN.md) |
| `server/services/handlers/` | Cross-cutting orchestration only (`tools.py` AI-tool dispatch + delegation, `triggers.py`, `todo.py`) — per-node handlers live inside the plugins since Wave 11 | [node_creation.md](docs-internal/node_creation.md) |
-| `server/services/llm/` | Native LLM SDK layer (12 providers) | [native_llm_sdk.md](docs-internal/native_llm_sdk.md) |
+| `server/services/llm/` | Native LLM SDK layer (13 providers) | [native_llm_sdk.md](docs-internal/native_llm_sdk.md) |
| `server/services/execution/` | Decide pattern, DLQ, recovery, conditions | [DESIGN.md](docs-internal/DESIGN.md) |
| `server/services/temporal/` | Distributed execution via Temporal | [TEMPORAL_ARCHITECTURE.md](docs-internal/TEMPORAL_ARCHITECTURE.md) |
| `server/routers/websocket.py` | WebSocket endpoint + core `MESSAGE_HANDLERS` (plugins register more via `ws_handler_registry`) | [status_broadcaster.md](docs-internal/status_broadcaster.md) |
diff --git a/RFC-0002-AGENT-CONTEXT-AND-MEMORY.md b/RFC-0002-AGENT-CONTEXT-AND-MEMORY.md
index 222ebb44..58fde214 100644
--- a/RFC-0002-AGENT-CONTEXT-AND-MEMORY.md
+++ b/RFC-0002-AGENT-CONTEXT-AND-MEMORY.md
@@ -45,8 +45,10 @@ shared.
## 2. Decisions
-- Reuse `MessageWireV2`, including ordered blocks, raw malformed tool
- arguments, signed/thought blocks, and provider continuation state.
+- Reuse `MessageWire` (superseded name: `MessageWireV2` — the v1/v2 duality
+ was purged; there is one wire standard), including ordered blocks, raw
+ malformed tool arguments, signed/thought blocks, and provider continuation
+ state.
- Preserve existing Temporal histories. The Context store is selected only by
a new graph/generation and uses new workflow/activity type names.
- Keep Gemini on `generate_content`; an Interactions migration is out of
@@ -74,14 +76,8 @@ The `context` plugin is a passive, system-managed configuration node:
context.output-context -> agent.input-context
```
-Its parameters are policy only:
-
-```text
-compaction_mode: auto | native | portable | disabled
-trigger_ratio: float = 0.8
-context_window_override?: integer
-exact_tail_retention_count: integer
-```
+It declares no parameters; the connection is the whole configuration
+(`AgentContextParams` is empty).
Its NodeSpec advertises `isContextPanel` and `systemManaged`. The frontend
renders the panel and calls backend handlers; it does not create journals,
@@ -183,7 +179,7 @@ For every iteration it commits:
1. effective request snapshot, including resolved messages/system instruction,
provider/model/settings, compiled tool definitions, attachments, and
dynamic tool surface;
-2. complete assistant `MessageWireV2`, before any requested tool executes;
+2. complete assistant `MessageWire`, before any requested tool executes;
3. each tool result, validation error, execution error, or ambiguous outcome,
before another provider request;
4. final response and usage through the same journal.
@@ -258,8 +254,8 @@ transcripts, own provider identity, or compact Context.
(`AgentWorkflowV2`, `agent.*.v2`) so V1 and V2 histories could run side by side.
That split was never needed — history back-compatibility is not a requirement
here — and it has been folded away. There is one workflow class, `AgentWorkflow`,
-and one unsuffixed activity per concern: `agent.prepare_context`,
-`agent.execute_llm_step`, `agent.append_context`, `agent.compact_context`.
+and one unsuffixed activity per concern: `agent.prepare_payload`,
+`agent.execute_llm_step`, `agent.persist_turn`, `agent.compact_context`.
What still holds: the child workflow carries only `AgentContextRef`, operation
IDs/hashes and iteration state, so provider messages and large tool results stay
@@ -279,7 +275,7 @@ the agent answer an empty question.
The rule is now inverted and load-bearing: **the request is always built from
`messages`; the journal records what was sent.** `agent.execute_llm_step` writes
each turn from the exact list it hands to `ChatUnifier.chat`, after the call
-returns. `agent.prepare_context` journals nothing, because it runs before a
+returns. `agent.prepare_payload` journals nothing, because it runs before a
request exists and could only fabricate one. Journal operation ids derive from
the per-firing `context_execution_id`; deriving them from the generation-scoped
`execution_id` made every turn in a generation collide on idempotency and
@@ -331,11 +327,13 @@ Ordinary broadcasts contain metadata only:
```text
context.updated
-context.compacted
-context.epoch.started
-memory.changed
+memory.updated
```
+Superseded: `context.compacted` and `context.epoch.started` were never shipped
+(only `context.updated` survives), and `memory.changed` shipped as
+`memory.updated`.
+
`context.updated` is emitted from `AgentContextStore`'s commit boundary through
`services/agent_context/listeners.py`, so every writer is covered without
call-site code; `context.epoch.started` stays with `start_epoch`'s callers,
diff --git a/cli/README.md b/cli/README.md
index 36fe5136..31e2be64 100644
--- a/cli/README.md
+++ b/cli/README.md
@@ -7,11 +7,13 @@ with `bun run start`/`dev`/`stop`/etc.
## Install
-Done automatically in `scripts/postinstall.js` after `bun install`. To
-install manually:
+No install step is required for a source checkout: `bin/cli.js` and the root
+package.json scripts both invoke `python -m cli` from the repo root;
+`scripts/postinstall.js` deliberately does not pip-install it. To install the
+`company` entry point on PATH:
```sh
-python -m pip install -e .
+python -m pip install -e . # run from the repository root, not from cli/
```
## Use
diff --git a/cli/terraform/aws/README.md b/cli/terraform/aws/README.md
index 36dac4fc..433d1814 100644
--- a/cli/terraform/aws/README.md
+++ b/cli/terraform/aws/README.md
@@ -3,7 +3,8 @@
One login-gated EC2 instance running OpenCompany. File layout and workflow
follow the HashiCorp AWS get-started tutorial
(https://developer.hashicorp.com/terraform/tutorials/aws-get-started):
-`terraform.tf` (providers), `main.tf`, `variables.tf`, `outputs.tf`.
+`terraform.tf` (providers), `main.tf`, `variables.tf`, `outputs.tf`, plus
+`startup.sh.tftpl` (the cloud-init startup script template).
Settings are the ones validated on a live t3.micro in September 2026:
diff --git a/docs-internal/DESIGN.md b/docs-internal/DESIGN.md
index b03019a3..657f8747 100644
--- a/docs-internal/DESIGN.md
+++ b/docs-internal/DESIGN.md
@@ -5,7 +5,7 @@
The OpenCompany execution engine implements a robust workflow orchestration system combining industry-standard patterns from **Netflix Conductor**, **Prefect 3.0**, **Temporal**, and **Redis Streams**. This document details the architectural decisions, design patterns, and standards used.
Related docs:
-- [temporal-execution-engine-rfc.md](temporal-execution-engine-rfc.md) - canonical current Temporal control, trigger, graph, agent-team, and trace architecture
+- [temporal-execution-engine-rfc.md](ARCHIVE/temporal-execution-engine-rfc.md) - Temporal control, trigger, graph, agent-team, and trace architecture
- [TEMPORAL_ARCHITECTURE.md](TEMPORAL_ARCHITECTURE.md) - distributed execution via Temporal activities
- [event_waiter_system.md](event_waiter_system.md) - push-based trigger waiters
- [native_llm_sdk.md](native_llm_sdk.md) - LLM provider layer
@@ -14,14 +14,14 @@ Related docs:
- [workflow-schema.md](workflow-schema.md) - workflow JSON schema and node catalog
- [frontend_architecture.md](frontend_architecture.md) - current frontend architecture (React 19 + Vite + Tailwind v4 + shadcn/ui + Radix + RHF/zod + TanStack Query + Zustand). Tokens, primitives, state, forms, credentials exemplar.
- [plugin_system.md](plugin_system.md) - Wave 11 class-based plugin architecture (target state for the config-driven research that lived in deleted planning docs)
-- [schema_source_of_truth_rfc.md](schema_source_of_truth_rfc.md) - backend NodeSpec / icon / palette wire format
-- [ui_migration_plan.md](ui_migration_plan.md) - antd → shadcn/ui migration plan and completion log
+- [schema_source_of_truth_rfc.md](ARCHIVE/schema_source_of_truth_rfc.md) - backend NodeSpec / icon / palette wire format
+- [ui_migration_plan.md](ARCHIVE/ui_migration_plan.md) - antd → shadcn/ui migration plan and completion log
---
## Execution Modes
-`WorkflowService` in `server/services/workflow.py` is a thin facade (~840 lines) that routes every workflow run based on available infrastructure. In every shipped configuration the effective routing is Temporal -> sequential:
+`WorkflowService` in `server/services/workflow.py` is a thin facade (~855 lines) that routes every workflow run based on available infrastructure. In every shipped configuration the effective routing is Temporal -> sequential:
```
workflow.execute(workflow_id, workflow_data)
diff --git a/docs-internal/SCRIPTS.md b/docs-internal/SCRIPTS.md
index 0d559f31..b8b8b809 100644
--- a/docs-internal/SCRIPTS.md
+++ b/docs-internal/SCRIPTS.md
@@ -30,7 +30,7 @@ deprecation warning; kept for upgrade compatibility).
| `company clean` | Stop services, then remove build artifacts, node_modules, `.venv`, repo-local state (preserves `.opencompany/{workflows,deploy,packages}`) |
| `company deploy up/status/destroy` | Self-deploy a login-gated VM (gcloud preflight + Terraform; see `cli/commands/deploy/`) |
| `company daemon start/stop/status/restart` | Detached backend management (PID file under user data dir) |
-| `company version sync` | Propagate the root package.json version |
+| `company version sync [tag]` | Write the latest git tag's version into the package.json files (defaults to the latest tag) |
| `company docs nodes [--check]` | Regenerate (or verify) the `docs-internal/node-logic-flows/` index |
There is no `help` verb: `company` with no arguments, `company --help`, and
@@ -38,8 +38,9 @@ There is no `help` verb: `company` with no arguments, `company --help`, and
### Dependency checks
-`start` and `build` verify Node.js 22+, Python 3.12+, and uv before
-running.
+`build` checks that Node.js and npm/bun are present (no version floor), verifies
+Python 3.12+ (`_check_python`), and installs `uv` via pip if missing. `start` runs
+no toolchain check, only the `_sqlalchemy_preflight` venv-health probe.
---
diff --git a/docs-internal/SETUP.md b/docs-internal/SETUP.md
index 9b64691a..c28637fb 100644
--- a/docs-internal/SETUP.md
+++ b/docs-internal/SETUP.md
@@ -46,7 +46,7 @@ Notes for Linux servers:
### Local Development (from source)
-**Prerequisites:** Node.js 18+ (22 recommended; CI builds on 22), Python 3.12+, uv, bun 1.4+ (https://bun.sh)
+**Prerequisites:** Node.js 18+ (22 recommended; CI builds on 22), Python 3.12 (CLI needs >=3.12, server venv pins >=3.11,<3.13), uv, bun 1.4+ (https://bun.sh)
```bash
git clone https://github.com/zeenie-ai/OpenCompany.git OpenCompany
diff --git a/docs-internal/TEMPORAL_ARCHITECTURE.md b/docs-internal/TEMPORAL_ARCHITECTURE.md
index 72670237..014bb739 100644
--- a/docs-internal/TEMPORAL_ARCHITECTURE.md
+++ b/docs-internal/TEMPORAL_ARCHITECTURE.md
@@ -350,13 +350,12 @@ AgentWorkflow.run(context):
_build_tool_from_node produces AgentToolSpec values. Tool entries
carry the serialized ToolDef declaration plus routing tool_info;
native LLM steps consume the definition directly.
- Records llm_engine="native" + message_wire_version=2.
emit_phase("starting", status="executing")
loop until "final" or max_iterations:
1. emit_phase("llm_step", iteration=N)
2. execute_activity("agent.execute_llm_step")
returns {kind, assistant_message, calls?, content?, usage}.
- assistant_message is MessageWireV2: ordered text/reasoning/tool
+ assistant_message is a MessageWire dict: ordered text/reasoning/tool
blocks plus JSON-safe provider continuation state (Gemini thought
signatures, Anthropic signed/redacted thinking, OpenAI response
metadata). It is appended verbatim to messages.
@@ -413,17 +412,15 @@ AgentWorkflow.run(context):
emit_phase("completed", status="success")
```
-The `agent.prepare_payload` result is recorded in history and therefore
-acts as the deterministic engine selector. New executions default to
-`llm_engine="native"` with Message Wire V2 and use `ChatUnifier` plus the
-native provider SDKs for every turn. Histories whose recorded prepare result
-has no engine marker are pre-cutover histories: their messages are in a retired
-wire format the native reader cannot interpret, so `agent.execute_llm_step`
-refuses them with a non-retryable
-`ApplicationError(type="InvalidAgentLLMEngine")` rather than misreading them.
-The operator fix is to Reset the deployment, which starts a fresh generation.
-Changing the environment cannot change an execution after it starts,
-and a native run never falls back after a provider request starts.
+The `agent.prepare_payload` result is recorded in history. There is one
+engine and one wire standard (`MessageWire`): every turn uses `ChatUnifier`
+plus the native provider SDKs, and no `llm_engine` / `message_wire_version`
+discriminator is recorded (the cutover-era markers and the
+`InvalidAgentLLMEngine` refusal path were purged; `tests/llm/test_single_wire_standard.py`
+fails the build if they reappear). Pre-cutover deployments are handled by Reset,
+which starts a fresh generation. Changing the environment cannot change an
+execution after it starts, and a native run never falls back after a provider
+request starts.
`emit_phase(phase, status?)` is a thin helper that schedules `agent.broadcast_progress`. The activity emits `WorkflowEvent.agent_progress` (CloudEvents v1.0, `type="com.opencompany.agent.progress"`) for FE consumers; when `status` is supplied it also drives a raw-dict `update_node_status` for the canvas-glow color (executing / success / error). Same dual-channel pattern F4.A's `_node_activity` uses. When this workflow is itself a delegated child (`context["parent_node_id"]` set), every `emit_phase` call ALSO schedules a second broadcast against the parent's `node_id` with `phase="delegating"` — the parent's canvas badge then advances in real time while the child loops, instead of freezing at "executing" glow until the child completes.
@@ -441,7 +438,7 @@ addition. Seven are the core loop activities:
| Activity | Purpose |
|---|---|
-| `agent.prepare_payload` | Resolves the DB-backed payload (provider / model / system_message / user_prompt / `AgentToolSpec`-derived tool definitions / memory_node_id / memory_content / memory_window_size / max_iterations / thinking_config / compaction_threshold / auto_rebind_tools), records `llm_engine` + `message_wire_version`, and leaves credential resolution at the LLM activity boundary. Reads `UserSettings.agent_recursion_limit` + `UserSettings.auto_rebind_tools_after_canvas_change`. Applies the optional `invocation` field (delegation children) after config resolution — per-invocation input always beats stored parameters. |
+| `agent.prepare_payload` | Resolves the DB-backed payload (provider / model / system_message / user_prompt / `AgentToolSpec`-derived tool definitions / memory_node_id / memory_content / memory_window_size / max_iterations / thinking_config / compaction_threshold / auto_rebind_tools), and leaves credential resolution at the LLM activity boundary. Reads `UserSettings.agent_recursion_limit` + `UserSettings.auto_rebind_tools_after_canvas_change`. Applies the optional `invocation` field (delegation children) after config resolution — per-invocation input always beats stored parameters. |
| `agent.execute_llm_step` | One LLM turn. The native branch decodes Message Wire V2, rebuilds `ToolDef` values, calls `run_native_llm_step(ChatUnifier, ...)` with SDK retries disabled, heartbeats while awaiting the provider, and returns the exact assistant message + tool calls + normalized usage. Guards against un-invokable payloads: post-filter system-only message lists raise `ApplicationError(type="EmptyAgentPrompt", non_retryable=True)`. |
| `agent.refresh_tools` | Translates `workflow_ops` add_node ops (`component_kind="tool"` OR `usable_as_tool=True`) into fresh `AgentToolSpec`-derived `tool_payload` entries via `_build_tool_from_node`. Workflow extends `tools` + `tool_index` from the result. |
| `agent.persist_turn` | Appends the latest human/assistant exchange to memory markdown, trims the window, broadcasts `node.parameters.updated`. |
diff --git a/docs-internal/agent_architecture.md b/docs-internal/agent_architecture.md
index 8ab3fb22..6eb8dd67 100644
--- a/docs-internal/agent_architecture.md
+++ b/docs-internal/agent_architecture.md
@@ -182,12 +182,12 @@ next iteration.
### `max_iterations` precedence
-Resolved per-execution, and the two runtimes differ. **Temporal** (`prepare_agent_payload`, `services/temporal/agent_activities.py`) applies all four tiers below. **In-process** (`execute_agent` / `execute_chat_agent` in `services/ai.py`) applies only tiers 2 and 4: it never reads `parameters.max_iterations` and never consults env `Settings`. Highest to lowest:
+Resolved per-execution, and the two runtimes differ. **Temporal** (`prepare_agent_payload`, `services/temporal/agent_activities.py`) applies tiers 1-3 below and falls back to a hardcoded 200 if `Settings` cannot instantiate; it never reads `llm_defaults.json`. **In-process** (`execute_agent` / `execute_chat_agent` in `services/ai.py`) applies tiers 2-4 through `get_model_registry().get_agent_defaults()`, where the env value wins and the JSON is the last resort; only tier 1 is unreachable there. Highest to lowest:
1. **Per-agent-node** `parameters.max_iterations` — set by the user on the agent node itself. Temporal path only; no agent plugin currently declares a `max_iterations` Params field, so this tier is reachable only from a hand-written graph.
2. **Per-user** `UserSettings.agent_recursion_limit` — Settings tab override (DB-backed).
3. **Env** `Settings.agent_recursion_limit` from `AGENT_RECURSION_LIMIT` (default 200).
-4. **JSON** `llm_defaults.json:agent.recursion_limit` — last-resort fallback when Settings can't load.
+4. **JSON** `llm_defaults.json:agent.recursion_limit` — in-process only, reached when `Settings` cannot instantiate; the Temporal path uses a hardcoded 200 instead.
The iteration limit is the termination backstop. Compaction is a post-turn
context-pressure control for agents with connected memory; it summarizes active
@@ -541,15 +541,12 @@ Two settings flags route agent execution through different Temporal paths (see [
Both flags default to `true` in `.env.template`.
-New `AgentWorkflow` executions record `llm_engine="native"` and
-`message_wire_version=2` in the `agent.prepare_payload` result by default.
-Recorded histories whose prepare result predates those markers cannot run:
-`agent.execute_llm_step` refuses them with a non-retryable
-`InvalidAgentLLMEngine`, because their messages are in a retired wire format.
-Marker-bearing
-native executions never fall back after a provider request starts, and changing
-the environment does not alter an execution whose prepare result is already in
-history.
+`AgentWorkflow` executions carry messages in the single `MessageWire` shape;
+there is one engine and one wire standard, with no `llm_engine` or
+`message_wire_version` discriminator recorded (locked by
+`tests/llm/test_single_wire_standard.py`). Native executions never fall back
+after a provider request starts, and changing the environment does not alter an
+execution whose `agent.prepare_payload` result is already in history.
**Team leads** (`orchestrator_agent`, `ai_employee`) run the same
`execute_chat_agent` path as the other specialized agents but add an
diff --git a/docs-internal/authentication.md b/docs-internal/authentication.md
index d681a188..9fcb3794 100644
--- a/docs-internal/authentication.md
+++ b/docs-internal/authentication.md
@@ -102,11 +102,21 @@ container lookup, deliberately not memoised. In handlers/services use
### Auth Middleware (`server/middleware/auth.py`)
Protects all routes except public paths:
```python
-PUBLIC_PATHS = frozenset([
- "/health", "/docs", "/openapi.json", "/redoc",
- "/api/auth/status", "/api/auth/login", "/api/auth/register", "/api/auth/logout",
- "/ws/internal", # Internal WebSocket for Temporal workers
-])
+PUBLIC_PATHS = frozenset(
+ [
+ "/health",
+ "/health/ready", # readiness probe for the desktop shell splash / CI
+ "/api/desktop/shutdown", # desktop shell; gated by X-Desktop-Token, not the cookie
+ "/docs",
+ "/openapi.json",
+ "/redoc",
+ "/api/auth/status",
+ "/api/auth/login",
+ "/api/auth/register",
+ "/api/auth/logout",
+ "/ws/internal", # Internal WebSocket for Temporal workers
+ ]
+)
# Path prefixes that are public. ``/mcp/`` is the CLI-agent MCP server, which
# enforces its own per-batch bearer-token auth (cookies don't apply to it), so
@@ -234,7 +244,8 @@ Recorded explicitly because each of these is easy to assume is handled.
`tests/auth/test_auth_middleware.py` fails if a new router breaks it.
`core/config.py` carries the `vite_auth_enabled` field (required because
-Pydantic Settings uses `extra="forbid"`). It also exposes `DEV_SECRET_LITERALS`
+`Settings` reads it to gate the auth middleware in `middleware/auth.py`;
+`model_config` uses `extra="ignore"`, so stale `.env` vars do not raise). It also exposes `DEV_SECRET_LITERALS`
and `dev_secret_offenders()`: server startup (lifespan) logs a non-fatal error
banner when `SECRET_KEY` / `JWT_SECRET_KEY` / `API_KEY_ENCRYPTION_KEY` still
carry the dev template placeholders while auth is enabled or `DEPLOYMENT_MODE`
@@ -318,7 +329,7 @@ useEffect(() => {
## Dependencies
```
# server/pyproject.toml
-bcrypt>=4.1.0
+bcrypt>=4.2.0
pyjwt>=2.13.0
email-validator>=2.0.0
```
diff --git a/docs-internal/cloudflare_service.md b/docs-internal/cloudflare_service.md
index 6cfe1bcc..14d3fd6e 100644
--- a/docs-internal/cloudflare_service.md
+++ b/docs-internal/cloudflare_service.md
@@ -14,7 +14,7 @@ grant** that makes the optional API token the only path to analytics.
| Node type | `cloudflareAction` (palette group `deployment`, dual-purpose AI tool `cloudflare`) |
| Operations | `whoami` / `zones_list` / `dns_records_list` / `dns_record_create` / `dns_record_delete` / `graphql_query` / `custom` |
| CLI pin | `[email protected]` (`_NPM_SPEC` in `_install.py`), npm-installed into the shared `packages_dir()` tree, Node >= 22 |
-| Auth | Dual-path: cf-owned OAuth login OR optional `cloudflare_api_token` field -> `CLOUDFLARE_API_TOKEN` env |
+| Auth | Dual-path: cf-owned OAuth login OR optional canonical `apiKey` field (stored under the provider id `cloudflare`) -> `CLOUDFLARE_API_TOKEN` env |
| Task queue | `TaskQueue.REST_API` |
| Output | `ui_hints = {"outputMode": "terminal"}`; `_shape` contract (parsed JSON -> `result`, text -> `stdout`, never both) + NDJSON recovery |
| Tests | [`server/tests/test_cloudflare_plugin.py`](../server/tests/test_cloudflare_plugin.py) (42 contract tests at time of writing; `pytest --collect-only -q`) |
@@ -29,7 +29,7 @@ server/nodes/cloudflare/
├── _credentials.py # CloudflareCredential — resolve() returns the optional token row
├── _handlers.py # cloudflare_login / cloudflare_logout / cloudflare_status
├── _install.py # ensure_cf_cli() — pinned npm install, system cf NEVER consulted
-├── _service.py # cf_env(token) / login_env() / whoami_snapshot() / stored_token()
+├── _service.py # cf_env(token, email) / api_auth_headers() / login_env() / whoami_snapshot() / stored_token() / stored_email() / resolve_cf_light()
└── meta.json # {"color": "#F38020"}
```
diff --git a/docs-internal/credentials_encryption.md b/docs-internal/credentials_encryption.md
index 5d6e2359..426e403f 100644
--- a/docs-internal/credentials_encryption.md
+++ b/docs-internal/credentials_encryption.md
@@ -87,7 +87,7 @@ There are **two distinct storage paths** inside `credentials.db`, and they are n
For secrets the user enters manually in the Credentials modal (OpenAI API key, Anthropic key, Google client ID, Google client secret, Twitter client secret, Brave Search key, etc.).
-- Table: `EncryptedAPIKey`
+- Model / table: `EncryptedAPIKey` (`encrypted_api_keys`)
- Access: `AuthService.store_api_key(provider, key, models=[...], session_id=..., model_params=...)` and `AuthService.get_api_key(provider)`
- Cache: `AuthService._api_key_cache: Dict[str, ApiKeyCacheEntry]` keyed `{session}_{provider}` (see "Source of Truth" below)
- **Per-model parameters** (Ollama / LM Studio): the `models` JSON column carries an optional `model_params` subkey alongside the model list — `{"models": [...], "model_params": {model_id: {context_length, vision, supports_tools, ...}}}`. Populated by [`nodes/model/_local_validator.py`](../server/nodes/model/_local_validator.py) from the official SDK probes (`ollama.AsyncClient.ps()` / `lmstudio.AsyncClient.llm.list_loaded()`) so the runtime knows the user's actual loaded n_ctx instead of guessing from `llm_defaults.json`. Read back via `AuthService.get_model_params(provider)` or `CredentialsDatabase.get_api_key_model_params(provider)`. Cloud providers leave this empty — their per-model params live in `model_registry.json` (refreshed from OpenRouter).
@@ -96,7 +96,7 @@ For secrets the user enters manually in the Credentials modal (OpenAI API key, A
For tokens obtained via OAuth 2.0 flows (Google Workspace, Twitter/X, Claude.ai).
-- Table: `EncryptedOAuthToken`
+- Model / table: `EncryptedOAuthToken` (`oauth_tokens`)
- Access: `AuthService.store_oauth_tokens(provider, access_token, refresh_token, ...)` and `AuthService.get_oauth_tokens(provider, customer_id="owner")`
- Cache: `AuthService._oauth_cache: Dict[str, Dict[str, Any]]`
@@ -154,7 +154,7 @@ Dependencies (`server/pyproject.toml`) — the core `cryptography` package is al
```toml
[project]
dependencies = [
- "cryptography>=44.0.0", # Fernet encryption (always required)
+ "cryptography>=50.0.0", # Fernet encryption (always required)
]
[project.optional-dependencies]
@@ -232,5 +232,5 @@ All credential providers come from the backend `get_credential_catalogue` handle
## Related Docs
- [DESIGN.md](DESIGN.md) - overall security posture
-- [new_service_integration.md](new_service_integration.md) - where to put credentials for new service integrations
+- [new_service_integration.md](ARCHIVE/new_service_integration.md) - where to put credentials for new service integrations
- [status_broadcaster.md](status_broadcaster.md) - WebSocket handlers for credentials (get/save/delete)
diff --git a/docs-internal/data_node.md b/docs-internal/data_node.md
index 52473425..602d0290 100644
--- a/docs-internal/data_node.md
+++ b/docs-internal/data_node.md
@@ -86,8 +86,10 @@ Refs in durable state, bytes only at the provider boundary:
structurally, so a leak is a loud error, not a 2 MiB Temporal payload.
- Tools opt in by returning `llm_media: [{ref, detail}]` (max 8;
`ref.workflow_id` required; png/jpeg/webp/gif). Producers today: the
- data node's image tier. Both agent loops attach the blocks
- (`agent_runtime.py` and `temporal/agent_activities.py`).
+ data node's image tier. The in-process agent loop attaches the blocks
+ (`agent_runtime.py`, `image_blocks_from_tool_result` call); the Temporal
+ agent path does not yet attach `llm_media` blocks (it only hydrates
+ already-attached ones via `run_native_llm_step`).
- `hydrate_image_blocks(messages, provider, model)` runs once per LLM step
in `run_native_llm_step`, on deep copies — originals never mutate;
per-image failures degrade to text placeholders; incapable models get
@@ -106,9 +108,9 @@ Refs in durable state, bytes only at the provider boundary:
## Tests
-`tests/nodes/test_data_source_node.py` (spec/validation/path-security/
-tiers/mount flows/no-host-path-leak), `tests/services/data/test_mount_store.py`
-(validation matrix), `tests/nodes/test_vision_analyze.py` (budget math +
-per-provider request shapes), `tests/llm/test_media_blocks.py` (codec
+`server/tests/nodes/test_data_source_node.py` (spec/validation/path-security/
+tiers/mount flows/no-host-path-leak), `server/tests/services/data/test_mount_store.py`
+(validation matrix), `server/tests/nodes/test_vision_analyze.py` (budget math +
+per-provider request shapes), `server/tests/llm/test_media_blocks.py` (codec
round-trip + never-bytes raise, `llm_media` contract, gated hydration,
Anthropic tool_result shape).
diff --git a/docs-internal/design-system/HANDOFF.md b/docs-internal/design-system/HANDOFF.md
index 99d8344a..fb854f3b 100644
--- a/docs-internal/design-system/HANDOFF.md
+++ b/docs-internal/design-system/HANDOFF.md
@@ -84,8 +84,9 @@ design_handoff_theme_system/
│ node roles, shadows, all-theme comparisons).
├─ ui_kits/opencompany/ ← A runnable recreation of the app shell
│ (App / CanvasView / Toolbar / Panels / ConsoleDock).
-├─ reference/themes/ ← The design system's own distilled copy of the 12 themes.
-│ Useful for reading; `themes/` is authoritative.
+├─ reference/themes/ ← Pointer README only. The distilled snapshots went stale
+│ (pre-hex-migration) and were retired; `client/src/themes/`
+│ is authoritative.
├─ assets/ ← Product canvas screenshot + 6 architecture diagrams.
├─ reference-mockup/ ← The panel × theme matrix (open the .dc.html in a browser).
└─ _source_docs/ ← DS readme, IMPLEMENTATION.md, SKILL.md, manifest,
@@ -206,7 +207,7 @@ Defined in `themes/base.css`. Getting this right is most of the canvas's quality
| **Resting** | `box-shadow: 0 2px 8px color-mix(in srgb, <node-color> 18%, transparent)` — a quiet drop shadow. **No halo.** |
| **Hover** | `translateY(-1px)` + `0 4px 14px color-mix(… 28%, transparent)`, transitioned on `--dur-fast` / `--ease-default` |
| **Selected** | 1px accent ring + `0 4px 14px color-mix(… 32%, transparent)`, border goes to full strength |
-| **Executing** | the theme's own `--pulse-keyframe`, driven by `--node-pulse-color`. Timing: `.node` **1.4s**, `.sq-node-box` **1.5s** |
+| **Executing** | the theme's own `--pulse-keyframe`, driven by `--node-pulse-color`. Timing: the shared `--pulse-duration` token (**1.4s**) for both `.node` and `.sq-node-box` |
| **Success / error** | `0 0 0 1px <semantic>, 0 0 14px color-mix(in srgb, <semantic> 60%, transparent)` |
Three traps, all of which I hit:
@@ -270,7 +271,7 @@ The skins that use `uppercase` + wide tracking (Cyber at `.18em`, Greek at `.18e
- **Pin your toolbar clusters.** The wordmark, workflow-name chip, mode toggle and action cluster all need `flex: none`; leave exactly one group (File/Edit/View) shrinkable. Without this the mode toggle collapses to a sliver in Cyber and Atomic.
- **Test the widest theme, not the default.** Anything that fits in Light will overflow somewhere. Cyber and Greek are the stress cases.
-Also: canvas node icons are **36px** everywhere, and the size is a token, not a class — `theme.nodeSize.squareIcon` in `client/src/styles/theme.ts` (0.5625 x the 64px `nodeSize.square` box), passed to `NodeIcon` as `size=`; non-canvas surfaces use the `theme.iconSize.*` scale the same way. `NodeIcon` applies that one token as the box's width, height AND font size, so SVG, library and emoji icons all draw at the same edge. Never size an icon with Tailwind `h-*`/`text-*` classes: the theme type scale maps `text-3xl` to 44px, which is how emoji nodes once painted half again larger than every SVG-backed node beside them. Eight themes ship their own glyph set; Light, Dark, Plague and Surveillance fall through to lucide.
+Also: canvas node icons are **36px** everywhere, and the size is a token, not a class — `theme.nodeSize.squareIcon` in `client/src/styles/theme.ts` (0.5625 x the 64px `nodeSize.square` box), passed to `NodeIcon` as `size=`; non-canvas surfaces use the `theme.iconSize.*` scale the same way. `NodeIcon` applies that one token as the box's width, height AND font size, so SVG, library and emoji icons all draw at the same edge. Never size an icon with Tailwind `h-*`/`text-*` classes: the theme type scale maps `text-3xl` to 44px, which is how emoji nodes once painted half again larger than every SVG-backed node beside them. Ten themes ship their own glyph set; only Light and Dark fall through to lucide.
---
diff --git a/docs-internal/diagram-generation/README.md b/docs-internal/diagram-generation/README.md
index 14fb9422..f5827c8b 100644
--- a/docs-internal/diagram-generation/README.md
+++ b/docs-internal/diagram-generation/README.md
@@ -30,5 +30,9 @@ This directory contains the source-backed specification, prompts, AI-generated r
- `validation-report.json` is generated by the validator.
- `visual-review.md` records the full-resolution and README-width inspection matrix.
- `docs/diagrams/v2/{dark,light}/*.svg` contains the editable authoritative diagrams. Existing public diagrams remain unchanged.
+- `spec.schema.json` is the JSON Schema that validates every `specs/*.json`.
+- `scripts/generate_svgs.py` renders `docs/diagrams/v2/{dark,light}/*.svg` from the specs (and regenerates `prompt-pack.md` + `manifest.json`).
+- `scripts/validate_svgs.py` checks specs, theme parity, SVG accessibility, and raster presence, producing `validation-report.json`.
+- `source-snapshot.md` is the human-readable form of the frozen source snapshot recorded in `manifest.json`.
All diagrams use a `1920 × 1080` viewBox. Dark and light variants share one geometry specification.
diff --git a/docs-internal/discord_service.md b/docs-internal/discord_service.md
index a89b70fe..4a15cc58 100644
--- a/docs-internal/discord_service.md
+++ b/docs-internal/discord_service.md
@@ -248,7 +248,7 @@ whole plugin silently disappear rather than report anything.
**Both trigger frozensets matter.** Omitting a trigger from
`EVENT_TRIGGER_TYPES` / `WORKFLOW_TRIGGER_TYPES` is a silent failure: deploy
filters on them and ignores the node with no listener and no warning
-([constants.py:400](../server/constants.py)). Tests assert the membership.
+([constants.py:402-406](../server/constants.py)). Tests assert the membership.
## Testing
diff --git a/docs-internal/email_service.md b/docs-internal/email_service.md
index 9099d0f1..c368239f 100644
--- a/docs-internal/email_service.md
+++ b/docs-internal/email_service.md
@@ -230,7 +230,7 @@ Send email via SMTP. Group: `['email', 'tool']`. Two outputs (`main`, `tool`).
| `provider` | options | yes | `gmail`, `outlook`, `yahoo`, `icloud`, `protonmail`, `fastmail`, `custom` |
| `to` | string | yes | Recipient(s), comma-separated |
| `subject` | string | yes | |
-| `body` | string | yes | Plain text or HTML (per `body_type`) |
+| `body` | string | no | Plain text or HTML (per `body_type`) |
| `cc` | string | no | |
| `bcc` | string | no | |
| `body_type` | options | no | `text` (default) or `html` |
@@ -355,6 +355,12 @@ Status is shown via `getSpecialStatus(item)` returning `{ connected: !!emailStor
```json
{
+ "cli": {
+ "binary": "himalaya",
+ "homepage": "https://github.com/pimalaya/himalaya",
+ "install_url": "https://github.com/pimalaya/himalaya/releases",
+ "timeout_seconds": 60
+ },
"defaults": {
"provider": "gmail",
"folder": "INBOX",
@@ -390,8 +396,8 @@ Status is shown via `getSpecialStatus(item)` returning `{ connected: !!emailStor
},
"fastmail": { "...": "..." },
"custom": {
- "imap_host": "", "imap_port": 993, "imap_encryption": "tls",
- "smtp_host": "", "smtp_port": 465, "smtp_encryption": "tls",
+ "imap_host": "", "imap_port": "", "imap_encryption": "",
+ "smtp_host": "", "smtp_port": "", "smtp_encryption": "",
"auth_note": "Enter your mail server details"
}
}
diff --git a/docs-internal/errors.md b/docs-internal/errors.md
index edcd8002..920ad97a 100644
--- a/docs-internal/errors.md
+++ b/docs-internal/errors.md
@@ -62,7 +62,7 @@ Restart-Service SysMain
**Fix** (if admin is unavailable): **Reboot**. This is what clears the stuck kernel cache reliably.
-**Prevention** (`cli/commands/start.py`, `_sqlalchemy_preflight`): a preflight probe times `import sqlalchemy` in the server venv. If it exceeds 8 seconds, it fails fast with actionable remediation steps instead of letting uvicorn hang silently.
+**Prevention** (`cli/commands/start.py`, `_sqlalchemy_preflight`): a preflight probe times `import sqlalchemy` in the server venv with a 15-second timeout. If the import times out or crashes it fails fast with actionable remediation steps instead of letting uvicorn hang silently; an import that succeeds but takes over 5 seconds only prints a warning.
---
@@ -309,7 +309,7 @@ Or start a fresh terminal that doesn't inherit from the Claude Code harness.
**Symptom**: `scripts/install.js` reports `Python: Python 3.13.7` as valid, but `pyproject.toml` requires `>=3.11,<3.13`.
-**Root cause**: The version check at `install.js:59` uses `minor >= 12` with no upper bound:
+**Root cause**: The version check at `install.js:76` uses `minor >= 12` with no upper bound:
```js
if (major >= 3 && minor >= 12) { return { cmd, version }; }
```
diff --git a/docs-internal/event_waiter_system.md b/docs-internal/event_waiter_system.md
index 32cbbbd4..c83fef15 100644
--- a/docs-internal/event_waiter_system.md
+++ b/docs-internal/event_waiter_system.md
@@ -123,7 +123,7 @@ Some triggers do not fit the push model because the upstream service has no webh
| `googleGmailReceive` | **Polling** | `WorkflowControlWorkflow` polling activity (controlled); `PollingTriggerWorkflow` legacy compatibility |
| `cronScheduler` | Temporal Schedule | `services/temporal/schedules.py` |
-Controlled polling triggers are registered with `WorkflowControlWorkflow`, which invokes the plugin-generated `poll.{node_type}.v{version}` activity and starts a graph only for deduplicated new events. Legacy uncontrolled polling still uses the deployment compatibility layer. See [temporal-execution-engine-rfc.md](temporal-execution-engine-rfc.md) for the current deployment architecture.
+Controlled polling triggers are registered with `WorkflowControlWorkflow`, which invokes the plugin-generated `poll.{node_type}.v{version}` activity and starts a graph only for deduplicated new events. Legacy uncontrolled polling still uses the deployment compatibility layer. See [temporal-execution-engine-rfc.md](ARCHIVE/temporal-execution-engine-rfc.md) for the deployment architecture.
## Cancellation
diff --git a/docs-internal/frontend_architecture.md b/docs-internal/frontend_architecture.md
index e52702c9..5df4f716 100644
--- a/docs-internal/frontend_architecture.md
+++ b/docs-internal/frontend_architecture.md
@@ -638,4 +638,4 @@ This architecture is the post-migration state. Pre-migration was antd + `styled-
**`useAppTheme()` powers the canvas + maps surface across all 12 themes.** The hook returns a `theme` object with the legacy `Colors` shape (`theme.colors.X`, `theme.isDarkMode`) so existing call sites don't change. Under non-light/dark themes it merges a per-theme overlay (primary, focus, action palette, edge stroke / selection / executing / completed / error) on top of the chosen base pack (`lightColors` for utopian-bright themes, `darkColors` for dystopian / dark themes). Adding a new theme overlay is a single entry in the `THEME_OVERRIDES` map in [hooks/useAppTheme.ts](../client/src/hooks/useAppTheme.ts).
-Read sites: every canvas node component (`AIAgentNode`, `SquareNode`, `TriggerNode`, `StartNode`, `ToolkitNode`, `TeamMonitorNode`, `GenericNode`), `EdgeConditionEditor`, and the Maps surface (`GoogleMapsPicker`, `MapsPreviewPanel`) — they interpolate per-definition `nodeColor` and JS-side hex values that Tailwind classes can't express. Every other surface uses Tailwind + the token tiers above and retints automatically through the per-theme `[data-theme="..."]` block.
+Read sites: every canvas node component (`AIAgentNode`, `SquareNode`, `TriggerNode`, `StartNode`, `ToolkitNode`, `TeamMonitorNode`), `EdgeConditionEditor`, and the Maps surface (`GoogleMapsPicker`, `MapsPreviewPanel`) — they interpolate per-definition `nodeColor` and JS-side hex values that Tailwind classes can't express. Every other surface uses Tailwind + the token tiers above and retints automatically through the per-theme `[data-theme="..."]` block.
diff --git a/docs-internal/github_service.md b/docs-internal/github_service.md
index 57fd77b2..1f8cd2b9 100644
--- a/docs-internal/github_service.md
+++ b/docs-internal/github_service.md
@@ -81,7 +81,7 @@ precedent) → best-effort `gh auth setup-git` → marker +
`github_logout`: `gh auth logout --hostname github.com` (best-effort)
→ remove marker → `credential.oauth.disconnected`.
-`github_status`: `{connected: cli_logged_in()}` — no side effects.
+`github_status`: `{connected, logged_in}` (both from `cli_logged_in()`), no side effects.
Terminal logins (`gh auth login` run by the user) are first-class: ops
and status see the same gh session; only the modal badge waits for a
marker written via the modal's own Login.
diff --git a/docs-internal/media_transport.md b/docs-internal/media_transport.md
index 69517356..d0d6b273 100644
--- a/docs-internal/media_transport.md
+++ b/docs-internal/media_transport.md
@@ -196,7 +196,7 @@ channel. The consumer is the parameter panel, which already holds an
authenticated socket with request correlation — a second HTTP listing surface
would mean a second auth path and a second error envelope for no gain.
-### `GET /api/workspace/{workflow_id}/files/{path:path}`
+### `GET /api/workspace/{workflow_id}/files/{file_path:path}`
- id → slug via `workspace_locator.resolve_workspace_root` (reads keep the
`"default"` fallback), then `resolve_within`.
diff --git a/docs-internal/memory_compaction.md b/docs-internal/memory_compaction.md
index bb8de302..09572514 100644
--- a/docs-internal/memory_compaction.md
+++ b/docs-internal/memory_compaction.md
@@ -397,7 +397,7 @@ usage = final_state["usage"]
In `server/services/ai.py`, the in-process path calls the service only when a
legacy memory session id was resolved earlier in the run (`session_id` is set
-from `memory_data["session_id"]` at `ai.py:1005`; it stays `None` once a
+from `memory_data["session_id"]` at `ai.py:1006`; it stays `None` once a
Context runtime resolves, because `execute_agent` nulls `memory_data` in that
case):
@@ -536,7 +536,7 @@ F4.B performs a parallel check inside `AgentWorkflow` using the workflow's
active-context usage counter and the ratio-based threshold recorded by
`agent.prepare_payload`. It invokes the same `compact_context()` method
through the `agent.compact_context` activity
-(`services/temporal/agent_activities.py:1944`).
+(`services/temporal/agent_activities.py:1945`).
### AI Service Wiring
@@ -605,7 +605,7 @@ Broadcast when compaction finishes:
The Token Usage panel is displayed in the MiddleSection of the parameter panel
for **agent nodes that have a memory session connected** — the gate is
`isAgentWithSkills && connectedMemorySessionId`
-(`client/src/components/parameterPanel/MiddleSection.tsx:767-768`), not the
+(`client/src/components/parameterPanel/MiddleSection.tsx:768-769`), not the
memory node itself. It shows:
- **Progress bar**: tokens used vs the model's context length when known (`compactionStats.context_length`), else vs the threshold; turns destructive at 80%
@@ -615,7 +615,7 @@ memory node itself. It shows:
Built from shadcn primitives (no antd):
```typescript
-// client/src/components/parameterPanel/MiddleSection.tsx:768-870 (abridged)
+// client/src/components/parameterPanel/MiddleSection.tsx:768-879 (abridged)
{isAgentWithSkills && connectedMemorySessionId && (
<Accordion type="single" collapsible defaultValue="tokens">
<AccordionItem value="tokens">
diff --git a/docs-internal/native_llm_sdk.md b/docs-internal/native_llm_sdk.md
index 468d5177..b6c15558 100644
--- a/docs-internal/native_llm_sdk.md
+++ b/docs-internal/native_llm_sdk.md
@@ -262,15 +262,15 @@ ChatUnifier.chat(provider=..., Message[], ToolDef[])
|
+--> registry.get_provider(name)
+--> official SDK or OpenAI-compatible base URL
- +--> LLMResponse(assistant_message=lossless MessageWireV2)
+ +--> LLMResponse(assistant_message=lossless MessageWire)
```
`run_native_agent_loop` appends the provider's exact assistant envelope before
executing tools. This preserves Gemini thought signatures, Anthropic signed and
redacted thinking blocks, and OpenAI reasoning continuation state across
-in-process and Temporal turns. Executions record `llm_engine=native` and wire
-version 2. A markerless prepare result identifies a pre-cutover history, which
-is refused rather than executed (see the end of this document).
+in-process and Temporal turns. There is one wire standard (`MessageWire`) and
+no engine or wire-version discriminator is recorded (see the end of this
+document).
## Thinking and Reasoning
@@ -485,15 +485,12 @@ the plugin folder or add a `visuals.json` entry (`"openrouterChatModel":
## Temporal migration and dependency lifecycle
-`agent.prepare_payload` records `llm_engine` and `message_wire_version`.
-The marker is a discriminator, not a switch: there is one engine.
-
-A history recorded before the native cutover carries neither field, and its
-messages are in a retired wire format the native `messages_from_wire` reader
-cannot interpret. `execute_llm_step` refuses such a payload with a
-non-retryable `ApplicationError(type="InvalidAgentLLMEngine")` rather than
-reinterpreting the messages and corrupting the conversation. The operator fix
-is to Reset the deployment, which starts a fresh generation.
+`agent.prepare_payload` builds the payload; there is one engine and one wire
+standard. The `llm_engine` / `message_wire_version` discriminators and the
+`InvalidAgentLLMEngine` refusal path from the cutover period were purged, and
+`tests/llm/test_single_wire_standard.py` fails the build if any of those
+identifiers reappear in production source. Pre-cutover deployments are handled
+by Reset, which starts a fresh generation.
`tests/llm/test_langchain_removed.py` enforces the dependency end state via an
AST walk over production sources, the `pyproject.toml` declarations, runtime
diff --git a/docs-internal/node-logic-flows/_TEMPLATE.md b/docs-internal/node-logic-flows/_TEMPLATE.md
index 2c82bd3b..05bdc679 100644
--- a/docs-internal/node-logic-flows/_TEMPLATE.md
+++ b/docs-internal/node-logic-flows/_TEMPLATE.md
@@ -15,7 +15,7 @@ this file must still describe what the code does end-to-end.
| Field | Value |
|------|-------|
| **Category** | <group, e.g. search / ai / android / google> |
-| **Backend handler** | [`server/services/handlers/<file>.py::<handler_fn>`](../../../server/services/handlers/<file>.py) |
+| **Backend handler** | [`server/nodes/<group>/<node>/__init__.py`](../../../server/nodes/<group>/<node>/__init__.py) - `<NodeClass>`; dispatched via `BaseNode.execute()` + the `@Operation("<op>")` method |
| **Tests** | [`server/tests/nodes/test_<category>.py`](../../../server/tests/nodes/test_<category>.py) |
| **Skill (if any)** | [`server/skills/<folder>/<skill>/SKILL.md`](../../../server/skills/<folder>/<skill>/SKILL.md) |
| **Dual-purpose tool** | yes / no - tool name `<tool_name>` if yes |
@@ -85,7 +85,7 @@ flowchart TD
## External Dependencies
- **Credentials**: <provider key looked up via `auth_service.get_api_key('<provider>')`>
-- **Services**: <e.g. WhatsApp RPC at `localhost:5683`, agent-browser CLI>
+- **Services**: <e.g. WhatsApp RPC at `localhost:${WHATSAPP_RPC_PORT}`, agent-browser CLI>
- **Python packages**: <e.g. `httpx`, `xdk`, `apify-client`>
- **Environment variables**: <if any>
diff --git a/docs-internal/node-logic-flows/ai_agents/context.md b/docs-internal/node-logic-flows/ai_agents/context.md
index 2bde0f4e..d8f0eb12 100644
--- a/docs-internal/node-logic-flows/ai_agents/context.md
+++ b/docs-internal/node-logic-flows/ai_agents/context.md
@@ -29,6 +29,19 @@ reference: [agent_context_flow.md](../../agent_context_flow.md).
None (`AgentContextParams` is empty, `extra="forbid"`).
+## Outputs (handles)
+
+| Handle | Shape | Description |
+|--------|-------|-------------|
+| `output-context` | context (role `context`, top) | The only declared handle; connects to an agent's `input-context`. `hide_input_handle = True`, `hide_output_handle = False` |
+
+Class facts: `component_kind = "model"`, `group = ("memory",)` (so
+`isConfigNode` auto-derives), `version = 2`. The single
+`@Operation("policy")` ignores its inputs and returns `AgentContextOutput`
+(`{configured: true}`, `extra="forbid"`); conversations stay in the store.
+`ui_hints`: `isContextPanel`, `systemManaged`, `hideInputSection`,
+`hideOutputSection`, `hideRunButton` — all `True`.
+
## Behavior
- **Descriptor** ([`_descriptor.py`](../../../server/nodes/context/_descriptor.py)):
diff --git a/docs-internal/node-logic-flows/ai_agents/simpleMemory.md b/docs-internal/node-logic-flows/ai_agents/simpleMemory.md
index 17de196e..d6814907 100644
--- a/docs-internal/node-logic-flows/ai_agents/simpleMemory.md
+++ b/docs-internal/node-logic-flows/ai_agents/simpleMemory.md
@@ -45,10 +45,14 @@ recall away.
One locked multi-operation schema: `operation` ∈ `remember | recall | list |
get | update | forget`, plus `content`/`title`/`category`/`tags`/`expires_at`
-(remember/update patch), `query`/`categories`/`limit`/`cursor`
-(recall/list), `memory_id`/`expected_version` (get/update/forget). The lock
-means the plugin's schema and description always win over stale `ToolSchema`
-DB rows.
+(remember), `query`/`categories`/`limit`/`cursor` (recall/list),
+`memory_id`/`expected_version` (get/update/forget), and `patch` (a
+`MemoryUpdatePatch` object, `update` only). The lock means the plugin's
+schema and description always win over stale `ToolSchema` DB rows.
+
+`ui_hints`: `isMemoryPanel`, `isMemoryToolPanel`, `hasCodeEditor` (kept as a
+wire-compatibility hint for older clients), `hideInputSection`,
+`hideOutputSection`, `hideRunButton` — all `True`.
## Storage
diff --git a/docs-internal/node-logic-flows/ai_tools/canvas.md b/docs-internal/node-logic-flows/ai_tools/canvas.md
index 152ef14b..d351cb1f 100644
--- a/docs-internal/node-logic-flows/ai_tools/canvas.md
+++ b/docs-internal/node-logic-flows/ai_tools/canvas.md
@@ -7,7 +7,7 @@
| **WS handlers** | `canvas_list` / `canvas_remove` / `canvas_clear` (self-registered; simple_memory security preamble: external socket + owner + graph-ownership checks) |
| **Tests** | [`server/tests/nodes/test_canvas_node.py`](../../../server/tests/nodes/test_canvas_node.py) |
| **Skill (if any)** | none |
-| **Dual-purpose tool** | yes - tool name `canvas` (`tool_schema_locked`) |
+| **Dual-purpose tool** | ToolNode - tool name `canvas` (`tool_schema_locked = True`) |
## Purpose
diff --git a/docs-internal/node-logic-flows/ai_tools/taskManager.md b/docs-internal/node-logic-flows/ai_tools/taskManager.md
index be661e5a..7ff274d2 100644
--- a/docs-internal/node-logic-flows/ai_tools/taskManager.md
+++ b/docs-internal/node-logic-flows/ai_tools/taskManager.md
@@ -1,10 +1,83 @@
# Task Manager (`taskManager`)
+| Field | Value |
+|------|-------|
+| **Category** | tool / ai |
+| **Backend handler** | [`server/nodes/tool/task_manager/__init__.py::TaskManagerNode.manage`](../../../server/nodes/tool/task_manager/__init__.py) |
+| **Tests** | [`server/tests/nodes/test_task_manager_delegation_bridge.py`](../../../server/tests/nodes/test_task_manager_delegation_bridge.py) |
+| **Skill (if any)** | [`server/skills/assistant/task-manager/SKILL.md`](../../../server/skills/assistant/task-manager/SKILL.md) |
+| **Dual-purpose tool** | ToolNode - tool name `task_manager` |
+
Task Manager is the durable control plane intrinsically bound to
`orchestrator_agent` and `ai_employee`. It is hidden from the palette and Agent
Builder, so users cannot remove the lead's task capability. Historical explicit
nodes remain readable and protected from deletion.
+## Inputs (handles)
+
+| Handle | Connection type | Required | Purpose |
+|--------|-----------------|----------|---------|
+| `input-main` | main | no | Declared (left, role `main`); the `manage` op reads scope from `ctx.raw`, not from upstream data |
+
+`output-tool` (top, role `tools`) is the only output handle; connect it to a
+team lead's `input-tools`. `ui_hints` = `isTaskManagerPanel`,
+`hideInputSection`, `hideOutputSection`, `hideRunButton` (all `True`);
+`needs_canvas = True`.
+
+## Parameters
+
+`TaskManagerParams` (`extra="allow"`, so `revision` survives as an alias for
+`expected_revision`). No field carries `displayOptions.show`; which fields
+matter is decided per `operation` inside `_execute_task_manager`.
+
+| Name | Type | Default | Required | displayOptions.show | Description |
+|------|------|---------|----------|---------------------|-------------|
+| `operation` | `assign_task` / `list_tasks` / `get_task` / `modify_task` / `cancel_task` / `retry_task` / `reassign_task` / `accept_task` / `finish_team` / `mark_done` / `inspect_task_trace` | `list_tasks` | no | - | Operation to run; `mark_done` is a deprecated alias for `accept_task` |
+| `task_id` | string | `None` | no | - | Target task. Required by `get_task`, `inspect_task_trace`, `modify_task`, `cancel_task`, `retry_task`, `reassign_task`; `accept_task` / `mark_done` may omit it when exactly one submitted task exists |
+| `title` | string (max 500) | `None` | no | - | Task title; required by `assign_task`, editable via `modify_task` |
+| `mission` | string (max 10000) | `None` | no | - | Task mission; required by `assign_task`, editable via `modify_task` |
+| `context` | object | `None` | no | - | Free-form context stored on the task and forwarded to the assignee |
+| `acceptance_criteria` | object | `None` | no | - | Acceptance criteria stored on the task |
+| `depends_on` | string[] | `None` | no | - | Task ids this task waits on (`assign_task`) |
+| `assignee_node_id` | string | `None` | no | - | Connected teammate node id (`assign_task` / `reassign_task`); with `delegate_name`, must resolve to exactly one connected teammate |
+| `delegate_name` | string | `None` | no | - | Teammate `delegate_tool_name`, alternative to `assignee_node_id` |
+| `expected_revision` | int (ge 0) | `None` | no | - | Optimistic-concurrency revision for mutations; read from the task when omitted |
+| `reason` | string (max 2000) | `None` | no | - | Cancellation reason (`cancel_task`) |
+| `status_filter` | string | `None` | no | - | `list_tasks` status filter |
+| `include_history` | boolean | `false` | no | - | `list_tasks`: include prior executions' durable history |
+| `attempt` | int (ge 0) | `None` | no | - | `inspect_task_trace`: attempt to inspect |
+| `cursor` | string | `None` | no | - | `inspect_task_trace`: opaque page cursor |
+| `limit` | int (ge 1, le 100) | `50` | no | - | `inspect_task_trace`: page size |
+| `detail` | `summary` / `failures` / `timeline` / `search` | `summary` | no | - | `inspect_task_trace` detail mode |
+| `query` | string (max 200) | `None` | no | - | `inspect_task_trace`: search text (required when `detail=search`) |
+| `search_mode` | `literal` / `all_terms` / `any_terms` | `literal` | no | - | `inspect_task_trace`: search matching |
+| `case_sensitive` | boolean | `false` | no | - | `inspect_task_trace`: case-sensitive search |
+| `context_lines` | int (ge 0, le 5) | `2` | no | - | `inspect_task_trace`: neighbouring events returned around each match |
+| `scan_limit` | int (ge 1, le 500) | `250` | no | - | `inspect_task_trace`: max events scanned per call |
+| `categories` | (`failure` / `activity` / `child` / `signal` / `timer` / `workflow`)[] | `None` | no | - | `inspect_task_trace`: event category filter |
+
+## Outputs (handles)
+
+| Handle | Shape | Description |
+|--------|-------|-------------|
+| `output-tool` | object | Tool result returned to the LLM (`TaskManagerOutput`, `extra="allow"`) |
+
+### Output payload
+
+```ts
+{
+ success: boolean; // always true on the success path
+ operation?: string; // echoed operation
+ task?: object; // get_task, assign_task and every mutation
+ tasks?: object[]; // list_tasks
+ team?: object; // finish_team
+}
+```
+
+`extra="allow"` lets per-operation extras through: `count` (`list_tasks`),
+`trace` (`inspect_task_trace`), `delegation` + `delegation_request`
+(`assign_task`), and `delegation_request` on `retry_task` / `reassign_task`.
+
## Scope and authorization
The runtime injects workflow, execution, root execution, team, and lead IDs.
diff --git a/docs-internal/node-logic-flows/ai_tools/writeTodos.md b/docs-internal/node-logic-flows/ai_tools/writeTodos.md
index 0a266754..6333537d 100644
--- a/docs-internal/node-logic-flows/ai_tools/writeTodos.md
+++ b/docs-internal/node-logic-flows/ai_tools/writeTodos.md
@@ -2,12 +2,12 @@
| Field | Value |
|------|-------|
-| **Category** | ai_tools (dual-purpose) |
+| **Category** | ai_tools (tool-only ToolNode; group ("tool", "ai")) |
| **Backend handler** | [`server/nodes/tool/write_todos/__init__.py`](../../../server/nodes/tool/write_todos/__init__.py) — `WriteTodosNode`, dispatched via `BaseNode.execute()` + the `@Operation("write")` method (logic inlined; the standalone `services/handlers/todo.py::handle_write_todos` / `execute_write_todos` still exist but are no longer the dispatch path) |
| **Service** | [`server/services/todo_service.py::TodoService`](../../../server/services/todo_service.py) |
| **Tests** | [`server/tests/nodes/test_ai_tools.py`](../../../server/tests/nodes/test_ai_tools.py) |
| **Skill (if any)** | [`server/skills/assistant/write-todos-skill/SKILL.md`](../../../server/skills/assistant/write-todos-skill/SKILL.md) |
-| **Dual-purpose tool** | yes - tool name `write_todos` |
+| **Dual-purpose tool** | ToolNode - tool name `write_todos` |
## Purpose
@@ -47,7 +47,7 @@ generic-params card. `uiHints.isTodoEditor` (declared on the plugin) routes
| Handle | Connection type | Required | Purpose |
|--------|-----------------|----------|---------|
-| (none) | - | - | Passive node - connect `output-tool` to an AI Agent's `input-tools` |
+| `input-main` | main | no | Upstream data (declared but not consumed by the `write` op) |
## Parameters
diff --git a/docs-internal/node-logic-flows/code_fs_process/gallery.md b/docs-internal/node-logic-flows/code_fs_process/gallery.md
index 3eeb9621..b8b2fdb0 100644
--- a/docs-internal/node-logic-flows/code_fs_process/gallery.md
+++ b/docs-internal/node-logic-flows/code_fs_process/gallery.md
@@ -27,6 +27,12 @@ operations; shipping an editor panel must not hand every agent a delete tool as
side effect. If agent-facing delete is ever wanted it belongs on `fileModify`,
where the tool description can be written carefully.
+`ui_hints`: `isGalleryPanel: True, hideInputSection: True`. `hideOutputSection`
+is deliberately absent — the in-code comment in
+[`server/nodes/filesystem/gallery/__init__.py`](../../../server/nodes/filesystem/gallery/__init__.py)
+notes that, unlike `processManager`, this node produces output worth seeing
+and dragging, so the Output section stays.
+
## Inputs (handles)
| Handle | Connection type | Required | Purpose |
diff --git a/docs-internal/node-logic-flows/code_fs_process/processManager.md b/docs-internal/node-logic-flows/code_fs_process/processManager.md
index cff52fef..6a81ef95 100644
--- a/docs-internal/node-logic-flows/code_fs_process/processManager.md
+++ b/docs-internal/node-logic-flows/code_fs_process/processManager.md
@@ -38,7 +38,8 @@ envelope so the framework returns a clean failure.
| `name` | string | `""` | yes (all except `list`) | - | Unique process name within the workflow (LLM `"None"` coerced to empty by `_clean`) |
| `command` | string | `""` | yes (`start` only) | `operation=start` | Command (`ProcessService` parses with `shlex.split`) |
| `cwd` | string | `""` | no | `operation=start` | Working directory; defaults to `<workspace>/<node_id>` |
-| `env` | object (Dict[str,str]) | `{}` | no | `operation=start` | Declared param, but the `dispatch` op does NOT forward it to `svc.start` — currently inert |
+| `ports` | int[] | `[]` | no | `operation=start` | Listener ports reserved before spawn; occupied ports fail with `PORT_IN_USE` instead of launching |
+| `env` | object (Dict[str,str]) | `{}` | no | `operation=start` | Extra environment variables, forwarded to `ProcessService.start(extra_env=...)` |
| `input_text` | string | `""` | yes (`send_input`) | `operation=send_input` | Text to write to stdin (newline auto-appended by the service) |
| `stream` | `stdout`/`stderr` (Literal) | `stdout` | no | `operation=get_output` | Stream to read for `get_output` |
| `tail` | number | `100` (ge=1, le=10000) | no | `operation=get_output` | Tail N lines |
@@ -57,8 +58,7 @@ card listed pre-Wave-11 frontend fields). `get_output` is always called with
### Output payload per operation
The shapes below are whatever `ProcessService` returns (passed through `_unwrap`).
-`node_output_schemas.ProcessManagerOutput` declares `operation` / `pid` /
-`status` / `output` / `processes` (extra fields allowed by `_OutputBase`).
+The plugin's own [`ProcessManagerOutput`](../../../server/nodes/utility/process_manager/__init__.py) declares operation / pid / status / output / processes (`extra="allow"`).
- `start` / `stop` / `restart`: the `ProcessInfo` dict from the service
(`{name, command, pid, status, started_at, exit_code, working_directory,
diff --git a/docs-internal/node-logic-flows/code_fs_process/shell.md b/docs-internal/node-logic-flows/code_fs_process/shell.md
index 73a68a4b..e809e584 100644
--- a/docs-internal/node-logic-flows/code_fs_process/shell.md
+++ b/docs-internal/node-logic-flows/code_fs_process/shell.md
@@ -64,8 +64,7 @@ backend root is `ctx.workspace_dir`.
}
```
-`node_output_schemas.ShellOutput` declares `stdout` / `exit_code` / `truncated`
-/ `command`.
+The plugin's `ShellOutput` (server/nodes/filesystem/shell/__init__.py) declares `stdout` / `exit_code` / `truncated`; `command` rides through on `extra="allow"`.
## Logic Flow
diff --git a/docs-internal/node-logic-flows/language/detectLanguage.md b/docs-internal/node-logic-flows/language/detectLanguage.md
index ec4c23d8..8f49521b 100644
--- a/docs-internal/node-logic-flows/language/detectLanguage.md
+++ b/docs-internal/node-logic-flows/language/detectLanguage.md
@@ -8,22 +8,41 @@
| **Capabilities config** | [`server/config/translate_defaults.json`](../../../server/config/translate_defaults.json) |
| **Tests** | [`server/tests/nodes/test_translate.py`](../../../server/tests/nodes/test_translate.py) |
| **Skill (if any)** | [`server/skills/language_agent/translation-skill/SKILL.md`](../../../server/skills/language_agent/translation-skill/SKILL.md) |
-| **Dual-purpose tool** | yes |
+| **Dual-purpose tool** | yes - tool name `detect_language` |
## Purpose
Identify which language a piece of text is written in, and in which script.
Replaces `sarvamDetectLanguage`.
+## Inputs (handles)
+
+| Handle | Connection type | Required | Purpose |
+|--------|-----------------|----------|---------|
+| `input-main` | main | no | Upstream data injected into params |
+
+Handles are declared visible explicitly (`hide_input_handle = False` /
+`hide_output_handle = False`) because `usable_as_tool = True` otherwise
+auto-hides both.
+
## Parameters
| Name | Type | Default | Description |
|------|------|---------|-------------|
+| `tool_name` | string | `detect_language` | Optional. Override name shown to the LLM when used as a tool |
+| `tool_description` | string | `"Identify which language a piece of text is written in, and in which script. Use before translating when the source language is unknown, or to route text by language."` | Optional. Override description shown to the LLM when used as a tool (`rows: 3`) |
| `provider` | enum | registry-driven | `detect_providers()` — `sarvam` / `openai` |
| `text` | string | - | Text to identify (required) |
| `detect_model` | string | provider default | Loader `detectModels` |
| `provider_options` | object | `{}` | Vendor-specific |
+## Outputs (handles)
+
+| Handle | Shape | Description |
+|--------|-------|-------------|
+| `output-main` | object | `DetectLanguageOutput` payload (fields below); visible because `hide_output_handle = False` |
+| `output-tool` | - | Auto-appended for `usable_as_tool` |
+
## Outputs
`language`, `script`, `confidence` (from providers that report it),
diff --git a/docs-internal/node-logic-flows/language/speechToText.md b/docs-internal/node-logic-flows/language/speechToText.md
index 31dcc47e..ce11f93f 100644
--- a/docs-internal/node-logic-flows/language/speechToText.md
+++ b/docs-internal/node-logic-flows/language/speechToText.md
@@ -26,6 +26,8 @@ Transcribe audio through any configured provider. Replaces the vendor-locked
| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
+| `tool_name` | string | `speech_to_text` | no | Override name shown to the LLM when used as a tool |
+| `tool_description` | string | `"Transcribe an audio file to text. Accepts a workspace path or an audio reference produced by an upstream node. Use when the user asks what was said in a recording, or wants a transcript."` | no | Override description shown to the LLM when used as a tool (`rows: 3`) |
| `provider` | enum | `deepgram` | no | Registry-driven: the enum is `stt_providers()` |
| `audio_file` | string \| AudioRef \| upload | `""` | yes | Widget `file`. Three shapes accepted — see below |
| `stt_model` | string | `""` | no | Blank uses the provider default. **Not** named `model` |
diff --git a/docs-internal/node-logic-flows/language/textToSpeech.md b/docs-internal/node-logic-flows/language/textToSpeech.md
index 82c5b6ff..f8578530 100644
--- a/docs-internal/node-logic-flows/language/textToSpeech.md
+++ b/docs-internal/node-logic-flows/language/textToSpeech.md
@@ -30,6 +30,8 @@ auto-hides both, which would break chaining into `speechToText`.
| Name | Type | Default | Required | Description |
|------|------|---------|----------|-------------|
+| `tool_name` | string | `text_to_speech` | no | Override name shown to the LLM when used as a tool |
+| `tool_description` | string | `"Convert text into spoken audio. Returns a reference to an audio file saved in the workspace, not the audio itself. Use when the user asks for speech, narration, a voiceover or an audio version of some text."` | no | Override description shown to the LLM when used as a tool (`rows: 3`) |
| `provider` | enum | `elevenlabs` | no | Registry-driven: the enum is `tts_providers()` |
| `text` | string | - | yes | Text to speak; capped per provider/model |
| `tts_model` | string | `""` | no | Blank uses the provider default. **Not** named `model` — see below |
diff --git a/docs-internal/node-logic-flows/language/translateText.md b/docs-internal/node-logic-flows/language/translateText.md
index d7da8bfa..38819cf5 100644
--- a/docs-internal/node-logic-flows/language/translateText.md
+++ b/docs-internal/node-logic-flows/language/translateText.md
@@ -8,7 +8,7 @@
| **Capabilities config** | [`server/config/translate_defaults.json`](../../../server/config/translate_defaults.json) |
| **Tests** | [`server/tests/nodes/test_translate.py`](../../../server/tests/nodes/test_translate.py) |
| **Skill (if any)** | [`server/skills/language_agent/translation-skill/SKILL.md`](../../../server/skills/language_agent/translation-skill/SKILL.md) |
-| **Dual-purpose tool** | yes |
+| **Dual-purpose tool** | yes - tool name `translate_text` |
## Purpose
@@ -16,10 +16,22 @@ Translate text through any configured provider. Replaces the vendor-locked
`sarvamTranslate`: the provider is a parameter, so switching from Sarvam to
DeepL never means swapping the node out of a workflow.
+## Inputs (handles)
+
+| Handle | Connection type | Required | Purpose |
+|--------|-----------------|----------|---------|
+| `input-main` | main | no | Upstream data injected into params |
+
+Handles are declared visible explicitly (`hide_input_handle = False` /
+`hide_output_handle = False`) because `usable_as_tool = True` otherwise
+auto-hides both.
+
## Parameters
| Name | Type | Default | Description |
|------|------|---------|-------------|
+| `tool_name` | string | `translate_text` | Optional. Override name shown to the LLM when used as a tool |
+| `tool_description` | string | `"Translate text into another language. Use when the user asks for a translation, or when text must be understood in a different language before further processing."` | Optional. Override description shown to the LLM when used as a tool (`rows: 3`) |
| `provider` | enum | registry-driven | `translate_providers()` — `deepl` / `sarvam` / `openai` |
| `text` | string | - | Text to translate (required) |
| `target_language` | string | provider default | Loader `translateLanguages` |
@@ -30,6 +42,13 @@ DeepL never means swapping the node out of a workflow.
| `preserve_formatting` | boolean | false | Keep line breaks and punctuation |
| `provider_options` | object | `{}` | Vendor-specific, passed through untouched |
+## Outputs (handles)
+
+| Handle | Shape | Description |
+|--------|-------|-------------|
+| `output-main` | object | `TranslateTextOutput` payload (fields below); visible because `hide_output_handle = False` |
+| `output-tool` | - | Auto-appended for `usable_as_tool` |
+
## Outputs
`translated_text`, `detected_source_language`, `provider`, `translate_model`,
diff --git a/docs-internal/node-logic-flows/specialized_agents/claude_code_agent.md b/docs-internal/node-logic-flows/specialized_agents/claude_code_agent.md
index b9514659..f6b81ac1 100644
--- a/docs-internal/node-logic-flows/specialized_agents/claude_code_agent.md
+++ b/docs-internal/node-logic-flows/specialized_agents/claude_code_agent.md
@@ -30,7 +30,7 @@ Standard `std_agent_handles()` topology (same as the generic agents).
|--------|---------|
| `input-main` | Auto-prompt fallback (reads `source.message / text / content / str`) |
| `input-skill` | Connected skill names collected; SKILL.md trees materialised under `<workspace>/.claude/skills/` and exposed to the CLI (not injected into a system prompt) |
-| `input-memory` | When wired, sets `resume_session_id` from the memory node's persisted `last_session_id` so claude emits `--resume <UUID>` and continues its on-disk session; the first run has no UUID yet and the pool mints one via `--session-id` |
+| `input-context` | Context-node opt-in (`ui_hints.requiresContext = True` via `STD_AGENT_HINTS`): a connected `context` node persists the conversation through `SpecializedAgentContextBridge`; `is_context()` tells the descriptor apart from a legacy memory payload (see Decision Logic) |
| `input-tools` | Connected tool nodes exposed to the CLI as `mcp__opencompany__<type>` MCP tools |
| `input-task` | Collected by the edge-walker; `task_data` is unpacked but the 5th element is ignored (`_`) here |
@@ -90,9 +90,9 @@ frontend Input Data panel — a separate, looser schema from the plugin's strict
```mermaid
flowchart TD
A[ClaudeCodeAgentNode.execute_op] --> B[broadcast executing]
- B --> C[collect_agent_connections<br/>memory/skill/tool/input]
- C --> D{memory_data wired?}
- D -- yes --> D1[continue_session = True]
+ B --> C[collect_agent_connections<br/>context/skill/tool/input]
+ C --> D{context_data is a legacy<br/>memory payload, not is_context?}
+ D -- yes --> D1[resume_session_id =<br/>memory_data.last_session_id]
D -- no --> E{params.tasks empty?}
D1 --> E
E -- yes --> F[Resolve prompt:<br/>params.prompt else input_data<br/>message/text/content/str]
@@ -122,10 +122,17 @@ flowchart TD
didn't override; `resume_session_id` is auto-set from the memory node's
`last_session_id` only when memory is wired AND the task didn't explicitly
opt in/out or pick its own UUID.
-- **Memory bridge**: `resume_session_id = memory_data["last_session_id"]`;
- the argv builder emits `--resume <UUID>` (first run has none, so the pool
- mints `--session-id` and `_persist_memory` stores it for next time). NO
- markdown re-injection.
+- **Context vs legacy memory**: `collect_agent_connections` returns one
+ `context_data` slot; `is_context()` marks a Context-node descriptor (handled
+ by `SpecializedAgentContextBridge`), anything else is treated as a legacy
+ memory payload (`memory_data`).
+- **Memory bridge (legacy payload only)**: `resume_session_id =
+ memory_data["last_session_id"]` — the pool reads the persisted
+ `last_session_id` and the argv builder emits `--resume <UUID>` (first run
+ has none, so the pool mints `--session-id` and `_persist_memory` stores it
+ for next time; a stale UUID is cleared when claude reports it not found).
+ Never `--continue`, which skips non-interactive sessions. NO markdown
+ re-injection.
- **Serial-memory guard**: memory wired AND `len(tasks) > 1` -> `NodeUserError`
(parallel `--resume` against one JSONL would corrupt it).
- **Workspace**: `ctx.raw["workspace_dir"]` (injected by workflow.py) or
@@ -157,7 +164,7 @@ flowchart TD
(FastMCP bridge, session pool).
- **Credentials**: Claude Code handles its own authentication via
`CLAUDE_CONFIG_DIR=<DATA_DIR>/claude/` (= `~/.opencompany/claude/` by
- default; see [Claude OAuth](../../claude_code_agent_architecture.md));
+ default; see [Claude OAuth](../../ARCHIVE/claude_code_agent_architecture.md));
OpenCompany does not inject an API key.
## Edge cases & known limits
@@ -187,4 +194,4 @@ flowchart TD
- **Generic pattern**: [`_pattern.md`](./_pattern.md)
- **Architecture**: [CLI Agent Framework](../../cli_agent_framework.md),
[Claude Code Interactive Mode](../../claude_code_interactive_mode.md),
- [Claude Code Agent](../../claude_code_agent_architecture.md)
+ [Claude Code Agent](../../ARCHIVE/claude_code_agent_architecture.md)
diff --git a/docs-internal/node-logic-flows/web_automation/tikhubAction.md b/docs-internal/node-logic-flows/web_automation/tikhubAction.md
index 291990a6..13b365c0 100644
--- a/docs-internal/node-logic-flows/web_automation/tikhubAction.md
+++ b/docs-internal/node-logic-flows/web_automation/tikhubAction.md
@@ -53,6 +53,7 @@ avoided (name-based magic in `ParameterRenderer.tsx`).
| Handle | Shape | Description |
|--------|-------|-------------|
| `output-main` | object | `_shape(operation, **fields)` payload (see below); the same payload is returned to the LLM when wired to `input-tools` |
+| `output-tool` | - | Auto-appended for `usable_as_tool` |
### Output payload
diff --git a/docs-internal/node-logic-flows/whatsapp_business/whatsappBusinessSend.md b/docs-internal/node-logic-flows/whatsapp_business/whatsappBusinessSend.md
index 7c5875fb..dbeea744 100644
--- a/docs-internal/node-logic-flows/whatsapp_business/whatsappBusinessSend.md
+++ b/docs-internal/node-logic-flows/whatsapp_business/whatsappBusinessSend.md
@@ -25,7 +25,7 @@ group.
| Handle | Connection type | Required | Purpose |
|--------|-----------------|----------|---------|
-| `input-main` | main | no | Upstream data for template substitution into `to`, `text`, etc. |
+| `input-main` | main | no | Declared, but `hideInputHandle` is auto-set (`usable_as_tool = True`, class does not declare `hide_input_handle`) |
## Parameters
@@ -68,6 +68,7 @@ There is deliberately **no `phone_number_id` parameter** — see Edge cases.
| Handle | Shape | Description |
|--------|-------|-------------|
| `output-main` | object | Send result, or the template list |
+| `output-tool` | - | Auto-appended for `usable_as_tool` |
### Output payload (TypeScript shape)
diff --git a/docs-internal/node-logic-flows/workflow_triggers/taskTrigger.md b/docs-internal/node-logic-flows/workflow_triggers/taskTrigger.md
index 90e30599..2ce8d2ec 100644
--- a/docs-internal/node-logic-flows/workflow_triggers/taskTrigger.md
+++ b/docs-internal/node-logic-flows/workflow_triggers/taskTrigger.md
@@ -57,16 +57,13 @@ Declared `TaskTriggerOutput` fields:
result?: string; // Present when status='completed'
error?: string; // Present when status='error'
workflow_id?: string;
- team_id?: string;
- execution_id?: string;
- root_execution_id?: string;
- trace_id?: string;
}
```
`TaskTriggerOutput` is `model_config extra="allow"`, so the producer's extra
-fields (`agent_node_id`, `parent_node_id`) pass through to downstream nodes at
-runtime even though they are not declared on the model. Wrapped in the standard
+fields (`agent_node_id`, `parent_node_id`, `team_id`, `execution_id`,
+`root_execution_id`, `trace_id`) pass through to downstream nodes at runtime
+even though they are not declared on the model. Wrapped in the standard
envelope.
## Logic Flow
diff --git a/docs-internal/node_creation.md b/docs-internal/node_creation.md
index 6e2ce85e..7215070d 100644
--- a/docs-internal/node_creation.md
+++ b/docs-internal/node_creation.md
@@ -263,15 +263,19 @@ What you **do** still write:
## Wave summary (current state)
- **Wave 11** — Class-based plugin system. 9 Temporal worker pools;
- plugin count via `glob server/nodes/**/__init__.py`; invariant total
- via `pytest --collect-only`. `services/handlers/` shrank from
+ plugin count via `len(services.node_registry.NODE_METADATA)` after
+ `import nodes` (a bare `**/__init__.py` glob overcounts because it also
+ matches the group packages); invariant total via `pytest --collect-only`. `services/handlers/` shrank from
12.8K → 1.1K LOC.
-- **Wave 11.H** — Self-contained plugin folders. Eighteen generic
- registries (live list: `grep -rn '^def register_' server/services server/core`)
- replace per-plugin hardcoding in core (five at 11.H;
- `register_router` landed in 11.I), plus newer `register_*`
- entrypoints for webhook sources / option loaders / OAuth callback
- paths / canary trigger types. Telegram is the reference.
+- **Wave 11.H** — Self-contained plugin folders. Five generic
+ registries at 11.H, `register_router` at 11.I; the set has since
+ grown to 19 (webhook sources, option loaders, OAuth callback paths,
+ canary trigger types, poll factories, social send handlers, shutdown
+ hooks, service factories, log-source tags, conversation listeners,
+ process supervisors, master-skill expander, agent-context builder).
+ Live list: the registry table in
+ [plugin_system.md](./plugin_system.md#self-contained-plugin-folders). Telegram
+ is the reference.
- **Wave 12** — Generalized event framework
([`services/events/`](../server/services/events/)). `EventSource`
hierarchy + CloudEvents-shaped envelope + verifier registry +
diff --git a/docs-internal/performance.md b/docs-internal/performance.md
index f890c5a5..f793db77 100644
--- a/docs-internal/performance.md
+++ b/docs-internal/performance.md
@@ -19,7 +19,7 @@ warm OS file cache, with bytecode pre-compile applied:
| Status broadcasters fully settled | **12.27 s** | same |
| AIService import (warm) | **703 ms** | same — was ~31 s on v0.0.75 |
| Application startup complete (cold, post-`company clean` first launch) | **21.5 s** | `cold.txt` 18:44 (2026-07-14, post boot-delay fixes; was **71 s** the same day pre-fix) |
-| LLM provider registration (all 12, cold) | **17 ms** | same — was 44.6 s pre-fix (eager SDK imports) |
+| LLM provider registration (all 13, cold) | **17 ms** | same — was 44.6 s pre-fix (eager SDK imports) |
| Vite production build | **~16 s** | last `vite build` run |
| Vite main bundle | **234 KB gz** | `client/dist/assets/index-*.js` |
@@ -51,16 +51,17 @@ workspace and launches the `company` CLI; everything after spawn
(uvicorn imports, lifespan, Vite on Node 22) is byte-identical. The
extra ~0.7 s sits entirely in the import phase — "all imports complete"
at 3.29 s vs 1.98 s in the May timeline, and the routers + plugin-walker
-segment at 1.83 s vs 0.84 s — because the walker now loads **184**
+segment at 1.83 s vs 0.84 s — because the walker now loads **185**
plugin modules against the **137** it walked in May. Lifespan cost is
unchanged.
**Counting rule for every plugin figure in this document.** The numbers
-(137 in May, 152 in July, 184 in September 2026) are the walker's
+(137 in May, 152 in July, 185 in September 2026) are the walker's
*module* count — the `node plugins loaded: N modules` log line from
`server/nodes/__init__.py`, i.e. `len(nodes._DISCOVERED)`, which
-includes `_*.py` helpers and per-folder submodules. They are **not**
-node-type counts: `len(services.node_registry.NODE_METADATA)` is 147
+counts every non-private module and subpackage (`_*.py` helpers and
+`_*/` subpackages are skipped by `_discover()`). They are **not**
+node-type counts: `len(services.node_registry.NODE_METADATA)` is 148
today, spread across 37 group folders under `server/nodes/`. Both are
computed from the tree; neither is hand-maintained here. The dev-mode rows were never benchmarked before (Vite and
uvicorn compete for I/O during a dev boot, so they are not comparable
@@ -148,7 +149,7 @@ same-day pre-fix cold boot in parentheses:
```
T+0.00 — port-free begin
T+2.6 — container: core imports done (was 10.2 s → 1.2 s segment)
-T+3.2 — AIService imported, 12 providers in 17 ms (was 44.6 s segment)
+T+3.2 — AIService imported, 13 providers in 17 ms (was 44.6 s segment)
T+8.7 — 152 node plugins loaded (was 10.8 s → 4.7 s segment)
T+11.9 — Lifespan startup begin (3.2 s gap: CLI-agent MCP mount)
T+21.5 — Application startup complete (lifespan 9.6 s: fresh-DB init 4.4 s,
@@ -204,7 +205,7 @@ optimisations above; sum is what hurts.
| # | Bottleneck | Cost | Class | Notes |
|---|---|---|---|---|
-| 1 | Plugin walker at import time (152 modules under `server/nodes/` at the July measurement, 184 today — see the counting rule above; ~2 s warm / ~4.7 s cold, dominated by `nodes/google`'s eager `googleapiclient` import) | ~2 s | Backend | `_HANDLER_REGISTRY` populates via `BaseNode.__init_subclass__` at import. Lazy `googleapiclient` is the cheap win (see follow-ups); full lazy-loading of the walker is the big-blast-radius option. |
+| 1 | Plugin walker at import time (152 modules under `server/nodes/` at the July measurement, 185 today — see the counting rule above; ~2 s warm / ~4.7 s cold, dominated by `nodes/google`'s eager `googleapiclient` import) | ~2 s | Backend | `_HANDLER_REGISTRY` populates via `BaseNode.__init_subclass__` at import. Lazy `googleapiclient` is the cheap win (see follow-ups); full lazy-loading of the walker is the big-blast-radius option. |
| 2 | TanStack Query auth bootstrap retry window | ~3-5 s | Frontend | See "remaining +5 s gap" above. |
| 3 | AIService/native orchestration import graph | ~0.7 s | Backend | Historical May baseline; new agent execution uses native `Message` / `AgentToolSpec` values and provider registration remains lazy. Re-measure before attributing this cost further. |
| 4 | Status-broadcaster refresh (`refresh_all_services`, 2.6 s) | ~2.6 s | Backend | Runs after `Application startup complete`, doesn't block server-ready. WhatsApp + Telegram are the long tails. |
diff --git a/docs-internal/plugin_system.md b/docs-internal/plugin_system.md
index f8827487..56ef9a4d 100644
--- a/docs-internal/plugin_system.md
+++ b/docs-internal/plugin_system.md
@@ -551,7 +551,7 @@ themselves** into those registries from their package `__init__.py`.
```
server/nodes/telegram/
-├── __init__.py # imports + register_* calls covering seven registries (no logic)
+├── __init__.py # imports + register_* calls covering seven of the generic registries (no logic)
├── _credentials.py # TelegramCredential (ApiKeyCredential)
├── _service.py # TelegramService singleton (bot lifecycle)
├── _handlers.py # WebSocket handlers + WS_HANDLERS dict
@@ -566,7 +566,7 @@ Underscore-prefixed files are package-private; the `nodes` walker
skips them. The two non-underscore files are the plugin classes (one
per node type) — same pattern as every other folder.
-### Cross-cutting registries (18 at time of writing; live list: `grep -rn '^def register_' server/services server/core`) — use only what your plugin needs
+### Cross-cutting registries (19 at time of writing, hand-curated below; `grep -rn '^def register_' server/services server/core` also lists the node / group / provider / session-pool registration internals) — use only what your plugin needs
| Concern | Registry module | Register from plugin via |
|---|---|---|
@@ -588,13 +588,14 @@ per node type) — same pattern as every other folder.
| Service factory for the DI container (`container.<name>()` resolves to a plugin-owned service) | `services.plugin.service_factories` | `register_service_factory(name, factory)` |
| Short Terminal-UI log tag for a logger-name prefix (only when the `nodes.<plugin>` auto-rule yields an unwanted tag) | `core.logging` | `register_log_source_tag(prefix, tag)` |
| Callback fired after a conversation durably saves (RFC-0002 Context live-view) | `services.agent_context.listeners` | `register_conversation_listener(listener)` — keyword-args only; a listener can never fail a save. |
+| Long-lived process supervisor (WhatsApp bridge, Node sidecar, Discord gateway) | `services._supervisor` | `register_supervisor(supervisor)` — idempotent per `supervisor.label`; a label collision raises `ValueError`. |
All accept idempotent re-imports (same callable / class for the
same key is a no-op; conflicts raise `ValueError`).
-**Plugins use only the registries they need.** Telegram uses 5 (no
+**Plugins use only the registries they need.** Telegram uses 7 (no
router); Stripe uses 4 (webhook-driven, no filter/precheck); Android
-uses 4 (with router); WhatsApp uses 5. There is no "register every
+uses 6 (with router); WhatsApp uses 8. There is no "register every
hook" rule.
### Telegram `__init__.py` (canonical wiring)
diff --git a/docs-internal/pricing_service.md b/docs-internal/pricing_service.md
index ffdc634c..cbc6a734 100644
--- a/docs-internal/pricing_service.md
+++ b/docs-internal/pricing_service.md
@@ -61,14 +61,14 @@ The pricing service provides centralized cost tracking for both LLM tokens and e
## Configuration: pricing.json
-Located at `server/config/pricing.json`. User-editable with hot-reload support.
+Located at `server/config/pricing.json`. User-editable; picked up via `PricingService.reload()` or `save_config()`; there is no filesystem watcher.
### Structure
```json
{
- "version": "2026.02",
- "last_updated": "2026-02-20",
+ "version": "2026.07",
+ "last_updated": "2026-07-25",
"llm": {
"openai": {
@@ -275,12 +275,12 @@ await track_twitter_usage(node_id, 'search', len(tweets), ctx_raw)
### Example: Google Workspace Plugins
-The 6 Google service plugins (`server/nodes/google/{gmail,calendar,drive,sheets,tasks,contacts}`) plus `gmail_receive` call `track_google_usage()` on `server/nodes/google/_base.py`. Google Workspace APIs are free within rate limits, so this records resource counts at `cost=$0` for analytics.
+The 6 Google service plugins (`server/nodes/google/{gmail,calendar,drive,sheets,tasks,contacts}`) plus `gmail_receive` call `track_google_usage()` on `server/nodes/google/_base.py`. Google Workspace APIs are free within rate limits, so this records resource counts at `cost=$0` for analytics; `service` must be the pricing key (`gmail`, `google_calendar`, `google_drive`, `google_sheets`, `google_tasks`, `google_contacts`), not the folder name.
```python
# server/nodes/google/_base.py
-async def track_google_usage(node_id, service, action, resource_count, context):
+async def track_google_usage(service, node_id, action, resource_count, context):
pricing = get_pricing_service()
cost_data = pricing.calculate_api_cost(service, action, resource_count)
# ... save to database ...
diff --git a/docs-internal/proxy_service.md b/docs-internal/proxy_service.md
index 162b16f5..0fe8cb4b 100644
--- a/docs-internal/proxy_service.md
+++ b/docs-internal/proxy_service.md
@@ -76,7 +76,7 @@ httpx.AsyncClient(proxy=proxy_url)
## Proxy Nodes (3)
### proxyRequest
-Direct proxy HTTP request with full controls. Parameters: method, url, headers, body, timeout, proxyProvider, proxyCountry, sessionType (rotating/sticky), stickyDuration, maxRetries, followRedirects. Includes retry/failover loop and result reporting to health scorer.
+Direct proxy HTTP request with full controls. Parameters: method, url, headers, body, timeout, proxy_provider, proxy_country, session_type (rotating/sticky), sticky_duration, max_retries, follow_redirects. Includes retry/failover loop and result reporting to health scorer.
### proxyConfig
Dual-purpose node (workflow + AI tool). Operations:
@@ -84,7 +84,7 @@ Dual-purpose node (workflow + AI tool). Operations:
| Operation | Required Params | Description |
|-----------|----------------|-------------|
| `list_providers` | none | List all configured providers |
-| `add_provider` | name, gateway_host, gateway_port, url_template | Add provider with JSON template |
+| `add_provider` | Required: name. Practically also: gateway_host, gateway_port, url_template. | Add provider with JSON template |
| `update_provider` | name + fields | Update existing provider |
| `remove_provider` | name | Delete provider |
| `set_credentials` | name, username, password | Store proxy credentials via AuthService |
@@ -192,7 +192,7 @@ A provider is considered unhealthy when its success rate drops below 30%. The la
## Provider Selection Priority
-1. **Explicit**: `parameters.proxyProvider` specified by user/node
+1. **Explicit**: `parameters["proxy_provider"]` specified by user/node
2. **Routing rule**: Domain matches a rule with `preferred_providers`
3. **Best score**: Auto-select highest-scoring healthy provider
@@ -269,9 +269,9 @@ On startup, `ProxyService.startup()` loads providers from the DB and `_load_prov
Environment variables in `server/.env`:
```bash
-PROXY_ENABLED=true # Enable proxy service
+PROXY_ENABLED=true # declared in core/config.py (default false) but NOT a gate; is_enabled() returns _initialized
PROXY_DEFAULT_COUNTRY= # Default country code (empty = no default)
-PROXY_BUDGET_DAILY_USD= # Daily spend limit (empty = unlimited)
+PROXY_BUDGET_DAILY_USD=50 # Daily spend limit in USD (default 50.0; always enforced)
```
## Service Lifecycle
diff --git a/docs-internal/release_build_pipeline.md b/docs-internal/release_build_pipeline.md
index 001a1656..5d4fbe82 100644
--- a/docs-internal/release_build_pipeline.md
+++ b/docs-internal/release_build_pipeline.md
@@ -109,7 +109,7 @@ Keep `sourcemap: analyze` (already correct), keep React Compiler config.
### 3. Node sidecar esbuild bundle
- `server/nodejs/package.json` → add `esbuild` devDep; replace scripts:
- - `"build": "esbuild src/index.ts --bundle --platform=node --target=node22 --format=esm --packages=external --outfile=dist/index.js"`
+ - `"build": "esbuild src/index.ts --bundle --platform=node --target=node18 --format=esm --packages=external --outfile=dist/index.js"` (kept in sync with `engines.node` by `test_sidecar_engines_match_esbuild_target`)
- `"start": "node dist/index.js"` (was `tsx src/index.ts`)
- keep `"dev": "tsx watch src/index.ts"`
- `server/nodejs/.gitignore` → new file: `dist/`
diff --git a/docs-internal/sarvam_service.md b/docs-internal/sarvam_service.md
index 2a6b97b4..84abb0db 100644
--- a/docs-internal/sarvam_service.md
+++ b/docs-internal/sarvam_service.md
@@ -104,8 +104,8 @@ Sarvam runs reasoning **on by default** at `reasoning_effort: "medium"` and
returns the trace in `message.reasoning_content`. Both halves are already
handled generically:
-- `thinking_type: "effort"` → [`openai.py:99-100`](../server/services/llm/providers/openai.py) sets `params["reasoning_effort"]`
-- `reasoning_content` → [`openai.py:315-322`](../server/services/llm/providers/openai.py) lifts it into a `reasoning` `ContentBlock`, surfacing as `thinking`
+- `thinking_type: "effort"` → [`openai.py:101-104`](../server/services/llm/providers/openai.py) sets `params["reasoning_effort"]`
+- `reasoning_content` → [`openai.py:365-371`](../server/services/llm/providers/openai.py) lifts it into a `reasoning` `ContentBlock`, surfacing as `thinking`
Two keys are **deliberately omitted** from the JSON block, and re-adding either
is a bug:
@@ -128,7 +128,7 @@ This matters more than it sounds. `OpenAIProvider.fetch_models` calls
`client.models.list()`; the resulting 404 arrives as an `openai.OpenAIError`,
which `ChatUnifier.fetch_models` converts to `NodeUserError`, which
`AIService.fetch_models` **re-raises before reaching its curated fallback**
-([`ai.py:1232`](../server/services/ai.py)). Unhandled, a perfectly valid Sarvam
+([`ai.py:696`](../server/services/ai.py)). Unhandled, a perfectly valid Sarvam
key would fail validation in the Credentials modal *and* leave the model
dropdown empty.
@@ -216,7 +216,7 @@ duration instead.
### The mark itself
-The three SVGs carry Sarvam's **official mandala mark**, taken verbatim from
+The two SVGs carry Sarvam's **official mandala mark**, taken verbatim from
their published brand asset
(`https://assets.sarvam.ai/assets/brand/logos/sarvam-logo-black.svg`) — the
same geometry they ship as `sarvam.ai/favicon.svg`. Path data was extracted
@@ -289,7 +289,7 @@ Everything Sarvam touches, for reference when adding the next provider:
## Known limits
-- Speech-to-text: 30-second clips only (Batch API not wired); no diarization.
+- Speech-to-text: synchronous endpoint only (Batch API not wired); no timestamps, no diarization.
- No streaming for chat, TTS or STT — the WebSocket/HTTP-stream surfaces are not wired.
- Document digitization, pronunciation dictionaries and voice cloning are out of scope.
- `wiki_grounding` (a Sarvam-specific chat param) is **not exposed**: an extra
diff --git a/docs-internal/speech_provider_rfc.md b/docs-internal/speech_provider_rfc.md
index 976deebe..1282d593 100644
--- a/docs-internal/speech_provider_rfc.md
+++ b/docs-internal/speech_provider_rfc.md
@@ -25,10 +25,10 @@ big**. That constraint, measured rather than assumed, drives nearly every decisi
| Temporal blob **error** — activity result, activity **input**, workflow result | **2,097,152 B** | server default; no custom `DataConverter` or `PayloadCodec` anywhere in the repo |
| Temporal blob **warning** | 524,288 B → `PayloadSizeWarning` | not covered by `pyproject.toml` `filterwarnings`, so it surfaces |
| Retries burned before the failure is reported | **3** | `_PayloadSizeError` absent from `NON_RETRYABLE_ERROR_TYPES` ([`_retry_policies.py:51`](../server/services/temporal/_retry_policies.py)) |
-| Legacy `execute_node_activity` internal WS | 4 MiB inbound (aiohttp default, `max_msg_size` unset) | [`activities.py:242`](../server/services/temporal/activities.py) |
-| `node_outputs.data` | no cap; written **3×** per store (`output_main`/`output_top`/`output_0`) | [`activities.py:486`](../server/services/temporal/activities.py) |
-| WS broadcast | no size guard; retained in `_status` **forever** and replayed to every newly connecting client | [`status_broadcaster.py:87,688`](../server/services/status_broadcaster.py) |
-| In-memory `_outputs` | never evicted except by `clear_all_outputs` | [`workflow.py:577`](../server/services/workflow.py) |
+| Legacy `execute_node_activity` internal WS | 4 MiB inbound (aiohttp default, `max_msg_size` unset) | [`activities.py:243`](../server/services/temporal/activities.py) |
+| `node_outputs.data` | no cap; written **3×** per store (`output_main`/`output_top`/`output_0`) | [`activities.py:488`](../server/services/temporal/activities.py) |
+| WS broadcast | no size guard; retained in `_status` **forever** and replayed to every newly connecting client | [`status_broadcaster.py:90,683`](../server/services/status_broadcaster.py) |
+| In-memory `_outputs` | never evicted except by `clear_all_outputs` | [`workflow.py:74,766`](../server/services/workflow.py) |
### What actually happens to a 12 MB base64 TTS result
diff --git a/docs-internal/status_broadcaster.md b/docs-internal/status_broadcaster.md
index a75d6e6c..82c20a94 100644
--- a/docs-internal/status_broadcaster.md
+++ b/docs-internal/status_broadcaster.md
@@ -34,14 +34,21 @@ StatusBroadcaster (server/services/status_broadcaster.py)
+-- connection set: Set[WebSocket]
+-- current status: Dict[str, Any]
| |-- android: {connected, paired, device_id, ...}
+ | |-- twitter: {connected, username, user_id, ...}
+ | |-- google: {connected, email, name, ...}
+ | |-- telegram: {connected, bot_id, bot_username, ...}
+ | |-- api_keys: {provider: validation status}
| |-- nodes: {node_id: {status, output, error, ...}}
| |-- variables: {name: value}
- | `-- workflow: {executing, current_node, progress}
+ | |-- workflow: {executing, current_node, progress}
+ | |-- workflow_lock: {locked, workflow_id, locked_at, reason}
+ | `-- deployment: {isRunning, activeRuns, status, workflow_id}
|
+-- connect(ws) -> accept + send initial_status
+ | + deployment_snapshot CloudEvent (_send_deployment_snapshot)
+-- disconnect(ws) -> remove from set
- +-- update_*(...) -> mutate state + _broadcast()
- +-- _broadcast(msg) -> fan out to all connected clients
+ +-- update_*(...) -> mutate state + broadcast()
+ +-- broadcast(msg) -> fan out to all connected clients
```
## Connection Lifecycle
@@ -156,7 +163,7 @@ per save. Same pattern as `nodes/telegram/_events.py`. See
[event_framework.md → UI-only lifecycle events](./event_framework.md).
Payloads are identity + count only — no message bodies, no item content —
-because `_broadcast_in_process` fans out to **every** connected socket with no
+because `StatusBroadcaster.broadcast()` fans out to **every** connected socket with no
per-workflow filtering. The panels refetch through the authorized
`get_agent_context` / `list_memory_items` handlers, which is where ownership
is enforced.
diff --git a/docs-internal/stripe_service.md b/docs-internal/stripe_service.md
index 0344cb49..65a1be50 100644
--- a/docs-internal/stripe_service.md
+++ b/docs-internal/stripe_service.md
@@ -71,7 +71,7 @@ StripeWebhookSource.handle(request)
│
├── shape(request, body, payload)
│ → WorkflowEvent(id=evt_…, type="stripe.charge.succeeded",
- │ source="stripe://acct_…", data=payload)
+ │ source="stripe://acct_…", data=payload["data"])
│
└── event_waiter.dispatch(source.type, event)
▼
@@ -88,9 +88,10 @@ StripeActionNode.run(params)
shlex.split(command)
│ → ["customers", "create", "--email", "[email protected]"]
▼
-run_cli_command(binary="stripe", argv=…) # NO credential= injection
+ensure_stripe_cli() → absolute binary path
+ ▼
+run_cli_command(binary=<abs path>, argv=…) # NO credential= injection
│
- ├── shutil.which("stripe") → resolves binary on PATH
├── asyncio.create_subprocess_exec(
│ binary, *argv, # plain argv, no --api-key
│ stdout=PIPE, stderr=PIPE,
@@ -218,7 +219,7 @@ StripeListenSource.stop()
| `server/nodes/stripe/_install.py` | `ensure_stripe_cli()` — async, idempotent, lock-guarded. Resolves the binary path: in-process cache → system PATH → previously-downloaded copy at `<DATA_DIR>/packages/stripe/bin/stripe[.exe]` (`core.paths.package_dir("stripe") / "bin"`) → fresh download from GitHub releases (pinned `_VERSION = "1.40.9"`) into that same dir. Asset-name map covers Windows AMD64, Linux x86_64/arm64, macOS x86_64/arm64. Subsequent calls hit the cache instantly. |
| `server/skills/payments_agent/stripe-skill/SKILL.md` | LLM teaching markdown for the `stripe_action` tool. ~10K chars covering customers, charges, payment_intents, refunds, invoices, products/prices, subscriptions, the `trigger` command, common workflows, quoting/escaping, idempotency, test vs live mode, error patterns, and webhook delivery. |
| `server/config/credential_providers.json` | JSON-driven Credentials Modal catalogue. The `payments` category + `stripe` provider entry tell the frontend modal to render a **Login with Stripe** button (no API-key field) wired to the `stripe_login` / `stripe_logout` / `stripe_status` WebSocket handlers. No React file edits required. |
-| `server/services/ai.py` | `DEFAULT_TOOL_NAMES['stripeAction'] = 'stripe_action'` and the matching tool-description entry — what the LLM sees when the action node is wired to an agent's `input-tools` handle. |
+| `server/nodes/stripe/stripe_action.py` | `tool_name = "stripe_action"` ClassVar (resolved via `services/node_registry.py`) and the matching `tool_description` — what the LLM sees when the action node is wired to an agent's `input-tools` handle. |
| `server/nodes/stripe/_source.py` | `StripeListenSource(DaemonEventSource)` and `StripeWebhookSource(WebhookSource)` plus their singletons. |
| `server/nodes/stripe/_handlers.py` | WS handlers via `make_lifecycle_handlers`; the only plugin-specific handler is `stripe_trigger` (synthetic test events). |
| `server/nodes/stripe/stripe_action.py` | `StripeActionNode` — pass-through over the CLI via `run_cli_command`. |
@@ -232,11 +233,11 @@ StripeListenSource.stop()
| `server/services/events/lifecycle.py` | `make_lifecycle_handlers` + `make_status_refresh`. |
| `server/services/events/verifiers/stripe.py` | `StripeVerifier` (`t=…,v1=…` HMAC-SHA256). |
| `server/routers/webhook.py` | Path-handler arm: consults `WEBHOOK_SOURCES` before falling through to legacy generic dispatch. |
-| `server/nodes/visuals.json` | `stripeAction` / `stripeReceive` icon + color (`asset:stripe`, `#635BFF`). |
+| `server/nodes/visuals.json` | `stripeAction` skill map only (`{"skill": "stripe-skill"}`); no `stripeReceive` key. The `asset:stripe` icon and `#635BFF` colour come from `nodes/groups.py` (`payments` group) and `nodes/stripe/meta.json`. |
| `server/nodes/groups.py` | `payments` palette group. |
| `server/credentials/icons/stripe.svg` | Stripe credential-tile icon, served at `/api/schemas/credentials/stripe/icon`. |
-| `server/tests/services/test_events.py` | 18 framework tests (envelope, verifiers, polling/daemon lifecycle, WebhookSource). |
-| `server/tests/nodes/test_stripe_plugin.py` | 21 Stripe-specific tests (shape, filter, action passthrough, registrations). |
+| `server/tests/services/test_events.py` | 27 framework tests (envelope, verifiers, polling/daemon lifecycle, WebhookSource). |
+| `server/tests/nodes/test_stripe_plugin.py` | 20 Stripe-specific tests (shape, filter, action passthrough, registrations). |
## Plugin classes
@@ -261,7 +262,9 @@ class StripeCredential(Credential):
@classmethod
async def resolve(cls, *, user_id: str = "owner") -> Dict[str, Any]:
- secret = await container.auth_service().get_api_key("stripe_webhook_secret")
+ from services.plugin.deps import get_auth_service
+
+ secret = await get_auth_service().get_api_key("stripe_webhook_secret")
return {"stripe_webhook_secret": secret} if secret else {}
```
@@ -319,7 +322,7 @@ class StripeWebhookSource(WebhookSource):
type=f"stripe.{payload.get('type', 'unknown')}",
source=f"stripe://{account}",
time=time,
- data=payload,
+ data=payload.get("data") or {},
subject=payload.get("type"),
)
```
@@ -396,7 +399,8 @@ class StripeActionNode(ActionNode):
raise RuntimeError("command is required")
# No credential= — Stripe CLI reads its own creds from
# ~/.config/stripe/config.toml after `stripe login`.
- result = await run_cli_command(binary="stripe", argv=shlex.split(cmd))
+ binary = str(await ensure_stripe_cli())
+ result = await run_cli_command(binary=binary, argv=shlex.split(cmd))
if not result["success"]:
raise RuntimeError(result.get("error") or "Stripe CLI invocation failed")
return {
@@ -457,7 +461,7 @@ their target:
| Place | Value | File |
|---|---|---|
| Node `type` (camelCase) | `stripeAction` | [`server/nodes/stripe/stripe_action.py`](../server/nodes/stripe/stripe_action.py) |
-| LLM tool name (snake_case of node type) | `stripe_action` | [`server/services/ai.py`](../server/services/ai.py) — `DEFAULT_TOOL_NAMES['stripeAction'] = 'stripe_action'` |
+| LLM tool name (snake_case of node type) | `stripe_action` | [`server/nodes/stripe/stripe_action.py`](../server/nodes/stripe/stripe_action.py) — `tool_name = "stripe_action"` (resolved via `services/node_registry.py`) |
| Skill `allowed-tools` (matches LLM tool name) | `stripe_action` | [`server/skills/payments_agent/stripe-skill/SKILL.md`](../server/skills/payments_agent/stripe-skill/SKILL.md) |
| `visuals.json` key (= node type) | `stripeAction` with `"skill": "stripe-skill"` | [`server/nodes/visuals.json`](../server/nodes/visuals.json) |
@@ -517,8 +521,7 @@ Stripe is wired into the JSON-driven Credentials Modal catalogue at
"category": "payments",
"color": "dracula.purple",
"kind": "oauth",
- "icon_ref": "asset:stripe",
- "status_hook": "stripe",
+ "icon_ref": "/api/schemas/credentials/stripe/icon",
"ws": {
"login": "stripe_login",
"logout": "stripe_logout",
@@ -583,7 +586,7 @@ existing generic mechanisms:
[`server/routers/websocket.py:handle_get_credential_catalogue`](../server/routers/websocket.py)
enriches every provider with `stored: bool`. For providers that
-declare `status_hook` (Twitter, Google, Telegram, Stripe), the check is:
+declare `status_hook` (Twitter, Google, Telegram), the check is:
```python
tokens = await auth_service.get_oauth_tokens(status_hook)
@@ -618,7 +621,7 @@ already use. The contract is locked by
introspection over each handler).
`WebSocketContext.tsx` already has a generic case for this event
-(line 671 — predates Stripe). Its handler calls `invalidateCatalogue`
+(line 1003 — predates Stripe). Its handler calls `invalidateCatalogue`
on the TanStack Query client; the catalogue refetches; the modal
sees the new `provider.stored` value and re-renders. **No
stripe-specific code anywhere on the frontend.**
@@ -695,7 +698,7 @@ class attributes:
| Knob | Where | Default |
|---|---|---|
| Daemon process name | `StripeListenSource.process_name` | `"stripe-listen"` |
-| Binary name | `StripeListenSource.binary_name` | `"stripe"` |
+| Binary name | `StripeListenSource.binary_name` | `""` (empty; disables the framework PATH check) |
| Daemon process key | `StripeListenSource.workflow_namespace` | `"_stripe"` (logical `ProcessService` key; cwd is the shared `daemons_dir()` = `<DATA_DIR>/daemons/`, not a per-namespace subdir) |
| Webhook path | `StripeWebhookSource.path` | `"stripe"` (i.e. `/webhook/stripe`) |
| Forward-to port | derived from `Settings().port` | the app port (`PYTHON_BACKEND_PORT`) |
@@ -718,8 +721,9 @@ provides:
- **Disconnect** button → fires `stripe_logout`, which stops the
daemon and runs `stripe logout --all` to clear
`~/.config/stripe/config.toml`.
-- **Status indicator** — driven by the `stripe_status` broadcast
- (`connected`, `webhook_secret_captured`).
+- **Status indicator** — derived from the catalogue's `config.stored`
+ (`OAuthPanel.tsx:22`); the `stripe_status` WS handler is a read-only
+ diagnostic poll.
- **Reconnect** button — issues `stripe_reconnect` for stuck states.
No webhook-secret input is needed — the daemon captures it
@@ -770,8 +774,8 @@ by id.
If `stripe listen` exits unexpectedly, the framework surfaces the
disconnected status and waits for the user to reconnect via the
-Credentials Modal. The `_capture_secret` task hits EOF on the log
-file and exits cleanly. There's no exponential-backoff respawn loop
+Credentials Modal. The per-line `parse_line` callback simply stops
+receiving lines when `ProcessService` reaps the process. There's no exponential-backoff respawn loop
— that's deliberate to keep failing daemons visible rather than
hidden behind silent retries.
@@ -812,13 +816,13 @@ End-to-end smoke (requires Stripe CLI installed and a Stripe account):
`process_service.list_processes("_stripe_global")` is empty AND
`~/.config/stripe/config.toml` no longer contains an `_api_key`
line.
-9. **Auto-reconnect.** Restart OpenCompany. If still logged in
- (`is_logged_in()` returns true), the first WS-client connect
- triggers `make_status_refresh` which auto-spawns the daemon.
+9. **Restart.** Restart OpenCompany. The status refresh does NOT
+ auto-spawn the daemon; start it via the modal's Connect
+ (`stripe_connect`) or by deploying a workflow with a Stripe trigger.
Unit tests live in [`server/tests/nodes/test_stripe_plugin.py`](../server/tests/nodes/test_stripe_plugin.py)
(20 collected cases at time of writing) and [`server/tests/services/test_events.py`](../server/tests/services/test_events.py)
-(29 framework tests; counts via `pytest --collect-only -q`). Run via `pytest server/tests/services/test_events.py
+(27 framework tests; counts via `pytest --collect-only -q`). Run via `pytest server/tests/services/test_events.py
server/tests/nodes/test_stripe_plugin.py -v`.
## Related Docs
@@ -828,4 +832,4 @@ server/tests/nodes/test_stripe_plugin.py -v`.
- [Node Creation Guide](./node_creation.md) — when to use which framework piece for a new plugin.
- [Event Waiter System](./event_waiter_system.md) — generic dispatch path that `WebhookSource.handle` calls into.
- [Status Broadcaster](./status_broadcaster.md) — `register_service_refresh` registry that backs `make_status_refresh`.
-- [Credentials Encryption](./credentials_encryption.md) — how `stripe_api_key` and `stripe_webhook_secret` are stored.
+- [Credentials Encryption](./credentials_encryption.md) — how `stripe_webhook_secret` is stored.
diff --git a/docs-internal/tikhub_service.md b/docs-internal/tikhub_service.md
index 63101044..a1d3e3ba 100644
--- a/docs-internal/tikhub_service.md
+++ b/docs-internal/tikhub_service.md
@@ -47,6 +47,7 @@ server/nodes/scraper/
│ # register_output_schema. Must NOT import `tikhub` at module import.
├── _sdk.py # Everything that touches `tikhub`, lazily inside functions:
│ # make_client, EndpointInfo/ParamInfo, endpoint_index (cached),
+ │ # call_endpoint, list_endpoints,
│ # resolve_endpoint, bind_params, to_plain, raise_user_error,
│ # load_tikhub_endpoints, track_tikhub_usage, PLATFORMS,
│ # _MAX_RETRIES / _TIMEOUT
@@ -207,7 +208,7 @@ class TikHubCredential(ApiKeyCredential):
free_credit` and `api_key_data.api_key_name` defensively (field names
were inferred from the CLI's `user info` output; absence is tolerated)
into `ProbeResult(extra=...)`, message
- `"TikHub key validated - {email} (balance ${balance})"`. A 401 surfaces
+ `"TikHub key validated — {email or api_key_name or 'account'} (balance ${balance})"`. A 401 surfaces
through the base `raise_for_status` path.
Catalogue entry (`credential_providers.json`, same shape as `apify`, no
diff --git a/docs-internal/tool_building_pipeline.md b/docs-internal/tool_building_pipeline.md
index ace70f8e..bb0a601a 100644
--- a/docs-internal/tool_building_pipeline.md
+++ b/docs-internal/tool_building_pipeline.md
@@ -195,7 +195,8 @@ connect directly to `input-tools`. Legacy
`service -> androidTool -> agent` graphs are rewritten on load by
`services/workflow_migrations.normalize_legacy_android_toolkit`, and sub-node
exclusion keys solely on the AI-agent config handles (`input-context` /
-`input-tools` / `input-skill` / `input-teammates`; `execution/models.py:351-359`) — the
+`input-memory` (legacy compatibility) / `input-tools` / `input-skill` /
+`input-teammates`; `execution/models.py:351-359`) — the
`TOOLKIT_NODE_TYPES` constant is gone.
## 8. Internal delegation identities (`delegate_to_*`)
@@ -227,8 +228,9 @@ Parent agents see results via three paths — see [agent_delegation.md](./agent_
When `TEMPORAL_PER_TYPE_DISPATCH=true` and the run is happening inside a Temporal workflow, tool calls do NOT go through `execute_tool` directly. Instead:
-1. `agent.prepare_payload` records `llm_engine="native"` and
- `message_wire_version=2` for new executions.
+1. `agent.prepare_payload` builds the payload; there is one wire standard
+ with no `llm_engine` / `message_wire_version` discriminators (locked by
+ `tests/llm/test_single_wire_standard.py`).
2. `AgentWorkflow` (the F4.B child workflow) gets the LLM's tool-calls list
back from `agent.execute_llm_step`, whose native branch sends `ToolDef`
declarations through `ChatUnifier`.
@@ -244,16 +246,13 @@ When `TEMPORAL_PER_TYPE_DISPATCH=true` and the run is happening inside a Tempora
This means tool calls inside an agent loop get Temporal's retry / timeout / heartbeat semantics independently of the parent agent's. A `code-exec` task burns its own retries; a `browser` task survives past the parent's `start_to_close_timeout` via its own heartbeat. See [TEMPORAL_ARCHITECTURE.md](./TEMPORAL_ARCHITECTURE.md).
-Histories recorded before the engine marker existed cannot replay: their tool
-and message shapes belong to a retired wire format, so `execute_llm_step`
-refuses them with a non-retryable `InvalidAgentLLMEngine` instead of
-reconstructing them.
+The v1/v2 wire duality was purged; there is no engine-marker refusal path.
## 10. Auto-skill edges
Some tools bundle a default skill — `writeTodos` ships with `write-todos-skill`, the WhatsApp tools ship with their respective skills. The frontend `useAutoSkillEdges.ts` hook detects these connections at canvas-edit time and auto-creates a phantom skill connection so the LLM gets both the tool schema (for invocation) and the skill instructions (for usage guidance) without the user having to wire two edges.
-`MASTER_SKILL_NODE_TYPE` constant resolves via `getCachedNodeSpec(type)?.uiHints?.isMasterSkillEditor === true`, not a hardcoded string match.
+The `isMasterSkillNode()` helper (`useAutoSkillEdges.ts:35`) resolves via `getCachedNodeSpec(type)?.uiHints?.isMasterSkillEditor === true`, not a hardcoded string match.
## 11. Pytest invariants
diff --git a/docs-internal/workflow-schema.md b/docs-internal/workflow-schema.md
index 77ce88d8..e35bdf68 100644
--- a/docs-internal/workflow-schema.md
+++ b/docs-internal/workflow-schema.md
@@ -120,7 +120,7 @@ Pre-configured agents for specific domains. All inherit `AI_AGENT_PROPERTIES`. S
- `rlm_agent` - Recursive Language Model (REPL-based, dedicated handler)
- `claude_code_agent` - Claude Code SDK integration
-### AI Tool Nodes (9 dedicated)
+### AI Tool Nodes (9; nodes that connect to an agent's `input-tools` handle, not all under `server/nodes/tool/`)
Connect to AI Agent's `input-tools` handle:
- `masterSkill` - Aggregates multiple skills with enable/disable toggles
- `calculatorTool` - Math operations
@@ -133,7 +133,7 @@ Connect to AI Agent's `input-tools` handle:
- `agentBuilder` - Spawns tools, agents, and skills onto the canvas mid-execution
### Search Nodes (3 dual-purpose)
-Work as both workflow nodes and AI tools. Defined in `searchNodes.ts`:
+Work as both workflow nodes and AI tools. Defined under `server/nodes/search/<plugin>/__init__.py`:
- `braveSearch` - Brave Search API
- `serperSearch` - Google SERP via Serper API
- `perplexitySearch` - Perplexity Sonar with citations
@@ -346,8 +346,8 @@ RAG pipeline nodes for document ingestion, processing, and vector storage:
"id": "edge-memory",
"source": "simpleMemory-1",
"target": "aiAgent-1",
- "sourceHandle": "output-memory",
- "targetHandle": "input-memory"
+ "sourceHandle": "output-tool",
+ "targetHandle": "input-tools"
}
]
}
@@ -355,7 +355,7 @@ RAG pipeline nodes for document ingestion, processing, and vector storage:
**Memory Workflow Behavior:**
1. Start node provides the user's chat input
-2. Simple Memory connects to AI Agent's memory handle (config connection)
+2. Simple Memory connects to AI Agent's `input-tools` handle via its `output-tool` handle (config connection)
3. When AI Agent runs, it loads conversation history from the memory session
4. AI Agent's response is automatically saved to the memory session
5. Simple Memory node can see Start node's outputs (via AI Agent) for parameter mapping
@@ -407,7 +407,7 @@ fileInput.click();
import { validateWorkflow } from './schemas/workflowSchema';
const workflow = {
- id: 'workflow_123',
+ id: '123',
name: 'My Workflow',
nodes: [...],
edges: [...],
@@ -434,23 +434,26 @@ Config nodes (memory, tools) are auxiliary nodes that connect to parent nodes vi
|----------|-------------|---------------|
| Group | Contains 'memory' or 'tool' | Other groups |
| Input Handle | None (passive) | `input-main` |
-| Output Handle | `output-memory`, `output-model` | `output-main` |
-| Target Handle | Parent's `input-memory`, `input-tools` | Parent's `input-main` |
+| Output Handle | `output-tool` (simpleMemory), `output-context` (context node), `output-model` | `output-main` |
+| Target Handle | Parent's `input-context`, `input-tools`, `input-skill`, `input-teammates` (`input-memory` is retired: the validator rejects it, the migration rewrites it) | Parent's `input-main` |
| Parent Visibility | NOT shown in parent's input panel | Shown in parent's input panel |
| Input Inheritance | Inherits parent's main inputs | Only direct connections |
### Config Node Detection
-Nodes are identified as config nodes by their group membership:
+Nodes are identified as config nodes by the backend-derived `isConfigNode` uiHint:
```typescript
const isConfigNode = (nodeType: string): boolean => {
const definition = resolveNodeDescription(nodeType);
- const groups = definition?.group || [];
- return groups.includes('memory') || groups.includes('tool');
+ return definition?.uiHints?.isConfigNode === true;
};
```
+The backend derives the flag from the plugin's `group` tuple via
+`_CONFIG_NODE_GROUPS = frozenset({"memory", "tool"})` in
+`services/plugin/base.py`; the frontend never re-derives it from group strings.
+
### Input Inheritance for Config Nodes
When a config node is connected to a parent's config handle:
@@ -542,8 +545,8 @@ OpenRouter model IDs use the format `provider/model-name`:
```
Memory nodes are config nodes that:
-- Connect to AI Agent via `input-memory` handle
-- Store conversation history in database (persisted across restarts)
+- Connect to AI Agent via the `input-tools` handle (`output-tool` -> `input-tools`); conversation continuity lives on the context node's `output-context` -> `input-context` edge
+- Store durable facts the agent explicitly remembers (persisted across restarts)
- Support buffer mode (all messages) or window mode (last N messages)
- Inherit parent node's main inputs for parameter mapping
@@ -584,17 +587,26 @@ Each edge contains:
#### Config Handles (for auxiliary nodes)
Config handles connect memory/tool nodes to parent nodes without being part of main data flow:
-- `input-memory` - Memory configuration input (AI Agent)
-- `input-tools` - Tools configuration input (AI Agent)
+- `input-context` - Context node input (AI Agent; conversation continuity)
+- `input-tools` - Tools configuration input (AI Agent; includes `simpleMemory`)
+- `input-skill` - Skill configuration input (AI Agent)
+- `input-teammates` - Teammate agents input (team lead)
+- `input-memory` - **retired**; the validator rejects it and `normalize_workflow_graph` rewrites legacy edges
- `input-model` - Model configuration input
- `output-model` - Model/config output (circular nodes)
-- `output-memory` - Memory output (simpleMemory node)
+- `output-tool` - Tool output (simpleMemory node)
+- `output-context` - Context output (context node)
#### Handle Detection Pattern
-Config handles follow the pattern `input-<type>` where type is NOT 'main':
+Config handles follow the pattern `input-<type>`, excluding the four data-flow handles
+(`client/src/components/parameterPanel/InputSection.tsx:259-265`):
```typescript
-const isConfigHandle = (handle: string): boolean => {
- return handle.startsWith('input-') && handle !== 'input-main';
+const isConfigHandle = (handle: string | null | undefined): boolean => {
+ if (!handle) return false;
+ if (handle.startsWith('input-') && handle !== 'input-main' && handle !== 'input-chat' && handle !== 'input-task' && handle !== 'input-teammates') {
+ return true;
+ }
+ return false;
};
```
@@ -607,8 +619,8 @@ const isConfigHandle = (handle: string): boolean => {
"id": "edge-memory",
"source": "simpleMemory-1",
"target": "aiAgent-1",
- "sourceHandle": "output-memory",
- "targetHandle": "input-memory"
+ "sourceHandle": "output-tool",
+ "targetHandle": "input-tools"
},
{
"id": "edge-main",
@@ -622,7 +634,7 @@ const isConfigHandle = (handle: string): boolean => {
```
In this example:
-- The simpleMemory node connects to AI Agent's `input-memory` handle (config connection)
+- The simpleMemory node connects to AI Agent's `input-tools` handle via `output-tool` (config connection)
- The start node connects to AI Agent's `input-main` handle (main data flow)
- AI Agent does NOT see simpleMemory as an input (config handles are filtered)
- simpleMemory DOES see Start node's outputs (inherits parent's main inputs)
@@ -660,7 +672,6 @@ This resolves to the `message` property from the Start node's output data.
- Added chat nodes: chatSend, chatHistory (JSON-RPC 2.0 WebSocket)
- Added utility nodes: chatTrigger, console (5 utility nodes total)
- Added javascriptExecutor code node (2 code nodes total)
- - Updated WebSocket handlers count to 51
- **1.3.0** (2026-01-19): OpenRouter AI provider integration
- Added openrouterChatModel to AI Nodes list
diff --git a/server/nodes/README.md b/server/nodes/README.md
index 65c313f2..e61e17c2 100644
--- a/server/nodes/README.md
+++ b/server/nodes/README.md
@@ -1,9 +1,9 @@
# `server/nodes/` — plugin cookbook
**One plugin = one folder** (`server/nodes/<group>/<name>/__init__.py`),
-or a single `.py` file inside a domain folder when the plugin ships no
-icon/meta of its own. Both auto-register at import time; no other code
-needs to change.
+or a single `.py` file inside a domain folder whose icon/meta are shared
+folder-wide (`stripe/`, `telegram/`, `speech/`, ...). Both auto-register
+at import time; no other code needs to change.
Full reference: [docs-internal/plugin_system.md](../../docs-internal/plugin_system.md).
@@ -330,7 +330,7 @@ Four ideas worth stealing wholesale:
See [Multi-credential nodes](../../docs-internal/plugin_system.md#multi-credential-nodes)
for the `ctx.connection(id)` contract and the `routing=` trap that comes with it.
-### Generic registries to plug into (18 at time of writing; `grep -rn '^def register_' server/services server/core`)
+### Generic registries to plug into (19 at time of writing; the hand-curated table lives in [plugin_system.md](../../docs-internal/plugin_system.md#self-contained-plugin-folders))
Telegram's `__init__.py` is the canonical wiring example. Adding any
of these concerns to your plugin is one `register_*` call from your
diff --git a/server/nodes/cloudflare/_credentials.py b/server/nodes/cloudflare/_credentials.py
index b3914224..0c418ab4 100644
--- a/server/nodes/cloudflare/_credentials.py
+++ b/server/nodes/cloudflare/_credentials.py
@@ -9,8 +9,9 @@ Two independent auth paths, either is sufficient:
FIXED 86-scope set (only ``dns_analytics:read`` for analytics — no
Web Analytics/RUM or zone-analytics scopes, and no way to request
more).
-* **API token** — the optional ``cloudflare_api_token`` api-key row,
- pasted in the credentials modal and injected as the
+* **API token** — the optional canonical ``apiKey`` field (stored under
+ the provider id ``cloudflare``; exposed to the node as
+ ``cloudflare_api_token``), pasted in the credentials modal and injected as the
``CLOUDFLARE_API_TOKEN`` env var on every CLI invocation (token takes
precedence over CLI login, per cf's documented resolution order).
This is the only path to endpoints outside the OAuth scope set
diff --git a/server/nodes/vercel/_handlers.py b/server/nodes/vercel/_handlers.py
index dc3699c6..aaefcd9c 100644
--- a/server/nodes/vercel/_handlers.py
+++ b/server/nodes/vercel/_handlers.py
@@ -8,8 +8,9 @@ cannot use :func:`run_cli_command` (it buffers output via
``communicate()`` until process exit — the URL is needed mid-run).
Instead it spawns the CLI directly, reads stdout/stderr incrementally
until the URL appears, returns ``{success, url}`` to the frontend
-(which ``window.open``s the url — it never renders a separate code, so
-the url must be the code-embedding link), and lets a background task
+(which ``window.open``s the url and renders ``verification_code`` in
+``OAuthConnect.tsx``; the url should still be the code-embedding link
+so the opened tab works on its own), and lets a background task
await process exit.
Success gate mirrors Stripe's exit-code-distrust idiom: the pinned
@@ -204,8 +205,8 @@ async def _start_login_flow() -> Dict[str, Any]:
_LOGIN_TIMEOUT_SECONDS,
)
_spawn_background(_complete_login(proc, pre_mtime))
- # The frontend only opens `url`; `verification_code` rides along for
- # forward-compat (never rendered today — keep the URL code-embedding).
+ # The frontend opens `url` and renders `verification_code`
+ # (OAuthConnect.tsx); keep the URL code-embedding so the tab works alone.
return {"success": True, "url": url, "verification_code": code}
except Exception as e:
logger.exception("[Vercel] login flow raised unexpectedly: %s", e)
diff --git a/server/nodes/vercel/_service.py b/server/nodes/vercel/_service.py
index d8e6500e..39711c59 100644
--- a/server/nodes/vercel/_service.py
+++ b/server/nodes/vercel/_service.py
@@ -89,8 +89,9 @@ def strip_ansi(text: str) -> str:
def extract_login_url(text: str) -> Optional[str]:
"""First https URL in the CLI's login banner. Prefers a link that
- embeds the device code (``code=`` query param) because the frontend
- only opens ``url`` — it never renders a separate code."""
+ embeds the device code (``code=`` query param) so the opened tab
+ works on its own; the frontend also shows ``verification_code``
+ (``OAuthConnect.tsx``) as a fallback the user can type."""
urls = [u.rstrip(".,;)'\"") for u in _URL_RE.findall(strip_ansi(text))]
if not urls:
return None
diff --git a/server/nodes/whatsapp_business/_credentials.py b/server/nodes/whatsapp_business/_credentials.py
index f6cb17c5..9098500f 100644
--- a/server/nodes/whatsapp_business/_credentials.py
+++ b/server/nodes/whatsapp_business/_credentials.py
@@ -19,11 +19,10 @@ from services.plugin.credential import ApiKeyCredential, ProbeResult
class WhatsAppBusinessCredential(ApiKeyCredential):
"""Graph API bearer token plus the fields the webhook and API need.
- ``apiKey`` is deliberately **not** required at the catalogue level. The
- Connect button gates on required fields only, so marking the token
- required would block the browser sign-up path before it can supply one.
- Runtime resolution still fails loudly when neither path has produced a
- token.
+ ``apiKey`` is required at the catalogue level (``credential_providers.json``
+ marks it ``required: true``), so the Connect button gates on it along
+ with the other required fields. Runtime resolution still fails loudly
+ when no token has been stored.
"""
id = "whatsapp_business"
diff --git a/server/services/proxy/service.py b/server/services/proxy/service.py
index 8c68de46..0cdf76fa 100644
--- a/server/services/proxy/service.py
+++ b/server/services/proxy/service.py
@@ -185,7 +185,7 @@ class ProxyService:
Args:
url: Target URL to be proxied
- parameters: Node parameters (may contain proxyProvider, proxyCountry, etc.)
+ parameters: Node parameters (may contain proxy_provider, proxy_country, etc.)
Returns:
Proxy URL string for httpx, or None if no proxy should be used
diff --git a/server/tests/credentials/README.md b/server/tests/credentials/README.md
index bb33922e..b6480533 100644
--- a/server/tests/credentials/README.md
+++ b/server/tests/credentials/README.md
@@ -6,7 +6,7 @@ Locks in the invariants enumerated in [docs-internal/ARCHIVE/credentials_panel.m
```bash
cd server
-uv pip install -e ".[test]"
+uv sync # the dev dependency group (pytest, respx, ...) installs by default
uv run pytest tests/credentials/ -v
# Coverage report on the three critical modules
@@ -24,6 +24,8 @@ uv run pytest tests/credentials/ --cov=core.encryption --cov=core.credentials_da
| `test_twitter_oauth.py` | Invariants 9, 10 — PKCE state single-use, code_challenge = base64url(sha256(verifier)) |
| `test_google_oauth.py` | Invariant 11 — `access_type=offline`, `prompt=consent` |
| `test_websocket_handlers.py` | Invariants 1, 5, 6 — WS message types, snake_case `has_key`, distinct provider-defaults handler |
+| `test_credential_broadcasts.py` | Credential-change broadcast contract — every credential-mutation handler emits `update_api_key_status` and/or `broadcast_credential_event` |
+| `test_credential_catalogue_shape.py` | `credential_providers.json` top-level shape and provider placement — every provider lives under `providers`, cross-checked against the registered credential classes |
## Fixtures