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.
Files changed (231) hide show
  1. package/.claude/commands/mastermind/idea.md +1 -1
  2. package/.claude/commands/mastermind/master.md +1 -1
  3. package/.claude/scheduled_tasks.lock +1 -1
  4. package/.claude/skills/mastermind/_protocol.md +4 -4
  5. package/.claude/skills/mastermind/architect.md +4 -7
  6. package/.claude/skills/mastermind/autodev.md +2 -4
  7. package/.claude/skills/mastermind/build.md +3 -3
  8. package/.claude/skills/mastermind/content.md +3 -3
  9. package/.claude/skills/mastermind/createorg.md +2 -2
  10. package/.claude/skills/mastermind/finance.md +3 -3
  11. package/.claude/skills/mastermind/idea.md +0 -8
  12. package/.claude/skills/mastermind/marketing.md +3 -3
  13. package/.claude/skills/mastermind/monitor.md +2 -2
  14. package/.claude/skills/mastermind/ops.md +3 -3
  15. package/.claude/skills/mastermind/release.md +3 -3
  16. package/.claude/skills/mastermind/research.md +3 -3
  17. package/.claude/skills/mastermind/review.md +3 -3
  18. package/.claude/skills/mastermind/sales.md +3 -3
  19. package/README.md +286 -129
  20. package/package.json +2 -2
  21. package/packages/@monomind/cli/README.md +286 -129
  22. package/packages/@monomind/cli/bundled-graph/dist/src/build.js +73 -0
  23. package/packages/@monomind/cli/bundled-graph/dist/src/cluster.js +120 -0
  24. package/packages/@monomind/cli/bundled-graph/package.json +57 -0
  25. package/packages/@monomind/cli/dist/src/agents/halt-signal.d.ts +25 -0
  26. package/packages/@monomind/cli/dist/src/agents/halt-signal.js +76 -0
  27. package/packages/@monomind/cli/dist/src/agents/index.d.ts +18 -0
  28. package/packages/@monomind/cli/dist/src/agents/index.js +13 -0
  29. package/packages/@monomind/cli/dist/src/agents/managed-agent.d.ts +41 -0
  30. package/packages/@monomind/cli/dist/src/agents/managed-agent.js +69 -0
  31. package/packages/@monomind/cli/dist/src/agents/prompt-experiment.d.ts +23 -0
  32. package/packages/@monomind/cli/dist/src/agents/prompt-experiment.js +49 -0
  33. package/packages/@monomind/cli/dist/src/agents/prompt-version-manager.d.ts +22 -0
  34. package/packages/@monomind/cli/dist/src/agents/prompt-version-manager.js +80 -0
  35. package/packages/@monomind/cli/dist/src/agents/registry-query.d.ts +71 -0
  36. package/packages/@monomind/cli/dist/src/agents/registry-query.js +125 -0
  37. package/packages/@monomind/cli/dist/src/agents/score-decay.d.ts +19 -0
  38. package/packages/@monomind/cli/dist/src/agents/score-decay.js +22 -0
  39. package/packages/@monomind/cli/dist/src/agents/shared-instructions-loader.d.ts +13 -0
  40. package/packages/@monomind/cli/dist/src/agents/shared-instructions-loader.js +40 -0
  41. package/packages/@monomind/cli/dist/src/agents/specialization-scorer.d.ts +54 -0
  42. package/packages/@monomind/cli/dist/src/agents/specialization-scorer.js +212 -0
  43. package/packages/@monomind/cli/dist/src/agents/termination-watcher.d.ts +30 -0
  44. package/packages/@monomind/cli/dist/src/agents/termination-watcher.js +84 -0
  45. package/packages/@monomind/cli/dist/src/agents/trigger-index.d.ts +20 -0
  46. package/packages/@monomind/cli/dist/src/agents/trigger-index.js +38 -0
  47. package/packages/@monomind/cli/dist/src/agents/trigger-scanner.d.ts +64 -0
  48. package/packages/@monomind/cli/dist/src/agents/trigger-scanner.js +308 -0
  49. package/packages/@monomind/cli/dist/src/agents/version-diff.d.ts +18 -0
  50. package/packages/@monomind/cli/dist/src/agents/version-diff.js +64 -0
  51. package/packages/@monomind/cli/dist/src/agents/version-store.d.ts +60 -0
  52. package/packages/@monomind/cli/dist/src/agents/version-store.js +235 -0
  53. package/packages/@monomind/cli/dist/src/benchmarks/pretrain/index.d.ts +45 -0
  54. package/packages/@monomind/cli/dist/src/benchmarks/pretrain/index.js +404 -0
  55. package/packages/@monomind/cli/dist/src/commands/agent-wasm.d.ts +14 -0
  56. package/packages/@monomind/cli/dist/src/commands/agent-wasm.js +333 -0
  57. package/packages/@monomind/cli/dist/src/commands/doctor.js +55 -1
  58. package/packages/@monomind/cli/dist/src/commands/ui.js +68 -0
  59. package/packages/@monomind/cli/dist/src/consensus/index.d.ts +7 -0
  60. package/packages/@monomind/cli/dist/src/consensus/index.js +6 -0
  61. package/packages/@monomind/cli/dist/src/context/context-provider.d.ts +44 -0
  62. package/packages/@monomind/cli/dist/src/context/context-provider.js +25 -0
  63. package/packages/@monomind/cli/dist/src/context/git-state-provider.d.ts +12 -0
  64. package/packages/@monomind/cli/dist/src/context/git-state-provider.js +34 -0
  65. package/packages/@monomind/cli/dist/src/context/index.d.ts +12 -0
  66. package/packages/@monomind/cli/dist/src/context/index.js +12 -0
  67. package/packages/@monomind/cli/dist/src/context/project-conventions-provider.d.ts +15 -0
  68. package/packages/@monomind/cli/dist/src/context/project-conventions-provider.js +19 -0
  69. package/packages/@monomind/cli/dist/src/context/prompt-assembler.d.ts +26 -0
  70. package/packages/@monomind/cli/dist/src/context/prompt-assembler.js +93 -0
  71. package/packages/@monomind/cli/dist/src/context/task-history-provider.d.ts +24 -0
  72. package/packages/@monomind/cli/dist/src/context/task-history-provider.js +32 -0
  73. package/packages/@monomind/cli/dist/src/context/user-preferences-provider.d.ts +14 -0
  74. package/packages/@monomind/cli/dist/src/context/user-preferences-provider.js +27 -0
  75. package/packages/@monomind/cli/dist/src/dlq/dlq-reader.d.ts +31 -0
  76. package/packages/@monomind/cli/dist/src/dlq/dlq-reader.js +81 -0
  77. package/packages/@monomind/cli/dist/src/dlq/dlq-writer.d.ts +24 -0
  78. package/packages/@monomind/cli/dist/src/dlq/dlq-writer.js +65 -0
  79. package/packages/@monomind/cli/dist/src/dlq/index.d.ts +10 -0
  80. package/packages/@monomind/cli/dist/src/dlq/index.js +7 -0
  81. package/packages/@monomind/cli/dist/src/eval/dataset-manager.d.ts +33 -0
  82. package/packages/@monomind/cli/dist/src/eval/dataset-manager.js +107 -0
  83. package/packages/@monomind/cli/dist/src/eval/dataset-runner.d.ts +23 -0
  84. package/packages/@monomind/cli/dist/src/eval/dataset-runner.js +59 -0
  85. package/packages/@monomind/cli/dist/src/eval/index.d.ts +10 -0
  86. package/packages/@monomind/cli/dist/src/eval/index.js +7 -0
  87. package/packages/@monomind/cli/dist/src/eval/trace-collector.d.ts +40 -0
  88. package/packages/@monomind/cli/dist/src/eval/trace-collector.js +102 -0
  89. package/packages/@monomind/cli/dist/src/infrastructure/in-memory-repositories.d.ts +68 -0
  90. package/packages/@monomind/cli/dist/src/infrastructure/in-memory-repositories.js +264 -0
  91. package/packages/@monomind/cli/dist/src/init/statusline-generator.js +3 -3
  92. package/packages/@monomind/cli/dist/src/interactive/interrupt.d.ts +22 -0
  93. package/packages/@monomind/cli/dist/src/interactive/interrupt.js +71 -0
  94. package/packages/@monomind/cli/dist/src/mcp/deprecation-injector.d.ts +25 -0
  95. package/packages/@monomind/cli/dist/src/mcp/deprecation-injector.js +48 -0
  96. package/packages/@monomind/cli/dist/src/mcp/tool-registry.d.ts +61 -0
  97. package/packages/@monomind/cli/dist/src/mcp/tool-registry.js +246 -0
  98. package/packages/@monomind/cli/dist/src/mcp-tools/wasm-agent-tools.d.ts +9 -0
  99. package/packages/@monomind/cli/dist/src/mcp-tools/wasm-agent-tools.js +230 -0
  100. package/packages/@monomind/cli/dist/src/model/complexity-scorer.d.ts +21 -0
  101. package/packages/@monomind/cli/dist/src/model/complexity-scorer.js +106 -0
  102. package/packages/@monomind/cli/dist/src/model/index.d.ts +4 -0
  103. package/packages/@monomind/cli/dist/src/model/index.js +4 -0
  104. package/packages/@monomind/cli/dist/src/model/model-settings.d.ts +22 -0
  105. package/packages/@monomind/cli/dist/src/model/model-settings.js +33 -0
  106. package/packages/@monomind/cli/dist/src/model/model-tier-resolver.d.ts +24 -0
  107. package/packages/@monomind/cli/dist/src/model/model-tier-resolver.js +65 -0
  108. package/packages/@monomind/cli/dist/src/monovector/capabilities.d.ts +34 -0
  109. package/packages/@monomind/cli/dist/src/monovector/capabilities.js +37 -0
  110. package/packages/@monomind/cli/dist/src/observability/replay-reader.d.ts +1 -1
  111. package/packages/@monomind/cli/dist/src/orchestration/index.d.ts +7 -0
  112. package/packages/@monomind/cli/dist/src/orchestration/index.js +6 -0
  113. package/packages/@monomind/cli/dist/src/orchestration/mode-dispatcher.d.ts +11 -0
  114. package/packages/@monomind/cli/dist/src/orchestration/mode-dispatcher.js +31 -0
  115. package/packages/@monomind/cli/dist/src/orchestration/routing-modes.d.ts +68 -0
  116. package/packages/@monomind/cli/dist/src/orchestration/routing-modes.js +180 -0
  117. package/packages/@monomind/cli/dist/src/plugins/tests/demo-plugin-store.d.ts +7 -0
  118. package/packages/@monomind/cli/dist/src/plugins/tests/demo-plugin-store.js +126 -0
  119. package/packages/@monomind/cli/dist/src/plugins/tests/standalone-test.d.ts +12 -0
  120. package/packages/@monomind/cli/dist/src/plugins/tests/standalone-test.js +188 -0
  121. package/packages/@monomind/cli/dist/src/plugins/tests/test-plugin-store.d.ts +7 -0
  122. package/packages/@monomind/cli/dist/src/plugins/tests/test-plugin-store.js +206 -0
  123. package/packages/@monomind/cli/dist/src/runtime/headless.d.ts +60 -0
  124. package/packages/@monomind/cli/dist/src/runtime/headless.js +284 -0
  125. package/packages/@monomind/cli/dist/src/services/agentic-flow-bridge.d.ts +50 -0
  126. package/packages/@monomind/cli/dist/src/services/agentic-flow-bridge.js +95 -0
  127. package/packages/@monomind/cli/dist/src/services/container-worker-pool.d.ts +197 -0
  128. package/packages/@monomind/cli/dist/src/services/container-worker-pool.js +623 -0
  129. package/packages/@monomind/cli/dist/src/services/index.d.ts +13 -0
  130. package/packages/@monomind/cli/dist/src/services/index.js +11 -0
  131. package/packages/@monomind/cli/dist/src/services/worker-queue.d.ts +201 -0
  132. package/packages/@monomind/cli/dist/src/services/worker-queue.js +594 -0
  133. package/packages/@monomind/cli/dist/src/swarm/communication-graph.d.ts +25 -0
  134. package/packages/@monomind/cli/dist/src/swarm/communication-graph.js +77 -0
  135. package/packages/@monomind/cli/dist/src/swarm/flow-enforcer.d.ts +31 -0
  136. package/packages/@monomind/cli/dist/src/swarm/flow-enforcer.js +61 -0
  137. package/packages/@monomind/cli/dist/src/swarm/flow-visualizer.d.ts +19 -0
  138. package/packages/@monomind/cli/dist/src/swarm/flow-visualizer.js +68 -0
  139. package/packages/@monomind/cli/dist/src/transfer/deploy-seraphine.d.ts +13 -0
  140. package/packages/@monomind/cli/dist/src/transfer/deploy-seraphine.js +205 -0
  141. package/packages/@monomind/cli/dist/src/transfer/store/tests/standalone-test.d.ts +12 -0
  142. package/packages/@monomind/cli/dist/src/transfer/store/tests/standalone-test.js +190 -0
  143. package/packages/@monomind/cli/dist/src/transfer/test-seraphine.d.ts +6 -0
  144. package/packages/@monomind/cli/dist/src/transfer/test-seraphine.js +105 -0
  145. package/packages/@monomind/cli/dist/src/transfer/tests/test-store.d.ts +7 -0
  146. package/packages/@monomind/cli/dist/src/transfer/tests/test-store.js +214 -0
  147. package/packages/@monomind/cli/dist/src/workflow/condition-evaluator.d.ts +10 -0
  148. package/packages/@monomind/cli/dist/src/workflow/condition-evaluator.js +82 -0
  149. package/packages/@monomind/cli/dist/src/workflow/context-resolver.d.ts +12 -0
  150. package/packages/@monomind/cli/dist/src/workflow/context-resolver.js +23 -0
  151. package/packages/@monomind/cli/dist/src/workflow/dag-builder.d.ts +17 -0
  152. package/packages/@monomind/cli/dist/src/workflow/dag-builder.js +129 -0
  153. package/packages/@monomind/cli/dist/src/workflow/dag-executor.d.ts +9 -0
  154. package/packages/@monomind/cli/dist/src/workflow/dag-executor.js +116 -0
  155. package/packages/@monomind/cli/dist/src/workflow/dag-types.d.ts +41 -0
  156. package/packages/@monomind/cli/dist/src/workflow/dag-types.js +8 -0
  157. package/packages/@monomind/cli/dist/src/workflow/dsl-parser.d.ts +12 -0
  158. package/packages/@monomind/cli/dist/src/workflow/dsl-parser.js +20 -0
  159. package/packages/@monomind/cli/dist/src/workflow/dsl-schema.d.ts +165 -0
  160. package/packages/@monomind/cli/dist/src/workflow/dsl-schema.js +82 -0
  161. package/packages/@monomind/cli/dist/src/workflow/index.d.ts +13 -0
  162. package/packages/@monomind/cli/dist/src/workflow/index.js +11 -0
  163. package/packages/@monomind/cli/dist/src/workflow/template-engine.d.ts +11 -0
  164. package/packages/@monomind/cli/dist/src/workflow/template-engine.js +40 -0
  165. package/packages/@monomind/cli/dist/src/workflow/workflow-executor.d.ts +29 -0
  166. package/packages/@monomind/cli/dist/src/workflow/workflow-executor.js +227 -0
  167. package/packages/@monomind/cli/package.json +9 -9
  168. package/packages/@monomind/guidance/dist/adversarial.d.ts +284 -0
  169. package/packages/@monomind/guidance/dist/adversarial.js +572 -0
  170. package/packages/@monomind/guidance/dist/analyzer.d.ts +530 -0
  171. package/packages/@monomind/guidance/dist/analyzer.js +2518 -0
  172. package/packages/@monomind/guidance/dist/artifacts.d.ts +283 -0
  173. package/packages/@monomind/guidance/dist/artifacts.js +356 -0
  174. package/packages/@monomind/guidance/dist/authority.d.ts +290 -0
  175. package/packages/@monomind/guidance/dist/authority.js +558 -0
  176. package/packages/@monomind/guidance/dist/capabilities.d.ts +209 -0
  177. package/packages/@monomind/guidance/dist/capabilities.js +485 -0
  178. package/packages/@monomind/guidance/dist/coherence.d.ts +233 -0
  179. package/packages/@monomind/guidance/dist/coherence.js +372 -0
  180. package/packages/@monomind/guidance/dist/compiler.d.ts +87 -0
  181. package/packages/@monomind/guidance/dist/compiler.js +419 -0
  182. package/packages/@monomind/guidance/dist/conformance-kit.d.ts +225 -0
  183. package/packages/@monomind/guidance/dist/conformance-kit.js +629 -0
  184. package/packages/@monomind/guidance/dist/continue-gate.d.ts +214 -0
  185. package/packages/@monomind/guidance/dist/continue-gate.js +353 -0
  186. package/packages/@monomind/guidance/dist/crypto-utils.d.ts +17 -0
  187. package/packages/@monomind/guidance/dist/crypto-utils.js +24 -0
  188. package/packages/@monomind/guidance/dist/evolution.d.ts +282 -0
  189. package/packages/@monomind/guidance/dist/evolution.js +500 -0
  190. package/packages/@monomind/guidance/dist/gates.d.ts +79 -0
  191. package/packages/@monomind/guidance/dist/gates.js +302 -0
  192. package/packages/@monomind/guidance/dist/gateway.d.ts +206 -0
  193. package/packages/@monomind/guidance/dist/gateway.js +452 -0
  194. package/packages/@monomind/guidance/dist/generators.d.ts +153 -0
  195. package/packages/@monomind/guidance/dist/generators.js +682 -0
  196. package/packages/@monomind/guidance/dist/headless.d.ts +177 -0
  197. package/packages/@monomind/guidance/dist/headless.js +342 -0
  198. package/packages/@monomind/guidance/dist/hooks.d.ts +109 -0
  199. package/packages/@monomind/guidance/dist/hooks.js +347 -0
  200. package/packages/@monomind/guidance/dist/index.d.ts +205 -0
  201. package/packages/@monomind/guidance/dist/index.js +321 -0
  202. package/packages/@monomind/guidance/dist/ledger.d.ts +162 -0
  203. package/packages/@monomind/guidance/dist/ledger.js +375 -0
  204. package/packages/@monomind/guidance/dist/manifest-validator.d.ts +289 -0
  205. package/packages/@monomind/guidance/dist/manifest-validator.js +838 -0
  206. package/packages/@monomind/guidance/dist/memory-gate.d.ts +222 -0
  207. package/packages/@monomind/guidance/dist/memory-gate.js +382 -0
  208. package/packages/@monomind/guidance/dist/meta-governance.d.ts +265 -0
  209. package/packages/@monomind/guidance/dist/meta-governance.js +348 -0
  210. package/packages/@monomind/guidance/dist/optimizer.d.ts +104 -0
  211. package/packages/@monomind/guidance/dist/optimizer.js +329 -0
  212. package/packages/@monomind/guidance/dist/persistence.d.ts +189 -0
  213. package/packages/@monomind/guidance/dist/persistence.js +464 -0
  214. package/packages/@monomind/guidance/dist/proof.d.ts +185 -0
  215. package/packages/@monomind/guidance/dist/proof.js +238 -0
  216. package/packages/@monomind/guidance/dist/retriever.d.ts +116 -0
  217. package/packages/@monomind/guidance/dist/retriever.js +394 -0
  218. package/packages/@monomind/guidance/dist/ruvbot-integration.d.ts +370 -0
  219. package/packages/@monomind/guidance/dist/ruvbot-integration.js +738 -0
  220. package/packages/@monomind/guidance/dist/temporal.d.ts +426 -0
  221. package/packages/@monomind/guidance/dist/temporal.js +658 -0
  222. package/packages/@monomind/guidance/dist/trust.d.ts +283 -0
  223. package/packages/@monomind/guidance/dist/trust.js +473 -0
  224. package/packages/@monomind/guidance/dist/truth-anchors.d.ts +276 -0
  225. package/packages/@monomind/guidance/dist/truth-anchors.js +488 -0
  226. package/packages/@monomind/guidance/dist/types.d.ts +378 -0
  227. package/packages/@monomind/guidance/dist/types.js +10 -0
  228. package/packages/@monomind/guidance/dist/uncertainty.d.ts +372 -0
  229. package/packages/@monomind/guidance/dist/uncertainty.js +619 -0
  230. package/packages/@monomind/guidance/dist/wasm-kernel.d.ts +48 -0
  231. package/packages/@monomind/guidance/dist/wasm-kernel.js +158 -0
