@heretek-ai/epistemic-swarm 0.7.25 → 1.0.2

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 (350) hide show
  1. package/index.ts +1 -0
  2. package/package.json +63 -139
  3. package/rpc.ts +1 -0
  4. package/server.ts +1 -0
  5. package/src/agents.ts +69 -0
  6. package/src/continue.ts +40 -0
  7. package/src/hooks.ts +283 -0
  8. package/src/panels.tsx +220 -0
  9. package/src/policy.ts +221 -0
  10. package/src/pr.ts +37 -0
  11. package/src/research.ts +63 -0
  12. package/src/rpc-def.ts +136 -0
  13. package/src/rpc.ts +331 -0
  14. package/src/runtime.ts +112 -0
  15. package/src/server.ts +311 -0
  16. package/src/session.ts +61 -0
  17. package/src/tools.ts +61 -0
  18. package/src/tui.tsx +206 -0
  19. package/tui.tsx +1 -0
  20. package/.agents/skills/brainstorming/SKILL.md +0 -19
  21. package/.agents/skills/code_audit/SKILL.md +0 -19
  22. package/.agents/skills/darkharvest/SKILL.md +0 -19
  23. package/.agents/skills/epistemic_search/SKILL.md +0 -19
  24. package/.agents/skills/factory/SKILL.md +0 -19
  25. package/.agents/skills/grilling/SKILL.md +0 -19
  26. package/.agents/skills/oss_scout/SKILL.md +0 -19
  27. package/.agents/skills/research_cache/SKILL.md +0 -19
  28. package/.agents/skills/swarm_config/SKILL.md +0 -19
  29. package/.claude-plugin/marketplace.json +0 -61
  30. package/.claude-plugin/plugin.json +0 -76
  31. package/.omp/README.md +0 -39
  32. package/.omp/SYSTEM.md +0 -17
  33. package/.omp/commands/audit.md +0 -10
  34. package/.omp/commands/brainstorming.md +0 -12
  35. package/.omp/commands/darkharvest.md +0 -11
  36. package/.omp/commands/domainexpansion.md +0 -9
  37. package/.omp/commands/factory.md +0 -9
  38. package/.omp/commands/grill.md +0 -9
  39. package/.omp/commands/scout.md +0 -10
  40. package/.omp/commands/swarm-config.md +0 -10
  41. package/.omp/commands/swarm.md +0 -9
  42. package/.omp/hooks/post/epistemic-audit.ts +0 -16
  43. package/.omp/hooks/pre/epistemic-redirect.ts +0 -21
  44. package/.omp/prompts/brainstorming.md +0 -8
  45. package/.omp/prompts/swarm.md +0 -8
  46. package/LICENSE +0 -126
  47. package/MARKETPLACE.md +0 -130
  48. package/README.md +0 -403
  49. package/bin/cli.js +0 -297
  50. package/config/claude-settings-patch.json +0 -10
  51. package/config/docker-compose.infra.yml +0 -23
  52. package/config/domain_packs/biopharma.json +0 -23
  53. package/config/domain_packs/legal.json +0 -19
  54. package/config/domain_packs/quant.json +0 -19
  55. package/config/mcp-research-servers.json +0 -33
  56. package/config/mcp_launcher.py +0 -153
  57. package/config/opencode-snippet.json +0 -156
  58. package/config/searxng_mcp.py +0 -92
  59. package/extensions/pi/index.js +0 -357
  60. package/hooks/hooks.json +0 -45
  61. package/install.sh +0 -473
  62. package/plugins/antigravity/README.md +0 -72
  63. package/plugins/antigravity/agents/alpha-thesis.md +0 -36
  64. package/plugins/antigravity/agents/beta-antithesis.md +0 -35
  65. package/plugins/antigravity/agents/brainstormer.md +0 -27
  66. package/plugins/antigravity/agents/code-auditor.md +0 -28
  67. package/plugins/antigravity/agents/darkharvester.md +0 -30
  68. package/plugins/antigravity/agents/epistemic-auditor.md +0 -28
  69. package/plugins/antigravity/agents/manager.md +0 -26
  70. package/plugins/antigravity/agents/oss-scout.md +0 -27
  71. package/plugins/antigravity/agents/programmer.md +0 -25
  72. package/plugins/antigravity/agents/qa-a.md +0 -22
  73. package/plugins/antigravity/agents/qa-b.md +0 -22
  74. package/plugins/antigravity/antigravity_hooks.py +0 -265
  75. package/plugins/antigravity/commands/audit.md +0 -11
  76. package/plugins/antigravity/commands/brainstorm.md +0 -9
  77. package/plugins/antigravity/commands/brainstorming.md +0 -10
  78. package/plugins/antigravity/commands/darkharvest.md +0 -12
  79. package/plugins/antigravity/commands/domainexpansion.md +0 -12
  80. package/plugins/antigravity/commands/factory.md +0 -14
  81. package/plugins/antigravity/commands/grill.md +0 -10
  82. package/plugins/antigravity/commands/scout.md +0 -11
  83. package/plugins/antigravity/commands/swarm-config.md +0 -9
  84. package/plugins/antigravity/commands/swarm.md +0 -12
  85. package/plugins/antigravity/hook_bus_bridge.js +0 -352
  86. package/plugins/antigravity/hooks.json +0 -44
  87. package/plugins/antigravity/mcp_config.json +0 -33
  88. package/plugins/antigravity/mcp_launcher.py +0 -58
  89. package/plugins/antigravity/plugin.json +0 -13
  90. package/plugins/antigravity/rules/AGENTS.md +0 -127
  91. package/plugins/antigravity/rules/epistemic-integrity.md +0 -16
  92. package/plugins/antigravity/skills/brainstorming/SKILL.md +0 -19
  93. package/plugins/antigravity/skills/code_audit/SKILL.md +0 -19
  94. package/plugins/antigravity/skills/darkharvest/SKILL.md +0 -19
  95. package/plugins/antigravity/skills/epistemic_search/SKILL.md +0 -19
  96. package/plugins/antigravity/skills/factory/SKILL.md +0 -19
  97. package/plugins/antigravity/skills/grilling/SKILL.md +0 -19
  98. package/plugins/antigravity/skills/oss_scout/SKILL.md +0 -19
  99. package/plugins/antigravity/skills/research_cache/SKILL.md +0 -19
  100. package/plugins/antigravity/skills/swarm_config/SKILL.md +0 -19
  101. package/plugins/codex/AGENTS.md.snippet +0 -10
  102. package/plugins/codex/README.md +0 -37
  103. package/plugins/codex/config.toml.snippet +0 -28
  104. package/plugins/codex/openai.yaml +0 -24
  105. package/plugins/codex/skills/brainstorming/SKILL.md +0 -19
  106. package/plugins/codex/skills/code_audit/SKILL.md +0 -19
  107. package/plugins/codex/skills/darkharvest/SKILL.md +0 -19
  108. package/plugins/codex/skills/epistemic_search/SKILL.md +0 -19
  109. package/plugins/codex/skills/factory/SKILL.md +0 -19
  110. package/plugins/codex/skills/grilling/SKILL.md +0 -19
  111. package/plugins/codex/skills/oss_scout/SKILL.md +0 -19
  112. package/plugins/codex/skills/research_cache/SKILL.md +0 -19
  113. package/plugins/codex/skills/swarm_config/SKILL.md +0 -19
  114. package/plugins/darkharvest/.claude-plugin/plugin.json +0 -15
  115. package/plugins/darkharvest/agents/harvest-proponent.md +0 -22
  116. package/plugins/darkharvest/agents/harvest-redteam.md +0 -20
  117. package/plugins/darkharvest/evals/teardown-verdict/graders/license-line.md +0 -6
  118. package/plugins/darkharvest/evals/teardown-verdict/graders/skill-fired.md +0 -5
  119. package/plugins/darkharvest/evals/teardown-verdict/prompt.md +0 -6
  120. package/plugins/darkharvest/skills/darkharvest/SKILL.md +0 -70
  121. package/plugins/darkharvest/skills/darkharvest/scripts/harvest.py +0 -289
  122. package/plugins/factory/.claude-plugin/plugin.json +0 -15
  123. package/plugins/factory/agents/factory-manager.md +0 -22
  124. package/plugins/factory/agents/programmer.md +0 -16
  125. package/plugins/factory/agents/qa-adversarial.md +0 -17
  126. package/plugins/factory/agents/qa-functional.md +0 -17
  127. package/plugins/factory/evals/gate-halt/graders/gates-first.md +0 -6
  128. package/plugins/factory/evals/gate-halt/graders/skill-fired.md +0 -5
  129. package/plugins/factory/evals/gate-halt/prompt.md +0 -6
  130. package/plugins/factory/skills/factory/SKILL.md +0 -61
  131. package/plugins/factory/skills/factory/scripts/factory.py +0 -300
  132. package/plugins/gemini/GEMINI.md +0 -16
  133. package/plugins/gemini/README.md +0 -20
  134. package/plugins/gemini/commands/audit.toml +0 -6
  135. package/plugins/gemini/commands/brainstorming.toml +0 -10
  136. package/plugins/gemini/commands/darkharvest.toml +0 -8
  137. package/plugins/gemini/commands/domainexpansion.toml +0 -7
  138. package/plugins/gemini/commands/factory.toml +0 -8
  139. package/plugins/gemini/commands/grill.toml +0 -6
  140. package/plugins/gemini/commands/scout.toml +0 -7
  141. package/plugins/gemini/commands/swarm-config.toml +0 -7
  142. package/plugins/gemini/commands/swarm.toml +0 -8
  143. package/plugins/gemini/gemini-extension.json +0 -38
  144. package/plugins/gemini/hooks/hooks.json +0 -11
  145. package/plugins/gemini/skills/brainstorming/SKILL.md +0 -19
  146. package/plugins/gemini/skills/code_audit/SKILL.md +0 -19
  147. package/plugins/gemini/skills/darkharvest/SKILL.md +0 -19
  148. package/plugins/gemini/skills/epistemic_search/SKILL.md +0 -19
  149. package/plugins/gemini/skills/factory/SKILL.md +0 -19
  150. package/plugins/gemini/skills/grilling/SKILL.md +0 -19
  151. package/plugins/gemini/skills/oss_scout/SKILL.md +0 -19
  152. package/plugins/gemini/skills/research_cache/SKILL.md +0 -19
  153. package/plugins/gemini/skills/swarm_config/SKILL.md +0 -19
  154. package/plugins/opencode/analysis-bridge.js +0 -620
  155. package/plugins/opencode/config-io.js +0 -1651
  156. package/plugins/opencode/dep-health.js +0 -1039
  157. package/plugins/opencode/hook-bus.js +0 -496
  158. package/plugins/opencode/index.js +0 -2992
  159. package/plugins/opencode/tui.js +0 -1551
  160. package/plugins/opencode/weight-baseline.json +0 -16
  161. package/plugins/opencode/weight-signals.js +0 -769
  162. package/plugins/research-cache/.claude-plugin/plugin.json +0 -15
  163. package/plugins/research-cache/skills/research_cache/SKILL.md +0 -36
  164. package/plugins/research-cache/skills/research_cache/__init__.py +0 -0
  165. package/plugins/research-cache/skills/research_cache/hasher.py +0 -302
  166. package/plugins/socratic-grilling/.claude-plugin/plugin.json +0 -15
  167. package/plugins/socratic-grilling/skills/grilling/SKILL.md +0 -61
  168. package/plugins/socratic-grilling/skills/grilling/__init__.py +0 -0
  169. package/plugins/socratic-grilling/skills/grilling/socratic_tree.py +0 -363
  170. package/prompts/agent_alpha_thesis.md +0 -70
  171. package/prompts/agent_beta_antithesis.md +0 -78
  172. package/prompts/agent_brainstormer.md +0 -143
  173. package/prompts/agent_code_auditor.md +0 -88
  174. package/prompts/agent_darkharvest.md +0 -140
  175. package/prompts/agent_oss_scout.md +0 -78
  176. package/prompts/antigravity_repo_factcheck.md +0 -143
  177. package/prompts/base_epistemic_system.md +0 -50
  178. package/prompts/epistemic_auditor.md +0 -74
  179. package/prompts/orchestrator.md +0 -70
  180. package/runner/__init__.py +0 -0
  181. package/runner/__pycache__/__init__.cpython-311.pyc +0 -0
  182. package/runner/__pycache__/auctioneer.cpython-311.pyc +0 -0
  183. package/runner/__pycache__/auditor_engine.cpython-311.pyc +0 -0
  184. package/runner/__pycache__/claim_store.cpython-311.pyc +0 -0
  185. package/runner/__pycache__/claim_witness.cpython-311.pyc +0 -0
  186. package/runner/__pycache__/darkharvest_claims.cpython-311.pyc +0 -0
  187. package/runner/__pycache__/errors.cpython-311.pyc +0 -0
  188. package/runner/__pycache__/living_dossiers.cpython-311.pyc +0 -0
  189. package/runner/__pycache__/mcp_protocol.cpython-311.pyc +0 -0
  190. package/runner/__pycache__/mcp_server.cpython-311.pyc +0 -0
  191. package/runner/__pycache__/path_safety.cpython-311.pyc +0 -0
  192. package/runner/__pycache__/pcrb.cpython-311.pyc +0 -0
  193. package/runner/__pycache__/pcrb_verify.cpython-311.pyc +0 -0
  194. package/runner/__pycache__/preflight.cpython-311.pyc +0 -0
  195. package/runner/__pycache__/refinement.cpython-311.pyc +0 -0
  196. package/runner/__pycache__/research_swarm.cpython-311.pyc +0 -0
  197. package/runner/__pycache__/retrieval_log.cpython-311.pyc +0 -0
  198. package/runner/__pycache__/schema_validate.cpython-311.pyc +0 -0
  199. package/runner/__pycache__/schemas.cpython-311.pyc +0 -0
  200. package/runner/__pycache__/state_machine.cpython-311.pyc +0 -0
  201. package/runner/antigravity_hooks.py +0 -265
  202. package/runner/auctioneer.py +0 -169
  203. package/runner/auditor_engine.py +0 -711
  204. package/runner/claim_store.py +0 -417
  205. package/runner/claim_witness.py +0 -412
  206. package/runner/darkharvest_claims.py +0 -358
  207. package/runner/errors.py +0 -51
  208. package/runner/living_dossiers.py +0 -395
  209. package/runner/mcp_protocol.py +0 -188
  210. package/runner/mcp_server.py +0 -1447
  211. package/runner/path_safety.py +0 -62
  212. package/runner/pcrb.py +0 -290
  213. package/runner/pcrb_verify.py +0 -267
  214. package/runner/preflight.py +0 -1011
  215. package/runner/refinement.py +0 -580
  216. package/runner/research_swarm.py +0 -1848
  217. package/runner/retrieval_log.py +0 -90
  218. package/runner/schema_validate.py +0 -193
  219. package/runner/schemas.py +0 -630
  220. package/runner/state_machine.py +0 -463
  221. package/runner/tests/__pycache__/test_analysis_bridge.cpython-311.pyc +0 -0
  222. package/runner/tests/__pycache__/test_antigravity_plugin.cpython-311.pyc +0 -0
  223. package/runner/tests/__pycache__/test_auction_order.cpython-311.pyc +0 -0
  224. package/runner/tests/__pycache__/test_backends.cpython-311.pyc +0 -0
  225. package/runner/tests/__pycache__/test_bet1_spike.cpython-311.pyc +0 -0
  226. package/runner/tests/__pycache__/test_claim_store.cpython-311.pyc +0 -0
  227. package/runner/tests/__pycache__/test_claim_witness.cpython-311.pyc +0 -0
  228. package/runner/tests/__pycache__/test_claude_plugin.cpython-311.pyc +0 -0
  229. package/runner/tests/__pycache__/test_config_schema.cpython-311.pyc +0 -0
  230. package/runner/tests/__pycache__/test_contract_tooling.cpython-311.pyc +0 -0
  231. package/runner/tests/__pycache__/test_darkharvest_audit.cpython-311.pyc +0 -0
  232. package/runner/tests/__pycache__/test_dep_health.cpython-311.pyc +0 -0
  233. package/runner/tests/__pycache__/test_domain_packs.cpython-311.pyc +0 -0
  234. package/runner/tests/__pycache__/test_dossier_contract.cpython-311.pyc +0 -0
  235. package/runner/tests/__pycache__/test_factory.cpython-311.pyc +0 -0
  236. package/runner/tests/__pycache__/test_fleet_seam.cpython-311.pyc +0 -0
  237. package/runner/tests/__pycache__/test_frontier_concurrency.cpython-311.pyc +0 -0
  238. package/runner/tests/__pycache__/test_frontier_mirror_standalone.cpython-311.pyc +0 -0
  239. package/runner/tests/__pycache__/test_grounding.cpython-311.pyc +0 -0
  240. package/runner/tests/__pycache__/test_hardening_contract.cpython-311.pyc +0 -0
  241. package/runner/tests/__pycache__/test_hook_bus.cpython-311.pyc +0 -0
  242. package/runner/tests/__pycache__/test_living_dossiers.cpython-311.pyc +0 -0
  243. package/runner/tests/__pycache__/test_manifest_concurrency.cpython-311.pyc +0 -0
  244. package/runner/tests/__pycache__/test_mcp_server.cpython-311.pyc +0 -0
  245. package/runner/tests/__pycache__/test_nk_hardening.cpython-311.pyc +0 -0
  246. package/runner/tests/__pycache__/test_opencode_ux.cpython-311.pyc +0 -0
  247. package/runner/tests/__pycache__/test_opencode_v2_registrars.cpython-311.pyc +0 -0
  248. package/runner/tests/__pycache__/test_pcrb.cpython-311.pyc +0 -0
  249. package/runner/tests/__pycache__/test_phase08_waiver_reopens.cpython-311.pyc +0 -0
  250. package/runner/tests/__pycache__/test_refinement.cpython-311.pyc +0 -0
  251. package/runner/tests/__pycache__/test_search_anomaly.cpython-311.pyc +0 -0
  252. package/runner/tests/__pycache__/test_search_provider.cpython-311.pyc +0 -0
  253. package/runner/tests/__pycache__/test_search_provider_plugin.cpython-311.pyc +0 -0
  254. package/runner/tests/__pycache__/test_swarm.cpython-311.pyc +0 -0
  255. package/runner/tests/__pycache__/test_swarm_config.cpython-311.pyc +0 -0
  256. package/runner/tests/__pycache__/test_sweep_regressions.cpython-311.pyc +0 -0
  257. package/runner/tests/__pycache__/test_webcache.cpython-311.pyc +0 -0
  258. package/runner/tests/__pycache__/test_weight_signals.cpython-311.pyc +0 -0
  259. package/runner/tests/fixtures/auction_objective.json +0 -35
  260. package/runner/tests/fixtures/borderline_claims.json +0 -27
  261. package/runner/tests/fixtures/config_validation_cases.json +0 -276
  262. package/runner/tests/fixtures/ddg_anomaly_page.html +0 -176
  263. package/runner/tests/fixtures/ddg_results_page.html +0 -28
  264. package/runner/tests/fixtures/divergence_objectives.json +0 -31
  265. package/runner/tests/test_analysis_bridge.py +0 -450
  266. package/runner/tests/test_antigravity_plugin.py +0 -361
  267. package/runner/tests/test_auction_order.py +0 -173
  268. package/runner/tests/test_backends.py +0 -457
  269. package/runner/tests/test_bet1_spike.py +0 -95
  270. package/runner/tests/test_claim_store.py +0 -162
  271. package/runner/tests/test_claim_witness.py +0 -186
  272. package/runner/tests/test_claude_plugin.py +0 -170
  273. package/runner/tests/test_config_schema.py +0 -879
  274. package/runner/tests/test_contract_tooling.py +0 -312
  275. package/runner/tests/test_darkharvest_audit.py +0 -395
  276. package/runner/tests/test_dep_health.py +0 -595
  277. package/runner/tests/test_domain_packs.py +0 -217
  278. package/runner/tests/test_dossier_contract.py +0 -196
  279. package/runner/tests/test_factory.py +0 -258
  280. package/runner/tests/test_fleet_seam.py +0 -113
  281. package/runner/tests/test_frontier_concurrency.py +0 -288
  282. package/runner/tests/test_frontier_mirror_standalone.py +0 -156
  283. package/runner/tests/test_grounding.py +0 -183
  284. package/runner/tests/test_hardening_contract.py +0 -391
  285. package/runner/tests/test_hook_bus.py +0 -956
  286. package/runner/tests/test_living_dossiers.py +0 -204
  287. package/runner/tests/test_manifest_concurrency.py +0 -187
  288. package/runner/tests/test_mcp_server.py +0 -257
  289. package/runner/tests/test_nk_hardening.py +0 -1046
  290. package/runner/tests/test_opencode_ux.py +0 -2438
  291. package/runner/tests/test_opencode_v2_registrars.py +0 -2157
  292. package/runner/tests/test_pcrb.py +0 -240
  293. package/runner/tests/test_phase08_waiver_reopens.py +0 -539
  294. package/runner/tests/test_refinement.py +0 -255
  295. package/runner/tests/test_search_anomaly.py +0 -342
  296. package/runner/tests/test_search_provider.py +0 -1534
  297. package/runner/tests/test_search_provider_plugin.py +0 -401
  298. package/runner/tests/test_swarm.py +0 -444
  299. package/runner/tests/test_swarm_config.py +0 -520
  300. package/runner/tests/test_sweep_regressions.py +0 -453
  301. package/runner/tests/test_webcache.py +0 -271
  302. package/runner/tests/test_weight_signals.py +0 -401
  303. package/schemas/alpha_dossier.schema.json +0 -204
  304. package/schemas/audit_report.schema.json +0 -79
  305. package/schemas/beta_dossier.schema.json +0 -214
  306. package/schemas/config.schema.json +0 -311
  307. package/schemas/frontier.schema.json +0 -61
  308. package/schemas/manifest.schema.json +0 -49
  309. package/schemas/scope_manifest.schema.json +0 -47
  310. package/scripts/__pycache__/bet1_advisory_spike.cpython-311.pyc +0 -0
  311. package/scripts/__pycache__/build_adapters.cpython-311.pyc +0 -0
  312. package/scripts/__pycache__/check_docs.cpython-311.pyc +0 -0
  313. package/scripts/__pycache__/divergence_experiment.cpython-311.pyc +0 -0
  314. package/scripts/__pycache__/gen_schemas.cpython-311.pyc +0 -0
  315. package/scripts/auction_experiment.py +0 -188
  316. package/scripts/bet1_advisory_spike.py +0 -442
  317. package/scripts/build_adapters.py +0 -417
  318. package/scripts/check_docs.py +0 -66
  319. package/scripts/divergence_experiment.py +0 -214
  320. package/scripts/gen_schemas.py +0 -69
  321. package/skills/brainstorming/SKILL.md +0 -106
  322. package/skills/brainstorming/__init__.py +0 -1
  323. package/skills/brainstorming/scripts/brainstorm.py +0 -201
  324. package/skills/code_audit/SKILL.md +0 -45
  325. package/skills/darkharvest/SKILL.md +0 -70
  326. package/skills/darkharvest/scripts/harvest.py +0 -289
  327. package/skills/epistemic_search/SKILL.md +0 -67
  328. package/skills/epistemic_search/__init__.py +0 -1
  329. package/skills/epistemic_search/scripts/__pycache__/search.cpython-311.pyc +0 -0
  330. package/skills/epistemic_search/scripts/fetch.py +0 -156
  331. package/skills/epistemic_search/scripts/search.py +0 -551
  332. package/skills/epistemic_search/scripts/webcache.py +0 -339
  333. package/skills/factory/SKILL.md +0 -61
  334. package/skills/factory/scripts/factory.py +0 -300
  335. package/skills/grilling/SKILL.md +0 -61
  336. package/skills/grilling/__init__.py +0 -0
  337. package/skills/grilling/__pycache__/__init__.cpython-311.pyc +0 -0
  338. package/skills/grilling/__pycache__/socratic_tree.cpython-311.pyc +0 -0
  339. package/skills/grilling/socratic_tree.py +0 -363
  340. package/skills/oss_scout/SKILL.md +0 -49
  341. package/skills/research_cache/SKILL.md +0 -36
  342. package/skills/research_cache/__init__.py +0 -0
  343. package/skills/research_cache/__pycache__/__init__.cpython-311.pyc +0 -0
  344. package/skills/research_cache/__pycache__/hasher.cpython-311.pyc +0 -0
  345. package/skills/research_cache/hasher.py +0 -302
  346. package/skills/swarm_config/SKILL.md +0 -178
  347. package/skills/swarm_config/__init__.py +0 -35
  348. package/skills/swarm_config/__pycache__/__init__.cpython-311.pyc +0 -0
  349. package/skills/swarm_config/__pycache__/configure.cpython-311.pyc +0 -0
  350. package/skills/swarm_config/configure.py +0 -1002
