Self-improving AI Employees for everyone
Python ai-agentsai-employeeai-employeesassistantautonomous-agentsco-employeescompanygrok-botinstinctloop-agentsmuseown-your-datapersonalself-hosted
docs: fix factual discrepancies in plugin authoring docs
trohitg6d8ed2ad26c9
diff --git a/CLAUDE.md b/CLAUDE.mdindex 525b07b4..ff54f4e4 100644--- a/CLAUDE.md+++ b/CLAUDE.md@@ -3879,7 +3879,7 @@ class MyTool(ToolNode): # or SpecializedAgentBase for an agentasync def run(self, ctx, params): ...```-`BaseNode.__init_subclass__` registers the class into `NODE_METADATA`, `NODE_INPUT_MODELS`, `NODE_OUTPUT_SCHEMAS`, `_HANDLER_REGISTRY`, and `_NODE_CLASS_REGISTRY` on import. NodeSpec emits at `GET /api/schemas/nodes/<type>/spec.json`. The frontend auto-discovers via `useNodeSpec` + `componentKind` dispatch (see "Spec-driven component design" above). Icon + colour go in [`server/nodes/visuals.json`](./server/nodes/visuals.json).+`BaseNode.__init_subclass__` registers the class into `NODE_METADATA`, `_DIRECT_MODELS`, `NODE_OUTPUT_SCHEMAS`, `_HANDLER_REGISTRY`, and `_NODE_CLASS_REGISTRY` on import. NodeSpec emits at `GET /api/schemas/nodes/<type>/spec.json`. The frontend auto-discovers via `useNodeSpec` + `componentKind` dispatch (see "Spec-driven component design" above). Icon + colour go in [`server/nodes/visuals.json`](./server/nodes/visuals.json).**Cross-cutting edits that are still required (small):**- New specialized agent: add the agent's `type` string to the delegation-check tuple in [`server/services/handlers/tools.py:execute_tool()`](./server/services/handlers/tools.py) (~line 224) so the parent agent's `delegate_to_*` tool finds it. Also update `AI_AGENT_TYPES` frozenset in [`server/constants.py`](./server/constants.py) — used for legacy delegation checks. Both are flagged as tech debt; see "remaining tribal arrays" note.diff --git a/docs-internal/node_creation.md b/docs-internal/node_creation.mdindex 5769e227..9a7ea7df 100644--- a/docs-internal/node_creation.md+++ b/docs-internal/node_creation.md@@ -207,7 +207,7 @@ walker does on startup), these registrations happen automatically:| Mechanism | Where | When ||---|---|---|| Node class registration | `_NODE_CLASS_REGISTRY` | `BaseNode.__init_subclass__` on class definition |-| Metadata + Pydantic schemas | `NODE_METADATA`, `NODE_INPUT_MODELS`, `NODE_OUTPUT_SCHEMAS` | same |+| Metadata + Pydantic schemas | `NODE_METADATA`, `_DIRECT_MODELS`, `NODE_OUTPUT_SCHEMAS` | same || Handler dispatch | `_PLUGIN_HANDLERS` (merged into `NodeExecutor`) | same || Auto-derived `uiHints.isConfigNode: True` | `NODE_METADATA[type]['uiHints']` | `_metadata_dict` runs `_derive_auto_ui_hints(cls.group)` for every plugin in a `('memory', 'tool')` group. Plugin `ui_hints = {...}` always wins. Tells the frontend that the node's panel inherits its parent's main inputs. See [plugin_system.md → Auto-derived uiHints](./plugin_system.md#auto-derived-uihints). || Credentials | `CREDENTIAL_REGISTRY` | `Credential.__init_subclass__` when `_credentials.py` is imported |diff --git a/docs-internal/plugin_system.md b/docs-internal/plugin_system.mdindex d69ff64d..532cfcce 100644--- a/docs-internal/plugin_system.md+++ b/docs-internal/plugin_system.md@@ -77,7 +77,7 @@ class ExampleSearchNode(ActionNode):**That's it.** On server restart:- `BaseNode.__init_subclass__` eagerly registers the class into four- registries: `NODE_METADATA`, `NODE_INPUT_MODELS`,+ registries: `NODE_METADATA`, `_DIRECT_MODELS`,`NODE_OUTPUT_SCHEMAS`, `_HANDLER_REGISTRY`.- `_NODE_CLASS_REGISTRY` indexes the class itself so Temporal workersand tool dispatch can look it up by type.@@ -465,7 +465,7 @@ themselves** into those registries from their package `__init__.py`.```server/nodes/telegram/-├── __init__.py # imports + 6 register_* calls (no logic)+├── __init__.py # imports + 5 register_* calls covering 5 registries (no logic)├── _credentials.py # TelegramCredential (ApiKeyCredential)├── _service.py # TelegramService singleton (bot lifecycle)├── _handlers.py # WebSocket handlers + WS_HANDLERS dict@@ -479,7 +479,7 @@ 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.-### Five cross-cutting registries+### Up to six cross-cutting registries — use only what your plugin needs| Concern | Registry module | Register from plugin via ||---|---|---|@@ -488,10 +488,16 @@ per node type) — same pattern as every other folder.| 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()`. |-All five accept idempotent re-imports (same callable / class for the+All accept idempotent re-imports (same callable / class for thesame key is a no-op; conflicts raise `ValueError`).+**Plugins use only the registries they need.** Telegram uses 5 (no+router); Stripe uses 4 (webhook-driven, no filter/precheck); Android+uses 4 (with router); WhatsApp uses 5. There is no "register every+hook" rule.+### Telegram `__init__.py` (canonical wiring)```pythondiff --git a/docs-internal/schema_source_of_truth_rfc.md b/docs-internal/schema_source_of_truth_rfc.mdindex 00461d60..70a2546d 100644--- a/docs-internal/schema_source_of_truth_rfc.md+++ b/docs-internal/schema_source_of_truth_rfc.md@@ -36,7 +36,7 @@ Wave 3 proved the pattern for output schemas. Wave 6 generalises it to the **ful1. Define `XyzParams(BaseNodeParams)` in [server/models/nodes.py](../server/models/nodes.py) with `type: Literal["xyz"]` discriminator and Field constraints.2. Register in `KnownNodeParams` discriminated union.-3. Register in `NODE_INPUT_MODELS` dict in `node_input_schemas.py`.+3. Register in `_DIRECT_MODELS` dict in `node_input_schemas.py`.4. Add `NODE_METADATA["xyz"] = {displayName, icon, group, description, version}` in `node_metadata.py`.Zero frontend change for parameter rendering. Icons that are SVG assets still need frontend import until SVG payload migration is its own follow-up.diff --git a/server/nodes/README.md b/server/nodes/README.mdindex 7bac8e19..bd5d5363 100644--- a/server/nodes/README.md+++ b/server/nodes/README.md@@ -224,7 +224,7 @@ similar plugin.```server/nodes/telegram/-├── __init__.py # imports + 6 register_* calls (zero logic)+├── __init__.py # imports + 5 register_* calls covering 5 registries (zero logic)├── _credentials.py # TelegramCredential subclass├── _service.py # singleton bot lifecycle (connect / send / poll)├── _handlers.py # WS_HANDLERS dict (telegram_connect, …)