Skip to content

Self-improving AI Employees for everyone

docs(nodes): fix guide discrepancies found auditing the gcloud node

trohitg49969d33ad0e
diff --git a/docs-internal/node_creation.md b/docs-internal/node_creation.md
index 3d0d4047..e317aebe 100644
--- a/docs-internal/node_creation.md
+++ b/docs-internal/node_creation.md
@@ -202,7 +202,13 @@ When the CLI's OAuth grant is a fixed scope set (cf: 86 scopes, no
`--scopes`), pair it with an optional API-token field (vercel dual-path)
as the documented full-scope escape. Reference:
[`server/nodes/cloudflare/`](../server/nodes/cloudflare/) +
-[cloudflare_service.md](./cloudflare_service.md).
+[cloudflare_service.md](./cloudflare_service.md). gcloud is the second
+reference for this variant (`gcloud auth login --quiet`; random
+loopback port, so no fixed-port collision — the single-flight guard is
+kept anyway to prevent duplicate browser tabs, and it adds a pinned
+`CLOUDSDK_CONFIG` dir so node auth state never touches the operator's
+own gcloud config): [`server/nodes/gcloud/`](../server/nodes/gcloud/) +
+[gcloud_service.md](./gcloud_service.md).
## What auto-wires (don't write it yourself)
diff --git a/docs-internal/plugin_system.md b/docs-internal/plugin_system.md
index 348a1a9f..cd126e6f 100644
--- a/docs-internal/plugin_system.md
+++ b/docs-internal/plugin_system.md
@@ -1286,7 +1286,7 @@ project that publishes pre-built binaries via GitHub releases.
| Status refresh on WS connect | `make_status_refresh(source, status_key, broadcast_type)` | nothing — auto-derived from source |
| CLI subprocess invocation | `run_cli_command(binary=…, argv=…, credential=…)` | nothing — credential injection is automatic |
| Credentials Modal panel | `server/config/credential_providers.json` (read by `services.credential_registry`) | one provider entry: name, category, color, `kind: "oauth"`, `icon_ref`, `status_hook`, `ws.{login,logout,status}` handler names, fields list, instructions string. Frontend modal renders it automatically — no React file edits. |
-| AI tool surface | `services/ai.py` `DEFAULT_TOOL_NAMES` + `DEFAULT_TOOL_DESCRIPTIONS` | one row per dual-purpose ActionNode mapping `<nodeType>` → `<snake_case_of_node_type>` |
+| AI tool surface | per-plugin `tool_name` / `tool_description` ClassVars resolved via the node registry (Wave 12 D5 retired the `services/ai.py` `DEFAULT_TOOL_NAMES` / `DEFAULT_TOOL_DESCRIPTIONS` dicts — reintroduction is blocked by `tests/test_tool_registry.py`) | `tool_name` + `tool_description` on the dual-purpose ActionNode, plus a row in `tests/fixtures/tool_names_snapshot.json` locking the name |
| Skill (LLM teaching markdown) | `server/skills/<agent>/<skill-name>/SKILL.md` (auto-discovered by `SkillLoader`) | the markdown itself, plus the linkage in `visuals.json` (`"<nodeType>": { ..., "skill": "<skill-name>" }`) |
| Connection state surfaced to the modal (CLI-managed auth) | `auth_service.store_oauth_tokens(provider, "cli-managed", "cli-managed")` + `StatusBroadcaster.broadcast_credential_event` (CloudEvents v1.0 envelope wrapping `WorkflowEvent`; locked by `tests/credentials/test_credential_broadcasts.py`) | `_mark_logged_in` / `_mark_logged_out` helper pair; one `broadcaster.broadcast_credential_event("credential.oauth.connected", provider="<id>")` after login and `…disconnected` after logout. Same shape Twitter / Google logout use. |
| Auto-install of an external CLI binary | `_install.py` with `ensure_<cli>_cli()` + GitHub-releases asset map | pinned `_VERSION` constant, `(system, machine) -> (asset, kind, member)` table, and an override on `DaemonEventSource.start()` that `await`s the helper before `super().start()` (also set `binary_name = ""` to skip the framework's `shutil.which` pre-check) |
@@ -1300,7 +1300,7 @@ the skill icon resolver to find their target:
|---|---|---|
| Plugin node `type` | camelCase | `stripeAction` |
| `visuals.json` key | matches node `type` (camelCase) | `"stripeAction": { "icon": "asset:stripe", ... }` |
-| `services/ai.py` `DEFAULT_TOOL_NAMES[<type>]` | snake_case of node type | `"stripeAction": "stripe_action"` |
+| Plugin `tool_name` ClassVar (snapshot: `tests/fixtures/tool_names_snapshot.json`) | snake_case of node type | `tool_name = "stripe_action"` |
| Skill `allowed-tools` token | matches the LLM tool name above | `allowed-tools: "stripe_action"` |
`SkillLoader._parse_skill_metadata` runs each `allowed-tools` token
diff --git a/server/skills/GUIDE.md b/server/skills/GUIDE.md
index eaed1ba0..f1021ffb 100644
--- a/server/skills/GUIDE.md
+++ b/server/skills/GUIDE.md
@@ -23,6 +23,7 @@ server/skills/
├── coding_agent/ # Code execution skills
│ python-skill, javascript-skill, monty-skill, file-read-skill,
│ file-modify-skill, fs-search-skill
+├── gcloud/ # gcloud-skill (Google Cloud CLI)
├── github/ # github-skill (gh CLI)
├── payments_agent/ # stripe-skill
├── productivity_agent/ # Google Workspace skills
@@ -94,7 +95,7 @@ Provide usage guidelines, examples, and constraints.
|-------|----------|-------------|
| `name` | Yes | Lowercase, hyphens only. Must match pattern `^[a-z0-9]+(-[a-z0-9]+)*$` |
| `description` | Yes | One-line summary shown in skill lists and to the LLM |
-| `allowed-tools` | No | Space-delimited list of LLM-facing tool names (snake_case, e.g. `stripe_action`, `apify_actor`, `whatsapp_send`). The first token whose snake→camel conversion (`stripe_action` → `stripeAction`) matches a node `type` in `server/nodes/visuals.json` becomes the skill's visual source — its icon/color come from that entry via the `_visuals` handler. **Convention:** the LLM tool name MUST be the snake_case form of the node type (e.g. `stripeAction` → `stripe_action`). The same string goes into `services/ai.py` `DEFAULT_TOOL_NAMES` so the LLM and the skill agree on the name. Mismatching the snake_case (e.g. `stripe_cli` for a `stripeAction` node) silently breaks icon resolution. |
+| `allowed-tools` | No | Space-delimited list of LLM-facing tool names (snake_case, e.g. `stripe_action`, `apify_actor`, `whatsapp_send`). The first token whose snake→camel conversion (`stripe_action` → `stripeAction`) matches a node `type` in `server/nodes/visuals.json` becomes the skill's visual source — its icon/color come from that entry via the `_visuals` handler. **Convention:** the LLM tool name MUST be the snake_case form of the node type (e.g. `stripeAction` → `stripe_action`). The same string is the plugin's `tool_name` ClassVar (locked by `server/tests/fixtures/tool_names_snapshot.json`) so the LLM and the skill agree on the name. Mismatching the snake_case (e.g. `stripe_cli` for a `stripeAction` node) silently breaks icon resolution. |
| `metadata` | No | Arbitrary key-value pairs (author, version, category). **Don't set `icon`/`color` for skills that target a node** — those are resolved from the target node's `visuals.json` entry so the skill always mirrors the canvas. Skills with no node target (personality skills, memory operators, autonomous patterns) **may** set inline `icon` and `color` — they're the only visual source for those. |
### Name Format Rules
@@ -113,7 +114,7 @@ Three places have to agree for a skill's icon to render correctly:
|---|---|---|
| Plugin node `type` (in `<plugin>.py`) | camelCase | `stripeAction` |
| `server/nodes/visuals.json` key | camelCase (= node type) | `"stripeAction": { "icon": "asset:stripe", ... }` |
-| `server/services/ai.py` `DEFAULT_TOOL_NAMES` value | snake_case (LLM tool name) | `"stripeAction": "stripe_action"` |
+| Plugin `tool_name` ClassVar (snapshot: `tests/fixtures/tool_names_snapshot.json`) | snake_case (LLM tool name) | `tool_name = "stripe_action"` |
| Skill `allowed-tools` | snake_case (matches the LLM tool name) | `allowed-tools: "stripe_action"` |
The skill resolver (`SkillLoader._parse_skill_metadata`) takes each `allowed-tools` token, runs snake→camel (`stripe_action` → `stripeAction`), and looks it up in `visuals.json`. If the conversion doesn't equal the node type, no icon resolves and the skill renders without one.
diff --git a/server/tests/fixtures/tool_names_snapshot.json b/server/tests/fixtures/tool_names_snapshot.json
index 4507cb07..920718f1 100644
--- a/server/tests/fixtures/tool_names_snapshot.json
+++ b/server/tests/fixtures/tool_names_snapshot.json
@@ -70,6 +70,9 @@
"emailRead": "email_read",
"stripeAction": "stripe_action",
"cloudflareAction": "cloudflare",
+ "githubAction": "github",
+ "vercelAction": "vercel",
+ "gcloudAction": "gcloud",
"typescriptExecutor": "typescript_code",
"apifyActor": "apify_actor",
"agentBuilder": "agent_builder",