@@ -1,156 +0,0 @@
1
- {
2
- "$schema": "https://opencode.ai/config.json",
3
- "mcp": {
4
- "servers": {
5
- "iumbtems": {
6
- "type": "local",
7
- "command": ["python3", "<IUMBTEMS_ROOT>/runner/mcp_server.py"],
8
- "enabled": true
9
- }
10
- }
11
- },
12
- "plugins": [
13
- {
14
- "package": "@heretek-ai/epistemic-swarm",
15
- "options": {
16
- "search_engine": "duckduckgo",
17
- "max_iterations": 2,
18
- "mode": "research"
19
- }
20
- }
21
- ],
22
- "agents": {
23
- "code-auditor": {
24
- "description": "IUMBTEMS Codebase Auditor: Dialectic architecture mapping and vulnerability red-teaming with line-level proof.",
25
- "mode": "all",
26
- "permissions": [
27
- { "action": "read", "resource": "*", "effect": "allow" },
28
- { "action": "grep", "resource": "*", "effect": "allow" },
29
- { "action": "glob", "resource": "*", "effect": "allow" },
30
- { "action": "edit", "resource": "*", "effect": "allow" },
31
- { "action": "shell", "resource": "*", "effect": "ask" }
32
- ]
33
- },
34
- "oss-scout": {
35
- "description": "IUMBTEMS Open Source Scout: Discovers mature OSS packages, audits copyleft licensing, and generates clean-room blueprints.",
36
- "mode": "all",
37
- "permissions": [
38
- { "action": "read", "resource": "*", "effect": "allow" },
39
- { "action": "grep", "resource": "*", "effect": "allow" },
40
- { "action": "glob", "resource": "*", "effect": "allow" },
41
- { "action": "edit", "resource": "*", "effect": "allow" },
42
- { "action": "shell", "resource": "*", "effect": "ask" }
43
- ]
44
- },
45
- "alpha-thesis": {
46
- "description": "IUMBTEMS Proponent Agent: Gathers corroborating primary sources, benchmark results, and empirical proofs.",
47
- "mode": "all",
48
- "permissions": [
49
- { "action": "read", "resource": "*", "effect": "allow" },
50
- { "action": "grep", "resource": "*", "effect": "allow" },
51
- { "action": "glob", "resource": "*", "effect": "allow" },
52
- { "action": "edit", "resource": "*", "effect": "allow" },
53
- { "action": "shell", "resource": "*", "effect": "ask" },
54
- { "action": "subagent", "resource": "*", "effect": "allow" }
55
- ]
56
- },
57
- "beta-redteam": {
58
- "description": "IUMBTEMS Adversary Agent: Active falsification, red-teaming, hunting for counter-benchmarks, and edge-case failure modes.",
59
- "mode": "all",
60
- "permissions": [
61
- { "action": "read", "resource": "*", "effect": "allow" },
62
- { "action": "grep", "resource": "*", "effect": "allow" },
63
- { "action": "glob", "resource": "*", "effect": "allow" },
64
- { "action": "edit", "resource": "*", "effect": "allow" },
65
- { "action": "shell", "resource": "*", "effect": "ask" },
66
- { "action": "subagent", "resource": "*", "effect": "allow" }
67
- ]
68
- },
69
- "epistemic-auditor": {
70
- "description": "IUMBTEMS Synthesizer & Auditor: Verifies verbatim source quotes, downgrades unverified claims, and calculates divergence.",
71
- "mode": "all",
72
- "permissions": [
73
- { "action": "read", "resource": "*", "effect": "allow" },
74
- { "action": "grep", "resource": "*", "effect": "allow" },
75
- { "action": "glob", "resource": "*", "effect": "allow" },
76
- { "action": "edit", "resource": "*", "effect": "allow" }
77
- ]
78
- },
79
- "brainstormer": {
80
- "description": "IUMBTEMS Lateral Brainstormer: divergent what-if features, paradigm inversions, falsifiable spikes (never bug fixes).",
81
- "mode": "all",
82
- "permissions": [
83
- { "action": "read", "resource": "*", "effect": "allow" },
84
- { "action": "grep", "resource": "*", "effect": "allow" },
85
- { "action": "glob", "resource": "*", "effect": "allow" },
86
- { "action": "edit", "resource": "*", "effect": "allow" }
87
- ]
88
- },
89
- "darkharvester": {
90
- "description": "IUMBTEMS Competitor Teardown: seed plus expand, product plus code matrix, per-feature harvest verdicts with SPDX attribution.",
91
- "mode": "all",
92
- "permissions": [
93
- { "action": "read", "resource": "*", "effect": "allow" },
94
- { "action": "grep", "resource": "*", "effect": "allow" },
95
- { "action": "glob", "resource": "*", "effect": "allow" },
96
- { "action": "edit", "resource": "*", "effect": "allow" }
97
- ]
98
- },
99
- "manager": {
100
- "description": "IUMBTEMS Factory Manager: grill-gated phased builds. Owns gates, swarm dispatch, roadmap synthesis, QA tiebreaks. Never writes code.",
101
- "mode": "primary",
102
- "system": "You are the IUMBTEMS Factory Manager. Own gate discipline: grill until the frontier is settled, run the brainstorm and darkharvest swarms, synthesize .roadmap phase dossiers, spawn the programmer per phase, run qa-a and qa-b, and tiebreak their disagreements. Never write implementation code. Use the iumbtems_factory tool for run state. Explicit user approval advances each gate.",
103
- "permissions": [
104
- { "action": "edit", "resource": "*", "effect": "deny" },
105
- { "action": "shell", "resource": "*", "effect": "ask" },
106
- { "action": "subagent", "resource": "*", "effect": "deny" },
107
- { "action": "subagent", "resource": "programmer", "effect": "allow" },
108
- { "action": "subagent", "resource": "qa-a", "effect": "allow" },
109
- { "action": "subagent", "resource": "qa-b", "effect": "allow" },
110
- { "action": "subagent", "resource": "brainstormer", "effect": "allow" },
111
- { "action": "subagent", "resource": "darkharvester", "effect": "allow" }
112
- ]
113
- },
114
- "programmer": {
115
- "description": "IUMBTEMS Factory Programmer: implements exactly one phase brief per spawn. Cites phase evidence hashes. Never invokes swarms or other programmers.",
116
- "mode": "subagent",
117
- "system": "You are the IUMBTEMS Factory Programmer. Implement exactly one phase brief per spawn. Cite phase evidence hashes. Never invoke swarms or other programmers. If the brief is ambiguous or untestable, stop and ask the manager.",
118
- "permissions": [
119
- { "action": "edit", "resource": "*", "effect": "allow" },
120
- { "action": "shell", "resource": "*", "effect": "ask" },
121
- { "action": "subagent", "resource": "*", "effect": "deny" }
122
- ]
123
- },
124
- "qa-a": {
125
- "description": "IUMBTEMS Factory QA (functional): verifies phase acceptance criteria pass on the real surface. Read-only plus test execution. Diverged prompt from qa-b.",
126
- "mode": "subagent",
127
- "system": "You are the IUMBTEMS Factory functional QA. Verify each phase acceptance criterion on the real surface with tests and inspection. Read-only plus test execution; never edit code. Return pass|fail(reason)|conditional(note).",
128
- "permissions": [
129
- { "action": "edit", "resource": "*", "effect": "deny" },
130
- { "action": "shell", "resource": "*", "effect": "ask" },
131
- { "action": "subagent", "resource": "*", "effect": "deny" }
132
- ]
133
- },
134
- "qa-b": {
135
- "description": "IUMBTEMS Factory QA (adversarial): hunts edge cases, regressions, and acceptance loopholes the functional pass missed. Read-only plus test execution. Diverged prompt from qa-a.",
136
- "mode": "subagent",
137
- "system": "You are the IUMBTEMS Factory adversarial QA. Attack the phase: edge cases, regressions, vacuous acceptance criteria, error paths, resource limits. Read-only plus test execution; never edit code. Return pass|fail(reason)|conditional(note) with reproductions.",
138
- "permissions": [
139
- { "action": "edit", "resource": "*", "effect": "deny" },
140
- { "action": "shell", "resource": "*", "effect": "ask" },
141
- { "action": "subagent", "resource": "*", "effect": "deny" }
142
- ]
143
- }
144
- },
145
- "skills": [
146
- "./skills/grilling",
147
- "./skills/research_cache",
148
- "./skills/epistemic_search",
149
- "./skills/swarm_config",
150
- "./skills/code_audit",
151
- "./skills/oss_scout",
152
- "./skills/brainstorming",
153
- "./skills/darkharvest",
154
- "./skills/factory"
155
- ]
156
- }
@@ -1,92 +0,0 @@
1
- #!/usr/bin/env python3
2
- """
3
- Lightweight MCP Server for SearXNG Metasearch.
4
- Provides unbiased search results directly to Claude Code agents.
5
- """
6
-
7
- import os
8
- import sys
9
- import json
10
- import urllib.request
11
- import urllib.parse
12
- from typing import Dict, Any, List
13
-
14
- # Add parent dir to path so the shared protocol module resolves when this
15
- # script is launched directly as `python3 config/searxng_mcp.py`.
16
- SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
17
- PROJECT_ROOT = os.path.abspath(os.path.join(SCRIPT_DIR, ".."))
18
- if PROJECT_ROOT not in sys.path:
19
- sys.path.insert(0, PROJECT_ROOT)
20
-
21
- from runner.mcp_protocol import StdioJsonRpcServer, ToolSpec # noqa: E402
22
-
23
- SEARXNG_URL = os.environ.get("SEARXNG_URL", "http://localhost:8080")
24
-
25
- def search_searxng(query: str, categories: str = "general", max_results: int = 10) -> List[Dict[str, Any]]:
26
- """Query SearXNG JSON endpoint."""
27
- params = {
28
- "q": query,
29
- "format": "json",
30
- "categories": categories,
31
- "language": "en"
32
- }
33
- url = f"{SEARXNG_URL.rstrip('/')}/search?{urllib.parse.urlencode(params)}"
34
- req = urllib.request.Request(url, headers={"User-Agent": "EpistemicSwarm/1.0"})
35
-
36
- try:
37
- with urllib.request.urlopen(req, timeout=10) as resp:
38
- data = json.loads(resp.read().decode("utf-8"))
39
- results = data.get("results", [])[:max_results]
40
- return [
41
- {
42
- "title": r.get("title", ""),
43
- "url": r.get("url", ""),
44
- "snippet": r.get("content", ""),
45
- "engine": r.get("engine", "")
46
- }
47
- for r in results
48
- ]
49
- except Exception as e:
50
- return [{"error": f"Failed to query SearXNG at {SEARXNG_URL}: {str(e)}"}]
51
-
52
-
53
- def build_server() -> StdioJsonRpcServer:
54
- def handle_searxng_search(args: Dict[str, Any]) -> str:
55
- res = search_searxng(
56
- query=args.get("query", ""),
57
- categories=args.get("categories", "general"),
58
- max_results=args.get("max_results", 10),
59
- )
60
- return json.dumps(res, indent=2)
61
-
62
- return StdioJsonRpcServer(
63
- server_name="searxng-mcp",
64
- version="1.0.0",
65
- tools=[
66
- ToolSpec(
67
- name="searxng_search",
68
- description="Execute an unbiased multi-engine metasearch via SearXNG.",
69
- input_schema={
70
- "type": "object",
71
- "properties": {
72
- "query": {"type": "string", "description": "Search query"},
73
- "categories": {
74
- "type": "string",
75
- "description": "Categories (general, science, it)",
76
- "default": "general"
77
- },
78
- "max_results": {"type": "integer", "default": 10}
79
- },
80
- "required": ["query"]
81
- },
82
- handler=handle_searxng_search,
83
- )
84
- ],
85
- )
86
-
87
-
88
- def main():
89
- build_server().serve_forever()
90
-
91
- if __name__ == "__main__":
92
- main()
@@ -1,357 +0,0 @@
1
- /**
2
- * IUMBTEMS: I Use My Brain To Express My Self
3
- * Native Extension for Pi (pi.dev) and OMP (oh-my-pi)
4
- *
5
- * THIN REGISTRATION (Stream A2b): slash commands keep their UX; every body
6
- * forwards to the canonical first-party MCP surface:
7
- *
8
- * python3 runner/mcp_server.py call <tool> '<json>'
9
- *
10
- * The one exception is the brainstorming context scaffold
11
- * (skills/brainstorming/scripts/brainstorm.py), which is skill-local tooling,
12
- * not a duplicate tool implementation.
13
- */
14
-
15
- import { spawnSync } from 'node:child_process';
16
- import fs from 'node:fs';
17
- import path from 'node:path';
18
- import { fileURLToPath } from 'node:url';
19
-
20
- const __filename = fileURLToPath(import.meta.url);
21
- const __dirname = path.dirname(__filename);
22
- const PKG_ROOT = path.resolve(__dirname, '../..');
23
- const MCP_SERVER = path.join(PKG_ROOT, 'runner', 'mcp_server.py');
24
-
25
- function resolveBinary(name) {
26
- const pathDirs = (process.env.PATH || '').split(path.delimiter);
27
- for (const dir of pathDirs) {
28
- if (!dir || dir === '.' || dir.startsWith('./') || dir.startsWith('../')) continue;
29
- const full = path.join(dir, name);
30
- try {
31
- // Match Node's own PATH search: skip non-files and non-executables so a
32
- // directory or a non-executable named `python3` earlier on PATH cannot
33
- // shadow the real binary.
34
- if (!fs.statSync(full).isFile()) continue;
35
- fs.accessSync(full, fs.constants.X_OK);
36
- return fs.realpathSync(full);
37
- } catch {
38
- /* not present, not a file, or not executable — keep searching */
39
- }
40
- }
41
- return name;
42
- }
43
-
44
- /** Uniform dispatch: one-shot MCP call. Returns {ok, text}. */
45
- function callMcp(tool, args = {}, ctx = {}) {
46
- const res = spawnSync(
47
- resolveBinary('python3'),
48
- [MCP_SERVER, 'call', tool, JSON.stringify(args || {})],
49
- {
50
- encoding: 'utf-8',
51
- cwd: ctx.cwd || process.cwd(),
52
- // Project root: evidence defaults under <project>/.research instead
53
- // of the server process cwd.
54
- env: {
55
- ...process.env,
56
- PYTHONPATH: PKG_ROOT,
57
- IUMBTEMS_PROJECT_DIR: ctx.cwd || process.cwd(),
58
- },
59
- }
60
- );
61
- return {
62
- ok: res.status === 0,
63
- text: res.stdout || res.stderr,
64
- };
65
- }
66
-
67
- /** Parse `/swarm-config --engine X --depth N --mode M [--show]` into tool args. */
68
- function parseConfigArgs(raw) {
69
- const tokens = raw.trim() ? raw.trim().split(/\s+/) : [];
70
- const out = {};
71
- for (let i = 0; i < tokens.length; i++) {
72
- const t = tokens[i];
73
- if (t === '--engine' || t === '-e') out.search_engine = tokens[++i];
74
- else if (t === '--depth' || t === '-d' || t === '--iterations') out.max_iterations = Number(tokens[++i]);
75
- else if (t === '--mode' || t === '-m') out.mode = tokens[++i];
76
- else if (t === '--divergence') out.divergence_threshold = Number(tokens[++i]);
77
- // --show / bare invocation = read-only inspect (MCP tool's default)
78
- }
79
- return out;
80
- }
81
-
82
- export default function initPiExtension(pi) {
83
- // Check if Pi extension API is available
84
- if (!pi) return;
85
-
86
- // 1. Register Slash Commands
87
- if (typeof pi.registerCommand === 'function') {
88
- // /swarm: autonomous dialectic research
89
- pi.registerCommand('swarm', {
90
- description: 'Run IUMBTEMS dialectic research swarm on an objective',
91
- usage: '/swarm <objective>',
92
- handler: async (args, ctx) => {
93
- const objective = args.trim();
94
- if (!objective) {
95
- ctx.output?.('⚠️ Please provide a research objective. Example: /swarm "ZK prover latency bounds"');
96
- return;
97
- }
98
-
99
- ctx.output?.(`🌟 [IUMBTEMS] Dispatching Dialectic Swarm: "${objective}"...`);
100
- const r = callMcp('iumbtems_swarm_research', { objective }, ctx);
101
- if (r.ok) {
102
- ctx.output?.(r.text);
103
- ctx.output?.('\n✅ Research complete! Summary written to .research/final_synthesis.md');
104
- } else {
105
- ctx.output?.(`❌ Swarm failed:\n${r.text}`);
106
- }
107
- }
108
- });
109
-
110
- // /grill: Socratic assumption-inversion
111
- pi.registerCommand('grill', {
112
- description: 'Launch Socratic grilling and decision tree frontier exploration',
113
- usage: '/grill [--objective <text>]',
114
- handler: async (args, ctx) => {
115
- ctx.output?.('🧠 [IUMBTEMS] Launching Socratic Grilling decision tree...');
116
- const objective = args.trim();
117
- const r = callMcp(
118
- 'iumbtems_socratic_frontier',
119
- objective ? { objective, file: '.research/frontier.json' } : { file: '.research/frontier.json' },
120
- ctx
121
- );
122
- ctx.output?.(r.text);
123
- }
124
- });
125
-
126
- // /swarm-config: Inspect and tune research parameters
127
- pi.registerCommand('swarm-config', {
128
- description: 'Inspect or update Epistemic Swarm parameters (engine, depth, mode)',
129
- usage: '/swarm-config [--engine <e>] [--depth <d>] [--mode <m>] [--show]',
130
- handler: async (args, ctx) => {
131
- const r = callMcp('iumbtems_config', parseConfigArgs(args), ctx);
132
- ctx.output?.(r.text);
133
- }
134
- });
135
-
136
- // /audit: Dialectic codebase architecture & security audit
137
- pi.registerCommand('audit', {
138
- description: 'Run dialectic codebase architectural and security audit with line-level proof',
139
- usage: '/audit <target_path_or_scope>',
140
- handler: async (args, ctx) => {
141
- const target = args.trim() || 'Full repository architecture and vulnerability audit';
142
- ctx.output?.(`🛡️ [IUMBTEMS Audit] Launching Codebase Audit for: "${target}"...`);
143
- const r = callMcp('iumbtems_code_audit', { target }, ctx);
144
- if (r.ok) {
145
- ctx.output?.(r.text);
146
- ctx.output?.('\n✅ Audit complete! Report written to .research/code_audit_report.md');
147
- } else {
148
- ctx.output?.(`❌ Audit failed:\n${r.text}`);
149
- }
150
- }
151
- });
152
-
153
- // /scout: Open-source software discovery & clean-room harvesting
154
- pi.registerCommand('scout', {
155
- description: 'Scout open-source software libraries, audit copyleft licenses & generate clean-room blueprints',
156
- usage: '/scout <feature_or_algorithm>',
157
- handler: async (args, ctx) => {
158
- const feature = args.trim();
159
- if (!feature) {
160
- ctx.output?.('⚠️ Please provide a feature to scout. Example: /scout "Zero-dependency Raft consensus in Rust"');
161
- return;
162
- }
163
- ctx.output?.(`🔭 [IUMBTEMS Scout] Scouting open-source solutions for: "${feature}"...`);
164
- const r = callMcp('iumbtems_oss_scout', { feature }, ctx);
165
- if (r.ok) {
166
- ctx.output?.(r.text);
167
- ctx.output?.('\n✅ Scout complete! Blueprint written to .research/oss_scout_report.md');
168
- } else {
169
- ctx.output?.(`❌ Scout failed:\n${r.text}`);
170
- }
171
- }
172
- });
173
-
174
- // /brainstorming: Lateral creative ideation (divergent, speculative)
175
- pi.registerCommand('brainstorming', {
176
- description: 'Lateral brainstorming: novel feature vectors, paradigm inversions, falsifiable spikes',
177
- usage: '/brainstorming <ambiguous-prompt>',
178
- handler: async (args, ctx) => {
179
- const objective = args.trim() || 'Where do we go from here?';
180
- ctx.output?.(`💡 [IUMBTEMS Brainstorm] Diverging on: "${objective}"...`);
181
- // Skill-local context scaffold (not a tool duplicate) -> then canonical tool.
182
- const scaffold = path.join(PKG_ROOT, 'skills/brainstorming/scripts/brainstorm.py');
183
- const pre = spawnSync(resolveBinary('python3'), [scaffold, '--objective', objective, '--show-context'], {
184
- encoding: 'utf-8',
185
- cwd: ctx.cwd || process.cwd()
186
- });
187
- ctx.output?.(pre.stdout || pre.stderr);
188
- const r = callMcp('iumbtems_brainstorm', { objective }, ctx);
189
- if (r.ok) {
190
- ctx.output?.(r.text);
191
- ctx.output?.('\n✅ Brainstorm complete! Portfolio written to .research/brainstorm_report.md');
192
- } else {
193
- ctx.output?.(`❌ Brainstorm failed:\n${r.text}`);
194
- }
195
- }
196
- });
197
-
198
- // /brainstorm alias
199
- try {
200
- pi.registerCommand('brainstorm', {
201
- description: 'Alias for /brainstorming',
202
- usage: '/brainstorm <ambiguous-prompt>',
203
- handler: async (args, ctx) => {
204
- const cmds = typeof pi.getCommands === 'function' ? pi.getCommands() : {};
205
- const target = cmds?.brainstorming?.handler || cmds?.['brainstorming'];
206
- if (typeof target === 'function') return target(args, ctx);
207
- ctx.output?.('Use /brainstorming <prompt> instead.');
208
- }
209
- });
210
- } catch { /* alias is best-effort across pi/omp versions */ }
211
-
212
- // /darkharvest: Product competitor teardown with harvest verdicts
213
- pi.registerCommand('darkharvest', { description: 'Product competitor teardown: seed inspirations, expand to adjacents, emit harvest verdicts',
214
- usage: '/darkharvest <product-arena> [--seeds <urls>]',
215
- handler: async (args, ctx) => {
216
- const objective = args.trim();
217
- if (!objective) {
218
- ctx.output?.('⚠️ Please provide a product arena. Example: /darkharvest "Paseo-class agent harness" --seeds https://github.com/a/b');
219
- return;
220
- }
221
- ctx.output?.(`🌑 [IUMBTEMS Darkharvest] Tearing down: "${objective}"...`);
222
- const r = callMcp('iumbtems_darkharvest', { objective }, ctx);
223
- if (r.ok) {
224
- ctx.output?.(r.text);
225
- ctx.output?.('\n✅ Darkharvest complete! Matrix written to .research/darkharvest_report.md');
226
- } else {
227
- ctx.output?.(`❌ Darkharvest failed:\n${r.text}`);
228
- }
229
- }
230
- });
231
- }
232
-
233
- // 2. Register Agent Tools (thin forwarders)
234
- if (typeof pi.registerTool === 'function') {
235
- // Tool: iumbtems_verify_quote
236
- pi.registerTool({
237
- name: 'iumbtems_verify_quote',
238
- description: 'Verify that an empirical claim quote matches verbatim text in the source cache',
239
- parameters: {
240
- type: 'object',
241
- properties: {
242
- hash: { type: 'string', description: 'SHA-256 hash of cached source' },
243
- quote: { type: 'string', description: 'Verbatim quote string to verify' }
244
- },
245
- required: ['hash', 'quote']
246
- },
247
- execute: async (args = {}) => {
248
- const r = callMcp('iumbtems_verify_quote', { hash: args.hash, quote: args.quote }, {});
249
- return { content: [{ type: 'text', text: r.text }] };
250
- }
251
- });
252
-
253
- // Tool: iumbtems_config
254
- pi.registerTool({
255
- name: 'iumbtems_config',
256
- description: 'Inspect or modify Epistemic Swarm configuration parameters (search engine, depth, mode) in .research/config.json',
257
- parameters: {
258
- type: 'object',
259
- properties: {
260
- search_engine: { type: 'string', enum: ['duckduckgo', 'brave', 'firecrawl', 'searxng'] },
261
- max_iterations: { type: 'integer', minimum: 1, maximum: 4 },
262
- mode: { type: 'string', enum: ['research', 'audit', 'scout', 'hybrid', 'brainstorm', 'darkharvest'] },
263
- divergence_threshold: { type: 'number', minimum: 0, maximum: 1 },
264
- show: { type: 'boolean', default: false }
265
- }
266
- },
267
- execute: async (args = {}) => {
268
- const r = callMcp('iumbtems_config', parseConfigArgsFromObject(args), {});
269
- return { content: [{ type: 'text', text: r.text }] };
270
- }
271
- });
272
-
273
- // Tool: iumbtems_brainstorm (lateral ideation)
274
- pi.registerTool({
275
- name: 'iumbtems_brainstorm',
276
- description: 'Run lateral brainstorming: novel feature vectors, paradigm inversions, falsifiable spikes',
277
- parameters: {
278
- type: 'object',
279
- properties: {
280
- objective: { type: 'string', description: 'Ambiguous exploration prompt' },
281
- mock_mode: { type: 'boolean', description: 'Mock mode without LLM tokens', default: false }
282
- },
283
- required: ['objective']
284
- },
285
- execute: async (args = {}) => {
286
- const r = callMcp('iumbtems_brainstorm', {
287
- objective: args.objective || 'Where do we go from here?',
288
- mock_claude: Boolean(args.mock_mode)
289
- }, {});
290
- return { content: [{ type: 'text', text: r.text }] };
291
- }
292
- });
293
-
294
- // Tool: iumbtems_darkharvest (competitor teardown)
295
- pi.registerTool({
296
- name: 'iumbtems_darkharvest',
297
- description: 'Product competitor teardown with per-feature harvest verdicts and SPDX attribution',
298
- parameters: {
299
- type: 'object',
300
- properties: {
301
- objective: { type: 'string', description: 'Product arena to tear down' },
302
- seeds: { type: 'array', items: { type: 'string' }, description: 'Seed inspiration repo URLs' },
303
- maxRepos: { type: 'integer', description: 'Cap on total competitors', default: 10 },
304
- mock_mode: { type: 'boolean', description: 'Mock mode without LLM tokens', default: false }
305
- },
306
- required: ['objective']
307
- },
308
- execute: async (args = {}) => {
309
- const r = callMcp('iumbtems_darkharvest', {
310
- objective: args.objective,
311
- seeds: args.seeds,
312
- maxRepos: args.maxRepos,
313
- mock_claude: Boolean(args.mock_mode)
314
- }, {});
315
- return { content: [{ type: 'text', text: r.text }] };
316
- }
317
- });
318
-
319
- // Tool: iumbtems_factory (run-state helper, no script paths)
320
- pi.registerTool({
321
- name: 'iumbtems_factory',
322
- description: 'Drive factory run state: init / phase-add / qa-record / expansion / stop / gate',
323
- parameters: {
324
- type: 'object',
325
- properties: {
326
- command: { type: 'string', enum: ['init', 'phase-add', 'qa-record', 'expansion', 'stop', 'gate'] },
327
- action: { type: 'string', enum: ['open', 'settle', 'approve', 'waive', 'escalate', 'count'], description: 'Gate action (with command: gate)' },
328
- run: { type: 'string', description: 'Factory run name' },
329
- phase: { type: 'string' },
330
- goal: { type: 'string' },
331
- accept: { type: 'string' },
332
- seat: { type: 'string' },
333
- verdict: { type: 'string', enum: ['pass', 'fail', 'conditional'] },
334
- reason: { type: 'string' },
335
- loops: { type: 'integer' },
336
- max_loops: { type: 'integer' },
337
- project_dir: { type: 'string' }
338
- },
339
- required: ['command']
340
- },
341
- execute: async (args = {}) => {
342
- const r = callMcp('iumbtems_factory', args, {});
343
- return { content: [{ type: 'text', text: r.text }] };
344
- }
345
- });
346
- }
347
- }
348
-
349
- /** Map a structured args object onto the iumbtems_config tool contract. */
350
- function parseConfigArgsFromObject(args = {}) {
351
- const out = {};
352
- if (args.search_engine) out.search_engine = args.search_engine;
353
- if (args.max_iterations) out.max_iterations = args.max_iterations;
354
- if (args.mode) out.mode = args.mode;
355
- if (args.divergence_threshold !== undefined) out.divergence_threshold = args.divergence_threshold;
356
- return out;
357
- }
package/hooks/hooks.json DELETED
@@ -1,45 +0,0 @@
1
- {
2
- "hooks": {
3
- "PreToolUse": [
4
- {
5
- "matcher": "WebSearch",
6
- "hooks": [
7
- {
8
- "type": "command",
9
- "command": "echo '{\"hookSpecificOutput\":{\"hookEventName\":\"PreToolUse\",\"permissionDecision\":\"deny\",\"permissionDecisionReason\":\"WebSearch intercepted by epistemic-swarm to enforce verified citation integrity. Use epistemic search (python3 ${CLAUDE_PLUGIN_ROOT}/skills/epistemic_search/scripts/search.py \\\"<query>\\\") instead.\"}}'"
10
- }
11
- ]
12
- },
13
- {
14
- "matcher": "WebFetch",
15
- "hooks": [
16
- {
17
- "type": "command",
18
- "command": "python3 \"${CLAUDE_PLUGIN_ROOT}/skills/epistemic_search/scripts/webcache.py\" gate"
19
- }
20
- ]
21
- }
22
- ],
23
- "PostToolUse": [
24
- {
25
- "matcher": "WebFetch",
26
- "hooks": [
27
- {
28
- "type": "command",
29
- "command": "python3 \"${CLAUDE_PLUGIN_ROOT}/skills/epistemic_search/scripts/webcache.py\" archive"
30
- }
31
- ]
32
- }
33
- ],
34
- "SessionStart": [
35
- {
36
- "hooks": [
37
- {
38
- "type": "command",
39
- "command": "python3 \"${CLAUDE_PLUGIN_ROOT}/skills/epistemic_search/scripts/webcache.py\" stats"
40
- }
41
- ]
42
- }
43
- ]
44
- }
45
- }