monomind 1.18.13 → 1.19.0
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/core/researcher.md +29 -24
- package/.claude/agents/github/code-review-swarm.md +1 -1
- package/.claude/agents/github/github-modes.md +1 -1
- package/.claude/agents/github/issue-tracker.md +1 -1
- package/.claude/agents/github/multi-repo-swarm.md +1 -1
- package/.claude/agents/github/pr-manager.md +1 -1
- package/.claude/agents/github/project-board-sync.md +1 -1
- package/.claude/agents/github/release-manager.md +1 -1
- package/.claude/agents/github/repo-architect.md +1 -1
- package/.claude/agents/github/swarm-issue.md +1 -1
- package/.claude/agents/github/swarm-pr.md +1 -1
- package/.claude/agents/github/sync-coordinator.md +1 -1
- package/.claude/agents/github/workflow-automation.md +1 -1
- package/.claude/agents/goal/goal-planner.md +1 -1
- package/.claude/agents/specialized/specialized-workflow-architect.md +11 -14
- package/.claude/agents/testing/production-validator.md +8 -7
- package/.claude/agents/testing/testing-evidence-collector.md +3 -1
- package/.claude/commands/mastermind/_repeat.md +22 -3
- package/.claude/commands/mastermind/architect.md +1 -1
- package/.claude/commands/mastermind/autodev.md +1 -1
- package/.claude/commands/mastermind/build.md +1 -1
- package/.claude/commands/mastermind/code-review.md +5 -5
- package/.claude/commands/mastermind/debug.md +1 -1
- package/.claude/commands/mastermind/help.md +2 -2
- package/.claude/commands/mastermind/idea.md +1 -1
- package/.claude/commands/mastermind/improve.md +1 -1
- package/.claude/commands/mastermind/okf-export.md +14 -0
- package/.claude/commands/mastermind/okf-import.md +15 -0
- package/.claude/commands/mastermind/plan.md +1 -1
- package/.claude/commands/mastermind/research.md +1 -1
- package/.claude/commands/mastermind/review.md +12 -1
- package/.claude/commands/mastermind/runorg.md +1 -1
- package/.claude/commands/mastermind/taskdev.md +1 -1
- package/.claude/commands/mastermind/tdd.md +1 -1
- package/.claude/commands/mastermind/verify.md +1 -1
- package/.claude/helpers/graphify-freshen.cjs +16 -20
- package/.claude/helpers/handlers/agent-start-handler.cjs +11 -36
- package/.claude/helpers/handlers/capture-handler.cjs +110 -0
- package/.claude/helpers/handlers/route-handler.cjs +180 -256
- package/.claude/helpers/handlers/session-handler.cjs +139 -142
- package/.claude/helpers/handlers/session-restore-handler.cjs +15 -10
- package/.claude/helpers/handlers/task-handler.cjs +8 -155
- package/.claude/helpers/hook-handler.cjs +89 -5
- package/.claude/helpers/intelligence.cjs +164 -15
- package/.claude/helpers/learning-service.mjs +1 -0
- package/.claude/helpers/mastermind-activate.cjs +33 -51
- package/.claude/helpers/monolean-activate.cjs +13 -3
- package/.claude/helpers/monolean-propagate.cjs +7 -3
- package/.claude/helpers/router.cjs +47 -9
- package/.claude/helpers/utils/monograph.cjs +37 -20
- package/.claude/settings.json +0 -20
- package/.claude/skills/mastermind-skills/_repeat.md +29 -4
- package/.claude/skills/mastermind-skills/architect.md +5 -6
- package/.claude/skills/mastermind-skills/autodev.md +8 -5
- package/.claude/skills/mastermind-skills/review.md +25 -11
- package/.claude/skills/mastermind-skills/techport.md +37 -3
- package/.claude/skills/monodesign/document.md +9 -6
- package/.claude/skills/monodesign/extract.md +1 -1
- package/.claude/skills/monodesign/reference/document.md +1 -1
- package/.claude/skills/monodesign/reference/live.md +1 -1
- package/.claude/skills/monolean/SKILL.md +1 -1
- package/package.json +1 -1
- package/packages/@monomind/cli/.claude/agents/core/researcher.md +29 -24
- package/packages/@monomind/cli/.claude/agents/github/code-review-swarm.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/github-modes.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/issue-tracker.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/multi-repo-swarm.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/pr-manager.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/project-board-sync.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/release-manager.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/repo-architect.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/swarm-issue.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/swarm-pr.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/sync-coordinator.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/workflow-automation.md +1 -1
- package/packages/@monomind/cli/.claude/agents/goal/goal-planner.md +1 -1
- package/packages/@monomind/cli/.claude/agents/specialized/specialized-workflow-architect.md +11 -14
- package/packages/@monomind/cli/.claude/agents/testing/production-validator.md +8 -7
- package/packages/@monomind/cli/.claude/agents/testing/testing-evidence-collector.md +3 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/_repeat.md +22 -3
- package/packages/@monomind/cli/.claude/commands/mastermind/architect.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/autodev.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/build.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/code-review.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/debug.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/help.md +2 -2
- package/packages/@monomind/cli/.claude/commands/mastermind/idea.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/improve.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/okf-export.md +14 -0
- package/packages/@monomind/cli/.claude/commands/mastermind/okf-import.md +15 -0
- package/packages/@monomind/cli/.claude/commands/mastermind/plan.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/research.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/review.md +12 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/runorg.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/taskdev.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/tdd.md +1 -1
- package/packages/@monomind/cli/.claude/commands/mastermind/verify.md +1 -1
- package/packages/@monomind/cli/.claude/helpers/graphify-freshen.cjs +16 -20
- package/packages/@monomind/cli/.claude/helpers/handlers/agent-start-handler.cjs +11 -36
- package/packages/@monomind/cli/.claude/helpers/handlers/capture-handler.cjs +110 -0
- package/packages/@monomind/cli/.claude/helpers/handlers/route-handler.cjs +180 -256
- package/packages/@monomind/cli/.claude/helpers/handlers/session-handler.cjs +139 -142
- package/packages/@monomind/cli/.claude/helpers/handlers/session-restore-handler.cjs +15 -10
- package/packages/@monomind/cli/.claude/helpers/handlers/task-handler.cjs +8 -155
- package/packages/@monomind/cli/.claude/helpers/hook-handler.cjs +89 -5
- package/packages/@monomind/cli/.claude/helpers/intelligence.cjs +164 -15
- package/packages/@monomind/cli/.claude/helpers/learning-service.mjs +1 -0
- package/packages/@monomind/cli/.claude/helpers/mastermind-activate.cjs +33 -51
- package/packages/@monomind/cli/.claude/helpers/monolean-activate.cjs +13 -3
- package/packages/@monomind/cli/.claude/helpers/monolean-propagate.cjs +7 -3
- package/packages/@monomind/cli/.claude/helpers/router.cjs +47 -9
- package/packages/@monomind/cli/.claude/helpers/utils/monograph.cjs +37 -20
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/_repeat.md +29 -4
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/architect.md +5 -6
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/autodev.md +8 -5
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/review.md +25 -11
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/techport.md +37 -3
- package/packages/@monomind/cli/.claude/skills/monodesign/document.md +9 -6
- package/packages/@monomind/cli/.claude/skills/monodesign/extract.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/document.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/live.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monolean/SKILL.md +1 -1
- package/packages/@monomind/cli/bin/mcp-server.js +11 -1
- package/packages/@monomind/cli/dist/src/commands/agent-ops.d.ts +1 -2
- package/packages/@monomind/cli/dist/src/commands/agent-ops.js +1 -59
- package/packages/@monomind/cli/dist/src/commands/agent.js +2 -3
- package/packages/@monomind/cli/dist/src/commands/analyze-diff.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/browse-action.js +94 -2
- package/packages/@monomind/cli/dist/src/commands/completions.js +11 -56
- package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/hive-mind-helpers.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/hive-mind-ops.d.ts +1 -3
- package/packages/@monomind/cli/dist/src/commands/hive-mind-ops.js +2 -116
- package/packages/@monomind/cli/dist/src/commands/hive-mind.js +2 -5
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-commands.js +8 -7
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-gaps.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-routing.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/hooks-extended-commands.d.ts +0 -3
- package/packages/@monomind/cli/dist/src/commands/hooks-extended-commands.js +0 -307
- package/packages/@monomind/cli/dist/src/commands/hooks.js +1 -12
- package/packages/@monomind/cli/dist/src/commands/index.d.ts +3 -51
- package/packages/@monomind/cli/dist/src/commands/index.js +36 -184
- package/packages/@monomind/cli/dist/src/commands/init-wizard.js +2 -4
- package/packages/@monomind/cli/dist/src/commands/mcp.js +32 -4
- package/packages/@monomind/cli/dist/src/commands/memory-admin.d.ts +1 -2
- package/packages/@monomind/cli/dist/src/commands/memory-admin.js +1 -118
- package/packages/@monomind/cli/dist/src/commands/memory-transfer.d.ts +1 -2
- package/packages/@monomind/cli/dist/src/commands/memory-transfer.js +5 -171
- package/packages/@monomind/cli/dist/src/commands/memory.js +3 -6
- package/packages/@monomind/cli/dist/src/commands/neural-core.d.ts +3 -1
- package/packages/@monomind/cli/dist/src/commands/neural-core.js +145 -6
- package/packages/@monomind/cli/dist/src/commands/neural-optimize.js +4 -4
- package/packages/@monomind/cli/dist/src/commands/neural-registry.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/neural-registry.js +4 -4
- package/packages/@monomind/cli/dist/src/commands/neural.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/neural.js +6 -6
- package/packages/@monomind/cli/dist/src/commands/performance.js +68 -58
- package/packages/@monomind/cli/dist/src/commands/providers.js +2 -131
- package/packages/@monomind/cli/dist/src/commands/security-misc.d.ts +0 -1
- package/packages/@monomind/cli/dist/src/commands/security-misc.js +69 -45
- package/packages/@monomind/cli/dist/src/commands/security.js +2 -4
- package/packages/@monomind/cli/dist/src/commands/session.js +1 -285
- package/packages/@monomind/cli/dist/src/commands/start.js +2 -41
- package/packages/@monomind/cli/dist/src/commands/status.js +18 -29
- package/packages/@monomind/cli/dist/src/commands/swarm.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/task.js +2 -49
- package/packages/@monomind/cli/dist/src/commands/workflow.js +2 -104
- package/packages/@monomind/cli/dist/src/index.js +7 -0
- package/packages/@monomind/cli/dist/src/init/executor.js +3 -14
- package/packages/@monomind/cli/dist/src/init/helpers-generator.js +2 -22
- package/packages/@monomind/cli/dist/src/init/settings-generator.js +0 -1
- package/packages/@monomind/cli/dist/src/init/types.d.ts +1 -3
- package/packages/@monomind/cli/dist/src/init/types.js +0 -2
- package/packages/@monomind/cli/dist/src/mcp-client.js +0 -6
- package/packages/@monomind/cli/dist/src/mcp-server.js +16 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/agent-tools.js +0 -17
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/causal-infer.d.ts +5 -5
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/causal-infer.js +32 -46
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/consensus-verify.d.ts +2 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/consensus-verify.js +22 -20
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/memory-gate.d.ts +3 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/memory-gate.js +32 -19
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/quantum-topology.d.ts +4 -4
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/quantum-topology.js +11 -17
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/spectral-analyze.d.ts +2 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/spectral-analyze.js +51 -32
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/types.d.ts +5 -9
- package/packages/@monomind/cli/dist/src/mcp-tools/guidance-tools.js +2 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/hive-mind-tools.js +25 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-routing.d.ts +0 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-routing.js +45 -159
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-tools.js +1 -4
- package/packages/@monomind/cli/dist/src/mcp-tools/index.d.ts +0 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/index.js +0 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.js +24 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.js +452 -7
- package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.d.ts +4 -10
- package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.js +28 -54
- package/packages/@monomind/cli/dist/src/mcp-tools/performance-tools.js +5 -17
- package/packages/@monomind/cli/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.js +2 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/quality/security-compliance/detect-secrets.d.ts +4 -4
- package/packages/@monomind/cli/dist/src/mcp-tools/quality-tools.d.ts +7 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/quality-tools.js +7 -257
- package/packages/@monomind/cli/dist/src/memory/intelligence.d.ts +7 -8
- package/packages/@monomind/cli/dist/src/memory/intelligence.js +15 -16
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.d.ts +1 -0
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +37 -0
- package/packages/@monomind/cli/dist/src/services/worker-daemon.d.ts +3 -21
- package/packages/@monomind/cli/dist/src/services/worker-daemon.js +13 -80
- package/packages/@monomind/cli/dist/src/suggest.js +0 -5
- package/packages/@monomind/cli/package.json +1 -1
- package/packages/@monomind/guidance/README.md +49 -1153
- package/packages/@monomind/guidance/package.json +1 -74
- package/.claude/helpers/auto-memory-hook.mjs +0 -503
- package/packages/@monomind/cli/.claude/helpers/auto-memory-hook.mjs +0 -503
- package/packages/@monomind/cli/dist/src/commands/deployment.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/deployment.js +0 -706
|
@@ -440,19 +440,15 @@ export const hooksMetrics = {
|
|
|
440
440
|
period,
|
|
441
441
|
patterns: {
|
|
442
442
|
total: patternEntries.length,
|
|
443
|
-
|
|
444
|
-
failed: null,
|
|
445
|
-
avgConfidence: null,
|
|
443
|
+
_note: 'Success/failure breakdown not tracked yet — store outcomes via hooks_post-task to populate.',
|
|
446
444
|
},
|
|
447
445
|
agents: {
|
|
448
|
-
routingAccuracy: null,
|
|
449
446
|
totalRoutes: routingEntries.length,
|
|
450
|
-
|
|
447
|
+
_note: 'Routing accuracy not tracked yet — requires route-outcome correlation data.',
|
|
451
448
|
},
|
|
452
449
|
commands: {
|
|
453
450
|
totalExecuted: taskEntries.length,
|
|
454
|
-
|
|
455
|
-
avgRiskScore: null,
|
|
451
|
+
_note: 'Success rate not tracked yet — requires command-outcomes.jsonl data.',
|
|
456
452
|
},
|
|
457
453
|
dataSource: 'memory-store',
|
|
458
454
|
entriesFound: entries.length,
|
|
@@ -468,42 +464,46 @@ export const hooksList = {
|
|
|
468
464
|
properties: {},
|
|
469
465
|
},
|
|
470
466
|
handler: async () => {
|
|
467
|
+
// Static registry — not live discovery from handler objects.
|
|
468
|
+
// Update this list when hooks are added or removed.
|
|
469
|
+
const hooks = [
|
|
470
|
+
// Core hooks
|
|
471
|
+
{ name: 'pre-edit', type: 'PreToolUse', status: 'active' },
|
|
472
|
+
{ name: 'post-edit', type: 'PostToolUse', status: 'active' },
|
|
473
|
+
{ name: 'pre-command', type: 'PreToolUse', status: 'active' },
|
|
474
|
+
{ name: 'post-command', type: 'PostToolUse', status: 'active' },
|
|
475
|
+
{ name: 'pre-task', type: 'PreToolUse', status: 'active' },
|
|
476
|
+
{ name: 'post-task', type: 'PostToolUse', status: 'active' },
|
|
477
|
+
// Routing hooks
|
|
478
|
+
{ name: 'route', type: 'intelligence', status: 'active' },
|
|
479
|
+
{ name: 'explain', type: 'intelligence', status: 'active' },
|
|
480
|
+
// Session hooks
|
|
481
|
+
{ name: 'session-start', type: 'SessionStart', status: 'active' },
|
|
482
|
+
{ name: 'session-end', type: 'SessionEnd', status: 'active' },
|
|
483
|
+
{ name: 'session-restore', type: 'SessionStart', status: 'active' },
|
|
484
|
+
// Learning hooks
|
|
485
|
+
{ name: 'pretrain', type: 'intelligence', status: 'active' },
|
|
486
|
+
{ name: 'build-agents', type: 'intelligence', status: 'active' },
|
|
487
|
+
{ name: 'transfer', type: 'intelligence', status: 'active' },
|
|
488
|
+
{ name: 'metrics', type: 'analytics', status: 'active' },
|
|
489
|
+
// System hooks
|
|
490
|
+
{ name: 'init', type: 'system', status: 'active' },
|
|
491
|
+
{ name: 'notify', type: 'coordination', status: 'active' },
|
|
492
|
+
// Intelligence subcommands
|
|
493
|
+
{ name: 'intelligence', type: 'intelligence', status: 'active' },
|
|
494
|
+
{ name: 'intelligence_trajectory-start', type: 'intelligence', status: 'active' },
|
|
495
|
+
{ name: 'intelligence_trajectory-step', type: 'intelligence', status: 'active' },
|
|
496
|
+
{ name: 'intelligence_trajectory-end', type: 'intelligence', status: 'active' },
|
|
497
|
+
{ name: 'intelligence_pattern-store', type: 'intelligence', status: 'active' },
|
|
498
|
+
{ name: 'intelligence_pattern-search', type: 'intelligence', status: 'active' },
|
|
499
|
+
{ name: 'intelligence_stats', type: 'analytics', status: 'active' },
|
|
500
|
+
{ name: 'intelligence_learn', type: 'intelligence', status: 'active' },
|
|
501
|
+
{ name: 'intelligence_attention', type: 'intelligence', status: 'active' },
|
|
502
|
+
];
|
|
471
503
|
return {
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
{ name: 'post-edit', type: 'PostToolUse', status: 'active' },
|
|
476
|
-
{ name: 'pre-command', type: 'PreToolUse', status: 'active' },
|
|
477
|
-
{ name: 'post-command', type: 'PostToolUse', status: 'active' },
|
|
478
|
-
{ name: 'pre-task', type: 'PreToolUse', status: 'active' },
|
|
479
|
-
{ name: 'post-task', type: 'PostToolUse', status: 'active' },
|
|
480
|
-
// Routing hooks
|
|
481
|
-
{ name: 'route', type: 'intelligence', status: 'active' },
|
|
482
|
-
{ name: 'explain', type: 'intelligence', status: 'active' },
|
|
483
|
-
// Session hooks
|
|
484
|
-
{ name: 'session-start', type: 'SessionStart', status: 'active' },
|
|
485
|
-
{ name: 'session-end', type: 'SessionEnd', status: 'active' },
|
|
486
|
-
{ name: 'session-restore', type: 'SessionStart', status: 'active' },
|
|
487
|
-
// Learning hooks
|
|
488
|
-
{ name: 'pretrain', type: 'intelligence', status: 'active' },
|
|
489
|
-
{ name: 'build-agents', type: 'intelligence', status: 'active' },
|
|
490
|
-
{ name: 'transfer', type: 'intelligence', status: 'active' },
|
|
491
|
-
{ name: 'metrics', type: 'analytics', status: 'active' },
|
|
492
|
-
// System hooks
|
|
493
|
-
{ name: 'init', type: 'system', status: 'active' },
|
|
494
|
-
{ name: 'notify', type: 'coordination', status: 'active' },
|
|
495
|
-
// Intelligence subcommands
|
|
496
|
-
{ name: 'intelligence', type: 'intelligence', status: 'active' },
|
|
497
|
-
{ name: 'intelligence_trajectory-start', type: 'intelligence', status: 'active' },
|
|
498
|
-
{ name: 'intelligence_trajectory-step', type: 'intelligence', status: 'active' },
|
|
499
|
-
{ name: 'intelligence_trajectory-end', type: 'intelligence', status: 'active' },
|
|
500
|
-
{ name: 'intelligence_pattern-store', type: 'intelligence', status: 'active' },
|
|
501
|
-
{ name: 'intelligence_pattern-search', type: 'intelligence', status: 'active' },
|
|
502
|
-
{ name: 'intelligence_stats', type: 'analytics', status: 'active' },
|
|
503
|
-
{ name: 'intelligence_learn', type: 'intelligence', status: 'active' },
|
|
504
|
-
{ name: 'intelligence_attention', type: 'intelligence', status: 'active' },
|
|
505
|
-
],
|
|
506
|
-
total: 26,
|
|
504
|
+
_note: 'Static registry — update this list when hooks are added or removed.',
|
|
505
|
+
hooks,
|
|
506
|
+
total: hooks.length,
|
|
507
507
|
};
|
|
508
508
|
},
|
|
509
509
|
};
|
|
@@ -1019,7 +1019,7 @@ export const hooksPretrain = {
|
|
|
1019
1019
|
if (patterns.length > 0) {
|
|
1020
1020
|
try {
|
|
1021
1021
|
const intel = await import('../memory/intelligence.js');
|
|
1022
|
-
await intel.initializeIntelligence({
|
|
1022
|
+
await intel.initializeIntelligence({ confidenceLearningRate: 0.002, maxTrajectorySize: patterns.length });
|
|
1023
1023
|
// Record each extracted pattern as an action step
|
|
1024
1024
|
for (const pat of patterns.slice(0, 50)) {
|
|
1025
1025
|
await intel.recordStep({ type: 'action', content: pat, metadata: { source: 'pretrain', depth } });
|
|
@@ -1202,15 +1202,6 @@ export const hooksTransfer = {
|
|
|
1202
1202
|
total,
|
|
1203
1203
|
byType,
|
|
1204
1204
|
},
|
|
1205
|
-
skipped: {
|
|
1206
|
-
lowConfidence: Math.floor(total * 0.15),
|
|
1207
|
-
duplicates: Math.floor(total * 0.08),
|
|
1208
|
-
conflicts: Math.floor(total * 0.03),
|
|
1209
|
-
},
|
|
1210
|
-
stats: {
|
|
1211
|
-
avgConfidence: 0.82 + (minConfidence > 0.8 ? 0.1 : 0),
|
|
1212
|
-
avgAge: '3 days',
|
|
1213
|
-
},
|
|
1214
1205
|
dataSource: 'source-project',
|
|
1215
1206
|
};
|
|
1216
1207
|
},
|
|
@@ -1283,8 +1274,8 @@ export const hooksSessionStart = {
|
|
|
1283
1274
|
sessionMemory: sessionMemory || { controller: 'none', restoredPatterns: 0 },
|
|
1284
1275
|
previousSession: restoreLatest ? {
|
|
1285
1276
|
id: `session-${Date.now() - 86400000}`,
|
|
1286
|
-
tasksRestored: sessionMemory?.restoredPatterns ||
|
|
1287
|
-
memoryRestored: sessionMemory?.restoredPatterns ||
|
|
1277
|
+
tasksRestored: sessionMemory?.restoredPatterns || 0,
|
|
1278
|
+
memoryRestored: sessionMemory?.restoredPatterns || 0,
|
|
1288
1279
|
} : null,
|
|
1289
1280
|
};
|
|
1290
1281
|
},
|
|
@@ -1361,7 +1352,6 @@ export const hooksSessionEnd = {
|
|
|
1361
1352
|
}
|
|
1362
1353
|
return {
|
|
1363
1354
|
sessionId,
|
|
1364
|
-
duration: 3600000, // 1 hour in ms
|
|
1365
1355
|
statePath: saveState ? `.claude/sessions/${sessionId}.json` : undefined,
|
|
1366
1356
|
daemon: { stopped: daemonStopped },
|
|
1367
1357
|
sessionPersistence: sessionPersistence || { controller: 'none', persisted: false },
|
|
@@ -1379,110 +1369,6 @@ export const hooksSessionEnd = {
|
|
|
1379
1369
|
};
|
|
1380
1370
|
},
|
|
1381
1371
|
};
|
|
1382
|
-
// Session restore hook
|
|
1383
|
-
export const hooksSessionRestore = {
|
|
1384
|
-
name: 'hooks_session-restore',
|
|
1385
|
-
description: 'Restore a previous session',
|
|
1386
|
-
inputSchema: {
|
|
1387
|
-
type: 'object',
|
|
1388
|
-
properties: {
|
|
1389
|
-
sessionId: { type: 'string', description: 'Session ID to restore (or "latest")' },
|
|
1390
|
-
restoreAgents: { type: 'boolean', description: 'Restore spawned agents' },
|
|
1391
|
-
restoreTasks: { type: 'boolean', description: 'Restore active tasks' },
|
|
1392
|
-
},
|
|
1393
|
-
},
|
|
1394
|
-
handler: async (params) => {
|
|
1395
|
-
const requestedId = params.sessionId || 'latest';
|
|
1396
|
-
const restoreAgents = params.restoreAgents !== false;
|
|
1397
|
-
const restoreTasks = params.restoreTasks !== false;
|
|
1398
|
-
const originalSessionId = requestedId === 'latest' ? `session-${Date.now() - 86400000}` : requestedId;
|
|
1399
|
-
const newSessionId = `session-${Date.now()}`;
|
|
1400
|
-
// Get real memory entry count
|
|
1401
|
-
const store = loadMemoryStore();
|
|
1402
|
-
const memoryEntryCount = Object.keys(store.entries).length;
|
|
1403
|
-
// Count task and agent entries
|
|
1404
|
-
const taskEntries = Object.keys(store.entries).filter(k => k.includes('task')).length;
|
|
1405
|
-
const agentEntries = Object.keys(store.entries).filter(k => k.includes('agent')).length;
|
|
1406
|
-
return {
|
|
1407
|
-
sessionId: newSessionId,
|
|
1408
|
-
originalSessionId,
|
|
1409
|
-
restoredState: {
|
|
1410
|
-
tasksRestored: restoreTasks ? Math.min(taskEntries, 10) : 0,
|
|
1411
|
-
agentsRestored: restoreAgents ? Math.min(agentEntries, 5) : 0,
|
|
1412
|
-
memoryRestored: memoryEntryCount,
|
|
1413
|
-
},
|
|
1414
|
-
warnings: restoreTasks && taskEntries > 0 ? [`${Math.min(taskEntries, 2)} tasks were in progress and may need review`] : undefined,
|
|
1415
|
-
dataSource: 'memory-store',
|
|
1416
|
-
};
|
|
1417
|
-
},
|
|
1418
|
-
};
|
|
1419
|
-
// Notify hook - cross-agent notifications
|
|
1420
|
-
export const hooksNotify = {
|
|
1421
|
-
name: 'hooks_notify',
|
|
1422
|
-
description: 'Send cross-agent notification',
|
|
1423
|
-
inputSchema: {
|
|
1424
|
-
type: 'object',
|
|
1425
|
-
properties: {
|
|
1426
|
-
message: { type: 'string', description: 'Notification message' },
|
|
1427
|
-
target: { type: 'string', description: 'Target agent or "all"' },
|
|
1428
|
-
priority: { type: 'string', description: 'Priority level (low, normal, high, urgent)' },
|
|
1429
|
-
data: { type: 'object', description: 'Additional data payload' },
|
|
1430
|
-
},
|
|
1431
|
-
required: ['message'],
|
|
1432
|
-
},
|
|
1433
|
-
handler: async (params) => {
|
|
1434
|
-
const message = params.message;
|
|
1435
|
-
const target = params.target || 'all';
|
|
1436
|
-
const priority = params.priority || 'normal';
|
|
1437
|
-
return {
|
|
1438
|
-
notificationId: `notify-${Date.now()}`,
|
|
1439
|
-
message,
|
|
1440
|
-
target,
|
|
1441
|
-
priority,
|
|
1442
|
-
delivered: true,
|
|
1443
|
-
recipients: target === 'all' ? ['coder', 'architect', 'tester', 'reviewer'] : [target],
|
|
1444
|
-
timestamp: new Date().toISOString(),
|
|
1445
|
-
};
|
|
1446
|
-
},
|
|
1447
|
-
};
|
|
1448
|
-
// Init hook - initialize hooks in project
|
|
1449
|
-
export const hooksInit = {
|
|
1450
|
-
name: 'hooks_init',
|
|
1451
|
-
description: 'Initialize hooks in project with .claude/settings.json',
|
|
1452
|
-
inputSchema: {
|
|
1453
|
-
type: 'object',
|
|
1454
|
-
properties: {
|
|
1455
|
-
path: { type: 'string', description: 'Project path' },
|
|
1456
|
-
template: { type: 'string', description: 'Template to use (minimal, standard, full)' },
|
|
1457
|
-
force: { type: 'boolean', description: 'Overwrite existing configuration' },
|
|
1458
|
-
},
|
|
1459
|
-
},
|
|
1460
|
-
handler: async (params) => {
|
|
1461
|
-
const path = params.path || '.';
|
|
1462
|
-
const template = params.template || 'standard';
|
|
1463
|
-
const force = params.force;
|
|
1464
|
-
const hooksConfigured = template === 'minimal' ? 4 : template === 'full' ? 16 : 9;
|
|
1465
|
-
return {
|
|
1466
|
-
path,
|
|
1467
|
-
template,
|
|
1468
|
-
created: {
|
|
1469
|
-
settingsJson: `${path}/.claude/settings.json`,
|
|
1470
|
-
hooksDir: `${path}/.claude/hooks`,
|
|
1471
|
-
},
|
|
1472
|
-
hooks: {
|
|
1473
|
-
configured: hooksConfigured,
|
|
1474
|
-
types: ['PreToolUse', 'PostToolUse', 'SessionStart', 'SessionEnd'],
|
|
1475
|
-
},
|
|
1476
|
-
intelligence: {
|
|
1477
|
-
enabled: template !== 'minimal',
|
|
1478
|
-
sona: template === 'full',
|
|
1479
|
-
moe: template === 'full',
|
|
1480
|
-
hnsw: template !== 'minimal',
|
|
1481
|
-
},
|
|
1482
|
-
overwritten: force,
|
|
1483
|
-
};
|
|
1484
|
-
},
|
|
1485
|
-
};
|
|
1486
1372
|
// Intelligence hook - JS pattern/trajectory logging
|
|
1487
1373
|
export const hooksIntelligence = {
|
|
1488
1374
|
name: 'hooks_intelligence',
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Thin registration module that aggregates all hooks MCP tools into a single array.
|
|
4
4
|
* Business logic lives in hooks-embedding.ts, hooks-routing.ts, and hooks-intelligence.ts.
|
|
5
5
|
*/
|
|
6
|
-
import { hooksPreEdit, hooksPostEdit, hooksPreCommand, hooksPostCommand, hooksRoute, hooksMetrics, hooksList, hooksPreTask, hooksPostTask, hooksExplain, hooksPretrain, hooksBuildAgents, hooksTransfer, hooksSessionStart, hooksSessionEnd,
|
|
6
|
+
import { hooksPreEdit, hooksPostEdit, hooksPreCommand, hooksPostCommand, hooksRoute, hooksMetrics, hooksList, hooksPreTask, hooksPostTask, hooksExplain, hooksPretrain, hooksBuildAgents, hooksTransfer, hooksSessionStart, hooksSessionEnd, hooksIntelligence, } from './hooks-routing.js';
|
|
7
7
|
import { hooksIntelligenceReset, hooksTrajectoryStart, hooksTrajectoryStep, hooksTrajectoryEnd, hooksPatternStore, hooksPatternSearch, hooksIntelligenceStats, hooksIntelligenceLearn, hooksIntelligenceAttention, hooksWorkerList, hooksWorkerDispatch, hooksWorkerStatus, hooksWorkerDetect, hooksWorkerCancel, hooksModelRoute, hooksModelOutcome, hooksModelStats, } from './hooks-intelligence.js';
|
|
8
8
|
// Export all hooks tools
|
|
9
9
|
export const hooksTools = [
|
|
@@ -23,9 +23,6 @@ export const hooksTools = [
|
|
|
23
23
|
hooksTransfer,
|
|
24
24
|
hooksSessionStart,
|
|
25
25
|
hooksSessionEnd,
|
|
26
|
-
hooksSessionRestore,
|
|
27
|
-
hooksNotify,
|
|
28
|
-
hooksInit,
|
|
29
26
|
hooksIntelligence,
|
|
30
27
|
hooksIntelligenceReset,
|
|
31
28
|
hooksTrajectoryStart,
|
|
@@ -26,10 +26,8 @@ export { guidanceTools } from './guidance-tools.js';
|
|
|
26
26
|
export { autopilotTools } from './autopilot-tools.js';
|
|
27
27
|
export { graphifyTools } from './graphify-tools.js';
|
|
28
28
|
export { monographTools } from './monograph-tools.js';
|
|
29
|
-
export { a2aTools } from './a2a-tools.js';
|
|
30
29
|
export { terminalTools } from './terminal-tools.js';
|
|
31
30
|
export { daaTools } from './daa-tools.js';
|
|
32
|
-
export { coordinationTools } from './coordination-tools.js';
|
|
33
31
|
export { browserTools } from './browser-tools.js';
|
|
34
32
|
export { knowledgeTools } from './knowledge-tools.js';
|
|
35
33
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -26,11 +26,8 @@ export { guidanceTools } from './guidance-tools.js';
|
|
|
26
26
|
export { autopilotTools } from './autopilot-tools.js';
|
|
27
27
|
export { graphifyTools } from './graphify-tools.js';
|
|
28
28
|
export { monographTools } from './monograph-tools.js';
|
|
29
|
-
// A2A Agent Card protocol (source: https://a2a-protocol.org)
|
|
30
|
-
export { a2aTools } from './a2a-tools.js';
|
|
31
29
|
export { terminalTools } from './terminal-tools.js';
|
|
32
30
|
export { daaTools } from './daa-tools.js';
|
|
33
|
-
export { coordinationTools } from './coordination-tools.js';
|
|
34
31
|
export { browserTools } from './browser-tools.js';
|
|
35
32
|
export { knowledgeTools } from './knowledge-tools.js';
|
|
36
33
|
//# sourceMappingURL=index.js.map
|
|
@@ -122,6 +122,18 @@ export const memoryPatternStore = {
|
|
|
122
122
|
const pattern = validateString(params.pattern, 'pattern');
|
|
123
123
|
if (!pattern)
|
|
124
124
|
return { success: false, error: 'pattern is required (non-empty string, max 100KB)' };
|
|
125
|
+
// validateExternalContent: guard against prompt injection in stored patterns
|
|
126
|
+
try {
|
|
127
|
+
const secMod = await import('@monomind/security').catch(() => null);
|
|
128
|
+
const validateExternalContent = secMod?.validateExternalContent;
|
|
129
|
+
if (validateExternalContent) {
|
|
130
|
+
const check = await validateExternalContent(pattern, 'memory_pattern-store pattern');
|
|
131
|
+
if (!check.safe) {
|
|
132
|
+
return { success: false, error: `Injection guard: ${check.reason}`, injectionDetected: true };
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
catch { /* security module optional */ }
|
|
125
137
|
const bridge = await getBridge();
|
|
126
138
|
const result = await bridge.bridgeStorePattern({
|
|
127
139
|
pattern,
|
|
@@ -153,6 +165,18 @@ export const memoryPatternSearch = {
|
|
|
153
165
|
const query = validateString(params.query, 'query', 10_000);
|
|
154
166
|
if (!query)
|
|
155
167
|
return { results: [], error: 'query is required (non-empty string, max 10KB)' };
|
|
168
|
+
// validateExternalContent: guard against prompt injection in search queries
|
|
169
|
+
try {
|
|
170
|
+
const secMod = await import('@monomind/security').catch(() => null);
|
|
171
|
+
const validateExternalContent = secMod?.validateExternalContent;
|
|
172
|
+
if (validateExternalContent) {
|
|
173
|
+
const check = await validateExternalContent(query, 'memory_pattern-search query');
|
|
174
|
+
if (!check.safe) {
|
|
175
|
+
return { results: [], error: `Injection guard: ${check.reason}`, injectionDetected: true };
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
catch { /* security module optional */ }
|
|
156
180
|
const bridge = await getBridge();
|
|
157
181
|
const minConfidence = validateScore(params.minConfidence, 0.3);
|
|
158
182
|
const result = await bridge.bridgeSearchPatterns({
|