@sleep2agi/agent-node 2.2.0-preview.1 → 2.3.0

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 (2) hide show
  1. package/README.md +24 -16
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -2,20 +2,20 @@
2
2
 
3
3
  Agent runtime for Agent Network. Connects to a CommHub server, registers under an alias, and processes incoming tasks with one of three runtimes.
4
4
 
5
- **v2.1.1 stable.** The supported entry point is the `anet` CLI from `@sleep2agi/agent-network@2.0.0`, which writes the right `config.json` and environment variables for you.
5
+ **Current preview line.** The supported entry point is the `anet` CLI from `@sleep2agi/agent-network@preview`, which writes the right `config.json`, network token, and environment variables for you.
6
6
 
7
7
  ## Install
8
8
 
9
9
  You usually don't install this package directly — `anet node create` and `anet node start` use it via `npx`. To pin it:
10
10
 
11
11
  ```bash
12
- npm install -g @sleep2agi/agent-node
12
+ npm install -g @sleep2agi/agent-node@preview
13
13
  ```
14
14
 
15
15
  ## Verified flow
16
16
 
17
17
  ```bash
18
- npm install -g @sleep2agi/agent-network
18
+ npm install -g @sleep2agi/agent-network@preview
19
19
  anet hub start # local hub (terminal 1)
20
20
  anet hub dashboard # web UI (terminal 2)
21
21
  anet login --username admin --password anethub
@@ -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` |
42
+ | `--runtime` | `claude-agent-sdk` | `claude-agent-sdk` / `codex-sdk` / `claude-code-cli` / `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 |
@@ -49,9 +49,10 @@ CLI flags:
49
49
 
50
50
  | Runtime | Backend | Status | Notes |
51
51
  |---|---|---|---|
52
- | `claude-agent-sdk` | [@anthropic-ai/claude-agent-sdk](https://www.npmjs.com/package/@anthropic-ai/claude-agent-sdk) | verified | Anthropic Messages API; works with any compatible endpoint |
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 |
55
+ | `http-api` | OpenAI/Anthropic-compatible HTTP | experimental | reads `ANTHROPIC_*`, `OPENAI_*`, or `MINIMAX_CODING_API_KEY` environment variables |
55
56
 
56
57
  Runtimes are loaded lazily — picking one doesn't pull the others' dependencies. `claude-code-cli` adds zero extra SDK weight.
57
58
 
@@ -61,7 +62,7 @@ Runtimes are loaded lazily — picking one doesn't pull the others' dependencies
61
62
 
62
63
  | Provider | Base URL | Default model | Status |
63
64
  |---|---|---|---|
64
- | Anthropic | `https://api.anthropic.com` | `claude-sonnet-4-5` | verified |
65
+ | Anthropic | `https://api.anthropic.com` | configured by `--model` | verified |
65
66
  | MiniMax (国际) | `https://api.minimax.io/anthropic` | `MiniMax-M2.7` | verified |
66
67
  | MiniMax (国内) | `https://api.minimaxi.com/anthropic` | `MiniMax-M2.7` | verified |
67
68
  | DeepSeek | `https://api.deepseek.com/anthropic` | `deepseek-chat` | verified |
@@ -90,16 +91,23 @@ Typical output of `anet node create` at `.anet/nodes/<name>/config.json`:
90
91
 
91
92
  ```json
92
93
  {
93
- "alias": "my-bot",
94
+ "node_id": "n_a1b2c3d4",
95
+ "node_name": "my-bot",
94
96
  "hub": "http://127.0.0.1:9200",
97
+ "token": "ntok_...",
95
98
  "runtime": "claude-agent-sdk",
96
99
  "model": "MiniMax-M2.7",
97
- "anthropic_base_url": "https://api.minimax.io/anthropic",
98
- "anthropic_auth_token": "sk-...",
99
- "tools": "all",
100
- "maxTurns": 50,
101
- "dangerouslySkipPermissions": true,
102
- "teammateMode": true
100
+ "channels": ["server:commhub"],
101
+ "tools": ["Read", "Write", "Edit", "Bash", "Glob", "Grep"],
102
+ "env": {
103
+ "ANTHROPIC_BASE_URL": "https://api.minimax.io/anthropic",
104
+ "ANTHROPIC_AUTH_TOKEN": "sk-..."
105
+ },
106
+ "flags": {
107
+ "dangerouslySkipPermissions": true,
108
+ "teammateMode": "in-process",
109
+ "maxTurns": 50
110
+ }
103
111
  }
104
112
  ```
105
113
 
@@ -140,9 +148,9 @@ When the runtime is `claude-code-cli`, the spawned subprocess gets `settingSourc
140
148
 
141
149
  | Package | Version |
142
150
  |---|---|
143
- | [@sleep2agi/agent-network](https://www.npmjs.com/package/@sleep2agi/agent-network) | 2.0.0 |
144
- | [@sleep2agi/commhub-server](https://www.npmjs.com/package/@sleep2agi/commhub-server) | 0.5.0 |
145
- | [@sleep2agi/agent-network-dashboard](https://www.npmjs.com/package/@sleep2agi/agent-network-dashboard) | 0.1.0 |
151
+ | [@sleep2agi/agent-network](https://www.npmjs.com/package/@sleep2agi/agent-network) | 2.0.3-preview.4 |
152
+ | [@sleep2agi/commhub-server](https://www.npmjs.com/package/@sleep2agi/commhub-server) | 0.5.3-preview.0 |
153
+ | [@sleep2agi/agent-network-dashboard](https://www.npmjs.com/package/@sleep2agi/agent-network-dashboard) | 0.2.1-preview.1 |
146
154
 
147
155
  ## License
148
156
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sleep2agi/agent-node",
3
- "version": "2.2.0-preview.1",
3
+ "version": "2.3.0",
4
4
  "description": "AI Agent runtime for CommHub networks. Supports Claude Agent SDK, Codex SDK, and OpenAI/Anthropic-compatible HTTP API.",
5
5
  "bin": {
6
6
  "agent-node": "./dist/cli.js"
@@ -11,7 +11,7 @@
11
11
  "README.md"
12
12
  ],
13
13
  "scripts": {
14
- "build": "bun build src/cli.ts --outfile dist/cli.js --target node --minify --external @anthropic-ai/claude-agent-sdk --external @openai/codex-sdk",
14
+ "build": "bun build src/cli.ts --outdir dist --entry-naming cli.js --target node --minify --external @anthropic-ai/claude-agent-sdk --external @openai/codex-sdk",
15
15
  "prepublishOnly": "npm run build"
16
16
  },
17
17
  "keywords": [