Self-improving AI Employees for everyone
Python ai-agentsai-employeeai-employeesassistantautonomous-agentsco-employeescompanygrok-botinstinctloop-agentsmuseown-your-datapersonalself-hosted
docs(temporal,plugins): fix execution and plugin-contract doc drift
trohitg63bd151344f3
diff --git a/docs-internal/TEMPORAL_ARCHITECTURE.md b/docs-internal/TEMPORAL_ARCHITECTURE.mdindex 74a1034c..72670237 100644--- a/docs-internal/TEMPORAL_ARCHITECTURE.md+++ b/docs-internal/TEMPORAL_ARCHITECTURE.md@@ -642,7 +642,7 @@ The Temporal binary + persistence are managed in-process by the plugin-folder pa**Months-long durability contract**: running and paused deployments survive backend restarts, are never auto-terminated, and keep executing for months. Mechanisms, each replay-patch-guarded where it changes recorded commands:-- **No lifetime caps on new child runs.** Trigger/cron-spawned `MachinaWorkflow` runs, agent children, and delegated-task runners previously carried 1-2h `execution_timeout`/`run_timeout` — Temporal's timeout timers keep ticking through a cooperative pause, so any pause longer than the cap silently terminated the run (and a timed-out delegated runner skipped its compensation: leaked permit + stuck task row). New executions start children unbounded (patches: `*-unbounded-child-runs-v1`, `machina-unbounded-lifetimes-v1`, `agent-unbounded-lifetimes-v1`). Liveness is the activity layer's job: node activities heartbeat every 30s against a 2-minute `heartbeat_timeout`; their `start_to_close` is a generous 24h ceiling, not 10 minutes. The subagent-permit wait uses `PERMIT_WAIT_RETRY` (unlimited attempts) so a queued delegation waits as long as admission takes instead of failing after ~3h.+- **No lifetime caps on new child runs.** Trigger/cron-spawned `MachinaWorkflow` runs, agent children, and delegated-task runners previously carried 1-2h `execution_timeout`/`run_timeout` — Temporal's timeout timers keep ticking through a cooperative pause, so any pause longer than the cap silently terminated the run (and a timed-out delegated runner skipped its compensation: leaked permit + stuck task row). New executions start children unbounded (no patch marker was retained for this change; the only live `workflow.patched` markers in the tree are `machina-conditional-edges-v1` in `services/temporal/workflow.py` and `machina-trigger-listener-node-filter` in `services/temporal/trigger_listener_workflow.py` — verify with `grep -rn "workflow.patched(" server/services/temporal`). Liveness is the activity layer's job: node activities heartbeat every 30s against a 2-minute `heartbeat_timeout`; their `start_to_close` is a generous 24h ceiling, not 10 minutes. The subagent-permit wait uses `PERMIT_WAIT_RETRY` (unlimited attempts) so a queued delegation waits as long as admission takes instead of failing after ~3h.- **History-pressure continue-as-new everywhere.** Temporal terminates any workflow around ~51,200 history events. `WorkflowControlWorkflow` (which multiplexes all of a deployment's triggers into one history) now rolls over on `is_continue_as_new_suggested()` / a 10K-event soft cap, carrying trigger specs, per-trigger provider `seen_ids` (written back into the spec after every poll cycle), queued push events, the bounded dedup baseline, and the control state — a rollover works mid-pause too, since a paused controller still accretes signal history. `TriggerListenerWorkflow`/`PollingTriggerWorkflow` gained the same pressure check (the old `_processed_count >= 16_000` gate was unreachable: real spawns cost ~15-25 events each, and polling counted only emitted events while a quiet mailbox burned ~11 events/cycle — dead in ~3 days at the 60s default). Poll intervals are clamped to a 30s floor on the patched path. Because run ids change on rollover, **controller handles are addressed by workflow id only, never run_id-pinned** (`_controller_handle`, manager `register_trigger`).- **dispatch.emit controller narrowing.** Controllers advertise their push event types via the `ControlEventTypes` keyword-list Search Attribute (upserted as triggers register); `dispatch.emit` skips controllers with no matching trigger instead of signalling every running controller with every platform event (each unmatched signal was ~4 immutable history events — one busy deployment burned every other controller's rollover budget). Controllers without the attribute (pre-upgrade histories) keep match-all behaviour.- **Boot-time reconcile** (`reconcile_active_controls_on_boot`, called from the lifecycle module after workers start): runs the lazy `_reconcile_control` over every active control row, converges `starting` rows a crash left behind (controller alive with triggers registered → `running`; alive-but-empty for a graph that declares triggers → `failed` + controller closed; vanished → `failed`), and re-arms the process-local half of running/paused generations from the persisted graph snapshot — DeploymentManager state, in-process collectors for non-canary trigger types, cron pause posture. Idempotent by construction (controller `register_trigger` keyed by listener id, legacy starts use `USE_EXISTING`, cron creation preserves server-owned pause state).@@ -669,6 +669,11 @@ The Temporal binary + persistence are managed in-process by the plugin-folder pa| `temporal_graceful_shutdown_seconds` | `TEMPORAL_GRACEFUL_SHUTDOWN_SECONDS` | `30` | `CTRL_BREAK_EVENT` (Windows) / `SIGTERM` (POSIX) → tree-kill grace window. Shared with the embedded worker shutdown. || `temporal_terminate_running_on_startup` | `TEMPORAL_TERMINATE_RUNNING_ON_STARTUP` | `false` | Debug-only startup sweep (see the durability contract above). Keep false so running and paused deployments survive restarts. || `temporal_health_monitor_interval_seconds` | `TEMPORAL_HEALTH_MONITOR_INTERVAL_SECONDS` | `15` | Resident dev-server watchdog probe cadence (lifecycle module; loopback deployments only). |+| `temporal_health_check_attempts` | `TEMPORAL_HEALTH_CHECK_ATTEMPTS` | `5` | Startup readiness gate: how many times to poll the WorkflowService gRPC health check for SERVING (after the gRPC port binds) before the worker / visibility sweep act. Bounded — the unbounded layer is the lifecycle reconnect loop. Carries a matching Python default so a pre-existing `.env` keeps booting. |+| `temporal_health_check_delay_seconds` | `TEMPORAL_HEALTH_CHECK_DELAY_SECONDS` | `0.5` | Delay between readiness-probe attempts. |+| `temporal_health_check_timeout_seconds` | `TEMPORAL_HEALTH_CHECK_TIMEOUT_SECONDS` | `2.0` | Per-attempt timeout for one gRPC health-check call. |+| `temporal_sweep_attempts` | `TEMPORAL_SWEEP_ATTEMPTS` | `4` | Boot-time terminate-running sweep: retries for the Visibility query that races shard acquisition ("shard status unknown") before giving up for that boot. Only relevant when `TEMPORAL_TERMINATE_RUNNING_ON_STARTUP=true`. |+| `temporal_sweep_backoff_seconds` | `TEMPORAL_SWEEP_BACKOFF_SECONDS` | `0.5` | Linear backoff base for the sweep retries (`attempt x base`). || `workflow_control_crash_recovery` | `WORKFLOW_CONTROL_CRASH_RECOVERY` | `pause` | After an UNCLEAN shutdown (kill/crash, dirty-bit marker), boot pauses generations still `running` so the user consciously resumes; `resume` restores them running. Clean restarts always restore as-is. || `workflow_control_missing_controller` | `WORKFLOW_CONTROL_MISSING_CONTROLLER` | `pause` | A live generation whose controller vanished converges to `paused` (Resume rebuilds the controller); `fail` preserves the legacy Reset-only behaviour. || `workflow_control_pause_on_failure` | `WORKFLOW_CONTROL_PAUSE_ON_FAILURE` | `true` | Circuit breaker: repeatedly-failing trigger-spawned runs pause their deployment (fix + Resume) instead of firing into the same error indefinitely. Evaluated activity-side; never touches recorded commands. |diff --git a/docs-internal/deployment_legacy.md b/docs-internal/deployment_legacy.mdindex fe9e4893..94e03c87 100644--- a/docs-internal/deployment_legacy.md+++ b/docs-internal/deployment_legacy.md@@ -12,7 +12,7 @@ historical container topology.One command provisions a login-gated OpenCompany VM on a cloud provider. Two stages:-1. **Operator's cloud CLI** (gcloud; aws planned) handles auth + project/region/zone resolution ++1. **Operator's cloud CLI** (gcloud; the AWS Terraform module in `cli/terraform/aws/` is complete and validated on t3.micro, but the `cli/commands/deploy/providers/aws.py` CLI adapter is still a stub that exits 1) handles auth + project/region/zone resolution +ADC verification + API enablement.2. **Terraform** (`cli/terraform/gcp/`) owns all resources — new VMs use the`opencompany` resource id,diff --git a/docs-internal/errors.md b/docs-internal/errors.mdindex de21c2ef..edcd8002 100644--- a/docs-internal/errors.md+++ b/docs-internal/errors.md@@ -6,7 +6,7 @@ Documented root causes and fixes for errors encountered in OpenCompany developme## 1. SQLAlchemy Import Hang (Windows)-**Symptom**: Backend hangs at startup with no output after `Importing DI container + all services...`. The process is alive but never binds port 5678. `import sqlalchemy` blocks indefinitely.+**Symptom**: Backend hangs at startup with no output after `Importing DI container + all services...`. The process is alive but never binds `$PYTHON_BACKEND_PORT`. `import sqlalchemy` blocks indefinitely.**Root cause**: Git worktrees nested inside the project root (e.g., `.claude/worktrees/`) cause Windows Defender real-time scanning to fan out across all worktree directories when Python loads `.pyd` (native DLL) files. SQLAlchemy has 5 Cython `.pyd` files (`collections`, `immutabledict`, `processors`, `resultproxy`, `util`) loaded sequentially during import. Defender's scan queue backs up across the worktree copies, blocking `LoadLibrary()` for minutes per file.@@ -214,7 +214,7 @@ Also changed `receive_timeout=540` to `receive_timeout=None` on `ws_connect()` -| Parameter | Value | Purpose ||-----------|-------|---------|-| `start_to_close_timeout` | 10 min | Maximum total time for an activity (workflow.py) |+| `start_to_close_timeout` | 24 h | Maximum total time for an activity (`_NODE_ACTIVITY_START_TO_CLOSE`, `services/temporal/workflow.py`) || `heartbeat_timeout` | 2 min | Maximum gap between heartbeats before Temporal cancels (workflow.py) || `asyncio.wait_for` timeout | 30s | Periodic heartbeat interval in the WS read loop (activities.py) || `ws_connect heartbeat` | 30s | WebSocket protocol-level ping/pong keepalive (activities.py) |@@ -226,7 +226,7 @@ Also changed `receive_timeout=540` to `receive_timeout=None` on `ws_connect()` -**Symptom**: Backend logs show:```-WhatsApp RPC timeout - Go service not responding at ws://localhost:5683/ws/rpc+WhatsApp RPC timeout - Go service not responding at ws://localhost:${WHATSAPP_RPC_PORT}/ws/rpc```WhatsApp service health check (`/health`) returns 200 OK, but the WebSocket RPC connection fails.@@ -250,7 +250,7 @@ self.ws = await asyncio.wait_for(**Symptom**: After `bun run dev`, browser console shows repeated errors:```-GET http://localhost:5678/api/auth/status net::ERR_CONNECTION_REFUSED+GET http://localhost:${PYTHON_BACKEND_PORT}/api/auth/status net::ERR_CONNECTION_REFUSEDFailed to check auth status (attempt 4/6): TypeError: Failed to fetch```diff --git a/docs-internal/event_framework.md b/docs-internal/event_framework.mdindex 69348358..aef2dd2f 100644--- a/docs-internal/event_framework.md+++ b/docs-internal/event_framework.md@@ -43,8 +43,8 @@ phase plan lives in `~/.claude/plans/properly-fix-the-tech-dreamy-tarjan.md`.| Phase | State ||---|---|| D2 — Custom `event_dlq` SQLModel table | ❌ **dropped** (commit `89b15bd`, docs only). Temporal Event History + Visibility queries cover the ops-inspection use case; reinventing them would contradict Wave 12's "Temporal-native, no custom infra" thesis. See § "Failure inspection — no separate DLQ table". |-| D2b — Retire `event_waiter.py` Redis-Streams branch | ✅ shipped as Wave 15.3 (see [TEMPORAL_CLEANUP_AND_RESILIENCE_PLAN.md](./TEMPORAL_CLEANUP_AND_RESILIENCE_PLAN.md)). `event_waiter` is memory-mode-only now; Temporal owns durable delivery. The in-memory collector still backs canvas-Run + non-canary (Twitter) triggers. |-| D4 — Drain remaining dual-emit on message/newsletter/history wire keys | ⏳ pending — paired with FE migration to envelope-aware readers on those channels (`whatsapp_message_received` et al). |+| D2b — Retire `event_waiter.py` Redis-Streams branch | ✅ shipped as Wave 15.3 (see [TEMPORAL_CLEANUP_AND_RESILIENCE_PLAN.md](./ARCHIVE/TEMPORAL_CLEANUP_AND_RESILIENCE_PLAN.md)). `event_waiter` is memory-mode-only now; Temporal owns durable delivery. The in-memory collector still backs canvas-Run + non-canary (Twitter) triggers. |+| D4 — Drain the last legacy `event_waiter.dispatch` dual-emit | ⏳ pending — only `nodes/twitter/_events.py` remains (twitterReceive is not canary-registered). The whatsapp message/newsletter/history wire keys are now one-way legacy WS frames for FE readers, not dual-emit. || WorkflowEnvironment integration smoke test | ⏳ pending — full 7-canary in-process Temporal cluster. Existing unit tests + per-canary producer tests + `TestCanaryRegistryCoverage` cover the static surface; the integration smoke would catch real-cluster regressions only. |**Test surface: 256 passed + 1 xfail** across 18 event-framework test files.diff --git a/docs-internal/node_creation.md b/docs-internal/node_creation.mdindex 758daa82..6e2ce85e 100644--- a/docs-internal/node_creation.md+++ b/docs-internal/node_creation.md@@ -47,8 +47,12 @@ It is a single folder `server/nodes/<group>/<name>/` whose`display_name` / `group` / `component_kind` / `handles` /`credentials` / `task_queue` / `usable_as_tool` / `Params` / `Output`plus one `@Operation` method. That's the entire node (the folder also-holds `icon.svg` / `meta.json`, which is why a bare `.py` file is no-longer the shape). On server restart it auto-registers, the+holds `icon.svg` / `meta.json`, which is why the folder is the canonical+shape; a bare `.py` inside a domain folder still works and 23 shipped+plugins use it — stripe, telegram, discord, whatsapp, whatsapp_business,+translate, speech, github, vercel, cloudflare, gcloud; live list:+`find server/nodes -mindepth 2 -maxdepth 2 -name "*.py" ! -name "_*" ! -name "__init__.py"`).+On server restart it auto-registers, theNodeSpec is emitted at `/api/schemas/nodes/<type>/spec.json`, and itappears in the Component Palette under its first `group` entry.@@ -247,10 +251,10 @@ What you **do** still write:| Self-contained plugin folders (rich plugins like telegram with their own service, WS handlers, pre-checks) | [plugin_system.md → Self-contained plugin folders](./plugin_system.md#self-contained-plugin-folders) || Wave 12 event framework (signed webhooks, CLI daemons, polling) | [plugin_system.md → Wave 12](./plugin_system.md#wave-12--generalized-event-framework-servicesevents) || Stripe as the Wave 12 reference plugin (also the canonical CLI-managed-auth + auto-installer reference) | [stripe_service.md](./stripe_service.md) |-| Backend-as-SSOT design (NodeSpec, icons, output schemas) | [schema_source_of_truth_rfc.md](./schema_source_of_truth_rfc.md) |+| Backend-as-SSOT design (NodeSpec, icons, output schemas) | [schema_source_of_truth_rfc.md](./ARCHIVE/schema_source_of_truth_rfc.md) || JSON workflow format, edge handle conventions | [workflow-schema.md](./workflow-schema.md) || Polling triggers + event_waiter mechanics | [event_waiter_system.md](./event_waiter_system.md) |-| Memory lifecycle (markdown parse/append/trim, vector store, session resume) | [memory_lifecycle.md](./memory_lifecycle.md) |+| Memory lifecycle (markdown parse/append/trim, vector store, session resume) — *archived; describes the retired pre-RFC-0002 `input-memory` markdown model* | [ARCHIVE/memory_lifecycle.md](./ARCHIVE/memory_lifecycle.md) || Tool building pipeline (`_build_tool_from_node`, schema, per-type Temporal dispatch) | [tool_building_pipeline.md](./tool_building_pipeline.md) || Process supervision (used by `DaemonEventSource`) | [server/services/process_service.py](../server/services/process_service.py) — singleton API || Multi-vendor node behind one `provider` dropdown (two registries, JSON capabilities, per-vendor modules) | [speech_provider_rfc.md](./speech_provider_rfc.md) |@@ -262,8 +266,9 @@ What you **do** still write:plugin count via `glob server/nodes/**/__init__.py`; invariant totalvia `pytest --collect-only`. `services/handlers/` shrank from12.8K → 1.1K LOC.-- **Wave 11.H** — Self-contained plugin folders. Six generic- registries replace per-plugin hardcoding in core (five at 11.H;+- **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 callbackpaths / canary trigger types. Telegram is the reference.diff --git a/docs-internal/plugin_system.md b/docs-internal/plugin_system.mdindex ee87fed8..712c5470 100644--- a/docs-internal/plugin_system.md+++ b/docs-internal/plugin_system.md@@ -566,17 +566,28 @@ Underscore-prefixed files are package-private; the `nodes` walkerskips them. The two non-underscore files are the plugin classes (oneper node type) — same pattern as every other folder.-### Up to seven cross-cutting registries — use only what your plugin needs+### Cross-cutting registries (18 at time of writing; live list: `grep -rn '^def register_' server/services server/core`) — use only what your plugin needs| Concern | Registry module | Register from plugin via ||---|---|---|| Credentials-modal WebSocket commands (Connect / Disconnect / Send / Status / etc.) | `services.ws_handler_registry` | `register_ws_handlers({type: handler, ...})` |+| FastAPI HTTP router (OAuth callbacks, webhook receivers, etc.) | `services.ws_handler_registry` | `register_router(router, name='<plugin>')` — Wave 11.I; declare a `_router.py` exposing an `APIRouter` and call from `__init__.py`. Discovered at startup via `services.ws_handler_registry.get_routers()`. |+| `loadOptionsMethod` async loader for a dynamic dropdown (`json_schema_extra={"loadOptionsMethod": "..."}`) | `services.ws_handler_registry` | `register_option_loader(method_name, fn)` |+| OAuth callback path (`/api/<provider>/callback`) so `services.oauth_utils.get_redirect_uri` never cross-imports `nodes/<plugin>/_oauth.py` | `services.ws_handler_registry` | `register_oauth_callback_path(provider, path)` || Trigger event-filter builder | `services.event_waiter` | `register_filter_builder(node_type, fn)` || Trigger pre-execution check (e.g. "bot not connected") | `services.event_waiter` | `register_trigger_precheck(node_type, fn)` || Service-status refresh on WebSocket connect | `services.status_broadcaster` | `register_service_refresh(callback)` || Per-node output schema (when not auto-derivable) | `services.node_output_schemas` | `register_output_schema(node_type, ModelClass)` |-| FastAPI HTTP router (OAuth callbacks, webhook receivers, etc.) | `services.ws_handler_registry` | `register_router(router, name='<plugin>')` — Wave 11.I; declare a `_router.py` exposing an `APIRouter` and call from `__init__.py`. Discovered at startup via `services.ws_handler_registry.get_routers()`. |+| Master-Skill expander (how a `masterSkill` node expands into its enabled skills during edge walking) | `services.plugin.edge_walker` | `register_master_skill_expander(fn)` — registered by `nodes.skill` on package import. || Agent Context descriptor (node connected on `input-context`) | `services.plugin.edge_walker` | `register_agent_context_builder(async_fn)` — RFC-0002; the framework walks the edge but owns no knowledge of the descriptor's keys or thread-selection rules. Reference: `nodes/context/_descriptor.py`. |+| HTTP-webhook event source on the shared catch-all (`/webhook/<path>`) | `services.events.webhook` | `register_webhook_source(source)` — same instance for the same path is a no-op; a different source on an existing path raises. |+| Opt a trigger node type into the Wave 12 canary (Temporal) path | `services.deployment.canary_registry` | `register_canary_trigger_type(node_type, cloudevent_type)` — the CloudEvents type must match the producer's `WorkflowEvent.type` exactly; a diverging re-registration raises `ValueError`. |+| Polling-coroutine factory for a pull-based trigger (Gmail, Twitter) | `services.deployment.poll_registry` | `register_poll_coroutine_factory(node_type, factory)` |+| Send handler for one social platform behind the generic `socialSend` node | `services.plugin.social_provider_registry` | `register_social_send_handler(platform, handler)` |+| FastAPI-lifespan shutdown hook for plugin-owned long-lived state | `services.plugin.shutdown_hooks` | `register_shutdown_hook(label, hook)` — `label` surfaces in shutdown logs. |+| 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. |All accept idempotent re-imports (same callable / class for thesame key is a no-op; conflicts raise `ValueError`).@@ -771,7 +782,7 @@ All Wave 10 invariants in `test_node_spec.py` still run; Wave 11 invariants in `## Canonical principles-1. **One file = one node.** Adding a new node never edits multiple+1. **One plugin = one authoring location.** Adding a new node never edits multiplefiles. The filesystem location matches the palette group.2. **Backend is SSOT.** Node declaration, visual metadata, handlers,schemas, credentials, icons — one authoring location.@@ -889,10 +900,12 @@ All Wave 10 invariants in `test_node_spec.py` still run; Wave 11 invariants in `shrunk by ~808 LOC; three plugin routers (twitter / google /android) moved into `nodes/<plugin>/_router.py` and mount via theplugin-router loop in `main.py`. `tests/test_plugin_self_containment.py`- locks the contract with 7 invariant classes (forbidden-imports /+ locks the contract with 10 invariant classes (forbidden-imports /no-router-outside-nodes / per-plugin self-registration /registry-API sanity / stale-paths-absent / main.py-does-not-mount /- WS_HANDLERS-non-empty).+ WS_HANDLERS-non-empty + plugin-folder-has-node-file /+ typed-event-factories / package-imports-cleanly; live count via+ `grep -c '^class Test' server/tests/test_plugin_self_containment.py`).- Wave 12 — Generalized event framework([`services/events/`](../server/services/events/)). Adds`WorkflowEvent` (CloudEvents v1.0 envelope, in-house Pydantic),diff --git a/docs-internal/speech_provider_rfc.md b/docs-internal/speech_provider_rfc.mdindex 464c0365..976deebe 100644--- a/docs-internal/speech_provider_rfc.md+++ b/docs-internal/speech_provider_rfc.md@@ -104,7 +104,7 @@ branches in shared code; this is how we avoid needing any.### D5 — First multi-credential node in the repo`credentials = (OpenAICredential, ElevenLabsCredential, …)` with `ctx.connection(params.provider)`.-Already supported: `_make_connection_factory` ([`base.py:1134`](../server/services/plugin/base.py))+Already supported: `_make_connection_factory` ([`base.py:_make_connection_factory`](../server/services/plugin/base.py))builds a dict over **all** declared credentials and raises only for undeclared ids. No node usesthis today.diff --git a/docs-internal/stripe_service.md b/docs-internal/stripe_service.mdindex 490198f1..0344cb49 100644--- a/docs-internal/stripe_service.md+++ b/docs-internal/stripe_service.md@@ -687,37 +687,6 @@ If the download fails (no internet, GitHub down), the WS}```-## Installation--The Stripe CLI must be installed and on `PATH`:--```bash-# macOS-brew install stripe/stripe-cli/stripe--# Windows (Scoop)-scoop install stripe--# Linux (apt)-echo "deb [signed-by=/usr/share/keyrings/stripe.gpg] https://packages.stripe.dev/stripe-cli-debian-local stable main" \- | sudo tee /etc/apt/sources.list.d/stripe.list-sudo apt update && sudo apt install stripe--# Direct binary-# https://github.com/stripe/stripe-cli/releases-```--`StripeListenSource.start()` resolves the binary via-`shutil.which("stripe")`. If missing, the WS `stripe_connect`-response is:--```json-{- "success": false,- "error": "'stripe' not on PATH. Install: https://stripe.com/docs/stripe-cli#install"-}-```-## ConfigurationNo JSON config file. Everything plugin-configurable lives on thediff --git a/docs-internal/temporal-workflow-control.md b/docs-internal/temporal-workflow-control.mdindex 0b918799..14cafa8c 100644--- a/docs-internal/temporal-workflow-control.md+++ b/docs-internal/temporal-workflow-control.md@@ -198,8 +198,7 @@ that Resume relies on.behaviour.- **`WORKFLOW_CONTROL_PAUSE_ON_FAILURE`** (default `true`): circuitbreaker — when trigger-spawned runs keep failing, MachinaWorkflow- schedules `workflow_control.pause_on_failure.v1` (patch- `machina-pause-on-failure-v1`) and the deployment pauses so the user+ schedules `workflow_control.pause_on_failure` and the deployment pauses so the userfixes the cause and Resumes, instead of the trigger firing into the sameerror indefinitely. The breaker trips only after**`WORKFLOW_CONTROL_PAUSE_ON_FAILURE_THRESHOLD`** (default `3`) faileddiff --git a/docs-internal/workflow-schema.md b/docs-internal/workflow-schema.mdindex ded877f8..77ce88d8 100644--- a/docs-internal/workflow-schema.md+++ b/docs-internal/workflow-schema.md@@ -68,7 +68,7 @@ A workflow JSON document contains:## Supported Node Types-> Authoritative count = the plugin registry: one self-contained folder (or file) per node under `server/nodes/<group>/` — ~118 node types today; live total via `pytest --collect-only`. (A bare `server/nodes/**/__init__.py` glob overcounts — it also matches the 26 group packages.) The breakdown below is illustrative and grouped by category; do not rely on a hand-maintained total.+> Authoritative count = the plugin registry: one self-contained folder (or file) per node under `server/nodes/<group>/` — 148 node types at time of writing (live total: `len(services.node_registry.NODE_METADATA)` after `import nodes`, or `uv run pytest --collect-only`); 34 palette groups registered in `server/nodes/groups.py`. A bare `server/nodes/**/__init__.py` glob overcounts because it also matches the group packages. The breakdown below is illustrative and grouped by category; do not rely on a hand-maintained total.> The canonical list of nodes lives in the backend plugin tree at `server/nodes/<category>/<node>/__init__.py`; this section is a human-readable index.@@ -120,13 +120,17 @@ 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 (4 dedicated)+### AI Tool Nodes (9 dedicated)Connect to AI Agent's `input-tools` handle:- `masterSkill` - Aggregates multiple skills with enable/disable toggles- `calculatorTool` - Math operations- `currentTimeTool` - Current date/time with timezone- `duckduckgoSearch` - DuckDuckGo web search (free, no API key)- `taskManager` - Task creation and tracking tool+- `canvas` - Pushed-content display board (paths / URLs / markdown notes)+- `dataSource` - Raw local data over workspace paths and operator-approved mounts+- `writeTodos` - Structured task-list planning with checklist rendering+- `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`:@@ -247,7 +251,7 @@ RAG pipeline nodes for document ingestion, processing, and vector storage:```json{- "id": "workflow_1234567890",+ "id": "1234567890","name": "AI Agent with Start Node","version": "1.0.0","createdAt": "2025-01-06T12:00:00.000Z",@@ -291,7 +295,7 @@ RAG pipeline nodes for document ingestion, processing, and vector storage:```json{- "id": "workflow_1234567891",+ "id": "1234567891","name": "AI Agent with Memory","version": "1.0.0","createdAt": "2025-01-06T12:00:00.000Z",diff --git a/server/nodes/README.md b/server/nodes/README.mdindex c609d34b..65c313f2 100644--- a/server/nodes/README.md+++ b/server/nodes/README.md@@ -1,7 +1,9 @@# `server/nodes/` — plugin cookbook-**One file = one node.** Drop a Python file in the right subfolder and-it auto-registers at import time. No other code needs to change.+**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.Full reference: [docs-internal/plugin_system.md](../../docs-internal/plugin_system.md).@@ -10,7 +12,7 @@ Full reference: [docs-internal/plugin_system.md](../../docs-internal/plugin_syst## Five-minute recipe```python-# server/nodes/search/acme_search.py+# server/nodes/search/acme_search/__init__.pyfrom pydantic import BaseModel, ConfigDict, Fieldfrom typing import List, Literal, Optional@@ -19,8 +21,9 @@ from services.plugin import ()-# 1. Credential — inline here (single-use) or move to-# server/nodes/search/_credentials.py if 2+ plugins will share it.+# 1. Credential — inline here (single-use) or create a+# server/nodes/search/_credentials.py (the search folder does not+# ship one today) if 2+ plugins will share it.class AcmeCredential(ApiKeyCredential):id = "acme"display_name = "Acme Search"@@ -177,9 +180,9 @@ these first before writing new code:| `google/` | `_base.build_google_service` / `track_google_usage` | 7 Google plugins (OAuth + API) || `google/` | `_gmail.fetch_email_details` / `mark_email_as_read` | gmail + gmail_receive || `twitter/` | `_base.call_with_retry` / `format_tweet` / `sync_search_recent` | 4 twitter plugins (XDK + refresh) |-| `whatsapp/` | `_base.*` | whatsappSend / whatsappDb (RPC dispatch via `services/whatsapp_service.py`) |+| `whatsapp/` | `_base.*` | whatsappSend / whatsappDb (RPC dispatch via `nodes/whatsapp/_service.py` — `RPCClient` + `whatsapp_rpc_call`) || `social/` | `_base.*` | socialReceive / socialSend |-| `proxy/` | `proxy_config.execute_proxy_config` | 10-operation matrix; called by both `ProxyConfigNode.dispatch` and `tools.py`'s AI-tool branch |+| `proxy/` | `proxy_config/__init__.py::execute_proxy_config` | 10-operation matrix; called by both `ProxyConfigNode.dispatch` and `tools.py`'s AI-tool branch |Cross-domain infrastructure lives in `services/plugin/` (e.g.`edge_walker.py` for agent connection discovery, `routing.py` for@@ -194,13 +197,13 @@ Credentials live **in each node folder's `_credentials.py`** — samethe sibling file via relative path:```python-# inside server/nodes/google/gmail.py+# inside server/nodes/google/gmail/__init__.pyfrom ._credentials import GoogleCredential # shared with 6 siblings-# inside server/nodes/model/openai_chat_model.py+# inside server/nodes/model/openai_chat_model/__init__.pyfrom ._credentials import OpenAICredential # one of 10 cloud LLM creds-# inside server/nodes/twitter/twitter_send.py+# inside server/nodes/twitter/twitter_send/__init__.pyfrom ._credentials import TwitterCredential # shared with 3 siblings```@@ -216,7 +219,7 @@ from ._credentials import TwitterCredential # shared with 3 sibling| `nodes/search/` | `BraveSearch / Serper / Perplexity` inlined in each plugin file | single-use per plugin |Declare inline only when genuinely single-use (see-`nodes/search/brave_search.py` for the inline pattern). Declare in+`nodes/search/brave_search/__init__.py` for the inline pattern). Declare in`_credentials.py` when the folder has 2+ plugins that share auth.Auto-discovery is automatic — when the nodes walker imports a plugin@@ -327,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.-### Seven generic registries to plug into+### Generic registries to plug into (18 at time of writing; `grep -rn '^def register_' server/services server/core`)Telegram's `__init__.py` is the canonical wiring example. Adding anyof these concerns to your plugin is one `register_*` call from your