@monoes/monomindcli 1.19.0 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude/agents/github/issue-tracker.md +0 -2
- package/.claude/agents/github/pr-manager.md +0 -2
- package/.claude/agents/github/repo-architect.md +3 -11
- package/.claude/agents/goal/goal-planner.md +0 -1
- package/.claude/commands/github/issue-tracker.md +0 -2
- package/.claude/commands/github/pr-manager.md +0 -2
- package/.claude/commands/github/repo-architect.md +3 -10
- package/.claude/commands/mastermind/help.md +3 -3
- package/.claude/commands/workflows/README.md +0 -1
- package/.claude/commands/workflows/workflow-create.md +0 -1
- package/.claude/commands/workflows/workflow-execute.md +1 -3
- package/.claude/commands/workflows/workflow-export.md +0 -2
- package/.claude/helpers/handlers/agent-start-handler.cjs +18 -1
- package/.claude/helpers/handlers/edit-handler.cjs +15 -0
- package/.claude/helpers/handlers/gates-handler.cjs +2 -8
- package/.claude/helpers/handlers/route-handler.cjs +149 -7
- package/.claude/helpers/handlers/session-handler.cjs +47 -25
- package/.claude/helpers/handlers/session-restore-handler.cjs +80 -43
- package/.claude/helpers/handlers/task-handler.cjs +8 -4
- package/.claude/helpers/hook-handler.cjs +69 -16
- package/.claude/helpers/intelligence.cjs +100 -9
- package/.claude/helpers/router.cjs +78 -5
- package/.claude/helpers/skill-registry.json +0 -189
- package/.claude/helpers/token-tracker.cjs +10 -0
- package/.claude/skills/github-toolkit/SKILL.md +60 -0
- package/.claude/skills/hive-mind-advanced/SKILL.md +0 -15
- package/.claude/skills/hooks-automation/SKILL.md +0 -1
- package/.claude/skills/mastermind-skills/_protocol.md +1 -1
- package/.claude/skills/mastermind-skills/build.md +1 -2
- package/.claude/skills/memory-toolkit/SKILL.md +75 -0
- package/.claude/skills/specialagent/SKILL.md +2 -4
- package/.claude/skills/swarm-advanced/SKILL.md +0 -1
- package/README.md +13 -17
- package/dist/src/autopilot-state.d.ts.map +1 -1
- package/dist/src/autopilot-state.js +4 -5
- package/dist/src/autopilot-state.js.map +1 -1
- package/dist/src/browser/dashboard/server.d.ts.map +1 -1
- package/dist/src/browser/dashboard/server.js +129 -2
- package/dist/src/browser/dashboard/server.js.map +1 -1
- package/dist/src/browser/dashboard/ui.html +214 -1764
- package/dist/src/capabilities/index.d.ts +0 -2
- package/dist/src/capabilities/index.d.ts.map +1 -1
- package/dist/src/capabilities/index.js +0 -1
- package/dist/src/capabilities/index.js.map +1 -1
- package/dist/src/commands/agent-lifecycle.d.ts.map +1 -1
- package/dist/src/commands/agent-lifecycle.js +2 -6
- package/dist/src/commands/agent-lifecycle.js.map +1 -1
- package/dist/src/commands/analyze.d.ts +0 -4
- package/dist/src/commands/analyze.d.ts.map +1 -1
- package/dist/src/commands/analyze.js +1 -29
- package/dist/src/commands/analyze.js.map +1 -1
- package/dist/src/commands/browse-workflow.js +2 -2
- package/dist/src/commands/completions.d.ts.map +1 -1
- package/dist/src/commands/completions.js +3 -22
- package/dist/src/commands/completions.js.map +1 -1
- package/dist/src/commands/config.d.ts.map +1 -1
- package/dist/src/commands/config.js +0 -6
- package/dist/src/commands/config.js.map +1 -1
- package/dist/src/commands/doctor-project-checks.d.ts +12 -2
- package/dist/src/commands/doctor-project-checks.d.ts.map +1 -1
- package/dist/src/commands/doctor-project-checks.js +130 -22
- package/dist/src/commands/doctor-project-checks.js.map +1 -1
- package/dist/src/commands/doctor.d.ts.map +1 -1
- package/dist/src/commands/doctor.js +6 -5
- package/dist/src/commands/doctor.js.map +1 -1
- package/dist/src/commands/guidance.d.ts +5 -1
- package/dist/src/commands/guidance.d.ts.map +1 -1
- package/dist/src/commands/guidance.js +11 -556
- package/dist/src/commands/guidance.js.map +1 -1
- package/dist/src/commands/hive-mind-comms.d.ts.map +1 -1
- package/dist/src/commands/hive-mind-comms.js +11 -4
- package/dist/src/commands/hive-mind-comms.js.map +1 -1
- package/dist/src/commands/hive-mind.d.ts +4 -4
- package/dist/src/commands/hive-mind.d.ts.map +1 -1
- package/dist/src/commands/hive-mind.js +9 -6
- package/dist/src/commands/hive-mind.js.map +1 -1
- package/dist/src/commands/hooks-formatting.d.ts +1 -5
- package/dist/src/commands/hooks-formatting.d.ts.map +1 -1
- package/dist/src/commands/hooks-formatting.js +1 -18
- package/dist/src/commands/hooks-formatting.js.map +1 -1
- package/dist/src/commands/hooks-workers.d.ts +1 -1
- package/dist/src/commands/hooks-workers.d.ts.map +1 -1
- package/dist/src/commands/hooks-workers.js +82 -330
- package/dist/src/commands/hooks-workers.js.map +1 -1
- package/dist/src/commands/index.d.ts +0 -5
- package/dist/src/commands/index.d.ts.map +1 -1
- package/dist/src/commands/index.js +0 -45
- package/dist/src/commands/index.js.map +1 -1
- package/dist/src/commands/init-wizard.js +1 -1
- package/dist/src/commands/init-wizard.js.map +1 -1
- package/dist/src/commands/init.d.ts.map +1 -1
- package/dist/src/commands/init.js +4 -24
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/neural-core.js +11 -11
- package/dist/src/commands/neural-core.js.map +1 -1
- package/dist/src/commands/neural-optimize.d.ts.map +1 -1
- package/dist/src/commands/neural-optimize.js +9 -11
- package/dist/src/commands/neural-optimize.js.map +1 -1
- package/dist/src/commands/neural-registry.js +10 -10
- package/dist/src/commands/neural-registry.js.map +1 -1
- package/dist/src/commands/providers.d.ts.map +1 -1
- package/dist/src/commands/providers.js +90 -1
- package/dist/src/commands/providers.js.map +1 -1
- package/dist/src/commands/search-universal.d.ts +7 -1
- package/dist/src/commands/search-universal.d.ts.map +1 -1
- package/dist/src/commands/search-universal.js +59 -5
- package/dist/src/commands/search-universal.js.map +1 -1
- package/dist/src/commands/security-cve.d.ts.map +1 -1
- package/dist/src/commands/security-cve.js +3 -5
- package/dist/src/commands/security-cve.js.map +1 -1
- package/dist/src/commands/session.d.ts.map +1 -1
- package/dist/src/commands/session.js +143 -3
- package/dist/src/commands/session.js.map +1 -1
- package/dist/src/commands/start.d.ts.map +1 -1
- package/dist/src/commands/start.js +0 -18
- package/dist/src/commands/start.js.map +1 -1
- package/dist/src/commands/swarm.d.ts.map +1 -1
- package/dist/src/commands/swarm.js +112 -65
- package/dist/src/commands/swarm.js.map +1 -1
- package/dist/src/consensus/audit-writer.d.ts.map +1 -1
- package/dist/src/consensus/audit-writer.js +43 -1
- package/dist/src/consensus/audit-writer.js.map +1 -1
- package/dist/src/consensus/tally.d.ts +19 -0
- package/dist/src/consensus/tally.d.ts.map +1 -0
- package/dist/src/consensus/tally.js +34 -0
- package/dist/src/consensus/tally.js.map +1 -0
- package/dist/src/index.d.ts +3 -2
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +9 -12
- package/dist/src/index.js.map +1 -1
- package/dist/src/init/claudemd-generator.d.ts.map +1 -1
- package/dist/src/init/claudemd-generator.js +10 -14
- package/dist/src/init/claudemd-generator.js.map +1 -1
- package/dist/src/init/executor.d.ts.map +1 -1
- package/dist/src/init/executor.js +39 -86
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/settings-generator.d.ts.map +1 -1
- package/dist/src/init/settings-generator.js +0 -12
- package/dist/src/init/settings-generator.js.map +1 -1
- package/dist/src/init/statusline-generator.d.ts.map +1 -1
- package/dist/src/init/statusline-generator.js +62 -0
- package/dist/src/init/statusline-generator.js.map +1 -1
- package/dist/src/init/types.d.ts +2 -6
- package/dist/src/init/types.d.ts.map +1 -1
- package/dist/src/init/types.js +0 -3
- package/dist/src/init/types.js.map +1 -1
- package/dist/src/knowledge/document-pipeline.d.ts.map +1 -1
- package/dist/src/knowledge/document-pipeline.js +18 -8
- package/dist/src/knowledge/document-pipeline.js.map +1 -1
- package/dist/src/mcp-client.d.ts.map +1 -1
- package/dist/src/mcp-client.js +0 -2
- package/dist/src/mcp-client.js.map +1 -1
- package/dist/src/mcp-server.d.ts.map +1 -1
- package/dist/src/mcp-server.js +12 -14
- package/dist/src/mcp-server.js.map +1 -1
- package/dist/src/mcp-tools/coherence/coherence-check.d.ts.map +1 -1
- package/dist/src/mcp-tools/coherence/coherence-check.js +1 -19
- package/dist/src/mcp-tools/coherence/coherence-check.js.map +1 -1
- package/dist/src/mcp-tools/coherence/types.d.ts +21 -20
- package/dist/src/mcp-tools/coherence/types.d.ts.map +1 -1
- package/dist/src/mcp-tools/coherence/types.js +3 -18
- package/dist/src/mcp-tools/coherence/types.js.map +1 -1
- package/dist/src/mcp-tools/embeddings-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/embeddings-tools.js +1 -7
- package/dist/src/mcp-tools/embeddings-tools.js.map +1 -1
- package/dist/src/mcp-tools/graphify-tools.js +2 -2
- package/dist/src/mcp-tools/graphify-tools.js.map +1 -1
- package/dist/src/mcp-tools/guidance-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/guidance-tools.js +7 -17
- package/dist/src/mcp-tools/guidance-tools.js.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.d.ts +8 -1
- package/dist/src/mcp-tools/hive-mind-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hive-mind-tools.js +174 -38
- package/dist/src/mcp-tools/hive-mind-tools.js.map +1 -1
- package/dist/src/mcp-tools/hooks-advanced.d.ts +18 -0
- package/dist/src/mcp-tools/hooks-advanced.d.ts.map +1 -0
- package/dist/src/mcp-tools/hooks-advanced.js +25 -0
- package/dist/src/mcp-tools/hooks-advanced.js.map +1 -0
- package/dist/src/mcp-tools/hooks-intelligence.d.ts +4 -8
- package/dist/src/mcp-tools/hooks-intelligence.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-intelligence.js +33 -482
- package/dist/src/mcp-tools/hooks-intelligence.js.map +1 -1
- package/dist/src/mcp-tools/hooks-routing.d.ts +1 -0
- package/dist/src/mcp-tools/hooks-routing.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-routing.js +51 -43
- package/dist/src/mcp-tools/hooks-routing.js.map +1 -1
- package/dist/src/mcp-tools/hooks-synthesis.d.ts +31 -0
- package/dist/src/mcp-tools/hooks-synthesis.d.ts.map +1 -0
- package/dist/src/mcp-tools/hooks-synthesis.js +196 -0
- package/dist/src/mcp-tools/hooks-synthesis.js.map +1 -0
- package/dist/src/mcp-tools/hooks-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-tools.js +10 -8
- package/dist/src/mcp-tools/hooks-tools.js.map +1 -1
- package/dist/src/mcp-tools/index.d.ts +0 -1
- package/dist/src/mcp-tools/index.d.ts.map +1 -1
- package/dist/src/mcp-tools/index.js +0 -1
- package/dist/src/mcp-tools/index.js.map +1 -1
- package/dist/src/mcp-tools/memory-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/memory-tools.js +20 -29
- package/dist/src/mcp-tools/memory-tools.js.map +1 -1
- package/dist/src/mcp-tools/monograph-tools.d.ts +6 -0
- package/dist/src/mcp-tools/monograph-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/monograph-tools.js +78 -220
- package/dist/src/mcp-tools/monograph-tools.js.map +1 -1
- package/dist/src/mcp-tools/neural-tools.d.ts +9 -4
- package/dist/src/mcp-tools/neural-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/neural-tools.js +242 -506
- package/dist/src/mcp-tools/neural-tools.js.map +1 -1
- package/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.d.ts +12 -12
- package/dist/src/mcp-tools/quality/security-compliance/detect-secrets.d.ts +4 -4
- package/dist/src/mcp-tools/security-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/security-tools.js +103 -0
- package/dist/src/mcp-tools/security-tools.js.map +1 -1
- package/dist/src/memory/intelligence.d.ts +2 -1
- package/dist/src/memory/intelligence.d.ts.map +1 -1
- package/dist/src/memory/intelligence.js +56 -43
- package/dist/src/memory/intelligence.js.map +1 -1
- package/dist/src/memory/memory-bridge.d.ts.map +1 -1
- package/dist/src/memory/memory-bridge.js +14 -9
- package/dist/src/memory/memory-bridge.js.map +1 -1
- package/dist/src/memory/memory-read.d.ts.map +1 -1
- package/dist/src/memory/memory-read.js +1 -19
- package/dist/src/memory/memory-read.js.map +1 -1
- package/dist/src/orgrt/types.d.ts +847 -0
- package/dist/src/orgrt/types.d.ts.map +1 -0
- package/dist/src/orgrt/types.js +51 -0
- package/dist/src/orgrt/types.js.map +1 -0
- package/dist/src/parser.d.ts.map +1 -1
- package/dist/src/parser.js +31 -5
- package/dist/src/parser.js.map +1 -1
- package/dist/src/suggest.d.ts.map +1 -1
- package/dist/src/suggest.js +1 -7
- package/dist/src/suggest.js.map +1 -1
- package/dist/src/transfer/store/discovery.d.ts +3 -2
- package/dist/src/transfer/store/discovery.d.ts.map +1 -1
- package/dist/src/transfer/store/discovery.js +22 -70
- package/dist/src/transfer/store/discovery.js.map +1 -1
- package/dist/src/ui/collector.mjs +69 -44
- package/dist/src/ui/dashboard.html +112 -25
- package/dist/src/ui/orgs.html +54 -0
- package/dist/src/ui/server.mjs +87 -12
- package/dist/src/update/checker.d.ts.map +1 -1
- package/dist/src/update/checker.js +0 -1
- package/dist/src/update/checker.js.map +1 -1
- package/dist/src/utils/cosine-similarity.d.ts +22 -0
- package/dist/src/utils/cosine-similarity.d.ts.map +1 -0
- package/dist/src/utils/cosine-similarity.js +38 -0
- package/dist/src/utils/cosine-similarity.js.map +1 -0
- package/dist/src/utils/input-guards.d.ts +51 -0
- package/dist/src/utils/input-guards.d.ts.map +1 -0
- package/dist/src/utils/input-guards.js +223 -0
- package/dist/src/utils/input-guards.js.map +1 -0
- package/dist/src/utils/json-file.d.ts +33 -0
- package/dist/src/utils/json-file.d.ts.map +1 -0
- package/dist/src/utils/json-file.js +57 -0
- package/dist/src/utils/json-file.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +11 -7
- package/scripts/setup-ipfs-registry.md +14 -15
- package/scripts/sync-claude-assets.sh +16 -20
- package/.claude/agents/generated/case-analyst.md +0 -50
- package/.claude/agents/generated/channel-intelligence-director.md +0 -87
- package/.claude/agents/generated/chief-growth-officer.md +0 -88
- package/.claude/agents/generated/churn-analyst.md +0 -53
- package/.claude/agents/generated/code-reviewer.md +0 -55
- package/.claude/agents/generated/code-validator.md +0 -57
- package/.claude/agents/generated/complexity-scanner.md +0 -56
- package/.claude/agents/generated/content-seo-strategist.md +0 -90
- package/.claude/agents/generated/copy-editor.md +0 -45
- package/.claude/agents/generated/court-reporter.md +0 -50
- package/.claude/agents/generated/defender.md +0 -51
- package/.claude/agents/generated/devbot-orchestrator.md +0 -58
- package/.claude/agents/generated/devbot-planner.md +0 -63
- package/.claude/agents/generated/developer-community-strategist.md +0 -91
- package/.claude/agents/generated/editor-in-chief.md +0 -45
- package/.claude/agents/generated/fact-checker.md +0 -45
- package/.claude/agents/generated/impact-assessor.md +0 -54
- package/.claude/agents/generated/judge.md +0 -51
- package/.claude/agents/generated/outreach-partnership-strategist.md +0 -90
- package/.claude/agents/generated/prosecutor.md +0 -51
- package/.claude/agents/generated/reporter.md +0 -45
- package/.claude/agents/generated/social-media-strategist.md +0 -91
- package/.claude/agents/generated/video-visual-strategist.md +0 -90
- package/.claude/agents/reengineer-squad/boss.md +0 -113
- package/.claude/agents/reengineer-squad/critic-architect.md +0 -132
- package/.claude/agents/reengineer-squad/git-manager.md +0 -145
- package/.claude/agents/reengineer-squad/idea-generator.md +0 -95
- package/.claude/agents/reengineer-squad/implementer.md +0 -112
- package/.claude/agents/reengineer-squad/integration-planner.md +0 -112
- package/.claude/agents/reengineer-squad/source-analyst.md +0 -103
- package/.claude/agents/reengineer-squad/target-analyst.md +0 -118
- package/.claude/agents/reengineer-squad/tester.md +0 -105
- package/.claude/agents/sparc/architecture.md +0 -453
- package/.claude/agents/sparc/pseudocode.md +0 -299
- package/.claude/agents/sparc/refinement.md +0 -504
- package/.claude/agents/sparc/specification.md +0 -258
- package/.claude/agents/templates/implementer-sparc-coder.md +0 -231
- package/.claude/commands/sparc/analyzer.md +0 -35
- package/.claude/commands/sparc/architect.md +0 -36
- package/.claude/commands/sparc/ask.md +0 -56
- package/.claude/commands/sparc/batch-executor.md +0 -37
- package/.claude/commands/sparc/code.md +0 -48
- package/.claude/commands/sparc/coder.md +0 -37
- package/.claude/commands/sparc/debug.md +0 -42
- package/.claude/commands/sparc/debugger.md +0 -37
- package/.claude/commands/sparc/designer.md +0 -36
- package/.claude/commands/sparc/devops.md +0 -68
- package/.claude/commands/sparc/docs-writer.md +0 -39
- package/.claude/commands/sparc/documenter.md +0 -37
- package/.claude/commands/sparc/innovator.md +0 -37
- package/.claude/commands/sparc/integration.md +0 -42
- package/.claude/commands/sparc/mcp.md +0 -76
- package/.claude/commands/sparc/memory-manager.md +0 -57
- package/.claude/commands/sparc/optimizer.md +0 -37
- package/.claude/commands/sparc/orchestrator.md +0 -70
- package/.claude/commands/sparc/post-deployment-monitoring-mode.md +0 -42
- package/.claude/commands/sparc/refinement-optimization-mode.md +0 -42
- package/.claude/commands/sparc/researcher.md +0 -37
- package/.claude/commands/sparc/reviewer.md +0 -37
- package/.claude/commands/sparc/security-review.md +0 -39
- package/.claude/commands/sparc/sparc-modes.md +0 -120
- package/.claude/commands/sparc/sparc.md +0 -71
- package/.claude/commands/sparc/spec-pseudocode.md +0 -39
- package/.claude/commands/sparc/supabase-admin.md +0 -301
- package/.claude/commands/sparc/swarm-coordinator.md +0 -50
- package/.claude/commands/sparc/tdd.md +0 -37
- package/.claude/commands/sparc/tester.md +0 -37
- package/.claude/commands/sparc/tutorial.md +0 -38
- package/.claude/commands/sparc/workflow-manager.md +0 -37
- package/.claude/commands/sparc.md +0 -112
- package/.claude/skills/sparc-methodology/SKILL.md +0 -950
- package/dist/src/capabilities/enrichment.d.ts +0 -44
- package/dist/src/capabilities/enrichment.d.ts.map +0 -1
- package/dist/src/capabilities/enrichment.js +0 -141
- package/dist/src/capabilities/enrichment.js.map +0 -1
- package/dist/src/commands/analyze-boundaries.d.ts +0 -14
- package/dist/src/commands/analyze-boundaries.d.ts.map +0 -1
- package/dist/src/commands/analyze-boundaries.js +0 -295
- package/dist/src/commands/analyze-boundaries.js.map +0 -1
- package/dist/src/commands/analyze-graph.d.ts +0 -14
- package/dist/src/commands/analyze-graph.d.ts.map +0 -1
- package/dist/src/commands/analyze-graph.js +0 -304
- package/dist/src/commands/analyze-graph.js.map +0 -1
- package/dist/src/commands/claims.d.ts +0 -10
- package/dist/src/commands/claims.d.ts.map +0 -1
- package/dist/src/commands/claims.js +0 -650
- package/dist/src/commands/claims.js.map +0 -1
- package/dist/src/commands/daemon.d.ts +0 -8
- package/dist/src/commands/daemon.d.ts.map +0 -1
- package/dist/src/commands/daemon.js +0 -681
- package/dist/src/commands/daemon.js.map +0 -1
- package/dist/src/commands/enrich.d.ts +0 -10
- package/dist/src/commands/enrich.d.ts.map +0 -1
- package/dist/src/commands/enrich.js +0 -58
- package/dist/src/commands/enrich.js.map +0 -1
- package/dist/src/commands/issues.d.ts +0 -21
- package/dist/src/commands/issues.d.ts.map +0 -1
- package/dist/src/commands/issues.js +0 -575
- package/dist/src/commands/issues.js.map +0 -1
- package/dist/src/commands/workflow.d.ts +0 -8
- package/dist/src/commands/workflow.d.ts.map +0 -1
- package/dist/src/commands/workflow.js +0 -575
- package/dist/src/commands/workflow.js.map +0 -1
- package/dist/src/consensus/vote-signer.d.ts +0 -36
- package/dist/src/consensus/vote-signer.d.ts.map +0 -1
- package/dist/src/consensus/vote-signer.js +0 -88
- package/dist/src/consensus/vote-signer.js.map +0 -1
- package/dist/src/mcp-tools/workflow-tools.d.ts +0 -8
- package/dist/src/mcp-tools/workflow-tools.d.ts.map +0 -1
- package/dist/src/mcp-tools/workflow-tools.js +0 -717
- package/dist/src/mcp-tools/workflow-tools.js.map +0 -1
- package/dist/src/services/claim-service.d.ts +0 -198
- package/dist/src/services/claim-service.d.ts.map +0 -1
- package/dist/src/services/claim-service.js +0 -890
- package/dist/src/services/claim-service.js.map +0 -1
- package/dist/src/services/headless-worker-executor.d.ts +0 -311
- package/dist/src/services/headless-worker-executor.d.ts.map +0 -1
- package/dist/src/services/headless-worker-executor.js +0 -1183
- package/dist/src/services/headless-worker-executor.js.map +0 -1
- package/dist/src/services/worker-daemon.d.ts +0 -230
- package/dist/src/services/worker-daemon.d.ts.map +0 -1
- package/dist/src/services/worker-daemon.js +0 -1350
- package/dist/src/services/worker-daemon.js.map +0 -1
- package/dist/src/ui/.monomind/capture/active-run.json +0 -1
- package/dist/src/ui/.monomind/orgs/system-trial-qa/runs/real-events-1782290897.convs.jsonl +0 -3
- package/dist/src/ui/.monomind/orgs/system-trial-qa/runs/real-events-1782290897.jsonl +0 -11
- package/dist/src/ui/.monomind/orgs/system-trial-qa/runs/rigid-qa-restart-1782288201.jsonl +0 -540
- package/dist/src/ui/.monomind/orgs/system-trial-qa-threads.jsonl +0 -3
- package/dist/src/ui/.monomind/orgs/test-event-fix/runs/rigid-qa-restart-1782288201.jsonl +0 -2
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* VoteSigner (Task 36)
|
|
3
|
-
*
|
|
4
|
-
* HMAC-SHA256 signing and verification for consensus votes.
|
|
5
|
-
*/
|
|
6
|
-
import { createHmac, timingSafeEqual } from 'crypto';
|
|
7
|
-
/** Max depth for canonicalize() to prevent stack overflow on deeply nested objects. */
|
|
8
|
-
const MAX_CANONICALIZE_DEPTH = 32;
|
|
9
|
-
/** Cap string inputs to prevent OOM when hashing very long strings. */
|
|
10
|
-
const MAX_INPUT_LEN = 1024;
|
|
11
|
-
/** Cap votes array to prevent OOM in weightedTally. */
|
|
12
|
-
const MAX_VOTES = 1000;
|
|
13
|
-
/**
|
|
14
|
-
* Derive a signing key from a swarmId and session secret using HMAC-SHA256.
|
|
15
|
-
*/
|
|
16
|
-
export function deriveSigningKey(swarmId, sessionSecret) {
|
|
17
|
-
return createHmac('sha256', sessionSecret.slice(0, MAX_INPUT_LEN)).update(swarmId.slice(0, MAX_INPUT_LEN)).digest();
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Sign a vote, producing a hex-encoded HMAC-SHA256 signature.
|
|
21
|
-
*/
|
|
22
|
-
function canonicalize(val, depth = 0) {
|
|
23
|
-
// Guard against deeply-nested objects that would overflow the call stack.
|
|
24
|
-
if (depth > MAX_CANONICALIZE_DEPTH)
|
|
25
|
-
return '"[MaxDepth]"';
|
|
26
|
-
if (val === null || typeof val !== 'object')
|
|
27
|
-
return JSON.stringify(val);
|
|
28
|
-
if (Array.isArray(val))
|
|
29
|
-
return '[' + val.map(item => canonicalize(item, depth + 1)).join(',') + ']';
|
|
30
|
-
const sorted = Object.keys(val).sort().map(k => JSON.stringify(k) + ':' + canonicalize(val[k], depth + 1));
|
|
31
|
-
return '{' + sorted.join(',') + '}';
|
|
32
|
-
}
|
|
33
|
-
export function signVote(agentId, vote, decisionId, key) {
|
|
34
|
-
// Cap string fields to prevent OOM when hashing attacker-supplied inputs.
|
|
35
|
-
const safeAgentId = agentId.slice(0, MAX_INPUT_LEN);
|
|
36
|
-
const safeDecisionId = decisionId.slice(0, MAX_INPUT_LEN);
|
|
37
|
-
const payload = JSON.stringify({ agentId: safeAgentId, vote: canonicalize(vote), decisionId: safeDecisionId });
|
|
38
|
-
return createHmac('sha256', key).update(payload).digest('hex');
|
|
39
|
-
}
|
|
40
|
-
/**
|
|
41
|
-
* CP-WBFT: Compute confidence-weighted vote tally.
|
|
42
|
-
*
|
|
43
|
-
* Each agent's vote is scaled by its confidence score (derived from a probe query)
|
|
44
|
-
* before tallying. Agents that fail the probe receive weight 0.
|
|
45
|
-
* Tolerates up to 85.7% Byzantine fault rate across topologies.
|
|
46
|
-
*
|
|
47
|
-
* Source: https://arxiv.org/abs/2511.10400 (CP-WBFT — AAAI 2026)
|
|
48
|
-
*/
|
|
49
|
-
export function weightedTally(votes) {
|
|
50
|
-
// Cap votes array to prevent OOM from an oversized input.
|
|
51
|
-
const safeVotes = votes.length > MAX_VOTES ? votes.slice(0, MAX_VOTES) : votes;
|
|
52
|
-
let weightedApproval = 0;
|
|
53
|
-
let weightedRejection = 0;
|
|
54
|
-
let totalWeight = 0;
|
|
55
|
-
for (const { vote, confidence } of safeVotes) {
|
|
56
|
-
const w = Math.max(0, Math.min(1, confidence)); // clamp to [0,1]
|
|
57
|
-
totalWeight += w;
|
|
58
|
-
if (vote) {
|
|
59
|
-
weightedApproval += w;
|
|
60
|
-
}
|
|
61
|
-
else {
|
|
62
|
-
weightedRejection += w;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
return {
|
|
66
|
-
approved: safeVotes.filter(v => v.vote).length,
|
|
67
|
-
rejected: safeVotes.filter(v => !v.vote).length,
|
|
68
|
-
weightedApproval,
|
|
69
|
-
weightedRejection,
|
|
70
|
-
quorum: totalWeight > 0 && weightedApproval / totalWeight > 0.5,
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
/**
|
|
74
|
-
* Verify a vote signature using constant-time comparison.
|
|
75
|
-
* Returns true when the signature is valid.
|
|
76
|
-
*/
|
|
77
|
-
export function verifyVote(agentId, vote, decisionId, signature, key) {
|
|
78
|
-
// Guard: odd-length or non-hex signature string causes Buffer.from to throw.
|
|
79
|
-
if (!/^[0-9a-fA-F]{64}$/.test(signature))
|
|
80
|
-
return false;
|
|
81
|
-
const expected = signVote(agentId, vote, decisionId, key);
|
|
82
|
-
const sigBuf = Buffer.from(signature, 'hex');
|
|
83
|
-
const expBuf = Buffer.from(expected, 'hex');
|
|
84
|
-
if (sigBuf.length !== expBuf.length)
|
|
85
|
-
return false;
|
|
86
|
-
return timingSafeEqual(sigBuf, expBuf);
|
|
87
|
-
}
|
|
88
|
-
//# sourceMappingURL=vote-signer.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"vote-signer.js","sourceRoot":"","sources":["../../../src/consensus/vote-signer.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AAErD,uFAAuF;AACvF,MAAM,sBAAsB,GAAG,EAAE,CAAC;AAElC,uEAAuE;AACvE,MAAM,aAAa,GAAG,IAAI,CAAC;AAE3B,uDAAuD;AACvD,MAAM,SAAS,GAAG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