From c11b016d223b99a8bcc0162ebeea2b43dfa3ed96 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 18 Jan 2026 15:33:22 +0000 Subject: [PATCH] fix: prefer node service naming --- CHANGELOG.md | 58 +++++---------- docs/cli/index.md | 15 ++-- docs/cli/node.md | 18 +++-- docs/cli/service.md | 3 +- src/cli/node-cli/daemon.ts | 8 +-- src/cli/node-cli/register.ts | 132 +++++++++++++++++------------------ 6 files changed, 110 insertions(+), 124 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0f53d03bc..8348921a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ Docs: https://docs.clawd.bot -## 2026.1.18-5 +## 2026.1.17-7 ### Changes - Exec approvals: add `clawdbot approvals` CLI for viewing and updating gateway/node allowlists. @@ -10,10 +10,7 @@ Docs: https://docs.clawd.bot - Status: show gateway + node service summaries in `clawdbot status` and `status --all`. - Control UI: add gateway/node target selector for exec approvals. - Docs: add approvals/service references and refresh node/control UI docs. - -## 2026.1.18-4 - -### Changes +- Dependencies: update core + plugin deps (grammy, vitest, openai, Microsoft agents hosting, etc.). - macOS: switch PeekabooBridge integration to the tagged Swift Package Manager release (no submodule). - macOS: stop syncing Peekaboo as a git submodule in postinstall. - Swabble: use the tagged Commander Swift package release. @@ -22,22 +19,6 @@ Docs: https://docs.clawd.bot - Memory: add native Gemini embeddings provider for memory search. (#1151) - Agents: add local docs path resolution and include docs/mirror/source/community pointers in the system prompt. - Slack: add HTTP webhook mode via Bolt HTTP receiver for Events API deployments. (#1143) — thanks @jdrhyne. - -### Fixes -- Auth profiles: keep auto-pinned preference while allowing rotation on failover; user pins stay locked. (#1138) — thanks @cheeeee. -- Agents: sanitize oversized image payloads before send and surface image-dimension errors. -- macOS: avoid touching launchd in Remote over SSH so quitting the app no longer disables the remote gateway. (#1105) -- Memory: index atomically so failed reindex preserves the previous memory database. (#1151) -- Memory: avoid sqlite-vec unique constraint failures when reindexing duplicate chunk ids. (#1151) - -## 2026.1.18-5 - -### Changes -- Dependencies: update core + plugin deps (grammy, vitest, openai, Microsoft agents hosting, etc.). - -## 2026.1.18-3 - -### Changes - Exec: add host/security/ask routing for gateway + node exec. - Exec: add `/exec` directive for per-session exec defaults (host/security/ask/node). - macOS: migrate exec approvals to `~/.clawdbot/exec-approvals.json` with per-agent allowlists and skill auto-allow toggle. @@ -51,17 +32,28 @@ Docs: https://docs.clawd.bot - Docs: refresh exec/elevated/exec-approvals docs for the new flow. https://docs.clawd.bot/tools/exec-approvals - Docs: add node host CLI + update exec approvals/bridge protocol docs. https://docs.clawd.bot/cli/node - ACP: add experimental ACP support for IDE integrations (`clawdbot acp`). Thanks @visionik. +- Tools: allow `sessions_spawn` to override thinking level for sub-agent runs. +- Channels: unify thread/topic allowlist matching + command/mention gating helpers across core providers. +- Models: add Qwen Portal OAuth provider support. (#1120) — thanks @mukhtharcm. +- Memory: add `--verbose` logging for memory status + batch indexing details. +- Memory: allow parallel OpenAI batch indexing jobs (default concurrency: 2). +- macOS: add per-agent exec approvals with allowlists, skill CLI auto-allow, and settings UI. +- Docs: add exec approvals guide and link from tools index. https://docs.clawd.bot/tools/exec-approvals ### Fixes +- Auth profiles: keep auto-pinned preference while allowing rotation on failover; user pins stay locked. (#1138) — thanks @cheeeee. +- Agents: sanitize oversized image payloads before send and surface image-dimension errors. +- macOS: avoid touching launchd in Remote over SSH so quitting the app no longer disables the remote gateway. (#1105) +- Memory: index atomically so failed reindex preserves the previous memory database. (#1151) +- Memory: avoid sqlite-vec unique constraint failures when reindexing duplicate chunk ids. (#1151) - Exec approvals: enforce allowlist when ask is off; prefer raw command for node approvals/events. - Tools: return a companion-app-required message when node exec is requested with no paired node. - Streaming: emit assistant deltas for OpenAI-compatible SSE chunks. (#1147) — thanks @alauppe. - Model fallback: treat timeout aborts as failover while preserving user aborts. (#1137) — thanks @cheeeee. - -## 2026.1.18-2 - -### Fixes - Tests: stabilize plugin SDK resolution and embedded agent timeouts. +- Memory: apply OpenAI batch defaults even without explicit remote config. +- macOS: bundle Textual resources in packaged app builds to avoid code block crashes. (#1006) +- Discord: only emit slow listener warnings after 30s. ## 2026.1.17-6 @@ -89,22 +81,6 @@ Docs: https://docs.clawd.bot ### Fixes - Voice call: include request query in Twilio webhook verification when publicUrl is set. (#864) -## 2026.1.18-1 - -### Changes -- Tools: allow `sessions_spawn` to override thinking level for sub-agent runs. -- Channels: unify thread/topic allowlist matching + command/mention gating helpers across core providers. -- Models: add Qwen Portal OAuth provider support. (#1120) — thanks @mukhtharcm. -- Memory: add `--verbose` logging for memory status + batch indexing details. -- Memory: allow parallel OpenAI batch indexing jobs (default concurrency: 2). -- macOS: add per-agent exec approvals with allowlists, skill CLI auto-allow, and settings UI. -- Docs: add exec approvals guide and link from tools index. https://docs.clawd.bot/tools/exec-approvals - -### Fixes -- Memory: apply OpenAI batch defaults even without explicit remote config. -- macOS: bundle Textual resources in packaged app builds to avoid code block crashes. (#1006) -- Tools: return a companion-app-required message when `system.run` is requested without a supporting node. -- Discord: only emit slow listener warnings after 30s. ## 2026.1.17-3 ### Changes diff --git a/docs/cli/index.md b/docs/cli/index.md index a28192fd2..47ae49c37 100644 --- a/docs/cli/index.md +++ b/docs/cli/index.md @@ -805,12 +805,15 @@ All `cron` commands accept `--url`, `--token`, `--timeout`, `--expect-final`. Subcommands: - `node start --host --port 18790` -- `node daemon status` -- `node daemon install [--host ] [--port ] [--tls] [--tls-fingerprint ] [--node-id ] [--display-name ] [--runtime ] [--force]` -- `node daemon uninstall` -- `node daemon start` -- `node daemon stop` -- `node daemon restart` +- `node service status` +- `node service install [--host ] [--port ] [--tls] [--tls-fingerprint ] [--node-id ] [--display-name ] [--runtime ] [--force]` +- `node service uninstall` +- `node service start` +- `node service stop` +- `node service restart` + +Legacy alias: +- `node daemon …` (same as `node service …`) ## Nodes diff --git a/docs/cli/node.md b/docs/cli/node.md index 367d13adb..c6a070376 100644 --- a/docs/cli/node.md +++ b/docs/cli/node.md @@ -37,12 +37,12 @@ Options: - `--node-id `: Override node id (clears pairing token) - `--display-name `: Override the node display name -## Daemon (background service) +## Service (background) Install a headless node host as a user service. ```bash -clawdbot node daemon install --host --port 18790 +clawdbot node service install --host --port 18790 # or clawdbot service node install --host --port 18790 ``` @@ -62,11 +62,17 @@ Manage the service: ```bash clawdbot node status clawdbot service node status +clawdbot node service status +clawdbot node service start +clawdbot node service stop +clawdbot node service restart +clawdbot node service uninstall +``` + +Legacy alias: + +```bash clawdbot node daemon status -clawdbot node daemon start -clawdbot node daemon stop -clawdbot node daemon restart -clawdbot node daemon uninstall ``` ## Pairing diff --git a/docs/cli/service.md b/docs/cli/service.md index de6d199fc..a3cf536a2 100644 --- a/docs/cli/service.md +++ b/docs/cli/service.md @@ -46,5 +46,6 @@ Notes: ## Aliases - `clawdbot daemon …` → `clawdbot service gateway …` -- `clawdbot node daemon …` → `clawdbot service node …` +- `clawdbot node service …` → `clawdbot service node …` - `clawdbot node status` → `clawdbot service node status` +- `clawdbot node daemon …` → `clawdbot service node …` (legacy) diff --git a/src/cli/node-cli/daemon.ts b/src/cli/node-cli/daemon.ts index f0b6a6a9a..3bebec983 100644 --- a/src/cli/node-cli/daemon.ts +++ b/src/cli/node-cli/daemon.ts @@ -46,7 +46,7 @@ type NodeDaemonStatusOptions = { }; function renderNodeServiceStartHints(): string[] { - const base = ["clawdbot node daemon install", "clawdbot node start"]; + const base = ["clawdbot node service install", "clawdbot node start"]; switch (process.platform) { case "darwin": return [ @@ -133,7 +133,7 @@ export async function runNodeDaemonInstall(opts: NodeDaemonInstallOptions) { }; if (resolveIsNixMode(process.env)) { - fail("Nix mode detected; daemon install is disabled."); + fail("Nix mode detected; service install is disabled."); return; } @@ -168,7 +168,7 @@ export async function runNodeDaemonInstall(opts: NodeDaemonInstallOptions) { }); if (!json) { defaultRuntime.log(`Node service already ${service.loadedText}.`); - defaultRuntime.log("Reinstall with: clawdbot node daemon install --force"); + defaultRuntime.log("Reinstall with: clawdbot node service install --force"); } return; } @@ -244,7 +244,7 @@ export async function runNodeDaemonUninstall(opts: NodeDaemonLifecycleOptions = }; if (resolveIsNixMode(process.env)) { - fail("Nix mode detected; daemon uninstall is disabled."); + fail("Nix mode detected; service uninstall is disabled."); return; } diff --git a/src/cli/node-cli/register.ts b/src/cli/node-cli/register.ts index e7d28c7f0..61a5bc268 100644 --- a/src/cli/node-cli/register.ts +++ b/src/cli/node-cli/register.ts @@ -51,71 +51,71 @@ export function registerNodeCli(program: Command) { }); }); + const registerNodeServiceCommands = (cmd: Command) => { + cmd + .command("status") + .description("Show node service status") + .option("--json", "Output JSON", false) + .action(async (opts) => { + await runNodeDaemonStatus(opts); + }); + + cmd + .command("install") + .description("Install the node service (launchd/systemd/schtasks)") + .option("--host ", "Gateway bridge host") + .option("--port ", "Gateway bridge port") + .option("--tls", "Use TLS for the bridge connection", false) + .option("--tls-fingerprint ", "Expected TLS certificate fingerprint (sha256)") + .option("--node-id ", "Override node id (clears pairing token)") + .option("--display-name ", "Override node display name") + .option("--runtime ", "Service runtime (node|bun). Default: node") + .option("--force", "Reinstall/overwrite if already installed", false) + .option("--json", "Output JSON", false) + .action(async (opts) => { + await runNodeDaemonInstall(opts); + }); + + cmd + .command("uninstall") + .description("Uninstall the node service (launchd/systemd/schtasks)") + .option("--json", "Output JSON", false) + .action(async (opts) => { + await runNodeDaemonUninstall(opts); + }); + + cmd + .command("start") + .description("Start the node service (launchd/systemd/schtasks)") + .option("--json", "Output JSON", false) + .action(async (opts) => { + await runNodeDaemonStart(opts); + }); + + cmd + .command("stop") + .description("Stop the node service (launchd/systemd/schtasks)") + .option("--json", "Output JSON", false) + .action(async (opts) => { + await runNodeDaemonStop(opts); + }); + + cmd + .command("restart") + .description("Restart the node service (launchd/systemd/schtasks)") + .option("--json", "Output JSON", false) + .action(async (opts) => { + await runNodeDaemonRestart(opts); + }); + }; + + const service = node + .command("service") + .description("Manage the headless node service (launchd/systemd/schtasks)"); + registerNodeServiceCommands(service); + const daemon = node - .command("daemon") - .description("Manage the headless node daemon service (launchd/systemd/schtasks)"); - - node - .command("status") - .description("Show node service status") - .option("--json", "Output JSON", false) - .action(async (opts) => { - await runNodeDaemonStatus(opts); - }); - - daemon - .command("status") - .description("Show node daemon status") - .option("--json", "Output JSON", false) - .action(async (opts) => { - await runNodeDaemonStatus(opts); - }); - - daemon - .command("install") - .description("Install the node daemon service (launchd/systemd/schtasks)") - .option("--host ", "Gateway bridge host") - .option("--port ", "Gateway bridge port") - .option("--tls", "Use TLS for the bridge connection", false) - .option("--tls-fingerprint ", "Expected TLS certificate fingerprint (sha256)") - .option("--node-id ", "Override node id (clears pairing token)") - .option("--display-name ", "Override node display name") - .option("--runtime ", "Daemon runtime (node|bun). Default: node") - .option("--force", "Reinstall/overwrite if already installed", false) - .option("--json", "Output JSON", false) - .action(async (opts) => { - await runNodeDaemonInstall(opts); - }); - - daemon - .command("uninstall") - .description("Uninstall the node daemon service (launchd/systemd/schtasks)") - .option("--json", "Output JSON", false) - .action(async (opts) => { - await runNodeDaemonUninstall(opts); - }); - - daemon - .command("start") - .description("Start the node daemon service (launchd/systemd/schtasks)") - .option("--json", "Output JSON", false) - .action(async (opts) => { - await runNodeDaemonStart(opts); - }); - - daemon - .command("stop") - .description("Stop the node daemon service (launchd/systemd/schtasks)") - .option("--json", "Output JSON", false) - .action(async (opts) => { - await runNodeDaemonStop(opts); - }); - - daemon - .command("restart") - .description("Restart the node daemon service (launchd/systemd/schtasks)") - .option("--json", "Output JSON", false) - .action(async (opts) => { - await runNodeDaemonRestart(opts); - }); + .command("daemon", { hidden: true }) + .description("Legacy alias for node service commands"); + registerNodeServiceCommands(daemon); }