clawpowers 2.2.5 → 2.2.7

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 (138) hide show
  1. package/CHANGELOG.md +186 -160
  2. package/COMPATIBILITY.md +48 -13
  3. package/KNOWN_LIMITATIONS.md +20 -19
  4. package/LICENSE +44 -44
  5. package/LICENSING.md +10 -10
  6. package/README.md +486 -462
  7. package/SECURITY.md +52 -52
  8. package/dist/index.d.ts +17 -5
  9. package/dist/index.js +187 -92
  10. package/dist/index.js.map +1 -1
  11. package/native/Cargo.lock +4927 -4927
  12. package/native/Cargo.toml +73 -73
  13. package/native/crates/canonical/Cargo.toml +24 -24
  14. package/native/crates/canonical/src/lib.rs +677 -673
  15. package/native/crates/compression/Cargo.toml +20 -20
  16. package/native/crates/compression/benches/compression_bench.rs +42 -42
  17. package/native/crates/compression/src/lib.rs +393 -393
  18. package/native/crates/evm-eth/Cargo.toml +13 -13
  19. package/native/crates/evm-eth/src/lib.rs +105 -105
  20. package/native/crates/fee/Cargo.toml +15 -15
  21. package/native/crates/fee/src/lib.rs +281 -281
  22. package/native/crates/index/Cargo.toml +16 -16
  23. package/native/crates/index/src/lib.rs +277 -277
  24. package/native/crates/policy/Cargo.toml +17 -17
  25. package/native/crates/policy/src/lib.rs +614 -614
  26. package/native/crates/security/Cargo.toml +22 -22
  27. package/native/crates/security/src/lib.rs +478 -478
  28. package/native/crates/tokens/Cargo.toml +13 -13
  29. package/native/crates/tokens/src/lib.rs +534 -534
  30. package/native/crates/verification/Cargo.toml +23 -23
  31. package/native/crates/verification/src/lib.rs +333 -333
  32. package/native/crates/wallet/Cargo.toml +20 -20
  33. package/native/crates/wallet/src/lib.rs +261 -261
  34. package/native/crates/x402/Cargo.toml +30 -30
  35. package/native/crates/x402/src/lib.rs +423 -423
  36. package/native/ffi/Cargo.toml +34 -34
  37. package/native/ffi/build.rs +4 -4
  38. package/native/ffi/src/lib.rs +352 -352
  39. package/native/ffi/tests/integration.rs +354 -354
  40. package/native/pyo3/Cargo.toml +26 -26
  41. package/native/pyo3/pyproject.toml +16 -16
  42. package/native/pyo3/src/lib.rs +407 -407
  43. package/native/pyo3/tests/test_smoke.py +180 -180
  44. package/native/wasm/Cargo.toml +47 -44
  45. package/native/wasm/pkg/.gitignore +6 -6
  46. package/native/wasm/pkg/clawpowers_wasm.d.ts +208 -208
  47. package/native/wasm/pkg/clawpowers_wasm.js +872 -872
  48. package/native/wasm/pkg/clawpowers_wasm_bg.wasm.d.ts +40 -40
  49. package/native/wasm/pkg/package.json +16 -16
  50. package/native/wasm/pkg-node/clawpowers_wasm.d.ts +143 -143
  51. package/native/wasm/pkg-node/clawpowers_wasm.js +798 -798
  52. package/native/wasm/pkg-node/clawpowers_wasm_bg.wasm.d.ts +40 -40
  53. package/native/wasm/pkg-node/package.json +12 -12
  54. package/native/wasm/src/lib.rs +433 -433
  55. package/package.json +13 -8
  56. package/scripts/build-wasm.mjs +59 -0
  57. package/scripts/generate_hermes_wrappers.py +211 -0
  58. package/scripts/hermes_wrapper_overrides.json +184 -0
  59. package/scripts/run-python-script.mjs +48 -0
  60. package/scripts/verify-consumer-install.mjs +109 -0
  61. package/scripts/verify-wasm-artifacts.mjs +26 -3
  62. package/scripts/verify_hermes_wrappers.py +154 -0
  63. package/skill.json +20 -0
  64. package/skills/1password/SKILL.md +34 -0
  65. package/skills/README.md +44 -0
  66. package/skills/agent-nexus-2/SKILL.md +34 -0
  67. package/skills/apple-notes/SKILL.md +34 -0
  68. package/skills/apple-reminders/SKILL.md +34 -0
  69. package/skills/autoresearch/SKILL.md +43 -0
  70. package/skills/bear-notes/SKILL.md +34 -0
  71. package/skills/blogwatcher/SKILL.md +34 -0
  72. package/skills/blucli/SKILL.md +34 -0
  73. package/skills/bluebubbles/SKILL.md +34 -0
  74. package/skills/business-strategy/SKILL.md +41 -0
  75. package/skills/camsnap/SKILL.md +34 -0
  76. package/skills/canvas/SKILL.md +34 -0
  77. package/skills/clawhub/SKILL.md +34 -0
  78. package/skills/coding-agent/SKILL.md +34 -0
  79. package/skills/coding-discipline.skill/SKILL.md +34 -0
  80. package/skills/content-writer/SKILL.md +41 -0
  81. package/skills/discord/SKILL.md +34 -0
  82. package/skills/eightctl/SKILL.md +34 -0
  83. package/skills/execution-validation.skill/SKILL.md +34 -0
  84. package/skills/gemini/SKILL.md +34 -0
  85. package/skills/gh-issues/SKILL.md +34 -0
  86. package/skills/gifgrep/SKILL.md +34 -0
  87. package/skills/github/SKILL.md +41 -0
  88. package/skills/gog/SKILL.md +34 -0
  89. package/skills/goplaces/SKILL.md +34 -0
  90. package/skills/healthcheck/SKILL.md +34 -0
  91. package/skills/himalaya/SKILL.md +34 -0
  92. package/skills/humanize/SKILL.md +41 -0
  93. package/skills/imsg/SKILL.md +34 -0
  94. package/skills/itp/SKILL.md +112 -0
  95. package/skills/mcporter/SKILL.md +34 -0
  96. package/skills/model-usage/SKILL.md +34 -0
  97. package/skills/nano-pdf/SKILL.md +34 -0
  98. package/skills/node-connect/SKILL.md +34 -0
  99. package/skills/notion/SKILL.md +34 -0
  100. package/skills/obsidian/SKILL.md +34 -0
  101. package/skills/openai-whisper/SKILL.md +34 -0
  102. package/skills/openai-whisper-api/SKILL.md +34 -0
  103. package/skills/openhue/SKILL.md +34 -0
  104. package/skills/oracle/SKILL.md +34 -0
  105. package/skills/ordercli/SKILL.md +34 -0
  106. package/skills/peekaboo/SKILL.md +34 -0
  107. package/skills/polyclaw/SKILL.md +34 -0
  108. package/skills/prospector/SKILL.md +41 -0
  109. package/skills/rsi.skill/SKILL.md +34 -0
  110. package/skills/sag/SKILL.md +34 -0
  111. package/skills/security/SKILL.md +41 -0
  112. package/skills/session-logs/SKILL.md +34 -0
  113. package/skills/sherpa-onnx-tts/SKILL.md +34 -0
  114. package/skills/skill-creator/SKILL.md +34 -0
  115. package/skills/slack/SKILL.md +34 -0
  116. package/skills/songsee/SKILL.md +34 -0
  117. package/skills/sonoscli/SKILL.md +34 -0
  118. package/skills/spotify-player/SKILL.md +34 -0
  119. package/skills/strykr-prism/SKILL.md +41 -0
  120. package/skills/summarize/SKILL.md +34 -0
  121. package/skills/taskbridge/SKILL.md +34 -0
  122. package/skills/things-mac/SKILL.md +34 -0
  123. package/skills/tmux/SKILL.md +34 -0
  124. package/skills/trello/SKILL.md +34 -0
  125. package/skills/validator-agent/SKILL.md +41 -0
  126. package/skills/video-frames/SKILL.md +34 -0
  127. package/skills/voice-call/SKILL.md +34 -0
  128. package/skills/wacli/SKILL.md +34 -0
  129. package/skills/weather/SKILL.md +34 -0
  130. package/skills/webmcp-payments/SKILL.md +41 -0
  131. package/skills/xurl/SKILL.md +34 -0
  132. package/src/skills/catalog.ts +435 -435
  133. package/src/skills/executor.ts +56 -56
  134. package/src/skills/index.ts +3 -3
  135. package/src/skills/itp/SKILL.md +112 -112
  136. package/src/skills/loader.ts +262 -193
  137. package/native/ffi/index.node +0 -0
  138. package/native/wasm/pkg-node/.gitignore +0 -6
