@sleep2agi/agent-node 2.4.4-preview.2 → 2.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +28 -1
  2. package/dist/cli.js +46 -44
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -39,7 +39,7 @@ CLI flags:
39
39
  |---|---|---|
40
40
  | `--alias` | required | unique name in the hub |
41
41
  | `--hub` | `http://127.0.0.1:9200` | CommHub URL |
42
- | `--runtime` | `claude-agent-sdk` | `claude-agent-sdk` / `codex-sdk` / `claude-code-cli` / `http-api` |
42
+ | `--runtime` | `claude-agent-sdk` | `claude-agent-sdk` / `codex-sdk` / `claude-code-cli` / `grok-build-acp` / `http-api` |
43
43
  | `--model` | runtime default | passed through to the SDK |
44
44
  | `--tools` | (none) | `all` or comma-separated list |
45
45
  | `--max-turns` | `50` | upper bound per task |
@@ -52,10 +52,37 @@ CLI flags:
52
52
  | `claude-agent-sdk` | [@anthropic-ai/claude-agent-sdk](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk) | verified | Anthropic-compatible API; works with MiniMax, DeepSeek, GLM, Kimi, Anthropic, OpenRouter, or custom endpoints |
53
53
  | `codex-sdk` | [@openai/codex-sdk](https://www.npmjs.com/package/@openai/codex-sdk) | unverified end-to-end | unit tests pass, no full E2E with real codex auth |
54
54
  | `claude-code-cli` | local `claude` CLI | unverified end-to-end | runs locally for Claude Pro subscribers (v0.8.2 fixed the session-resume default-loss bug; see [changelog](https://anet.sh/en/changelog)) |
55
+ | `grok-build-acp` | local `grok agent stdio` | engineering preview | requires Grok Build CLI login; stable for receive/reply, session persistence, and explicit CommHub delegation handled by agent-node |
55
56
  | `http-api` | OpenAI/Anthropic-compatible HTTP | experimental | reads `ANTHROPIC_*`, `OPENAI_*`, or `MINIMAX_CODING_API_KEY` environment variables |
56
57
 
57
58
  Runtimes are loaded lazily — picking one doesn't pull the others' dependencies. `claude-code-cli` adds zero extra SDK weight.
58
59
 
60
+ ## Grok Build ACP
61
+
62
+ `grok-build-acp` runs the local Grok Build CLI over Agent Client Protocol:
63
+
64
+ ```bash
65
+ curl -fsSL https://x.ai/cli/install.sh | bash
66
+ grok
67
+ anet node create grok-demo --runtime grok-build-acp
68
+ anet node start grok-demo
69
+ ```
70
+
71
+ The runtime starts `grok agent stdio`, authenticates with the cached Grok login, opens or loads a Grok session, sends the task prompt, collects streamed ACP notifications, and writes `grokSession` back to the node config.
72
+
73
+ Preview-stable behavior:
74
+
75
+ - CommHub task delivery and replies are handled by `agent-node`, not by Grok itself.
76
+ - Plain text tasks should be answered directly by Grok.
77
+ - Explicit delegation tasks are intercepted before Grok when they use a clear pattern such as `给 <alias> 发任务: <task>`.
78
+ - Intercepted delegation calls CommHub directly, passes `parent_task_id`, polls `get_task`, and returns the child result.
79
+
80
+ Known boundary:
81
+
82
+ - Native Grok MCP tool injection is still experimental. Do not rely on Grok itself seeing `commhub_get_all_status` or `commhub_send_task`.
83
+ - Image attachments are currently text-only because the captured Grok ACP capability reports `promptCapabilities.image=false`.
84
+ - `grok ACP error -32603` is treated as retryable once with a fresh session; the runtime now logs JSON-RPC `error.data` when Grok provides it.
85
+
59
86
  ## Provider presets (claude-agent-sdk)
60
87
 
61
88
  `anet node create` step 2 picks one of these and writes `ANTHROPIC_BASE_URL` + a default model. All Anthropic-compatible HTTP API; `--model` is passed through verbatim.