monomind 1.11.12 → 1.11.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (222) hide show
  1. package/.claude/commands/mastermind/idea.md +1 -1
  2. package/.claude/commands/mastermind/master.md +1 -1
  3. package/.claude/skills/mastermind/_protocol.md +4 -4
  4. package/.claude/skills/mastermind/build.md +3 -3
  5. package/.claude/skills/mastermind/content.md +3 -3
  6. package/.claude/skills/mastermind/createorg.md +2 -2
  7. package/.claude/skills/mastermind/finance.md +3 -3
  8. package/.claude/skills/mastermind/marketing.md +3 -3
  9. package/.claude/skills/mastermind/ops.md +3 -3
  10. package/.claude/skills/mastermind/release.md +3 -3
  11. package/.claude/skills/mastermind/research.md +3 -3
  12. package/.claude/skills/mastermind/review.md +3 -3
  13. package/.claude/skills/mastermind/sales.md +3 -3
  14. package/package.json +1 -1
  15. package/packages/@monomind/cli/dist/src/init/statusline-generator.js +3 -3
  16. package/packages/@monomind/cli/dist/src/observability/replay-reader.d.ts +1 -1
  17. package/packages/@monomind/cli/dist/src/update/checker.js +24 -7
  18. package/packages/@monomind/cli/dist/src/update/index.js +3 -6
  19. package/packages/@monomind/cli/package.json +1 -1
  20. package/packages/@monomind/cli/dist/src/agents/halt-signal.d.ts +0 -25
  21. package/packages/@monomind/cli/dist/src/agents/halt-signal.js +0 -76
  22. package/packages/@monomind/cli/dist/src/agents/index.d.ts +0 -18
  23. package/packages/@monomind/cli/dist/src/agents/index.js +0 -13
  24. package/packages/@monomind/cli/dist/src/agents/managed-agent.d.ts +0 -41
  25. package/packages/@monomind/cli/dist/src/agents/managed-agent.js +0 -69
  26. package/packages/@monomind/cli/dist/src/agents/prompt-experiment.d.ts +0 -23
  27. package/packages/@monomind/cli/dist/src/agents/prompt-experiment.js +0 -49
  28. package/packages/@monomind/cli/dist/src/agents/prompt-version-manager.d.ts +0 -22
  29. package/packages/@monomind/cli/dist/src/agents/prompt-version-manager.js +0 -80
  30. package/packages/@monomind/cli/dist/src/agents/registry-query.d.ts +0 -71
  31. package/packages/@monomind/cli/dist/src/agents/registry-query.js +0 -125
  32. package/packages/@monomind/cli/dist/src/agents/score-decay.d.ts +0 -19
  33. package/packages/@monomind/cli/dist/src/agents/score-decay.js +0 -22
  34. package/packages/@monomind/cli/dist/src/agents/shared-instructions-loader.d.ts +0 -13
  35. package/packages/@monomind/cli/dist/src/agents/shared-instructions-loader.js +0 -40
  36. package/packages/@monomind/cli/dist/src/agents/specialization-scorer.d.ts +0 -54
  37. package/packages/@monomind/cli/dist/src/agents/specialization-scorer.js +0 -212
  38. package/packages/@monomind/cli/dist/src/agents/termination-watcher.d.ts +0 -30
  39. package/packages/@monomind/cli/dist/src/agents/termination-watcher.js +0 -84
  40. package/packages/@monomind/cli/dist/src/agents/trigger-index.d.ts +0 -20
  41. package/packages/@monomind/cli/dist/src/agents/trigger-index.js +0 -38
  42. package/packages/@monomind/cli/dist/src/agents/trigger-scanner.d.ts +0 -64
  43. package/packages/@monomind/cli/dist/src/agents/trigger-scanner.js +0 -308
  44. package/packages/@monomind/cli/dist/src/agents/version-diff.d.ts +0 -18
  45. package/packages/@monomind/cli/dist/src/agents/version-diff.js +0 -64
  46. package/packages/@monomind/cli/dist/src/agents/version-store.d.ts +0 -60
  47. package/packages/@monomind/cli/dist/src/agents/version-store.js +0 -235
  48. package/packages/@monomind/cli/dist/src/benchmarks/pretrain/index.d.ts +0 -45
  49. package/packages/@monomind/cli/dist/src/benchmarks/pretrain/index.js +0 -404
  50. package/packages/@monomind/cli/dist/src/commands/agent-wasm.d.ts +0 -14
  51. package/packages/@monomind/cli/dist/src/commands/agent-wasm.js +0 -333
  52. package/packages/@monomind/cli/dist/src/commands/ui.js +0 -68
  53. package/packages/@monomind/cli/dist/src/consensus/index.d.ts +0 -7
  54. package/packages/@monomind/cli/dist/src/consensus/index.js +0 -6
  55. package/packages/@monomind/cli/dist/src/context/context-provider.d.ts +0 -44
  56. package/packages/@monomind/cli/dist/src/context/context-provider.js +0 -25
  57. package/packages/@monomind/cli/dist/src/context/git-state-provider.d.ts +0 -12
  58. package/packages/@monomind/cli/dist/src/context/git-state-provider.js +0 -34
  59. package/packages/@monomind/cli/dist/src/context/index.d.ts +0 -12
  60. package/packages/@monomind/cli/dist/src/context/index.js +0 -12
  61. package/packages/@monomind/cli/dist/src/context/project-conventions-provider.d.ts +0 -15
  62. package/packages/@monomind/cli/dist/src/context/project-conventions-provider.js +0 -19
  63. package/packages/@monomind/cli/dist/src/context/prompt-assembler.d.ts +0 -26
  64. package/packages/@monomind/cli/dist/src/context/prompt-assembler.js +0 -93
  65. package/packages/@monomind/cli/dist/src/context/task-history-provider.d.ts +0 -24
  66. package/packages/@monomind/cli/dist/src/context/task-history-provider.js +0 -32
  67. package/packages/@monomind/cli/dist/src/context/user-preferences-provider.d.ts +0 -14
  68. package/packages/@monomind/cli/dist/src/context/user-preferences-provider.js +0 -27
  69. package/packages/@monomind/cli/dist/src/dlq/dlq-reader.d.ts +0 -31
  70. package/packages/@monomind/cli/dist/src/dlq/dlq-reader.js +0 -81
  71. package/packages/@monomind/cli/dist/src/dlq/dlq-writer.d.ts +0 -24
  72. package/packages/@monomind/cli/dist/src/dlq/dlq-writer.js +0 -65
  73. package/packages/@monomind/cli/dist/src/dlq/index.d.ts +0 -10
  74. package/packages/@monomind/cli/dist/src/dlq/index.js +0 -7
  75. package/packages/@monomind/cli/dist/src/eval/dataset-manager.d.ts +0 -33
  76. package/packages/@monomind/cli/dist/src/eval/dataset-manager.js +0 -107
  77. package/packages/@monomind/cli/dist/src/eval/dataset-runner.d.ts +0 -23
  78. package/packages/@monomind/cli/dist/src/eval/dataset-runner.js +0 -59
  79. package/packages/@monomind/cli/dist/src/eval/index.d.ts +0 -10
  80. package/packages/@monomind/cli/dist/src/eval/index.js +0 -7
  81. package/packages/@monomind/cli/dist/src/eval/trace-collector.d.ts +0 -40
  82. package/packages/@monomind/cli/dist/src/eval/trace-collector.js +0 -102
  83. package/packages/@monomind/cli/dist/src/infrastructure/in-memory-repositories.d.ts +0 -68
  84. package/packages/@monomind/cli/dist/src/infrastructure/in-memory-repositories.js +0 -264
  85. package/packages/@monomind/cli/dist/src/interactive/interrupt.d.ts +0 -22
  86. package/packages/@monomind/cli/dist/src/interactive/interrupt.js +0 -71
  87. package/packages/@monomind/cli/dist/src/mcp/deprecation-injector.d.ts +0 -25
  88. package/packages/@monomind/cli/dist/src/mcp/deprecation-injector.js +0 -48
  89. package/packages/@monomind/cli/dist/src/mcp/tool-registry.d.ts +0 -61
  90. package/packages/@monomind/cli/dist/src/mcp/tool-registry.js +0 -246
  91. package/packages/@monomind/cli/dist/src/mcp-tools/wasm-agent-tools.d.ts +0 -9
  92. package/packages/@monomind/cli/dist/src/mcp-tools/wasm-agent-tools.js +0 -230
  93. package/packages/@monomind/cli/dist/src/model/complexity-scorer.d.ts +0 -21
  94. package/packages/@monomind/cli/dist/src/model/complexity-scorer.js +0 -106
  95. package/packages/@monomind/cli/dist/src/model/index.d.ts +0 -4
  96. package/packages/@monomind/cli/dist/src/model/index.js +0 -4
  97. package/packages/@monomind/cli/dist/src/model/model-settings.d.ts +0 -22
  98. package/packages/@monomind/cli/dist/src/model/model-settings.js +0 -33
  99. package/packages/@monomind/cli/dist/src/model/model-tier-resolver.d.ts +0 -24
  100. package/packages/@monomind/cli/dist/src/model/model-tier-resolver.js +0 -65
  101. package/packages/@monomind/cli/dist/src/monovector/capabilities.d.ts +0 -34
  102. package/packages/@monomind/cli/dist/src/monovector/capabilities.js +0 -37
  103. package/packages/@monomind/cli/dist/src/orchestration/index.d.ts +0 -7
  104. package/packages/@monomind/cli/dist/src/orchestration/index.js +0 -6
  105. package/packages/@monomind/cli/dist/src/orchestration/mode-dispatcher.d.ts +0 -11
  106. package/packages/@monomind/cli/dist/src/orchestration/mode-dispatcher.js +0 -31
  107. package/packages/@monomind/cli/dist/src/orchestration/routing-modes.d.ts +0 -68
  108. package/packages/@monomind/cli/dist/src/orchestration/routing-modes.js +0 -180
  109. package/packages/@monomind/cli/dist/src/plugins/tests/demo-plugin-store.d.ts +0 -7
  110. package/packages/@monomind/cli/dist/src/plugins/tests/demo-plugin-store.js +0 -126
  111. package/packages/@monomind/cli/dist/src/plugins/tests/standalone-test.d.ts +0 -12
  112. package/packages/@monomind/cli/dist/src/plugins/tests/standalone-test.js +0 -188
  113. package/packages/@monomind/cli/dist/src/plugins/tests/test-plugin-store.d.ts +0 -7
  114. package/packages/@monomind/cli/dist/src/plugins/tests/test-plugin-store.js +0 -206
  115. package/packages/@monomind/cli/dist/src/runtime/headless.d.ts +0 -60
  116. package/packages/@monomind/cli/dist/src/runtime/headless.js +0 -284
  117. package/packages/@monomind/cli/dist/src/services/agentic-flow-bridge.d.ts +0 -50
  118. package/packages/@monomind/cli/dist/src/services/agentic-flow-bridge.js +0 -95
  119. package/packages/@monomind/cli/dist/src/services/container-worker-pool.d.ts +0 -197
  120. package/packages/@monomind/cli/dist/src/services/container-worker-pool.js +0 -623
  121. package/packages/@monomind/cli/dist/src/services/index.d.ts +0 -13
  122. package/packages/@monomind/cli/dist/src/services/index.js +0 -11
  123. package/packages/@monomind/cli/dist/src/services/worker-queue.d.ts +0 -201
  124. package/packages/@monomind/cli/dist/src/services/worker-queue.js +0 -594
  125. package/packages/@monomind/cli/dist/src/swarm/communication-graph.d.ts +0 -25
  126. package/packages/@monomind/cli/dist/src/swarm/communication-graph.js +0 -77
  127. package/packages/@monomind/cli/dist/src/swarm/flow-enforcer.d.ts +0 -31
  128. package/packages/@monomind/cli/dist/src/swarm/flow-enforcer.js +0 -61
  129. package/packages/@monomind/cli/dist/src/swarm/flow-visualizer.d.ts +0 -19
  130. package/packages/@monomind/cli/dist/src/swarm/flow-visualizer.js +0 -68
  131. package/packages/@monomind/cli/dist/src/transfer/deploy-seraphine.d.ts +0 -13
  132. package/packages/@monomind/cli/dist/src/transfer/deploy-seraphine.js +0 -205
  133. package/packages/@monomind/cli/dist/src/transfer/store/tests/standalone-test.d.ts +0 -12
  134. package/packages/@monomind/cli/dist/src/transfer/store/tests/standalone-test.js +0 -190
  135. package/packages/@monomind/cli/dist/src/transfer/test-seraphine.d.ts +0 -6
  136. package/packages/@monomind/cli/dist/src/transfer/test-seraphine.js +0 -105
  137. package/packages/@monomind/cli/dist/src/transfer/tests/test-store.d.ts +0 -7
  138. package/packages/@monomind/cli/dist/src/transfer/tests/test-store.js +0 -214
  139. package/packages/@monomind/cli/dist/src/workflow/condition-evaluator.d.ts +0 -10
  140. package/packages/@monomind/cli/dist/src/workflow/condition-evaluator.js +0 -82
  141. package/packages/@monomind/cli/dist/src/workflow/context-resolver.d.ts +0 -12
  142. package/packages/@monomind/cli/dist/src/workflow/context-resolver.js +0 -23
  143. package/packages/@monomind/cli/dist/src/workflow/dag-builder.d.ts +0 -17
  144. package/packages/@monomind/cli/dist/src/workflow/dag-builder.js +0 -129
  145. package/packages/@monomind/cli/dist/src/workflow/dag-executor.d.ts +0 -9
  146. package/packages/@monomind/cli/dist/src/workflow/dag-executor.js +0 -116
  147. package/packages/@monomind/cli/dist/src/workflow/dag-types.d.ts +0 -41
  148. package/packages/@monomind/cli/dist/src/workflow/dag-types.js +0 -8
  149. package/packages/@monomind/cli/dist/src/workflow/dsl-parser.d.ts +0 -12
  150. package/packages/@monomind/cli/dist/src/workflow/dsl-parser.js +0 -20
  151. package/packages/@monomind/cli/dist/src/workflow/dsl-schema.d.ts +0 -165
  152. package/packages/@monomind/cli/dist/src/workflow/dsl-schema.js +0 -82
  153. package/packages/@monomind/cli/dist/src/workflow/index.d.ts +0 -13
  154. package/packages/@monomind/cli/dist/src/workflow/index.js +0 -11
  155. package/packages/@monomind/cli/dist/src/workflow/template-engine.d.ts +0 -11
  156. package/packages/@monomind/cli/dist/src/workflow/template-engine.js +0 -40
  157. package/packages/@monomind/cli/dist/src/workflow/workflow-executor.d.ts +0 -29
  158. package/packages/@monomind/cli/dist/src/workflow/workflow-executor.js +0 -227
  159. package/packages/@monomind/guidance/dist/adversarial.d.ts +0 -284
  160. package/packages/@monomind/guidance/dist/adversarial.js +0 -572
  161. package/packages/@monomind/guidance/dist/analyzer.d.ts +0 -530
  162. package/packages/@monomind/guidance/dist/analyzer.js +0 -2518
  163. package/packages/@monomind/guidance/dist/artifacts.d.ts +0 -283
  164. package/packages/@monomind/guidance/dist/artifacts.js +0 -356
  165. package/packages/@monomind/guidance/dist/authority.d.ts +0 -290
  166. package/packages/@monomind/guidance/dist/authority.js +0 -558
  167. package/packages/@monomind/guidance/dist/capabilities.d.ts +0 -209
  168. package/packages/@monomind/guidance/dist/capabilities.js +0 -485
  169. package/packages/@monomind/guidance/dist/coherence.d.ts +0 -233
  170. package/packages/@monomind/guidance/dist/coherence.js +0 -372
  171. package/packages/@monomind/guidance/dist/compiler.d.ts +0 -87
  172. package/packages/@monomind/guidance/dist/compiler.js +0 -419
  173. package/packages/@monomind/guidance/dist/conformance-kit.d.ts +0 -225
  174. package/packages/@monomind/guidance/dist/conformance-kit.js +0 -629
  175. package/packages/@monomind/guidance/dist/continue-gate.d.ts +0 -214
  176. package/packages/@monomind/guidance/dist/continue-gate.js +0 -353
  177. package/packages/@monomind/guidance/dist/crypto-utils.d.ts +0 -17
  178. package/packages/@monomind/guidance/dist/crypto-utils.js +0 -24
  179. package/packages/@monomind/guidance/dist/evolution.d.ts +0 -282
  180. package/packages/@monomind/guidance/dist/evolution.js +0 -500
  181. package/packages/@monomind/guidance/dist/gates.d.ts +0 -79
  182. package/packages/@monomind/guidance/dist/gates.js +0 -302
  183. package/packages/@monomind/guidance/dist/gateway.d.ts +0 -206
  184. package/packages/@monomind/guidance/dist/gateway.js +0 -452
  185. package/packages/@monomind/guidance/dist/generators.d.ts +0 -153
  186. package/packages/@monomind/guidance/dist/generators.js +0 -682
  187. package/packages/@monomind/guidance/dist/headless.d.ts +0 -177
  188. package/packages/@monomind/guidance/dist/headless.js +0 -342
  189. package/packages/@monomind/guidance/dist/hooks.d.ts +0 -109
  190. package/packages/@monomind/guidance/dist/hooks.js +0 -347
  191. package/packages/@monomind/guidance/dist/index.d.ts +0 -205
  192. package/packages/@monomind/guidance/dist/index.js +0 -321
  193. package/packages/@monomind/guidance/dist/ledger.d.ts +0 -162
  194. package/packages/@monomind/guidance/dist/ledger.js +0 -375
  195. package/packages/@monomind/guidance/dist/manifest-validator.d.ts +0 -289
  196. package/packages/@monomind/guidance/dist/manifest-validator.js +0 -838
  197. package/packages/@monomind/guidance/dist/memory-gate.d.ts +0 -222
  198. package/packages/@monomind/guidance/dist/memory-gate.js +0 -382
  199. package/packages/@monomind/guidance/dist/meta-governance.d.ts +0 -265
  200. package/packages/@monomind/guidance/dist/meta-governance.js +0 -348
  201. package/packages/@monomind/guidance/dist/optimizer.d.ts +0 -104
  202. package/packages/@monomind/guidance/dist/optimizer.js +0 -329
  203. package/packages/@monomind/guidance/dist/persistence.d.ts +0 -189
  204. package/packages/@monomind/guidance/dist/persistence.js +0 -464
  205. package/packages/@monomind/guidance/dist/proof.d.ts +0 -185
  206. package/packages/@monomind/guidance/dist/proof.js +0 -238
  207. package/packages/@monomind/guidance/dist/retriever.d.ts +0 -116
  208. package/packages/@monomind/guidance/dist/retriever.js +0 -394
  209. package/packages/@monomind/guidance/dist/ruvbot-integration.d.ts +0 -370
  210. package/packages/@monomind/guidance/dist/ruvbot-integration.js +0 -738
  211. package/packages/@monomind/guidance/dist/temporal.d.ts +0 -426
  212. package/packages/@monomind/guidance/dist/temporal.js +0 -658
  213. package/packages/@monomind/guidance/dist/trust.d.ts +0 -283
  214. package/packages/@monomind/guidance/dist/trust.js +0 -473
  215. package/packages/@monomind/guidance/dist/truth-anchors.d.ts +0 -276
  216. package/packages/@monomind/guidance/dist/truth-anchors.js +0 -488
  217. package/packages/@monomind/guidance/dist/types.d.ts +0 -378
  218. package/packages/@monomind/guidance/dist/types.js +0 -10
  219. package/packages/@monomind/guidance/dist/uncertainty.d.ts +0 -372
  220. package/packages/@monomind/guidance/dist/uncertainty.js +0 -619
  221. package/packages/@monomind/guidance/dist/wasm-kernel.d.ts +0 -48
  222. package/packages/@monomind/guidance/dist/wasm-kernel.js +0 -158
