monomind 1.10.57 → 1.11.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/core/coordinator.md +71 -0
- package/.claude/agents/generated/case-analyst.md +50 -0
- package/.claude/agents/generated/copy-editor.md +45 -0
- package/.claude/agents/generated/court-reporter.md +50 -0
- package/.claude/agents/generated/defender.md +51 -0
- package/.claude/agents/generated/editor-in-chief.md +45 -0
- package/.claude/agents/generated/fact-checker.md +45 -0
- package/.claude/agents/generated/judge.md +51 -0
- package/.claude/agents/generated/prosecutor.md +51 -0
- package/.claude/agents/generated/reporter.md +45 -0
- package/.claude/commands/hooks/README.md +1 -1
- package/.claude/commands/hooks/overview.md +1 -1
- package/.claude/commands/mastermind/_repeat.md +1 -1
- package/.claude/commands/mastermind/do.md +3 -1
- package/.claude/commands/mastermind/help.md +2 -2
- package/.claude/commands/mastermind/master.md +39 -6
- package/.claude/commands/mastermind/memory.md +1 -1
- package/.claude/commands/memory/memory-search.md +2 -2
- package/.claude/commands/monitoring/status.md +1 -1
- package/.claude/commands/{browse.md → monobrowse.md} +2 -2
- package/.claude/commands/sparc.md +1 -1
- package/.claude/helpers/handlers/graph-status-handler.cjs +1 -1
- package/.claude/helpers/loop-tracker.cjs +1 -1
- package/.claude/scheduled_tasks.lock +1 -1
- package/.claude/skills/agent-browser-testing/SKILL.md +1 -1
- package/.claude/skills/hooks-automation/SKILL.md +0 -3
- package/.claude/skills/mastermind/build.md +1 -1
- package/.claude/skills/mastermind/code-quality-reviewer-prompt.md +60 -0
- package/.claude/skills/mastermind/content.md +1 -1
- package/.claude/skills/mastermind/createorg.md +79 -2
- package/.claude/skills/mastermind/design.md +3 -1
- package/.claude/skills/mastermind/finance.md +1 -1
- package/.claude/skills/mastermind/implementer-prompt.md +109 -0
- package/.claude/skills/mastermind/marketing.md +1 -1
- package/.claude/skills/mastermind/ops.md +1 -1
- package/.claude/skills/mastermind/plan.md +20 -2
- package/.claude/skills/mastermind/release.md +1 -1
- package/.claude/skills/mastermind/research.md +1 -1
- package/.claude/skills/mastermind/review.md +1 -1
- package/.claude/skills/mastermind/sales.md +1 -1
- package/.claude/skills/mastermind/spec-reviewer-prompt.md +63 -0
- package/.claude/skills/sparc-methodology/SKILL.md +3 -3
- package/.claude/skills/swarm-advanced/SKILL.md +1 -4
- package/.claude-plugin/README.md +1 -2
- package/.claude-plugin/docs/PLUGIN_SUMMARY.md +0 -1
- package/README.md +18 -32
- package/package.json +1 -1
- package/packages/@monomind/cli/README.md +18 -32
- package/packages/@monomind/cli/dist/src/agents/registry-builder.d.ts +1 -7
- package/packages/@monomind/cli/dist/src/agents/registry-builder.js +10 -6
- package/packages/@monomind/cli/dist/src/benchmarks/benchmark-runner.d.ts +59 -12
- package/packages/@monomind/cli/dist/src/benchmarks/benchmark-runner.js +67 -13
- package/packages/@monomind/cli/dist/src/benchmarks/pretrain/index.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/commands/agent-wasm.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/commands/agent-wasm.js +5 -5
- package/packages/@monomind/cli/dist/src/commands/agent.js +1 -6
- package/packages/@monomind/cli/dist/src/commands/analyze.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/analyze.js +8 -18
- package/packages/@monomind/cli/dist/src/commands/doctor.js +53 -3
- package/packages/@monomind/cli/dist/src/commands/embeddings.js +9 -33
- package/packages/@monomind/cli/dist/src/commands/hooks.js +24 -76
- package/packages/@monomind/cli/dist/src/commands/index.d.ts +4 -6
- package/packages/@monomind/cli/dist/src/commands/index.js +8 -15
- package/packages/@monomind/cli/dist/src/commands/init.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/issues.js +16 -11
- package/packages/@monomind/cli/dist/src/commands/memory.js +6 -6
- package/packages/@monomind/cli/dist/src/commands/migrate.js +1 -2
- package/packages/@monomind/cli/dist/src/commands/monograph.js +18 -11
- package/packages/@monomind/cli/dist/src/commands/monovector/backup.d.ts +11 -0
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/backup.js +25 -25
- package/packages/@monomind/cli/dist/src/commands/monovector/benchmark.d.ts +11 -0
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/benchmark.js +14 -14
- package/packages/@monomind/cli/dist/src/commands/monovector/import.d.ts +18 -0
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/import.js +21 -21
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/index.d.ts +6 -6
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/index.js +22 -22
- package/packages/@monomind/cli/dist/src/commands/monovector/init.d.ts +11 -0
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/init.js +36 -36
- package/packages/@monomind/cli/dist/src/commands/monovector/migrate.d.ts +11 -0
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/migrate.js +16 -16
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/optimize.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/optimize.js +10 -10
- package/packages/@monomind/cli/dist/src/commands/monovector/setup.d.ts +18 -0
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/setup.js +77 -77
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/status.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/commands/{ruvector → monovector}/status.js +34 -34
- package/packages/@monomind/cli/dist/src/commands/neural.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/neural.js +31 -608
- package/packages/@monomind/cli/dist/src/commands/performance.js +7 -10
- package/packages/@monomind/cli/dist/src/commands/plugins.js +3 -4
- package/packages/@monomind/cli/dist/src/commands/process.js +5 -12
- package/packages/@monomind/cli/dist/src/commands/progress.js +16 -16
- package/packages/@monomind/cli/dist/src/commands/route.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/commands/route.js +23 -23
- package/packages/@monomind/cli/dist/src/commands/status.js +0 -3
- package/packages/@monomind/cli/dist/src/commands/swarm.js +2 -3
- package/packages/@monomind/cli/dist/src/config-adapter.js +27 -0
- package/packages/@monomind/cli/dist/src/consensus/audit-writer.d.ts +44 -17
- package/packages/@monomind/cli/dist/src/dlq/dlq-replayer.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/index.js +5 -5
- package/packages/@monomind/cli/dist/src/init/claudemd-generator.js +10 -14
- package/packages/@monomind/cli/dist/src/init/executor.js +17 -27
- package/packages/@monomind/cli/dist/src/init/helpers-generator.js +2 -2
- package/packages/@monomind/cli/dist/src/init/types.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/mcp-client.js +1 -7
- package/packages/@monomind/cli/dist/src/mcp-server.js +9 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/agent-tools.js +1 -52
- package/packages/@monomind/cli/dist/src/mcp-tools/analyze-tools.js +5 -5
- package/packages/@monomind/cli/dist/src/mcp-tools/browser-tools.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/browser-tools.js +6 -5
- package/packages/@monomind/cli/dist/src/mcp-tools/coordination-tools.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/coordination-tools.js +51 -54
- package/packages/@monomind/cli/dist/src/mcp-tools/daa-tools.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/embeddings-tools.js +10 -10
- package/packages/@monomind/cli/dist/src/mcp-tools/guidance-tools.js +0 -24
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-tools.js +189 -480
- package/packages/@monomind/cli/dist/src/mcp-tools/index.d.ts +0 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/index.js +0 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-compat.d.ts +334 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-compat.js +1108 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.js +76 -34
- package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.js +2 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/ruvllm-tools.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/ruvllm-tools.js +3 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/terminal-tools.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/terminal-tools.js +29 -19
- package/packages/@monomind/cli/dist/src/mcp-tools/wasm-agent-tools.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/wasm-agent-tools.js +2 -2
- package/packages/@monomind/cli/dist/src/memory/intelligence.js +14 -8
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.d.ts +17 -2
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +76 -23
- package/packages/@monomind/cli/dist/src/memory/memory-initializer.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/memory/memory-initializer.js +37 -39
- 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/monovector/command-outcomes.d.ts +37 -0
- package/packages/@monomind/cli/dist/src/monovector/command-outcomes.js +87 -0
- package/packages/@monomind/cli/dist/src/monovector/coverage-router.d.ts +103 -0
- package/packages/@monomind/cli/dist/src/monovector/coverage-router.js +337 -0
- package/packages/@monomind/cli/dist/src/monovector/coverage-tools.d.ts +14 -0
- package/packages/@monomind/cli/dist/src/monovector/coverage-tools.js +112 -0
- package/packages/@monomind/cli/dist/src/{ruvector → monovector}/diff-classifier.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/monovector/index.d.ts +61 -0
- package/packages/@monomind/cli/dist/src/monovector/index.js +67 -0
- package/packages/@monomind/cli/dist/src/monovector/init-state.d.ts +35 -0
- package/packages/@monomind/cli/dist/src/monovector/init-state.js +36 -0
- package/packages/@monomind/cli/dist/src/monovector/route-outcomes.d.ts +55 -0
- package/packages/@monomind/cli/dist/src/monovector/route-outcomes.js +137 -0
- package/packages/@monomind/cli/dist/src/parser.js +3 -3
- package/packages/@monomind/cli/dist/src/plugins/store/discovery.js +0 -31
- package/packages/@monomind/cli/dist/src/production/circuit-breaker.d.ts +26 -6
- package/packages/@monomind/cli/dist/src/production/error-handler.d.ts +55 -30
- package/packages/@monomind/cli/dist/src/production/index.d.ts +3 -20
- package/packages/@monomind/cli/dist/src/production/index.js +3 -15
- package/packages/@monomind/cli/dist/src/production/monitoring.d.ts +54 -34
- package/packages/@monomind/cli/dist/src/production/monitoring.js +12 -14
- package/packages/@monomind/cli/dist/src/production/rate-limiter.d.ts +64 -19
- package/packages/@monomind/cli/dist/src/production/rate-limiter.js +5 -5
- package/packages/@monomind/cli/dist/src/production/retry.js +4 -2
- package/packages/@monomind/cli/dist/src/services/claim-service.d.ts +50 -59
- package/packages/@monomind/cli/dist/src/services/claim-service.js +83 -50
- package/packages/@monomind/cli/dist/src/services/config-file-manager.js +8 -1
- package/packages/@monomind/cli/dist/src/services/worker-daemon.js +4 -0
- package/packages/@monomind/cli/dist/src/types.d.ts +13 -0
- package/packages/@monomind/cli/package.json +13 -13
- package/packages/@monomind/guidance/dist/index.d.ts +1 -1
- package/packages/@monomind/guidance/dist/index.js +1 -1
- package/packages/@monomind/guidance/package.json +1 -2
- package/scripts/build-monovector.sh +10 -0
- package/scripts/publish-monovector.sh +20 -0
- package/.claude/commands/monomind/adr.md +0 -11
- package/.claude/commands/monomind/budget.md +0 -7
- package/.claude/commands/monomind/createtask.md +0 -277
- package/.claude/commands/monomind/do.md +0 -498
- package/.claude/commands/monomind/graph-status.md +0 -7
- package/.claude/commands/monomind/help.md +0 -118
- package/.claude/commands/monomind/idea.md +0 -273
- package/.claude/commands/monomind/improve.md +0 -352
- package/.claude/commands/monomind/loops.md +0 -7
- package/.claude/commands/monomind/memory.md +0 -230
- package/.claude/commands/monomind/repeat.md +0 -257
- package/.claude/commands/monomind/review.md +0 -317
- package/.claude/commands/monomind/specialagents.md +0 -125
- package/.claude/commands/monomind/swarm.md +0 -161
- package/.claude/commands/monomind/understand.md +0 -139
- package/.claude/commands/training/README.md +0 -39
- package/.claude/commands/training/neural-patterns.md +0 -73
- package/.claude/commands/training/neural-train.md +0 -79
- package/packages/@monomind/cli/dist/src/commands/appliance-advanced.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/commands/appliance-advanced.js +0 -238
- package/packages/@monomind/cli/dist/src/commands/appliance.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/appliance.js +0 -406
- package/packages/@monomind/cli/dist/src/commands/ruvector/backup.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/ruvector/benchmark.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/ruvector/import.d.ts +0 -18
- package/packages/@monomind/cli/dist/src/commands/ruvector/init.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/ruvector/migrate.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/ruvector/setup.d.ts +0 -18
- package/packages/@monomind/cli/dist/src/ruvector/agent-wasm.d.ts +0 -182
- package/packages/@monomind/cli/dist/src/ruvector/agent-wasm.js +0 -316
- package/packages/@monomind/cli/dist/src/ruvector/ast-analyzer.d.ts +0 -67
- package/packages/@monomind/cli/dist/src/ruvector/ast-analyzer.js +0 -277
- package/packages/@monomind/cli/dist/src/ruvector/coverage-router.d.ts +0 -160
- package/packages/@monomind/cli/dist/src/ruvector/coverage-router.js +0 -539
- package/packages/@monomind/cli/dist/src/ruvector/coverage-tools.d.ts +0 -33
- package/packages/@monomind/cli/dist/src/ruvector/coverage-tools.js +0 -157
- package/packages/@monomind/cli/dist/src/ruvector/enhanced-model-router.d.ts +0 -146
- package/packages/@monomind/cli/dist/src/ruvector/enhanced-model-router.js +0 -551
- package/packages/@monomind/cli/dist/src/ruvector/flash-attention.d.ts +0 -195
- package/packages/@monomind/cli/dist/src/ruvector/flash-attention.js +0 -643
- package/packages/@monomind/cli/dist/src/ruvector/graph-analyzer.d.ts +0 -187
- package/packages/@monomind/cli/dist/src/ruvector/graph-analyzer.js +0 -929
- package/packages/@monomind/cli/dist/src/ruvector/index.d.ts +0 -67
- package/packages/@monomind/cli/dist/src/ruvector/index.js +0 -88
- package/packages/@monomind/cli/dist/src/ruvector/lora-adapter.d.ts +0 -218
- package/packages/@monomind/cli/dist/src/ruvector/lora-adapter.js +0 -455
- package/packages/@monomind/cli/dist/src/ruvector/model-router.d.ts +0 -222
- package/packages/@monomind/cli/dist/src/ruvector/model-router.js +0 -512
- package/packages/@monomind/cli/dist/src/ruvector/moe-router.d.ts +0 -213
- package/packages/@monomind/cli/dist/src/ruvector/moe-router.js +0 -649
- package/packages/@monomind/cli/dist/src/ruvector/q-learning-router.d.ts +0 -217
- package/packages/@monomind/cli/dist/src/ruvector/q-learning-router.js +0 -712
- package/packages/@monomind/cli/dist/src/ruvector/ruvllm-wasm.d.ts +0 -179
- package/packages/@monomind/cli/dist/src/ruvector/ruvllm-wasm.js +0 -363
- package/packages/@monomind/cli/dist/src/ruvector/semantic-router.d.ts +0 -77
- package/packages/@monomind/cli/dist/src/ruvector/semantic-router.js +0 -178
- package/packages/@monomind/cli/dist/src/ruvector/vector-db.d.ts +0 -69
- package/packages/@monomind/cli/dist/src/ruvector/vector-db.js +0 -243
- package/packages/@monomind/cli/dist/src/services/ruvector-training.d.ts +0 -222
- package/packages/@monomind/cli/dist/src/services/ruvector-training.js +0 -696
- /package/packages/@monomind/cli/dist/src/{ruvector → monovector}/diff-classifier.js +0 -0
|
@@ -1,406 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI Appliance Command
|
|
3
|
-
* Self-contained RVFA appliance management (build, inspect, verify, extract, run, sign, publish, update)
|
|
4
|
-
*/
|
|
5
|
-
import { output } from '../output.js';
|
|
6
|
-
import { signCommand, publishCommand, updateAppCommand } from './appliance-advanced.js';
|
|
7
|
-
function fmtSize(bytes) {
|
|
8
|
-
if (bytes < 1024)
|
|
9
|
-
return `${bytes} B`;
|
|
10
|
-
if (bytes < 1024 * 1024)
|
|
11
|
-
return `${(bytes / 1024).toFixed(1)} KB`;
|
|
12
|
-
if (bytes < 1024 * 1024 * 1024)
|
|
13
|
-
return `${(bytes / (1024 * 1024)).toFixed(1)} MB`;
|
|
14
|
-
return `${(bytes / (1024 * 1024 * 1024)).toFixed(2)} GB`;
|
|
15
|
-
}
|
|
16
|
-
function errMsg(err) {
|
|
17
|
-
return err instanceof Error ? err.message : String(err);
|
|
18
|
-
}
|
|
19
|
-
const fail = (msg, detail) => {
|
|
20
|
-
output.printError(msg, detail);
|
|
21
|
-
return { success: false, exitCode: 1 };
|
|
22
|
-
};
|
|
23
|
-
async function loadModule(path, exportName, label) {
|
|
24
|
-
try {
|
|
25
|
-
const mod = await import(path);
|
|
26
|
-
return mod[exportName];
|
|
27
|
-
}
|
|
28
|
-
catch {
|
|
29
|
-
output.printError(`RVFA ${label} module not found`, 'Install with: npm install @monoes/appliance');
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
async function requireFile(file) {
|
|
34
|
-
const fs = await import('fs');
|
|
35
|
-
if (!fs.existsSync(file)) {
|
|
36
|
-
output.printError(`File not found: ${file}`);
|
|
37
|
-
return false;
|
|
38
|
-
}
|
|
39
|
-
return true;
|
|
40
|
-
}
|
|
41
|
-
function header(title) {
|
|
42
|
-
output.writeln();
|
|
43
|
-
output.writeln(output.bold(title));
|
|
44
|
-
output.writeln(output.dim('─'.repeat(50)));
|
|
45
|
-
output.writeln();
|
|
46
|
-
}
|
|
47
|
-
async function runSteps(steps, delay = 300) {
|
|
48
|
-
for (const step of steps) {
|
|
49
|
-
const spinner = output.createSpinner({ text: step + '...', spinner: 'dots' });
|
|
50
|
-
spinner.start();
|
|
51
|
-
await new Promise(r => setTimeout(r, delay));
|
|
52
|
-
spinner.succeed(step);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
// BUILD
|
|
56
|
-
const buildCommand = {
|
|
57
|
-
name: 'build',
|
|
58
|
-
description: 'Build a self-contained monomind.rvf appliance',
|
|
59
|
-
options: [
|
|
60
|
-
{ name: 'profile', short: 'p', type: 'string', description: 'Build profile: cloud, hybrid, offline', default: 'cloud' },
|
|
61
|
-
{ name: 'output', short: 'o', type: 'string', description: 'Output file path', default: 'monomind.rvf' },
|
|
62
|
-
{ name: 'arch', type: 'string', description: 'Target architecture', default: 'x86_64' },
|
|
63
|
-
{ name: 'models', short: 'm', type: 'array', description: 'Models to include (offline/hybrid)' },
|
|
64
|
-
{ name: 'api-keys', type: 'string', description: 'Path to .env file for API key vault' },
|
|
65
|
-
{ name: 'verbose', short: 'v', type: 'boolean', description: 'Verbose output' },
|
|
66
|
-
],
|
|
67
|
-
action: async (ctx) => {
|
|
68
|
-
const profile = ctx.flags.profile || 'cloud';
|
|
69
|
-
const outputPath = ctx.flags.output || 'monomind.rvf';
|
|
70
|
-
const arch = ctx.flags.arch || 'x86_64';
|
|
71
|
-
const models = ctx.flags.models || [];
|
|
72
|
-
const apiKeysPath = ctx.flags['api-keys'];
|
|
73
|
-
header('RVFA Appliance Builder');
|
|
74
|
-
output.printInfo(`Profile: ${output.highlight(profile)}`);
|
|
75
|
-
output.printInfo(`Arch: ${arch}`);
|
|
76
|
-
output.printInfo(`Output: ${outputPath}`);
|
|
77
|
-
if (models.length > 0)
|
|
78
|
-
output.printInfo(`Models: ${models.join(', ')}`);
|
|
79
|
-
output.writeln();
|
|
80
|
-
const startTime = Date.now();
|
|
81
|
-
const RvfaBuilder = await loadModule('../appliance/rvfa-builder.js', 'RvfaBuilder', 'builder');
|
|
82
|
-
if (!RvfaBuilder)
|
|
83
|
-
return { success: false, exitCode: 1 };
|
|
84
|
-
const steps = [
|
|
85
|
-
'Collecting kernel artifacts', 'Bundling runtime environment',
|
|
86
|
-
'Packaging monomind CLI + MCP tools', 'Compressing sections',
|
|
87
|
-
'Computing SHA-256 checksums', 'Writing RVFA container',
|
|
88
|
-
];
|
|
89
|
-
if (profile !== 'cloud' && models.length > 0)
|
|
90
|
-
steps.splice(3, 0, 'Embedding model weights');
|
|
91
|
-
if (apiKeysPath)
|
|
92
|
-
steps.splice(steps.length - 1, 0, 'Sealing API key vault');
|
|
93
|
-
try {
|
|
94
|
-
const builder = new RvfaBuilder({ profile, outputPath, arch, models, apiKeysPath });
|
|
95
|
-
await runSteps(steps);
|
|
96
|
-
const result = await builder.build();
|
|
97
|
-
const duration = ((Date.now() - startTime) / 1000).toFixed(1);
|
|
98
|
-
if (result.sections?.length) {
|
|
99
|
-
output.writeln();
|
|
100
|
-
output.printTable({
|
|
101
|
-
columns: [
|
|
102
|
-
{ key: 'id', header: 'Section', width: 16 },
|
|
103
|
-
{ key: 'size', header: 'Size', width: 12, align: 'right' },
|
|
104
|
-
],
|
|
105
|
-
data: result.sections.map(s => ({ id: s.id, size: fmtSize(s.size) })),
|
|
106
|
-
});
|
|
107
|
-
}
|
|
108
|
-
output.writeln();
|
|
109
|
-
output.printSuccess(`Appliance written to ${output.bold(outputPath)}`);
|
|
110
|
-
output.printInfo(`Total size: ${output.bold(fmtSize(result.totalSize))} Duration: ${duration}s`);
|
|
111
|
-
return { success: true, data: result };
|
|
112
|
-
}
|
|
113
|
-
catch (err) {
|
|
114
|
-
return fail('Build failed', errMsg(err));
|
|
115
|
-
}
|
|
116
|
-
},
|
|
117
|
-
};
|
|
118
|
-
// INSPECT
|
|
119
|
-
const inspectCommand = {
|
|
120
|
-
name: 'inspect',
|
|
121
|
-
description: 'Show RVFA appliance header and section manifest',
|
|
122
|
-
options: [
|
|
123
|
-
{ name: 'file', short: 'f', type: 'string', description: 'Path to .rvf file', required: true },
|
|
124
|
-
{ name: 'json', type: 'boolean', description: 'Output as JSON' },
|
|
125
|
-
],
|
|
126
|
-
action: async (ctx) => {
|
|
127
|
-
const file = ctx.flags.file;
|
|
128
|
-
if (!file)
|
|
129
|
-
return fail('--file is required');
|
|
130
|
-
const RvfaReader = await loadModule('../appliance/rvfa-format.js', 'RvfaReader', 'format');
|
|
131
|
-
if (!RvfaReader)
|
|
132
|
-
return { success: false, exitCode: 1 };
|
|
133
|
-
if (!(await requireFile(file)))
|
|
134
|
-
return { success: false, exitCode: 1 };
|
|
135
|
-
try {
|
|
136
|
-
const reader = new RvfaReader(file);
|
|
137
|
-
const hdr = await reader.parse();
|
|
138
|
-
if (ctx.flags.json) {
|
|
139
|
-
output.printJson(hdr);
|
|
140
|
-
return { success: true, data: hdr };
|
|
141
|
-
}
|
|
142
|
-
header('RVFA Appliance');
|
|
143
|
-
for (const [label, value] of [
|
|
144
|
-
['Name', hdr.name || 'monomind'], ['Version', hdr.version || 'unknown'],
|
|
145
|
-
['Architecture', hdr.arch || 'x86_64'], ['Profile', hdr.profile || 'cloud'],
|
|
146
|
-
['Created', hdr.created || 'unknown'],
|
|
147
|
-
]) {
|
|
148
|
-
output.writeln(` ${output.bold(label.padEnd(16))}${value}`);
|
|
149
|
-
}
|
|
150
|
-
output.writeln();
|
|
151
|
-
output.writeln(output.bold('Sections'));
|
|
152
|
-
output.writeln(output.dim('─'.repeat(60)));
|
|
153
|
-
if (hdr.sections?.length) {
|
|
154
|
-
output.printTable({
|
|
155
|
-
columns: [
|
|
156
|
-
{ key: 'id', header: 'Section', width: 14 },
|
|
157
|
-
{ key: 'size', header: 'Packed', width: 12, align: 'right' },
|
|
158
|
-
{ key: 'original', header: 'Original', width: 12, align: 'right' },
|
|
159
|
-
{ key: 'compression', header: 'Compression', width: 12 },
|
|
160
|
-
{ key: 'sha256', header: 'SHA-256', width: 18 },
|
|
161
|
-
],
|
|
162
|
-
data: hdr.sections.map((s) => ({
|
|
163
|
-
id: s.id,
|
|
164
|
-
size: fmtSize(s.size),
|
|
165
|
-
original: fmtSize(s.originalSize ?? s.size),
|
|
166
|
-
compression: s.compression || 'none',
|
|
167
|
-
sha256: s.sha256 ? s.sha256.slice(0, 16) + '..' : output.dim('n/a'),
|
|
168
|
-
})),
|
|
169
|
-
});
|
|
170
|
-
}
|
|
171
|
-
else {
|
|
172
|
-
output.writeln(output.dim(' No sections found'));
|
|
173
|
-
}
|
|
174
|
-
const fs = await import('fs');
|
|
175
|
-
const stat = fs.statSync(file);
|
|
176
|
-
output.writeln();
|
|
177
|
-
output.printInfo(`Total file size: ${output.bold(fmtSize(stat.size))}`);
|
|
178
|
-
if (hdr.footerHash) {
|
|
179
|
-
output.printInfo(`Footer hash: ${output.dim(hdr.footerHash.slice(0, 32) + '..')}`);
|
|
180
|
-
}
|
|
181
|
-
return { success: true, data: hdr };
|
|
182
|
-
}
|
|
183
|
-
catch (err) {
|
|
184
|
-
return fail('Failed to inspect appliance', errMsg(err));
|
|
185
|
-
}
|
|
186
|
-
},
|
|
187
|
-
};
|
|
188
|
-
// VERIFY
|
|
189
|
-
const verifyCommand = {
|
|
190
|
-
name: 'verify',
|
|
191
|
-
description: 'Verify appliance integrity and run capability tests',
|
|
192
|
-
options: [
|
|
193
|
-
{ name: 'file', short: 'f', type: 'string', description: 'Path to .rvf file', required: true },
|
|
194
|
-
{ name: 'quick', short: 'q', type: 'boolean', description: 'Quick check (integrity only, skip capability tests)' },
|
|
195
|
-
],
|
|
196
|
-
action: async (ctx) => {
|
|
197
|
-
const file = ctx.flags.file;
|
|
198
|
-
const quick = ctx.flags.quick;
|
|
199
|
-
if (!file)
|
|
200
|
-
return fail('--file is required');
|
|
201
|
-
const RvfaReader = await loadModule('../appliance/rvfa-format.js', 'RvfaReader', 'format');
|
|
202
|
-
if (!RvfaReader)
|
|
203
|
-
return { success: false, exitCode: 1 };
|
|
204
|
-
if (!(await requireFile(file)))
|
|
205
|
-
return { success: false, exitCode: 1 };
|
|
206
|
-
try {
|
|
207
|
-
header('RVFA Verification');
|
|
208
|
-
const reader = new RvfaReader(file);
|
|
209
|
-
const hdr = await reader.parse();
|
|
210
|
-
// Section checksums
|
|
211
|
-
const s1 = output.createSpinner({ text: 'Verifying section checksums...', spinner: 'dots' });
|
|
212
|
-
s1.start();
|
|
213
|
-
const checksums = await reader.verifyChecksums();
|
|
214
|
-
const allValid = checksums.every(r => r.valid);
|
|
215
|
-
if (allValid) {
|
|
216
|
-
s1.succeed(`Section checksums: ${output.success('PASS')} (${checksums.length} sections)`);
|
|
217
|
-
}
|
|
218
|
-
else {
|
|
219
|
-
const bad = checksums.filter(r => !r.valid);
|
|
220
|
-
s1.fail(`Section checksums: ${output.error('FAIL')} (${bad.length} corrupted)`);
|
|
221
|
-
bad.forEach(f => output.writeln(` ${output.error('X')} ${f.section}`));
|
|
222
|
-
}
|
|
223
|
-
// Footer hash
|
|
224
|
-
const s2 = output.createSpinner({ text: 'Verifying footer hash...', spinner: 'dots' });
|
|
225
|
-
s2.start();
|
|
226
|
-
const footerOk = await reader.verifyFooter();
|
|
227
|
-
footerOk ? s2.succeed(`Footer hash: ${output.success('PASS')}`)
|
|
228
|
-
: s2.fail(`Footer hash: ${output.error('FAIL')}`);
|
|
229
|
-
// Capability tests
|
|
230
|
-
let capOk = true;
|
|
231
|
-
if (!quick && hdr.sections?.find((s) => s.id === 'verify')) {
|
|
232
|
-
const s3 = output.createSpinner({ text: 'Running capability tests...', spinner: 'dots' });
|
|
233
|
-
s3.start();
|
|
234
|
-
await new Promise(r => setTimeout(r, 500));
|
|
235
|
-
s3.succeed(`Capability tests: ${output.success('PASS')}`);
|
|
236
|
-
}
|
|
237
|
-
else if (quick) {
|
|
238
|
-
output.writeln(output.dim(' Skipped capability tests (--quick)'));
|
|
239
|
-
}
|
|
240
|
-
output.writeln();
|
|
241
|
-
const pass = allValid && footerOk && capOk;
|
|
242
|
-
pass ? output.printSuccess('Appliance verification passed')
|
|
243
|
-
: output.printError('Appliance verification failed');
|
|
244
|
-
return { success: pass, exitCode: pass ? 0 : 1 };
|
|
245
|
-
}
|
|
246
|
-
catch (err) {
|
|
247
|
-
return fail('Verification failed', errMsg(err));
|
|
248
|
-
}
|
|
249
|
-
},
|
|
250
|
-
};
|
|
251
|
-
// EXTRACT
|
|
252
|
-
const extractCommand = {
|
|
253
|
-
name: 'extract',
|
|
254
|
-
description: 'Extract all sections from an RVFA appliance',
|
|
255
|
-
options: [
|
|
256
|
-
{ name: 'file', short: 'f', type: 'string', description: 'Path to .rvf file', required: true },
|
|
257
|
-
{ name: 'output', short: 'o', type: 'string', description: 'Output directory', default: './rvfa-extracted' },
|
|
258
|
-
{ name: 'section', short: 's', type: 'string', description: 'Extract specific section only' },
|
|
259
|
-
],
|
|
260
|
-
action: async (ctx) => {
|
|
261
|
-
const file = ctx.flags.file;
|
|
262
|
-
const outputDir = ctx.flags.output || './rvfa-extracted';
|
|
263
|
-
const sectionFilter = ctx.flags.section;
|
|
264
|
-
if (!file)
|
|
265
|
-
return fail('--file is required');
|
|
266
|
-
const RvfaReader = await loadModule('../appliance/rvfa-format.js', 'RvfaReader', 'format');
|
|
267
|
-
if (!RvfaReader)
|
|
268
|
-
return { success: false, exitCode: 1 };
|
|
269
|
-
if (!(await requireFile(file)))
|
|
270
|
-
return { success: false, exitCode: 1 };
|
|
271
|
-
try {
|
|
272
|
-
const fs = await import('fs');
|
|
273
|
-
const path = await import('path');
|
|
274
|
-
header('RVFA Extraction');
|
|
275
|
-
const reader = new RvfaReader(file);
|
|
276
|
-
const hdr = await reader.parse();
|
|
277
|
-
const dest = path.resolve(outputDir);
|
|
278
|
-
if (!fs.existsSync(dest))
|
|
279
|
-
fs.mkdirSync(dest, { recursive: true });
|
|
280
|
-
output.printInfo(`Destination: ${dest}`);
|
|
281
|
-
output.writeln();
|
|
282
|
-
if (sectionFilter) {
|
|
283
|
-
if (!hdr.sections?.find((s) => s.id === sectionFilter)) {
|
|
284
|
-
output.printError(`Section not found: ${sectionFilter}`);
|
|
285
|
-
output.printInfo(`Available: ${(hdr.sections || []).map((s) => s.id).join(', ')}`);
|
|
286
|
-
return { success: false, exitCode: 1 };
|
|
287
|
-
}
|
|
288
|
-
const sp = output.createSpinner({ text: `Extracting ${sectionFilter}...`, spinner: 'dots' });
|
|
289
|
-
sp.start();
|
|
290
|
-
const r = await reader.extractSection(sectionFilter, dest);
|
|
291
|
-
sp.succeed(`${sectionFilter}: ${fmtSize(r.size)}`);
|
|
292
|
-
}
|
|
293
|
-
else {
|
|
294
|
-
const results = await reader.extractAll(dest);
|
|
295
|
-
for (const r of results) {
|
|
296
|
-
output.printSuccess(`${r.id.padEnd(14)} ${fmtSize(r.size).padStart(10)} -> ${r.path}`);
|
|
297
|
-
}
|
|
298
|
-
}
|
|
299
|
-
output.writeln();
|
|
300
|
-
output.printSuccess(`Extraction complete: ${dest}`);
|
|
301
|
-
output.writeln(output.dim(' Directory structure:'));
|
|
302
|
-
for (const d of ['kernel', 'runtime', 'monomind', 'models', 'data', 'verify']) {
|
|
303
|
-
const exists = fs.existsSync(path.join(dest, d));
|
|
304
|
-
output.writeln(` ${exists ? output.success('+') : output.dim('-')} ${d}/`);
|
|
305
|
-
}
|
|
306
|
-
return { success: true };
|
|
307
|
-
}
|
|
308
|
-
catch (err) {
|
|
309
|
-
return fail('Extraction failed', errMsg(err));
|
|
310
|
-
}
|
|
311
|
-
},
|
|
312
|
-
};
|
|
313
|
-
// RUN
|
|
314
|
-
const runCommand = {
|
|
315
|
-
name: 'run',
|
|
316
|
-
description: 'Boot and run an RVFA appliance',
|
|
317
|
-
options: [
|
|
318
|
-
{ name: 'file', short: 'f', type: 'string', description: 'Path to .rvf file', required: true },
|
|
319
|
-
{ name: 'mode', type: 'string', description: 'Run mode: cli, mcp, verify', default: 'cli' },
|
|
320
|
-
{ name: 'isolation', type: 'string', description: 'Isolation: container, native', default: 'native' },
|
|
321
|
-
],
|
|
322
|
-
action: async (ctx) => {
|
|
323
|
-
const file = ctx.flags.file;
|
|
324
|
-
const mode = ctx.flags.mode || 'cli';
|
|
325
|
-
const isolation = ctx.flags.isolation || 'native';
|
|
326
|
-
if (!file)
|
|
327
|
-
return fail('--file is required');
|
|
328
|
-
const RvfaRunner = await loadModule('../appliance/rvfa-runner.js', 'RvfaRunner', 'runner');
|
|
329
|
-
if (!RvfaRunner)
|
|
330
|
-
return { success: false, exitCode: 1 };
|
|
331
|
-
if (!(await requireFile(file)))
|
|
332
|
-
return { success: false, exitCode: 1 };
|
|
333
|
-
try {
|
|
334
|
-
header('RVFA Appliance Boot');
|
|
335
|
-
output.printInfo(`File: ${file}`);
|
|
336
|
-
output.printInfo(`Mode: ${mode}`);
|
|
337
|
-
output.printInfo(`Isolation: ${isolation}`);
|
|
338
|
-
output.writeln();
|
|
339
|
-
await runSteps([
|
|
340
|
-
'Loading RVFA container', 'Verifying integrity', 'Extracting kernel',
|
|
341
|
-
'Initializing runtime', `Starting ${mode} interface`,
|
|
342
|
-
], 250);
|
|
343
|
-
output.writeln();
|
|
344
|
-
const runner = new RvfaRunner({ file, mode, isolation });
|
|
345
|
-
const result = await runner.boot();
|
|
346
|
-
if (mode === 'mcp' && result.port)
|
|
347
|
-
output.printSuccess(`MCP server listening on port ${result.port}`);
|
|
348
|
-
else if (mode === 'verify')
|
|
349
|
-
output.printSuccess('Verification complete');
|
|
350
|
-
else
|
|
351
|
-
output.printSuccess('Appliance is running');
|
|
352
|
-
if (result.pid)
|
|
353
|
-
output.printInfo(`PID: ${result.pid}`);
|
|
354
|
-
return { success: true, data: result };
|
|
355
|
-
}
|
|
356
|
-
catch (err) {
|
|
357
|
-
return fail('Boot failed', errMsg(err));
|
|
358
|
-
}
|
|
359
|
-
},
|
|
360
|
-
};
|
|
361
|
-
// Main command
|
|
362
|
-
export const applianceCommand = {
|
|
363
|
-
name: 'appliance',
|
|
364
|
-
description: 'Self-contained RVFA appliance management (build, inspect, verify, extract, run)',
|
|
365
|
-
aliases: ['rvfa'],
|
|
366
|
-
subcommands: [buildCommand, inspectCommand, verifyCommand, extractCommand, runCommand, signCommand, publishCommand, updateAppCommand],
|
|
367
|
-
examples: [
|
|
368
|
-
{ command: 'monomind appliance build -p cloud', description: 'Build a cloud appliance' },
|
|
369
|
-
{ command: 'monomind appliance inspect -f monomind.rvf', description: 'Inspect appliance contents' },
|
|
370
|
-
{ command: 'monomind appliance verify -f monomind.rvf', description: 'Verify integrity' },
|
|
371
|
-
{ command: 'monomind appliance extract -f monomind.rvf', description: 'Extract sections' },
|
|
372
|
-
{ command: 'monomind appliance run -f monomind.rvf', description: 'Boot and run appliance' },
|
|
373
|
-
{ command: 'monomind appliance sign -f monomind.rvf --generate-keys', description: 'Generate keys and sign' },
|
|
374
|
-
{ command: 'monomind appliance publish -f monomind.rvf', description: 'Publish to IPFS via Pinata' },
|
|
375
|
-
{ command: 'monomind appliance update -f monomind.rvf -s monomind -d ./new-monomind.bin', description: 'Hot-patch a section' },
|
|
376
|
-
],
|
|
377
|
-
action: async () => {
|
|
378
|
-
output.writeln();
|
|
379
|
-
output.writeln(output.bold('Monomind Appliance (RVFA)'));
|
|
380
|
-
output.writeln(output.dim('Self-contained deployment format for the full Monomind platform.'));
|
|
381
|
-
output.writeln();
|
|
382
|
-
output.writeln('Subcommands:');
|
|
383
|
-
output.printList([
|
|
384
|
-
'build - Build a self-contained monomind.rvf appliance',
|
|
385
|
-
'inspect - Show appliance header and section manifest',
|
|
386
|
-
'verify - Verify appliance integrity and run capability tests',
|
|
387
|
-
'extract - Extract all sections from an appliance',
|
|
388
|
-
'run - Boot and run an RVFA appliance',
|
|
389
|
-
'sign - Sign an appliance with Ed25519 for tamper detection',
|
|
390
|
-
'publish - Publish an appliance to IPFS via Pinata',
|
|
391
|
-
'update - Hot-patch a section in an appliance',
|
|
392
|
-
]);
|
|
393
|
-
output.writeln();
|
|
394
|
-
output.writeln('Profiles:');
|
|
395
|
-
output.printList([
|
|
396
|
-
`${output.bold('cloud')} - API-only, smallest footprint (~15 MB)`,
|
|
397
|
-
`${output.bold('hybrid')} - API + local fallback models (~500 MB)`,
|
|
398
|
-
`${output.bold('offline')} - Fully air-gapped with bundled models (~4 GB)`,
|
|
399
|
-
]);
|
|
400
|
-
output.writeln();
|
|
401
|
-
output.writeln(output.dim('Use "monomind appliance <subcommand> --help" for details.'));
|
|
402
|
-
return { success: true };
|
|
403
|
-
},
|
|
404
|
-
};
|
|
405
|
-
export default applianceCommand;
|
|
406
|
-
//# sourceMappingURL=appliance.js.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI RuVector Backup Command
|
|
3
|
-
* Backup and restore for RuVector PostgreSQL data
|
|
4
|
-
*/
|
|
5
|
-
import type { Command } from '../../types.js';
|
|
6
|
-
/**
|
|
7
|
-
* RuVector backup main command
|
|
8
|
-
*/
|
|
9
|
-
export declare const backupCommand: Command;
|
|
10
|
-
export default backupCommand;
|
|
11
|
-
//# sourceMappingURL=backup.d.ts.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI RuVector Benchmark Command
|
|
3
|
-
* Performance benchmarking for RuVector PostgreSQL Bridge
|
|
4
|
-
*/
|
|
5
|
-
import type { Command } from '../../types.js';
|
|
6
|
-
/**
|
|
7
|
-
* RuVector benchmark command
|
|
8
|
-
*/
|
|
9
|
-
export declare const benchmarkCommand: Command;
|
|
10
|
-
export default benchmarkCommand;
|
|
11
|
-
//# sourceMappingURL=benchmark.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI RuVector Import Command
|
|
3
|
-
* Import data from sql.js/JSON memory to RuVector PostgreSQL
|
|
4
|
-
*
|
|
5
|
-
* Usage:
|
|
6
|
-
* npx monomind ruvector import --input memory-export.json
|
|
7
|
-
* npx monomind ruvector import --from-memory
|
|
8
|
-
* npx monomind ruvector import --input data.json --batch-size 100
|
|
9
|
-
*
|
|
10
|
-
* https://github.com/nokhodian/monomind
|
|
11
|
-
*/
|
|
12
|
-
import type { Command } from '../../types.js';
|
|
13
|
-
/**
|
|
14
|
-
* RuVector Import command - import from sql.js/JSON to PostgreSQL
|
|
15
|
-
*/
|
|
16
|
-
export declare const importCommand: Command;
|
|
17
|
-
export default importCommand;
|
|
18
|
-
//# sourceMappingURL=import.d.ts.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI RuVector Init Command
|
|
3
|
-
* Initialize RuVector PostgreSQL Bridge
|
|
4
|
-
*/
|
|
5
|
-
import type { Command } from '../../types.js';
|
|
6
|
-
/**
|
|
7
|
-
* Initialize RuVector in PostgreSQL
|
|
8
|
-
*/
|
|
9
|
-
export declare const initCommand: Command;
|
|
10
|
-
export default initCommand;
|
|
11
|
-
//# sourceMappingURL=init.d.ts.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI RuVector Migrate Command
|
|
3
|
-
* Database migration management for RuVector
|
|
4
|
-
*/
|
|
5
|
-
import type { Command } from '../../types.js';
|
|
6
|
-
/**
|
|
7
|
-
* RuVector migrate command
|
|
8
|
-
*/
|
|
9
|
-
export declare const migrateCommand: Command;
|
|
10
|
-
export default migrateCommand;
|
|
11
|
-
//# sourceMappingURL=migrate.d.ts.map
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* CLI RuVector Setup Command
|
|
3
|
-
* Outputs Docker files and SQL for easy RuVector PostgreSQL setup
|
|
4
|
-
*
|
|
5
|
-
* Usage:
|
|
6
|
-
* npx monomind ruvector setup # Output to ./ruvector-postgres/
|
|
7
|
-
* npx monomind ruvector setup --output /path/to/dir
|
|
8
|
-
* npx monomind ruvector setup --print # Print to stdout only
|
|
9
|
-
*
|
|
10
|
-
* https://github.com/nokhodian/monomind
|
|
11
|
-
*/
|
|
12
|
-
import type { Command } from '../../types.js';
|
|
13
|
-
/**
|
|
14
|
-
* RuVector Setup command - outputs Docker files and SQL
|
|
15
|
-
*/
|
|
16
|
-
export declare const setupCommand: Command;
|
|
17
|
-
export default setupCommand;
|
|
18
|
-
//# sourceMappingURL=setup.d.ts.map
|
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* RuVector Agent WASM Integration
|
|
3
|
-
*
|
|
4
|
-
* Wraps @ruvector/rvagent-wasm for sandboxed AI agent execution.
|
|
5
|
-
* Provides WasmAgent lifecycle, gallery templates, RVF container building,
|
|
6
|
-
* and MCP server bridge — all running in WASM without OS access.
|
|
7
|
-
*
|
|
8
|
-
* Published API (v0.1.0): WasmAgent, WasmGallery, WasmMcpServer,
|
|
9
|
-
* WasmRvfBuilder, JsModelProvider, initSync.
|
|
10
|
-
*
|
|
11
|
-
* @module @monomind/cli/ruvector/agent-wasm
|
|
12
|
-
*/
|
|
13
|
-
export interface WasmAgentConfig {
|
|
14
|
-
model?: string;
|
|
15
|
-
instructions?: string;
|
|
16
|
-
maxTurns?: number;
|
|
17
|
-
}
|
|
18
|
-
export interface WasmAgentInfo {
|
|
19
|
-
id: string;
|
|
20
|
-
state: 'idle' | 'running' | 'error';
|
|
21
|
-
config: WasmAgentConfig;
|
|
22
|
-
model: string;
|
|
23
|
-
turnCount: number;
|
|
24
|
-
fileCount: number;
|
|
25
|
-
isStopped: boolean;
|
|
26
|
-
createdAt: string;
|
|
27
|
-
}
|
|
28
|
-
export interface GalleryTemplate {
|
|
29
|
-
id: string;
|
|
30
|
-
name: string;
|
|
31
|
-
description: string;
|
|
32
|
-
category: string;
|
|
33
|
-
tags: string[];
|
|
34
|
-
version: string;
|
|
35
|
-
author: string;
|
|
36
|
-
builtin: boolean;
|
|
37
|
-
}
|
|
38
|
-
export interface GalleryTemplateDetail extends GalleryTemplate {
|
|
39
|
-
tools: Array<{
|
|
40
|
-
name: string;
|
|
41
|
-
description: string;
|
|
42
|
-
parameters: unknown[];
|
|
43
|
-
returns: string;
|
|
44
|
-
}>;
|
|
45
|
-
prompts: Array<{
|
|
46
|
-
name: string;
|
|
47
|
-
system_prompt: string;
|
|
48
|
-
version: string;
|
|
49
|
-
}>;
|
|
50
|
-
skills: Array<{
|
|
51
|
-
name: string;
|
|
52
|
-
description: string;
|
|
53
|
-
trigger: string;
|
|
54
|
-
content: string;
|
|
55
|
-
}>;
|
|
56
|
-
mcp_tools: Array<{
|
|
57
|
-
name: string;
|
|
58
|
-
description: string;
|
|
59
|
-
input_schema: unknown;
|
|
60
|
-
group: string;
|
|
61
|
-
}>;
|
|
62
|
-
capabilities: Array<{
|
|
63
|
-
name: string;
|
|
64
|
-
rights: string[];
|
|
65
|
-
scope: string;
|
|
66
|
-
delegation_depth: number;
|
|
67
|
-
}>;
|
|
68
|
-
}
|
|
69
|
-
export interface ToolResult {
|
|
70
|
-
success: boolean;
|
|
71
|
-
output: string;
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Check if @ruvector/rvagent-wasm is installed and loadable.
|
|
75
|
-
*/
|
|
76
|
-
export declare function isAgentWasmAvailable(): Promise<boolean>;
|
|
77
|
-
/**
|
|
78
|
-
* Initialize the WASM module for Node.js. Safe to call multiple times.
|
|
79
|
-
* Uses initSync with file-loaded WASM bytes (browser fetch doesn't work in Node).
|
|
80
|
-
*/
|
|
81
|
-
export declare function initAgentWasm(): Promise<void>;
|
|
82
|
-
/**
|
|
83
|
-
* Create a new sandboxed WASM agent.
|
|
84
|
-
*/
|
|
85
|
-
export declare function createWasmAgent(config?: WasmAgentConfig): Promise<WasmAgentInfo>;
|
|
86
|
-
/**
|
|
87
|
-
* Send a prompt to a WASM agent. Requires a model provider to be set.
|
|
88
|
-
*/
|
|
89
|
-
export declare function promptWasmAgent(agentId: string, input: string): Promise<string>;
|
|
90
|
-
export declare function executeWasmTool(agentId: string, toolCall: Record<string, unknown>): Promise<ToolResult>;
|
|
91
|
-
/**
|
|
92
|
-
* Get agent info.
|
|
93
|
-
*/
|
|
94
|
-
export declare function getWasmAgent(agentId: string): WasmAgentInfo | null;
|
|
95
|
-
/**
|
|
96
|
-
* List all active WASM agents.
|
|
97
|
-
*/
|
|
98
|
-
export declare function listWasmAgents(): WasmAgentInfo[];
|
|
99
|
-
/**
|
|
100
|
-
* Terminate a WASM agent and free resources.
|
|
101
|
-
*/
|
|
102
|
-
export declare function terminateWasmAgent(agentId: string): boolean;
|
|
103
|
-
/**
|
|
104
|
-
* Get agent state (messages, turn count, etc.)
|
|
105
|
-
*/
|
|
106
|
-
export declare function getWasmAgentState(agentId: string): unknown;
|
|
107
|
-
/**
|
|
108
|
-
* Get agent tools list.
|
|
109
|
-
*/
|
|
110
|
-
export declare function getWasmAgentTools(agentId: string): string[];
|
|
111
|
-
/**
|
|
112
|
-
* Get agent todos.
|
|
113
|
-
*/
|
|
114
|
-
export declare function getWasmAgentTodos(agentId: string): unknown[];
|
|
115
|
-
/**
|
|
116
|
-
* Export the full agent state as JSON (for persistence).
|
|
117
|
-
*/
|
|
118
|
-
export declare function exportWasmState(agentId: string): string;
|
|
119
|
-
/**
|
|
120
|
-
* Create a WASM-based MCP server for an agent.
|
|
121
|
-
* Returns a handler function for JSON-RPC requests.
|
|
122
|
-
*
|
|
123
|
-
* Note: WasmMcpServer may have stability issues in v0.1.0 for
|
|
124
|
-
* certain agent configurations. Use with a fully configured agent.
|
|
125
|
-
*/
|
|
126
|
-
export declare function createWasmMcpServer(agentId: string): Promise<(jsonRpc: string) => Promise<string>>;
|
|
127
|
-
/**
|
|
128
|
-
* List all available gallery templates.
|
|
129
|
-
* Returns objects directly (Gallery.list() returns parsed objects in v0.1.0).
|
|
130
|
-
*/
|
|
131
|
-
export declare function listGalleryTemplates(): Promise<GalleryTemplate[]>;
|
|
132
|
-
/**
|
|
133
|
-
* Get gallery template count.
|
|
134
|
-
*/
|
|
135
|
-
export declare function getGalleryCount(): Promise<number>;
|
|
136
|
-
/**
|
|
137
|
-
* Get gallery categories with counts.
|
|
138
|
-
*/
|
|
139
|
-
export declare function getGalleryCategories(): Promise<Record<string, number>>;
|
|
140
|
-
/**
|
|
141
|
-
* Search gallery templates by query. Returns results with relevance scores.
|
|
142
|
-
*/
|
|
143
|
-
export declare function searchGalleryTemplates(query: string): Promise<Array<GalleryTemplate & {
|
|
144
|
-
relevance: number;
|
|
145
|
-
}>>;
|
|
146
|
-
/**
|
|
147
|
-
* Get a gallery template by id.
|
|
148
|
-
* Wraps in try/catch because WasmGallery.get() panics on unknown IDs in v0.1.0.
|
|
149
|
-
*/
|
|
150
|
-
export declare function getGalleryTemplate(id: string): Promise<GalleryTemplateDetail | null>;
|
|
151
|
-
/**
|
|
152
|
-
* Create an agent from a gallery template.
|
|
153
|
-
*/
|
|
154
|
-
export declare function createAgentFromTemplate(templateId: string): Promise<WasmAgentInfo>;
|
|
155
|
-
/**
|
|
156
|
-
* Build an RVF container with prompts, tools, and skills.
|
|
157
|
-
* Uses the high-level RVF builder API (addPrompt, addTool, addSkill).
|
|
158
|
-
*/
|
|
159
|
-
export declare function buildRvfContainer(opts: {
|
|
160
|
-
prompts?: Array<{
|
|
161
|
-
name: string;
|
|
162
|
-
system_prompt: string;
|
|
163
|
-
version: string;
|
|
164
|
-
}>;
|
|
165
|
-
tools?: Array<{
|
|
166
|
-
name: string;
|
|
167
|
-
description: string;
|
|
168
|
-
parameters: unknown[];
|
|
169
|
-
returns: string;
|
|
170
|
-
}>;
|
|
171
|
-
skills?: Array<{
|
|
172
|
-
name: string;
|
|
173
|
-
description: string;
|
|
174
|
-
trigger: string;
|
|
175
|
-
content: string;
|
|
176
|
-
}>;
|
|
177
|
-
}): Promise<Uint8Array>;
|
|
178
|
-
/**
|
|
179
|
-
* Build an RVF container from a gallery template.
|
|
180
|
-
*/
|
|
181
|
-
export declare function buildRvfFromTemplate(templateId: string): Promise<Uint8Array>;
|
|
182
|
-
//# sourceMappingURL=agent-wasm.d.ts.map
|