clawpowers 1.1.4 → 2.2.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 (131) hide show
  1. package/CHANGELOG.md +126 -0
  2. package/COMPATIBILITY.md +13 -0
  3. package/KNOWN_LIMITATIONS.md +19 -0
  4. package/LICENSE +44 -0
  5. package/LICENSING.md +10 -0
  6. package/README.md +378 -210
  7. package/SECURITY.md +52 -0
  8. package/dist/index.d.ts +1477 -0
  9. package/dist/index.js +3464 -0
  10. package/dist/index.js.map +1 -0
  11. package/native/Cargo.lock +4863 -0
  12. package/native/Cargo.toml +73 -0
  13. package/native/crates/canonical/Cargo.toml +24 -0
  14. package/native/crates/canonical/src/lib.rs +673 -0
  15. package/native/crates/compression/Cargo.toml +20 -0
  16. package/native/crates/compression/benches/compression_bench.rs +42 -0
  17. package/native/crates/compression/src/lib.rs +393 -0
  18. package/native/crates/evm-eth/Cargo.toml +13 -0
  19. package/native/crates/evm-eth/src/lib.rs +105 -0
  20. package/native/crates/fee/Cargo.toml +15 -0
  21. package/native/crates/fee/src/lib.rs +281 -0
  22. package/native/crates/index/Cargo.toml +16 -0
  23. package/native/crates/index/src/lib.rs +277 -0
  24. package/native/crates/policy/Cargo.toml +17 -0
  25. package/native/crates/policy/src/lib.rs +614 -0
  26. package/native/crates/security/Cargo.toml +22 -0
  27. package/native/crates/security/src/lib.rs +478 -0
  28. package/native/crates/tokens/Cargo.toml +13 -0
  29. package/native/crates/tokens/src/lib.rs +534 -0
  30. package/native/crates/verification/Cargo.toml +23 -0
  31. package/native/crates/verification/src/lib.rs +333 -0
  32. package/native/crates/wallet/Cargo.toml +20 -0
  33. package/native/crates/wallet/src/lib.rs +261 -0
  34. package/native/crates/x402/Cargo.toml +30 -0
  35. package/native/crates/x402/src/lib.rs +423 -0
  36. package/native/ffi/Cargo.toml +34 -0
  37. package/native/ffi/build.rs +4 -0
  38. package/native/ffi/index.node +0 -0
  39. package/native/ffi/src/lib.rs +352 -0
  40. package/native/ffi/tests/integration.rs +354 -0
  41. package/native/pyo3/Cargo.toml +26 -0
  42. package/native/pyo3/pyproject.toml +16 -0
  43. package/native/pyo3/src/lib.rs +407 -0
  44. package/native/pyo3/tests/test_smoke.py +180 -0
  45. package/native/wasm/Cargo.toml +44 -0
  46. package/native/wasm/pkg/.gitignore +6 -0
  47. package/native/wasm/pkg/clawpowers_wasm.d.ts +208 -0
  48. package/native/wasm/pkg/clawpowers_wasm.js +872 -0
  49. package/native/wasm/pkg/clawpowers_wasm_bg.wasm +0 -0
  50. package/native/wasm/pkg/clawpowers_wasm_bg.wasm.d.ts +40 -0
  51. package/native/wasm/pkg/package.json +17 -0
  52. package/native/wasm/pkg-node/.gitignore +6 -0
  53. package/native/wasm/pkg-node/clawpowers_wasm.d.ts +143 -0
  54. package/native/wasm/pkg-node/clawpowers_wasm.js +798 -0
  55. package/native/wasm/pkg-node/clawpowers_wasm_bg.wasm +0 -0
  56. package/native/wasm/pkg-node/clawpowers_wasm_bg.wasm.d.ts +40 -0
  57. package/native/wasm/pkg-node/package.json +13 -0
  58. package/native/wasm/src/lib.rs +433 -0
  59. package/package.json +71 -44
  60. package/src/skills/catalog.ts +435 -0
  61. package/src/skills/executor.ts +56 -0
  62. package/src/skills/index.ts +3 -0
  63. package/src/skills/itp/SKILL.md +112 -0
  64. package/src/skills/loader.ts +193 -0
  65. package/.claude-plugin/manifest.json +0 -19
  66. package/.codex/INSTALL.md +0 -36
  67. package/.cursor-plugin/manifest.json +0 -21
  68. package/.opencode/INSTALL.md +0 -52
  69. package/ARCHITECTURE.md +0 -69
  70. package/bin/clawpowers.js +0 -625
  71. package/bin/clawpowers.sh +0 -91
  72. package/docs/demo/clawpowers-demo.cast +0 -197
  73. package/docs/demo/clawpowers-demo.gif +0 -0
  74. package/docs/launch-images/25-skills-breakdown.jpg +0 -0
  75. package/docs/launch-images/clawpowers-vs-superpowers.jpg +0 -0
  76. package/docs/launch-images/economic-code-optimization.jpg +0 -0
  77. package/docs/launch-images/native-vs-bridge-2.jpg +0 -0
  78. package/docs/launch-images/native-vs-bridge.jpg +0 -0
  79. package/docs/launch-images/post1-hero-lobster.jpg +0 -0
  80. package/docs/launch-images/post2-dashboard.jpg +0 -0
  81. package/docs/launch-images/post3-superpowers.jpg +0 -0
  82. package/docs/launch-images/post4-before-after.jpg +0 -0
  83. package/docs/launch-images/post5-install-now.jpg +0 -0
  84. package/docs/launch-images/ultimate-stack.jpg +0 -0
  85. package/docs/launch-posts.md +0 -76
  86. package/docs/quickstart-first-transaction.md +0 -204
  87. package/gemini-extension.json +0 -32
  88. package/hooks/session-start +0 -205
  89. package/hooks/session-start.cmd +0 -43
  90. package/hooks/session-start.js +0 -163
  91. package/runtime/demo/README.md +0 -78
  92. package/runtime/demo/x402-mock-server.js +0 -230
  93. package/runtime/feedback/analyze.js +0 -621
  94. package/runtime/feedback/analyze.sh +0 -546
  95. package/runtime/init.js +0 -210
  96. package/runtime/init.sh +0 -178
  97. package/runtime/metrics/collector.js +0 -361
  98. package/runtime/metrics/collector.sh +0 -308
  99. package/runtime/payments/ledger.js +0 -305
  100. package/runtime/payments/ledger.sh +0 -262
  101. package/runtime/payments/pipeline.js +0 -455
  102. package/runtime/persistence/store.js +0 -433
  103. package/runtime/persistence/store.sh +0 -303
  104. package/skill.json +0 -106
  105. package/skills/agent-bounties/SKILL.md +0 -553
  106. package/skills/agent-payments/SKILL.md +0 -479
  107. package/skills/brainstorming/SKILL.md +0 -233
  108. package/skills/content-pipeline/SKILL.md +0 -282
  109. package/skills/cross-project-knowledge/SKILL.md +0 -345
  110. package/skills/dispatching-parallel-agents/SKILL.md +0 -305
  111. package/skills/economic-code-optimization/SKILL.md +0 -265
  112. package/skills/executing-plans/SKILL.md +0 -255
  113. package/skills/finishing-a-development-branch/SKILL.md +0 -260
  114. package/skills/formal-verification-lite/SKILL.md +0 -441
  115. package/skills/learn-how-to-learn/SKILL.md +0 -235
  116. package/skills/market-intelligence/SKILL.md +0 -323
  117. package/skills/meta-skill-evolution/SKILL.md +0 -325
  118. package/skills/prospecting/SKILL.md +0 -454
  119. package/skills/receiving-code-review/SKILL.md +0 -225
  120. package/skills/requesting-code-review/SKILL.md +0 -206
  121. package/skills/security-audit/SKILL.md +0 -353
  122. package/skills/self-healing-code/SKILL.md +0 -369
  123. package/skills/subagent-driven-development/SKILL.md +0 -244
  124. package/skills/systematic-debugging/SKILL.md +0 -355
  125. package/skills/test-driven-development/SKILL.md +0 -416
  126. package/skills/using-clawpowers/SKILL.md +0 -160
  127. package/skills/using-git-worktrees/SKILL.md +0 -261
  128. package/skills/validator/SKILL.md +0 -281
  129. package/skills/verification-before-completion/SKILL.md +0 -254
  130. package/skills/writing-plans/SKILL.md +0 -276
  131. package/skills/writing-skills/SKILL.md +0 -260
