@sleep2agi/agent-node 2.5.0-preview.21 → 2.5.0-preview.22

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 +3 -71
  2. package/dist/cli.js +112 -142
  3. package/package.json +5 -9
package/README.md CHANGED
@@ -11,7 +11,7 @@ The supported entry point is the `anet` CLI from `@sleep2agi/agent-network`, whi
11
11
 
12
12
  ## Install
13
13
 
14
- You usually don't install this package directly — `anet node create` and `anet node start` launch it for you. For the experimental `grok-build-cli` co-presence runtime, `anet` capability-checks any global `agent-node` and otherwise runs `npx -y @sleep2agi/agent-node@preview`; no global `agent-node` install is required. To pin the stable package for other runtimes:
14
+ You usually don't install this package directly — `anet node create` and `anet node start` use it via `npx`. To pin it:
15
15
 
16
16
  ```bash
17
17
  npm install -g @sleep2agi/agent-node
@@ -44,7 +44,7 @@ CLI flags:
44
44
  |---|---|---|
45
45
  | `--alias` | required | unique name in the hub |
46
46
  | `--hub` | `http://127.0.0.1:9200` | CommHub URL |
47
- | `--runtime` | `claude-agent-sdk` | `claude-agent-sdk` / `codex-sdk` / `claude-code-cli` / `grok-build-acp` / `grok-build-cli` / `http-api` |
47
+ | `--runtime` | `claude-agent-sdk` | `claude-agent-sdk` / `codex-sdk` / `codex-app-server` / `claude-code-cli` / `grok-build-acp` / `http-api` |
48
48
  | `--model` | runtime default | passed through to the SDK |
49
49
  | `--tools` | (none) | `all` or comma-separated list |
50
50
  | `--max-turns` | `50` | upper bound per task |
@@ -56,9 +56,9 @@ CLI flags:
56
56
  |---|---|---|---|
57
57
  | `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 |
58
58
  | `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 |
59
+ | `codex-app-server` | local `codex app-server` + TUI bridge | preview; production locked | canonical RFC-030 runtime. The current CLI entry starts the Phase-0 direct path; Policy Gateway, §8 review, merge and production approval remain locked |
59
60
  | `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)) |
60
61
  | `grok-build-acp` | local `grok agent stdio` | stable runtime, native MCP injection boundary remains preview | requires Grok Build CLI login; stable for receive/reply, session persistence, and explicit CommHub delegation handled by agent-node |
61
- | `grok-build-cli` | local Grok TUI or process-per-turn Grok CLI | dangerous experimental preview | shared TUI is text-only with fixed `[todo_write]`; Linux and exact Grok `0.2.93 (f00f96316d)` required; trusted tasks only |
62
62
  | `http-api` | OpenAI/Anthropic-compatible HTTP | experimental | reads `ANTHROPIC_*`, `OPENAI_*`, or `MINIMAX_CODING_API_KEY` environment variables |
63
63
 
64
64
  Runtimes are loaded lazily — picking one doesn't pull the others' dependencies. `claude-code-cli` adds zero extra SDK weight.
@@ -90,74 +90,6 @@ Known boundary:
90
90
  - `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.
91
91
  - Grok tool-state boilerplate such as "Do not attempt to use tools from these servers yet" is stripped from final CommHub replies so users see the actual task answer.
92
92
 
93
- ## Grok shared TUI — experimental preview
94
-
95
- > **Not production-ready:** network tasks drive the same TUI and share its conversation context. Approval ownership is not fully hardened. Use only with trusted tasks on a trusted network. This path belongs to the npm `preview` channel and is not a capability claim for `latest`.
96
-
97
- The preview is currently supported only on Linux with procfs mounted at `/proc` (including `/proc/self/fd`) and is pinned to build `grok 0.2.93 (f00f96316d)`; the known stable installer prints the same build with an optional trailing ` [stable]`. Install and authenticate that Grok CLI build as the same operating-system user that runs the node:
98
-
99
- ```bash
100
- grok login
101
- grok --version
102
- ```
103
-
104
- Use the supported `anet` entry point. In terminal 1:
105
-
106
- ```bash
107
- anet node create grok-shared --runtime grok-build-cli
108
- anet node start grok-shared
109
- ```
110
-
111
- In terminal 2 on the same machine and user account:
112
-
113
- ```bash
114
- anet grok attach grok-shared
115
- ```
116
-
117
- `anet node start` owns the Grok PTY and the local attach socket. `anet grok attach` relays that same terminal and detaches on `Ctrl-]`. A task delivered by CommHub is submitted into the visible shared session, and the completed answer is routed back to the originating task.
118
-
119
- For credential isolation, this preview selects a runtime-owned TUI agent
120
- profile with the exact model-tool inventory `[todo_write]`. Filesystem, shell,
121
- network, media, MCP, scheduler, and subagent tools are unavailable. Generic
122
- `tools` and `maxTurns` settings are rejected in co-presence because pinned
123
- Grok ignores those CLI flags in interactive mode. This is a text-only shared
124
- conversation preview, not a coding runtime.
125
-
126
- Grok 0.2.93 automatically resolves the fixed session-local `todo_write`
127
- helper. The preview accepts at most one exact observed no-request-ID
128
- `permission_requested` → `permission_resolved(decision=allow)` lifecycle
129
- during each active network turn and only when no human decision was sent. Every
130
- other automatic, mismatched, overlapping, or unfinished permission lifecycle
131
- still fails closed. This exception is preview-only and does not satisfy the
132
- approval-owner gate required for `latest`.
133
-
134
- If no compatible global `agent-node` is installed, `anet` uses `npx -y @sleep2agi/agent-node@preview` to fetch and resolve the package, verifies preview metadata plus the machine-readable `ANET_CAPABILITY_GROK_COPRESENCE_V2` marker, and then launches the resolved entrypoint directly so stop signals reach the real runtime. An older headless-only or V1 co-presence package does not pass this check. First start therefore needs npm registry access or an already populated npm cache. An incompatible global package is not silently allowed to select another runtime.
135
-
136
- This preview supports the CommHub inbox lane used by `anet node start`.
137
- Feishu configuration is rejected for `grok-build-cli`: its forked worker log
138
- path is not yet inside this runtime's credential-isolated boundary. The npm
139
- resolver, agent-node parent, Grok probes, PTY, and helper processes each use
140
- an exact from-empty environment; durable pending replies and goal state are
141
- redacted and owner-only. Same-UID host processes remain trusted.
142
-
143
- The legacy process-per-turn Grok CLI path uses the same runtime name with an explicit creation flag:
144
-
145
- ```bash
146
- anet node create grok-turn --runtime grok-build-cli --grok-headless
147
- anet node start grok-turn
148
- ```
149
-
150
- This headless node cannot be used with `anet grok attach`. It is also distinct from ACP headless mode:
151
-
152
- ```bash
153
- anet node create grok-acp --runtime grok-build-acp
154
- anet node start grok-acp
155
- ```
156
-
157
- `grok-build-acp` launches `grok agent stdio`; `grok-build-cli --grok-headless` launches one streaming-JSON Grok CLI turn per task.
158
-
159
- The formal native Leader/Policy Gateway design is not shipped by this experimental path. Its Phase 0 protocol freeze, Phase 1A gate, production-grade approval ownership, and `latest` release gate remain locked. See the [Grok co-presence preview guide](../docs/grok-build-cli-preview.md).
160
-
161
93
  ## Provider presets (claude-agent-sdk)
162
94
 
163
95
  `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.