anyclaw 0.2.0 → 0.2.2
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/dist/adapters.d.ts +2 -2
- package/dist/adapters.js +5 -2
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +1 -1
- package/dist/commands/bridge.js +13 -2
- package/dist/commands/install.js +8 -0
- package/dist/commands/status.js +3 -1
- package/dist/index.js +2 -2
- package/package.json +4 -2
package/dist/adapters.d.ts
CHANGED
|
@@ -14,8 +14,8 @@ export interface GatewayAdapter {
|
|
|
14
14
|
send(gatewayUrl: string, message: string, onEvent: (event: ChannelEvent) => void, signal?: AbortSignal): Promise<string>;
|
|
15
15
|
}
|
|
16
16
|
/**
|
|
17
|
-
* PaeanClaw / ZeroClaw
|
|
18
|
-
*
|
|
17
|
+
* Claw adapter (PaeanClaw / ZeroClaw / 0claw / OpenClaw / NanoClaw)
|
|
18
|
+
* All expose POST /api/chat with SSE response.
|
|
19
19
|
*/
|
|
20
20
|
export declare const clawAdapter: GatewayAdapter;
|
|
21
21
|
/**
|
package/dist/adapters.js
CHANGED
|
@@ -22,8 +22,8 @@ async function readSSEStream(body, handler) {
|
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
/**
|
|
25
|
-
* PaeanClaw / ZeroClaw
|
|
26
|
-
*
|
|
25
|
+
* Claw adapter (PaeanClaw / ZeroClaw / 0claw / OpenClaw / NanoClaw)
|
|
26
|
+
* All expose POST /api/chat with SSE response.
|
|
27
27
|
*/
|
|
28
28
|
export const clawAdapter = {
|
|
29
29
|
name: "claw",
|
|
@@ -116,6 +116,9 @@ export function getAdapter(type) {
|
|
|
116
116
|
case "claw":
|
|
117
117
|
case "paeanclaw":
|
|
118
118
|
case "zeroclaw":
|
|
119
|
+
case "0claw":
|
|
120
|
+
case "openclaw":
|
|
121
|
+
case "nanoclaw":
|
|
119
122
|
return clawAdapter;
|
|
120
123
|
case "openai":
|
|
121
124
|
return openaiAdapter;
|
package/dist/cli.d.ts
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* anyclaw status Check locally running agent gateways
|
|
12
12
|
* anyclaw version Show version
|
|
13
13
|
*/
|
|
14
|
-
declare const VERSION = "0.2.
|
|
14
|
+
declare const VERSION = "0.2.1";
|
|
15
15
|
declare const BANNER = "\n \u2584\u2580\u2588 \u2588\u2584\u2591\u2588 \u2588\u2584\u2588 \u2588\u2580\u2580 \u2588\u2591\u2591 \u2584\u2580\u2588 \u2588\u2591\u2588\u2591\u2588\n \u2588\u2580\u2588 \u2588\u2591\u2580\u2588 \u2591\u2588\u2591 \u2588\u2584\u2584 \u2588\u2584\u2584 \u2588\u2580\u2588 \u2580\u2584\u2580\u2584\u2580\n";
|
|
16
16
|
declare function printHelp(): void;
|
|
17
17
|
declare function main(): Promise<void>;
|
package/dist/cli.js
CHANGED
package/dist/commands/bridge.js
CHANGED
|
@@ -13,6 +13,7 @@ function parseArgs(args) {
|
|
|
13
13
|
gatewayType: "claw",
|
|
14
14
|
clawKey: "",
|
|
15
15
|
serviceUrl: "http://localhost:4777",
|
|
16
|
+
name: "",
|
|
16
17
|
};
|
|
17
18
|
for (let i = 0; i < args.length; i++) {
|
|
18
19
|
switch (args[i]) {
|
|
@@ -32,6 +33,10 @@ function parseArgs(args) {
|
|
|
32
33
|
case "-s":
|
|
33
34
|
config.serviceUrl = args[++i];
|
|
34
35
|
break;
|
|
36
|
+
case "--name":
|
|
37
|
+
case "-n":
|
|
38
|
+
config.name = args[++i];
|
|
39
|
+
break;
|
|
35
40
|
case "--help":
|
|
36
41
|
case "-h":
|
|
37
42
|
printHelp();
|
|
@@ -43,6 +48,7 @@ function parseArgs(args) {
|
|
|
43
48
|
config.serviceUrl || process.env.ANYCLAW_SERVICE_URL || "http://localhost:4777";
|
|
44
49
|
config.gatewayUrl =
|
|
45
50
|
config.gatewayUrl || process.env.GATEWAY_URL || "http://localhost:3007";
|
|
51
|
+
config.name = config.name || process.env.ANYCLAW_BRIDGE_NAME || "";
|
|
46
52
|
return config;
|
|
47
53
|
}
|
|
48
54
|
function printHelp() {
|
|
@@ -57,16 +63,19 @@ function printHelp() {
|
|
|
57
63
|
-t, --type <type> Gateway type: claw, paeanclaw, zeroclaw, openai (default: claw)
|
|
58
64
|
-k, --key <key> ClawKey for relay authentication
|
|
59
65
|
-s, --service <url> AnyClaw service URL (default: http://localhost:4777)
|
|
66
|
+
-n, --name <name> Display name for this gateway in the web UI
|
|
60
67
|
-h, --help Show this help
|
|
61
68
|
|
|
62
69
|
Environment:
|
|
63
70
|
CLAW_KEY ClawKey (alternative to --key)
|
|
64
71
|
ANYCLAW_SERVICE_URL Service URL (alternative to --service)
|
|
65
72
|
GATEWAY_URL Gateway URL (alternative to --gateway)
|
|
73
|
+
ANYCLAW_BRIDGE_NAME Gateway display name (alternative to --name)
|
|
66
74
|
|
|
67
75
|
Examples:
|
|
68
76
|
anyclaw bridge -g http://localhost:3007 -k ck_g_abc123
|
|
69
|
-
anyclaw bridge -g http://localhost:
|
|
77
|
+
anyclaw bridge -g http://localhost:3007 -k ck_g_abc123 --name "Primary Agent"
|
|
78
|
+
anyclaw bridge -g http://localhost:42617 -t zeroclaw -k ck_p_xyz789 -n "Monitor"
|
|
70
79
|
`);
|
|
71
80
|
}
|
|
72
81
|
const MIN_POLL_MS = 500;
|
|
@@ -116,7 +125,9 @@ export async function runBridge(args) {
|
|
|
116
125
|
}
|
|
117
126
|
console.log(`\n ▄▀█ █▄░█ █▄█ █▀▀ █░░ ▄▀█ █░█░█`);
|
|
118
127
|
console.log(` █▀█ █░▀█ ░█░ █▄▄ █▄▄ █▀█ ▀▄▀▄▀`);
|
|
119
|
-
console.log(`\n AnyClaw Bridge v0.2.
|
|
128
|
+
console.log(`\n AnyClaw Bridge v0.2.1`);
|
|
129
|
+
if (config.name)
|
|
130
|
+
console.log(` Name: ${config.name}`);
|
|
120
131
|
console.log(` Gateway: ${config.gatewayUrl} (${config.gatewayType})`);
|
|
121
132
|
console.log(` Service: ${config.serviceUrl}`);
|
|
122
133
|
console.log(` Key: ${config.clawKey.slice(0, 8)}...`);
|
package/dist/commands/install.js
CHANGED
|
@@ -30,6 +30,14 @@ function run(cmd) {
|
|
|
30
30
|
}
|
|
31
31
|
}
|
|
32
32
|
const VARIANTS = {
|
|
33
|
+
"0claw": {
|
|
34
|
+
name: "0claw",
|
|
35
|
+
description: "The absolute core. Minimal Rust agent runtime (~500 lines). MCP tools, SSE, SQLite.",
|
|
36
|
+
methods: [
|
|
37
|
+
{ runtime: "curl", command: "curl -fsSL https://0.works/install.sh | bash", check: () => has("curl") },
|
|
38
|
+
{ runtime: "cargo", command: "cargo install zero-claw", check: () => has("cargo") },
|
|
39
|
+
],
|
|
40
|
+
},
|
|
33
41
|
paeanclaw: {
|
|
34
42
|
name: "PaeanClaw",
|
|
35
43
|
description: "Ultra-minimal local AI agent runtime (~365 lines). MCP tools, web PWA, Telegram.",
|
package/dist/commands/status.js
CHANGED
|
@@ -13,6 +13,7 @@ const B = "\x1b[1m";
|
|
|
13
13
|
const D = "\x1b[0m";
|
|
14
14
|
const TARGETS = [
|
|
15
15
|
{ name: "PaeanClaw", port: 3007, type: "claw", healthPath: "/" },
|
|
16
|
+
{ name: "0claw", port: 3007, type: "claw", healthPath: "/api/conversations" },
|
|
16
17
|
{ name: "ZeroClaw", port: 42617, type: "claw", healthPath: "/" },
|
|
17
18
|
{ name: "OpenAI-compat (LM Studio)", port: 1234, type: "openai", healthPath: "/v1/models" },
|
|
18
19
|
{ name: "OpenAI-compat (vLLM)", port: 8080, type: "openai", healthPath: "/v1/models" },
|
|
@@ -46,6 +47,7 @@ export async function runStatus() {
|
|
|
46
47
|
console.log(` ${B}Installed:${D}`);
|
|
47
48
|
const bins = [
|
|
48
49
|
{ cmd: "paeanclaw", label: "PaeanClaw" },
|
|
50
|
+
{ cmd: "0claw", label: "0claw" },
|
|
49
51
|
{ cmd: "zeroclaw", label: "ZeroClaw" },
|
|
50
52
|
{ cmd: "openclaw", label: "OpenClaw" },
|
|
51
53
|
{ cmd: "nanoclaw", label: "NanoClaw" },
|
|
@@ -73,7 +75,7 @@ export async function runStatus() {
|
|
|
73
75
|
}
|
|
74
76
|
if (!anyRunning) {
|
|
75
77
|
console.log(` ${R}●${D} No running gateways detected.`);
|
|
76
|
-
console.log(` Start a gateway, e.g.: ${C}
|
|
78
|
+
console.log(` Start a gateway, e.g.: ${C}0claw${D} or ${C}paeanclaw${D}`);
|
|
77
79
|
}
|
|
78
80
|
console.log("");
|
|
79
81
|
}
|
package/dist/index.js
CHANGED
|
@@ -60,7 +60,7 @@ function printHelp() {
|
|
|
60
60
|
|
|
61
61
|
Options:
|
|
62
62
|
-g, --gateway <url> Local agent gateway URL (default: http://localhost:3007)
|
|
63
|
-
-t, --type <type> Gateway type: claw, paeanclaw, zeroclaw, openai (default: claw)
|
|
63
|
+
-t, --type <type> Gateway type: claw, 0claw, paeanclaw, zeroclaw, openai (default: claw)
|
|
64
64
|
-k, --key <key> ClawKey for relay authentication
|
|
65
65
|
-s, --service <url> AnyClaw service URL (default: http://localhost:4777)
|
|
66
66
|
-h, --help Show this help
|
|
@@ -72,7 +72,7 @@ function printHelp() {
|
|
|
72
72
|
|
|
73
73
|
Examples:
|
|
74
74
|
anyclaw-bridge -g http://localhost:3007 -k ck_g_abc123
|
|
75
|
-
anyclaw-bridge -g http://localhost:
|
|
75
|
+
anyclaw-bridge -g http://localhost:3007 -t 0claw -k ck_p_xyz789
|
|
76
76
|
`);
|
|
77
77
|
}
|
|
78
78
|
// ── Bridge Loop ────────────────────────────────────────
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "anyclaw",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.2",
|
|
4
4
|
"description": "AnyClaw CLI — bridge, install, and manage local AI agent gateways",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -24,6 +24,8 @@
|
|
|
24
24
|
"bridge",
|
|
25
25
|
"relay",
|
|
26
26
|
"mcp",
|
|
27
|
+
"0claw",
|
|
28
|
+
"zero-claw",
|
|
27
29
|
"paeanclaw",
|
|
28
30
|
"zeroclaw",
|
|
29
31
|
"openclaw",
|
|
@@ -42,4 +44,4 @@
|
|
|
42
44
|
"@types/node": "^22.0.0",
|
|
43
45
|
"typescript": "^5.7.0"
|
|
44
46
|
}
|
|
45
|
-
}
|
|
47
|
+
}
|