claudecode-omc 4.8.2 → 4.8.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/marketplace.json +3 -3
- package/.claude-plugin/plugin.json +3 -3
- package/README.de.md +60 -0
- package/README.es.md +60 -0
- package/README.fr.md +60 -0
- package/README.it.md +60 -0
- package/README.ja.md +60 -0
- package/README.ko.md +60 -0
- package/README.md +101 -16
- package/README.pt.md +60 -0
- package/README.ru.md +60 -0
- package/README.tr.md +60 -0
- package/README.vi.md +60 -0
- package/README.zh.md +60 -0
- package/agents/code-reviewer.md +107 -6
- package/agents/critic.md +212 -42
- package/agents/debugger.md +52 -4
- package/agents/document-specialist.md +39 -60
- package/agents/executor.md +29 -9
- package/agents/explore.md +3 -1
- package/agents/security-reviewer.md +57 -0
- package/agents/test-engineer.md +21 -0
- package/agents/verifier.md +2 -0
- package/agents/writer.md +2 -0
- package/bridge/cli.cjs +7402 -3580
- package/bridge/mcp-server.cjs +558 -43
- package/bridge/runtime-cli.cjs +3034 -1801
- package/bridge/team-bridge.cjs +25 -1
- package/bridge/team-mcp.cjs +257 -88
- package/bridge/team.js +5226 -413
- package/dist/__tests__/agent-boundary-guidance.test.d.ts +2 -0
- package/dist/__tests__/agent-boundary-guidance.test.d.ts.map +1 -0
- package/dist/__tests__/agent-boundary-guidance.test.js +48 -0
- package/dist/__tests__/agent-boundary-guidance.test.js.map +1 -0
- package/dist/__tests__/agent-registry.test.js +48 -11
- package/dist/__tests__/agent-registry.test.js.map +1 -1
- package/dist/__tests__/auto-slash-aliases.test.js +25 -0
- package/dist/__tests__/auto-slash-aliases.test.js.map +1 -1
- package/dist/__tests__/bedrock-model-routing.test.d.ts +21 -0
- package/dist/__tests__/bedrock-model-routing.test.d.ts.map +1 -0
- package/dist/__tests__/bedrock-model-routing.test.js +397 -0
- package/dist/__tests__/bedrock-model-routing.test.js.map +1 -0
- package/dist/__tests__/cleanup-validation.test.js +7 -3
- package/dist/__tests__/cleanup-validation.test.js.map +1 -1
- package/dist/__tests__/cli-win32-warning.test.js +15 -2
- package/dist/__tests__/cli-win32-warning.test.js.map +1 -1
- package/dist/__tests__/consolidation-contracts.test.js +28 -3
- package/dist/__tests__/consolidation-contracts.test.js.map +1 -1
- package/dist/__tests__/context-guard-stop.test.d.ts +2 -0
- package/dist/__tests__/context-guard-stop.test.d.ts.map +1 -0
- package/dist/__tests__/context-guard-stop.test.js +58 -0
- package/dist/__tests__/context-guard-stop.test.js.map +1 -0
- package/dist/__tests__/delegation-enforcer.test.js +76 -11
- package/dist/__tests__/delegation-enforcer.test.js.map +1 -1
- package/dist/__tests__/doctor-conflicts.test.js +62 -1
- package/dist/__tests__/doctor-conflicts.test.js.map +1 -1
- package/dist/__tests__/hooks.test.js +165 -4
- package/dist/__tests__/hooks.test.js.map +1 -1
- package/dist/__tests__/hud/defaults.test.js +4 -0
- package/dist/__tests__/hud/defaults.test.js.map +1 -1
- package/dist/__tests__/hud/limits-error.test.js +2 -4
- package/dist/__tests__/hud/limits-error.test.js.map +1 -1
- package/dist/__tests__/hud/mission-board-state.test.d.ts +2 -0
- package/dist/__tests__/hud/mission-board-state.test.d.ts.map +1 -0
- package/dist/__tests__/hud/mission-board-state.test.js +170 -0
- package/dist/__tests__/hud/mission-board-state.test.js.map +1 -0
- package/dist/__tests__/hud/mission-board.test.d.ts +2 -0
- package/dist/__tests__/hud/mission-board.test.d.ts.map +1 -0
- package/dist/__tests__/hud/mission-board.test.js +143 -0
- package/dist/__tests__/hud/mission-board.test.js.map +1 -0
- package/dist/__tests__/hud/rate-limits-error.test.js +13 -0
- package/dist/__tests__/hud/rate-limits-error.test.js.map +1 -1
- package/dist/__tests__/hud/render-rate-limits-priority.test.d.ts +8 -0
- package/dist/__tests__/hud/render-rate-limits-priority.test.d.ts.map +1 -0
- package/dist/__tests__/hud/render-rate-limits-priority.test.js +145 -0
- package/dist/__tests__/hud/render-rate-limits-priority.test.js.map +1 -0
- package/dist/__tests__/hud/render.test.js +22 -0
- package/dist/__tests__/hud/render.test.js.map +1 -1
- package/dist/__tests__/hud/stale-indicator.test.d.ts +9 -0
- package/dist/__tests__/hud/stale-indicator.test.d.ts.map +1 -0
- package/dist/__tests__/hud/stale-indicator.test.js +81 -0
- package/dist/__tests__/hud/stale-indicator.test.js.map +1 -0
- package/dist/__tests__/hud/state.test.js +30 -0
- package/dist/__tests__/hud/state.test.js.map +1 -1
- package/dist/__tests__/hud/usage-api-lock.test.d.ts +2 -0
- package/dist/__tests__/hud/usage-api-lock.test.d.ts.map +1 -0
- package/dist/__tests__/hud/usage-api-lock.test.js +245 -0
- package/dist/__tests__/hud/usage-api-lock.test.js.map +1 -0
- package/dist/__tests__/hud/usage-api-stale.test.d.ts +9 -0
- package/dist/__tests__/hud/usage-api-stale.test.d.ts.map +1 -0
- package/dist/__tests__/hud/usage-api-stale.test.js +297 -0
- package/dist/__tests__/hud/usage-api-stale.test.js.map +1 -0
- package/dist/__tests__/hud/usage-api.test.js +223 -0
- package/dist/__tests__/hud/usage-api.test.js.map +1 -1
- package/dist/__tests__/hud/watch-mode-init.test.d.ts +2 -0
- package/dist/__tests__/hud/watch-mode-init.test.d.ts.map +1 -0
- package/dist/__tests__/hud/watch-mode-init.test.js +133 -0
- package/dist/__tests__/hud/watch-mode-init.test.js.map +1 -0
- package/dist/__tests__/hud-agents.test.js +12 -10
- package/dist/__tests__/hud-agents.test.js.map +1 -1
- package/dist/__tests__/hud-build-guidance.test.js +6 -2
- package/dist/__tests__/hud-build-guidance.test.js.map +1 -1
- package/dist/__tests__/hud-marketplace-resolution.test.d.ts +2 -0
- package/dist/__tests__/hud-marketplace-resolution.test.d.ts.map +1 -0
- package/dist/__tests__/hud-marketplace-resolution.test.js +53 -0
- package/dist/__tests__/hud-marketplace-resolution.test.js.map +1 -0
- package/dist/__tests__/installer-hud-skip.test.js +12 -0
- package/dist/__tests__/installer-hud-skip.test.js.map +1 -1
- package/dist/__tests__/installer-plugin-agents.test.d.ts +2 -0
- package/dist/__tests__/installer-plugin-agents.test.d.ts.map +1 -0
- package/dist/__tests__/installer-plugin-agents.test.js +111 -0
- package/dist/__tests__/installer-plugin-agents.test.js.map +1 -0
- package/dist/__tests__/installer-version-guard.test.d.ts +2 -0
- package/dist/__tests__/installer-version-guard.test.d.ts.map +1 -0
- package/dist/__tests__/installer-version-guard.test.js +75 -0
- package/dist/__tests__/installer-version-guard.test.js.map +1 -0
- package/dist/__tests__/installer.test.js +58 -4
- package/dist/__tests__/installer.test.js.map +1 -1
- package/dist/__tests__/omc-tools-server.test.js +8 -5
- package/dist/__tests__/omc-tools-server.test.js.map +1 -1
- package/dist/__tests__/pre-tool-enforcer.test.js +38 -0
- package/dist/__tests__/pre-tool-enforcer.test.js.map +1 -1
- package/dist/__tests__/prompt-injection.test.js +3 -3
- package/dist/__tests__/prompt-injection.test.js.map +1 -1
- package/dist/__tests__/ralph-prd-mandatory.test.js +53 -2
- package/dist/__tests__/ralph-prd-mandatory.test.js.map +1 -1
- package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.js +42 -0
- package/dist/__tests__/rate-limit-wait/rate-limit-monitor.test.js.map +1 -1
- package/dist/__tests__/rate-limit-wait/tmux-detector.test.js +1 -1
- package/dist/__tests__/session-history-search.test.d.ts +2 -0
- package/dist/__tests__/session-history-search.test.d.ts.map +1 -0
- package/dist/__tests__/session-history-search.test.js +115 -0
- package/dist/__tests__/session-history-search.test.js.map +1 -0
- package/dist/__tests__/session-start-script-context.test.d.ts +2 -0
- package/dist/__tests__/session-start-script-context.test.d.ts.map +1 -0
- package/dist/__tests__/session-start-script-context.test.js +49 -0
- package/dist/__tests__/session-start-script-context.test.js.map +1 -0
- package/dist/__tests__/skills.test.js +71 -24
- package/dist/__tests__/skills.test.js.map +1 -1
- package/dist/__tests__/standalone-server.test.js +8 -4
- package/dist/__tests__/standalone-server.test.js.map +1 -1
- package/dist/__tests__/tier0-docs-consistency.test.js +10 -2
- package/dist/__tests__/tier0-docs-consistency.test.js.map +1 -1
- package/dist/agents/definitions.d.ts +5 -15
- package/dist/agents/definitions.d.ts.map +1 -1
- package/dist/agents/definitions.js +48 -49
- package/dist/agents/definitions.js.map +1 -1
- package/dist/agents/document-specialist.d.ts +1 -1
- package/dist/agents/document-specialist.d.ts.map +1 -1
- package/dist/agents/document-specialist.js +46 -21
- package/dist/agents/document-specialist.js.map +1 -1
- package/dist/agents/explore.d.ts.map +1 -1
- package/dist/agents/explore.js +3 -2
- package/dist/agents/explore.js.map +1 -1
- package/dist/agents/index.d.ts +2 -4
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +3 -6
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/types.d.ts +2 -2
- package/dist/agents/types.d.ts.map +1 -1
- package/dist/cli/__tests__/ask.test.js +255 -8
- package/dist/cli/__tests__/ask.test.js.map +1 -1
- package/dist/cli/__tests__/session-search-help.test.d.ts +2 -0
- package/dist/cli/__tests__/session-search-help.test.d.ts.map +1 -0
- package/dist/cli/__tests__/session-search-help.test.js +13 -0
- package/dist/cli/__tests__/session-search-help.test.js.map +1 -0
- package/dist/cli/__tests__/session-search.test.d.ts +2 -0
- package/dist/cli/__tests__/session-search.test.d.ts.map +1 -0
- package/dist/cli/__tests__/session-search.test.js +72 -0
- package/dist/cli/__tests__/session-search.test.js.map +1 -0
- package/dist/cli/__tests__/team-help.test.js +1 -1
- package/dist/cli/__tests__/team-help.test.js.map +1 -1
- package/dist/cli/__tests__/team.test.js +256 -4
- package/dist/cli/__tests__/team.test.js.map +1 -1
- package/dist/cli/commands/__tests__/team.test.js +52 -2
- package/dist/cli/commands/__tests__/team.test.js.map +1 -1
- package/dist/cli/commands/doctor-conflicts.d.ts.map +1 -1
- package/dist/cli/commands/doctor-conflicts.js +15 -1
- package/dist/cli/commands/doctor-conflicts.js.map +1 -1
- package/dist/cli/commands/session-search.d.ts +18 -0
- package/dist/cli/commands/session-search.d.ts.map +1 -0
- package/dist/cli/commands/session-search.js +47 -0
- package/dist/cli/commands/session-search.js.map +1 -0
- package/dist/cli/commands/team.d.ts +11 -0
- package/dist/cli/commands/team.d.ts.map +1 -1
- package/dist/cli/commands/team.js +94 -24
- package/dist/cli/commands/team.js.map +1 -1
- package/dist/cli/commands/wait.d.ts.map +1 -1
- package/dist/cli/commands/wait.js +12 -1
- package/dist/cli/commands/wait.js.map +1 -1
- package/dist/cli/index.js +70 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/team.d.ts +1 -0
- package/dist/cli/team.d.ts.map +1 -1
- package/dist/cli/team.js +100 -214
- package/dist/cli/team.js.map +1 -1
- package/dist/cli/win32-warning.d.ts +2 -1
- package/dist/cli/win32-warning.d.ts.map +1 -1
- package/dist/cli/win32-warning.js +20 -6
- package/dist/cli/win32-warning.js.map +1 -1
- package/dist/config/__tests__/loader.test.d.ts +2 -0
- package/dist/config/__tests__/loader.test.d.ts.map +1 -0
- package/dist/config/__tests__/loader.test.js +145 -0
- package/dist/config/__tests__/loader.test.js.map +1 -0
- package/dist/config/__tests__/models.test.d.ts +2 -0
- package/dist/config/__tests__/models.test.d.ts.map +1 -0
- package/dist/config/__tests__/models.test.js +147 -0
- package/dist/config/__tests__/models.test.js.map +1 -0
- package/dist/config/__tests__/test-helpers.d.ts +3 -0
- package/dist/config/__tests__/test-helpers.d.ts.map +1 -0
- package/dist/config/__tests__/test-helpers.js +19 -0
- package/dist/config/__tests__/test-helpers.js.map +1 -0
- package/dist/config/loader.d.ts +3 -1
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +140 -126
- package/dist/config/loader.js.map +1 -1
- package/dist/config/models.d.ts +29 -10
- package/dist/config/models.d.ts.map +1 -1
- package/dist/config/models.js +96 -10
- package/dist/config/models.js.map +1 -1
- package/dist/features/builtin-skills/skills.d.ts.map +1 -1
- package/dist/features/builtin-skills/skills.js +8 -1
- package/dist/features/builtin-skills/skills.js.map +1 -1
- package/dist/features/builtin-skills/types.d.ts +3 -0
- package/dist/features/builtin-skills/types.d.ts.map +1 -1
- package/dist/features/delegation-enforcer.d.ts +5 -12
- package/dist/features/delegation-enforcer.d.ts.map +1 -1
- package/dist/features/delegation-enforcer.js +48 -54
- package/dist/features/delegation-enforcer.js.map +1 -1
- package/dist/features/delegation-routing/__tests__/resolver.test.js +4 -3
- package/dist/features/delegation-routing/__tests__/resolver.test.js.map +1 -1
- package/dist/features/delegation-routing/types.d.ts.map +1 -1
- package/dist/features/delegation-routing/types.js +7 -4
- package/dist/features/delegation-routing/types.js.map +1 -1
- package/dist/features/index.d.ts +1 -0
- package/dist/features/index.d.ts.map +1 -1
- package/dist/features/index.js +2 -0
- package/dist/features/index.js.map +1 -1
- package/dist/features/rate-limit-wait/daemon.d.ts.map +1 -1
- package/dist/features/rate-limit-wait/daemon.js +8 -5
- package/dist/features/rate-limit-wait/daemon.js.map +1 -1
- package/dist/features/rate-limit-wait/index.d.ts +1 -1
- package/dist/features/rate-limit-wait/index.d.ts.map +1 -1
- package/dist/features/rate-limit-wait/index.js +1 -1
- package/dist/features/rate-limit-wait/index.js.map +1 -1
- package/dist/features/rate-limit-wait/rate-limit-monitor.d.ts +9 -0
- package/dist/features/rate-limit-wait/rate-limit-monitor.d.ts.map +1 -1
- package/dist/features/rate-limit-wait/rate-limit-monitor.js +38 -0
- package/dist/features/rate-limit-wait/rate-limit-monitor.js.map +1 -1
- package/dist/features/rate-limit-wait/tmux-detector.d.ts +2 -1
- package/dist/features/rate-limit-wait/tmux-detector.d.ts.map +1 -1
- package/dist/features/rate-limit-wait/tmux-detector.js +8 -9
- package/dist/features/rate-limit-wait/tmux-detector.js.map +1 -1
- package/dist/features/rate-limit-wait/types.d.ts +11 -0
- package/dist/features/rate-limit-wait/types.d.ts.map +1 -1
- package/dist/features/session-history-search/index.d.ts +6 -0
- package/dist/features/session-history-search/index.d.ts.map +1 -0
- package/dist/features/session-history-search/index.js +480 -0
- package/dist/features/session-history-search/index.js.map +1 -0
- package/dist/features/session-history-search/types.d.ts +36 -0
- package/dist/features/session-history-search/types.d.ts.map +1 -0
- package/dist/features/session-history-search/types.js +2 -0
- package/dist/features/session-history-search/types.js.map +1 -0
- package/dist/hooks/__tests__/background-process-guard.test.js +101 -5
- package/dist/hooks/__tests__/background-process-guard.test.js.map +1 -1
- package/dist/hooks/__tests__/bridge-openclaw.test.js +16 -5
- package/dist/hooks/__tests__/bridge-openclaw.test.js.map +1 -1
- package/dist/hooks/__tests__/bridge-routing.test.js +48 -1
- package/dist/hooks/__tests__/bridge-routing.test.js.map +1 -1
- package/dist/hooks/auto-slash-command/executor.d.ts.map +1 -1
- package/dist/hooks/auto-slash-command/executor.js +9 -1
- package/dist/hooks/auto-slash-command/executor.js.map +1 -1
- package/dist/hooks/auto-slash-command/types.d.ts +2 -0
- package/dist/hooks/auto-slash-command/types.d.ts.map +1 -1
- package/dist/hooks/auto-slash-command/types.js +0 -7
- package/dist/hooks/auto-slash-command/types.js.map +1 -1
- package/dist/hooks/autopilot/adapters/execution-adapter.js +3 -3
- package/dist/hooks/autopilot/prompts.js +1 -1
- package/dist/hooks/bridge-normalize.d.ts.map +1 -1
- package/dist/hooks/bridge-normalize.js +2 -0
- package/dist/hooks/bridge-normalize.js.map +1 -1
- package/dist/hooks/bridge.d.ts.map +1 -1
- package/dist/hooks/bridge.js +248 -39
- package/dist/hooks/bridge.js.map +1 -1
- package/dist/hooks/keyword-detector/__tests__/index.test.js +41 -0
- package/dist/hooks/keyword-detector/__tests__/index.test.js.map +1 -1
- package/dist/hooks/keyword-detector/index.d.ts +1 -1
- package/dist/hooks/keyword-detector/index.d.ts.map +1 -1
- package/dist/hooks/keyword-detector/index.js +3 -1
- package/dist/hooks/keyword-detector/index.js.map +1 -1
- package/dist/hooks/permission-handler/index.d.ts +8 -0
- package/dist/hooks/permission-handler/index.d.ts.map +1 -1
- package/dist/hooks/permission-handler/index.js +76 -0
- package/dist/hooks/permission-handler/index.js.map +1 -1
- package/dist/hooks/persistent-mode/__tests__/ralph-verification-flow.test.d.ts +2 -0
- package/dist/hooks/persistent-mode/__tests__/ralph-verification-flow.test.d.ts.map +1 -0
- package/dist/hooks/persistent-mode/__tests__/ralph-verification-flow.test.js +90 -0
- package/dist/hooks/persistent-mode/__tests__/ralph-verification-flow.test.js.map +1 -0
- package/dist/hooks/persistent-mode/__tests__/team-ralplan-stop.test.d.ts +2 -0
- package/dist/hooks/persistent-mode/__tests__/team-ralplan-stop.test.d.ts.map +1 -0
- package/dist/hooks/persistent-mode/__tests__/team-ralplan-stop.test.js +535 -0
- package/dist/hooks/persistent-mode/__tests__/team-ralplan-stop.test.js.map +1 -0
- package/dist/hooks/persistent-mode/index.d.ts +1 -1
- package/dist/hooks/persistent-mode/index.d.ts.map +1 -1
- package/dist/hooks/persistent-mode/index.js +296 -21
- package/dist/hooks/persistent-mode/index.js.map +1 -1
- package/dist/hooks/persistent-mode/stop-hook-blocking.test.js +156 -0
- package/dist/hooks/persistent-mode/stop-hook-blocking.test.js.map +1 -1
- package/dist/hooks/project-memory/__tests__/integration.test.js +27 -2
- package/dist/hooks/project-memory/__tests__/integration.test.js.map +1 -1
- package/dist/hooks/project-memory/__tests__/storage.test.js +37 -0
- package/dist/hooks/project-memory/__tests__/storage.test.js.map +1 -1
- package/dist/hooks/project-memory/storage.d.ts +1 -1
- package/dist/hooks/project-memory/storage.d.ts.map +1 -1
- package/dist/hooks/project-memory/storage.js +5 -4
- package/dist/hooks/project-memory/storage.js.map +1 -1
- package/dist/hooks/ralph/index.d.ts +1 -1
- package/dist/hooks/ralph/index.d.ts.map +1 -1
- package/dist/hooks/ralph/index.js +1 -1
- package/dist/hooks/ralph/index.js.map +1 -1
- package/dist/hooks/ralph/loop.d.ts +18 -0
- package/dist/hooks/ralph/loop.d.ts.map +1 -1
- package/dist/hooks/ralph/loop.js +31 -0
- package/dist/hooks/ralph/loop.js.map +1 -1
- package/dist/hooks/ralph/verifier.d.ts +4 -1
- package/dist/hooks/ralph/verifier.d.ts.map +1 -1
- package/dist/hooks/ralph/verifier.js +56 -21
- package/dist/hooks/ralph/verifier.js.map +1 -1
- package/dist/hooks/recovery/__tests__/storage.test.d.ts +2 -0
- package/dist/hooks/recovery/__tests__/storage.test.d.ts.map +1 -0
- package/dist/hooks/recovery/__tests__/storage.test.js +65 -0
- package/dist/hooks/recovery/__tests__/storage.test.js.map +1 -0
- package/dist/hooks/recovery/storage.d.ts +5 -1
- package/dist/hooks/recovery/storage.d.ts.map +1 -1
- package/dist/hooks/recovery/storage.js +7 -29
- package/dist/hooks/recovery/storage.js.map +1 -1
- package/dist/hooks/recovery/types.d.ts +1 -1
- package/dist/hooks/recovery/types.d.ts.map +1 -1
- package/dist/hooks/session-end/__tests__/duplicate-notifications.test.d.ts +2 -0
- package/dist/hooks/session-end/__tests__/duplicate-notifications.test.d.ts.map +1 -0
- package/dist/hooks/session-end/__tests__/duplicate-notifications.test.js +140 -0
- package/dist/hooks/session-end/__tests__/duplicate-notifications.test.js.map +1 -0
- package/dist/hooks/session-end/__tests__/mode-state-cleanup.test.d.ts +2 -0
- package/dist/hooks/session-end/__tests__/mode-state-cleanup.test.d.ts.map +1 -0
- package/dist/hooks/session-end/__tests__/mode-state-cleanup.test.js +122 -0
- package/dist/hooks/session-end/__tests__/mode-state-cleanup.test.js.map +1 -0
- package/dist/hooks/session-end/__tests__/openclaw-session-end.test.js +38 -12
- package/dist/hooks/session-end/__tests__/openclaw-session-end.test.js.map +1 -1
- package/dist/hooks/session-end/callbacks.d.ts +4 -1
- package/dist/hooks/session-end/callbacks.d.ts.map +1 -1
- package/dist/hooks/session-end/callbacks.js +5 -4
- package/dist/hooks/session-end/callbacks.js.map +1 -1
- package/dist/hooks/session-end/index.d.ts.map +1 -1
- package/dist/hooks/session-end/index.js +162 -36
- package/dist/hooks/session-end/index.js.map +1 -1
- package/dist/hooks/skill-state/__tests__/skill-state.test.js +35 -33
- package/dist/hooks/skill-state/__tests__/skill-state.test.js.map +1 -1
- package/dist/hooks/skill-state/index.d.ts +3 -3
- package/dist/hooks/skill-state/index.d.ts.map +1 -1
- package/dist/hooks/skill-state/index.js +7 -11
- package/dist/hooks/skill-state/index.js.map +1 -1
- package/dist/hooks/subagent-tracker/index.d.ts.map +1 -1
- package/dist/hooks/subagent-tracker/index.js +22 -0
- package/dist/hooks/subagent-tracker/index.js.map +1 -1
- package/dist/hooks/think-mode/__tests__/index.test.js +20 -20
- package/dist/hooks/think-mode/__tests__/index.test.js.map +1 -1
- package/dist/hooks/think-mode/switcher.d.ts.map +1 -1
- package/dist/hooks/think-mode/switcher.js +13 -10
- package/dist/hooks/think-mode/switcher.js.map +1 -1
- package/dist/hooks/thinking-block-validator/__tests__/index.test.d.ts +2 -0
- package/dist/hooks/thinking-block-validator/__tests__/index.test.d.ts.map +1 -0
- package/dist/hooks/thinking-block-validator/__tests__/index.test.js +56 -0
- package/dist/hooks/thinking-block-validator/__tests__/index.test.js.map +1 -0
- package/dist/hooks/thinking-block-validator/index.d.ts.map +1 -1
- package/dist/hooks/thinking-block-validator/index.js +7 -6
- package/dist/hooks/thinking-block-validator/index.js.map +1 -1
- package/dist/hooks/todo-continuation/index.d.ts +6 -0
- package/dist/hooks/todo-continuation/index.d.ts.map +1 -1
- package/dist/hooks/todo-continuation/index.js +14 -5
- package/dist/hooks/todo-continuation/index.js.map +1 -1
- package/dist/hud/elements/agents.d.ts.map +1 -1
- package/dist/hud/elements/agents.js +8 -14
- package/dist/hud/elements/agents.js.map +1 -1
- package/dist/hud/elements/index.d.ts +1 -0
- package/dist/hud/elements/index.d.ts.map +1 -1
- package/dist/hud/elements/index.js +1 -0
- package/dist/hud/elements/index.js.map +1 -1
- package/dist/hud/elements/limits.d.ts +3 -3
- package/dist/hud/elements/limits.d.ts.map +1 -1
- package/dist/hud/elements/limits.js +26 -18
- package/dist/hud/elements/limits.js.map +1 -1
- package/dist/hud/elements/mission-board.d.ts +2 -0
- package/dist/hud/elements/mission-board.d.ts.map +1 -0
- package/dist/hud/elements/mission-board.js +2 -0
- package/dist/hud/elements/mission-board.js.map +1 -0
- package/dist/hud/index.d.ts +1 -1
- package/dist/hud/index.d.ts.map +1 -1
- package/dist/hud/index.js +10 -2
- package/dist/hud/index.js.map +1 -1
- package/dist/hud/mission-board.d.ts +75 -0
- package/dist/hud/mission-board.d.ts.map +1 -0
- package/dist/hud/mission-board.js +420 -0
- package/dist/hud/mission-board.js.map +1 -0
- package/dist/hud/render.d.ts.map +1 -1
- package/dist/hud/render.js +16 -8
- package/dist/hud/render.js.map +1 -1
- package/dist/hud/state.d.ts.map +1 -1
- package/dist/hud/state.js +13 -0
- package/dist/hud/state.js.map +1 -1
- package/dist/hud/types.d.ts +11 -0
- package/dist/hud/types.d.ts.map +1 -1
- package/dist/hud/types.js +10 -0
- package/dist/hud/types.js.map +1 -1
- package/dist/hud/usage-api.d.ts +1 -1
- package/dist/hud/usage-api.d.ts.map +1 -1
- package/dist/hud/usage-api.js +207 -106
- package/dist/hud/usage-api.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/installer/__tests__/claude-md-merge.test.js +53 -9
- package/dist/installer/__tests__/claude-md-merge.test.js.map +1 -1
- package/dist/installer/__tests__/hook-templates.test.d.ts +2 -0
- package/dist/installer/__tests__/hook-templates.test.d.ts.map +1 -0
- package/dist/installer/__tests__/hook-templates.test.js +76 -0
- package/dist/installer/__tests__/hook-templates.test.js.map +1 -0
- package/dist/installer/hooks.d.ts +15 -0
- package/dist/installer/hooks.d.ts.map +1 -1
- package/dist/installer/hooks.js +51 -0
- package/dist/installer/hooks.js.map +1 -1
- package/dist/installer/index.d.ts +25 -0
- package/dist/installer/index.d.ts.map +1 -1
- package/dist/installer/index.js +273 -64
- package/dist/installer/index.js.map +1 -1
- package/dist/lib/mode-names.d.ts.map +1 -1
- package/dist/lib/mode-names.js +2 -0
- package/dist/lib/mode-names.js.map +1 -1
- package/dist/mcp/__tests__/team-server-artifact-convergence.test.js +30 -3
- package/dist/mcp/__tests__/team-server-artifact-convergence.test.js.map +1 -1
- package/dist/mcp/__tests__/team-server-deprecation.test.js +2 -0
- package/dist/mcp/__tests__/team-server-deprecation.test.js.map +1 -1
- package/dist/mcp/team-job-convergence.d.ts.map +1 -1
- package/dist/mcp/team-job-convergence.js +12 -3
- package/dist/mcp/team-job-convergence.js.map +1 -1
- package/dist/mcp/team-server.d.ts.map +1 -1
- package/dist/mcp/team-server.js +18 -4
- package/dist/mcp/team-server.js.map +1 -1
- package/dist/notifications/__tests__/config-merge.test.js +36 -1
- package/dist/notifications/__tests__/config-merge.test.js.map +1 -1
- package/dist/notifications/__tests__/formatter.test.js +13 -5
- package/dist/notifications/__tests__/formatter.test.js.map +1 -1
- package/dist/notifications/__tests__/notify-registry-integration.test.js +27 -1
- package/dist/notifications/__tests__/notify-registry-integration.test.js.map +1 -1
- package/dist/notifications/__tests__/verbosity.test.js +33 -1
- package/dist/notifications/__tests__/verbosity.test.js.map +1 -1
- package/dist/notifications/config.d.ts +7 -0
- package/dist/notifications/config.d.ts.map +1 -1
- package/dist/notifications/config.js +18 -0
- package/dist/notifications/config.js.map +1 -1
- package/dist/notifications/formatter.d.ts +2 -2
- package/dist/notifications/formatter.d.ts.map +1 -1
- package/dist/notifications/formatter.js +7 -6
- package/dist/notifications/formatter.js.map +1 -1
- package/dist/notifications/index.d.ts +1 -1
- package/dist/notifications/index.d.ts.map +1 -1
- package/dist/notifications/index.js +5 -3
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/template-engine.js +1 -1
- package/dist/notifications/template-engine.js.map +1 -1
- package/dist/notifications/types.d.ts +4 -0
- package/dist/notifications/types.d.ts.map +1 -1
- package/dist/openclaw/__tests__/dispatcher.test.js +26 -0
- package/dist/openclaw/__tests__/dispatcher.test.js.map +1 -1
- package/dist/openclaw/__tests__/index.test.js +42 -0
- package/dist/openclaw/__tests__/index.test.js.map +1 -1
- package/dist/openclaw/__tests__/signal.test.d.ts +2 -0
- package/dist/openclaw/__tests__/signal.test.d.ts.map +1 -0
- package/dist/openclaw/__tests__/signal.test.js +69 -0
- package/dist/openclaw/__tests__/signal.test.js.map +1 -0
- package/dist/openclaw/dispatcher.d.ts +5 -1
- package/dist/openclaw/dispatcher.d.ts.map +1 -1
- package/dist/openclaw/dispatcher.js +13 -2
- package/dist/openclaw/dispatcher.js.map +1 -1
- package/dist/openclaw/index.d.ts +2 -1
- package/dist/openclaw/index.d.ts.map +1 -1
- package/dist/openclaw/index.js +29 -15
- package/dist/openclaw/index.js.map +1 -1
- package/dist/openclaw/signal.d.ts +3 -0
- package/dist/openclaw/signal.d.ts.map +1 -0
- package/dist/openclaw/signal.js +215 -0
- package/dist/openclaw/signal.js.map +1 -0
- package/dist/openclaw/types.d.ts +35 -0
- package/dist/openclaw/types.d.ts.map +1 -1
- package/dist/shared/types.d.ts +2 -12
- package/dist/shared/types.d.ts.map +1 -1
- package/dist/skills/__tests__/mingw-escape.test.js +41 -11
- package/dist/skills/__tests__/mingw-escape.test.js.map +1 -1
- package/dist/team/__tests__/api-interop.cwd-resolution.test.d.ts +2 -0
- package/dist/team/__tests__/api-interop.cwd-resolution.test.d.ts.map +1 -0
- package/dist/team/__tests__/api-interop.cwd-resolution.test.js +78 -0
- package/dist/team/__tests__/api-interop.cwd-resolution.test.js.map +1 -0
- package/dist/team/__tests__/api-interop.dispatch.test.d.ts +2 -0
- package/dist/team/__tests__/api-interop.dispatch.test.d.ts.map +1 -0
- package/dist/team/__tests__/api-interop.dispatch.test.js +125 -0
- package/dist/team/__tests__/api-interop.dispatch.test.js.map +1 -0
- package/dist/team/__tests__/cli-detection.test.d.ts +2 -0
- package/dist/team/__tests__/cli-detection.test.d.ts.map +1 -0
- package/dist/team/__tests__/cli-detection.test.js +36 -0
- package/dist/team/__tests__/cli-detection.test.js.map +1 -0
- package/dist/team/__tests__/model-contract.test.js +79 -2
- package/dist/team/__tests__/model-contract.test.js.map +1 -1
- package/dist/team/__tests__/runtime-done-recovery.test.js +1 -0
- package/dist/team/__tests__/runtime-done-recovery.test.js.map +1 -1
- package/dist/team/__tests__/runtime-prompt-mode.test.js +84 -8
- package/dist/team/__tests__/runtime-prompt-mode.test.js.map +1 -1
- package/dist/team/__tests__/runtime-v2.dispatch.test.d.ts +2 -0
- package/dist/team/__tests__/runtime-v2.dispatch.test.d.ts.map +1 -0
- package/dist/team/__tests__/runtime-v2.dispatch.test.js +237 -0
- package/dist/team/__tests__/runtime-v2.dispatch.test.js.map +1 -0
- package/dist/team/__tests__/runtime-v2.monitor.test.d.ts +2 -0
- package/dist/team/__tests__/runtime-v2.monitor.test.d.ts.map +1 -0
- package/dist/team/__tests__/runtime-v2.monitor.test.js +103 -0
- package/dist/team/__tests__/runtime-v2.monitor.test.js.map +1 -0
- package/dist/team/__tests__/runtime-v2.shutdown.test.d.ts +2 -0
- package/dist/team/__tests__/runtime-v2.shutdown.test.d.ts.map +1 -0
- package/dist/team/__tests__/runtime-v2.shutdown.test.js +49 -0
- package/dist/team/__tests__/runtime-v2.shutdown.test.js.map +1 -0
- package/dist/team/__tests__/runtime-watchdog-retry.test.js +3 -0
- package/dist/team/__tests__/runtime-watchdog-retry.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.create-team.test.js +29 -12
- package/dist/team/__tests__/tmux-session.create-team.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.kill-team-session.test.js +6 -0
- package/dist/team/__tests__/tmux-session.kill-team-session.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.test.js +9 -0
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/__tests__/worker-bootstrap.test.js +32 -3
- package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
- package/dist/team/api-interop.d.ts.map +1 -1
- package/dist/team/api-interop.js +153 -2
- package/dist/team/api-interop.js.map +1 -1
- package/dist/team/cli-detection.d.ts.map +1 -1
- package/dist/team/cli-detection.js +6 -2
- package/dist/team/cli-detection.js.map +1 -1
- package/dist/team/idle-nudge.js +1 -1
- package/dist/team/idle-nudge.js.map +1 -1
- package/dist/team/mcp-team-bridge.d.ts.map +1 -1
- package/dist/team/mcp-team-bridge.js +2 -1
- package/dist/team/mcp-team-bridge.js.map +1 -1
- package/dist/team/model-contract.d.ts +1 -1
- package/dist/team/model-contract.d.ts.map +1 -1
- package/dist/team/model-contract.js +35 -4
- package/dist/team/model-contract.js.map +1 -1
- package/dist/team/runtime-cli.d.ts.map +1 -1
- package/dist/team/runtime-cli.js +10 -7
- package/dist/team/runtime-cli.js.map +1 -1
- package/dist/team/runtime-v2.d.ts +4 -0
- package/dist/team/runtime-v2.d.ts.map +1 -1
- package/dist/team/runtime-v2.js +231 -59
- package/dist/team/runtime-v2.js.map +1 -1
- package/dist/team/runtime.d.ts +6 -1
- package/dist/team/runtime.d.ts.map +1 -1
- package/dist/team/runtime.js +39 -14
- package/dist/team/runtime.js.map +1 -1
- package/dist/team/tmux-session.d.ts +20 -11
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +108 -51
- package/dist/team/tmux-session.js.map +1 -1
- package/dist/team/types.d.ts +1 -0
- package/dist/team/types.d.ts.map +1 -1
- package/dist/team/types.js.map +1 -1
- package/dist/team/worker-bootstrap.d.ts +2 -0
- package/dist/team/worker-bootstrap.d.ts.map +1 -1
- package/dist/team/worker-bootstrap.js +46 -12
- package/dist/team/worker-bootstrap.js.map +1 -1
- package/dist/tools/__tests__/memory-tools.test.js +29 -1
- package/dist/tools/__tests__/memory-tools.test.js.map +1 -1
- package/dist/tools/lsp/client.d.ts +11 -0
- package/dist/tools/lsp/client.d.ts.map +1 -1
- package/dist/tools/lsp/client.js +46 -0
- package/dist/tools/lsp/client.js.map +1 -1
- package/dist/tools/session-history-tools.d.ts +23 -0
- package/dist/tools/session-history-tools.d.ts.map +1 -0
- package/dist/tools/session-history-tools.js +41 -0
- package/dist/tools/session-history-tools.js.map +1 -0
- package/dist/tools/trace-tools.d.ts +9 -0
- package/dist/tools/trace-tools.d.ts.map +1 -1
- package/dist/tools/trace-tools.js +2 -1
- package/dist/tools/trace-tools.js.map +1 -1
- package/dist/utils/frontmatter.d.ts +5 -0
- package/dist/utils/frontmatter.d.ts.map +1 -1
- package/dist/utils/frontmatter.js +22 -0
- package/dist/utils/frontmatter.js.map +1 -1
- package/dist/utils/skill-pipeline.d.ts +9 -0
- package/dist/utils/skill-pipeline.d.ts.map +1 -0
- package/dist/utils/skill-pipeline.js +97 -0
- package/dist/utils/skill-pipeline.js.map +1 -0
- package/docs/AGENTS.md +1 -1
- package/docs/ANALYTICS-SYSTEM.md +23 -132
- package/docs/CLAUDE.md +40 -139
- package/docs/MIGRATION.md +4 -4
- package/docs/OPENCLAW-ROUTING.md +102 -0
- package/docs/PERFORMANCE-MONITORING.md +30 -55
- package/docs/REFERENCE.md +62 -35
- package/docs/TIERED_AGENTS_V2.md +3 -2
- package/docs/design/SKILL_AUDIT_1445.md +75 -0
- package/docs/ko/MIGRATION.md +2 -2
- package/docs/ko/REFERENCE.md +14 -22
- package/docs/partials/agent-tiers.md +11 -15
- package/docs/partials/features.md +2 -2
- package/docs/partials/mode-selection-guide.md +2 -2
- package/docs/shared/agent-tiers.md +11 -15
- package/docs/shared/features.md +2 -2
- package/docs/shared/mode-selection-guide.md +2 -2
- package/package.json +4 -1
- package/scripts/code-simplifier.mjs +1 -1
- package/scripts/context-guard-stop.mjs +26 -10
- package/scripts/keyword-detector.mjs +99 -39
- package/scripts/persistent-mode.cjs +295 -34
- package/scripts/persistent-mode.mjs +79 -21
- package/scripts/plugin-setup.mjs +10 -1
- package/scripts/post-tool-verifier.mjs +57 -3
- package/scripts/pre-tool-enforcer.mjs +207 -2
- package/scripts/run-provider-advisor.js +30 -3
- package/scripts/session-start.mjs +3 -3
- package/scripts/setup-claude-md.sh +159 -0
- package/scripts/setup-progress.sh +123 -0
- package/scripts/sync-metadata.ts +11 -1
- package/skills/AGENTS.md +13 -17
- package/skills/ai-slop-cleaner/SKILL.md +130 -0
- package/skills/ask/SKILL.md +51 -0
- package/skills/ccg/SKILL.md +6 -6
- package/skills/deep-interview/SKILL.md +4 -0
- package/skills/omc-doctor/SKILL.md +2 -2
- package/skills/omc-setup/SKILL.md +75 -1206
- package/skills/omc-setup/phases/01-install-claude-md.md +76 -0
- package/skills/omc-setup/phases/02-configure.md +211 -0
- package/skills/omc-setup/phases/03-integrations.md +192 -0
- package/skills/omc-setup/phases/04-welcome.md +192 -0
- package/skills/omc-teams/SKILL.md +35 -2
- package/skills/plan/SKILL.md +3 -0
- package/skills/ralph/SKILL.md +16 -10
- package/skills/release/SKILL.md +4 -0
- package/skills/setup/SKILL.md +40 -0
- package/skills/team/SKILL.md +6 -6
- package/templates/hooks/code-simplifier.mjs +1 -1
- package/templates/hooks/keyword-detector.mjs +100 -32
- package/templates/hooks/persistent-mode.mjs +43 -4
- package/templates/hooks/pre-tool-use.mjs +115 -1
- package/templates/hooks/session-start.mjs +1 -1
- package/agents/build-fixer.md +0 -90
- package/agents/deep-executor.md +0 -112
- package/agents/harsh-critic.md +0 -254
- package/agents/quality-reviewer.md +0 -151
- package/skills/analyze/SKILL.md +0 -87
- package/skills/ask-codex/SKILL.md +0 -47
- package/skills/ask-gemini/SKILL.md +0 -47
- package/skills/build-fix/SKILL.md +0 -123
- package/skills/code-review/SKILL.md +0 -573
- package/skills/configure-openclaw/SKILL.md +0 -383
- package/skills/learn-about-omc/SKILL.md +0 -37
- package/skills/note/SKILL.md +0 -62
- package/skills/omc-help/SKILL.md +0 -192
- package/skills/ralph-init/SKILL.md +0 -40
- package/skills/security-review/SKILL.md +0 -282
- package/skills/tdd/SKILL.md +0 -104
- package/skills/trace/SKILL.md +0 -33
package/bridge/team-mcp.cjs
CHANGED
|
@@ -408,11 +408,11 @@ var require_codegen = __commonJS({
|
|
|
408
408
|
const rhs = this.rhs === void 0 ? "" : ` = ${this.rhs}`;
|
|
409
409
|
return `${varKind} ${this.name}${rhs};` + _n;
|
|
410
410
|
}
|
|
411
|
-
optimizeNames(names,
|
|
411
|
+
optimizeNames(names, constants2) {
|
|
412
412
|
if (!names[this.name.str])
|
|
413
413
|
return;
|
|
414
414
|
if (this.rhs)
|
|
415
|
-
this.rhs = optimizeExpr(this.rhs, names,
|
|
415
|
+
this.rhs = optimizeExpr(this.rhs, names, constants2);
|
|
416
416
|
return this;
|
|
417
417
|
}
|
|
418
418
|
get names() {
|
|
@@ -429,10 +429,10 @@ var require_codegen = __commonJS({
|
|
|
429
429
|
render({ _n }) {
|
|
430
430
|
return `${this.lhs} = ${this.rhs};` + _n;
|
|
431
431
|
}
|
|
432
|
-
optimizeNames(names,
|
|
432
|
+
optimizeNames(names, constants2) {
|
|
433
433
|
if (this.lhs instanceof code_1.Name && !names[this.lhs.str] && !this.sideEffects)
|
|
434
434
|
return;
|
|
435
|
-
this.rhs = optimizeExpr(this.rhs, names,
|
|
435
|
+
this.rhs = optimizeExpr(this.rhs, names, constants2);
|
|
436
436
|
return this;
|
|
437
437
|
}
|
|
438
438
|
get names() {
|
|
@@ -493,8 +493,8 @@ var require_codegen = __commonJS({
|
|
|
493
493
|
optimizeNodes() {
|
|
494
494
|
return `${this.code}` ? this : void 0;
|
|
495
495
|
}
|
|
496
|
-
optimizeNames(names,
|
|
497
|
-
this.code = optimizeExpr(this.code, names,
|
|
496
|
+
optimizeNames(names, constants2) {
|
|
497
|
+
this.code = optimizeExpr(this.code, names, constants2);
|
|
498
498
|
return this;
|
|
499
499
|
}
|
|
500
500
|
get names() {
|
|
@@ -523,12 +523,12 @@ var require_codegen = __commonJS({
|
|
|
523
523
|
}
|
|
524
524
|
return nodes.length > 0 ? this : void 0;
|
|
525
525
|
}
|
|
526
|
-
optimizeNames(names,
|
|
526
|
+
optimizeNames(names, constants2) {
|
|
527
527
|
const { nodes } = this;
|
|
528
528
|
let i = nodes.length;
|
|
529
529
|
while (i--) {
|
|
530
530
|
const n = nodes[i];
|
|
531
|
-
if (n.optimizeNames(names,
|
|
531
|
+
if (n.optimizeNames(names, constants2))
|
|
532
532
|
continue;
|
|
533
533
|
subtractNames(names, n.names);
|
|
534
534
|
nodes.splice(i, 1);
|
|
@@ -581,12 +581,12 @@ var require_codegen = __commonJS({
|
|
|
581
581
|
return void 0;
|
|
582
582
|
return this;
|
|
583
583
|
}
|
|
584
|
-
optimizeNames(names,
|
|
584
|
+
optimizeNames(names, constants2) {
|
|
585
585
|
var _a;
|
|
586
|
-
this.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names,
|
|
587
|
-
if (!(super.optimizeNames(names,
|
|
586
|
+
this.else = (_a = this.else) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants2);
|
|
587
|
+
if (!(super.optimizeNames(names, constants2) || this.else))
|
|
588
588
|
return;
|
|
589
|
-
this.condition = optimizeExpr(this.condition, names,
|
|
589
|
+
this.condition = optimizeExpr(this.condition, names, constants2);
|
|
590
590
|
return this;
|
|
591
591
|
}
|
|
592
592
|
get names() {
|
|
@@ -609,10 +609,10 @@ var require_codegen = __commonJS({
|
|
|
609
609
|
render(opts) {
|
|
610
610
|
return `for(${this.iteration})` + super.render(opts);
|
|
611
611
|
}
|
|
612
|
-
optimizeNames(names,
|
|
613
|
-
if (!super.optimizeNames(names,
|
|
612
|
+
optimizeNames(names, constants2) {
|
|
613
|
+
if (!super.optimizeNames(names, constants2))
|
|
614
614
|
return;
|
|
615
|
-
this.iteration = optimizeExpr(this.iteration, names,
|
|
615
|
+
this.iteration = optimizeExpr(this.iteration, names, constants2);
|
|
616
616
|
return this;
|
|
617
617
|
}
|
|
618
618
|
get names() {
|
|
@@ -648,10 +648,10 @@ var require_codegen = __commonJS({
|
|
|
648
648
|
render(opts) {
|
|
649
649
|
return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(opts);
|
|
650
650
|
}
|
|
651
|
-
optimizeNames(names,
|
|
652
|
-
if (!super.optimizeNames(names,
|
|
651
|
+
optimizeNames(names, constants2) {
|
|
652
|
+
if (!super.optimizeNames(names, constants2))
|
|
653
653
|
return;
|
|
654
|
-
this.iterable = optimizeExpr(this.iterable, names,
|
|
654
|
+
this.iterable = optimizeExpr(this.iterable, names, constants2);
|
|
655
655
|
return this;
|
|
656
656
|
}
|
|
657
657
|
get names() {
|
|
@@ -693,11 +693,11 @@ var require_codegen = __commonJS({
|
|
|
693
693
|
(_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNodes();
|
|
694
694
|
return this;
|
|
695
695
|
}
|
|
696
|
-
optimizeNames(names,
|
|
696
|
+
optimizeNames(names, constants2) {
|
|
697
697
|
var _a, _b;
|
|
698
|
-
super.optimizeNames(names,
|
|
699
|
-
(_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNames(names,
|
|
700
|
-
(_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names,
|
|
698
|
+
super.optimizeNames(names, constants2);
|
|
699
|
+
(_a = this.catch) === null || _a === void 0 ? void 0 : _a.optimizeNames(names, constants2);
|
|
700
|
+
(_b = this.finally) === null || _b === void 0 ? void 0 : _b.optimizeNames(names, constants2);
|
|
701
701
|
return this;
|
|
702
702
|
}
|
|
703
703
|
get names() {
|
|
@@ -998,7 +998,7 @@ var require_codegen = __commonJS({
|
|
|
998
998
|
function addExprNames(names, from) {
|
|
999
999
|
return from instanceof code_1._CodeOrName ? addNames(names, from.names) : names;
|
|
1000
1000
|
}
|
|
1001
|
-
function optimizeExpr(expr, names,
|
|
1001
|
+
function optimizeExpr(expr, names, constants2) {
|
|
1002
1002
|
if (expr instanceof code_1.Name)
|
|
1003
1003
|
return replaceName(expr);
|
|
1004
1004
|
if (!canOptimize(expr))
|
|
@@ -1013,14 +1013,14 @@ var require_codegen = __commonJS({
|
|
|
1013
1013
|
return items;
|
|
1014
1014
|
}, []));
|
|
1015
1015
|
function replaceName(n) {
|
|
1016
|
-
const c =
|
|
1016
|
+
const c = constants2[n.str];
|
|
1017
1017
|
if (c === void 0 || names[n.str] !== 1)
|
|
1018
1018
|
return n;
|
|
1019
1019
|
delete names[n.str];
|
|
1020
1020
|
return c;
|
|
1021
1021
|
}
|
|
1022
1022
|
function canOptimize(e) {
|
|
1023
|
-
return e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 &&
|
|
1023
|
+
return e instanceof code_1._Code && e._items.some((c) => c instanceof code_1.Name && names[c.str] === 1 && constants2[c.str] !== void 0);
|
|
1024
1024
|
}
|
|
1025
1025
|
}
|
|
1026
1026
|
function subtractNames(names, from) {
|
|
@@ -2982,7 +2982,7 @@ var require_compile = __commonJS({
|
|
|
2982
2982
|
const schOrFunc = root.refs[ref];
|
|
2983
2983
|
if (schOrFunc)
|
|
2984
2984
|
return schOrFunc;
|
|
2985
|
-
let _sch =
|
|
2985
|
+
let _sch = resolve2.call(this, root, ref);
|
|
2986
2986
|
if (_sch === void 0) {
|
|
2987
2987
|
const schema = (_a = root.localRefs) === null || _a === void 0 ? void 0 : _a[ref];
|
|
2988
2988
|
const { schemaId } = this.opts;
|
|
@@ -3009,7 +3009,7 @@ var require_compile = __commonJS({
|
|
|
3009
3009
|
function sameSchemaEnv(s1, s2) {
|
|
3010
3010
|
return s1.schema === s2.schema && s1.root === s2.root && s1.baseId === s2.baseId;
|
|
3011
3011
|
}
|
|
3012
|
-
function
|
|
3012
|
+
function resolve2(root, ref) {
|
|
3013
3013
|
let sch;
|
|
3014
3014
|
while (typeof (sch = this.refs[ref]) == "string")
|
|
3015
3015
|
ref = sch;
|
|
@@ -3584,55 +3584,55 @@ var require_fast_uri = __commonJS({
|
|
|
3584
3584
|
}
|
|
3585
3585
|
return uri;
|
|
3586
3586
|
}
|
|
3587
|
-
function
|
|
3587
|
+
function resolve2(baseURI, relativeURI, options) {
|
|
3588
3588
|
const schemelessOptions = options ? Object.assign({ scheme: "null" }, options) : { scheme: "null" };
|
|
3589
3589
|
const resolved = resolveComponent(parse3(baseURI, schemelessOptions), parse3(relativeURI, schemelessOptions), schemelessOptions, true);
|
|
3590
3590
|
schemelessOptions.skipEscape = true;
|
|
3591
3591
|
return serialize(resolved, schemelessOptions);
|
|
3592
3592
|
}
|
|
3593
|
-
function resolveComponent(base,
|
|
3593
|
+
function resolveComponent(base, relative2, options, skipNormalization) {
|
|
3594
3594
|
const target = {};
|
|
3595
3595
|
if (!skipNormalization) {
|
|
3596
3596
|
base = parse3(serialize(base, options), options);
|
|
3597
|
-
|
|
3597
|
+
relative2 = parse3(serialize(relative2, options), options);
|
|
3598
3598
|
}
|
|
3599
3599
|
options = options || {};
|
|
3600
|
-
if (!options.tolerant &&
|
|
3601
|
-
target.scheme =
|
|
3602
|
-
target.userinfo =
|
|
3603
|
-
target.host =
|
|
3604
|
-
target.port =
|
|
3605
|
-
target.path = removeDotSegments(
|
|
3606
|
-
target.query =
|
|
3600
|
+
if (!options.tolerant && relative2.scheme) {
|
|
3601
|
+
target.scheme = relative2.scheme;
|
|
3602
|
+
target.userinfo = relative2.userinfo;
|
|
3603
|
+
target.host = relative2.host;
|
|
3604
|
+
target.port = relative2.port;
|
|
3605
|
+
target.path = removeDotSegments(relative2.path || "");
|
|
3606
|
+
target.query = relative2.query;
|
|
3607
3607
|
} else {
|
|
3608
|
-
if (
|
|
3609
|
-
target.userinfo =
|
|
3610
|
-
target.host =
|
|
3611
|
-
target.port =
|
|
3612
|
-
target.path = removeDotSegments(
|
|
3613
|
-
target.query =
|
|
3608
|
+
if (relative2.userinfo !== void 0 || relative2.host !== void 0 || relative2.port !== void 0) {
|
|
3609
|
+
target.userinfo = relative2.userinfo;
|
|
3610
|
+
target.host = relative2.host;
|
|
3611
|
+
target.port = relative2.port;
|
|
3612
|
+
target.path = removeDotSegments(relative2.path || "");
|
|
3613
|
+
target.query = relative2.query;
|
|
3614
3614
|
} else {
|
|
3615
|
-
if (!
|
|
3615
|
+
if (!relative2.path) {
|
|
3616
3616
|
target.path = base.path;
|
|
3617
|
-
if (
|
|
3618
|
-
target.query =
|
|
3617
|
+
if (relative2.query !== void 0) {
|
|
3618
|
+
target.query = relative2.query;
|
|
3619
3619
|
} else {
|
|
3620
3620
|
target.query = base.query;
|
|
3621
3621
|
}
|
|
3622
3622
|
} else {
|
|
3623
|
-
if (
|
|
3624
|
-
target.path = removeDotSegments(
|
|
3623
|
+
if (relative2.path[0] === "/") {
|
|
3624
|
+
target.path = removeDotSegments(relative2.path);
|
|
3625
3625
|
} else {
|
|
3626
3626
|
if ((base.userinfo !== void 0 || base.host !== void 0 || base.port !== void 0) && !base.path) {
|
|
3627
|
-
target.path = "/" +
|
|
3627
|
+
target.path = "/" + relative2.path;
|
|
3628
3628
|
} else if (!base.path) {
|
|
3629
|
-
target.path =
|
|
3629
|
+
target.path = relative2.path;
|
|
3630
3630
|
} else {
|
|
3631
|
-
target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) +
|
|
3631
|
+
target.path = base.path.slice(0, base.path.lastIndexOf("/") + 1) + relative2.path;
|
|
3632
3632
|
}
|
|
3633
3633
|
target.path = removeDotSegments(target.path);
|
|
3634
3634
|
}
|
|
3635
|
-
target.query =
|
|
3635
|
+
target.query = relative2.query;
|
|
3636
3636
|
}
|
|
3637
3637
|
target.userinfo = base.userinfo;
|
|
3638
3638
|
target.host = base.host;
|
|
@@ -3640,7 +3640,7 @@ var require_fast_uri = __commonJS({
|
|
|
3640
3640
|
}
|
|
3641
3641
|
target.scheme = base.scheme;
|
|
3642
3642
|
}
|
|
3643
|
-
target.fragment =
|
|
3643
|
+
target.fragment = relative2.fragment;
|
|
3644
3644
|
return target;
|
|
3645
3645
|
}
|
|
3646
3646
|
function equal(uriA, uriB, options) {
|
|
@@ -3811,7 +3811,7 @@ var require_fast_uri = __commonJS({
|
|
|
3811
3811
|
var fastUri = {
|
|
3812
3812
|
SCHEMES,
|
|
3813
3813
|
normalize,
|
|
3814
|
-
resolve,
|
|
3814
|
+
resolve: resolve2,
|
|
3815
3815
|
resolveComponent,
|
|
3816
3816
|
equal,
|
|
3817
3817
|
serialize,
|
|
@@ -16664,7 +16664,7 @@ var Protocol = class {
|
|
|
16664
16664
|
return;
|
|
16665
16665
|
}
|
|
16666
16666
|
const pollInterval = task2.pollInterval ?? this._options?.defaultTaskPollInterval ?? 1e3;
|
|
16667
|
-
await new Promise((
|
|
16667
|
+
await new Promise((resolve2) => setTimeout(resolve2, pollInterval));
|
|
16668
16668
|
options?.signal?.throwIfAborted();
|
|
16669
16669
|
}
|
|
16670
16670
|
} catch (error2) {
|
|
@@ -16681,7 +16681,7 @@ var Protocol = class {
|
|
|
16681
16681
|
*/
|
|
16682
16682
|
request(request, resultSchema, options) {
|
|
16683
16683
|
const { relatedRequestId, resumptionToken, onresumptiontoken, task, relatedTask } = options ?? {};
|
|
16684
|
-
return new Promise((
|
|
16684
|
+
return new Promise((resolve2, reject) => {
|
|
16685
16685
|
const earlyReject = (error2) => {
|
|
16686
16686
|
reject(error2);
|
|
16687
16687
|
};
|
|
@@ -16759,7 +16759,7 @@ var Protocol = class {
|
|
|
16759
16759
|
if (!parseResult.success) {
|
|
16760
16760
|
reject(parseResult.error);
|
|
16761
16761
|
} else {
|
|
16762
|
-
|
|
16762
|
+
resolve2(parseResult.data);
|
|
16763
16763
|
}
|
|
16764
16764
|
} catch (error2) {
|
|
16765
16765
|
reject(error2);
|
|
@@ -17020,12 +17020,12 @@ var Protocol = class {
|
|
|
17020
17020
|
}
|
|
17021
17021
|
} catch {
|
|
17022
17022
|
}
|
|
17023
|
-
return new Promise((
|
|
17023
|
+
return new Promise((resolve2, reject) => {
|
|
17024
17024
|
if (signal.aborted) {
|
|
17025
17025
|
reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
|
|
17026
17026
|
return;
|
|
17027
17027
|
}
|
|
17028
|
-
const timeoutId = setTimeout(
|
|
17028
|
+
const timeoutId = setTimeout(resolve2, interval);
|
|
17029
17029
|
signal.addEventListener("abort", () => {
|
|
17030
17030
|
clearTimeout(timeoutId);
|
|
17031
17031
|
reject(new McpError(ErrorCode.InvalidRequest, "Request cancelled"));
|
|
@@ -17754,12 +17754,12 @@ var StdioServerTransport = class {
|
|
|
17754
17754
|
this.onclose?.();
|
|
17755
17755
|
}
|
|
17756
17756
|
send(message) {
|
|
17757
|
-
return new Promise((
|
|
17757
|
+
return new Promise((resolve2) => {
|
|
17758
17758
|
const json = serializeMessage(message);
|
|
17759
17759
|
if (this._stdout.write(json)) {
|
|
17760
|
-
|
|
17760
|
+
resolve2();
|
|
17761
17761
|
} else {
|
|
17762
|
-
this._stdout.once("drain",
|
|
17762
|
+
this._stdout.once("drain", resolve2);
|
|
17763
17763
|
}
|
|
17764
17764
|
});
|
|
17765
17765
|
}
|
|
@@ -17767,8 +17767,8 @@ var StdioServerTransport = class {
|
|
|
17767
17767
|
|
|
17768
17768
|
// src/mcp/team-server.ts
|
|
17769
17769
|
var import_child_process3 = require("child_process");
|
|
17770
|
-
var
|
|
17771
|
-
var
|
|
17770
|
+
var import_path4 = require("path");
|
|
17771
|
+
var import_fs3 = require("fs");
|
|
17772
17772
|
var import_promises2 = require("fs/promises");
|
|
17773
17773
|
var import_os = require("os");
|
|
17774
17774
|
|
|
@@ -17800,6 +17800,16 @@ async function tmuxAsync(args) {
|
|
|
17800
17800
|
}
|
|
17801
17801
|
return promisifiedExecFile("tmux", args);
|
|
17802
17802
|
}
|
|
17803
|
+
function sanitizeName(name) {
|
|
17804
|
+
const sanitized = name.replace(/[^a-zA-Z0-9-]/g, "");
|
|
17805
|
+
if (sanitized.length === 0) {
|
|
17806
|
+
throw new Error(`Invalid name: "${name}" contains no valid characters (alphanumeric or hyphen)`);
|
|
17807
|
+
}
|
|
17808
|
+
if (sanitized.length < 2) {
|
|
17809
|
+
throw new Error(`Invalid name: "${name}" too short after sanitization (minimum 2 characters)`);
|
|
17810
|
+
}
|
|
17811
|
+
return sanitized.slice(0, 50);
|
|
17812
|
+
}
|
|
17803
17813
|
function normalizeTmuxCapture(value) {
|
|
17804
17814
|
return value.replace(/\r/g, "").replace(/\s+/g, " ").trim();
|
|
17805
17815
|
}
|
|
@@ -17963,19 +17973,58 @@ async function killWorkerPanes(opts) {
|
|
|
17963
17973
|
}
|
|
17964
17974
|
}
|
|
17965
17975
|
}
|
|
17976
|
+
async function killTeamSession(sessionName, workerPaneIds, leaderPaneId, options = {}) {
|
|
17977
|
+
const { execFile: execFile3 } = await import("child_process");
|
|
17978
|
+
const { promisify: promisify2 } = await import("util");
|
|
17979
|
+
const execFileAsync = promisify2(execFile3);
|
|
17980
|
+
const sessionMode = options.sessionMode ?? (sessionName.includes(":") ? "split-pane" : "detached-session");
|
|
17981
|
+
if (sessionMode === "split-pane") {
|
|
17982
|
+
if (!workerPaneIds?.length) return;
|
|
17983
|
+
for (const id of workerPaneIds) {
|
|
17984
|
+
if (id === leaderPaneId) continue;
|
|
17985
|
+
try {
|
|
17986
|
+
await execFileAsync("tmux", ["kill-pane", "-t", id]);
|
|
17987
|
+
} catch {
|
|
17988
|
+
}
|
|
17989
|
+
}
|
|
17990
|
+
return;
|
|
17991
|
+
}
|
|
17992
|
+
if (sessionMode === "dedicated-window") {
|
|
17993
|
+
try {
|
|
17994
|
+
await execFileAsync("tmux", ["kill-window", "-t", sessionName]);
|
|
17995
|
+
} catch {
|
|
17996
|
+
}
|
|
17997
|
+
return;
|
|
17998
|
+
}
|
|
17999
|
+
const sessionTarget = sessionName.split(":")[0] ?? sessionName;
|
|
18000
|
+
if (process.env.OMC_TEAM_ALLOW_KILL_CURRENT_SESSION !== "1" && process.env.TMUX) {
|
|
18001
|
+
try {
|
|
18002
|
+
const current = await tmuxAsync(["display-message", "-p", "#S"]);
|
|
18003
|
+
const currentSessionName = current.stdout.trim();
|
|
18004
|
+
if (currentSessionName && currentSessionName === sessionTarget) {
|
|
18005
|
+
return;
|
|
18006
|
+
}
|
|
18007
|
+
} catch {
|
|
18008
|
+
}
|
|
18009
|
+
}
|
|
18010
|
+
try {
|
|
18011
|
+
await execFileAsync("tmux", ["kill-session", "-t", sessionTarget]);
|
|
18012
|
+
} catch {
|
|
18013
|
+
}
|
|
18014
|
+
}
|
|
17966
18015
|
|
|
17967
18016
|
// src/team/idle-nudge.ts
|
|
17968
18017
|
var import_child_process2 = require("child_process");
|
|
17969
18018
|
var DEFAULT_NUDGE_CONFIG = {
|
|
17970
18019
|
delayMs: 3e4,
|
|
17971
18020
|
maxCount: 3,
|
|
17972
|
-
message: "Continue working on your assigned task."
|
|
18021
|
+
message: "Continue working on your assigned task and report concrete progress (not ACK-only)."
|
|
17973
18022
|
};
|
|
17974
18023
|
function capturePane(paneId) {
|
|
17975
|
-
return new Promise((
|
|
18024
|
+
return new Promise((resolve2) => {
|
|
17976
18025
|
(0, import_child_process2.execFile)("tmux", ["capture-pane", "-t", paneId, "-p", "-S", "-80"], (err, stdout) => {
|
|
17977
|
-
if (err)
|
|
17978
|
-
else
|
|
18026
|
+
if (err) resolve2("");
|
|
18027
|
+
else resolve2(stdout ?? "");
|
|
17979
18028
|
});
|
|
17980
18029
|
});
|
|
17981
18030
|
}
|
|
@@ -18054,14 +18103,114 @@ var NudgeTracker = class {
|
|
|
18054
18103
|
};
|
|
18055
18104
|
|
|
18056
18105
|
// src/mcp/team-job-convergence.ts
|
|
18106
|
+
var import_fs2 = require("fs");
|
|
18107
|
+
var import_path3 = require("path");
|
|
18108
|
+
|
|
18109
|
+
// src/team/git-worktree.ts
|
|
18110
|
+
var import_node_fs = require("node:fs");
|
|
18111
|
+
var import_node_path = require("node:path");
|
|
18112
|
+
var import_node_child_process = require("node:child_process");
|
|
18113
|
+
|
|
18114
|
+
// src/team/fs-utils.ts
|
|
18057
18115
|
var import_fs = require("fs");
|
|
18058
18116
|
var import_path2 = require("path");
|
|
18117
|
+
function atomicWriteJson(filePath, data, mode = 384) {
|
|
18118
|
+
const dir = (0, import_path2.dirname)(filePath);
|
|
18119
|
+
if (!(0, import_fs.existsSync)(dir)) (0, import_fs.mkdirSync)(dir, { recursive: true, mode: 448 });
|
|
18120
|
+
const tmpPath = `${filePath}.tmp.${process.pid}.${Date.now()}`;
|
|
18121
|
+
(0, import_fs.writeFileSync)(tmpPath, JSON.stringify(data, null, 2) + "\n", { encoding: "utf-8", mode });
|
|
18122
|
+
(0, import_fs.renameSync)(tmpPath, filePath);
|
|
18123
|
+
}
|
|
18124
|
+
function ensureDirWithMode(dirPath, mode = 448) {
|
|
18125
|
+
if (!(0, import_fs.existsSync)(dirPath)) (0, import_fs.mkdirSync)(dirPath, { recursive: true, mode });
|
|
18126
|
+
}
|
|
18127
|
+
function canonicalizePath(p) {
|
|
18128
|
+
const absInput = (0, import_path2.resolve)(p);
|
|
18129
|
+
const tail = [];
|
|
18130
|
+
let probe = absInput;
|
|
18131
|
+
while (true) {
|
|
18132
|
+
try {
|
|
18133
|
+
const realBase = (0, import_fs.realpathSync)(probe);
|
|
18134
|
+
return tail.reduce((acc, seg) => (0, import_path2.resolve)(acc, seg), realBase);
|
|
18135
|
+
} catch {
|
|
18136
|
+
const parent = (0, import_path2.dirname)(probe);
|
|
18137
|
+
if (parent === probe) return absInput;
|
|
18138
|
+
tail.unshift((0, import_path2.basename)(probe));
|
|
18139
|
+
probe = parent;
|
|
18140
|
+
}
|
|
18141
|
+
}
|
|
18142
|
+
}
|
|
18143
|
+
function validateResolvedPath(resolvedPath, expectedBase) {
|
|
18144
|
+
const absResolved = canonicalizePath(resolvedPath);
|
|
18145
|
+
const absBase = canonicalizePath(expectedBase);
|
|
18146
|
+
const rel = (0, import_path2.relative)(absBase, absResolved);
|
|
18147
|
+
if (rel !== "" && (rel.startsWith("..") || (0, import_path2.isAbsolute)(rel) || (0, import_path2.resolve)(absBase, rel) !== absResolved)) {
|
|
18148
|
+
throw new Error(`Path traversal detected: "${resolvedPath}" escapes base "${expectedBase}"`);
|
|
18149
|
+
}
|
|
18150
|
+
}
|
|
18151
|
+
|
|
18152
|
+
// src/team/git-worktree.ts
|
|
18153
|
+
function getWorktreePath(repoRoot, teamName, workerName) {
|
|
18154
|
+
return (0, import_node_path.join)(repoRoot, ".omc", "worktrees", sanitizeName(teamName), sanitizeName(workerName));
|
|
18155
|
+
}
|
|
18156
|
+
function getBranchName(teamName, workerName) {
|
|
18157
|
+
return `omc-team/${sanitizeName(teamName)}/${sanitizeName(workerName)}`;
|
|
18158
|
+
}
|
|
18159
|
+
function getMetadataPath(repoRoot, teamName) {
|
|
18160
|
+
return (0, import_node_path.join)(repoRoot, ".omc", "state", "team-bridge", sanitizeName(teamName), "worktrees.json");
|
|
18161
|
+
}
|
|
18162
|
+
function readMetadata(repoRoot, teamName) {
|
|
18163
|
+
const metaPath = getMetadataPath(repoRoot, teamName);
|
|
18164
|
+
if (!(0, import_node_fs.existsSync)(metaPath)) return [];
|
|
18165
|
+
try {
|
|
18166
|
+
return JSON.parse((0, import_node_fs.readFileSync)(metaPath, "utf-8"));
|
|
18167
|
+
} catch {
|
|
18168
|
+
return [];
|
|
18169
|
+
}
|
|
18170
|
+
}
|
|
18171
|
+
function writeMetadata(repoRoot, teamName, entries) {
|
|
18172
|
+
const metaPath = getMetadataPath(repoRoot, teamName);
|
|
18173
|
+
validateResolvedPath(metaPath, repoRoot);
|
|
18174
|
+
const dir = (0, import_node_path.join)(repoRoot, ".omc", "state", "team-bridge", sanitizeName(teamName));
|
|
18175
|
+
ensureDirWithMode(dir);
|
|
18176
|
+
atomicWriteJson(metaPath, entries);
|
|
18177
|
+
}
|
|
18178
|
+
function removeWorkerWorktree(teamName, workerName, repoRoot) {
|
|
18179
|
+
const wtPath = getWorktreePath(repoRoot, teamName, workerName);
|
|
18180
|
+
const branch = getBranchName(teamName, workerName);
|
|
18181
|
+
try {
|
|
18182
|
+
(0, import_node_child_process.execFileSync)("git", ["worktree", "remove", "--force", wtPath], { cwd: repoRoot, stdio: "pipe" });
|
|
18183
|
+
} catch {
|
|
18184
|
+
}
|
|
18185
|
+
try {
|
|
18186
|
+
(0, import_node_child_process.execFileSync)("git", ["worktree", "prune"], { cwd: repoRoot, stdio: "pipe" });
|
|
18187
|
+
} catch {
|
|
18188
|
+
}
|
|
18189
|
+
try {
|
|
18190
|
+
(0, import_node_child_process.execFileSync)("git", ["branch", "-D", branch], { cwd: repoRoot, stdio: "pipe" });
|
|
18191
|
+
} catch {
|
|
18192
|
+
}
|
|
18193
|
+
const existing = readMetadata(repoRoot, teamName);
|
|
18194
|
+
const updated = existing.filter((e) => e.workerName !== workerName);
|
|
18195
|
+
writeMetadata(repoRoot, teamName, updated);
|
|
18196
|
+
}
|
|
18197
|
+
function cleanupTeamWorktrees(teamName, repoRoot) {
|
|
18198
|
+
const entries = readMetadata(repoRoot, teamName);
|
|
18199
|
+
for (const entry of entries) {
|
|
18200
|
+
try {
|
|
18201
|
+
removeWorkerWorktree(teamName, entry.workerName, repoRoot);
|
|
18202
|
+
} catch {
|
|
18203
|
+
}
|
|
18204
|
+
}
|
|
18205
|
+
}
|
|
18206
|
+
|
|
18207
|
+
// src/mcp/team-job-convergence.ts
|
|
18059
18208
|
function readResultArtifact(omcJobsDir, jobId) {
|
|
18060
|
-
const artifactPath = (0,
|
|
18061
|
-
if (!(0,
|
|
18209
|
+
const artifactPath = (0, import_path3.join)(omcJobsDir, `${jobId}-result.json`);
|
|
18210
|
+
if (!(0, import_fs2.existsSync)(artifactPath)) return { kind: "none" };
|
|
18062
18211
|
let raw;
|
|
18063
18212
|
try {
|
|
18064
|
-
raw = (0,
|
|
18213
|
+
raw = (0, import_fs2.readFileSync)(artifactPath, "utf-8");
|
|
18065
18214
|
} catch {
|
|
18066
18215
|
return { kind: "none" };
|
|
18067
18216
|
}
|
|
@@ -18131,21 +18280,28 @@ function clearScopedTeamState(job) {
|
|
|
18131
18280
|
} catch (error2) {
|
|
18132
18281
|
return `team state cleanup skipped (invalid teamName): ${error2 instanceof Error ? error2.message : String(error2)}`;
|
|
18133
18282
|
}
|
|
18134
|
-
const stateDir = (0,
|
|
18283
|
+
const stateDir = (0, import_path3.join)(job.cwd, ".omc", "state", "team", job.teamName);
|
|
18284
|
+
let worktreeMessage = "worktree cleanup skipped.";
|
|
18135
18285
|
try {
|
|
18136
|
-
|
|
18137
|
-
|
|
18286
|
+
cleanupTeamWorktrees(job.teamName, job.cwd);
|
|
18287
|
+
worktreeMessage = `worktree cleanup attempted for ${job.teamName}.`;
|
|
18288
|
+
} catch (error2) {
|
|
18289
|
+
worktreeMessage = `worktree cleanup skipped: ${error2 instanceof Error ? error2.message : String(error2)}`;
|
|
18290
|
+
}
|
|
18291
|
+
try {
|
|
18292
|
+
if (!(0, import_fs2.existsSync)(stateDir)) {
|
|
18293
|
+
return `${worktreeMessage} team state dir not found at ${stateDir}.`;
|
|
18138
18294
|
}
|
|
18139
|
-
(0,
|
|
18140
|
-
return
|
|
18295
|
+
(0, import_fs2.rmSync)(stateDir, { recursive: true, force: true });
|
|
18296
|
+
return `${worktreeMessage} team state dir removed at ${stateDir}.`;
|
|
18141
18297
|
} catch (error2) {
|
|
18142
|
-
return
|
|
18298
|
+
return `${worktreeMessage} team state cleanup failed at ${stateDir}: ${error2 instanceof Error ? error2.message : String(error2)}`;
|
|
18143
18299
|
}
|
|
18144
18300
|
}
|
|
18145
18301
|
|
|
18146
18302
|
// src/mcp/team-server.ts
|
|
18147
18303
|
var omcTeamJobs = /* @__PURE__ */ new Map();
|
|
18148
|
-
var OMC_JOBS_DIR = process.env.OMC_JOBS_DIR || (0,
|
|
18304
|
+
var OMC_JOBS_DIR = process.env.OMC_JOBS_DIR || (0, import_path4.join)((0, import_os.homedir)(), ".omc", "team-jobs");
|
|
18149
18305
|
var DEPRECATION_CODE = "deprecated_cli_only";
|
|
18150
18306
|
var TEAM_CLI_REPLACEMENT_HINTS = {
|
|
18151
18307
|
omc_run_team_start: "omc team start",
|
|
@@ -18171,6 +18327,7 @@ function buildCliReplacement(toolName, args) {
|
|
|
18171
18327
|
if (toolName === "omc_run_team_start") {
|
|
18172
18328
|
const teamName = typeof parsed.teamName === "string" ? parsed.teamName.trim() : "";
|
|
18173
18329
|
const cwd = typeof parsed.cwd === "string" ? parsed.cwd.trim() : "";
|
|
18330
|
+
const newWindow = parsed.newWindow === true;
|
|
18174
18331
|
const agentTypes = Array.isArray(parsed.agentTypes) ? parsed.agentTypes.filter((item) => typeof item === "string" && item.trim().length > 0) : [];
|
|
18175
18332
|
const tasks = Array.isArray(parsed.tasks) ? parsed.tasks.map(
|
|
18176
18333
|
(task) => typeof task === "object" && task !== null && typeof task.description === "string" ? task.description.trim() : ""
|
|
@@ -18178,6 +18335,7 @@ function buildCliReplacement(toolName, args) {
|
|
|
18178
18335
|
const flags = ["omc", "team", "start"];
|
|
18179
18336
|
if (teamName) flags.push("--name", quoteCliValue(teamName));
|
|
18180
18337
|
if (cwd) flags.push("--cwd", quoteCliValue(cwd));
|
|
18338
|
+
if (newWindow) flags.push("--new-window");
|
|
18181
18339
|
if (agentTypes.length > 0) {
|
|
18182
18340
|
const uniqueAgentTypes = new Set(agentTypes);
|
|
18183
18341
|
if (uniqueAgentTypes.size === 1) {
|
|
@@ -18228,20 +18386,20 @@ function createDeprecatedCliOnlyEnvelopeWithArgs(toolName, args) {
|
|
|
18228
18386
|
}
|
|
18229
18387
|
function persistJob(jobId, job) {
|
|
18230
18388
|
try {
|
|
18231
|
-
if (!(0,
|
|
18232
|
-
(0,
|
|
18389
|
+
if (!(0, import_fs3.existsSync)(OMC_JOBS_DIR)) (0, import_fs3.mkdirSync)(OMC_JOBS_DIR, { recursive: true });
|
|
18390
|
+
(0, import_fs3.writeFileSync)((0, import_path4.join)(OMC_JOBS_DIR, `${jobId}.json`), JSON.stringify(job), "utf-8");
|
|
18233
18391
|
} catch {
|
|
18234
18392
|
}
|
|
18235
18393
|
}
|
|
18236
18394
|
function loadJobFromDisk(jobId) {
|
|
18237
18395
|
try {
|
|
18238
|
-
return JSON.parse((0,
|
|
18396
|
+
return JSON.parse((0, import_fs3.readFileSync)((0, import_path4.join)(OMC_JOBS_DIR, `${jobId}.json`), "utf-8"));
|
|
18239
18397
|
} catch {
|
|
18240
18398
|
return void 0;
|
|
18241
18399
|
}
|
|
18242
18400
|
}
|
|
18243
18401
|
async function loadPaneIds(jobId) {
|
|
18244
|
-
const p = (0,
|
|
18402
|
+
const p = (0, import_path4.join)(OMC_JOBS_DIR, `${jobId}-panes.json`);
|
|
18245
18403
|
try {
|
|
18246
18404
|
return JSON.parse(await (0, import_promises2.readFile)(p, "utf-8"));
|
|
18247
18405
|
} catch {
|
|
@@ -18278,7 +18436,8 @@ var startSchema = external_exports.object({
|
|
|
18278
18436
|
subject: external_exports.string().describe("Brief task title"),
|
|
18279
18437
|
description: external_exports.string().describe("Full task description")
|
|
18280
18438
|
})).describe("Tasks to distribute to workers"),
|
|
18281
|
-
cwd: external_exports.string().describe("Working directory (absolute path)")
|
|
18439
|
+
cwd: external_exports.string().describe("Working directory (absolute path)"),
|
|
18440
|
+
newWindow: external_exports.boolean().optional().describe("Spawn workers in a dedicated tmux window instead of splitting the current window")
|
|
18282
18441
|
});
|
|
18283
18442
|
var statusSchema = external_exports.object({
|
|
18284
18443
|
job_id: external_exports.string().describe("Job ID returned by omc_run_team_start")
|
|
@@ -18288,7 +18447,7 @@ var waitSchema = external_exports.object({
|
|
|
18288
18447
|
timeout_ms: external_exports.number().optional().describe("Maximum wait time in ms (default: 300000, max: 3600000)"),
|
|
18289
18448
|
nudge_delay_ms: external_exports.number().optional().describe("Milliseconds a pane must be idle before nudging (default: 30000)"),
|
|
18290
18449
|
nudge_max_count: external_exports.number().optional().describe("Maximum nudges per pane (default: 3)"),
|
|
18291
|
-
nudge_message: external_exports.string().optional().describe('Message sent as nudge (default: "Continue working on your assigned task.")')
|
|
18450
|
+
nudge_message: external_exports.string().optional().describe('Message sent as nudge (default: "Continue working on your assigned task and report concrete progress (not ACK-only).")')
|
|
18292
18451
|
});
|
|
18293
18452
|
var cleanupSchema = external_exports.object({
|
|
18294
18453
|
job_id: external_exports.string().describe("Job ID returned by omc_run_team_start"),
|
|
@@ -18303,7 +18462,7 @@ async function handleStart(args) {
|
|
|
18303
18462
|
const input = startSchema.parse(args);
|
|
18304
18463
|
validateTeamName(input.teamName);
|
|
18305
18464
|
const jobId = `omc-${Date.now().toString(36)}`;
|
|
18306
|
-
const runtimeCliPath = (0,
|
|
18465
|
+
const runtimeCliPath = (0, import_path4.join)(__dirname, "runtime-cli.cjs");
|
|
18307
18466
|
const job = { status: "running", startedAt: Date.now(), teamName: input.teamName, cwd: input.cwd };
|
|
18308
18467
|
omcTeamJobs.set(jobId, job);
|
|
18309
18468
|
const child = (0, import_child_process3.spawn)("node", [runtimeCliPath], {
|
|
@@ -18454,7 +18613,16 @@ async function handleCleanup(args) {
|
|
|
18454
18613
|
if (!job) return { content: [{ type: "text", text: `Job ${job_id} not found` }] };
|
|
18455
18614
|
const panes = await loadPaneIds(job_id);
|
|
18456
18615
|
let paneCleanupMessage = "No pane IDs recorded for this job \u2014 pane cleanup skipped.";
|
|
18457
|
-
if (panes?.
|
|
18616
|
+
if (panes?.sessionName && (panes.ownsWindow === true || !panes.sessionName.includes(":"))) {
|
|
18617
|
+
const sessionMode = panes.ownsWindow === true ? panes.sessionName.includes(":") ? "dedicated-window" : "detached-session" : "detached-session";
|
|
18618
|
+
await killTeamSession(
|
|
18619
|
+
panes.sessionName,
|
|
18620
|
+
panes.paneIds,
|
|
18621
|
+
panes.leaderPaneId,
|
|
18622
|
+
{ sessionMode }
|
|
18623
|
+
);
|
|
18624
|
+
paneCleanupMessage = panes.ownsWindow ? "Cleaned up team tmux window." : `Cleaned up ${panes.paneIds.length} worker pane(s).`;
|
|
18625
|
+
} else if (panes?.paneIds?.length) {
|
|
18458
18626
|
await killWorkerPanes({
|
|
18459
18627
|
paneIds: panes.paneIds,
|
|
18460
18628
|
leaderPaneId: panes.leaderPaneId,
|
|
@@ -18490,7 +18658,8 @@ var TOOLS = [
|
|
|
18490
18658
|
},
|
|
18491
18659
|
description: "Tasks to distribute to workers"
|
|
18492
18660
|
},
|
|
18493
|
-
cwd: { type: "string", description: "Working directory (absolute path)" }
|
|
18661
|
+
cwd: { type: "string", description: "Working directory (absolute path)" },
|
|
18662
|
+
newWindow: { type: "boolean", description: "Spawn workers in a dedicated tmux window instead of splitting the current window" }
|
|
18494
18663
|
},
|
|
18495
18664
|
required: ["teamName", "agentTypes", "tasks", "cwd"]
|
|
18496
18665
|
}
|
|
@@ -18516,7 +18685,7 @@ var TOOLS = [
|
|
|
18516
18685
|
timeout_ms: { type: "number", description: "Maximum wait time in ms (default: 300000, max: 3600000)" },
|
|
18517
18686
|
nudge_delay_ms: { type: "number", description: "Milliseconds a pane must be idle before nudging (default: 30000)" },
|
|
18518
18687
|
nudge_max_count: { type: "number", description: "Maximum nudges per pane (default: 3)" },
|
|
18519
|
-
nudge_message: { type: "string", description: 'Message sent as nudge (default: "Continue working on your assigned task.")' }
|
|
18688
|
+
nudge_message: { type: "string", description: 'Message sent as nudge (default: "Continue working on your assigned task and report concrete progress (not ACK-only).")' }
|
|
18520
18689
|
},
|
|
18521
18690
|
required: ["job_id"]
|
|
18522
18691
|
}
|