monomind 1.11.13 β 1.11.14
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/commands/mastermind/idea.md +1 -1
- package/.claude/commands/mastermind/master.md +1 -1
- package/.claude/scheduled_tasks.lock +1 -1
- package/.claude/skills/mastermind/_protocol.md +4 -4
- package/.claude/skills/mastermind/architect.md +4 -7
- package/.claude/skills/mastermind/autodev.md +2 -4
- package/.claude/skills/mastermind/build.md +3 -3
- package/.claude/skills/mastermind/content.md +3 -3
- package/.claude/skills/mastermind/createorg.md +2 -2
- package/.claude/skills/mastermind/finance.md +3 -3
- package/.claude/skills/mastermind/idea.md +0 -8
- package/.claude/skills/mastermind/marketing.md +3 -3
- package/.claude/skills/mastermind/monitor.md +2 -2
- package/.claude/skills/mastermind/ops.md +3 -3
- package/.claude/skills/mastermind/release.md +3 -3
- package/.claude/skills/mastermind/research.md +3 -3
- package/.claude/skills/mastermind/review.md +3 -3
- package/.claude/skills/mastermind/sales.md +3 -3
- package/README.md +286 -129
- package/package.json +2 -2
- package/packages/@monomind/cli/README.md +286 -129
- package/packages/@monomind/cli/bundled-graph/dist/src/build.js +73 -0
- package/packages/@monomind/cli/bundled-graph/dist/src/cluster.js +120 -0
- package/packages/@monomind/cli/bundled-graph/package.json +57 -0
- package/packages/@monomind/cli/dist/src/agents/halt-signal.d.ts +25 -0
- package/packages/@monomind/cli/dist/src/agents/halt-signal.js +76 -0
- package/packages/@monomind/cli/dist/src/agents/index.d.ts +18 -0
- package/packages/@monomind/cli/dist/src/agents/index.js +13 -0
- package/packages/@monomind/cli/dist/src/agents/managed-agent.d.ts +41 -0
- package/packages/@monomind/cli/dist/src/agents/managed-agent.js +69 -0
- package/packages/@monomind/cli/dist/src/agents/prompt-experiment.d.ts +23 -0
- package/packages/@monomind/cli/dist/src/agents/prompt-experiment.js +49 -0
- package/packages/@monomind/cli/dist/src/agents/prompt-version-manager.d.ts +22 -0
- package/packages/@monomind/cli/dist/src/agents/prompt-version-manager.js +80 -0
- package/packages/@monomind/cli/dist/src/agents/registry-query.d.ts +71 -0
- package/packages/@monomind/cli/dist/src/agents/registry-query.js +125 -0
- package/packages/@monomind/cli/dist/src/agents/score-decay.d.ts +19 -0
- package/packages/@monomind/cli/dist/src/agents/score-decay.js +22 -0
- package/packages/@monomind/cli/dist/src/agents/shared-instructions-loader.d.ts +13 -0
- package/packages/@monomind/cli/dist/src/agents/shared-instructions-loader.js +40 -0
- package/packages/@monomind/cli/dist/src/agents/specialization-scorer.d.ts +54 -0
- package/packages/@monomind/cli/dist/src/agents/specialization-scorer.js +212 -0
- package/packages/@monomind/cli/dist/src/agents/termination-watcher.d.ts +30 -0
- package/packages/@monomind/cli/dist/src/agents/termination-watcher.js +84 -0
- package/packages/@monomind/cli/dist/src/agents/trigger-index.d.ts +20 -0
- package/packages/@monomind/cli/dist/src/agents/trigger-index.js +38 -0
- package/packages/@monomind/cli/dist/src/agents/trigger-scanner.d.ts +64 -0
- package/packages/@monomind/cli/dist/src/agents/trigger-scanner.js +308 -0
- package/packages/@monomind/cli/dist/src/agents/version-diff.d.ts +18 -0
- package/packages/@monomind/cli/dist/src/agents/version-diff.js +64 -0
- package/packages/@monomind/cli/dist/src/agents/version-store.d.ts +60 -0
- package/packages/@monomind/cli/dist/src/agents/version-store.js +235 -0
- package/packages/@monomind/cli/dist/src/benchmarks/pretrain/index.d.ts +45 -0
- package/packages/@monomind/cli/dist/src/benchmarks/pretrain/index.js +404 -0
- package/packages/@monomind/cli/dist/src/commands/agent-wasm.d.ts +14 -0
- package/packages/@monomind/cli/dist/src/commands/agent-wasm.js +333 -0
- package/packages/@monomind/cli/dist/src/commands/doctor.js +55 -1
- package/packages/@monomind/cli/dist/src/commands/ui.js +68 -0
- package/packages/@monomind/cli/dist/src/consensus/index.d.ts +7 -0
- package/packages/@monomind/cli/dist/src/consensus/index.js +6 -0
- package/packages/@monomind/cli/dist/src/context/context-provider.d.ts +44 -0
- package/packages/@monomind/cli/dist/src/context/context-provider.js +25 -0
- package/packages/@monomind/cli/dist/src/context/git-state-provider.d.ts +12 -0
- package/packages/@monomind/cli/dist/src/context/git-state-provider.js +34 -0
- package/packages/@monomind/cli/dist/src/context/index.d.ts +12 -0
- package/packages/@monomind/cli/dist/src/context/index.js +12 -0
- package/packages/@monomind/cli/dist/src/context/project-conventions-provider.d.ts +15 -0
- package/packages/@monomind/cli/dist/src/context/project-conventions-provider.js +19 -0
- package/packages/@monomind/cli/dist/src/context/prompt-assembler.d.ts +26 -0
- package/packages/@monomind/cli/dist/src/context/prompt-assembler.js +93 -0
- package/packages/@monomind/cli/dist/src/context/task-history-provider.d.ts +24 -0
- package/packages/@monomind/cli/dist/src/context/task-history-provider.js +32 -0
- package/packages/@monomind/cli/dist/src/context/user-preferences-provider.d.ts +14 -0
- package/packages/@monomind/cli/dist/src/context/user-preferences-provider.js +27 -0
- package/packages/@monomind/cli/dist/src/dlq/dlq-reader.d.ts +31 -0
- package/packages/@monomind/cli/dist/src/dlq/dlq-reader.js +81 -0
- package/packages/@monomind/cli/dist/src/dlq/dlq-writer.d.ts +24 -0
- package/packages/@monomind/cli/dist/src/dlq/dlq-writer.js +65 -0
- package/packages/@monomind/cli/dist/src/dlq/index.d.ts +10 -0
- package/packages/@monomind/cli/dist/src/dlq/index.js +7 -0
- package/packages/@monomind/cli/dist/src/eval/dataset-manager.d.ts +33 -0
- package/packages/@monomind/cli/dist/src/eval/dataset-manager.js +107 -0
- package/packages/@monomind/cli/dist/src/eval/dataset-runner.d.ts +23 -0
- package/packages/@monomind/cli/dist/src/eval/dataset-runner.js +59 -0
- package/packages/@monomind/cli/dist/src/eval/index.d.ts +10 -0
- package/packages/@monomind/cli/dist/src/eval/index.js +7 -0
- package/packages/@monomind/cli/dist/src/eval/trace-collector.d.ts +40 -0
- package/packages/@monomind/cli/dist/src/eval/trace-collector.js +102 -0
- package/packages/@monomind/cli/dist/src/infrastructure/in-memory-repositories.d.ts +68 -0
- package/packages/@monomind/cli/dist/src/infrastructure/in-memory-repositories.js +264 -0
- package/packages/@monomind/cli/dist/src/init/statusline-generator.js +3 -3
- package/packages/@monomind/cli/dist/src/interactive/interrupt.d.ts +22 -0
- package/packages/@monomind/cli/dist/src/interactive/interrupt.js +71 -0
- package/packages/@monomind/cli/dist/src/mcp/deprecation-injector.d.ts +25 -0
- package/packages/@monomind/cli/dist/src/mcp/deprecation-injector.js +48 -0
- package/packages/@monomind/cli/dist/src/mcp/tool-registry.d.ts +61 -0
- package/packages/@monomind/cli/dist/src/mcp/tool-registry.js +246 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/wasm-agent-tools.d.ts +9 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/wasm-agent-tools.js +230 -0
- package/packages/@monomind/cli/dist/src/model/complexity-scorer.d.ts +21 -0
- package/packages/@monomind/cli/dist/src/model/complexity-scorer.js +106 -0
- package/packages/@monomind/cli/dist/src/model/index.d.ts +4 -0
- package/packages/@monomind/cli/dist/src/model/index.js +4 -0
- package/packages/@monomind/cli/dist/src/model/model-settings.d.ts +22 -0
- package/packages/@monomind/cli/dist/src/model/model-settings.js +33 -0
- package/packages/@monomind/cli/dist/src/model/model-tier-resolver.d.ts +24 -0
- package/packages/@monomind/cli/dist/src/model/model-tier-resolver.js +65 -0
- package/packages/@monomind/cli/dist/src/monovector/capabilities.d.ts +34 -0
- package/packages/@monomind/cli/dist/src/monovector/capabilities.js +37 -0
- package/packages/@monomind/cli/dist/src/observability/replay-reader.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/orchestration/index.d.ts +7 -0
- package/packages/@monomind/cli/dist/src/orchestration/index.js +6 -0
- package/packages/@monomind/cli/dist/src/orchestration/mode-dispatcher.d.ts +11 -0
- package/packages/@monomind/cli/dist/src/orchestration/mode-dispatcher.js +31 -0
- package/packages/@monomind/cli/dist/src/orchestration/routing-modes.d.ts +68 -0
- package/packages/@monomind/cli/dist/src/orchestration/routing-modes.js +180 -0
- package/packages/@monomind/cli/dist/src/plugins/tests/demo-plugin-store.d.ts +7 -0
- package/packages/@monomind/cli/dist/src/plugins/tests/demo-plugin-store.js +126 -0
- package/packages/@monomind/cli/dist/src/plugins/tests/standalone-test.d.ts +12 -0
- package/packages/@monomind/cli/dist/src/plugins/tests/standalone-test.js +188 -0
- package/packages/@monomind/cli/dist/src/plugins/tests/test-plugin-store.d.ts +7 -0
- package/packages/@monomind/cli/dist/src/plugins/tests/test-plugin-store.js +206 -0
- package/packages/@monomind/cli/dist/src/runtime/headless.d.ts +60 -0
- package/packages/@monomind/cli/dist/src/runtime/headless.js +284 -0
- package/packages/@monomind/cli/dist/src/services/agentic-flow-bridge.d.ts +50 -0
- package/packages/@monomind/cli/dist/src/services/agentic-flow-bridge.js +95 -0
- package/packages/@monomind/cli/dist/src/services/container-worker-pool.d.ts +197 -0
- package/packages/@monomind/cli/dist/src/services/container-worker-pool.js +623 -0
- package/packages/@monomind/cli/dist/src/services/index.d.ts +13 -0
- package/packages/@monomind/cli/dist/src/services/index.js +11 -0
- package/packages/@monomind/cli/dist/src/services/worker-queue.d.ts +201 -0
- package/packages/@monomind/cli/dist/src/services/worker-queue.js +594 -0
- package/packages/@monomind/cli/dist/src/swarm/communication-graph.d.ts +25 -0
- package/packages/@monomind/cli/dist/src/swarm/communication-graph.js +77 -0
- package/packages/@monomind/cli/dist/src/swarm/flow-enforcer.d.ts +31 -0
- package/packages/@monomind/cli/dist/src/swarm/flow-enforcer.js +61 -0
- package/packages/@monomind/cli/dist/src/swarm/flow-visualizer.d.ts +19 -0
- package/packages/@monomind/cli/dist/src/swarm/flow-visualizer.js +68 -0
- package/packages/@monomind/cli/dist/src/transfer/deploy-seraphine.d.ts +13 -0
- package/packages/@monomind/cli/dist/src/transfer/deploy-seraphine.js +205 -0
- package/packages/@monomind/cli/dist/src/transfer/store/tests/standalone-test.d.ts +12 -0
- package/packages/@monomind/cli/dist/src/transfer/store/tests/standalone-test.js +190 -0
- package/packages/@monomind/cli/dist/src/transfer/test-seraphine.d.ts +6 -0
- package/packages/@monomind/cli/dist/src/transfer/test-seraphine.js +105 -0
- package/packages/@monomind/cli/dist/src/transfer/tests/test-store.d.ts +7 -0
- package/packages/@monomind/cli/dist/src/transfer/tests/test-store.js +214 -0
- package/packages/@monomind/cli/dist/src/workflow/condition-evaluator.d.ts +10 -0
- package/packages/@monomind/cli/dist/src/workflow/condition-evaluator.js +82 -0
- package/packages/@monomind/cli/dist/src/workflow/context-resolver.d.ts +12 -0
- package/packages/@monomind/cli/dist/src/workflow/context-resolver.js +23 -0
- package/packages/@monomind/cli/dist/src/workflow/dag-builder.d.ts +17 -0
- package/packages/@monomind/cli/dist/src/workflow/dag-builder.js +129 -0
- package/packages/@monomind/cli/dist/src/workflow/dag-executor.d.ts +9 -0
- package/packages/@monomind/cli/dist/src/workflow/dag-executor.js +116 -0
- package/packages/@monomind/cli/dist/src/workflow/dag-types.d.ts +41 -0
- package/packages/@monomind/cli/dist/src/workflow/dag-types.js +8 -0
- package/packages/@monomind/cli/dist/src/workflow/dsl-parser.d.ts +12 -0
- package/packages/@monomind/cli/dist/src/workflow/dsl-parser.js +20 -0
- package/packages/@monomind/cli/dist/src/workflow/dsl-schema.d.ts +165 -0
- package/packages/@monomind/cli/dist/src/workflow/dsl-schema.js +82 -0
- package/packages/@monomind/cli/dist/src/workflow/index.d.ts +13 -0
- package/packages/@monomind/cli/dist/src/workflow/index.js +11 -0
- package/packages/@monomind/cli/dist/src/workflow/template-engine.d.ts +11 -0
- package/packages/@monomind/cli/dist/src/workflow/template-engine.js +40 -0
- package/packages/@monomind/cli/dist/src/workflow/workflow-executor.d.ts +29 -0
- package/packages/@monomind/cli/dist/src/workflow/workflow-executor.js +227 -0
- package/packages/@monomind/cli/package.json +9 -9
- package/packages/@monomind/guidance/dist/adversarial.d.ts +284 -0
- package/packages/@monomind/guidance/dist/adversarial.js +572 -0
- package/packages/@monomind/guidance/dist/analyzer.d.ts +530 -0
- package/packages/@monomind/guidance/dist/analyzer.js +2518 -0
- package/packages/@monomind/guidance/dist/artifacts.d.ts +283 -0
- package/packages/@monomind/guidance/dist/artifacts.js +356 -0
- package/packages/@monomind/guidance/dist/authority.d.ts +290 -0
- package/packages/@monomind/guidance/dist/authority.js +558 -0
- package/packages/@monomind/guidance/dist/capabilities.d.ts +209 -0
- package/packages/@monomind/guidance/dist/capabilities.js +485 -0
- package/packages/@monomind/guidance/dist/coherence.d.ts +233 -0
- package/packages/@monomind/guidance/dist/coherence.js +372 -0
- package/packages/@monomind/guidance/dist/compiler.d.ts +87 -0
- package/packages/@monomind/guidance/dist/compiler.js +419 -0
- package/packages/@monomind/guidance/dist/conformance-kit.d.ts +225 -0
- package/packages/@monomind/guidance/dist/conformance-kit.js +629 -0
- package/packages/@monomind/guidance/dist/continue-gate.d.ts +214 -0
- package/packages/@monomind/guidance/dist/continue-gate.js +353 -0
- package/packages/@monomind/guidance/dist/crypto-utils.d.ts +17 -0
- package/packages/@monomind/guidance/dist/crypto-utils.js +24 -0
- package/packages/@monomind/guidance/dist/evolution.d.ts +282 -0
- package/packages/@monomind/guidance/dist/evolution.js +500 -0
- package/packages/@monomind/guidance/dist/gates.d.ts +79 -0
- package/packages/@monomind/guidance/dist/gates.js +302 -0
- package/packages/@monomind/guidance/dist/gateway.d.ts +206 -0
- package/packages/@monomind/guidance/dist/gateway.js +452 -0
- package/packages/@monomind/guidance/dist/generators.d.ts +153 -0
- package/packages/@monomind/guidance/dist/generators.js +682 -0
- package/packages/@monomind/guidance/dist/headless.d.ts +177 -0
- package/packages/@monomind/guidance/dist/headless.js +342 -0
- package/packages/@monomind/guidance/dist/hooks.d.ts +109 -0
- package/packages/@monomind/guidance/dist/hooks.js +347 -0
- package/packages/@monomind/guidance/dist/index.d.ts +205 -0
- package/packages/@monomind/guidance/dist/index.js +321 -0
- package/packages/@monomind/guidance/dist/ledger.d.ts +162 -0
- package/packages/@monomind/guidance/dist/ledger.js +375 -0
- package/packages/@monomind/guidance/dist/manifest-validator.d.ts +289 -0
- package/packages/@monomind/guidance/dist/manifest-validator.js +838 -0
- package/packages/@monomind/guidance/dist/memory-gate.d.ts +222 -0
- package/packages/@monomind/guidance/dist/memory-gate.js +382 -0
- package/packages/@monomind/guidance/dist/meta-governance.d.ts +265 -0
- package/packages/@monomind/guidance/dist/meta-governance.js +348 -0
- package/packages/@monomind/guidance/dist/optimizer.d.ts +104 -0
- package/packages/@monomind/guidance/dist/optimizer.js +329 -0
- package/packages/@monomind/guidance/dist/persistence.d.ts +189 -0
- package/packages/@monomind/guidance/dist/persistence.js +464 -0
- package/packages/@monomind/guidance/dist/proof.d.ts +185 -0
- package/packages/@monomind/guidance/dist/proof.js +238 -0
- package/packages/@monomind/guidance/dist/retriever.d.ts +116 -0
- package/packages/@monomind/guidance/dist/retriever.js +394 -0
- package/packages/@monomind/guidance/dist/ruvbot-integration.d.ts +370 -0
- package/packages/@monomind/guidance/dist/ruvbot-integration.js +738 -0
- package/packages/@monomind/guidance/dist/temporal.d.ts +426 -0
- package/packages/@monomind/guidance/dist/temporal.js +658 -0
- package/packages/@monomind/guidance/dist/trust.d.ts +283 -0
- package/packages/@monomind/guidance/dist/trust.js +473 -0
- package/packages/@monomind/guidance/dist/truth-anchors.d.ts +276 -0
- package/packages/@monomind/guidance/dist/truth-anchors.js +488 -0
- package/packages/@monomind/guidance/dist/types.d.ts +378 -0
- package/packages/@monomind/guidance/dist/types.js +10 -0
- package/packages/@monomind/guidance/dist/uncertainty.d.ts +372 -0
- package/packages/@monomind/guidance/dist/uncertainty.js +619 -0
- package/packages/@monomind/guidance/dist/wasm-kernel.d.ts +48 -0
- package/packages/@monomind/guidance/dist/wasm-kernel.js +158 -0
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
#!/usr/bin/env npx tsx
|
|
2
|
+
/**
|
|
3
|
+
* Plugin Store Demo
|
|
4
|
+
* Demonstrates the IPFS-based plugin registry working end-to-end
|
|
5
|
+
*/
|
|
6
|
+
import { createPluginDiscoveryService, searchPlugins, getOfficialPlugins, } from '../store/index.js';
|
|
7
|
+
async function demo() {
|
|
8
|
+
console.log('');
|
|
9
|
+
console.log('ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ');
|
|
10
|
+
console.log('β MONOMIND - IPFS PLUGIN STORE DEMO β');
|
|
11
|
+
console.log('β Decentralized Plugin Marketplace β');
|
|
12
|
+
console.log('ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ');
|
|
13
|
+
console.log('');
|
|
14
|
+
// Step 1: Initialize discovery service
|
|
15
|
+
console.log('π Step 1: Initialize Plugin Discovery Service');
|
|
16
|
+
const discovery = createPluginDiscoveryService();
|
|
17
|
+
const registries = discovery.listRegistries();
|
|
18
|
+
console.log(` Found ${registries.length} bootstrap registries:`);
|
|
19
|
+
registries.forEach(r => {
|
|
20
|
+
console.log(` ββ ${r.name} ${r.official ? '(Official)' : '(Community)'}`);
|
|
21
|
+
console.log(` β ββ IPNS: ${r.ipnsName.slice(0, 30)}...`);
|
|
22
|
+
});
|
|
23
|
+
console.log('');
|
|
24
|
+
// Step 2: Discover registry via IPNS
|
|
25
|
+
console.log('π Step 2: Discover Registry via IPNS');
|
|
26
|
+
const result = await discovery.discoverRegistry();
|
|
27
|
+
if (!result.success || !result.registry) {
|
|
28
|
+
console.error(' β Failed to discover registry');
|
|
29
|
+
return;
|
|
30
|
+
}
|
|
31
|
+
console.log(` β
Registry discovered from: ${result.source}`);
|
|
32
|
+
console.log(` ββ Total plugins: ${result.registry.totalPlugins}`);
|
|
33
|
+
console.log(` ββ Total downloads: ${result.registry.totalDownloads.toLocaleString()}`);
|
|
34
|
+
console.log(` ββ CID: ${result.cid?.slice(0, 40)}...`);
|
|
35
|
+
console.log('');
|
|
36
|
+
// Step 3: List official plugins
|
|
37
|
+
console.log('π¦ Step 3: Official Plugins Available');
|
|
38
|
+
const official = getOfficialPlugins(result.registry);
|
|
39
|
+
console.log('');
|
|
40
|
+
official.forEach(p => {
|
|
41
|
+
const stars = 'β
'.repeat(Math.round(p.rating));
|
|
42
|
+
console.log(` ${p.verified ? 'β' : ' '} ${p.displayName} v${p.version}`);
|
|
43
|
+
console.log(` ββ ${p.description.slice(0, 60)}...`);
|
|
44
|
+
console.log(` ββ ${p.downloads.toLocaleString()} downloads | ${stars} ${p.rating}`);
|
|
45
|
+
console.log('');
|
|
46
|
+
});
|
|
47
|
+
// Step 4: Search for plugin-creator
|
|
48
|
+
console.log('π Step 4: Search for "plugin creator"');
|
|
49
|
+
const searchResult = searchPlugins(result.registry, { query: 'plugin creator' });
|
|
50
|
+
console.log(` Found ${searchResult.total} results`);
|
|
51
|
+
console.log('');
|
|
52
|
+
// Step 5: Plugin Creator details
|
|
53
|
+
const pluginCreator = searchResult.plugins.find(p => p.id === 'plugin-creator');
|
|
54
|
+
if (pluginCreator) {
|
|
55
|
+
console.log('βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ');
|
|
56
|
+
console.log(' PLUGIN CREATOR PRO ');
|
|
57
|
+
console.log('βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ');
|
|
58
|
+
console.log('');
|
|
59
|
+
console.log(` Name: ${pluginCreator.displayName}`);
|
|
60
|
+
console.log(` Version: ${pluginCreator.version}`);
|
|
61
|
+
console.log(` Trust: ${pluginCreator.trustLevel.toUpperCase()}`);
|
|
62
|
+
console.log(` Verified: ${pluginCreator.verified ? 'β Yes' : 'β No'}`);
|
|
63
|
+
console.log(` Downloads: ${pluginCreator.downloads.toLocaleString()}`);
|
|
64
|
+
console.log(` Rating: ${'β
'.repeat(Math.round(pluginCreator.rating))} ${pluginCreator.rating}/5`);
|
|
65
|
+
console.log(` License: ${pluginCreator.license}`);
|
|
66
|
+
console.log('');
|
|
67
|
+
console.log(' Description:');
|
|
68
|
+
console.log(` ${pluginCreator.description}`);
|
|
69
|
+
console.log('');
|
|
70
|
+
console.log(' IPFS Storage:');
|
|
71
|
+
console.log(` ββ CID: ${pluginCreator.cid}`);
|
|
72
|
+
console.log(` ββ Size: ${(pluginCreator.size / 1024).toFixed(1)} KB`);
|
|
73
|
+
console.log(` ββ Checksum: ${pluginCreator.checksum}`);
|
|
74
|
+
console.log('');
|
|
75
|
+
console.log(' Commands Available:');
|
|
76
|
+
pluginCreator.commands.forEach(cmd => {
|
|
77
|
+
console.log(` ββ ${cmd}`);
|
|
78
|
+
});
|
|
79
|
+
console.log('');
|
|
80
|
+
console.log(' Hooks Provided:');
|
|
81
|
+
pluginCreator.hooks.forEach(hook => {
|
|
82
|
+
console.log(` ββ ${hook}`);
|
|
83
|
+
});
|
|
84
|
+
console.log('');
|
|
85
|
+
console.log(' Permissions Required:');
|
|
86
|
+
console.log(` ββ ${pluginCreator.permissions.join(', ')}`);
|
|
87
|
+
console.log('');
|
|
88
|
+
if (pluginCreator.securityAudit) {
|
|
89
|
+
console.log(' Security Audit:');
|
|
90
|
+
console.log(` ββ Auditor: ${pluginCreator.securityAudit.auditor}`);
|
|
91
|
+
console.log(` ββ Date: ${pluginCreator.securityAudit.auditDate}`);
|
|
92
|
+
console.log(` ββ Passed: ${pluginCreator.securityAudit.passed ? 'β Yes' : 'β No'}`);
|
|
93
|
+
console.log('');
|
|
94
|
+
}
|
|
95
|
+
console.log(' To install:');
|
|
96
|
+
console.log(' $ monomind plugins install -n plugin-creator');
|
|
97
|
+
console.log('');
|
|
98
|
+
}
|
|
99
|
+
// Summary
|
|
100
|
+
console.log('βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ');
|
|
101
|
+
console.log(' DEMO COMPLETE ');
|
|
102
|
+
console.log('βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ');
|
|
103
|
+
console.log('');
|
|
104
|
+
console.log(' The IPFS-based Plugin Store is working!');
|
|
105
|
+
console.log('');
|
|
106
|
+
console.log(' Features demonstrated:');
|
|
107
|
+
console.log(' β
Registry discovery via IPNS');
|
|
108
|
+
console.log(' β
Plugin search with full-text matching');
|
|
109
|
+
console.log(' β
Official/Verified plugin filtering');
|
|
110
|
+
console.log(' β
Plugin Creator Pro available for download');
|
|
111
|
+
console.log(' β
Security audit verification');
|
|
112
|
+
console.log(' β
Content-addressed storage (CID)');
|
|
113
|
+
console.log('');
|
|
114
|
+
console.log(' CLI Commands:');
|
|
115
|
+
console.log(' $ monomind plugins list # List all plugins');
|
|
116
|
+
console.log(' $ monomind plugins list --official # Official only');
|
|
117
|
+
console.log(' $ monomind plugins search -q neural # Search plugins');
|
|
118
|
+
console.log(' $ monomind plugins info -n plugin-creator');
|
|
119
|
+
console.log(' $ monomind plugins install -n plugin-creator');
|
|
120
|
+
console.log('');
|
|
121
|
+
}
|
|
122
|
+
demo().catch(err => {
|
|
123
|
+
console.error('Demo failed:', err);
|
|
124
|
+
process.exit(1);
|
|
125
|
+
});
|
|
126
|
+
//# sourceMappingURL=demo-plugin-store.js.map
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
#!/usr/bin/env npx tsx
|
|
2
|
+
/**
|
|
3
|
+
* Standalone Plugin Store Test
|
|
4
|
+
* Run this in any environment to verify the IPFS-based plugin store works
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* npx tsx standalone-test.ts
|
|
8
|
+
* # or
|
|
9
|
+
* npm run test:plugin-store
|
|
10
|
+
*/
|
|
11
|
+
export {};
|
|
12
|
+
//# sourceMappingURL=standalone-test.d.ts.map
|
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
#!/usr/bin/env npx tsx
|
|
2
|
+
/**
|
|
3
|
+
* Standalone Plugin Store Test
|
|
4
|
+
* Run this in any environment to verify the IPFS-based plugin store works
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* npx tsx standalone-test.ts
|
|
8
|
+
* # or
|
|
9
|
+
* npm run test:plugin-store
|
|
10
|
+
*/
|
|
11
|
+
import { createPluginDiscoveryService, searchPlugins, getFeaturedPlugins, getOfficialPlugins, getPluginSearchSuggestions, getPluginTagCloud, findSimilarPlugins, } from '../store/index.js';
|
|
12
|
+
async function main() {
|
|
13
|
+
console.log('');
|
|
14
|
+
console.log('ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ');
|
|
15
|
+
console.log('β MONOMIND - STANDALONE PLUGIN STORE TEST β');
|
|
16
|
+
console.log('β IPFS-Based Decentralized Plugin Marketplace β');
|
|
17
|
+
console.log('ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ');
|
|
18
|
+
console.log('');
|
|
19
|
+
let passed = 0;
|
|
20
|
+
let failed = 0;
|
|
21
|
+
// Test 1: Discovery Service Creation
|
|
22
|
+
console.log('βΆ Test 1: Create Discovery Service');
|
|
23
|
+
try {
|
|
24
|
+
const discovery = createPluginDiscoveryService();
|
|
25
|
+
const registries = discovery.listRegistries();
|
|
26
|
+
console.log(` β
Created service with ${registries.length} bootstrap registries`);
|
|
27
|
+
passed++;
|
|
28
|
+
}
|
|
29
|
+
catch (e) {
|
|
30
|
+
console.log(` β Failed: ${e.message}`);
|
|
31
|
+
failed++;
|
|
32
|
+
}
|
|
33
|
+
// Test 2: Discover Registry
|
|
34
|
+
console.log('βΆ Test 2: Discover Registry via IPNS');
|
|
35
|
+
let registry = null;
|
|
36
|
+
try {
|
|
37
|
+
const discovery = createPluginDiscoveryService();
|
|
38
|
+
const result = await discovery.discoverRegistry();
|
|
39
|
+
if (result.success && result.registry) {
|
|
40
|
+
registry = result.registry;
|
|
41
|
+
console.log(` β
Discovered ${result.registry.plugins.length} plugins from ${result.source}`);
|
|
42
|
+
passed++;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
throw new Error(result.error || 'No registry');
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
catch (e) {
|
|
49
|
+
console.log(` β Failed: ${e.message}`);
|
|
50
|
+
failed++;
|
|
51
|
+
}
|
|
52
|
+
if (!registry) {
|
|
53
|
+
console.log('\nβ Cannot continue without registry\n');
|
|
54
|
+
process.exit(1);
|
|
55
|
+
}
|
|
56
|
+
// Test 3: Search Plugins
|
|
57
|
+
console.log('βΆ Test 3: Search for "plugin creator"');
|
|
58
|
+
try {
|
|
59
|
+
const results = searchPlugins(registry, { query: 'plugin creator' });
|
|
60
|
+
const found = results.plugins.find(p => p.id === 'plugin-creator');
|
|
61
|
+
if (found) {
|
|
62
|
+
console.log(` β
Found Plugin Creator Pro v${found.version}`);
|
|
63
|
+
passed++;
|
|
64
|
+
}
|
|
65
|
+
else {
|
|
66
|
+
throw new Error('Plugin Creator not found in search results');
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
catch (e) {
|
|
70
|
+
console.log(` β Failed: ${e.message}`);
|
|
71
|
+
failed++;
|
|
72
|
+
}
|
|
73
|
+
// Test 4: Get Official Plugins
|
|
74
|
+
console.log('βΆ Test 4: Get Official Plugins');
|
|
75
|
+
try {
|
|
76
|
+
const official = getOfficialPlugins(registry);
|
|
77
|
+
console.log(` β
Found ${official.length} official plugins:`);
|
|
78
|
+
official.forEach(p => console.log(` - ${p.displayName} (${p.id})`));
|
|
79
|
+
passed++;
|
|
80
|
+
}
|
|
81
|
+
catch (e) {
|
|
82
|
+
console.log(` β Failed: ${e.message}`);
|
|
83
|
+
failed++;
|
|
84
|
+
}
|
|
85
|
+
// Test 5: Get Featured Plugins
|
|
86
|
+
console.log('βΆ Test 5: Get Featured Plugins');
|
|
87
|
+
try {
|
|
88
|
+
const featured = getFeaturedPlugins(registry);
|
|
89
|
+
const hasPluginCreator = featured.some(p => p.id === 'plugin-creator');
|
|
90
|
+
console.log(` β
Found ${featured.length} featured plugins (Plugin Creator featured: ${hasPluginCreator})`);
|
|
91
|
+
passed++;
|
|
92
|
+
}
|
|
93
|
+
catch (e) {
|
|
94
|
+
console.log(` β Failed: ${e.message}`);
|
|
95
|
+
failed++;
|
|
96
|
+
}
|
|
97
|
+
// Test 6: Search with Filters
|
|
98
|
+
console.log('βΆ Test 6: Search with Filters (verified only)');
|
|
99
|
+
try {
|
|
100
|
+
const results = searchPlugins(registry, { verified: true });
|
|
101
|
+
console.log(` β
Found ${results.plugins.length} verified plugins`);
|
|
102
|
+
passed++;
|
|
103
|
+
}
|
|
104
|
+
catch (e) {
|
|
105
|
+
console.log(` β Failed: ${e.message}`);
|
|
106
|
+
failed++;
|
|
107
|
+
}
|
|
108
|
+
// Test 7: Plugin Details
|
|
109
|
+
console.log('βΆ Test 7: Get Plugin Creator Details');
|
|
110
|
+
try {
|
|
111
|
+
const plugin = registry.plugins.find((p) => p.id === 'plugin-creator');
|
|
112
|
+
if (plugin) {
|
|
113
|
+
console.log(` β
Plugin Creator Pro Details:`);
|
|
114
|
+
console.log(` Version: ${plugin.version}`);
|
|
115
|
+
console.log(` Trust: ${plugin.trustLevel}`);
|
|
116
|
+
console.log(` Commands: ${plugin.commands.length}`);
|
|
117
|
+
console.log(` Downloads: ${plugin.downloads.toLocaleString()}`);
|
|
118
|
+
console.log(` Rating: ${plugin.rating}/5`);
|
|
119
|
+
passed++;
|
|
120
|
+
}
|
|
121
|
+
else {
|
|
122
|
+
throw new Error('Plugin not found');
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
catch (e) {
|
|
126
|
+
console.log(` β Failed: ${e.message}`);
|
|
127
|
+
failed++;
|
|
128
|
+
}
|
|
129
|
+
// Test 8: Tag Cloud
|
|
130
|
+
console.log('βΆ Test 8: Get Tag Cloud');
|
|
131
|
+
try {
|
|
132
|
+
const tags = getPluginTagCloud(registry);
|
|
133
|
+
console.log(` β
Found ${tags.size} unique tags`);
|
|
134
|
+
passed++;
|
|
135
|
+
}
|
|
136
|
+
catch (e) {
|
|
137
|
+
console.log(` β Failed: ${e.message}`);
|
|
138
|
+
failed++;
|
|
139
|
+
}
|
|
140
|
+
// Test 9: Search Suggestions
|
|
141
|
+
console.log('βΆ Test 9: Get Search Suggestions');
|
|
142
|
+
try {
|
|
143
|
+
const suggestions = getPluginSearchSuggestions(registry, 'plug');
|
|
144
|
+
console.log(` β
Got ${suggestions.length} suggestions for "plug"`);
|
|
145
|
+
passed++;
|
|
146
|
+
}
|
|
147
|
+
catch (e) {
|
|
148
|
+
console.log(` β Failed: ${e.message}`);
|
|
149
|
+
failed++;
|
|
150
|
+
}
|
|
151
|
+
// Test 10: Similar Plugins
|
|
152
|
+
console.log('βΆ Test 10: Find Similar Plugins');
|
|
153
|
+
try {
|
|
154
|
+
const similar = findSimilarPlugins(registry, '@monoes/neural', 3);
|
|
155
|
+
console.log(` β
Found ${similar.length} similar plugins to @monoes/neural`);
|
|
156
|
+
passed++;
|
|
157
|
+
}
|
|
158
|
+
catch (e) {
|
|
159
|
+
console.log(` β Failed: ${e.message}`);
|
|
160
|
+
failed++;
|
|
161
|
+
}
|
|
162
|
+
// Summary
|
|
163
|
+
console.log('');
|
|
164
|
+
console.log('βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ');
|
|
165
|
+
console.log(' TEST RESULTS ');
|
|
166
|
+
console.log('βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ');
|
|
167
|
+
console.log('');
|
|
168
|
+
console.log(` Total: ${passed + failed}`);
|
|
169
|
+
console.log(` β
Passed: ${passed}`);
|
|
170
|
+
console.log(` β Failed: ${failed}`);
|
|
171
|
+
console.log('');
|
|
172
|
+
if (failed === 0) {
|
|
173
|
+
console.log(' π All tests passed! Plugin Store is working correctly.');
|
|
174
|
+
console.log('');
|
|
175
|
+
console.log(' Available CLI Commands:');
|
|
176
|
+
console.log(' npx @monoes/cli plugins list');
|
|
177
|
+
console.log(' npx @monoes/cli plugins list --official');
|
|
178
|
+
console.log(' npx @monoes/cli plugins search -q "plugin creator"');
|
|
179
|
+
console.log(' npx @monoes/cli plugins info -n plugin-creator');
|
|
180
|
+
console.log('');
|
|
181
|
+
}
|
|
182
|
+
process.exit(failed > 0 ? 1 : 0);
|
|
183
|
+
}
|
|
184
|
+
main().catch(err => {
|
|
185
|
+
console.error('Fatal error:', err);
|
|
186
|
+
process.exit(1);
|
|
187
|
+
});
|
|
188
|
+
//# sourceMappingURL=standalone-test.js.map
|
|
@@ -0,0 +1,206 @@
|
|
|
1
|
+
#!/usr/bin/env npx tsx
|
|
2
|
+
/**
|
|
3
|
+
* Plugin Store Test Suite
|
|
4
|
+
* Tests IPFS-based plugin registry discovery, search, and operations
|
|
5
|
+
*/
|
|
6
|
+
import { createPluginDiscoveryService, searchPlugins, getPluginSearchSuggestions, getPluginTagCloud, getFeaturedPlugins, getTrendingPlugins, getOfficialPlugins, findSimilarPlugins, } from '../store/index.js';
|
|
7
|
+
// Test results tracking
|
|
8
|
+
const results = [];
|
|
9
|
+
function logTest(name, passed, details) {
|
|
10
|
+
results.push({ test: name, passed, details });
|
|
11
|
+
const icon = passed ? 'β
' : 'β';
|
|
12
|
+
console.log(`${icon} ${name}${details ? `: ${details}` : ''}`);
|
|
13
|
+
}
|
|
14
|
+
async function runTests() {
|
|
15
|
+
console.log('');
|
|
16
|
+
console.log('ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ');
|
|
17
|
+
console.log('β PLUGIN STORE TEST SUITE β');
|
|
18
|
+
console.log('β Testing IPFS-Based Registry Discovery β');
|
|
19
|
+
console.log('ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ');
|
|
20
|
+
console.log('');
|
|
21
|
+
// ==========================================================================
|
|
22
|
+
// 1. DISCOVERY TESTS
|
|
23
|
+
// ==========================================================================
|
|
24
|
+
console.log('βββ Discovery Tests βββββββββββββββββββββββββββββββββββββββ');
|
|
25
|
+
try {
|
|
26
|
+
const discovery = createPluginDiscoveryService();
|
|
27
|
+
logTest('Discovery service created', true);
|
|
28
|
+
// List registries
|
|
29
|
+
const registries = discovery.listRegistries();
|
|
30
|
+
logTest('List registries', registries.length > 0, `Found ${registries.length} registries`);
|
|
31
|
+
// Discover registry
|
|
32
|
+
const result = await discovery.discoverRegistry();
|
|
33
|
+
logTest('Discover registry via IPNS', result.success, result.success
|
|
34
|
+
? `Loaded ${result.registry?.plugins.length || 0} plugins`
|
|
35
|
+
: result.error);
|
|
36
|
+
// Cache test
|
|
37
|
+
if (result.success) {
|
|
38
|
+
const cachedResult = await discovery.discoverRegistry();
|
|
39
|
+
logTest('Cache hit', cachedResult.fromCache === true, 'Second request from cache');
|
|
40
|
+
}
|
|
41
|
+
console.log('');
|
|
42
|
+
// ==========================================================================
|
|
43
|
+
// 2. SEARCH TESTS
|
|
44
|
+
// ==========================================================================
|
|
45
|
+
console.log('βββ Search Tests ββββββββββββββββββββββββββββββββββββββββββ');
|
|
46
|
+
if (result.success && result.registry) {
|
|
47
|
+
const registry = result.registry;
|
|
48
|
+
// Basic search
|
|
49
|
+
const basicSearch = searchPlugins(registry);
|
|
50
|
+
logTest('Basic search', basicSearch.plugins.length > 0, `Found ${basicSearch.total} plugins`);
|
|
51
|
+
// Query search for plugin-creator
|
|
52
|
+
const creatorSearch = searchPlugins(registry, { query: 'creator' });
|
|
53
|
+
logTest('Query search: "creator"', creatorSearch.plugins.length > 0, `Found ${creatorSearch.plugins.length} plugins matching "creator"`);
|
|
54
|
+
// Verify plugin-creator exists
|
|
55
|
+
const pluginCreator = creatorSearch.plugins.find(p => p.id === 'plugin-creator');
|
|
56
|
+
logTest('Plugin Creator found', pluginCreator !== undefined, pluginCreator ? `v${pluginCreator.version} - ${pluginCreator.displayName}` : 'Not found');
|
|
57
|
+
// Category filter
|
|
58
|
+
const securitySearch = searchPlugins(registry, { category: 'security' });
|
|
59
|
+
logTest('Category filter: security', true, `Found ${securitySearch.plugins.length} security plugins`);
|
|
60
|
+
// Type filter
|
|
61
|
+
const commandSearch = searchPlugins(registry, { type: 'command' });
|
|
62
|
+
logTest('Type filter: command', commandSearch.plugins.length > 0, `Found ${commandSearch.plugins.length} command plugins`);
|
|
63
|
+
// Verified filter
|
|
64
|
+
const verifiedSearch = searchPlugins(registry, { verified: true });
|
|
65
|
+
logTest('Verified filter', verifiedSearch.plugins.length > 0, `Verified plugins: ${verifiedSearch.plugins.length}`);
|
|
66
|
+
// Sort by downloads
|
|
67
|
+
const sortedSearch = searchPlugins(registry, {
|
|
68
|
+
sortBy: 'downloads',
|
|
69
|
+
sortOrder: 'desc',
|
|
70
|
+
});
|
|
71
|
+
logTest('Sort by downloads', true, `Top plugin: ${sortedSearch.plugins[0]?.displayName || 'none'} (${sortedSearch.plugins[0]?.downloads || 0} downloads)`);
|
|
72
|
+
// Pagination
|
|
73
|
+
const page1 = searchPlugins(registry, { limit: 3, offset: 0 });
|
|
74
|
+
logTest('Pagination', page1.pageSize === 3, `Page 1 with ${page1.plugins.length} plugins, hasMore: ${page1.hasMore}`);
|
|
75
|
+
// Search suggestions
|
|
76
|
+
const suggestions = getPluginSearchSuggestions(registry, 'neu');
|
|
77
|
+
logTest('Search suggestions', suggestions.length >= 0, `Suggestions for "neu": ${suggestions.slice(0, 3).join(', ') || 'none'}`);
|
|
78
|
+
// Tag cloud
|
|
79
|
+
const tagCloud = getPluginTagCloud(registry);
|
|
80
|
+
logTest('Tag cloud', tagCloud.size > 0, `${tagCloud.size} unique tags`);
|
|
81
|
+
}
|
|
82
|
+
console.log('');
|
|
83
|
+
// ==========================================================================
|
|
84
|
+
// 3. FEATURED/TRENDING/OFFICIAL TESTS
|
|
85
|
+
// ==========================================================================
|
|
86
|
+
console.log('βββ Featured/Trending/Official Tests βββββββββββββββββββββ');
|
|
87
|
+
if (result.success && result.registry) {
|
|
88
|
+
const registry = result.registry;
|
|
89
|
+
// Featured plugins
|
|
90
|
+
const featured = getFeaturedPlugins(registry);
|
|
91
|
+
logTest('Featured plugins', featured.length > 0, `${featured.length} featured: ${featured.map(p => p.name).join(', ')}`);
|
|
92
|
+
// Check plugin-creator is featured
|
|
93
|
+
const creatorFeatured = featured.some(p => p.id === 'plugin-creator');
|
|
94
|
+
logTest('Plugin Creator is featured', creatorFeatured, creatorFeatured ? 'Yes' : 'No');
|
|
95
|
+
// Trending plugins
|
|
96
|
+
const trending = getTrendingPlugins(registry);
|
|
97
|
+
logTest('Trending plugins', trending.length > 0, `${trending.length} trending: ${trending.map(p => p.name).join(', ')}`);
|
|
98
|
+
// Official plugins
|
|
99
|
+
const official = getOfficialPlugins(registry);
|
|
100
|
+
logTest('Official plugins', official.length > 0, `${official.length} official plugins`);
|
|
101
|
+
// Similar plugins
|
|
102
|
+
const similar = findSimilarPlugins(registry, '@monoes/neural', 3);
|
|
103
|
+
logTest('Similar plugins', similar.length >= 0, `Similar to @monoes/neural: ${similar.map(p => p.name).join(', ') || 'none'}`);
|
|
104
|
+
}
|
|
105
|
+
console.log('');
|
|
106
|
+
// ==========================================================================
|
|
107
|
+
// 4. PLUGIN DETAILS TEST
|
|
108
|
+
// ==========================================================================
|
|
109
|
+
console.log('βββ Plugin Details Test βββββββββββββββββββββββββββββββββββ');
|
|
110
|
+
if (result.success && result.registry) {
|
|
111
|
+
const pluginCreator = result.registry.plugins.find(p => p.id === 'plugin-creator');
|
|
112
|
+
if (pluginCreator) {
|
|
113
|
+
logTest('Plugin Creator details', true);
|
|
114
|
+
console.log('');
|
|
115
|
+
console.log(' Plugin Creator Pro Details:');
|
|
116
|
+
console.log(` ββ ID: ${pluginCreator.id}`);
|
|
117
|
+
console.log(` ββ Version: ${pluginCreator.version}`);
|
|
118
|
+
console.log(` ββ CID: ${pluginCreator.cid}`);
|
|
119
|
+
console.log(` ββ Size: ${(pluginCreator.size / 1024).toFixed(1)} KB`);
|
|
120
|
+
console.log(` ββ Downloads: ${pluginCreator.downloads.toLocaleString()}`);
|
|
121
|
+
console.log(` ββ Rating: ${pluginCreator.rating}β
(${pluginCreator.ratingCount} ratings)`);
|
|
122
|
+
console.log(` ββ Trust: ${pluginCreator.trustLevel}`);
|
|
123
|
+
console.log(` ββ Verified: ${pluginCreator.verified ? 'β' : 'β'}`);
|
|
124
|
+
console.log(` ββ Commands: ${pluginCreator.commands.length}`);
|
|
125
|
+
pluginCreator.commands.forEach(cmd => {
|
|
126
|
+
console.log(` β ββ ${cmd}`);
|
|
127
|
+
});
|
|
128
|
+
console.log(` ββ Hooks: ${pluginCreator.hooks.length}`);
|
|
129
|
+
pluginCreator.hooks.forEach(hook => {
|
|
130
|
+
console.log(` β ββ ${hook}`);
|
|
131
|
+
});
|
|
132
|
+
console.log(` ββ Permissions: ${pluginCreator.permissions.join(', ')}`);
|
|
133
|
+
console.log(` ββ Security Audit: ${pluginCreator.securityAudit ? 'β Passed' : 'None'}`);
|
|
134
|
+
console.log(` ββ License: ${pluginCreator.license}`);
|
|
135
|
+
console.log('');
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
// ==========================================================================
|
|
139
|
+
// 5. INTEGRATION TEST
|
|
140
|
+
// ==========================================================================
|
|
141
|
+
console.log('βββ Integration Test ββββββββββββββββββββββββββββββββββββββ');
|
|
142
|
+
// Full workflow: discover -> search -> get details
|
|
143
|
+
const store = createPluginDiscoveryService();
|
|
144
|
+
const discoverResult = await store.discoverRegistry();
|
|
145
|
+
if (discoverResult.success && discoverResult.registry) {
|
|
146
|
+
const searchResult = searchPlugins(discoverResult.registry, {
|
|
147
|
+
query: 'plugin creator',
|
|
148
|
+
});
|
|
149
|
+
if (searchResult.plugins.length > 0) {
|
|
150
|
+
const plugin = searchResult.plugins[0];
|
|
151
|
+
logTest('Full workflow', true, `Discover β Search β Found "${plugin.displayName}" ready to download`);
|
|
152
|
+
}
|
|
153
|
+
else {
|
|
154
|
+
logTest('Full workflow', true, 'Discover β Search completed');
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
catch (error) {
|
|
159
|
+
console.error('Test error:', error);
|
|
160
|
+
logTest('Test suite', false, `Error: ${error}`);
|
|
161
|
+
}
|
|
162
|
+
// ==========================================================================
|
|
163
|
+
// SUMMARY
|
|
164
|
+
// ==========================================================================
|
|
165
|
+
console.log('');
|
|
166
|
+
console.log('βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ');
|
|
167
|
+
console.log(' TEST SUMMARY ');
|
|
168
|
+
console.log('βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ');
|
|
169
|
+
console.log('');
|
|
170
|
+
const passed = results.filter(r => r.passed).length;
|
|
171
|
+
const failed = results.filter(r => !r.passed).length;
|
|
172
|
+
const total = results.length;
|
|
173
|
+
console.log(` Total Tests: ${total}`);
|
|
174
|
+
console.log(` β
Passed: ${passed}`);
|
|
175
|
+
console.log(` β Failed: ${failed}`);
|
|
176
|
+
console.log('');
|
|
177
|
+
if (failed === 0) {
|
|
178
|
+
console.log(' π All tests passed!');
|
|
179
|
+
console.log('');
|
|
180
|
+
console.log(' π¦ Plugin Store Features Verified:');
|
|
181
|
+
console.log(' - Registry discovery via IPNS');
|
|
182
|
+
console.log(' - Plugin search with filters');
|
|
183
|
+
console.log(' - Featured/Trending/Official listings');
|
|
184
|
+
console.log(' - Plugin Creator Pro available for download');
|
|
185
|
+
console.log('');
|
|
186
|
+
console.log(' π§ Plugin Creator Pro Commands:');
|
|
187
|
+
console.log(' - plugin-creator new Create new plugin');
|
|
188
|
+
console.log(' - plugin-creator template Use template');
|
|
189
|
+
console.log(' - plugin-creator validate Validate plugin');
|
|
190
|
+
console.log(' - plugin-creator test Run tests');
|
|
191
|
+
console.log(' - plugin-creator build Build plugin');
|
|
192
|
+
console.log(' - plugin-creator publish Publish to IPFS');
|
|
193
|
+
console.log(' - plugin-creator watch Hot-reload dev mode');
|
|
194
|
+
console.log('');
|
|
195
|
+
}
|
|
196
|
+
else {
|
|
197
|
+
console.log(' β οΈ Some tests failed. Please review the output above.');
|
|
198
|
+
}
|
|
199
|
+
process.exit(failed > 0 ? 1 : 0);
|
|
200
|
+
}
|
|
201
|
+
// Run tests
|
|
202
|
+
runTests().catch(error => {
|
|
203
|
+
console.error('Fatal error:', error);
|
|
204
|
+
process.exit(1);
|
|
205
|
+
});
|
|
206
|
+
//# sourceMappingURL=test-plugin-store.js.map
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Headless Runtime for Background Workers
|
|
4
|
+
* Runs without TTY for daemon processes and scheduled tasks
|
|
5
|
+
*
|
|
6
|
+
* Usage:
|
|
7
|
+
* npx @monomind/cli headless --worker <type>
|
|
8
|
+
* npx @monomind/cli headless --daemon
|
|
9
|
+
* npx @monomind/cli headless --benchmark
|
|
10
|
+
*
|
|
11
|
+
* Environment:
|
|
12
|
+
* MONOMIND_HEADLESS=true
|
|
13
|
+
* CLAUDE_CODE_HEADLESS=true
|
|
14
|
+
*
|
|
15
|
+
* @module v1/cli/runtime/headless
|
|
16
|
+
*/
|
|
17
|
+
import { type HeadlessWorkerType } from '../services/headless-worker-executor.js';
|
|
18
|
+
interface HeadlessConfig {
|
|
19
|
+
mode: 'worker' | 'daemon' | 'benchmark' | 'status';
|
|
20
|
+
workerType?: HeadlessWorkerType;
|
|
21
|
+
timeout?: number;
|
|
22
|
+
verbose?: boolean;
|
|
23
|
+
}
|
|
24
|
+
interface BenchmarkResults {
|
|
25
|
+
sona: {
|
|
26
|
+
avgMs: number;
|
|
27
|
+
targetMet: boolean;
|
|
28
|
+
};
|
|
29
|
+
flashAttention: {
|
|
30
|
+
throughputPerMs: number;
|
|
31
|
+
speedup: number;
|
|
32
|
+
};
|
|
33
|
+
hnsw: {
|
|
34
|
+
entriesIndexed: number;
|
|
35
|
+
searchTime: number;
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* Run a specific worker
|
|
40
|
+
*/
|
|
41
|
+
declare function runWorker(workerType: HeadlessWorkerType, timeout: number): Promise<void>;
|
|
42
|
+
/**
|
|
43
|
+
* Run daemon mode
|
|
44
|
+
*/
|
|
45
|
+
declare function runDaemon(): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Run benchmarks
|
|
48
|
+
*/
|
|
49
|
+
declare function runBenchmarks(): Promise<BenchmarkResults>;
|
|
50
|
+
/**
|
|
51
|
+
* Show system status
|
|
52
|
+
*/
|
|
53
|
+
declare function showStatus(): Promise<void>;
|
|
54
|
+
/**
|
|
55
|
+
* Main entry point
|
|
56
|
+
*/
|
|
57
|
+
declare function main(): Promise<void>;
|
|
58
|
+
export { main, runWorker, runDaemon, runBenchmarks, showStatus };
|
|
59
|
+
export type { HeadlessConfig, BenchmarkResults };
|
|
60
|
+
//# sourceMappingURL=headless.d.ts.map
|