@monoes/monomindcli 1.15.6 → 1.15.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 (163) hide show
  1. package/.claude/agents/github/repo-architect.md +1 -1
  2. package/.claude/agents/specialists/integration-architect.md +6 -6
  3. package/.claude/commands/hive-mind/hive-mind-init.md +1 -1
  4. package/.claude/commands/hive-mind/hive-mind-memory.md +1 -1
  5. package/.claude/commands/mastermind/brain.md +11 -11
  6. package/.claude/commands/mastermind/master.md +4 -4
  7. package/.claude/commands/mastermind/memory.md +6 -6
  8. package/.claude/commands/memory/README.md +4 -4
  9. package/.claude/commands/truth/start.md +3 -3
  10. package/.claude/helpers/extras-registry.json +2 -2
  11. package/.claude/helpers/skill-registry.json +26 -26
  12. package/.claude/helpers/statusline.cjs +8 -8
  13. package/.claude/skills/agentic-jujutsu/SKILL.md +3 -3
  14. package/.claude/skills/mastermind/_protocol.md +8 -8
  15. package/README.md +6 -6
  16. package/dist/src/__tests__/browse-analyzer.test.js +18 -1
  17. package/dist/src/__tests__/browse-analyzer.test.js.map +1 -1
  18. package/dist/src/commands/agent.js +2 -2
  19. package/dist/src/commands/agent.js.map +1 -1
  20. package/dist/src/commands/autopilot.js +1 -1
  21. package/dist/src/commands/autopilot.js.map +1 -1
  22. package/dist/src/commands/completions.d.ts.map +1 -1
  23. package/dist/src/commands/completions.js +2 -21
  24. package/dist/src/commands/completions.js.map +1 -1
  25. package/dist/src/commands/config.js +1 -1
  26. package/dist/src/commands/hive-mind.js +1 -1
  27. package/dist/src/commands/hooks-coverage-commands.js +31 -31
  28. package/dist/src/commands/hooks-coverage-commands.js.map +1 -1
  29. package/dist/src/commands/hooks-routing-commands.js +1 -1
  30. package/dist/src/commands/hooks-routing-commands.js.map +1 -1
  31. package/dist/src/commands/hooks.js +1 -1
  32. package/dist/src/commands/hooks.js.map +1 -1
  33. package/dist/src/commands/index.d.ts +0 -1
  34. package/dist/src/commands/index.d.ts.map +1 -1
  35. package/dist/src/commands/index.js +0 -4
  36. package/dist/src/commands/index.js.map +1 -1
  37. package/dist/src/commands/init.js +8 -8
  38. package/dist/src/commands/init.js.map +1 -1
  39. package/dist/src/commands/memory.d.ts +1 -1
  40. package/dist/src/commands/memory.js +25 -25
  41. package/dist/src/commands/memory.js.map +1 -1
  42. package/dist/src/commands/migrate.js +2 -2
  43. package/dist/src/commands/neural.js +1 -1
  44. package/dist/src/commands/neural.js.map +1 -1
  45. package/dist/src/commands/swarm.js +1 -1
  46. package/dist/src/commands/swarm.js.map +1 -1
  47. package/dist/src/config-adapter.d.ts.map +1 -1
  48. package/dist/src/config-adapter.js +8 -8
  49. package/dist/src/config-adapter.js.map +1 -1
  50. package/dist/src/index.js +1 -1
  51. package/dist/src/index.js.map +1 -1
  52. package/dist/src/init/claudemd-generator.js +2 -2
  53. package/dist/src/init/executor.js +16 -16
  54. package/dist/src/init/executor.js.map +1 -1
  55. package/dist/src/init/shared-instructions-generator.d.ts +1 -1
  56. package/dist/src/init/shared-instructions-generator.js +1 -1
  57. package/dist/src/init/statusline-generator.d.ts +1 -1
  58. package/dist/src/init/statusline-generator.js +8 -8
  59. package/dist/src/init/types.d.ts +3 -3
  60. package/dist/src/init/types.d.ts.map +1 -1
  61. package/dist/src/init/types.js +3 -3
  62. package/dist/src/init/types.js.map +1 -1
  63. package/dist/src/mcp-client.d.ts.map +1 -1
  64. package/dist/src/mcp-client.js +1 -8
  65. package/dist/src/mcp-client.js.map +1 -1
  66. package/dist/src/mcp-tools/autopilot-tools.js +3 -3
  67. package/dist/src/mcp-tools/autopilot-tools.js.map +1 -1
  68. package/dist/src/mcp-tools/daa-tools.js +13 -13
  69. package/dist/src/mcp-tools/daa-tools.js.map +1 -1
  70. package/dist/src/mcp-tools/guidance-tools.js +4 -4
  71. package/dist/src/mcp-tools/guidance-tools.js.map +1 -1
  72. package/dist/src/mcp-tools/hive-mind-tools.js +4 -4
  73. package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
  74. package/dist/src/mcp-tools/hooks-intelligence.d.ts.map +1 -1
  75. package/dist/src/mcp-tools/hooks-intelligence.js +1 -0
  76. package/dist/src/mcp-tools/hooks-intelligence.js.map +1 -1
  77. package/dist/src/mcp-tools/hooks-routing.js +23 -23
  78. package/dist/src/mcp-tools/hooks-routing.js.map +1 -1
  79. package/dist/src/mcp-tools/index.d.ts +0 -1
  80. package/dist/src/mcp-tools/index.d.ts.map +1 -1
  81. package/dist/src/mcp-tools/index.js +0 -2
  82. package/dist/src/mcp-tools/index.js.map +1 -1
  83. package/dist/src/mcp-tools/memory-tools.d.ts +22 -6
  84. package/dist/src/mcp-tools/memory-tools.d.ts.map +1 -1
  85. package/dist/src/mcp-tools/memory-tools.js +553 -505
  86. package/dist/src/mcp-tools/memory-tools.js.map +1 -1
  87. package/dist/src/mcp-tools/progress-tools.js +1 -1
  88. package/dist/src/mcp-tools/progress-tools.js.map +1 -1
  89. package/dist/src/mcp-tools/system-tools.js +5 -5
  90. package/dist/src/mcp-tools/system-tools.js.map +1 -1
  91. package/dist/src/mcp-tools/transfer-tools.d.ts +1 -1
  92. package/dist/src/mcp-tools/transfer-tools.d.ts.map +1 -1
  93. package/dist/src/mcp-tools/transfer-tools.js +1 -156
  94. package/dist/src/mcp-tools/transfer-tools.js.map +1 -1
  95. package/dist/src/memory/embedding-operations.js +3 -3
  96. package/dist/src/memory/embedding-operations.js.map +1 -1
  97. package/dist/src/memory/hnsw-operations.js +5 -5
  98. package/dist/src/memory/hnsw-operations.js.map +1 -1
  99. package/dist/src/memory/intelligence.js +2 -2
  100. package/dist/src/memory/intelligence.js.map +1 -1
  101. package/dist/src/memory/memory-bridge.d.ts +86 -234
  102. package/dist/src/memory/memory-bridge.d.ts.map +1 -1
  103. package/dist/src/memory/memory-bridge.js +455 -1702
  104. package/dist/src/memory/memory-bridge.js.map +1 -1
  105. package/dist/src/memory/memory-crud.js +3 -3
  106. package/dist/src/memory/memory-crud.js.map +1 -1
  107. package/dist/src/memory/memory-initializer.d.ts +1 -1
  108. package/dist/src/memory/memory-initializer.js +5 -5
  109. package/dist/src/memory/memory-initializer.js.map +1 -1
  110. package/dist/src/memory/memory-read.js +4 -4
  111. package/dist/src/memory/memory-read.js.map +1 -1
  112. package/dist/src/suggest.js +0 -1
  113. package/dist/src/suggest.js.map +1 -1
  114. package/dist/src/types.d.ts +1 -1
  115. package/dist/src/ui/dashboard.html +41 -5
  116. package/dist/src/ui/orgs.html +91 -5
  117. package/dist/src/ui/server.mjs +44 -0
  118. package/dist/src/update/validator.d.ts.map +1 -1
  119. package/dist/src/update/validator.js +1 -3
  120. package/dist/src/update/validator.js.map +1 -1
  121. package/dist/tsconfig.tsbuildinfo +1 -1
  122. package/package.json +4 -4
  123. package/dist/src/commands/plugins.d.ts +0 -11
  124. package/dist/src/commands/plugins.d.ts.map +0 -1
  125. package/dist/src/commands/plugins.js +0 -799
  126. package/dist/src/commands/plugins.js.map +0 -1
  127. package/dist/src/plugins/manager.d.ts +0 -133
  128. package/dist/src/plugins/manager.d.ts.map +0 -1
  129. package/dist/src/plugins/manager.js +0 -498
  130. package/dist/src/plugins/manager.js.map +0 -1
  131. package/dist/src/plugins/store/discovery.d.ts +0 -88
  132. package/dist/src/plugins/store/discovery.d.ts.map +0 -1
  133. package/dist/src/plugins/store/discovery.js +0 -650
  134. package/dist/src/plugins/store/discovery.js.map +0 -1
  135. package/dist/src/plugins/store/index.d.ts +0 -76
  136. package/dist/src/plugins/store/index.d.ts.map +0 -1
  137. package/dist/src/plugins/store/index.js +0 -141
  138. package/dist/src/plugins/store/index.js.map +0 -1
  139. package/dist/src/plugins/store/search.d.ts +0 -46
  140. package/dist/src/plugins/store/search.d.ts.map +0 -1
  141. package/dist/src/plugins/store/search.js +0 -231
  142. package/dist/src/plugins/store/search.js.map +0 -1
  143. package/dist/src/plugins/store/types.d.ts +0 -274
  144. package/dist/src/plugins/store/types.d.ts.map +0 -1
  145. package/dist/src/plugins/store/types.js +0 -7
  146. package/dist/src/plugins/store/types.js.map +0 -1
  147. package/dist/src/plugins/tests/demo-plugin-store.d.ts +0 -7
  148. package/dist/src/plugins/tests/demo-plugin-store.d.ts.map +0 -1
  149. package/dist/src/plugins/tests/demo-plugin-store.js +0 -126
  150. package/dist/src/plugins/tests/demo-plugin-store.js.map +0 -1
  151. package/dist/src/plugins/tests/standalone-test.d.ts +0 -12
  152. package/dist/src/plugins/tests/standalone-test.d.ts.map +0 -1
  153. package/dist/src/plugins/tests/standalone-test.js +0 -188
  154. package/dist/src/plugins/tests/standalone-test.js.map +0 -1
  155. package/dist/src/plugins/tests/test-plugin-store.d.ts +0 -7
  156. package/dist/src/plugins/tests/test-plugin-store.d.ts.map +0 -1
  157. package/dist/src/plugins/tests/test-plugin-store.js +0 -206
  158. package/dist/src/plugins/tests/test-plugin-store.js.map +0 -1
  159. package/dist/src/services/registry-api.d.ts +0 -58
  160. package/dist/src/services/registry-api.d.ts.map +0 -1
  161. package/dist/src/services/registry-api.js +0 -199
  162. package/dist/src/services/registry-api.js.map +0 -1
  163. package/scripts/publish-registry.ts +0 -339
