monomind 1.11.9 → 1.11.10
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 +5 -5
- package/.claude/agents/github/pr-manager.md +5 -5
- package/.claude/agents/github/release-manager.md +3 -3
- package/.claude/agents/github/repo-architect.md +3 -3
- package/.claude/agents/github/swarm-issue.md +1 -1
- package/.claude/agents/github/sync-coordinator.md +1 -1
- package/.claude/agents/github/workflow-automation.md +1 -1
- package/.claude/commands/github/repo-architect.md +1 -1
- package/.claude/commands/github/sync-coordinator.md +1 -1
- package/.claude/commands/mastermind/createorg.md +4 -1
- package/.claude/commands/mastermind/help.md +2 -2
- package/.claude/commands/mastermind/orgs.md +21 -0
- package/.claude/commands/mastermind/orgstatus.md +59 -0
- package/.claude/commands/mastermind/runorg.md +4 -2
- package/.claude/commands/mastermind/stoporg.md +78 -0
- package/.claude/commands/mastermind/swarm.md +1 -1
- package/.claude/helpers/handlers/gates-handler.cjs +135 -0
- package/.claude/helpers/handlers/task-handler.cjs +7 -3
- package/.claude/helpers/hook-handler.cjs +11 -2
- package/.claude/helpers/intelligence.cjs +87 -0
- package/.claude/helpers/learning-service.mjs +60 -0
- package/.claude/helpers/memory.cjs +69 -0
- package/.claude/helpers/router.cjs +68 -0
- package/.claude/helpers/session.cjs +63 -0
- package/.claude/helpers/utils/monograph.cjs +4 -2
- package/.claude/helpers/utils/telemetry.cjs +3 -2
- package/.claude/scheduled_tasks.lock +1 -1
- package/.claude/settings.json +12 -2
- package/.claude/skills/agentic-jujutsu/SKILL.md +1 -1
- package/.claude/skills/hive-mind-advanced/SKILL.md +4 -4
- package/.claude/skills/mastermind/_agent-select.md +2 -2
- package/.claude/skills/mastermind/access.md +11 -11
- package/.claude/skills/mastermind/adapter-manager.md +13 -13
- package/.claude/skills/mastermind/adapters.md +7 -7
- package/.claude/skills/mastermind/agent-detail.md +1 -1
- package/.claude/skills/mastermind/agents.md +5 -5
- package/.claude/skills/mastermind/approval-detail.md +6 -6
- package/.claude/skills/mastermind/approve.md +9 -10
- package/.claude/skills/mastermind/backup.md +2 -2
- package/.claude/skills/mastermind/bootstrap.md +2 -2
- package/.claude/skills/mastermind/companies.md +7 -7
- package/.claude/skills/mastermind/createorg.md +213 -8
- package/.claude/skills/mastermind/diagnose.md +4 -4
- package/.claude/skills/mastermind/env.md +1 -1
- package/.claude/skills/mastermind/environments.md +8 -8
- package/.claude/skills/mastermind/export.md +12 -3
- package/.claude/skills/mastermind/goal-detail.md +9 -9
- package/.claude/skills/mastermind/goals.md +4 -4
- package/.claude/skills/mastermind/heartbeat.md +1 -1
- package/.claude/skills/mastermind/idea.md +4 -4
- package/.claude/skills/mastermind/import.md +8 -8
- package/.claude/skills/mastermind/inbox.md +4 -4
- package/.claude/skills/mastermind/instance-settings.md +9 -9
- package/.claude/skills/mastermind/instance.md +9 -7
- package/.claude/skills/mastermind/invite-landing.md +5 -5
- package/.claude/skills/mastermind/invites.md +12 -12
- package/.claude/skills/mastermind/issue-detail.md +8 -8
- package/.claude/skills/mastermind/monitor.md +11 -11
- package/.claude/skills/mastermind/my-issues.md +6 -6
- package/.claude/skills/mastermind/new-agent.md +4 -4
- package/.claude/skills/mastermind/org-chart.md +8 -6
- package/.claude/skills/mastermind/org-settings.md +58 -21
- package/.claude/skills/mastermind/orgs.md +98 -0
- package/.claude/skills/mastermind/orgstatus.md +194 -0
- package/.claude/skills/mastermind/plan-to-tasks.md +1 -1
- package/.claude/skills/mastermind/plugin-manager.md +12 -12
- package/.claude/skills/mastermind/plugin-settings.md +5 -5
- package/.claude/skills/mastermind/plugins.md +5 -5
- package/.claude/skills/mastermind/profile.md +2 -2
- package/.claude/skills/mastermind/project-detail.md +12 -12
- package/.claude/skills/mastermind/project-workspace.md +4 -4
- package/.claude/skills/mastermind/projects.md +4 -4
- package/.claude/skills/mastermind/review.md +50 -0
- package/.claude/skills/mastermind/routine-detail.md +3 -3
- package/.claude/skills/mastermind/routines.md +7 -6
- package/.claude/skills/mastermind/runorg.md +178 -8
- package/.claude/skills/mastermind/search.md +6 -6
- package/.claude/skills/mastermind/secrets.md +6 -6
- package/.claude/skills/mastermind/skills.md +4 -4
- package/.claude/skills/mastermind/stoporg.md +138 -0
- package/.claude/skills/mastermind/workspace-detail.md +5 -5
- package/.claude/skills/mastermind/workspaces.md +9 -9
- package/.claude/skills/performance-analysis/SKILL.md +3 -3
- package/.claude/skills/sparc-methodology/SKILL.md +2 -2
- package/.claude/skills/swarm-advanced/SKILL.md +4 -4
- package/.claude-plugin/README.md +10 -10
- package/.claude-plugin/docs/INSTALLATION.md +6 -6
- package/.claude-plugin/docs/PLUGIN_SUMMARY.md +9 -9
- package/.claude-plugin/docs/QUICKSTART.md +2 -2
- package/.claude-plugin/docs/STRUCTURE.md +1 -1
- package/.claude-plugin/marketplace.json +5 -5
- package/.claude-plugin/plugin.json +3 -3
- package/README.md +129 -376
- package/package.json +4 -8
- package/packages/@monomind/cli/README.md +129 -376
- package/packages/@monomind/cli/dist/src/agents/registry-builder.d.ts +27 -1
- package/packages/@monomind/cli/dist/src/agents/registry-builder.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/agent.js +4 -9
- package/packages/@monomind/cli/dist/src/commands/analyze.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/analyze.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/claims.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/claims.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/cleanup.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/cleanup.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/completions.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/completions.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/deployment.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/deployment.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/doctor.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/doctor.js +69 -4
- package/packages/@monomind/cli/dist/src/commands/guidance.js +129 -0
- package/packages/@monomind/cli/dist/src/commands/index.js +4 -0
- package/packages/@monomind/cli/dist/src/commands/init.js +18 -0
- package/packages/@monomind/cli/dist/src/commands/monovector/import.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/monovector/import.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/monovector/index.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/monovector/index.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/monovector/setup.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/monovector/setup.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/neural.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/neural.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/performance.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/performance.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/platforms.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/platforms.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/plugins.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/plugins.js +2 -4
- package/packages/@monomind/cli/dist/src/commands/providers.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/providers.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/route.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/route.js +5 -11
- package/packages/@monomind/cli/dist/src/commands/security.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/security.js +140 -91
- package/packages/@monomind/cli/dist/src/dlq/dlq-replayer.d.ts +7 -1
- package/packages/@monomind/cli/dist/src/index.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/index.js +10 -26
- package/packages/@monomind/cli/dist/src/init/claudemd-generator.js +2 -2
- package/packages/@monomind/cli/dist/src/init/executor.js +3 -3
- package/packages/@monomind/cli/dist/src/init/settings-generator.js +2 -2
- package/packages/@monomind/cli/dist/src/mcp-client.d.ts +5 -0
- package/packages/@monomind/cli/dist/src/mcp-client.js +7 -0
- package/packages/@monomind/cli/dist/src/mcp-server.js +17 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/a2a-tools.js +6 -6
- package/packages/@monomind/cli/dist/src/mcp-tools/auto-install.d.ts +2 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/auto-install.js +1 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/hive-mind-tools.js +1 -52
- package/packages/@monomind/cli/dist/src/mcp-tools/index.d.ts +4 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/index.js +4 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-compat.js +1 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.js +107 -5
- package/packages/@monomind/cli/dist/src/mcp-tools/security-tools.d.ts +6 -6
- package/packages/@monomind/cli/dist/src/mcp-tools/security-tools.js +48 -61
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.d.ts +0 -1
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +232 -57
- package/packages/@monomind/cli/dist/src/memory/memory-initializer.js +3 -32
- package/packages/@monomind/cli/dist/src/plugins/store/discovery.js +0 -69
- package/packages/@monomind/cli/dist/src/routing/embed-worker.d.ts +2 -0
- package/packages/@monomind/cli/dist/src/routing/embed-worker.js +55 -0
- package/packages/@monomind/cli/dist/src/routing/embedder.d.ts +31 -0
- package/packages/@monomind/cli/dist/src/routing/embedder.js +0 -0
- package/packages/@monomind/cli/dist/src/routing/llm-caller.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/routing/llm-caller.js +18 -3
- package/packages/@monomind/cli/dist/src/routing/route-layer-factory.d.ts +9 -0
- package/packages/@monomind/cli/dist/src/routing/route-layer-factory.js +151 -0
- package/packages/@monomind/cli/dist/src/services/worker-daemon.js +0 -1
- package/packages/@monomind/cli/dist/src/suggest.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/suggest.js +1 -1
- package/packages/@monomind/cli/package.json +9 -10
- package/packages/@monomind/cli/scripts/understand-analyze.mjs +1 -1
- package/packages/@monomind/guidance/README.md +6 -6
- package/packages/@monomind/guidance/package.json +9 -1
- package/scripts/install.sh +7 -7
- package/scripts/ua-enrich.mjs +3 -2
- package/packages/@monomind/shared/dist/agent-contract.d.ts +0 -28
- package/packages/@monomind/shared/dist/agent-contract.js +0 -57
- package/packages/@monomind/shared/dist/agent-error-result.d.ts +0 -17
- package/packages/@monomind/shared/dist/agent-error-result.js +0 -23
- package/packages/@monomind/shared/dist/core/config/defaults.d.ts +0 -41
- package/packages/@monomind/shared/dist/core/config/defaults.js +0 -186
- package/packages/@monomind/shared/dist/core/config/index.d.ts +0 -8
- package/packages/@monomind/shared/dist/core/config/index.js +0 -12
- package/packages/@monomind/shared/dist/core/config/loader.d.ts +0 -45
- package/packages/@monomind/shared/dist/core/config/loader.js +0 -238
- package/packages/@monomind/shared/dist/core/config/schema.d.ts +0 -324
- package/packages/@monomind/shared/dist/core/config/schema.js +0 -160
- package/packages/@monomind/shared/dist/core/config/validator.d.ts +0 -92
- package/packages/@monomind/shared/dist/core/config/validator.js +0 -147
- package/packages/@monomind/shared/dist/core/event-bus.d.ts +0 -31
- package/packages/@monomind/shared/dist/core/event-bus.js +0 -197
- package/packages/@monomind/shared/dist/core/index.d.ts +0 -15
- package/packages/@monomind/shared/dist/core/index.js +0 -19
- package/packages/@monomind/shared/dist/core/interfaces/agent.interface.d.ts +0 -200
- package/packages/@monomind/shared/dist/core/interfaces/agent.interface.js +0 -6
- package/packages/@monomind/shared/dist/core/interfaces/coordinator.interface.d.ts +0 -310
- package/packages/@monomind/shared/dist/core/interfaces/coordinator.interface.js +0 -7
- package/packages/@monomind/shared/dist/core/interfaces/event.interface.d.ts +0 -224
- package/packages/@monomind/shared/dist/core/interfaces/event.interface.js +0 -46
- package/packages/@monomind/shared/dist/core/interfaces/index.d.ts +0 -10
- package/packages/@monomind/shared/dist/core/interfaces/index.js +0 -15
- package/packages/@monomind/shared/dist/core/interfaces/memory.interface.d.ts +0 -298
- package/packages/@monomind/shared/dist/core/interfaces/memory.interface.js +0 -7
- package/packages/@monomind/shared/dist/core/interfaces/task.interface.d.ts +0 -185
- package/packages/@monomind/shared/dist/core/interfaces/task.interface.js +0 -6
- package/packages/@monomind/shared/dist/core/orchestrator/event-coordinator.d.ts +0 -35
- package/packages/@monomind/shared/dist/core/orchestrator/event-coordinator.js +0 -101
- package/packages/@monomind/shared/dist/core/orchestrator/health-monitor.d.ts +0 -60
- package/packages/@monomind/shared/dist/core/orchestrator/health-monitor.js +0 -166
- package/packages/@monomind/shared/dist/core/orchestrator/index.d.ts +0 -46
- package/packages/@monomind/shared/dist/core/orchestrator/index.js +0 -64
- package/packages/@monomind/shared/dist/core/orchestrator/lifecycle-manager.d.ts +0 -56
- package/packages/@monomind/shared/dist/core/orchestrator/lifecycle-manager.js +0 -195
- package/packages/@monomind/shared/dist/core/orchestrator/session-manager.d.ts +0 -83
- package/packages/@monomind/shared/dist/core/orchestrator/session-manager.js +0 -193
- package/packages/@monomind/shared/dist/core/orchestrator/task-manager.d.ts +0 -49
- package/packages/@monomind/shared/dist/core/orchestrator/task-manager.js +0 -253
- package/packages/@monomind/shared/dist/events/domain-events.d.ts +0 -282
- package/packages/@monomind/shared/dist/events/domain-events.js +0 -165
- package/packages/@monomind/shared/dist/events/event-store.d.ts +0 -126
- package/packages/@monomind/shared/dist/events/event-store.js +0 -416
- package/packages/@monomind/shared/dist/events/event-store.test.d.ts +0 -8
- package/packages/@monomind/shared/dist/events/event-store.test.js +0 -293
- package/packages/@monomind/shared/dist/events/example-usage.d.ts +0 -10
- package/packages/@monomind/shared/dist/events/example-usage.js +0 -193
- package/packages/@monomind/shared/dist/events/index.d.ts +0 -21
- package/packages/@monomind/shared/dist/events/index.js +0 -22
- package/packages/@monomind/shared/dist/events/projections.d.ts +0 -177
- package/packages/@monomind/shared/dist/events/projections.js +0 -421
- package/packages/@monomind/shared/dist/events/rvf-event-log.d.ts +0 -82
- package/packages/@monomind/shared/dist/events/rvf-event-log.js +0 -340
- package/packages/@monomind/shared/dist/events/state-reconstructor.d.ts +0 -101
- package/packages/@monomind/shared/dist/events/state-reconstructor.js +0 -263
- package/packages/@monomind/shared/dist/events.d.ts +0 -80
- package/packages/@monomind/shared/dist/events.js +0 -249
- package/packages/@monomind/shared/dist/hooks/example-usage.d.ts +0 -42
- package/packages/@monomind/shared/dist/hooks/example-usage.js +0 -351
- package/packages/@monomind/shared/dist/hooks/executor.d.ts +0 -100
- package/packages/@monomind/shared/dist/hooks/executor.js +0 -264
- package/packages/@monomind/shared/dist/hooks/hooks.test.d.ts +0 -9
- package/packages/@monomind/shared/dist/hooks/hooks.test.js +0 -322
- package/packages/@monomind/shared/dist/hooks/index.d.ts +0 -52
- package/packages/@monomind/shared/dist/hooks/index.js +0 -51
- package/packages/@monomind/shared/dist/hooks/registry.d.ts +0 -133
- package/packages/@monomind/shared/dist/hooks/registry.js +0 -277
- package/packages/@monomind/shared/dist/hooks/safety/bash-safety.d.ts +0 -105
- package/packages/@monomind/shared/dist/hooks/safety/bash-safety.js +0 -481
- package/packages/@monomind/shared/dist/hooks/safety/file-organization.d.ts +0 -144
- package/packages/@monomind/shared/dist/hooks/safety/file-organization.js +0 -328
- package/packages/@monomind/shared/dist/hooks/safety/git-commit.d.ts +0 -158
- package/packages/@monomind/shared/dist/hooks/safety/git-commit.js +0 -450
- package/packages/@monomind/shared/dist/hooks/safety/index.d.ts +0 -17
- package/packages/@monomind/shared/dist/hooks/safety/index.js +0 -17
- package/packages/@monomind/shared/dist/hooks/session-hooks.d.ts +0 -234
- package/packages/@monomind/shared/dist/hooks/session-hooks.js +0 -334
- package/packages/@monomind/shared/dist/hooks/task-hooks.d.ts +0 -163
- package/packages/@monomind/shared/dist/hooks/task-hooks.js +0 -326
- package/packages/@monomind/shared/dist/hooks/types.d.ts +0 -267
- package/packages/@monomind/shared/dist/hooks/types.js +0 -62
- package/packages/@monomind/shared/dist/hooks/verify-exports.test.d.ts +0 -9
- package/packages/@monomind/shared/dist/hooks/verify-exports.test.js +0 -93
- package/packages/@monomind/shared/dist/index.d.ts +0 -46
- package/packages/@monomind/shared/dist/index.js +0 -77
- package/packages/@monomind/shared/dist/mcp/connection-pool.d.ts +0 -98
- package/packages/@monomind/shared/dist/mcp/connection-pool.js +0 -364
- package/packages/@monomind/shared/dist/mcp/index.d.ts +0 -69
- package/packages/@monomind/shared/dist/mcp/index.js +0 -84
- package/packages/@monomind/shared/dist/mcp/server.d.ts +0 -166
- package/packages/@monomind/shared/dist/mcp/server.js +0 -593
- package/packages/@monomind/shared/dist/mcp/session-manager.d.ts +0 -136
- package/packages/@monomind/shared/dist/mcp/session-manager.js +0 -335
- package/packages/@monomind/shared/dist/mcp/tool-registry.d.ts +0 -178
- package/packages/@monomind/shared/dist/mcp/tool-registry.js +0 -439
- package/packages/@monomind/shared/dist/mcp/transport/http.d.ts +0 -104
- package/packages/@monomind/shared/dist/mcp/transport/http.js +0 -476
- package/packages/@monomind/shared/dist/mcp/transport/index.d.ts +0 -102
- package/packages/@monomind/shared/dist/mcp/transport/index.js +0 -238
- package/packages/@monomind/shared/dist/mcp/transport/stdio.d.ts +0 -104
- package/packages/@monomind/shared/dist/mcp/transport/stdio.js +0 -263
- package/packages/@monomind/shared/dist/mcp/transport/websocket.d.ts +0 -133
- package/packages/@monomind/shared/dist/mcp/transport/websocket.js +0 -396
- package/packages/@monomind/shared/dist/mcp/types.d.ts +0 -438
- package/packages/@monomind/shared/dist/mcp/types.js +0 -54
- package/packages/@monomind/shared/dist/plugin-interface.d.ts +0 -544
- package/packages/@monomind/shared/dist/plugin-interface.js +0 -23
- package/packages/@monomind/shared/dist/plugin-loader.d.ts +0 -139
- package/packages/@monomind/shared/dist/plugin-loader.js +0 -434
- package/packages/@monomind/shared/dist/plugin-registry.d.ts +0 -183
- package/packages/@monomind/shared/dist/plugin-registry.js +0 -457
- package/packages/@monomind/shared/dist/plugins/index.d.ts +0 -10
- package/packages/@monomind/shared/dist/plugins/index.js +0 -10
- package/packages/@monomind/shared/dist/plugins/official/hive-mind-plugin.d.ts +0 -106
- package/packages/@monomind/shared/dist/plugins/official/hive-mind-plugin.js +0 -241
- package/packages/@monomind/shared/dist/plugins/official/index.d.ts +0 -10
- package/packages/@monomind/shared/dist/plugins/official/index.js +0 -10
- package/packages/@monomind/shared/dist/plugins/official/maestro-plugin.d.ts +0 -121
- package/packages/@monomind/shared/dist/plugins/official/maestro-plugin.js +0 -355
- package/packages/@monomind/shared/dist/plugins/types.d.ts +0 -93
- package/packages/@monomind/shared/dist/plugins/types.js +0 -9
- package/packages/@monomind/shared/dist/reducers.d.ts +0 -33
- package/packages/@monomind/shared/dist/reducers.js +0 -89
- package/packages/@monomind/shared/dist/resilience/bulkhead.d.ts +0 -105
- package/packages/@monomind/shared/dist/resilience/bulkhead.js +0 -206
- package/packages/@monomind/shared/dist/resilience/circuit-breaker.d.ts +0 -132
- package/packages/@monomind/shared/dist/resilience/circuit-breaker.js +0 -233
- package/packages/@monomind/shared/dist/resilience/index.d.ts +0 -19
- package/packages/@monomind/shared/dist/resilience/index.js +0 -19
- package/packages/@monomind/shared/dist/resilience/rate-limiter.d.ts +0 -168
- package/packages/@monomind/shared/dist/resilience/rate-limiter.js +0 -314
- package/packages/@monomind/shared/dist/resilience/retry.d.ts +0 -91
- package/packages/@monomind/shared/dist/resilience/retry.js +0 -159
- package/packages/@monomind/shared/dist/retry-policy.d.ts +0 -14
- package/packages/@monomind/shared/dist/retry-policy.js +0 -23
- package/packages/@monomind/shared/dist/retry-runner.d.ts +0 -21
- package/packages/@monomind/shared/dist/retry-runner.js +0 -57
- package/packages/@monomind/shared/dist/schema-validator.d.ts +0 -46
- package/packages/@monomind/shared/dist/schema-validator.js +0 -133
- package/packages/@monomind/shared/dist/scratchpad.d.ts +0 -23
- package/packages/@monomind/shared/dist/scratchpad.js +0 -32
- package/packages/@monomind/shared/dist/security/index.d.ts +0 -10
- package/packages/@monomind/shared/dist/security/index.js +0 -12
- package/packages/@monomind/shared/dist/security/input-validation.d.ts +0 -73
- package/packages/@monomind/shared/dist/security/input-validation.js +0 -201
- package/packages/@monomind/shared/dist/security/secure-random.d.ts +0 -92
- package/packages/@monomind/shared/dist/security/secure-random.js +0 -142
- package/packages/@monomind/shared/dist/services/index.d.ts +0 -7
- package/packages/@monomind/shared/dist/services/index.js +0 -7
- package/packages/@monomind/shared/dist/services/progress.service.d.ts +0 -124
- package/packages/@monomind/shared/dist/services/progress.service.js +0 -402
- package/packages/@monomind/shared/dist/state-manager.d.ts +0 -34
- package/packages/@monomind/shared/dist/state-manager.js +0 -73
- package/packages/@monomind/shared/dist/state-validator.d.ts +0 -20
- package/packages/@monomind/shared/dist/state-validator.js +0 -49
- package/packages/@monomind/shared/dist/swarm-state.d.ts +0 -52
- package/packages/@monomind/shared/dist/swarm-state.js +0 -18
- package/packages/@monomind/shared/dist/testing/fixture-builder.d.ts +0 -14
- package/packages/@monomind/shared/dist/testing/fixture-builder.js +0 -32
- package/packages/@monomind/shared/dist/testing/index.d.ts +0 -2
- package/packages/@monomind/shared/dist/testing/index.js +0 -2
- package/packages/@monomind/shared/dist/testing/test-model.d.ts +0 -29
- package/packages/@monomind/shared/dist/testing/test-model.js +0 -53
- package/packages/@monomind/shared/dist/types/agent-registry.d.ts +0 -62
- package/packages/@monomind/shared/dist/types/agent-registry.js +0 -8
- package/packages/@monomind/shared/dist/types/agent-version.d.ts +0 -49
- package/packages/@monomind/shared/dist/types/agent-version.js +0 -7
- package/packages/@monomind/shared/dist/types/agent.types.d.ts +0 -137
- package/packages/@monomind/shared/dist/types/agent.types.js +0 -6
- package/packages/@monomind/shared/dist/types/benchmark.d.ts +0 -39
- package/packages/@monomind/shared/dist/types/benchmark.js +0 -6
- package/packages/@monomind/shared/dist/types/communication-flow.d.ts +0 -25
- package/packages/@monomind/shared/dist/types/communication-flow.js +0 -7
- package/packages/@monomind/shared/dist/types/consensus-audit.d.ts +0 -40
- package/packages/@monomind/shared/dist/types/consensus-audit.js +0 -7
- package/packages/@monomind/shared/dist/types/dlq.d.ts +0 -40
- package/packages/@monomind/shared/dist/types/dlq.js +0 -7
- package/packages/@monomind/shared/dist/types/eval.d.ts +0 -59
- package/packages/@monomind/shared/dist/types/eval.js +0 -6
- package/packages/@monomind/shared/dist/types/index.d.ts +0 -19
- package/packages/@monomind/shared/dist/types/index.js +0 -33
- package/packages/@monomind/shared/dist/types/mcp.types.d.ts +0 -266
- package/packages/@monomind/shared/dist/types/mcp.types.js +0 -7
- package/packages/@monomind/shared/dist/types/memory.types.d.ts +0 -236
- package/packages/@monomind/shared/dist/types/memory.types.js +0 -7
- package/packages/@monomind/shared/dist/types/retry.d.ts +0 -72
- package/packages/@monomind/shared/dist/types/retry.js +0 -40
- package/packages/@monomind/shared/dist/types/specialization.d.ts +0 -27
- package/packages/@monomind/shared/dist/types/specialization.js +0 -8
- package/packages/@monomind/shared/dist/types/swarm.types.d.ts +0 -186
- package/packages/@monomind/shared/dist/types/swarm.types.js +0 -65
- package/packages/@monomind/shared/dist/types/task.types.d.ts +0 -178
- package/packages/@monomind/shared/dist/types/task.types.js +0 -32
- package/packages/@monomind/shared/dist/types/termination.d.ts +0 -29
- package/packages/@monomind/shared/dist/types/termination.js +0 -14
- package/packages/@monomind/shared/dist/types/tool-version.d.ts +0 -41
- package/packages/@monomind/shared/dist/types/tool-version.js +0 -8
- package/packages/@monomind/shared/dist/types/trigger.d.ts +0 -40
- package/packages/@monomind/shared/dist/types/trigger.js +0 -8
- package/packages/@monomind/shared/dist/types.d.ts +0 -197
- package/packages/@monomind/shared/dist/types.js +0 -21
- package/packages/@monomind/shared/dist/utils/secure-logger.d.ts +0 -69
- package/packages/@monomind/shared/dist/utils/secure-logger.js +0 -208
|
@@ -39,7 +39,7 @@ mcp__monomind__agent_spawn { type: "coder", name: "Implementation Planner" }
|
|
|
39
39
|
|
|
40
40
|
// Create comprehensive issue
|
|
41
41
|
mcp__github__create_issue {
|
|
42
|
-
owner: "
|
|
42
|
+
owner: "monoes",
|
|
43
43
|
repo: "monomind",
|
|
44
44
|
title: "Integration Review: Monomind CLI and hooks complete integration",
|
|
45
45
|
body: `## 🔄 Integration Review
|
|
@@ -56,7 +56,7 @@ mcp__github__create_issue {
|
|
|
56
56
|
### Swarm Coordination
|
|
57
57
|
This issue will be managed by coordinated swarm agents for optimal progress tracking.`,
|
|
58
58
|
labels: ["integration", "review", "enhancement"],
|
|
59
|
-
assignees: ["
|
|
59
|
+
assignees: ["monoes"]
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
// Set up automated tracking
|
|
@@ -77,7 +77,7 @@ mcp__monomind__memory_store {
|
|
|
77
77
|
|
|
78
78
|
// Add coordinated progress comment
|
|
79
79
|
mcp__github__add_issue_comment {
|
|
80
|
-
owner: "
|
|
80
|
+
owner: "monoes",
|
|
81
81
|
repo: "monomind",
|
|
82
82
|
issue_number: 54,
|
|
83
83
|
body: `## 🚀 Progress Update
|
|
@@ -110,14 +110,14 @@ mcp__monomind__memory_store {
|
|
|
110
110
|
```javascript
|
|
111
111
|
// Search and coordinate related issues
|
|
112
112
|
mcp__github__search_issues {
|
|
113
|
-
q: "repo:
|
|
113
|
+
q: "repo:monoes/monomind label:integration state:open",
|
|
114
114
|
sort: "created",
|
|
115
115
|
order: "desc"
|
|
116
116
|
}
|
|
117
117
|
|
|
118
118
|
// Create coordinated issue updates
|
|
119
119
|
mcp__github__update_issue {
|
|
120
|
-
owner: "
|
|
120
|
+
owner: "monoes",
|
|
121
121
|
repo: "monomind",
|
|
122
122
|
issue_number: 54,
|
|
123
123
|
state: "open",
|
|
@@ -29,7 +29,7 @@ mcp__monomind__agent_spawn { type: "coordinator", name: "PR Coordinator" }
|
|
|
29
29
|
|
|
30
30
|
// Create PR and orchestrate review
|
|
31
31
|
mcp__github__create_pull_request {
|
|
32
|
-
owner: "
|
|
32
|
+
owner: "monoes",
|
|
33
33
|
repo: "monomind",
|
|
34
34
|
title: "Integration: Monomind CLI and hooks",
|
|
35
35
|
head: "integration/monomind-cli-hooks",
|
|
@@ -48,11 +48,11 @@ mcp__monomind__task_orchestrate {
|
|
|
48
48
|
### 2. Automated Multi-File Review
|
|
49
49
|
```javascript
|
|
50
50
|
// Get PR files and create parallel review tasks
|
|
51
|
-
mcp__github__get_pull_request_files { owner: "
|
|
51
|
+
mcp__github__get_pull_request_files { owner: "monoes", repo: "monomind", pull_number: 54 }
|
|
52
52
|
|
|
53
53
|
// Create coordinated reviews
|
|
54
54
|
mcp__github__create_pull_request_review {
|
|
55
|
-
owner: "
|
|
55
|
+
owner: "monoes",
|
|
56
56
|
repo: "monomind",
|
|
57
57
|
pull_number: 54,
|
|
58
58
|
body: "Automated swarm review with comprehensive analysis",
|
|
@@ -67,11 +67,11 @@ mcp__github__create_pull_request_review {
|
|
|
67
67
|
### 3. Merge Coordination with Testing
|
|
68
68
|
```javascript
|
|
69
69
|
// Validate PR status and merge when ready
|
|
70
|
-
mcp__github__get_pull_request_status { owner: "
|
|
70
|
+
mcp__github__get_pull_request_status { owner: "monoes", repo: "monomind", pull_number: 54 }
|
|
71
71
|
|
|
72
72
|
// Merge with coordination
|
|
73
73
|
mcp__github__merge_pull_request {
|
|
74
|
-
owner: "
|
|
74
|
+
owner: "monoes",
|
|
75
75
|
repo: "monomind",
|
|
76
76
|
pull_number: 54,
|
|
77
77
|
merge_method: "squash",
|
|
@@ -34,7 +34,7 @@ mcp__monomind__agent_spawn { type: "analyst", name: "Deployment Analyst" }
|
|
|
34
34
|
|
|
35
35
|
// Create release preparation branch
|
|
36
36
|
mcp__github__create_branch {
|
|
37
|
-
owner: "
|
|
37
|
+
owner: "monoes",
|
|
38
38
|
repo: "monomind",
|
|
39
39
|
branch: "release/v1.8.0",
|
|
40
40
|
from_branch: "main"
|
|
@@ -53,7 +53,7 @@ mcp__monomind__task_orchestrate {
|
|
|
53
53
|
```javascript
|
|
54
54
|
// Update versions across packages
|
|
55
55
|
mcp__github__push_files {
|
|
56
|
-
owner: "
|
|
56
|
+
owner: "monoes",
|
|
57
57
|
repo: "monomind",
|
|
58
58
|
branch: "release/v1.8.0",
|
|
59
59
|
files: [
|
|
@@ -99,7 +99,7 @@ Bash("cd packages/@monomind/cli && npm run build")
|
|
|
99
99
|
|
|
100
100
|
// Create release PR with validation results
|
|
101
101
|
mcp__github__create_pull_request {
|
|
102
|
-
owner: "
|
|
102
|
+
owner: "monoes",
|
|
103
103
|
repo: "monomind",
|
|
104
104
|
title: "Release v1.8.0: GitHub Integration and Swarm Enhancements",
|
|
105
105
|
head: "release/v1.8.0",
|
|
@@ -37,7 +37,7 @@ LS("packages/@monomind/hooks")
|
|
|
37
37
|
|
|
38
38
|
// Search for related repositories
|
|
39
39
|
mcp__github__search_repositories {
|
|
40
|
-
query: "user:
|
|
40
|
+
query: "user:monoes monomind",
|
|
41
41
|
sort: "updated",
|
|
42
42
|
order: "desc"
|
|
43
43
|
}
|
|
@@ -63,7 +63,7 @@ mcp__github__create_repository {
|
|
|
63
63
|
|
|
64
64
|
// Push template structure
|
|
65
65
|
mcp__github__push_files {
|
|
66
|
-
owner: "
|
|
66
|
+
owner: "monoes",
|
|
67
67
|
repo: "monomind-project-template",
|
|
68
68
|
branch: "main",
|
|
69
69
|
files: [
|
|
@@ -136,7 +136,7 @@ const repositories = ["monomind", "monomind-docs", "monomind-examples"];
|
|
|
136
136
|
|
|
137
137
|
repositories.forEach((repo) => {
|
|
138
138
|
mcp__github__create_or_update_file({
|
|
139
|
-
owner: "
|
|
139
|
+
owner: "monoes",
|
|
140
140
|
repo,
|
|
141
141
|
path: ".github/workflows/integration.yml",
|
|
142
142
|
content: `name: Integration Tests
|
|
@@ -149,7 +149,7 @@ const repositories = ["@monomind/cli", "@monomind/hooks", "@monomind/memory"];
|
|
|
149
149
|
// Update common files across repositories
|
|
150
150
|
repositories.forEach((repo) => {
|
|
151
151
|
mcp__github__create_or_update_file({
|
|
152
|
-
owner: "
|
|
152
|
+
owner: "monoes",
|
|
153
153
|
repo: "monomind",
|
|
154
154
|
path: `${repo}/.github/workflows/integration.yml`,
|
|
155
155
|
content: `name: Integration Tests
|
|
@@ -30,12 +30,14 @@ Use orgs when the work is ongoing, not single-shot. A content team that ships 10
|
|
|
30
30
|
**Options:**
|
|
31
31
|
`--name <slug>` — org identifier used with `/mastermind:runorg` (derived from goal if omitted)
|
|
32
32
|
`--roles <list>` — explicit role list (e.g. "boss, writer, reviewer, marketer")
|
|
33
|
+
`--schedule <interval>` — make this a self-scheduling loop org (e.g. `"every 30 minutes"`, `"every hour"`, `"daily"`)
|
|
33
34
|
`--auto` — skip confirmation, create immediately
|
|
34
35
|
`--confirm` — always ask before saving (default)
|
|
35
36
|
`--delete <name>` — delete a saved org and all associated data files
|
|
36
37
|
`--list` — list all saved orgs with their status
|
|
37
38
|
|
|
38
39
|
Once created, start the org with `/mastermind:runorg --org <name>`.
|
|
40
|
+
For scheduled orgs: `runorg` activates the loop; `stoporg` stops it; `orgs` lists all.
|
|
39
41
|
|
|
40
42
|
---
|
|
41
43
|
|
|
@@ -48,6 +50,7 @@ Parse `$ARGUMENTS` for:
|
|
|
48
50
|
- `--confirm` flag → mode = confirm
|
|
49
51
|
- `--name <name>` → org_name = <name> (must match `^[a-z0-9][a-z0-9-]{0,63}$`; if omitted, derived from goal)
|
|
50
52
|
- `--roles <desc>` → roles_desc = <desc> (explicit role list, e.g. "boss, writer, reviewer, marketer")
|
|
53
|
+
- `--schedule <interval>` → schedule = <interval> (e.g. `"every 30 minutes"`, `"every hour"`, `"daily"`; triggers loop org generation)
|
|
51
54
|
- `--delete <name>` → delete_mode = true, delete_name = <name>
|
|
52
55
|
- `--list` flag → list_mode = true
|
|
53
56
|
- Remaining text = prompt (goal description)
|
|
@@ -118,7 +121,7 @@ curl -s -X POST "${CTRL_URL}/api/mastermind/event" \
|
|
|
118
121
|
'{type:"domain:dispatch",session:$session,domain:"ops",cmd:"Designing and saving org definition",ts:(now*1000|floor)}')" || true
|
|
119
122
|
```
|
|
120
123
|
|
|
121
|
-
Invoke `Skill("mastermind:createorg")` passing: brain_context, prompt, org_name, roles_desc, mode, session_id: `$session_id`, caller: "command".
|
|
124
|
+
Invoke `Skill("mastermind:createorg")` passing: brain_context, prompt, org_name, roles_desc, schedule, mode, session_id: `$session_id`, caller: "command".
|
|
122
125
|
|
|
123
126
|
After skill returns: note the status (`complete`, `partial`, or `blocked`). Emit `session:complete`:
|
|
124
127
|
```bash
|
|
@@ -114,5 +114,5 @@ mcp__monomind__agent_health({})
|
|
|
114
114
|
|
|
115
115
|
## Support
|
|
116
116
|
|
|
117
|
-
- Documentation: https://github.com/
|
|
118
|
-
- Issues: https://github.com/
|
|
117
|
+
- Documentation: https://github.com/monoes/monomind
|
|
118
|
+
- Issues: https://github.com/monoes/monomind/issues
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mastermind-orgs
|
|
3
|
+
description: List all saved orgs with their status, schedule interval, and last/next run times. Shows stopped/active/paused state for scheduled orgs.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**If $ARGUMENTS is empty:** Execute the listing below directly.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**MASTERMIND: ORGS**
|
|
11
|
+
|
|
12
|
+
Lists all saved orgs.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
Parse `$ARGUMENTS` for:
|
|
17
|
+
- No flags expected — this command takes no arguments.
|
|
18
|
+
|
|
19
|
+
Execute `Skill("mastermind:orgs")` passing: caller: "command".
|
|
20
|
+
|
|
21
|
+
Invoke `Skill("mastermind:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call — do not skip it.
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mastermind-orgstatus
|
|
3
|
+
description: Show detailed status for a single org — lifecycle state, schedule, last/next run, recent activity, and roles. For scheduled orgs shows loop health.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**If $ARGUMENTS is empty:** Output the following and wait.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**MASTERMIND: ORG STATUS**
|
|
11
|
+
|
|
12
|
+
Shows detailed status for a saved org.
|
|
13
|
+
|
|
14
|
+
**Usage:**
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
/mastermind:orgstatus --org <name>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Examples:**
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
/mastermind:orgstatus --org livarto-issue-resolver
|
|
24
|
+
/mastermind:orgstatus --org newsroom
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Your saved orgs:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
ls .monomind/orgs/*.json 2>/dev/null | grep -v -- '-approvals\|-state\|-activity' | \
|
|
31
|
+
xargs -I{} basename {} .json 2>/dev/null || echo "(none — run /mastermind:createorg to define one)"
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
---
|
|
35
|
+
|
|
36
|
+
**If $ARGUMENTS is non-empty:** Execute the flow below.
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
Parse `$ARGUMENTS` for:
|
|
41
|
+
- `--org <name>` → org_name = <name>
|
|
42
|
+
|
|
43
|
+
If `--org` is not provided, list orgs and ask which to inspect.
|
|
44
|
+
|
|
45
|
+
Verify the org file exists:
|
|
46
|
+
```bash
|
|
47
|
+
[ -f ".monomind/orgs/${org_name}.json" ] || { echo "Org '${org_name}' not found."; exit 1; }
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Generate a session ID:
|
|
51
|
+
```bash
|
|
52
|
+
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
|
|
53
|
+
session_id="mm-$(date -u +%Y%m%dT%H%M%S)"
|
|
54
|
+
CTRL_URL=$(jq -r '.url // "http://localhost:4242"' "$REPO_ROOT/.monomind/control.json" 2>/dev/null || echo "http://localhost:4242")
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Invoke `Skill("mastermind:orgstatus")` passing: org_name: `$org_name`, caller: "command".
|
|
58
|
+
|
|
59
|
+
Invoke `Skill("mastermind:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call — do not skip it.
|
|
@@ -9,9 +9,11 @@ description: Start a saved org as a persistent autonomous agent organization. Th
|
|
|
9
9
|
|
|
10
10
|
**MASTERMIND: RUN ORG**
|
|
11
11
|
|
|
12
|
-
Running an org starts
|
|
12
|
+
Running an org starts an autonomous agent organization. There are two modes:
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
**Persistent org** (no schedule): a boss agent loads the org definition, assigns work to specialists from a shared board, and loops indefinitely. Stop with `/mastermind:stoporg --org <name>`.
|
|
15
|
+
|
|
16
|
+
**Scheduled org** (created with `--schedule`): sets the org to `active` and runs the first iteration immediately. Subsequent iterations are self-scheduled via ScheduleWakeup. The loop stops cleanly within one interval after `/mastermind:stoporg --org <name>`.
|
|
15
17
|
|
|
16
18
|
**Your saved orgs:**
|
|
17
19
|
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: mastermind-stoporg
|
|
3
|
+
description: Stop a running scheduled org loop. Sets status to "stopped" — the next scheduled wakeup reads the status, skips all work, and does not reschedule. Loop dies within one interval.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
**If $ARGUMENTS is empty:** Output the following and wait.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
**MASTERMIND: STOP ORG**
|
|
11
|
+
|
|
12
|
+
Stops a scheduled org loop cleanly. The org's `status` is set to `"stopped"` — the next scheduled wakeup will read the status, skip all work, and not reschedule itself. The loop is guaranteed to die within one interval (no orphaned wakeups).
|
|
13
|
+
|
|
14
|
+
**Usage:**
|
|
15
|
+
|
|
16
|
+
```
|
|
17
|
+
/mastermind:stoporg --org <name>
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Examples:**
|
|
21
|
+
|
|
22
|
+
```
|
|
23
|
+
/mastermind:stoporg --org livarto-issue-resolver
|
|
24
|
+
/mastermind:stoporg --org research-pod
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
**Lifecycle:**
|
|
28
|
+
```
|
|
29
|
+
stopped → (runorg) → active
|
|
30
|
+
active → (stoporg) → stopped
|
|
31
|
+
active → (HIL) → paused (set manually in .monomind/orgs/<name>.json)
|
|
32
|
+
paused → (set active) → active (resume by setting status back to "active" in the JSON)
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Your scheduled orgs:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
ls .monomind/orgs/*.json 2>/dev/null | grep -v -- '-approvals\|-state\|-activity' | \
|
|
39
|
+
xargs -I{} sh -c 'name=$(jq -r ".name" "{}"); status=$(jq -r ".status // \"no-loop\"" "{}"); interval=$(jq -r "if .loop.poll_interval_minutes then \"\(.loop.poll_interval_minutes)m\" else \"—\" end" "{}"); echo " $name ($status, $interval)"' 2>/dev/null || echo "(none)"
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
**If $ARGUMENTS is non-empty:** Execute the flow below.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
Parse `$ARGUMENTS` for:
|
|
49
|
+
- `--org <name>` → org_name = <name>
|
|
50
|
+
|
|
51
|
+
If `--org` is not provided, list orgs with schedules and ask which to stop.
|
|
52
|
+
|
|
53
|
+
Verify the org file exists:
|
|
54
|
+
```bash
|
|
55
|
+
[ -f ".monomind/orgs/${org_name}.json" ] || { echo "Org '${org_name}' not found."; exit 1; }
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Generate a session ID:
|
|
59
|
+
```bash
|
|
60
|
+
REPO_ROOT=$(git rev-parse --show-toplevel 2>/dev/null || pwd)
|
|
61
|
+
session_id="mm-$(date -u +%Y%m%dT%H%M%S)"
|
|
62
|
+
CTRL_URL=$(jq -r '.url // "http://localhost:4242"' "$REPO_ROOT/.monomind/control.json" 2>/dev/null || echo "http://localhost:4242")
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Invoke `Skill("mastermind:stoporg")` passing: org_name: `$org_name`, session_id: `$session_id`, caller: "command".
|
|
66
|
+
|
|
67
|
+
After skill returns: emit `session:complete`:
|
|
68
|
+
```bash
|
|
69
|
+
curl -s -X POST "${CTRL_URL}/api/mastermind/event" \
|
|
70
|
+
-H "Content-Type: application/json" \
|
|
71
|
+
-d "$(jq -cn \
|
|
72
|
+
--arg session "$session_id" \
|
|
73
|
+
'{type:"session:complete",session:$session,domain:"ops",status:"complete",domains:["ops"],ts:(now*1000|floor)}')" || true
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Follow _protocol.md Brain Write Procedure for domain `ops`.
|
|
77
|
+
|
|
78
|
+
Invoke `Skill("mastermind:_repeat")` now to execute the REPEAT POSTAMBLE. This is a required tool call — do not skip it.
|
|
@@ -158,4 +158,4 @@ mcp__monomind__swarm_shutdown({})
|
|
|
158
158
|
- `npx monomind hive-mind init` — Byzantine fault-tolerant consensus
|
|
159
159
|
- `/mastermind` — Interactive swarm topology selection
|
|
160
160
|
|
|
161
|
-
Documentation: https://github.com/
|
|
161
|
+
Documentation: https://github.com/monoes/monomind
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Enforcement Gates Handler
|
|
3
|
+
*
|
|
4
|
+
* Inline gate logic for PreToolUse hooks — no ESM/package dependency.
|
|
5
|
+
*
|
|
6
|
+
* Patterns are an INTENTIONAL SUPERSET of @monomind/guidance/src/gates.ts defaults:
|
|
7
|
+
* - All categories from DEFAULT_GATE_CONFIG are covered here
|
|
8
|
+
* - Many patterns are enhanced (e.g. --force-with-lease, -fr reversed flags, broader kubectl)
|
|
9
|
+
* - Key thresholds MUST stay aligned: password/secret min length = 8 chars (both files)
|
|
10
|
+
*
|
|
11
|
+
* When updating patterns in gates.ts, check whether the corresponding pattern here
|
|
12
|
+
* also needs updating — and vice versa.
|
|
13
|
+
*
|
|
14
|
+
* Gates enforced at runtime:
|
|
15
|
+
* pre-bash → destructive-ops (require-confirmation → block)
|
|
16
|
+
* pre-write → secrets (block)
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
'use strict';
|
|
20
|
+
|
|
21
|
+
// ─── Patterns (superset of DEFAULT_GATE_CONFIG in gates.ts) ──────────────────
|
|
22
|
+
|
|
23
|
+
const DESTRUCTIVE_PATTERNS = [
|
|
24
|
+
/\brm\s+(?:-[a-z]*f[a-z]*r|-[a-z]*r[a-z]*f|--recursive.*--force|--force.*--recursive|-rf?)\b/i,
|
|
25
|
+
/\bdrop\s+(database|table|schema|index|view|function|procedure)\b/i,
|
|
26
|
+
/\btruncate\s+table\b/i,
|
|
27
|
+
/\bgit\s+push\s+(?:.*\s)?(?:--force(?:-with-lease)?|-[a-z]*f)\b/i,
|
|
28
|
+
/\bgit\s+reset\s+--hard\b/i,
|
|
29
|
+
/\bgit\s+clean\s+.*-f/i,
|
|
30
|
+
/\bformat\s+[a-z]:/i,
|
|
31
|
+
/\bdel\s+\/[sf]\b/i,
|
|
32
|
+
/\b(?:kubectl|helm)\s+delete\b.*\b(?:--all|namespace|all)\b/i,
|
|
33
|
+
/\bDELETE\s+FROM\s+\w+/i,
|
|
34
|
+
/\bALTER\s+TABLE\s+\w+\s+DROP\b/i,
|
|
35
|
+
];
|
|
36
|
+
|
|
37
|
+
const SECRET_PATTERNS = [
|
|
38
|
+
/(?:api[_-]?key|apikey)\s*[:=]\s*['"][^'"]{8,}['"]/gi,
|
|
39
|
+
/(?:secret|password|passwd|pwd)\s*[:=]\s*['"][^'"]{8,}['"]/gi,
|
|
40
|
+
/(?:token|bearer)\s*[:=]\s*['"][^'"]{10,}['"]/gi,
|
|
41
|
+
/-----BEGIN (?:RSA |EC |DSA )?PRIVATE KEY-----/g,
|
|
42
|
+
/sk-[a-zA-Z0-9]{20,}/g,
|
|
43
|
+
/ghp_[a-zA-Z0-9]{36}/g,
|
|
44
|
+
/npm_[a-zA-Z0-9]{36}/g,
|
|
45
|
+
/AKIA[0-9A-Z]{16}/g,
|
|
46
|
+
];
|
|
47
|
+
|
|
48
|
+
// ─── Helpers ──────────────────────────────────────────────────────────────────
|
|
49
|
+
|
|
50
|
+
function redact(match) {
|
|
51
|
+
return match.length > 12
|
|
52
|
+
? match.slice(0, 4) + '*'.repeat(match.length - 8) + match.slice(-4)
|
|
53
|
+
: '*'.repeat(match.length);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
function checkDestructive(command) {
|
|
57
|
+
for (const pattern of DESTRUCTIVE_PATTERNS) {
|
|
58
|
+
pattern.lastIndex = 0;
|
|
59
|
+
const match = pattern.exec(command);
|
|
60
|
+
if (match) {
|
|
61
|
+
return {
|
|
62
|
+
triggered: true,
|
|
63
|
+
matched: match[0],
|
|
64
|
+
reason: `Destructive operation detected: "${match[0]}". Confirm this is intentional and document a rollback plan before proceeding.`,
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
return { triggered: false };
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function checkSecrets(content) {
|
|
72
|
+
const found = [];
|
|
73
|
+
for (const pattern of SECRET_PATTERNS) {
|
|
74
|
+
pattern.lastIndex = 0;
|
|
75
|
+
const matches = content.match(pattern);
|
|
76
|
+
if (matches) {
|
|
77
|
+
for (const m of matches) found.push(redact(m));
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
if (found.length === 0) return { triggered: false };
|
|
81
|
+
return {
|
|
82
|
+
triggered: true,
|
|
83
|
+
count: found.length,
|
|
84
|
+
redacted: found,
|
|
85
|
+
reason: `Potential secret(s) detected in file content (${found.length} match${found.length > 1 ? 'es' : ''}): ${found.join(', ')}. Move secrets to environment variables or a .env file (add to .gitignore).`,
|
|
86
|
+
};
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
// ─── Hook handlers ────────────────────────────────────────────────────────────
|
|
90
|
+
|
|
91
|
+
/**
|
|
92
|
+
* pre-bash: check for destructive shell commands.
|
|
93
|
+
* Outputs Claude Code block decision to stdout when triggered.
|
|
94
|
+
*/
|
|
95
|
+
function handlePreBash(hCtx) {
|
|
96
|
+
var cmd = (hCtx.toolInput && (hCtx.toolInput.command || hCtx.toolInput.cmd)) || '';
|
|
97
|
+
if (!cmd) return;
|
|
98
|
+
|
|
99
|
+
var result = checkDestructive(cmd);
|
|
100
|
+
if (result.triggered) {
|
|
101
|
+
// Output block decision and set exit code 2 — both required by Claude Code PreToolUse protocol
|
|
102
|
+
console.log(JSON.stringify({
|
|
103
|
+
decision: 'block',
|
|
104
|
+
reason: '[gates] ' + result.reason,
|
|
105
|
+
}));
|
|
106
|
+
process.exitCode = 2;
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* pre-write: check for secrets in Write / Edit / MultiEdit content before it lands on disk.
|
|
112
|
+
* Outputs Claude Code block decision to stdout when triggered.
|
|
113
|
+
*/
|
|
114
|
+
function handlePreWrite(hCtx) {
|
|
115
|
+
var toolInput = hCtx.toolInput || {};
|
|
116
|
+
// Write: toolInput.content — Edit: toolInput.new_string
|
|
117
|
+
// MultiEdit: toolInput.edits is an array of { old_string, new_string }
|
|
118
|
+
var content = toolInput.content || toolInput.new_string || '';
|
|
119
|
+
if (!content && Array.isArray(toolInput.edits)) {
|
|
120
|
+
content = toolInput.edits.map(function(e) { return e.new_string || ''; }).join('\n');
|
|
121
|
+
}
|
|
122
|
+
if (!content || typeof content !== 'string') return;
|
|
123
|
+
|
|
124
|
+
var result = checkSecrets(content);
|
|
125
|
+
if (result.triggered) {
|
|
126
|
+
// Output block decision and set exit code 2 — both required by Claude Code PreToolUse protocol
|
|
127
|
+
console.log(JSON.stringify({
|
|
128
|
+
decision: 'block',
|
|
129
|
+
reason: '[gates] ' + result.reason,
|
|
130
|
+
}));
|
|
131
|
+
process.exitCode = 2;
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
|
|
135
|
+
module.exports = { handlePreBash, handlePreWrite, checkDestructive, checkSecrets };
|
|
@@ -73,9 +73,13 @@ module.exports = {
|
|
|
73
73
|
try {
|
|
74
74
|
var mgDbPath1 = path.join(CWD, '.monomind', 'monograph.db');
|
|
75
75
|
if (fs.existsSync(mgDbPath1)) {
|
|
76
|
-
var
|
|
77
|
-
|
|
78
|
-
|
|
76
|
+
var changedFiles1 = await new Promise(function(resolve) {
|
|
77
|
+
require('child_process').exec(
|
|
78
|
+
'git diff --name-only HEAD 2>/dev/null || git diff --name-only 2>/dev/null',
|
|
79
|
+
{ cwd: CWD, timeout: 3000 },
|
|
80
|
+
function(err, stdout) { resolve(err ? '' : (stdout || '').trim()); }
|
|
81
|
+
);
|
|
82
|
+
});
|
|
79
83
|
if (changedFiles1) {
|
|
80
84
|
var mgMod1 = null;
|
|
81
85
|
mgMod1 = hCtx._requireMonograph();
|
|
@@ -272,6 +272,15 @@ const handlers = {
|
|
|
272
272
|
var cmd = (hCtx.toolInput && (hCtx.toolInput.command || hCtx.toolInput.cmd)) || '';
|
|
273
273
|
if (/\bgrep\b/.test(cmd)) _recordGraphTelemetry('bash_grep_call');
|
|
274
274
|
else if (/\bfind\b/.test(cmd)) _recordGraphTelemetry('bash_find_call');
|
|
275
|
+
// Enforcement gate: destructive operations
|
|
276
|
+
var gates = require('./handlers/gates-handler.cjs');
|
|
277
|
+
gates.handlePreBash(hCtx);
|
|
278
|
+
},
|
|
279
|
+
|
|
280
|
+
'pre-write': () => {
|
|
281
|
+
// Enforcement gate: secrets detection before Write/Edit/MultiEdit lands on disk
|
|
282
|
+
var gates = require('./handlers/gates-handler.cjs');
|
|
283
|
+
gates.handlePreWrite(hCtx);
|
|
275
284
|
},
|
|
276
285
|
|
|
277
286
|
'pre-search': () => {
|
|
@@ -330,6 +339,6 @@ if (command && handlers[command]) {
|
|
|
330
339
|
main().catch(function(e) {
|
|
331
340
|
console.log('[WARN] Hook handler error: ' + e.message);
|
|
332
341
|
}).finally(function() {
|
|
333
|
-
//
|
|
334
|
-
process.exit(0);
|
|
342
|
+
// Use process.exitCode if a gate set it (exit 2 = block), otherwise clean exit
|
|
343
|
+
process.exit(process.exitCode || 0);
|
|
335
344
|
});
|