@@ -1,56 +1,56 @@
1
- /**
2
- * ClawPowers Skills — Skill Executor
3
- * Execute skills and track outcomes in procedural memory.
4
- */
5
-
6
- import type { ProceduralMemory } from '../memory/procedural.js';
7
-
8
- export interface SkillExecutionContext {
9
- readonly taskId: string;
10
- readonly input: string;
11
- readonly metadata?: Record<string, unknown>;
12
- }
13
-
14
- export interface SkillExecutionResult {
15
- readonly success: boolean;
16
- readonly output: string;
17
- readonly durationMs: number;
18
- readonly error?: string;
19
- }
20
-
21
- export class SkillExecutor {
22
- constructor(
23
- private readonly skillsDir: string,
24
- private readonly memory: ProceduralMemory
25
- ) {}
26
-
27
- async execute(skillName: string, context: SkillExecutionContext): Promise<SkillExecutionResult> {
28
- const start = Date.now();
29
- try {
30
- const result: SkillExecutionResult = {
31
- success: true,
32
- output: `Skill ${skillName} loaded from ${this.skillsDir}`,
33
- durationMs: Date.now() - start,
34
- };
35
- await this.memory.update(skillName, {
36
- succeeded: true,
37
- durationMs: result.durationMs,
38
- taskId: context.taskId,
39
- });
40
- return result;
41
- } catch (err: unknown) {
42
- const errorMessage = err instanceof Error ? err.message : String(err);
43
- await this.memory.update(skillName, {
44
- succeeded: false,
45
- durationMs: Date.now() - start,
46
- taskId: context.taskId,
47
- });
48
- return {
49
- success: false,
50
- output: '',
51
- durationMs: Date.now() - start,
52
- error: errorMessage,
53
- };
54
- }
55
- }
56
- }
1
+ /**
2
+ * ClawPowers Skills — Skill Executor
3
+ * Execute skills and track outcomes in procedural memory.
4
+ */
5
+
6
+ import type { ProceduralMemory } from '../memory/procedural.js';
7
+
8
+ export interface SkillExecutionContext {
9
+ readonly taskId: string;
10
+ readonly input: string;
11
+ readonly metadata?: Record<string, unknown>;
12
+ }
13
+
14
+ export interface SkillExecutionResult {
15
+ readonly success: boolean;
16
+ readonly output: string;
17
+ readonly durationMs: number;
18
+ readonly error?: string;
19
+ }
20
+
21
+ export class SkillExecutor {
22
+ constructor(
23
+ private readonly skillsDir: string,
24
+ private readonly memory: ProceduralMemory
25
+ ) {}
26
+
27
+ async execute(skillName: string, context: SkillExecutionContext): Promise<SkillExecutionResult> {
28
+ const start = Date.now();
29
+ try {
30
+ const result: SkillExecutionResult = {
31
+ success: true,
32
+ output: `Skill ${skillName} loaded from ${this.skillsDir}`,
33
+ durationMs: Date.now() - start,
34
+ };
35
+ await this.memory.update(skillName, {
36
+ succeeded: true,
37
+ durationMs: result.durationMs,
38
+ taskId: context.taskId,
39
+ });
40
+ return result;
41
+ } catch (err: unknown) {
42
+ const errorMessage = err instanceof Error ? err.message : String(err);
43
+ await this.memory.update(skillName, {
44
+ succeeded: false,
45
+ durationMs: Date.now() - start,
46
+ taskId: context.taskId,
47
+ });
48
+ return {
49
+ success: false,
50
+ output: '',
51
+ durationMs: Date.now() - start,
52
+ error: errorMessage,
53
+ };
54
+ }
55
+ }
56
+ }
@@ -1,3 +1,3 @@
1
- export { discoverSkills, loadSkillManifest, getActiveSkills, parseFrontmatter, listSkillsWithStatus } from './loader.js';
2
- export { SkillExecutor } from './executor.js';
3
- export type { SkillExecutionContext, SkillExecutionResult } from './executor.js';
1
+ export { discoverSkills, loadSkillManifest, getActiveSkills, parseFrontmatter, listSkillsWithStatus } from './loader.js';
2
+ export { SkillExecutor } from './executor.js';
3
+ export type { SkillExecutionContext, SkillExecutionResult } from './executor.js';
@@ -1,112 +1,112 @@
1
- ---
2
- name: itp
3
- description: "Identical Twins Protocol — compressed agent-to-agent messaging for repeated operational language. Use when sending messages between agents."
4
- metadata:
5
- openclaw:
6
- requires:
7
- bins: [python3]
8
- env: []
9
- config: []
10
- ---
11
-
12
- # ITP — Identical Twins Protocol
13
-
14
- Compressed agent-to-agent messaging protocol that uses a shared codebook of common patterns, operations, and agent shorthand.
15
-
16
- Current measured performance is workload-dependent. The live v1 corpus benchmark shows **11.9% aggregate token reduction** across 25 messages, with delegation and status traffic compressing best. Separate swarm docs also include **modeled** prompt-cache economics layered on top of those live prompt sizes. Keep those two measurement types distinct.
17
-
18
- ## Quick Start
19
-
20
- ### 1. Start the ITP Server
21
-
22
- The ITP server runs as a FastAPI service on port 8100:
23
-
24
- ```bash
25
- # Via LaunchAgent (recommended — auto-starts on boot)
26
- launchctl load ~/Library/LaunchAgents/com.agenteconomy.itp-server.plist
27
-
28
- # Or manually
29
- cd /Users/billwilson/.openclaw/workspace/tools/itp
30
- python3 -m uvicorn itp_server:app --host 127.0.0.1 --port 8100
31
- ```
32
-
33
- ### 2. Verify Health
34
-
35
- ```bash
36
- curl http://localhost:8100/health
37
- # → {"status": "ok", "version": "1.0.0", ...}
38
- ```
39
-
40
- ## API Endpoints
41
-
42
- ### Encode Message
43
- `POST /tools/encode`
44
- ```json
45
- {
46
- "message": "Please analyze the trading performance and provide a status update",
47
- "source_agent": "max",
48
- "target_agent": "trading-director"
49
- }
50
- ```
51
- Returns: `{ "encoded": "ITP:...", "was_compressed": true, "savings_pct": 45.2, ... }`
52
-
53
- ### Decode Message
54
- `POST /tools/decode`
55
- ```json
56
- {
57
- "message": "ITP:ANL+TRD/PERF→STS/UPD"
58
- }
59
- ```
60
- Returns: `{ "decoded": "...", "was_itp": true, ... }`
61
-
62
- ### Health Check
63
- `GET /health`
64
- Returns: `{ "status": "ok", ... }`
65
-
66
- ### Statistics
67
- `GET /tools/stats`
68
- Returns compression analytics and savings metrics.
69
-
70
- ### Codebook
71
- `GET /tools/codebook`
72
- Returns current codebook contents and stats.
73
-
74
- ### History
75
- `GET /tools/history?limit=20`
76
- Returns recent ITP message history.
77
-
78
- ## TypeScript Client
79
-
80
- ```typescript
81
- import { encode, decode, healthCheck } from 'clawpowers/itp';
82
-
83
- // Encode a message (graceful fallback if server is down)
84
- const result = await encode("Analyze trading performance");
85
- // { encoded: "ITP:...", wasCompressed: true, savingsPct: 45.2 }
86
-
87
- // Decode an ITP message
88
- const decoded = await decode("ITP:ANL+TRD/PERF");
89
- // { decoded: "Analyze trading performance", wasItp: true }
90
-
91
- // Check server status
92
- const alive = await healthCheck();
93
- // true or false
94
- ```
95
-
96
- ## Swarm Integration
97
-
98
- ITP integrates with the Parallel Swarm module to compress task descriptions before fan-out and decode results after collection:
99
-
100
- ```typescript
101
- import { encodeTaskDescription, decodeSwarmResult } from 'clawpowers/itp/swarm-bridge';
102
-
103
- // Compress task before sending to sub-agents
104
- const compressedTask = await encodeTaskDescription(task);
105
-
106
- // Decode result from sub-agent
107
- const decodedResult = await decodeSwarmResult(result);
108
- ```
109
-
110
- ## Graceful Degradation
111
-
112
- All ITP functions fail gracefully — if the ITP server is unreachable, messages pass through unchanged with no errors thrown. This ensures ITP never blocks agent operations.
1
+ ---
2
+ name: itp
3
+ description: "Identical Twins Protocol — compressed agent-to-agent messaging for repeated operational language. Use when sending messages between agents."
4
+ metadata:
5
+ openclaw:
6
+ requires:
7
+ bins: [python3]
8
+ env: []
9
+ config: []
10
+ ---
11
+
12
+ # ITP — Identical Twins Protocol
13
+
14
+ Compressed agent-to-agent messaging protocol that uses a shared codebook of common patterns, operations, and agent shorthand.
15
+
16
+ Current measured performance is workload-dependent. The live v1 corpus benchmark shows **11.9% aggregate token reduction** across 25 messages, with delegation and status traffic compressing best. Separate swarm docs also include **modeled** prompt-cache economics layered on top of those live prompt sizes. Keep those two measurement types distinct.
17
+
18
+ ## Quick Start
19
+
20
+ ### 1. Start the ITP Server
21
+
22
+ The ITP server runs as a FastAPI service on port 8100:
23
+
24
+ ```bash
25
+ # Via LaunchAgent (recommended — auto-starts on boot)
26
+ launchctl load ~/Library/LaunchAgents/com.agenteconomy.itp-server.plist
27
+
28
+ # Or manually
29
+ cd /Users/billwilson/.openclaw/workspace/tools/itp
30
+ python3 -m uvicorn itp_server:app --host 127.0.0.1 --port 8100
31
+ ```
32
+
33
+ ### 2. Verify Health
34
+
35
+ ```bash
36
+ curl http://localhost:8100/health
37
+ # → {"status": "ok", "version": "1.0.0", ...}
38
+ ```
39
+
40
+ ## API Endpoints
41
+
42
+ ### Encode Message
43
+ `POST /tools/encode`
44
+ ```json
45
+ {
46
+ "message": "Please analyze the trading performance and provide a status update",
47
+ "source_agent": "max",
48
+ "target_agent": "trading-director"
49
+ }
50
+ ```
51
+ Returns: `{ "encoded": "ITP:...", "was_compressed": true, "savings_pct": 45.2, ... }`
52
+
53
+ ### Decode Message
54
+ `POST /tools/decode`
55
+ ```json
56
+ {
57
+ "message": "ITP:ANL+TRD/PERF→STS/UPD"
58
+ }
59
+ ```
60
+ Returns: `{ "decoded": "...", "was_itp": true, ... }`
61
+
62
+ ### Health Check
63
+ `GET /health`
64
+ Returns: `{ "status": "ok", ... }`
65
+
66
+ ### Statistics
67
+ `GET /tools/stats`
68
+ Returns compression analytics and savings metrics.
69
+
70
+ ### Codebook
71
+ `GET /tools/codebook`
72
+ Returns current codebook contents and stats.
73
+
74
+ ### History
75
+ `GET /tools/history?limit=20`
76
+ Returns recent ITP message history.
77
+
78
+ ## TypeScript Client
79
+
80
+ ```typescript
81
+ import { encode, decode, healthCheck } from 'clawpowers/itp';
82
+
83
+ // Encode a message (graceful fallback if server is down)
84
+ const result = await encode("Analyze trading performance");
85
+ // { encoded: "ITP:...", wasCompressed: true, savingsPct: 45.2 }
86
+
87
+ // Decode an ITP message
88
+ const decoded = await decode("ITP:ANL+TRD/PERF");
89
+ // { decoded: "Analyze trading performance", wasItp: true }
90
+
91
+ // Check server status
92
+ const alive = await healthCheck();
93
+ // true or false
94
+ ```
95
+
96
+ ## Swarm Integration
97
+
98
+ ITP integrates with the Parallel Swarm module to compress task descriptions before fan-out and decode results after collection:
99
+
100
+ ```typescript
101
+ import { encodeTaskDescription, decodeSwarmResult } from 'clawpowers/itp/swarm-bridge';
102
+
103
+ // Compress task before sending to sub-agents
104
+ const compressedTask = await encodeTaskDescription(task);
105
+
106
+ // Decode result from sub-agent
107
+ const decodedResult = await decodeSwarmResult(result);
108
+ ```
109
+
110
+ ## Graceful Degradation
111
+
112
+ All ITP functions fail gracefully — if the ITP server is unreachable, messages pass through unchanged with no errors thrown. This ensures ITP never blocks agent operations.