monomind 1.18.15 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -5
- package/package.json +15 -34
- package/packages/@monomind/cli/.claude/agents/core/researcher.md +29 -24
- package/packages/@monomind/cli/.claude/agents/github/code-review-swarm.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/github-modes.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/issue-tracker.md +1 -3
- package/packages/@monomind/cli/.claude/agents/github/multi-repo-swarm.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/pr-manager.md +1 -3
- package/packages/@monomind/cli/.claude/agents/github/project-board-sync.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/release-manager.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/repo-architect.md +4 -12
- package/packages/@monomind/cli/.claude/agents/github/swarm-issue.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/swarm-pr.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/sync-coordinator.md +1 -1
- package/packages/@monomind/cli/.claude/agents/github/workflow-automation.md +1 -1
- package/packages/@monomind/cli/.claude/agents/goal/goal-planner.md +1 -2
- package/packages/@monomind/cli/.claude/agents/specialized/specialized-workflow-architect.md +11 -14
- package/packages/@monomind/cli/.claude/agents/testing/production-validator.md +8 -7
- package/packages/@monomind/cli/.claude/agents/testing/testing-evidence-collector.md +3 -1
- package/packages/@monomind/cli/.claude/commands/github/issue-tracker.md +0 -2
- package/packages/@monomind/cli/.claude/commands/github/pr-manager.md +0 -2
- package/packages/@monomind/cli/.claude/commands/github/repo-architect.md +3 -10
- package/packages/@monomind/cli/.claude/commands/mastermind/code-review.md +4 -4
- package/packages/@monomind/cli/.claude/commands/mastermind/help.md +5 -5
- package/packages/@monomind/cli/.claude/commands/mastermind/okf-export.md +14 -0
- package/packages/@monomind/cli/.claude/commands/mastermind/okf-import.md +15 -0
- package/packages/@monomind/cli/.claude/commands/workflows/README.md +0 -1
- package/packages/@monomind/cli/.claude/commands/workflows/workflow-create.md +0 -1
- package/packages/@monomind/cli/.claude/commands/workflows/workflow-execute.md +1 -3
- package/packages/@monomind/cli/.claude/commands/workflows/workflow-export.md +0 -2
- package/packages/@monomind/cli/.claude/helpers/handlers/agent-start-handler.cjs +28 -36
- package/packages/@monomind/cli/.claude/helpers/handlers/capture-handler.cjs +110 -0
- package/packages/@monomind/cli/.claude/helpers/handlers/edit-handler.cjs +15 -0
- package/packages/@monomind/cli/.claude/helpers/handlers/gates-handler.cjs +2 -8
- package/packages/@monomind/cli/.claude/helpers/handlers/route-handler.cjs +314 -245
- package/packages/@monomind/cli/.claude/helpers/handlers/session-handler.cjs +182 -163
- package/packages/@monomind/cli/.claude/helpers/handlers/session-restore-handler.cjs +95 -53
- package/packages/@monomind/cli/.claude/helpers/handlers/task-handler.cjs +17 -160
- package/packages/@monomind/cli/.claude/helpers/hook-handler.cjs +153 -16
- package/packages/@monomind/cli/.claude/helpers/intelligence.cjs +255 -15
- package/packages/@monomind/cli/.claude/helpers/learning-service.mjs +1 -0
- package/packages/@monomind/cli/.claude/helpers/mastermind-activate.cjs +33 -51
- package/packages/@monomind/cli/.claude/helpers/monolean-activate.cjs +13 -3
- package/packages/@monomind/cli/.claude/helpers/monolean-propagate.cjs +7 -3
- package/packages/@monomind/cli/.claude/helpers/router.cjs +122 -11
- package/packages/@monomind/cli/.claude/helpers/skill-registry.json +0 -189
- package/packages/@monomind/cli/.claude/skills/github-toolkit/SKILL.md +60 -0
- package/packages/@monomind/cli/.claude/skills/hive-mind-advanced/SKILL.md +0 -15
- package/packages/@monomind/cli/.claude/skills/hooks-automation/SKILL.md +0 -1
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/_protocol.md +1 -1
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/architect.md +5 -6
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/autodev.md +8 -5
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/build.md +1 -2
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/review.md +8 -5
- package/packages/@monomind/cli/.claude/skills/mastermind-skills/techport.md +37 -3
- package/packages/@monomind/cli/.claude/skills/memory-toolkit/SKILL.md +75 -0
- package/packages/@monomind/cli/.claude/skills/monodesign/document.md +9 -6
- package/packages/@monomind/cli/.claude/skills/monodesign/extract.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/document.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monodesign/reference/live.md +1 -1
- package/packages/@monomind/cli/.claude/skills/monolean/SKILL.md +1 -1
- package/packages/@monomind/cli/.claude/skills/specialagent/SKILL.md +2 -4
- package/packages/@monomind/cli/.claude/skills/swarm-advanced/SKILL.md +0 -1
- package/packages/@monomind/cli/README.md +2 -5
- package/packages/@monomind/cli/bin/mcp-server.js +11 -1
- package/packages/@monomind/cli/dist/src/autopilot-state.js +4 -5
- package/packages/@monomind/cli/dist/src/browser/dashboard/server.js +69 -1
- package/packages/@monomind/cli/dist/src/browser/dashboard/ui.html +214 -1764
- package/packages/@monomind/cli/dist/src/capabilities/index.d.ts +0 -2
- package/packages/@monomind/cli/dist/src/capabilities/index.js +0 -1
- package/packages/@monomind/cli/dist/src/commands/agent-lifecycle.js +2 -6
- package/packages/@monomind/cli/dist/src/commands/agent-ops.d.ts +1 -2
- package/packages/@monomind/cli/dist/src/commands/agent-ops.js +1 -59
- package/packages/@monomind/cli/dist/src/commands/agent.js +2 -3
- package/packages/@monomind/cli/dist/src/commands/analyze-diff.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/analyze.d.ts +0 -4
- package/packages/@monomind/cli/dist/src/commands/analyze.js +1 -29
- package/packages/@monomind/cli/dist/src/commands/browse-action.js +94 -2
- package/packages/@monomind/cli/dist/src/commands/completions.js +12 -76
- package/packages/@monomind/cli/dist/src/commands/config.js +0 -6
- package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.d.ts +13 -3
- package/packages/@monomind/cli/dist/src/commands/doctor-project-checks.js +131 -23
- package/packages/@monomind/cli/dist/src/commands/doctor.js +6 -5
- package/packages/@monomind/cli/dist/src/commands/guidance.d.ts +5 -1
- package/packages/@monomind/cli/dist/src/commands/guidance.js +11 -556
- package/packages/@monomind/cli/dist/src/commands/hive-mind-comms.js +11 -4
- package/packages/@monomind/cli/dist/src/commands/hive-mind-helpers.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/hive-mind-ops.d.ts +1 -3
- package/packages/@monomind/cli/dist/src/commands/hive-mind-ops.js +2 -116
- package/packages/@monomind/cli/dist/src/commands/hive-mind.d.ts +4 -4
- package/packages/@monomind/cli/dist/src/commands/hive-mind.js +11 -11
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-commands.js +8 -7
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-gaps.js +1 -1
- package/packages/@monomind/cli/dist/src/commands/hooks-coverage-routing.js +2 -2
- package/packages/@monomind/cli/dist/src/commands/hooks-extended-commands.d.ts +0 -3
- package/packages/@monomind/cli/dist/src/commands/hooks-extended-commands.js +0 -307
- package/packages/@monomind/cli/dist/src/commands/hooks-formatting.d.ts +1 -5
- package/packages/@monomind/cli/dist/src/commands/hooks-formatting.js +1 -18
- package/packages/@monomind/cli/dist/src/commands/hooks-workers.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/hooks-workers.js +82 -330
- package/packages/@monomind/cli/dist/src/commands/hooks.js +1 -12
- package/packages/@monomind/cli/dist/src/commands/index.d.ts +2 -55
- package/packages/@monomind/cli/dist/src/commands/index.js +23 -216
- package/packages/@monomind/cli/dist/src/commands/init-wizard.js +3 -5
- package/packages/@monomind/cli/dist/src/commands/init.js +4 -24
- package/packages/@monomind/cli/dist/src/commands/mcp.js +32 -4
- package/packages/@monomind/cli/dist/src/commands/memory-admin.d.ts +1 -2
- package/packages/@monomind/cli/dist/src/commands/memory-admin.js +1 -118
- package/packages/@monomind/cli/dist/src/commands/memory-transfer.d.ts +1 -2
- package/packages/@monomind/cli/dist/src/commands/memory-transfer.js +5 -171
- package/packages/@monomind/cli/dist/src/commands/memory.js +3 -6
- package/packages/@monomind/cli/dist/src/commands/neural-core.d.ts +3 -1
- package/packages/@monomind/cli/dist/src/commands/neural-core.js +154 -15
- package/packages/@monomind/cli/dist/src/commands/neural-optimize.js +13 -15
- package/packages/@monomind/cli/dist/src/commands/neural-registry.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/neural-registry.js +14 -14
- package/packages/@monomind/cli/dist/src/commands/neural.d.ts +1 -1
- package/packages/@monomind/cli/dist/src/commands/neural.js +6 -6
- package/packages/@monomind/cli/dist/src/commands/performance.js +68 -58
- package/packages/@monomind/cli/dist/src/commands/providers.js +77 -117
- package/packages/@monomind/cli/dist/src/commands/search-universal.d.ts +7 -1
- package/packages/@monomind/cli/dist/src/commands/search-universal.js +59 -5
- package/packages/@monomind/cli/dist/src/commands/security-cve.js +3 -5
- package/packages/@monomind/cli/dist/src/commands/security-misc.d.ts +0 -1
- package/packages/@monomind/cli/dist/src/commands/security-misc.js +69 -45
- package/packages/@monomind/cli/dist/src/commands/security.js +2 -4
- package/packages/@monomind/cli/dist/src/commands/session.js +137 -281
- package/packages/@monomind/cli/dist/src/commands/start.js +2 -59
- package/packages/@monomind/cli/dist/src/commands/status.js +18 -29
- package/packages/@monomind/cli/dist/src/commands/swarm.js +113 -66
- package/packages/@monomind/cli/dist/src/commands/task.js +2 -49
- package/packages/@monomind/cli/dist/src/consensus/audit-writer.js +43 -1
- package/packages/@monomind/cli/dist/src/consensus/tally.d.ts +19 -0
- package/packages/@monomind/cli/dist/src/consensus/tally.js +34 -0
- package/packages/@monomind/cli/dist/src/index.d.ts +3 -2
- package/packages/@monomind/cli/dist/src/index.js +13 -9
- package/packages/@monomind/cli/dist/src/init/claudemd-generator.js +10 -14
- package/packages/@monomind/cli/dist/src/init/executor.js +42 -100
- package/packages/@monomind/cli/dist/src/init/helpers-generator.js +2 -22
- package/packages/@monomind/cli/dist/src/init/settings-generator.js +0 -13
- package/packages/@monomind/cli/dist/src/init/statusline-generator.js +62 -0
- package/packages/@monomind/cli/dist/src/init/types.d.ts +3 -9
- package/packages/@monomind/cli/dist/src/init/types.js +0 -5
- package/packages/@monomind/cli/dist/src/knowledge/document-pipeline.js +18 -8
- package/packages/@monomind/cli/dist/src/mcp-client.js +0 -8
- package/packages/@monomind/cli/dist/src/mcp-server.js +14 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/agent-tools.js +0 -17
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/causal-infer.d.ts +5 -5
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/causal-infer.js +32 -46
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/coherence-check.js +1 -19
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/consensus-verify.d.ts +2 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/consensus-verify.js +22 -20
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/memory-gate.d.ts +3 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/memory-gate.js +32 -19
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/quantum-topology.d.ts +4 -4
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/quantum-topology.js +11 -17
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/spectral-analyze.d.ts +2 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/spectral-analyze.js +51 -32
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/types.d.ts +8 -11
- package/packages/@monomind/cli/dist/src/mcp-tools/coherence/types.js +3 -18
- package/packages/@monomind/cli/dist/src/mcp-tools/embeddings-tools.js +1 -7
- package/packages/@monomind/cli/dist/src/mcp-tools/graphify-tools.js +2 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/guidance-tools.js +9 -19
- package/packages/@monomind/cli/dist/src/mcp-tools/hive-mind-tools.d.ts +8 -1
- package/packages/@monomind/cli/dist/src/mcp-tools/hive-mind-tools.js +198 -40
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-advanced.d.ts +18 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-advanced.js +25 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-intelligence.d.ts +4 -8
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-intelligence.js +33 -482
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-routing.d.ts +1 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-routing.js +96 -202
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-synthesis.d.ts +31 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-synthesis.js +196 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/hooks-tools.js +10 -11
- package/packages/@monomind/cli/dist/src/mcp-tools/index.d.ts +0 -3
- package/packages/@monomind/cli/dist/src/mcp-tools/index.js +0 -4
- package/packages/@monomind/cli/dist/src/mcp-tools/memory-tools.js +24 -9
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.d.ts +6 -0
- package/packages/@monomind/cli/dist/src/mcp-tools/monograph-tools.js +370 -95
- package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.d.ts +8 -9
- package/packages/@monomind/cli/dist/src/mcp-tools/neural-tools.js +249 -539
- package/packages/@monomind/cli/dist/src/mcp-tools/performance-tools.js +5 -17
- package/packages/@monomind/cli/dist/src/mcp-tools/quality/coverage-analysis/prioritize-gaps.js +2 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/quality/security-compliance/detect-secrets.d.ts +4 -4
- package/packages/@monomind/cli/dist/src/mcp-tools/quality-tools.d.ts +7 -2
- package/packages/@monomind/cli/dist/src/mcp-tools/quality-tools.js +7 -257
- package/packages/@monomind/cli/dist/src/mcp-tools/security-tools.js +103 -0
- package/packages/@monomind/cli/dist/src/memory/intelligence.d.ts +9 -9
- package/packages/@monomind/cli/dist/src/memory/intelligence.js +71 -59
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.d.ts +1 -0
- package/packages/@monomind/cli/dist/src/memory/memory-bridge.js +47 -5
- package/packages/@monomind/cli/dist/src/memory/memory-read.js +1 -19
- package/packages/@monomind/cli/dist/src/suggest.js +1 -12
- package/packages/@monomind/cli/dist/src/transfer/store/discovery.d.ts +3 -2
- package/packages/@monomind/cli/dist/src/transfer/store/discovery.js +22 -70
- package/packages/@monomind/cli/dist/src/update/checker.js +0 -1
- package/packages/@monomind/cli/dist/src/utils/cosine-similarity.d.ts +22 -0
- package/packages/@monomind/cli/dist/src/utils/cosine-similarity.js +38 -0
- package/packages/@monomind/cli/dist/src/utils/input-guards.d.ts +51 -0
- package/packages/@monomind/cli/dist/src/utils/input-guards.js +223 -0
- package/packages/@monomind/cli/dist/src/utils/json-file.d.ts +33 -0
- package/packages/@monomind/cli/dist/src/utils/json-file.js +57 -0
- package/packages/@monomind/cli/package.json +9 -6
- package/packages/@monomind/cli/scripts/sync-claude-assets.sh +16 -20
- package/scripts/generate-agent-avatars.mjs +0 -8
- package/.claude/agents/architecture/system-design/arch-system-design.md +0 -54
- package/.claude/agents/consensus/crdt-synchronizer.md +0 -977
- package/.claude/agents/consensus/quorum-manager.md +0 -803
- package/.claude/agents/consensus/security-manager.md +0 -602
- package/.claude/agents/core/coder.md +0 -262
- package/.claude/agents/core/coordinator.md +0 -71
- package/.claude/agents/core/planner.md +0 -170
- package/.claude/agents/core/researcher.md +0 -192
- package/.claude/agents/core/reviewer.md +0 -327
- package/.claude/agents/core/tester.md +0 -318
- package/.claude/agents/design/design-monodesign.md +0 -121
- package/.claude/agents/engineering/engineering-ai-data-remediation-engineer.md +0 -212
- package/.claude/agents/engineering/engineering-ai-engineer.md +0 -165
- package/.claude/agents/engineering/engineering-autonomous-optimization-architect.md +0 -108
- package/.claude/agents/engineering/engineering-backend-architect.md +0 -254
- package/.claude/agents/engineering/engineering-code-reviewer.md +0 -95
- package/.claude/agents/engineering/engineering-data-engineer.md +0 -307
- package/.claude/agents/engineering/engineering-database-optimizer.md +0 -200
- package/.claude/agents/engineering/engineering-devops-automator.md +0 -430
- package/.claude/agents/engineering/engineering-embedded-firmware-engineer.md +0 -174
- package/.claude/agents/engineering/engineering-feishu-integration-developer.md +0 -607
- package/.claude/agents/engineering/engineering-frontend-developer.md +0 -249
- package/.claude/agents/engineering/engineering-git-workflow-master.md +0 -108
- package/.claude/agents/engineering/engineering-incident-response-commander.md +0 -482
- package/.claude/agents/engineering/engineering-mobile-app-builder.md +0 -499
- package/.claude/agents/engineering/engineering-rapid-prototyper.md +0 -463
- package/.claude/agents/engineering/engineering-security-engineer.md +0 -303
- package/.claude/agents/engineering/engineering-senior-developer.md +0 -195
- package/.claude/agents/engineering/engineering-software-architect.md +0 -100
- package/.claude/agents/engineering/engineering-solidity-smart-contract-engineer.md +0 -528
- package/.claude/agents/engineering/engineering-sre.md +0 -114
- package/.claude/agents/engineering/engineering-technical-writer.md +0 -412
- package/.claude/agents/engineering/engineering-threat-detection-engineer.md +0 -540
- package/.claude/agents/engineering/engineering-wechat-mini-program-developer.md +0 -351
- package/.claude/agents/generated/case-analyst.md +0 -50
- package/.claude/agents/generated/channel-intelligence-director.md +0 -87
- package/.claude/agents/generated/chief-growth-officer.md +0 -88
- package/.claude/agents/generated/churn-analyst.md +0 -53
- package/.claude/agents/generated/code-reviewer.md +0 -55
- package/.claude/agents/generated/code-validator.md +0 -57
- package/.claude/agents/generated/complexity-scanner.md +0 -56
- package/.claude/agents/generated/content-seo-strategist.md +0 -90
- package/.claude/agents/generated/copy-editor.md +0 -45
- package/.claude/agents/generated/court-reporter.md +0 -50
- package/.claude/agents/generated/defender.md +0 -51
- package/.claude/agents/generated/devbot-orchestrator.md +0 -58
- package/.claude/agents/generated/devbot-planner.md +0 -63
- package/.claude/agents/generated/developer-community-strategist.md +0 -91
- package/.claude/agents/generated/editor-in-chief.md +0 -45
- package/.claude/agents/generated/fact-checker.md +0 -45
- package/.claude/agents/generated/impact-assessor.md +0 -54
- package/.claude/agents/generated/judge.md +0 -51
- package/.claude/agents/generated/outreach-partnership-strategist.md +0 -90
- package/.claude/agents/generated/prosecutor.md +0 -51
- package/.claude/agents/generated/reporter.md +0 -45
- package/.claude/agents/generated/social-media-strategist.md +0 -91
- package/.claude/agents/generated/video-visual-strategist.md +0 -90
- package/.claude/agents/github/code-review-swarm.md +0 -557
- package/.claude/agents/github/github-modes.md +0 -154
- package/.claude/agents/github/issue-tracker.md +0 -299
- package/.claude/agents/github/multi-repo-swarm.md +0 -525
- package/.claude/agents/github/pr-manager.md +0 -163
- package/.claude/agents/github/project-board-sync.md +0 -478
- package/.claude/agents/github/release-manager.md +0 -296
- package/.claude/agents/github/repo-architect.md +0 -359
- package/.claude/agents/github/swarm-issue.md +0 -548
- package/.claude/agents/github/swarm-pr.md +0 -427
- package/.claude/agents/github/sync-coordinator.md +0 -355
- package/.claude/agents/github/workflow-automation.md +0 -640
- package/.claude/agents/goal/goal-planner.md +0 -168
- package/.claude/agents/hive-mind/collective-intelligence-coordinator.md +0 -129
- package/.claude/agents/hive-mind/queen-coordinator.md +0 -202
- package/.claude/agents/hive-mind/scout-explorer.md +0 -241
- package/.claude/agents/hive-mind/swarm-memory-manager.md +0 -192
- package/.claude/agents/hive-mind/worker-specialist.md +0 -216
- package/.claude/agents/marketing/marketing-competitive-content.md +0 -155
- package/.claude/agents/marketing/marketing-cro-specialist.md +0 -147
- package/.claude/agents/marketing/marketing-email-specialist.md +0 -90
- package/.claude/agents/marketing/marketing-launch-strategist.md +0 -129
- package/.claude/agents/marketing/marketing-pricing-strategist.md +0 -127
- package/.claude/agents/optimization/benchmark-suite.md +0 -665
- package/.claude/agents/optimization/load-balancer.md +0 -431
- package/.claude/agents/optimization/performance-monitor.md +0 -672
- package/.claude/agents/optimization/resource-allocator.md +0 -674
- package/.claude/agents/optimization/topology-optimizer.md +0 -808
- package/.claude/agents/reengineer-squad/boss.md +0 -113
- package/.claude/agents/reengineer-squad/critic-architect.md +0 -132
- package/.claude/agents/reengineer-squad/git-manager.md +0 -145
- package/.claude/agents/reengineer-squad/idea-generator.md +0 -95
- package/.claude/agents/reengineer-squad/implementer.md +0 -112
- package/.claude/agents/reengineer-squad/integration-planner.md +0 -112
- package/.claude/agents/reengineer-squad/source-analyst.md +0 -103
- package/.claude/agents/reengineer-squad/target-analyst.md +0 -118
- package/.claude/agents/reengineer-squad/tester.md +0 -105
- package/.claude/agents/schemas/architecture-output.json +0 -43
- package/.claude/agents/schemas/code-review-output.json +0 -28
- package/.claude/agents/schemas/generic-task-input.json +0 -12
- package/.claude/agents/schemas/implementation-output.json +0 -18
- package/.claude/agents/schemas/research-output.json +0 -31
- package/.claude/agents/schemas/security-audit-output.json +0 -29
- package/.claude/agents/schemas/test-report-output.json +0 -29
- package/.claude/agents/sparc/architecture.md +0 -453
- package/.claude/agents/sparc/pseudocode.md +0 -299
- package/.claude/agents/sparc/refinement.md +0 -504
- package/.claude/agents/sparc/specification.md +0 -258
- package/.claude/agents/specialists/integration-architect.md +0 -94
- package/.claude/agents/specialized/agentic-identity-trust.md +0 -388
- package/.claude/agents/specialized/agents-orchestrator.md +0 -368
- package/.claude/agents/specialized/automation-governance-architect.md +0 -217
- package/.claude/agents/specialized/blockchain-security-auditor.md +0 -497
- package/.claude/agents/specialized/compliance-auditor.md +0 -159
- package/.claude/agents/specialized/identity-graph-operator.md +0 -261
- package/.claude/agents/specialized/lsp-index-engineer.md +0 -315
- package/.claude/agents/specialized/mobile/spec-mobile-react-native.md +0 -89
- package/.claude/agents/specialized/specialized-cultural-intelligence-strategist.md +0 -89
- package/.claude/agents/specialized/specialized-developer-advocate.md +0 -318
- package/.claude/agents/specialized/specialized-document-generator.md +0 -56
- package/.claude/agents/specialized/specialized-mcp-builder.md +0 -64
- package/.claude/agents/specialized/specialized-model-qa.md +0 -489
- package/.claude/agents/specialized/specialized-workflow-architect.md +0 -598
- package/.claude/agents/specialized/zk-steward.md +0 -212
- package/.claude/agents/swarm/mesh-coordinator.md +0 -363
- package/.claude/agents/templates/automation-smart-agent.md +0 -185
- package/.claude/agents/templates/coordinator-swarm-init.md +0 -83
- package/.claude/agents/templates/implementer-sparc-coder.md +0 -231
- package/.claude/agents/testing/production-validator.md +0 -374
- package/.claude/agents/testing/tdd-london-swarm.md +0 -241
- package/.claude/agents/testing/testing-accessibility-auditor.md +0 -322
- package/.claude/agents/testing/testing-api-tester.md +0 -307
- package/.claude/agents/testing/testing-evidence-collector.md +0 -211
- package/.claude/agents/testing/testing-performance-benchmarker.md +0 -269
- package/.claude/agents/testing/testing-test-results-analyzer.md +0 -306
- package/.claude/agents/testing/testing-tool-evaluator.md +0 -395
- package/.claude/agents/testing/testing-workflow-optimizer.md +0 -451
- package/.claude/commands/agents/README.md +0 -14
- package/.claude/commands/agents/agent-capabilities.md +0 -25
- package/.claude/commands/agents/agent-coordination.md +0 -32
- package/.claude/commands/agents/agent-spawning.md +0 -32
- package/.claude/commands/agents/agent-types.md +0 -30
- package/.claude/commands/analysis/README.md +0 -18
- package/.claude/commands/analysis/bottleneck-detect.md +0 -69
- package/.claude/commands/analysis/performance-bottlenecks.md +0 -59
- package/.claude/commands/analysis/performance-report.md +0 -52
- package/.claude/commands/analysis/token-usage.md +0 -47
- package/.claude/commands/automation/README.md +0 -19
- package/.claude/commands/automation/auto-agent.md +0 -86
- package/.claude/commands/automation/self-healing.md +0 -108
- package/.claude/commands/automation/session-memory.md +0 -89
- package/.claude/commands/automation/smart-agents.md +0 -81
- package/.claude/commands/automation/smart-spawn.md +0 -66
- package/.claude/commands/automation/workflow-select.md +0 -60
- package/.claude/commands/coordination/README.md +0 -13
- package/.claude/commands/coordination/agent-spawn.md +0 -69
- package/.claude/commands/coordination/swarm-init.md +0 -82
- package/.claude/commands/coordination/task-orchestrate.md +0 -79
- package/.claude/commands/github/README.md +0 -24
- package/.claude/commands/github/github-modes.md +0 -151
- package/.claude/commands/github/issue-tracker.md +0 -293
- package/.claude/commands/github/pr-manager.md +0 -173
- package/.claude/commands/github/release-manager.md +0 -343
- package/.claude/commands/github/repo-architect.md +0 -379
- package/.claude/commands/github/sync-coordinator.md +0 -297
- package/.claude/commands/hive-mind/README.md +0 -42
- package/.claude/commands/hive-mind/hive-mind-consensus.md +0 -72
- package/.claude/commands/hive-mind/hive-mind-init.md +0 -68
- package/.claude/commands/hive-mind/hive-mind-memory.md +0 -73
- package/.claude/commands/hive-mind/hive-mind-spawn.md +0 -82
- package/.claude/commands/hive-mind/hive-mind-status.md +0 -56
- package/.claude/commands/hive-mind/hive-mind-stop.md +0 -55
- package/.claude/commands/hive-mind/hive-mind.md +0 -87
- package/.claude/commands/hooks/README.md +0 -66
- package/.claude/commands/hooks/overview.md +0 -112
- package/.claude/commands/hooks/post-edit.md +0 -78
- package/.claude/commands/hooks/post-task.md +0 -62
- package/.claude/commands/hooks/pre-edit.md +0 -81
- package/.claude/commands/hooks/pre-task.md +0 -73
- package/.claude/commands/hooks/session-end.md +0 -82
- package/.claude/commands/hooks/setup.md +0 -132
- package/.claude/commands/mastermind/_repeat.md +0 -492
- package/.claude/commands/mastermind/_taskfile.md +0 -232
- package/.claude/commands/mastermind/adr.md +0 -9
- package/.claude/commands/mastermind/approve.md +0 -91
- package/.claude/commands/mastermind/architect.md +0 -52
- package/.claude/commands/mastermind/autodev.md +0 -28
- package/.claude/commands/mastermind/brain.md +0 -99
- package/.claude/commands/mastermind/budget.md +0 -5
- package/.claude/commands/mastermind/build.md +0 -23
- package/.claude/commands/mastermind/code-review.md +0 -314
- package/.claude/commands/mastermind/content.md +0 -23
- package/.claude/commands/mastermind/createorg.md +0 -136
- package/.claude/commands/mastermind/createtask.md +0 -372
- package/.claude/commands/mastermind/debug.md +0 -19
- package/.claude/commands/mastermind/design.md +0 -17
- package/.claude/commands/mastermind/do.md +0 -525
- package/.claude/commands/mastermind/execute.md +0 -17
- package/.claude/commands/mastermind/finance.md +0 -23
- package/.claude/commands/mastermind/finish.md +0 -17
- package/.claude/commands/mastermind/graph-status.md +0 -5
- package/.claude/commands/mastermind/help.md +0 -115
- package/.claude/commands/mastermind/idea.md +0 -23
- package/.claude/commands/mastermind/ideate.md +0 -258
- package/.claude/commands/mastermind/improve.md +0 -342
- package/.claude/commands/mastermind/loops.md +0 -5
- package/.claude/commands/mastermind/marketing.md +0 -23
- package/.claude/commands/mastermind/master.md +0 -1124
- package/.claude/commands/mastermind/memory.md +0 -227
- package/.claude/commands/mastermind/ops.md +0 -23
- package/.claude/commands/mastermind/orgs.md +0 -18
- package/.claude/commands/mastermind/orgstatus.md +0 -56
- package/.claude/commands/mastermind/plan.md +0 -23
- package/.claude/commands/mastermind/receive-review.md +0 -17
- package/.claude/commands/mastermind/references/antigravity-tools.md +0 -60
- package/.claude/commands/mastermind/references/claude-code-tools.md +0 -50
- package/.claude/commands/mastermind/references/codex-tools.md +0 -64
- package/.claude/commands/mastermind/references/copilot-tools.md +0 -49
- package/.claude/commands/mastermind/references/gemini-tools.md +0 -63
- package/.claude/commands/mastermind/references/pi-tools.md +0 -28
- package/.claude/commands/mastermind/release.md +0 -23
- package/.claude/commands/mastermind/repeat.md +0 -254
- package/.claude/commands/mastermind/research.md +0 -23
- package/.claude/commands/mastermind/review.md +0 -34
- package/.claude/commands/mastermind/runorg.md +0 -153
- package/.claude/commands/mastermind/sales.md +0 -23
- package/.claude/commands/mastermind/skill-builder.md +0 -17
- package/.claude/commands/mastermind/specialagents.md +0 -122
- package/.claude/commands/mastermind/stoporg.md +0 -75
- package/.claude/commands/mastermind/swarm.md +0 -158
- package/.claude/commands/mastermind/taskdev.md +0 -23
- package/.claude/commands/mastermind/tdd.md +0 -19
- package/.claude/commands/mastermind/techport.md +0 -27
- package/.claude/commands/mastermind/understand.md +0 -136
- package/.claude/commands/mastermind/verify.md +0 -19
- package/.claude/commands/mastermind/worktree.md +0 -17
- package/.claude/commands/mastermind.md +0 -121
- package/.claude/commands/memory/README.md +0 -79
- package/.claude/commands/memory/memory-search.md +0 -77
- package/.claude/commands/monitoring/README.md +0 -69
- package/.claude/commands/monitoring/agent-metrics.md +0 -65
- package/.claude/commands/monitoring/agents.md +0 -71
- package/.claude/commands/monitoring/status.md +0 -108
- package/.claude/commands/monobrowse.md +0 -21
- package/.claude/commands/monoes/README.md +0 -30
- package/.claude/commands/monoes/install.md +0 -163
- package/.claude/commands/monoes/monoagent.md +0 -148
- package/.claude/commands/monoes/monoclip.md +0 -64
- package/.claude/commands/monoes/monotask.md +0 -137
- package/.claude/commands/monograph/README.md +0 -102
- package/.claude/commands/monograph/monograph-build.md +0 -79
- package/.claude/commands/monograph/monograph-search.md +0 -96
- package/.claude/commands/monograph/monograph-stats.md +0 -53
- package/.claude/commands/monograph/monograph-watch.md +0 -63
- package/.claude/commands/monograph/monograph-wiki.md +0 -91
- package/.claude/commands/optimization/auto-topology.md +0 -85
- package/.claude/commands/optimization/performance-optimize.md +0 -79
- package/.claude/commands/pair/README.md +0 -79
- package/.claude/commands/pair/examples.md +0 -156
- package/.claude/commands/pair/modes.md +0 -122
- package/.claude/commands/pair/session.md +0 -124
- package/.claude/commands/sparc/analyzer.md +0 -35
- package/.claude/commands/sparc/architect.md +0 -36
- package/.claude/commands/sparc/ask.md +0 -56
- package/.claude/commands/sparc/batch-executor.md +0 -37
- package/.claude/commands/sparc/code.md +0 -48
- package/.claude/commands/sparc/coder.md +0 -37
- package/.claude/commands/sparc/debug.md +0 -42
- package/.claude/commands/sparc/debugger.md +0 -37
- package/.claude/commands/sparc/designer.md +0 -36
- package/.claude/commands/sparc/devops.md +0 -68
- package/.claude/commands/sparc/docs-writer.md +0 -39
- package/.claude/commands/sparc/documenter.md +0 -37
- package/.claude/commands/sparc/innovator.md +0 -37
- package/.claude/commands/sparc/integration.md +0 -42
- package/.claude/commands/sparc/mcp.md +0 -76
- package/.claude/commands/sparc/memory-manager.md +0 -57
- package/.claude/commands/sparc/optimizer.md +0 -37
- package/.claude/commands/sparc/orchestrator.md +0 -70
- package/.claude/commands/sparc/post-deployment-monitoring-mode.md +0 -42
- package/.claude/commands/sparc/refinement-optimization-mode.md +0 -42
- package/.claude/commands/sparc/researcher.md +0 -37
- package/.claude/commands/sparc/reviewer.md +0 -37
- package/.claude/commands/sparc/security-review.md +0 -39
- package/.claude/commands/sparc/sparc-modes.md +0 -120
- package/.claude/commands/sparc/sparc.md +0 -71
- package/.claude/commands/sparc/spec-pseudocode.md +0 -39
- package/.claude/commands/sparc/supabase-admin.md +0 -301
- package/.claude/commands/sparc/swarm-coordinator.md +0 -50
- package/.claude/commands/sparc/tdd.md +0 -37
- package/.claude/commands/sparc/tester.md +0 -37
- package/.claude/commands/sparc/tutorial.md +0 -38
- package/.claude/commands/sparc/workflow-manager.md +0 -37
- package/.claude/commands/sparc.md +0 -112
- package/.claude/commands/stream-chain/pipeline.md +0 -116
- package/.claude/commands/stream-chain/run.md +0 -156
- package/.claude/commands/swarm/README.md +0 -40
- package/.claude/commands/swarm/analysis.md +0 -73
- package/.claude/commands/swarm/development.md +0 -72
- package/.claude/commands/swarm/examples.md +0 -103
- package/.claude/commands/swarm/maintenance.md +0 -75
- package/.claude/commands/swarm/optimization.md +0 -84
- package/.claude/commands/swarm/research.md +0 -76
- package/.claude/commands/swarm/swarm.md +0 -79
- package/.claude/commands/swarm/testing.md +0 -80
- package/.claude/commands/tokens.md +0 -18
- package/.claude/commands/truth/start.md +0 -121
- package/.claude/commands/ts.md +0 -14
- package/.claude/commands/workflows/README.md +0 -65
- package/.claude/commands/workflows/development.md +0 -86
- package/.claude/commands/workflows/research.md +0 -89
- package/.claude/commands/workflows/workflow-create.md +0 -84
- package/.claude/commands/workflows/workflow-execute.md +0 -103
- package/.claude/commands/workflows/workflow-export.md +0 -90
- package/.claude/helpers/auto-memory-hook.mjs +0 -503
- package/.claude/helpers/control-start.cjs +0 -184
- package/.claude/helpers/event-logger.cjs +0 -155
- package/.claude/helpers/extras-registry.json +0 -5141
- package/.claude/helpers/graphify-freshen.cjs +0 -140
- package/.claude/helpers/handlers/adr-draft-handler.cjs +0 -78
- package/.claude/helpers/handlers/agent-start-handler.cjs +0 -108
- package/.claude/helpers/handlers/budget-status-handler.cjs +0 -14
- package/.claude/helpers/handlers/capture-handler.cjs +0 -473
- package/.claude/helpers/handlers/compact-handler.cjs +0 -35
- package/.claude/helpers/handlers/edit-handler.cjs +0 -145
- package/.claude/helpers/handlers/gates-handler.cjs +0 -138
- package/.claude/helpers/handlers/graph-status-handler.cjs +0 -45
- package/.claude/helpers/handlers/loops-status-handler.cjs +0 -48
- package/.claude/helpers/handlers/route-handler.cjs +0 -454
- package/.claude/helpers/handlers/session-handler.cjs +0 -237
- package/.claude/helpers/handlers/session-restore-handler.cjs +0 -370
- package/.claude/helpers/handlers/stats-handler.cjs +0 -14
- package/.claude/helpers/handlers/task-handler.cjs +0 -353
- package/.claude/helpers/hook-handler.cjs +0 -681
- package/.claude/helpers/intelligence.cjs +0 -189
- package/.claude/helpers/learning-service.mjs +0 -60
- package/.claude/helpers/loop-tracker.cjs +0 -119
- package/.claude/helpers/mastermind-activate.cjs +0 -53
- package/.claude/helpers/memory-palace.cjs +0 -461
- package/.claude/helpers/memory.cjs +0 -193
- package/.claude/helpers/metrics-db.mjs +0 -87
- package/.claude/helpers/monolean-activate.cjs +0 -20
- package/.claude/helpers/monolean-config.cjs +0 -76
- package/.claude/helpers/monolean-instructions.cjs +0 -109
- package/.claude/helpers/monolean-propagate.cjs +0 -9
- package/.claude/helpers/monolean-tracker.cjs +0 -18
- package/.claude/helpers/router.cjs +0 -326
- package/.claude/helpers/session.cjs +0 -140
- package/.claude/helpers/skill-registry.json +0 -1043
- package/.claude/helpers/statusline.cjs +0 -1344
- package/.claude/helpers/toggle-statusline.cjs +0 -73
- package/.claude/helpers/token-tracker.cjs +0 -934
- package/.claude/helpers/utils/micro-agents.cjs +0 -354
- package/.claude/helpers/utils/monograph.cjs +0 -480
- package/.claude/helpers/utils/telemetry.cjs +0 -146
- package/.claude/mcp.json +0 -3
- package/.claude/scheduled_tasks.lock +0 -1
- package/.claude/settings.json +0 -495
- package/.claude/skills/.monomind/data/ranked-context.json +0 -5
- package/.claude/skills/.monomind/sessions/current.json +0 -13
- package/.claude/skills/.monomind/sessions/session-1777829336455.json +0 -15
- package/.claude/skills/.monomind/sessions/session-1777831614725.json +0 -15
- package/.claude/skills/.monomind/sessions/session-1777832095857.json +0 -15
- package/.claude/skills/.monomind/sessions/session-1777839814183.json +0 -15
- package/.claude/skills/.monomind/sessions/session-1777841847131.json +0 -15
- package/.claude/skills/.monomind/sessions/session-1777843309463.json +0 -15
- package/.claude/skills/.monomind/sessions/session-1777880867159.json +0 -15
- package/.claude/skills/.monomind/sessions/session-1777881884593.json +0 -15
- package/.claude/skills/.monomind/sessions/session-1777884090471.json +0 -15
- package/.claude/skills/.monomind/sessions/session-1777884808221.json +0 -15
- package/.claude/skills/.monomind/sessions/session-1777885672155.json +0 -15
- package/.claude/skills/.monomind/sessions/session-1777886852818.json +0 -15
- package/.claude/skills/.monomind/sessions/session-1777896532690.json +0 -15
- package/.claude/skills/agent-browser-testing/SKILL.md +0 -964
- package/.claude/skills/agentic-jujutsu/SKILL.md +0 -645
- package/.claude/skills/github-issue-triage/SKILL.md +0 -354
- package/.claude/skills/github-repo-recap/SKILL.md +0 -207
- package/.claude/skills/hive-mind-advanced/SKILL.md +0 -709
- package/.claude/skills/hooks-automation/SKILL.md +0 -1193
- package/.claude/skills/mastermind-skills/_agent-select.md +0 -132
- package/.claude/skills/mastermind-skills/_delegation.md +0 -83
- package/.claude/skills/mastermind-skills/_intake.md +0 -83
- package/.claude/skills/mastermind-skills/_protocol.md +0 -404
- package/.claude/skills/mastermind-skills/_repeat.md +0 -171
- package/.claude/skills/mastermind-skills/access.md +0 -236
- package/.claude/skills/mastermind-skills/activity.md +0 -191
- package/.claude/skills/mastermind-skills/adapter-manager.md +0 -259
- package/.claude/skills/mastermind-skills/adapters.md +0 -204
- package/.claude/skills/mastermind-skills/agent-detail.md +0 -242
- package/.claude/skills/mastermind-skills/agents.md +0 -178
- package/.claude/skills/mastermind-skills/approval-detail.md +0 -259
- package/.claude/skills/mastermind-skills/approve.md +0 -188
- package/.claude/skills/mastermind-skills/architect.md +0 -863
- package/.claude/skills/mastermind-skills/autodev.md +0 -357
- package/.claude/skills/mastermind-skills/backup.md +0 -197
- package/.claude/skills/mastermind-skills/bootstrap.md +0 -190
- package/.claude/skills/mastermind-skills/budgets.md +0 -237
- package/.claude/skills/mastermind-skills/build.md +0 -170
- package/.claude/skills/mastermind-skills/code-quality-reviewer-prompt.md +0 -60
- package/.claude/skills/mastermind-skills/companies.md +0 -256
- package/.claude/skills/mastermind-skills/content.md +0 -197
- package/.claude/skills/mastermind-skills/costs.md +0 -151
- package/.claude/skills/mastermind-skills/createorg.md +0 -862
- package/.claude/skills/mastermind-skills/debug.md +0 -232
- package/.claude/skills/mastermind-skills/design.md +0 -189
- package/.claude/skills/mastermind-skills/diagnose.md +0 -249
- package/.claude/skills/mastermind-skills/env.md +0 -198
- package/.claude/skills/mastermind-skills/environments.md +0 -250
- package/.claude/skills/mastermind-skills/execute.md +0 -104
- package/.claude/skills/mastermind-skills/export.md +0 -333
- package/.claude/skills/mastermind-skills/finance.md +0 -166
- package/.claude/skills/mastermind-skills/finish.md +0 -251
- package/.claude/skills/mastermind-skills/goal-detail.md +0 -255
- package/.claude/skills/mastermind-skills/goals.md +0 -149
- package/.claude/skills/mastermind-skills/heartbeat.md +0 -164
- package/.claude/skills/mastermind-skills/idea.md +0 -1142
- package/.claude/skills/mastermind-skills/implementer-prompt.md +0 -109
- package/.claude/skills/mastermind-skills/import.md +0 -281
- package/.claude/skills/mastermind-skills/inbox.md +0 -214
- package/.claude/skills/mastermind-skills/instance-settings.md +0 -315
- package/.claude/skills/mastermind-skills/instance.md +0 -233
- package/.claude/skills/mastermind-skills/invite-landing.md +0 -227
- package/.claude/skills/mastermind-skills/invites.md +0 -254
- package/.claude/skills/mastermind-skills/issue-detail.md +0 -291
- package/.claude/skills/mastermind-skills/issues.md +0 -235
- package/.claude/skills/mastermind-skills/join-queue.md +0 -170
- package/.claude/skills/mastermind-skills/liveness.md +0 -392
- package/.claude/skills/mastermind-skills/marketing.md +0 -228
- package/.claude/skills/mastermind-skills/memory.md +0 -321
- package/.claude/skills/mastermind-skills/monitor.md +0 -1284
- package/.claude/skills/mastermind-skills/monotask.md +0 -350
- package/.claude/skills/mastermind-skills/my-issues.md +0 -146
- package/.claude/skills/mastermind-skills/new-agent.md +0 -241
- package/.claude/skills/mastermind-skills/ops.md +0 -168
- package/.claude/skills/mastermind-skills/org-chart.md +0 -209
- package/.claude/skills/mastermind-skills/org-settings.md +0 -254
- package/.claude/skills/mastermind-skills/orgs.md +0 -98
- package/.claude/skills/mastermind-skills/orgstatus.md +0 -194
- package/.claude/skills/mastermind-skills/plan-to-tasks.md +0 -136
- package/.claude/skills/mastermind-skills/plan.md +0 -198
- package/.claude/skills/mastermind-skills/plugin-manager.md +0 -241
- package/.claude/skills/mastermind-skills/plugin-settings.md +0 -273
- package/.claude/skills/mastermind-skills/plugins.md +0 -190
- package/.claude/skills/mastermind-skills/profile.md +0 -187
- package/.claude/skills/mastermind-skills/project-detail.md +0 -249
- package/.claude/skills/mastermind-skills/project-workspace.md +0 -244
- package/.claude/skills/mastermind-skills/projects.md +0 -164
- package/.claude/skills/mastermind-skills/receive-review.md +0 -213
- package/.claude/skills/mastermind-skills/references/copywriting-frameworks.md +0 -181
- package/.claude/skills/mastermind-skills/references/persuasion-psychology.md +0 -158
- package/.claude/skills/mastermind-skills/release.md +0 -168
- package/.claude/skills/mastermind-skills/research.md +0 -168
- package/.claude/skills/mastermind-skills/review.md +0 -230
- package/.claude/skills/mastermind-skills/routine-detail.md +0 -253
- package/.claude/skills/mastermind-skills/routines.md +0 -203
- package/.claude/skills/mastermind-skills/runorg.md +0 -714
- package/.claude/skills/mastermind-skills/sales.md +0 -170
- package/.claude/skills/mastermind-skills/search.md +0 -186
- package/.claude/skills/mastermind-skills/secrets.md +0 -199
- package/.claude/skills/mastermind-skills/skill-builder.md +0 -274
- package/.claude/skills/mastermind-skills/skills.md +0 -156
- package/.claude/skills/mastermind-skills/spec-reviewer-prompt.md +0 -63
- package/.claude/skills/mastermind-skills/stoporg.md +0 -138
- package/.claude/skills/mastermind-skills/taskdev.md +0 -307
- package/.claude/skills/mastermind-skills/tasks.md +0 -149
- package/.claude/skills/mastermind-skills/tdd.md +0 -394
- package/.claude/skills/mastermind-skills/techport.md +0 -743
- package/.claude/skills/mastermind-skills/threads.md +0 -259
- package/.claude/skills/mastermind-skills/tree-control.md +0 -250
- package/.claude/skills/mastermind-skills/verify.md +0 -196
- package/.claude/skills/mastermind-skills/wiki.md +0 -314
- package/.claude/skills/mastermind-skills/workspace-detail.md +0 -317
- package/.claude/skills/mastermind-skills/workspaces.md +0 -261
- package/.claude/skills/mastermind-skills/worktree.md +0 -215
- package/.claude/skills/monodesign/SKILL.md +0 -333
- package/.claude/skills/monodesign/adapt.md +0 -53
- package/.claude/skills/monodesign/agents/monodesign-asset-producer.md +0 -100
- package/.claude/skills/monodesign/animate.md +0 -65
- package/.claude/skills/monodesign/audit.md +0 -89
- package/.claude/skills/monodesign/bolder.md +0 -50
- package/.claude/skills/monodesign/clarify.md +0 -64
- package/.claude/skills/monodesign/colorize.md +0 -68
- package/.claude/skills/monodesign/craft.md +0 -51
- package/.claude/skills/monodesign/critique.md +0 -66
- package/.claude/skills/monodesign/delight.md +0 -47
- package/.claude/skills/monodesign/distill.md +0 -56
- package/.claude/skills/monodesign/document.md +0 -80
- package/.claude/skills/monodesign/extract.md +0 -74
- package/.claude/skills/monodesign/harden.md +0 -65
- package/.claude/skills/monodesign/live.md +0 -59
- package/.claude/skills/monodesign/onboard.md +0 -50
- package/.claude/skills/monodesign/optimize.md +0 -64
- package/.claude/skills/monodesign/overdrive.md +0 -56
- package/.claude/skills/monodesign/polish.md +0 -68
- package/.claude/skills/monodesign/quieter.md +0 -57
- package/.claude/skills/monodesign/reference/adapt.md +0 -190
- package/.claude/skills/monodesign/reference/animate.md +0 -175
- package/.claude/skills/monodesign/reference/antipatterns-catalog.md +0 -359
- package/.claude/skills/monodesign/reference/audit.md +0 -133
- package/.claude/skills/monodesign/reference/bolder.md +0 -113
- package/.claude/skills/monodesign/reference/brand-workflow.md +0 -180
- package/.claude/skills/monodesign/reference/brand.md +0 -114
- package/.claude/skills/monodesign/reference/clarify.md +0 -174
- package/.claude/skills/monodesign/reference/codex.md +0 -107
- package/.claude/skills/monodesign/reference/cognitive-load.md +0 -106
- package/.claude/skills/monodesign/reference/color-and-contrast.md +0 -105
- package/.claude/skills/monodesign/reference/colorize.md +0 -154
- package/.claude/skills/monodesign/reference/component-specs.md +0 -260
- package/.claude/skills/monodesign/reference/component-states.md +0 -274
- package/.claude/skills/monodesign/reference/component-system.md +0 -358
- package/.claude/skills/monodesign/reference/copy-formulas.md +0 -160
- package/.claude/skills/monodesign/reference/craft.md +0 -196
- package/.claude/skills/monodesign/reference/critique.md +0 -213
- package/.claude/skills/monodesign/reference/delight.md +0 -302
- package/.claude/skills/monodesign/reference/design-principles.md +0 -246
- package/.claude/skills/monodesign/reference/distill.md +0 -111
- package/.claude/skills/monodesign/reference/document.md +0 -427
- package/.claude/skills/monodesign/reference/extract.md +0 -69
- package/.claude/skills/monodesign/reference/harden.md +0 -347
- package/.claude/skills/monodesign/reference/heuristics-scoring.md +0 -234
- package/.claude/skills/monodesign/reference/hooks.md +0 -99
- package/.claude/skills/monodesign/reference/image-prompts.md +0 -130
- package/.claude/skills/monodesign/reference/interaction-design.md +0 -195
- package/.claude/skills/monodesign/reference/layout.md +0 -141
- package/.claude/skills/monodesign/reference/live.md +0 -622
- package/.claude/skills/monodesign/reference/motion-design.md +0 -109
- package/.claude/skills/monodesign/reference/onboard.md +0 -234
- package/.claude/skills/monodesign/reference/optimize.md +0 -258
- package/.claude/skills/monodesign/reference/overdrive.md +0 -130
- package/.claude/skills/monodesign/reference/personas.md +0 -179
- package/.claude/skills/monodesign/reference/polish.md +0 -233
- package/.claude/skills/monodesign/reference/pre-delivery-checklist.md +0 -108
- package/.claude/skills/monodesign/reference/product.md +0 -62
- package/.claude/skills/monodesign/reference/quieter.md +0 -99
- package/.claude/skills/monodesign/reference/responsive-design.md +0 -114
- package/.claude/skills/monodesign/reference/shape.md +0 -151
- package/.claude/skills/monodesign/reference/spatial-design.md +0 -100
- package/.claude/skills/monodesign/reference/teach.md +0 -156
- package/.claude/skills/monodesign/reference/token-architecture.md +0 -222
- package/.claude/skills/monodesign/reference/typeset.md +0 -124
- package/.claude/skills/monodesign/reference/typography.md +0 -159
- package/.claude/skills/monodesign/reference/ux-research.md +0 -143
- package/.claude/skills/monodesign/reference/ux-rules.md +0 -211
- package/.claude/skills/monodesign/reference/ux-writing.md +0 -107
- package/.claude/skills/monodesign/shape.md +0 -71
- package/.claude/skills/monodesign/teach.md +0 -69
- package/.claude/skills/monodesign/typeset.md +0 -59
- package/.claude/skills/monolean/SKILL.md +0 -118
- package/.claude/skills/monolean-audit/SKILL.md +0 -41
- package/.claude/skills/monolean-debt/SKILL.md +0 -46
- package/.claude/skills/monolean-help/SKILL.md +0 -60
- package/.claude/skills/monolean-review/SKILL.md +0 -57
- package/.claude/skills/monomind/.monomind/registry.json +0 -6
- package/.claude/skills/monomind/browse-agentcore.md +0 -115
- package/.claude/skills/monomind/browse-electron.md +0 -188
- package/.claude/skills/monomind/browse-qa.md +0 -228
- package/.claude/skills/monomind/browse-references/authentication.md +0 -161
- package/.claude/skills/monomind/browse-references/trust-boundaries.md +0 -40
- package/.claude/skills/monomind/browse-references/video-recording.md +0 -83
- package/.claude/skills/monomind/browse-slack.md +0 -188
- package/.claude/skills/monomind/browse-vercel.md +0 -239
- package/.claude/skills/monomind/browse.md +0 -724
- package/.claude/skills/monomotion/SKILL.md +0 -145
- package/.claude/skills/monomotion/rules/api-control.md +0 -139
- package/.claude/skills/monomotion/rules/effects.md +0 -109
- package/.claude/skills/monomotion/rules/integration.md +0 -140
- package/.claude/skills/monomotion/rules/scroll.md +0 -131
- package/.claude/skills/monomotion/rules/sequencing.md +0 -105
- package/.claude/skills/monomotion/rules/svg.md +0 -101
- package/.claude/skills/monomotion/rules/text.md +0 -119
- package/.claude/skills/pair-programming/SKILL.md +0 -1202
- package/.claude/skills/performance-analysis/SKILL.md +0 -560
- package/.claude/skills/skill-builder/SKILL.md +0 -910
- package/.claude/skills/sparc-methodology/SKILL.md +0 -950
- package/.claude/skills/specialagent/SKILL.md +0 -208
- package/.claude/skills/stop-slop/SKILL.md +0 -67
- package/.claude/skills/stop-slop/references/examples.md +0 -61
- package/.claude/skills/stop-slop/references/phrases.md +0 -130
- package/.claude/skills/stop-slop/references/structures.md +0 -136
- package/.claude/skills/swarm-advanced/SKILL.md +0 -937
- package/.claude/skills/swarm-orchestration/SKILL.md +0 -179
- package/.claude/skills/verification-quality/SKILL.md +0 -674
- package/.claude/workflows/feature-dev.yaml +0 -18
- package/.claude/workflows/security-audit.yaml +0 -10
- package/packages/@monomind/cli/.claude/agents/generated/case-analyst.md +0 -50
- package/packages/@monomind/cli/.claude/agents/generated/channel-intelligence-director.md +0 -87
- package/packages/@monomind/cli/.claude/agents/generated/chief-growth-officer.md +0 -88
- package/packages/@monomind/cli/.claude/agents/generated/churn-analyst.md +0 -53
- package/packages/@monomind/cli/.claude/agents/generated/code-reviewer.md +0 -55
- package/packages/@monomind/cli/.claude/agents/generated/code-validator.md +0 -57
- package/packages/@monomind/cli/.claude/agents/generated/complexity-scanner.md +0 -56
- package/packages/@monomind/cli/.claude/agents/generated/content-seo-strategist.md +0 -90
- package/packages/@monomind/cli/.claude/agents/generated/copy-editor.md +0 -45
- package/packages/@monomind/cli/.claude/agents/generated/court-reporter.md +0 -50
- package/packages/@monomind/cli/.claude/agents/generated/defender.md +0 -51
- package/packages/@monomind/cli/.claude/agents/generated/devbot-orchestrator.md +0 -58
- package/packages/@monomind/cli/.claude/agents/generated/devbot-planner.md +0 -63
- package/packages/@monomind/cli/.claude/agents/generated/developer-community-strategist.md +0 -91
- package/packages/@monomind/cli/.claude/agents/generated/editor-in-chief.md +0 -45
- package/packages/@monomind/cli/.claude/agents/generated/fact-checker.md +0 -45
- package/packages/@monomind/cli/.claude/agents/generated/impact-assessor.md +0 -54
- package/packages/@monomind/cli/.claude/agents/generated/judge.md +0 -51
- package/packages/@monomind/cli/.claude/agents/generated/outreach-partnership-strategist.md +0 -90
- package/packages/@monomind/cli/.claude/agents/generated/prosecutor.md +0 -51
- package/packages/@monomind/cli/.claude/agents/generated/reporter.md +0 -45
- package/packages/@monomind/cli/.claude/agents/generated/social-media-strategist.md +0 -91
- package/packages/@monomind/cli/.claude/agents/generated/video-visual-strategist.md +0 -90
- package/packages/@monomind/cli/.claude/agents/reengineer-squad/boss.md +0 -113
- package/packages/@monomind/cli/.claude/agents/reengineer-squad/critic-architect.md +0 -132
- package/packages/@monomind/cli/.claude/agents/reengineer-squad/git-manager.md +0 -145
- package/packages/@monomind/cli/.claude/agents/reengineer-squad/idea-generator.md +0 -95
- package/packages/@monomind/cli/.claude/agents/reengineer-squad/implementer.md +0 -112
- package/packages/@monomind/cli/.claude/agents/reengineer-squad/integration-planner.md +0 -112
- package/packages/@monomind/cli/.claude/agents/reengineer-squad/source-analyst.md +0 -103
- package/packages/@monomind/cli/.claude/agents/reengineer-squad/target-analyst.md +0 -118
- package/packages/@monomind/cli/.claude/agents/reengineer-squad/tester.md +0 -105
- package/packages/@monomind/cli/.claude/agents/sparc/architecture.md +0 -453
- package/packages/@monomind/cli/.claude/agents/sparc/pseudocode.md +0 -299
- package/packages/@monomind/cli/.claude/agents/sparc/refinement.md +0 -504
- package/packages/@monomind/cli/.claude/agents/sparc/specification.md +0 -258
- package/packages/@monomind/cli/.claude/agents/templates/implementer-sparc-coder.md +0 -231
- package/packages/@monomind/cli/.claude/commands/sparc/analyzer.md +0 -35
- package/packages/@monomind/cli/.claude/commands/sparc/architect.md +0 -36
- package/packages/@monomind/cli/.claude/commands/sparc/ask.md +0 -56
- package/packages/@monomind/cli/.claude/commands/sparc/batch-executor.md +0 -37
- package/packages/@monomind/cli/.claude/commands/sparc/code.md +0 -48
- package/packages/@monomind/cli/.claude/commands/sparc/coder.md +0 -37
- package/packages/@monomind/cli/.claude/commands/sparc/debug.md +0 -42
- package/packages/@monomind/cli/.claude/commands/sparc/debugger.md +0 -37
- package/packages/@monomind/cli/.claude/commands/sparc/designer.md +0 -36
- package/packages/@monomind/cli/.claude/commands/sparc/devops.md +0 -68
- package/packages/@monomind/cli/.claude/commands/sparc/docs-writer.md +0 -39
- package/packages/@monomind/cli/.claude/commands/sparc/documenter.md +0 -37
- package/packages/@monomind/cli/.claude/commands/sparc/innovator.md +0 -37
- package/packages/@monomind/cli/.claude/commands/sparc/integration.md +0 -42
- package/packages/@monomind/cli/.claude/commands/sparc/mcp.md +0 -76
- package/packages/@monomind/cli/.claude/commands/sparc/memory-manager.md +0 -57
- package/packages/@monomind/cli/.claude/commands/sparc/optimizer.md +0 -37
- package/packages/@monomind/cli/.claude/commands/sparc/orchestrator.md +0 -70
- package/packages/@monomind/cli/.claude/commands/sparc/post-deployment-monitoring-mode.md +0 -42
- package/packages/@monomind/cli/.claude/commands/sparc/refinement-optimization-mode.md +0 -42
- package/packages/@monomind/cli/.claude/commands/sparc/researcher.md +0 -37
- package/packages/@monomind/cli/.claude/commands/sparc/reviewer.md +0 -37
- package/packages/@monomind/cli/.claude/commands/sparc/security-review.md +0 -39
- package/packages/@monomind/cli/.claude/commands/sparc/sparc-modes.md +0 -120
- package/packages/@monomind/cli/.claude/commands/sparc/sparc.md +0 -71
- package/packages/@monomind/cli/.claude/commands/sparc/spec-pseudocode.md +0 -39
- package/packages/@monomind/cli/.claude/commands/sparc/supabase-admin.md +0 -301
- package/packages/@monomind/cli/.claude/commands/sparc/swarm-coordinator.md +0 -50
- package/packages/@monomind/cli/.claude/commands/sparc/tdd.md +0 -37
- package/packages/@monomind/cli/.claude/commands/sparc/tester.md +0 -37
- package/packages/@monomind/cli/.claude/commands/sparc/tutorial.md +0 -38
- package/packages/@monomind/cli/.claude/commands/sparc/workflow-manager.md +0 -37
- package/packages/@monomind/cli/.claude/commands/sparc.md +0 -112
- package/packages/@monomind/cli/.claude/helpers/auto-memory-hook.mjs +0 -503
- package/packages/@monomind/cli/.claude/skills/sparc-methodology/SKILL.md +0 -950
- package/packages/@monomind/cli/dist/src/capabilities/enrichment.d.ts +0 -44
- package/packages/@monomind/cli/dist/src/capabilities/enrichment.js +0 -141
- package/packages/@monomind/cli/dist/src/commands/analyze-boundaries.d.ts +0 -14
- package/packages/@monomind/cli/dist/src/commands/analyze-boundaries.js +0 -295
- package/packages/@monomind/cli/dist/src/commands/analyze-graph.d.ts +0 -14
- package/packages/@monomind/cli/dist/src/commands/analyze-graph.js +0 -304
- package/packages/@monomind/cli/dist/src/commands/claims.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/claims.js +0 -650
- package/packages/@monomind/cli/dist/src/commands/daemon.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/daemon.js +0 -681
- package/packages/@monomind/cli/dist/src/commands/deployment.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/deployment.js +0 -706
- package/packages/@monomind/cli/dist/src/commands/enrich.d.ts +0 -10
- package/packages/@monomind/cli/dist/src/commands/enrich.js +0 -58
- package/packages/@monomind/cli/dist/src/commands/issues.d.ts +0 -21
- package/packages/@monomind/cli/dist/src/commands/issues.js +0 -575
- package/packages/@monomind/cli/dist/src/commands/workflow.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/commands/workflow.js +0 -677
- package/packages/@monomind/cli/dist/src/mcp-tools/workflow-tools.d.ts +0 -8
- package/packages/@monomind/cli/dist/src/mcp-tools/workflow-tools.js +0 -717
- package/packages/@monomind/cli/dist/src/services/claim-service.d.ts +0 -198
- package/packages/@monomind/cli/dist/src/services/claim-service.js +0 -890
- package/packages/@monomind/cli/dist/src/services/headless-worker-executor.d.ts +0 -311
- package/packages/@monomind/cli/dist/src/services/headless-worker-executor.js +0 -1183
- package/packages/@monomind/cli/dist/src/services/worker-daemon.d.ts +0 -248
- package/packages/@monomind/cli/dist/src/services/worker-daemon.js +0 -1417
- package/packages/@monomind/cli/dist/src/ui/.monomind/capture/active-run.json +0 -1
- package/packages/@monomind/guidance/README.md +0 -87
- package/packages/@monomind/guidance/dist/adversarial.d.ts +0 -284
- package/packages/@monomind/guidance/dist/adversarial.js +0 -572
- package/packages/@monomind/guidance/dist/analyzer.d.ts +0 -530
- package/packages/@monomind/guidance/dist/analyzer.js +0 -2518
- package/packages/@monomind/guidance/dist/artifacts.d.ts +0 -283
- package/packages/@monomind/guidance/dist/artifacts.js +0 -356
- package/packages/@monomind/guidance/dist/authority.d.ts +0 -290
- package/packages/@monomind/guidance/dist/authority.js +0 -558
- package/packages/@monomind/guidance/dist/capabilities.d.ts +0 -209
- package/packages/@monomind/guidance/dist/capabilities.js +0 -485
- package/packages/@monomind/guidance/dist/coherence.d.ts +0 -233
- package/packages/@monomind/guidance/dist/coherence.js +0 -378
- package/packages/@monomind/guidance/dist/compiler.d.ts +0 -87
- package/packages/@monomind/guidance/dist/compiler.js +0 -425
- package/packages/@monomind/guidance/dist/conformance-kit.d.ts +0 -225
- package/packages/@monomind/guidance/dist/conformance-kit.js +0 -629
- package/packages/@monomind/guidance/dist/continue-gate.d.ts +0 -214
- package/packages/@monomind/guidance/dist/continue-gate.js +0 -353
- package/packages/@monomind/guidance/dist/crypto-utils.d.ts +0 -17
- package/packages/@monomind/guidance/dist/crypto-utils.js +0 -24
- package/packages/@monomind/guidance/dist/evolution.d.ts +0 -282
- package/packages/@monomind/guidance/dist/evolution.js +0 -500
- package/packages/@monomind/guidance/dist/gates.d.ts +0 -79
- package/packages/@monomind/guidance/dist/gates.js +0 -302
- package/packages/@monomind/guidance/dist/gateway.d.ts +0 -206
- package/packages/@monomind/guidance/dist/gateway.js +0 -452
- package/packages/@monomind/guidance/dist/generators.d.ts +0 -153
- package/packages/@monomind/guidance/dist/generators.js +0 -682
- package/packages/@monomind/guidance/dist/headless.d.ts +0 -177
- package/packages/@monomind/guidance/dist/headless.js +0 -342
- package/packages/@monomind/guidance/dist/hooks.d.ts +0 -109
- package/packages/@monomind/guidance/dist/hooks.js +0 -347
- package/packages/@monomind/guidance/dist/index.d.ts +0 -203
- package/packages/@monomind/guidance/dist/index.js +0 -320
- package/packages/@monomind/guidance/dist/ledger.d.ts +0 -162
- package/packages/@monomind/guidance/dist/ledger.js +0 -375
- package/packages/@monomind/guidance/dist/manifest-validator.d.ts +0 -289
- package/packages/@monomind/guidance/dist/manifest-validator.js +0 -838
- package/packages/@monomind/guidance/dist/memory-gate.d.ts +0 -222
- package/packages/@monomind/guidance/dist/memory-gate.js +0 -382
- package/packages/@monomind/guidance/dist/meta-governance.d.ts +0 -265
- package/packages/@monomind/guidance/dist/meta-governance.js +0 -348
- package/packages/@monomind/guidance/dist/optimizer.d.ts +0 -104
- package/packages/@monomind/guidance/dist/optimizer.js +0 -329
- package/packages/@monomind/guidance/dist/persistence.d.ts +0 -189
- package/packages/@monomind/guidance/dist/persistence.js +0 -464
- package/packages/@monomind/guidance/dist/proof.d.ts +0 -185
- package/packages/@monomind/guidance/dist/proof.js +0 -238
- package/packages/@monomind/guidance/dist/retriever.d.ts +0 -116
- package/packages/@monomind/guidance/dist/retriever.js +0 -394
- package/packages/@monomind/guidance/dist/ruvbot-integration.d.ts +0 -370
- package/packages/@monomind/guidance/dist/ruvbot-integration.js +0 -738
- package/packages/@monomind/guidance/dist/temporal.d.ts +0 -428
- package/packages/@monomind/guidance/dist/temporal.js +0 -660
- package/packages/@monomind/guidance/dist/trust.d.ts +0 -283
- package/packages/@monomind/guidance/dist/trust.js +0 -474
- package/packages/@monomind/guidance/dist/truth-anchors.d.ts +0 -276
- package/packages/@monomind/guidance/dist/truth-anchors.js +0 -488
- package/packages/@monomind/guidance/dist/types.d.ts +0 -378
- package/packages/@monomind/guidance/dist/types.js +0 -10
- package/packages/@monomind/guidance/dist/uncertainty.d.ts +0 -372
- package/packages/@monomind/guidance/dist/uncertainty.js +0 -619
- package/packages/@monomind/guidance/dist/wasm-kernel.d.ts +0 -48
- package/packages/@monomind/guidance/dist/wasm-kernel.js +0 -158
- package/packages/@monomind/guidance/package.json +0 -192
|
@@ -2,1810 +2,260 @@
|
|
|
2
2
|
<html lang="en">
|
|
3
3
|
<head>
|
|
4
4
|
<meta charset="UTF-8">
|
|
5
|
-
<meta name="viewport" content="width=device-width,initial-scale=1">
|
|
6
|
-
<title>
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
6
|
+
<title>monobrowse dashboard</title>
|
|
7
7
|
<style>
|
|
8
|
-
* {
|
|
9
|
-
body { background: #
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
background: #
|
|
14
|
-
border-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
.
|
|
26
|
-
.
|
|
27
|
-
.
|
|
28
|
-
.
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
#
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
padding:
|
|
44
|
-
}
|
|
45
|
-
.
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
color: #
|
|
51
|
-
padding:
|
|
52
|
-
}
|
|
53
|
-
.
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
padding: 6px 14px;
|
|
58
|
-
cursor: pointer;
|
|
59
|
-
color: #666;
|
|
60
|
-
font-size: 12px;
|
|
61
|
-
border-left: 2px solid transparent;
|
|
62
|
-
transition: all .12s;
|
|
63
|
-
user-select: none;
|
|
64
|
-
}
|
|
65
|
-
.nav-item:hover { color: #aaa; background: #ffffff08; }
|
|
66
|
-
.nav-item.active { color: #c4b5fd; border-left-color: #7c3aed; background: #7c3aed12; }
|
|
67
|
-
.nav-item .nav-icon { font-size: 14px; width: 16px; text-align: center; }
|
|
68
|
-
.nav-badge { margin-left: auto; background: #7c3aed33; border-radius: 8px; padding: 0 5px; font-size: 9px; color: #a78bfa; min-width: 16px; text-align: center; }
|
|
69
|
-
.nav-badge.green { background: #22c55e22; color: #22c55e; }
|
|
70
|
-
|
|
71
|
-
/* ── main panel ──────────────────────────────────────────── */
|
|
72
|
-
#main { flex: 1; overflow: hidden; display: flex; flex-direction: column; }
|
|
73
|
-
.panel { display: none; flex: 1; flex-direction: column; overflow: hidden; }
|
|
74
|
-
.panel.active { display: flex; }
|
|
75
|
-
.panel-header {
|
|
76
|
-
padding: 14px 18px 10px;
|
|
77
|
-
border-bottom: 1px solid #1a1a2a;
|
|
78
|
-
display: flex;
|
|
79
|
-
align-items: center;
|
|
80
|
-
gap: 10px;
|
|
81
|
-
flex-shrink: 0;
|
|
82
|
-
}
|
|
83
|
-
.panel-title { font-size: 14px; font-weight: 600; color: #ddd; }
|
|
84
|
-
.panel-subtitle { color: #555; font-size: 11px; margin-left: auto; }
|
|
85
|
-
|
|
86
|
-
/* ── playbook run cards ──────────────────────────────────── */
|
|
87
|
-
#pb-cards { padding: 12px; display: grid; gap: 10px; overflow-y: auto; }
|
|
88
|
-
.card {
|
|
89
|
-
background: #131320;
|
|
90
|
-
border: 1px solid #7c3aed30;
|
|
91
|
-
border-radius: 8px;
|
|
92
|
-
padding: 12px 14px;
|
|
93
|
-
transition: border-color .2s;
|
|
94
|
-
}
|
|
95
|
-
.card:hover { border-color: #7c3aed66; }
|
|
96
|
-
.card.done { background: #0e0e1c; border-color: #1e1e30; opacity: .7; }
|
|
97
|
-
.card.done:hover { opacity: .9; border-color: #2a2a40; }
|
|
98
|
-
.card-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
|
|
99
|
-
.card-title { color: #e2e2f0; font-weight: 600; font-size: 13px; flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
100
|
-
.status-badge { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; border-radius: 4px; padding: 2px 6px; border: 1px solid; flex-shrink: 0; }
|
|
101
|
-
.s-running { background: #7c3aed18; border-color: #7c3aed55; color: #a78bfa; }
|
|
102
|
-
.s-completed { background: #22c55e15; border-color: #22c55e44; color: #22c55e; }
|
|
103
|
-
.s-failed { background: #ef444415; border-color: #ef444444; color: #ef4444; }
|
|
104
|
-
.s-stopped { background: #f59e0b15; border-color: #f59e0b44; color: #f59e0b; }
|
|
105
|
-
.card-meta { display: flex; gap: 14px; font-size: 10px; color: #444; margin-bottom: 6px; align-items: center; }
|
|
106
|
-
.card-meta .mitem { display: flex; align-items: center; gap: 3px; }
|
|
107
|
-
.stop-btn { margin-left: auto; background: #ef444415; border: 1px solid #ef444433; color: #ef4444; border-radius: 4px; padding: 2px 8px; font-size: 10px; cursor: pointer; transition: background .15s; }
|
|
108
|
-
.stop-btn:hover { background: #ef444430; }
|
|
109
|
-
.progress-track { height: 2px; background: #1a1a2a; border-radius: 2px; overflow: hidden; margin-bottom: 6px; }
|
|
110
|
-
.progress-fill { height: 100%; background: linear-gradient(90deg, #7c3aed, #a78bfa); border-radius: 2px; transition: width .4s; }
|
|
111
|
-
.log-area { background: #09090f; border-radius: 4px; padding: 5px 8px; font-family: monospace; font-size: 10px; color: #555; line-height: 1.6; max-height: 72px; overflow: hidden; }
|
|
112
|
-
.log-ts { color: #2a2a40; }
|
|
113
|
-
.log-ok { color: #22c55e88; }
|
|
114
|
-
.log-err { color: #ef444488; }
|
|
115
|
-
.log-info { color: #3b82f688; }
|
|
116
|
-
|
|
117
|
-
/* ── empty state ─────────────────────────────────────────── */
|
|
118
|
-
.empty {
|
|
119
|
-
flex: 1;
|
|
120
|
-
display: flex;
|
|
121
|
-
flex-direction: column;
|
|
122
|
-
align-items: center;
|
|
123
|
-
justify-content: center;
|
|
124
|
-
color: #333;
|
|
125
|
-
gap: 8px;
|
|
126
|
-
padding: 40px;
|
|
127
|
-
}
|
|
128
|
-
.empty-icon { font-size: 32px; }
|
|
129
|
-
.empty-title { color: #555; font-size: 14px; font-weight: 600; }
|
|
130
|
-
.empty-sub { font-size: 11px; text-align: center; line-height: 1.6; }
|
|
131
|
-
|
|
132
|
-
/* ── placeholder panels ─────────────────────────────────── */
|
|
133
|
-
#agents-panel .placeholder,
|
|
134
|
-
#memory-panel .placeholder,
|
|
135
|
-
#sessions-panel .placeholder {
|
|
136
|
-
flex: 1;
|
|
137
|
-
display: flex;
|
|
138
|
-
flex-direction: column;
|
|
139
|
-
align-items: center;
|
|
140
|
-
justify-content: center;
|
|
141
|
-
color: #2a2a3a;
|
|
142
|
-
gap: 8px;
|
|
143
|
-
font-size: 12px;
|
|
144
|
-
}
|
|
145
|
-
#agents-panel .placeholder .big { font-size: 28px; }
|
|
146
|
-
|
|
147
|
-
/* ── playbook builder ────────────────────────────────────── */
|
|
148
|
-
#builder-panel { display: none; flex-direction: column; overflow: hidden; }
|
|
149
|
-
#builder-panel.active { display: flex; }
|
|
150
|
-
|
|
151
|
-
/* Builder toolbar */
|
|
152
|
-
#builder-toolbar {
|
|
153
|
-
display: flex;
|
|
154
|
-
align-items: center;
|
|
155
|
-
gap: 8px;
|
|
156
|
-
padding: 8px 12px;
|
|
157
|
-
border-bottom: 1px solid #1a1a2a;
|
|
158
|
-
background: #0f0f1e;
|
|
159
|
-
flex-shrink: 0;
|
|
160
|
-
}
|
|
161
|
-
#pb-name-input {
|
|
162
|
-
background: #0b0b14;
|
|
163
|
-
border: 1px solid #1e1e30;
|
|
164
|
-
border-radius: 5px;
|
|
165
|
-
padding: 4px 10px;
|
|
166
|
-
color: #ddd;
|
|
167
|
-
font-size: 12px;
|
|
168
|
-
width: 200px;
|
|
169
|
-
outline: none;
|
|
170
|
-
}
|
|
171
|
-
#pb-name-input:focus { border-color: #7c3aed66; }
|
|
172
|
-
.tb-btn {
|
|
173
|
-
background: #131320;
|
|
174
|
-
border: 1px solid #1e1e30;
|
|
175
|
-
border-radius: 5px;
|
|
176
|
-
padding: 4px 10px;
|
|
177
|
-
color: #999;
|
|
178
|
-
font-size: 11px;
|
|
179
|
-
cursor: pointer;
|
|
180
|
-
transition: all .12s;
|
|
181
|
-
display: flex;
|
|
182
|
-
align-items: center;
|
|
183
|
-
gap: 5px;
|
|
184
|
-
white-space: nowrap;
|
|
185
|
-
}
|
|
186
|
-
.tb-btn:hover { border-color: #7c3aed55; color: #c4b5fd; background: #7c3aed12; }
|
|
187
|
-
.tb-btn.run-btn { border-color: #22c55e44; color: #22c55e; background: #22c55e10; }
|
|
188
|
-
.tb-btn.run-btn:hover { background: #22c55e22; }
|
|
189
|
-
.tb-btn.danger { border-color: #ef444433; color: #ef4444; background: #ef444410; }
|
|
190
|
-
.tb-btn.danger:hover { background: #ef444425; }
|
|
191
|
-
.tb-sep { width: 1px; height: 20px; background: #1e1e30; }
|
|
192
|
-
|
|
193
|
-
/* Builder body = palette + canvas + properties */
|
|
194
|
-
#builder-body { display: flex; flex: 1; overflow: hidden; }
|
|
195
|
-
|
|
196
|
-
/* Node palette */
|
|
197
|
-
#node-palette {
|
|
198
|
-
width: 200px;
|
|
199
|
-
background: #0c0c1a;
|
|
200
|
-
border-right: 1px solid #1a1a2a;
|
|
201
|
-
display: flex;
|
|
202
|
-
flex-direction: column;
|
|
203
|
-
flex-shrink: 0;
|
|
204
|
-
overflow-y: auto;
|
|
205
|
-
}
|
|
206
|
-
#palette-search {
|
|
207
|
-
margin: 8px;
|
|
208
|
-
background: #0b0b14;
|
|
209
|
-
border: 1px solid #1e1e30;
|
|
210
|
-
border-radius: 5px;
|
|
211
|
-
padding: 5px 8px;
|
|
212
|
-
color: #ccc;
|
|
213
|
-
font-size: 11px;
|
|
214
|
-
outline: none;
|
|
215
|
-
flex-shrink: 0;
|
|
216
|
-
}
|
|
217
|
-
#palette-search:focus { border-color: #7c3aed55; }
|
|
218
|
-
.palette-cat-label {
|
|
219
|
-
font-size: 9px;
|
|
220
|
-
font-weight: 700;
|
|
221
|
-
text-transform: uppercase;
|
|
222
|
-
letter-spacing: 1px;
|
|
223
|
-
color: #3a3a5a;
|
|
224
|
-
padding: 8px 10px 3px;
|
|
225
|
-
flex-shrink: 0;
|
|
226
|
-
}
|
|
227
|
-
.palette-node {
|
|
228
|
-
display: flex;
|
|
229
|
-
align-items: center;
|
|
230
|
-
gap: 7px;
|
|
231
|
-
padding: 5px 10px;
|
|
232
|
-
cursor: grab;
|
|
233
|
-
font-size: 11px;
|
|
234
|
-
color: #777;
|
|
235
|
-
border-left: 2px solid transparent;
|
|
236
|
-
transition: all .1s;
|
|
237
|
-
user-select: none;
|
|
238
|
-
flex-shrink: 0;
|
|
239
|
-
}
|
|
240
|
-
.palette-node:hover { color: #bbb; background: #ffffff08; }
|
|
241
|
-
.palette-node:active { cursor: grabbing; }
|
|
242
|
-
.palette-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
|
|
243
|
-
|
|
244
|
-
/* Canvas area */
|
|
245
|
-
#canvas-wrap {
|
|
246
|
-
flex: 1;
|
|
247
|
-
position: relative;
|
|
248
|
-
overflow: hidden;
|
|
249
|
-
background: #0b0b14;
|
|
250
|
-
background-image:
|
|
251
|
-
radial-gradient(circle, #1e1e30 1px, transparent 1px);
|
|
252
|
-
background-size: 24px 24px;
|
|
253
|
-
}
|
|
254
|
-
#canvas-svg {
|
|
255
|
-
position: absolute;
|
|
256
|
-
top: 0; left: 0;
|
|
257
|
-
width: 100%; height: 100%;
|
|
258
|
-
pointer-events: none;
|
|
259
|
-
}
|
|
260
|
-
#canvas-nodes {
|
|
261
|
-
position: absolute;
|
|
262
|
-
top: 0; left: 0;
|
|
263
|
-
width: 0; height: 0;
|
|
264
|
-
transform-origin: 0 0;
|
|
265
|
-
}
|
|
266
|
-
|
|
267
|
-
/* Canvas node */
|
|
268
|
-
.cn {
|
|
269
|
-
position: absolute;
|
|
270
|
-
width: 200px;
|
|
271
|
-
background: linear-gradient(160deg,#0d0d1e 0%,#090914 100%);
|
|
272
|
-
border: 1.5px solid rgba(124,58,237,0.15);
|
|
273
|
-
border-radius: 9px;
|
|
274
|
-
user-select: none;
|
|
275
|
-
cursor: default;
|
|
276
|
-
box-shadow: 0 6px 20px rgba(0,0,0,.5);
|
|
277
|
-
transition: border-color .14s, box-shadow .14s;
|
|
278
|
-
}
|
|
279
|
-
.cn.selected { box-shadow: 0 0 0 1.5px #7c3aed55, 0 12px 32px rgba(0,0,0,.7); }
|
|
280
|
-
.cn.running { animation: nodePulse 1s ease-in-out infinite; }
|
|
281
|
-
.cn-header {
|
|
282
|
-
height: 40px;
|
|
283
|
-
border-radius: 8px 8px 0 0;
|
|
284
|
-
display: flex;
|
|
285
|
-
align-items: center;
|
|
286
|
-
padding: 0 8px 0 10px;
|
|
287
|
-
cursor: grab;
|
|
288
|
-
gap: 6px;
|
|
289
|
-
border-bottom: 1px solid rgba(124,58,237,0.1);
|
|
290
|
-
}
|
|
291
|
-
.cn-header:active { cursor: grabbing; }
|
|
292
|
-
.cn-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
|
|
293
|
-
.cn-label { flex: 1; font-size: 11px; font-weight: 600; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: monospace; }
|
|
294
|
-
.cn-del { background: none; border: none; cursor: pointer; color: rgba(148,163,184,.3); font-size: 14px; padding: 1px 3px; line-height: 1; transition: color .1s; }
|
|
295
|
-
.cn-del:hover { color: #ef4444; }
|
|
296
|
-
.cn-ports { padding: 6px 0; }
|
|
297
|
-
.cn-row { height: 26px; display: flex; align-items: center; justify-content: space-between; }
|
|
298
|
-
.cn-port-area { display: flex; align-items: center; gap: 5px; }
|
|
299
|
-
.cn-port {
|
|
300
|
-
width: 11px; height: 11px;
|
|
301
|
-
border-radius: 50%;
|
|
302
|
-
background: #1e1e30;
|
|
303
|
-
border: 1.5px solid rgba(124,58,237,0.4);
|
|
304
|
-
cursor: crosshair;
|
|
305
|
-
flex-shrink: 0;
|
|
306
|
-
transition: all .1s;
|
|
307
|
-
}
|
|
308
|
-
.cn-port:hover, .cn-port.highlight { background: #7c3aed; border-color: #7c3aed; }
|
|
309
|
-
.cn-port.in { margin-left: -6px; }
|
|
310
|
-
.cn-port.out { margin-right: -6px; }
|
|
311
|
-
.cn-port-label { font-size: 9px; color: #3a3a5a; font-family: monospace; }
|
|
312
|
-
.cn-status {
|
|
313
|
-
position: absolute; top: -9px; right: -5px;
|
|
314
|
-
font-size: 8px; font-weight: 700;
|
|
315
|
-
border-radius: 8px; padding: 1px 5px;
|
|
316
|
-
pointer-events: none;
|
|
317
|
-
white-space: nowrap;
|
|
318
|
-
}
|
|
319
|
-
.cn-status.running { background: #7c3aed; color: #fff; box-shadow: 0 0 8px #7c3aed66; }
|
|
320
|
-
.cn-status.ok { background: #10b981; color: #fff; box-shadow: 0 0 8px #10b98166; }
|
|
321
|
-
.cn-status.error { background: #ef4444; color: #fff; box-shadow: 0 0 8px #ef444466; }
|
|
322
|
-
.cn-status.skipped { background: #6b7280; color: #fff; }
|
|
323
|
-
|
|
324
|
-
/* Properties panel */
|
|
325
|
-
#props-panel {
|
|
326
|
-
width: 240px;
|
|
327
|
-
background: #0c0c1a;
|
|
328
|
-
border-left: 1px solid #1a1a2a;
|
|
329
|
-
display: flex;
|
|
330
|
-
flex-direction: column;
|
|
331
|
-
flex-shrink: 0;
|
|
332
|
-
overflow-y: auto;
|
|
333
|
-
}
|
|
334
|
-
#props-header {
|
|
335
|
-
padding: 10px 12px 8px;
|
|
336
|
-
border-bottom: 1px solid #1a1a2a;
|
|
337
|
-
font-size: 10px;
|
|
338
|
-
font-weight: 700;
|
|
339
|
-
text-transform: uppercase;
|
|
340
|
-
letter-spacing: 1px;
|
|
341
|
-
color: #3a3a5a;
|
|
342
|
-
flex-shrink: 0;
|
|
343
|
-
}
|
|
344
|
-
#props-body { padding: 10px 12px; flex: 1; }
|
|
345
|
-
.prop-row { margin-bottom: 10px; }
|
|
346
|
-
.prop-label { font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #444; margin-bottom: 4px; }
|
|
347
|
-
.prop-input, .prop-select, .prop-textarea {
|
|
348
|
-
width: 100%;
|
|
349
|
-
background: #0b0b14;
|
|
350
|
-
border: 1px solid #1e1e30;
|
|
351
|
-
border-radius: 4px;
|
|
352
|
-
padding: 5px 8px;
|
|
353
|
-
color: #ccc;
|
|
354
|
-
font-size: 11px;
|
|
355
|
-
outline: none;
|
|
356
|
-
font-family: monospace;
|
|
357
|
-
}
|
|
358
|
-
.prop-input:focus, .prop-select:focus, .prop-textarea:focus { border-color: #7c3aed55; }
|
|
359
|
-
.prop-select { appearance: none; cursor: pointer; }
|
|
360
|
-
.prop-textarea { resize: vertical; min-height: 60px; }
|
|
361
|
-
|
|
362
|
-
/* Playbook list inside builder */
|
|
363
|
-
#pb-list-overlay {
|
|
364
|
-
display: none;
|
|
365
|
-
position: absolute;
|
|
366
|
-
inset: 0;
|
|
367
|
-
background: rgba(10,10,20,0.85);
|
|
368
|
-
z-index: 100;
|
|
369
|
-
align-items: center;
|
|
370
|
-
justify-content: center;
|
|
371
|
-
}
|
|
372
|
-
#pb-list-overlay.show { display: flex; }
|
|
373
|
-
#pb-list-box {
|
|
374
|
-
width: 480px;
|
|
375
|
-
max-height: 70vh;
|
|
376
|
-
background: #0d0d1a;
|
|
377
|
-
border: 1px solid #7c3aed33;
|
|
378
|
-
border-radius: 10px;
|
|
379
|
-
display: flex;
|
|
380
|
-
flex-direction: column;
|
|
381
|
-
overflow: hidden;
|
|
382
|
-
box-shadow: 0 24px 60px rgba(0,0,0,.8);
|
|
383
|
-
}
|
|
384
|
-
.pblo-header {
|
|
385
|
-
padding: 12px 14px;
|
|
386
|
-
border-bottom: 1px solid #1a1a2a;
|
|
387
|
-
display: flex;
|
|
388
|
-
align-items: center;
|
|
389
|
-
gap: 8px;
|
|
390
|
-
flex-shrink: 0;
|
|
391
|
-
}
|
|
392
|
-
.pblo-title { font-size: 12px; font-weight: 700; color: #ddd; flex: 1; font-family: monospace; text-transform: uppercase; letter-spacing: 1px; }
|
|
393
|
-
.pblo-close { background: none; border: none; cursor: pointer; color: #555; font-size: 16px; }
|
|
394
|
-
.pblo-close:hover { color: #aaa; }
|
|
395
|
-
.pblo-body { flex: 1; overflow-y: auto; }
|
|
396
|
-
.pblo-item {
|
|
397
|
-
display: flex;
|
|
398
|
-
align-items: center;
|
|
399
|
-
gap: 10px;
|
|
400
|
-
padding: 10px 14px;
|
|
401
|
-
border-bottom: 1px solid #1a1a2a10;
|
|
402
|
-
cursor: pointer;
|
|
403
|
-
transition: background .1s;
|
|
404
|
-
}
|
|
405
|
-
.pblo-item:hover { background: #7c3aed10; }
|
|
406
|
-
.pblo-item-name { flex: 1; font-size: 12px; color: #ccc; }
|
|
407
|
-
.pblo-item-meta { font-size: 10px; color: #444; }
|
|
408
|
-
.pblo-del { background: none; border: none; cursor: pointer; color: #444; font-size: 12px; padding: 2px 5px; }
|
|
409
|
-
.pblo-del:hover { color: #ef4444; }
|
|
410
|
-
.pblo-empty { padding: 30px; text-align: center; color: #333; font-size: 12px; }
|
|
411
|
-
|
|
412
|
-
@keyframes nodePulse {
|
|
413
|
-
0%, 100% { box-shadow: 0 0 0 0 rgba(124,58,237,0.4), 0 6px 20px rgba(0,0,0,.5); }
|
|
414
|
-
50% { box-shadow: 0 0 0 4px rgba(124,58,237,0.1), 0 6px 20px rgba(0,0,0,.5); }
|
|
415
|
-
}
|
|
8
|
+
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
9
|
+
body { background: #0f0f1a; color: #ccc; font-family: system-ui, sans-serif; font-size: 13px; }
|
|
10
|
+
header { background: #7c3aed; padding: 10px 16px; display: flex; justify-content: space-between; align-items: center; }
|
|
11
|
+
header h1 { color: #fff; font-size: 14px; font-weight: 600; }
|
|
12
|
+
header .meta { color: rgba(255,255,255,.7); font-size: 11px; }
|
|
13
|
+
.stats { display: flex; gap: 10px; padding: 12px 16px; background: #1a1a2e; border-bottom: 1px solid #2a2a3e; }
|
|
14
|
+
.badge { border-radius: 4px; padding: 3px 10px; font-size: 11px; border: 1px solid; }
|
|
15
|
+
.badge.running { background: #22c55e22; border-color: #22c55e55; color: #22c55e; }
|
|
16
|
+
.badge.done { background: #55555522; border-color: #55555544; color: #888; }
|
|
17
|
+
.badge.failed { background: #ef444422; border-color: #ef444444; color: #ef4444; }
|
|
18
|
+
.runs { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
|
|
19
|
+
.run { background: #1a1a2e; border: 1px solid #2a2a3e; border-radius: 8px; padding: 12px; }
|
|
20
|
+
.run.active { border-color: #7c3aed44; }
|
|
21
|
+
.run.completed { opacity: .6; }
|
|
22
|
+
.run.failed { border-color: #ef444444; }
|
|
23
|
+
.run-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
|
|
24
|
+
.run-name { font-weight: 600; color: #e2e8f0; }
|
|
25
|
+
.status-badge { font-size: 10px; padding: 1px 6px; border-radius: 3px; margin-left: 8px; }
|
|
26
|
+
.status-running { background: #7c3aed22; color: #7c3aed; }
|
|
27
|
+
.status-completed { background: #22c55e22; color: #22c55e; }
|
|
28
|
+
.status-failed { background: #ef444422; color: #ef4444; }
|
|
29
|
+
.status-stopped { background: #f59e0b22; color: #f59e0b; }
|
|
30
|
+
.run-meta { color: #555; font-size: 11px; display: flex; gap: 12px; }
|
|
31
|
+
.steps { margin-top: 8px; display: flex; flex-direction: column; gap: 3px; font-size: 11px; font-family: monospace; }
|
|
32
|
+
.step { display: flex; align-items: center; gap: 8px; }
|
|
33
|
+
.step-icon { width: 14px; flex-shrink: 0; }
|
|
34
|
+
.step-name { flex: 1; }
|
|
35
|
+
.step-time { color: #555; font-size: 10px; }
|
|
36
|
+
.step.current .step-name { color: #fff; font-weight: 600; }
|
|
37
|
+
.step.done .step-icon { color: #22c55e; }
|
|
38
|
+
.step.current .step-icon { color: #3b82f6; }
|
|
39
|
+
.step.pending .step-icon { color: #555; }
|
|
40
|
+
.step.error .step-icon { color: #ef4444; }
|
|
41
|
+
.progress-bar { height: 3px; background: #333; border-radius: 2px; margin: 6px 0 2px; }
|
|
42
|
+
.progress-fill { height: 3px; background: #3b82f6; border-radius: 2px; transition: width .3s; }
|
|
43
|
+
.log { margin-top: 8px; background: #0f0f0f; border-radius: 4px; padding: 6px 8px;
|
|
44
|
+
font-family: monospace; font-size: 10px; color: #555; line-height: 1.6; max-height: 60px; overflow: hidden; }
|
|
45
|
+
.stop-btn { background: #ef444422; border: 1px solid #ef444444; color: #ef4444;
|
|
46
|
+
border-radius: 4px; padding: 2px 8px; font-size: 10px; cursor: pointer; }
|
|
47
|
+
.empty { padding: 40px; text-align: center; color: #555; }
|
|
48
|
+
.panels { padding: 12px 16px; display: flex; flex-direction: column; gap: 10px; }
|
|
49
|
+
.panel { background: #1a1a2e; border: 1px solid #2a2a3e; border-radius: 8px; padding: 12px; }
|
|
50
|
+
.panel h2 { font-size: 12px; color: #e2e8f0; margin-bottom: 8px; text-transform: uppercase; letter-spacing: .04em; }
|
|
51
|
+
.panel .empty { padding: 10px; font-size: 11px; }
|
|
52
|
+
.kv-list { display: flex; flex-direction: column; gap: 4px; font-size: 11px; font-family: monospace; }
|
|
53
|
+
.kv-row { display: flex; justify-content: space-between; gap: 12px; color: #aaa; }
|
|
54
|
+
.kv-row b { color: #ddd; font-weight: 600; }
|
|
55
|
+
.worker-chip { display: inline-block; background: #7c3aed22; border: 1px solid #7c3aed44; color: #a78bfa;
|
|
56
|
+
border-radius: 4px; padding: 2px 8px; font-size: 10px; margin: 2px 4px 2px 0; }
|
|
416
57
|
</style>
|
|
417
58
|
</head>
|
|
418
59
|
<body>
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
<
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
<span class="
|
|
425
|
-
<span class="
|
|
426
|
-
<span id="
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
60
|
+
<header>
|
|
61
|
+
<h1>monobrowse dashboard</h1>
|
|
62
|
+
<span class="meta" id="meta">connecting...</span>
|
|
63
|
+
</header>
|
|
64
|
+
<div class="stats">
|
|
65
|
+
<span class="badge running" id="stat-running">0 running</span>
|
|
66
|
+
<span class="badge done" id="stat-done">0 done</span>
|
|
67
|
+
<span class="badge failed" id="stat-failed">0 failed</span>
|
|
68
|
+
</div>
|
|
69
|
+
<div class="runs" id="runs">
|
|
70
|
+
<div class="empty">No workflows running. Start one with:<br><code>monomind browse workflow run <file.json></code></div>
|
|
430
71
|
</div>
|
|
431
72
|
|
|
432
|
-
|
|
433
|
-
<div
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
<
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
<
|
|
443
|
-
|
|
444
|
-
</div>
|
|
445
|
-
|
|
446
|
-
<div class="nav-section-label" style="margin-top:8px">System</div>
|
|
447
|
-
<div class="nav-item" data-panel="agents">
|
|
448
|
-
<span class="nav-icon">🤖</span> Agents
|
|
449
|
-
</div>
|
|
450
|
-
<div class="nav-item" data-panel="memory">
|
|
451
|
-
<span class="nav-icon">🧠</span> Memory
|
|
452
|
-
</div>
|
|
453
|
-
<div class="nav-item" data-panel="sessions">
|
|
454
|
-
<span class="nav-icon">🔗</span> Sessions
|
|
455
|
-
</div>
|
|
456
|
-
</nav>
|
|
457
|
-
|
|
458
|
-
<!-- main -->
|
|
459
|
-
<div id="main">
|
|
460
|
-
|
|
461
|
-
<!-- Playbook Runs panel -->
|
|
462
|
-
<div class="panel active" id="pb-panel">
|
|
463
|
-
<div class="panel-header">
|
|
464
|
-
<span class="panel-title">Playbook Runs</span>
|
|
465
|
-
<span class="panel-subtitle" id="pb-subtitle">0 runs</span>
|
|
466
|
-
</div>
|
|
467
|
-
<div id="pb-cards" style="overflow-y:auto;flex:1;padding:12px;display:grid;gap:10px;align-content:start"></div>
|
|
468
|
-
<div class="empty" id="pb-empty">
|
|
469
|
-
<span class="empty-icon">⚡</span>
|
|
470
|
-
<span class="empty-title">No playbook runs yet</span>
|
|
471
|
-
<span class="empty-sub">Use the Builder tab to create and run playbooks,<br>or run via CLI: <code style="color:#7c3aed">npx monomind browse playbook run <name></code></span>
|
|
472
|
-
</div>
|
|
473
|
-
</div>
|
|
474
|
-
|
|
475
|
-
<!-- Builder panel -->
|
|
476
|
-
<div class="panel" id="builder-panel">
|
|
477
|
-
<!-- Toolbar -->
|
|
478
|
-
<div id="builder-toolbar">
|
|
479
|
-
<input id="pb-name-input" type="text" placeholder="Untitled Playbook" value="Untitled Playbook" />
|
|
480
|
-
<div class="tb-sep"></div>
|
|
481
|
-
<button class="tb-btn" id="btn-new" title="New playbook">+ New</button>
|
|
482
|
-
<button class="tb-btn" id="btn-open" title="Open saved playbook">📂 Open</button>
|
|
483
|
-
<button class="tb-btn" id="btn-save" title="Save playbook">💾 Save</button>
|
|
484
|
-
<div class="tb-sep"></div>
|
|
485
|
-
<button class="tb-btn run-btn" id="btn-run" title="Run playbook">▶ Run</button>
|
|
486
|
-
<div class="tb-sep"></div>
|
|
487
|
-
<button class="tb-btn" id="btn-zoom-in" title="Zoom in">+</button>
|
|
488
|
-
<button class="tb-btn" id="btn-zoom-out" title="Zoom out">-</button>
|
|
489
|
-
<button class="tb-btn" id="btn-fit" title="Fit canvas">⊡</button>
|
|
490
|
-
</div>
|
|
491
|
-
|
|
492
|
-
<!-- Builder body -->
|
|
493
|
-
<div id="builder-body">
|
|
494
|
-
<!-- Node palette -->
|
|
495
|
-
<div id="node-palette">
|
|
496
|
-
<input id="palette-search" type="text" placeholder="Search nodes…" />
|
|
497
|
-
<div id="palette-list"></div>
|
|
498
|
-
</div>
|
|
499
|
-
|
|
500
|
-
<!-- Canvas -->
|
|
501
|
-
<div id="canvas-wrap">
|
|
502
|
-
<svg id="canvas-svg" xmlns="http://www.w3.org/2000/svg">
|
|
503
|
-
<defs>
|
|
504
|
-
<marker id="arrowhead" markerWidth="7" markerHeight="7" refX="6" refY="3.5" orient="auto">
|
|
505
|
-
<polygon points="0 0, 7 3.5, 0 7" fill="#7c3aed88" />
|
|
506
|
-
</marker>
|
|
507
|
-
</defs>
|
|
508
|
-
<g id="edge-layer"></g>
|
|
509
|
-
<path id="drag-edge" d="" stroke="#a78bfa" stroke-width="1.5" fill="none" stroke-dasharray="6,3" style="display:none"/>
|
|
510
|
-
</svg>
|
|
511
|
-
<div id="canvas-nodes"></div>
|
|
512
|
-
|
|
513
|
-
<!-- Playbook list overlay -->
|
|
514
|
-
<div id="pb-list-overlay">
|
|
515
|
-
<div id="pb-list-box">
|
|
516
|
-
<div class="pblo-header">
|
|
517
|
-
<span class="pblo-title">Saved Playbooks</span>
|
|
518
|
-
<button class="pblo-close" id="pblo-close-btn">✕</button>
|
|
519
|
-
</div>
|
|
520
|
-
<div class="pblo-body" id="pblo-body"></div>
|
|
521
|
-
</div>
|
|
522
|
-
</div>
|
|
523
|
-
</div>
|
|
524
|
-
|
|
525
|
-
<!-- Properties panel -->
|
|
526
|
-
<div id="props-panel">
|
|
527
|
-
<div id="props-header">Properties</div>
|
|
528
|
-
<div id="props-body">
|
|
529
|
-
<div class="empty" style="padding:20px;color:#333;font-size:11px;text-align:center">
|
|
530
|
-
Select a node to edit its properties
|
|
531
|
-
</div>
|
|
532
|
-
</div>
|
|
533
|
-
</div>
|
|
534
|
-
</div>
|
|
535
|
-
</div>
|
|
536
|
-
|
|
537
|
-
<!-- Agents panel -->
|
|
538
|
-
<div class="panel" id="agents-panel">
|
|
539
|
-
<div class="panel-header"><span class="panel-title">Agents</span></div>
|
|
540
|
-
<div class="placeholder">
|
|
541
|
-
<span class="big">🤖</span>
|
|
542
|
-
<span>Agent monitoring coming soon</span>
|
|
543
|
-
</div>
|
|
544
|
-
</div>
|
|
545
|
-
|
|
546
|
-
<!-- Memory panel -->
|
|
547
|
-
<div class="panel" id="memory-panel">
|
|
548
|
-
<div class="panel-header"><span class="panel-title">Memory</span></div>
|
|
549
|
-
<div class="placeholder">
|
|
550
|
-
<span class="big">🧠</span>
|
|
551
|
-
<span>Memory browser coming soon</span>
|
|
552
|
-
</div>
|
|
553
|
-
</div>
|
|
554
|
-
|
|
555
|
-
<!-- Sessions panel -->
|
|
556
|
-
<div class="panel" id="sessions-panel">
|
|
557
|
-
<div class="panel-header"><span class="panel-title">Sessions</span></div>
|
|
558
|
-
<div class="placeholder">
|
|
559
|
-
<span class="big">🔗</span>
|
|
560
|
-
<span>Session viewer coming soon</span>
|
|
561
|
-
</div>
|
|
562
|
-
</div>
|
|
563
|
-
|
|
73
|
+
<div class="panels">
|
|
74
|
+
<div class="panel">
|
|
75
|
+
<h2>Worker Metrics</h2>
|
|
76
|
+
<div id="panel-daemon" class="empty">loading...</div>
|
|
77
|
+
</div>
|
|
78
|
+
<div class="panel">
|
|
79
|
+
<h2>Swarm Status</h2>
|
|
80
|
+
<div id="panel-swarm" class="empty">loading...</div>
|
|
81
|
+
</div>
|
|
82
|
+
<div class="panel">
|
|
83
|
+
<h2>Routing Info</h2>
|
|
84
|
+
<div id="panel-route" class="empty">loading...</div>
|
|
564
85
|
</div>
|
|
565
86
|
</div>
|
|
566
87
|
|
|
567
88
|
<script>
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
571
|
-
function navigateToPanel(target) {
|
|
572
|
-
document.querySelectorAll('.nav-item').forEach(function(n) { n.classList.remove('active'); });
|
|
573
|
-
var navItem = document.querySelector('[data-panel="' + target + '"]');
|
|
574
|
-
if (navItem) navItem.classList.add('active');
|
|
575
|
-
document.querySelectorAll('.panel').forEach(function(p) { p.classList.remove('active'); });
|
|
576
|
-
var panelId = target === 'playbooks' ? 'pb-panel'
|
|
577
|
-
: target === 'builder' ? 'builder-panel'
|
|
578
|
-
: target + '-panel';
|
|
579
|
-
var panel = document.getElementById(panelId);
|
|
580
|
-
if (panel) panel.classList.add('active');
|
|
581
|
-
if (target === 'builder') renderEdges();
|
|
582
|
-
location.hash = target;
|
|
583
|
-
}
|
|
584
|
-
|
|
585
|
-
document.querySelectorAll('.nav-item').forEach(function(item) {
|
|
586
|
-
item.addEventListener('click', function() {
|
|
587
|
-
var target = item.getAttribute('data-panel');
|
|
588
|
-
navigateToPanel(target);
|
|
589
|
-
});
|
|
590
|
-
});
|
|
591
|
-
|
|
592
|
-
// Hash-based routing on load
|
|
593
|
-
(function() {
|
|
594
|
-
var hash = location.hash.replace('#', '');
|
|
595
|
-
var validPanels = ['playbooks', 'builder', 'agents', 'memory', 'sessions'];
|
|
596
|
-
if (hash && validPanels.indexOf(hash) !== -1) {
|
|
597
|
-
// defer until after renderEdges is defined
|
|
598
|
-
window.addEventListener('load', function() { navigateToPanel(hash); });
|
|
599
|
-
}
|
|
600
|
-
})();
|
|
601
|
-
|
|
602
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
603
|
-
// PLAYBOOK RUN STATE (existing panel)
|
|
604
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
605
|
-
var runs = {};
|
|
606
|
-
var runLogs = {};
|
|
607
|
-
|
|
608
|
-
function ts(ms) {
|
|
609
|
-
return new Date(ms).toLocaleTimeString([], { hour: '2-digit', minute: '2-digit', second: '2-digit' });
|
|
610
|
-
}
|
|
611
|
-
function esc(s) {
|
|
612
|
-
return String(s).replace(/&/g,'&').replace(/</g,'<').replace(/>/g,'>').replace(/"/g,'"');
|
|
613
|
-
}
|
|
614
|
-
|
|
615
|
-
function updateHeader() {
|
|
616
|
-
var running = 0, done = 0, fail = 0;
|
|
617
|
-
for (var id in runs) {
|
|
618
|
-
var s = runs[id].status;
|
|
619
|
-
if (s === 'running') running++;
|
|
620
|
-
else if (s === 'completed') done++;
|
|
621
|
-
else if (s === 'failed') fail++;
|
|
622
|
-
}
|
|
623
|
-
document.getElementById('p-run').textContent = '● ' + running;
|
|
624
|
-
document.getElementById('p-done').textContent = '✓ ' + done;
|
|
625
|
-
document.getElementById('p-fail').textContent = '✗ ' + fail;
|
|
626
|
-
document.getElementById('nb-run').textContent = String(running || Object.keys(runs).length);
|
|
627
|
-
document.getElementById('nb-run').className = 'nav-badge' + (running ? '' : ' green');
|
|
628
|
-
var total = Object.keys(runs).length;
|
|
629
|
-
document.getElementById('pb-subtitle').textContent = total + (total === 1 ? ' run' : ' runs');
|
|
630
|
-
}
|
|
631
|
-
|
|
632
|
-
function progressPct(r) {
|
|
633
|
-
if (!r.itemsTotal || r.itemsTotal <= 0) return r.status === 'completed' ? 100 : 0;
|
|
634
|
-
return Math.min(100, Math.round((r.itemsProcessed / r.itemsTotal) * 100));
|
|
635
|
-
}
|
|
636
|
-
function statusLabel(r) {
|
|
637
|
-
if (r.status === 'running') return ['s-running', '● running'];
|
|
638
|
-
if (r.status === 'completed') return ['s-completed', '✓ done'];
|
|
639
|
-
if (r.status === 'failed') return ['s-failed', '✗ failed'];
|
|
640
|
-
return ['s-stopped', '⏹ stopped'];
|
|
641
|
-
}
|
|
642
|
-
function elapsed(r) {
|
|
643
|
-
var ms = (r.endedAt || r.completedAt || Date.now()) - r.startedAt;
|
|
644
|
-
if (ms < 1000) return ms + 'ms';
|
|
645
|
-
if (ms < 60000) return (ms / 1000).toFixed(1) + 's';
|
|
646
|
-
return Math.floor(ms / 60000) + 'm ' + Math.floor((ms % 60000) / 1000) + 's';
|
|
647
|
-
}
|
|
648
|
-
function renderCards() {
|
|
649
|
-
var cards = document.getElementById('pb-cards');
|
|
650
|
-
var empty = document.getElementById('pb-empty');
|
|
651
|
-
var sorted = Object.values(runs).sort(function(a, b) { return b.startedAt - a.startedAt; });
|
|
652
|
-
if (!sorted.length) { cards.innerHTML = ''; empty.style.display = 'flex'; return; }
|
|
653
|
-
empty.style.display = 'none';
|
|
654
|
-
cards.innerHTML = sorted.map(function(r) {
|
|
655
|
-
var sl = statusLabel(r);
|
|
656
|
-
var isRunning = r.status === 'running';
|
|
657
|
-
var pct = progressPct(r);
|
|
658
|
-
var logLines = (runLogs[r.id] || []).slice(-4);
|
|
659
|
-
var logHtml = logLines.length
|
|
660
|
-
? logLines.map(function(l) {
|
|
661
|
-
var cls = l.type === 'ok' ? 'log-ok' : l.type === 'err' ? 'log-err' : 'log-info';
|
|
662
|
-
return '<div><span class="log-ts">' + esc(l.ts) + '</span> <span class="' + cls + '">' + esc(l.text) + '</span></div>';
|
|
663
|
-
}).join('')
|
|
664
|
-
: '<div style="color:#2a2a3a">no events yet</div>';
|
|
665
|
-
return '<div class="card' + (!isRunning ? ' done' : '') + '">' +
|
|
666
|
-
'<div class="card-header">' +
|
|
667
|
-
'<span class="card-title">' + esc(r.playbookName) + '</span>' +
|
|
668
|
-
'<span class="status-badge ' + sl[0] + '">' + sl[1] + '</span>' +
|
|
669
|
-
'</div>' +
|
|
670
|
-
'<div class="card-meta">' +
|
|
671
|
-
'<span class="mitem">⏱ ' + esc(elapsed(r)) + '</span>' +
|
|
672
|
-
'<span class="mitem">📦 ' + esc(r.itemsProcessed) + '/' + esc(r.itemsTotal || '?') + '</span>' +
|
|
673
|
-
'<span class="mitem" style="color:#3a3a5a">id: ' + esc(r.id.slice(0,8)) + '</span>' +
|
|
674
|
-
(isRunning ? '<button class="stop-btn" onclick="stopRun(\'' + esc(r.id) + '\')">■ stop</button>' : '') +
|
|
675
|
-
'</div>' +
|
|
676
|
-
'<div class="progress-track"><div class="progress-fill" style="width:' + pct + '%"></div></div>' +
|
|
677
|
-
'<div class="log-area">' + logHtml + '</div>' +
|
|
678
|
-
'</div>';
|
|
679
|
-
}).join('');
|
|
680
|
-
}
|
|
681
|
-
function stopRun(id) { fetch('/stop/' + id, { method: 'POST' }).catch(function() {}); }
|
|
682
|
-
|
|
683
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
684
|
-
// NODE PALETTE DEFINITIONS
|
|
685
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
686
|
-
var NODE_TYPES = [
|
|
687
|
-
{ cat: 'Triggers', type: 'trigger.manual', label: 'Manual Trigger', color: '#7c3aed',
|
|
688
|
-
inputs: [], outputs: [{ label: 'items' }],
|
|
689
|
-
defaults: { items: [] } },
|
|
690
|
-
{ cat: 'Triggers', type: 'trigger.schedule', label: 'Schedule', color: '#7c3aed',
|
|
691
|
-
inputs: [], outputs: [{ label: 'items' }],
|
|
692
|
-
defaults: { cron: '0 * * * *' } },
|
|
693
|
-
|
|
694
|
-
{ cat: 'Control', type: 'core.if', label: 'If / Branch', color: '#0891b2',
|
|
695
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'true' }, { label: 'false' }],
|
|
696
|
-
defaults: { expression: '$item.data.value > 0' } },
|
|
697
|
-
{ cat: 'Control', type: 'core.filter', label: 'Filter', color: '#0891b2',
|
|
698
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'out' }],
|
|
699
|
-
defaults: { expression: '$item.data.value > 0' } },
|
|
700
|
-
|
|
701
|
-
{ cat: 'Data', type: 'core.set', label: 'Set Fields', color: '#d97706',
|
|
702
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'out' }],
|
|
703
|
-
defaults: {} },
|
|
704
|
-
{ cat: 'Data', type: 'action.log', label: 'Log', color: '#d97706',
|
|
705
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'out' }],
|
|
706
|
-
defaults: { label: 'debug' } },
|
|
707
|
-
|
|
708
|
-
{ cat: 'HTTP', type: 'action.http', label: 'HTTP Request', color: '#d97706',
|
|
709
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'out' }],
|
|
710
|
-
defaults: { url: 'https://example.com/api', method: 'GET' } },
|
|
711
|
-
{ cat: 'HTTP', type: 'http.request', label: 'HTTP Advanced', color: '#d97706',
|
|
712
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'main' }, { label: 'error' }],
|
|
713
|
-
defaults: { url: 'https://example.com/api', method: 'GET', response_format: 'json' } },
|
|
714
|
-
|
|
715
|
-
{ cat: 'Services', type: 'service.google_drive', label: 'Google Drive', color: '#0f766e',
|
|
716
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'out' }],
|
|
717
|
-
defaults: { operation: 'list_files', access_token: '' } },
|
|
718
|
-
{ cat: 'Services', type: 'service.gmail', label: 'Gmail', color: '#0f766e',
|
|
719
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'out' }],
|
|
720
|
-
defaults: { operation: 'list_messages', access_token: '' } },
|
|
721
|
-
{ cat: 'Services', type: 'service.github', label: 'GitHub', color: '#0f766e',
|
|
722
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'out' }],
|
|
723
|
-
defaults: { operation: 'list_repos', token: '' } },
|
|
724
|
-
{ cat: 'Services', type: 'service.google_sheets', label: 'Google Sheets', color: '#0f766e',
|
|
725
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'out' }],
|
|
726
|
-
defaults: { operation: 'read_rows', access_token: '', spreadsheet_id: '' } },
|
|
727
|
-
|
|
728
|
-
{ cat: 'Browser', type: 'action.gemini_image', label: 'Gemini Image', color: '#9333ea',
|
|
729
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'out' }],
|
|
730
|
-
defaults: { prompt: 'A beautiful landscape' } },
|
|
731
|
-
{ cat: 'Browser', type: 'action.save_file', label: 'Save File', color: '#9333ea',
|
|
732
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'out' }],
|
|
733
|
-
defaults: { path: './output.txt' } },
|
|
734
|
-
|
|
735
|
-
{ cat: 'Services', type: 'service.notion', label: 'Notion', color: '#0f766e',
|
|
736
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'out' }],
|
|
737
|
-
defaults: { operation: 'query_database', token: '' } },
|
|
738
|
-
{ cat: 'Services', type: 'service.linear', label: 'Linear', color: '#0f766e',
|
|
739
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'out' }],
|
|
740
|
-
defaults: { operation: 'list_issues', token: '' } },
|
|
741
|
-
{ cat: 'Services', type: 'service.airtable', label: 'Airtable', color: '#0f766e',
|
|
742
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'out' }],
|
|
743
|
-
defaults: { operation: 'list_records', token: '', base_id: '', table: '' } },
|
|
744
|
-
{ cat: 'Services', type: 'service.stripe', label: 'Stripe', color: '#0f766e',
|
|
745
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'out' }],
|
|
746
|
-
defaults: { operation: 'list_customers', api_key: '' } },
|
|
747
|
-
|
|
748
|
-
{ cat: 'Data', type: 'core.aggregate', label: 'Aggregate', color: '#d97706',
|
|
749
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'out' }],
|
|
750
|
-
defaults: { group_by: '', operations: [] } },
|
|
751
|
-
{ cat: 'Data', type: 'core.sort', label: 'Sort', color: '#d97706',
|
|
752
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'out' }],
|
|
753
|
-
defaults: { field: '', order: 'asc' } },
|
|
754
|
-
{ cat: 'Data', type: 'core.limit', label: 'Limit', color: '#d97706',
|
|
755
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'out' }],
|
|
756
|
-
defaults: { count: 10 } },
|
|
757
|
-
{ cat: 'Data', type: 'core.merge', label: 'Merge', color: '#d97706',
|
|
758
|
-
inputs: [{ label: 'in1' }, { label: 'in2' }], outputs: [{ label: 'out' }],
|
|
759
|
-
defaults: { mode: 'append' } },
|
|
760
|
-
{ cat: 'Data', type: 'core.remove_duplicates', label: 'Remove Duplicates', color: '#d97706',
|
|
761
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'out' }],
|
|
762
|
-
defaults: { field: '' } },
|
|
763
|
-
{ cat: 'Data', type: 'core.switch', label: 'Switch', color: '#0891b2',
|
|
764
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'case0' }, { label: 'default' }],
|
|
765
|
-
defaults: { field: '', cases: [] } },
|
|
766
|
-
{ cat: 'Data', type: 'core.wait', label: 'Wait', color: '#d97706',
|
|
767
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'out' }],
|
|
768
|
-
defaults: { seconds: 5 } },
|
|
769
|
-
{ cat: 'Data', type: 'core.split_in_batches', label: 'Split in Batches', color: '#d97706',
|
|
770
|
-
inputs: [{ label: 'in' }], outputs: [{ label: 'batch' }],
|
|
771
|
-
defaults: { batch_size: 10 } },
|
|
772
|
-
];
|
|
89
|
+
const runs = new Map();
|
|
90
|
+
const logs = new Map();
|
|
773
91
|
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
'action.http': [
|
|
785
|
-
{ key:'url', label:'URL', type:'text' },
|
|
786
|
-
{ key:'method', label:'Method', type:'select', options:['GET','POST','PUT','PATCH','DELETE'] },
|
|
787
|
-
{ key:'responseField', label:'Response field', type:'text' },
|
|
788
|
-
],
|
|
789
|
-
'http.request': [
|
|
790
|
-
{ key:'url', label:'URL', type:'text' },
|
|
791
|
-
{ key:'method', label:'Method', type:'select', options:['GET','POST','PUT','PATCH','DELETE'] },
|
|
792
|
-
{ key:'auth_type', label:'Auth type', type:'select', options:['none','bearer','basic','api_key'] },
|
|
793
|
-
{ key:'auth_token', label:'Bearer token', type:'text' },
|
|
794
|
-
{ key:'response_format', label:'Response format', type:'select', options:['json','text','binary'] },
|
|
795
|
-
{ key:'timeout_seconds', label:'Timeout (s)', type:'text' },
|
|
796
|
-
],
|
|
797
|
-
'service.google_drive': [
|
|
798
|
-
{ key:'access_token', label:'Access token', type:'text' },
|
|
799
|
-
{ key:'operation', label:'Operation', type:'select', options:['list_files','get_file','upload_file','download_file','create_folder','delete_file','share_file'] },
|
|
800
|
-
{ key:'file_id', label:'File ID', type:'text' },
|
|
801
|
-
{ key:'file_name', label:'File name', type:'text' },
|
|
802
|
-
{ key:'query', label:'Search query', type:'text' },
|
|
803
|
-
{ key:'page_size', label:'Page size', type:'text' },
|
|
804
|
-
],
|
|
805
|
-
'service.gmail': [
|
|
806
|
-
{ key:'access_token', label:'Access token', type:'text' },
|
|
807
|
-
{ key:'operation', label:'Operation', type:'select', options:['list_messages','get_message','send_message','list_labels','trash_message'] },
|
|
808
|
-
{ key:'message_id', label:'Message ID', type:'text' },
|
|
809
|
-
{ key:'to', label:'To', type:'text' },
|
|
810
|
-
{ key:'subject', label:'Subject', type:'text' },
|
|
811
|
-
{ key:'body', label:'Body', type:'textarea' },
|
|
812
|
-
{ key:'query', label:'Search query', type:'text' },
|
|
813
|
-
],
|
|
814
|
-
'service.github': [
|
|
815
|
-
{ key:'token', label:'GitHub token', type:'text' },
|
|
816
|
-
{ key:'operation', label:'Operation', type:'select', options:['list_repos','list_issues','get_issue','create_issue','update_issue','list_prs','create_pr','list_releases','create_release'] },
|
|
817
|
-
{ key:'owner', label:'Owner', type:'text' },
|
|
818
|
-
{ key:'repo', label:'Repo', type:'text' },
|
|
819
|
-
{ key:'number', label:'Issue/PR number', type:'text' },
|
|
820
|
-
{ key:'title', label:'Title', type:'text' },
|
|
821
|
-
{ key:'state', label:'State', type:'select', options:['','open','closed','all'] },
|
|
822
|
-
],
|
|
823
|
-
'service.google_sheets': [
|
|
824
|
-
{ key:'access_token', label:'Access token', type:'text' },
|
|
825
|
-
{ key:'spreadsheet_id', label:'Spreadsheet ID', type:'text' },
|
|
826
|
-
{ key:'operation', label:'Operation', type:'select', options:['read_rows','append_rows','update_rows','clear_range','create_spreadsheet'] },
|
|
827
|
-
{ key:'sheet_name', label:'Sheet name', type:'text' },
|
|
828
|
-
{ key:'range', label:'Range (e.g. A1:Z100)', type:'text' },
|
|
829
|
-
{ key:'title', label:'Title (new sheet)', type:'text' },
|
|
830
|
-
],
|
|
831
|
-
'action.gemini_image': [
|
|
832
|
-
{ key:'prompt', label:'Prompt', type:'textarea' },
|
|
833
|
-
{ key:'outputPath', label:'Output path', type:'text' },
|
|
834
|
-
{ key:'cdpPort', label:'CDP port', type:'text' },
|
|
835
|
-
],
|
|
836
|
-
'action.save_file': [
|
|
837
|
-
{ key:'path', label:'File path', type:'text' },
|
|
838
|
-
{ key:'field', label:'Data field', type:'text' },
|
|
839
|
-
{ key:'encoding', label:'Encoding', type:'text' },
|
|
840
|
-
],
|
|
841
|
-
'service.notion': [
|
|
842
|
-
{ key:'token', label:'Integration token', type:'text' },
|
|
843
|
-
{ key:'operation', label:'Operation', type:'select', options:['get_page','create_page','update_page','query_database','get_database','create_database','append_blocks'] },
|
|
844
|
-
{ key:'page_id', label:'Page ID', type:'text' },
|
|
845
|
-
{ key:'database_id', label:'Database ID', type:'text' },
|
|
846
|
-
{ key:'parent_id', label:'Parent ID', type:'text' },
|
|
847
|
-
{ key:'properties', label:'Properties (JSON)', type:'textarea' },
|
|
848
|
-
],
|
|
849
|
-
'service.linear': [
|
|
850
|
-
{ key:'token', label:'API token', type:'text' },
|
|
851
|
-
{ key:'operation', label:'Operation', type:'select', options:['list_issues','get_issue','create_issue','update_issue','list_teams','list_projects'] },
|
|
852
|
-
{ key:'team_id', label:'Team ID', type:'text' },
|
|
853
|
-
{ key:'issue_id', label:'Issue ID', type:'text' },
|
|
854
|
-
{ key:'title', label:'Title', type:'text' },
|
|
855
|
-
{ key:'description', label:'Description', type:'textarea' },
|
|
856
|
-
{ key:'priority', label:'Priority (0-4)', type:'text' },
|
|
857
|
-
{ key:'state_id', label:'State ID', type:'text' },
|
|
858
|
-
],
|
|
859
|
-
'service.airtable': [
|
|
860
|
-
{ key:'token', label:'Personal access token', type:'text' },
|
|
861
|
-
{ key:'base_id', label:'Base ID', type:'text' },
|
|
862
|
-
{ key:'table', label:'Table name', type:'text' },
|
|
863
|
-
{ key:'operation', label:'Operation', type:'select', options:['list_records','get_record','create_record','update_record','delete_record'] },
|
|
864
|
-
{ key:'record_id', label:'Record ID', type:'text' },
|
|
865
|
-
{ key:'fields', label:'Fields (JSON)', type:'textarea' },
|
|
866
|
-
{ key:'filter_formula', label:'Filter formula', type:'text' },
|
|
867
|
-
{ key:'view', label:'View name', type:'text' },
|
|
868
|
-
],
|
|
869
|
-
'service.stripe': [
|
|
870
|
-
{ key:'api_key', label:'Secret key', type:'text' },
|
|
871
|
-
{ key:'operation', label:'Operation', type:'select', options:['list_customers','create_customer','get_customer','list_charges','create_charge','list_subscriptions','create_subscription','cancel_subscription','list_products','create_payment_intent'] },
|
|
872
|
-
{ key:'customer_id', label:'Customer ID', type:'text' },
|
|
873
|
-
{ key:'email', label:'Email', type:'text' },
|
|
874
|
-
{ key:'name', label:'Name', type:'text' },
|
|
875
|
-
{ key:'amount', label:'Amount (cents)', type:'text' },
|
|
876
|
-
{ key:'currency', label:'Currency', type:'text' },
|
|
877
|
-
{ key:'price_id', label:'Price ID', type:'text' },
|
|
878
|
-
{ key:'subscription_id', label:'Subscription ID', type:'text' },
|
|
879
|
-
],
|
|
880
|
-
'core.aggregate': [
|
|
881
|
-
{ key:'group_by', label:'Group by field', type:'text' },
|
|
882
|
-
{ key:'operations', label:'Operations (JSON array)', type:'textarea' },
|
|
883
|
-
],
|
|
884
|
-
'core.sort': [
|
|
885
|
-
{ key:'field', label:'Field to sort by', type:'text' },
|
|
886
|
-
{ key:'order', label:'Order', type:'select', options:['asc','desc'] },
|
|
887
|
-
],
|
|
888
|
-
'core.limit': [
|
|
889
|
-
{ key:'count', label:'Max items', type:'text' },
|
|
890
|
-
],
|
|
891
|
-
'core.merge': [
|
|
892
|
-
{ key:'mode', label:'Mode', type:'select', options:['append','merge_by_field'] },
|
|
893
|
-
{ key:'field', label:'Merge key field (for merge_by_field)', type:'text' },
|
|
894
|
-
],
|
|
895
|
-
'core.remove_duplicates': [
|
|
896
|
-
{ key:'field', label:'Deduplicate by field (empty = all fields)', type:'text' },
|
|
897
|
-
],
|
|
898
|
-
'core.switch': [
|
|
899
|
-
{ key:'field', label:'Field to switch on', type:'text' },
|
|
900
|
-
{ key:'cases', label:'Case values (JSON array)', type:'textarea' },
|
|
901
|
-
],
|
|
902
|
-
'core.wait': [
|
|
903
|
-
{ key:'seconds', label:'Seconds to wait', type:'text' },
|
|
904
|
-
],
|
|
905
|
-
'core.split_in_batches': [
|
|
906
|
-
{ key:'batch_size', label:'Batch size', type:'text' },
|
|
907
|
-
],
|
|
908
|
-
};
|
|
909
|
-
|
|
910
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
911
|
-
// CANVAS STATE
|
|
912
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
913
|
-
var canvas = {
|
|
914
|
-
nodes: [], // { id, type, name, config, x, y, _def, runStatus, runItems, runDuration }
|
|
915
|
-
edges: [], // { id, from, to, handle, fromPort, toPort }
|
|
916
|
-
zoom: 1,
|
|
917
|
-
panX: 0,
|
|
918
|
-
panY: 0,
|
|
919
|
-
selectedId: null,
|
|
920
|
-
playbookId: null,
|
|
921
|
-
};
|
|
922
|
-
var _nodeSeq = 1;
|
|
923
|
-
|
|
924
|
-
function uid() { return 'n' + (_nodeSeq++) + '_' + Date.now().toString(36); }
|
|
925
|
-
|
|
926
|
-
// Find node type def
|
|
927
|
-
function getNodeDef(type) {
|
|
928
|
-
return NODE_TYPES.find(function(t) { return t.type === type; }) || null;
|
|
92
|
+
function connect() {
|
|
93
|
+
const ws = new WebSocket(`ws://${location.host}/ws`);
|
|
94
|
+
ws.onopen = () => { document.getElementById('meta').textContent = `localhost:${location.port} · connected`; };
|
|
95
|
+
ws.onclose = () => { document.getElementById('meta').textContent = 'disconnected · reconnecting...'; setTimeout(connect, 2000); };
|
|
96
|
+
ws.onmessage = (e) => {
|
|
97
|
+
const msg = JSON.parse(e.data);
|
|
98
|
+
if (msg.type === 'init') { msg.runs?.forEach(r => runs.set(r.id, r)); render(); return; }
|
|
99
|
+
if (msg.hookType === 'route-change' || msg.hookType === 'daemon-complete') { refreshDashboard(); return; }
|
|
100
|
+
handleEvent(msg);
|
|
101
|
+
};
|
|
929
102
|
}
|
|
930
103
|
|
|
931
|
-
|
|
932
|
-
|
|
933
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
934
|
-
function buildPalette(filter) {
|
|
935
|
-
filter = (filter || '').toLowerCase();
|
|
936
|
-
var list = document.getElementById('palette-list');
|
|
937
|
-
var html = '';
|
|
938
|
-
CAT_ORDER.forEach(function(cat) {
|
|
939
|
-
var nodes = NODE_TYPES.filter(function(n) {
|
|
940
|
-
return n.cat === cat && (!filter || n.label.toLowerCase().includes(filter) || n.type.toLowerCase().includes(filter));
|
|
941
|
-
});
|
|
942
|
-
if (!nodes.length) return;
|
|
943
|
-
html += '<div class="palette-cat-label">' + cat + '</div>';
|
|
944
|
-
nodes.forEach(function(n) {
|
|
945
|
-
html += '<div class="palette-node" draggable="true" data-type="' + n.type + '" data-label="' + esc(n.label) + '">' +
|
|
946
|
-
'<div class="palette-dot" style="background:' + n.color + '"></div>' +
|
|
947
|
-
'<span>' + esc(n.label) + '</span></div>';
|
|
948
|
-
});
|
|
949
|
-
});
|
|
950
|
-
list.innerHTML = html;
|
|
951
|
-
|
|
952
|
-
list.querySelectorAll('.palette-node').forEach(function(el) {
|
|
953
|
-
el.addEventListener('dragstart', function(e) {
|
|
954
|
-
e.dataTransfer.setData('text/plain', el.getAttribute('data-type'));
|
|
955
|
-
e.dataTransfer.effectAllowed = 'copy';
|
|
956
|
-
});
|
|
957
|
-
});
|
|
104
|
+
function escapeHtml(s) {
|
|
105
|
+
return String(s).replace(/[&<>"']/g, c => ({'&':'&','<':'<','>':'>','"':'"',"'":'''}[c]));
|
|
958
106
|
}
|
|
959
107
|
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
968
|
-
function applyTransform() {
|
|
969
|
-
document.getElementById('canvas-nodes').style.transform =
|
|
970
|
-
'translate(' + canvas.panX + 'px,' + canvas.panY + 'px) scale(' + canvas.zoom + ')';
|
|
971
|
-
renderEdges();
|
|
108
|
+
async function refreshDashboard() {
|
|
109
|
+
try {
|
|
110
|
+
const res = await fetch('/api/dashboard');
|
|
111
|
+
if (!res.ok) return;
|
|
112
|
+
const data = await res.json();
|
|
113
|
+
renderDashboard(data);
|
|
114
|
+
} catch {}
|
|
972
115
|
}
|
|
973
116
|
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
var delta = e.deltaY < 0 ? 1.1 : 0.9;
|
|
983
|
-
var newZoom = Math.max(0.2, Math.min(3, canvas.zoom * delta));
|
|
984
|
-
// Zoom toward mouse position
|
|
985
|
-
canvas.panX = mx - (mx - canvas.panX) * (newZoom / canvas.zoom);
|
|
986
|
-
canvas.panY = my - (my - canvas.panY) * (newZoom / canvas.zoom);
|
|
987
|
-
canvas.zoom = newZoom;
|
|
988
|
-
applyTransform();
|
|
989
|
-
}, { passive: false });
|
|
990
|
-
|
|
991
|
-
document.getElementById('canvas-wrap').addEventListener('mousedown', function(e) {
|
|
992
|
-
if (e.button === 1 || (e.button === 0 && e.target === this)) {
|
|
993
|
-
_panning = true;
|
|
994
|
-
_panStart = { x: e.clientX - canvas.panX, y: e.clientY - canvas.panY };
|
|
995
|
-
e.preventDefault();
|
|
996
|
-
}
|
|
997
|
-
});
|
|
998
|
-
document.addEventListener('mousemove', function(e) {
|
|
999
|
-
if (_panning) {
|
|
1000
|
-
canvas.panX = e.clientX - _panStart.x;
|
|
1001
|
-
canvas.panY = e.clientY - _panStart.y;
|
|
1002
|
-
applyTransform();
|
|
117
|
+
function renderDashboard(data) {
|
|
118
|
+
const daemonEl = document.getElementById('panel-daemon');
|
|
119
|
+
if (data.daemon_workers?.length) {
|
|
120
|
+
daemonEl.className = '';
|
|
121
|
+
daemonEl.innerHTML = data.daemon_workers.map(w => `<span class="worker-chip">${escapeHtml(w)}</span>`).join('');
|
|
122
|
+
} else {
|
|
123
|
+
daemonEl.className = 'empty';
|
|
124
|
+
daemonEl.textContent = 'No worker metrics yet. Workers run at session start (or: monomind hooks worker run map)';
|
|
1003
125
|
}
|
|
1004
|
-
if (_dragEdge.active) updateDragEdge(e);
|
|
1005
|
-
if (_draggingNode) updateNodeDrag(e);
|
|
1006
|
-
});
|
|
1007
|
-
document.addEventListener('mouseup', function(e) {
|
|
1008
|
-
_panning = false;
|
|
1009
|
-
if (_draggingNode) endNodeDrag(e);
|
|
1010
|
-
if (_dragEdge.active) endDragEdge(e);
|
|
1011
|
-
});
|
|
1012
126
|
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
127
|
+
const swarmEl = document.getElementById('panel-swarm');
|
|
128
|
+
if (data.swarm_status) {
|
|
129
|
+
swarmEl.className = '';
|
|
130
|
+
const s = data.swarm_status;
|
|
131
|
+
swarmEl.innerHTML = `<div class="kv-list">` + Object.entries(s).map(([k, v]) =>
|
|
132
|
+
`<div class="kv-row"><span>${escapeHtml(k)}</span><b>${escapeHtml(typeof v === 'object' ? JSON.stringify(v) : v)}</b></div>`
|
|
133
|
+
).join('') + `</div>`;
|
|
134
|
+
} else {
|
|
135
|
+
swarmEl.className = 'empty';
|
|
136
|
+
swarmEl.textContent = 'No active swarm. Run: monomind swarm init';
|
|
1019
137
|
}
|
|
1020
|
-
});
|
|
1021
|
-
|
|
1022
|
-
// Drop from palette
|
|
1023
|
-
document.getElementById('canvas-wrap').addEventListener('dragover', function(e) { e.preventDefault(); });
|
|
1024
|
-
document.getElementById('canvas-wrap').addEventListener('drop', function(e) {
|
|
1025
|
-
e.preventDefault();
|
|
1026
|
-
var type = e.dataTransfer.getData('text/plain');
|
|
1027
|
-
if (!type) return;
|
|
1028
|
-
var def = getNodeDef(type);
|
|
1029
|
-
if (!def) return;
|
|
1030
|
-
var rect = this.getBoundingClientRect();
|
|
1031
|
-
var wx = (e.clientX - rect.left - canvas.panX) / canvas.zoom;
|
|
1032
|
-
var wy = (e.clientY - rect.top - canvas.panY) / canvas.zoom;
|
|
1033
|
-
addNode(type, wx - 100, wy - 20);
|
|
1034
|
-
});
|
|
1035
|
-
|
|
1036
|
-
// Zoom buttons
|
|
1037
|
-
document.getElementById('btn-zoom-in').addEventListener('click', function() {
|
|
1038
|
-
canvas.zoom = Math.min(3, canvas.zoom * 1.2);
|
|
1039
|
-
applyTransform();
|
|
1040
|
-
});
|
|
1041
|
-
document.getElementById('btn-zoom-out').addEventListener('click', function() {
|
|
1042
|
-
canvas.zoom = Math.max(0.2, canvas.zoom / 1.2);
|
|
1043
|
-
applyTransform();
|
|
1044
|
-
});
|
|
1045
|
-
document.getElementById('btn-fit').addEventListener('click', function() {
|
|
1046
|
-
fitCanvas();
|
|
1047
|
-
});
|
|
1048
|
-
|
|
1049
|
-
function fitCanvas() {
|
|
1050
|
-
if (!canvas.nodes.length) { canvas.zoom = 1; canvas.panX = 40; canvas.panY = 40; applyTransform(); return; }
|
|
1051
|
-
var wrap = document.getElementById('canvas-wrap');
|
|
1052
|
-
var W = wrap.clientWidth, H = wrap.clientHeight;
|
|
1053
|
-
var minX = Infinity, minY = Infinity, maxX = -Infinity, maxY = -Infinity;
|
|
1054
|
-
canvas.nodes.forEach(function(n) {
|
|
1055
|
-
minX = Math.min(minX, n.x); minY = Math.min(minY, n.y);
|
|
1056
|
-
maxX = Math.max(maxX, n.x + 200); maxY = Math.max(maxY, n.y + nodeH(n));
|
|
1057
|
-
});
|
|
1058
|
-
var pw = maxX - minX + 80, ph = maxY - minY + 80;
|
|
1059
|
-
var zoom = Math.min(1, Math.min(W / pw, H / ph));
|
|
1060
|
-
canvas.zoom = zoom;
|
|
1061
|
-
canvas.panX = (W - pw * zoom) / 2 - minX * zoom + 40;
|
|
1062
|
-
canvas.panY = (H - ph * zoom) / 2 - minY * zoom + 40;
|
|
1063
|
-
applyTransform();
|
|
1064
|
-
}
|
|
1065
|
-
|
|
1066
|
-
function nodeH(n) {
|
|
1067
|
-
var def = n._def || getNodeDef(n.type) || { inputs: [{}], outputs: [{}] };
|
|
1068
|
-
var rows = Math.max(def.inputs.length, def.outputs.length, 1);
|
|
1069
|
-
return 40 + 6 + rows * 26 + 6;
|
|
1070
|
-
}
|
|
1071
|
-
|
|
1072
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
1073
|
-
// ADD / REMOVE NODE
|
|
1074
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
1075
|
-
function addNode(type, x, y) {
|
|
1076
|
-
var def = getNodeDef(type);
|
|
1077
|
-
if (!def) return;
|
|
1078
|
-
var node = {
|
|
1079
|
-
id: uid(),
|
|
1080
|
-
type: type,
|
|
1081
|
-
name: def.label,
|
|
1082
|
-
config: Object.assign({}, def.defaults),
|
|
1083
|
-
x: x || 100,
|
|
1084
|
-
y: y || 100,
|
|
1085
|
-
_def: def,
|
|
1086
|
-
runStatus: null,
|
|
1087
|
-
runItems: 0,
|
|
1088
|
-
runDuration: null,
|
|
1089
|
-
};
|
|
1090
|
-
canvas.nodes.push(node);
|
|
1091
|
-
canvas.selectedId = node.id;
|
|
1092
|
-
renderNodes();
|
|
1093
|
-
renderEdges();
|
|
1094
|
-
renderPropsPanel();
|
|
1095
|
-
return node;
|
|
1096
|
-
}
|
|
1097
|
-
|
|
1098
|
-
function removeNode(id) {
|
|
1099
|
-
canvas.nodes = canvas.nodes.filter(function(n) { return n.id !== id; });
|
|
1100
|
-
canvas.edges = canvas.edges.filter(function(e) { return e.from !== id && e.to !== id; });
|
|
1101
|
-
if (canvas.selectedId === id) { canvas.selectedId = null; renderPropsPanel(); }
|
|
1102
|
-
renderNodes();
|
|
1103
|
-
renderEdges();
|
|
1104
|
-
}
|
|
1105
|
-
|
|
1106
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
1107
|
-
// NODE DRAG
|
|
1108
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
1109
|
-
var _draggingNode = null;
|
|
1110
|
-
var _dragNodeStart = null;
|
|
1111
138
|
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
var dx = (e.clientX - _dragNodeStart.mx) / canvas.zoom;
|
|
1127
|
-
var dy = (e.clientY - _dragNodeStart.my) / canvas.zoom;
|
|
1128
|
-
var n = canvas.nodes.find(function(n) { return n.id === _draggingNode; });
|
|
1129
|
-
if (n) { n.x = _dragNodeStart.nx + dx; n.y = _dragNodeStart.ny + dy; }
|
|
1130
|
-
renderNodePosition(_draggingNode);
|
|
1131
|
-
renderEdges();
|
|
1132
|
-
}
|
|
1133
|
-
function endNodeDrag(e) {
|
|
1134
|
-
_draggingNode = null;
|
|
1135
|
-
_dragNodeStart = null;
|
|
1136
|
-
}
|
|
1137
|
-
function renderNodePosition(id) {
|
|
1138
|
-
var el = document.querySelector('[data-node-id="' + id + '"]');
|
|
1139
|
-
var n = canvas.nodes.find(function(n) { return n.id === id; });
|
|
1140
|
-
if (el && n) { el.style.left = n.x + 'px'; el.style.top = n.y + 'px'; }
|
|
1141
|
-
}
|
|
1142
|
-
|
|
1143
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
1144
|
-
// EDGE DRAG
|
|
1145
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
1146
|
-
var _dragEdge = { active: false, fromNodeId: null, fromPortIdx: null, x: 0, y: 0 };
|
|
1147
|
-
|
|
1148
|
-
function startDragEdge(e, nodeId, portIdx) {
|
|
1149
|
-
e.stopPropagation();
|
|
1150
|
-
e.preventDefault();
|
|
1151
|
-
_dragEdge.active = true;
|
|
1152
|
-
_dragEdge.fromNodeId = nodeId;
|
|
1153
|
-
_dragEdge.fromPortIdx = portIdx;
|
|
1154
|
-
var pos = getOutPortPos(nodeId, portIdx);
|
|
1155
|
-
_dragEdge.x = pos.x; _dragEdge.y = pos.y;
|
|
1156
|
-
var path = document.getElementById('drag-edge');
|
|
1157
|
-
path.style.display = '';
|
|
1158
|
-
}
|
|
1159
|
-
function updateDragEdge(e) {
|
|
1160
|
-
var wrap = document.getElementById('canvas-wrap');
|
|
1161
|
-
var rect = wrap.getBoundingClientRect();
|
|
1162
|
-
var tx = (e.clientX - rect.left - canvas.panX) / canvas.zoom;
|
|
1163
|
-
var ty = (e.clientY - rect.top - canvas.panY) / canvas.zoom;
|
|
1164
|
-
var sx = _dragEdge.x, sy = _dragEdge.y;
|
|
1165
|
-
var dx = Math.max(60, Math.abs(tx - sx) * 0.5);
|
|
1166
|
-
document.getElementById('drag-edge').setAttribute('d',
|
|
1167
|
-
'M' + sx + ',' + sy + ' C' + (sx+dx) + ',' + sy + ' ' + (tx-dx) + ',' + ty + ' ' + tx + ',' + ty);
|
|
1168
|
-
}
|
|
1169
|
-
function endDragEdge(e) {
|
|
1170
|
-
document.getElementById('drag-edge').style.display = 'none';
|
|
1171
|
-
_dragEdge.active = false;
|
|
1172
|
-
}
|
|
1173
|
-
function dropOnInputPort(e, toNodeId, toPortIdx) {
|
|
1174
|
-
if (!_dragEdge.active) return;
|
|
1175
|
-
e.stopPropagation();
|
|
1176
|
-
if (_dragEdge.fromNodeId === toNodeId) { endDragEdge(e); return; }
|
|
1177
|
-
var fromNode = canvas.nodes.find(function(n) { return n.id === _dragEdge.fromNodeId; });
|
|
1178
|
-
var def = fromNode && (fromNode._def || getNodeDef(fromNode.type));
|
|
1179
|
-
var handle = def && def.outputs[_dragEdge.fromPortIdx] ? def.outputs[_dragEdge.fromPortIdx].label : undefined;
|
|
1180
|
-
// Remove existing edge from same out port if any
|
|
1181
|
-
canvas.edges = canvas.edges.filter(function(ed) {
|
|
1182
|
-
return !(ed.from === _dragEdge.fromNodeId && ed.fromPort === _dragEdge.fromPortIdx && ed.to === toNodeId && ed.toPort === toPortIdx);
|
|
1183
|
-
});
|
|
1184
|
-
canvas.edges.push({
|
|
1185
|
-
id: uid(),
|
|
1186
|
-
from: _dragEdge.fromNodeId,
|
|
1187
|
-
to: toNodeId,
|
|
1188
|
-
handle: handle,
|
|
1189
|
-
fromPort: _dragEdge.fromPortIdx,
|
|
1190
|
-
toPort: toPortIdx,
|
|
1191
|
-
});
|
|
1192
|
-
endDragEdge(e);
|
|
1193
|
-
renderEdges();
|
|
1194
|
-
}
|
|
1195
|
-
|
|
1196
|
-
function getOutPortPos(nodeId, portIdx) {
|
|
1197
|
-
var n = canvas.nodes.find(function(n) { return n.id === nodeId; });
|
|
1198
|
-
if (!n) return {x:0,y:0};
|
|
1199
|
-
return { x: n.x + 200, y: n.y + 40 + 6 + portIdx * 26 + 13 };
|
|
1200
|
-
}
|
|
1201
|
-
function getInPortPos(nodeId, portIdx) {
|
|
1202
|
-
var n = canvas.nodes.find(function(n) { return n.id === nodeId; });
|
|
1203
|
-
if (!n) return {x:0,y:0};
|
|
1204
|
-
return { x: n.x, y: n.y + 40 + 6 + portIdx * 26 + 13 };
|
|
139
|
+
const routeEl = document.getElementById('panel-route');
|
|
140
|
+
if (data.last_route) {
|
|
141
|
+
routeEl.className = '';
|
|
142
|
+
const r = data.last_route;
|
|
143
|
+
routeEl.innerHTML = `<div class="kv-list">
|
|
144
|
+
<div class="kv-row"><span>agent</span><b>${escapeHtml(r.agent ?? '—')}</b></div>
|
|
145
|
+
<div class="kv-row"><span>confidence</span><b>${escapeHtml(r.confidence ?? '—')}</b></div>
|
|
146
|
+
<div class="kv-row"><span>reason</span><b>${escapeHtml(r.reason ?? '—')}</b></div>
|
|
147
|
+
<div class="kv-row"><span>updated</span><b>${escapeHtml(r.updatedAt ?? '—')}</b></div>
|
|
148
|
+
</div>`;
|
|
149
|
+
} else {
|
|
150
|
+
routeEl.className = 'empty';
|
|
151
|
+
routeEl.textContent = 'No routing decisions yet.';
|
|
152
|
+
}
|
|
1205
153
|
}
|
|
1206
154
|
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
function
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
if (!existing) {
|
|
1228
|
-
var el = document.createElement('div');
|
|
1229
|
-
el.className = 'cn' + (isSelected ? ' selected' : '') + (n.runStatus === 'running' ? ' running' : '');
|
|
1230
|
-
el.setAttribute('data-node-id', n.id);
|
|
1231
|
-
el.style.left = n.x + 'px';
|
|
1232
|
-
el.style.top = n.y + 'px';
|
|
1233
|
-
el.style.height = h + 'px';
|
|
1234
|
-
el.style.borderColor = isSelected ? color : (n.runStatus === 'error' ? '#ef444444' : n.runStatus === 'ok' ? '#10b98133' : 'rgba(124,58,237,0.15)');
|
|
1235
|
-
|
|
1236
|
-
// Status badge
|
|
1237
|
-
var statusHtml = '';
|
|
1238
|
-
if (n.runStatus) {
|
|
1239
|
-
var statusText = n.runStatus === 'ok' ? '✓ ' + n.runItems + ' item' + (n.runItems !== 1 ? 's' : '') + (n.runDuration ? ' · ' + n.runDuration + 'ms' : '')
|
|
1240
|
-
: n.runStatus === 'running' ? '⏳ running'
|
|
1241
|
-
: n.runStatus === 'error' ? '✕ error'
|
|
1242
|
-
: '— skipped';
|
|
1243
|
-
statusHtml = '<div class="cn-status ' + n.runStatus + '">' + esc(statusText) + '</div>';
|
|
1244
|
-
}
|
|
1245
|
-
|
|
1246
|
-
// Header
|
|
1247
|
-
var headerHtml = '<div class="cn-header" style="background:linear-gradient(110deg,' + color + '1a 0%,' + color + '0a 100%);border-bottom:1px solid ' + color + '22">' +
|
|
1248
|
-
'<div class="cn-dot" style="background:' + color + '"></div>' +
|
|
1249
|
-
'<span class="cn-label">' + esc(n.name || def.label) + '</span>' +
|
|
1250
|
-
'<button class="cn-del" data-del="' + n.id + '" title="Delete">✕</button>' +
|
|
1251
|
-
'</div>';
|
|
1252
|
-
|
|
1253
|
-
// Ports
|
|
1254
|
-
var portsHtml = '<div class="cn-ports">';
|
|
1255
|
-
for (var i = 0; i < rows; i++) {
|
|
1256
|
-
var inPort = def.inputs[i];
|
|
1257
|
-
var outPort = def.outputs[i];
|
|
1258
|
-
portsHtml += '<div class="cn-row">';
|
|
1259
|
-
if (inPort) {
|
|
1260
|
-
portsHtml += '<div class="cn-port-area">' +
|
|
1261
|
-
'<div class="cn-port in" data-in-port="' + i + '" data-node="' + n.id + '" title="Input: ' + esc(inPort.label) + '"></div>' +
|
|
1262
|
-
'<span class="cn-port-label">' + esc(inPort.label) + '</span>' +
|
|
1263
|
-
'</div>';
|
|
1264
|
-
} else {
|
|
1265
|
-
portsHtml += '<div></div>';
|
|
1266
|
-
}
|
|
1267
|
-
if (outPort) {
|
|
1268
|
-
portsHtml += '<div class="cn-port-area" style="justify-content:flex-end">' +
|
|
1269
|
-
'<span class="cn-port-label">' + esc(outPort.label) + '</span>' +
|
|
1270
|
-
'<div class="cn-port out" data-out-port="' + i + '" data-node="' + n.id + '" title="Output: ' + esc(outPort.label) + '"></div>' +
|
|
1271
|
-
'</div>';
|
|
1272
|
-
} else {
|
|
1273
|
-
portsHtml += '<div></div>';
|
|
1274
|
-
}
|
|
1275
|
-
portsHtml += '</div>';
|
|
1276
|
-
}
|
|
1277
|
-
portsHtml += '</div>';
|
|
1278
|
-
|
|
1279
|
-
el.innerHTML = statusHtml + headerHtml + portsHtml;
|
|
1280
|
-
|
|
1281
|
-
// Events
|
|
1282
|
-
el.querySelector('.cn-header').addEventListener('mousedown', function(e) {
|
|
1283
|
-
if (e.target.closest('.cn-del')) return;
|
|
1284
|
-
startNodeDrag(e, n.id);
|
|
1285
|
-
});
|
|
1286
|
-
el.addEventListener('mousedown', function(e) {
|
|
1287
|
-
if (e.target.closest('.cn-del') || e.target.closest('.cn-port')) return;
|
|
1288
|
-
e.stopPropagation();
|
|
1289
|
-
canvas.selectedId = n.id;
|
|
1290
|
-
renderPropsPanel();
|
|
1291
|
-
renderNodes();
|
|
1292
|
-
});
|
|
1293
|
-
var delBtn = el.querySelector('.cn-del');
|
|
1294
|
-
if (delBtn) delBtn.addEventListener('mousedown', function(e) {
|
|
1295
|
-
e.stopPropagation();
|
|
1296
|
-
removeNode(n.id);
|
|
1297
|
-
});
|
|
1298
|
-
el.querySelectorAll('.cn-port.out').forEach(function(port) {
|
|
1299
|
-
port.addEventListener('mousedown', function(e) {
|
|
1300
|
-
e.stopPropagation();
|
|
1301
|
-
var portIdx = parseInt(port.getAttribute('data-out-port'), 10);
|
|
1302
|
-
startDragEdge(e, n.id, portIdx);
|
|
1303
|
-
});
|
|
1304
|
-
});
|
|
1305
|
-
el.querySelectorAll('.cn-port.in').forEach(function(port) {
|
|
1306
|
-
port.addEventListener('mouseup', function(e) {
|
|
1307
|
-
var portIdx = parseInt(port.getAttribute('data-in-port'), 10);
|
|
1308
|
-
dropOnInputPort(e, n.id, portIdx);
|
|
1309
|
-
});
|
|
1310
|
-
port.addEventListener('mouseenter', function() { port.classList.add('highlight'); });
|
|
1311
|
-
port.addEventListener('mouseleave', function() { port.classList.remove('highlight'); });
|
|
1312
|
-
});
|
|
1313
|
-
|
|
1314
|
-
container.appendChild(el);
|
|
1315
|
-
} else {
|
|
1316
|
-
// Update position, selection, status
|
|
1317
|
-
existing.style.left = n.x + 'px';
|
|
1318
|
-
existing.style.top = n.y + 'px';
|
|
1319
|
-
existing.className = 'cn' + (isSelected ? ' selected' : '') + (n.runStatus === 'running' ? ' running' : '');
|
|
1320
|
-
existing.style.borderColor = isSelected ? color : (n.runStatus === 'error' ? '#ef444444' : n.runStatus === 'ok' ? '#10b98133' : 'rgba(124,58,237,0.15)');
|
|
1321
|
-
// Update status badge
|
|
1322
|
-
var badge = existing.querySelector('.cn-status');
|
|
1323
|
-
if (n.runStatus) {
|
|
1324
|
-
var statusText2 = n.runStatus === 'ok' ? '✓ ' + n.runItems + ' item' + (n.runItems !== 1 ? 's' : '') + (n.runDuration ? ' · ' + n.runDuration + 'ms' : '')
|
|
1325
|
-
: n.runStatus === 'running' ? '⏳ running'
|
|
1326
|
-
: n.runStatus === 'error' ? '✕ error'
|
|
1327
|
-
: '— skipped';
|
|
1328
|
-
if (!badge) {
|
|
1329
|
-
var newBadge = document.createElement('div');
|
|
1330
|
-
newBadge.className = 'cn-status ' + n.runStatus;
|
|
1331
|
-
newBadge.textContent = statusText2;
|
|
1332
|
-
existing.insertBefore(newBadge, existing.firstChild);
|
|
1333
|
-
} else {
|
|
1334
|
-
badge.className = 'cn-status ' + n.runStatus;
|
|
1335
|
-
badge.textContent = statusText2;
|
|
1336
|
-
}
|
|
1337
|
-
} else if (badge) {
|
|
1338
|
-
badge.remove();
|
|
1339
|
-
}
|
|
155
|
+
refreshDashboard();
|
|
156
|
+
setInterval(refreshDashboard, 5000);
|
|
157
|
+
|
|
158
|
+
function handleEvent(ev) {
|
|
159
|
+
if (ev.eventType === 'run_started') {
|
|
160
|
+
runs.set(ev.runId, { id: ev.runId, workflowId: ev.workflowId, workflowName: ev.workflowName,
|
|
161
|
+
status: 'running', startedAt: ev.timestamp, steps: [], currentStep: null,
|
|
162
|
+
itemsProcessed: 0, itemsTotal: ev.itemTotal ?? 0 });
|
|
163
|
+
logs.set(ev.runId, []);
|
|
164
|
+
} else if (ev.eventType === 'step_started') {
|
|
165
|
+
const run = runs.get(ev.runId);
|
|
166
|
+
if (run) { run.currentStep = ev.nodeName; addLog(ev.runId, `${ev.nodeName} → starting...`); }
|
|
167
|
+
} else if (ev.eventType === 'step_completed') {
|
|
168
|
+
const run = runs.get(ev.runId);
|
|
169
|
+
if (run) {
|
|
170
|
+
if (!run.steps) run.steps = [];
|
|
171
|
+
run.steps.push({ name: ev.nodeName, duration: ev.durationMs, status: 'done' });
|
|
172
|
+
run.currentStep = null;
|
|
173
|
+
run.itemsProcessed = ev.itemTotal ?? run.itemsProcessed;
|
|
174
|
+
addLog(ev.runId, `${ev.nodeName} ✓ (${ev.durationMs}ms)`);
|
|
1340
175
|
}
|
|
1341
|
-
})
|
|
1342
|
-
|
|
1343
|
-
|
|
1344
|
-
|
|
1345
|
-
|
|
1346
|
-
|
|
1347
|
-
|
|
1348
|
-
var layer = document.getElementById('edge-layer');
|
|
1349
|
-
layer.innerHTML = '';
|
|
1350
|
-
canvas.edges.forEach(function(edge) {
|
|
1351
|
-
var fromNode = canvas.nodes.find(function(n) { return n.id === edge.from; });
|
|
1352
|
-
var toNode = canvas.nodes.find(function(n) { return n.id === edge.to; });
|
|
1353
|
-
if (!fromNode || !toNode) return;
|
|
1354
|
-
var sx = (fromNode.x + 200) * canvas.zoom + canvas.panX;
|
|
1355
|
-
var sy = (fromNode.y + 40 + 6 + edge.fromPort * 26 + 13) * canvas.zoom + canvas.panY;
|
|
1356
|
-
var tx = toNode.x * canvas.zoom + canvas.panX;
|
|
1357
|
-
var ty = (toNode.y + 40 + 6 + edge.toPort * 26 + 13) * canvas.zoom + canvas.panY;
|
|
1358
|
-
var dx = Math.max(60, Math.abs(tx - sx) * 0.5) * canvas.zoom;
|
|
1359
|
-
var d = 'M' + sx + ',' + sy + ' C' + (sx+dx) + ',' + sy + ' ' + (tx-dx) + ',' + ty + ' ' + tx + ',' + ty;
|
|
1360
|
-
var path = document.createElementNS('http://www.w3.org/2000/svg', 'path');
|
|
1361
|
-
path.setAttribute('d', d);
|
|
1362
|
-
path.setAttribute('stroke', '#7c3aed88');
|
|
1363
|
-
path.setAttribute('stroke-width', '1.5');
|
|
1364
|
-
path.setAttribute('fill', 'none');
|
|
1365
|
-
path.setAttribute('marker-end', 'url(#arrowhead)');
|
|
1366
|
-
// Add label if handle differs from default
|
|
1367
|
-
layer.appendChild(path);
|
|
1368
|
-
|
|
1369
|
-
// Remove edge on click
|
|
1370
|
-
(function(edgeId, midX, midY) {
|
|
1371
|
-
path.style.cursor = 'pointer';
|
|
1372
|
-
path.style.strokeWidth = '4';
|
|
1373
|
-
path.style.stroke = 'transparent';
|
|
1374
|
-
var hit = document.createElementNS('http://www.w3.org/2000/svg', 'path');
|
|
1375
|
-
hit.setAttribute('d', d);
|
|
1376
|
-
hit.setAttribute('stroke', 'transparent');
|
|
1377
|
-
hit.setAttribute('stroke-width', '8');
|
|
1378
|
-
hit.setAttribute('fill', 'none');
|
|
1379
|
-
hit.style.cursor = 'pointer';
|
|
1380
|
-
hit.addEventListener('click', function() {
|
|
1381
|
-
canvas.edges = canvas.edges.filter(function(e) { return e.id !== edgeId; });
|
|
1382
|
-
renderEdges();
|
|
1383
|
-
});
|
|
1384
|
-
layer.appendChild(hit);
|
|
1385
|
-
})(edge.id, (sx + tx) / 2, (sy + ty) / 2);
|
|
1386
|
-
});
|
|
1387
|
-
}
|
|
1388
|
-
|
|
1389
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
1390
|
-
// PROPERTIES PANEL
|
|
1391
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
1392
|
-
function renderPropsPanel() {
|
|
1393
|
-
var body = document.getElementById('props-body');
|
|
1394
|
-
var node = canvas.nodes.find(function(n) { return n.id === canvas.selectedId; });
|
|
1395
|
-
if (!node) {
|
|
1396
|
-
body.innerHTML = '<div class="empty" style="padding:20px;color:#333;font-size:11px;text-align:center">Select a node to edit its properties</div>';
|
|
1397
|
-
return;
|
|
1398
|
-
}
|
|
1399
|
-
var fields = NODE_FIELDS[node.type] || [];
|
|
1400
|
-
var html = '<div class="prop-row"><div class="prop-label">Node name</div>' +
|
|
1401
|
-
'<input class="prop-input" id="prop-node-name" value="' + esc(node.name || '') + '" /></div>';
|
|
1402
|
-
html += '<div class="prop-row"><div class="prop-label">On error</div>' +
|
|
1403
|
-
'<select class="prop-select" id="prop-on-error">' +
|
|
1404
|
-
['stop','skip'].map(function(v) {
|
|
1405
|
-
return '<option value="' + v + '"' + (node.onError === v ? ' selected' : '') + '>' + v + '</option>';
|
|
1406
|
-
}).join('') + '</select></div>';
|
|
1407
|
-
|
|
1408
|
-
fields.forEach(function(f) {
|
|
1409
|
-
var val = node.config[f.key] !== undefined ? String(node.config[f.key]) : '';
|
|
1410
|
-
html += '<div class="prop-row"><div class="prop-label">' + esc(f.label) + '</div>';
|
|
1411
|
-
if (f.type === 'select') {
|
|
1412
|
-
html += '<select class="prop-select" data-key="' + f.key + '">' +
|
|
1413
|
-
(f.options || []).map(function(o) {
|
|
1414
|
-
return '<option value="' + esc(o) + '"' + (val === o ? ' selected' : '') + '>' + esc(o) + '</option>';
|
|
1415
|
-
}).join('') + '</select>';
|
|
1416
|
-
} else if (f.type === 'textarea') {
|
|
1417
|
-
html += '<textarea class="prop-textarea" data-key="' + f.key + '">' + esc(val) + '</textarea>';
|
|
1418
|
-
} else {
|
|
1419
|
-
html += '<input class="prop-input" data-key="' + f.key + '" value="' + esc(val) + '" />';
|
|
176
|
+
} else if (ev.eventType === 'step_failed') {
|
|
177
|
+
const run = runs.get(ev.runId);
|
|
178
|
+
if (run) {
|
|
179
|
+
if (!run.steps) run.steps = [];
|
|
180
|
+
run.steps.push({ name: ev.nodeName, status: 'error', error: ev.error });
|
|
181
|
+
run.currentStep = null;
|
|
182
|
+
addLog(ev.runId, `${ev.nodeName} ✗ ${ev.error}`);
|
|
1420
183
|
}
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
node.name = e.target.value;
|
|
1428
|
-
var el = document.querySelector('[data-node-id="' + node.id + '"] .cn-label');
|
|
1429
|
-
if (el) el.textContent = node.name;
|
|
1430
|
-
});
|
|
1431
|
-
body.querySelector('#prop-on-error').addEventListener('change', function(e) {
|
|
1432
|
-
node.onError = e.target.value;
|
|
1433
|
-
});
|
|
1434
|
-
body.querySelectorAll('[data-key]').forEach(function(el) {
|
|
1435
|
-
el.addEventListener('input', function() {
|
|
1436
|
-
node.config[el.getAttribute('data-key')] = el.value;
|
|
1437
|
-
});
|
|
1438
|
-
el.addEventListener('change', function() {
|
|
1439
|
-
node.config[el.getAttribute('data-key')] = el.value;
|
|
1440
|
-
});
|
|
1441
|
-
});
|
|
1442
|
-
}
|
|
1443
|
-
|
|
1444
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
1445
|
-
// PLAYBOOK SERIALIZATION
|
|
1446
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
1447
|
-
function toPlaybookDef() {
|
|
1448
|
-
var id = canvas.playbookId || ('pb_' + Date.now().toString(36));
|
|
1449
|
-
canvas.playbookId = id;
|
|
1450
|
-
var name = document.getElementById('pb-name-input').value.trim() || 'Untitled Playbook';
|
|
1451
|
-
return {
|
|
1452
|
-
id: id,
|
|
1453
|
-
name: name,
|
|
1454
|
-
nodes: canvas.nodes.map(function(n) {
|
|
1455
|
-
return { id: n.id, type: n.type, name: n.name, config: n.config, onError: n.onError || 'stop' };
|
|
1456
|
-
}),
|
|
1457
|
-
connections: canvas.edges.map(function(e) {
|
|
1458
|
-
var res = { from: e.from, to: e.to };
|
|
1459
|
-
if (e.handle && e.handle !== 'main' && e.handle !== 'out' && e.handle !== 'items') res.handle = e.handle;
|
|
1460
|
-
return res;
|
|
1461
|
-
}),
|
|
1462
|
-
};
|
|
1463
|
-
}
|
|
1464
|
-
|
|
1465
|
-
function loadPlaybookDef(pb) {
|
|
1466
|
-
canvas.nodes = [];
|
|
1467
|
-
canvas.edges = [];
|
|
1468
|
-
canvas.playbookId = pb.id;
|
|
1469
|
-
canvas.selectedId = null;
|
|
1470
|
-
document.getElementById('pb-name-input').value = pb.name || 'Untitled';
|
|
1471
|
-
// Clear existing nodes from DOM
|
|
1472
|
-
document.getElementById('canvas-nodes').innerHTML = '';
|
|
1473
|
-
|
|
1474
|
-
// Lay out nodes in a simple column if no positions stored
|
|
1475
|
-
var x = 100, y = 60;
|
|
1476
|
-
(pb.nodes || []).forEach(function(n, i) {
|
|
1477
|
-
var def = getNodeDef(n.type) || { inputs:[{label:'in'}], outputs:[{label:'out'}], color:'#7c3aed', label: n.type };
|
|
1478
|
-
var node = {
|
|
1479
|
-
id: n.id,
|
|
1480
|
-
type: n.type,
|
|
1481
|
-
name: n.name || def.label,
|
|
1482
|
-
config: n.config || {},
|
|
1483
|
-
onError: n.onError,
|
|
1484
|
-
x: n._x || (x + (i % 3) * 260),
|
|
1485
|
-
y: n._y || (y + Math.floor(i / 3) * 140),
|
|
1486
|
-
_def: def,
|
|
1487
|
-
runStatus: null,
|
|
1488
|
-
runItems: 0,
|
|
1489
|
-
runDuration: null,
|
|
1490
|
-
};
|
|
1491
|
-
canvas.nodes.push(node);
|
|
1492
|
-
});
|
|
1493
|
-
|
|
1494
|
-
// Build edges from connections
|
|
1495
|
-
(pb.connections || []).forEach(function(c) {
|
|
1496
|
-
var fromNode = canvas.nodes.find(function(n) { return n.id === c.from; });
|
|
1497
|
-
var toNode = canvas.nodes.find(function(n) { return n.id === c.to; });
|
|
1498
|
-
if (!fromNode || !toNode) return;
|
|
1499
|
-
var fromDef = fromNode._def || { outputs: [{label:'main'}] };
|
|
1500
|
-
var handle = c.handle || (fromDef.outputs[0] ? fromDef.outputs[0].label : 'main');
|
|
1501
|
-
var fromPortIdx = fromDef.outputs.findIndex(function(o) { return o.label === handle; });
|
|
1502
|
-
if (fromPortIdx < 0) fromPortIdx = 0;
|
|
1503
|
-
canvas.edges.push({
|
|
1504
|
-
id: uid(),
|
|
1505
|
-
from: c.from,
|
|
1506
|
-
to: c.to,
|
|
1507
|
-
handle: c.handle,
|
|
1508
|
-
fromPort: fromPortIdx,
|
|
1509
|
-
toPort: 0,
|
|
1510
|
-
});
|
|
1511
|
-
});
|
|
1512
|
-
|
|
1513
|
-
renderNodes();
|
|
1514
|
-
renderEdges();
|
|
1515
|
-
renderPropsPanel();
|
|
1516
|
-
setTimeout(fitCanvas, 50);
|
|
1517
|
-
}
|
|
1518
|
-
|
|
1519
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
1520
|
-
// TOOLBAR ACTIONS
|
|
1521
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
1522
|
-
document.getElementById('btn-new').addEventListener('click', function() {
|
|
1523
|
-
canvas.nodes = [];
|
|
1524
|
-
canvas.edges = [];
|
|
1525
|
-
canvas.playbookId = null;
|
|
1526
|
-
canvas.selectedId = null;
|
|
1527
|
-
document.getElementById('canvas-nodes').innerHTML = '';
|
|
1528
|
-
document.getElementById('pb-name-input').value = 'Untitled Playbook';
|
|
1529
|
-
renderNodes();
|
|
1530
|
-
renderEdges();
|
|
1531
|
-
renderPropsPanel();
|
|
1532
|
-
});
|
|
1533
|
-
|
|
1534
|
-
document.getElementById('btn-save').addEventListener('click', function() {
|
|
1535
|
-
var pb = toPlaybookDef();
|
|
1536
|
-
fetch('/api/playbooks', {
|
|
1537
|
-
method: 'POST',
|
|
1538
|
-
headers: { 'Content-Type': 'application/json' },
|
|
1539
|
-
body: JSON.stringify(pb),
|
|
1540
|
-
}).then(function(r) { return r.json(); }).then(function(saved) {
|
|
1541
|
-
canvas.playbookId = saved.id;
|
|
1542
|
-
showToast('Playbook saved: ' + saved.name);
|
|
1543
|
-
}).catch(function(e) {
|
|
1544
|
-
showToast('Save failed: ' + e, true);
|
|
1545
|
-
});
|
|
1546
|
-
});
|
|
1547
|
-
|
|
1548
|
-
document.getElementById('btn-open').addEventListener('click', function() {
|
|
1549
|
-
openPlaybookList();
|
|
1550
|
-
});
|
|
1551
|
-
|
|
1552
|
-
document.getElementById('btn-run').addEventListener('click', function() {
|
|
1553
|
-
if (!canvas.playbookId) {
|
|
1554
|
-
// Auto-save first
|
|
1555
|
-
var pb = toPlaybookDef();
|
|
1556
|
-
fetch('/api/playbooks', {
|
|
1557
|
-
method: 'POST',
|
|
1558
|
-
headers: { 'Content-Type': 'application/json' },
|
|
1559
|
-
body: JSON.stringify(pb),
|
|
1560
|
-
}).then(function() {
|
|
1561
|
-
runCurrentPlaybook(pb.id);
|
|
1562
|
-
}).catch(function(e) { showToast('Error: ' + e, true); });
|
|
1563
|
-
} else {
|
|
1564
|
-
// Save then run
|
|
1565
|
-
var pb2 = toPlaybookDef();
|
|
1566
|
-
fetch('/api/playbooks', {
|
|
1567
|
-
method: 'POST',
|
|
1568
|
-
headers: { 'Content-Type': 'application/json' },
|
|
1569
|
-
body: JSON.stringify(pb2),
|
|
1570
|
-
}).then(function() {
|
|
1571
|
-
runCurrentPlaybook(pb2.id);
|
|
1572
|
-
}).catch(function(e) { showToast('Error: ' + e, true); });
|
|
184
|
+
} else if (ev.eventType === 'run_completed') {
|
|
185
|
+
const run = runs.get(ev.runId);
|
|
186
|
+
if (run) { run.status = 'completed'; run.completedAt = ev.timestamp; }
|
|
187
|
+
} else if (ev.eventType === 'run_stopped') {
|
|
188
|
+
const run = runs.get(ev.runId);
|
|
189
|
+
if (run) { run.status = 'stopped'; run.completedAt = ev.timestamp; }
|
|
1573
190
|
}
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
function runCurrentPlaybook(playbookId) {
|
|
1577
|
-
// Reset node statuses
|
|
1578
|
-
canvas.nodes.forEach(function(n) { n.runStatus = null; n.runItems = 0; n.runDuration = null; });
|
|
1579
|
-
renderNodes();
|
|
1580
|
-
fetch('/api/playbooks/' + playbookId + '/run', { method: 'POST' })
|
|
1581
|
-
.then(function(r) { return r.json(); })
|
|
1582
|
-
.then(function(res) {
|
|
1583
|
-
if (res.ok) {
|
|
1584
|
-
showToast('Playbook started — watch the Runs tab');
|
|
1585
|
-
// Switch to runs panel
|
|
1586
|
-
document.querySelectorAll('.nav-item').forEach(function(n) { n.classList.remove('active'); });
|
|
1587
|
-
document.querySelector('[data-panel="playbooks"]').classList.add('active');
|
|
1588
|
-
document.querySelectorAll('.panel').forEach(function(p) { p.classList.remove('active'); });
|
|
1589
|
-
document.getElementById('pb-panel').classList.add('active');
|
|
1590
|
-
}
|
|
1591
|
-
})
|
|
1592
|
-
.catch(function(e) { showToast('Run failed: ' + e, true); });
|
|
1593
|
-
}
|
|
1594
|
-
|
|
1595
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
1596
|
-
// PLAYBOOK LIST OVERLAY
|
|
1597
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
1598
|
-
function openPlaybookList() {
|
|
1599
|
-
var overlay = document.getElementById('pb-list-overlay');
|
|
1600
|
-
overlay.classList.add('show');
|
|
1601
|
-
fetch('/api/playbooks')
|
|
1602
|
-
.then(function(r) { return r.json(); })
|
|
1603
|
-
.then(function(list) {
|
|
1604
|
-
var body = document.getElementById('pblo-body');
|
|
1605
|
-
if (!list.length) {
|
|
1606
|
-
body.innerHTML = '<div class="pblo-empty">No saved playbooks yet. Build one and click Save!</div>';
|
|
1607
|
-
return;
|
|
1608
|
-
}
|
|
1609
|
-
body.innerHTML = list.map(function(pb) {
|
|
1610
|
-
return '<div class="pblo-item" data-pb-id="' + esc(pb.id) + '">' +
|
|
1611
|
-
'<span class="pblo-item-name">' + esc(pb.name) + '</span>' +
|
|
1612
|
-
'<span class="pblo-item-meta">' + (pb.nodes ? pb.nodes.length : 0) + ' nodes</span>' +
|
|
1613
|
-
'<button class="pblo-del" data-del-id="' + esc(pb.id) + '" title="Delete">✕</button>' +
|
|
1614
|
-
'</div>';
|
|
1615
|
-
}).join('');
|
|
1616
|
-
body.querySelectorAll('.pblo-item').forEach(function(el) {
|
|
1617
|
-
el.addEventListener('click', function(e) {
|
|
1618
|
-
if (e.target.closest('.pblo-del')) return;
|
|
1619
|
-
var pbId = el.getAttribute('data-pb-id');
|
|
1620
|
-
fetch('/api/playbooks/' + pbId).then(function(r) { return r.json(); }).then(function(pb) {
|
|
1621
|
-
loadPlaybookDef(pb);
|
|
1622
|
-
overlay.classList.remove('show');
|
|
1623
|
-
});
|
|
1624
|
-
});
|
|
1625
|
-
});
|
|
1626
|
-
body.querySelectorAll('.pblo-del').forEach(function(btn) {
|
|
1627
|
-
btn.addEventListener('click', function(e) {
|
|
1628
|
-
e.stopPropagation();
|
|
1629
|
-
var delId = btn.getAttribute('data-del-id');
|
|
1630
|
-
if (!confirm('Delete this playbook?')) return;
|
|
1631
|
-
fetch('/api/playbooks/' + delId, { method: 'DELETE' }).then(function() {
|
|
1632
|
-
if (canvas.playbookId === delId) {
|
|
1633
|
-
canvas.playbookId = null;
|
|
1634
|
-
canvas.nodes = [];
|
|
1635
|
-
canvas.edges = [];
|
|
1636
|
-
canvas.selectedId = null;
|
|
1637
|
-
document.getElementById('canvas-nodes').innerHTML = '';
|
|
1638
|
-
document.getElementById('pb-name-input').value = 'Untitled Playbook';
|
|
1639
|
-
renderNodes();
|
|
1640
|
-
renderEdges();
|
|
1641
|
-
renderPropsPanel();
|
|
1642
|
-
}
|
|
1643
|
-
openPlaybookList(); // refresh
|
|
1644
|
-
});
|
|
1645
|
-
});
|
|
1646
|
-
});
|
|
1647
|
-
})
|
|
1648
|
-
.catch(function() {
|
|
1649
|
-
document.getElementById('pblo-body').innerHTML = '<div class="pblo-empty">Failed to load playbooks.</div>';
|
|
1650
|
-
});
|
|
1651
|
-
}
|
|
1652
|
-
|
|
1653
|
-
document.getElementById('pblo-close-btn').addEventListener('click', function() {
|
|
1654
|
-
document.getElementById('pb-list-overlay').classList.remove('show');
|
|
1655
|
-
});
|
|
1656
|
-
|
|
1657
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
1658
|
-
// TOAST
|
|
1659
|
-
// ═══════════════════════════════════════════════════════════════════
|
|
1660
|
-
function showToast(msg, isError) {
|
|
1661
|
-
var t = document.createElement('div');
|
|
1662
|
-
t.textContent = msg;
|
|
1663
|
-
t.style.cssText = 'position:fixed;bottom:20px;right:20px;z-index:9999;padding:8px 14px;border-radius:6px;font-size:11px;font-family:monospace;max-width:320px;pointer-events:none;transition:opacity .3s;' +
|
|
1664
|
-
(isError ? 'background:#ef444420;border:1px solid #ef444466;color:#ef4444;' : 'background:#7c3aed20;border:1px solid #7c3aed66;color:#c4b5fd;');
|
|
1665
|
-
document.body.appendChild(t);
|
|
1666
|
-
setTimeout(function() { t.style.opacity = '0'; setTimeout(function() { t.remove(); }, 300); }, 2500);
|
|
191
|
+
render();
|
|
1667
192
|
}
|
|
1668
193
|
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
if (
|
|
1674
|
-
var node = canvas.nodes.find(function(n) { return n.id === evt.nodeId; });
|
|
1675
|
-
if (!node) return;
|
|
1676
|
-
if (evt.eventType === 'step_started') {
|
|
1677
|
-
node.runStatus = 'running';
|
|
1678
|
-
} else if (evt.eventType === 'step_completed') {
|
|
1679
|
-
node.runStatus = 'ok';
|
|
1680
|
-
node.runItems = evt.itemTotal || 0;
|
|
1681
|
-
node.runDuration = evt.durationMs || null;
|
|
1682
|
-
} else if (evt.eventType === 'step_failed') {
|
|
1683
|
-
node.runStatus = 'error';
|
|
1684
|
-
}
|
|
1685
|
-
// Only re-render if builder is active
|
|
1686
|
-
var builderPanel = document.getElementById('builder-panel');
|
|
1687
|
-
if (builderPanel.classList.contains('active')) {
|
|
1688
|
-
renderNodes();
|
|
1689
|
-
}
|
|
194
|
+
function addLog(runId, msg) {
|
|
195
|
+
if (!logs.has(runId)) logs.set(runId, []);
|
|
196
|
+
const ts = new Date().toLocaleTimeString();
|
|
197
|
+
logs.get(runId).push(`${ts} ${msg}`);
|
|
198
|
+
if (logs.get(runId).length > 10) logs.get(runId).shift();
|
|
1690
199
|
}
|
|
1691
200
|
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
function handleEvent(evt) {
|
|
1696
|
-
// Route to builder status
|
|
1697
|
-
handleBuilderEvent(evt);
|
|
1698
|
-
|
|
1699
|
-
var id = evt.runId;
|
|
1700
|
-
if (!id) return;
|
|
1701
|
-
if (!runs[id]) {
|
|
1702
|
-
runs[id] = { id: id, playbookId: evt.playbookId, playbookName: evt.playbookName || id,
|
|
1703
|
-
status: 'running', startedAt: evt.timestamp || Date.now(),
|
|
1704
|
-
itemsProcessed: 0, itemsTotal: 0 };
|
|
1705
|
-
}
|
|
1706
|
-
if (!runLogs[id]) runLogs[id] = [];
|
|
1707
|
-
var r = runs[id];
|
|
1708
|
-
var t = ts(evt.timestamp || Date.now());
|
|
1709
|
-
|
|
1710
|
-
if (evt.eventType === 'run_started') {
|
|
1711
|
-
r.status = 'running';
|
|
1712
|
-
r.startedAt = evt.timestamp || Date.now();
|
|
1713
|
-
} else if (evt.eventType === 'step_started') {
|
|
1714
|
-
runLogs[id].push({ ts: t, type: 'info', text: (evt.nodeName || '?') + ' — started' });
|
|
1715
|
-
} else if (evt.eventType === 'step_completed') {
|
|
1716
|
-
r.itemsProcessed = (r.itemsProcessed || 0) + (evt.itemTotal || 1);
|
|
1717
|
-
runLogs[id].push({ ts: t, type: 'ok', text: (evt.nodeName || '?') + ' ✓ ' + (evt.durationMs ? evt.durationMs + 'ms' : '') });
|
|
1718
|
-
} else if (evt.eventType === 'step_failed') {
|
|
1719
|
-
runLogs[id].push({ ts: t, type: 'err', text: (evt.nodeName || '?') + ' ✗ ' + (evt.error || '') });
|
|
1720
|
-
} else if (evt.eventType === 'run_completed') {
|
|
1721
|
-
r.status = 'completed';
|
|
1722
|
-
r.endedAt = evt.timestamp || Date.now();
|
|
1723
|
-
// Clear running status on nodes
|
|
1724
|
-
canvas.nodes.forEach(function(n) {
|
|
1725
|
-
if (n.runStatus === 'running') { n.runStatus = null; }
|
|
1726
|
-
});
|
|
1727
|
-
} else if (evt.eventType === 'run_failed') {
|
|
1728
|
-
r.status = 'failed';
|
|
1729
|
-
r.endedAt = evt.timestamp || Date.now();
|
|
1730
|
-
} else if (evt.eventType === 'run_stopped') {
|
|
1731
|
-
r.status = evt.error ? 'failed' : 'stopped';
|
|
1732
|
-
r.endedAt = evt.timestamp || Date.now();
|
|
1733
|
-
}
|
|
1734
|
-
|
|
1735
|
-
if (runLogs[id].length > 80) runLogs[id] = runLogs[id].slice(-80);
|
|
1736
|
-
updateHeader();
|
|
1737
|
-
renderCards();
|
|
201
|
+
function elapsed(startedAt) {
|
|
202
|
+
const s = Math.floor((Date.now() - startedAt) / 1000);
|
|
203
|
+
return s < 60 ? `${s}s` : `${Math.floor(s/60)}m ${s%60}s`;
|
|
1738
204
|
}
|
|
1739
205
|
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
206
|
+
function render() {
|
|
207
|
+
const allRuns = [...runs.values()].sort((a,b) => b.startedAt - a.startedAt);
|
|
208
|
+
const nRunning = allRuns.filter(r => r.status === 'running').length;
|
|
209
|
+
const nDone = allRuns.filter(r => r.status === 'completed').length;
|
|
210
|
+
const nFailed = allRuns.filter(r => r.status === 'failed').length;
|
|
211
|
+
document.getElementById('stat-running').textContent = `${nRunning} running`;
|
|
212
|
+
document.getElementById('stat-done').textContent = `✓ ${nDone} done`;
|
|
213
|
+
document.getElementById('stat-failed').textContent = `✗ ${nFailed} failed`;
|
|
1745
214
|
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
connLabel.style.color = '#22c55e';
|
|
1750
|
-
connLabel.textContent = 'live';
|
|
1751
|
-
} else if (state === 'error') {
|
|
1752
|
-
connDot.style.background = '#f59e0b';
|
|
1753
|
-
connLabel.style.color = '#f59e0b';
|
|
1754
|
-
connLabel.textContent = 'reconnecting…';
|
|
1755
|
-
} else {
|
|
1756
|
-
connDot.style.background = '#555';
|
|
1757
|
-
connLabel.style.color = '#555';
|
|
1758
|
-
connLabel.textContent = 'connecting…';
|
|
215
|
+
if (allRuns.length === 0) {
|
|
216
|
+
document.getElementById('runs').innerHTML = '<div class="empty">No workflows running. Start one with:<br><code>monomind browse workflow run <file.json></code></div>';
|
|
217
|
+
return;
|
|
1759
218
|
}
|
|
1760
|
-
}
|
|
1761
219
|
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
220
|
+
document.getElementById('runs').innerHTML = allRuns.map(run => {
|
|
221
|
+
const stepHtml = (run.steps || []).map(s => `
|
|
222
|
+
<div class="step ${s.status}">
|
|
223
|
+
<span class="step-icon">${s.status==='done'?'✓':s.status==='error'?'✗':'○'}</span>
|
|
224
|
+
<span class="step-name">${s.name}</span>
|
|
225
|
+
<span class="step-time">${s.duration ? s.duration+'ms' : ''}</span>
|
|
226
|
+
</div>`).join('') + (run.currentStep ? `
|
|
227
|
+
<div class="step current">
|
|
228
|
+
<span class="step-icon">⠸</span>
|
|
229
|
+
<span class="step-name">${run.currentStep}</span>
|
|
230
|
+
<span class="step-time">running</span>
|
|
231
|
+
</div>` : '');
|
|
232
|
+
|
|
233
|
+
const pct = run.itemsTotal > 0 ? Math.round(run.itemsProcessed / run.itemsTotal * 100) : 0;
|
|
234
|
+
const runLog = (logs.get(run.id) || []).slice(-3).join('\n');
|
|
235
|
+
return `<div class="run ${run.status==='running'?'active':run.status}">
|
|
236
|
+
<div class="run-header">
|
|
237
|
+
<div><span class="run-name">${run.workflowName}</span>
|
|
238
|
+
<span class="status-badge status-${run.status}">${run.status==='completed'?'✓ done':run.status}</span>
|
|
239
|
+
</div>
|
|
240
|
+
<div class="run-meta">
|
|
241
|
+
<span>items: ${run.itemsProcessed}/${run.itemsTotal}</span>
|
|
242
|
+
<span>elapsed: ${elapsed(run.startedAt)}</span>
|
|
243
|
+
${run.status==='running'?'<button class="stop-btn" onclick="stopRun(\''+run.id+'\')">stop</button>':''}
|
|
244
|
+
</div>
|
|
245
|
+
</div>
|
|
246
|
+
${run.itemsTotal > 0 ? `<div class="progress-bar"><div class="progress-fill" style="width:${pct}%"></div></div>` : ''}
|
|
247
|
+
<div class="steps">${stepHtml}</div>
|
|
248
|
+
${runLog ? `<div class="log">${runLog}</div>` : ''}
|
|
249
|
+
</div>`;
|
|
250
|
+
}).join('');
|
|
1773
251
|
}
|
|
1774
252
|
|
|
1775
|
-
function
|
|
1776
|
-
|
|
1777
|
-
var sock = new WebSocket('ws://' + location.host + '/ws');
|
|
1778
|
-
sock.onopen = function() { setConnStatus('live'); };
|
|
1779
|
-
sock.onmessage = function(e) {
|
|
1780
|
-
var msg = JSON.parse(e.data);
|
|
1781
|
-
if (msg.type === 'history') {
|
|
1782
|
-
msg.runs.forEach(function(r) {
|
|
1783
|
-
runs[r.id] = r;
|
|
1784
|
-
if (!runLogs[r.id]) runLogs[r.id] = [];
|
|
1785
|
-
});
|
|
1786
|
-
updateHeader();
|
|
1787
|
-
renderCards();
|
|
1788
|
-
} else {
|
|
1789
|
-
handleEvent(msg);
|
|
1790
|
-
}
|
|
1791
|
-
};
|
|
1792
|
-
var wsFailedOnce = false;
|
|
1793
|
-
sock.onclose = function() {
|
|
1794
|
-
setConnStatus('error');
|
|
1795
|
-
if (!wsFailedOnce) {
|
|
1796
|
-
wsFailedOnce = true;
|
|
1797
|
-
fetch('/events', { method: 'HEAD' }).then(function(r) {
|
|
1798
|
-
if (r.ok) { connectSSE(); } else { setTimeout(connect, 2500); }
|
|
1799
|
-
}).catch(function() { setTimeout(connect, 2500); });
|
|
1800
|
-
} else {
|
|
1801
|
-
setTimeout(connect, 2500);
|
|
1802
|
-
}
|
|
1803
|
-
};
|
|
253
|
+
async function stopRun(runId) {
|
|
254
|
+
await fetch(`/stop/${runId}`, { method: 'POST' }).catch(() => {});
|
|
1804
255
|
}
|
|
1805
256
|
|
|
1806
|
-
// ── init ───────────────────────────────────────────────────
|
|
1807
257
|
connect();
|
|
1808
|
-
setInterval(
|
|
258
|
+
setInterval(render, 1000); // Update elapsed time
|
|
1809
259
|
</script>
|
|
1810
260
|
</body>
|
|
1811
261
|
</html>
|