@@ -0,0 +1,208 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+
4
+ /**
5
+ * Opaque handle to an in-memory CanonicalStore.
6
+ */
7
+ export class WasmCanonicalStore {
8
+ free(): void;
9
+ [Symbol.dispose](): void;
10
+ /**
11
+ * Export all records as JSON for IndexedDB persistence.
12
+ */
13
+ exportJson(): string;
14
+ /**
15
+ * Get a record by UUID. Returns JSON or null.
16
+ */
17
+ get(id: string): string | undefined;
18
+ /**
19
+ * Get a record by content hash. Returns JSON or null.
20
+ */
21
+ getByHash(hash: string): string | undefined;
22
+ /**
23
+ * Import records from JSON (e.g., loaded from IndexedDB).
24
+ */
25
+ importJson(json: string): number;
26
+ /**
27
+ * Insert a record. Input: JSON with {namespace, content, metadata, provenance}.
28
+ * Returns the record UUID as a string.
29
+ */
30
+ insert(json: string): string;
31
+ /**
32
+ * Create a new in-memory canonical store.
33
+ */
34
+ constructor();
35
+ /**
36
+ * Query records by namespace. Returns JSON array.
37
+ */
38
+ queryNamespace(namespace: string, limit: number): string;
39
+ /**
40
+ * Soft-delete a record. Returns true if the record existed.
41
+ */
42
+ softDelete(id: string): boolean;
43
+ /**
44
+ * Verify record integrity. Returns true if hash matches.
45
+ */
46
+ verifyIntegrity(id: string): boolean;
47
+ }
48
+
49
+ /**
50
+ * Compute approximate distance between two CompressedVector JSONs.
51
+ */
52
+ export function approximateDistance(a_json: string, b_json: string, dimensions: number): number;
53
+
54
+ /**
55
+ * Calculate a transaction fee.
56
+ * Returns JSON: `{"gross_amount": ..., "fee_amount": ..., "net_amount": ...}`
57
+ */
58
+ export function calculateFee(amount_json: string, fee_type: string, tx_fee_bps?: bigint | null, swap_fee_bps?: bigint | null): string;
59
+
60
+ /**
61
+ * Compress a float32 vector. Input: JSON array of f32. Output: CompressedVector JSON.
62
+ */
63
+ export function compressVector(vector_json: string, dimensions: number): string;
64
+
65
+ /**
66
+ * Compute Keccak-256 hash of raw bytes (EVM-compatible). Returns `0x` + 64 hex chars.
67
+ */
68
+ export function computeKeccak256(bytes: Uint8Array): string;
69
+
70
+ /**
71
+ * Compute SHA-256 hash of content string.
72
+ */
73
+ export function computeSha256(content: string): string;
74
+
75
+ /**
76
+ * Decompress a CompressedVector JSON back to a float32 array JSON.
77
+ */
78
+ export function decompressVector(compressed_json: string, dimensions: number): string;
79
+
80
+ /**
81
+ * Ethereum address from 32-byte secp256k1 private key (`0x` + 20 bytes, EIP-55 checksum).
82
+ */
83
+ export function deriveEthereumAddress(private_key: Uint8Array): string;
84
+
85
+ /**
86
+ * Uncompressed public key: 64 bytes (x || y), no `0x04` prefix.
87
+ */
88
+ export function derivePublicKey(private_key: Uint8Array): Uint8Array;
89
+
90
+ /**
91
+ * Evaluate a write request against a firewall.
92
+ * Input JSON: {namespace, content, trust_level, source, allowed_namespaces?, blocked_patterns?, max_content_length?}
93
+ * Returns JSON: {"decision": "allow"|"deny"|"sanitize", "reason"?: ..., "sanitized"?: ...}
94
+ */
95
+ export function evaluateWriteFirewall(json: string): string;
96
+
97
+ /**
98
+ * Returns a list of modules available in this WASM build.
99
+ */
100
+ export function getAvailableModules(): string;
101
+
102
+ /**
103
+ * Get the default token registry as JSON.
104
+ */
105
+ export function getDefaultTokenRegistry(): string;
106
+
107
+ /**
108
+ * Returns the version and build info.
109
+ */
110
+ export function getVersion(): string;
111
+
112
+ /**
113
+ * ECDSA sign 32-byte message hash → 65 bytes (r || s || recovery_id).
114
+ */
115
+ export function signEcdsa(private_key: Uint8Array, message_hash: Uint8Array): Uint8Array;
116
+
117
+ /**
118
+ * Add two TokenAmount JSONs. Returns the sum as JSON.
119
+ */
120
+ export function tokenAmountAdd(a_json: string, b_json: string): string;
121
+
122
+ /**
123
+ * Create a TokenAmount from a human-readable f64 value and decimal count.
124
+ * Returns JSON: `{"raw": "...", "decimals": N}`
125
+ */
126
+ export function tokenAmountFromHuman(human: number, decimals: number): string;
127
+
128
+ /**
129
+ * Multiply a TokenAmount by basis points. Returns result as JSON.
130
+ */
131
+ export function tokenAmountMulBps(json: string, bps: bigint): string;
132
+
133
+ /**
134
+ * Subtract two TokenAmount JSONs. Returns the difference as JSON.
135
+ */
136
+ export function tokenAmountSub(a_json: string, b_json: string): string;
137
+
138
+ /**
139
+ * Convert a TokenAmount JSON back to a human-readable f64.
140
+ */
141
+ export function tokenAmountToHuman(json: string): number;
142
+
143
+ export function verifyEcdsa(public_key: Uint8Array, message_hash: Uint8Array, signature: Uint8Array): boolean;
144
+
145
+ export type InitInput = RequestInfo | URL | Response | BufferSource | WebAssembly.Module;
146
+
147
+ export interface InitOutput {
148
+ readonly memory: WebAssembly.Memory;
149
+ readonly __wbg_wasmcanonicalstore_free: (a: number, b: number) => void;
150
+ readonly approximateDistance: (a: number, b: number, c: number, d: number, e: number) => [number, number, number];
151
+ readonly calculateFee: (a: number, b: number, c: number, d: number, e: number, f: bigint, g: number, h: bigint) => [number, number, number, number];
152
+ readonly compressVector: (a: number, b: number, c: number) => [number, number, number, number];
153
+ readonly computeKeccak256: (a: number, b: number) => [number, number];
154
+ readonly computeSha256: (a: number, b: number) => [number, number];
155
+ readonly decompressVector: (a: number, b: number, c: number) => [number, number, number, number];
156
+ readonly deriveEthereumAddress: (a: number, b: number) => [number, number, number, number];
157
+ readonly derivePublicKey: (a: number, b: number) => [number, number, number, number];
158
+ readonly evaluateWriteFirewall: (a: number, b: number) => [number, number, number, number];
159
+ readonly getAvailableModules: () => [number, number];
160
+ readonly getDefaultTokenRegistry: () => [number, number, number, number];
161
+ readonly getVersion: () => [number, number];
162
+ readonly signEcdsa: (a: number, b: number, c: number, d: number) => [number, number, number, number];
163
+ readonly tokenAmountAdd: (a: number, b: number, c: number, d: number) => [number, number, number, number];
164
+ readonly tokenAmountFromHuman: (a: number, b: number) => [number, number, number, number];
165
+ readonly tokenAmountMulBps: (a: number, b: number, c: bigint) => [number, number, number, number];
166
+ readonly tokenAmountSub: (a: number, b: number, c: number, d: number) => [number, number, number, number];
167
+ readonly tokenAmountToHuman: (a: number, b: number) => [number, number, number];
168
+ readonly verifyEcdsa: (a: number, b: number, c: number, d: number, e: number, f: number) => [number, number, number];
169
+ readonly wasmcanonicalstore_exportJson: (a: number) => [number, number, number, number];
170
+ readonly wasmcanonicalstore_get: (a: number, b: number, c: number) => [number, number, number, number];
171
+ readonly wasmcanonicalstore_getByHash: (a: number, b: number, c: number) => [number, number, number, number];
172
+ readonly wasmcanonicalstore_importJson: (a: number, b: number, c: number) => [number, number, number];
173
+ readonly wasmcanonicalstore_insert: (a: number, b: number, c: number) => [number, number, number, number];
174
+ readonly wasmcanonicalstore_new: () => [number, number, number];
175
+ readonly wasmcanonicalstore_queryNamespace: (a: number, b: number, c: number, d: number) => [number, number, number, number];
176
+ readonly wasmcanonicalstore_softDelete: (a: number, b: number, c: number) => [number, number, number];
177
+ readonly wasmcanonicalstore_verifyIntegrity: (a: number, b: number, c: number) => [number, number, number];
178
+ readonly __wbindgen_exn_store: (a: number) => void;
179
+ readonly __externref_table_alloc: () => number;
180
+ readonly __wbindgen_externrefs: WebAssembly.Table;
181
+ readonly __wbindgen_malloc: (a: number, b: number) => number;
182
+ readonly __wbindgen_realloc: (a: number, b: number, c: number, d: number) => number;
183
+ readonly __externref_table_dealloc: (a: number) => void;
184
+ readonly __wbindgen_free: (a: number, b: number, c: number) => void;
185
+ readonly __wbindgen_start: () => void;
186
+ }
187
+
188
+ export type SyncInitInput = BufferSource | WebAssembly.Module;
189
+
190
+ /**
191
+ * Instantiates the given `module`, which can either be bytes or
192
+ * a precompiled `WebAssembly.Module`.
193
+ *
194
+ * @param {{ module: SyncInitInput }} module - Passing `SyncInitInput` directly is deprecated.
195
+ *
196
+ * @returns {InitOutput}
197
+ */
198
+ export function initSync(module: { module: SyncInitInput } | SyncInitInput): InitOutput;
199
+
200
+ /**
201
+ * If `module_or_path` is {RequestInfo} or {URL}, makes a request and
202
+ * for everything else, calls `WebAssembly.instantiate` directly.
203
+ *
204
+ * @param {{ module_or_path: InitInput | Promise<InitInput> }} module_or_path - Passing `InitInput` directly is deprecated.
205
+ *
206
+ * @returns {Promise<InitOutput>}
207
+ */
208
+ export default function __wbg_init (module_or_path?: { module_or_path: InitInput | Promise<InitInput> } | InitInput | Promise<InitInput>): Promise<InitOutput>;