@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.
- package/index.ts +1 -0
- package/package.json +63 -139
- package/rpc.ts +1 -0
- package/server.ts +1 -0
- package/src/agents.ts +69 -0
- package/src/continue.ts +40 -0
- package/src/hooks.ts +283 -0
- package/src/panels.tsx +220 -0
- package/src/policy.ts +221 -0
- package/src/pr.ts +37 -0
- package/src/research.ts +63 -0
- package/src/rpc-def.ts +136 -0
- package/src/rpc.ts +331 -0
- package/src/runtime.ts +112 -0
- package/src/server.ts +311 -0
- package/src/session.ts +61 -0
- package/src/tools.ts +61 -0
- package/src/tui.tsx +206 -0
- package/tui.tsx +1 -0
- package/.agents/skills/brainstorming/SKILL.md +0 -19
- package/.agents/skills/code_audit/SKILL.md +0 -19
- package/.agents/skills/darkharvest/SKILL.md +0 -19
- package/.agents/skills/epistemic_search/SKILL.md +0 -19
- package/.agents/skills/factory/SKILL.md +0 -19
- package/.agents/skills/grilling/SKILL.md +0 -19
- package/.agents/skills/oss_scout/SKILL.md +0 -19
- package/.agents/skills/research_cache/SKILL.md +0 -19
- package/.agents/skills/swarm_config/SKILL.md +0 -19
- package/.claude-plugin/marketplace.json +0 -61
- package/.claude-plugin/plugin.json +0 -76
- package/.omp/README.md +0 -39
- package/.omp/SYSTEM.md +0 -17
- package/.omp/commands/audit.md +0 -10
- package/.omp/commands/brainstorming.md +0 -12
- package/.omp/commands/darkharvest.md +0 -11
- package/.omp/commands/domainexpansion.md +0 -9
- package/.omp/commands/factory.md +0 -9
- package/.omp/commands/grill.md +0 -9
- package/.omp/commands/scout.md +0 -10
- package/.omp/commands/swarm-config.md +0 -10
- package/.omp/commands/swarm.md +0 -9
- package/.omp/hooks/post/epistemic-audit.ts +0 -16
- package/.omp/hooks/pre/epistemic-redirect.ts +0 -21
- package/.omp/prompts/brainstorming.md +0 -8
- package/.omp/prompts/swarm.md +0 -8
- package/LICENSE +0 -126
- package/MARKETPLACE.md +0 -130
- package/README.md +0 -403
- package/bin/cli.js +0 -297
- package/config/claude-settings-patch.json +0 -10
- package/config/docker-compose.infra.yml +0 -23
- package/config/domain_packs/biopharma.json +0 -23
- package/config/domain_packs/legal.json +0 -19
- package/config/domain_packs/quant.json +0 -19
- package/config/mcp-research-servers.json +0 -33
- package/config/mcp_launcher.py +0 -153
- package/config/opencode-snippet.json +0 -156
- package/config/searxng_mcp.py +0 -92
- package/extensions/pi/index.js +0 -357
- package/hooks/hooks.json +0 -45
- package/install.sh +0 -473
- package/plugins/antigravity/README.md +0 -72
- package/plugins/antigravity/agents/alpha-thesis.md +0 -36
- package/plugins/antigravity/agents/beta-antithesis.md +0 -35
- package/plugins/antigravity/agents/brainstormer.md +0 -27
- package/plugins/antigravity/agents/code-auditor.md +0 -28
- package/plugins/antigravity/agents/darkharvester.md +0 -30
- package/plugins/antigravity/agents/epistemic-auditor.md +0 -28
- package/plugins/antigravity/agents/manager.md +0 -26
- package/plugins/antigravity/agents/oss-scout.md +0 -27
- package/plugins/antigravity/agents/programmer.md +0 -25
- package/plugins/antigravity/agents/qa-a.md +0 -22
- package/plugins/antigravity/agents/qa-b.md +0 -22
- package/plugins/antigravity/antigravity_hooks.py +0 -265
- package/plugins/antigravity/commands/audit.md +0 -11
- package/plugins/antigravity/commands/brainstorm.md +0 -9
- package/plugins/antigravity/commands/brainstorming.md +0 -10
- package/plugins/antigravity/commands/darkharvest.md +0 -12
- package/plugins/antigravity/commands/domainexpansion.md +0 -12
- package/plugins/antigravity/commands/factory.md +0 -14
- package/plugins/antigravity/commands/grill.md +0 -10
- package/plugins/antigravity/commands/scout.md +0 -11
- package/plugins/antigravity/commands/swarm-config.md +0 -9
- package/plugins/antigravity/commands/swarm.md +0 -12
- package/plugins/antigravity/hook_bus_bridge.js +0 -352
- package/plugins/antigravity/hooks.json +0 -44
- package/plugins/antigravity/mcp_config.json +0 -33
- package/plugins/antigravity/mcp_launcher.py +0 -58
- package/plugins/antigravity/plugin.json +0 -13
- package/plugins/antigravity/rules/AGENTS.md +0 -127
- package/plugins/antigravity/rules/epistemic-integrity.md +0 -16
- package/plugins/antigravity/skills/brainstorming/SKILL.md +0 -19
- package/plugins/antigravity/skills/code_audit/SKILL.md +0 -19
- package/plugins/antigravity/skills/darkharvest/SKILL.md +0 -19
- package/plugins/antigravity/skills/epistemic_search/SKILL.md +0 -19
- package/plugins/antigravity/skills/factory/SKILL.md +0 -19
- package/plugins/antigravity/skills/grilling/SKILL.md +0 -19
- package/plugins/antigravity/skills/oss_scout/SKILL.md +0 -19
- package/plugins/antigravity/skills/research_cache/SKILL.md +0 -19
- package/plugins/antigravity/skills/swarm_config/SKILL.md +0 -19
- package/plugins/codex/AGENTS.md.snippet +0 -10
- package/plugins/codex/README.md +0 -37
- package/plugins/codex/config.toml.snippet +0 -28
- package/plugins/codex/openai.yaml +0 -24
- package/plugins/codex/skills/brainstorming/SKILL.md +0 -19
- package/plugins/codex/skills/code_audit/SKILL.md +0 -19
- package/plugins/codex/skills/darkharvest/SKILL.md +0 -19
- package/plugins/codex/skills/epistemic_search/SKILL.md +0 -19
- package/plugins/codex/skills/factory/SKILL.md +0 -19
- package/plugins/codex/skills/grilling/SKILL.md +0 -19
- package/plugins/codex/skills/oss_scout/SKILL.md +0 -19
- package/plugins/codex/skills/research_cache/SKILL.md +0 -19
- package/plugins/codex/skills/swarm_config/SKILL.md +0 -19
- package/plugins/darkharvest/.claude-plugin/plugin.json +0 -15
- package/plugins/darkharvest/agents/harvest-proponent.md +0 -22
- package/plugins/darkharvest/agents/harvest-redteam.md +0 -20
- package/plugins/darkharvest/evals/teardown-verdict/graders/license-line.md +0 -6
- package/plugins/darkharvest/evals/teardown-verdict/graders/skill-fired.md +0 -5
- package/plugins/darkharvest/evals/teardown-verdict/prompt.md +0 -6
- package/plugins/darkharvest/skills/darkharvest/SKILL.md +0 -70
- package/plugins/darkharvest/skills/darkharvest/scripts/harvest.py +0 -289
- package/plugins/factory/.claude-plugin/plugin.json +0 -15
- package/plugins/factory/agents/factory-manager.md +0 -22
- package/plugins/factory/agents/programmer.md +0 -16
- package/plugins/factory/agents/qa-adversarial.md +0 -17
- package/plugins/factory/agents/qa-functional.md +0 -17
- package/plugins/factory/evals/gate-halt/graders/gates-first.md +0 -6
- package/plugins/factory/evals/gate-halt/graders/skill-fired.md +0 -5
- package/plugins/factory/evals/gate-halt/prompt.md +0 -6
- package/plugins/factory/skills/factory/SKILL.md +0 -61
- package/plugins/factory/skills/factory/scripts/factory.py +0 -300
- package/plugins/gemini/GEMINI.md +0 -16
- package/plugins/gemini/README.md +0 -20
- package/plugins/gemini/commands/audit.toml +0 -6
- package/plugins/gemini/commands/brainstorming.toml +0 -10
- package/plugins/gemini/commands/darkharvest.toml +0 -8
- package/plugins/gemini/commands/domainexpansion.toml +0 -7
- package/plugins/gemini/commands/factory.toml +0 -8
- package/plugins/gemini/commands/grill.toml +0 -6
- package/plugins/gemini/commands/scout.toml +0 -7
- package/plugins/gemini/commands/swarm-config.toml +0 -7
- package/plugins/gemini/commands/swarm.toml +0 -8
- package/plugins/gemini/gemini-extension.json +0 -38
- package/plugins/gemini/hooks/hooks.json +0 -11
- package/plugins/gemini/skills/brainstorming/SKILL.md +0 -19
- package/plugins/gemini/skills/code_audit/SKILL.md +0 -19
- package/plugins/gemini/skills/darkharvest/SKILL.md +0 -19
- package/plugins/gemini/skills/epistemic_search/SKILL.md +0 -19
- package/plugins/gemini/skills/factory/SKILL.md +0 -19
- package/plugins/gemini/skills/grilling/SKILL.md +0 -19
- package/plugins/gemini/skills/oss_scout/SKILL.md +0 -19
- package/plugins/gemini/skills/research_cache/SKILL.md +0 -19
- package/plugins/gemini/skills/swarm_config/SKILL.md +0 -19
- package/plugins/opencode/analysis-bridge.js +0 -620
- package/plugins/opencode/config-io.js +0 -1651
- package/plugins/opencode/dep-health.js +0 -1039
- package/plugins/opencode/hook-bus.js +0 -496
- package/plugins/opencode/index.js +0 -2992
- package/plugins/opencode/tui.js +0 -1551
- package/plugins/opencode/weight-baseline.json +0 -16
- package/plugins/opencode/weight-signals.js +0 -769
- package/plugins/research-cache/.claude-plugin/plugin.json +0 -15
- package/plugins/research-cache/skills/research_cache/SKILL.md +0 -36
- package/plugins/research-cache/skills/research_cache/__init__.py +0 -0
- package/plugins/research-cache/skills/research_cache/hasher.py +0 -302
- package/plugins/socratic-grilling/.claude-plugin/plugin.json +0 -15
- package/plugins/socratic-grilling/skills/grilling/SKILL.md +0 -61
- package/plugins/socratic-grilling/skills/grilling/__init__.py +0 -0
- package/plugins/socratic-grilling/skills/grilling/socratic_tree.py +0 -363
- package/prompts/agent_alpha_thesis.md +0 -70
- package/prompts/agent_beta_antithesis.md +0 -78
- package/prompts/agent_brainstormer.md +0 -143
- package/prompts/agent_code_auditor.md +0 -88
- package/prompts/agent_darkharvest.md +0 -140
- package/prompts/agent_oss_scout.md +0 -78
- package/prompts/antigravity_repo_factcheck.md +0 -143
- package/prompts/base_epistemic_system.md +0 -50
- package/prompts/epistemic_auditor.md +0 -74
- package/prompts/orchestrator.md +0 -70
- package/runner/__init__.py +0 -0
- package/runner/__pycache__/__init__.cpython-311.pyc +0 -0
- package/runner/__pycache__/auctioneer.cpython-311.pyc +0 -0
- package/runner/__pycache__/auditor_engine.cpython-311.pyc +0 -0
- package/runner/__pycache__/claim_store.cpython-311.pyc +0 -0
- package/runner/__pycache__/claim_witness.cpython-311.pyc +0 -0
- package/runner/__pycache__/darkharvest_claims.cpython-311.pyc +0 -0
- package/runner/__pycache__/errors.cpython-311.pyc +0 -0
- package/runner/__pycache__/living_dossiers.cpython-311.pyc +0 -0
- package/runner/__pycache__/mcp_protocol.cpython-311.pyc +0 -0
- package/runner/__pycache__/mcp_server.cpython-311.pyc +0 -0
- package/runner/__pycache__/path_safety.cpython-311.pyc +0 -0
- package/runner/__pycache__/pcrb.cpython-311.pyc +0 -0
- package/runner/__pycache__/pcrb_verify.cpython-311.pyc +0 -0
- package/runner/__pycache__/preflight.cpython-311.pyc +0 -0
- package/runner/__pycache__/refinement.cpython-311.pyc +0 -0
- package/runner/__pycache__/research_swarm.cpython-311.pyc +0 -0
- package/runner/__pycache__/retrieval_log.cpython-311.pyc +0 -0
- package/runner/__pycache__/schema_validate.cpython-311.pyc +0 -0
- package/runner/__pycache__/schemas.cpython-311.pyc +0 -0
- package/runner/__pycache__/state_machine.cpython-311.pyc +0 -0
- package/runner/antigravity_hooks.py +0 -265
- package/runner/auctioneer.py +0 -169
- package/runner/auditor_engine.py +0 -711
- package/runner/claim_store.py +0 -417
- package/runner/claim_witness.py +0 -412
- package/runner/darkharvest_claims.py +0 -358
- package/runner/errors.py +0 -51
- package/runner/living_dossiers.py +0 -395
- package/runner/mcp_protocol.py +0 -188
- package/runner/mcp_server.py +0 -1447
- package/runner/path_safety.py +0 -62
- package/runner/pcrb.py +0 -290
- package/runner/pcrb_verify.py +0 -267
- package/runner/preflight.py +0 -1011
- package/runner/refinement.py +0 -580
- package/runner/research_swarm.py +0 -1848
- package/runner/retrieval_log.py +0 -90
- package/runner/schema_validate.py +0 -193
- package/runner/schemas.py +0 -630
- package/runner/state_machine.py +0 -463
- package/runner/tests/__pycache__/test_analysis_bridge.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_antigravity_plugin.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_auction_order.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_backends.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_bet1_spike.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_claim_store.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_claim_witness.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_claude_plugin.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_config_schema.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_contract_tooling.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_darkharvest_audit.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_dep_health.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_domain_packs.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_dossier_contract.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_factory.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_fleet_seam.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_frontier_concurrency.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_frontier_mirror_standalone.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_grounding.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_hardening_contract.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_hook_bus.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_living_dossiers.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_manifest_concurrency.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_mcp_server.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_nk_hardening.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_opencode_ux.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_opencode_v2_registrars.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_pcrb.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_phase08_waiver_reopens.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_refinement.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_search_anomaly.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_search_provider.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_search_provider_plugin.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_swarm.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_swarm_config.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_sweep_regressions.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_webcache.cpython-311.pyc +0 -0
- package/runner/tests/__pycache__/test_weight_signals.cpython-311.pyc +0 -0
- package/runner/tests/fixtures/auction_objective.json +0 -35
- package/runner/tests/fixtures/borderline_claims.json +0 -27
- package/runner/tests/fixtures/config_validation_cases.json +0 -276
- package/runner/tests/fixtures/ddg_anomaly_page.html +0 -176
- package/runner/tests/fixtures/ddg_results_page.html +0 -28
- package/runner/tests/fixtures/divergence_objectives.json +0 -31
- package/runner/tests/test_analysis_bridge.py +0 -450
- package/runner/tests/test_antigravity_plugin.py +0 -361
- package/runner/tests/test_auction_order.py +0 -173
- package/runner/tests/test_backends.py +0 -457
- package/runner/tests/test_bet1_spike.py +0 -95
- package/runner/tests/test_claim_store.py +0 -162
- package/runner/tests/test_claim_witness.py +0 -186
- package/runner/tests/test_claude_plugin.py +0 -170
- package/runner/tests/test_config_schema.py +0 -879
- package/runner/tests/test_contract_tooling.py +0 -312
- package/runner/tests/test_darkharvest_audit.py +0 -395
- package/runner/tests/test_dep_health.py +0 -595
- package/runner/tests/test_domain_packs.py +0 -217
- package/runner/tests/test_dossier_contract.py +0 -196
- package/runner/tests/test_factory.py +0 -258
- package/runner/tests/test_fleet_seam.py +0 -113
- package/runner/tests/test_frontier_concurrency.py +0 -288
- package/runner/tests/test_frontier_mirror_standalone.py +0 -156
- package/runner/tests/test_grounding.py +0 -183
- package/runner/tests/test_hardening_contract.py +0 -391
- package/runner/tests/test_hook_bus.py +0 -956
- package/runner/tests/test_living_dossiers.py +0 -204
- package/runner/tests/test_manifest_concurrency.py +0 -187
- package/runner/tests/test_mcp_server.py +0 -257
- package/runner/tests/test_nk_hardening.py +0 -1046
- package/runner/tests/test_opencode_ux.py +0 -2438
- package/runner/tests/test_opencode_v2_registrars.py +0 -2157
- package/runner/tests/test_pcrb.py +0 -240
- package/runner/tests/test_phase08_waiver_reopens.py +0 -539
- package/runner/tests/test_refinement.py +0 -255
- package/runner/tests/test_search_anomaly.py +0 -342
- package/runner/tests/test_search_provider.py +0 -1534
- package/runner/tests/test_search_provider_plugin.py +0 -401
- package/runner/tests/test_swarm.py +0 -444
- package/runner/tests/test_swarm_config.py +0 -520
- package/runner/tests/test_sweep_regressions.py +0 -453
- package/runner/tests/test_webcache.py +0 -271
- package/runner/tests/test_weight_signals.py +0 -401
- package/schemas/alpha_dossier.schema.json +0 -204
- package/schemas/audit_report.schema.json +0 -79
- package/schemas/beta_dossier.schema.json +0 -214
- package/schemas/config.schema.json +0 -311
- package/schemas/frontier.schema.json +0 -61
- package/schemas/manifest.schema.json +0 -49
- package/schemas/scope_manifest.schema.json +0 -47
- package/scripts/__pycache__/bet1_advisory_spike.cpython-311.pyc +0 -0
- package/scripts/__pycache__/build_adapters.cpython-311.pyc +0 -0
- package/scripts/__pycache__/check_docs.cpython-311.pyc +0 -0
- package/scripts/__pycache__/divergence_experiment.cpython-311.pyc +0 -0
- package/scripts/__pycache__/gen_schemas.cpython-311.pyc +0 -0
- package/scripts/auction_experiment.py +0 -188
- package/scripts/bet1_advisory_spike.py +0 -442
- package/scripts/build_adapters.py +0 -417
- package/scripts/check_docs.py +0 -66
- package/scripts/divergence_experiment.py +0 -214
- package/scripts/gen_schemas.py +0 -69
- package/skills/brainstorming/SKILL.md +0 -106
- package/skills/brainstorming/__init__.py +0 -1
- package/skills/brainstorming/scripts/brainstorm.py +0 -201
- package/skills/code_audit/SKILL.md +0 -45
- package/skills/darkharvest/SKILL.md +0 -70
- package/skills/darkharvest/scripts/harvest.py +0 -289
- package/skills/epistemic_search/SKILL.md +0 -67
- package/skills/epistemic_search/__init__.py +0 -1
- package/skills/epistemic_search/scripts/__pycache__/search.cpython-311.pyc +0 -0
- package/skills/epistemic_search/scripts/fetch.py +0 -156
- package/skills/epistemic_search/scripts/search.py +0 -551
- package/skills/epistemic_search/scripts/webcache.py +0 -339
- package/skills/factory/SKILL.md +0 -61
- package/skills/factory/scripts/factory.py +0 -300
- package/skills/grilling/SKILL.md +0 -61
- package/skills/grilling/__init__.py +0 -0
- package/skills/grilling/__pycache__/__init__.cpython-311.pyc +0 -0
- package/skills/grilling/__pycache__/socratic_tree.cpython-311.pyc +0 -0
- package/skills/grilling/socratic_tree.py +0 -363
- package/skills/oss_scout/SKILL.md +0 -49
- package/skills/research_cache/SKILL.md +0 -36
- package/skills/research_cache/__init__.py +0 -0
- package/skills/research_cache/__pycache__/__init__.cpython-311.pyc +0 -0
- package/skills/research_cache/__pycache__/hasher.cpython-311.pyc +0 -0
- package/skills/research_cache/hasher.py +0 -302
- package/skills/swarm_config/SKILL.md +0 -178
- package/skills/swarm_config/__init__.py +0 -35
- package/skills/swarm_config/__pycache__/__init__.cpython-311.pyc +0 -0
- package/skills/swarm_config/__pycache__/configure.cpython-311.pyc +0 -0
- 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
|
-
}
|
package/config/searxng_mcp.py
DELETED
|
@@ -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()
|
package/extensions/pi/index.js
DELETED
|
@@ -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
|
-
}
|