@@ -0,0 +1,106 @@
1
+ /**
2
+ * Heuristic complexity scorer for task descriptions.
3
+ *
4
+ * Returns a score in [0, 100] that drives automatic model-tier selection.
5
+ * Higher scores indicate tasks that benefit from more capable (and costly)
6
+ * models.
7
+ */
8
+ // ---------------------------------------------------------------------------
9
+ // Keyword sets
10
+ // ---------------------------------------------------------------------------
11
+ const HIGH_COMPLEXITY_KEYWORDS = [
12
+ 'architecture',
13
+ 'distributed',
14
+ 'security audit',
15
+ 'cve',
16
+ 'consensus',
17
+ 'fault-tolerant',
18
+ 'migrate',
19
+ 'refactor across',
20
+ 'orchestrat',
21
+ 'design system',
22
+ 'database schema',
23
+ 'performance optim',
24
+ 'threat model',
25
+ 'encryption',
26
+ 'zero-knowledge',
27
+ ];
28
+ const LOW_COMPLEXITY_KEYWORDS = [
29
+ 'format',
30
+ 'list',
31
+ 'rename',
32
+ 'sort',
33
+ 'typo',
34
+ 'lint',
35
+ 'log',
36
+ 'comment',
37
+ 'print',
38
+ 'echo',
39
+ 'delete unused',
40
+ 'remove import',
41
+ ];
42
+ /**
43
+ * Agent slugs that inherently deal with high-complexity work.
44
+ * When one of these agents is involved the score gets a +20 bonus.
45
+ */
46
+ export const HIGH_COMPLEXITY_AGENTS = new Set([
47
+ 'engineering-software-architect',
48
+ 'security-architect',
49
+ 'security-auditor',
50
+ 'system-architect',
51
+ 'performance-engineer',
52
+ 'byzantine-coordinator',
53
+ 'collective-intelligence-coordinator',
54
+ ]);
55
+ // ---------------------------------------------------------------------------
56
+ // Patterns
57
+ // ---------------------------------------------------------------------------
58
+ const STEP_INDICATOR_RE = /(?:step\s*\d|first[\s,].*then[\s,]|phase\s*\d)/i;
59
+ const CODE_BLOCK_RE = /```[\s\S]*?```/;
60
+ const FILE_REF_RE = /\b[\w./-]+\.\w{1,5}\b/;
61
+ // ---------------------------------------------------------------------------
62
+ // Scorer
63
+ // ---------------------------------------------------------------------------
64
+ /**
65
+ * Score the complexity of a task description.
66
+ *
67
+ * @param taskDescription - Free-text description of the task.
68
+ * @param agentSlug - Optional agent identifier; certain agents boost the score.
69
+ * @returns A number in [0, 100].
70
+ */
71
+ export function scoreComplexity(taskDescription, agentSlug) {
72
+ let score = 50;
73
+ const lower = taskDescription.toLowerCase();
74
+ const wordCount = taskDescription.trim().split(/\s+/).length;
75
+ // -- Word-count adjustments ------------------------------------------------
76
+ if (wordCount < 20) {
77
+ score -= 20;
78
+ }
79
+ if (wordCount > 100) {
80
+ score += 20;
81
+ }
82
+ if (wordCount > 200) {
83
+ score += 10;
84
+ }
85
+ // -- Keyword adjustments (first match only) --------------------------------
86
+ if (HIGH_COMPLEXITY_KEYWORDS.some((kw) => lower.includes(kw))) {
87
+ score += 10;
88
+ }
89
+ if (LOW_COMPLEXITY_KEYWORDS.some((kw) => lower.includes(kw))) {
90
+ score -= 10;
91
+ }
92
+ // -- Structural indicators -------------------------------------------------
93
+ if (STEP_INDICATOR_RE.test(taskDescription)) {
94
+ score += 10;
95
+ }
96
+ if (CODE_BLOCK_RE.test(taskDescription) || FILE_REF_RE.test(taskDescription)) {
97
+ score += 5;
98
+ }
99
+ // -- Agent bonus -----------------------------------------------------------
100
+ if (agentSlug && HIGH_COMPLEXITY_AGENTS.has(agentSlug)) {
101
+ score += 20;
102
+ }
103
+ // -- Clamp -----------------------------------------------------------------
104
+ return Math.max(0, Math.min(100, score));
105
+ }
106
+ //# sourceMappingURL=complexity-scorer.js.map
@@ -0,0 +1,4 @@
1
+ export { type ModelTier, type ModelSettings, type ModelPreference, TIER_DEFAULTS, MODEL_IDS, } from './model-settings.js';
2
+ export { scoreComplexity, HIGH_COMPLEXITY_AGENTS, } from './complexity-scorer.js';
3
+ export { type ResolvedModelSettings, resolveModelTier, } from './model-tier-resolver.js';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,4 @@
1
+ export { TIER_DEFAULTS, MODEL_IDS, } from './model-settings.js';
2
+ export { scoreComplexity, HIGH_COMPLEXITY_AGENTS, } from './complexity-scorer.js';
3
+ export { resolveModelTier, } from './model-tier-resolver.js';
4
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Per-run model tier selection — types and constants.
3
+ *
4
+ * Each tier maps to a concrete Claude model ID and carries sensible defaults
5
+ * for token budget, temperature, and extended-thinking.
6
+ */
7
+ export type ModelTier = 'haiku' | 'sonnet' | 'opus';
8
+ export interface ModelSettings {
9
+ model: ModelTier;
10
+ maxTokens?: number;
11
+ maxCostUsd?: number;
12
+ extendedThinking?: boolean;
13
+ temperature?: number;
14
+ }
15
+ export interface ModelPreference {
16
+ default: ModelTier;
17
+ maxCostUsd?: number;
18
+ extendedThinking?: boolean;
19
+ }
20
+ export declare const TIER_DEFAULTS: Record<ModelTier, ModelSettings>;
21
+ export declare const MODEL_IDS: Record<ModelTier, string>;
22
+ //# sourceMappingURL=model-settings.d.ts.map
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Per-run model tier selection — types and constants.
3
+ *
4
+ * Each tier maps to a concrete Claude model ID and carries sensible defaults
5
+ * for token budget, temperature, and extended-thinking.
6
+ */
7
+ // ---------------------------------------------------------------------------
8
+ // Constants
9
+ // ---------------------------------------------------------------------------
10
+ export const TIER_DEFAULTS = {
11
+ haiku: {
12
+ model: 'haiku',
13
+ maxTokens: 2048,
14
+ temperature: 0.3,
15
+ },
16
+ sonnet: {
17
+ model: 'sonnet',
18
+ maxTokens: 8192,
19
+ temperature: 0.5,
20
+ },
21
+ opus: {
22
+ model: 'opus',
23
+ maxTokens: 16384,
24
+ temperature: 0.7,
25
+ extendedThinking: true,
26
+ },
27
+ };
28
+ export const MODEL_IDS = {
29
+ haiku: 'claude-haiku-4-5',
30
+ sonnet: 'claude-sonnet-4-5',
31
+ opus: 'claude-opus-4-5',
32
+ };
33
+ //# sourceMappingURL=model-settings.js.map
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Resolves the concrete model tier for a given agent + task combination.
3
+ *
4
+ * Resolution order:
5
+ * 1. Orchestrator override (explicit)
6
+ * 2. Complexity-based automatic selection
7
+ * 3. Agent preference default
8
+ * 4. Fallback to sonnet
9
+ */
10
+ import type { ModelSettings, ModelPreference } from './model-settings.js';
11
+ export interface ResolvedModelSettings extends ModelSettings {
12
+ complexityScore: number;
13
+ resolutionReason: string;
14
+ }
15
+ /**
16
+ * Determine the best model tier for a task.
17
+ *
18
+ * @param agentSlug - The agent that will execute the task.
19
+ * @param taskDescription - Free-text task description.
20
+ * @param agentPreference - Optional per-agent preference.
21
+ * @param orchestratorOverride - Optional hard override from the orchestrator.
22
+ */
23
+ export declare function resolveModelTier(agentSlug: string, taskDescription: string, agentPreference?: ModelPreference, orchestratorOverride?: Partial<ModelSettings>): ResolvedModelSettings;
24
+ //# sourceMappingURL=model-tier-resolver.d.ts.map
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Resolves the concrete model tier for a given agent + task combination.
3
+ *
4
+ * Resolution order:
5
+ * 1. Orchestrator override (explicit)
6
+ * 2. Complexity-based automatic selection
7
+ * 3. Agent preference default
8
+ * 4. Fallback to sonnet
9
+ */
10
+ import { TIER_DEFAULTS } from './model-settings.js';
11
+ import { scoreComplexity, HIGH_COMPLEXITY_AGENTS } from './complexity-scorer.js';
12
+ // ---------------------------------------------------------------------------
13
+ // Resolver
14
+ // ---------------------------------------------------------------------------
15
+ /**
16
+ * Determine the best model tier for a task.
17
+ *
18
+ * @param agentSlug - The agent that will execute the task.
19
+ * @param taskDescription - Free-text task description.
20
+ * @param agentPreference - Optional per-agent preference.
21
+ * @param orchestratorOverride - Optional hard override from the orchestrator.
22
+ */
23
+ export function resolveModelTier(agentSlug, taskDescription, agentPreference, orchestratorOverride) {
24
+ const complexity = scoreComplexity(taskDescription, agentSlug);
25
+ // ----- 1. Orchestrator override ------------------------------------------
26
+ if (orchestratorOverride?.model) {
27
+ return buildResult(orchestratorOverride.model, complexity, 'orchestrator_override', agentPreference);
28
+ }
29
+ // ----- 2. Complexity-based selection -------------------------------------
30
+ const preferredDefault = agentPreference?.default ?? 'sonnet';
31
+ let tier;
32
+ let reason;
33
+ if (complexity < 30 && preferredDefault !== 'opus') {
34
+ tier = 'haiku';
35
+ reason = 'low_complexity';
36
+ }
37
+ else if (complexity >= 70 || HIGH_COMPLEXITY_AGENTS.has(agentSlug)) {
38
+ tier = 'opus';
39
+ reason = complexity >= 70 ? 'high_complexity' : 'high_complexity_agent';
40
+ }
41
+ else {
42
+ tier = preferredDefault;
43
+ reason = 'default_preference';
44
+ }
45
+ return buildResult(tier, complexity, reason, agentPreference);
46
+ }
47
+ // ---------------------------------------------------------------------------
48
+ // Helpers
49
+ // ---------------------------------------------------------------------------
50
+ function buildResult(tier, complexityScore, resolutionReason, preference) {
51
+ const base = { ...TIER_DEFAULTS[tier] };
52
+ // Propagate preference overrides
53
+ if (preference?.maxCostUsd !== undefined) {
54
+ base.maxCostUsd = preference.maxCostUsd;
55
+ }
56
+ if (preference?.extendedThinking !== undefined) {
57
+ base.extendedThinking = preference.extendedThinking;
58
+ }
59
+ return {
60
+ ...base,
61
+ complexityScore,
62
+ resolutionReason,
63
+ };
64
+ }
65
+ //# sourceMappingURL=model-tier-resolver.js.map
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Capability surface for the (removed) @monoes/* native learning packages.
3
+ *
4
+ * Lean teardown: the SONA / native / WASM learning layer (@monoes/sona, router,
5
+ * attention, learning-wasm, core, and @monomind/monovector-upstream) has been
6
+ * removed. This module is now a stub that always reports "nothing native is
7
+ * available", so every caller takes the pure-JS / keyword-routing path. The
8
+ * function and type surface is preserved so importers (index.ts, hooks-tools.ts,
9
+ * doctor.ts, neural.ts) keep compiling without change.
10
+ */
11
+ export interface MonoesCapabilities {
12
+ /** @monoes/sona SonaEngine available — always false after teardown */
13
+ sona: boolean;
14
+ /** @monoes/router backend — always 'none' after teardown */
15
+ router: 'native' | 'js' | 'none';
16
+ /** @monoes/attention FlashAttention available — always false after teardown */
17
+ attention: boolean;
18
+ /** @monoes/learning-wasm WasmMicroLoRA available — always false after teardown */
19
+ learningWasm: boolean;
20
+ /** @monomind/monovector-upstream plugin loaded — always false after teardown */
21
+ upstreamPlugin: boolean;
22
+ }
23
+ /**
24
+ * Returns the stubbed capability surface — all native backends report absent.
25
+ * Async to preserve the original signature; callers `await` this everywhere.
26
+ */
27
+ export declare function getCapabilities(): Promise<MonoesCapabilities>;
28
+ /** Synchronous read of the (constant) capability surface. */
29
+ export declare function getCachedCapabilities(): MonoesCapabilities | null;
30
+ /** No-op after teardown — there is nothing to re-probe. */
31
+ export declare function resetCapabilitiesCache(): void;
32
+ /** Returns the stubbed capability surface — kept for API compatibility. */
33
+ export declare function refreshCapabilities(): Promise<MonoesCapabilities>;
34
+ //# sourceMappingURL=capabilities.d.ts.map
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Capability surface for the (removed) @monoes/* native learning packages.
3
+ *
4
+ * Lean teardown: the SONA / native / WASM learning layer (@monoes/sona, router,
5
+ * attention, learning-wasm, core, and @monomind/monovector-upstream) has been
6
+ * removed. This module is now a stub that always reports "nothing native is
7
+ * available", so every caller takes the pure-JS / keyword-routing path. The
8
+ * function and type surface is preserved so importers (index.ts, hooks-tools.ts,
9
+ * doctor.ts, neural.ts) keep compiling without change.
10
+ */
11
+ const STUB_CAPABILITIES = {
12
+ sona: false,
13
+ router: 'none',
14
+ attention: false,
15
+ learningWasm: false,
16
+ upstreamPlugin: false,
17
+ };
18
+ /**
19
+ * Returns the stubbed capability surface — all native backends report absent.
20
+ * Async to preserve the original signature; callers `await` this everywhere.
21
+ */
22
+ export async function getCapabilities() {
23
+ return STUB_CAPABILITIES;
24
+ }
25
+ /** Synchronous read of the (constant) capability surface. */
26
+ export function getCachedCapabilities() {
27
+ return STUB_CAPABILITIES;
28
+ }
29
+ /** No-op after teardown — there is nothing to re-probe. */
30
+ export function resetCapabilitiesCache() {
31
+ /* no-op */
32
+ }
33
+ /** Returns the stubbed capability surface — kept for API compatibility. */
34
+ export async function refreshCapabilities() {
35
+ return STUB_CAPABILITIES;
36
+ }
37
+ //# sourceMappingURL=capabilities.js.map
@@ -20,7 +20,7 @@ export interface SessionReplay extends SessionSummary {
20
20
  }