@@ -1,339 +0,0 @@
1
- #!/usr/bin/env npx tsx
2
- /**
3
- * Plugin Registry Publisher
4
- *
5
- * Publishes the plugin registry to IPFS via Pinata and updates IPNS pointer.
6
- *
7
- * Setup:
8
- * 1. Create Pinata account at https://pinata.cloud
9
- * 2. Generate API keys (JWT)
10
- * 3. Set environment variables:
11
- * - PINATA_JWT: Your Pinata JWT token
12
- * - REGISTRY_PRIVATE_KEY: Ed25519 private key (hex) for signing
13
- *
14
- * Usage:
15
- * npx tsx scripts/publish-registry.ts
16
- * npx tsx scripts/publish-registry.ts --dry-run
17
- * npx tsx scripts/publish-registry.ts --registry ./custom-registry.json
18
- */
19
-
20
- import * as fs from 'fs';
21
- import * as path from 'path';
22
- import * as crypto from 'crypto';
23
- import { fileURLToPath } from 'url';
24
-
25
- const __filename = fileURLToPath(import.meta.url);
26
- const __dirname = path.dirname(__filename);
27
-
28
- // Types
29
- interface PluginEntry {
30
- id: string;
31
- name: string;
32
- displayName: string;
33
- description: string;
34
- version: string;
35
- cid?: string;
36
- size: number;
37
- checksum: string;
38
- author: {
39
- id: string;
40
- displayName: string;
41
- verified: boolean;
42
- };
43
- license: string;
44
- categories: string[];
45
- tags: string[];
46
- downloads: number;
47
- rating: number;
48
- lastUpdated: string;
49
- minMonomindVersion: string;
50
- type: string;
51
- hooks: string[];
52
- commands: string[];
53
- permissions: string[];
54
- exports: string[];
55
- verified: boolean;
56
- trustLevel: string;
57
- }
58
-
59
- interface PluginRegistry {
60
- version: string;
61
- type: 'plugins';
62
- updatedAt: string;
63
- ipnsName: string;
64
- plugins: PluginEntry[];
65
- categories: Array<{ id: string; name: string; description: string; pluginCount: number }>;
66
- totalPlugins: number;
67
- totalDownloads: number;
68
- featured: string[];
69
- trending: string[];
70
- newest: string[];
71
- official: string[];
72
- registrySignature?: string;
73
- registryPublicKey?: string;
74
- }
75
-
76
- interface PinataResponse {
77
- IpfsHash: string;
78
- PinSize: number;
79
- Timestamp: string;
80
- }
81
-
82
- // Configuration
83
- const PINATA_API_URL = 'https://api.pinata.cloud';
84
- const DEFAULT_REGISTRY_PATH = path.join(__dirname, '../src/plugins/store/registry.json');
85
-
86
- // Parse command line arguments
87
- const args = process.argv.slice(2);
88
- const isDryRun = args.includes('--dry-run');
89
- const registryPathArg = args.find(a => a.startsWith('--registry='));
90
- const registryPath = registryPathArg
91
- ? registryPathArg.split('=')[1]
92
- : DEFAULT_REGISTRY_PATH;
93
-
94
- /**
95
- * Fetch npm stats for a package
96
- */
97
- async function fetchNpmStats(packageName: string): Promise<{ downloads: number; version: string } | null> {
98
- try {
99
- const downloadsUrl = `https://api.npmjs.org/downloads/point/last-week/${encodeURIComponent(packageName)}`;
100
- const downloadsRes = await fetch(downloadsUrl, { signal: AbortSignal.timeout(5000) });
101
-
102
- if (!downloadsRes.ok) return null;
103
-
104
- const downloadsData = await downloadsRes.json() as { downloads?: number };
105
-
106
- const packageUrl = `https://registry.npmjs.org/${encodeURIComponent(packageName)}/latest`;
107
- const packageRes = await fetch(packageUrl, { signal: AbortSignal.timeout(5000) });
108
-
109
- let version = 'unknown';
110
- if (packageRes.ok) {
111
- const packageData = await packageRes.json() as { version?: string };
112
- version = packageData.version || 'unknown';
113
- }
114
-
115
- return {
116
- downloads: downloadsData.downloads || 0,
117
- version,
118
- };
119
- } catch {
120
- return null;
121
- }
122
- }
123
-
124
- /**
125
- * Sign registry with Ed25519
126
- */
127
- async function signRegistry(registry: PluginRegistry, privateKeyHex: string): Promise<{
128
- signature: string;
129
- publicKey: string;
130
- }> {
131
- const ed = await import('@noble/ed25519');
132
-
133
- const privateKey = Buffer.from(privateKeyHex, 'hex');
134
- const publicKey = await ed.getPublicKeyAsync(privateKey);
135
-
136
- // Create a copy without signature fields for signing
137
- const registryToSign = { ...registry };
138
- delete registryToSign.registrySignature;
139
- delete registryToSign.registryPublicKey;
140
-
141
- const message = JSON.stringify(registryToSign);
142
- const signature = await ed.signAsync(
143
- new TextEncoder().encode(message),
144
- privateKey
145
- );
146
-
147
- return {
148
- signature: Buffer.from(signature).toString('hex'),
149
- publicKey: `ed25519:${Buffer.from(publicKey).toString('hex')}`,
150
- };
151
- }
152
-
153
- /**
154
- * Pin JSON to IPFS via Pinata
155
- */
156
- async function pinToIPFS(data: unknown, name: string, jwt: string): Promise<PinataResponse> {
157
- const response = await fetch(`${PINATA_API_URL}/pinning/pinJSONToIPFS`, {
158
- method: 'POST',
159
- headers: {
160
- 'Content-Type': 'application/json',
161
- 'Authorization': `Bearer ${jwt}`,
162
- },
163
- body: JSON.stringify({
164
- pinataContent: data,
165
- pinataMetadata: {
166
- name,
167
- keyvalues: {
168
- type: 'plugin-registry',
169
- publishedAt: new Date().toISOString(),
170
- },
171
- },
172
- pinataOptions: {
173
- cidVersion: 1,
174
- },
175
- }),
176
- });
177
-
178
- if (!response.ok) {
179
- const error = await response.text();
180
- throw new Error(`Pinata error: ${response.status} - ${error}`);
181
- }
182
-
183
- return response.json() as Promise<PinataResponse>;
184
- }
185
-
186
- /**
187
- * Generate a demo registry from npm packages
188
- */
189
- async function generateRegistry(): Promise<PluginRegistry> {
190
- console.log('šŸ“¦ Fetching npm stats for plugins...');
191
-
192
- const officialPackages = [
193
- '@monomind/security',
194
- '@monomind/claims',
195
- '@monomind/plugins',
196
- ];
197
-
198
- const plugins: PluginEntry[] = [];
199
- const now = new Date().toISOString();
200
-
201
- for (const pkg of officialPackages) {
202
- console.log(` Fetching ${pkg}...`);
203
- const stats = await fetchNpmStats(pkg);
204
-
205
- plugins.push({
206
- id: pkg,
207
- name: pkg,
208
- displayName: pkg.replace('@monomind/plugin-', '').replace('@monomind/', ''),
209
- description: `Official Monomind plugin: ${pkg}`,
210
- version: stats?.version || '0.0.0',
211
- size: 100000,
212
- checksum: `sha256:${crypto.randomBytes(32).toString('hex')}`,
213
- author: {
214
- id: 'monomind-team',
215
- displayName: 'Monomind Team',
216
- verified: true,
217
- },
218
- license: 'MIT',
219
- categories: ['official'],
220
- tags: [pkg.split('/').pop() || ''],
221
- downloads: stats?.downloads || 0,
222
- rating: 0,
223
- lastUpdated: now,
224
- minMonomindVersion: '3.0.0',
225
- type: 'integration',
226
- hooks: [],
227
- commands: [],
228
- permissions: ['memory', 'filesystem'],
229
- exports: [],
230
- verified: true,
231
- trustLevel: 'official',
232
- });
233
- }
234
-
235
- const totalDownloads = plugins.reduce((sum, p) => sum + p.downloads, 0);
236
-
237
- return {
238
- version: '1.0.0',
239
- type: 'plugins',
240
- updatedAt: now,
241
- ipnsName: '', // Will be set after publishing
242
- plugins,
243
- categories: [
244
- { id: 'official', name: 'Official', description: 'Official Monomind plugins', pluginCount: plugins.length },
245
- ],
246
- totalPlugins: plugins.length,
247
- totalDownloads,
248
- featured: plugins.slice(0, 3).map(p => p.id),
249
- trending: plugins.sort((a, b) => b.downloads - a.downloads).slice(0, 3).map(p => p.id),
250
- newest: plugins.slice(-3).map(p => p.id),
251
- official: plugins.map(p => p.id),
252
- };
253
- }
254
-
255
- /**
256
- * Main publish function
257
- */
258
- async function main() {
259
- console.log('šŸš€ Plugin Registry Publisher\n');
260
-
261
- // Check environment
262
- const jwt = process.env.PINATA_JWT;
263
- const privateKey = process.env.REGISTRY_PRIVATE_KEY;
264
-
265
- if (!jwt) {
266
- console.error('āŒ PINATA_JWT environment variable is required');
267
- console.log('\nGet your JWT from https://pinata.cloud/keys');
268
- process.exit(1);
269
- }
270
-
271
- // Load or generate registry
272
- let registry: PluginRegistry;
273
-
274
- if (fs.existsSync(registryPath)) {
275
- console.log(`šŸ“„ Loading registry from ${registryPath}`);
276
- const content = fs.readFileSync(registryPath, 'utf-8');
277
- registry = JSON.parse(content);
278
- } else {
279
- console.log('šŸ“„ Generating registry from npm packages...');
280
- registry = await generateRegistry();
281
- }
282
-
283
- // Update timestamp
284
- registry.updatedAt = new Date().toISOString();
285
-
286
- console.log(`\nšŸ“Š Registry Stats:`);
287
- console.log(` Plugins: ${registry.plugins.length}`);
288
- console.log(` Total Downloads: ${registry.totalDownloads.toLocaleString()}`);
289
- console.log(` Updated: ${registry.updatedAt}`);
290
-
291
- // Sign registry if private key is available
292
- if (privateKey) {
293
- console.log('\nšŸ” Signing registry with Ed25519...');
294
- const { signature, publicKey } = await signRegistry(registry, privateKey);
295
- registry.registrySignature = signature;
296
- registry.registryPublicKey = publicKey;
297
- console.log(` Public Key: ${publicKey.slice(0, 30)}...`);
298
- } else {
299
- console.log('\nāš ļø No REGISTRY_PRIVATE_KEY set, skipping signature');
300
- }
301
-
302
- if (isDryRun) {
303
- console.log('\nšŸ” Dry run - would publish:');
304
- console.log(JSON.stringify(registry, null, 2).slice(0, 1000) + '...');
305
- return;
306
- }
307
-
308
- // Pin to IPFS
309
- console.log('\nšŸ“Œ Pinning to IPFS via Pinata...');
310
- try {
311
- const result = await pinToIPFS(registry, 'monomind-plugin-registry', jwt);
312
-
313
- console.log('\nāœ… Published successfully!');
314
- console.log(` CID: ${result.IpfsHash}`);
315
- console.log(` Size: ${(result.PinSize / 1024).toFixed(2)} KB`);
316
- console.log(`\n🌐 Gateway URLs:`);
317
- console.log(` https://gateway.pinata.cloud/ipfs/${result.IpfsHash}`);
318
- console.log(` https://ipfs.io/ipfs/${result.IpfsHash}`);
319
- console.log(` https://cloudflare-ipfs.com/ipfs/${result.IpfsHash}`);
320
- console.log(` https://dweb.link/ipfs/${result.IpfsHash}`);
321
-
322
- // Save CID for reference
323
- const cidFile = path.join(__dirname, '../.registry-cid');
324
- fs.writeFileSync(cidFile, result.IpfsHash);
325
- console.log(`\nšŸ’¾ CID saved to ${cidFile}`);
326
-
327
- // Update discovery.ts config (manual step reminder)
328
- console.log('\nšŸ“ Next steps:');
329
- console.log(' 1. Update DEFAULT_PLUGIN_STORE_CONFIG in discovery.ts with the new CID');
330
- console.log(' 2. If using IPNS, update the IPNS pointer via Pinata dashboard');
331
- console.log(' 3. Test with: npx monomind@latest plugins list');
332
- } catch (error) {
333
- console.error('\nāŒ Publish failed:', error);
334
- process.exit(1);
335
- }
336
- }
337
-
338
- // Run
339
- main().catch(console.error);