@monoes/monomindcli 1.15.6 → 1.16.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.
- package/.claude/agents/github/repo-architect.md +1 -1
- package/.claude/agents/specialists/integration-architect.md +6 -6
- package/.claude/commands/hive-mind/hive-mind-init.md +1 -1
- package/.claude/commands/hive-mind/hive-mind-memory.md +1 -1
- package/.claude/commands/mastermind/brain.md +11 -11
- package/.claude/commands/mastermind/master.md +4 -4
- package/.claude/commands/mastermind/memory.md +6 -6
- package/.claude/commands/memory/README.md +4 -4
- package/.claude/commands/truth/start.md +3 -3
- package/.claude/helpers/extras-registry.json +2 -2
- package/.claude/helpers/skill-registry.json +26 -26
- package/.claude/helpers/statusline.cjs +8 -8
- package/.claude/skills/agentic-jujutsu/SKILL.md +3 -3
- package/.claude/skills/mastermind/_protocol.md +8 -8
- package/README.md +6 -6
- package/dist/src/__tests__/browse-analyzer.test.js +18 -1
- package/dist/src/__tests__/browse-analyzer.test.js.map +1 -1
- package/dist/src/commands/agent.js +2 -2
- package/dist/src/commands/agent.js.map +1 -1
- package/dist/src/commands/autopilot.js +1 -1
- package/dist/src/commands/autopilot.js.map +1 -1
- package/dist/src/commands/completions.d.ts.map +1 -1
- package/dist/src/commands/completions.js +2 -21
- package/dist/src/commands/completions.js.map +1 -1
- package/dist/src/commands/config.js +1 -1
- package/dist/src/commands/hive-mind.js +1 -1
- package/dist/src/commands/hooks-coverage-commands.js +31 -31
- package/dist/src/commands/hooks-coverage-commands.js.map +1 -1
- package/dist/src/commands/hooks-routing-commands.js +1 -1
- package/dist/src/commands/hooks-routing-commands.js.map +1 -1
- package/dist/src/commands/hooks.js +1 -1
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/index.d.ts +0 -1
- package/dist/src/commands/index.d.ts.map +1 -1
- package/dist/src/commands/index.js +0 -4
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/init.js +8 -8
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/memory.d.ts +1 -1
- package/dist/src/commands/memory.d.ts.map +1 -1
- package/dist/src/commands/memory.js +138 -28
- package/dist/src/commands/memory.js.map +1 -1
- package/dist/src/commands/migrate.js +2 -2
- package/dist/src/commands/neural.js +1 -1
- package/dist/src/commands/neural.js.map +1 -1
- package/dist/src/commands/swarm.js +1 -1
- package/dist/src/commands/swarm.js.map +1 -1
- package/dist/src/config-adapter.d.ts.map +1 -1
- package/dist/src/config-adapter.js +8 -8
- package/dist/src/config-adapter.js.map +1 -1
- package/dist/src/index.js +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/init/claudemd-generator.js +2 -2
- package/dist/src/init/executor.js +16 -16
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/shared-instructions-generator.d.ts +1 -1
- package/dist/src/init/shared-instructions-generator.js +1 -1
- package/dist/src/init/statusline-generator.d.ts +1 -1
- package/dist/src/init/statusline-generator.js +8 -8
- package/dist/src/init/types.d.ts +3 -3
- package/dist/src/init/types.d.ts.map +1 -1
- package/dist/src/init/types.js +3 -3
- package/dist/src/init/types.js.map +1 -1
- package/dist/src/mcp-client.d.ts.map +1 -1
- package/dist/src/mcp-client.js +1 -8
- package/dist/src/mcp-client.js.map +1 -1
- package/dist/src/mcp-tools/autopilot-tools.js +3 -3
- package/dist/src/mcp-tools/autopilot-tools.js.map +1 -1
- package/dist/src/mcp-tools/daa-tools.js +13 -13
- package/dist/src/mcp-tools/daa-tools.js.map +1 -1
- package/dist/src/mcp-tools/guidance-tools.js +4 -4
- package/dist/src/mcp-tools/guidance-tools.js.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.js +4 -4
- package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
- package/dist/src/mcp-tools/hooks-intelligence.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-intelligence.js +1 -0
- package/dist/src/mcp-tools/hooks-intelligence.js.map +1 -1
- package/dist/src/mcp-tools/hooks-routing.js +23 -23
- package/dist/src/mcp-tools/hooks-routing.js.map +1 -1
- package/dist/src/mcp-tools/index.d.ts +0 -1
- package/dist/src/mcp-tools/index.d.ts.map +1 -1
- package/dist/src/mcp-tools/index.js +0 -2
- package/dist/src/mcp-tools/index.js.map +1 -1
- package/dist/src/mcp-tools/memory-tools.d.ts +22 -6
- package/dist/src/mcp-tools/memory-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/memory-tools.js +553 -505
- package/dist/src/mcp-tools/memory-tools.js.map +1 -1
- package/dist/src/mcp-tools/progress-tools.js +1 -1
- package/dist/src/mcp-tools/progress-tools.js.map +1 -1
- package/dist/src/mcp-tools/system-tools.js +5 -5
- package/dist/src/mcp-tools/system-tools.js.map +1 -1
- package/dist/src/mcp-tools/transfer-tools.d.ts +1 -1
- package/dist/src/mcp-tools/transfer-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/transfer-tools.js +1 -156
- package/dist/src/mcp-tools/transfer-tools.js.map +1 -1
- package/dist/src/memory/embedding-operations.js +3 -3
- package/dist/src/memory/embedding-operations.js.map +1 -1
- package/dist/src/memory/hnsw-operations.js +5 -5
- package/dist/src/memory/hnsw-operations.js.map +1 -1
- package/dist/src/memory/intelligence.js +2 -2
- package/dist/src/memory/intelligence.js.map +1 -1
- package/dist/src/memory/memory-bridge.d.ts +86 -234
- package/dist/src/memory/memory-bridge.d.ts.map +1 -1
- package/dist/src/memory/memory-bridge.js +455 -1702
- package/dist/src/memory/memory-bridge.js.map +1 -1
- package/dist/src/memory/memory-crud.js +3 -3
- package/dist/src/memory/memory-crud.js.map +1 -1
- package/dist/src/memory/memory-initializer.d.ts +1 -1
- package/dist/src/memory/memory-initializer.js +5 -5
- package/dist/src/memory/memory-initializer.js.map +1 -1
- package/dist/src/memory/memory-read.js +4 -4
- package/dist/src/memory/memory-read.js.map +1 -1
- package/dist/src/suggest.js +0 -1
- package/dist/src/suggest.js.map +1 -1
- package/dist/src/types.d.ts +1 -1
- package/dist/src/ui/dashboard.html +41 -5
- package/dist/src/ui/orgs.html +91 -5
- package/dist/src/ui/server.mjs +44 -0
- package/dist/src/update/validator.d.ts.map +1 -1
- package/dist/src/update/validator.js +1 -3
- package/dist/src/update/validator.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +4 -4
- package/dist/src/commands/plugins.d.ts +0 -11
- package/dist/src/commands/plugins.d.ts.map +0 -1
- package/dist/src/commands/plugins.js +0 -799
- package/dist/src/commands/plugins.js.map +0 -1
- package/dist/src/plugins/manager.d.ts +0 -133
- package/dist/src/plugins/manager.d.ts.map +0 -1
- package/dist/src/plugins/manager.js +0 -498
- package/dist/src/plugins/manager.js.map +0 -1
- package/dist/src/plugins/store/discovery.d.ts +0 -88
- package/dist/src/plugins/store/discovery.d.ts.map +0 -1
- package/dist/src/plugins/store/discovery.js +0 -650
- package/dist/src/plugins/store/discovery.js.map +0 -1
- package/dist/src/plugins/store/index.d.ts +0 -76
- package/dist/src/plugins/store/index.d.ts.map +0 -1
- package/dist/src/plugins/store/index.js +0 -141
- package/dist/src/plugins/store/index.js.map +0 -1
- package/dist/src/plugins/store/search.d.ts +0 -46
- package/dist/src/plugins/store/search.d.ts.map +0 -1
- package/dist/src/plugins/store/search.js +0 -231
- package/dist/src/plugins/store/search.js.map +0 -1
- package/dist/src/plugins/store/types.d.ts +0 -274
- package/dist/src/plugins/store/types.d.ts.map +0 -1
- package/dist/src/plugins/store/types.js +0 -7
- package/dist/src/plugins/store/types.js.map +0 -1
- package/dist/src/plugins/tests/demo-plugin-store.d.ts +0 -7
- package/dist/src/plugins/tests/demo-plugin-store.d.ts.map +0 -1
- package/dist/src/plugins/tests/demo-plugin-store.js +0 -126
- package/dist/src/plugins/tests/demo-plugin-store.js.map +0 -1
- package/dist/src/plugins/tests/standalone-test.d.ts +0 -12
- package/dist/src/plugins/tests/standalone-test.d.ts.map +0 -1
- package/dist/src/plugins/tests/standalone-test.js +0 -188
- package/dist/src/plugins/tests/standalone-test.js.map +0 -1
- package/dist/src/plugins/tests/test-plugin-store.d.ts +0 -7
- package/dist/src/plugins/tests/test-plugin-store.d.ts.map +0 -1
- package/dist/src/plugins/tests/test-plugin-store.js +0 -206
- package/dist/src/plugins/tests/test-plugin-store.js.map +0 -1
- package/dist/src/services/registry-api.d.ts +0 -58
- package/dist/src/services/registry-api.d.ts.map +0 -1
- package/dist/src/services/registry-api.js +0 -199
- package/dist/src/services/registry-api.js.map +0 -1
- package/scripts/publish-registry.ts +0 -339
|
@@ -1,650 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Plugin Discovery Service
|
|
3
|
-
* Discovers plugin registries via IPNS and fetches from IPFS
|
|
4
|
-
* Parallel implementation to pattern store for plugins
|
|
5
|
-
*/
|
|
6
|
-
import * as crypto from 'crypto';
|
|
7
|
-
import { resolveIPNS, fetchFromIPFS } from '../../transfer/ipfs/client.js';
|
|
8
|
-
/** Maximum bytes accepted from npm API responses to prevent OOM. */
|
|
9
|
-
const NPM_RESPONSE_MAX_BYTES = 256 * 1024; // 256 KB
|
|
10
|
-
/**
|
|
11
|
-
* Read a fetch Response body up to maxBytes. AbortSignal.timeout() only
|
|
12
|
-
* bounds wall-clock time, NOT response body size; a slow-drip or large
|
|
13
|
-
* response would otherwise buffer unbounded memory here.
|
|
14
|
-
*/
|
|
15
|
-
async function readBoundedJson(res, maxBytes) {
|
|
16
|
-
const lenHdr = res.headers.get('content-length');
|
|
17
|
-
if (lenHdr) {
|
|
18
|
-
const declared = parseInt(lenHdr, 10);
|
|
19
|
-
if (Number.isFinite(declared) && declared > maxBytes) {
|
|
20
|
-
throw new Error(`npm response too large: ${declared} bytes`);
|
|
21
|
-
}
|
|
22
|
-
}
|
|
23
|
-
if (!res.body)
|
|
24
|
-
return JSON.parse('');
|
|
25
|
-
const reader = res.body.getReader();
|
|
26
|
-
const chunks = [];
|
|
27
|
-
let total = 0;
|
|
28
|
-
while (true) {
|
|
29
|
-
const { done, value } = await reader.read();
|
|
30
|
-
if (done)
|
|
31
|
-
break;
|
|
32
|
-
if (value) {
|
|
33
|
-
total += value.byteLength;
|
|
34
|
-
if (total > maxBytes) {
|
|
35
|
-
await reader.cancel();
|
|
36
|
-
throw new Error(`npm response exceeded ${maxBytes} bytes`);
|
|
37
|
-
}
|
|
38
|
-
chunks.push(value);
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
const buf = new Uint8Array(total);
|
|
42
|
-
let off = 0;
|
|
43
|
-
for (const c of chunks) {
|
|
44
|
-
buf.set(c, off);
|
|
45
|
-
off += c.byteLength;
|
|
46
|
-
}
|
|
47
|
-
return JSON.parse(new TextDecoder('utf-8').decode(buf));
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Fetch real npm download stats for a package
|
|
51
|
-
*/
|
|
52
|
-
async function fetchNpmStats(packageName) {
|
|
53
|
-
// Validate package name length to avoid constructing huge URLs
|
|
54
|
-
if (!packageName || packageName.length > 214)
|
|
55
|
-
return null;
|
|
56
|
-
try {
|
|
57
|
-
// Fetch last week downloads
|
|
58
|
-
const downloadsUrl = `https://api.npmjs.org/downloads/point/last-week/${encodeURIComponent(packageName)}`;
|
|
59
|
-
const downloadsRes = await fetch(downloadsUrl, { signal: AbortSignal.timeout(3000) });
|
|
60
|
-
if (!downloadsRes.ok)
|
|
61
|
-
return null;
|
|
62
|
-
const downloadsData = await readBoundedJson(downloadsRes, NPM_RESPONSE_MAX_BYTES);
|
|
63
|
-
// Fetch package info for version
|
|
64
|
-
const packageUrl = `https://registry.npmjs.org/${encodeURIComponent(packageName)}/latest`;
|
|
65
|
-
const packageRes = await fetch(packageUrl, { signal: AbortSignal.timeout(3000) });
|
|
66
|
-
let version = 'unknown';
|
|
67
|
-
if (packageRes.ok) {
|
|
68
|
-
const packageData = await readBoundedJson(packageRes, NPM_RESPONSE_MAX_BYTES);
|
|
69
|
-
version = packageData.version || 'unknown';
|
|
70
|
-
}
|
|
71
|
-
return {
|
|
72
|
-
downloads: downloadsData.downloads || 0,
|
|
73
|
-
version,
|
|
74
|
-
};
|
|
75
|
-
}
|
|
76
|
-
catch {
|
|
77
|
-
return null;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* Default plugin store configuration
|
|
82
|
-
*/
|
|
83
|
-
/**
|
|
84
|
-
* Live IPFS Registry CID - Updated 2026-01-24
|
|
85
|
-
* This is the current pinned registry on Pinata
|
|
86
|
-
*/
|
|
87
|
-
export const LIVE_REGISTRY_CID = 'QmXbfEAaR7D2Ujm4GAkbwcGZQMHqAMpwDoje4583uNP834';
|
|
88
|
-
/**
|
|
89
|
-
* Pre-trained Model Registry CID - Updated 2026-01-24
|
|
90
|
-
* Contains 8 pre-trained learning pattern models with 40 patterns
|
|
91
|
-
* Trained on 110,600+ examples with 90.5% average accuracy
|
|
92
|
-
*/
|
|
93
|
-
export const MODEL_REGISTRY_CID = 'QmNr1yYMKi7YBaL8JSztQyuB5ZUaTdRMLxJC1pBpGbjsTc';
|
|
94
|
-
export const DEFAULT_PLUGIN_STORE_CONFIG = {
|
|
95
|
-
registries: [
|
|
96
|
-
{
|
|
97
|
-
name: 'monomind-official',
|
|
98
|
-
description: 'Official Monomind plugin registry',
|
|
99
|
-
// Use direct CID for reliable resolution (IPNS can be slow)
|
|
100
|
-
ipnsName: LIVE_REGISTRY_CID,
|
|
101
|
-
gateway: 'https://gateway.pinata.cloud',
|
|
102
|
-
publicKey: 'ed25519:21490c8ef5e6d9fea573382e52fbad7d0fa40c3eb124e6746706da7a420ae2d2',
|
|
103
|
-
trusted: true,
|
|
104
|
-
official: true,
|
|
105
|
-
},
|
|
106
|
-
{
|
|
107
|
-
name: 'community-plugins',
|
|
108
|
-
description: 'Community-contributed plugins',
|
|
109
|
-
ipnsName: LIVE_REGISTRY_CID, // Same registry for now
|
|
110
|
-
gateway: 'https://ipfs.io',
|
|
111
|
-
publicKey: 'ed25519:21490c8ef5e6d9fea573382e52fbad7d0fa40c3eb124e6746706da7a420ae2d2',
|
|
112
|
-
trusted: true,
|
|
113
|
-
official: false,
|
|
114
|
-
},
|
|
115
|
-
],
|
|
116
|
-
defaultRegistry: 'monomind-official',
|
|
117
|
-
gateway: 'https://gateway.pinata.cloud',
|
|
118
|
-
timeout: 30000,
|
|
119
|
-
cacheDir: '.monomind/plugins/cache',
|
|
120
|
-
cacheExpiry: 3600000, // 1 hour
|
|
121
|
-
requireVerification: true,
|
|
122
|
-
requireSecurityAudit: false,
|
|
123
|
-
minTrustLevel: 'community',
|
|
124
|
-
trustedAuthors: [],
|
|
125
|
-
blockedPlugins: [],
|
|
126
|
-
allowedPermissions: ['network', 'filesystem', 'memory', 'hooks'],
|
|
127
|
-
requirePermissionPrompt: true,
|
|
128
|
-
};
|
|
129
|
-
/**
|
|
130
|
-
* Plugin Discovery Service
|
|
131
|
-
*/
|
|
132
|
-
export class PluginDiscoveryService {
|
|
133
|
-
config;
|
|
134
|
-
cache = new Map();
|
|
135
|
-
constructor(config = {}) {
|
|
136
|
-
this.config = { ...DEFAULT_PLUGIN_STORE_CONFIG, ...config };
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* Discover plugin registry via IPNS
|
|
140
|
-
*/
|
|
141
|
-
async discoverRegistry(registryName) {
|
|
142
|
-
const targetRegistry = registryName || this.config.defaultRegistry;
|
|
143
|
-
const registry = this.config.registries.find(r => r.name === targetRegistry);
|
|
144
|
-
if (!registry) {
|
|
145
|
-
return {
|
|
146
|
-
success: false,
|
|
147
|
-
error: `Unknown registry: ${targetRegistry}`,
|
|
148
|
-
};
|
|
149
|
-
}
|
|
150
|
-
console.log(`[PluginDiscovery] Resolving ${registry.name} via IPNS...`);
|
|
151
|
-
// Check cache first — key by registry.name (not ipnsName which can be shared)
|
|
152
|
-
const cached = this.cache.get(registry.name);
|
|
153
|
-
if (cached && Date.now() - cached.timestamp < this.config.cacheExpiry) {
|
|
154
|
-
console.log(`[PluginDiscovery] Cache hit for ${registry.name}`);
|
|
155
|
-
return {
|
|
156
|
-
success: true,
|
|
157
|
-
registry: cached.registry,
|
|
158
|
-
fromCache: true,
|
|
159
|
-
source: registry.name,
|
|
160
|
-
};
|
|
161
|
-
}
|
|
162
|
-
try {
|
|
163
|
-
// Check if ipnsName is actually a direct CID (CIDv1 starts with 'baf', CIDv0 starts with 'Qm')
|
|
164
|
-
const isDirectCid = registry.ipnsName.startsWith('baf') || registry.ipnsName.startsWith('Qm');
|
|
165
|
-
let cid;
|
|
166
|
-
if (isDirectCid) {
|
|
167
|
-
// Use the CID directly - no IPNS resolution needed
|
|
168
|
-
cid = registry.ipnsName;
|
|
169
|
-
console.log(`[PluginDiscovery] Using direct CID: ${cid}`);
|
|
170
|
-
}
|
|
171
|
-
else {
|
|
172
|
-
// Resolve IPNS to get current CID
|
|
173
|
-
cid = await resolveIPNS(registry.ipnsName, registry.gateway);
|
|
174
|
-
if (!cid) {
|
|
175
|
-
// Fallback to demo registry
|
|
176
|
-
return this.createDemoRegistryAsync(registry);
|
|
177
|
-
}
|
|
178
|
-
console.log(`[PluginDiscovery] Resolved IPNS to CID: ${cid}`);
|
|
179
|
-
}
|
|
180
|
-
// Fetch registry from IPFS
|
|
181
|
-
const registryData = await fetchFromIPFS(cid, registry.gateway);
|
|
182
|
-
if (!registryData) {
|
|
183
|
-
return this.createDemoRegistryAsync(registry);
|
|
184
|
-
}
|
|
185
|
-
// Verify registry signature if required — treat failure as fatal to prevent
|
|
186
|
-
// a tampered registry from being served when requireVerification is enabled.
|
|
187
|
-
if (this.config.requireVerification && registryData.registrySignature) {
|
|
188
|
-
const verified = await this.verifyRegistrySignature(registryData, registry.publicKey);
|
|
189
|
-
if (!verified) {
|
|
190
|
-
console.error(`[PluginDiscovery] Registry signature verification failed — falling back to demo registry`);
|
|
191
|
-
return this.createDemoRegistryAsync(registry);
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
// Cache the result — key by registry.name so separate registries don't share a slot
|
|
195
|
-
this.cache.set(registry.name, {
|
|
196
|
-
registry: registryData,
|
|
197
|
-
timestamp: Date.now(),
|
|
198
|
-
});
|
|
199
|
-
return {
|
|
200
|
-
success: true,
|
|
201
|
-
registry: registryData,
|
|
202
|
-
cid,
|
|
203
|
-
source: registry.name,
|
|
204
|
-
fromCache: false,
|
|
205
|
-
};
|
|
206
|
-
}
|
|
207
|
-
catch (error) {
|
|
208
|
-
console.error(`[PluginDiscovery] Failed to discover registry:`, error);
|
|
209
|
-
// Return demo registry on error
|
|
210
|
-
return this.createDemoRegistryAsync(registry);
|
|
211
|
-
}
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Create demo plugin registry with real npm stats
|
|
215
|
-
*/
|
|
216
|
-
async createDemoRegistryAsync(registry) {
|
|
217
|
-
console.log(`[PluginDiscovery] Using demo registry for ${registry.name}`);
|
|
218
|
-
// Get plugins with real npm stats
|
|
219
|
-
const plugins = await this.getDemoPluginsWithStats();
|
|
220
|
-
const demoRegistry = {
|
|
221
|
-
version: '1.0.0',
|
|
222
|
-
type: 'plugins',
|
|
223
|
-
updatedAt: new Date().toISOString(),
|
|
224
|
-
ipnsName: registry.ipnsName,
|
|
225
|
-
plugins,
|
|
226
|
-
categories: [
|
|
227
|
-
{ id: 'ai-ml', name: 'AI/ML', description: 'AI and machine learning plugins', pluginCount: 1 },
|
|
228
|
-
{ id: 'security', name: 'Security', description: 'Security and compliance plugins', pluginCount: 1 },
|
|
229
|
-
{ id: 'devops', name: 'DevOps', description: 'CI/CD and deployment plugins', pluginCount: 1 },
|
|
230
|
-
{ id: 'integrations', name: 'Integrations', description: 'Third-party integrations', pluginCount: 2 },
|
|
231
|
-
{ id: 'agents', name: 'Agents', description: 'Custom agent types', pluginCount: 1 },
|
|
232
|
-
],
|
|
233
|
-
authors: [
|
|
234
|
-
{
|
|
235
|
-
id: 'monomind-team',
|
|
236
|
-
displayName: 'Monomind Team',
|
|
237
|
-
verified: true,
|
|
238
|
-
plugins: plugins.length,
|
|
239
|
-
totalDownloads: plugins.reduce((sum, p) => sum + p.downloads, 0),
|
|
240
|
-
reputation: 100,
|
|
241
|
-
},
|
|
242
|
-
],
|
|
243
|
-
totalPlugins: plugins.length,
|
|
244
|
-
totalDownloads: plugins.reduce((sum, p) => sum + p.downloads, 0),
|
|
245
|
-
totalAuthors: 1,
|
|
246
|
-
featured: ['@monomind/security', '@monomind/claims', '@monomind/teammate-plugin'],
|
|
247
|
-
trending: ['@monomind/teammate-plugin'],
|
|
248
|
-
newest: ['@monomind/teammate-plugin'],
|
|
249
|
-
official: ['@monomind/security', '@monomind/claims'],
|
|
250
|
-
compatibilityMatrix: [
|
|
251
|
-
{ pluginId: '@monomind/security', pluginVersion: '3.0.0', monomindVersions: ['3.x'], tested: true },
|
|
252
|
-
],
|
|
253
|
-
};
|
|
254
|
-
// Cache the demo registry
|
|
255
|
-
this.cache.set(registry.name, {
|
|
256
|
-
registry: demoRegistry,
|
|
257
|
-
timestamp: Date.now(),
|
|
258
|
-
});
|
|
259
|
-
return {
|
|
260
|
-
success: true,
|
|
261
|
-
registry: demoRegistry,
|
|
262
|
-
cid: `bafybeiplugin${crypto.randomBytes(16).toString('hex')}`,
|
|
263
|
-
source: `${registry.name} (demo)`,
|
|
264
|
-
fromCache: false,
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
/**
|
|
268
|
-
* Get demo plugins
|
|
269
|
-
*/
|
|
270
|
-
getDemoPlugins() {
|
|
271
|
-
const baseTime = new Date().toISOString();
|
|
272
|
-
const officialAuthor = {
|
|
273
|
-
id: 'monomind-team',
|
|
274
|
-
displayName: 'Monomind Team',
|
|
275
|
-
verified: true,
|
|
276
|
-
plugins: 5,
|
|
277
|
-
totalDownloads: 50000,
|
|
278
|
-
reputation: 100,
|
|
279
|
-
};
|
|
280
|
-
const communityAuthor = {
|
|
281
|
-
id: 'community-contributor',
|
|
282
|
-
displayName: 'Community Contributors',
|
|
283
|
-
verified: false,
|
|
284
|
-
plugins: 7,
|
|
285
|
-
totalDownloads: 15000,
|
|
286
|
-
reputation: 85,
|
|
287
|
-
};
|
|
288
|
-
return [
|
|
289
|
-
{
|
|
290
|
-
id: '@monomind/security',
|
|
291
|
-
name: '@monomind/security',
|
|
292
|
-
displayName: 'Security Scanner',
|
|
293
|
-
description: 'Security scanning, CVE detection, and compliance auditing with threat modeling',
|
|
294
|
-
version: '3.0.0',
|
|
295
|
-
cid: 'bafybeisecurityplugin',
|
|
296
|
-
size: 180000,
|
|
297
|
-
checksum: 'sha256:def456security',
|
|
298
|
-
author: officialAuthor,
|
|
299
|
-
license: 'MIT',
|
|
300
|
-
categories: ['security'],
|
|
301
|
-
tags: ['security', 'cve', 'audit', 'compliance', 'threats'],
|
|
302
|
-
keywords: ['security', 'scanner'],
|
|
303
|
-
downloads: 12000,
|
|
304
|
-
rating: 4.8,
|
|
305
|
-
ratingCount: 189,
|
|
306
|
-
lastUpdated: baseTime,
|
|
307
|
-
createdAt: '2024-01-15T00:00:00Z',
|
|
308
|
-
minMonomindVersion: '3.0.0',
|
|
309
|
-
dependencies: [{ name: '@monomind/core', version: '^3.0.0' }],
|
|
310
|
-
type: 'command',
|
|
311
|
-
hooks: ['security:scan', 'security:audit'],
|
|
312
|
-
commands: ['security scan', 'security audit', 'security cve', 'security threats'],
|
|
313
|
-
permissions: ['filesystem', 'network'],
|
|
314
|
-
exports: ['SecurityScanner', 'CVEDetector', 'ThreatModeler'],
|
|
315
|
-
verified: true,
|
|
316
|
-
trustLevel: 'official',
|
|
317
|
-
securityAudit: {
|
|
318
|
-
auditor: 'monomind-security-team',
|
|
319
|
-
auditDate: '2024-12-01T00:00:00Z',
|
|
320
|
-
auditVersion: '3.0.0',
|
|
321
|
-
passed: true,
|
|
322
|
-
issues: [],
|
|
323
|
-
},
|
|
324
|
-
},
|
|
325
|
-
{
|
|
326
|
-
id: '@monomind/claims',
|
|
327
|
-
name: '@monomind/claims',
|
|
328
|
-
displayName: 'Claims Authorization',
|
|
329
|
-
description: 'Claims-based authorization system for fine-grained access control',
|
|
330
|
-
version: '3.0.0',
|
|
331
|
-
cid: 'bafybeiclaimsplugin',
|
|
332
|
-
size: 95000,
|
|
333
|
-
checksum: 'sha256:jkl012claims',
|
|
334
|
-
author: officialAuthor,
|
|
335
|
-
license: 'MIT',
|
|
336
|
-
categories: ['security'],
|
|
337
|
-
tags: ['claims', 'authorization', 'access-control', 'permissions'],
|
|
338
|
-
keywords: ['claims', 'auth'],
|
|
339
|
-
downloads: 6200,
|
|
340
|
-
rating: 4.6,
|
|
341
|
-
ratingCount: 98,
|
|
342
|
-
lastUpdated: baseTime,
|
|
343
|
-
createdAt: '2024-02-15T00:00:00Z',
|
|
344
|
-
minMonomindVersion: '3.0.0',
|
|
345
|
-
dependencies: [{ name: '@monomind/core', version: '^3.0.0' }],
|
|
346
|
-
type: 'core',
|
|
347
|
-
hooks: ['claims:check', 'claims:grant'],
|
|
348
|
-
commands: ['claims check', 'claims grant', 'claims revoke', 'claims list'],
|
|
349
|
-
permissions: ['config'],
|
|
350
|
-
exports: ['ClaimsManager', 'PermissionChecker'],
|
|
351
|
-
verified: true,
|
|
352
|
-
trustLevel: 'official',
|
|
353
|
-
},
|
|
354
|
-
{
|
|
355
|
-
id: 'community-analytics',
|
|
356
|
-
name: 'community-analytics',
|
|
357
|
-
displayName: 'Analytics Dashboard',
|
|
358
|
-
description: 'Analytics and metrics visualization for Monomind operations',
|
|
359
|
-
version: '1.2.0',
|
|
360
|
-
cid: 'bafybeianalyticsplugin',
|
|
361
|
-
size: 210000,
|
|
362
|
-
checksum: 'sha256:pqr678analytics',
|
|
363
|
-
author: communityAuthor,
|
|
364
|
-
license: 'MIT',
|
|
365
|
-
categories: ['integrations'],
|
|
366
|
-
tags: ['analytics', 'metrics', 'dashboard', 'visualization'],
|
|
367
|
-
keywords: ['analytics', 'dashboard'],
|
|
368
|
-
downloads: 3400,
|
|
369
|
-
rating: 4.4,
|
|
370
|
-
ratingCount: 67,
|
|
371
|
-
lastUpdated: baseTime,
|
|
372
|
-
createdAt: '2024-06-01T00:00:00Z',
|
|
373
|
-
minMonomindVersion: '3.0.0',
|
|
374
|
-
dependencies: [{ name: '@monomind/core', version: '^3.0.0' }],
|
|
375
|
-
type: 'integration',
|
|
376
|
-
hooks: ['analytics:track', 'analytics:report'],
|
|
377
|
-
commands: ['analytics dashboard', 'analytics export'],
|
|
378
|
-
permissions: ['memory', 'network'],
|
|
379
|
-
exports: ['AnalyticsTracker', 'Dashboard'],
|
|
380
|
-
verified: false,
|
|
381
|
-
trustLevel: 'community',
|
|
382
|
-
},
|
|
383
|
-
{
|
|
384
|
-
id: 'custom-agents',
|
|
385
|
-
name: 'custom-agents',
|
|
386
|
-
displayName: 'Custom Agent Pack',
|
|
387
|
-
description: 'Additional specialized agent types for domain-specific tasks',
|
|
388
|
-
version: '2.0.1',
|
|
389
|
-
cid: 'bafybeicustomagentsplugin',
|
|
390
|
-
size: 175000,
|
|
391
|
-
checksum: 'sha256:stu901agents',
|
|
392
|
-
author: communityAuthor,
|
|
393
|
-
license: 'Apache-2.0',
|
|
394
|
-
categories: ['agents'],
|
|
395
|
-
tags: ['agents', 'custom', 'specialized', 'domain-specific'],
|
|
396
|
-
keywords: ['agents', 'custom'],
|
|
397
|
-
downloads: 2100,
|
|
398
|
-
rating: 4.3,
|
|
399
|
-
ratingCount: 45,
|
|
400
|
-
lastUpdated: baseTime,
|
|
401
|
-
createdAt: '2024-08-01T00:00:00Z',
|
|
402
|
-
minMonomindVersion: '3.0.0',
|
|
403
|
-
dependencies: [{ name: '@monomind/core', version: '^3.0.0' }],
|
|
404
|
-
type: 'agent',
|
|
405
|
-
hooks: ['agent:spawn', 'agent:complete'],
|
|
406
|
-
commands: ['agents custom list', 'agents custom spawn'],
|
|
407
|
-
permissions: ['agents', 'memory'],
|
|
408
|
-
exports: ['DataScienceAgent', 'DevOpsAgent', 'ContentAgent'],
|
|
409
|
-
verified: false,
|
|
410
|
-
trustLevel: 'community',
|
|
411
|
-
},
|
|
412
|
-
{
|
|
413
|
-
id: 'slack-integration',
|
|
414
|
-
name: 'slack-integration',
|
|
415
|
-
displayName: 'Slack Integration',
|
|
416
|
-
description: 'Slack integration for notifications and collaborative workflows',
|
|
417
|
-
version: '1.0.0',
|
|
418
|
-
cid: 'bafybeislackplugin',
|
|
419
|
-
size: 85000,
|
|
420
|
-
checksum: 'sha256:vwx234slack',
|
|
421
|
-
author: communityAuthor,
|
|
422
|
-
license: 'MIT',
|
|
423
|
-
categories: ['integrations'],
|
|
424
|
-
tags: ['slack', 'notifications', 'collaboration', 'messaging'],
|
|
425
|
-
keywords: ['slack', 'integration'],
|
|
426
|
-
downloads: 1800,
|
|
427
|
-
rating: 4.5,
|
|
428
|
-
ratingCount: 38,
|
|
429
|
-
lastUpdated: baseTime,
|
|
430
|
-
createdAt: '2024-09-01T00:00:00Z',
|
|
431
|
-
minMonomindVersion: '3.0.0',
|
|
432
|
-
dependencies: [
|
|
433
|
-
{ name: '@monomind/core', version: '^3.0.0' },
|
|
434
|
-
{ name: '@slack/web-api', version: '^6.0.0' },
|
|
435
|
-
],
|
|
436
|
-
type: 'integration',
|
|
437
|
-
hooks: ['notification:send'],
|
|
438
|
-
commands: ['slack notify', 'slack connect'],
|
|
439
|
-
permissions: ['network', 'credentials'],
|
|
440
|
-
exports: ['SlackNotifier', 'SlackBot'],
|
|
441
|
-
verified: false,
|
|
442
|
-
trustLevel: 'community',
|
|
443
|
-
},
|
|
444
|
-
// Plugin SDK - Unified Plugin SDK for creating plugins
|
|
445
|
-
{
|
|
446
|
-
id: '@monomind/plugins',
|
|
447
|
-
name: '@monomind/plugins',
|
|
448
|
-
displayName: 'Plugin SDK',
|
|
449
|
-
description: 'Unified Plugin SDK for Monomind - Worker, Hook, and Provider Integration. Create, test, and publish MonoMind plugins.',
|
|
450
|
-
version: '3.0.0-alpha.2',
|
|
451
|
-
cid: 'bafybeipluginsdk2024xyz',
|
|
452
|
-
size: 156000,
|
|
453
|
-
checksum: 'sha256:pluginsdk2024abc',
|
|
454
|
-
author: officialAuthor,
|
|
455
|
-
license: 'MIT',
|
|
456
|
-
categories: ['devops'],
|
|
457
|
-
tags: ['plugin', 'sdk', 'development', 'toolkit', 'workers', 'hooks', 'providers'],
|
|
458
|
-
keywords: ['plugin', 'sdk', 'development'],
|
|
459
|
-
downloads: 0,
|
|
460
|
-
rating: 0,
|
|
461
|
-
ratingCount: 0,
|
|
462
|
-
lastUpdated: baseTime,
|
|
463
|
-
createdAt: '2024-04-01T00:00:00Z',
|
|
464
|
-
minMonomindVersion: '3.0.0',
|
|
465
|
-
dependencies: [
|
|
466
|
-
{ name: '@monomind/core', version: '^3.0.0' },
|
|
467
|
-
],
|
|
468
|
-
type: 'core',
|
|
469
|
-
hooks: [
|
|
470
|
-
'plugin:create',
|
|
471
|
-
'plugin:validate',
|
|
472
|
-
'plugin:test',
|
|
473
|
-
],
|
|
474
|
-
commands: [
|
|
475
|
-
'plugins create',
|
|
476
|
-
'plugins validate',
|
|
477
|
-
'plugins test',
|
|
478
|
-
],
|
|
479
|
-
permissions: ['filesystem'],
|
|
480
|
-
exports: [
|
|
481
|
-
'PluginBuilder',
|
|
482
|
-
'WorkerPlugin',
|
|
483
|
-
'HookPlugin',
|
|
484
|
-
'ProviderPlugin',
|
|
485
|
-
],
|
|
486
|
-
verified: true,
|
|
487
|
-
trustLevel: 'official',
|
|
488
|
-
},
|
|
489
|
-
// Teammate Plugin - Claude Code v2.1.19+ integration
|
|
490
|
-
{
|
|
491
|
-
id: '@monomind/teammate-plugin',
|
|
492
|
-
name: '@monomind/teammate-plugin',
|
|
493
|
-
displayName: 'Teammate Plugin',
|
|
494
|
-
description: 'Native TeammateTool integration for Claude Code v2.1.19+. Multi-agent team orchestration with plan approval workflows, delegation, messaging, and BMSSP-optimized topology routing. 21 MCP tools.',
|
|
495
|
-
version: '1.0.0-alpha.1',
|
|
496
|
-
cid: 'bafybeiteammateplugin2026',
|
|
497
|
-
size: 387000,
|
|
498
|
-
checksum: 'sha256:e335dd24ec2e68e8952c517794421a0b18dfb23f',
|
|
499
|
-
author: officialAuthor,
|
|
500
|
-
license: 'MIT',
|
|
501
|
-
categories: ['agents', 'integrations'],
|
|
502
|
-
tags: ['teammate', 'claude-code', 'multi-agent', 'swarm', 'orchestration', 'bmssp'],
|
|
503
|
-
keywords: ['teammate', 'claude-code', 'multi-agent'],
|
|
504
|
-
downloads: 0,
|
|
505
|
-
rating: 0,
|
|
506
|
-
ratingCount: 0,
|
|
507
|
-
lastUpdated: baseTime,
|
|
508
|
-
createdAt: '2026-01-25T00:00:00Z',
|
|
509
|
-
minMonomindVersion: '3.0.0',
|
|
510
|
-
dependencies: [
|
|
511
|
-
{ name: '@monomind/core', version: '^3.0.0' },
|
|
512
|
-
{ name: 'eventemitter3', version: '^5.0.1' },
|
|
513
|
-
],
|
|
514
|
-
type: 'integration',
|
|
515
|
-
hooks: ['teammate:spawn', 'teammate:message', 'teammate:plan', 'teammate:delegate'],
|
|
516
|
-
commands: ['teammate spawn', 'teammate team', 'teammate message', 'teammate plan'],
|
|
517
|
-
permissions: ['filesystem', 'memory', 'network'],
|
|
518
|
-
exports: ['TeammateBridge', 'createTeammateBridge', 'TEAMMATE_MCP_TOOLS', 'TopologyOptimizer', 'SemanticRouter'],
|
|
519
|
-
verified: true,
|
|
520
|
-
trustLevel: 'official',
|
|
521
|
-
securityAudit: {
|
|
522
|
-
auditor: 'monomind-security-team',
|
|
523
|
-
auditDate: '2026-01-25T00:00:00Z',
|
|
524
|
-
auditVersion: '1.0.0-alpha.1',
|
|
525
|
-
passed: true,
|
|
526
|
-
issues: [],
|
|
527
|
-
},
|
|
528
|
-
},
|
|
529
|
-
];
|
|
530
|
-
}
|
|
531
|
-
/**
|
|
532
|
-
* Get demo plugins with real npm stats
|
|
533
|
-
*/
|
|
534
|
-
async getDemoPluginsWithStats() {
|
|
535
|
-
const basePlugins = this.getDemoPlugins();
|
|
536
|
-
// Only fetch stats for real npm packages
|
|
537
|
-
const realNpmPackages = [
|
|
538
|
-
'@monomind/claims',
|
|
539
|
-
'@monomind/security',
|
|
540
|
-
'@monomind/plugins',
|
|
541
|
-
'@monomind/teammate-plugin',
|
|
542
|
-
];
|
|
543
|
-
// Fetch stats in parallel
|
|
544
|
-
const statsPromises = realNpmPackages.map(pkg => fetchNpmStats(pkg));
|
|
545
|
-
const statsResults = await Promise.all(statsPromises);
|
|
546
|
-
// Create a map of package -> stats
|
|
547
|
-
const statsMap = new Map();
|
|
548
|
-
realNpmPackages.forEach((pkg, i) => {
|
|
549
|
-
if (statsResults[i]) {
|
|
550
|
-
statsMap.set(pkg, statsResults[i]);
|
|
551
|
-
}
|
|
552
|
-
});
|
|
553
|
-
// Update plugins with real stats, remove fake plugins that don't exist
|
|
554
|
-
return basePlugins
|
|
555
|
-
.filter(plugin => {
|
|
556
|
-
// Keep only real plugins that exist on npm or our two new ones
|
|
557
|
-
const isRealPlugin = realNpmPackages.includes(plugin.name);
|
|
558
|
-
return isRealPlugin;
|
|
559
|
-
})
|
|
560
|
-
.map(plugin => {
|
|
561
|
-
const stats = statsMap.get(plugin.name);
|
|
562
|
-
if (stats) {
|
|
563
|
-
return {
|
|
564
|
-
...plugin,
|
|
565
|
-
downloads: stats.downloads,
|
|
566
|
-
version: stats.version,
|
|
567
|
-
ratingCount: 0, // No rating system yet
|
|
568
|
-
rating: 0,
|
|
569
|
-
};
|
|
570
|
-
}
|
|
571
|
-
return {
|
|
572
|
-
...plugin,
|
|
573
|
-
downloads: 0,
|
|
574
|
-
ratingCount: 0,
|
|
575
|
-
rating: 0,
|
|
576
|
-
};
|
|
577
|
-
});
|
|
578
|
-
}
|
|
579
|
-
/**
|
|
580
|
-
* Verify registry signature using real Ed25519
|
|
581
|
-
*/
|
|
582
|
-
async verifyRegistrySignature(registry, expectedPublicKey) {
|
|
583
|
-
if (!registry.registrySignature || !registry.registryPublicKey)
|
|
584
|
-
return false;
|
|
585
|
-
if (registry.registryPublicKey !== expectedPublicKey)
|
|
586
|
-
return false;
|
|
587
|
-
const sigHex = registry.registrySignature.replace(/^ed25519:/, '');
|
|
588
|
-
const pubKeyHex = registry.registryPublicKey.replace(/^ed25519:/, '');
|
|
589
|
-
if (sigHex.length !== 128 || pubKeyHex.length !== 64)
|
|
590
|
-
return false;
|
|
591
|
-
const content = JSON.stringify({
|
|
592
|
-
version: registry.version,
|
|
593
|
-
updatedAt: registry.updatedAt,
|
|
594
|
-
plugins: registry.plugins.map(p => ({ id: p.id, cid: p.cid, checksum: p.checksum, version: p.version })),
|
|
595
|
-
totalPlugins: registry.totalPlugins,
|
|
596
|
-
});
|
|
597
|
-
try {
|
|
598
|
-
const ed = await import('@noble/ed25519');
|
|
599
|
-
return await ed.verifyAsync(Buffer.from(sigHex, 'hex'), Buffer.from(content), Buffer.from(pubKeyHex, 'hex'));
|
|
600
|
-
}
|
|
601
|
-
catch {
|
|
602
|
-
return false;
|
|
603
|
-
}
|
|
604
|
-
}
|
|
605
|
-
/**
|
|
606
|
-
* List available registries
|
|
607
|
-
*/
|
|
608
|
-
listRegistries() {
|
|
609
|
-
return [...this.config.registries];
|
|
610
|
-
}
|
|
611
|
-
/**
|
|
612
|
-
* Add a new registry
|
|
613
|
-
*/
|
|
614
|
-
addRegistry(registry) {
|
|
615
|
-
this.config.registries.push(registry);
|
|
616
|
-
}
|
|
617
|
-
/**
|
|
618
|
-
* Remove a registry
|
|
619
|
-
*/
|
|
620
|
-
removeRegistry(name) {
|
|
621
|
-
const index = this.config.registries.findIndex(r => r.name === name);
|
|
622
|
-
if (index >= 0) {
|
|
623
|
-
this.config.registries.splice(index, 1);
|
|
624
|
-
return true;
|
|
625
|
-
}
|
|
626
|
-
return false;
|
|
627
|
-
}
|
|
628
|
-
/**
|
|
629
|
-
* Clear cache
|
|
630
|
-
*/
|
|
631
|
-
clearCache() {
|
|
632
|
-
this.cache.clear();
|
|
633
|
-
}
|
|
634
|
-
/**
|
|
635
|
-
* Get cache statistics
|
|
636
|
-
*/
|
|
637
|
-
getCacheStats() {
|
|
638
|
-
return {
|
|
639
|
-
entries: this.cache.size,
|
|
640
|
-
registries: Array.from(this.cache.keys()),
|
|
641
|
-
};
|
|
642
|
-
}
|
|
643
|
-
}
|
|
644
|
-
/**
|
|
645
|
-
* Create discovery service with default config
|
|
646
|
-
*/
|
|
647
|
-
export function createPluginDiscoveryService(config) {
|
|
648
|
-
return new PluginDiscoveryService(config);
|
|
649
|
-
}
|
|
650
|
-
//# sourceMappingURL=discovery.js.map
|