21
21
  export declare class ReplayReader {
22
22
  private sessionsDir;
23
- constructor(cwd?: any);
23
+ constructor(cwd?: string);
24
24
  /**
25
25
  * Find and return the session data for a given session ID.
26
26
  * The ID may be a bare ID (e.g. "session-1234567890") or a timestamp number.
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Orchestration — barrel exports for Three-Mode Team Routing (Task 22)
3
+ */
4
+ export { RouteModeExecutor, CoordinateModeExecutor, CollaborateModeExecutor, parsePlan, } from './routing-modes.js';
5
+ export type { OrchestrationMode, RouteModeConfig, CoordinateModeConfig, CollaborateModeConfig, ModeResult, AgentDispatcher, ModeExecutor, } from './routing-modes.js';
6
+ export { ModeDispatcher } from './mode-dispatcher.js';
7
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Orchestration — barrel exports for Three-Mode Team Routing (Task 22)
3
+ */
4
+ export { RouteModeExecutor, CoordinateModeExecutor, CollaborateModeExecutor, parsePlan, } from './routing-modes.js';
5
+ export { ModeDispatcher } from './mode-dispatcher.js';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,11 @@
1
+ /**
2
+ * ModeDispatcher — selects and executes the correct mode executor
3
+ * based on the requested OrchestrationMode.
4
+ */
5
+ import type { AgentDispatcher, CollaborateModeConfig, CoordinateModeConfig, ModeResult, OrchestrationMode, RouteModeConfig } from './routing-modes.js';
6
+ export declare class ModeDispatcher {
7
+ private readonly dispatcher;
8
+ constructor(dispatcher: AgentDispatcher);
9
+ dispatchWithMode(mode: OrchestrationMode | undefined, config: RouteModeConfig | CoordinateModeConfig | CollaborateModeConfig): Promise<ModeResult>;
10
+ }
11
+ //# sourceMappingURL=mode-dispatcher.d.ts.map
@@ -0,0 +1,31 @@
1
+ /**
2
+ * ModeDispatcher — selects and executes the correct mode executor
3
+ * based on the requested OrchestrationMode.
4
+ */
5
+ import { CollaborateModeExecutor, CoordinateModeExecutor, RouteModeExecutor, } from './routing-modes.js';
6
+ export class ModeDispatcher {
7
+ dispatcher;
8
+ constructor(dispatcher) {
9
+ this.dispatcher = dispatcher;
10
+ }
11
+ async dispatchWithMode(mode = 'route', config) {
12
+ switch (mode) {
13
+ case 'route': {
14
+ const executor = new RouteModeExecutor(this.dispatcher);
15
+ return executor.execute(config);
16
+ }
17
+ case 'coordinate': {
18
+ const executor = new CoordinateModeExecutor(this.dispatcher);
19
+ return executor.execute(config);
20
+ }
21
+ case 'collaborate': {
22
+ const executor = new CollaborateModeExecutor(this.dispatcher);
23
+ return executor.execute(config);
24
+ }
25
+ default: {
26
+ throw new Error(`Unknown orchestration mode: ${mode}`);
27
+ }
28
+ }
29
+ }
30
+ }
31
+ //# sourceMappingURL=mode-dispatcher.js.map
@@ -0,0 +1,68 @@
1
+ /**
2
+ * Three-Mode Team Routing — Task 22
3
+ *
4
+ * Provides three orchestration modes:
5
+ * - route: single-agent dispatch
6
+ * - coordinate: planner → fan-out → synthesizer
7
+ * - collaborate: iterative A↔B with shared scratchpad
8
+ */
9
+ export type OrchestrationMode = 'route' | 'coordinate' | 'collaborate';
10
+ export interface RouteModeConfig {
11
+ agentSlug: string;
12
+ task: string;
13
+ }
14
+ export interface CoordinateModeConfig {
15
+ plannerSlug?: string;
16
+ synthesizerSlug?: string;
17
+ task: string;
18
+ maxSubtasks?: number;
19
+ }
20
+ export interface CollaborateModeConfig {
21
+ agentA: string;
22
+ agentB: string;
23
+ task: string;
24
+ maxIterations?: number;
25
+ convergencePhrase?: string;
26
+ }
27
+ export interface ModeResult {
28
+ mode: OrchestrationMode;
29
+ output: unknown;
30
+ agentsInvolved: string[];
31
+ iterationCount: number;
32
+ tokenUsage: {
33
+ input: number;
34
+ output: number;
35
+ };
36
+ latencyMs: number;
37
+ }
38
+ export interface AgentDispatcher {
39
+ dispatch(agentSlug: string, task: string, context?: string): Promise<{
40
+ output: unknown;
41
+ tokenUsage?: {
42
+ input: number;
43
+ output: number;
44
+ };
45
+ }>;
46
+ }
47
+ export declare abstract class ModeExecutor<TConfig> {
48
+ protected readonly dispatcher: AgentDispatcher;
49
+ constructor(dispatcher: AgentDispatcher);
50
+ abstract execute(config: TConfig): Promise<ModeResult>;
51
+ }
52
+ export declare class RouteModeExecutor extends ModeExecutor<RouteModeConfig> {
53
+ execute(config: RouteModeConfig): Promise<ModeResult>;
54
+ }
55
+ /**
56
+ * Extract a subtasks array from the planner output.
57
+ * Accepts either a raw array or JSON containing a `subtasks` key.
58
+ */
59
+ export declare function parsePlan(output: unknown): string[];
60
+ export declare class CoordinateModeExecutor extends ModeExecutor<CoordinateModeConfig> {
61
+ execute(config: CoordinateModeConfig): Promise<ModeResult>;
62
+ private addTokens;
63
+ }
64
+ export declare class CollaborateModeExecutor extends ModeExecutor<CollaborateModeConfig> {
65
+ execute(config: CollaborateModeConfig): Promise<ModeResult>;
66
+ private addTokens;
67
+ }
68
+ //# sourceMappingURL=routing-modes.d.ts.map
@@ -0,0 +1,180 @@
1
+ /**
2
+ * Three-Mode Team Routing — Task 22
3
+ *
4
+ * Provides three orchestration modes:
5
+ * - route: single-agent dispatch
6
+ * - coordinate: planner → fan-out → synthesizer
7
+ * - collaborate: iterative A↔B with shared scratchpad
8
+ */
9
+ import { SharedScratchpad } from '../../../shared/src/scratchpad.js';
10
+ // ---------------------------------------------------------------------------
11
+ // Abstract executor
12
+ // ---------------------------------------------------------------------------
13
+ const SLUG_RE = /^[a-z0-9][a-z0-9\-]{0,63}$/;
14
+ const MAX_TASK_BYTES = 64 * 1024;
15
+ function assertSlug(value, name) {
16
+ if (!SLUG_RE.test(value))
17
+ throw new Error(`Invalid agent slug for ${name}: ${JSON.stringify(value)}`);
18
+ }
19
+ function assertTask(task) {
20
+ if (!task || task.trim().length === 0)
21
+ throw new Error('task must not be empty');
22
+ if (task.length > MAX_TASK_BYTES)
23
+ throw new Error(`task exceeds maximum length (${MAX_TASK_BYTES} bytes)`);
24
+ }
25
+ export class ModeExecutor {
26
+ dispatcher;
27
+ constructor(dispatcher) {
28
+ this.dispatcher = dispatcher;
29
+ }
30
+ }
31
+ // ---------------------------------------------------------------------------
32
+ // Route mode — single dispatch
33
+ // ---------------------------------------------------------------------------
34
+ export class RouteModeExecutor extends ModeExecutor {
35
+ async execute(config) {
36
+ assertSlug(config.agentSlug, 'agentSlug');
37
+ assertTask(config.task);
38
+ const start = Date.now();
39
+ const result = await this.dispatcher.dispatch(config.agentSlug, config.task);
40
+ return {
41
+ mode: 'route',
42
+ output: result.output,
43
+ agentsInvolved: [config.agentSlug],
44
+ iterationCount: 1,
45
+ tokenUsage: result.tokenUsage ?? { input: 0, output: 0 },
46
+ latencyMs: Date.now() - start,
47
+ };
48
+ }
49
+ }
50
+ // ---------------------------------------------------------------------------
51
+ // Coordinate mode — planner → fan-out → synthesizer
52
+ // ---------------------------------------------------------------------------
53
+ /**
54
+ * Extract a subtasks array from the planner output.
55
+ * Accepts either a raw array or JSON containing a `subtasks` key.
56
+ */
57
+ export function parsePlan(output) {
58
+ if (Array.isArray(output))
59
+ return output.map(String);
60
+ const raw = typeof output === 'string' ? output : JSON.stringify(output);
61
+ try {
62
+ const parsed = JSON.parse(raw);
63
+ if (Array.isArray(parsed))
64
+ return parsed.map(String);
65
+ if (parsed !== null && typeof parsed === 'object' && Array.isArray(parsed.subtasks))
66
+ return parsed.subtasks.map(String);
67
+ }
68
+ catch {
69
+ // not JSON — treat the whole string as a single subtask
70
+ }
71
+ return [raw];
72
+ }
73
+ export class CoordinateModeExecutor extends ModeExecutor {
74
+ async execute(config) {
75
+ assertTask(config.task);
76
+ const start = Date.now();
77
+ const plannerSlug = config.plannerSlug ?? 'planner';
78
+ const synthesizerSlug = config.synthesizerSlug ?? 'hierarchical-coordinator';
79
+ assertSlug(plannerSlug, 'plannerSlug');
80
+ assertSlug(synthesizerSlug, 'synthesizerSlug');
81
+ const maxSubtasks = config.maxSubtasks ?? 8;
82
+ const totalTokens = { input: 0, output: 0 };
83
+ const agents = [plannerSlug];
84
+ // 1. Call planner
85
+ const planResult = await this.dispatcher.dispatch(plannerSlug, config.task);
86
+ this.addTokens(totalTokens, planResult.tokenUsage);
87
+ // 2. Parse subtasks & cap
88
+ const subtasks = parsePlan(planResult.output).slice(0, maxSubtasks);
89
+ // 3. Fan-out
90
+ const fanOutResults = await Promise.all(subtasks.map((subtask, i) => {
91
+ const workerSlug = `worker-${i}`;
92
+ agents.push(workerSlug);
93
+ return this.dispatcher.dispatch(workerSlug, subtask);
94
+ }));
95
+ for (const r of fanOutResults)
96
+ this.addTokens(totalTokens, r.tokenUsage);
97
+ // 4. Synthesize
98
+ agents.push(synthesizerSlug);
99
+ const synthesisContext = JSON.stringify(fanOutResults.map((r) => r.output));
100
+ const synthResult = await this.dispatcher.dispatch(synthesizerSlug, 'Synthesize the following results', synthesisContext);
101
+ this.addTokens(totalTokens, synthResult.tokenUsage);
102
+ return {
103
+ mode: 'coordinate',
104
+ output: synthResult.output,
105
+ agentsInvolved: agents,
106
+ iterationCount: 1 + subtasks.length + 1, // planner + workers + synthesizer
107
+ tokenUsage: totalTokens,
108
+ latencyMs: Date.now() - start,
109
+ };
110
+ }
111
+ addTokens(total, usage) {
112
+ if (usage) {
113
+ total.input += usage.input;
114
+ total.output += usage.output;
115
+ }
116
+ }
117
+ }
118
+ // ---------------------------------------------------------------------------
119
+ // Collaborate mode — iterative A↔B with shared scratchpad
120
+ // ---------------------------------------------------------------------------
121
+ export class CollaborateModeExecutor extends ModeExecutor {
122
+ async execute(config) {
123
+ assertTask(config.task);
124
+ assertSlug(config.agentA, 'agentA');
125
+ assertSlug(config.agentB, 'agentB');
126
+ const start = Date.now();
127
+ // Cap iterations: each iteration costs 2 LLM dispatches; an unbounded value
128
+ // turns this into an unbounded token-cost / OOM vector.
129
+ const maxIterations = Math.max(1, Math.min(config.maxIterations ?? 5, 20));
130
+ // Reject empty/short convergence phrase — empty string would make
131
+ // String(bResult.output).includes('') return true on iteration 1, bypassing
132
+ // the entire iterative review and locking in whatever Agent B produced.
133
+ const rawPhrase = (config.convergencePhrase ?? 'APPROVED').trim();
134
+ const convergencePhrase = rawPhrase.length >= 3 ? rawPhrase : 'APPROVED';
135
+ const pad = new SharedScratchpad();
136
+ const totalTokens = { input: 0, output: 0 };
137
+ let lastOutput;
138
+ for (let i = 0; i < maxIterations; i++) {
139
+ // Agent A
140
+ const aResult = await this.dispatcher.dispatch(config.agentA, config.task, pad.read());
141
+ pad.append(config.agentA, String(aResult.output));
142
+ this.addTokens(totalTokens, aResult.tokenUsage);
143
+ // Agent B
144
+ const bResult = await this.dispatcher.dispatch(config.agentB, config.task, pad.read());
145
+ pad.append(config.agentB, String(bResult.output));
146
+ this.addTokens(totalTokens, bResult.tokenUsage);
147
+ lastOutput = bResult.output;
148
+ // Convergence check — require the phrase as a stand-alone token so that
149
+ // an attacker who controls Agent A's output cannot embed `APPROVED` in
150
+ // prose and force premature convergence on iteration 1.
151
+ const escaped = convergencePhrase.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
152
+ const convergenceRe = new RegExp(`(^|\\W)${escaped}(\\W|$)`);
153
+ if (convergenceRe.test(String(bResult.output))) {
154
+ return {
155
+ mode: 'collaborate',
156
+ output: lastOutput,
157
+ agentsInvolved: [config.agentA, config.agentB],
158
+ iterationCount: i + 1,
159
+ tokenUsage: totalTokens,
160
+ latencyMs: Date.now() - start,
161
+ };
162
+ }
163
+ }
164
+ return {
165
+ mode: 'collaborate',
166
+ output: lastOutput,
167
+ agentsInvolved: [config.agentA, config.agentB],
168
+ iterationCount: maxIterations,
169
+ tokenUsage: totalTokens,
170
+ latencyMs: Date.now() - start,
171
+ };
172
+ }
173
+ addTokens(total, usage) {
174
+ if (usage) {
175
+ total.input += usage.input;
176
+ total.output += usage.output;
177
+ }
178
+ }
179
+ }
180
+ //# sourceMappingURL=routing-modes.js.map
@@ -0,0 +1,7 @@
1
+ #!/usr/bin/env npx tsx
2
+ /**
3
+ * Plugin Store Demo
4
+ * Demonstrates the IPFS-based plugin registry working end-to-end
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=demo-plugin-store.d.ts.map