clawmatrix 0.3.1 → 0.4.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.
@@ -0,0 +1,27 @@
1
+ {
2
+ "name": "clawmatrix-cli",
3
+ "version": "0.3.1",
4
+ "description": "ClawMatrix mesh cluster CLI — zero-dependency, connects directly to OpenClaw gateway via WebSocket",
5
+ "type": "module",
6
+ "license": "MIT",
7
+ "bin": {
8
+ "clawmatrix": "./bin/clawmatrix.mjs"
9
+ },
10
+ "files": [
11
+ "bin/",
12
+ "skills/"
13
+ ],
14
+ "engines": {
15
+ "node": ">=22"
16
+ },
17
+ "keywords": [
18
+ "openclaw",
19
+ "clawmatrix",
20
+ "mesh",
21
+ "cluster",
22
+ "cli"
23
+ ],
24
+ "scripts": {
25
+ "test": "bun test"
26
+ }
27
+ }
@@ -0,0 +1,104 @@
1
+ ---
2
+ name: clawmatrix
3
+ description: Use the clawmatrix CLI to interact with remote devices (phones, computers, servers) in a mesh cluster — run tools, check location, get battery status, read/write files, execute commands, and more on any connected node.
4
+ ---
5
+
6
+ Use the `clawmatrix` CLI to interact with the ClawMatrix mesh cluster. Remote nodes can be phones (iPhone/Android), computers, or servers. You can invoke any tool available on remote nodes — including getting device location, battery status, running shell commands, reading/writing files, and more.
7
+
8
+ All commands output LLM-friendly text (no ANSI colors) when stdout is not a TTY.
9
+
10
+ ## Quick Start
11
+
12
+ 1. Run `clawmatrix status` to see connected nodes and their capabilities
13
+ 2. Run `clawmatrix tools <nodeId>` to see what tools a node offers
14
+ 3. Run `clawmatrix call <nodeId> <tool> '<params>'` to invoke a tool
15
+
16
+ ## Cluster Status
17
+
18
+ ```bash
19
+ clawmatrix status # Cluster topology: peers, agents, models, tags
20
+ clawmatrix status --json # Structured JSON output
21
+ clawmatrix check <nodeId> # Quick reachability check with latency
22
+ ```
23
+
24
+ Always start with `clawmatrix status` to understand the current topology before performing other operations.
25
+
26
+ ## Remote Tools
27
+
28
+ ```bash
29
+ clawmatrix tools # List all remote tools (compact)
30
+ clawmatrix tools <nodeId> # Tools on a specific node
31
+ clawmatrix tools --describe <tool> # Full usage and parameter schema
32
+ clawmatrix tools --filter <keyword> # Search by name or description
33
+ ```
34
+
35
+ Use `--describe` to understand a tool's parameters before calling it.
36
+
37
+ ## Invoke Tools
38
+
39
+ ```bash
40
+ clawmatrix call <nodeId> <tool> '<json-params>' # Single tool invocation
41
+ clawmatrix call <nodeId> <tool> '<json-params>' -t 30000 # With timeout (ms)
42
+ ```
43
+
44
+ ```bash
45
+ clawmatrix batch <nodeId> '[{"tool":"t1","params":{}},{"tool":"t2","params":{}}]'
46
+ clawmatrix batch <nodeId> --no-stop-on-error '[...]' # Continue on failure
47
+ ```
48
+
49
+ Batch supports stdin: `echo '<json>' | clawmatrix batch <nodeId>`
50
+
51
+ ## Models
52
+
53
+ ```bash
54
+ clawmatrix models # All cluster models
55
+ clawmatrix models --node <nodeId> # Filter by node
56
+ ```
57
+
58
+ ## Events
59
+
60
+ ```bash
61
+ clawmatrix events # Unconsumed events
62
+ clawmatrix events --type <type> # Filter by type
63
+ clawmatrix events --source <nodeId> # Filter by source node
64
+ clawmatrix events --consume <id1,id2> # Mark events as consumed
65
+ clawmatrix events --all # Include consumed events
66
+ ```
67
+
68
+ ## Peer Approval
69
+
70
+ ```bash
71
+ clawmatrix approve <approvalId> # Approve a pending peer
72
+ clawmatrix deny <approvalId> # Deny a pending peer
73
+ clawmatrix approval list # List pending/approved/denied peers
74
+ clawmatrix approval revoke <nodeId> # Revoke an approved peer
75
+ ```
76
+
77
+ ## Notifications (Dynamic Island / Live Activity)
78
+
79
+ Push progress notifications to the user's iPhone via `clawmatrix notify`. This triggers the Dynamic Island and lock screen Live Activity.
80
+
81
+ **Use this proactively when running long tasks** (iOS builds, large refactors, test suites, batch operations) so the user can track progress without watching the terminal.
82
+
83
+ ```bash
84
+ # Start a notification
85
+ clawmatrix notify "iOS 构建" --detail "正在编译..."
86
+ # Returns: {"taskId":"<id>", "action":"start", "targets":1}
87
+
88
+ # Update progress
89
+ clawmatrix notify "iOS 构建" --action update --task-id <id> --detail "链接中..." --progress 80
90
+
91
+ # End (success)
92
+ clawmatrix notify "iOS 构建" --action end --task-id <id>
93
+ ```
94
+
95
+ Options: `--detail <text>`, `--progress <0-100>`, `--action start|update|end`, `--task-id <id>`, `--tool <name>`
96
+
97
+ ## Workflow
98
+
99
+ 1. Run `clawmatrix status` to see the cluster topology
100
+ 2. Use `clawmatrix tools --filter <keyword>` to find relevant tools
101
+ 3. Use `clawmatrix tools --describe <tool>` to check parameters
102
+ 4. Use `clawmatrix call` or `clawmatrix batch` to invoke tools
103
+ 5. If a call fails, run `clawmatrix check <nodeId>` to verify connectivity
104
+ 6. For long-running tasks, use `clawmatrix notify` to push progress to the user's phone
@@ -3,6 +3,7 @@
3
3
  "name": "ClawMatrix",
4
4
  "description": "Decentralized mesh cluster for inter-gateway communication, model proxy, task handoff, and tool proxy.",
5
5
  "providers": ["clawmatrix"],
6
+ "skills": ["./cli/skills"],
6
7
  "configSchema": {
7
8
  "type": "object",
8
9
  "additionalProperties": true
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawmatrix",
3
- "version": "0.3.1",
3
+ "version": "0.4.0",
4
4
  "description": "Decentralized mesh cluster plugin for OpenClaw — inter-gateway communication, model proxy, task handoff, and tool proxy.",
5
5
  "type": "module",
6
6
  "license": "MIT",
@@ -17,6 +17,7 @@
17
17
  "files": [
18
18
  "src/",
19
19
  "!src/**/*.test.ts",
20
+ "cli/",
20
21
  "openclaw.plugin.json",
21
22
  "BOOTSTRAP.md",
22
23
  "README.md"