@monoes/monomindcli 2.8.3 → 2.9.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/helpers/auto-memory-hook.mjs +0 -0
- package/.claude/helpers/handlers/route-handler.cjs +12 -0
- package/.claude/helpers/handlers/session-restore-handler.cjs +28 -7
- package/.claude/helpers/hook-handler.cjs +0 -0
- package/.claude/helpers/utils/micro-agents.cjs +22 -0
- package/.claude/skills/monodesign/scripts/live/sveltekit-adapter.mjs +11 -6
- package/.claude/skills/monodesign/scripts/live-inject.mjs +20 -7
- package/.claude/skills/monodesign/scripts/live-server.mjs +38 -2
- package/LICENSE +191 -0
- package/README.md +8 -6
- package/dist/src/browser/dashboard/server.d.ts +5 -0
- package/dist/src/browser/dashboard/server.d.ts.map +1 -1
- package/dist/src/browser/dashboard/server.js +59 -4
- package/dist/src/browser/dashboard/server.js.map +1 -1
- package/dist/src/browser/dashboard/ui.html +18 -8
- package/dist/src/browser/workflow/store.d.ts.map +1 -1
- package/dist/src/browser/workflow/store.js +3 -2
- package/dist/src/browser/workflow/store.js.map +1 -1
- package/dist/src/capabilities/cap-documents.d.ts.map +1 -1
- package/dist/src/capabilities/cap-documents.js +14 -9
- package/dist/src/capabilities/cap-documents.js.map +1 -1
- package/dist/src/commands/design-palette.d.ts +5 -0
- package/dist/src/commands/design-palette.d.ts.map +1 -1
- package/dist/src/commands/design-palette.js +8 -5
- package/dist/src/commands/design-palette.js.map +1 -1
- package/dist/src/commands/doctor.d.ts.map +1 -1
- package/dist/src/commands/doctor.js +22 -18
- package/dist/src/commands/doctor.js.map +1 -1
- package/dist/src/commands/download-embeddings.d.ts +8 -0
- package/dist/src/commands/download-embeddings.d.ts.map +1 -0
- package/dist/src/commands/download-embeddings.js +34 -0
- package/dist/src/commands/download-embeddings.js.map +1 -0
- package/dist/src/commands/hooks.d.ts.map +1 -1
- package/dist/src/commands/hooks.js +14 -0
- package/dist/src/commands/hooks.js.map +1 -1
- package/dist/src/commands/index.d.ts.map +1 -1
- package/dist/src/commands/index.js +4 -0
- 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 +48 -1
- package/dist/src/commands/init.js.map +1 -1
- package/dist/src/commands/monograph.d.ts.map +1 -1
- package/dist/src/commands/monograph.js +35 -1
- package/dist/src/commands/monograph.js.map +1 -1
- package/dist/src/commands/org-observe.d.ts +10 -0
- package/dist/src/commands/org-observe.d.ts.map +1 -1
- package/dist/src/commands/org-observe.js +195 -31
- package/dist/src/commands/org-observe.js.map +1 -1
- package/dist/src/commands/org.d.ts +1 -0
- package/dist/src/commands/org.d.ts.map +1 -1
- package/dist/src/commands/org.js +139 -3
- package/dist/src/commands/org.js.map +1 -1
- package/dist/src/commands/route.d.ts +1 -9
- package/dist/src/commands/route.d.ts.map +1 -1
- package/dist/src/commands/route.js +42 -65
- package/dist/src/commands/route.js.map +1 -1
- package/dist/src/commands/security-cve.d.ts.map +1 -1
- package/dist/src/commands/security-cve.js +2 -1
- package/dist/src/commands/security-cve.js.map +1 -1
- package/dist/src/index.d.ts +0 -10
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +4 -15
- package/dist/src/index.js.map +1 -1
- package/dist/src/init/copy-assets.d.ts +17 -0
- package/dist/src/init/copy-assets.d.ts.map +1 -0
- package/dist/src/init/copy-assets.js +271 -0
- package/dist/src/init/copy-assets.js.map +1 -0
- package/dist/src/init/executor.d.ts +2 -30
- package/dist/src/init/executor.d.ts.map +1 -1
- package/dist/src/init/executor.js +56 -2493
- package/dist/src/init/executor.js.map +1 -1
- package/dist/src/init/geminimd-generator.js +2 -2
- package/dist/src/init/helpers-generator.d.ts.map +1 -1
- package/dist/src/init/helpers-generator.js +9 -0
- package/dist/src/init/helpers-generator.js.map +1 -1
- package/dist/src/init/kimi-generator.js +3 -3
- package/dist/src/init/kimi-generator.js.map +1 -1
- package/dist/src/init/settings-generator.d.ts.map +1 -1
- package/dist/src/init/settings-generator.js +0 -4
- package/dist/src/init/settings-generator.js.map +1 -1
- package/dist/src/init/shared.d.ts +112 -0
- package/dist/src/init/shared.d.ts.map +1 -0
- package/dist/src/init/shared.js +475 -0
- package/dist/src/init/shared.js.map +1 -0
- package/dist/src/init/statusline-generator.d.ts.map +1 -1
- package/dist/src/init/statusline-generator.js +37 -0
- package/dist/src/init/statusline-generator.js.map +1 -1
- package/dist/src/init/types.d.ts +1 -1
- package/dist/src/init/types.d.ts.map +1 -1
- package/dist/src/init/upgrade.d.ts +34 -0
- package/dist/src/init/upgrade.d.ts.map +1 -0
- package/dist/src/init/upgrade.js +477 -0
- package/dist/src/init/upgrade.js.map +1 -0
- package/dist/src/init/write-antigravity.d.ts +13 -0
- package/dist/src/init/write-antigravity.d.ts.map +1 -0
- package/dist/src/init/write-antigravity.js +117 -0
- package/dist/src/init/write-antigravity.js.map +1 -0
- package/dist/src/init/write-capabilities.d.ts +9 -0
- package/dist/src/init/write-capabilities.d.ts.map +1 -0
- package/dist/src/init/write-capabilities.js +392 -0
- package/dist/src/init/write-capabilities.js.map +1 -0
- package/dist/src/init/write-claude.d.ts +25 -0
- package/dist/src/init/write-claude.d.ts.map +1 -0
- package/dist/src/init/write-claude.js +279 -0
- package/dist/src/init/write-claude.js.map +1 -0
- package/dist/src/init/write-kimicode.d.ts +19 -0
- package/dist/src/init/write-kimicode.d.ts.map +1 -0
- package/dist/src/init/write-kimicode.js +223 -0
- package/dist/src/init/write-kimicode.js.map +1 -0
- package/dist/src/init/write-opencode.d.ts +14 -0
- package/dist/src/init/write-opencode.d.ts.map +1 -0
- package/dist/src/init/write-opencode.js +130 -0
- package/dist/src/init/write-opencode.js.map +1 -0
- package/dist/src/init/write-runtime-config.d.ts +14 -0
- package/dist/src/init/write-runtime-config.d.ts.map +1 -0
- package/dist/src/init/write-runtime-config.js +214 -0
- package/dist/src/init/write-runtime-config.js.map +1 -0
- package/dist/src/init/write-sample-org.d.ts +9 -0
- package/dist/src/init/write-sample-org.d.ts.map +1 -0
- package/dist/src/init/write-sample-org.js +39 -0
- package/dist/src/init/write-sample-org.js.map +1 -0
- package/dist/src/knowledge/eval/golden-set.js +1 -1
- package/dist/src/knowledge/eval/golden-set.js.map +1 -1
- package/dist/src/mcp-client.d.ts.map +1 -1
- package/dist/src/mcp-client.js +7 -3
- package/dist/src/mcp-client.js.map +1 -1
- package/dist/src/mcp-tools/analyze-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/analyze-tools.js +2 -25
- package/dist/src/mcp-tools/analyze-tools.js.map +1 -1
- package/dist/src/mcp-tools/auto-install.d.ts.map +1 -1
- package/dist/src/mcp-tools/auto-install.js +2 -1
- package/dist/src/mcp-tools/auto-install.js.map +1 -1
- package/dist/src/mcp-tools/hooks-routing.d.ts.map +1 -1
- package/dist/src/mcp-tools/hooks-routing.js +26 -0
- package/dist/src/mcp-tools/hooks-routing.js.map +1 -1
- package/dist/src/mcp-tools/memory-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/memory-tools.js +2 -37
- package/dist/src/mcp-tools/memory-tools.js.map +1 -1
- package/dist/src/mcp-tools/monodesign-tools.d.ts +19 -0
- package/dist/src/mcp-tools/monodesign-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/monodesign-tools.js +233 -0
- package/dist/src/mcp-tools/monodesign-tools.js.map +1 -0
- package/dist/src/mcp-tools/monograph/agent-history-tools.d.ts +5 -0
- package/dist/src/mcp-tools/monograph/agent-history-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/monograph/agent-history-tools.js +177 -0
- package/dist/src/mcp-tools/monograph/agent-history-tools.js.map +1 -0
- package/dist/src/mcp-tools/monograph/build-tools.d.ts +9 -0
- package/dist/src/mcp-tools/monograph/build-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/monograph/build-tools.js +299 -0
- package/dist/src/mcp-tools/monograph/build-tools.js.map +1 -0
- package/dist/src/mcp-tools/monograph/group-tools.d.ts +10 -0
- package/dist/src/mcp-tools/monograph/group-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/monograph/group-tools.js +225 -0
- package/dist/src/mcp-tools/monograph/group-tools.js.map +1 -0
- package/dist/src/mcp-tools/monograph/health-tools.d.ts +6 -0
- package/dist/src/mcp-tools/monograph/health-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/monograph/health-tools.js +113 -0
- package/dist/src/mcp-tools/monograph/health-tools.js.map +1 -0
- package/dist/src/mcp-tools/monograph/impact-tools.d.ts +9 -0
- package/dist/src/mcp-tools/monograph/impact-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/monograph/impact-tools.js +532 -0
- package/dist/src/mcp-tools/monograph/impact-tools.js.map +1 -0
- package/dist/src/mcp-tools/monograph/index.d.ts +10 -0
- package/dist/src/mcp-tools/monograph/index.d.ts.map +1 -0
- package/dist/src/mcp-tools/monograph/index.js +73 -0
- package/dist/src/mcp-tools/monograph/index.js.map +1 -0
- package/dist/src/mcp-tools/monograph/query-tools.d.ts +11 -0
- package/dist/src/mcp-tools/monograph/query-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/monograph/query-tools.js +500 -0
- package/dist/src/mcp-tools/monograph/query-tools.js.map +1 -0
- package/dist/src/mcp-tools/monograph/shared.d.ts +64 -0
- package/dist/src/mcp-tools/monograph/shared.d.ts.map +1 -0
- package/dist/src/mcp-tools/monograph/shared.js +215 -0
- package/dist/src/mcp-tools/monograph/shared.js.map +1 -0
- package/dist/src/mcp-tools/monograph/visualize-tools.d.ts +10 -0
- package/dist/src/mcp-tools/monograph/visualize-tools.d.ts.map +1 -0
- package/dist/src/mcp-tools/monograph/visualize-tools.js +382 -0
- package/dist/src/mcp-tools/monograph/visualize-tools.js.map +1 -0
- package/dist/src/mcp-tools/monograph-tools.d.ts +4 -23
- package/dist/src/mcp-tools/monograph-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/monograph-tools.js +4 -2439
- package/dist/src/mcp-tools/monograph-tools.js.map +1 -1
- package/dist/src/mcp-tools/monomind-tools.d.ts +8 -0
- package/dist/src/mcp-tools/monomind-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/monomind-tools.js +13 -1
- package/dist/src/mcp-tools/monomind-tools.js.map +1 -1
- package/dist/src/mcp-tools/quality/security-compliance/detect-secrets.d.ts.map +1 -1
- package/dist/src/mcp-tools/quality/security-compliance/detect-secrets.js +31 -2
- package/dist/src/mcp-tools/quality/security-compliance/detect-secrets.js.map +1 -1
- package/dist/src/mcp-tools/terminal-tools.d.ts.map +1 -1
- package/dist/src/mcp-tools/terminal-tools.js +31 -1
- package/dist/src/mcp-tools/terminal-tools.js.map +1 -1
- package/dist/src/mcp-tools/types.d.ts +8 -27
- package/dist/src/mcp-tools/types.d.ts.map +1 -1
- package/dist/src/mcp-tools/types.js +9 -91
- package/dist/src/mcp-tools/types.js.map +1 -1
- package/dist/src/memory/file-permissions.d.ts +15 -0
- package/dist/src/memory/file-permissions.d.ts.map +1 -0
- package/dist/src/memory/file-permissions.js +25 -0
- package/dist/src/memory/file-permissions.js.map +1 -0
- package/dist/src/memory/memory-bridge.d.ts.map +1 -1
- package/dist/src/memory/memory-bridge.js +94 -34
- package/dist/src/memory/memory-bridge.js.map +1 -1
- package/dist/src/memory/memory-crud.d.ts.map +1 -1
- package/dist/src/memory/memory-crud.js +298 -275
- package/dist/src/memory/memory-crud.js.map +1 -1
- package/dist/src/memory/memory-initializer.d.ts +2 -4
- package/dist/src/memory/memory-initializer.d.ts.map +1 -1
- package/dist/src/memory/memory-initializer.js +53 -76
- package/dist/src/memory/memory-initializer.js.map +1 -1
- package/dist/src/memory/memory-migrations.d.ts +1 -14
- package/dist/src/memory/memory-migrations.d.ts.map +1 -1
- package/dist/src/memory/memory-migrations.js +52 -105
- package/dist/src/memory/memory-migrations.js.map +1 -1
- package/dist/src/memory/sona-optimizer.d.ts +1 -1
- package/dist/src/memory/sona-optimizer.js +1 -1
- package/dist/src/monovector/index.d.ts +16 -19
- package/dist/src/monovector/index.d.ts.map +1 -1
- package/dist/src/monovector/index.js +50 -8
- package/dist/src/monovector/index.js.map +1 -1
- package/dist/src/orgrt/approvals.d.ts +16 -0
- package/dist/src/orgrt/approvals.d.ts.map +1 -0
- package/dist/src/orgrt/approvals.js +72 -0
- package/dist/src/orgrt/approvals.js.map +1 -0
- package/dist/src/orgrt/bus.d.ts.map +1 -1
- package/dist/src/orgrt/bus.js +21 -0
- package/dist/src/orgrt/bus.js.map +1 -1
- package/dist/src/orgrt/checkpoint-ops.d.ts +19 -0
- package/dist/src/orgrt/checkpoint-ops.d.ts.map +1 -0
- package/dist/src/orgrt/checkpoint-ops.js +219 -0
- package/dist/src/orgrt/checkpoint-ops.js.map +1 -0
- package/dist/src/orgrt/checkpoint.d.ts +33 -1
- package/dist/src/orgrt/checkpoint.d.ts.map +1 -1
- package/dist/src/orgrt/checkpoint.js +50 -6
- package/dist/src/orgrt/checkpoint.js.map +1 -1
- package/dist/src/orgrt/cross-org.d.ts +32 -0
- package/dist/src/orgrt/cross-org.d.ts.map +1 -0
- package/dist/src/orgrt/cross-org.js +256 -0
- package/dist/src/orgrt/cross-org.js.map +1 -0
- package/dist/src/orgrt/daemon.d.ts +131 -157
- package/dist/src/orgrt/daemon.d.ts.map +1 -1
- package/dist/src/orgrt/daemon.js +356 -966
- package/dist/src/orgrt/daemon.js.map +1 -1
- package/dist/src/orgrt/decisions.d.ts +33 -0
- package/dist/src/orgrt/decisions.d.ts.map +1 -0
- package/dist/src/orgrt/decisions.js +169 -0
- package/dist/src/orgrt/decisions.js.map +1 -0
- package/dist/src/orgrt/kimicode-runner.d.ts.map +1 -1
- package/dist/src/orgrt/kimicode-runner.js +5 -1
- package/dist/src/orgrt/kimicode-runner.js.map +1 -1
- package/dist/src/orgrt/opencode-runner.d.ts.map +1 -1
- package/dist/src/orgrt/opencode-runner.js +10 -2
- package/dist/src/orgrt/opencode-runner.js.map +1 -1
- package/dist/src/orgrt/org-memory.d.ts +45 -0
- package/dist/src/orgrt/org-memory.d.ts.map +1 -0
- package/dist/src/orgrt/org-memory.js +220 -0
- package/dist/src/orgrt/org-memory.js.map +1 -0
- package/dist/src/orgrt/policy.d.ts +4 -0
- package/dist/src/orgrt/policy.d.ts.map +1 -1
- package/dist/src/orgrt/policy.js +13 -1
- package/dist/src/orgrt/policy.js.map +1 -1
- package/dist/src/orgrt/prechecks.d.ts +15 -0
- package/dist/src/orgrt/prechecks.d.ts.map +1 -0
- package/dist/src/orgrt/prechecks.js +21 -0
- package/dist/src/orgrt/prechecks.js.map +1 -0
- package/dist/src/orgrt/questions.d.ts +39 -0
- package/dist/src/orgrt/questions.d.ts.map +1 -0
- package/dist/src/orgrt/questions.js +135 -0
- package/dist/src/orgrt/questions.js.map +1 -0
- package/dist/src/orgrt/remote.d.ts +25 -0
- package/dist/src/orgrt/remote.d.ts.map +1 -0
- package/dist/src/orgrt/remote.js +73 -0
- package/dist/src/orgrt/remote.js.map +1 -0
- package/dist/src/orgrt/scheduler-integration.d.ts +19 -0
- package/dist/src/orgrt/scheduler-integration.d.ts.map +1 -0
- package/dist/src/orgrt/scheduler-integration.js +90 -0
- package/dist/src/orgrt/scheduler-integration.js.map +1 -0
- package/dist/src/orgrt/server.d.ts.map +1 -1
- package/dist/src/orgrt/server.js +70 -2
- package/dist/src/orgrt/server.js.map +1 -1
- package/dist/src/orgrt/session.d.ts +30 -1
- package/dist/src/orgrt/session.d.ts.map +1 -1
- package/dist/src/orgrt/session.js +184 -53
- package/dist/src/orgrt/session.js.map +1 -1
- package/dist/src/orgrt/state-detector.d.ts +19 -0
- package/dist/src/orgrt/state-detector.d.ts.map +1 -0
- package/dist/src/orgrt/state-detector.js +59 -0
- package/dist/src/orgrt/state-detector.js.map +1 -0
- package/dist/src/orgrt/task-dag.d.ts +27 -0
- package/dist/src/orgrt/task-dag.d.ts.map +1 -0
- package/dist/src/orgrt/task-dag.js +100 -0
- package/dist/src/orgrt/task-dag.js.map +1 -0
- package/dist/src/orgrt/tool-fence.d.ts +7 -4
- package/dist/src/orgrt/tool-fence.d.ts.map +1 -1
- package/dist/src/orgrt/tool-fence.js +47 -6
- package/dist/src/orgrt/tool-fence.js.map +1 -1
- package/dist/src/orgrt/types.d.ts +57 -2
- package/dist/src/orgrt/types.d.ts.map +1 -1
- package/dist/src/orgrt/types.js +34 -3
- package/dist/src/orgrt/types.js.map +1 -1
- package/dist/src/routing/model-download.d.ts +49 -0
- package/dist/src/routing/model-download.d.ts.map +1 -0
- package/dist/src/routing/model-download.js +106 -0
- package/dist/src/routing/model-download.js.map +1 -0
- package/dist/src/services/crash-reporter.d.ts +5 -0
- package/dist/src/services/crash-reporter.d.ts.map +1 -1
- package/dist/src/services/crash-reporter.js +49 -0
- package/dist/src/services/crash-reporter.js.map +1 -1
- package/dist/src/transfer/anonymization/index.d.ts +18 -15
- package/dist/src/transfer/anonymization/index.d.ts.map +1 -1
- package/dist/src/transfer/anonymization/index.js +7 -119
- package/dist/src/transfer/anonymization/index.js.map +1 -1
- package/dist/src/ui/dashboard.html +606 -7
- package/dist/src/ui/orgs.html +7 -1
- package/dist/src/ui/routes-monograph.mjs +6 -0
- package/dist/src/ui/server.mjs +327 -7
- package/dist/src/update/checker.d.ts.map +1 -1
- package/dist/src/update/checker.js +2 -1
- package/dist/src/update/checker.js.map +1 -1
- package/dist/src/update/executor.d.ts.map +1 -1
- package/dist/src/update/executor.js +7 -3
- package/dist/src/update/executor.js.map +1 -1
- package/dist/src/update/index.d.ts +0 -1
- package/dist/src/update/index.d.ts.map +1 -1
- package/dist/src/update/index.js +5 -24
- package/dist/src/update/index.js.map +1 -1
- package/dist/src/utils/db-mutex.d.ts +11 -0
- package/dist/src/utils/db-mutex.d.ts.map +1 -0
- package/dist/src/utils/db-mutex.js +23 -0
- package/dist/src/utils/db-mutex.js.map +1 -0
- package/dist/src/utils/input-guards.d.ts +23 -0
- package/dist/src/utils/input-guards.d.ts.map +1 -1
- package/dist/src/utils/input-guards.js +72 -0
- package/dist/src/utils/input-guards.js.map +1 -1
- package/dist/src/utils/npm-command.d.ts +10 -0
- package/dist/src/utils/npm-command.d.ts.map +1 -0
- package/dist/src/utils/npm-command.js +12 -0
- package/dist/src/utils/npm-command.js.map +1 -0
- package/dist/src/utils/paths.d.ts +28 -0
- package/dist/src/utils/paths.d.ts.map +1 -0
- package/dist/src/utils/paths.js +108 -0
- package/dist/src/utils/paths.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +17 -17
- package/scripts/download-embedding-model.mjs +97 -0
- package/scripts/publish.sh +0 -0
- package/scripts/sync-claude-assets.sh +0 -0
- package/dist/src/production/circuit-breaker.d.ts +0 -121
- package/dist/src/production/circuit-breaker.d.ts.map +0 -1
- package/dist/src/production/circuit-breaker.js +0 -262
- package/dist/src/production/circuit-breaker.js.map +0 -1
- package/dist/src/production/error-handler.d.ts +0 -119
- package/dist/src/production/error-handler.d.ts.map +0 -1
- package/dist/src/production/error-handler.js +0 -324
- package/dist/src/production/error-handler.js.map +0 -1
- package/dist/src/production/index.d.ts +0 -6
- package/dist/src/production/index.d.ts.map +0 -1
- package/dist/src/production/index.js +0 -6
- package/dist/src/production/index.js.map +0 -1
- package/dist/src/production/monitoring.d.ts +0 -181
- package/dist/src/production/monitoring.d.ts.map +0 -1
- package/dist/src/production/monitoring.js +0 -375
- package/dist/src/production/monitoring.js.map +0 -1
- package/dist/src/production/rate-limiter.d.ts +0 -125
- package/dist/src/production/rate-limiter.d.ts.map +0 -1
- package/dist/src/production/rate-limiter.js +0 -218
- package/dist/src/production/rate-limiter.js.map +0 -1
- package/dist/src/production/retry.d.ts +0 -48
- package/dist/src/production/retry.d.ts.map +0 -1
- package/dist/src/production/retry.js +0 -189
- package/dist/src/production/retry.js.map +0 -1
- package/dist/src/transfer/types.d.ts +0 -245
- package/dist/src/transfer/types.d.ts.map +0 -1
- package/dist/src/transfer/types.js +0 -6
- package/dist/src/transfer/types.js.map +0 -1
|
File without changes
|
|
@@ -492,6 +492,17 @@ module.exports = {
|
|
|
492
492
|
fs.writeFileSync(sbMetricsFile, sbOld.slice(-500).join('\n') + '\n', 'utf-8');
|
|
493
493
|
}
|
|
494
494
|
} catch (_) {}
|
|
495
|
+
// Derive store provenance from individual hits: 'project', 'global',
|
|
496
|
+
// or 'mixed' when both brains contributed. Hits carry a boolean
|
|
497
|
+
// `global` flag set by the warm endpoint / fallback path above.
|
|
498
|
+
var _sbStore = 'none';
|
|
499
|
+
if (sbHits && sbHits.length > 0) {
|
|
500
|
+
var _sbHasProject = false, _sbHasGlobal = false;
|
|
501
|
+
for (var _sbSi = 0; _sbSi < sbHits.length; _sbSi++) {
|
|
502
|
+
if (sbHits[_sbSi].global) _sbHasGlobal = true; else _sbHasProject = true;
|
|
503
|
+
}
|
|
504
|
+
_sbStore = _sbHasProject && _sbHasGlobal ? 'mixed' : _sbHasGlobal ? 'global' : 'project';
|
|
505
|
+
}
|
|
495
506
|
fs.appendFileSync(sbMetricsFile, JSON.stringify({
|
|
496
507
|
ts: Date.now(),
|
|
497
508
|
method: sbMethod,
|
|
@@ -501,6 +512,7 @@ module.exports = {
|
|
|
501
512
|
terms: _sbSubstantive.length,
|
|
502
513
|
corpus: sbCorpus,
|
|
503
514
|
injected: !!(sbHits && sbHits.length > 0),
|
|
515
|
+
store: _sbStore,
|
|
504
516
|
}) + '\n', 'utf-8');
|
|
505
517
|
} catch (_) { /* telemetry never blocks */ }
|
|
506
518
|
|
|
@@ -212,18 +212,39 @@ module.exports = {
|
|
|
212
212
|
}
|
|
213
213
|
} catch (e) { /* non-fatal */ }
|
|
214
214
|
|
|
215
|
+
// Migrate: remove legacy MONOMIND_GRAPH_GATE=off from settings.json.
|
|
216
|
+
// The graph gate is now on by default — monograph_query/suggest must be
|
|
217
|
+
// called before grep/Glob/Grep once per session. Existing installs that
|
|
218
|
+
// ran `monomind init` before this change have the env var baked in; this
|
|
219
|
+
// removes it so the gate activates on next session.
|
|
220
|
+
var settingsPath = path.join(CWD, '.claude', 'settings.json');
|
|
221
|
+
var MAX_SETTINGS = 256 * 1024; // 256 KiB
|
|
222
|
+
var settingsData = null;
|
|
223
|
+
try {
|
|
224
|
+
if (fs.existsSync(settingsPath) && (function() { try { return fs.statSync(settingsPath).size <= MAX_SETTINGS; } catch(_) { return false; } }())) {
|
|
225
|
+
settingsData = JSON.parse(fs.readFileSync(settingsPath, 'utf-8'));
|
|
226
|
+
if (settingsData.env && settingsData.env.MONOMIND_GRAPH_GATE === 'off') {
|
|
227
|
+
delete settingsData.env.MONOMIND_GRAPH_GATE;
|
|
228
|
+
var tmpSettings = settingsPath + '.' + process.pid + '.tmp';
|
|
229
|
+
fs.writeFileSync(tmpSettings, JSON.stringify(settingsData, null, 2) + '\n');
|
|
230
|
+
fs.renameSync(tmpSettings, settingsPath);
|
|
231
|
+
log('[MIGRATE] Removed MONOMIND_GRAPH_GATE=off — graph gate now enforced by default');
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
} catch (e) { /* non-fatal — migration is best-effort */ }
|
|
235
|
+
|
|
215
236
|
// Initialize intelligence — respects monomind.neural.enabled kill switch.
|
|
216
237
|
var neuralEnabled = true;
|
|
217
238
|
try {
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
var settingsData = JSON.parse(fs.readFileSync(settingsPath, 'utf-8'));
|
|
222
|
-
if (settingsData.monomind && settingsData.monomind.neural && settingsData.monomind.neural.enabled === false) {
|
|
223
|
-
neuralEnabled = false;
|
|
224
|
-
log('[NEURAL] Disabled via monomind.neural.enabled=false');
|
|
239
|
+
if (!settingsData) {
|
|
240
|
+
if (fs.existsSync(settingsPath) && (function() { try { return fs.statSync(settingsPath).size <= MAX_SETTINGS; } catch(_) { return false; } }())) {
|
|
241
|
+
settingsData = JSON.parse(fs.readFileSync(settingsPath, 'utf-8'));
|
|
225
242
|
}
|
|
226
243
|
}
|
|
244
|
+
if (settingsData && settingsData.monomind && settingsData.monomind.neural && settingsData.monomind.neural.enabled === false) {
|
|
245
|
+
neuralEnabled = false;
|
|
246
|
+
log('[NEURAL] Disabled via monomind.neural.enabled=false');
|
|
247
|
+
}
|
|
227
248
|
} catch (e) { /* non-fatal */ }
|
|
228
249
|
if (neuralEnabled && intelligence && intelligence.init) {
|
|
229
250
|
var initResult = await runWithTimeout(function() { return intelligence.init(); }, 'intelligence.init()');
|
|
File without changes
|
|
@@ -213,8 +213,30 @@ function _autoIndexKnowledge(knowledgeDir) {
|
|
|
213
213
|
{ filePath: path.join(CWD, 'CLAUDE.md'), label: 'project-instructions' },
|
|
214
214
|
{ filePath: path.join(CWD, 'docs/todo.md'), label: 'project-todo' },
|
|
215
215
|
{ filePath: path.join(CWD, 'CLAUDE.local.md'), label: 'local-instructions' },
|
|
216
|
+
{ filePath: path.join(CWD, 'README.md'), label: 'project-readme' },
|
|
217
|
+
{ filePath: path.join(CWD, 'CONTRIBUTING.md'), label: 'project-contributing' },
|
|
218
|
+
{ filePath: path.join(CWD, 'CHANGELOG.md'), label: 'project-changelog' },
|
|
216
219
|
];
|
|
217
220
|
|
|
221
|
+
// Scan doc/ and docs/ directories for markdown files (depth 1 only to keep
|
|
222
|
+
// the keyword index bounded — the full Second Brain ingestion handles deeper
|
|
223
|
+
// trees via the embedding pipeline on init and session-start re-index).
|
|
224
|
+
var _docDirs = ['doc', 'docs'];
|
|
225
|
+
for (var _ddi = 0; _ddi < _docDirs.length; _ddi++) {
|
|
226
|
+
var _ddPath = path.join(CWD, _docDirs[_ddi]);
|
|
227
|
+
try {
|
|
228
|
+
if (fs.existsSync(_ddPath) && fs.statSync(_ddPath).isDirectory()) {
|
|
229
|
+
var _ddFiles = fs.readdirSync(_ddPath);
|
|
230
|
+
for (var _dfi = 0; _dfi < _ddFiles.length; _dfi++) {
|
|
231
|
+
var _dfName = _ddFiles[_dfi];
|
|
232
|
+
if (_dfName.charAt(0) === '.' || _dfName.charAt(0) === '_') continue;
|
|
233
|
+
if (!_dfName.endsWith('.md') && !_dfName.endsWith('.txt')) continue;
|
|
234
|
+
sources.push({ filePath: path.join(_ddPath, _dfName), label: _docDirs[_ddi] + '/' + _dfName });
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
} catch (e) {}
|
|
238
|
+
}
|
|
239
|
+
|
|
218
240
|
var hashInput = '';
|
|
219
241
|
for (var i = 0; i < sources.length; i++) {
|
|
220
242
|
try {
|
|
@@ -36,14 +36,17 @@ export function detectSvelteKitProject(cwd = process.cwd(), config = null) {
|
|
|
36
36
|
};
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
export function applySvelteKitLiveAdapter({ cwd = process.cwd(), port, config = null } = {}) {
|
|
39
|
+
export function applySvelteKitLiveAdapter({ cwd = process.cwd(), port, authCred, config = null } = {}) {
|
|
40
40
|
if (!Number.isFinite(Number(port))) {
|
|
41
41
|
throw new Error('SvelteKit live adapter requires a numeric port');
|
|
42
42
|
}
|
|
43
|
+
if (!authCred) {
|
|
44
|
+
throw new Error('SvelteKit live adapter requires an auth credential');
|
|
45
|
+
}
|
|
43
46
|
const detected = detectSvelteKitProject(cwd, config);
|
|
44
47
|
if (!detected) return null;
|
|
45
48
|
|
|
46
|
-
ensureSvelteLiveRootComponent(cwd, Number(port));
|
|
49
|
+
ensureSvelteLiveRootComponent(cwd, Number(port), authCred);
|
|
47
50
|
|
|
48
51
|
const layoutRel = detected.layoutFile;
|
|
49
52
|
const layoutAbs = path.join(cwd, layoutRel);
|
|
@@ -136,18 +139,20 @@ export function unpatchSvelteLayout(content) {
|
|
|
136
139
|
return out.replace(/\n{3,}/g, '\n\n');
|
|
137
140
|
}
|
|
138
141
|
|
|
139
|
-
export function ensureSvelteLiveRootComponent(cwd, port) {
|
|
142
|
+
export function ensureSvelteLiveRootComponent(cwd, port, authCred) {
|
|
140
143
|
const file = path.join(cwd, SVELTE_LIVE_ROOT_COMPONENT);
|
|
141
144
|
fs.mkdirSync(path.dirname(file), { recursive: true });
|
|
142
|
-
fs.writeFileSync(file, buildSvelteLiveRootComponent(port), 'utf-8');
|
|
145
|
+
fs.writeFileSync(file, buildSvelteLiveRootComponent(port, authCred), 'utf-8');
|
|
143
146
|
return file;
|
|
144
147
|
}
|
|
145
148
|
|
|
146
|
-
export function buildSvelteLiveRootComponent(port) {
|
|
149
|
+
export function buildSvelteLiveRootComponent(port, authCred) {
|
|
150
|
+
const authQuery = new URLSearchParams();
|
|
151
|
+
authQuery.set('token', String(authCred ?? ''));
|
|
147
152
|
return `<script>
|
|
148
153
|
import { onMount } from 'svelte';
|
|
149
154
|
|
|
150
|
-
const LIVE_URL = 'http://localhost:${Number(port)}/live.js';
|
|
155
|
+
const LIVE_URL = 'http://localhost:${Number(port)}/live.js?${authQuery.toString()}';
|
|
151
156
|
const HOST_ID = 'monodesign-live-root';
|
|
152
157
|
|
|
153
158
|
onMount(() => {
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
import fs from 'node:fs';
|
|
17
17
|
import path from 'node:path';
|
|
18
18
|
import { fileURLToPath } from 'node:url';
|
|
19
|
-
import { resolveLiveConfigPath } from './lib/monodesign-paths.mjs';
|
|
19
|
+
import { resolveLiveConfigPath, readLiveServerInfo } from './lib/monodesign-paths.mjs';
|
|
20
20
|
import {
|
|
21
21
|
applySvelteKitLiveAdapter,
|
|
22
22
|
detectSvelteKitProject,
|
|
@@ -27,6 +27,8 @@ const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
|
27
27
|
const CONFIG_PATH = resolveLiveConfigPath({ cwd: process.cwd(), scriptsDir: __dirname });
|
|
28
28
|
const MARKER_OPEN_TEXT = 'monodesign-live-start';
|
|
29
29
|
const MARKER_CLOSE_TEXT = 'monodesign-live-end';
|
|
30
|
+
// Query param name live-server.mjs checks on every protected route.
|
|
31
|
+
const AUTH_QUERY_KEY = 'token';
|
|
30
32
|
const IGNORE_MARKER_OPEN = '# monodesign-live-ignore-start';
|
|
31
33
|
const IGNORE_MARKER_CLOSE = '# monodesign-live-ignore-end';
|
|
32
34
|
|
|
@@ -145,10 +147,19 @@ Output (JSON):
|
|
|
145
147
|
console.error(JSON.stringify({ ok: false, error: 'missing_port' }));
|
|
146
148
|
process.exit(1);
|
|
147
149
|
}
|
|
150
|
+
// The injected tag must authenticate like every other server route does —
|
|
151
|
+
// read the per-process credential live-server.mjs persisted at startup.
|
|
152
|
+
const liveInfo = readLiveServerInfo(process.cwd());
|
|
153
|
+
const credentialFields = liveInfo?.info ?? {};
|
|
154
|
+
const authCred = credentialFields['token'];
|
|
155
|
+
if (!authCred) {
|
|
156
|
+
console.error(JSON.stringify({ ok: false, error: 'missing_auth_credential', detail: 'no running live server info found for this project — start it before injecting' }));
|
|
157
|
+
process.exit(1);
|
|
158
|
+
}
|
|
148
159
|
const gitIgnore = ensureLiveGitIgnores(process.cwd());
|
|
149
160
|
|
|
150
161
|
if (svelteKit) {
|
|
151
|
-
const adapterResult = applySvelteKitLiveAdapter({ cwd: process.cwd(), port, config });
|
|
162
|
+
const adapterResult = applySvelteKitLiveAdapter({ cwd: process.cwd(), port, authCred, config });
|
|
152
163
|
console.log(JSON.stringify({ ok: true, port, adapter: 'sveltekit', gitIgnore, results: [adapterResult] }));
|
|
153
164
|
return;
|
|
154
165
|
}
|
|
@@ -158,7 +169,7 @@ Output (JSON):
|
|
|
158
169
|
if (!fs.existsSync(absFile)) return { file: relFile, error: 'file_not_found' };
|
|
159
170
|
const content = fs.readFileSync(absFile, 'utf-8');
|
|
160
171
|
const withoutOld = revertCspMeta(removeTag(content, config.commentSyntax));
|
|
161
|
-
const withTag = insertTag(withoutOld, config, port, relFile);
|
|
172
|
+
const withTag = insertTag(withoutOld, config, port, authCred, relFile);
|
|
162
173
|
if (withTag === withoutOld) {
|
|
163
174
|
return { file: relFile, error: 'insertion_point_not_found', anchor: config.insertBefore || config.insertAfter };
|
|
164
175
|
}
|
|
@@ -356,16 +367,18 @@ function validateConfig(cfg) {
|
|
|
356
367
|
function commentOpen(syntax) { return syntax === 'jsx' ? '{/*' : '<!--'; }
|
|
357
368
|
function commentClose(syntax) { return syntax === 'jsx' ? '*/}' : '-->'; }
|
|
358
369
|
|
|
359
|
-
function buildTagBlock(syntax, port, filePath) {
|
|
370
|
+
function buildTagBlock(syntax, port, authCred, filePath) {
|
|
360
371
|
const open = commentOpen(syntax);
|
|
361
372
|
const close = commentClose(syntax);
|
|
362
373
|
// Astro processes <script> tags by default and rewrites src to its own
|
|
363
374
|
// bundled URL. is:inline opts out so the literal external src survives.
|
|
364
375
|
const isAstro = typeof filePath === 'string' && filePath.endsWith('.astro');
|
|
365
376
|
const scriptAttrs = isAstro ? 'is:inline ' : '';
|
|
377
|
+
const authQuery = new URLSearchParams();
|
|
378
|
+
authQuery.set(AUTH_QUERY_KEY, authCred);
|
|
366
379
|
return (
|
|
367
380
|
open + ' ' + MARKER_OPEN_TEXT + ' ' + close + '\n' +
|
|
368
|
-
'<script ' + scriptAttrs + 'src="http://localhost:' + port + '/live.js"></script>\n' +
|
|
381
|
+
'<script ' + scriptAttrs + 'src="http://localhost:' + port + '/live.js?' + authQuery.toString() + '"></script>\n' +
|
|
369
382
|
open + ' ' + MARKER_CLOSE_TEXT + ' ' + close + '\n'
|
|
370
383
|
);
|
|
371
384
|
}
|
|
@@ -387,9 +400,9 @@ function readLineEndingAt(content, index) {
|
|
|
387
400
|
return '';
|
|
388
401
|
}
|
|
389
402
|
|
|
390
|
-
function insertTag(content, config, port, filePath) {
|
|
403
|
+
function insertTag(content, config, port, authCred, filePath) {
|
|
391
404
|
const lineEnding = detectLineEnding(content);
|
|
392
|
-
const block = normalizeLineEndings(buildTagBlock(config.commentSyntax, port, filePath), lineEnding);
|
|
405
|
+
const block = normalizeLineEndings(buildTagBlock(config.commentSyntax, port, authCred, filePath), lineEnding);
|
|
393
406
|
// insertBefore: match the LAST occurrence. Anchors like `</body>` naturally
|
|
394
407
|
// belong at the end, and the same literal can appear earlier in code blocks
|
|
395
408
|
// within rendered documentation pages.
|
|
@@ -63,6 +63,8 @@ const DESIGN_MD_PATH = PROJECT_CONTEXT.designPath
|
|
|
63
63
|
: null;
|
|
64
64
|
const DEFAULT_POLL_TIMEOUT = 600_000; // 10 min — agent re-polls on timeout anyway
|
|
65
65
|
const SSE_HEARTBEAT_INTERVAL = 30_000; // keepalive ping every 30s
|
|
66
|
+
// Query param name every protected route checks against the per-process credential.
|
|
67
|
+
const AUTH_QUERY_KEY = 'token';
|
|
66
68
|
|
|
67
69
|
// ---------------------------------------------------------------------------
|
|
68
70
|
// Port detection
|
|
@@ -383,6 +385,20 @@ function statOrNull(filePath) {
|
|
|
383
385
|
try { return fs.statSync(filePath); } catch { return null; }
|
|
384
386
|
}
|
|
385
387
|
|
|
388
|
+
// Shared gate for every protected route, including /live.js (see its call
|
|
389
|
+
// site for why that one needs it too). Writes the 401 itself and returns
|
|
390
|
+
// false so callers can `if (!requireAuthQueryCred(url, res)) return;`.
|
|
391
|
+
function requireAuthQueryCred(url, res) {
|
|
392
|
+
const provided = url.searchParams.get(AUTH_QUERY_KEY);
|
|
393
|
+
const expected = state[AUTH_QUERY_KEY];
|
|
394
|
+
if (provided !== expected) {
|
|
395
|
+
res.writeHead(401);
|
|
396
|
+
res.end('Unauthorized');
|
|
397
|
+
return false;
|
|
398
|
+
}
|
|
399
|
+
return true;
|
|
400
|
+
}
|
|
401
|
+
|
|
386
402
|
// HTTP request handler
|
|
387
403
|
// ---------------------------------------------------------------------------
|
|
388
404
|
|
|
@@ -398,6 +414,15 @@ function createRequestHandler({ detectScript, liveScriptParts }) {
|
|
|
398
414
|
|
|
399
415
|
// --- Scripts ---
|
|
400
416
|
if (p === '/live.js') {
|
|
417
|
+
// This response embeds the shared bearer credential (below) — unlike
|
|
418
|
+
// /detect.js and the vendored scripts, it must be gated the same way
|
|
419
|
+
// every OTHER protected route already is. Without this, requesting this
|
|
420
|
+
// one route defeats every other route's check: whoever fetches it walks
|
|
421
|
+
// away with the value that's supposed to distinguish the legitimate
|
|
422
|
+
// preview tab from any other page. See requireAuthQueryCred() below —
|
|
423
|
+
// callers must supply the credential the running server printed at
|
|
424
|
+
// startup (also mirrored into the live-server info file for tooling).
|
|
425
|
+
if (!requireAuthQueryCred(url, res)) return;
|
|
401
426
|
// Re-read from disk each request so edits to live-browser.js land on
|
|
402
427
|
// the next tab reload. No-store headers prevent browser caching across
|
|
403
428
|
// sessions — during iteration, a cached old script silently breaks
|
|
@@ -604,8 +629,19 @@ function createRequestHandler({ detectScript, liveScriptParts }) {
|
|
|
604
629
|
if (token !== state.token) { res.writeHead(401); res.end('Unauthorized'); return; }
|
|
605
630
|
const filePath = url.searchParams.get('path');
|
|
606
631
|
if (!filePath || filePath.includes('..')) { res.writeHead(400); res.end('Bad path'); return; }
|
|
607
|
-
|
|
608
|
-
|
|
632
|
+
// Resolve symlinks on BOTH sides before comparing: a lexical prefix check
|
|
633
|
+
// (path.resolve + startsWith) can't tell a symlink that lexically resolves
|
|
634
|
+
// inside cwd from one that physically points outside it, and startsWith on
|
|
635
|
+
// its own also has no path-boundary — "/proj-evil" lexically "starts with"
|
|
636
|
+
// "/proj". realpath + path.relative closes both gaps (the same pattern
|
|
637
|
+
// already used correctly elsewhere in this package).
|
|
638
|
+
let root, absPath;
|
|
639
|
+
try {
|
|
640
|
+
root = fs.realpathSync(process.cwd());
|
|
641
|
+
absPath = fs.realpathSync(path.resolve(process.cwd(), filePath));
|
|
642
|
+
} catch { res.writeHead(404); res.end('File not found'); return; }
|
|
643
|
+
const rel = path.relative(root, absPath);
|
|
644
|
+
if (rel.startsWith('..') || path.isAbsolute(rel)) { res.writeHead(403); res.end('Forbidden'); return; }
|
|
609
645
|
let content;
|
|
610
646
|
try { content = fs.readFileSync(absPath, 'utf-8'); }
|
|
611
647
|
catch { res.writeHead(404); res.end('File not found'); return; }
|
package/LICENSE
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to the Licensor for inclusion in the Work by the copyright
|
|
52
|
+
owner or by an individual or Legal Entity authorized to submit on
|
|
53
|
+
behalf of the copyright owner. For the purposes of this definition,
|
|
54
|
+
"submitted" means any form of electronic, verbal, or written
|
|
55
|
+
communication sent to the Licensor or its representatives, including
|
|
56
|
+
but not limited to communication on electronic mailing lists, source
|
|
57
|
+
code control systems, and issue tracking systems that are managed by,
|
|
58
|
+
or on behalf of, the Licensor for the purpose of discussing and
|
|
59
|
+
improving the Work, but excluding communication that is conspicuously
|
|
60
|
+
marked or otherwise designated in writing by the copyright owner as
|
|
61
|
+
"Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
Copyright 2026 monoes
|
|
180
|
+
|
|
181
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
182
|
+
you may not use this file except in compliance with the License.
|
|
183
|
+
You may obtain a copy of the License at
|
|
184
|
+
|
|
185
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
186
|
+
|
|
187
|
+
Unless required by applicable law or agreed to in writing, software
|
|
188
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
189
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
190
|
+
See the License for the specific language governing permissions and
|
|
191
|
+
limitations under the License.
|
package/README.md
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
<p align="center">
|
|
8
8
|
<strong>An open-source MCP server that extends Claude Code with a codebase knowledge graph, persistent memory, and multi-agent coordination.</strong><br/>
|
|
9
|
-
|
|
9
|
+
Apache 2.0 licensed · Fully local · No data leaves your machine
|
|
10
10
|
</p>
|
|
11
11
|
|
|
12
12
|
<p align="center">
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
<a href="https://www.npmjs.com/package/monomind"><img src="https://img.shields.io/npm/v/monomind?color=%2300D2AA&label=monomind&style=flat-square" alt="npm" /></a>
|
|
15
15
|
<a href="https://www.npmjs.com/package/monomind"><img src="https://img.shields.io/npm/dm/monomind?color=%2310B981&style=flat-square" alt="downloads" /></a>
|
|
16
16
|
<a href="https://github.com/monoes/monomind/stargazers"><img src="https://img.shields.io/github/stars/monoes/monomind?color=%23F59E0B&style=flat-square" alt="stars" /></a>
|
|
17
|
-
<a href="https://github.com/monoes/monomind/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-
|
|
17
|
+
<a href="https://github.com/monoes/monomind/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-Apache_2.0-%238B5CF6?style=flat-square" alt="license" /></a>
|
|
18
18
|
<a href="https://nodejs.org/"><img src="https://img.shields.io/badge/node-%3E%3D20-339933?style=flat-square&logo=node.js&logoColor=white" alt="node" /></a>
|
|
19
19
|
</p>
|
|
20
20
|
|
|
@@ -38,7 +38,7 @@ Monomind is an **open-source CLI and MCP server** that plugs into Claude Code (a
|
|
|
38
38
|
- **Reusable slash commands** — 30+ development workflows (build, review, debug, TDD, architecture) available as `/mastermind:*` commands inside Claude Code.
|
|
39
39
|
|
|
40
40
|
```bash
|
|
41
|
-
npm install -g monomind #
|
|
41
|
+
npm install -g monomind # Apache 2.0 licensed, runs entirely on your machine
|
|
42
42
|
cd your-project && monomind init
|
|
43
43
|
claude mcp add monomind -- npx -y monomind@latest mcp start
|
|
44
44
|
```
|
|
@@ -76,7 +76,7 @@ monomind init --kimicode # emits .kimi-code/ + AGENTS.md alongside Claude/
|
|
|
76
76
|
|
|
77
77
|
| Concern | Answer |
|
|
78
78
|
|---|---|
|
|
79
|
-
| **License** | [
|
|
79
|
+
| **License** | [Apache 2.0](LICENSE) — use it however you want |
|
|
80
80
|
| **Data privacy** | Everything runs locally — your code and memory store never leave your machine. The one exception: crash reporting is on by default (`monomind crash-reporting disable` to opt out) — a hard crash in monomind/mono-agent/monotask/mono-clip files a GitHub issue on that tool's own repo via the GitHub API. That's the only network call Monomind itself makes; it never phones a monoes-controlled server. |
|
|
81
81
|
| **Dependencies** | Standard npm packages (tree-sitter, better-sqlite3, sql.js, zod). tree-sitter and better-sqlite3 are native (prebuilt) Node addons, not pure JS/WASM — sql.js is WASM. No post-install scripts that download code. |
|
|
82
82
|
| **Permissions** | Registers as an MCP server — Claude Code controls what tools are available and prompts you before executing anything sensitive. |
|
|
@@ -232,11 +232,13 @@ claude mcp add monomind -- npx -y monomind@latest mcp start
|
|
|
232
232
|
monomind doctor --fix
|
|
233
233
|
```
|
|
234
234
|
|
|
235
|
+
> **Semantic routing (opt-in download):** embedding-based task routing needs a local model (~88 MB, `Snowflake/snowflake-arctic-embed-xs` via transformers.js). `monomind init` asks interactively whether to download it — the default is No, and non-interactive/CI installs never download it silently. Declining is fine: routing falls back to keyword mode. Fetch it any time with `monomind download-embeddings` (or `node scripts/download-embedding-model.mjs` on a source checkout).
|
|
236
|
+
|
|
235
237
|
Open Claude Code. You now have 49 `/mastermind:*` workflows available:
|
|
236
238
|
|
|
237
239
|
```bash
|
|
238
240
|
/mastermind:autodev --tillend # start autonomous code loop
|
|
239
|
-
monomind org run
|
|
241
|
+
monomind org run sample-team # run your first AI org (init writes a runnable sample-team.json — edit it, or run it as-is)
|
|
240
242
|
/mastermind:help # show all commands
|
|
241
243
|
```
|
|
242
244
|
|
|
@@ -445,5 +447,5 @@ graph TD
|
|
|
445
447
|
|
|
446
448
|
<p align="center">
|
|
447
449
|
<img src="https://raw.githubusercontent.com/monoes/monomind/main/assets/mascot.png" alt="Monomind" width="72" /><br/>
|
|
448
|
-
<sub>Built with ♥ by <a href="https://github.com/monoes">monoes</a> ·
|
|
450
|
+
<sub>Built with ♥ by <a href="https://github.com/monoes">monoes</a> · Apache 2.0 License</sub>
|
|
449
451
|
</p>
|
|
@@ -3,6 +3,11 @@ interface DashboardServer {
|
|
|
3
3
|
broadcast(event: StepEvent): void;
|
|
4
4
|
close(): void;
|
|
5
5
|
port: number;
|
|
6
|
+
/** Returns the bound host:port, or null if not listening. */
|
|
7
|
+
address(): {
|
|
8
|
+
address: string;
|
|
9
|
+
port: number;
|
|
10
|
+
} | null;
|
|
6
11
|
}
|
|
7
12
|
export declare function getDashboardServer(port?: number): DashboardServer;
|
|
8
13
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/browser/dashboard/server.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../../../src/browser/dashboard/server.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,SAAS,EAAa,MAAM,sBAAsB,CAAC;AA6EjE,UAAU,eAAe;IACvB,SAAS,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;IAClC,KAAK,IAAI,IAAI,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,6DAA6D;IAC7D,OAAO,IAAI;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC;CACrD;AAID,wBAAgB,kBAAkB,CAAC,IAAI,SAAe,GAAG,eAAe,CAiLvE"}
|