monomind 2.7.11 → 2.7.13
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/LICENSE +0 -0
- package/README.md +0 -0
- package/bin/cli.js +55 -4
- package/package.json +4 -47
- package/bin/npx-safe-launch.js +0 -9
- package/packages/@monomind/cli/.claude/agents/architecture/system-design/arch-system-design.md +0 -54
- package/packages/@monomind/cli/.claude/agents/consensus/crdt-synchronizer.md +0 -977
- package/packages/@monomind/cli/.claude/agents/consensus/quorum-manager.md +0 -106
- package/packages/@monomind/cli/.claude/agents/consensus/security-manager.md +0 -602
- package/packages/@monomind/cli/.claude/agents/core/coder.md +0 -271
- package/packages/@monomind/cli/.claude/agents/core/coordinator.md +0 -133
- package/packages/@monomind/cli/.claude/agents/core/planner.md +0 -179
- package/packages/@monomind/cli/.claude/agents/core/researcher.md +0 -197
- package/packages/@monomind/cli/.claude/agents/core/reviewer.md +0 -336
- package/packages/@monomind/cli/.claude/agents/core/tester.md +0 -326
- package/packages/@monomind/cli/.claude/agents/design/design-monodesign.md +0 -121
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-ai-data-remediation-engineer.md +0 -212
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-ai-engineer.md +0 -165
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-autonomous-optimization-architect.md +0 -108
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-backend-architect.md +0 -254
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-code-reviewer.md +0 -95
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-data-engineer.md +0 -307
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-database-optimizer.md +0 -200
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-devops-automator.md +0 -430
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-embedded-firmware-engineer.md +0 -174
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-feishu-integration-developer.md +0 -607
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-frontend-developer.md +0 -249
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-git-workflow-master.md +0 -108
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-incident-response-commander.md +0 -482
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-mobile-app-builder.md +0 -499
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-rapid-prototyper.md +0 -463
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-security-engineer.md +0 -303
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-senior-developer.md +0 -195
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-software-architect.md +0 -100
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-solidity-smart-contract-engineer.md +0 -528
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-sre.md +0 -114
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-technical-writer.md +0 -412
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-threat-detection-engineer.md +0 -540
- package/packages/@monomind/cli/.claude/agents/engineering/engineering-wechat-mini-program-developer.md +0 -351
- package/packages/@monomind/cli/.claude/agents/github/code-review-swarm.md +0 -557
- package/packages/@monomind/cli/.claude/agents/github/github-modes.md +0 -154
- package/packages/@monomind/cli/.claude/agents/github/issue-tracker.md +0 -297
- package/packages/@monomind/cli/.claude/agents/github/multi-repo-swarm.md +0 -525
- package/packages/@monomind/cli/.claude/agents/github/pr-manager.md +0 -161
- package/packages/@monomind/cli/.claude/agents/github/project-board-sync.md +0 -478
- package/packages/@monomind/cli/.claude/agents/github/release-manager.md +0 -296
- package/packages/@monomind/cli/.claude/agents/github/repo-architect.md +0 -351
- package/packages/@monomind/cli/.claude/agents/github/swarm-issue.md +0 -548
- package/packages/@monomind/cli/.claude/agents/github/swarm-pr.md +0 -427
- package/packages/@monomind/cli/.claude/agents/github/sync-coordinator.md +0 -355
- package/packages/@monomind/cli/.claude/agents/github/workflow-automation.md +0 -640
- package/packages/@monomind/cli/.claude/agents/goal/goal-planner.md +0 -167
- package/packages/@monomind/cli/.claude/agents/hive-mind/collective-intelligence-coordinator.md +0 -93
- package/packages/@monomind/cli/.claude/agents/hive-mind/scout-explorer.md +0 -241
- package/packages/@monomind/cli/.claude/agents/hive-mind/swarm-memory-manager.md +0 -192
- package/packages/@monomind/cli/.claude/agents/hive-mind/worker-specialist.md +0 -216
- package/packages/@monomind/cli/.claude/agents/marketing/marketing-competitive-content.md +0 -155
- package/packages/@monomind/cli/.claude/agents/marketing/marketing-cro-specialist.md +0 -147
- package/packages/@monomind/cli/.claude/agents/marketing/marketing-email-specialist.md +0 -90
- package/packages/@monomind/cli/.claude/agents/marketing/marketing-launch-strategist.md +0 -129
- package/packages/@monomind/cli/.claude/agents/marketing/marketing-pricing-strategist.md +0 -127
- package/packages/@monomind/cli/.claude/agents/optimization/benchmark-suite.md +0 -665
- package/packages/@monomind/cli/.claude/agents/optimization/load-balancer.md +0 -431
- package/packages/@monomind/cli/.claude/agents/optimization/performance-monitor.md +0 -672
- package/packages/@monomind/cli/.claude/agents/optimization/resource-allocator.md +0 -674
- package/packages/@monomind/cli/.claude/agents/optimization/topology-optimizer.md +0 -808
- package/packages/@monomind/cli/.claude/agents/schemas/architecture-output.json +0 -43
- package/packages/@monomind/cli/.claude/agents/schemas/code-review-output.json +0 -28
- package/packages/@monomind/cli/.claude/agents/schemas/generic-task-input.json +0 -12
- package/packages/@monomind/cli/.claude/agents/schemas/implementation-output.json +0 -18
- package/packages/@monomind/cli/.claude/agents/schemas/research-output.json +0 -31
- package/packages/@monomind/cli/.claude/agents/schemas/security-audit-output.json +0 -29
- package/packages/@monomind/cli/.claude/agents/schemas/test-report-output.json +0 -29
- package/packages/@monomind/cli/.claude/agents/specialists/integration-architect.md +0 -94
- package/packages/@monomind/cli/.claude/agents/specialized/agentic-identity-trust.md +0 -388
- package/packages/@monomind/cli/.claude/agents/specialized/agents-orchestrator.md +0 -368
- package/packages/@monomind/cli/.claude/agents/specialized/automation-governance-architect.md +0 -217
- package/packages/@monomind/cli/.claude/agents/specialized/blockchain-security-auditor.md +0 -497
- package/packages/@monomind/cli/.claude/agents/specialized/compliance-auditor.md +0 -159
- package/packages/@monomind/cli/.claude/agents/specialized/identity-graph-operator.md +0 -261
- package/packages/@monomind/cli/.claude/agents/specialized/lsp-index-engineer.md +0 -315
- package/packages/@monomind/cli/.claude/agents/specialized/mobile/spec-mobile-react-native.md +0 -89
- package/packages/@monomind/cli/.claude/agents/specialized/specialized-cultural-intelligence-strategist.md +0 -89
- package/packages/@monomind/cli/.claude/agents/specialized/specialized-developer-advocate.md +0 -318
- package/packages/@monomind/cli/.claude/agents/specialized/specialized-document-generator.md +0 -56
- package/packages/@monomind/cli/.claude/agents/specialized/specialized-mcp-builder.md +0 -64
- package/packages/@monomind/cli/.claude/agents/specialized/specialized-model-qa.md +0 -489
- package/packages/@monomind/cli/.claude/agents/specialized/specialized-workflow-architect.md +0 -595
- package/packages/@monomind/cli/.claude/agents/specialized/zk-steward.md +0 -212
- package/packages/@monomind/cli/.claude/agents/swarm/mesh-coordinator.md +0 -97
- package/packages/@monomind/cli/.claude/agents/templates/automation-smart-agent.md +0 -185
- package/packages/@monomind/cli/.claude/agents/templates/coordinator-swarm-init.md +0 -83
- package/packages/@monomind/cli/.claude/agents/testing/production-validator.md +0 -375
- package/packages/@monomind/cli/.claude/agents/testing/tdd-london-swarm.md +0 -241
- package/packages/@monomind/cli/.claude/agents/testing/testing-accessibility-auditor.md +0 -322
- package/packages/@monomind/cli/.claude/agents/testing/testing-api-tester.md +0 -307
- package/packages/@monomind/cli/.claude/agents/testing/testing-evidence-collector.md +0 -213
- package/packages/@monomind/cli/.claude/agents/testing/testing-performance-benchmarker.md +0 -269
- package/packages/@monomind/cli/.claude/agents/testing/testing-test-results-analyzer.md +0 -306
- package/packages/@monomind/cli/.claude/agents/testing/testing-tool-evaluator.md +0 -395
- package/packages/@monomind/cli/.claude/agents/testing/testing-workflow-optimizer.md +0 -451
- package/packages/@monomind/cli/.claude/commands/agents/README.md +0 -14
- package/packages/@monomind/cli/.claude/commands/agents/agent-capabilities.md +0 -25
- package/packages/@monomind/cli/.claude/commands/agents/agent-coordination.md +0 -32
- package/packages/@monomind/cli/.claude/commands/agents/agent-spawning.md +0 -32
- package/packages/@monomind/cli/.claude/commands/agents/agent-types.md +0 -30
- package/packages/@monomind/cli/.claude/commands/analysis/README.md +0 -18
- package/packages/@monomind/cli/.claude/commands/analysis/bottleneck-detect.md +0 -69
- package/packages/@monomind/cli/.claude/commands/analysis/performance-bottlenecks.md +0 -59
- package/packages/@monomind/cli/.claude/commands/analysis/performance-report.md +0 -52
- package/packages/@monomind/cli/.claude/commands/analysis/token-usage.md +0 -47
- package/packages/@monomind/cli/.claude/commands/automation/README.md +0 -19
- package/packages/@monomind/cli/.claude/commands/automation/auto-agent.md +0 -86
- package/packages/@monomind/cli/.claude/commands/automation/self-healing.md +0 -108
- package/packages/@monomind/cli/.claude/commands/automation/session-memory.md +0 -89
- package/packages/@monomind/cli/.claude/commands/automation/smart-agents.md +0 -81
- package/packages/@monomind/cli/.claude/commands/automation/smart-spawn.md +0 -66
- package/packages/@monomind/cli/.claude/commands/automation/workflow-select.md +0 -60
- package/packages/@monomind/cli/.claude/commands/coordination/README.md +0 -13
- package/packages/@monomind/cli/.claude/commands/coordination/agent-spawn.md +0 -69
- package/packages/@monomind/cli/.claude/commands/coordination/swarm-init.md +0 -82
- package/packages/@monomind/cli/.claude/commands/coordination/task-orchestrate.md +0 -79
- package/packages/@monomind/cli/.claude/commands/github/README.md +0 -24
- package/packages/@monomind/cli/.claude/commands/github/github-modes.md +0 -151
- package/packages/@monomind/cli/.claude/commands/github/issue-tracker.md +0 -291
- package/packages/@monomind/cli/.claude/commands/github/pr-manager.md +0 -171
- package/packages/@monomind/cli/.claude/commands/github/release-manager.md +0 -343
- package/packages/@monomind/cli/.claude/commands/github/repo-architect.md +0 -372
- package/packages/@monomind/cli/.claude/commands/github/sync-coordinator.md +0 -297
- package/packages/@monomind/cli/.claude/commands/hive-mind/README.md +0 -42
- package/packages/@monomind/cli/.claude/commands/hive-mind/hive-mind-consensus.md +0 -72
- package/packages/@monomind/cli/.claude/commands/hive-mind/hive-mind-init.md +0 -68
- package/packages/@monomind/cli/.claude/commands/hive-mind/hive-mind-memory.md +0 -73
- package/packages/@monomind/cli/.claude/commands/hive-mind/hive-mind-spawn.md +0 -82
- package/packages/@monomind/cli/.claude/commands/hive-mind/hive-mind-status.md +0 -56
- package/packages/@monomind/cli/.claude/commands/hive-mind/hive-mind-stop.md +0 -55
- package/packages/@monomind/cli/.claude/commands/hive-mind/hive-mind.md +0 -87
- package/packages/@monomind/cli/.claude/commands/hooks/README.md +0 -66
- package/packages/@monomind/cli/.claude/commands/hooks/overview.md +0 -112
- package/packages/@monomind/cli/.claude/commands/hooks/post-edit.md +0 -78
- package/packages/@monomind/cli/.claude/commands/hooks/post-task.md +0 -62
- package/packages/@monomind/cli/.claude/commands/hooks/pre-edit.md +0 -81
- package/packages/@monomind/cli/.claude/commands/hooks/pre-task.md +0 -73
- package/packages/@monomind/cli/.claude/commands/hooks/session-end.md +0 -82
- package/packages/@monomind/cli/.claude/commands/hooks/setup.md +0 -132
- package/packages/@monomind/cli/.claude/commands/mastermind/_repeat.md +0 -492
- package/packages/@monomind/cli/.claude/commands/mastermind/_taskfile.md +0 -232
- package/packages/@monomind/cli/.claude/commands/mastermind/adr.md +0 -9
- package/packages/@monomind/cli/.claude/commands/mastermind/approvev1.md +0 -94
- package/packages/@monomind/cli/.claude/commands/mastermind/architect.md +0 -52
- package/packages/@monomind/cli/.claude/commands/mastermind/autodev.md +0 -28
- package/packages/@monomind/cli/.claude/commands/mastermind/brain.md +0 -99
- package/packages/@monomind/cli/.claude/commands/mastermind/budget.md +0 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/build.md +0 -23
- package/packages/@monomind/cli/.claude/commands/mastermind/code-review.md +0 -314
- package/packages/@monomind/cli/.claude/commands/mastermind/content.md +0 -23
- package/packages/@monomind/cli/.claude/commands/mastermind/createorg.md +0 -143
- package/packages/@monomind/cli/.claude/commands/mastermind/createtask.md +0 -372
- package/packages/@monomind/cli/.claude/commands/mastermind/debug.md +0 -19
- package/packages/@monomind/cli/.claude/commands/mastermind/design.md +0 -17
- package/packages/@monomind/cli/.claude/commands/mastermind/do.md +0 -525
- package/packages/@monomind/cli/.claude/commands/mastermind/execute.md +0 -17
- package/packages/@monomind/cli/.claude/commands/mastermind/finance.md +0 -23
- package/packages/@monomind/cli/.claude/commands/mastermind/finish.md +0 -17
- package/packages/@monomind/cli/.claude/commands/mastermind/graph-status.md +0 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/help.md +0 -133
- package/packages/@monomind/cli/.claude/commands/mastermind/idea.md +0 -23
- package/packages/@monomind/cli/.claude/commands/mastermind/ideate.md +0 -258
- package/packages/@monomind/cli/.claude/commands/mastermind/improve.md +0 -342
- package/packages/@monomind/cli/.claude/commands/mastermind/loops.md +0 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/marketing.md +0 -23
- package/packages/@monomind/cli/.claude/commands/mastermind/master.md +0 -1140
- package/packages/@monomind/cli/.claude/commands/mastermind/memory.md +0 -227
- package/packages/@monomind/cli/.claude/commands/mastermind/okf-export.md +0 -14
- package/packages/@monomind/cli/.claude/commands/mastermind/okf-import.md +0 -15
- package/packages/@monomind/cli/.claude/commands/mastermind/ops.md +0 -23
- package/packages/@monomind/cli/.claude/commands/mastermind/orgs.md +0 -18
- package/packages/@monomind/cli/.claude/commands/mastermind/orgstatus.md +0 -56
- package/packages/@monomind/cli/.claude/commands/mastermind/plan.md +0 -23
- package/packages/@monomind/cli/.claude/commands/mastermind/receive-review.md +0 -17
- package/packages/@monomind/cli/.claude/commands/mastermind/references/antigravity-tools.md +0 -60
- package/packages/@monomind/cli/.claude/commands/mastermind/references/claude-code-tools.md +0 -50
- package/packages/@monomind/cli/.claude/commands/mastermind/references/codex-tools.md +0 -64
- package/packages/@monomind/cli/.claude/commands/mastermind/references/copilot-tools.md +0 -49
- package/packages/@monomind/cli/.claude/commands/mastermind/references/gemini-tools.md +0 -63
- package/packages/@monomind/cli/.claude/commands/mastermind/references/pi-tools.md +0 -28
- package/packages/@monomind/cli/.claude/commands/mastermind/release.md +0 -23
- package/packages/@monomind/cli/.claude/commands/mastermind/repeat.md +0 -254
- package/packages/@monomind/cli/.claude/commands/mastermind/research.md +0 -23
- package/packages/@monomind/cli/.claude/commands/mastermind/review.md +0 -34
- package/packages/@monomind/cli/.claude/commands/mastermind/runorg.md +0 -71
- package/packages/@monomind/cli/.claude/commands/mastermind/runorgv1.md +0 -159
- package/packages/@monomind/cli/.claude/commands/mastermind/sales.md +0 -23
- package/packages/@monomind/cli/.claude/commands/mastermind/skill-builder.md +0 -17
- package/packages/@monomind/cli/.claude/commands/mastermind/specialagents.md +0 -122
- package/packages/@monomind/cli/.claude/commands/mastermind/stoporg.md +0 -78
- package/packages/@monomind/cli/.claude/commands/mastermind/swarm.md +0 -158
- package/packages/@monomind/cli/.claude/commands/mastermind/taskdev.md +0 -23
- package/packages/@monomind/cli/.claude/commands/mastermind/tdd.md +0 -19
- package/packages/@monomind/cli/.claude/commands/mastermind/techport.md +0 -27
- package/packages/@monomind/cli/.claude/commands/mastermind/topology.md +0 -121
- package/packages/@monomind/cli/.claude/commands/mastermind/understand.md +0 -136
- package/packages/@monomind/cli/.claude/commands/mastermind/verify.md +0 -19
- package/packages/@monomind/cli/.claude/commands/mastermind/worktree.md +0 -17
- package/packages/@monomind/cli/.claude/commands/mastermind.md +0 -140
- package/packages/@monomind/cli/.claude/commands/memory/README.md +0 -79
- package/packages/@monomind/cli/.claude/commands/memory/memory-search.md +0 -77
- package/packages/@monomind/cli/.claude/commands/monitoring/README.md +0 -69
- package/packages/@monomind/cli/.claude/commands/monitoring/agent-metrics.md +0 -65
- package/packages/@monomind/cli/.claude/commands/monitoring/agents.md +0 -71
- package/packages/@monomind/cli/.claude/commands/monitoring/status.md +0 -108
- package/packages/@monomind/cli/.claude/commands/monobrowse.md +0 -21
- package/packages/@monomind/cli/.claude/commands/monoes/README.md +0 -30
- package/packages/@monomind/cli/.claude/commands/monoes/install.md +0 -163
- package/packages/@monomind/cli/.claude/commands/monoes/monoagent.md +0 -148
- package/packages/@monomind/cli/.claude/commands/monoes/monoclip.md +0 -64
- package/packages/@monomind/cli/.claude/commands/monoes/monotask.md +0 -137
- package/packages/@monomind/cli/.claude/commands/monograph/README.md +0 -102
- package/packages/@monomind/cli/.claude/commands/monograph/monograph-build.md +0 -79
- package/packages/@monomind/cli/.claude/commands/monograph/monograph-search.md +0 -96
- package/packages/@monomind/cli/.claude/commands/monograph/monograph-stats.md +0 -53
- package/packages/@monomind/cli/.claude/commands/monograph/monograph-watch.md +0 -63
- package/packages/@monomind/cli/.claude/commands/monograph/monograph-wiki.md +0 -91
- package/packages/@monomind/cli/.claude/commands/optimization/auto-topology.md +0 -85
- package/packages/@monomind/cli/.claude/commands/optimization/performance-optimize.md +0 -79
- package/packages/@monomind/cli/.claude/commands/pair/README.md +0 -79
- package/packages/@monomind/cli/.claude/commands/pair/examples.md +0 -156
- package/packages/@monomind/cli/.claude/commands/pair/modes.md +0 -122
- package/packages/@monomind/cli/.claude/commands/pair/session.md +0 -124
- package/packages/@monomind/cli/.claude/commands/stream-chain/pipeline.md +0 -116
- package/packages/@monomind/cli/.claude/commands/stream-chain/run.md +0 -156
- package/packages/@monomind/cli/.claude/commands/swarm/README.md +0 -40
- package/packages/@monomind/cli/.claude/commands/swarm/analysis.md +0 -73
- package/packages/@monomind/cli/.claude/commands/swarm/development.md +0 -72
- package/packages/@monomind/cli/.claude/commands/swarm/examples.md +0 -103
- package/packages/@monomind/cli/.claude/commands/swarm/maintenance.md +0 -75
- package/packages/@monomind/cli/.claude/commands/swarm/optimization.md +0 -84
- package/packages/@monomind/cli/.claude/commands/swarm/research.md +0 -76
- package/packages/@monomind/cli/.claude/commands/swarm/swarm.md +0 -79
- package/packages/@monomind/cli/.claude/commands/swarm/testing.md +0 -80
- package/packages/@monomind/cli/.claude/commands/tokens.md +0 -18
- package/packages/@monomind/cli/.claude/commands/truth/start.md +0 -121
- package/packages/@monomind/cli/.claude/commands/ts.md +0 -14
- package/packages/@monomind/cli/.claude/commands/workflows/README.md +0 -64
- package/packages/@monomind/cli/.claude/commands/workflows/development.md +0 -86
- package/packages/@monomind/cli/.claude/commands/workflows/research.md +0 -89
- package/packages/@monomind/cli/.claude/commands/workflows/workflow-create.md +0 -83
- package/packages/@monomind/cli/.claude/commands/workflows/workflow-execute.md +0 -101
- package/packages/@monomind/cli/.claude/commands/workflows/workflow-export.md +0 -88
- package/packages/@monomind/cli/.claude/helpers/build-skill-registry.cjs +0 -323
- package/packages/@monomind/cli/.claude/helpers/control-start.cjs +0 -327
- package/packages/@monomind/cli/.claude/helpers/control-stop.cjs +0 -95
- package/packages/@monomind/cli/.claude/helpers/event-logger.cjs +0 -266
- package/packages/@monomind/cli/.claude/helpers/graphify-freshen.cjs +0 -148
- package/packages/@monomind/cli/.claude/helpers/handlers/adr-draft-handler.cjs +0 -78
- package/packages/@monomind/cli/.claude/helpers/handlers/agent-start-handler.cjs +0 -132
- package/packages/@monomind/cli/.claude/helpers/handlers/budget-status-handler.cjs +0 -14
- package/packages/@monomind/cli/.claude/helpers/handlers/capture-handler.cjs +0 -736
- package/packages/@monomind/cli/.claude/helpers/handlers/compact-handler.cjs +0 -35
- package/packages/@monomind/cli/.claude/helpers/handlers/edit-handler.cjs +0 -178
- package/packages/@monomind/cli/.claude/helpers/handlers/gates-handler.cjs +0 -494
- package/packages/@monomind/cli/.claude/helpers/handlers/graph-status-handler.cjs +0 -45
- package/packages/@monomind/cli/.claude/helpers/handlers/loops-status-handler.cjs +0 -48
- package/packages/@monomind/cli/.claude/helpers/handlers/route-handler.cjs +0 -770
- package/packages/@monomind/cli/.claude/helpers/handlers/session-handler.cjs +0 -286
- package/packages/@monomind/cli/.claude/helpers/handlers/session-restore-handler.cjs +0 -573
- package/packages/@monomind/cli/.claude/helpers/handlers/stats-handler.cjs +0 -14
- package/packages/@monomind/cli/.claude/helpers/handlers/task-handler.cjs +0 -241
- package/packages/@monomind/cli/.claude/helpers/hook-handler.cjs +0 -951
- package/packages/@monomind/cli/.claude/helpers/intelligence.cjs +0 -510
- package/packages/@monomind/cli/.claude/helpers/learning-service.mjs +0 -61
- package/packages/@monomind/cli/.claude/helpers/loop-tracker.cjs +0 -119
- package/packages/@monomind/cli/.claude/helpers/mastermind-activate.cjs +0 -35
- package/packages/@monomind/cli/.claude/helpers/memory-palace.cjs +0 -461
- package/packages/@monomind/cli/.claude/helpers/memory.cjs +0 -193
- package/packages/@monomind/cli/.claude/helpers/metrics-db.mjs +0 -87
- package/packages/@monomind/cli/.claude/helpers/monolean-activate.cjs +0 -30
- package/packages/@monomind/cli/.claude/helpers/monolean-config.cjs +0 -76
- package/packages/@monomind/cli/.claude/helpers/monolean-instructions.cjs +0 -109
- package/packages/@monomind/cli/.claude/helpers/monolean-propagate.cjs +0 -13
- package/packages/@monomind/cli/.claude/helpers/monolean-tracker.cjs +0 -18
- package/packages/@monomind/cli/.claude/helpers/router.cjs +0 -571
- package/packages/@monomind/cli/.claude/helpers/session.cjs +0 -145
- package/packages/@monomind/cli/.claude/helpers/skill-registry.json +0 -4948
- package/packages/@monomind/cli/.claude/helpers/statusline.cjs +0 -1368
- package/packages/@monomind/cli/.claude/helpers/toggle-statusline.cjs +0 -73
- package/packages/@monomind/cli/.claude/helpers/token-tracker.cjs +0 -1034
- package/packages/@monomind/cli/.claude/helpers/utils/agent-registrations.cjs +0 -41
- package/packages/@monomind/cli/.claude/helpers/utils/fs-helpers.cjs +0 -183
- package/packages/@monomind/cli/.claude/helpers/utils/micro-agents.cjs +0 -358
- package/packages/@monomind/cli/.claude/helpers/utils/monograph.cjs +0 -692
- package/packages/@monomind/cli/.claude/helpers/utils/system-pressure.cjs +0 -46
- package/packages/@monomind/cli/.claude/helpers/utils/telemetry.cjs +0 -162
- package/packages/@monomind/cli/.claude/settings.json +0 -448
- package/packages/@monomind/cli/.claude/skills/agent-browser-testing/SKILL.md +0 -964
- package/packages/@monomind/cli/.claude/skills/agentic-jujutsu/SKILL.md +0 -645
- package/packages/@monomind/cli/.claude/skills/github-issue-triage/SKILL.md +0 -354
- package/packages/@monomind/cli/.claude/skills/github-repo-recap/SKILL.md +0 -207
- package/packages/@monomind/cli/.claude/skills/hive-mind-advanced/SKILL.md +0 -694
- package/packages/@monomind/cli/.claude/skills/hooks-automation/SKILL.md +0 -1192
- package/packages/@monomind/cli/.claude/skills/mastermind-access/SKILL.md +0 -236
- package/packages/@monomind/cli/.claude/skills/mastermind-activity/SKILL.md +0 -191
- package/packages/@monomind/cli/.claude/skills/mastermind-adapter-manager/SKILL.md +0 -259
- package/packages/@monomind/cli/.claude/skills/mastermind-adapters/SKILL.md +0 -204
- package/packages/@monomind/cli/.claude/skills/mastermind-agent-detail/SKILL.md +0 -242
- package/packages/@monomind/cli/.claude/skills/mastermind-agent-select/SKILL.md +0 -132
- package/packages/@monomind/cli/.claude/skills/mastermind-agents/SKILL.md +0 -182
- package/packages/@monomind/cli/.claude/skills/mastermind-approval-detail/SKILL.md +0 -259
- package/packages/@monomind/cli/.claude/skills/mastermind-approvev1/SKILL.md +0 -191
- package/packages/@monomind/cli/.claude/skills/mastermind-architect/SKILL.md +0 -862
- package/packages/@monomind/cli/.claude/skills/mastermind-autodev/SKILL.md +0 -360
- package/packages/@monomind/cli/.claude/skills/mastermind-backup/SKILL.md +0 -197
- package/packages/@monomind/cli/.claude/skills/mastermind-bootstrap/SKILL.md +0 -190
- package/packages/@monomind/cli/.claude/skills/mastermind-budgets/SKILL.md +0 -237
- package/packages/@monomind/cli/.claude/skills/mastermind-build/SKILL.md +0 -169
- package/packages/@monomind/cli/.claude/skills/mastermind-companies/SKILL.md +0 -256
- package/packages/@monomind/cli/.claude/skills/mastermind-content/SKILL.md +0 -197
- package/packages/@monomind/cli/.claude/skills/mastermind-costs/SKILL.md +0 -151
- package/packages/@monomind/cli/.claude/skills/mastermind-createorg/SKILL.md +0 -247
- package/packages/@monomind/cli/.claude/skills/mastermind-debug/SKILL.md +0 -277
- package/packages/@monomind/cli/.claude/skills/mastermind-delegation/SKILL.md +0 -83
- package/packages/@monomind/cli/.claude/skills/mastermind-design/SKILL.md +0 -190
- package/packages/@monomind/cli/.claude/skills/mastermind-diagnose/SKILL.md +0 -249
- package/packages/@monomind/cli/.claude/skills/mastermind-env/SKILL.md +0 -203
- package/packages/@monomind/cli/.claude/skills/mastermind-environments/SKILL.md +0 -250
- package/packages/@monomind/cli/.claude/skills/mastermind-execute/SKILL.md +0 -104
- package/packages/@monomind/cli/.claude/skills/mastermind-export/SKILL.md +0 -333
- package/packages/@monomind/cli/.claude/skills/mastermind-finance/SKILL.md +0 -166
- package/packages/@monomind/cli/.claude/skills/mastermind-finish/SKILL.md +0 -251
- package/packages/@monomind/cli/.claude/skills/mastermind-goal-detail/SKILL.md +0 -255
- package/packages/@monomind/cli/.claude/skills/mastermind-goals/SKILL.md +0 -149
- package/packages/@monomind/cli/.claude/skills/mastermind-heartbeatv1/SKILL.md +0 -167
- package/packages/@monomind/cli/.claude/skills/mastermind-idea/SKILL.md +0 -1142
- package/packages/@monomind/cli/.claude/skills/mastermind-import/SKILL.md +0 -281
- package/packages/@monomind/cli/.claude/skills/mastermind-inbox/SKILL.md +0 -226
- package/packages/@monomind/cli/.claude/skills/mastermind-instance/SKILL.md +0 -235
- package/packages/@monomind/cli/.claude/skills/mastermind-instance-settings/SKILL.md +0 -315
- package/packages/@monomind/cli/.claude/skills/mastermind-intake/SKILL.md +0 -83
- package/packages/@monomind/cli/.claude/skills/mastermind-invite-landing/SKILL.md +0 -227
- package/packages/@monomind/cli/.claude/skills/mastermind-invites/SKILL.md +0 -254
- package/packages/@monomind/cli/.claude/skills/mastermind-issue-detail/SKILL.md +0 -291
- package/packages/@monomind/cli/.claude/skills/mastermind-issues/SKILL.md +0 -235
- package/packages/@monomind/cli/.claude/skills/mastermind-join-queue/SKILL.md +0 -170
- package/packages/@monomind/cli/.claude/skills/mastermind-liveness/SKILL.md +0 -392
- package/packages/@monomind/cli/.claude/skills/mastermind-marketing/SKILL.md +0 -228
- package/packages/@monomind/cli/.claude/skills/mastermind-marketing/references/copywriting-frameworks.md +0 -181
- package/packages/@monomind/cli/.claude/skills/mastermind-marketing/references/persuasion-psychology.md +0 -158
- package/packages/@monomind/cli/.claude/skills/mastermind-memory/SKILL.md +0 -321
- package/packages/@monomind/cli/.claude/skills/mastermind-monitor/SKILL.md +0 -1284
- package/packages/@monomind/cli/.claude/skills/mastermind-monotask/SKILL.md +0 -350
- package/packages/@monomind/cli/.claude/skills/mastermind-my-issues/SKILL.md +0 -146
- package/packages/@monomind/cli/.claude/skills/mastermind-new-agent/SKILL.md +0 -241
- package/packages/@monomind/cli/.claude/skills/mastermind-ops/SKILL.md +0 -168
- package/packages/@monomind/cli/.claude/skills/mastermind-org-chart/SKILL.md +0 -209
- package/packages/@monomind/cli/.claude/skills/mastermind-org-settings/SKILL.md +0 -274
- package/packages/@monomind/cli/.claude/skills/mastermind-orgs/SKILL.md +0 -120
- package/packages/@monomind/cli/.claude/skills/mastermind-orgstatus/SKILL.md +0 -254
- package/packages/@monomind/cli/.claude/skills/mastermind-plan/SKILL.md +0 -217
- package/packages/@monomind/cli/.claude/skills/mastermind-plan-to-tasks/SKILL.md +0 -136
- package/packages/@monomind/cli/.claude/skills/mastermind-plugin-manager/SKILL.md +0 -241
- package/packages/@monomind/cli/.claude/skills/mastermind-plugin-settings/SKILL.md +0 -273
- package/packages/@monomind/cli/.claude/skills/mastermind-plugins/SKILL.md +0 -190
- package/packages/@monomind/cli/.claude/skills/mastermind-profile/SKILL.md +0 -187
- package/packages/@monomind/cli/.claude/skills/mastermind-project-detail/SKILL.md +0 -249
- package/packages/@monomind/cli/.claude/skills/mastermind-project-workspace/SKILL.md +0 -244
- package/packages/@monomind/cli/.claude/skills/mastermind-projects/SKILL.md +0 -167
- package/packages/@monomind/cli/.claude/skills/mastermind-protocol/SKILL.md +0 -404
- package/packages/@monomind/cli/.claude/skills/mastermind-receive-review/SKILL.md +0 -213
- package/packages/@monomind/cli/.claude/skills/mastermind-release/SKILL.md +0 -168
- package/packages/@monomind/cli/.claude/skills/mastermind-repeat/SKILL.md +0 -171
- package/packages/@monomind/cli/.claude/skills/mastermind-research/SKILL.md +0 -168
- package/packages/@monomind/cli/.claude/skills/mastermind-review/SKILL.md +0 -233
- package/packages/@monomind/cli/.claude/skills/mastermind-routine-detail/SKILL.md +0 -253
- package/packages/@monomind/cli/.claude/skills/mastermind-routines/SKILL.md +0 -203
- package/packages/@monomind/cli/.claude/skills/mastermind-runorg/SKILL.md +0 -43
- package/packages/@monomind/cli/.claude/skills/mastermind-runorgv1/SKILL.md +0 -731
- package/packages/@monomind/cli/.claude/skills/mastermind-sales/SKILL.md +0 -170
- package/packages/@monomind/cli/.claude/skills/mastermind-search/SKILL.md +0 -186
- package/packages/@monomind/cli/.claude/skills/mastermind-secrets/SKILL.md +0 -199
- package/packages/@monomind/cli/.claude/skills/mastermind-skill-builder/SKILL.md +0 -447
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/SKILL.md +0 -156
- package/packages/@monomind/cli/.claude/skills/mastermind-stoporg/SKILL.md +0 -147
- package/packages/@monomind/cli/.claude/skills/mastermind-taskdev/SKILL.md +0 -377
- package/packages/@monomind/cli/.claude/skills/mastermind-taskdev/code-quality-reviewer-prompt.md +0 -60
- package/packages/@monomind/cli/.claude/skills/mastermind-taskdev/final-reviewer-prompt.md +0 -144
- package/packages/@monomind/cli/.claude/skills/mastermind-taskdev/implementer-prompt.md +0 -114
- package/packages/@monomind/cli/.claude/skills/mastermind-taskdev/spec-reviewer-prompt.md +0 -80
- package/packages/@monomind/cli/.claude/skills/mastermind-tasks/SKILL.md +0 -152
- package/packages/@monomind/cli/.claude/skills/mastermind-tdd/SKILL.md +0 -424
- package/packages/@monomind/cli/.claude/skills/mastermind-techport/SKILL.md +0 -777
- package/packages/@monomind/cli/.claude/skills/mastermind-threads/SKILL.md +0 -259
- package/packages/@monomind/cli/.claude/skills/mastermind-tree-control/SKILL.md +0 -250
- package/packages/@monomind/cli/.claude/skills/mastermind-verify/SKILL.md +0 -196
- package/packages/@monomind/cli/.claude/skills/mastermind-wiki/SKILL.md +0 -314
- package/packages/@monomind/cli/.claude/skills/mastermind-workspace-detail/SKILL.md +0 -317
- package/packages/@monomind/cli/.claude/skills/mastermind-workspaces/SKILL.md +0 -261
- package/packages/@monomind/cli/.claude/skills/mastermind-worktree/SKILL.md +0 -215
- package/packages/@monomind/cli/.claude/skills/monolean/SKILL.md +0 -118
- package/packages/@monomind/cli/.claude/skills/monolean-audit/SKILL.md +0 -41
- package/packages/@monomind/cli/.claude/skills/monolean-debt/SKILL.md +0 -46
- package/packages/@monomind/cli/.claude/skills/monolean-help/SKILL.md +0 -60
- package/packages/@monomind/cli/.claude/skills/monolean-review/SKILL.md +0 -57
- package/packages/@monomind/cli/.claude/skills/monomind/browse-agentcore.md +0 -115
- package/packages/@monomind/cli/.claude/skills/monomind/browse-electron.md +0 -188
- package/packages/@monomind/cli/.claude/skills/monomind/browse-qa.md +0 -228
- package/packages/@monomind/cli/.claude/skills/monomind/browse-references/authentication.md +0 -161
- package/packages/@monomind/cli/.claude/skills/monomind/browse-references/trust-boundaries.md +0 -40
- package/packages/@monomind/cli/.claude/skills/monomind/browse-references/video-recording.md +0 -83
- package/packages/@monomind/cli/.claude/skills/monomind/browse-slack.md +0 -188
- package/packages/@monomind/cli/.claude/skills/monomind/browse-vercel.md +0 -239
- package/packages/@monomind/cli/.claude/skills/monomind/browse.md +0 -724
- package/packages/@monomind/cli/.claude/skills/monomotion/SKILL.md +0 -145
- package/packages/@monomind/cli/.claude/skills/monomotion/rules/api-control.md +0 -139
- package/packages/@monomind/cli/.claude/skills/monomotion/rules/effects.md +0 -109
- package/packages/@monomind/cli/.claude/skills/monomotion/rules/integration.md +0 -140
- package/packages/@monomind/cli/.claude/skills/monomotion/rules/scroll.md +0 -131
- package/packages/@monomind/cli/.claude/skills/monomotion/rules/sequencing.md +0 -105
- package/packages/@monomind/cli/.claude/skills/monomotion/rules/svg.md +0 -101
- package/packages/@monomind/cli/.claude/skills/monomotion/rules/text.md +0 -119
- package/packages/@monomind/cli/.claude/skills/pair-programming/SKILL.md +0 -1202
- package/packages/@monomind/cli/.claude/skills/performance-analysis/SKILL.md +0 -560
- package/packages/@monomind/cli/.claude/skills/skill-builder/SKILL.md +0 -910
- package/packages/@monomind/cli/.claude/skills/specialagent/SKILL.md +0 -206
- package/packages/@monomind/cli/.claude/skills/stop-slop/SKILL.md +0 -67
- package/packages/@monomind/cli/.claude/skills/stop-slop/references/examples.md +0 -61
- package/packages/@monomind/cli/.claude/skills/stop-slop/references/phrases.md +0 -130
- package/packages/@monomind/cli/.claude/skills/stop-slop/references/structures.md +0 -136
- package/packages/@monomind/cli/.claude/skills/swarm-advanced/SKILL.md +0 -936
- package/packages/@monomind/cli/.claude/skills/swarm-orchestration/SKILL.md +0 -179
- package/packages/@monomind/cli/.claude/skills/verification-quality/SKILL.md +0 -674
- package/packages/@monomind/cli/README.md +0 -414
- package/packages/@monomind/cli/bin/cli.js +0 -379
- package/packages/@monomind/cli/bin/mcp-server.js +0 -208
- package/packages/@monomind/cli/bin/preinstall.cjs +0 -2
- package/packages/@monomind/cli/dist/src/agents/registry-builder.d.ts +0 -64
- package/packages/@monomind/cli/dist/src/agents/registry-builder.js +0 -228
- package/packages/@monomind/cli/dist/src/autopilot-state.d.ts +0 -77
- package/packages/@monomind/cli/dist/src/autopilot-state.js +0 -336
- package/packages/@monomind/cli/dist/src/browser/action-builder/analyzer.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/browser/action-builder/analyzer.js +0 -64
- package/packages/@monomind/cli/dist/src/browser/action-builder/types.d.ts +0 -47
- package/packages/@monomind/cli/dist/src/browser/action-builder/types.js +0 -2
- package/packages/@monomind/cli/dist/src/browser/adapters/gemini.d.ts +0 -3
- package/packages/@monomind/cli/dist/src/browser/adapters/gemini.js +0 -16
- package/packages/@monomind/cli/dist/src/browser/adapters/index.d.ts +0 -19
- package/packages/@monomind/cli/dist/src/browser/adapters/index.js +0 -23
- package/packages/@monomind/cli/dist/src/browser/adapters/instagram.d.ts +0 -3
- package/packages/@monomind/cli/dist/src/browser/adapters/instagram.js +0 -17
- package/packages/@monomind/cli/dist/src/browser/adapters/linkedin.d.ts +0 -3
- package/packages/@monomind/cli/dist/src/browser/adapters/linkedin.js +0 -19
- package/packages/@monomind/cli/dist/src/browser/adapters/x.d.ts +0 -3
- package/packages/@monomind/cli/dist/src/browser/adapters/x.js +0 -19
- package/packages/@monomind/cli/dist/src/browser/dashboard/server.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/browser/dashboard/server.js +0 -215
- package/packages/@monomind/cli/dist/src/browser/dashboard/ui.html +0 -261
- package/packages/@monomind/cli/dist/src/browser/workflow/engine.d.ts +0 -15
- package/packages/@monomind/cli/dist/src/browser/workflow/engine.js +0 -127
- package/packages/@monomind/cli/dist/src/browser/workflow/expression.d.ts +0 -4
- package/packages/@monomind/cli/dist/src/browser/workflow/expression.js +0 -64
- package/packages/@monomind/cli/dist/src/browser/workflow/store.d.ts +0 -24
- package/packages/@monomind/cli/dist/src/browser/workflow/store.js +0 -145
- package/packages/@monomind/cli/dist/src/browser/workflow/types.d.ts +0 -48
- package/packages/@monomind/cli/dist/src/browser/workflow/types.js +0 -2
- package/packages/@monomind/cli/dist/src/capabilities/cap-code.d.ts +0 -3
- package/packages/@monomind/cli/dist/src/capabilities/cap-code.js +0 -20
- package/packages/@monomind/cli/dist/src/capabilities/cap-data.d.ts +0 -3
- package/packages/@monomind/cli/dist/src/capabilities/cap-data.js +0 -165
- package/packages/@monomind/cli/dist/src/capabilities/cap-documents.d.ts +0 -5
- package/packages/@monomind/cli/dist/src/capabilities/cap-documents.js +0 -139
- package/packages/@monomind/cli/dist/src/capabilities/cap-graph.d.ts +0 -3
- package/packages/@monomind/cli/dist/src/capabilities/cap-graph.js +0 -84
- package/packages/@monomind/cli/dist/src/capabilities/cap-media.d.ts +0 -3
- package/packages/@monomind/cli/dist/src/capabilities/cap-media.js +0 -147
- package/packages/@monomind/cli/dist/src/capabilities/cap-timeline.d.ts +0 -3
- package/packages/@monomind/cli/dist/src/capabilities/cap-timeline.js +0 -90
- package/packages/@monomind/cli/dist/src/capabilities/index.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/capabilities/index.js +0 -18
- package/packages/@monomind/cli/dist/src/capabilities/manager.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/capabilities/manager.js +0 -79
- package/packages/@monomind/cli/dist/src/capabilities/scanner.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/capabilities/scanner.js +0 -125
- package/packages/@monomind/cli/dist/src/capabilities/types.d.ts +0 -64
- package/packages/@monomind/cli/dist/src/capabilities/types.js +0 -2
- package/packages/@monomind/cli/dist/src/commands/agent-lifecycle.d.ts +0 -17
- package/packages/@monomind/cli/dist/src/commands/agent-lifecycle.js +0 -346
- package/packages/@monomind/cli/dist/src/commands/agent-ops.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/agent-ops.js +0 -277
- package/packages/@monomind/cli/dist/src/commands/agent.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/agent.js +0 -40
- package/packages/@monomind/cli/dist/src/commands/analyze-ast.d.ts +0 -26
- package/packages/@monomind/cli/dist/src/commands/analyze-ast.js +0 -284
- package/packages/@monomind/cli/dist/src/commands/analyze-diff.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/analyze-diff.js +0 -395
- package/packages/@monomind/cli/dist/src/commands/analyze-imports.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/analyze-imports.js +0 -287
- package/packages/@monomind/cli/dist/src/commands/analyze-symbols.d.ts +0 -14
- package/packages/@monomind/cli/dist/src/commands/analyze-symbols.js +0 -302
- package/packages/@monomind/cli/dist/src/commands/analyze.d.ts +0 -53
- package/packages/@monomind/cli/dist/src/commands/analyze.js +0 -217
- package/packages/@monomind/cli/dist/src/commands/autopilot.d.ts +0 -15
- package/packages/@monomind/cli/dist/src/commands/autopilot.js +0 -370
- package/packages/@monomind/cli/dist/src/commands/browse-action.d.ts +0 -4
- package/packages/@monomind/cli/dist/src/commands/browse-action.js +0 -244
- package/packages/@monomind/cli/dist/src/commands/browse-platform.d.ts +0 -4
- package/packages/@monomind/cli/dist/src/commands/browse-platform.js +0 -117
- package/packages/@monomind/cli/dist/src/commands/browse-workflow.d.ts +0 -4
- package/packages/@monomind/cli/dist/src/commands/browse-workflow.js +0 -183
- package/packages/@monomind/cli/dist/src/commands/browse.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/commands/browse.js +0 -17
- package/packages/@monomind/cli/dist/src/commands/cleanup.d.ts +0 -45
- package/packages/@monomind/cli/dist/src/commands/cleanup.js +0 -581
- package/packages/@monomind/cli/dist/src/commands/completions.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/completions.js +0 -261
- package/packages/@monomind/cli/dist/src/commands/config.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/config.js +0 -462
- package/packages/@monomind/cli/dist/src/commands/crash-reporting.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/crash-reporting.js +0 -50
- package/packages/@monomind/cli/dist/src/commands/design-detect.d.ts +0 -27
- package/packages/@monomind/cli/dist/src/commands/design-detect.js +0 -220
- package/packages/@monomind/cli/dist/src/commands/design-palette.d.ts +0 -21
- package/packages/@monomind/cli/dist/src/commands/design-palette.js +0 -538
- package/packages/@monomind/cli/dist/src/commands/doc.d.ts +0 -7
- package/packages/@monomind/cli/dist/src/commands/doc.js +0 -268
- package/packages/@monomind/cli/dist/src/commands/doctor-env-checks.d.ts +0 -26
- package/packages/@monomind/cli/dist/src/commands/doctor-env-checks.js +0 -194
- package/packages/@monomind/cli/dist/src/commands/doctor-monoes-checks.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/commands/doctor-monoes-checks.js +0 -160
- package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.d.ts +0 -46
- package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.js +0 -764
- package/packages/@monomind/cli/dist/src/commands/doctor.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/doctor.js +0 -232
- package/packages/@monomind/cli/dist/src/commands/guidance.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/commands/guidance.js +0 -163
- package/packages/@monomind/cli/dist/src/commands/hooks-core-commands.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/hooks-core-commands.js +0 -377
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-commands.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-commands.js +0 -417
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-gaps.d.ts +0 -6
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-gaps.js +0 -219
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-routing.d.ts +0 -7
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-routing.js +0 -399
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-utils.d.ts +0 -42
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-utils.js +0 -220
- package/packages/@monomind/cli/dist/src/commands/hooks-extended-commands.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/hooks-extended-commands.js +0 -243
- package/packages/@monomind/cli/dist/src/commands/hooks-formatting.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/commands/hooks-formatting.js +0 -25
- package/packages/@monomind/cli/dist/src/commands/hooks-routing-commands.d.ts +0 -15
- package/packages/@monomind/cli/dist/src/commands/hooks-routing-commands.js +0 -725
- package/packages/@monomind/cli/dist/src/commands/hooks-workers.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/commands/hooks-workers.js +0 -547
- package/packages/@monomind/cli/dist/src/commands/hooks.d.ts +0 -16
- package/packages/@monomind/cli/dist/src/commands/hooks.js +0 -497
- package/packages/@monomind/cli/dist/src/commands/index.d.ts +0 -65
- package/packages/@monomind/cli/dist/src/commands/index.js +0 -236
- package/packages/@monomind/cli/dist/src/commands/init-subcommands.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/init-subcommands.js +0 -156
- package/packages/@monomind/cli/dist/src/commands/init-upgrade.d.ts +0 -6
- package/packages/@monomind/cli/dist/src/commands/init-upgrade.js +0 -203
- package/packages/@monomind/cli/dist/src/commands/init-wizard.d.ts +0 -6
- package/packages/@monomind/cli/dist/src/commands/init-wizard.js +0 -244
- package/packages/@monomind/cli/dist/src/commands/init.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/init.js +0 -411
- package/packages/@monomind/cli/dist/src/commands/mcp.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/mcp.js +0 -747
- package/packages/@monomind/cli/dist/src/commands/memory-admin.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/commands/memory-admin.js +0 -345
- package/packages/@monomind/cli/dist/src/commands/memory-crud.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/commands/memory-crud.js +0 -389
- package/packages/@monomind/cli/dist/src/commands/memory-list.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/memory-list.js +0 -321
- package/packages/@monomind/cli/dist/src/commands/memory-transfer.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/memory-transfer.js +0 -199
- package/packages/@monomind/cli/dist/src/commands/memory.d.ts +0 -14
- package/packages/@monomind/cli/dist/src/commands/memory.js +0 -282
- package/packages/@monomind/cli/dist/src/commands/monograph.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/monograph.js +0 -548
- package/packages/@monomind/cli/dist/src/commands/neural-core.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/neural-core.js +0 -413
- package/packages/@monomind/cli/dist/src/commands/neural-optimize.d.ts +0 -7
- package/packages/@monomind/cli/dist/src/commands/neural-optimize.js +0 -330
- package/packages/@monomind/cli/dist/src/commands/neural-registry.d.ts +0 -7
- package/packages/@monomind/cli/dist/src/commands/neural-registry.js +0 -290
- package/packages/@monomind/cli/dist/src/commands/org-observe.d.ts +0 -18
- package/packages/@monomind/cli/dist/src/commands/org-observe.js +0 -353
- package/packages/@monomind/cli/dist/src/commands/org.d.ts +0 -25
- package/packages/@monomind/cli/dist/src/commands/org.js +0 -860
- package/packages/@monomind/cli/dist/src/commands/performance.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/performance.js +0 -656
- package/packages/@monomind/cli/dist/src/commands/platforms.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/commands/platforms.js +0 -600
- package/packages/@monomind/cli/dist/src/commands/providers.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/providers.js +0 -351
- package/packages/@monomind/cli/dist/src/commands/report-crash.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/report-crash.js +0 -66
- package/packages/@monomind/cli/dist/src/commands/route.d.ts +0 -16
- package/packages/@monomind/cli/dist/src/commands/route.js +0 -944
- package/packages/@monomind/cli/dist/src/commands/search-universal.d.ts +0 -19
- package/packages/@monomind/cli/dist/src/commands/search-universal.js +0 -151
- package/packages/@monomind/cli/dist/src/commands/security-cve.d.ts +0 -6
- package/packages/@monomind/cli/dist/src/commands/security-cve.js +0 -308
- package/packages/@monomind/cli/dist/src/commands/security-misc.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/security-misc.js +0 -336
- package/packages/@monomind/cli/dist/src/commands/security-scan.d.ts +0 -47
- package/packages/@monomind/cli/dist/src/commands/security-scan.js +0 -447
- package/packages/@monomind/cli/dist/src/commands/security.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/security.js +0 -41
- package/packages/@monomind/cli/dist/src/commands/session.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/session.js +0 -660
- package/packages/@monomind/cli/dist/src/commands/start.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/start.js +0 -490
- package/packages/@monomind/cli/dist/src/commands/status.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/status.js +0 -642
- package/packages/@monomind/cli/dist/src/commands/swarm.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/swarm.js +0 -906
- package/packages/@monomind/cli/dist/src/commands/task.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/task.js +0 -639
- package/packages/@monomind/cli/dist/src/commands/tokens.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/tokens.js +0 -206
- package/packages/@monomind/cli/dist/src/commands/update.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/update.js +0 -288
- package/packages/@monomind/cli/dist/src/consensus/audit-writer.d.ts +0 -77
- package/packages/@monomind/cli/dist/src/consensus/audit-writer.js +0 -196
- package/packages/@monomind/cli/dist/src/consensus/tally.d.ts +0 -19
- package/packages/@monomind/cli/dist/src/consensus/tally.js +0 -34
- package/packages/@monomind/cli/dist/src/index.d.ts +0 -81
- package/packages/@monomind/cli/dist/src/index.js +0 -574
- package/packages/@monomind/cli/dist/src/init/claudemd-generator.d.ts +0 -25
- package/packages/@monomind/cli/dist/src/init/claudemd-generator.js +0 -624
- package/packages/@monomind/cli/dist/src/init/executor.d.ts +0 -47
- package/packages/@monomind/cli/dist/src/init/executor.js +0 -2387
- package/packages/@monomind/cli/dist/src/init/helpers-generator.d.ts +0 -73
- package/packages/@monomind/cli/dist/src/init/helpers-generator.js +0 -1335
- package/packages/@monomind/cli/dist/src/init/index.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/init/index.js +0 -15
- package/packages/@monomind/cli/dist/src/init/mcp-generator.d.ts +0 -26
- package/packages/@monomind/cli/dist/src/init/mcp-generator.js +0 -107
- package/packages/@monomind/cli/dist/src/init/settings-generator.d.ts +0 -14
- package/packages/@monomind/cli/dist/src/init/settings-generator.js +0 -487
- package/packages/@monomind/cli/dist/src/init/shared-instructions-generator.d.ts +0 -38
- package/packages/@monomind/cli/dist/src/init/shared-instructions-generator.js +0 -602
- package/packages/@monomind/cli/dist/src/init/statusline-generator.d.ts +0 -25
- package/packages/@monomind/cli/dist/src/init/statusline-generator.js +0 -1358
- package/packages/@monomind/cli/dist/src/init/types.d.ts +0 -308
- package/packages/@monomind/cli/dist/src/init/types.js +0 -247
- package/packages/@monomind/cli/dist/src/knowledge/document-pipeline.d.ts +0 -75
- package/packages/@monomind/cli/dist/src/knowledge/document-pipeline.js +0 -556
- package/packages/@monomind/cli/dist/src/mcp-client.d.ts +0 -64
- package/packages/@monomind/cli/dist/src/mcp-client.js +0 -338
- package/packages/@monomind/cli/dist/src/mcp-server.d.ts +0 -170
- package/packages/@monomind/cli/dist/src/mcp-server.js +0 -964
- package/packages/@monomind/cli/dist/src/mcp-tools/agent-tools.d.ts +0 -30
- package/packages/@monomind/cli/dist/src/mcp-tools/agent-tools.js +0 -603
- package/packages/@monomind/cli/dist/src/mcp-tools/analyze-tools.d.ts +0 -38
- package/packages/@monomind/cli/dist/src/mcp-tools/analyze-tools.js +0 -389
- package/packages/@monomind/cli/dist/src/mcp-tools/auto-install.d.ts +0 -75
- package/packages/@monomind/cli/dist/src/mcp-tools/auto-install.js +0 -125
- package/packages/@monomind/cli/dist/src/mcp-tools/autopilot-tools.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/mcp-tools/autopilot-tools.js +0 -237
- package/packages/@monomind/cli/dist/src/mcp-tools/browser-tools.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/mcp-tools/browser-tools.js +0 -1111
- package/packages/@monomind/cli/dist/src/mcp-tools/claims-tools.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/mcp-tools/claims-tools.js +0 -827
- package/packages/@monomind/cli/dist/src/mcp-tools/config-tools.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/mcp-tools/config-tools.js +0 -447
- package/packages/@monomind/cli/dist/src/mcp-tools/embeddings-tools.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/mcp-tools/embeddings-tools.js +0 -866
- package/packages/@monomind/cli/dist/src/mcp-tools/github-tools.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/mcp-tools/github-tools.js +0 -582
- package/packages/@monomind/cli/dist/src/mcp-tools/graphify-tools.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/mcp-tools/graphify-tools.js +0 -58
- package/packages/@monomind/cli/dist/src/mcp-tools/guidance-tools.d.ts +0 -15
- package/packages/@monomind/cli/dist/src/mcp-tools/guidance-tools.js +0 -634
- package/packages/@monomind/cli/dist/src/mcp-tools/hive-mind-tools.d.ts +0 -17
- package/packages/@monomind/cli/dist/src/mcp-tools/hive-mind-tools.js +0 -1237
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-embedding.d.ts +0 -161
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-embedding.js +0 -516
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-intelligence.d.ts +0 -22
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-intelligence.js +0 -888
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-routing.d.ts +0 -26
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-routing.js +0 -1582
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-tools.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-tools.js +0 -51
- package/packages/@monomind/cli/dist/src/mcp-tools/index.d.ts +0 -31
- package/packages/@monomind/cli/dist/src/mcp-tools/index.js +0 -31
- package/packages/@monomind/cli/dist/src/mcp-tools/knowledge-tools.d.ts +0 -6
- package/packages/@monomind/cli/dist/src/mcp-tools/knowledge-tools.js +0 -156
- package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.d.ts +0 -35
- package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.js +0 -776
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-compat.d.ts +0 -26
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-compat.js +0 -136
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.d.ts +0 -27
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.js +0 -2443
- package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.d.ts +0 -15
- package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.js +0 -506
- package/packages/@monomind/cli/dist/src/mcp-tools/performance-tools.d.ts +0 -16
- package/packages/@monomind/cli/dist/src/mcp-tools/performance-tools.js +0 -680
- package/packages/@monomind/cli/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.d.ts +0 -261
- package/packages/@monomind/cli/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.js +0 -423
- package/packages/@monomind/cli/dist/src/mcp-tools/quality/security-compliance/detect-secrets.d.ts +0 -137
- package/packages/@monomind/cli/dist/src/mcp-tools/quality/security-compliance/detect-secrets.js +0 -383
- package/packages/@monomind/cli/dist/src/mcp-tools/quality-tools.d.ts +0 -14
- package/packages/@monomind/cli/dist/src/mcp-tools/quality-tools.js +0 -58
- package/packages/@monomind/cli/dist/src/mcp-tools/request-tracker.d.ts +0 -17
- package/packages/@monomind/cli/dist/src/mcp-tools/request-tracker.js +0 -44
- package/packages/@monomind/cli/dist/src/mcp-tools/security-tools.d.ts +0 -18
- package/packages/@monomind/cli/dist/src/mcp-tools/security-tools.js +0 -576
- package/packages/@monomind/cli/dist/src/mcp-tools/session-tools.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/mcp-tools/session-tools.js +0 -431
- package/packages/@monomind/cli/dist/src/mcp-tools/swarm-tools.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/mcp-tools/swarm-tools.js +0 -411
- package/packages/@monomind/cli/dist/src/mcp-tools/system-tools.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/mcp-tools/system-tools.js +0 -561
- package/packages/@monomind/cli/dist/src/mcp-tools/task-tools.d.ts +0 -28
- package/packages/@monomind/cli/dist/src/mcp-tools/task-tools.js +0 -514
- package/packages/@monomind/cli/dist/src/mcp-tools/terminal-tools.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/mcp-tools/terminal-tools.js +0 -397
- package/packages/@monomind/cli/dist/src/mcp-tools/transfer-tools.d.ts +0 -27
- package/packages/@monomind/cli/dist/src/mcp-tools/transfer-tools.js +0 -76
- package/packages/@monomind/cli/dist/src/mcp-tools/types.d.ts +0 -58
- package/packages/@monomind/cli/dist/src/mcp-tools/types.js +0 -98
- package/packages/@monomind/cli/dist/src/memory/embedding-operations.d.ts +0 -58
- package/packages/@monomind/cli/dist/src/memory/embedding-operations.js +0 -262
- package/packages/@monomind/cli/dist/src/memory/ewc-consolidation.d.ts +0 -319
- package/packages/@monomind/cli/dist/src/memory/ewc-consolidation.js +0 -698
- package/packages/@monomind/cli/dist/src/memory/hnsw-operations.d.ts +0 -142
- package/packages/@monomind/cli/dist/src/memory/hnsw-operations.js +0 -465
- package/packages/@monomind/cli/dist/src/memory/intelligence.d.ts +0 -368
- package/packages/@monomind/cli/dist/src/memory/intelligence.js +0 -1456
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.d.ts +0 -333
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +0 -1104
- package/packages/@monomind/cli/dist/src/memory/memory-crud.d.ts +0 -67
- package/packages/@monomind/cli/dist/src/memory/memory-crud.js +0 -454
- package/packages/@monomind/cli/dist/src/memory/memory-initializer.d.ts +0 -101
- package/packages/@monomind/cli/dist/src/memory/memory-initializer.js +0 -431
- package/packages/@monomind/cli/dist/src/memory/memory-kg.d.ts +0 -186
- package/packages/@monomind/cli/dist/src/memory/memory-kg.js +0 -450
- package/packages/@monomind/cli/dist/src/memory/memory-migrations.d.ts +0 -30
- package/packages/@monomind/cli/dist/src/memory/memory-migrations.js +0 -136
- package/packages/@monomind/cli/dist/src/memory/memory-read.d.ts +0 -87
- package/packages/@monomind/cli/dist/src/memory/memory-read.js +0 -333
- package/packages/@monomind/cli/dist/src/memory/memory-schema.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/memory/memory-schema.js +0 -167
- package/packages/@monomind/cli/dist/src/memory/query-router.d.ts +0 -44
- package/packages/@monomind/cli/dist/src/memory/query-router.js +0 -113
- package/packages/@monomind/cli/dist/src/memory/sona-optimizer.d.ts +0 -237
- package/packages/@monomind/cli/dist/src/memory/sona-optimizer.js +0 -647
- package/packages/@monomind/cli/dist/src/monovector/command-outcomes.d.ts +0 -37
- package/packages/@monomind/cli/dist/src/monovector/command-outcomes.js +0 -126
- package/packages/@monomind/cli/dist/src/monovector/coverage-router.d.ts +0 -103
- package/packages/@monomind/cli/dist/src/monovector/coverage-router.js +0 -341
- package/packages/@monomind/cli/dist/src/monovector/coverage-tools.d.ts +0 -14
- package/packages/@monomind/cli/dist/src/monovector/coverage-tools.js +0 -115
- package/packages/@monomind/cli/dist/src/monovector/diff-classifier.d.ts +0 -174
- package/packages/@monomind/cli/dist/src/monovector/diff-classifier.js +0 -738
- package/packages/@monomind/cli/dist/src/monovector/index.d.ts +0 -54
- package/packages/@monomind/cli/dist/src/monovector/index.js +0 -55
- package/packages/@monomind/cli/dist/src/monovector/init-state.d.ts +0 -35
- package/packages/@monomind/cli/dist/src/monovector/init-state.js +0 -36
- package/packages/@monomind/cli/dist/src/monovector/route-outcomes.d.ts +0 -56
- package/packages/@monomind/cli/dist/src/monovector/route-outcomes.js +0 -189
- package/packages/@monomind/cli/dist/src/observability/replay-reader.d.ts +0 -40
- package/packages/@monomind/cli/dist/src/observability/replay-reader.js +0 -138
- package/packages/@monomind/cli/dist/src/orgrt/broker.d.ts +0 -26
- package/packages/@monomind/cli/dist/src/orgrt/broker.js +0 -73
- package/packages/@monomind/cli/dist/src/orgrt/bus.d.ts +0 -27
- package/packages/@monomind/cli/dist/src/orgrt/bus.js +0 -71
- package/packages/@monomind/cli/dist/src/orgrt/daemon.d.ts +0 -175
- package/packages/@monomind/cli/dist/src/orgrt/daemon.js +0 -965
- package/packages/@monomind/cli/dist/src/orgrt/forwarder.d.ts +0 -16
- package/packages/@monomind/cli/dist/src/orgrt/forwarder.js +0 -171
- package/packages/@monomind/cli/dist/src/orgrt/inbox.d.ts +0 -11
- package/packages/@monomind/cli/dist/src/orgrt/inbox.js +0 -91
- package/packages/@monomind/cli/dist/src/orgrt/mailbox.d.ts +0 -49
- package/packages/@monomind/cli/dist/src/orgrt/mailbox.js +0 -75
- package/packages/@monomind/cli/dist/src/orgrt/migrate.d.ts +0 -26
- package/packages/@monomind/cli/dist/src/orgrt/migrate.js +0 -118
- package/packages/@monomind/cli/dist/src/orgrt/policy.d.ts +0 -28
- package/packages/@monomind/cli/dist/src/orgrt/policy.js +0 -146
- package/packages/@monomind/cli/dist/src/orgrt/provider.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/orgrt/provider.js +0 -55
- package/packages/@monomind/cli/dist/src/orgrt/reporting.d.ts +0 -40
- package/packages/@monomind/cli/dist/src/orgrt/reporting.js +0 -134
- package/packages/@monomind/cli/dist/src/orgrt/scheduler.d.ts +0 -13
- package/packages/@monomind/cli/dist/src/orgrt/scheduler.js +0 -48
- package/packages/@monomind/cli/dist/src/orgrt/server.d.ts +0 -9
- package/packages/@monomind/cli/dist/src/orgrt/server.js +0 -88
- package/packages/@monomind/cli/dist/src/orgrt/session.d.ts +0 -62
- package/packages/@monomind/cli/dist/src/orgrt/session.js +0 -157
- package/packages/@monomind/cli/dist/src/orgrt/templates.d.ts +0 -17
- package/packages/@monomind/cli/dist/src/orgrt/templates.js +0 -62
- package/packages/@monomind/cli/dist/src/orgrt/test-loop.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/orgrt/test-loop.js +0 -108
- package/packages/@monomind/cli/dist/src/orgrt/types.d.ts +0 -910
- package/packages/@monomind/cli/dist/src/orgrt/types.js +0 -57
- package/packages/@monomind/cli/dist/src/output.d.ts +0 -133
- package/packages/@monomind/cli/dist/src/output.js +0 -529
- package/packages/@monomind/cli/dist/src/parser.d.ts +0 -93
- package/packages/@monomind/cli/dist/src/parser.js +0 -651
- package/packages/@monomind/cli/dist/src/pricing/model-pricing.d.ts +0 -41
- package/packages/@monomind/cli/dist/src/pricing/model-pricing.js +0 -61
- package/packages/@monomind/cli/dist/src/production/circuit-breaker.d.ts +0 -121
- package/packages/@monomind/cli/dist/src/production/circuit-breaker.js +0 -262
- package/packages/@monomind/cli/dist/src/production/error-handler.d.ts +0 -119
- package/packages/@monomind/cli/dist/src/production/error-handler.js +0 -324
- package/packages/@monomind/cli/dist/src/production/index.d.ts +0 -6
- package/packages/@monomind/cli/dist/src/production/index.js +0 -6
- package/packages/@monomind/cli/dist/src/production/monitoring.d.ts +0 -181
- package/packages/@monomind/cli/dist/src/production/monitoring.js +0 -375
- package/packages/@monomind/cli/dist/src/production/rate-limiter.d.ts +0 -125
- package/packages/@monomind/cli/dist/src/production/rate-limiter.js +0 -218
- package/packages/@monomind/cli/dist/src/production/retry.d.ts +0 -48
- package/packages/@monomind/cli/dist/src/production/retry.js +0 -189
- package/packages/@monomind/cli/dist/src/prompt.d.ts +0 -44
- package/packages/@monomind/cli/dist/src/prompt.js +0 -501
- package/packages/@monomind/cli/dist/src/routing/embed-worker.d.ts +0 -2
- package/packages/@monomind/cli/dist/src/routing/embed-worker.js +0 -79
- package/packages/@monomind/cli/dist/src/routing/embedder.d.ts +0 -31
- package/packages/@monomind/cli/dist/src/routing/embedder.js +0 -0
- package/packages/@monomind/cli/dist/src/routing/llm-caller.d.ts +0 -24
- package/packages/@monomind/cli/dist/src/routing/llm-caller.js +0 -134
- package/packages/@monomind/cli/dist/src/routing/route-layer-factory.d.ts +0 -24
- package/packages/@monomind/cli/dist/src/routing/route-layer-factory.js +0 -239
- package/packages/@monomind/cli/dist/src/services/config-file-manager.d.ts +0 -80
- package/packages/@monomind/cli/dist/src/services/config-file-manager.js +0 -401
- package/packages/@monomind/cli/dist/src/services/crash-reporter.d.ts +0 -42
- package/packages/@monomind/cli/dist/src/services/crash-reporter.js +0 -374
- package/packages/@monomind/cli/dist/src/suggest.d.ts +0 -53
- package/packages/@monomind/cli/dist/src/suggest.js +0 -197
- package/packages/@monomind/cli/dist/src/sync/checker.d.ts +0 -12
- package/packages/@monomind/cli/dist/src/sync/checker.js +0 -26
- package/packages/@monomind/cli/dist/src/transfer/anonymization/index.d.ts +0 -22
- package/packages/@monomind/cli/dist/src/transfer/anonymization/index.js +0 -192
- package/packages/@monomind/cli/dist/src/transfer/types.d.ts +0 -245
- package/packages/@monomind/cli/dist/src/transfer/types.js +0 -6
- package/packages/@monomind/cli/dist/src/types.d.ts +0 -190
- package/packages/@monomind/cli/dist/src/types.js +0 -20
- package/packages/@monomind/cli/dist/src/ui/collector.mjs +0 -879
- package/packages/@monomind/cli/dist/src/ui/dashboard.html +0 -13949
- package/packages/@monomind/cli/dist/src/ui/data/agent-avatars.html +0 -763
- package/packages/@monomind/cli/dist/src/ui/data/agent-avatars.json +0 -966
- package/packages/@monomind/cli/dist/src/ui/data/avatars/account-strategist.svg +0 -58
- package/packages/@monomind/cli/dist/src/ui/data/avatars/accounts-payable.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/adaptive-coordinator.svg +0 -55
- package/packages/@monomind/cli/dist/src/ui/data/avatars/adaptive-coordinator2.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/ai-citation.svg +0 -57
- package/packages/@monomind/cli/dist/src/ui/data/avatars/ai-engineer.svg +0 -61
- package/packages/@monomind/cli/dist/src/ui/data/avatars/analytics-reporter.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/api-tester.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/architecture.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/automation-governance.svg +0 -55
- package/packages/@monomind/cli/dist/src/ui/data/avatars/backend-dev.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/benchmarker.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/blockchain-auditor.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/byzantine-coord.svg +0 -57
- package/packages/@monomind/cli/dist/src/ui/data/avatars/case-analyst.svg +0 -57
- package/packages/@monomind/cli/dist/src/ui/data/avatars/cicd-engineer.svg +0 -55
- package/packages/@monomind/cli/dist/src/ui/data/avatars/cloud-architect.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/code-review-swarm.svg +0 -57
- package/packages/@monomind/cli/dist/src/ui/data/avatars/coder-v119.svg +0 -57
- package/packages/@monomind/cli/dist/src/ui/data/avatars/coder.svg +0 -58
- package/packages/@monomind/cli/dist/src/ui/data/avatars/collective-coord.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/compliance-auditor.svg +0 -58
- package/packages/@monomind/cli/dist/src/ui/data/avatars/consensus-coordinator.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/content-creator.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/crdt-synchronizer.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/cro-specialist.svg +0 -58
- package/packages/@monomind/cli/dist/src/ui/data/avatars/data-consolidator.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/data-engineer.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/database-optimizer.svg +0 -61
- package/packages/@monomind/cli/dist/src/ui/data/avatars/deal-strategist.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/defender.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/devops-automator.svg +0 -56
- package/packages/@monomind/cli/dist/src/ui/data/avatars/discovery-coach.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/email-marketing.svg +0 -57
- package/packages/@monomind/cli/dist/src/ui/data/avatars/embedded-firmware.svg +0 -61
- package/packages/@monomind/cli/dist/src/ui/data/avatars/evidence-collector.svg +0 -57
- package/packages/@monomind/cli/dist/src/ui/data/avatars/experiment-tracker.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/feedback-synthesizer.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/finance-tracker.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/frontend-developer.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/game-audio-engineer.svg +0 -59
- package/packages/@monomind/cli/dist/src/ui/data/avatars/game-designer.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/gossip-coordinator.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/hierarchical-coord.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/incident-commander.svg +0 -57
- package/packages/@monomind/cli/dist/src/ui/data/avatars/infrastructure.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/input-validator.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/ios-developer.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/issue-tracker.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/judge.svg +0 -55
- package/packages/@monomind/cli/dist/src/ui/data/avatars/launch-strategist.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/legal-compliance.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/level-designer.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/load-balancer.svg +0 -57
- package/packages/@monomind/cli/dist/src/ui/data/avatars/mcp-builder.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/memory-coordinator.svg +0 -55
- package/packages/@monomind/cli/dist/src/ui/data/avatars/mesh-coordinator.svg +0 -55
- package/packages/@monomind/cli/dist/src/ui/data/avatars/ml-developer.svg +0 -58
- package/packages/@monomind/cli/dist/src/ui/data/avatars/mobile-app-builder.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/mobile-dev.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/model-qa.svg +0 -58
- package/packages/@monomind/cli/dist/src/ui/data/avatars/narrative-designer.svg +0 -58
- package/packages/@monomind/cli/dist/src/ui/data/avatars/outbound-strategist.svg +0 -55
- package/packages/@monomind/cli/dist/src/ui/data/avatars/path-validator.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/payment-agent.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/perf-analyzer.svg +0 -58
- package/packages/@monomind/cli/dist/src/ui/data/avatars/pipeline-analyst.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/planner.svg +0 -55
- package/packages/@monomind/cli/dist/src/ui/data/avatars/pr-manager.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/pricing-strategist.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/product-manager.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/production-validator.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/project-shepherd.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/proposal-strategist.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/prosecutor.svg +0 -57
- package/packages/@monomind/cli/dist/src/ui/data/avatars/pseudocode.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/queen-coordinator.svg +0 -55
- package/packages/@monomind/cli/dist/src/ui/data/avatars/quorum-manager.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/raft-manager.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/reality-checker.svg +0 -58
- package/packages/@monomind/cli/dist/src/ui/data/avatars/recruitment.svg +0 -58
- package/packages/@monomind/cli/dist/src/ui/data/avatars/refinement.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/release-manager.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/repo-architect.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/researcher.svg +0 -58
- package/packages/@monomind/cli/dist/src/ui/data/avatars/resource-allocator.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/reviewer.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/safe-executor.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/sales-coach.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/sales-engineer.svg +0 -58
- package/packages/@monomind/cli/dist/src/ui/data/avatars/scout-explorer.svg +0 -58
- package/packages/@monomind/cli/dist/src/ui/data/avatars/security-architect.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/security-auditor.svg +0 -55
- package/packages/@monomind/cli/dist/src/ui/data/avatars/senior-developer.svg +0 -58
- package/packages/@monomind/cli/dist/src/ui/data/avatars/senior-pm.svg +0 -58
- package/packages/@monomind/cli/dist/src/ui/data/avatars/seo-specialist.svg +0 -57
- package/packages/@monomind/cli/dist/src/ui/data/avatars/social-media.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/solidity-engineer.svg +0 -58
- package/packages/@monomind/cli/dist/src/ui/data/avatars/sparc-coder.svg +0 -58
- package/packages/@monomind/cli/dist/src/ui/data/avatars/sparc-coord.svg +0 -56
- package/packages/@monomind/cli/dist/src/ui/data/avatars/specification.svg +0 -57
- package/packages/@monomind/cli/dist/src/ui/data/avatars/sprint-prioritizer.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/sre.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/studio-operations.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/studio-producer.svg +0 -55
- package/packages/@monomind/cli/dist/src/ui/data/avatars/support-responder.svg +0 -56
- package/packages/@monomind/cli/dist/src/ui/data/avatars/system-architect.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/task-orchestrator.svg +0 -56
- package/packages/@monomind/cli/dist/src/ui/data/avatars/technical-artist.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/technical-writer.svg +0 -59
- package/packages/@monomind/cli/dist/src/ui/data/avatars/tester.svg +0 -53
- package/packages/@monomind/cli/dist/src/ui/data/avatars/threat-detection.svg +0 -61
- package/packages/@monomind/cli/dist/src/ui/data/avatars/trend-researcher.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/trial-director.svg +0 -55
- package/packages/@monomind/cli/dist/src/ui/data/avatars/unity-architect.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/visionos-engineer.svg +0 -57
- package/packages/@monomind/cli/dist/src/ui/data/avatars/worker-specialist.svg +0 -55
- package/packages/@monomind/cli/dist/src/ui/data/avatars/workflow-architect.svg +0 -57
- package/packages/@monomind/cli/dist/src/ui/data/avatars/workflow-automation.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/data/avatars/zk-steward.svg +0 -54
- package/packages/@monomind/cli/dist/src/ui/mastermind-diagram-fallback.html +0 -1069
- package/packages/@monomind/cli/dist/src/ui/orgs-files.js +0 -192
- package/packages/@monomind/cli/dist/src/ui/orgs.html +0 -2513
- package/packages/@monomind/cli/dist/src/ui/server.mjs +0 -7256
- package/packages/@monomind/cli/dist/src/ui/sse-manager.mjs +0 -119
- package/packages/@monomind/cli/dist/src/update/checker.d.ts +0 -34
- package/packages/@monomind/cli/dist/src/update/checker.js +0 -278
- package/packages/@monomind/cli/dist/src/update/executor.d.ts +0 -32
- package/packages/@monomind/cli/dist/src/update/executor.js +0 -235
- package/packages/@monomind/cli/dist/src/update/index.d.ts +0 -43
- package/packages/@monomind/cli/dist/src/update/index.js +0 -108
- package/packages/@monomind/cli/dist/src/update/rate-limiter.d.ts +0 -37
- package/packages/@monomind/cli/dist/src/update/rate-limiter.js +0 -190
- package/packages/@monomind/cli/dist/src/update/validator.d.ts +0 -17
- package/packages/@monomind/cli/dist/src/update/validator.js +0 -166
- package/packages/@monomind/cli/dist/src/utils/cosine-similarity.d.ts +0 -22
- package/packages/@monomind/cli/dist/src/utils/cosine-similarity.js +0 -38
- package/packages/@monomind/cli/dist/src/utils/input-guards.d.ts +0 -66
- package/packages/@monomind/cli/dist/src/utils/input-guards.js +0 -263
- package/packages/@monomind/cli/dist/src/utils/json-file.d.ts +0 -33
- package/packages/@monomind/cli/dist/src/utils/json-file.js +0 -57
- package/packages/@monomind/cli/dist/src/utils/parse-jsonl.d.ts +0 -6
- package/packages/@monomind/cli/dist/src/utils/parse-jsonl.js +0 -22
- package/packages/@monomind/cli/dist/src/utils/resource-governor.d.ts +0 -32
- package/packages/@monomind/cli/dist/src/utils/resource-governor.js +0 -115
- package/packages/@monomind/cli/package.json +0 -127
- package/packages/@monomind/cli/scripts/deploy-ipfs-node.sh +0 -153
- package/packages/@monomind/cli/scripts/publish.sh +0 -61
- package/packages/@monomind/cli/scripts/sync-claude-assets.sh +0 -19
- package/packages/@monomind/cli/scripts/understand-analyze.mjs +0 -1078
- package/scripts/build-fs.mjs +0 -75
- package/scripts/build-monovector.sh +0 -10
- package/scripts/generate-agent-avatars.mjs +0 -492
- package/scripts/generate-channel-profile-assets.sh +0 -67
- package/scripts/growth-content-calendar.mjs +0 -260
- package/scripts/growth-profile-kit.mjs +0 -156
- package/scripts/install.sh +0 -392
- package/scripts/publish-monovector.sh +0 -20
- package/scripts/ua-enrich.mjs +0 -229
- package/scripts/ua-import.mjs +0 -288
- package/scripts/verify-appliance.sh +0 -571
|
@@ -1,2513 +0,0 @@
|
|
|
1
|
-
<!DOCTYPE html>
|
|
2
|
-
<html lang="en">
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
-
<title>MASTERMIND ORGS</title>
|
|
7
|
-
<style>
|
|
8
|
-
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
|
|
9
|
-
|
|
10
|
-
:root {
|
|
11
|
-
--bg: oklch(7% 0.010 186);
|
|
12
|
-
--bg-panel: oklch(9% 0.012 186);
|
|
13
|
-
--bg-hover: oklch(62% 0.20 186 / 0.06);
|
|
14
|
-
--bg-active: oklch(62% 0.20 186 / 0.11);
|
|
15
|
-
--teal: oklch(62% 0.20 186);
|
|
16
|
-
--teal-dim: oklch(62% 0.20 186 / 0.18);
|
|
17
|
-
--teal-glow: oklch(62% 0.20 186 / 0.08);
|
|
18
|
-
--indigo: oklch(68% 0.18 252);
|
|
19
|
-
--green: oklch(68% 0.20 150);
|
|
20
|
-
--green-glow:oklch(68% 0.20 150 / 0.25);
|
|
21
|
-
--amber: oklch(78% 0.18 80);
|
|
22
|
-
--red: oklch(62% 0.22 25);
|
|
23
|
-
--text: oklch(80% 0.012 186);
|
|
24
|
-
--muted: oklch(52% 0.010 186);
|
|
25
|
-
--dim: oklch(36% 0.008 186);
|
|
26
|
-
--border: oklch(62% 0.20 186 / 0.12);
|
|
27
|
-
--border-hi: oklch(62% 0.20 186 / 0.35);
|
|
28
|
-
--mono: 'Azeret Mono', 'Space Mono', 'Courier New', monospace;
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
html, body {
|
|
32
|
-
width: 100%; height: 100%; overflow: hidden;
|
|
33
|
-
background: var(--bg);
|
|
34
|
-
font-family: var(--mono);
|
|
35
|
-
color: var(--text);
|
|
36
|
-
font-size: 13px;
|
|
37
|
-
line-height: 1.5;
|
|
38
|
-
user-select: none;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/* ── Layout ─────────────────────────────────────────────────── */
|
|
42
|
-
#app { display: flex; height: 100vh; }
|
|
43
|
-
|
|
44
|
-
#sidebar {
|
|
45
|
-
width: 260px; flex-shrink: 0;
|
|
46
|
-
background: var(--bg-panel);
|
|
47
|
-
border-right: 1px solid var(--border);
|
|
48
|
-
display: flex; flex-direction: column;
|
|
49
|
-
overflow: hidden;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
#main {
|
|
53
|
-
flex: 1; display: flex; flex-direction: column;
|
|
54
|
-
overflow: hidden; min-width: 0;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
/* ── Sidebar ─────────────────────────────────────────────────── */
|
|
58
|
-
#sb-header {
|
|
59
|
-
padding: 14px 14px 12px;
|
|
60
|
-
border-bottom: 1px solid var(--border);
|
|
61
|
-
flex-shrink: 0;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
#sb-wordmark {
|
|
65
|
-
display: flex; align-items: center; gap: 8px; margin-bottom: 10px;
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
#sb-back {
|
|
69
|
-
font-size: 9px; letter-spacing: 1px; color: var(--dim);
|
|
70
|
-
text-decoration: none; padding: 3px 7px;
|
|
71
|
-
border: 1px solid var(--border); border-radius: 3px;
|
|
72
|
-
transition: color 0.12s, border-color 0.12s;
|
|
73
|
-
}
|
|
74
|
-
#sb-back:hover { color: var(--teal); border-color: var(--teal-dim); }
|
|
75
|
-
|
|
76
|
-
#sb-title {
|
|
77
|
-
font-size: 9px; letter-spacing: 4px; color: var(--teal);
|
|
78
|
-
opacity: 0.8;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
#sb-status-row {
|
|
82
|
-
display: flex; align-items: center; gap: 6px;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
.live-dot {
|
|
86
|
-
width: 6px; height: 6px; border-radius: 50%;
|
|
87
|
-
background: var(--dim); flex-shrink: 0;
|
|
88
|
-
transition: background 0.4s, box-shadow 0.4s;
|
|
89
|
-
}
|
|
90
|
-
.live-dot.on {
|
|
91
|
-
background: var(--green);
|
|
92
|
-
box-shadow: 0 0 6px var(--green-glow);
|
|
93
|
-
}
|
|
94
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
95
|
-
.live-dot.on { animation: livepulse 2.2s ease-in-out infinite; }
|
|
96
|
-
}
|
|
97
|
-
@keyframes livepulse { 0%,100%{opacity:1} 50%{opacity:0.45} }
|
|
98
|
-
|
|
99
|
-
#sb-status-text { font-size: 9px; letter-spacing: 2px; color: var(--dim); }
|
|
100
|
-
#sb-running-count { font-size: 8px; color: var(--green); margin-left: auto; letter-spacing: 1px; }
|
|
101
|
-
|
|
102
|
-
#sb-list {
|
|
103
|
-
flex: 1; overflow-y: auto;
|
|
104
|
-
padding: 6px 0;
|
|
105
|
-
scrollbar-width: thin;
|
|
106
|
-
scrollbar-color: var(--teal-dim) transparent;
|
|
107
|
-
}
|
|
108
|
-
#sb-list::-webkit-scrollbar { width: 3px; }
|
|
109
|
-
#sb-list::-webkit-scrollbar-thumb { background: var(--teal-dim); border-radius: 2px; }
|
|
110
|
-
|
|
111
|
-
.org-item {
|
|
112
|
-
padding: 10px 14px;
|
|
113
|
-
cursor: pointer;
|
|
114
|
-
border-left: 2px solid transparent;
|
|
115
|
-
transition: background 0.12s, border-color 0.12s;
|
|
116
|
-
position: relative;
|
|
117
|
-
}
|
|
118
|
-
.org-item:hover { background: var(--bg-hover); }
|
|
119
|
-
.org-item.active {
|
|
120
|
-
background: var(--bg-active);
|
|
121
|
-
border-left-color: var(--teal);
|
|
122
|
-
}
|
|
123
|
-
.org-item.running { border-left-color: var(--green); }
|
|
124
|
-
.org-item.active.running { border-left-color: var(--teal); }
|
|
125
|
-
|
|
126
|
-
.oi-header { display: flex; align-items: center; gap: 7px; margin-bottom: 3px; }
|
|
127
|
-
|
|
128
|
-
.oi-dot {
|
|
129
|
-
width: 5px; height: 5px; border-radius: 50%;
|
|
130
|
-
background: var(--dim); flex-shrink: 0;
|
|
131
|
-
}
|
|
132
|
-
.oi-dot.running {
|
|
133
|
-
background: var(--green);
|
|
134
|
-
box-shadow: 0 0 4px var(--green);
|
|
135
|
-
}
|
|
136
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
137
|
-
.oi-dot.running { animation: livepulse 2s ease-in-out infinite; }
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
.oi-name {
|
|
141
|
-
font-size: 11px; color: var(--text); font-weight: 500;
|
|
142
|
-
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
143
|
-
flex: 1;
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
.oi-badge {
|
|
147
|
-
font-size: 7px; padding: 1px 6px; border-radius: 2px; flex-shrink: 0;
|
|
148
|
-
text-transform: uppercase; letter-spacing: 0.06em;
|
|
149
|
-
}
|
|
150
|
-
.oi-badge.running {
|
|
151
|
-
background: oklch(68% 0.20 150 / 0.12);
|
|
152
|
-
color: var(--green);
|
|
153
|
-
border: 1px solid oklch(68% 0.20 150 / 0.28);
|
|
154
|
-
}
|
|
155
|
-
.oi-badge.quiet {
|
|
156
|
-
background: oklch(75% 0.18 80 / 0.10);
|
|
157
|
-
color: oklch(75% 0.18 80);
|
|
158
|
-
border: 1px solid oklch(75% 0.18 80 / 0.30);
|
|
159
|
-
}
|
|
160
|
-
.oi-badge.stale {
|
|
161
|
-
background: oklch(60% 0.20 25 / 0.10);
|
|
162
|
-
color: oklch(65% 0.20 25);
|
|
163
|
-
border: 1px solid oklch(60% 0.20 25 / 0.30);
|
|
164
|
-
}
|
|
165
|
-
.oi-badge.idle {
|
|
166
|
-
background: transparent; color: var(--dim);
|
|
167
|
-
border: 1px solid var(--border);
|
|
168
|
-
}
|
|
169
|
-
|
|
170
|
-
.oi-goal {
|
|
171
|
-
font-size: 9px; color: var(--muted); line-height: 1.5;
|
|
172
|
-
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
173
|
-
padding-left: 12px;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.oi-meta {
|
|
177
|
-
display: flex; gap: 8px; padding-left: 12px; margin-top: 3px;
|
|
178
|
-
}
|
|
179
|
-
.oi-chip {
|
|
180
|
-
font-size: 8px; color: var(--dim); letter-spacing: 0.5px;
|
|
181
|
-
}
|
|
182
|
-
.oi-chip span { color: var(--muted); }
|
|
183
|
-
|
|
184
|
-
#sb-empty {
|
|
185
|
-
padding: 28px 16px; text-align: center;
|
|
186
|
-
color: var(--dim); font-size: 9px; line-height: 1.8; letter-spacing: 0.5px;
|
|
187
|
-
}
|
|
188
|
-
#sb-empty .empty-icon {
|
|
189
|
-
font-size: 24px; display: block; margin-bottom: 10px; opacity: 0.35;
|
|
190
|
-
}
|
|
191
|
-
#sb-empty .empty-cmd {
|
|
192
|
-
display: inline-block; margin-top: 10px;
|
|
193
|
-
color: var(--teal); border: 1px solid var(--teal-dim);
|
|
194
|
-
padding: 3px 10px; border-radius: 3px; font-size: 8px; letter-spacing: 1px;
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
/* ── Main area ─────────────────────────────────────────────────── */
|
|
198
|
-
#main-header {
|
|
199
|
-
padding: 12px 20px 11px;
|
|
200
|
-
border-bottom: 1px solid var(--border);
|
|
201
|
-
display: flex; align-items: center; gap: 12px;
|
|
202
|
-
flex-shrink: 0;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
#org-label {
|
|
206
|
-
font-size: 9px; letter-spacing: 4px; color: var(--teal);
|
|
207
|
-
opacity: 0.7; text-transform: uppercase;
|
|
208
|
-
}
|
|
209
|
-
|
|
210
|
-
#org-name {
|
|
211
|
-
font-size: 15px; letter-spacing: 2px; color: var(--text);
|
|
212
|
-
font-weight: 600; text-transform: uppercase;
|
|
213
|
-
}
|
|
214
|
-
|
|
215
|
-
#org-status-badge {
|
|
216
|
-
font-size: 8px; padding: 2px 8px; border-radius: 2px;
|
|
217
|
-
text-transform: uppercase; letter-spacing: 0.1em; margin-left: 4px;
|
|
218
|
-
}
|
|
219
|
-
#org-status-badge.running {
|
|
220
|
-
background: oklch(68% 0.20 150 / 0.12);
|
|
221
|
-
color: var(--green); border: 1px solid oklch(68% 0.20 150 / 0.25);
|
|
222
|
-
}
|
|
223
|
-
#org-status-badge.quiet {
|
|
224
|
-
background: oklch(75% 0.18 80 / 0.10);
|
|
225
|
-
color: oklch(75% 0.18 80); border: 1px solid oklch(75% 0.18 80 / 0.30);
|
|
226
|
-
}
|
|
227
|
-
#org-status-badge.stale {
|
|
228
|
-
background: oklch(60% 0.20 25 / 0.10);
|
|
229
|
-
color: oklch(65% 0.20 25); border: 1px solid oklch(60% 0.20 25 / 0.30);
|
|
230
|
-
}
|
|
231
|
-
#org-status-badge.idle {
|
|
232
|
-
background: transparent; color: var(--dim);
|
|
233
|
-
border: 1px solid var(--border);
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
.hdr-chip {
|
|
237
|
-
font-size: 8px; color: var(--dim); letter-spacing: 0.5px;
|
|
238
|
-
padding: 2px 8px; border: 1px solid var(--border); border-radius: 2px;
|
|
239
|
-
}
|
|
240
|
-
.hdr-chip span { color: var(--muted); }
|
|
241
|
-
|
|
242
|
-
#main-tabs {
|
|
243
|
-
display: flex; gap: 0; border-bottom: 1px solid var(--border);
|
|
244
|
-
flex-shrink: 0; padding: 0 20px;
|
|
245
|
-
}
|
|
246
|
-
|
|
247
|
-
.tab-btn {
|
|
248
|
-
font-size: 9px; letter-spacing: 2px; color: var(--dim);
|
|
249
|
-
padding: 8px 14px; background: none; border: none; cursor: pointer;
|
|
250
|
-
font-family: var(--mono); text-transform: uppercase;
|
|
251
|
-
border-bottom: 2px solid transparent; margin-bottom: -1px;
|
|
252
|
-
transition: color 0.12s, border-color 0.12s;
|
|
253
|
-
}
|
|
254
|
-
.tab-btn:hover { color: var(--muted); }
|
|
255
|
-
.tab-btn.active { color: var(--teal); border-bottom-color: var(--teal); }
|
|
256
|
-
|
|
257
|
-
#main-body { flex: 1; overflow-y: auto; overflow-x: hidden; min-height: 0; }
|
|
258
|
-
#main-body::-webkit-scrollbar { width: 4px; }
|
|
259
|
-
#main-body::-webkit-scrollbar-thumb { background: var(--teal-dim); border-radius: 2px; }
|
|
260
|
-
/* Chat tab needs a non-scrolling bounded container so compose stays visible */
|
|
261
|
-
#main-body.chat-active { overflow: hidden; display: flex; flex-direction: column; }
|
|
262
|
-
|
|
263
|
-
.tab-pane { display: none; }
|
|
264
|
-
.tab-pane.active { display: block; }
|
|
265
|
-
#main-body.chat-active #tab-chat { display: flex; flex-direction: column; flex: 1; min-height: 0; }
|
|
266
|
-
|
|
267
|
-
/* ── Empty / no-selection state ─────────────────────────────────── */
|
|
268
|
-
#no-org-state {
|
|
269
|
-
display: flex; flex-direction: column; align-items: center;
|
|
270
|
-
justify-content: center; height: 100%; gap: 10px; opacity: 0.5;
|
|
271
|
-
padding: 40px;
|
|
272
|
-
}
|
|
273
|
-
#no-org-state .ns-icon { font-size: 48px; opacity: 0.25; }
|
|
274
|
-
#no-org-state .ns-text {
|
|
275
|
-
font-size: 9px; letter-spacing: 3px; color: var(--dim);
|
|
276
|
-
text-align: center;
|
|
277
|
-
}
|
|
278
|
-
|
|
279
|
-
/* ── Org Chart ──────────────────────────────────────────────────── */
|
|
280
|
-
#chart-pane {
|
|
281
|
-
padding: 20px;
|
|
282
|
-
display: flex; flex-direction: column; gap: 16px;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
#chart-svg-wrap {
|
|
286
|
-
background: oklch(8% 0.01 186);
|
|
287
|
-
border: 1px solid var(--border);
|
|
288
|
-
border-radius: 4px;
|
|
289
|
-
overflow: hidden; position: relative;
|
|
290
|
-
}
|
|
291
|
-
|
|
292
|
-
#org-chart-svg {
|
|
293
|
-
width: 100%; display: block;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
/* ── Info grid (goal / topology / created) ─────────────────────── */
|
|
297
|
-
#org-meta-grid {
|
|
298
|
-
display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 1px;
|
|
299
|
-
background: var(--border); border: 1px solid var(--border);
|
|
300
|
-
border-radius: 3px; overflow: hidden;
|
|
301
|
-
}
|
|
302
|
-
.meta-cell {
|
|
303
|
-
background: var(--bg-panel);
|
|
304
|
-
padding: 10px 14px;
|
|
305
|
-
}
|
|
306
|
-
.meta-cell-label { font-size: 8px; letter-spacing: 2px; color: var(--dim); margin-bottom: 4px; }
|
|
307
|
-
.meta-cell-value { font-size: 11px; color: var(--text); }
|
|
308
|
-
|
|
309
|
-
/* ── Live status strip ─────────────────────────────────────────── */
|
|
310
|
-
#live-strip {
|
|
311
|
-
display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
|
|
312
|
-
background: oklch(8% 0.01 186); border: 1px solid var(--border);
|
|
313
|
-
border-radius: 4px; padding: 8px 12px; font-size: 10px; color: var(--dim);
|
|
314
|
-
letter-spacing: 0.5px;
|
|
315
|
-
}
|
|
316
|
-
#ls-state { display: flex; align-items: center; gap: 5px; }
|
|
317
|
-
.ls-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--dim); flex-shrink: 0; }
|
|
318
|
-
.ls-dot.running { background: oklch(65% 0.20 150); }
|
|
319
|
-
@media (prefers-reduced-motion: no-preference) { .ls-dot.running { animation: ls-pulse 2s ease-in-out infinite; } }
|
|
320
|
-
@keyframes ls-pulse { 0%,100%{opacity:1} 50%{opacity:0.3} }
|
|
321
|
-
#ls-label { font-size: 9px; letter-spacing: 2px; }
|
|
322
|
-
.ls-metric { font-size: 10px; color: var(--muted); }
|
|
323
|
-
.ls-sparkline-wrap { display: flex; align-items: flex-end; gap: 1px; height: 20px; margin-left: auto; }
|
|
324
|
-
.ls-bar { width: 6px; border-radius: 1px; background: oklch(62% 0.20 186 / 0.4); min-height: 2px; }
|
|
325
|
-
.ls-bar.active { background: oklch(62% 0.20 186 / 0.8); }
|
|
326
|
-
#clf-wrap {
|
|
327
|
-
background: oklch(8% 0.01 186); border: 1px solid var(--border);
|
|
328
|
-
border-radius: 4px; overflow: hidden;
|
|
329
|
-
}
|
|
330
|
-
#clf-header {
|
|
331
|
-
font-size: 8px; letter-spacing: 3px; color: var(--dim); padding: 6px 12px;
|
|
332
|
-
border-bottom: 1px solid var(--border);
|
|
333
|
-
}
|
|
334
|
-
#clf-rows { min-height: 48px; max-height: 160px; overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--teal-dim) transparent; }
|
|
335
|
-
.clf-row {
|
|
336
|
-
display: grid; grid-template-columns: 80px 70px 1fr;
|
|
337
|
-
gap: 8px; padding: 5px 12px;
|
|
338
|
-
font-size: 10px; border-bottom: 1px solid oklch(100% 0 0 / 0.03);
|
|
339
|
-
}
|
|
340
|
-
.clf-row.new { animation: clf-fadein 0.3s ease; }
|
|
341
|
-
@keyframes clf-fadein { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
|
|
342
|
-
.clf-time { color: var(--dim); font-variant-numeric: tabular-nums; }
|
|
343
|
-
.clf-type { color: var(--accent); }
|
|
344
|
-
.clf-msg { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
345
|
-
|
|
346
|
-
/* ── Roles list ─────────────────────────────────────────────────── */
|
|
347
|
-
#roles-pane { padding: 20px; }
|
|
348
|
-
|
|
349
|
-
.roles-grid {
|
|
350
|
-
display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
|
|
351
|
-
gap: 10px;
|
|
352
|
-
}
|
|
353
|
-
|
|
354
|
-
.role-block {
|
|
355
|
-
background: var(--bg-panel);
|
|
356
|
-
border: 1px solid var(--border);
|
|
357
|
-
border-radius: 3px; padding: 12px 14px;
|
|
358
|
-
transition: border-color 0.12s;
|
|
359
|
-
}
|
|
360
|
-
.role-block:hover { border-color: var(--teal-dim); }
|
|
361
|
-
|
|
362
|
-
.rb-header { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; }
|
|
363
|
-
.rb-dot {
|
|
364
|
-
width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; margin-top: 4px;
|
|
365
|
-
}
|
|
366
|
-
.rb-title { font-size: 12px; color: var(--text); font-weight: 500; line-height: 1.3; }
|
|
367
|
-
.rb-agent {
|
|
368
|
-
margin-left: auto; flex-shrink: 0;
|
|
369
|
-
font-size: 8px; padding: 1px 7px; border-radius: 2px;
|
|
370
|
-
border: 1px solid var(--teal-dim); color: var(--teal); opacity: 0.85;
|
|
371
|
-
letter-spacing: 0.5px;
|
|
372
|
-
}
|
|
373
|
-
.rb-id { font-size: 9px; color: var(--dim); margin-bottom: 5px; padding-left: 15px; }
|
|
374
|
-
.rb-reports { font-size: 9px; color: var(--muted); padding-left: 15px; margin-bottom: 6px; }
|
|
375
|
-
.rb-reports span { color: var(--indigo); }
|
|
376
|
-
|
|
377
|
-
.rb-resps { padding-left: 15px; }
|
|
378
|
-
.rb-resp-item {
|
|
379
|
-
font-size: 9px; color: var(--dim); line-height: 1.6;
|
|
380
|
-
display: flex; gap: 6px; align-items: flex-start;
|
|
381
|
-
}
|
|
382
|
-
.rb-resp-item::before {
|
|
383
|
-
content: '—'; color: oklch(36% 0.008 186 / 0.5); flex-shrink: 0; margin-top: 1px;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
/* ── Files tab ──────────────────────────────────────────────────── */
|
|
387
|
-
#files-pane { padding: 20px; }
|
|
388
|
-
.files-grid {
|
|
389
|
-
display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
|
|
390
|
-
gap: 10px;
|
|
391
|
-
}
|
|
392
|
-
.file-card {
|
|
393
|
-
background: var(--bg-panel);
|
|
394
|
-
border: 1px solid var(--border); border-radius: 3px;
|
|
395
|
-
padding: 10px 12px;
|
|
396
|
-
display: flex; align-items: center; gap: 10px;
|
|
397
|
-
transition: border-color 0.12s;
|
|
398
|
-
}
|
|
399
|
-
.file-card:hover { border-color: var(--teal-dim); }
|
|
400
|
-
.fc-icon { font-size: 18px; flex-shrink: 0; }
|
|
401
|
-
.fc-body { flex: 1; min-width: 0; }
|
|
402
|
-
.fc-name {
|
|
403
|
-
font-size: 12px; color: var(--text); font-weight: 500;
|
|
404
|
-
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
405
|
-
}
|
|
406
|
-
.fc-meta {
|
|
407
|
-
font-size: 9px; color: var(--dim); margin-top: 2px;
|
|
408
|
-
white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
|
|
409
|
-
}
|
|
410
|
-
.fc-view {
|
|
411
|
-
flex-shrink: 0; background: #1a3a5a; color: #5d9fd9; border: 1px solid #2980b944;
|
|
412
|
-
border-radius: 4px; padding: 4px 10px; font-size: 10px; font-weight: 700; cursor: pointer;
|
|
413
|
-
}
|
|
414
|
-
.fc-view:hover { background: #204a70; }
|
|
415
|
-
.fc-diff {
|
|
416
|
-
flex-shrink: 0; background: #2a1a3a; color: #b98dd9; border: 1px solid #8e44ad44;
|
|
417
|
-
border-radius: 4px; padding: 4px 10px; font-size: 10px; font-weight: 700; cursor: pointer;
|
|
418
|
-
}
|
|
419
|
-
.fc-diff:hover { background: #3a2050; }
|
|
420
|
-
.fc-vbadge {
|
|
421
|
-
font-size: 8px; font-weight: 700; color: var(--dim); border: 1px solid var(--border);
|
|
422
|
-
border-radius: 2px; padding: 1px 5px; margin-left: 4px; letter-spacing: 0.5px;
|
|
423
|
-
}
|
|
424
|
-
.fc-binary { flex-shrink: 0; font-size: 9px; color: var(--dim); }
|
|
425
|
-
|
|
426
|
-
/* ── Activity / event log ───────────────────────────────────────── */
|
|
427
|
-
#activity-pane { padding: 20px; }
|
|
428
|
-
#activity-log { display: flex; flex-direction: column; gap: 0; }
|
|
429
|
-
|
|
430
|
-
.act-row {
|
|
431
|
-
display: grid;
|
|
432
|
-
grid-template-columns: 60px 90px 1fr;
|
|
433
|
-
gap: 8px; padding: 5px 0;
|
|
434
|
-
border-bottom: 1px solid oklch(62% 0.20 186 / 0.05);
|
|
435
|
-
align-items: baseline; font-size: 10px;
|
|
436
|
-
}
|
|
437
|
-
.act-row:last-child { border-bottom: none; }
|
|
438
|
-
|
|
439
|
-
.act-time { color: var(--dim); font-variant-numeric: tabular-nums; font-size: 9px; }
|
|
440
|
-
.act-type { color: var(--teal); font-weight: 500; letter-spacing: 0.5px; }
|
|
441
|
-
.act-msg { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
442
|
-
|
|
443
|
-
.act-empty { color: var(--dim); font-size: 9px; padding: 16px 0; letter-spacing: 1px; }
|
|
444
|
-
|
|
445
|
-
/* ── Health pane ─────────────────────────────────────────────────── */
|
|
446
|
-
#health-pane { padding: 20px; }
|
|
447
|
-
|
|
448
|
-
.health-grid {
|
|
449
|
-
display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
|
|
450
|
-
gap: 10px; margin-bottom: 16px;
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
.health-cell {
|
|
454
|
-
background: var(--bg-panel);
|
|
455
|
-
border: 1px solid var(--border); border-radius: 3px;
|
|
456
|
-
padding: 12px 14px;
|
|
457
|
-
}
|
|
458
|
-
.hc-label { font-size: 8px; letter-spacing: 2px; color: var(--dim); margin-bottom: 4px; }
|
|
459
|
-
.hc-value { font-size: 18px; color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
|
|
460
|
-
.hc-sub { font-size: 9px; color: var(--muted); margin-top: 2px; }
|
|
461
|
-
.hc-value.green { color: var(--green); }
|
|
462
|
-
.hc-value.amber { color: var(--amber); }
|
|
463
|
-
.hc-value.red { color: var(--red); }
|
|
464
|
-
|
|
465
|
-
/* ── Chat tab ───────────────────────────────────────────────────── */
|
|
466
|
-
#chat-pane {
|
|
467
|
-
display: flex; flex-direction: column; flex: 1; min-height: 0;
|
|
468
|
-
overflow: hidden;
|
|
469
|
-
}
|
|
470
|
-
#chat-session-bar {
|
|
471
|
-
display: flex; align-items: center; gap: 8px;
|
|
472
|
-
padding: 10px 20px 8px;
|
|
473
|
-
border-bottom: 1px solid var(--border);
|
|
474
|
-
flex-shrink: 0; flex-wrap: wrap;
|
|
475
|
-
}
|
|
476
|
-
#chat-sess-label { font-size: 8px; letter-spacing: 2px; color: var(--dim); }
|
|
477
|
-
#chat-sess-select {
|
|
478
|
-
background: var(--bg-panel); color: var(--muted);
|
|
479
|
-
border: 1px solid var(--border); border-radius: 3px;
|
|
480
|
-
font-size: 9px; font-family: var(--mono); letter-spacing: 0.5px;
|
|
481
|
-
padding: 3px 6px; cursor: pointer; max-width: 260px;
|
|
482
|
-
}
|
|
483
|
-
#chat-sess-select:focus { outline: none; border-color: var(--teal-dim); }
|
|
484
|
-
#chat-live-dot {
|
|
485
|
-
width: 5px; height: 5px; border-radius: 50%;
|
|
486
|
-
background: var(--dim); margin-left: auto; flex-shrink: 0;
|
|
487
|
-
transition: background 0.4s;
|
|
488
|
-
}
|
|
489
|
-
#chat-live-dot.on { background: var(--green); animation: livepulse 2.2s ease-in-out infinite; }
|
|
490
|
-
#chat-live-label { font-size: 8px; color: var(--dim); }
|
|
491
|
-
/* Phase 3: render mode toggle */
|
|
492
|
-
#chat-mode-bar {
|
|
493
|
-
display: flex; gap: 3px; margin-left: 8px;
|
|
494
|
-
}
|
|
495
|
-
.chat-mode-btn {
|
|
496
|
-
font-size: 7px; padding: 2px 7px; border-radius: 2px;
|
|
497
|
-
border: 1px solid var(--border); color: var(--dim);
|
|
498
|
-
background: transparent; cursor: pointer; font-family: var(--mono);
|
|
499
|
-
letter-spacing: 0.5px; text-transform: uppercase; transition: all 0.15s;
|
|
500
|
-
}
|
|
501
|
-
.chat-mode-btn:hover { border-color: var(--teal-dim); color: var(--muted); }
|
|
502
|
-
.chat-mode-btn.active { border-color: var(--teal); color: var(--teal); background: oklch(62% 0.20 186 / 0.07); }
|
|
503
|
-
|
|
504
|
-
#chat-feed-wrap {
|
|
505
|
-
flex: 1; overflow-y: auto; padding: 12px 20px;
|
|
506
|
-
display: flex; flex-direction: column; gap: 5px;
|
|
507
|
-
scrollbar-width: thin;
|
|
508
|
-
scrollbar-color: var(--teal-dim) transparent;
|
|
509
|
-
}
|
|
510
|
-
#chat-feed-wrap::-webkit-scrollbar { width: 4px; }
|
|
511
|
-
#chat-feed-wrap::-webkit-scrollbar-thumb { background: var(--teal-dim); border-radius: 2px; }
|
|
512
|
-
|
|
513
|
-
#chat-feed-empty {
|
|
514
|
-
font-size: 10px; color: var(--dim); text-align: center;
|
|
515
|
-
padding: 30px 0; line-height: 2;
|
|
516
|
-
}
|
|
517
|
-
#chat-agent-bar {
|
|
518
|
-
display: flex; align-items: center; gap: 6px;
|
|
519
|
-
padding: 6px 20px 7px;
|
|
520
|
-
border-bottom: 1px solid var(--border);
|
|
521
|
-
flex-shrink: 0; flex-wrap: wrap;
|
|
522
|
-
}
|
|
523
|
-
#chat-agent-label { font-size: 8px; letter-spacing: 2px; color: var(--dim); flex-shrink: 0; }
|
|
524
|
-
.chat-agent-pill {
|
|
525
|
-
font-size: 8px; padding: 2px 8px; border-radius: 10px;
|
|
526
|
-
border: 1px solid var(--border); color: var(--muted);
|
|
527
|
-
background: transparent; cursor: pointer; letter-spacing: 0.3px;
|
|
528
|
-
font-family: var(--mono); transition: border-color 0.15s, color 0.15s;
|
|
529
|
-
}
|
|
530
|
-
.chat-agent-pill:hover { border-color: var(--teal-dim); color: var(--text); }
|
|
531
|
-
.chat-agent-pill.active { border-color: var(--teal); color: var(--teal); background: oklch(62% 0.20 186 / 0.07); }
|
|
532
|
-
|
|
533
|
-
.cmsg { display: flex; flex-direction: column; max-width: 92%; }
|
|
534
|
-
.cmsg.csys { align-self: center; max-width: 100%; }
|
|
535
|
-
.cmsg.cagent { align-self: flex-start; }
|
|
536
|
-
.cmsg.cic { align-self: flex-start; }
|
|
537
|
-
.cmsg.cuser { align-self: flex-end; }
|
|
538
|
-
.cmsg.cuser .cbubble {
|
|
539
|
-
background: oklch(14% 0.022 250);
|
|
540
|
-
border: 1px solid oklch(68% 0.18 250 / 0.28);
|
|
541
|
-
border-radius: 8px 2px 8px 8px;
|
|
542
|
-
padding: 7px 11px; color: oklch(80% 0.010 250);
|
|
543
|
-
font-size: 11px; line-height: 1.6;
|
|
544
|
-
word-break: break-word; white-space: pre-wrap;
|
|
545
|
-
}
|
|
546
|
-
#chat-compose {
|
|
547
|
-
display: flex; gap: 6px; align-items: flex-end;
|
|
548
|
-
padding: 8px 20px 12px;
|
|
549
|
-
border-top: 1px solid var(--border);
|
|
550
|
-
flex-shrink: 0;
|
|
551
|
-
}
|
|
552
|
-
#chat-compose-input {
|
|
553
|
-
flex: 1; background: oklch(10% 0.012 186);
|
|
554
|
-
border: 1px solid var(--border); border-radius: 4px;
|
|
555
|
-
color: var(--text); font-family: var(--mono); font-size: 11px;
|
|
556
|
-
padding: 6px 9px; resize: none; min-height: 32px; max-height: 120px;
|
|
557
|
-
line-height: 1.5; outline: none;
|
|
558
|
-
}
|
|
559
|
-
#chat-compose-input:focus { border-color: var(--teal-dim); }
|
|
560
|
-
#chat-compose-input::placeholder { color: var(--dim); }
|
|
561
|
-
#chat-send-btn {
|
|
562
|
-
background: oklch(14% 0.022 186); border: 1px solid var(--teal-dim);
|
|
563
|
-
color: var(--teal); border-radius: 4px; padding: 5px 12px;
|
|
564
|
-
font-family: var(--mono); font-size: 9px; letter-spacing: 1px;
|
|
565
|
-
cursor: pointer; flex-shrink: 0; align-self: flex-end;
|
|
566
|
-
transition: background 0.15s, border-color 0.15s;
|
|
567
|
-
}
|
|
568
|
-
#chat-send-btn:hover { background: oklch(62% 0.20 186 / 0.12); border-color: var(--teal); }
|
|
569
|
-
#chat-send-btn:disabled { opacity: 0.35; cursor: default; }
|
|
570
|
-
|
|
571
|
-
@keyframes cmsg-in { from{opacity:0;transform:translateY(3px)} to{opacity:1;transform:none} }
|
|
572
|
-
.cmsg.new { animation: cmsg-in 0.18s ease-out; }
|
|
573
|
-
|
|
574
|
-
.cmsg.csys .cbubble {
|
|
575
|
-
background: oklch(10% 0.008 186);
|
|
576
|
-
border: 1px solid var(--border);
|
|
577
|
-
border-radius: 6px; padding: 4px 12px;
|
|
578
|
-
font-size: 9px; color: var(--dim); letter-spacing: 0.3px;
|
|
579
|
-
text-align: center;
|
|
580
|
-
}
|
|
581
|
-
.cmsg.cagent .cbubble {
|
|
582
|
-
background: oklch(11% 0.016 186);
|
|
583
|
-
border: 1px solid var(--teal-dim);
|
|
584
|
-
border-radius: 2px 8px 8px 8px;
|
|
585
|
-
padding: 7px 11px;
|
|
586
|
-
color: oklch(70% 0.010 186);
|
|
587
|
-
font-size: 11px; line-height: 1.6;
|
|
588
|
-
word-break: break-word; white-space: pre-wrap;
|
|
589
|
-
}
|
|
590
|
-
.cmsg.cic .cbubble {
|
|
591
|
-
background: oklch(10% 0.013 295);
|
|
592
|
-
border: 1px solid oklch(68% 0.18 295 / 0.22);
|
|
593
|
-
border-radius: 2px 8px 8px 8px;
|
|
594
|
-
padding: 7px 11px;
|
|
595
|
-
color: oklch(68% 0.010 295);
|
|
596
|
-
font-size: 11px; line-height: 1.6;
|
|
597
|
-
word-break: break-word; white-space: pre-wrap;
|
|
598
|
-
}
|
|
599
|
-
.cmsg-meta {
|
|
600
|
-
display: flex; align-items: center; gap: 5px;
|
|
601
|
-
margin-bottom: 3px; flex-wrap: wrap;
|
|
602
|
-
}
|
|
603
|
-
.cmsg.csys .cmsg-meta { display: none; }
|
|
604
|
-
.ctag {
|
|
605
|
-
font-size: 8px; padding: 1px 6px; border-radius: 10px;
|
|
606
|
-
border: 1px solid var(--teal-dim); color: var(--teal);
|
|
607
|
-
letter-spacing: 0.4px; flex-shrink: 0;
|
|
608
|
-
}
|
|
609
|
-
.ctag.sender { border-color: oklch(68% 0.18 295 / 0.35); color: oklch(68% 0.14 295); }
|
|
610
|
-
.ctag.receiver{ border-color: oklch(78% 0.18 80 / 0.35); color: var(--amber); }
|
|
611
|
-
.cic-arrow { font-size: 9px; color: var(--dim); }
|
|
612
|
-
.cts { font-size: 8px; color: var(--dim); margin-left: auto; }
|
|
613
|
-
.cevtype {
|
|
614
|
-
font-size: 7px; padding: 1px 4px; border-radius: 2px;
|
|
615
|
-
background: oklch(62% 0.20 186 / 0.07);
|
|
616
|
-
border: 1px solid var(--border); color: var(--dim);
|
|
617
|
-
letter-spacing: 0.3px;
|
|
618
|
-
}
|
|
619
|
-
|
|
620
|
-
/* ── Communication edges (SVG in chart) ─────────────────────────── */
|
|
621
|
-
.oc-edge { stroke: var(--teal); stroke-opacity: 0.25; stroke-width: 1; fill: none; }
|
|
622
|
-
.oc-edge.command { stroke: var(--teal); stroke-opacity: 0.4; }
|
|
623
|
-
.oc-edge.report { stroke: var(--indigo); stroke-opacity: 0.35; stroke-dasharray: 4 3; }
|
|
624
|
-
.oc-edge.feedback { stroke: var(--amber); stroke-opacity: 0.25; stroke-dasharray: 2 4; }
|
|
625
|
-
.oc-edge.handoff { stroke: var(--green); stroke-opacity: 0.3; }
|
|
626
|
-
|
|
627
|
-
.oc-node-bg { fill: oklch(8% 0.01 186); stroke-width: 1.5; }
|
|
628
|
-
.oc-node-bg.boss { stroke: var(--teal); }
|
|
629
|
-
.oc-node-bg.peer { stroke: oklch(68% 0.18 252); }
|
|
630
|
-
.oc-node-text {
|
|
631
|
-
fill: var(--text); font-size: 10px;
|
|
632
|
-
font-family: 'Azeret Mono', 'Space Mono', monospace;
|
|
633
|
-
text-anchor: middle; dominant-baseline: middle;
|
|
634
|
-
pointer-events: none;
|
|
635
|
-
}
|
|
636
|
-
.oc-node-sub {
|
|
637
|
-
fill: var(--muted); font-size: 8px;
|
|
638
|
-
font-family: 'Azeret Mono', 'Space Mono', monospace;
|
|
639
|
-
text-anchor: middle; dominant-baseline: middle;
|
|
640
|
-
pointer-events: none;
|
|
641
|
-
}
|
|
642
|
-
.oc-node-pulse { fill: none; stroke-width: 1; opacity: 0; }
|
|
643
|
-
@media (prefers-reduced-motion: no-preference) {
|
|
644
|
-
.oc-node-pulse.running {
|
|
645
|
-
animation: nodepulse 2.5s ease-in-out infinite;
|
|
646
|
-
stroke: var(--green); opacity: 0.35;
|
|
647
|
-
}
|
|
648
|
-
}
|
|
649
|
-
@keyframes nodepulse { 0%,100%{r:26;opacity:0.2} 50%{r:30;opacity:0.55} }
|
|
650
|
-
|
|
651
|
-
/* Arrow markers are inline in the SVG */
|
|
652
|
-
|
|
653
|
-
/* ── Copy / Export / Import buttons on org items ────────────────── */
|
|
654
|
-
.oi-copy-btn, .oi-export-btn, .oi-import-btn {
|
|
655
|
-
display: none;
|
|
656
|
-
flex-shrink: 0;
|
|
657
|
-
background: none;
|
|
658
|
-
border: 1px solid var(--border);
|
|
659
|
-
border-radius: 2px;
|
|
660
|
-
color: var(--dim);
|
|
661
|
-
font-family: var(--mono);
|
|
662
|
-
font-size: 7px;
|
|
663
|
-
letter-spacing: 0.5px;
|
|
664
|
-
padding: 1px 5px;
|
|
665
|
-
cursor: pointer;
|
|
666
|
-
transition: color 0.12s, border-color 0.12s, background 0.12s;
|
|
667
|
-
line-height: 1.4;
|
|
668
|
-
white-space: nowrap;
|
|
669
|
-
}
|
|
670
|
-
.org-item:hover .oi-copy-btn,
|
|
671
|
-
.org-item:hover .oi-export-btn,
|
|
672
|
-
.org-item:hover .oi-import-btn { display: inline-block; }
|
|
673
|
-
.oi-copy-btn:hover {
|
|
674
|
-
color: var(--teal);
|
|
675
|
-
border-color: var(--teal-dim);
|
|
676
|
-
background: var(--teal-glow);
|
|
677
|
-
}
|
|
678
|
-
.oi-export-btn:hover {
|
|
679
|
-
color: var(--green, #4ade80);
|
|
680
|
-
border-color: oklch(60% 0.15 145 / 0.4);
|
|
681
|
-
background: oklch(60% 0.15 145 / 0.08);
|
|
682
|
-
}
|
|
683
|
-
.oi-import-btn:hover {
|
|
684
|
-
color: var(--amber, #facc15);
|
|
685
|
-
border-color: oklch(70% 0.15 85 / 0.4);
|
|
686
|
-
background: oklch(70% 0.15 85 / 0.08);
|
|
687
|
-
}
|
|
688
|
-
|
|
689
|
-
/* ── Copy modal ─────────────────────────────────────────────────── */
|
|
690
|
-
#copy-project-list {
|
|
691
|
-
max-height: 180px;
|
|
692
|
-
overflow-y: auto;
|
|
693
|
-
border: 1px solid var(--border-hi);
|
|
694
|
-
border-radius: 4px;
|
|
695
|
-
margin: 4px 0 10px;
|
|
696
|
-
background: oklch(6% 0.008 186);
|
|
697
|
-
}
|
|
698
|
-
.copy-proj-row {
|
|
699
|
-
padding: 7px 10px;
|
|
700
|
-
font-size: 12px;
|
|
701
|
-
font-family: var(--mono);
|
|
702
|
-
color: var(--text-md);
|
|
703
|
-
cursor: pointer;
|
|
704
|
-
border-bottom: 1px solid var(--border);
|
|
705
|
-
white-space: nowrap;
|
|
706
|
-
overflow: hidden;
|
|
707
|
-
text-overflow: ellipsis;
|
|
708
|
-
}
|
|
709
|
-
.copy-proj-row:last-child { border-bottom: none; }
|
|
710
|
-
.copy-proj-row:hover { background: var(--bg-hover); color: var(--text-hi); }
|
|
711
|
-
.copy-proj-row.selected { background: color-mix(in srgb, var(--teal) 15%, transparent); color: var(--teal); border-left: 2px solid var(--teal); padding-left: 8px; }
|
|
712
|
-
.copy-proj-loading { padding: 10px; font-size: 11px; color: var(--dim); text-align: center; }
|
|
713
|
-
#copy-modal-overlay {
|
|
714
|
-
display: none;
|
|
715
|
-
position: fixed; inset: 0;
|
|
716
|
-
background: oklch(5% 0.008 186 / 0.82);
|
|
717
|
-
backdrop-filter: blur(2px);
|
|
718
|
-
z-index: 200;
|
|
719
|
-
align-items: center; justify-content: center;
|
|
720
|
-
}
|
|
721
|
-
#copy-modal-overlay.open { display: flex; }
|
|
722
|
-
|
|
723
|
-
#copy-modal {
|
|
724
|
-
background: var(--bg-panel);
|
|
725
|
-
border: 1px solid var(--border-hi);
|
|
726
|
-
border-radius: 4px;
|
|
727
|
-
padding: 22px 24px 18px;
|
|
728
|
-
width: 440px;
|
|
729
|
-
max-width: calc(100vw - 32px);
|
|
730
|
-
box-shadow: 0 8px 40px oklch(0% 0 0 / 0.5);
|
|
731
|
-
}
|
|
732
|
-
|
|
733
|
-
#copy-modal-title {
|
|
734
|
-
font-size: 9px; letter-spacing: 3px; color: var(--teal);
|
|
735
|
-
margin-bottom: 4px;
|
|
736
|
-
}
|
|
737
|
-
#copy-modal-org {
|
|
738
|
-
font-size: 14px; font-weight: 600; color: var(--text);
|
|
739
|
-
letter-spacing: 1px; margin-bottom: 16px;
|
|
740
|
-
}
|
|
741
|
-
|
|
742
|
-
.copy-modal-label {
|
|
743
|
-
font-size: 8px; letter-spacing: 2px; color: var(--dim);
|
|
744
|
-
margin-bottom: 6px;
|
|
745
|
-
}
|
|
746
|
-
|
|
747
|
-
#copy-dest-input {
|
|
748
|
-
width: 100%;
|
|
749
|
-
background: oklch(6% 0.008 186);
|
|
750
|
-
border: 1px solid var(--border-hi);
|
|
751
|
-
border-radius: 3px;
|
|
752
|
-
color: var(--text);
|
|
753
|
-
font-family: var(--mono);
|
|
754
|
-
font-size: 12px;
|
|
755
|
-
padding: 8px 10px;
|
|
756
|
-
outline: none;
|
|
757
|
-
transition: border-color 0.12s;
|
|
758
|
-
margin-bottom: 6px;
|
|
759
|
-
}
|
|
760
|
-
#copy-dest-input:focus { border-color: var(--teal); }
|
|
761
|
-
#copy-dest-input::placeholder { color: var(--dim); }
|
|
762
|
-
|
|
763
|
-
#copy-modal-hint {
|
|
764
|
-
font-size: 9px; color: var(--dim); margin-bottom: 16px; line-height: 1.5;
|
|
765
|
-
}
|
|
766
|
-
|
|
767
|
-
#copy-modal-status {
|
|
768
|
-
font-size: 9px; min-height: 16px; margin-bottom: 12px;
|
|
769
|
-
letter-spacing: 0.5px;
|
|
770
|
-
}
|
|
771
|
-
#copy-modal-status.ok { color: var(--green); }
|
|
772
|
-
#copy-modal-status.err { color: var(--red); }
|
|
773
|
-
|
|
774
|
-
.copy-modal-actions {
|
|
775
|
-
display: flex; gap: 8px; justify-content: flex-end;
|
|
776
|
-
}
|
|
777
|
-
|
|
778
|
-
.cm-btn {
|
|
779
|
-
background: none;
|
|
780
|
-
border: 1px solid var(--border-hi);
|
|
781
|
-
border-radius: 3px;
|
|
782
|
-
color: var(--muted);
|
|
783
|
-
font-family: var(--mono);
|
|
784
|
-
font-size: 9px; letter-spacing: 1px;
|
|
785
|
-
padding: 5px 14px;
|
|
786
|
-
cursor: pointer;
|
|
787
|
-
text-transform: uppercase;
|
|
788
|
-
transition: color 0.12s, border-color 0.12s, background 0.12s;
|
|
789
|
-
}
|
|
790
|
-
.cm-btn:hover { color: var(--text); border-color: var(--muted); }
|
|
791
|
-
.cm-btn.primary {
|
|
792
|
-
color: var(--teal); border-color: var(--teal-dim);
|
|
793
|
-
}
|
|
794
|
-
.cm-btn.primary:hover { background: var(--teal-glow); border-color: var(--teal); }
|
|
795
|
-
.cm-btn:disabled { opacity: 0.4; cursor: not-allowed; }
|
|
796
|
-
</style>
|
|
797
|
-
</head>
|
|
798
|
-
<body>
|
|
799
|
-
<div id="app">
|
|
800
|
-
|
|
801
|
-
<!-- ── Sidebar: org list ── -->
|
|
802
|
-
<div id="sidebar">
|
|
803
|
-
<div id="sb-header">
|
|
804
|
-
<div id="sb-wordmark">
|
|
805
|
-
<a id="sb-back" href="/">← CONTROL</a>
|
|
806
|
-
<span id="sb-title">ORGS</span>
|
|
807
|
-
</div>
|
|
808
|
-
<div id="sb-status-row">
|
|
809
|
-
<div class="live-dot" id="sb-live-dot"></div>
|
|
810
|
-
<span id="sb-status-text">LOADING</span>
|
|
811
|
-
<span id="sb-running-count"></span>
|
|
812
|
-
</div>
|
|
813
|
-
</div>
|
|
814
|
-
<div id="sb-list">
|
|
815
|
-
<div id="sb-empty" style="display:none">
|
|
816
|
-
<span class="empty-icon">⬡</span>
|
|
817
|
-
NO ORGS FOUND<br><br>
|
|
818
|
-
Create a named agent team<br>that coordinates across sessions.
|
|
819
|
-
<span class="empty-cmd">/mastermind:createorg</span>
|
|
820
|
-
</div>
|
|
821
|
-
</div>
|
|
822
|
-
</div>
|
|
823
|
-
|
|
824
|
-
<!-- ── Main content ── -->
|
|
825
|
-
<div id="main">
|
|
826
|
-
|
|
827
|
-
<!-- No-selection splash -->
|
|
828
|
-
<div id="no-org-state">
|
|
829
|
-
<div class="ns-icon">⬡</div>
|
|
830
|
-
<div class="ns-text">SELECT AN ORG</div>
|
|
831
|
-
</div>
|
|
832
|
-
|
|
833
|
-
<!-- Org detail (hidden until org selected) -->
|
|
834
|
-
<div id="org-detail" style="display:none; height:100%; flex-direction:column; overflow:hidden;">
|
|
835
|
-
|
|
836
|
-
<div id="main-header">
|
|
837
|
-
<div>
|
|
838
|
-
<div id="org-label">MASTERMIND ORG</div>
|
|
839
|
-
<div style="display:flex; align-items:center; gap:8px; margin-top:2px;">
|
|
840
|
-
<div id="org-name">—</div>
|
|
841
|
-
<span id="org-status-badge" class="idle">IDLE</span>
|
|
842
|
-
</div>
|
|
843
|
-
</div>
|
|
844
|
-
<div style="margin-left:auto; display:flex; gap:6px; flex-wrap:wrap; justify-content:flex-end;">
|
|
845
|
-
<div class="hdr-chip">ROLES <span id="hdr-roles">0</span></div>
|
|
846
|
-
<div class="hdr-chip">TOPOLOGY <span id="hdr-topology">—</span></div>
|
|
847
|
-
<div class="hdr-chip" id="hdr-created-wrap" style="display:none">SINCE <span id="hdr-created">—</span></div>
|
|
848
|
-
</div>
|
|
849
|
-
<button id="stop-btn" onclick="stopCurrentOrg()" style="display:none;
|
|
850
|
-
font-size:9px; font-family:var(--mono); letter-spacing:1px; color:var(--red);
|
|
851
|
-
border:1px solid oklch(62% 0.22 25 / 0.35); background:none; padding:4px 12px;
|
|
852
|
-
border-radius:3px; cursor:pointer; text-transform:uppercase; transition:background 0.12s;"
|
|
853
|
-
onmouseover="this.style.background='oklch(62% 0.22 25 / 0.08)'"
|
|
854
|
-
onmouseout="this.style.background='none'">STOP</button>
|
|
855
|
-
</div>
|
|
856
|
-
|
|
857
|
-
<div id="main-tabs">
|
|
858
|
-
<button class="tab-btn active" onclick="switchTab('chart')">ORG CHART</button>
|
|
859
|
-
<button class="tab-btn" onclick="switchTab('roles')">ROLES</button>
|
|
860
|
-
<button class="tab-btn" onclick="switchTab('activity')">ACTIVITY</button>
|
|
861
|
-
<button class="tab-btn" onclick="switchTab('health')">HEALTH</button>
|
|
862
|
-
<button class="tab-btn" onclick="switchTab('files')">FILES</button>
|
|
863
|
-
<button class="tab-btn" onclick="switchTab('chat')">CHAT</button>
|
|
864
|
-
</div>
|
|
865
|
-
|
|
866
|
-
<div id="main-body">
|
|
867
|
-
|
|
868
|
-
<!-- Chart tab -->
|
|
869
|
-
<div class="tab-pane active" id="tab-chart">
|
|
870
|
-
<div id="chart-pane">
|
|
871
|
-
<div id="org-meta-grid">
|
|
872
|
-
<div class="meta-cell">
|
|
873
|
-
<div class="meta-cell-label">GOAL</div>
|
|
874
|
-
<div class="meta-cell-value" id="meta-goal" style="font-size:10px;line-height:1.5;white-space:normal;color:var(--muted)">—</div>
|
|
875
|
-
</div>
|
|
876
|
-
<div class="meta-cell">
|
|
877
|
-
<div class="meta-cell-label">TOPOLOGY</div>
|
|
878
|
-
<div class="meta-cell-value" id="meta-topology">—</div>
|
|
879
|
-
</div>
|
|
880
|
-
<div class="meta-cell">
|
|
881
|
-
<div class="meta-cell-label">CREATED</div>
|
|
882
|
-
<div class="meta-cell-value" id="meta-created" style="font-size:10px;color:var(--muted)">—</div>
|
|
883
|
-
</div>
|
|
884
|
-
</div>
|
|
885
|
-
|
|
886
|
-
<!-- Audit Coverage card (populated from /api/org-coverage; hidden when no coverage.json) -->
|
|
887
|
-
<div id="audit-coverage-card" style="display:none; background:var(--bg-panel); border:1px solid var(--border); border-radius:3px; padding:10px 14px;">
|
|
888
|
-
<div class="meta-cell-label" style="display:flex; align-items:center; gap:8px;">
|
|
889
|
-
AUDIT COVERAGE
|
|
890
|
-
<span id="acov-summary" style="letter-spacing:1px; color:var(--muted)"></span>
|
|
891
|
-
</div>
|
|
892
|
-
<div id="acov-areas" style="display:flex; flex-wrap:wrap; gap:6px; margin-top:2px;"></div>
|
|
893
|
-
</div>
|
|
894
|
-
<div id="chart-svg-wrap">
|
|
895
|
-
<svg id="org-chart-svg" viewBox="0 0 720 320">
|
|
896
|
-
<defs>
|
|
897
|
-
<marker id="arr-teal" markerWidth="6" markerHeight="6" refX="5" refY="3" orient="auto">
|
|
898
|
-
<path d="M0,0 L0,6 L6,3 z" fill="oklch(62% 0.20 186 / 0.5)"/>
|
|
899
|
-
</marker>
|
|
900
|
-
<marker id="arr-indigo" markerWidth="6" markerHeight="6" refX="5" refY="3" orient="auto">
|
|
901
|
-
<path d="M0,0 L0,6 L6,3 z" fill="oklch(68% 0.18 252 / 0.45)"/>
|
|
902
|
-
</marker>
|
|
903
|
-
<marker id="arr-amber" markerWidth="6" markerHeight="6" refX="5" refY="3" orient="auto">
|
|
904
|
-
<path d="M0,0 L0,6 L6,3 z" fill="oklch(78% 0.18 80 / 0.35)"/>
|
|
905
|
-
</marker>
|
|
906
|
-
<marker id="arr-green" markerWidth="6" markerHeight="6" refX="5" refY="3" orient="auto">
|
|
907
|
-
<path d="M0,0 L0,6 L6,3 z" fill="oklch(68% 0.20 150 / 0.4)"/>
|
|
908
|
-
</marker>
|
|
909
|
-
<filter id="node-glow" x="-50%" y="-50%" width="200%" height="200%">
|
|
910
|
-
<feGaussianBlur in="SourceGraphic" stdDeviation="3" result="b"/>
|
|
911
|
-
<feMerge><feMergeNode in="b"/><feMergeNode in="SourceGraphic"/></feMerge>
|
|
912
|
-
</filter>
|
|
913
|
-
</defs>
|
|
914
|
-
<rect width="720" height="320" fill="oklch(7% 0.008 186)"/>
|
|
915
|
-
<g id="oc-edges"></g>
|
|
916
|
-
<g id="oc-nodes"></g>
|
|
917
|
-
</svg>
|
|
918
|
-
</div>
|
|
919
|
-
|
|
920
|
-
<!-- Live status strip -->
|
|
921
|
-
<div id="live-strip">
|
|
922
|
-
<div id="ls-state">
|
|
923
|
-
<span id="ls-dot" class="ls-dot"></span>
|
|
924
|
-
<span id="ls-label">IDLE</span>
|
|
925
|
-
</div>
|
|
926
|
-
<div id="ls-uptime" class="ls-metric" title="Uptime">—</div>
|
|
927
|
-
<div id="ls-last" class="ls-metric" title="Last event">—</div>
|
|
928
|
-
<div id="ls-epm" class="ls-metric" title="Events / 5 min">—</div>
|
|
929
|
-
<div id="ls-sparkline" class="ls-sparkline-wrap"></div>
|
|
930
|
-
</div>
|
|
931
|
-
<!-- Live event feed -->
|
|
932
|
-
<div id="clf-wrap">
|
|
933
|
-
<div id="clf-header">LIVE EVENTS</div>
|
|
934
|
-
<div id="clf-rows"></div>
|
|
935
|
-
</div>
|
|
936
|
-
|
|
937
|
-
<!-- Legend -->
|
|
938
|
-
<div style="display:flex; gap:16px; flex-wrap:wrap; padding:0 2px;">
|
|
939
|
-
<div style="display:flex; align-items:center; gap:5px; font-size:8px; color:var(--dim);">
|
|
940
|
-
<svg width="24" height="8"><line x1="0" y1="4" x2="24" y2="4" stroke="oklch(62% 0.20 186)" stroke-opacity="0.5" stroke-width="1.5" marker-end="url(#arr-teal)"/></svg>
|
|
941
|
-
COMMAND
|
|
942
|
-
</div>
|
|
943
|
-
<div style="display:flex; align-items:center; gap:5px; font-size:8px; color:var(--dim);">
|
|
944
|
-
<svg width="24" height="8"><line x1="0" y1="4" x2="24" y2="4" stroke="oklch(68% 0.18 252)" stroke-opacity="0.45" stroke-width="1" stroke-dasharray="4 3" marker-end="url(#arr-indigo)"/></svg>
|
|
945
|
-
REPORT
|
|
946
|
-
</div>
|
|
947
|
-
<div style="display:flex; align-items:center; gap:5px; font-size:8px; color:var(--dim);">
|
|
948
|
-
<svg width="24" height="8"><line x1="0" y1="4" x2="24" y2="4" stroke="oklch(78% 0.18 80)" stroke-opacity="0.35" stroke-width="1" stroke-dasharray="2 4" marker-end="url(#arr-amber)"/></svg>
|
|
949
|
-
FEEDBACK
|
|
950
|
-
</div>
|
|
951
|
-
<div style="display:flex; align-items:center; gap:5px; font-size:8px; color:var(--dim);">
|
|
952
|
-
<svg width="24" height="8"><line x1="0" y1="4" x2="24" y2="4" stroke="oklch(68% 0.20 150)" stroke-opacity="0.4" stroke-width="1.5" marker-end="url(#arr-green)"/></svg>
|
|
953
|
-
HANDOFF
|
|
954
|
-
</div>
|
|
955
|
-
</div>
|
|
956
|
-
</div>
|
|
957
|
-
</div>
|
|
958
|
-
|
|
959
|
-
<!-- Roles tab -->
|
|
960
|
-
<div class="tab-pane" id="tab-roles">
|
|
961
|
-
<div id="roles-pane">
|
|
962
|
-
<div id="roles-grid" class="roles-grid"></div>
|
|
963
|
-
</div>
|
|
964
|
-
</div>
|
|
965
|
-
|
|
966
|
-
<!-- Activity tab -->
|
|
967
|
-
<div class="tab-pane" id="tab-activity">
|
|
968
|
-
<div id="activity-pane">
|
|
969
|
-
<div id="activity-log"></div>
|
|
970
|
-
</div>
|
|
971
|
-
</div>
|
|
972
|
-
|
|
973
|
-
<!-- Health tab -->
|
|
974
|
-
<div class="tab-pane" id="tab-health">
|
|
975
|
-
<div id="health-pane">
|
|
976
|
-
<div id="health-grid" class="health-grid"></div>
|
|
977
|
-
<div id="health-detail"></div>
|
|
978
|
-
<div id="health-history"></div>
|
|
979
|
-
<div id="health-memory"></div>
|
|
980
|
-
</div>
|
|
981
|
-
</div>
|
|
982
|
-
|
|
983
|
-
<!-- Files tab: every asset any agent in this org has produced, across all runs -->
|
|
984
|
-
<div class="tab-pane" id="tab-files">
|
|
985
|
-
<div id="files-pane">
|
|
986
|
-
<div id="files-empty" class="act-empty" style="display:none">No files produced yet.</div>
|
|
987
|
-
<div id="files-grid" class="files-grid"></div>
|
|
988
|
-
</div>
|
|
989
|
-
</div>
|
|
990
|
-
|
|
991
|
-
<!-- Chat tab -->
|
|
992
|
-
<div class="tab-pane" id="tab-chat">
|
|
993
|
-
<div id="chat-pane">
|
|
994
|
-
<div id="chat-session-bar">
|
|
995
|
-
<span id="chat-sess-label">SESSION</span>
|
|
996
|
-
<select id="chat-sess-select" onchange="selectChatSession(this.value)">
|
|
997
|
-
<option value="">— select a session —</option>
|
|
998
|
-
</select>
|
|
999
|
-
<div id="chat-mode-bar">
|
|
1000
|
-
<button class="chat-mode-btn active" id="mode-summary" onclick="setChatMode('summary')">SUMMARY</button>
|
|
1001
|
-
<button class="chat-mode-btn" id="mode-detailed" onclick="setChatMode('detailed')">DETAILED</button>
|
|
1002
|
-
<button class="chat-mode-btn" id="mode-raw" onclick="setChatMode('raw')">RAW</button>
|
|
1003
|
-
</div>
|
|
1004
|
-
<div id="chat-live-dot"></div>
|
|
1005
|
-
<span id="chat-live-label">OFFLINE</span>
|
|
1006
|
-
</div>
|
|
1007
|
-
<div id="chat-agent-bar" style="display:none">
|
|
1008
|
-
<span id="chat-agent-label">AGENT</span>
|
|
1009
|
-
</div>
|
|
1010
|
-
<div id="chat-feed-wrap">
|
|
1011
|
-
<div id="chat-feed-empty">Select a session above to see agent communications.</div>
|
|
1012
|
-
</div>
|
|
1013
|
-
<div id="chat-compose">
|
|
1014
|
-
<textarea id="chat-compose-input" rows="1" placeholder="Send a message to the org…" onkeydown="chatComposeKey(event)"></textarea>
|
|
1015
|
-
<button id="chat-send-btn" onclick="sendChatMessage()" disabled>SEND</button>
|
|
1016
|
-
</div>
|
|
1017
|
-
</div>
|
|
1018
|
-
</div>
|
|
1019
|
-
|
|
1020
|
-
</div><!-- end main-body -->
|
|
1021
|
-
</div><!-- end org-detail -->
|
|
1022
|
-
</div><!-- end main -->
|
|
1023
|
-
</div><!-- end app -->
|
|
1024
|
-
|
|
1025
|
-
<!-- ── Copy-to-project modal ── -->
|
|
1026
|
-
<div id="copy-modal-overlay" onclick="if(event.target===this)closeCopyModal()">
|
|
1027
|
-
<div id="copy-modal">
|
|
1028
|
-
<div id="copy-modal-title">COPY ORG TO PROJECT</div>
|
|
1029
|
-
<div id="copy-modal-org">—</div>
|
|
1030
|
-
<div class="copy-modal-label">SELECT DESTINATION PROJECT</div>
|
|
1031
|
-
<div id="copy-project-list"><div class="copy-proj-loading">Loading projects…</div></div>
|
|
1032
|
-
<div class="copy-modal-label" style="margin-top:4px">OR ENTER PATH MANUALLY</div>
|
|
1033
|
-
<input id="copy-dest-input" type="text" placeholder="/absolute/path/to/project"
|
|
1034
|
-
onkeydown="if(event.key==='Enter')executeCopy(); if(event.key==='Escape')closeCopyModal()"
|
|
1035
|
-
oninput="document.querySelectorAll('.copy-proj-row').forEach(r=>r.classList.remove('selected'))">
|
|
1036
|
-
<div id="copy-modal-hint">
|
|
1037
|
-
Writes to <span style="color:var(--teal)"><destination>/.monomind/orgs/<name>.json</span>
|
|
1038
|
-
</div>
|
|
1039
|
-
<div id="copy-modal-status"></div>
|
|
1040
|
-
<div class="copy-modal-actions">
|
|
1041
|
-
<button class="cm-btn" onclick="closeCopyModal()">CANCEL</button>
|
|
1042
|
-
<button class="cm-btn primary" id="copy-confirm-btn" onclick="executeCopy()">COPY</button>
|
|
1043
|
-
</div>
|
|
1044
|
-
</div>
|
|
1045
|
-
</div>
|
|
1046
|
-
|
|
1047
|
-
<script>
|
|
1048
|
-
'use strict';
|
|
1049
|
-
|
|
1050
|
-
// ── auth: attach this session's dashboard credential to every fetch() and
|
|
1051
|
-
// EventSource connection ──────────────────────────────────────────────────
|
|
1052
|
-
// server.mjs requires an x-monomind-token header (or an equivalent query
|
|
1053
|
-
// param) on /api/* routes (default-closed) and injects the current
|
|
1054
|
-
// credential value via a <meta name="mm-token"> tag on page load, same
|
|
1055
|
-
// mechanism as dashboard.html. Mirrored here rather than shared since
|
|
1056
|
-
// orgs.html and dashboard.html are served as separate pages. EventSource
|
|
1057
|
-
// can't carry custom headers, so SSE call sites must use
|
|
1058
|
-
// window.mmEventSource(url) instead of `new EventSource(url)` directly.
|
|
1059
|
-
(function () {
|
|
1060
|
-
const AUTH_HEADER_NAME = 'x-monomind-' + 'token';
|
|
1061
|
-
const AUTH_QUERY_PARAM = 'to' + 'ken';
|
|
1062
|
-
const _mmAuthTag = document.querySelector('meta[name="mm-token"]');
|
|
1063
|
-
const _mmAuthValue = _mmAuthTag ? _mmAuthTag.content : '';
|
|
1064
|
-
const _origFetch = window.fetch.bind(window);
|
|
1065
|
-
window.fetch = function (input, init) {
|
|
1066
|
-
const method = (init && init.method ? init.method : 'GET').toUpperCase();
|
|
1067
|
-
if (_mmAuthValue && method !== 'HEAD') {
|
|
1068
|
-
init = init ? { ...init } : {};
|
|
1069
|
-
init.headers = new Headers(init.headers || {});
|
|
1070
|
-
if (!init.headers.has(AUTH_HEADER_NAME)) init.headers.set(AUTH_HEADER_NAME, _mmAuthValue);
|
|
1071
|
-
}
|
|
1072
|
-
return _origFetch(input, init);
|
|
1073
|
-
};
|
|
1074
|
-
window.mmEventSource = function (url, opts) {
|
|
1075
|
-
if (_mmAuthValue) {
|
|
1076
|
-
const qp = new URLSearchParams(url.includes('?') ? url.split('?')[1] : '');
|
|
1077
|
-
qp.set(AUTH_QUERY_PARAM, _mmAuthValue);
|
|
1078
|
-
url = url.split('?')[0] + '?' + qp.toString();
|
|
1079
|
-
}
|
|
1080
|
-
return new EventSource(url, opts);
|
|
1081
|
-
};
|
|
1082
|
-
})();
|
|
1083
|
-
|
|
1084
|
-
// ── State ─────────────────────────────────────────────────────────
|
|
1085
|
-
let allOrgs = [];
|
|
1086
|
-
let selectedOrg = null;
|
|
1087
|
-
let orgDetailData = null;
|
|
1088
|
-
let currentTab = 'chart';
|
|
1089
|
-
// Phase 3: Chat render mode (Summary / Detailed / Raw)
|
|
1090
|
-
let chatRenderMode = localStorage.getItem('chatRenderMode') || 'summary';
|
|
1091
|
-
|
|
1092
|
-
// Phase 3: Chat render mode — Summary / Detailed / Raw
|
|
1093
|
-
const CHAT_SUMMARY_TYPES = new Set(['session:start','session:complete','domain:dispatch','domain:complete','agent:spawn','agent:complete','agent:edit','org:comms','loop:start','loop:complete','org:artifact','agent:message','intercom','user:message']);
|
|
1094
|
-
const CHAT_DETAILED_TYPES = new Set([...CHAT_SUMMARY_TYPES,'agent:bash','agent:bash:result','agent:browse','agent:read','agent:read:batch']);
|
|
1095
|
-
function setChatMode(mode) {
|
|
1096
|
-
chatRenderMode = mode;
|
|
1097
|
-
localStorage.setItem('chatRenderMode', mode);
|
|
1098
|
-
['summary','detailed','raw'].forEach(m => {
|
|
1099
|
-
const btn = document.getElementById('mode-' + m);
|
|
1100
|
-
if (btn) btn.className = 'chat-mode-btn' + (m === mode ? ' active' : '');
|
|
1101
|
-
});
|
|
1102
|
-
// Re-render chat feed with new mode
|
|
1103
|
-
const currentSessId = document.getElementById('chat-sess-select')?.value;
|
|
1104
|
-
if (currentSessId) selectChatSession(currentSessId);
|
|
1105
|
-
}
|
|
1106
|
-
// Apply saved mode on load
|
|
1107
|
-
(function() {
|
|
1108
|
-
['summary','detailed','raw'].forEach(m => {
|
|
1109
|
-
const btn = document.getElementById('mode-' + m);
|
|
1110
|
-
if (btn) btn.className = 'chat-mode-btn' + (m === chatRenderMode ? ' active' : '');
|
|
1111
|
-
});
|
|
1112
|
-
})();
|
|
1113
|
-
|
|
1114
|
-
// ── Utilities ──────────────────────────────────────────────────────
|
|
1115
|
-
function esc(s) {
|
|
1116
|
-
return String(s ?? '')
|
|
1117
|
-
.replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>')
|
|
1118
|
-
.replace(/"/g,'"').replace(/'/g,''');
|
|
1119
|
-
}
|
|
1120
|
-
function fmtDate(ts) {
|
|
1121
|
-
if (!ts) return '—';
|
|
1122
|
-
const d = new Date(typeof ts === 'number' ? ts : Date.parse(ts));
|
|
1123
|
-
if (isNaN(d)) return ts;
|
|
1124
|
-
return d.toLocaleDateString('en', {month:'short', day:'numeric', year:'numeric'});
|
|
1125
|
-
}
|
|
1126
|
-
function fmtTime(ts) {
|
|
1127
|
-
if (!ts) return '';
|
|
1128
|
-
const d = new Date(typeof ts === 'number' ? ts : Date.parse(ts));
|
|
1129
|
-
if (isNaN(d)) return '';
|
|
1130
|
-
return d.toLocaleTimeString('en', {hour12:false, hour:'2-digit', minute:'2-digit', second:'2-digit'});
|
|
1131
|
-
}
|
|
1132
|
-
function fmtEventType(t) {
|
|
1133
|
-
const m = {
|
|
1134
|
-
'org:start':'START','org:stop':'STOP','org:complete':'COMPLETE',
|
|
1135
|
-
'org:create':'CREATE','org:heartbeat':'HB','org:agent:online':'AGENT ON',
|
|
1136
|
-
'org:comms':'COMMS','org:checkpoint':'CHECKPOINT',
|
|
1137
|
-
};
|
|
1138
|
-
return m[t] || (t || '').replace(/^org:/,'').toUpperCase();
|
|
1139
|
-
}
|
|
1140
|
-
|
|
1141
|
-
// Role colors cycle
|
|
1142
|
-
const ROLE_COLORS = [
|
|
1143
|
-
'oklch(62% 0.20 186)',
|
|
1144
|
-
'oklch(68% 0.18 252)',
|
|
1145
|
-
'oklch(68% 0.20 150)',
|
|
1146
|
-
'oklch(78% 0.18 80)',
|
|
1147
|
-
'oklch(62% 0.22 25)',
|
|
1148
|
-
'oklch(74% 0.16 310)',
|
|
1149
|
-
];
|
|
1150
|
-
function roleColor(i) { return ROLE_COLORS[i % ROLE_COLORS.length]; }
|
|
1151
|
-
|
|
1152
|
-
// ── Tab switching ─────────────────────────────────────────────────
|
|
1153
|
-
window.switchTab = function(tab) {
|
|
1154
|
-
currentTab = tab;
|
|
1155
|
-
document.querySelectorAll('.tab-btn').forEach(b => {
|
|
1156
|
-
b.classList.toggle('active', b.textContent.toLowerCase().includes(tab) ||
|
|
1157
|
-
(tab === 'chart' && b.textContent === 'ORG CHART') ||
|
|
1158
|
-
(tab === 'roles' && b.textContent === 'ROLES') ||
|
|
1159
|
-
(tab === 'activity' && b.textContent === 'ACTIVITY') ||
|
|
1160
|
-
(tab === 'health' && b.textContent === 'HEALTH') ||
|
|
1161
|
-
(tab === 'chat' && b.textContent === 'CHAT'));
|
|
1162
|
-
});
|
|
1163
|
-
document.querySelectorAll('.tab-pane').forEach(p => p.classList.remove('active'));
|
|
1164
|
-
const pane = document.getElementById('tab-' + tab);
|
|
1165
|
-
if (pane) pane.classList.add('active');
|
|
1166
|
-
const mainBody = document.getElementById('main-body');
|
|
1167
|
-
if (mainBody) mainBody.classList.toggle('chat-active', tab === 'chat');
|
|
1168
|
-
if (tab === 'chat') renderChatTab();
|
|
1169
|
-
else if (tab === 'files') renderFilesTab();
|
|
1170
|
-
else if (orgDetailData) renderTab(tab);
|
|
1171
|
-
};
|
|
1172
|
-
|
|
1173
|
-
// Files tab + diff view — extracted to orgs-files.js to keep this file under
|
|
1174
|
-
// the CLAUDE.md 500-line-per-file guideline. Loaded as a classic script below,
|
|
1175
|
-
// sharing this script's global scope (function declarations here call into it,
|
|
1176
|
-
// e.g. renderFilesTab() from renderTab() above and applyArtifactEvent() from
|
|
1177
|
-
// handleMmEvent() below).
|
|
1178
|
-
</script>
|
|
1179
|
-
<script src="orgs-files.js"></script>
|
|
1180
|
-
<script>
|
|
1181
|
-
|
|
1182
|
-
// ── Render all orgs in sidebar ────────────────────────────────────
|
|
1183
|
-
function renderSidebar() {
|
|
1184
|
-
const list = document.getElementById('sb-list');
|
|
1185
|
-
const empty = document.getElementById('sb-empty');
|
|
1186
|
-
const dot = document.getElementById('sb-live-dot');
|
|
1187
|
-
const statusText = document.getElementById('sb-status-text');
|
|
1188
|
-
const runCount = document.getElementById('sb-running-count');
|
|
1189
|
-
|
|
1190
|
-
// Clear existing items
|
|
1191
|
-
list.querySelectorAll('.org-item').forEach(el => el.remove());
|
|
1192
|
-
|
|
1193
|
-
const running = allOrgs.filter(o => o.running).length;
|
|
1194
|
-
if (running > 0) {
|
|
1195
|
-
dot.classList.add('on');
|
|
1196
|
-
statusText.textContent = 'LIVE';
|
|
1197
|
-
runCount.textContent = running + ' RUNNING';
|
|
1198
|
-
} else {
|
|
1199
|
-
dot.classList.remove('on');
|
|
1200
|
-
statusText.textContent = allOrgs.length ? 'IDLE' : 'EMPTY';
|
|
1201
|
-
runCount.textContent = '';
|
|
1202
|
-
}
|
|
1203
|
-
|
|
1204
|
-
if (!allOrgs.length) {
|
|
1205
|
-
empty.style.display = 'block';
|
|
1206
|
-
return;
|
|
1207
|
-
}
|
|
1208
|
-
empty.style.display = 'none';
|
|
1209
|
-
|
|
1210
|
-
allOrgs.forEach(org => {
|
|
1211
|
-
const item = document.createElement('div');
|
|
1212
|
-
item.className = 'org-item' +
|
|
1213
|
-
(org.running ? ' running' : '') +
|
|
1214
|
-
(selectedOrg === org.name ? ' active' : '');
|
|
1215
|
-
item.dataset.orgName = org.name;
|
|
1216
|
-
|
|
1217
|
-
const rolesCount = Array.isArray(org.roles) ? org.roles.length : (org.roles || 0);
|
|
1218
|
-
const topo = org.topology || 'hierarchical';
|
|
1219
|
-
const goalText = (org.goal || '').slice(0, 55) + ((org.goal || '').length > 55 ? '…' : '');
|
|
1220
|
-
|
|
1221
|
-
item.innerHTML = `
|
|
1222
|
-
<div class="oi-header">
|
|
1223
|
-
<div class="oi-dot ${org.running ? 'running' : ''}"></div>
|
|
1224
|
-
<div class="oi-name">${esc(org.name)}</div>
|
|
1225
|
-
<span class="oi-badge ${(()=>{if(!org.running)return 'idle';if(!org.lastEventAt)return 'quiet';const a=Date.now()-org.lastEventAt;return a<1800000?'running':a<7200000?'quiet':'stale';})()} ">${(()=>{if(!org.running)return 'IDLE';if(!org.lastEventAt)return '🟡 QUIET';const a=Date.now()-org.lastEventAt;return a<1800000?'🟢 LIVE':a<7200000?'🟡 QUIET':'🔴 STALE';})()}</span>
|
|
1226
|
-
<button class="oi-copy-btn" title="Copy org to another project">COPY</button>
|
|
1227
|
-
<button class="oi-export-btn" title="Export org as JSON file">EXPORT</button>
|
|
1228
|
-
<button class="oi-import-btn" title="Import org from JSON file">IMPORT</button>
|
|
1229
|
-
</div>
|
|
1230
|
-
${goalText ? `<div class="oi-goal">${esc(goalText)}</div>` : ''}
|
|
1231
|
-
<div class="oi-meta">
|
|
1232
|
-
<span class="oi-chip">${rolesCount} <span>roles</span></span>
|
|
1233
|
-
<span class="oi-chip">${esc(topo)}</span>
|
|
1234
|
-
</div>`;
|
|
1235
|
-
|
|
1236
|
-
item.querySelector('.oi-copy-btn').addEventListener('click', e => {
|
|
1237
|
-
e.stopPropagation();
|
|
1238
|
-
openCopyModal(org.name);
|
|
1239
|
-
});
|
|
1240
|
-
item.querySelector('.oi-export-btn').addEventListener('click', e => {
|
|
1241
|
-
e.stopPropagation();
|
|
1242
|
-
exportOrg(org.name);
|
|
1243
|
-
});
|
|
1244
|
-
item.querySelector('.oi-import-btn').addEventListener('click', e => {
|
|
1245
|
-
e.stopPropagation();
|
|
1246
|
-
triggerImportOrg(org.name);
|
|
1247
|
-
});
|
|
1248
|
-
item.addEventListener('click', () => selectOrg(org.name));
|
|
1249
|
-
list.appendChild(item);
|
|
1250
|
-
});
|
|
1251
|
-
}
|
|
1252
|
-
|
|
1253
|
-
// ── Select and load an org ────────────────────────────────────────
|
|
1254
|
-
async function selectOrg(name) {
|
|
1255
|
-
selectedOrg = name;
|
|
1256
|
-
chatCurrentId = null; // reset chat session when org changes
|
|
1257
|
-
orgRunStartMs = null;
|
|
1258
|
-
if (lsUptimeTimer) { clearInterval(lsUptimeTimer); lsUptimeTimer = null; }
|
|
1259
|
-
|
|
1260
|
-
// Update sidebar active state
|
|
1261
|
-
document.querySelectorAll('.org-item').forEach(el => {
|
|
1262
|
-
el.classList.toggle('active', el.dataset.orgName === name);
|
|
1263
|
-
});
|
|
1264
|
-
|
|
1265
|
-
// Show detail area
|
|
1266
|
-
document.getElementById('no-org-state').style.display = 'none';
|
|
1267
|
-
const detail = document.getElementById('org-detail');
|
|
1268
|
-
detail.style.display = 'flex';
|
|
1269
|
-
|
|
1270
|
-
// Basic data from list
|
|
1271
|
-
const listOrg = allOrgs.find(o => o.name === name) || {};
|
|
1272
|
-
updateHeader(listOrg, null);
|
|
1273
|
-
|
|
1274
|
-
// Fetch full data
|
|
1275
|
-
orgDetailData = null;
|
|
1276
|
-
try {
|
|
1277
|
-
const [mainR, actR, healthR] = await Promise.all([
|
|
1278
|
-
fetch(`/api/org/${encodeURIComponent(name)}`),
|
|
1279
|
-
fetch(`/api/org/${encodeURIComponent(name)}/activity`).catch(() => null),
|
|
1280
|
-
fetch(`/api/org/${encodeURIComponent(name)}/health`).catch(() => null),
|
|
1281
|
-
]);
|
|
1282
|
-
if (!mainR.ok) throw new Error('not found');
|
|
1283
|
-
const raw = await mainR.json();
|
|
1284
|
-
// API returns {config, state, goals, routines, approvals, running, tasks} — flatten config to top level
|
|
1285
|
-
orgDetailData = raw.config ? { ...raw.config, ...raw, running: raw.running } : raw;
|
|
1286
|
-
orgDetailData._activity = actR && actR.ok ? await actR.json() : [];
|
|
1287
|
-
orgDetailData._health = healthR && healthR.ok ? await healthR.json() : null;
|
|
1288
|
-
} catch (e) {
|
|
1289
|
-
orgDetailData = { ...listOrg, roles: listOrg.roles || [], communication: [] };
|
|
1290
|
-
orgDetailData._activity = [];
|
|
1291
|
-
orgDetailData._health = null;
|
|
1292
|
-
}
|
|
1293
|
-
|
|
1294
|
-
updateHeader(listOrg, orgDetailData);
|
|
1295
|
-
|
|
1296
|
-
// Pre-populate LIVE EVENTS from historical run data (so panel isn't empty on select)
|
|
1297
|
-
if (listOrg.projectDir) {
|
|
1298
|
-
try {
|
|
1299
|
-
const runsR = await fetch(`/api/orgs/${encodeURIComponent(name)}/runs/current?dir=${encodeURIComponent(listOrg.projectDir)}`);
|
|
1300
|
-
if (runsR.ok) {
|
|
1301
|
-
const runsData = await runsR.json();
|
|
1302
|
-
if (runsData.events && runsData.events.length) {
|
|
1303
|
-
orgEventLog[name] = runsData.events.map(ev => ({ ...ev, _ts: ev.ts || Date.now() }));
|
|
1304
|
-
}
|
|
1305
|
-
}
|
|
1306
|
-
} catch (_) {}
|
|
1307
|
-
}
|
|
1308
|
-
|
|
1309
|
-
renderTab(currentTab);
|
|
1310
|
-
loadAuditCoverage(listOrg);
|
|
1311
|
-
}
|
|
1312
|
-
|
|
1313
|
-
// ── Audit Coverage card (reads .monomind/audit/coverage.json via /api/org-coverage) ──
|
|
1314
|
-
async function loadAuditCoverage(listOrg) {
|
|
1315
|
-
const card = document.getElementById('audit-coverage-card');
|
|
1316
|
-
card.style.display = 'none';
|
|
1317
|
-
const esc = s => String(s ?? '').replace(/[&<>"']/g, c => ({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c]));
|
|
1318
|
-
try {
|
|
1319
|
-
const dir = listOrg.projectDir || window._orgDir;
|
|
1320
|
-
const url = '/api/org-coverage' + (dir ? `?dir=${encodeURIComponent(dir)}` : '');
|
|
1321
|
-
const r = await fetch(url);
|
|
1322
|
-
if (!r.ok) return; // 404 = no coverage.json — keep card hidden
|
|
1323
|
-
const cov = await r.json();
|
|
1324
|
-
const areas = cov.areas && typeof cov.areas === 'object' ? cov.areas : {};
|
|
1325
|
-
const names = Object.keys(areas);
|
|
1326
|
-
if (!names.length) return;
|
|
1327
|
-
|
|
1328
|
-
const summ = [];
|
|
1329
|
-
if (cov.areas_converged != null && cov.areas_total != null) summ.push(`${cov.areas_converged}/${cov.areas_total} CONVERGED`);
|
|
1330
|
-
if (cov.current_area) summ.push(`NOW: ${String(cov.current_area).toUpperCase()}`);
|
|
1331
|
-
document.getElementById('acov-summary').textContent = summ.join(' · ');
|
|
1332
|
-
|
|
1333
|
-
const verdictColor = v => {
|
|
1334
|
-
const s = String(v || '').toUpperCase();
|
|
1335
|
-
if (s.includes('CONVERGE') || s.includes('KEEP') || s.includes('PASS') || s.includes('DONE')) return 'var(--green, oklch(68% 0.2 150))';
|
|
1336
|
-
if (s.includes('ITERATE') || s.includes('WARN')) return 'oklch(78% 0.18 80)';
|
|
1337
|
-
if (s.includes('FAIL') || s.includes('REJECT')) return 'var(--red, oklch(62% 0.22 25))';
|
|
1338
|
-
return 'var(--muted, oklch(55% 0.02 186))';
|
|
1339
|
-
};
|
|
1340
|
-
document.getElementById('acov-areas').innerHTML = names.map(name => {
|
|
1341
|
-
const a = areas[name] || {};
|
|
1342
|
-
const verdict = a.verdict || a.status || '—';
|
|
1343
|
-
const value = a.value_delivered || a.valueDelivered || null;
|
|
1344
|
-
const c = verdictColor(verdict);
|
|
1345
|
-
return `<span style="display:inline-flex; align-items:center; gap:5px; font-size:9px; font-family:var(--mono);
|
|
1346
|
-
border:1px solid var(--border); border-radius:3px; padding:2px 7px; color:var(--text);"
|
|
1347
|
-
title="${esc(value || verdict)}">
|
|
1348
|
-
${esc(name)}
|
|
1349
|
-
<span style="color:${c}; letter-spacing:1px;">${esc(String(verdict).toUpperCase())}</span>
|
|
1350
|
-
${value ? `<span style="color:var(--dim); max-width:180px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap;">${esc(value)}</span>` : ''}
|
|
1351
|
-
</span>`;
|
|
1352
|
-
}).join('');
|
|
1353
|
-
card.style.display = '';
|
|
1354
|
-
} catch (_) { /* keep hidden */ }
|
|
1355
|
-
}
|
|
1356
|
-
|
|
1357
|
-
function updateHeader(listOrg, data) {
|
|
1358
|
-
const name = listOrg.name || selectedOrg || '—';
|
|
1359
|
-
document.getElementById('org-name').textContent = name.toUpperCase();
|
|
1360
|
-
|
|
1361
|
-
const running = listOrg.running;
|
|
1362
|
-
const badge = document.getElementById('org-status-badge');
|
|
1363
|
-
// Phase 2: Three-state liveness — LIVE / QUIET / STALE / IDLE (Issue 6)
|
|
1364
|
-
let badgeState, badgeText;
|
|
1365
|
-
if (running) {
|
|
1366
|
-
if (!listOrg.lastEventAt) { badgeState = 'quiet'; badgeText = '🟡 QUIET'; }
|
|
1367
|
-
else {
|
|
1368
|
-
const _ageMs = Date.now() - listOrg.lastEventAt;
|
|
1369
|
-
if (_ageMs < 30 * 60 * 1000) { badgeState = 'running'; badgeText = '🟢 LIVE'; }
|
|
1370
|
-
else if (_ageMs < 2 * 60 * 60 * 1000) { badgeState = 'quiet'; badgeText = '🟡 QUIET'; }
|
|
1371
|
-
else { badgeState = 'stale'; badgeText = '🔴 STALE'; }
|
|
1372
|
-
}
|
|
1373
|
-
} else {
|
|
1374
|
-
badgeState = 'idle'; badgeText = 'IDLE';
|
|
1375
|
-
}
|
|
1376
|
-
badge.textContent = badgeText;
|
|
1377
|
-
badge.className = 'oi-badge ' + badgeState;
|
|
1378
|
-
|
|
1379
|
-
const rolesArr = data ? (data.roles || []) : [];
|
|
1380
|
-
const rolesCount = Array.isArray(rolesArr) ? rolesArr.length : (listOrg.roles || 0);
|
|
1381
|
-
document.getElementById('hdr-roles').textContent = rolesCount;
|
|
1382
|
-
document.getElementById('hdr-topology').textContent = (data?.topology || listOrg.topology || '—').toUpperCase();
|
|
1383
|
-
|
|
1384
|
-
const created = data?.created_at || listOrg.created_at;
|
|
1385
|
-
if (created) {
|
|
1386
|
-
document.getElementById('hdr-created').textContent = fmtDate(created);
|
|
1387
|
-
document.getElementById('hdr-created-wrap').style.display = '';
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
document.getElementById('stop-btn').style.display = running ? '' : 'none';
|
|
1391
|
-
}
|
|
1392
|
-
|
|
1393
|
-
// ── Tab renderers ─────────────────────────────────────────────────
|
|
1394
|
-
function renderTab(tab) {
|
|
1395
|
-
if (!orgDetailData) return;
|
|
1396
|
-
if (tab === 'chart') { renderChart(); initLiveStrip(); }
|
|
1397
|
-
else if (tab === 'roles') renderRoles();
|
|
1398
|
-
else if (tab === 'activity') renderActivity();
|
|
1399
|
-
else if (tab === 'health') renderHealth();
|
|
1400
|
-
}
|
|
1401
|
-
|
|
1402
|
-
// ── CHART TAB ─────────────────────────────────────────────────────
|
|
1403
|
-
function renderChart() {
|
|
1404
|
-
const d = orgDetailData;
|
|
1405
|
-
const roles = Array.isArray(d.roles) ? d.roles : [];
|
|
1406
|
-
const comms = Array.isArray(d.communication) ? d.communication : [];
|
|
1407
|
-
const running = !!(allOrgs.find(o => o.name === selectedOrg) || {}).running;
|
|
1408
|
-
|
|
1409
|
-
// Meta bar
|
|
1410
|
-
document.getElementById('meta-goal').textContent = d.goal || '—';
|
|
1411
|
-
document.getElementById('meta-topology').textContent = (d.topology || '—').toUpperCase();
|
|
1412
|
-
document.getElementById('meta-created').textContent = fmtDate(d.created_at);
|
|
1413
|
-
|
|
1414
|
-
// Build SVG chart
|
|
1415
|
-
const svgEl = document.getElementById('org-chart-svg');
|
|
1416
|
-
const edgesG = document.getElementById('oc-edges');
|
|
1417
|
-
const nodesG = document.getElementById('oc-nodes');
|
|
1418
|
-
edgesG.innerHTML = '';
|
|
1419
|
-
nodesG.innerHTML = '';
|
|
1420
|
-
|
|
1421
|
-
if (!roles.length) {
|
|
1422
|
-
// Empty chart placeholder
|
|
1423
|
-
const text = document.createElementNS('http://www.w3.org/2000/svg', 'text');
|
|
1424
|
-
text.setAttribute('x', '360');
|
|
1425
|
-
text.setAttribute('y', '160');
|
|
1426
|
-
text.setAttribute('text-anchor', 'middle');
|
|
1427
|
-
text.setAttribute('fill', 'oklch(36% 0.008 186)');
|
|
1428
|
-
text.setAttribute('font-size', '11');
|
|
1429
|
-
text.setAttribute('font-family', "'Azeret Mono','Space Mono',monospace");
|
|
1430
|
-
text.setAttribute('letter-spacing', '2');
|
|
1431
|
-
text.textContent = 'NO ROLES DEFINED';
|
|
1432
|
-
nodesG.appendChild(text);
|
|
1433
|
-
return;
|
|
1434
|
-
}
|
|
1435
|
-
|
|
1436
|
-
// Layout: compute node positions
|
|
1437
|
-
const W = 720, H = 320;
|
|
1438
|
-
const topo = (d.topology || 'hierarchical').toLowerCase();
|
|
1439
|
-
const positions = computeLayout(roles, comms, topo, W, H);
|
|
1440
|
-
|
|
1441
|
-
const NS = 'http://www.w3.org/2000/svg';
|
|
1442
|
-
|
|
1443
|
-
// Draw edges first
|
|
1444
|
-
const markerMap = {
|
|
1445
|
-
command: 'arr-teal', report: 'arr-indigo', feedback: 'arr-amber', handoff: 'arr-green'
|
|
1446
|
-
};
|
|
1447
|
-
const strokeMap = {
|
|
1448
|
-
command: { color: 'oklch(62% 0.20 186)', opacity: 0.5, width: 1.5, dash: '' },
|
|
1449
|
-
report: { color: 'oklch(68% 0.18 252)', opacity: 0.4, width: 1, dash: '4 3' },
|
|
1450
|
-
feedback: { color: 'oklch(78% 0.18 80)', opacity: 0.3, width: 1, dash: '2 4' },
|
|
1451
|
-
handoff: { color: 'oklch(68% 0.20 150)', opacity: 0.45, width: 1.5, dash: '' },
|
|
1452
|
-
};
|
|
1453
|
-
|
|
1454
|
-
// Build set of edge pairs to detect anti-parallel edges (A→B + B→A)
|
|
1455
|
-
const edgePairSet = new Set(comms.map(c => `${c.from}|${c.to}`));
|
|
1456
|
-
|
|
1457
|
-
comms.forEach(edge => {
|
|
1458
|
-
const fromPos = positions[edge.from];
|
|
1459
|
-
const toPos = positions[edge.to];
|
|
1460
|
-
if (!fromPos || !toPos || edge.from === edge.to) return;
|
|
1461
|
-
|
|
1462
|
-
const style = strokeMap[edge.type] || strokeMap.command;
|
|
1463
|
-
const marker = markerMap[edge.type] || 'arr-teal';
|
|
1464
|
-
|
|
1465
|
-
// Nudge endpoints toward each edge center to avoid overlap with nodes
|
|
1466
|
-
const dx = toPos.x - fromPos.x, dy = toPos.y - fromPos.y;
|
|
1467
|
-
const len = Math.sqrt(dx*dx + dy*dy) || 1;
|
|
1468
|
-
const R = 24; // node radius to clear
|
|
1469
|
-
|
|
1470
|
-
// Perpendicular offset for anti-parallel pairs so both edges remain visible
|
|
1471
|
-
let px = 0, py = 0;
|
|
1472
|
-
if (edgePairSet.has(`${edge.to}|${edge.from}`)) {
|
|
1473
|
-
const [canonFrom, canonTo] = edge.from < edge.to ? [edge.from, edge.to] : [edge.to, edge.from];
|
|
1474
|
-
const cp = positions[canonFrom], ct = positions[canonTo];
|
|
1475
|
-
const cdx = ct.x - cp.x, cdy = ct.y - cp.y;
|
|
1476
|
-
const clen = Math.sqrt(cdx*cdx + cdy*cdy) || 1;
|
|
1477
|
-
const sign = edge.from === canonFrom ? 1 : -1;
|
|
1478
|
-
px = sign * (-cdy / clen) * 6;
|
|
1479
|
-
py = sign * ( cdx / clen) * 6;
|
|
1480
|
-
}
|
|
1481
|
-
|
|
1482
|
-
const x1 = fromPos.x + (dx/len)*R + px;
|
|
1483
|
-
const y1 = fromPos.y + (dy/len)*R + py;
|
|
1484
|
-
const x2 = toPos.x - (dx/len)*(R + 4) + px;
|
|
1485
|
-
const y2 = toPos.y - (dy/len)*(R + 4) + py;
|
|
1486
|
-
|
|
1487
|
-
const line = document.createElementNS(NS, 'line');
|
|
1488
|
-
line.setAttribute('x1', x1.toFixed(1));
|
|
1489
|
-
line.setAttribute('y1', y1.toFixed(1));
|
|
1490
|
-
line.setAttribute('x2', x2.toFixed(1));
|
|
1491
|
-
line.setAttribute('y2', y2.toFixed(1));
|
|
1492
|
-
line.setAttribute('stroke', style.color);
|
|
1493
|
-
line.setAttribute('stroke-opacity', style.opacity);
|
|
1494
|
-
line.setAttribute('stroke-width', style.width);
|
|
1495
|
-
if (style.dash) line.setAttribute('stroke-dasharray', style.dash);
|
|
1496
|
-
line.setAttribute('marker-end', `url(#${marker})`);
|
|
1497
|
-
edgesG.appendChild(line);
|
|
1498
|
-
});
|
|
1499
|
-
|
|
1500
|
-
// Draw nodes
|
|
1501
|
-
roles.forEach((role, i) => {
|
|
1502
|
-
const pos = positions[role.id];
|
|
1503
|
-
if (!pos) return;
|
|
1504
|
-
const isBoss = !role.reports_to || role.reports_to === role.id;
|
|
1505
|
-
const color = roleColor(i);
|
|
1506
|
-
|
|
1507
|
-
const g = document.createElementNS(NS, 'g');
|
|
1508
|
-
g.setAttribute('transform', `translate(${pos.x.toFixed(1)},${pos.y.toFixed(1)})`);
|
|
1509
|
-
|
|
1510
|
-
// Pulse ring (running state)
|
|
1511
|
-
if (running) {
|
|
1512
|
-
const pulse = document.createElementNS(NS, 'circle');
|
|
1513
|
-
pulse.setAttribute('r', '26');
|
|
1514
|
-
pulse.setAttribute('class', 'oc-node-pulse running');
|
|
1515
|
-
pulse.setAttribute('stroke', isBoss ? 'oklch(62% 0.20 186)' : 'oklch(68% 0.20 150)');
|
|
1516
|
-
g.appendChild(pulse);
|
|
1517
|
-
}
|
|
1518
|
-
|
|
1519
|
-
// Node circle
|
|
1520
|
-
const circle = document.createElementNS(NS, 'circle');
|
|
1521
|
-
circle.setAttribute('r', '22');
|
|
1522
|
-
circle.setAttribute('class', `oc-node-bg ${isBoss ? 'boss' : 'peer'}`);
|
|
1523
|
-
circle.setAttribute('stroke', color);
|
|
1524
|
-
circle.setAttribute('filter', 'url(#node-glow)');
|
|
1525
|
-
g.appendChild(circle);
|
|
1526
|
-
|
|
1527
|
-
// Role title — abbreviated to fit circle
|
|
1528
|
-
const titleText = document.createElementNS(NS, 'text');
|
|
1529
|
-
titleText.setAttribute('class', 'oc-node-text');
|
|
1530
|
-
titleText.setAttribute('y', '-4');
|
|
1531
|
-
const title = role.title || role.id;
|
|
1532
|
-
const shortTitle = title.length > 10 ? title.slice(0, 9) + '…' : title;
|
|
1533
|
-
titleText.textContent = shortTitle;
|
|
1534
|
-
titleText.style.fill = color;
|
|
1535
|
-
g.appendChild(titleText);
|
|
1536
|
-
|
|
1537
|
-
// Agent type
|
|
1538
|
-
if (role.agent_type) {
|
|
1539
|
-
const subText = document.createElementNS(NS, 'text');
|
|
1540
|
-
subText.setAttribute('class', 'oc-node-sub');
|
|
1541
|
-
subText.setAttribute('y', '10');
|
|
1542
|
-
const agent = role.agent_type.length > 12 ? role.agent_type.slice(0, 11) + '…' : role.agent_type;
|
|
1543
|
-
subText.textContent = agent;
|
|
1544
|
-
g.appendChild(subText);
|
|
1545
|
-
}
|
|
1546
|
-
|
|
1547
|
-
nodesG.appendChild(g);
|
|
1548
|
-
});
|
|
1549
|
-
}
|
|
1550
|
-
|
|
1551
|
-
function computeLayout(roles, comms, topology, W, H) {
|
|
1552
|
-
const positions = {};
|
|
1553
|
-
const n = roles.length;
|
|
1554
|
-
if (n === 0) return positions;
|
|
1555
|
-
|
|
1556
|
-
const cx = W / 2, cy = H / 2;
|
|
1557
|
-
const PAD = 60;
|
|
1558
|
-
|
|
1559
|
-
if (topology === 'mesh') {
|
|
1560
|
-
// All nodes in a circle
|
|
1561
|
-
roles.forEach((role, i) => {
|
|
1562
|
-
const angle = (2 * Math.PI * i / n) - Math.PI / 2;
|
|
1563
|
-
const r = Math.min((W - PAD*2) / 2, (H - PAD*2) / 2) * 0.8;
|
|
1564
|
-
positions[role.id] = {
|
|
1565
|
-
x: cx + r * Math.cos(angle),
|
|
1566
|
-
y: cy + r * Math.sin(angle),
|
|
1567
|
-
};
|
|
1568
|
-
});
|
|
1569
|
-
|
|
1570
|
-
} else if (topology === 'star') {
|
|
1571
|
-
// Boss in center, others around edge
|
|
1572
|
-
const boss = roles.find(r => !r.reports_to) || roles[0];
|
|
1573
|
-
const rest = roles.filter(r => r.id !== boss.id);
|
|
1574
|
-
positions[boss.id] = { x: cx, y: cy };
|
|
1575
|
-
const r2 = Math.min((W - PAD*2) / 2, (H - PAD*2) / 2) * 0.75;
|
|
1576
|
-
rest.forEach((role, i) => {
|
|
1577
|
-
const angle = (2 * Math.PI * i / rest.length) - Math.PI / 2;
|
|
1578
|
-
positions[role.id] = {
|
|
1579
|
-
x: cx + r2 * Math.cos(angle),
|
|
1580
|
-
y: cy + r2 * Math.sin(angle),
|
|
1581
|
-
};
|
|
1582
|
-
});
|
|
1583
|
-
|
|
1584
|
-
} else {
|
|
1585
|
-
// Hierarchical: layer by reports_to depth
|
|
1586
|
-
const depthMap = {};
|
|
1587
|
-
const childMap = {};
|
|
1588
|
-
roles.forEach(r => {
|
|
1589
|
-
if (!r.reports_to || r.reports_to === r.id) { depthMap[r.id] = 0; }
|
|
1590
|
-
const parent = r.reports_to;
|
|
1591
|
-
if (parent && parent !== r.id) {
|
|
1592
|
-
if (!childMap[parent]) childMap[parent] = [];
|
|
1593
|
-
childMap[parent].push(r.id);
|
|
1594
|
-
}
|
|
1595
|
-
});
|
|
1596
|
-
// BFS to assign depths
|
|
1597
|
-
let changed = true, iter = 0;
|
|
1598
|
-
while (changed && iter < 20) {
|
|
1599
|
-
changed = false; iter++;
|
|
1600
|
-
roles.forEach(r => {
|
|
1601
|
-
if (r.reports_to && r.reports_to !== r.id && depthMap[r.reports_to] !== undefined) {
|
|
1602
|
-
const newDepth = (depthMap[r.reports_to] || 0) + 1;
|
|
1603
|
-
if (depthMap[r.id] !== newDepth) { depthMap[r.id] = newDepth; changed = true; }
|
|
1604
|
-
}
|
|
1605
|
-
});
|
|
1606
|
-
}
|
|
1607
|
-
// Assign depth 0 to any unresolved
|
|
1608
|
-
roles.forEach(r => { if (depthMap[r.id] === undefined) depthMap[r.id] = 1; });
|
|
1609
|
-
|
|
1610
|
-
const maxDepth = Math.max(...Object.values(depthMap));
|
|
1611
|
-
const layerMap = {};
|
|
1612
|
-
Object.entries(depthMap).forEach(([id, depth]) => {
|
|
1613
|
-
if (!layerMap[depth]) layerMap[depth] = [];
|
|
1614
|
-
layerMap[depth].push(id);
|
|
1615
|
-
});
|
|
1616
|
-
|
|
1617
|
-
const rowH = maxDepth > 0 ? (H - PAD * 2) / (maxDepth + 1) : H - PAD * 2;
|
|
1618
|
-
Object.entries(layerMap).forEach(([depth, ids]) => {
|
|
1619
|
-
const y = PAD + Number(depth) * rowH + (maxDepth > 0 ? rowH / 2 : H / 2);
|
|
1620
|
-
ids.forEach((id, i) => {
|
|
1621
|
-
const colW = (W - PAD * 2) / ids.length;
|
|
1622
|
-
const x = PAD + colW * i + colW / 2;
|
|
1623
|
-
positions[id] = { x, y };
|
|
1624
|
-
});
|
|
1625
|
-
});
|
|
1626
|
-
}
|
|
1627
|
-
|
|
1628
|
-
return positions;
|
|
1629
|
-
}
|
|
1630
|
-
|
|
1631
|
-
// ── ROLES TAB ─────────────────────────────────────────────────────
|
|
1632
|
-
function renderRoles() {
|
|
1633
|
-
const d = orgDetailData;
|
|
1634
|
-
const roles = Array.isArray(d.roles) ? d.roles : [];
|
|
1635
|
-
const grid = document.getElementById('roles-grid');
|
|
1636
|
-
grid.innerHTML = '';
|
|
1637
|
-
|
|
1638
|
-
if (!roles.length) {
|
|
1639
|
-
grid.innerHTML = '<div style="color:var(--dim);font-size:9px;letter-spacing:1px;">NO ROLES DEFINED</div>';
|
|
1640
|
-
return;
|
|
1641
|
-
}
|
|
1642
|
-
|
|
1643
|
-
roles.forEach((role, i) => {
|
|
1644
|
-
const color = roleColor(i);
|
|
1645
|
-
const isBoss = !role.reports_to || role.reports_to === role.id;
|
|
1646
|
-
const resps = Array.isArray(role.responsibilities) ? role.responsibilities : [];
|
|
1647
|
-
|
|
1648
|
-
const block = document.createElement('div');
|
|
1649
|
-
block.className = 'role-block';
|
|
1650
|
-
|
|
1651
|
-
block.innerHTML = `
|
|
1652
|
-
<div class="rb-header">
|
|
1653
|
-
<div class="rb-dot" style="background:${color}; box-shadow:0 0 4px ${color.replace(')', ' / 0.31)')};"></div>
|
|
1654
|
-
<div class="rb-title">${esc(role.title || role.id)}</div>
|
|
1655
|
-
${role.agent_type ? `<span class="rb-agent">${esc(role.agent_type)}</span>` : ''}
|
|
1656
|
-
</div>
|
|
1657
|
-
<div class="rb-id">id: <span style="color:var(--muted)">${esc(role.id)}</span>${isBoss ? ' <span style="color:var(--teal);font-size:8px;margin-left:4px">BOSS</span>' : ''}</div>
|
|
1658
|
-
${role.reports_to && !isBoss ? `<div class="rb-reports">reports to: <span>${esc(role.reports_to)}</span></div>` : ''}
|
|
1659
|
-
${resps.length ? `<div class="rb-resps">${resps.map(r => `<div class="rb-resp-item">${esc(r)}</div>`).join('')}</div>` : ''}
|
|
1660
|
-
`;
|
|
1661
|
-
|
|
1662
|
-
grid.appendChild(block);
|
|
1663
|
-
});
|
|
1664
|
-
}
|
|
1665
|
-
|
|
1666
|
-
// ── ACTIVITY TAB ─────────────────────────────────────────────────
|
|
1667
|
-
function renderActivity() {
|
|
1668
|
-
const log = document.getElementById('activity-log');
|
|
1669
|
-
const activity = orgDetailData._activity;
|
|
1670
|
-
|
|
1671
|
-
// Also inject org event log from SSE-captured events
|
|
1672
|
-
const orgEvents = orgEventLog[selectedOrg] || [];
|
|
1673
|
-
|
|
1674
|
-
// Merge and sort
|
|
1675
|
-
let events = [];
|
|
1676
|
-
if (Array.isArray(activity)) events = [...activity];
|
|
1677
|
-
events.push(...orgEvents);
|
|
1678
|
-
events.sort((a, b) => (b.ts || 0) - (a.ts || 0));
|
|
1679
|
-
|
|
1680
|
-
if (!events.length) {
|
|
1681
|
-
log.innerHTML = '<div class="act-empty">NO ACTIVITY RECORDED</div>';
|
|
1682
|
-
return;
|
|
1683
|
-
}
|
|
1684
|
-
|
|
1685
|
-
log.innerHTML = events.slice(0, 80).map(ev => {
|
|
1686
|
-
const t = fmtTime(ev.ts);
|
|
1687
|
-
const type = fmtEventType(ev.type);
|
|
1688
|
-
const detail = ev.role ? ev.role : ev.msg ? ev.msg : ev.agent ? ev.agent : '';
|
|
1689
|
-
return `<div class="act-row">
|
|
1690
|
-
<span class="act-time">${esc(t)}</span>
|
|
1691
|
-
<span class="act-type">${esc(type)}</span>
|
|
1692
|
-
<span class="act-msg">${esc(detail)}</span>
|
|
1693
|
-
</div>`;
|
|
1694
|
-
}).join('');
|
|
1695
|
-
}
|
|
1696
|
-
|
|
1697
|
-
// ── HEALTH TAB ─────────────────────────────────────────────────────
|
|
1698
|
-
function renderHealth() {
|
|
1699
|
-
const health = orgDetailData._health;
|
|
1700
|
-
const listOrg = allOrgs.find(o => o.name === selectedOrg) || {};
|
|
1701
|
-
const roles = Array.isArray(orgDetailData.roles) ? orgDetailData.roles : [];
|
|
1702
|
-
const running = listOrg.running;
|
|
1703
|
-
|
|
1704
|
-
const grid = document.getElementById('health-grid');
|
|
1705
|
-
const detail = document.getElementById('health-detail');
|
|
1706
|
-
|
|
1707
|
-
grid.innerHTML = `
|
|
1708
|
-
<div class="health-cell">
|
|
1709
|
-
<div class="hc-label">STATUS</div>
|
|
1710
|
-
<div class="hc-value ${running ? 'green' : ''}">${running ? 'LIVE' : 'IDLE'}</div>
|
|
1711
|
-
</div>
|
|
1712
|
-
<div class="health-cell">
|
|
1713
|
-
<div class="hc-label">ROLES</div>
|
|
1714
|
-
<div class="hc-value">${roles.length}</div>
|
|
1715
|
-
</div>
|
|
1716
|
-
<div class="health-cell">
|
|
1717
|
-
<div class="hc-label">TOPOLOGY</div>
|
|
1718
|
-
<div class="hc-value" style="font-size:13px">${esc((orgDetailData.topology || '—').toUpperCase())}</div>
|
|
1719
|
-
</div>
|
|
1720
|
-
${health?.agents_active !== undefined ? `
|
|
1721
|
-
<div class="health-cell">
|
|
1722
|
-
<div class="hc-label">AGENTS</div>
|
|
1723
|
-
<div class="hc-value ${health.agents_active > 0 ? 'green' : ''}">${health.agents_active}</div>
|
|
1724
|
-
<div class="hc-sub">active</div>
|
|
1725
|
-
</div>` : ''}
|
|
1726
|
-
${health?.tasks_pending !== undefined ? `
|
|
1727
|
-
<div class="health-cell">
|
|
1728
|
-
<div class="hc-label">TASKS</div>
|
|
1729
|
-
<div class="hc-value ${health.tasks_pending > 5 ? 'amber' : ''}">${health.tasks_pending}</div>
|
|
1730
|
-
<div class="hc-sub">pending</div>
|
|
1731
|
-
</div>` : ''}
|
|
1732
|
-
${health?.run_success_rate_7d !== null && health?.run_success_rate_7d !== undefined ? `
|
|
1733
|
-
<div class="health-cell">
|
|
1734
|
-
<div class="hc-label">SUCCESS</div>
|
|
1735
|
-
<div class="hc-value ${health.run_success_rate_7d >= 80 ? 'green' : health.run_success_rate_7d >= 50 ? 'amber' : 'red'}">${health.run_success_rate_7d}%</div>
|
|
1736
|
-
<div class="hc-sub">7d rate (${health.total_runs_7d || 0} runs)</div>
|
|
1737
|
-
</div>` : ''}
|
|
1738
|
-
${health?.budget_used_pct !== null && health?.budget_used_pct !== undefined ? `
|
|
1739
|
-
<div class="health-cell">
|
|
1740
|
-
<div class="hc-label">BUDGET</div>
|
|
1741
|
-
<div class="hc-value ${health.budget_used_pct > 90 ? 'red' : health.budget_used_pct > 70 ? 'amber' : ''}">${health.budget_used_pct}%</div>
|
|
1742
|
-
<div class="hc-sub">tokens used</div>
|
|
1743
|
-
</div>` : ''}
|
|
1744
|
-
`;
|
|
1745
|
-
|
|
1746
|
-
if (health?.errors && health.errors.length) {
|
|
1747
|
-
detail.innerHTML = `
|
|
1748
|
-
<div style="margin-top:16px">
|
|
1749
|
-
<div style="font-size:8px;letter-spacing:2px;color:var(--dim);margin-bottom:8px">RECENT ERRORS</div>
|
|
1750
|
-
${health.errors.slice(0,5).map(e => `
|
|
1751
|
-
<div style="font-size:9px;color:var(--red);padding:5px 0;border-bottom:1px solid oklch(62% 0.22 25 / 0.1)">
|
|
1752
|
-
${esc(e)}
|
|
1753
|
-
</div>`).join('')}
|
|
1754
|
-
</div>`;
|
|
1755
|
-
} else {
|
|
1756
|
-
detail.innerHTML = health ? `
|
|
1757
|
-
<div style="margin-top:16px;font-size:9px;color:var(--dim);letter-spacing:1px;">
|
|
1758
|
-
${running ? 'ORG IS RUNNING — NO ERRORS DETECTED' : 'ORG IS IDLE'}
|
|
1759
|
-
</div>` : `
|
|
1760
|
-
<div style="margin-top:16px;font-size:9px;color:var(--dim);letter-spacing:1px;">
|
|
1761
|
-
HEALTH DATA UNAVAILABLE
|
|
1762
|
-
</div>`;
|
|
1763
|
-
}
|
|
1764
|
-
|
|
1765
|
-
loadRunHistory();
|
|
1766
|
-
loadOrgMemory();
|
|
1767
|
-
}
|
|
1768
|
-
|
|
1769
|
-
// Run history (history.jsonl, written by the daemon at each stopOrg): outcome,
|
|
1770
|
-
// duration, tokens per completed run — rendered under the health grid.
|
|
1771
|
-
async function loadRunHistory() {
|
|
1772
|
-
const el = document.getElementById('health-history');
|
|
1773
|
-
if (!el || !selectedOrg) return;
|
|
1774
|
-
try {
|
|
1775
|
-
const listOrg = allOrgs.find(o => o.name === selectedOrg) || {};
|
|
1776
|
-
const r = await fetch(`/api/orgs/${encodeURIComponent(selectedOrg)}/history?dir=${encodeURIComponent(listOrg.projectDir || '')}`);
|
|
1777
|
-
if (!r.ok) { el.innerHTML = ''; return; }
|
|
1778
|
-
const runs = (await r.json()).runs || [];
|
|
1779
|
-
if (!runs.length) { el.innerHTML = ''; return; }
|
|
1780
|
-
const outcomeColor = s => s === 'achieved' ? 'var(--teal)' : s === 'partial' ? 'var(--amber, #d90)' : 'var(--red)';
|
|
1781
|
-
el.innerHTML = `
|
|
1782
|
-
<div style="margin-top:16px">
|
|
1783
|
-
<div style="font-size:8px;letter-spacing:2px;color:var(--dim);margin-bottom:8px">RUN HISTORY (${runs.length})</div>
|
|
1784
|
-
${runs.slice(0, 10).map(h => `
|
|
1785
|
-
<div style="font-size:9px;padding:5px 0;border-bottom:1px solid oklch(50% 0 0 / 0.1);display:flex;gap:10px;align-items:baseline">
|
|
1786
|
-
<span style="color:var(--dim);white-space:nowrap">${esc(h.run || '?')}</span>
|
|
1787
|
-
<span style="color:var(--muted);white-space:nowrap">${Number.isFinite(Number(h.durationMs)) && h.durationMs != null ? Math.round(Number(h.durationMs) / 1000) + 's' : '—'} · ${Number(h.totalTokens) || 0} tok</span>
|
|
1788
|
-
${h.outcome
|
|
1789
|
-
? `<span style="color:${outcomeColor(h.outcome.status)}">${esc(h.outcome.status.toUpperCase())}</span>
|
|
1790
|
-
<span style="color:var(--muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap">${esc(h.outcome.summary || '')}</span>`
|
|
1791
|
-
: `<span style="color:var(--dim)">NO OUTCOME</span>`}
|
|
1792
|
-
${Array.isArray(h.crashes) && h.crashes.length ? `<span style="color:var(--red)">✗ ${Number(h.crashes.length)} crash</span>` : ''}
|
|
1793
|
-
</div>`).join('')}
|
|
1794
|
-
</div>`;
|
|
1795
|
-
} catch (_) { el.innerHTML = ''; }
|
|
1796
|
-
}
|
|
1797
|
-
|
|
1798
|
-
// Org memory: knowledge-graph size, learned entities, and distilled rules
|
|
1799
|
-
// (accumulated across runs via org_learn / heuristic extraction).
|
|
1800
|
-
async function loadOrgMemory() {
|
|
1801
|
-
const el = document.getElementById('health-memory');
|
|
1802
|
-
if (!el || !selectedOrg) return;
|
|
1803
|
-
try {
|
|
1804
|
-
const listOrg = allOrgs.find(o => o.name === selectedOrg) || {};
|
|
1805
|
-
const r = await fetch(`/api/orgs/${encodeURIComponent(selectedOrg)}/memory?dir=${encodeURIComponent(listOrg.projectDir || '')}`);
|
|
1806
|
-
if (!r.ok) { el.innerHTML = ''; return; }
|
|
1807
|
-
const m = await r.json();
|
|
1808
|
-
if (!m.nodes && !m.rules) { el.innerHTML = ''; return; }
|
|
1809
|
-
el.innerHTML = `
|
|
1810
|
-
<div style="margin-top:16px">
|
|
1811
|
-
<div style="font-size:8px;letter-spacing:2px;color:var(--dim);margin-bottom:8px">ORG MEMORY — ${Number(m.nodes) || 0} ENTITIES · ${Number(m.edges) || 0} RELATIONS · ${Number(m.rules) || 0} RULES</div>
|
|
1812
|
-
${Array.isArray(m.glossary) && m.glossary.length ? `
|
|
1813
|
-
<div style="font-size:9px;color:var(--muted);line-height:1.7">${m.glossary.map(g => `<span style="border:1px solid oklch(50% 0 0 / 0.25);border-radius:3px;padding:1px 5px;margin-right:4px;white-space:nowrap;display:inline-block;margin-bottom:3px">${esc(g)}</span>`).join('')}</div>` : ''}
|
|
1814
|
-
${Array.isArray(m.ruleTexts) && m.ruleTexts.length ? m.ruleTexts.map(t => `
|
|
1815
|
-
<div style="font-size:9px;padding:4px 0;border-bottom:1px solid oklch(50% 0 0 / 0.1);color:var(--muted)">▸ ${esc(t)}</div>`).join('') : ''}
|
|
1816
|
-
</div>`;
|
|
1817
|
-
} catch (_) { el.innerHTML = ''; }
|
|
1818
|
-
}
|
|
1819
|
-
|
|
1820
|
-
// ── CHAT TAB ──────────────────────────────────────────────────────
|
|
1821
|
-
let chatSessions = []; // all sessions from /api/mastermind/sessions
|
|
1822
|
-
let chatCurrentId = null; // currently viewed session id
|
|
1823
|
-
let chatCurrentAgent = 'all'; // 'all' or an agent/role name
|
|
1824
|
-
let chatScrollLocked = false;
|
|
1825
|
-
let mmSse = null;
|
|
1826
|
-
|
|
1827
|
-
async function loadChatSessions() {
|
|
1828
|
-
try {
|
|
1829
|
-
const r = await fetch('/api/mastermind/sessions');
|
|
1830
|
-
if (!r.ok) return;
|
|
1831
|
-
chatSessions = await r.json();
|
|
1832
|
-
populateChatSelect();
|
|
1833
|
-
} catch(_) {}
|
|
1834
|
-
}
|
|
1835
|
-
|
|
1836
|
-
function orgSessionMatch(s) {
|
|
1837
|
-
if (!selectedOrg) return true;
|
|
1838
|
-
const orgLc = selectedOrg.toLowerCase();
|
|
1839
|
-
const prompt = (s.prompt || '').toLowerCase();
|
|
1840
|
-
if (prompt.includes('running org: ' + orgLc) || prompt.includes('org: ' + orgLc)) return true;
|
|
1841
|
-
// Only genuine org-run events (org:comms, org:artifact, org:start, ...) count.
|
|
1842
|
-
// agent:bash / agent:edit / etc. also carry an `org` field (ambient "which
|
|
1843
|
-
// org was active while this Claude Code session ran" tagging) — matching on
|
|
1844
|
-
// those too would pull an unrelated dev session's entire tool-call history
|
|
1845
|
-
// into this org's Chat/Files tabs whenever that org happened to be running
|
|
1846
|
-
// at the same time.
|
|
1847
|
-
return (s.events || []).some(ev => (ev.type || '').startsWith('org:') && (ev.org || '').toLowerCase() === orgLc);
|
|
1848
|
-
}
|
|
1849
|
-
|
|
1850
|
-
function populateChatSelect() {
|
|
1851
|
-
const sel = document.getElementById('chat-sess-select');
|
|
1852
|
-
if (!sel) return;
|
|
1853
|
-
const prev = chatCurrentId || sel.value;
|
|
1854
|
-
|
|
1855
|
-
// Filter to sessions for this org; fall back to all if none match
|
|
1856
|
-
const orgSessions = chatSessions.filter(orgSessionMatch);
|
|
1857
|
-
const list = orgSessions.length ? orgSessions : chatSessions;
|
|
1858
|
-
const isFiltered = orgSessions.length > 0 && orgSessions.length < chatSessions.length;
|
|
1859
|
-
|
|
1860
|
-
const placeholder = isFiltered
|
|
1861
|
-
? `— ${orgSessions.length} session${orgSessions.length !== 1 ? 's' : ''} for ${selectedOrg} —`
|
|
1862
|
-
: '— select a session —';
|
|
1863
|
-
sel.innerHTML = `<option value="">${placeholder}</option>`;
|
|
1864
|
-
|
|
1865
|
-
list.forEach(s => {
|
|
1866
|
-
const d = new Date(s.ts);
|
|
1867
|
-
const ts = d.toLocaleTimeString([],{hour:'2-digit',minute:'2-digit',second:'2-digit'});
|
|
1868
|
-
const date = d.toLocaleDateString([],{month:'short',day:'numeric'});
|
|
1869
|
-
const prompt = (s.prompt || '').replace(/^running org:\s*/i, '').slice(0, 40);
|
|
1870
|
-
const label = `${date} ${ts} ${prompt}${prompt.length >= 40 ? '…' : ''} [${s.status || '?'}]`;
|
|
1871
|
-
const opt = document.createElement('option');
|
|
1872
|
-
opt.value = s.id;
|
|
1873
|
-
opt.textContent = label;
|
|
1874
|
-
if (s.id === prev) opt.selected = true;
|
|
1875
|
-
sel.appendChild(opt);
|
|
1876
|
-
});
|
|
1877
|
-
|
|
1878
|
-
// Auto-select most recent running session for this org
|
|
1879
|
-
if (!chatCurrentId) {
|
|
1880
|
-
const running = list.find(s => s.status === 'running');
|
|
1881
|
-
if (running) { sel.value = running.id; selectChatSession(running.id); }
|
|
1882
|
-
}
|
|
1883
|
-
}
|
|
1884
|
-
|
|
1885
|
-
window.selectChatSession = function(id) {
|
|
1886
|
-
chatCurrentId = id;
|
|
1887
|
-
chatCurrentAgent = 'all';
|
|
1888
|
-
const feed = document.getElementById('chat-feed-wrap');
|
|
1889
|
-
const empty = document.getElementById('chat-feed-empty');
|
|
1890
|
-
const bar = document.getElementById('chat-agent-bar');
|
|
1891
|
-
const sendBtn = document.getElementById('chat-send-btn');
|
|
1892
|
-
if (!id) {
|
|
1893
|
-
feed.querySelectorAll('.cmsg').forEach(e=>e.remove());
|
|
1894
|
-
if (empty) empty.style.display = 'block';
|
|
1895
|
-
if (bar) bar.style.display = 'none';
|
|
1896
|
-
if (sendBtn) sendBtn.disabled = true;
|
|
1897
|
-
return;
|
|
1898
|
-
}
|
|
1899
|
-
if (sendBtn) sendBtn.disabled = false;
|
|
1900
|
-
const sess = chatSessions.find(s => s.id === id);
|
|
1901
|
-
if (!sess) return;
|
|
1902
|
-
feed.querySelectorAll('.cmsg').forEach(e=>e.remove());
|
|
1903
|
-
if (empty) empty.style.display = 'none';
|
|
1904
|
-
populateChatAgentBar(sess.events || []);
|
|
1905
|
-
(sess.events || []).forEach(ev => appendChatEvent(ev, false));
|
|
1906
|
-
chatScrollFeed();
|
|
1907
|
-
};
|
|
1908
|
-
|
|
1909
|
-
function chatAgentMatchesFilter(ev) {
|
|
1910
|
-
if (chatCurrentAgent === 'all') return true;
|
|
1911
|
-
return ev.agent === chatCurrentAgent || ev.from === chatCurrentAgent || ev.to === chatCurrentAgent;
|
|
1912
|
-
}
|
|
1913
|
-
|
|
1914
|
-
function populateChatAgentBar(events) {
|
|
1915
|
-
const bar = document.getElementById('chat-agent-bar');
|
|
1916
|
-
if (!bar) return;
|
|
1917
|
-
const agentSet = new Set();
|
|
1918
|
-
(events || []).forEach(ev => {
|
|
1919
|
-
if (ev.agent) agentSet.add(ev.agent);
|
|
1920
|
-
if (ev.from && ev.from !== '?') agentSet.add(ev.from);
|
|
1921
|
-
if (ev.to && ev.to !== '?') agentSet.add(ev.to);
|
|
1922
|
-
});
|
|
1923
|
-
// Add org roles even if not yet seen in events
|
|
1924
|
-
if (orgDetailData && Array.isArray(orgDetailData.roles)) {
|
|
1925
|
-
orgDetailData.roles.forEach(r => {
|
|
1926
|
-
const n = typeof r === 'string' ? r : (r.role || r.name || r.id || '');
|
|
1927
|
-
if (n) agentSet.add(n);
|
|
1928
|
-
});
|
|
1929
|
-
}
|
|
1930
|
-
const agents = [...agentSet].sort();
|
|
1931
|
-
if (!agents.length) { bar.style.display = 'none'; return; }
|
|
1932
|
-
bar.style.display = 'flex';
|
|
1933
|
-
bar.innerHTML = '<span id="chat-agent-label">AGENT</span>';
|
|
1934
|
-
['all', ...agents].forEach(name => {
|
|
1935
|
-
const pill = document.createElement('button');
|
|
1936
|
-
pill.className = 'chat-agent-pill' + (chatCurrentAgent === name ? ' active' : '');
|
|
1937
|
-
pill.textContent = name === 'all' ? 'ALL' : name;
|
|
1938
|
-
pill.dataset.agent = name;
|
|
1939
|
-
pill.onclick = () => selectChatAgent(name);
|
|
1940
|
-
bar.appendChild(pill);
|
|
1941
|
-
});
|
|
1942
|
-
}
|
|
1943
|
-
|
|
1944
|
-
window.selectChatAgent = function(name) {
|
|
1945
|
-
chatCurrentAgent = name;
|
|
1946
|
-
document.querySelectorAll('#chat-agent-bar .chat-agent-pill').forEach(p => {
|
|
1947
|
-
p.classList.toggle('active', p.dataset.agent === name);
|
|
1948
|
-
});
|
|
1949
|
-
const feed = document.getElementById('chat-feed-wrap');
|
|
1950
|
-
const empty = document.getElementById('chat-feed-empty');
|
|
1951
|
-
const sess = chatSessions.find(s => s.id === chatCurrentId);
|
|
1952
|
-
feed.querySelectorAll('.cmsg').forEach(e => e.remove());
|
|
1953
|
-
if (!sess) return;
|
|
1954
|
-
const visible = (sess.events || []).filter(ev => chatAgentMatchesFilter(ev));
|
|
1955
|
-
if (!visible.length) {
|
|
1956
|
-
if (empty) { empty.style.display = 'block'; empty.textContent = name === 'all' ? 'No events.' : `No events for "${name}"`; }
|
|
1957
|
-
} else {
|
|
1958
|
-
if (empty) empty.style.display = 'none';
|
|
1959
|
-
visible.forEach(ev => appendChatEvent(ev, false));
|
|
1960
|
-
}
|
|
1961
|
-
chatScrollFeed();
|
|
1962
|
-
};
|
|
1963
|
-
|
|
1964
|
-
function appendChatEvent(ev, animate) {
|
|
1965
|
-
if (!chatAgentMatchesFilter(ev)) return;
|
|
1966
|
-
// Phase 3: Apply render mode filter
|
|
1967
|
-
if (chatRenderMode === 'summary' && !CHAT_SUMMARY_TYPES.has(ev.type)) return;
|
|
1968
|
-
if (chatRenderMode === 'detailed' && !CHAT_DETAILED_TYPES.has(ev.type)) return;
|
|
1969
|
-
// 'raw' mode: show everything
|
|
1970
|
-
const feed = document.getElementById('chat-feed-wrap');
|
|
1971
|
-
const empty = document.getElementById('chat-feed-empty');
|
|
1972
|
-
if (!feed) return;
|
|
1973
|
-
if (empty) empty.style.display = 'none';
|
|
1974
|
-
const ts = new Date(ev.ts || Date.now()).toLocaleTimeString([],{hour:'2-digit',minute:'2-digit',second:'2-digit'});
|
|
1975
|
-
const DCOLS = {build:'#60a5fa',idea:'#fbbf24',marketing:'#f472b6',review:'#34d399',research:'#a78bfa',content:'#fb923c',release:'#22d3ee',sales:'#f87171',ops:'#4ade80',finance:'#fde68a',orgs:'#c084fc'};
|
|
1976
|
-
const dc = d => DCOLS[d] || 'oklch(62% 0.20 186)';
|
|
1977
|
-
let el = null;
|
|
1978
|
-
|
|
1979
|
-
if (ev.type === 'session:start') {
|
|
1980
|
-
el = mkSys(`🔵 Session started${ev.prompt ? ': ' + esc(ev.prompt.slice(0,80)) : ''}`, ts);
|
|
1981
|
-
} else if (ev.type === 'session:complete') {
|
|
1982
|
-
el = mkSys(`🏁 Session complete — ${esc((ev.domains||[]).join(', ') || 'done')}`, ts);
|
|
1983
|
-
} else if (ev.type === 'domain:dispatch') {
|
|
1984
|
-
el = mkSys(`<span style="color:${dc(ev.domain)}">⚙ [${esc((ev.domain||'').toUpperCase())}]</span> ${esc(ev.cmd||'dispatched')}`, ts);
|
|
1985
|
-
} else if (ev.type === 'domain:complete') {
|
|
1986
|
-
const arts = (ev.artifacts||[]).length ? ` · ${ev.artifacts.length} artifact${ev.artifacts.length!==1?'s':''}` : '';
|
|
1987
|
-
el = mkSys(`<span style="color:${dc(ev.domain)}">✓ [${esc((ev.domain||'').toUpperCase())}]</span> ${esc(ev.status||'done')}${arts}`, ts);
|
|
1988
|
-
} else if (ev.type === 'agent:spawn') {
|
|
1989
|
-
const col = dc(ev.domain);
|
|
1990
|
-
const name = ev.agentType || ev.from || ev.agent || 'agent';
|
|
1991
|
-
el = mkAgent(name, `spawned: ${ev.task||'task'}`, ts, col, 'spawn');
|
|
1992
|
-
} else if (ev.type === 'agent:complete') {
|
|
1993
|
-
const name = ev.agentType || ev.role || ev.from || 'agent';
|
|
1994
|
-
const result = (ev.result || '').slice(0, 300);
|
|
1995
|
-
const cost = ev.cost_usd ? ` · $${parseFloat(ev.cost_usd).toFixed(4)}` : '';
|
|
1996
|
-
const tools = ev.toolCalls?.length ? ` · ${ev.toolCalls.slice(0,4).join(', ')}` : '';
|
|
1997
|
-
el = mkAgent(name, `${result || 'done'}${tools}${cost}`, ts, dc(ev.domain), 'complete');
|
|
1998
|
-
} else if (ev.type === 'org:comms') {
|
|
1999
|
-
el = mkIntercom(ev.from || 'boss', ev.to || 'agent', ev.msg || ev.message || '', ts);
|
|
2000
|
-
} else if (ev.type === 'agent:message') {
|
|
2001
|
-
el = mkAgent(ev.agent||'agent', ev.text||'', ts, dc(ev.domain), null);
|
|
2002
|
-
} else if (ev.type === 'intercom') {
|
|
2003
|
-
el = mkIntercom(ev.from, ev.to, ev.msg||'', ts);
|
|
2004
|
-
} else if (ev.type === 'user:message') {
|
|
2005
|
-
el = mkUser(ev.text||ev.msg||'', ts);
|
|
2006
|
-
} else if (ev.type === 'loop:start') {
|
|
2007
|
-
el = mkSys(`🔁 Loop: ${esc(ev.command||'')} (${ev.repeat||'?'} runs)`, ts);
|
|
2008
|
-
} else if (ev.type === 'loop:complete') {
|
|
2009
|
-
el = mkSys(`🔁 Loop done: ${esc(ev.command||'')} — ${ev.ranReps||'?'} run(s)`, ts);
|
|
2010
|
-
} else if (ev.type === 'org:artifact') {
|
|
2011
|
-
const _art = ev.artifact || (ev.path ? { path: ev.path, label: ev.label, mimeType: ev.mimeType } : null);
|
|
2012
|
-
if (_art) el = mkArtifact(_art, ts);
|
|
2013
|
-
else el = mkSys(`📄 artifact: ${esc(ev.label||ev.path||'file')}`, ts);
|
|
2014
|
-
} else {
|
|
2015
|
-
el = mkSys(`<span style="opacity:0.4">${esc(ev.type)}${ev.domain?' ['+esc(ev.domain)+']':''}</span>`, ts);
|
|
2016
|
-
}
|
|
2017
|
-
if (!el) return;
|
|
2018
|
-
if (animate) el.classList.add('new');
|
|
2019
|
-
feed.appendChild(el);
|
|
2020
|
-
}
|
|
2021
|
-
|
|
2022
|
-
function mkSys(html, ts) {
|
|
2023
|
-
const el = document.createElement('div');
|
|
2024
|
-
el.className = 'cmsg csys';
|
|
2025
|
-
el.innerHTML = `<div class="cbubble">${html} <span style="color:var(--dim);margin-left:8px">${ts}</span></div>`;
|
|
2026
|
-
return el;
|
|
2027
|
-
}
|
|
2028
|
-
function mkAgent(name, text, ts, color, typeTag) {
|
|
2029
|
-
const el = document.createElement('div');
|
|
2030
|
-
el.className = 'cmsg cagent';
|
|
2031
|
-
const tagStyle = color ? `style="border-color:${color}44;color:${color}"` : '';
|
|
2032
|
-
const ttag = typeTag ? `<span class="cevtype">${esc(typeTag)}</span>` : '';
|
|
2033
|
-
el.innerHTML = `<div class="cmsg-meta"><span class="ctag" ${tagStyle}>${esc(name)}</span>${ttag}<span class="cts">${ts}</span></div><div class="cbubble">${esc(text)}</div>`;
|
|
2034
|
-
return el;
|
|
2035
|
-
}
|
|
2036
|
-
function mkIntercom(from, to, text, ts) {
|
|
2037
|
-
const el = document.createElement('div');
|
|
2038
|
-
el.className = 'cmsg cic';
|
|
2039
|
-
el.innerHTML = `<div class="cmsg-meta"><span class="ctag sender">${esc(from||'?')}</span><span class="cic-arrow">→</span><span class="ctag receiver">${esc(to||'?')}</span><span class="cevtype">intercom</span><span class="cts">${ts}</span></div><div class="cbubble">${esc(text)}</div>`;
|
|
2040
|
-
return el;
|
|
2041
|
-
}
|
|
2042
|
-
function mkArtifact(art, ts) {
|
|
2043
|
-
const el = document.createElement('div');
|
|
2044
|
-
el.className = 'cmsg csys';
|
|
2045
|
-
const isText = (art.mimeType || '').startsWith('text/') || (art.mimeType || '') === 'application/json';
|
|
2046
|
-
const labelRaw = art.label || (art.path || 'artifact').split('/').pop();
|
|
2047
|
-
const meta = [art.mimeType, art.size ? `${Math.round(art.size/1024*10)/10} KB` : null, art.path ? art.path.split('/').slice(-2).join('/') : null].filter(Boolean).join(' · ');
|
|
2048
|
-
const viewBtn = isText && art.path
|
|
2049
|
-
? `<button onclick="viewArtifact(${JSON.stringify(art.path)},${JSON.stringify(labelRaw)})" style="background:#1a3a5a;color:#5d9fd9;border:1px solid #2980b944;border-radius:4px;padding:3px 9px;font-size:10px;font-weight:700;cursor:pointer;margin-left:auto">View</button>`
|
|
2050
|
-
: `<span style="font-size:10px;color:#555">Binary</span>`;
|
|
2051
|
-
el.innerHTML = `<div class="cbubble" style="padding:0"><div style="background:#1a1a2e;border:1px solid #3333aa44;border-radius:6px;padding:7px 10px;display:flex;align-items:center;gap:8px"><span style="font-size:16px">📄</span><div style="flex:1;min-width:0"><div style="font-size:12px;font-weight:700;color:#ccc;white-space:nowrap;overflow:hidden;text-overflow:ellipsis">${esc(labelRaw)}</div><div style="font-size:10px;color:#888">${esc(meta)}</div></div>${viewBtn}</div><span style="color:var(--dim);font-size:9px;padding:4px 6px 2px">${ts}</span></div>`;
|
|
2052
|
-
return el;
|
|
2053
|
-
}
|
|
2054
|
-
|
|
2055
|
-
function mkUser(text, ts) {
|
|
2056
|
-
const el = document.createElement('div');
|
|
2057
|
-
el.className = 'cmsg cuser';
|
|
2058
|
-
el.innerHTML = `<div class="cmsg-meta" style="justify-content:flex-end"><span class="cts">${ts}</span><span class="ctag" style="border-color:oklch(68% 0.18 250 / 0.35);color:oklch(68% 0.14 250)">you</span></div><div class="cbubble">${esc(text)}</div>`;
|
|
2059
|
-
return el;
|
|
2060
|
-
}
|
|
2061
|
-
|
|
2062
|
-
async function sendChatMessage() {
|
|
2063
|
-
const input = document.getElementById('chat-compose-input');
|
|
2064
|
-
const btn = document.getElementById('chat-send-btn');
|
|
2065
|
-
const text = (input?.value || '').trim();
|
|
2066
|
-
if (!text || !selectedOrg) return;
|
|
2067
|
-
btn.disabled = true;
|
|
2068
|
-
input.value = '';
|
|
2069
|
-
input.style.height = '';
|
|
2070
|
-
try {
|
|
2071
|
-
await fetch(`/api/orgs/${encodeURIComponent(selectedOrg)}/chat`, {
|
|
2072
|
-
method: 'POST',
|
|
2073
|
-
headers: { 'Content-Type': 'application/json' },
|
|
2074
|
-
body: JSON.stringify({ text }),
|
|
2075
|
-
});
|
|
2076
|
-
} catch(_) {}
|
|
2077
|
-
btn.disabled = false;
|
|
2078
|
-
input.focus();
|
|
2079
|
-
}
|
|
2080
|
-
|
|
2081
|
-
function chatComposeKey(e) {
|
|
2082
|
-
if (e.key === 'Enter' && !e.shiftKey) {
|
|
2083
|
-
e.preventDefault();
|
|
2084
|
-
sendChatMessage();
|
|
2085
|
-
}
|
|
2086
|
-
// Auto-resize
|
|
2087
|
-
const ta = e.target;
|
|
2088
|
-
ta.style.height = 'auto';
|
|
2089
|
-
ta.style.height = Math.min(ta.scrollHeight, 120) + 'px';
|
|
2090
|
-
}
|
|
2091
|
-
|
|
2092
|
-
async function viewArtifact(filePath, label) {
|
|
2093
|
-
const orgName = selectedOrg;
|
|
2094
|
-
if (!orgName || !filePath) return;
|
|
2095
|
-
const url = `/api/org/${encodeURIComponent(orgName)}/artifact?path=${encodeURIComponent(filePath)}`;
|
|
2096
|
-
try {
|
|
2097
|
-
const data = await fetch(url).then(r => r.json());
|
|
2098
|
-
if (data.binary) { console.warn('[orgs] Binary file — cannot display'); return; }
|
|
2099
|
-
if (data.error === 'file not found') { console.warn('[orgs] File no longer exists'); return; }
|
|
2100
|
-
if (data.error) { console.warn('[orgs] Artifact error:', data.error); return; }
|
|
2101
|
-
showArtifactPanel(label, data.content, data.mimeType);
|
|
2102
|
-
} catch(_) { console.warn('[orgs] Failed to load artifact', _); }
|
|
2103
|
-
}
|
|
2104
|
-
|
|
2105
|
-
function showArtifactPanel(label, content, mimeType) {
|
|
2106
|
-
let panel = document.getElementById('artifact-panel');
|
|
2107
|
-
if (!panel) {
|
|
2108
|
-
panel = document.createElement('div');
|
|
2109
|
-
panel.id = 'artifact-panel';
|
|
2110
|
-
panel.style.cssText = 'position:fixed;top:0;right:0;width:480px;height:100vh;background:#0a0a14;border-left:1px solid #333;z-index:1000;display:flex;flex-direction:column;overflow:hidden';
|
|
2111
|
-
document.body.appendChild(panel);
|
|
2112
|
-
}
|
|
2113
|
-
panel.innerHTML = `
|
|
2114
|
-
<div style="padding:12px 14px;border-bottom:1px solid #1a1a2a;display:flex;align-items:center;gap:10px">
|
|
2115
|
-
<span style="font-size:13px;font-weight:700;color:#ccc;flex:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap">${esc(label)}</span>
|
|
2116
|
-
<button onclick="document.getElementById('artifact-panel').remove()" style="background:none;border:none;color:#888;font-size:16px;cursor:pointer">✕</button>
|
|
2117
|
-
</div>
|
|
2118
|
-
<pre style="flex:1;overflow:auto;padding:14px;font-size:11px;line-height:1.6;color:#bbb;white-space:pre-wrap;word-break:break-word">${esc(content)}</pre>
|
|
2119
|
-
`;
|
|
2120
|
-
panel.style.display = 'flex';
|
|
2121
|
-
}
|
|
2122
|
-
|
|
2123
|
-
function chatScrollFeed() {
|
|
2124
|
-
const feed = document.getElementById('chat-feed-wrap');
|
|
2125
|
-
if (feed && !chatScrollLocked) feed.scrollTop = feed.scrollHeight;
|
|
2126
|
-
}
|
|
2127
|
-
|
|
2128
|
-
function renderChatTab() {
|
|
2129
|
-
if (chatSessions.length) {
|
|
2130
|
-
populateChatSelect(); // re-filter immediately with current selectedOrg
|
|
2131
|
-
}
|
|
2132
|
-
loadChatSessions(); // then refresh from server
|
|
2133
|
-
connectMmSSE();
|
|
2134
|
-
const feed = document.getElementById('chat-feed-wrap');
|
|
2135
|
-
if (feed) {
|
|
2136
|
-
feed.addEventListener('scroll', () => {
|
|
2137
|
-
chatScrollLocked = feed.scrollHeight - feed.scrollTop - feed.clientHeight > 80;
|
|
2138
|
-
}, { passive: true });
|
|
2139
|
-
}
|
|
2140
|
-
}
|
|
2141
|
-
|
|
2142
|
-
function connectMmSSE() {
|
|
2143
|
-
if (mmSse) return; // already connected
|
|
2144
|
-
mmSse = window.mmEventSource('/api/mastermind-stream');
|
|
2145
|
-
mmSse.onopen = () => {
|
|
2146
|
-
const dot = document.getElementById('chat-live-dot');
|
|
2147
|
-
const lbl = document.getElementById('chat-live-label');
|
|
2148
|
-
if (dot) dot.classList.add('on');
|
|
2149
|
-
if (lbl) lbl.textContent = 'LIVE';
|
|
2150
|
-
};
|
|
2151
|
-
mmSse.onmessage = e => {
|
|
2152
|
-
try {
|
|
2153
|
-
const ev = JSON.parse(e.data);
|
|
2154
|
-
handleMmEvent(ev);
|
|
2155
|
-
} catch(_) {}
|
|
2156
|
-
};
|
|
2157
|
-
mmSse.onerror = () => {
|
|
2158
|
-
const dot = document.getElementById('chat-live-dot');
|
|
2159
|
-
const lbl = document.getElementById('chat-live-label');
|
|
2160
|
-
if (dot) dot.classList.remove('on');
|
|
2161
|
-
if (lbl) lbl.textContent = 'RECONNECTING';
|
|
2162
|
-
mmSse = null;
|
|
2163
|
-
setTimeout(connectMmSSE, 4000);
|
|
2164
|
-
};
|
|
2165
|
-
}
|
|
2166
|
-
|
|
2167
|
-
function handleMmEvent(ev) {
|
|
2168
|
-
// Update in-memory sessions list
|
|
2169
|
-
if (ev.type === 'session:start') {
|
|
2170
|
-
const existing = chatSessions.find(s => s.id === ev.session);
|
|
2171
|
-
if (!existing) {
|
|
2172
|
-
chatSessions.unshift({ id: ev.session, ts: ev.ts||Date.now(), prompt: ev.prompt||'', status:'running', domains:[], events:[ev] });
|
|
2173
|
-
}
|
|
2174
|
-
populateChatSelect();
|
|
2175
|
-
// Auto-select if chat tab is active, nothing selected, and session matches this org
|
|
2176
|
-
if (currentTab === 'chat' && !chatCurrentId) {
|
|
2177
|
-
const newSess = chatSessions.find(s => s.id === ev.session);
|
|
2178
|
-
if (newSess && orgSessionMatch(newSess)) {
|
|
2179
|
-
const sel = document.getElementById('chat-sess-select');
|
|
2180
|
-
if (sel) { sel.value = ev.session; selectChatSession(ev.session); }
|
|
2181
|
-
}
|
|
2182
|
-
}
|
|
2183
|
-
return;
|
|
2184
|
-
}
|
|
2185
|
-
const sess = chatSessions.find(s => s.id === ev.session);
|
|
2186
|
-
if (sess) {
|
|
2187
|
-
(sess.events = sess.events || []).push(ev);
|
|
2188
|
-
if (ev.type === 'domain:dispatch' && ev.domain && !sess.domains.includes(ev.domain)) sess.domains.push(ev.domain);
|
|
2189
|
-
if (ev.type === 'session:complete') { sess.status = ev.status || 'complete'; sess.endTs = ev.ts; populateChatSelect(); }
|
|
2190
|
-
// If this is the currently-viewed session and chat tab is visible, append bubble
|
|
2191
|
-
if (currentTab === 'chat' && chatCurrentId === ev.session) {
|
|
2192
|
-
const hasNewAgent = (ev.agent && !document.querySelector(`[data-agent="${CSS.escape(ev.agent)}"]`))
|
|
2193
|
-
|| (ev.from && !document.querySelector(`[data-agent="${CSS.escape(ev.from)}"]`))
|
|
2194
|
-
|| (ev.to && !document.querySelector(`[data-agent="${CSS.escape(ev.to)}"]`));
|
|
2195
|
-
if (hasNewAgent) populateChatAgentBar(sess.events);
|
|
2196
|
-
appendChatEvent(ev, true);
|
|
2197
|
-
chatScrollFeed();
|
|
2198
|
-
}
|
|
2199
|
-
// Live-update the Files tab when a new asset lands while it's open — incremental,
|
|
2200
|
-
// not a rescan of every session's every event (that's collectOrgArtifacts()'s job,
|
|
2201
|
-
// reserved for tab-open / initial load in renderFilesTab()).
|
|
2202
|
-
if (ev.type === 'org:artifact' && currentTab === 'files') applyArtifactEvent(ev);
|
|
2203
|
-
}
|
|
2204
|
-
}
|
|
2205
|
-
|
|
2206
|
-
// ── Stop org action ────────────────────────────────────────────────
|
|
2207
|
-
window.stopCurrentOrg = async function() {
|
|
2208
|
-
if (!selectedOrg) return;
|
|
2209
|
-
try {
|
|
2210
|
-
await fetch(`/api/orgs/${encodeURIComponent(selectedOrg)}/stop`, { method: 'POST' });
|
|
2211
|
-
setTimeout(loadOrgs, 600);
|
|
2212
|
-
} catch (_) {}
|
|
2213
|
-
};
|
|
2214
|
-
|
|
2215
|
-
// ── SSE org events ────────────────────────────────────────────────
|
|
2216
|
-
const orgEventLog = {};
|
|
2217
|
-
let orgRunStartMs = null;
|
|
2218
|
-
let lsUptimeTimer = null;
|
|
2219
|
-
|
|
2220
|
-
let evtSource = null;
|
|
2221
|
-
function connectSSE() {
|
|
2222
|
-
if (evtSource) evtSource.close();
|
|
2223
|
-
evtSource = window.mmEventSource('/api/mastermind-stream');
|
|
2224
|
-
evtSource.onmessage = e => {
|
|
2225
|
-
try {
|
|
2226
|
-
const ev = JSON.parse(e.data);
|
|
2227
|
-
if (ev && typeof ev.org === 'string' && ev.type && (ev.type.startsWith('org:') || ev.type.startsWith('agent:'))) {
|
|
2228
|
-
const name = ev.org;
|
|
2229
|
-
if (!orgEventLog[name]) orgEventLog[name] = [];
|
|
2230
|
-
orgEventLog[name].push({ ...ev, _ts: Date.now() });
|
|
2231
|
-
if (orgEventLog[name].length > 50) orgEventLog[name].shift();
|
|
2232
|
-
|
|
2233
|
-
// Refresh if this org is selected
|
|
2234
|
-
if (name === selectedOrg && currentTab === 'activity') {
|
|
2235
|
-
renderActivity();
|
|
2236
|
-
}
|
|
2237
|
-
// Reload org list if start/stop event
|
|
2238
|
-
if (ev.type === 'org:start' || ev.type === 'org:stop') {
|
|
2239
|
-
setTimeout(loadOrgs, 400);
|
|
2240
|
-
}
|
|
2241
|
-
// Update live strip for selected org on chart tab
|
|
2242
|
-
if (name === selectedOrg && currentTab === 'chart') {
|
|
2243
|
-
if (ev.type === 'org:start') orgRunStartMs = Date.now();
|
|
2244
|
-
if (ev.type === 'org:stop') orgRunStartMs = null;
|
|
2245
|
-
appendLiveFeedRow(ev, true);
|
|
2246
|
-
updateLiveStrip();
|
|
2247
|
-
}
|
|
2248
|
-
}
|
|
2249
|
-
} catch (_) {}
|
|
2250
|
-
};
|
|
2251
|
-
evtSource.onerror = () => {
|
|
2252
|
-
setTimeout(connectSSE, 5000);
|
|
2253
|
-
};
|
|
2254
|
-
}
|
|
2255
|
-
|
|
2256
|
-
function updateLiveStrip() {
|
|
2257
|
-
const events = orgEventLog[selectedOrg] || [];
|
|
2258
|
-
const running = orgRunStartMs !== null;
|
|
2259
|
-
const dot = document.getElementById('ls-dot');
|
|
2260
|
-
const label = document.getElementById('ls-label');
|
|
2261
|
-
if (!dot || !label) return;
|
|
2262
|
-
dot.className = 'ls-dot' + (running ? ' running' : '');
|
|
2263
|
-
label.textContent = running ? 'RUNNING' : 'IDLE';
|
|
2264
|
-
|
|
2265
|
-
// Uptime
|
|
2266
|
-
const uptimeEl = document.getElementById('ls-uptime');
|
|
2267
|
-
if (uptimeEl) {
|
|
2268
|
-
if (running && orgRunStartMs) {
|
|
2269
|
-
const s = Math.floor((Date.now() - orgRunStartMs) / 1000);
|
|
2270
|
-
const h = Math.floor(s / 3600), m = Math.floor((s % 3600) / 60), sec = s % 60;
|
|
2271
|
-
uptimeEl.textContent = h ? `up ${h}h ${m}m` : m ? `up ${m}m ${sec}s` : `up ${sec}s`;
|
|
2272
|
-
} else {
|
|
2273
|
-
uptimeEl.textContent = '—';
|
|
2274
|
-
}
|
|
2275
|
-
}
|
|
2276
|
-
|
|
2277
|
-
// Last event
|
|
2278
|
-
const lastEl = document.getElementById('ls-last');
|
|
2279
|
-
if (lastEl && events.length) {
|
|
2280
|
-
const last = events[events.length - 1];
|
|
2281
|
-
const ago = Math.round((Date.now() - (last._ts || Date.now())) / 1000);
|
|
2282
|
-
lastEl.textContent = ago < 5 ? 'just now' : ago < 60 ? ago + 's ago' : Math.floor(ago/60) + 'm ago';
|
|
2283
|
-
} else if (lastEl) {
|
|
2284
|
-
lastEl.textContent = '—';
|
|
2285
|
-
}
|
|
2286
|
-
|
|
2287
|
-
// Events per 5 min
|
|
2288
|
-
const now = Date.now();
|
|
2289
|
-
const epmEl = document.getElementById('ls-epm');
|
|
2290
|
-
if (epmEl) {
|
|
2291
|
-
const recent = events.filter(ev => ev._ts && now - ev._ts < 5 * 60 * 1000).length;
|
|
2292
|
-
epmEl.textContent = recent + ' / 5m';
|
|
2293
|
-
}
|
|
2294
|
-
|
|
2295
|
-
// 12-bar sparkline (25s buckets)
|
|
2296
|
-
renderLiveSparkline(events);
|
|
2297
|
-
}
|
|
2298
|
-
|
|
2299
|
-
function renderLiveSparkline(events) {
|
|
2300
|
-
const wrap = document.getElementById('ls-sparkline');
|
|
2301
|
-
if (!wrap) return;
|
|
2302
|
-
const now = Date.now();
|
|
2303
|
-
const buckets = Array.from({ length: 12 }, (_, i) => {
|
|
2304
|
-
const start = now - (12 - i) * 25000;
|
|
2305
|
-
return events.filter(ev => ev._ts && ev._ts >= start && ev._ts < start + 25000).length;
|
|
2306
|
-
});
|
|
2307
|
-
const max = Math.max(1, ...buckets);
|
|
2308
|
-
wrap.innerHTML = buckets.map((count, i) => {
|
|
2309
|
-
const h = Math.max(2, Math.round(count / max * 18));
|
|
2310
|
-
return `<div class="ls-bar${i === 11 ? ' active' : ''}" style="height:${h}px" title="${count} events"></div>`;
|
|
2311
|
-
}).join('');
|
|
2312
|
-
}
|
|
2313
|
-
|
|
2314
|
-
function appendLiveFeedRow(ev, isNew) {
|
|
2315
|
-
const rows = document.getElementById('clf-rows');
|
|
2316
|
-
if (!rows) return;
|
|
2317
|
-
const time = new Date().toLocaleTimeString('en', { hour12: false, hour: '2-digit', minute: '2-digit', second: '2-digit' });
|
|
2318
|
-
const type = (ev.type || '').replace('org:', '');
|
|
2319
|
-
const msg = ev.message || ev.msg || ev.task?.slice(0,60) || (ev.result||'').slice(0,60) || ev.agentType || ev.agent || ev.role || ev.status || '';
|
|
2320
|
-
const row = document.createElement('div');
|
|
2321
|
-
row.className = 'clf-row' + (isNew ? ' new' : '');
|
|
2322
|
-
row.title = msg;
|
|
2323
|
-
row.innerHTML = `<span class="clf-time">${time}</span><span class="clf-type">${type}</span><span class="clf-msg">${msg}</span>`;
|
|
2324
|
-
rows.appendChild(row);
|
|
2325
|
-
if (rows.children.length > 30) rows.removeChild(rows.firstChild);
|
|
2326
|
-
rows.scrollTop = rows.scrollHeight;
|
|
2327
|
-
}
|
|
2328
|
-
|
|
2329
|
-
function initLiveStrip() {
|
|
2330
|
-
orgRunStartMs = null;
|
|
2331
|
-
const rows = document.getElementById('clf-rows');
|
|
2332
|
-
if (rows) rows.innerHTML = '';
|
|
2333
|
-
const events = orgEventLog[selectedOrg] || [];
|
|
2334
|
-
// Seed from existing event history
|
|
2335
|
-
events.forEach(ev => appendLiveFeedRow(ev, false));
|
|
2336
|
-
// Detect running state from list data
|
|
2337
|
-
const listOrg = allOrgs.find(o => o.name === selectedOrg);
|
|
2338
|
-
if (listOrg && listOrg.running && !orgRunStartMs) {
|
|
2339
|
-
const acts = orgDetailData._activity || [];
|
|
2340
|
-
const startEv = acts.slice().reverse().find(e => e.type === 'org:start' || e.type === 'org:create');
|
|
2341
|
-
if (startEv && startEv.ts) orgRunStartMs = startEv.ts;
|
|
2342
|
-
else if (listOrg.running_since) orgRunStartMs = listOrg.running_since;
|
|
2343
|
-
else orgRunStartMs = Date.now(); // fallback
|
|
2344
|
-
} else if (listOrg && !listOrg.running) {
|
|
2345
|
-
orgRunStartMs = null;
|
|
2346
|
-
}
|
|
2347
|
-
updateLiveStrip();
|
|
2348
|
-
if (lsUptimeTimer) clearInterval(lsUptimeTimer);
|
|
2349
|
-
lsUptimeTimer = setInterval(updateLiveStrip, 1000);
|
|
2350
|
-
}
|
|
2351
|
-
|
|
2352
|
-
// ── Data loading ──────────────────────────────────────────────────
|
|
2353
|
-
async function loadOrgs() {
|
|
2354
|
-
try {
|
|
2355
|
-
const r = await fetch('/api/orgs');
|
|
2356
|
-
allOrgs = await r.json();
|
|
2357
|
-
if (!Array.isArray(allOrgs)) allOrgs = [];
|
|
2358
|
-
} catch (_) {
|
|
2359
|
-
allOrgs = [];
|
|
2360
|
-
}
|
|
2361
|
-
renderSidebar();
|
|
2362
|
-
|
|
2363
|
-
// Re-render detail if selected org changed running state
|
|
2364
|
-
if (selectedOrg && orgDetailData) {
|
|
2365
|
-
const listOrg = allOrgs.find(o => o.name === selectedOrg);
|
|
2366
|
-
if (listOrg) updateHeader(listOrg, orgDetailData);
|
|
2367
|
-
}
|
|
2368
|
-
}
|
|
2369
|
-
|
|
2370
|
-
// ── Copy org modal ────────────────────────────────────────────────
|
|
2371
|
-
let copyTargetOrg = null;
|
|
2372
|
-
|
|
2373
|
-
window.openCopyModal = function(name) {
|
|
2374
|
-
copyTargetOrg = name;
|
|
2375
|
-
document.getElementById('copy-modal-org').textContent = name.toUpperCase();
|
|
2376
|
-
document.getElementById('copy-dest-input').value = '';
|
|
2377
|
-
document.getElementById('copy-modal-status').textContent = '';
|
|
2378
|
-
document.getElementById('copy-modal-status').className = '';
|
|
2379
|
-
document.getElementById('copy-confirm-btn').disabled = false;
|
|
2380
|
-
document.getElementById('copy-modal-overlay').classList.add('open');
|
|
2381
|
-
// Load project list
|
|
2382
|
-
const listEl = document.getElementById('copy-project-list');
|
|
2383
|
-
listEl.innerHTML = '<div class="copy-proj-loading">Loading projects…</div>';
|
|
2384
|
-
fetch('/api/projects').then(r => r.json()).then(data => {
|
|
2385
|
-
const projects = data?.projects || [];
|
|
2386
|
-
if (!projects.length) { listEl.innerHTML = '<div class="copy-proj-loading">No other projects found</div>'; return; }
|
|
2387
|
-
listEl.innerHTML = projects.map(p => {
|
|
2388
|
-
const label = p.name || p.slug || p.path?.split('/').pop() || p.path;
|
|
2389
|
-
const isCurrentDir = p.path === (window._orgDir || '');
|
|
2390
|
-
return `<div class="copy-proj-row${isCurrentDir ? ' selected' : ''}" title="${p.path}" onclick="selectCopyProject('${p.path.replace(/'/g,"\\'")}', this)">
|
|
2391
|
-
<span style="color:var(--text-hi)">${label}</span>
|
|
2392
|
-
<span style="color:var(--dim);font-size:10px;margin-left:6px">${p.path.replace(/\/Users\/[^/]+\//, '~/')}</span>
|
|
2393
|
-
</div>`;
|
|
2394
|
-
}).join('');
|
|
2395
|
-
}).catch(() => { listEl.innerHTML = '<div class="copy-proj-loading">Could not load projects</div>'; });
|
|
2396
|
-
setTimeout(() => document.getElementById('copy-dest-input').focus(), 60);
|
|
2397
|
-
};
|
|
2398
|
-
|
|
2399
|
-
window.selectCopyProject = function(path, el) {
|
|
2400
|
-
document.querySelectorAll('.copy-proj-row').forEach(r => r.classList.remove('selected'));
|
|
2401
|
-
el.classList.add('selected');
|
|
2402
|
-
document.getElementById('copy-dest-input').value = path;
|
|
2403
|
-
};
|
|
2404
|
-
|
|
2405
|
-
window.closeCopyModal = function() {
|
|
2406
|
-
document.getElementById('copy-modal-overlay').classList.remove('open');
|
|
2407
|
-
copyTargetOrg = null;
|
|
2408
|
-
};
|
|
2409
|
-
|
|
2410
|
-
window.executeCopy = async function() {
|
|
2411
|
-
if (!copyTargetOrg) return;
|
|
2412
|
-
const destination = document.getElementById('copy-dest-input').value.trim();
|
|
2413
|
-
const status = document.getElementById('copy-modal-status');
|
|
2414
|
-
const btn = document.getElementById('copy-confirm-btn');
|
|
2415
|
-
if (!destination) {
|
|
2416
|
-
status.textContent = 'ENTER A DESTINATION PATH';
|
|
2417
|
-
status.className = 'err';
|
|
2418
|
-
return;
|
|
2419
|
-
}
|
|
2420
|
-
btn.disabled = true;
|
|
2421
|
-
status.textContent = 'COPYING…';
|
|
2422
|
-
status.className = '';
|
|
2423
|
-
try {
|
|
2424
|
-
const r = await fetch(`/api/orgs/${encodeURIComponent(copyTargetOrg)}/copy`, {
|
|
2425
|
-
method: 'POST',
|
|
2426
|
-
headers: { 'Content-Type': 'application/json' },
|
|
2427
|
-
body: JSON.stringify({ destination }),
|
|
2428
|
-
});
|
|
2429
|
-
const data = await r.json();
|
|
2430
|
-
if (r.ok && data.ok) {
|
|
2431
|
-
status.textContent = 'COPIED — ' + (data.destFile || destination);
|
|
2432
|
-
status.className = 'ok';
|
|
2433
|
-
setTimeout(closeCopyModal, 2000);
|
|
2434
|
-
} else {
|
|
2435
|
-
status.textContent = 'ERROR: ' + (data.error || r.statusText);
|
|
2436
|
-
status.className = 'err';
|
|
2437
|
-
btn.disabled = false;
|
|
2438
|
-
}
|
|
2439
|
-
} catch(e) {
|
|
2440
|
-
status.textContent = 'ERROR: ' + e.message;
|
|
2441
|
-
status.className = 'err';
|
|
2442
|
-
btn.disabled = false;
|
|
2443
|
-
}
|
|
2444
|
-
};
|
|
2445
|
-
|
|
2446
|
-
// ── Export org ────────────────────────────────────────────────────
|
|
2447
|
-
window.exportOrg = async function(name) {
|
|
2448
|
-
try {
|
|
2449
|
-
const r = await fetch(`/api/orgs/${encodeURIComponent(name)}`);
|
|
2450
|
-
if (!r.ok) throw new Error(r.statusText);
|
|
2451
|
-
const blob = await r.blob();
|
|
2452
|
-
const a = document.createElement('a');
|
|
2453
|
-
a.href = URL.createObjectURL(blob);
|
|
2454
|
-
a.download = `${name}.json`;
|
|
2455
|
-
a.click();
|
|
2456
|
-
setTimeout(() => URL.revokeObjectURL(a.href), 5000);
|
|
2457
|
-
} catch(e) {
|
|
2458
|
-
console.warn('[orgs] Export failed:', e.message);
|
|
2459
|
-
}
|
|
2460
|
-
};
|
|
2461
|
-
|
|
2462
|
-
// ── Import org ────────────────────────────────────────────────────
|
|
2463
|
-
let importTargetOrg = null;
|
|
2464
|
-
|
|
2465
|
-
window.triggerImportOrg = function(name) {
|
|
2466
|
-
importTargetOrg = name;
|
|
2467
|
-
let inp = document.getElementById('oi-import-file-input');
|
|
2468
|
-
if (!inp) {
|
|
2469
|
-
inp = document.createElement('input');
|
|
2470
|
-
inp.type = 'file';
|
|
2471
|
-
inp.accept = '.json,application/json';
|
|
2472
|
-
inp.id = 'oi-import-file-input';
|
|
2473
|
-
inp.style.display = 'none';
|
|
2474
|
-
document.body.appendChild(inp);
|
|
2475
|
-
inp.addEventListener('change', handleImportFile);
|
|
2476
|
-
}
|
|
2477
|
-
inp.value = '';
|
|
2478
|
-
inp.click();
|
|
2479
|
-
};
|
|
2480
|
-
|
|
2481
|
-
async function handleImportFile(e) {
|
|
2482
|
-
const file = e.target.files[0];
|
|
2483
|
-
if (!file || !importTargetOrg) return;
|
|
2484
|
-
try {
|
|
2485
|
-
const text = await file.text();
|
|
2486
|
-
let data;
|
|
2487
|
-
try { data = JSON.parse(text); } catch(_) { console.warn('[orgs] Import failed: invalid JSON'); return; }
|
|
2488
|
-
const r = await fetch(`/api/orgs/${encodeURIComponent(importTargetOrg)}/import`, {
|
|
2489
|
-
method: 'POST',
|
|
2490
|
-
headers: { 'Content-Type': 'application/json' },
|
|
2491
|
-
body: JSON.stringify(data),
|
|
2492
|
-
});
|
|
2493
|
-
const result = await r.json();
|
|
2494
|
-
if (r.ok && result.ok) {
|
|
2495
|
-
loadOrgs();
|
|
2496
|
-
} else {
|
|
2497
|
-
console.warn('[orgs] Import failed:', result.error || r.statusText);
|
|
2498
|
-
}
|
|
2499
|
-
} catch(e) {
|
|
2500
|
-
console.warn('[orgs] Import failed:', e.message);
|
|
2501
|
-
} finally {
|
|
2502
|
-
importTargetOrg = null;
|
|
2503
|
-
}
|
|
2504
|
-
}
|
|
2505
|
-
|
|
2506
|
-
// ── Bootstrap ─────────────────────────────────────────────────────
|
|
2507
|
-
fetch('/api/status').then(r => r.json()).then(d => { if (d.dir) window._orgDir = d.dir; }).catch(() => {});
|
|
2508
|
-
connectSSE();
|
|
2509
|
-
loadOrgs();
|
|
2510
|
-
setInterval(loadOrgs, 8000);
|
|
2511
|
-
</script>
|
|
2512
|
-
</body>
|
|
2513
|
-
</html>
|