@@ -1,333 +0,0 @@
1
- /**
2
- * WASM Agent CLI Subcommands
3
- *
4
- * Exposes @monoes/rvagent-wasm operations via the `agent` CLI command.
5
- * Wraps functions from monovector/agent-wasm.ts for CLI usage.
6
- */
7
- import { output } from '../output.js';
8
- const WASM_NOT_AVAILABLE_MSG = '@monoes/rvagent-wasm is not installed.\n' +
9
- 'Install it with: npm install @monoes/rvagent-wasm';
10
- async function loadWasm() {
11
- const mod = await import('../monovector/agent-wasm.js');
12
- return mod;
13
- }
14
- // agent wasm-status
15
- export const wasmStatusCommand = {
16
- name: 'wasm-status',
17
- description: 'Check rvagent-wasm availability, version, and capabilities',
18
- options: [],
19
- examples: [
20
- { command: 'monomind agent wasm-status', description: 'Check WASM agent runtime status' },
21
- ],
22
- action: async (ctx) => {
23
- try {
24
- const wasm = await loadWasm();
25
- const available = await wasm.isAgentWasmAvailable();
26
- if (!available) {
27
- output.writeln();
28
- output.printWarning(WASM_NOT_AVAILABLE_MSG);
29
- if (ctx.flags.format === 'json') {
30
- output.printJson({ available: false });
31
- }
32
- return { success: true, data: { available: false } };
33
- }
34
- // Init to get full status
35
- await wasm.initAgentWasm();
36
- const agents = wasm.listWasmAgents();
37
- let galleryCount = 0;
38
- let categories = {};
39
- try {
40
- galleryCount = await wasm.getGalleryCount();
41
- categories = await wasm.getGalleryCategories();
42
- }
43
- catch {
44
- // Gallery may not be available in all builds
45
- }
46
- const statusData = {
47
- available: true,
48
- activeAgents: agents.length,
49
- gallery: {
50
- templates: galleryCount,
51
- categories,
52
- },
53
- tools: ['read_file', 'write_file', 'edit_file', 'write_todos', 'list_files'],
54
- features: ['sandboxed-execution', 'virtual-filesystem', 'gallery-templates', 'rvf-containers', 'mcp-bridge'],
55
- };
56
- if (ctx.flags.format === 'json') {
57
- output.printJson(statusData);
58
- return { success: true, data: statusData };
59
- }
60
- output.writeln();
61
- output.writeln(output.bold('WASM Agent Runtime'));
62
- output.writeln();
63
- output.printTable({
64
- columns: [
65
- { key: 'property', header: 'Property', width: 20 },
66
- { key: 'value', header: 'Value', width: 40 },
67
- ],
68
- data: [
69
- { property: 'Available', value: output.success('yes') },
70
- { property: 'Active Agents', value: String(agents.length) },
71
- { property: 'Gallery Templates', value: String(galleryCount) },
72
- { property: 'Sandbox Tools', value: statusData.tools.join(', ') },
73
- { property: 'Features', value: statusData.features.join(', ') },
74
- ],
75
- });
76
- if (Object.keys(categories).length > 0) {
77
- output.writeln();
78
- output.writeln(output.bold('Gallery Categories'));
79
- output.printTable({
80
- columns: [
81
- { key: 'category', header: 'Category', width: 20 },
82
- { key: 'count', header: 'Templates', width: 10, align: 'right' },
83
- ],
84
- data: Object.entries(categories).map(([category, count]) => ({ category, count })),
85
- });
86
- }
87
- return { success: true, data: statusData };
88
- }
89
- catch (error) {
90
- output.printError(`WASM status check failed: ${String(error)}`);
91
- return { success: false, exitCode: 1 };
92
- }
93
- },
94
- };
95
- // agent wasm-create
96
- export const wasmCreateCommand = {
97
- name: 'wasm-create',
98
- description: 'Create a WASM-sandboxed agent',
99
- options: [
100
- {
101
- name: 'template',
102
- short: 't',
103
- description: 'Gallery template (coder, researcher, tester, reviewer, security, swarm)',
104
- type: 'string',
105
- },
106
- {
107
- name: 'model',
108
- short: 'm',
109
- description: 'Model identifier (default: anthropic:claude-sonnet-4-20250514)',
110
- type: 'string',
111
- },
112
- {
113
- name: 'instructions',
114
- short: 'i',
115
- description: 'System instructions for the agent',
116
- type: 'string',
117
- },
118
- {
119
- name: 'max-turns',
120
- description: 'Maximum conversation turns (default: 50)',
121
- type: 'number',
122
- default: 50,
123
- },
124
- ],
125
- examples: [
126
- { command: 'monomind agent wasm-create', description: 'Create a default WASM agent' },
127
- { command: 'monomind agent wasm-create -t coder', description: 'Create from gallery template' },
128
- { command: 'monomind agent wasm-create -m "anthropic:claude-sonnet-4-20250514" -i "You are a security auditor"', description: 'Create with custom config' },
129
- ],
130
- action: async (ctx) => {
131
- try {
132
- const wasm = await loadWasm();
133
- const available = await wasm.isAgentWasmAvailable();
134
- if (!available) {
135
- output.printError(WASM_NOT_AVAILABLE_MSG);
136
- return { success: false, exitCode: 1 };
137
- }
138
- const template = ctx.flags.template;
139
- let info;
140
- if (template) {
141
- output.printInfo(`Creating WASM agent from template: ${output.highlight(template)}`);
142
- info = await wasm.createAgentFromTemplate(template);
143
- }
144
- else {
145
- output.printInfo('Creating WASM agent...');
146
- info = await wasm.createWasmAgent({
147
- model: ctx.flags.model,
148
- instructions: ctx.flags.instructions,
149
- maxTurns: ctx.flags['max-turns'],
150
- });
151
- }
152
- if (ctx.flags.format === 'json') {
153
- output.printJson({ success: true, agent: info, source: template ? 'gallery' : 'custom' });
154
- return { success: true, data: info };
155
- }
156
- output.writeln();
157
- output.printTable({
158
- columns: [
159
- { key: 'property', header: 'Property', width: 15 },
160
- { key: 'value', header: 'Value', width: 45 },
161
- ],
162
- data: [
163
- { property: 'ID', value: info.id },
164
- { property: 'State', value: info.state },
165
- { property: 'Model', value: info.model },
166
- { property: 'Turn Count', value: String(info.turnCount) },
167
- { property: 'File Count', value: String(info.fileCount) },
168
- { property: 'Created', value: info.createdAt },
169
- ...(template ? [{ property: 'Template', value: template }] : []),
170
- ],
171
- });
172
- output.writeln();
173
- output.printSuccess(`WASM agent created: ${info.id}`);
174
- return { success: true, data: info };
175
- }
176
- catch (error) {
177
- output.printError(`Failed to create WASM agent: ${String(error)}`);
178
- return { success: false, exitCode: 1 };
179
- }
180
- },
181
- };
182
- // agent wasm-prompt
183
- export const wasmPromptCommand = {
184
- name: 'wasm-prompt',
185
- description: 'Send a prompt to a WASM agent',
186
- options: [
187
- {
188
- name: 'agent-id',
189
- short: 'a',
190
- description: 'WASM agent ID (required)',
191
- type: 'string',
192
- },
193
- {
194
- name: 'input',
195
- short: 'i',
196
- description: 'Prompt text to send',
197
- type: 'string',
198
- },
199
- ],
200
- examples: [
201
- { command: 'monomind agent wasm-prompt -a wasm-agent-1-abc -i "Write a hello world"', description: 'Send prompt to WASM agent' },
202
- ],
203
- action: async (ctx) => {
204
- const agentId = ctx.flags['agent-id'] || ctx.args[0];
205
- const promptInput = ctx.flags.input || ctx.args[1];
206
- if (!agentId) {
207
- output.printError('Agent ID is required. Use --agent-id or -a');
208
- return { success: false, exitCode: 1 };
209
- }
210
- if (!promptInput) {
211
- output.printError('Prompt input is required. Use --input or -i');
212
- return { success: false, exitCode: 1 };
213
- }
214
- try {
215
- const wasm = await loadWasm();
216
- const available = await wasm.isAgentWasmAvailable();
217
- if (!available) {
218
- output.printError(WASM_NOT_AVAILABLE_MSG);
219
- return { success: false, exitCode: 1 };
220
- }
221
- output.printInfo(`Sending prompt to ${output.highlight(agentId)}...`);
222
- const result = await wasm.promptWasmAgent(agentId, promptInput);
223
- if (ctx.flags.format === 'json') {
224
- output.printJson({ agentId, response: result });
225
- return { success: true, data: { agentId, response: result } };
226
- }
227
- output.writeln();
228
- output.writeln(output.bold('Response'));
229
- output.writeln();
230
- output.writeln(result);
231
- // Show updated agent info
232
- const info = wasm.getWasmAgent(agentId);
233
- if (info) {
234
- output.writeln();
235
- output.writeln(output.dim(`[turns: ${info.turnCount}, files: ${info.fileCount}, state: ${info.state}]`));
236
- }
237
- return { success: true, data: { agentId, response: result } };
238
- }
239
- catch (error) {
240
- output.printError(`Prompt failed: ${String(error)}`);
241
- return { success: false, exitCode: 1 };
242
- }
243
- },
244
- };
245
- // agent wasm-gallery
246
- export const wasmGalleryCommand = {
247
- name: 'wasm-gallery',
248
- description: 'List available WASM agent gallery templates',
249
- options: [
250
- {
251
- name: 'search',
252
- short: 's',
253
- description: 'Search templates by query',
254
- type: 'string',
255
- },
256
- {
257
- name: 'category',
258
- short: 'c',
259
- description: 'Filter by category',
260
- type: 'string',
261
- },
262
- ],
263
- examples: [
264
- { command: 'monomind agent wasm-gallery', description: 'List all gallery templates' },
265
- { command: 'monomind agent wasm-gallery -s coder', description: 'Search gallery templates' },
266
- ],
267
- action: async (ctx) => {
268
- try {
269
- const wasm = await loadWasm();
270
- const available = await wasm.isAgentWasmAvailable();
271
- if (!available) {
272
- output.printError(WASM_NOT_AVAILABLE_MSG);
273
- return { success: false, exitCode: 1 };
274
- }
275
- const searchQuery = ctx.flags.search;
276
- const category = ctx.flags.category;
277
- let templates;
278
- if (searchQuery) {
279
- output.printInfo(`Searching gallery for: ${output.highlight(searchQuery)}`);
280
- templates = await wasm.searchGalleryTemplates(searchQuery);
281
- }
282
- else {
283
- templates = await wasm.listGalleryTemplates();
284
- }
285
- // Filter by category if specified
286
- if (category) {
287
- templates = templates.filter((t) => t.category.toLowerCase() === category.toLowerCase());
288
- }
289
- if (ctx.flags.format === 'json') {
290
- output.printJson({ templates, count: templates.length });
291
- return { success: true, data: { templates, count: templates.length } };
292
- }
293
- output.writeln();
294
- output.writeln(output.bold('WASM Agent Gallery'));
295
- output.writeln();
296
- if (templates.length === 0) {
297
- output.printInfo('No templates found matching criteria');
298
- return { success: true, data: { templates: [], count: 0 } };
299
- }
300
- output.printTable({
301
- columns: [
302
- { key: 'id', header: 'ID', width: 20 },
303
- { key: 'name', header: 'Name', width: 18 },
304
- { key: 'category', header: 'Category', width: 12 },
305
- { key: 'description', header: 'Description', width: 35 },
306
- { key: 'version', header: 'Version', width: 10 },
307
- ],
308
- data: templates.map((t) => ({
309
- id: t.id,
310
- name: t.name,
311
- category: t.category,
312
- description: t.description.length > 35 ? t.description.slice(0, 32) + '...' : t.description,
313
- version: t.version,
314
- })),
315
- });
316
- output.writeln();
317
- output.printInfo(`${templates.length} template(s) found. Create with: agent wasm-create -t <id>`);
318
- return { success: true, data: { templates, count: templates.length } };
319
- }
320
- catch (error) {
321
- output.printError(`Gallery listing failed: ${String(error)}`);
322
- return { success: false, exitCode: 1 };
323
- }
324
- },
325
- };
326
- /** All WASM subcommands for the agent command */
327
- export const wasmSubcommands = [
328
- wasmStatusCommand,
329
- wasmCreateCommand,
330
- wasmPromptCommand,
331
- wasmGalleryCommand,
332
- ];
333
- //# sourceMappingURL=agent-wasm.js.map
@@ -1,68 +0,0 @@
1
- /**
2
- * monomind ui — Live dashboard command
3
- * Starts a local HTTP server serving the Neural Control Room dashboard.
4
- */
5
- import * as path from 'path';
6
- import * as os from 'os';
7
-
8
- export const uiCommand = {
9
- name: 'ui',
10
- description: 'Start the live Monomind dashboard (Neural Control Room)',
11
- category: 'core',
12
- async action(ctx) {
13
- return this.execute(ctx.args || [], ctx.flags || {});
14
- },
15
- async execute(args = [], options = {}) {
16
- const port = parseInt(options.port || options.p || '4242', 10);
17
- const noOpen = options['no-open'] || options['no-browser'] || false;
18
- const projectDir = options.dir || process.env.CLAUDE_PROJECT_DIR || process.cwd();
19
-
20
- console.log('\x1b[36m◆ Monomind Neural Control Room\x1b[0m');
21
- console.log('\x1b[2mStarting dashboard server...\x1b[0m\n');
22
-
23
- try {
24
- const { fileURLToPath } = await import('url');
25
- const { dirname } = await import('path');
26
- const { createRequire } = await import('module');
27
- const serverPath = new URL('../ui/server.mjs', import.meta.url);
28
- const { startServer } = await import(serverPath.href);
29
-
30
- const result = await startServer({
31
- port,
32
- projectDir,
33
- openBrowser: !noOpen,
34
- });
35
-
36
- console.log(`\x1b[32m✓ Dashboard running at \x1b[1m${result.url}\x1b[0m`);
37
- console.log(`\x1b[2m Project: ${projectDir}\x1b[0m`);
38
- console.log(`\x1b[2m Press Ctrl+C to stop\x1b[0m\n`);
39
-
40
- // Keep alive
41
- await new Promise((resolve) => {
42
- process.on('SIGINT', resolve);
43
- process.on('SIGTERM', resolve);
44
- });
45
- } catch (err) {
46
- console.error(`\x1b[31m✗ Failed to start dashboard: ${err.message}\x1b[0m`);
47
- if (process.env.DEBUG) console.error(err.stack);
48
- process.exit(1);
49
- }
50
- },
51
- help() {
52
- return `
53
- \x1b[1mUsage:\x1b[0m monomind ui [options]
54
-
55
- \x1b[1mOptions:\x1b[0m
56
- --port, -p <number> Port to listen on (default: 4242)
57
- --no-open Don't open browser automatically
58
- --dir <path> Project directory to monitor (default: cwd)
59
-
60
- \x1b[1mExamples:\x1b[0m
61
- monomind ui
62
- monomind ui --port 8080
63
- monomind ui --no-open --dir /path/to/project
64
- `.trim();
65
- },
66
- };
67
-
68
- export default uiCommand;
@@ -1,7 +0,0 @@
1
- /**
2
- * Consensus module barrel export (Task 36)
3
- */
4
- export { deriveSigningKey, signVote, verifyVote } from './vote-signer.js';
5
- export { AuditWriter } from './audit-writer.js';
6
- export type { RecordInput } from './audit-writer.js';
7
- //# sourceMappingURL=index.d.ts.map
@@ -1,6 +0,0 @@
1
- /**
2
- * Consensus module barrel export (Task 36)
3
- */
4
- export { deriveSigningKey, signVote, verifyVote } from './vote-signer.js';
5
- export { AuditWriter } from './audit-writer.js';
6
- //# sourceMappingURL=index.js.map
@@ -1,44 +0,0 @@
1
- /**
2
- * Context Provider — interfaces and base class for dynamic prompt assembly.
3
- *
4
- * Each provider contributes a named section of context to the assembled prompt.
5
- * Providers are prioritised (0-100) and budget-aware via token estimation.
6
- */
7
- export interface RunContext {
8
- agentSlug: string;
9
- taskDescription: string;
10
- sessionId: string;
11
- swarmId?: string;
12
- workingDir?: string;
13
- metadata: Record<string, unknown>;
14
- }
15
- export interface ContextSection {
16
- name: string;
17
- content: string;
18
- tokenCount: number;
19
- priority: number;
20
- required: boolean;
21
- }
22
- export interface ContextProvider {
23
- readonly name: string;
24
- readonly priority: number;
25
- readonly maxTokens: number;
26
- readonly required: boolean;
27
- provide(ctx: RunContext): Promise<string>;
28
- }
29
- /**
30
- * Convenience base class that implements the ContextProvider contract and
31
- * supplies a rough token-truncation helper (approx 4 chars per token).
32
- */
33
- export declare abstract class BaseContextProvider implements ContextProvider {
34
- abstract readonly name: string;
35
- abstract readonly priority: number;
36
- readonly maxTokens: number;
37
- readonly required: boolean;
38
- /**
39
- * Truncate `text` so that it fits within `maxTokens` (4 chars/token).
40
- */
41
- protected truncateToTokens(text: string, maxTokens: number): string;
42
- abstract provide(ctx: RunContext): Promise<string>;
43
- }
44
- //# sourceMappingURL=context-provider.d.ts.map
@@ -1,25 +0,0 @@
1
- /**
2
- * Context Provider — interfaces and base class for dynamic prompt assembly.
3
- *
4
- * Each provider contributes a named section of context to the assembled prompt.
5
- * Providers are prioritised (0-100) and budget-aware via token estimation.
6
- */
7
- /**
8
- * Convenience base class that implements the ContextProvider contract and
9
- * supplies a rough token-truncation helper (approx 4 chars per token).
10
- */
11
- export class BaseContextProvider {
12
- maxTokens = 500;
13
- required = false;
14
- /**
15
- * Truncate `text` so that it fits within `maxTokens` (4 chars/token).
16
- */
17
- truncateToTokens(text, maxTokens) {
18
- const maxChars = maxTokens * 4;
19
- if (text.length <= maxChars) {
20
- return text;
21
- }
22
- return text.slice(0, maxChars);
23
- }
24
- }
25
- //# sourceMappingURL=context-provider.js.map
@@ -1,12 +0,0 @@
1
- /**
2
- * GitStateProvider — injects current git branch, recent log, and changed files
3
- * into the assembled prompt. Falls back gracefully when not inside a git repo.
4
- */
5
- import { BaseContextProvider, type RunContext } from './context-provider.js';
6
- export declare class GitStateProvider extends BaseContextProvider {
7
- readonly name: "git-state";
8
- readonly priority = 60;
9
- readonly maxTokens = 300;
10
- provide(ctx: RunContext): Promise<string>;
11
- }
12
- //# sourceMappingURL=git-state-provider.d.ts.map
@@ -1,34 +0,0 @@
1
- /**
2
- * GitStateProvider — injects current git branch, recent log, and changed files
3
- * into the assembled prompt. Falls back gracefully when not inside a git repo.
4
- */
5
- import { execSync } from 'child_process';
6
- import { BaseContextProvider } from './context-provider.js';
7
- export class GitStateProvider extends BaseContextProvider {
8
- name = 'git-state';
9
- priority = 60;
10
- maxTokens = 300;
11
- async provide(ctx) {
12
- try {
13
- const cwd = ctx.workingDir ?? process.cwd();
14
- const opts = { cwd, encoding: 'utf-8', timeout: 5000 };
15
- const branch = execSync('git branch --show-current', opts).trim();
16
- const log = execSync('git log --oneline -5', opts).trim();
17
- const changed = execSync('git diff --name-only HEAD', opts).trim();
18
- const parts = [
19
- `**Branch:** ${branch}`,
20
- '',
21
- '**Recent commits:**',
22
- log,
23
- ];
24
- if (changed) {
25
- parts.push('', '**Changed files:**', changed);
26
- }
27
- return this.truncateToTokens(parts.join('\n'), this.maxTokens);
28
- }
29
- catch {
30
- return 'Git state unavailable (not a git repository or git not installed).';
31
- }
32
- }
33
- }
34
- //# sourceMappingURL=git-state-provider.js.map
@@ -1,12 +0,0 @@
1
- /**
2
- * Context module — dynamic system prompt assembly.
3
- *
4
- * Re-exports all context providers and the prompt assembler.
5
- */
6
- export { type RunContext, type ContextSection, type ContextProvider, BaseContextProvider, } from './context-provider.js';
7
- export { GitStateProvider } from './git-state-provider.js';
8
- export { TaskHistoryProvider, type SearchFn, type SearchResult, } from './task-history-provider.js';
9
- export { ProjectConventionsProvider, type ConventionsLoader, } from './project-conventions-provider.js';
10
- export { UserPreferencesProvider, type PreferencesGetter, } from './user-preferences-provider.js';
11
- export { PromptAssembler, type AssemblyConfig, type AssembledPrompt, } from './prompt-assembler.js';
12
- //# sourceMappingURL=index.d.ts.map
@@ -1,12 +0,0 @@
1
- /**
2
- * Context module — dynamic system prompt assembly.
3
- *
4
- * Re-exports all context providers and the prompt assembler.
5
- */
6
- export { BaseContextProvider, } from './context-provider.js';
7
- export { GitStateProvider } from './git-state-provider.js';
8
- export { TaskHistoryProvider, } from './task-history-provider.js';
9
- export { ProjectConventionsProvider, } from './project-conventions-provider.js';
10
- export { UserPreferencesProvider, } from './user-preferences-provider.js';
11
- export { PromptAssembler, } from './prompt-assembler.js';
12
- //# sourceMappingURL=index.js.map
@@ -1,15 +0,0 @@
1
- /**
2
- * ProjectConventionsProvider — loads project-level conventions (e.g. from
3
- * CLAUDE.md or a config file) and injects them as a required context section.
4
- */
5
- import { BaseContextProvider, type RunContext } from './context-provider.js';
6
- export type ConventionsLoader = () => string;
7
- export declare class ProjectConventionsProvider extends BaseContextProvider {
8
- private readonly loader;
9
- readonly name: "project-conventions";
10
- readonly priority = 100;
11
- readonly required = true;
12
- constructor(loader: ConventionsLoader);
13
- provide(_ctx: RunContext): Promise<string>;
14
- }
15
- //# sourceMappingURL=project-conventions-provider.d.ts.map
@@ -1,19 +0,0 @@
1
- /**
2
- * ProjectConventionsProvider — loads project-level conventions (e.g. from
3
- * CLAUDE.md or a config file) and injects them as a required context section.
4
- */
5
- import { BaseContextProvider } from './context-provider.js';
6
- export class ProjectConventionsProvider extends BaseContextProvider {
7
- loader;
8
- name = 'project-conventions';
9
- priority = 100;
10
- required = true;
11
- constructor(loader) {
12
- super();
13
- this.loader = loader;
14
- }
15
- async provide(_ctx) {
16
- return this.loader();
17
- }
18
- }
19
- //# sourceMappingURL=project-conventions-provider.js.map
@@ -1,26 +0,0 @@
1
- /**
2
- * PromptAssembler — collects context sections from multiple providers,
3
- * prioritises them within a token budget, and concatenates the result
4
- * with the base prompt.
5
- */
6
- import type { ContextProvider, RunContext } from './context-provider.js';
7
- export interface AssemblyConfig {
8
- maxTotalTokens?: number;
9
- basePromptTokens: number;
10
- providers: ContextProvider[];
11
- }
12
- export interface AssembledPrompt {
13
- content: string;
14
- sectionsIncluded: string[];
15
- sectionsTruncated: string[];
16
- sectionsDropped: string[];
17
- totalTokenEstimate: number;
18
- }
19
- export declare class PromptAssembler {
20
- private readonly maxTotalTokens;
21
- private readonly basePromptTokens;
22
- private readonly providers;
23
- constructor(config: AssemblyConfig);
24
- assemble(basePrompt: string, ctx: RunContext): Promise<AssembledPrompt>;
25
- }
26
- //# sourceMappingURL=prompt-assembler.d.ts.map