@monoes/monomindcli 2.9.12 → 2.9.14
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/architecture/system-design/arch-system-design.md +0 -0
- package/.claude/agents/consensus/crdt-synchronizer.md +0 -0
- package/.claude/agents/consensus/quorum-manager.md +0 -0
- package/.claude/agents/consensus/security-manager.md +0 -0
- package/.claude/agents/core/coder.md +0 -0
- package/.claude/agents/core/coordinator.md +0 -0
- package/.claude/agents/core/planner.md +0 -0
- package/.claude/agents/core/researcher.md +0 -0
- package/.claude/agents/core/reviewer.md +0 -0
- package/.claude/agents/core/tester.md +0 -0
- package/.claude/agents/design/design-monodesign.md +0 -0
- package/.claude/agents/engineering/engineering-ai-data-remediation-engineer.md +0 -0
- package/.claude/agents/engineering/engineering-ai-engineer.md +0 -0
- package/.claude/agents/engineering/engineering-autonomous-optimization-architect.md +0 -0
- package/.claude/agents/engineering/engineering-backend-architect.md +0 -0
- package/.claude/agents/engineering/engineering-code-reviewer.md +0 -0
- package/.claude/agents/engineering/engineering-data-engineer.md +0 -0
- package/.claude/agents/engineering/engineering-database-optimizer.md +0 -0
- package/.claude/agents/engineering/engineering-devops-automator.md +0 -0
- package/.claude/agents/engineering/engineering-embedded-firmware-engineer.md +0 -0
- package/.claude/agents/engineering/engineering-feishu-integration-developer.md +0 -0
- package/.claude/agents/engineering/engineering-frontend-developer.md +0 -0
- package/.claude/agents/engineering/engineering-git-workflow-master.md +0 -0
- package/.claude/agents/engineering/engineering-incident-response-commander.md +0 -0
- package/.claude/agents/engineering/engineering-mobile-app-builder.md +0 -0
- package/.claude/agents/engineering/engineering-rapid-prototyper.md +0 -0
- package/.claude/agents/engineering/engineering-security-engineer.md +0 -0
- package/.claude/agents/engineering/engineering-senior-developer.md +0 -0
- package/.claude/agents/engineering/engineering-software-architect.md +0 -0
- package/.claude/agents/engineering/engineering-solidity-smart-contract-engineer.md +0 -0
- package/.claude/agents/engineering/engineering-sre.md +0 -0
- package/.claude/agents/engineering/engineering-technical-writer.md +0 -0
- package/.claude/agents/engineering/engineering-threat-detection-engineer.md +0 -0
- package/.claude/agents/engineering/engineering-wechat-mini-program-developer.md +0 -0
- package/.claude/agents/github/code-review-swarm.md +0 -0
- package/.claude/agents/github/github-modes.md +0 -0
- package/.claude/agents/github/issue-tracker.md +0 -0
- package/.claude/agents/github/multi-repo-swarm.md +0 -0
- package/.claude/agents/github/pr-manager.md +0 -0
- package/.claude/agents/github/project-board-sync.md +0 -0
- package/.claude/agents/github/release-manager.md +0 -0
- package/.claude/agents/github/repo-architect.md +0 -0
- package/.claude/agents/github/swarm-issue.md +0 -0
- package/.claude/agents/github/swarm-pr.md +0 -0
- package/.claude/agents/github/sync-coordinator.md +0 -0
- package/.claude/agents/github/workflow-automation.md +0 -0
- package/.claude/agents/goal/goal-planner.md +0 -0
- package/.claude/agents/hive-mind/collective-intelligence-coordinator.md +0 -0
- package/.claude/agents/hive-mind/scout-explorer.md +0 -0
- package/.claude/agents/hive-mind/swarm-memory-manager.md +0 -0
- package/.claude/agents/hive-mind/worker-specialist.md +0 -0
- package/.claude/agents/marketing/marketing-competitive-content.md +0 -0
- package/.claude/agents/marketing/marketing-cro-specialist.md +0 -0
- package/.claude/agents/marketing/marketing-email-specialist.md +0 -0
- package/.claude/agents/marketing/marketing-launch-strategist.md +0 -0
- package/.claude/agents/marketing/marketing-pricing-strategist.md +0 -0
- package/.claude/agents/optimization/benchmark-suite.md +0 -0
- package/.claude/agents/optimization/load-balancer.md +0 -0
- package/.claude/agents/optimization/performance-monitor.md +0 -0
- package/.claude/agents/optimization/resource-allocator.md +0 -0
- package/.claude/agents/optimization/topology-optimizer.md +0 -0
- package/.claude/agents/schemas/architecture-output.json +0 -0
- package/.claude/agents/schemas/code-review-output.json +0 -0
- package/.claude/agents/schemas/generic-task-input.json +0 -0
- package/.claude/agents/schemas/implementation-output.json +0 -0
- package/.claude/agents/schemas/research-output.json +0 -0
- package/.claude/agents/schemas/security-audit-output.json +0 -0
- package/.claude/agents/schemas/test-report-output.json +0 -0
- package/.claude/agents/specialists/integration-architect.md +0 -0
- package/.claude/agents/specialized/agentic-identity-trust.md +0 -0
- package/.claude/agents/specialized/agents-orchestrator.md +0 -0
- package/.claude/agents/specialized/automation-governance-architect.md +0 -0
- package/.claude/agents/specialized/blockchain-security-auditor.md +0 -0
- package/.claude/agents/specialized/compliance-auditor.md +0 -0
- package/.claude/agents/specialized/identity-graph-operator.md +0 -0
- package/.claude/agents/specialized/lsp-index-engineer.md +0 -0
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +0 -0
- package/.claude/agents/specialized/specialized-cultural-intelligence-strategist.md +0 -0
- package/.claude/agents/specialized/specialized-developer-advocate.md +0 -0
- package/.claude/agents/specialized/specialized-document-generator.md +0 -0
- package/.claude/agents/specialized/specialized-mcp-builder.md +0 -0
- package/.claude/agents/specialized/specialized-model-qa.md +0 -0
- package/.claude/agents/specialized/specialized-workflow-architect.md +0 -0
- package/.claude/agents/specialized/zk-steward.md +0 -0
- package/.claude/agents/swarm/mesh-coordinator.md +0 -0
- package/.claude/agents/templates/automation-smart-agent.md +0 -0
- package/.claude/agents/templates/coordinator-swarm-init.md +0 -0
- package/.claude/agents/testing/production-validator.md +0 -0
- package/.claude/agents/testing/tdd-london-swarm.md +0 -0
- package/.claude/agents/testing/testing-accessibility-auditor.md +0 -0
- package/.claude/agents/testing/testing-api-tester.md +0 -0
- package/.claude/agents/testing/testing-evidence-collector.md +0 -0
- package/.claude/agents/testing/testing-performance-benchmarker.md +0 -0
- package/.claude/agents/testing/testing-test-results-analyzer.md +0 -0
- package/.claude/agents/testing/testing-tool-evaluator.md +0 -0
- package/.claude/agents/testing/testing-workflow-optimizer.md +0 -0
- package/.claude/commands/agents/README.md +0 -0
- package/.claude/commands/agents/agent-capabilities.md +0 -0
- package/.claude/commands/agents/agent-coordination.md +0 -0
- package/.claude/commands/agents/agent-spawning.md +0 -0
- package/.claude/commands/agents/agent-types.md +0 -0
- package/.claude/commands/analysis/README.md +0 -0
- package/.claude/commands/analysis/bottleneck-detect.md +0 -0
- package/.claude/commands/analysis/performance-bottlenecks.md +0 -0
- package/.claude/commands/analysis/performance-report.md +0 -0
- package/.claude/commands/analysis/token-usage.md +0 -0
- package/.claude/commands/automation/README.md +0 -0
- package/.claude/commands/automation/auto-agent.md +0 -0
- package/.claude/commands/automation/self-healing.md +0 -0
- package/.claude/commands/automation/session-memory.md +0 -0
- package/.claude/commands/automation/smart-agents.md +0 -0
- package/.claude/commands/automation/smart-spawn.md +0 -0
- package/.claude/commands/automation/workflow-select.md +0 -0
- package/.claude/commands/coordination/README.md +0 -0
- package/.claude/commands/coordination/agent-spawn.md +0 -0
- package/.claude/commands/coordination/swarm-init.md +0 -0
- package/.claude/commands/coordination/task-orchestrate.md +0 -0
- package/.claude/commands/github/README.md +0 -0
- package/.claude/commands/github/github-modes.md +0 -0
- package/.claude/commands/github/issue-tracker.md +0 -0
- package/.claude/commands/github/pr-manager.md +0 -0
- package/.claude/commands/github/release-manager.md +0 -0
- package/.claude/commands/github/repo-architect.md +0 -0
- package/.claude/commands/github/sync-coordinator.md +0 -0
- package/.claude/commands/hive-mind/README.md +0 -0
- package/.claude/commands/hive-mind/hive-mind-consensus.md +0 -0
- package/.claude/commands/hive-mind/hive-mind-init.md +0 -0
- package/.claude/commands/hive-mind/hive-mind-memory.md +0 -0
- package/.claude/commands/hive-mind/hive-mind-spawn.md +0 -0
- package/.claude/commands/hive-mind/hive-mind-status.md +0 -0
- package/.claude/commands/hive-mind/hive-mind-stop.md +0 -0
- package/.claude/commands/hive-mind/hive-mind.md +0 -0
- package/.claude/commands/hooks/overview.md +0 -0
- package/.claude/commands/hooks/post-edit.md +0 -0
- package/.claude/commands/hooks/post-task.md +0 -0
- package/.claude/commands/hooks/pre-edit.md +0 -0
- package/.claude/commands/hooks/pre-task.md +0 -0
- package/.claude/commands/hooks/session-end.md +0 -0
- package/.claude/commands/hooks/setup.md +0 -0
- package/.claude/commands/mastermind/_repeat.md +0 -0
- package/.claude/commands/mastermind/_taskfile.md +0 -0
- package/.claude/commands/mastermind/adr.md +0 -0
- package/.claude/commands/mastermind/brain.md +0 -0
- package/.claude/commands/mastermind/budget.md +0 -0
- package/.claude/commands/mastermind/code-review.md +0 -0
- package/.claude/commands/mastermind/content.md +0 -0
- package/.claude/commands/mastermind/createorg.md +0 -0
- package/.claude/commands/mastermind/createtask.md +0 -0
- package/.claude/commands/mastermind/debug.md +0 -0
- package/.claude/commands/mastermind/design.md +0 -0
- package/.claude/commands/mastermind/do.md +0 -0
- package/.claude/commands/mastermind/execute.md +0 -0
- package/.claude/commands/mastermind/finance.md +0 -0
- package/.claude/commands/mastermind/graph-status.md +0 -0
- package/.claude/commands/mastermind/help.md +0 -0
- package/.claude/commands/mastermind/idea.md +0 -0
- package/.claude/commands/mastermind/ideate.md +0 -0
- package/.claude/commands/mastermind/improve.md +0 -0
- package/.claude/commands/mastermind/loops.md +0 -0
- package/.claude/commands/mastermind/marketing.md +0 -0
- package/.claude/commands/mastermind/master.md +0 -0
- package/.claude/commands/mastermind/memory.md +0 -0
- package/.claude/commands/mastermind/okf-export.md +0 -0
- package/.claude/commands/mastermind/okf-import.md +0 -0
- package/.claude/commands/mastermind/ops.md +0 -0
- package/.claude/commands/mastermind/orgs.md +0 -0
- package/.claude/commands/mastermind/orgstatus.md +0 -0
- package/.claude/commands/mastermind/plan.md +0 -0
- package/.claude/commands/mastermind/receive-review.md +0 -0
- package/.claude/commands/mastermind/references/antigravity-tools.md +0 -0
- package/.claude/commands/mastermind/references/claude-code-tools.md +0 -0
- package/.claude/commands/mastermind/references/codex-tools.md +0 -0
- package/.claude/commands/mastermind/references/copilot-tools.md +0 -0
- package/.claude/commands/mastermind/references/gemini-tools.md +0 -0
- package/.claude/commands/mastermind/references/pi-tools.md +0 -0
- package/.claude/commands/mastermind/release.md +0 -0
- package/.claude/commands/mastermind/repeat.md +0 -0
- package/.claude/commands/mastermind/research.md +0 -0
- package/.claude/commands/mastermind/review.md +0 -0
- package/.claude/commands/mastermind/runorg.md +0 -0
- package/.claude/commands/mastermind/sales.md +0 -0
- package/.claude/commands/mastermind/skill-builder.md +0 -0
- package/.claude/commands/mastermind/specialagents.md +0 -0
- package/.claude/commands/mastermind/stoporg.md +0 -0
- package/.claude/commands/mastermind/swarm.md +0 -0
- package/.claude/commands/mastermind/techport.md +0 -0
- package/.claude/commands/mastermind/topology.md +0 -0
- package/.claude/commands/mastermind/understand.md +0 -0
- package/.claude/commands/mastermind/worktree.md +0 -0
- package/.claude/commands/mastermind.md +0 -0
- package/.claude/commands/memory/memory-search.md +0 -0
- package/.claude/commands/monitoring/agent-metrics.md +0 -0
- package/.claude/commands/monitoring/agents.md +0 -0
- package/.claude/commands/monitoring/status.md +0 -0
- package/.claude/commands/monobrowse.md +0 -0
- package/.claude/commands/monoes/README.md +0 -0
- package/.claude/commands/monoes/install.md +0 -0
- package/.claude/commands/monoes/monoagent.md +0 -0
- package/.claude/commands/monoes/monoclip.md +0 -0
- package/.claude/commands/monoes/monotask.md +0 -0
- package/.claude/commands/monograph/README.md +0 -0
- package/.claude/commands/monograph/monograph-build.md +0 -0
- package/.claude/commands/monograph/monograph-search.md +0 -0
- package/.claude/commands/monograph/monograph-stats.md +0 -0
- package/.claude/commands/monograph/monograph-watch.md +0 -0
- package/.claude/commands/monograph/monograph-wiki.md +0 -0
- package/.claude/commands/optimization/auto-topology.md +0 -0
- package/.claude/commands/optimization/performance-optimize.md +0 -0
- package/.claude/commands/pair/README.md +0 -0
- package/.claude/commands/pair/examples.md +0 -0
- package/.claude/commands/pair/modes.md +0 -0
- package/.claude/commands/pair/session.md +0 -0
- package/.claude/commands/stream-chain/pipeline.md +0 -0
- package/.claude/commands/stream-chain/run.md +0 -0
- package/.claude/commands/swarm/README.md +0 -0
- package/.claude/commands/swarm/analysis.md +0 -0
- package/.claude/commands/swarm/development.md +0 -0
- package/.claude/commands/swarm/examples.md +0 -0
- package/.claude/commands/swarm/maintenance.md +0 -0
- package/.claude/commands/swarm/optimization.md +0 -0
- package/.claude/commands/swarm/research.md +0 -0
- package/.claude/commands/swarm/swarm.md +0 -0
- package/.claude/commands/swarm/testing.md +0 -0
- package/.claude/commands/tokens.md +0 -0
- package/.claude/commands/truth/start.md +0 -0
- package/.claude/commands/ts.md +0 -0
- package/.claude/commands/workflows/README.md +0 -0
- package/.claude/commands/workflows/development.md +0 -0
- package/.claude/commands/workflows/research.md +0 -0
- package/.claude/commands/workflows/workflow-create.md +0 -0
- package/.claude/commands/workflows/workflow-execute.md +0 -0
- package/.claude/commands/workflows/workflow-export.md +0 -0
- package/.claude/helpers/auto-memory-hook.mjs +0 -0
- package/.claude/helpers/build-skill-registry.cjs +0 -0
- package/.claude/helpers/control-start.cjs +187 -148
- package/.claude/helpers/control-stop.cjs +0 -0
- package/.claude/helpers/event-logger.cjs +0 -0
- package/.claude/helpers/graphify-freshen.cjs +0 -0
- package/.claude/helpers/handlers/adr-draft-handler.cjs +0 -0
- package/.claude/helpers/handlers/agent-start-handler.cjs +0 -0
- package/.claude/helpers/handlers/budget-status-handler.cjs +0 -0
- package/.claude/helpers/handlers/capture-handler.cjs +0 -0
- package/.claude/helpers/handlers/compact-handler.cjs +0 -0
- package/.claude/helpers/handlers/edit-handler.cjs +0 -0
- package/.claude/helpers/handlers/gates-handler.cjs +0 -0
- package/.claude/helpers/handlers/graph-status-handler.cjs +0 -0
- package/.claude/helpers/handlers/loops-status-handler.cjs +0 -0
- package/.claude/helpers/handlers/stats-handler.cjs +0 -0
- package/.claude/helpers/handlers/task-handler.cjs +0 -0
- package/.claude/helpers/hook-handler.cjs +0 -0
- package/.claude/helpers/learning-service.mjs +0 -0
- package/.claude/helpers/loop-tracker.cjs +0 -0
- package/.claude/helpers/mastermind-activate.cjs +0 -0
- package/.claude/helpers/memory-palace.cjs +0 -0
- package/.claude/helpers/memory.cjs +0 -0
- package/.claude/helpers/metrics-db.mjs +0 -0
- package/.claude/helpers/monolean-activate.cjs +0 -0
- package/.claude/helpers/monolean-config.cjs +0 -0
- package/.claude/helpers/monolean-instructions.cjs +0 -0
- package/.claude/helpers/monolean-propagate.cjs +0 -0
- package/.claude/helpers/monolean-tracker.cjs +0 -0
- package/.claude/helpers/router.cjs +0 -0
- package/.claude/helpers/session.cjs +0 -0
- package/.claude/helpers/skill-registry.json +0 -0
- package/.claude/helpers/statusline.cjs +17 -4
- package/.claude/helpers/toggle-statusline.cjs +0 -0
- package/.claude/helpers/token-tracker.cjs +0 -0
- package/.claude/helpers/utils/agent-registrations.cjs +0 -0
- package/.claude/helpers/utils/fs-helpers.cjs +0 -0
- package/.claude/helpers/utils/micro-agents.cjs +0 -0
- package/.claude/helpers/utils/monograph.cjs +0 -0
- package/.claude/helpers/utils/system-pressure.cjs +0 -0
- package/.claude/helpers/utils/telemetry.cjs +0 -0
- package/.claude/settings.json +0 -0
- package/.claude/skills/agent-browser-testing/SKILL.md +0 -0
- package/.claude/skills/github-issue-triage/SKILL.md +0 -0
- package/.claude/skills/github-repo-recap/SKILL.md +0 -0
- package/.claude/skills/github-toolkit/SKILL.md +0 -0
- package/.claude/skills/mastermind-access/SKILL.md +0 -0
- package/.claude/skills/mastermind-activity/SKILL.md +0 -0
- package/.claude/skills/mastermind-adapter-manager/SKILL.md +0 -0
- package/.claude/skills/mastermind-agent-detail/SKILL.md +0 -0
- package/.claude/skills/mastermind-agent-select/SKILL.md +0 -0
- package/.claude/skills/mastermind-approval-detail/SKILL.md +0 -0
- package/.claude/skills/mastermind-budgets/SKILL.md +0 -0
- package/.claude/skills/mastermind-debug/SKILL.md +0 -0
- package/.claude/skills/mastermind-design/SKILL.md +0 -0
- package/.claude/skills/mastermind-diagnose/SKILL.md +0 -0
- package/.claude/skills/mastermind-env/SKILL.md +0 -0
- package/.claude/skills/mastermind-environments/SKILL.md +0 -0
- package/.claude/skills/mastermind-execute/SKILL.md +0 -0
- package/.claude/skills/mastermind-export/SKILL.md +0 -0
- package/.claude/skills/mastermind-goal-detail/SKILL.md +0 -0
- package/.claude/skills/mastermind-goals/SKILL.md +0 -0
- package/.claude/skills/mastermind-import/SKILL.md +0 -0
- package/.claude/skills/mastermind-inbox/SKILL.md +0 -0
- package/.claude/skills/mastermind-instance/SKILL.md +0 -0
- package/.claude/skills/mastermind-intake/SKILL.md +0 -0
- package/.claude/skills/mastermind-invite-landing/SKILL.md +0 -0
- package/.claude/skills/mastermind-invites/SKILL.md +0 -0
- package/.claude/skills/mastermind-issue-detail/SKILL.md +0 -0
- package/.claude/skills/mastermind-issues/SKILL.md +0 -0
- package/.claude/skills/mastermind-join-queue/SKILL.md +0 -0
- package/.claude/skills/mastermind-liveness/SKILL.md +0 -0
- package/.claude/skills/mastermind-memory/SKILL.md +0 -0
- package/.claude/skills/mastermind-monotask/SKILL.md +0 -0
- package/.claude/skills/mastermind-my-issues/SKILL.md +0 -0
- package/.claude/skills/mastermind-new-agent/SKILL.md +0 -0
- package/.claude/skills/mastermind-orgs/SKILL.md +0 -0
- package/.claude/skills/mastermind-orgstatus/SKILL.md +0 -0
- package/.claude/skills/mastermind-plan/SKILL.md +0 -0
- package/.claude/skills/mastermind-plan-to-tasks/SKILL.md +0 -0
- package/.claude/skills/mastermind-plugin-manager/SKILL.md +0 -0
- package/.claude/skills/mastermind-plugin-settings/SKILL.md +0 -0
- package/.claude/skills/mastermind-profile/SKILL.md +0 -0
- package/.claude/skills/mastermind-receive-review/SKILL.md +0 -0
- package/.claude/skills/mastermind-release/SKILL.md +0 -0
- package/.claude/skills/mastermind-research/SKILL.md +0 -0
- package/.claude/skills/mastermind-review/SKILL.md +0 -0
- package/.claude/skills/mastermind-routine-detail/SKILL.md +0 -0
- package/.claude/skills/mastermind-routines/SKILL.md +0 -0
- package/.claude/skills/mastermind-runorg/SKILL.md +0 -0
- package/.claude/skills/mastermind-search/SKILL.md +0 -0
- package/.claude/skills/mastermind-secrets/SKILL.md +0 -0
- package/.claude/skills/mastermind-skill-builder/SKILL.md +0 -0
- package/.claude/skills/mastermind-skills/SKILL.md +0 -0
- package/.claude/skills/mastermind-tasks/SKILL.md +0 -0
- package/.claude/skills/mastermind-techport/SKILL.md +0 -0
- package/.claude/skills/mastermind-threads/SKILL.md +0 -0
- package/.claude/skills/mastermind-tree-control/SKILL.md +0 -0
- package/.claude/skills/mastermind-workspace-detail/SKILL.md +0 -0
- package/.claude/skills/mastermind-workspaces/SKILL.md +0 -0
- package/.claude/skills/mastermind-worktree/SKILL.md +0 -0
- package/.claude/skills/memory-toolkit/SKILL.md +0 -0
- package/.claude/skills/monodesign/SKILL.md +0 -0
- package/.claude/skills/monodesign/adapt.md +0 -0
- package/.claude/skills/monodesign/animate.md +0 -0
- package/.claude/skills/monodesign/audit.md +0 -0
- package/.claude/skills/monodesign/bolder.md +0 -0
- package/.claude/skills/monodesign/clarify.md +0 -0
- package/.claude/skills/monodesign/colorize.md +0 -0
- package/.claude/skills/monodesign/craft.md +0 -0
- package/.claude/skills/monodesign/critique.md +0 -0
- package/.claude/skills/monodesign/delight.md +0 -0
- package/.claude/skills/monodesign/distill.md +0 -0
- package/.claude/skills/monodesign/document.md +0 -0
- package/.claude/skills/monodesign/extract.md +0 -0
- package/.claude/skills/monodesign/harden.md +0 -0
- package/.claude/skills/monodesign/init.md +0 -0
- package/.claude/skills/monodesign/layout.md +0 -0
- package/.claude/skills/monodesign/live.md +0 -0
- package/.claude/skills/monodesign/onboard.md +0 -0
- package/.claude/skills/monodesign/optimize.md +0 -0
- package/.claude/skills/monodesign/overdrive.md +0 -0
- package/.claude/skills/monodesign/polish.md +0 -0
- package/.claude/skills/monodesign/quieter.md +0 -0
- package/.claude/skills/monodesign/scripts/command-metadata.json +0 -0
- package/.claude/skills/monodesign/scripts/context-signals.mjs +0 -0
- package/.claude/skills/monodesign/scripts/context.mjs +0 -0
- package/.claude/skills/monodesign/scripts/critique-storage.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detect-csp.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detect.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/browser/injected/index.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/cli/main.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/design-system.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/detect-antipatterns-browser.js +0 -0
- package/.claude/skills/monodesign/scripts/detector/detect-antipatterns.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/engines/browser/detect-url.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/engines/regex/detect-text.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/engines/static-html/css-cascade.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/engines/static-html/detect-html.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/engines/visual/screenshot-contrast.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/findings.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/fix/css-regions.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/fix/fixers.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/fix/index.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/node/file-system.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/profile/profiler.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/registry/antipatterns.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/rules/checks.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/shared/color.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/shared/constants.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/shared/fonts.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/shared/inline-ignores.mjs +0 -0
- package/.claude/skills/monodesign/scripts/detector/shared/page.mjs +0 -0
- package/.claude/skills/monodesign/scripts/hook-admin.mjs +0 -0
- package/.claude/skills/monodesign/scripts/hook-before-edit.mjs +0 -0
- package/.claude/skills/monodesign/scripts/hook-lib.mjs +0 -0
- package/.claude/skills/monodesign/scripts/hook.mjs +0 -0
- package/.claude/skills/monodesign/scripts/lib/design-parser.mjs +0 -0
- package/.claude/skills/monodesign/scripts/lib/is-generated.mjs +0 -0
- package/.claude/skills/monodesign/scripts/lib/monodesign-config.mjs +0 -0
- package/.claude/skills/monodesign/scripts/lib/monodesign-paths.mjs +0 -0
- package/.claude/skills/monodesign/scripts/lib/provider.mjs +0 -0
- package/.claude/skills/monodesign/scripts/lib/target-args.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live/browser-script-parts.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live/completion.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live/event-validation.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live/insert-ui.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live/manual-apply.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live/manual-edit-routes.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live/manual-edits-buffer.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live/session-store.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live/svelte-component.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live/sveltekit-adapter.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live/ui-core.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live/vocabulary.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live-accept.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live-browser-dom.js +0 -0
- package/.claude/skills/monodesign/scripts/live-browser-session.js +0 -0
- package/.claude/skills/monodesign/scripts/live-browser.js +0 -0
- package/.claude/skills/monodesign/scripts/live-commit-manual-edits.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live-complete.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live-copy-edit-agent.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live-discard-manual-edits.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live-inject.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live-insert.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live-manual-edit-evidence.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live-poll.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live-resume.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live-server.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live-status.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live-target.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live-wrap.mjs +0 -0
- package/.claude/skills/monodesign/scripts/live.mjs +0 -0
- package/.claude/skills/monodesign/scripts/modern-screenshot.umd.js +0 -0
- package/.claude/skills/monodesign/scripts/palette.mjs +0 -0
- package/.claude/skills/monodesign/scripts/pin.mjs +0 -0
- package/.claude/skills/monodesign/shape.md +0 -0
- package/.claude/skills/monodesign/teach.md +0 -0
- package/.claude/skills/monodesign/typeset.md +0 -0
- package/.claude/skills/monolean/SKILL.md +0 -0
- package/.claude/skills/monolean-audit/SKILL.md +0 -0
- package/.claude/skills/monolean-debt/SKILL.md +0 -0
- package/.claude/skills/monolean-help/SKILL.md +0 -0
- package/.claude/skills/monomind/browse-agentcore.md +0 -0
- package/.claude/skills/monomind/browse-electron.md +0 -0
- package/.claude/skills/monomind/browse-qa.md +0 -0
- package/.claude/skills/monomind/browse-references/authentication.md +0 -0
- package/.claude/skills/monomind/browse-references/trust-boundaries.md +0 -0
- package/.claude/skills/monomind/browse-references/video-recording.md +0 -0
- package/.claude/skills/monomind/browse-slack.md +0 -0
- package/.claude/skills/monomind/browse-vercel.md +0 -0
- package/.claude/skills/monomind/browse.md +0 -0
- package/.claude/skills/monomotion/SKILL.md +0 -0
- package/.claude/skills/monomotion/rules/api-control.md +0 -0
- package/.claude/skills/monomotion/rules/effects.md +0 -0
- package/.claude/skills/monomotion/rules/integration.md +0 -0
- package/.claude/skills/monomotion/rules/scroll.md +0 -0
- package/.claude/skills/monomotion/rules/sequencing.md +0 -0
- package/.claude/skills/monomotion/rules/svg.md +0 -0
- package/.claude/skills/monomotion/rules/text.md +0 -0
- package/.claude/skills/skill-builder/SKILL.md +0 -0
- package/.claude/skills/stop-slop/SKILL.md +0 -0
- package/.claude/skills/stop-slop/references/examples.md +0 -0
- package/.claude/skills/stop-slop/references/phrases.md +0 -0
- package/.claude/skills/stop-slop/references/structures.md +0 -0
- package/bin/preinstall.cjs +0 -0
- package/dist/src/browser/dashboard/ui.html +0 -0
- package/dist/src/ui/dashboard.html +0 -0
- package/dist/src/ui/data/agent-avatars.html +0 -0
- package/dist/src/ui/data/avatars/account-strategist.svg +0 -0
- package/dist/src/ui/data/avatars/accounts-payable.svg +0 -0
- package/dist/src/ui/data/avatars/adaptive-coordinator.svg +0 -0
- package/dist/src/ui/data/avatars/adaptive-coordinator2.svg +0 -0
- package/dist/src/ui/data/avatars/ai-citation.svg +0 -0
- package/dist/src/ui/data/avatars/ai-engineer.svg +0 -0
- package/dist/src/ui/data/avatars/analytics-reporter.svg +0 -0
- package/dist/src/ui/data/avatars/api-tester.svg +0 -0
- package/dist/src/ui/data/avatars/architecture.svg +0 -0
- package/dist/src/ui/data/avatars/automation-governance.svg +0 -0
- package/dist/src/ui/data/avatars/backend-dev.svg +0 -0
- package/dist/src/ui/data/avatars/benchmarker.svg +0 -0
- package/dist/src/ui/data/avatars/blockchain-auditor.svg +0 -0
- package/dist/src/ui/data/avatars/byzantine-coord.svg +0 -0
- package/dist/src/ui/data/avatars/case-analyst.svg +0 -0
- package/dist/src/ui/data/avatars/cicd-engineer.svg +0 -0
- package/dist/src/ui/data/avatars/cloud-architect.svg +0 -0
- package/dist/src/ui/data/avatars/code-review-swarm.svg +0 -0
- package/dist/src/ui/data/avatars/coder-v119.svg +0 -0
- package/dist/src/ui/data/avatars/coder.svg +0 -0
- package/dist/src/ui/data/avatars/collective-coord.svg +0 -0
- package/dist/src/ui/data/avatars/compliance-auditor.svg +0 -0
- package/dist/src/ui/data/avatars/consensus-coordinator.svg +0 -0
- package/dist/src/ui/data/avatars/content-creator.svg +0 -0
- package/dist/src/ui/data/avatars/crdt-synchronizer.svg +0 -0
- package/dist/src/ui/data/avatars/cro-specialist.svg +0 -0
- package/dist/src/ui/data/avatars/data-consolidator.svg +0 -0
- package/dist/src/ui/data/avatars/data-engineer.svg +0 -0
- package/dist/src/ui/data/avatars/database-optimizer.svg +0 -0
- package/dist/src/ui/data/avatars/deal-strategist.svg +0 -0
- package/dist/src/ui/data/avatars/defender.svg +0 -0
- package/dist/src/ui/data/avatars/devops-automator.svg +0 -0
- package/dist/src/ui/data/avatars/discovery-coach.svg +0 -0
- package/dist/src/ui/data/avatars/email-marketing.svg +0 -0
- package/dist/src/ui/data/avatars/embedded-firmware.svg +0 -0
- package/dist/src/ui/data/avatars/evidence-collector.svg +0 -0
- package/dist/src/ui/data/avatars/experiment-tracker.svg +0 -0
- package/dist/src/ui/data/avatars/feedback-synthesizer.svg +0 -0
- package/dist/src/ui/data/avatars/finance-tracker.svg +0 -0
- package/dist/src/ui/data/avatars/frontend-developer.svg +0 -0
- package/dist/src/ui/data/avatars/game-audio-engineer.svg +0 -0
- package/dist/src/ui/data/avatars/game-designer.svg +0 -0
- package/dist/src/ui/data/avatars/gossip-coordinator.svg +0 -0
- package/dist/src/ui/data/avatars/hierarchical-coord.svg +0 -0
- package/dist/src/ui/data/avatars/incident-commander.svg +0 -0
- package/dist/src/ui/data/avatars/infrastructure.svg +0 -0
- package/dist/src/ui/data/avatars/input-validator.svg +0 -0
- package/dist/src/ui/data/avatars/ios-developer.svg +0 -0
- package/dist/src/ui/data/avatars/issue-tracker.svg +0 -0
- package/dist/src/ui/data/avatars/judge.svg +0 -0
- package/dist/src/ui/data/avatars/launch-strategist.svg +0 -0
- package/dist/src/ui/data/avatars/legal-compliance.svg +0 -0
- package/dist/src/ui/data/avatars/level-designer.svg +0 -0
- package/dist/src/ui/data/avatars/load-balancer.svg +0 -0
- package/dist/src/ui/data/avatars/mcp-builder.svg +0 -0
- package/dist/src/ui/data/avatars/memory-coordinator.svg +0 -0
- package/dist/src/ui/data/avatars/mesh-coordinator.svg +0 -0
- package/dist/src/ui/data/avatars/ml-developer.svg +0 -0
- package/dist/src/ui/data/avatars/mobile-app-builder.svg +0 -0
- package/dist/src/ui/data/avatars/mobile-dev.svg +0 -0
- package/dist/src/ui/data/avatars/model-qa.svg +0 -0
- package/dist/src/ui/data/avatars/narrative-designer.svg +0 -0
- package/dist/src/ui/data/avatars/outbound-strategist.svg +0 -0
- package/dist/src/ui/data/avatars/path-validator.svg +0 -0
- package/dist/src/ui/data/avatars/payment-agent.svg +0 -0
- package/dist/src/ui/data/avatars/perf-analyzer.svg +0 -0
- package/dist/src/ui/data/avatars/pipeline-analyst.svg +0 -0
- package/dist/src/ui/data/avatars/planner.svg +0 -0
- package/dist/src/ui/data/avatars/pr-manager.svg +0 -0
- package/dist/src/ui/data/avatars/pricing-strategist.svg +0 -0
- package/dist/src/ui/data/avatars/product-manager.svg +0 -0
- package/dist/src/ui/data/avatars/production-validator.svg +0 -0
- package/dist/src/ui/data/avatars/project-shepherd.svg +0 -0
- package/dist/src/ui/data/avatars/proposal-strategist.svg +0 -0
- package/dist/src/ui/data/avatars/prosecutor.svg +0 -0
- package/dist/src/ui/data/avatars/pseudocode.svg +0 -0
- package/dist/src/ui/data/avatars/queen-coordinator.svg +0 -0
- package/dist/src/ui/data/avatars/quorum-manager.svg +0 -0
- package/dist/src/ui/data/avatars/raft-manager.svg +0 -0
- package/dist/src/ui/data/avatars/reality-checker.svg +0 -0
- package/dist/src/ui/data/avatars/recruitment.svg +0 -0
- package/dist/src/ui/data/avatars/refinement.svg +0 -0
- package/dist/src/ui/data/avatars/release-manager.svg +0 -0
- package/dist/src/ui/data/avatars/repo-architect.svg +0 -0
- package/dist/src/ui/data/avatars/researcher.svg +0 -0
- package/dist/src/ui/data/avatars/resource-allocator.svg +0 -0
- package/dist/src/ui/data/avatars/reviewer.svg +0 -0
- package/dist/src/ui/data/avatars/safe-executor.svg +0 -0
- package/dist/src/ui/data/avatars/sales-coach.svg +0 -0
- package/dist/src/ui/data/avatars/sales-engineer.svg +0 -0
- package/dist/src/ui/data/avatars/scout-explorer.svg +0 -0
- package/dist/src/ui/data/avatars/security-architect.svg +0 -0
- package/dist/src/ui/data/avatars/security-auditor.svg +0 -0
- package/dist/src/ui/data/avatars/senior-developer.svg +0 -0
- package/dist/src/ui/data/avatars/senior-pm.svg +0 -0
- package/dist/src/ui/data/avatars/seo-specialist.svg +0 -0
- package/dist/src/ui/data/avatars/social-media.svg +0 -0
- package/dist/src/ui/data/avatars/solidity-engineer.svg +0 -0
- package/dist/src/ui/data/avatars/sparc-coder.svg +0 -0
- package/dist/src/ui/data/avatars/sparc-coord.svg +0 -0
- package/dist/src/ui/data/avatars/specification.svg +0 -0
- package/dist/src/ui/data/avatars/sprint-prioritizer.svg +0 -0
- package/dist/src/ui/data/avatars/sre.svg +0 -0
- package/dist/src/ui/data/avatars/studio-operations.svg +0 -0
- package/dist/src/ui/data/avatars/studio-producer.svg +0 -0
- package/dist/src/ui/data/avatars/support-responder.svg +0 -0
- package/dist/src/ui/data/avatars/system-architect.svg +0 -0
- package/dist/src/ui/data/avatars/task-orchestrator.svg +0 -0
- package/dist/src/ui/data/avatars/technical-artist.svg +0 -0
- package/dist/src/ui/data/avatars/technical-writer.svg +0 -0
- package/dist/src/ui/data/avatars/tester.svg +0 -0
- package/dist/src/ui/data/avatars/threat-detection.svg +0 -0
- package/dist/src/ui/data/avatars/trend-researcher.svg +0 -0
- package/dist/src/ui/data/avatars/trial-director.svg +0 -0
- package/dist/src/ui/data/avatars/unity-architect.svg +0 -0
- package/dist/src/ui/data/avatars/visionos-engineer.svg +0 -0
- package/dist/src/ui/data/avatars/worker-specialist.svg +0 -0
- package/dist/src/ui/data/avatars/workflow-architect.svg +0 -0
- package/dist/src/ui/data/avatars/workflow-automation.svg +0 -0
- package/dist/src/ui/data/avatars/zk-steward.svg +0 -0
- package/dist/src/ui/data/mastermind-sessions.json +0 -0
- package/dist/src/ui/mastermind-diagram-fallback.html +0 -0
- package/dist/src/ui/orgs.html +0 -0
- package/dist/src/ui/sse-manager.mjs +0 -0
- package/package.json +20 -19
- package/scripts/check-workspace-deps.mjs +0 -0
- package/scripts/deploy-ipfs-node.sh +0 -0
- package/scripts/download-embedding-model.mjs +0 -0
- package/scripts/publish.sh +0 -0
- package/scripts/setup-ipfs-registry.md +0 -0
- package/scripts/sync-claude-assets.sh +0 -0
- package/scripts/understand-analyze.mjs +0 -0
- package/LICENSE +0 -191
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -119,6 +119,29 @@ function probeStatus(p) {
|
|
|
119
119
|
});
|
|
120
120
|
}
|
|
121
121
|
|
|
122
|
+
// Resolves to the responder's pid (number), 'foreign-authwalled' for an
|
|
123
|
+
// auth-gated monomind server, null for unreadable, or false for "no answer".
|
|
124
|
+
function probePort(p) {
|
|
125
|
+
const http = require('http');
|
|
126
|
+
return new Promise((resolve) => {
|
|
127
|
+
const req = http.get({ hostname: 'localhost', port: p, path: '/api/status', timeout: 1000 }, (res) => {
|
|
128
|
+
let body = '';
|
|
129
|
+
res.on('data', (c) => { if (body.length < 4096) body += c; });
|
|
130
|
+
res.on('end', () => {
|
|
131
|
+
if (res.statusCode >= 500) return resolve(false);
|
|
132
|
+
try {
|
|
133
|
+
const parsed = JSON.parse(body);
|
|
134
|
+
if (typeof parsed.pid === 'number') return resolve(parsed.pid);
|
|
135
|
+
if (res.statusCode === 401 && parsed.error) return resolve('foreign-authwalled');
|
|
136
|
+
resolve(null);
|
|
137
|
+
} catch { resolve(null); }
|
|
138
|
+
});
|
|
139
|
+
});
|
|
140
|
+
req.on('error', () => resolve(false));
|
|
141
|
+
req.on('timeout', () => { req.destroy(); resolve(false); });
|
|
142
|
+
});
|
|
143
|
+
}
|
|
144
|
+
|
|
122
145
|
const LOCK_FILE = path.join(CWD, '.monomind', 'control.lock');
|
|
123
146
|
|
|
124
147
|
/**
|
|
@@ -144,6 +167,129 @@ function releaseSpawnLock() {
|
|
|
144
167
|
releaseLock(LOCK_FILE);
|
|
145
168
|
}
|
|
146
169
|
|
|
170
|
+
/**
|
|
171
|
+
* Confirms the spawned dashboard child actually bound a port, and updates
|
|
172
|
+
* control.json with the authoritative pid/port once it does.
|
|
173
|
+
*
|
|
174
|
+
* Runs in its own detached, fully independent process (see the
|
|
175
|
+
* MONOMIND_CONTROL_CONFIRM_MODE branch at the bottom of this file) — NOT
|
|
176
|
+
* inline inside the SessionStart-hook-invoked process. This can legitimately
|
|
177
|
+
* take up to HARD_CEILING_ATTEMPTS (~5 min: slow npx cold-resolve + AV/FS
|
|
178
|
+
* contention right after an install, #142) but the hook that spawns the
|
|
179
|
+
* dashboard is configured with a 5s timeout in settings.json — an inline
|
|
180
|
+
* await here would almost always get truncated by that hook timeout before
|
|
181
|
+
* ever reaching the slow paths #142/#143 were specifically added to
|
|
182
|
+
* tolerate, silently defeating those fixes and leaving control.json stuck on
|
|
183
|
+
* its pre-confirmation optimistic guess. Running this as a separate spawned
|
|
184
|
+
* process means the hook-invoked process can write the optimistic status and
|
|
185
|
+
* exit immediately (matching this file's own module docstring), while
|
|
186
|
+
* confirmation proceeds independently for as long as it legitimately needs.
|
|
187
|
+
*/
|
|
188
|
+
async function runConfirm({ childPid, port: defaultPort, boundReportPath, isNpxFallback }) {
|
|
189
|
+
const CONFIRM_ATTEMPTS = isNpxFallback ? 60 : 20; // 500ms/attempt: 30s vs 10s
|
|
190
|
+
const HARD_CEILING_ATTEMPTS = 600; // 500ms/attempt: 5 min — see doc comment above
|
|
191
|
+
let sawForeignOnDefault = false;
|
|
192
|
+
let attempt = 0;
|
|
193
|
+
for (; attempt < HARD_CEILING_ATTEMPTS; attempt++) {
|
|
194
|
+
await new Promise(r => setTimeout(r, 500));
|
|
195
|
+
// Past the minimum grace period, a dead child means it's not coming
|
|
196
|
+
// back — stop waiting immediately instead of burning the rest of the
|
|
197
|
+
// budget. A LIVE child that simply hasn't reported yet keeps getting the
|
|
198
|
+
// benefit of the doubt up to HARD_CEILING_ATTEMPTS instead of being
|
|
199
|
+
// killed on a fixed guess.
|
|
200
|
+
if (attempt >= CONFIRM_ATTEMPTS && !isPidAlive(childPid)) break;
|
|
201
|
+
// 1) Authoritative: child self-reported its bound port. Identity comes
|
|
202
|
+
// from boundReportPath's own per-invocation-unique path (nothing else on
|
|
203
|
+
// the machine knows it, since it's only handed to this child via env),
|
|
204
|
+
// NOT a pid match: under shell:true (#141's Windows EINVAL fix), childPid
|
|
205
|
+
// is the wrapping cmd.exe's pid, not the real server's — rep.pid !==
|
|
206
|
+
// childPid always, so a pid comparison here can never succeed on the
|
|
207
|
+
// npx-fallback path regardless of how long we wait (#143). rep.pid is
|
|
208
|
+
// the real server pid — use it for control.json.
|
|
209
|
+
try {
|
|
210
|
+
const rep = JSON.parse(fs.readFileSync(boundReportPath, 'utf8'));
|
|
211
|
+
if (rep && typeof rep.pid === 'number' && typeof rep.port === 'number') {
|
|
212
|
+
try { fs.unlinkSync(boundReportPath); } catch { /* ignore */ }
|
|
213
|
+
writeStatus(rep.pid, rep.port);
|
|
214
|
+
if (String(process.env.MONOMIND_HOOK_QUIET || "") !== "1") process.stdout.write(`[control] server bound to port ${rep.port} (pid ${rep.pid})\n`);
|
|
215
|
+
return;
|
|
216
|
+
}
|
|
217
|
+
} catch { /* not written yet or old server — fall through to probe */ }
|
|
218
|
+
// 2) Fallback: pid-matched HTTP probe (old servers without report support)
|
|
219
|
+
for (let delta = 0; delta <= 10; delta++) {
|
|
220
|
+
const p = defaultPort + delta;
|
|
221
|
+
const responderPid = await probePort(p);
|
|
222
|
+
if (responderPid === false) continue;
|
|
223
|
+
if (responderPid === childPid) {
|
|
224
|
+
if (p !== defaultPort) {
|
|
225
|
+
writeStatus(childPid, p);
|
|
226
|
+
if (String(process.env.MONOMIND_HOOK_QUIET || "") !== "1") process.stdout.write(`[control] server bound to port ${p} (updated control.json)\n`);
|
|
227
|
+
}
|
|
228
|
+
return;
|
|
229
|
+
}
|
|
230
|
+
if (p === defaultPort && (typeof responderPid === 'number' || responderPid === 'foreign-authwalled')) {
|
|
231
|
+
sawForeignOnDefault = true;
|
|
232
|
+
}
|
|
233
|
+
// pid mismatch or unreadable — not provably ours, keep scanning
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
try { fs.unlinkSync(boundReportPath); } catch { /* ignore */ }
|
|
237
|
+
if (sawForeignOnDefault) {
|
|
238
|
+
// Another project's server owns defaultPort and our child never proved
|
|
239
|
+
// its own port — point control.json at the live server instead of lying,
|
|
240
|
+
// and kill our redundant child.
|
|
241
|
+
try { process.kill(childPid, 'SIGTERM'); } catch { /* already gone */ }
|
|
242
|
+
if (String(process.env.MONOMIND_HOOK_QUIET || "") !== "1") process.stdout.write(`[control] port ${defaultPort} is served by another project's control server — reusing it (killed redundant child)\n`);
|
|
243
|
+
let foreignPid = await probePort(defaultPort);
|
|
244
|
+
if (typeof foreignPid !== 'number' || foreignPid <= 0) {
|
|
245
|
+
try {
|
|
246
|
+
const { execFileSync } = require('child_process');
|
|
247
|
+
const lsofOut = execFileSync('lsof', ['-ti', `:${defaultPort}`, '-sTCP:LISTEN'], { encoding: 'utf8', timeout: 3000 }).trim();
|
|
248
|
+
const parsedPid = parseInt(lsofOut.split('\n')[0], 10);
|
|
249
|
+
if (Number.isInteger(parsedPid) && parsedPid > 0) foreignPid = parsedPid;
|
|
250
|
+
} catch { /* ignore */ }
|
|
251
|
+
}
|
|
252
|
+
writeStatus(typeof foreignPid === 'number' ? foreignPid : 0, defaultPort);
|
|
253
|
+
// Pair with the foreign server: resolve its project dir from its pid,
|
|
254
|
+
// copy its dashboard-token beside OUR control.json (ingest is
|
|
255
|
+
// default-deny — without this every event from this project 401s
|
|
256
|
+
// silently), and self-register in its known-projects so future token
|
|
257
|
+
// rotations propagate back here on server restart.
|
|
258
|
+
try {
|
|
259
|
+
if (typeof foreignPid === 'number' && foreignPid > 0) {
|
|
260
|
+
const { execFileSync } = require('child_process');
|
|
261
|
+
const out = execFileSync('lsof', ['-a', '-p', String(foreignPid), '-d', 'cwd', '-Fn'], { encoding: 'utf8', timeout: 3000 });
|
|
262
|
+
const nLine = out.split('\n').find((l) => l.startsWith('n'));
|
|
263
|
+
const serverHome = nLine ? nLine.slice(1) : null;
|
|
264
|
+
if (serverHome) {
|
|
265
|
+
const srcTok = path.join(serverHome, '.monomind', 'dashboard-token');
|
|
266
|
+
const dstTok = path.join(CWD, '.monomind', 'dashboard-token');
|
|
267
|
+
if (fs.existsSync(srcTok)) {
|
|
268
|
+
fs.copyFileSync(srcTok, dstTok);
|
|
269
|
+
fs.chmodSync(dstTok, 0o600);
|
|
270
|
+
}
|
|
271
|
+
const kpFile = path.join(serverHome, 'data', 'known-projects.json');
|
|
272
|
+
try {
|
|
273
|
+
const kp = fs.existsSync(kpFile) ? JSON.parse(fs.readFileSync(kpFile, 'utf8')) : [];
|
|
274
|
+
if (Array.isArray(kp) && !kp.includes(CWD)) {
|
|
275
|
+
kp.push(CWD);
|
|
276
|
+
fs.writeFileSync(kpFile, JSON.stringify(kp));
|
|
277
|
+
}
|
|
278
|
+
} catch { /* registry unreadable — token copy alone still unblocks events */ }
|
|
279
|
+
process.stdout.write('[control] paired dashboard token and registered this project with the shared server\n');
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
} catch { /* pairing is best-effort; propagation-on-restart is the fallback */ }
|
|
283
|
+
return;
|
|
284
|
+
}
|
|
285
|
+
// Server never became reachable on any expected port — kill the child
|
|
286
|
+
// rather than leave an orphan bound to some port nothing will ever read.
|
|
287
|
+
// The next session-start simply retries.
|
|
288
|
+
try { process.kill(childPid, 'SIGTERM'); } catch { /* already gone */ }
|
|
289
|
+
try { fs.unlinkSync(STATUS_FILE); } catch { /* ignore */ }
|
|
290
|
+
process.stdout.write(`[control] server did not respond within ${((attempt + 1) * 500 / 1000).toFixed(1)} s — killed orphan, will retry next session\n`);
|
|
291
|
+
}
|
|
292
|
+
|
|
147
293
|
async function main() {
|
|
148
294
|
// Skip spawning when system memory is critically low
|
|
149
295
|
try {
|
|
@@ -214,8 +360,8 @@ async function main() {
|
|
|
214
360
|
// npx-fallback branch (cmd is 'npx'/'npx.cmd') pays npx's own first-time
|
|
215
361
|
// package resolve into its `_npx` cache, measured at ~12s cold vs ~3s warm
|
|
216
362
|
// (#142) — comfortably over the 10s budget every other branch needs.
|
|
363
|
+
// (Passed to the detached confirm process below — see runConfirm.)
|
|
217
364
|
const isNpxFallback = cmd !== process.execPath;
|
|
218
|
-
const CONFIRM_ATTEMPTS = isNpxFallback ? 60 : 20; // 500ms/attempt: 30s vs 10s
|
|
219
365
|
|
|
220
366
|
// The child writes its ACTUAL bound port here — the only identity-proof
|
|
221
367
|
// signal. An HTTP probe alone can be answered by another project's server
|
|
@@ -246,153 +392,46 @@ async function main() {
|
|
|
246
392
|
writeStatus(child.pid, DEFAULT_PORT);
|
|
247
393
|
if (String(process.env.MONOMIND_HOOK_QUIET || "") !== "1") process.stdout.write(`[control] started Neural Control Room on port ${DEFAULT_PORT} (pid ${child.pid})\n`);
|
|
248
394
|
|
|
249
|
-
//
|
|
250
|
-
//
|
|
251
|
-
|
|
252
|
-
//
|
|
253
|
-
//
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
req.on('error', () => resolve(false));
|
|
270
|
-
req.on('timeout', () => { req.destroy(); resolve(false); });
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
// Give the server up to ~10 s to start, then confirm the actual port.
|
|
275
|
-
// Identity-first: the child's bound-report file (written by server.mjs) is
|
|
276
|
-
// authoritative; the HTTP probe only confirms a port when the responder's
|
|
277
|
-
// pid matches our child. A foreign server answering on DEFAULT_PORT must
|
|
278
|
-
// NOT be mistaken for ours — that lie misroutes every event emitter in
|
|
279
|
-
// this project (root cause of orgs running invisibly).
|
|
280
|
-
// Absolute safety net so a wedged-but-still-alive process can't hang this
|
|
281
|
-
// hook forever — CONFIRM_ATTEMPTS below is a minimum grace period, not a
|
|
282
|
-
// hard budget (#142 follow-up).
|
|
283
|
-
const HARD_CEILING_ATTEMPTS = 600; // 500ms/attempt: 5 min
|
|
284
|
-
async function confirmPort() {
|
|
285
|
-
let sawForeignOnDefault = false;
|
|
286
|
-
let attempt = 0;
|
|
287
|
-
for (; attempt < HARD_CEILING_ATTEMPTS; attempt++) {
|
|
288
|
-
await new Promise(r => setTimeout(r, 500));
|
|
289
|
-
// Past the minimum grace period, a dead child means it's not coming
|
|
290
|
-
// back — stop waiting immediately instead of burning the rest of the
|
|
291
|
-
// budget. A LIVE child that simply hasn't reported yet (npm/AV
|
|
292
|
-
// contention on a freshly-written node_modules right after install,
|
|
293
|
-
// measured once at ~142s vs the normal ~5-9s — #142 follow-up) keeps
|
|
294
|
-
// getting the benefit of the doubt up to HARD_CEILING_ATTEMPTS instead
|
|
295
|
-
// of being killed on a fixed guess.
|
|
296
|
-
if (attempt >= CONFIRM_ATTEMPTS && !isPidAlive(child.pid)) break;
|
|
297
|
-
// 1) Authoritative: child self-reported its bound port. Identity comes
|
|
298
|
-
// from BOUND_REPORT's own per-invocation-unique path (nothing else on
|
|
299
|
-
// the machine knows it, since it's only handed to this child via env),
|
|
300
|
-
// NOT a pid match: under shell:true (#141's Windows EINVAL fix),
|
|
301
|
-
// child.pid is the wrapping cmd.exe's pid, not the real server's —
|
|
302
|
-
// rep.pid !== child.pid always, so a pid comparison here can never
|
|
303
|
-
// succeed on the npx-fallback path regardless of how long we wait
|
|
304
|
-
// (#143). rep.pid is the real server pid — use it for control.json.
|
|
305
|
-
try {
|
|
306
|
-
const rep = JSON.parse(fs.readFileSync(BOUND_REPORT, 'utf8'));
|
|
307
|
-
if (rep && typeof rep.pid === 'number' && typeof rep.port === 'number') {
|
|
308
|
-
try { fs.unlinkSync(BOUND_REPORT); } catch { /* ignore */ }
|
|
309
|
-
writeStatus(rep.pid, rep.port);
|
|
310
|
-
if (String(process.env.MONOMIND_HOOK_QUIET || "") !== "1") process.stdout.write(`[control] server bound to port ${rep.port} (pid ${rep.pid})\n`);
|
|
311
|
-
return;
|
|
312
|
-
}
|
|
313
|
-
} catch { /* not written yet or old server — fall through to probe */ }
|
|
314
|
-
// 2) Fallback: pid-matched HTTP probe (old servers without report support)
|
|
315
|
-
for (let delta = 0; delta <= 10; delta++) {
|
|
316
|
-
const p = DEFAULT_PORT + delta;
|
|
317
|
-
const responderPid = await probePort(p);
|
|
318
|
-
if (responderPid === false) continue;
|
|
319
|
-
if (responderPid === child.pid) {
|
|
320
|
-
if (p !== DEFAULT_PORT) {
|
|
321
|
-
writeStatus(child.pid, p);
|
|
322
|
-
if (String(process.env.MONOMIND_HOOK_QUIET || "") !== "1") process.stdout.write(`[control] server bound to port ${p} (updated control.json)\n`);
|
|
323
|
-
}
|
|
324
|
-
return;
|
|
325
|
-
}
|
|
326
|
-
if (p === DEFAULT_PORT && (typeof responderPid === 'number' || responderPid === 'foreign-authwalled')) {
|
|
327
|
-
sawForeignOnDefault = true;
|
|
328
|
-
}
|
|
329
|
-
// pid mismatch or unreadable — not provably ours, keep scanning
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
try { fs.unlinkSync(BOUND_REPORT); } catch { /* ignore */ }
|
|
333
|
-
if (sawForeignOnDefault) {
|
|
334
|
-
// Another project's server owns DEFAULT_PORT and our child never proved
|
|
335
|
-
// its own port — point control.json at the live server instead of lying,
|
|
336
|
-
// and kill our redundant child.
|
|
337
|
-
try { process.kill(child.pid, 'SIGTERM'); } catch { /* already gone */ }
|
|
338
|
-
if (String(process.env.MONOMIND_HOOK_QUIET || "") !== "1") process.stdout.write(`[control] port ${DEFAULT_PORT} is served by another project's control server — reusing it (killed redundant child)\n`);
|
|
339
|
-
let foreignPid = await probePort(DEFAULT_PORT);
|
|
340
|
-
if (typeof foreignPid !== 'number' || foreignPid <= 0) {
|
|
341
|
-
try {
|
|
342
|
-
const { execFileSync } = require('child_process');
|
|
343
|
-
const lsofOut = execFileSync('lsof', ['-ti', `:${DEFAULT_PORT}`, '-sTCP:LISTEN'], { encoding: 'utf8', timeout: 3000 }).trim();
|
|
344
|
-
const parsedPid = parseInt(lsofOut.split('\n')[0], 10);
|
|
345
|
-
if (Number.isInteger(parsedPid) && parsedPid > 0) foreignPid = parsedPid;
|
|
346
|
-
} catch { /* ignore */ }
|
|
347
|
-
}
|
|
348
|
-
writeStatus(typeof foreignPid === 'number' ? foreignPid : 0, DEFAULT_PORT);
|
|
349
|
-
// Pair with the foreign server: resolve its project dir from its pid,
|
|
350
|
-
// copy its dashboard-token beside OUR control.json (ingest is
|
|
351
|
-
// default-deny — without this every event from this project 401s
|
|
352
|
-
// silently), and self-register in its known-projects so future token
|
|
353
|
-
// rotations propagate back here on server restart.
|
|
354
|
-
try {
|
|
355
|
-
if (typeof foreignPid === 'number' && foreignPid > 0) {
|
|
356
|
-
const { execFileSync } = require('child_process');
|
|
357
|
-
const out = execFileSync('lsof', ['-a', '-p', String(foreignPid), '-d', 'cwd', '-Fn'], { encoding: 'utf8', timeout: 3000 });
|
|
358
|
-
const nLine = out.split('\n').find((l) => l.startsWith('n'));
|
|
359
|
-
const serverHome = nLine ? nLine.slice(1) : null;
|
|
360
|
-
if (serverHome) {
|
|
361
|
-
const srcTok = path.join(serverHome, '.monomind', 'dashboard-token');
|
|
362
|
-
const dstTok = path.join(CWD, '.monomind', 'dashboard-token');
|
|
363
|
-
if (fs.existsSync(srcTok)) {
|
|
364
|
-
fs.copyFileSync(srcTok, dstTok);
|
|
365
|
-
fs.chmodSync(dstTok, 0o600);
|
|
366
|
-
}
|
|
367
|
-
const kpFile = path.join(serverHome, 'data', 'known-projects.json');
|
|
368
|
-
try {
|
|
369
|
-
const kp = fs.existsSync(kpFile) ? JSON.parse(fs.readFileSync(kpFile, 'utf8')) : [];
|
|
370
|
-
if (Array.isArray(kp) && !kp.includes(CWD)) {
|
|
371
|
-
kp.push(CWD);
|
|
372
|
-
fs.writeFileSync(kpFile, JSON.stringify(kp));
|
|
373
|
-
}
|
|
374
|
-
} catch { /* registry unreadable — token copy alone still unblocks events */ }
|
|
375
|
-
process.stdout.write('[control] paired dashboard token and registered this project with the shared server\n');
|
|
376
|
-
}
|
|
377
|
-
}
|
|
378
|
-
} catch { /* pairing is best-effort; propagation-on-restart is the fallback */ }
|
|
379
|
-
return;
|
|
380
|
-
}
|
|
381
|
-
// Server never became reachable on any expected port — kill the child
|
|
382
|
-
// rather than leave an orphan bound to some port nothing will ever read.
|
|
383
|
-
// The next session-start simply retries.
|
|
384
|
-
try { process.kill(child.pid, 'SIGTERM'); } catch { /* already gone */ }
|
|
385
|
-
try { fs.unlinkSync(STATUS_FILE); } catch { /* ignore */ }
|
|
386
|
-
process.stdout.write(`[control] server did not respond within ${((attempt + 1) * 500 / 1000).toFixed(1)} s — killed orphan, will retry next session\n`);
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
confirmPort().catch(() => {}).finally(() => { releaseSpawnLock(); process.exit(0); });
|
|
390
|
-
}
|
|
395
|
+
// Hand off confirmation to a fully independent detached process instead of
|
|
396
|
+
// awaiting it inline (see runConfirm's doc comment for why: the hook that
|
|
397
|
+
// invokes THIS process has only a 5s timeout, far short of what
|
|
398
|
+
// confirmation can legitimately need). This process's job — spawn the
|
|
399
|
+
// dashboard and report the optimistic status — is done; exit immediately.
|
|
400
|
+
const confirmChild = spawn(process.execPath, [__filename], {
|
|
401
|
+
detached: true,
|
|
402
|
+
stdio: 'ignore',
|
|
403
|
+
cwd: CWD,
|
|
404
|
+
env: {
|
|
405
|
+
...process.env,
|
|
406
|
+
CLAUDE_PROJECT_DIR: CWD,
|
|
407
|
+
MONOMIND_CONTROL_CONFIRM_MODE: '1',
|
|
408
|
+
MONOMIND_CONTROL_CONFIRM_PID: String(child.pid),
|
|
409
|
+
MONOMIND_CONTROL_CONFIRM_PORT: String(DEFAULT_PORT),
|
|
410
|
+
MONOMIND_CONTROL_CONFIRM_REPORT: BOUND_REPORT,
|
|
411
|
+
MONOMIND_CONTROL_CONFIRM_NPX: isNpxFallback ? '1' : '0',
|
|
412
|
+
},
|
|
413
|
+
});
|
|
414
|
+
confirmChild.unref();
|
|
391
415
|
|
|
392
|
-
main().catch((err) => {
|
|
393
|
-
if (String(process.env.MONOMIND_HOOK_QUIET || "") !== "1") {
|
|
394
|
-
process.stderr.write(`[control] failed to start: ${err && err.message ? err.message : err}\n`);
|
|
395
|
-
}
|
|
396
416
|
releaseSpawnLock();
|
|
397
417
|
process.exit(0);
|
|
398
|
-
}
|
|
418
|
+
}
|
|
419
|
+
|
|
420
|
+
if (String(process.env.MONOMIND_CONTROL_CONFIRM_MODE || '') === '1') {
|
|
421
|
+
// Standalone confirmation process spawned by main() above — see runConfirm's
|
|
422
|
+
// doc comment. Not itself subject to the SessionStart hook's 5s timeout.
|
|
423
|
+
runConfirm({
|
|
424
|
+
childPid: Number(process.env.MONOMIND_CONTROL_CONFIRM_PID),
|
|
425
|
+
port: Number(process.env.MONOMIND_CONTROL_CONFIRM_PORT) || DEFAULT_PORT,
|
|
426
|
+
boundReportPath: process.env.MONOMIND_CONTROL_CONFIRM_REPORT,
|
|
427
|
+
isNpxFallback: process.env.MONOMIND_CONTROL_CONFIRM_NPX === '1',
|
|
428
|
+
}).catch(() => {}).finally(() => process.exit(0));
|
|
429
|
+
} else {
|
|
430
|
+
main().catch((err) => {
|
|
431
|
+
if (String(process.env.MONOMIND_HOOK_QUIET || "") !== "1") {
|
|
432
|
+
process.stderr.write(`[control] failed to start: ${err && err.message ? err.message : err}\n`);
|
|
433
|
+
}
|
|
434
|
+
releaseSpawnLock();
|
|
435
|
+
process.exit(0);
|
|
436
|
+
});
|
|
437
|
+
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -46,12 +46,25 @@ function getVersion() {
|
|
|
46
46
|
}
|
|
47
47
|
} catch { /* ignore */ }
|
|
48
48
|
}
|
|
49
|
-
// 2. Fallback: npm global prefix
|
|
49
|
+
// 2. Fallback: npm global prefix. Layout differs by platform — npm puts
|
|
50
|
+
// global packages directly under <prefix>/node_modules on Windows, but
|
|
51
|
+
// under <prefix>/lib/node_modules on macOS/Linux. Checking only the Unix
|
|
52
|
+
// shape meant this fallback silently failed on every Windows install,
|
|
53
|
+
// always landing on the hardcoded placeholder below regardless of the
|
|
54
|
+
// actual installed version.
|
|
50
55
|
try {
|
|
51
56
|
const { execSync } = require('child_process');
|
|
52
57
|
const prefix = execSync('npm config get prefix', { encoding: 'utf-8', timeout: 2000 }).trim();
|
|
53
|
-
const
|
|
54
|
-
|
|
58
|
+
const prefixCandidates = [
|
|
59
|
+
path.join(prefix, 'node_modules', 'monomind', 'package.json'), // Windows
|
|
60
|
+
path.join(prefix, 'lib', 'node_modules', 'monomind', 'package.json'), // macOS/Linux
|
|
61
|
+
];
|
|
62
|
+
for (const p of prefixCandidates) {
|
|
63
|
+
try {
|
|
64
|
+
const pkg = JSON.parse(fs.readFileSync(p, 'utf-8'));
|
|
65
|
+
if (pkg.version) return `v${pkg.version}`;
|
|
66
|
+
} catch { /* try next candidate */ }
|
|
67
|
+
}
|
|
55
68
|
} catch { /* ignore */ }
|
|
56
69
|
return 'v1.0.6';
|
|
57
70
|
}
|
|
@@ -1458,7 +1471,7 @@ function readMode() {
|
|
|
1458
1471
|
// ─── Testability export (when required as a module, not run as CLI) ──────────
|
|
1459
1472
|
if (require.main !== module) {
|
|
1460
1473
|
module.exports = {
|
|
1461
|
-
readJSON, safeStat, modelLabel,
|
|
1474
|
+
readJSON, safeStat, modelLabel, getVersion,
|
|
1462
1475
|
getSecurityStatus, getSwarmStatus, getADRStatus,
|
|
1463
1476
|
getHooksStatus, getActiveAgent, getLanceDBStats,
|
|
1464
1477
|
getLearningStats, getTestStats, getIntegrationStatus,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
package/.claude/settings.json
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|