@sleep2agi/agent-network 2.3.0-preview.27 → 2.3.0-preview.29
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.
- package/README.md +10 -120
- package/dist/bin/cli.d.ts +1 -1
- package/dist/bin/cli.js +1 -1
- package/dist/src/client.js +1 -1
- package/dist/src/im/feishu/worker.js +1 -1
- package/dist/src/node-server.js +1 -1
- package/dist/src/normalize-runtime.d.ts +1 -1
- package/dist/src/opencode-pin.d.ts +1 -6
- package/dist/src/opencode-preset.d.ts +8 -37
- package/package.json +4 -8
- package/dist/src/grok-attach-client.d.ts +0 -115
- package/dist/src/grok-copresence-profile.d.ts +0 -44
- package/dist/src/opencode-agent-node-pair.d.ts +0 -14
- package/dist/src/opencode-auth-login.d.ts +0 -43
- package/dist/src/opencode-launch-env.d.ts +0 -13
- package/dist/src/opencode-owner-mode.d.ts +0 -6
- package/dist/src/opencode-package-binary.d.ts +0 -21
- package/dist/src/opencode-safe-root.d.ts +0 -27
- package/dist/src/opencode-smoke-env.d.ts +0 -1
- package/dist/src/runtime-choices.d.ts +0 -15
package/README.md
CHANGED
|
@@ -49,17 +49,14 @@ npm install -g @sleep2agi/agent-network@preview
|
|
|
49
49
|
anet -v
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
|
|
53
|
-
version table embedded in this source tree:
|
|
52
|
+
Current npm dist-tags verified on 2026-05-28 (v0.10.11 stable):
|
|
54
53
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
The Grok co-presence text below describes candidate source only until a
|
|
62
|
-
reviewed package is explicitly published to `preview`.
|
|
54
|
+
| Package | latest | preview |
|
|
55
|
+
|---|---:|---:|
|
|
56
|
+
| `@sleep2agi/agent-network` | `2.2.10` | `2.2.10-preview.3` |
|
|
57
|
+
| `@sleep2agi/commhub-server` | `0.8.4` | `0.8.4-preview.1` |
|
|
58
|
+
| `@sleep2agi/agent-network-dashboard` | `0.5.6` | `0.5.7-preview.2` |
|
|
59
|
+
| `@sleep2agi/agent-node` | `2.4.7` | `2.4.8-preview.0` |
|
|
63
60
|
|
|
64
61
|
## 5-Minute Quick Start
|
|
65
62
|
|
|
@@ -94,15 +91,15 @@ http://localhost:3000
|
|
|
94
91
|
### 3. Log In, Create A Node, Start It
|
|
95
92
|
|
|
96
93
|
```bash
|
|
97
|
-
anet login --username admin --password anethub
|
|
94
|
+
anet login --hub http://127.0.0.1:9200 --username admin --password anethub
|
|
98
95
|
anet node create my-bot
|
|
99
96
|
anet node start my-bot
|
|
100
97
|
```
|
|
101
98
|
|
|
102
99
|
`anet node create` walks you through:
|
|
103
100
|
|
|
104
|
-
1. Runtime: `claude-code-cli`, `claude-agent-sdk`, `codex-sdk`,
|
|
105
|
-
2. Provider preset:
|
|
101
|
+
1. Runtime: `claude-code-cli`, `claude-agent-sdk`, `codex-sdk`, or `grok-build-acp`.
|
|
102
|
+
2. Provider preset: Anthropic, MiniMax, InternLM, Xiaomi MiMo, or `custom` (any Anthropic-compatible endpoint — used for DeepSeek / GLM / Kimi / OpenRouter etc.; codex-sdk for OpenAI Codex; grok-build-acp for xAI Grok).
|
|
106
103
|
3. API key and model settings.
|
|
107
104
|
|
|
108
105
|
When the node starts successfully, look for:
|
|
@@ -157,47 +154,7 @@ Do not expose the hub directly to the public internet without a reverse proxy, H
|
|
|
157
154
|
| `claude-code-cli` | You want Claude Code CLI sessions and channel support | Uses Claude Code process; supports stable `COMMHUB_RESUME_ID` in recent previews |
|
|
158
155
|
| `claude-agent-sdk` | You want Anthropic-compatible API providers | Good default for provider presets |
|
|
159
156
|
| `codex-sdk` | You want Codex-backed nodes | Useful as a backup runtime when Claude quota is constrained |
|
|
160
|
-
| `codex-app-server` | You want a Codex TUI/app-server bridge | Preview bridge with a bound Codex thread |
|
|
161
157
|
| `grok-build-acp` | You want Grok Build through `grok agent stdio` | Requires Grok Build CLI auth; stable for receive/reply, session persistence, and explicit `send_task` delegation |
|
|
162
|
-
| `grok-build-cli` | You want one human-visible, text-only Grok TUI shared with trusted network tasks | **Experimental preview only.** Fixed `[todo_write]` tool profile; Linux and an exact Grok CLI build are required; approval ownership is not fully hardened |
|
|
163
|
-
| `opencode-cli` | You want OpenCode ACP with an Anthropic/OpenAI API preset or a keyless OpenCode model | **Preview only.** Requires exact `opencode-ai@1.18.1` and the paired preview packages; safe mode is text-only and uses fresh private runtime roots |
|
|
164
|
-
|
|
165
|
-
### OpenCode ACP — Preview
|
|
166
|
-
|
|
167
|
-
Install the exact release pair and vetted OpenCode pin, then create a node:
|
|
168
|
-
|
|
169
|
-
```bash
|
|
170
|
-
npm install -g @sleep2agi/agent-network@preview @sleep2agi/agent-node@preview opencode-ai@1.18.1
|
|
171
|
-
anet node create opencode-demo --runtime opencode-cli
|
|
172
|
-
anet node start opencode-demo
|
|
173
|
-
```
|
|
174
|
-
|
|
175
|
-
All three are deliberate global prerequisites for this preview. The OpenCode
|
|
176
|
-
launch path does not auto-run `npx` from a project-controlled PATH. It accepts
|
|
177
|
-
only canonical npm package entrypoints with exact metadata and rejects an
|
|
178
|
-
otherwise convincing same-version package inside the current project or an
|
|
179
|
-
enclosing monorepo workspace.
|
|
180
|
-
|
|
181
|
-
The wizard supports Anthropic and OpenAI API-key presets. If the selected key
|
|
182
|
-
is not exported, use the printed `anet opencode auth-login` command; OpenAI is
|
|
183
|
-
forced to the upstream `Manually enter API Key` method. By default OpenCode
|
|
184
|
-
runs only on Linux in an external random `0700` launch-scoped root whose
|
|
185
|
-
`workspace` and fresh private HOME/XDG roots are removed together after exit.
|
|
186
|
-
Local code tools and unattended `question` are disabled. Only explicit
|
|
187
|
-
`flags.opencodeUnsafeTools=true` restores the project cwd for trusted tasks.
|
|
188
|
-
|
|
189
|
-
The default trusted base is `/run/user/$uid`. On a non-systemd host, pre-create
|
|
190
|
-
an owner-only directory and set its absolute path in
|
|
191
|
-
`ANET_OPENCODE_SAFE_BASE`; the base and every ancestor must not be group/other
|
|
192
|
-
writable. The whole preview runtime (safe and unsafe) hard-fails when the base
|
|
193
|
-
cannot be verified or the host is not Linux. Unsafe still uses the external
|
|
194
|
-
writable root; it changes only cwd and local-tool policy. For exact 1.18.1, every workspace ancestor is scanned for
|
|
195
|
-
`opencode.jsonc`, `opencode.json`, `.opencode`, `AGENTS.md`, `CLAUDE.md`,
|
|
196
|
-
`CONTEXT.md`, `.claude`, `.agents`, and `.git`, then its identity and candidates
|
|
197
|
-
are checked again after the version probe immediately before ACP spawn.
|
|
198
|
-
`OPENCODE_PURE` and `OPENCODE_DISABLE_PROJECT_CONFIG` remain defense in depth,
|
|
199
|
-
not the isolation boundary. Local OpenCode conversation history is not promised
|
|
200
|
-
across process crashes; use Docker/VM when an OS security boundary is needed.
|
|
201
158
|
|
|
202
159
|
### Grok Build ACP
|
|
203
160
|
|
|
@@ -239,68 +196,6 @@ Current boundary:
|
|
|
239
196
|
|
|
240
197
|
Details: `docs/grok-build-runtime.md`.
|
|
241
198
|
|
|
242
|
-
### Grok Co-Presence TUI — Experimental Preview
|
|
243
|
-
|
|
244
|
-
> **Dangerous experimental feature:** network tasks drive the same Grok TUI and share its conversation context. Approval ownership is not fully hardened. Use only with trusted tasks on a trusted network. This runtime is not supported for production and is not part of the `latest` release channel.
|
|
245
|
-
|
|
246
|
-
The co-presence candidate is currently pinned to Linux with procfs mounted at `/proc` (including `/proc/self/fd`) and the exact Grok CLI build reported as `grok 0.2.93 (f00f96316d)` (the stable installer may append ` [stable]`). Install that build and log in as the same operating-system user that will run `anet`:
|
|
247
|
-
|
|
248
|
-
```bash
|
|
249
|
-
grok login
|
|
250
|
-
grok --version
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
Create the shared-TUI node and start its bridge in the first terminal:
|
|
254
|
-
|
|
255
|
-
```bash
|
|
256
|
-
anet node create grok-shared --runtime grok-build-cli
|
|
257
|
-
anet node start grok-shared
|
|
258
|
-
```
|
|
259
|
-
|
|
260
|
-
Attach an interactive terminal to the same TUI from a second terminal on the same machine and user account:
|
|
261
|
-
|
|
262
|
-
```bash
|
|
263
|
-
anet grok attach grok-shared
|
|
264
|
-
```
|
|
265
|
-
|
|
266
|
-
Press `Ctrl-]` to detach. While attached, a CommHub task sent to `grok-shared` is submitted to this same TUI, rendered in the visible session, and its completed answer is routed back to the originating task. This shared-session behavior is the reason untrusted tasks must not be connected.
|
|
267
|
-
|
|
268
|
-
This preview selects a runtime-owned TUI agent profile whose exact model-tool
|
|
269
|
-
inventory is `[todo_write]`. Filesystem, shell, network, media, MCP, scheduler,
|
|
270
|
-
and subagent tools are unavailable; custom `tools`/`maxTurns` are unsupported
|
|
271
|
-
in co-presence. It is a text-only co-presence preview, not a coding profile.
|
|
272
|
-
|
|
273
|
-
The pinned 0.2.93 TUI resolves its session-local `todo_write` helper without
|
|
274
|
-
human input. During an active network turn the preview admits only that exact
|
|
275
|
-
no-request-ID lifecycle with `decision=allow`, at most once per turn; every other tool, identity,
|
|
276
|
-
decision, overlap, mode transition, or unresolved completion remains closed.
|
|
277
|
-
This deliberately narrow preview exception is not production approval-owner
|
|
278
|
-
enforcement and is another reason to connect trusted tasks only.
|
|
279
|
-
|
|
280
|
-
`anet node start` capability-checks a compatible global `agent-node` if one exists. It requires the machine-readable `ANET_CAPABILITY_GROK_COPRESENCE_V2` marker, so an older headless-only or V1 co-presence binary cannot shadow the fixed-profile preview. A global install is not required: when it is absent or incompatible, `anet` uses `npx -y @sleep2agi/agent-node@preview` to fetch and resolve the preview package, verifies its metadata/capability, then launches the resolved `agent-node` entrypoint directly. Direct launch lets `anet node stop` signal the real runtime instead of an installer wrapper. The fallback therefore needs npm registry access or an already populated npm cache on first start.
|
|
281
|
-
|
|
282
|
-
The preview E2E covers the CommHub inbox path. `grok-build-cli` currently
|
|
283
|
-
refuses Feishu channels because that forked worker does not yet share the
|
|
284
|
-
credential-isolated log boundary; run Feishu on a separate non-Grok node.
|
|
285
|
-
|
|
286
|
-
For the older process-per-turn Grok CLI lane, opt out of co-presence explicitly:
|
|
287
|
-
|
|
288
|
-
```bash
|
|
289
|
-
anet node create grok-turn --runtime grok-build-cli --grok-headless
|
|
290
|
-
anet node start grok-turn
|
|
291
|
-
```
|
|
292
|
-
|
|
293
|
-
`anet grok attach` intentionally refuses a headless node. The separate ACP runtime remains available as:
|
|
294
|
-
|
|
295
|
-
```bash
|
|
296
|
-
anet node create grok-acp --runtime grok-build-acp
|
|
297
|
-
anet node start grok-acp
|
|
298
|
-
```
|
|
299
|
-
|
|
300
|
-
`grok-build-acp` uses `grok agent stdio`; it is not the same execution path as `grok-build-cli --grok-headless`.
|
|
301
|
-
|
|
302
|
-
This preview does **not** claim completion of the formal native Leader/Policy Gateway runtime. Its Phase 0 protocol freeze, Phase 1A implementation gate, production-grade approval ownership, and `latest` release gate remain locked. See the [Grok co-presence preview guide](../docs/grok-build-cli-preview.md) for the exact boundary.
|
|
303
|
-
|
|
304
199
|
## Provider Presets
|
|
305
200
|
|
|
306
201
|
`anet node create` writes the correct provider environment into `.anet/nodes/<name>/config.json`.
|
|
@@ -341,11 +236,6 @@ anet node ls
|
|
|
341
236
|
anet info <name>
|
|
342
237
|
anet logs <name>
|
|
343
238
|
|
|
344
|
-
# Grok co-presence (experimental preview; trusted tasks only)
|
|
345
|
-
anet node create grok-shared --runtime grok-build-cli
|
|
346
|
-
anet node start grok-shared
|
|
347
|
-
anet grok attach grok-shared
|
|
348
|
-
|
|
349
239
|
# Network status and repair
|
|
350
240
|
anet status
|
|
351
241
|
anet tasks [status]
|
package/dist/bin/cli.d.ts
CHANGED