oh-my-codex 0.14.4 → 0.15.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.agents/plugins/marketplace.json +20 -0
- package/Cargo.lock +6 -6
- package/Cargo.toml +2 -1
- package/README.md +40 -7
- package/crates/omx-explore/Cargo.toml +1 -0
- package/crates/omx-explore/src/main.rs +246 -24
- package/crates/omx-mux/Cargo.toml +1 -0
- package/crates/omx-runtime/Cargo.toml +1 -0
- package/crates/omx-runtime-core/Cargo.toml +1 -0
- package/crates/omx-runtime-core/src/dispatch.rs +2 -1
- package/crates/omx-runtime-core/src/engine.rs +2 -2
- package/crates/omx-runtime-core/src/mailbox.rs +2 -1
- package/crates/omx-sparkshell/Cargo.toml +1 -0
- package/crates/omx-sparkshell/src/codex_bridge.rs +1 -0
- package/crates/omx-sparkshell/src/prompt.rs +1 -0
- package/crates/omx-sparkshell/src/threshold.rs +1 -0
- package/dist/agents/__tests__/native-config.test.js +98 -4
- package/dist/agents/__tests__/native-config.test.js.map +1 -1
- package/dist/agents/native-config.d.ts +4 -0
- package/dist/agents/native-config.d.ts.map +1 -1
- package/dist/agents/native-config.js +19 -3
- package/dist/agents/native-config.js.map +1 -1
- package/dist/agents/policy.d.ts +10 -0
- package/dist/agents/policy.d.ts.map +1 -0
- package/dist/agents/policy.js +61 -0
- package/dist/agents/policy.js.map +1 -0
- package/dist/catalog/__tests__/generator.test.js +2 -0
- package/dist/catalog/__tests__/generator.test.js.map +1 -1
- package/dist/catalog/__tests__/plugin-bundle-ssot.test.d.ts +2 -0
- package/dist/catalog/__tests__/plugin-bundle-ssot.test.d.ts.map +1 -0
- package/dist/catalog/__tests__/plugin-bundle-ssot.test.js +72 -0
- package/dist/catalog/__tests__/plugin-bundle-ssot.test.js.map +1 -0
- package/dist/catalog/installable.d.ts +5 -0
- package/dist/catalog/installable.d.ts.map +1 -0
- package/dist/catalog/installable.js +13 -0
- package/dist/catalog/installable.js.map +1 -0
- package/dist/catalog/skill-mirror.d.ts +20 -0
- package/dist/catalog/skill-mirror.d.ts.map +1 -0
- package/dist/catalog/skill-mirror.js +104 -0
- package/dist/catalog/skill-mirror.js.map +1 -0
- package/dist/cli/__tests__/ask.test.js +4 -1
- package/dist/cli/__tests__/ask.test.js.map +1 -1
- package/dist/cli/__tests__/codex-plugin-layout.test.d.ts +2 -0
- package/dist/cli/__tests__/codex-plugin-layout.test.d.ts.map +1 -0
- package/dist/cli/__tests__/codex-plugin-layout.test.js +210 -0
- package/dist/cli/__tests__/codex-plugin-layout.test.js.map +1 -0
- package/dist/cli/__tests__/doctor-team.test.js +46 -1
- package/dist/cli/__tests__/doctor-team.test.js.map +1 -1
- package/dist/cli/__tests__/doctor-warning-copy.test.js +225 -111
- package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
- package/dist/cli/__tests__/exec.test.js +96 -1
- package/dist/cli/__tests__/exec.test.js.map +1 -1
- package/dist/cli/__tests__/explore.test.js +26 -9
- package/dist/cli/__tests__/explore.test.js.map +1 -1
- package/dist/cli/__tests__/index.test.js +301 -7
- package/dist/cli/__tests__/index.test.js.map +1 -1
- package/dist/cli/__tests__/launch-fallback.test.js +358 -4
- package/dist/cli/__tests__/launch-fallback.test.js.map +1 -1
- package/dist/cli/__tests__/list.test.d.ts +2 -0
- package/dist/cli/__tests__/list.test.d.ts.map +1 -0
- package/dist/cli/__tests__/list.test.js +38 -0
- package/dist/cli/__tests__/list.test.js.map +1 -0
- package/dist/cli/__tests__/mcp-parity.test.js +86 -0
- package/dist/cli/__tests__/mcp-parity.test.js.map +1 -1
- package/dist/cli/__tests__/mcp-serve.test.d.ts +2 -0
- package/dist/cli/__tests__/mcp-serve.test.d.ts.map +1 -0
- package/dist/cli/__tests__/mcp-serve.test.js +38 -0
- package/dist/cli/__tests__/mcp-serve.test.js.map +1 -0
- package/dist/cli/__tests__/nested-help-routing.test.js +1 -0
- package/dist/cli/__tests__/nested-help-routing.test.js.map +1 -1
- package/dist/cli/__tests__/package-bin-contract.test.js +58 -3
- package/dist/cli/__tests__/package-bin-contract.test.js.map +1 -1
- package/dist/cli/__tests__/question.test.js +209 -5
- package/dist/cli/__tests__/question.test.js.map +1 -1
- package/dist/cli/__tests__/setup-agents-overwrite.test.js +146 -3
- package/dist/cli/__tests__/setup-agents-overwrite.test.js.map +1 -1
- package/dist/cli/__tests__/setup-install-mode.test.d.ts +2 -0
- package/dist/cli/__tests__/setup-install-mode.test.d.ts.map +1 -0
- package/dist/cli/__tests__/setup-install-mode.test.js +873 -0
- package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -0
- package/dist/cli/__tests__/setup-prompts-overwrite.test.js +83 -22
- package/dist/cli/__tests__/setup-prompts-overwrite.test.js.map +1 -1
- package/dist/cli/__tests__/setup-refresh.test.js +120 -2
- package/dist/cli/__tests__/setup-refresh.test.js.map +1 -1
- package/dist/cli/__tests__/setup-skills-overwrite.test.js +32 -13
- package/dist/cli/__tests__/setup-skills-overwrite.test.js.map +1 -1
- package/dist/cli/__tests__/sidecar.test.d.ts +2 -0
- package/dist/cli/__tests__/sidecar.test.d.ts.map +1 -0
- package/dist/cli/__tests__/sidecar.test.js +24 -0
- package/dist/cli/__tests__/sidecar.test.js.map +1 -0
- package/dist/cli/__tests__/team.test.js +90 -42
- package/dist/cli/__tests__/team.test.js.map +1 -1
- package/dist/cli/__tests__/version-sync-contract.test.js +11 -0
- package/dist/cli/__tests__/version-sync-contract.test.js.map +1 -1
- package/dist/cli/codex-home.d.ts +4 -5
- package/dist/cli/codex-home.d.ts.map +1 -1
- package/dist/cli/codex-home.js +9 -37
- package/dist/cli/codex-home.js.map +1 -1
- package/dist/cli/doctor.d.ts +1 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +509 -278
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.d.ts +13 -5
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +351 -60
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/list.d.ts +2 -0
- package/dist/cli/list.d.ts.map +1 -0
- package/dist/cli/list.js +40 -0
- package/dist/cli/list.js.map +1 -0
- package/dist/cli/mcp-serve.d.ts +12 -0
- package/dist/cli/mcp-serve.d.ts.map +1 -0
- package/dist/cli/mcp-serve.js +63 -0
- package/dist/cli/mcp-serve.js.map +1 -0
- package/dist/cli/plugin-marketplace.d.ts +13 -0
- package/dist/cli/plugin-marketplace.d.ts.map +1 -0
- package/dist/cli/plugin-marketplace.js +77 -0
- package/dist/cli/plugin-marketplace.js.map +1 -0
- package/dist/cli/question.d.ts.map +1 -1
- package/dist/cli/question.js +27 -2
- package/dist/cli/question.js.map +1 -1
- package/dist/cli/setup-preferences.d.ts +20 -0
- package/dist/cli/setup-preferences.d.ts.map +1 -0
- package/dist/cli/setup-preferences.js +71 -0
- package/dist/cli/setup-preferences.js.map +1 -0
- package/dist/cli/setup.d.ts +12 -3
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +1080 -254
- package/dist/cli/setup.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 +22 -3
- package/dist/cli/team.js.map +1 -1
- package/dist/cli/uninstall.d.ts.map +1 -1
- package/dist/cli/uninstall.js +2 -8
- package/dist/cli/uninstall.js.map +1 -1
- package/dist/config/__tests__/generator-idempotent.test.js +100 -3
- package/dist/config/__tests__/generator-idempotent.test.js.map +1 -1
- package/dist/config/__tests__/generator-notify.test.js +6 -5
- package/dist/config/__tests__/generator-notify.test.js.map +1 -1
- package/dist/config/__tests__/generator-status-line-presets.test.d.ts +2 -0
- package/dist/config/__tests__/generator-status-line-presets.test.d.ts.map +1 -0
- package/dist/config/__tests__/generator-status-line-presets.test.js +203 -0
- package/dist/config/__tests__/generator-status-line-presets.test.js.map +1 -0
- package/dist/config/__tests__/models.test.js +35 -2
- package/dist/config/__tests__/models.test.js.map +1 -1
- package/dist/config/codex-hooks.d.ts.map +1 -1
- package/dist/config/codex-hooks.js +2 -7
- package/dist/config/codex-hooks.js.map +1 -1
- package/dist/config/generator.d.ts +10 -0
- package/dist/config/generator.d.ts.map +1 -1
- package/dist/config/generator.js +259 -76
- package/dist/config/generator.js.map +1 -1
- package/dist/config/models.d.ts +13 -3
- package/dist/config/models.d.ts.map +1 -1
- package/dist/config/models.js +25 -5
- package/dist/config/models.js.map +1 -1
- package/dist/config/omx-first-party-mcp.d.ts +18 -0
- package/dist/config/omx-first-party-mcp.d.ts.map +1 -0
- package/dist/config/omx-first-party-mcp.js +76 -0
- package/dist/config/omx-first-party-mcp.js.map +1 -0
- package/dist/document-refresh/__tests__/enforcer.test.d.ts +2 -0
- package/dist/document-refresh/__tests__/enforcer.test.d.ts.map +1 -0
- package/dist/document-refresh/__tests__/enforcer.test.js +128 -0
- package/dist/document-refresh/__tests__/enforcer.test.js.map +1 -0
- package/dist/document-refresh/config.d.ts +9 -0
- package/dist/document-refresh/config.d.ts.map +1 -0
- package/dist/document-refresh/config.js +70 -0
- package/dist/document-refresh/config.js.map +1 -0
- package/dist/document-refresh/enforcer.d.ts +43 -0
- package/dist/document-refresh/enforcer.d.ts.map +1 -0
- package/dist/document-refresh/enforcer.js +329 -0
- package/dist/document-refresh/enforcer.js.map +1 -0
- package/dist/exec/followup.d.ts +44 -0
- package/dist/exec/followup.d.ts.map +1 -0
- package/dist/exec/followup.js +349 -0
- package/dist/exec/followup.js.map +1 -0
- package/dist/hooks/__tests__/codebase-map.test.js +63 -1
- package/dist/hooks/__tests__/codebase-map.test.js.map +1 -1
- package/dist/hooks/__tests__/deep-interview-contract.test.js +10 -7
- package/dist/hooks/__tests__/deep-interview-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/keyword-detector.test.js +89 -0
- package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js +84 -1
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js +23 -2
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js +43 -0
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-cross-worktree-heartbeat.test.js +17 -0
- package/dist/hooks/__tests__/notify-hook-cross-worktree-heartbeat.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-managed-tmux.test.js +53 -0
- package/dist/hooks/__tests__/notify-hook-managed-tmux.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-regression-205.test.js +4 -4
- package/dist/hooks/__tests__/notify-hook-regression-205.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js +103 -0
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js +27 -13
- package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.js +35 -0
- package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js +70 -3
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js.map +1 -1
- package/dist/hooks/__tests__/pre-context-gate-skills.test.js +5 -0
- package/dist/hooks/__tests__/pre-context-gate-skills.test.js.map +1 -1
- package/dist/hooks/__tests__/prompt-guidance-fragments.test.js +3 -2
- package/dist/hooks/__tests__/prompt-guidance-fragments.test.js.map +1 -1
- package/dist/hooks/__tests__/prompt-refactor-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/prompt-refactor-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/prompt-refactor-contract.test.js +22 -0
- package/dist/hooks/__tests__/prompt-refactor-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.js +28 -0
- package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/triage-heuristic.test.js +59 -4
- package/dist/hooks/__tests__/triage-heuristic.test.js.map +1 -1
- package/dist/hooks/__tests__/visual-ralph-skill.test.d.ts +2 -0
- package/dist/hooks/__tests__/visual-ralph-skill.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/visual-ralph-skill.test.js +44 -0
- package/dist/hooks/__tests__/visual-ralph-skill.test.js.map +1 -0
- package/dist/hooks/codebase-map.d.ts.map +1 -1
- package/dist/hooks/codebase-map.js +83 -6
- package/dist/hooks/codebase-map.js.map +1 -1
- package/dist/hooks/keyword-detector.d.ts.map +1 -1
- package/dist/hooks/keyword-detector.js +19 -14
- package/dist/hooks/keyword-detector.js.map +1 -1
- package/dist/hooks/prompt-guidance-contract.d.ts +6 -0
- package/dist/hooks/prompt-guidance-contract.d.ts.map +1 -1
- package/dist/hooks/prompt-guidance-contract.js +89 -0
- package/dist/hooks/prompt-guidance-contract.js.map +1 -1
- package/dist/hooks/session.d.ts +2 -0
- package/dist/hooks/session.d.ts.map +1 -1
- package/dist/hooks/session.js +6 -0
- package/dist/hooks/session.js.map +1 -1
- package/dist/hooks/triage-heuristic.d.ts +2 -2
- package/dist/hooks/triage-heuristic.d.ts.map +1 -1
- package/dist/hooks/triage-heuristic.js +97 -20
- package/dist/hooks/triage-heuristic.js.map +1 -1
- package/dist/hooks/triage-state.d.ts +1 -1
- package/dist/hooks/triage-state.d.ts.map +1 -1
- package/dist/hooks/triage-state.js +2 -1
- package/dist/hooks/triage-state.js.map +1 -1
- package/dist/hud/__tests__/index.test.js +4 -4
- package/dist/hud/__tests__/index.test.js.map +1 -1
- package/dist/hud/__tests__/state.test.js +4 -0
- package/dist/hud/__tests__/state.test.js.map +1 -1
- package/dist/hud/__tests__/types.test.js +27 -0
- package/dist/hud/__tests__/types.test.js.map +1 -1
- package/dist/hud/state.d.ts.map +1 -1
- package/dist/hud/state.js +8 -0
- package/dist/hud/state.js.map +1 -1
- package/dist/hud/types.d.ts +9 -0
- package/dist/hud/types.d.ts.map +1 -1
- package/dist/hud/types.js +3 -0
- package/dist/hud/types.js.map +1 -1
- package/dist/mcp/__tests__/bootstrap.test.js +45 -5
- package/dist/mcp/__tests__/bootstrap.test.js.map +1 -1
- package/dist/mcp/__tests__/server-lifecycle.test.js +50 -7
- package/dist/mcp/__tests__/server-lifecycle.test.js.map +1 -1
- package/dist/mcp/__tests__/state-server.test.js +67 -9
- package/dist/mcp/__tests__/state-server.test.js.map +1 -1
- package/dist/mcp/bootstrap.d.ts +12 -1
- package/dist/mcp/bootstrap.d.ts.map +1 -1
- package/dist/mcp/bootstrap.js +87 -29
- package/dist/mcp/bootstrap.js.map +1 -1
- package/dist/mcp/state-server.d.ts +5 -11
- package/dist/mcp/state-server.d.ts.map +1 -1
- package/dist/mcp/state-server.js +16 -432
- package/dist/mcp/state-server.js.map +1 -1
- package/dist/planning/__tests__/artifacts.test.js +152 -1
- package/dist/planning/__tests__/artifacts.test.js.map +1 -1
- package/dist/planning/artifacts.d.ts +9 -0
- package/dist/planning/artifacts.d.ts.map +1 -1
- package/dist/planning/artifacts.js +60 -1
- package/dist/planning/artifacts.js.map +1 -1
- package/dist/question/__tests__/deep-interview.test.js +1 -1
- package/dist/question/__tests__/deep-interview.test.js.map +1 -1
- package/dist/question/__tests__/renderer.test.js +70 -0
- package/dist/question/__tests__/renderer.test.js.map +1 -1
- package/dist/question/__tests__/ui.test.js +49 -0
- package/dist/question/__tests__/ui.test.js.map +1 -1
- package/dist/question/renderer.d.ts +14 -1
- package/dist/question/renderer.d.ts.map +1 -1
- package/dist/question/renderer.js +109 -10
- package/dist/question/renderer.js.map +1 -1
- package/dist/question/state.d.ts +2 -0
- package/dist/question/state.d.ts.map +1 -1
- package/dist/question/state.js +4 -0
- package/dist/question/state.js.map +1 -1
- package/dist/question/types.d.ts +2 -1
- package/dist/question/types.d.ts.map +1 -1
- package/dist/question/types.js.map +1 -1
- package/dist/question/ui.d.ts.map +1 -1
- package/dist/question/ui.js +28 -8
- package/dist/question/ui.js.map +1 -1
- package/dist/runtime/__tests__/bridge.test.js +143 -1
- package/dist/runtime/__tests__/bridge.test.js.map +1 -1
- package/dist/runtime/bridge.d.ts +21 -0
- package/dist/runtime/bridge.d.ts.map +1 -1
- package/dist/runtime/bridge.js +54 -4
- package/dist/runtime/bridge.js.map +1 -1
- package/dist/scripts/__tests__/codex-native-hook.test.js +1904 -230
- package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
- package/dist/scripts/__tests__/generate-release-body.test.js +90 -1
- package/dist/scripts/__tests__/generate-release-body.test.js.map +1 -1
- package/dist/scripts/__tests__/hook-derived-watcher.test.js +110 -2
- package/dist/scripts/__tests__/hook-derived-watcher.test.js.map +1 -1
- package/dist/scripts/__tests__/postinstall.test.js +7 -93
- package/dist/scripts/__tests__/postinstall.test.js.map +1 -1
- package/dist/scripts/__tests__/prompt-inventory.test.d.ts +2 -0
- package/dist/scripts/__tests__/prompt-inventory.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/prompt-inventory.test.js +56 -0
- package/dist/scripts/__tests__/prompt-inventory.test.js.map +1 -0
- package/dist/scripts/__tests__/run-test-files.test.d.ts +2 -0
- package/dist/scripts/__tests__/run-test-files.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/run-test-files.test.js +62 -0
- package/dist/scripts/__tests__/run-test-files.test.js.map +1 -0
- package/dist/scripts/__tests__/smoke-packed-install.test.js +13 -1
- package/dist/scripts/__tests__/smoke-packed-install.test.js.map +1 -1
- package/dist/scripts/__tests__/verify-native-agents.test.d.ts +2 -0
- package/dist/scripts/__tests__/verify-native-agents.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/verify-native-agents.test.js +166 -0
- package/dist/scripts/__tests__/verify-native-agents.test.js.map +1 -0
- package/dist/scripts/codex-execution-surface.d.ts +16 -0
- package/dist/scripts/codex-execution-surface.d.ts.map +1 -0
- package/dist/scripts/codex-execution-surface.js +42 -0
- package/dist/scripts/codex-execution-surface.js.map +1 -0
- package/dist/scripts/codex-native-hook.d.ts.map +1 -1
- package/dist/scripts/codex-native-hook.js +418 -76
- package/dist/scripts/codex-native-hook.js.map +1 -1
- package/dist/scripts/codex-native-pre-post.d.ts +8 -0
- package/dist/scripts/codex-native-pre-post.d.ts.map +1 -1
- package/dist/scripts/codex-native-pre-post.js +133 -19
- package/dist/scripts/codex-native-pre-post.js.map +1 -1
- package/dist/scripts/generate-release-body.d.ts +1 -0
- package/dist/scripts/generate-release-body.d.ts.map +1 -1
- package/dist/scripts/generate-release-body.js +32 -3
- package/dist/scripts/generate-release-body.js.map +1 -1
- package/dist/scripts/hook-derived-watcher.js +46 -7
- package/dist/scripts/hook-derived-watcher.js.map +1 -1
- package/dist/scripts/notify-fallback-watcher.js +59 -9
- package/dist/scripts/notify-fallback-watcher.js.map +1 -1
- package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.d.ts +2 -0
- package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.d.ts.map +1 -0
- package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.js +153 -0
- package/dist/scripts/notify-hook/__tests__/team-worker-posttooluse.test.js.map +1 -0
- package/dist/scripts/notify-hook/managed-tmux.d.ts.map +1 -1
- package/dist/scripts/notify-hook/managed-tmux.js +18 -1
- package/dist/scripts/notify-hook/managed-tmux.js.map +1 -1
- package/dist/scripts/notify-hook/process-runner.d.ts.map +1 -1
- package/dist/scripts/notify-hook/process-runner.js +7 -3
- package/dist/scripts/notify-hook/process-runner.js.map +1 -1
- package/dist/scripts/notify-hook/team-dispatch.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-dispatch.js +96 -11
- package/dist/scripts/notify-hook/team-dispatch.js.map +1 -1
- package/dist/scripts/notify-hook/team-tmux-guard.js +3 -3
- package/dist/scripts/notify-hook/team-worker-posttooluse.d.ts +34 -0
- package/dist/scripts/notify-hook/team-worker-posttooluse.d.ts.map +1 -0
- package/dist/scripts/notify-hook/team-worker-posttooluse.js +434 -0
- package/dist/scripts/notify-hook/team-worker-posttooluse.js.map +1 -0
- package/dist/scripts/notify-hook/team-worker.d.ts +1 -1
- package/dist/scripts/notify-hook/team-worker.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-worker.js +3 -43
- package/dist/scripts/notify-hook/team-worker.js.map +1 -1
- package/dist/scripts/notify-hook.js +36 -5
- package/dist/scripts/notify-hook.js.map +1 -1
- package/dist/scripts/postinstall.d.ts +1 -5
- package/dist/scripts/postinstall.d.ts.map +1 -1
- package/dist/scripts/postinstall.js +3 -42
- package/dist/scripts/postinstall.js.map +1 -1
- package/dist/scripts/prompt-inventory.d.ts +29 -0
- package/dist/scripts/prompt-inventory.d.ts.map +1 -0
- package/dist/scripts/prompt-inventory.js +178 -0
- package/dist/scripts/prompt-inventory.js.map +1 -0
- package/dist/scripts/run-test-files.js +32 -2
- package/dist/scripts/run-test-files.js.map +1 -1
- package/dist/scripts/smoke-packed-install.d.ts +3 -0
- package/dist/scripts/smoke-packed-install.d.ts.map +1 -1
- package/dist/scripts/smoke-packed-install.js +9 -1
- package/dist/scripts/smoke-packed-install.js.map +1 -1
- package/dist/scripts/sync-plugin-mirror.d.ts +13 -0
- package/dist/scripts/sync-plugin-mirror.d.ts.map +1 -0
- package/dist/scripts/sync-plugin-mirror.js +242 -0
- package/dist/scripts/sync-plugin-mirror.js.map +1 -0
- package/dist/scripts/verify-native-agents.d.ts +16 -0
- package/dist/scripts/verify-native-agents.d.ts.map +1 -0
- package/dist/scripts/verify-native-agents.js +188 -0
- package/dist/scripts/verify-native-agents.js.map +1 -0
- package/dist/session-history/search.d.ts.map +1 -1
- package/dist/session-history/search.js +7 -2
- package/dist/session-history/search.js.map +1 -1
- package/dist/sidecar/__tests__/boundary.test.d.ts +2 -0
- package/dist/sidecar/__tests__/boundary.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/boundary.test.js +48 -0
- package/dist/sidecar/__tests__/boundary.test.js.map +1 -0
- package/dist/sidecar/__tests__/collector.test.d.ts +2 -0
- package/dist/sidecar/__tests__/collector.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/collector.test.js +162 -0
- package/dist/sidecar/__tests__/collector.test.js.map +1 -0
- package/dist/sidecar/__tests__/render.test.d.ts +2 -0
- package/dist/sidecar/__tests__/render.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/render.test.js +67 -0
- package/dist/sidecar/__tests__/render.test.js.map +1 -0
- package/dist/sidecar/__tests__/tmux.test.d.ts +2 -0
- package/dist/sidecar/__tests__/tmux.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/tmux.test.js +30 -0
- package/dist/sidecar/__tests__/tmux.test.js.map +1 -0
- package/dist/sidecar/__tests__/watch.test.d.ts +2 -0
- package/dist/sidecar/__tests__/watch.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/watch.test.js +42 -0
- package/dist/sidecar/__tests__/watch.test.js.map +1 -0
- package/dist/sidecar/collector.d.ts +4 -0
- package/dist/sidecar/collector.d.ts.map +1 -0
- package/dist/sidecar/collector.js +377 -0
- package/dist/sidecar/collector.js.map +1 -0
- package/dist/sidecar/index.d.ts +25 -0
- package/dist/sidecar/index.d.ts.map +1 -0
- package/dist/sidecar/index.js +165 -0
- package/dist/sidecar/index.js.map +1 -0
- package/dist/sidecar/render.d.ts +3 -0
- package/dist/sidecar/render.d.ts.map +1 -0
- package/dist/sidecar/render.js +72 -0
- package/dist/sidecar/render.js.map +1 -0
- package/dist/sidecar/tmux.d.ts +13 -0
- package/dist/sidecar/tmux.d.ts.map +1 -0
- package/dist/sidecar/tmux.js +44 -0
- package/dist/sidecar/tmux.js.map +1 -0
- package/dist/sidecar/types.d.ts +125 -0
- package/dist/sidecar/types.d.ts.map +1 -0
- package/dist/sidecar/types.js +2 -0
- package/dist/sidecar/types.js.map +1 -0
- package/dist/state/__tests__/operations.test.js +50 -22
- package/dist/state/__tests__/operations.test.js.map +1 -1
- package/dist/state/operations.d.ts +1 -1
- package/dist/state/operations.d.ts.map +1 -1
- package/dist/state/operations.js +19 -7
- package/dist/state/operations.js.map +1 -1
- package/dist/team/__tests__/commit-hygiene.test.d.ts +2 -0
- package/dist/team/__tests__/commit-hygiene.test.d.ts.map +1 -0
- package/dist/team/__tests__/commit-hygiene.test.js +93 -0
- package/dist/team/__tests__/commit-hygiene.test.js.map +1 -0
- package/dist/team/__tests__/delegation-policy.test.d.ts +2 -0
- package/dist/team/__tests__/delegation-policy.test.d.ts.map +1 -0
- package/dist/team/__tests__/delegation-policy.test.js +69 -0
- package/dist/team/__tests__/delegation-policy.test.js.map +1 -0
- package/dist/team/__tests__/events.test.js +54 -4
- package/dist/team/__tests__/events.test.js.map +1 -1
- package/dist/team/__tests__/hook-primary-e2e-contract.test.d.ts +2 -0
- package/dist/team/__tests__/hook-primary-e2e-contract.test.d.ts.map +1 -0
- package/dist/team/__tests__/hook-primary-e2e-contract.test.js +78 -0
- package/dist/team/__tests__/hook-primary-e2e-contract.test.js.map +1 -0
- package/dist/team/__tests__/model-contract.test.js +18 -2
- package/dist/team/__tests__/model-contract.test.js.map +1 -1
- package/dist/team/__tests__/repo-aware-decomposition.test.d.ts +2 -0
- package/dist/team/__tests__/repo-aware-decomposition.test.d.ts.map +1 -0
- package/dist/team/__tests__/repo-aware-decomposition.test.js +95 -0
- package/dist/team/__tests__/repo-aware-decomposition.test.js.map +1 -0
- package/dist/team/__tests__/runtime.test.js +677 -17
- package/dist/team/__tests__/runtime.test.js.map +1 -1
- package/dist/team/__tests__/state-root.test.js +177 -1
- package/dist/team/__tests__/state-root.test.js.map +1 -1
- package/dist/team/__tests__/state.test.js +110 -0
- package/dist/team/__tests__/state.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.test.js +301 -2
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/__tests__/worker-bootstrap.test.js +94 -0
- package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
- package/dist/team/commit-hygiene.d.ts +22 -3
- package/dist/team/commit-hygiene.d.ts.map +1 -1
- package/dist/team/commit-hygiene.js +134 -2
- package/dist/team/commit-hygiene.js.map +1 -1
- package/dist/team/contracts.d.ts +1 -1
- package/dist/team/contracts.d.ts.map +1 -1
- package/dist/team/contracts.js +2 -0
- package/dist/team/contracts.js.map +1 -1
- package/dist/team/dag-schema.d.ts +38 -0
- package/dist/team/dag-schema.d.ts.map +1 -0
- package/dist/team/dag-schema.js +221 -0
- package/dist/team/dag-schema.js.map +1 -0
- package/dist/team/delegation-policy.d.ts +3 -0
- package/dist/team/delegation-policy.d.ts.map +1 -0
- package/dist/team/delegation-policy.js +82 -0
- package/dist/team/delegation-policy.js.map +1 -0
- package/dist/team/model-contract.d.ts +3 -1
- package/dist/team/model-contract.d.ts.map +1 -1
- package/dist/team/model-contract.js +44 -5
- package/dist/team/model-contract.js.map +1 -1
- package/dist/team/repo-aware-decomposition.d.ts +60 -0
- package/dist/team/repo-aware-decomposition.d.ts.map +1 -0
- package/dist/team/repo-aware-decomposition.js +229 -0
- package/dist/team/repo-aware-decomposition.js.map +1 -0
- package/dist/team/runtime.d.ts +34 -0
- package/dist/team/runtime.d.ts.map +1 -1
- package/dist/team/runtime.js +191 -50
- package/dist/team/runtime.js.map +1 -1
- package/dist/team/state/tasks.d.ts.map +1 -1
- package/dist/team/state/tasks.js +33 -0
- package/dist/team/state/tasks.js.map +1 -1
- package/dist/team/state/types.d.ts +23 -1
- package/dist/team/state/types.d.ts.map +1 -1
- package/dist/team/state/types.js.map +1 -1
- package/dist/team/state-root.d.ts +35 -0
- package/dist/team/state-root.d.ts.map +1 -1
- package/dist/team/state-root.js +281 -1
- package/dist/team/state-root.js.map +1 -1
- package/dist/team/state.d.ts +27 -1
- package/dist/team/state.d.ts.map +1 -1
- package/dist/team/state.js +6 -0
- package/dist/team/state.js.map +1 -1
- package/dist/team/tmux-session.d.ts +1 -0
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +83 -6
- package/dist/team/tmux-session.js.map +1 -1
- package/dist/team/worker-bootstrap.d.ts +3 -0
- package/dist/team/worker-bootstrap.d.ts.map +1 -1
- package/dist/team/worker-bootstrap.js +77 -4
- package/dist/team/worker-bootstrap.js.map +1 -1
- package/dist/utils/__tests__/agents-model-table.test.js +8 -0
- package/dist/utils/__tests__/agents-model-table.test.js.map +1 -1
- package/dist/utils/__tests__/paths.test.js +42 -9
- package/dist/utils/__tests__/paths.test.js.map +1 -1
- package/dist/utils/agents-md.d.ts +3 -0
- package/dist/utils/agents-md.d.ts.map +1 -1
- package/dist/utils/agents-md.js +25 -0
- package/dist/utils/agents-md.js.map +1 -1
- package/dist/utils/agents-model-table.d.ts.map +1 -1
- package/dist/utils/agents-model-table.js +2 -3
- package/dist/utils/agents-model-table.js.map +1 -1
- package/package.json +14 -7
- package/plugins/oh-my-codex/.app.json +3 -0
- package/plugins/oh-my-codex/.codex-plugin/plugin.json +30 -0
- package/plugins/oh-my-codex/.mcp.json +44 -0
- package/plugins/oh-my-codex/skills/ai-slop-cleaner/SKILL.md +114 -0
- package/plugins/oh-my-codex/skills/analyze/SKILL.md +148 -0
- package/plugins/oh-my-codex/skills/ask-claude/SKILL.md +61 -0
- package/plugins/oh-my-codex/skills/ask-gemini/SKILL.md +61 -0
- package/plugins/oh-my-codex/skills/autopilot/SKILL.md +231 -0
- package/plugins/oh-my-codex/skills/autoresearch/SKILL.md +68 -0
- package/plugins/oh-my-codex/skills/cancel/SKILL.md +399 -0
- package/plugins/oh-my-codex/skills/code-review/SKILL.md +290 -0
- package/plugins/oh-my-codex/skills/configure-notifications/SKILL.md +287 -0
- package/plugins/oh-my-codex/skills/deep-interview/SKILL.md +464 -0
- package/plugins/oh-my-codex/skills/doctor/SKILL.md +239 -0
- package/plugins/oh-my-codex/skills/help/SKILL.md +202 -0
- package/plugins/oh-my-codex/skills/hud/SKILL.md +98 -0
- package/plugins/oh-my-codex/skills/note/SKILL.md +62 -0
- package/plugins/oh-my-codex/skills/omx-setup/SKILL.md +135 -0
- package/plugins/oh-my-codex/skills/pipeline/SKILL.md +86 -0
- package/plugins/oh-my-codex/skills/plan/SKILL.md +276 -0
- package/plugins/oh-my-codex/skills/ralph/SKILL.md +269 -0
- package/plugins/oh-my-codex/skills/ralplan/SKILL.md +162 -0
- package/plugins/oh-my-codex/skills/security-review/SKILL.md +300 -0
- package/plugins/oh-my-codex/skills/skill/SKILL.md +835 -0
- package/plugins/oh-my-codex/skills/team/SKILL.md +510 -0
- package/plugins/oh-my-codex/skills/trace/SKILL.md +33 -0
- package/plugins/oh-my-codex/skills/ultraqa/SKILL.md +143 -0
- package/plugins/oh-my-codex/skills/ultrawork/SKILL.md +175 -0
- package/plugins/oh-my-codex/skills/visual-ralph/SKILL.md +153 -0
- package/plugins/oh-my-codex/skills/visual-verdict/SKILL.md +76 -0
- package/plugins/oh-my-codex/skills/wiki/SKILL.md +57 -0
- package/plugins/oh-my-codex/skills/worker/SKILL.md +106 -0
- package/prompts/critic.md +35 -83
- package/prompts/executor.md +32 -109
- package/prompts/explore-harness.md +1 -1
- package/prompts/explore.md +37 -90
- package/prompts/planner.md +28 -58
- package/prompts/researcher.md +46 -78
- package/prompts/verifier.md +23 -31
- package/skills/autopilot/SKILL.md +1 -4
- package/skills/deep-interview/SKILL.md +8 -5
- package/skills/doctor/SKILL.md +45 -17
- package/skills/help/SKILL.md +2 -2
- package/skills/omx-setup/SKILL.md +52 -9
- package/skills/plan/SKILL.md +1 -4
- package/skills/ralph/SKILL.md +3 -5
- package/skills/ralplan/SKILL.md +2 -6
- package/skills/team/SKILL.md +2 -5
- package/skills/ultraqa/SKILL.md +1 -4
- package/skills/ultrawork/SKILL.md +2 -3
- package/skills/visual-ralph/SKILL.md +153 -0
- package/skills/web-clone/SKILL.md +12 -354
- package/src/scripts/__tests__/codex-native-hook.test.ts +2306 -224
- package/src/scripts/__tests__/generate-release-body.test.ts +109 -0
- package/src/scripts/__tests__/hook-derived-watcher.test.ts +132 -2
- package/src/scripts/__tests__/postinstall.test.ts +7 -104
- package/src/scripts/__tests__/prompt-inventory.test.ts +64 -0
- package/src/scripts/__tests__/run-test-files.test.ts +72 -0
- package/src/scripts/__tests__/smoke-packed-install.test.ts +15 -0
- package/src/scripts/__tests__/verify-native-agents.test.ts +204 -0
- package/src/scripts/codex-execution-surface.ts +73 -0
- package/src/scripts/codex-native-hook.ts +579 -82
- package/src/scripts/codex-native-pre-post.ts +157 -19
- package/src/scripts/generate-release-body.ts +34 -2
- package/src/scripts/hook-derived-watcher.ts +51 -8
- package/src/scripts/notify-fallback-watcher.ts +65 -9
- package/src/scripts/notify-hook/__tests__/team-worker-posttooluse.test.ts +180 -0
- package/src/scripts/notify-hook/managed-tmux.ts +22 -4
- package/src/scripts/notify-hook/process-runner.ts +7 -3
- package/src/scripts/notify-hook/team-dispatch.ts +103 -11
- package/src/scripts/notify-hook/team-tmux-guard.ts +3 -3
- package/src/scripts/notify-hook/team-worker-posttooluse.ts +536 -0
- package/src/scripts/notify-hook/team-worker.ts +4 -48
- package/src/scripts/notify-hook.ts +36 -5
- package/src/scripts/postinstall.ts +4 -58
- package/src/scripts/prompt-inventory.ts +218 -0
- package/src/scripts/run-test-files.ts +41 -2
- package/src/scripts/smoke-packed-install.ts +10 -1
- package/src/scripts/sync-plugin-mirror.ts +360 -0
- package/src/scripts/verify-native-agents.ts +245 -0
- package/templates/AGENTS.md +26 -91
- package/templates/catalog-manifest.json +16 -1
package/dist/team/runtime.js
CHANGED
|
@@ -3,11 +3,13 @@ import { existsSync, appendFileSync, mkdirSync } from 'fs';
|
|
|
3
3
|
import { mkdir, readdir, readFile, writeFile } from 'fs/promises';
|
|
4
4
|
import { performance } from 'perf_hooks';
|
|
5
5
|
import { spawn, spawnSync } from 'child_process';
|
|
6
|
-
import { sanitizeTeamName, isTmuxAvailable, hasCurrentTmuxClientContext, createTeamSession, buildWorkerProcessLaunchSpec, resolveTeamWorkerCli, resolveTeamWorkerCliPlan, resolveTeamWorkerLaunchMode, waitForWorkerReady,
|
|
7
|
-
import { teamInit as initTeamState, DEFAULT_MAX_WORKERS, teamReadConfig as readTeamConfig, teamWriteWorkerIdentity as writeWorkerIdentity, teamReadWorkerHeartbeat as readWorkerHeartbeat, teamReadWorkerStatus as readWorkerStatus, teamWriteWorkerInbox as writeWorkerInbox, teamCreateTask as createStateTask, teamReadTask as readTask, teamListTasks as listTasks, teamReadManifest as readTeamManifestV2, teamNormalizeGovernance as normalizeTeamGovernance, teamNormalizePolicy as normalizeTeamPolicy, teamClaimTask as claimTask, teamReleaseTaskClaim as releaseTaskClaim, teamReclaimExpiredTaskClaim as reclaimExpiredTaskClaim, teamAppendEvent as appendTeamEvent, teamReadTaskApproval as readTaskApproval, teamListMailbox as listMailboxMessages, teamMarkMessageDelivered as markMessageDelivered, teamMarkMessageNotified as markMessageNotified, teamEnqueueDispatchRequest as enqueueDispatchRequest, teamMarkDispatchRequestNotified as markDispatchRequestNotified, teamTransitionDispatchRequest as transitionDispatchRequest, teamReadDispatchRequest as readDispatchRequest, teamCleanup as cleanupTeamState, teamSaveConfig as saveTeamConfig, teamWriteShutdownRequest as writeShutdownRequest, teamReadShutdownAck as readShutdownAck, teamReadMonitorSnapshot as readMonitorSnapshot, teamWriteMonitorSnapshot as writeMonitorSnapshot, teamReadPhase as readTeamPhaseState, teamWritePhase as writeTeamPhaseState, teamWriteWorkerStatus as writeWorkerStatus, } from './team-ops.js';
|
|
6
|
+
import { sanitizeTeamName, isTmuxAvailable, hasCurrentTmuxClientContext, createTeamSession, buildWorkerProcessLaunchSpec, resolveTeamWorkerCli, resolveTeamWorkerCliPlan, resolveTeamWorkerLaunchMode, waitForWorkerReady, waitForWorkerReadyAsync, dismissTrustPromptIfPresent, sendToWorker, sendToWorkerStdin, isWorkerAlive, isWorkerPaneOpen, getWorkerPanePid, killWorkerByPaneIdAsync, restoreStandaloneHudPane, teardownWorkerPanes, unregisterResizeHook, destroyTeamSession, listPaneIds, listTeamSessions, resolveSharedSessionShutdownTopology, } from './tmux-session.js';
|
|
7
|
+
import { teamInit as initTeamState, DEFAULT_MAX_WORKERS, teamReadConfig as readTeamConfig, teamWriteWorkerIdentity as writeWorkerIdentity, teamReadWorkerHeartbeat as readWorkerHeartbeat, teamReadWorkerStatus as readWorkerStatus, teamWriteWorkerInbox as writeWorkerInbox, teamCreateTask as createStateTask, teamReadTask as readTask, teamListTasks as listTasks, teamUpdateTask as updateTask, teamReadManifest as readTeamManifestV2, teamNormalizeGovernance as normalizeTeamGovernance, teamNormalizePolicy as normalizeTeamPolicy, teamClaimTask as claimTask, teamReleaseTaskClaim as releaseTaskClaim, teamReclaimExpiredTaskClaim as reclaimExpiredTaskClaim, teamAppendEvent as appendTeamEvent, teamReadTaskApproval as readTaskApproval, teamListMailbox as listMailboxMessages, teamMarkMessageDelivered as markMessageDelivered, teamMarkMessageNotified as markMessageNotified, teamEnqueueDispatchRequest as enqueueDispatchRequest, teamMarkDispatchRequestNotified as markDispatchRequestNotified, teamTransitionDispatchRequest as transitionDispatchRequest, teamReadDispatchRequest as readDispatchRequest, teamCleanup as cleanupTeamState, teamSaveConfig as saveTeamConfig, teamWriteShutdownRequest as writeShutdownRequest, teamReadShutdownAck as readShutdownAck, teamReadMonitorSnapshot as readMonitorSnapshot, teamWriteMonitorSnapshot as writeMonitorSnapshot, teamReadPhase as readTeamPhaseState, teamWritePhase as writeTeamPhaseState, teamWriteWorkerStatus as writeWorkerStatus, } from './team-ops.js';
|
|
8
8
|
import { queueInboxInstruction, queueDirectMailboxMessage, queueBroadcastMailboxMessage, waitForDispatchReceipt, } from './mcp-comm.js';
|
|
9
9
|
import { appendTeamDeliveryLogForCwd } from './delivery-log.js';
|
|
10
|
+
import { remapRepoAwareDecompositionMetadataToCreatedTasks, } from './repo-aware-decomposition.js';
|
|
10
11
|
import { generateWorkerOverlay, writeTeamWorkerInstructionsFile, removeTeamWorkerInstructionsFile, writeWorkerWorktreeRootAgentsFile, removeWorkerWorktreeRootAgentsFile, generateInitialInbox, generateTaskAssignmentInbox, generateShutdownInbox, buildTriggerDirective, buildMailboxTriggerDirective, buildLeaderMailboxTriggerDirective, writeWorkerRoleInstructionsFile, } from './worker-bootstrap.js';
|
|
12
|
+
import { synthesizeDelegationPlan } from './delegation-policy.js';
|
|
11
13
|
import { loadRolePrompt } from './role-router.js';
|
|
12
14
|
import { composeRoleInstructionsForRole } from '../agents/native-config.js';
|
|
13
15
|
import { codexPromptsDir } from '../utils/paths.js';
|
|
@@ -20,8 +22,9 @@ import { hasStructuredVerificationEvidence } from '../verification/verifier.js';
|
|
|
20
22
|
import { buildRebalanceDecisions } from './rebalance-policy.js';
|
|
21
23
|
import { getStatePath } from '../mcp/state-paths.js';
|
|
22
24
|
import { readModeState, updateModeState } from '../modes/base.js';
|
|
23
|
-
import { appendTeamCommitHygieneEntries, buildTeamCommitHygieneContext, writeTeamCommitHygieneContext, } from './commit-hygiene.js';
|
|
25
|
+
import { appendTeamCommitHygieneEntries, buildTeamCommitHygieneContext, resolveTeamCommitHygieneArtifactCwd, writeTeamCommitHygieneContext, } from './commit-hygiene.js';
|
|
24
26
|
import { assertCleanLeaderWorkspaceForWorkerWorktrees, ensureWorktree, isGitRepository, isWorktreeDirty, planWorktreeTarget, removeWorktreeForce, rollbackProvisionedWorktrees, } from './worktree.js';
|
|
27
|
+
import { cleanupOmxMcpProcesses, findLaunchSafeCleanupCandidates, } from '../cli/cleanup.js';
|
|
25
28
|
async function syncRootTeamModeStateOnTerminalPhase(teamName, phase, cwd) {
|
|
26
29
|
if (phase !== 'complete' && phase !== 'failed' && phase !== 'cancelled')
|
|
27
30
|
return;
|
|
@@ -154,6 +157,22 @@ export function shouldPrekillInteractiveShutdownProcessTrees(sessionName) {
|
|
|
154
157
|
// teardown alone is insufficient.
|
|
155
158
|
return true;
|
|
156
159
|
}
|
|
160
|
+
export async function cleanupTeamWorkerLaunchOrphanedMcpProcesses(dependencies = {}) {
|
|
161
|
+
const cleanup = dependencies.cleanup ?? (() => cleanupOmxMcpProcesses([], {
|
|
162
|
+
selectCandidates: findLaunchSafeCleanupCandidates,
|
|
163
|
+
writeLine: () => { },
|
|
164
|
+
}));
|
|
165
|
+
const writeWarning = dependencies.writeWarning ?? ((message) => process.stderr.write(`${message}\n`));
|
|
166
|
+
try {
|
|
167
|
+
const result = await cleanup();
|
|
168
|
+
if (result.failedPids.length > 0) {
|
|
169
|
+
writeWarning(`[team/runtime] Failed to reap ${result.failedPids.length} orphaned OMX MCP process(es); continuing worker launch.`);
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
catch (err) {
|
|
173
|
+
writeWarning(`[team/runtime] pre-launch MCP cleanup failed: ${err}; continuing worker launch.`);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
157
176
|
async function logRuntimeDispatchOutcome(params) {
|
|
158
177
|
const { cwd, teamName, workerName, requestId, messageId, intent, outcome, source = 'team.runtime' } = params;
|
|
159
178
|
await appendTeamDeliveryLogForCwd(cwd, {
|
|
@@ -354,7 +373,7 @@ async function integrateWorkerCommitsIntoLeader(params) {
|
|
|
354
373
|
const leaderHeadAtCycleStart = resolveLeaderHead(resolve(config.workers[0]?.worktree_repo_root ?? cwd), cwd);
|
|
355
374
|
const integratedWorkerNames = new Set();
|
|
356
375
|
const commitHygieneEntries = [];
|
|
357
|
-
const artifactCwd = config
|
|
376
|
+
const artifactCwd = resolveTeamCommitHygieneArtifactCwd(config, cwd);
|
|
358
377
|
// ── Phase A: Auto-commit dirty worktrees ──
|
|
359
378
|
for (const worker of config.workers) {
|
|
360
379
|
if (!worker.worktree_repo_root || !worker.worktree_path || !existsSync(worker.worktree_path))
|
|
@@ -1437,9 +1456,27 @@ function resolveEffectiveWorkerCliForStartupLog(resolvedLaunchArgs, env) {
|
|
|
1437
1456
|
}
|
|
1438
1457
|
return resolveTeamWorkerCli(resolvedLaunchArgs, env);
|
|
1439
1458
|
}
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1459
|
+
async function writeDecompositionArtifacts(teamName, cwd, metadata) {
|
|
1460
|
+
const root = join(resolveCanonicalTeamStateRoot(cwd), 'team', teamName);
|
|
1461
|
+
await mkdir(root, { recursive: true });
|
|
1462
|
+
await writeFile(join(root, 'decomposition-report.json'), JSON.stringify(metadata, null, 2), 'utf8');
|
|
1463
|
+
const manifest = await readTeamManifestV2(teamName, cwd);
|
|
1464
|
+
if (manifest) {
|
|
1465
|
+
await writeFile(join(root, 'manifest.v2.json'), JSON.stringify({ ...manifest, team_decomposition: metadata }, null, 2), 'utf8');
|
|
1466
|
+
}
|
|
1467
|
+
}
|
|
1468
|
+
export async function settleStartupAttemptResults(attempts) {
|
|
1469
|
+
const settled = await Promise.allSettled(attempts.map((attempt) => attempt.attempt));
|
|
1470
|
+
return settled.map((result, index) => {
|
|
1471
|
+
if (result.status === 'fulfilled')
|
|
1472
|
+
return result.value;
|
|
1473
|
+
const descriptor = attempts[index];
|
|
1474
|
+
const workerIndex = descriptor?.workerIndex ?? index + 1;
|
|
1475
|
+
const workerName = descriptor?.workerName ?? `worker-${workerIndex}`;
|
|
1476
|
+
const error = result.reason instanceof Error ? result.reason : new Error(String(result.reason));
|
|
1477
|
+
return { ok: false, workerIndex, workerName, error };
|
|
1478
|
+
});
|
|
1479
|
+
}
|
|
1443
1480
|
export async function startTeam(teamName, task, agentType, workerCount, tasks, cwd, options = {}) {
|
|
1444
1481
|
const leaderCwd = resolve(cwd);
|
|
1445
1482
|
await assertNestedTeamAllowed(leaderCwd);
|
|
@@ -1529,15 +1566,49 @@ export async function startTeam(teamName, task, agentType, workerCount, tasks, c
|
|
|
1529
1566
|
config.team_state_root = teamStateRoot;
|
|
1530
1567
|
config.workspace_mode = workspaceMode;
|
|
1531
1568
|
config.worktree_mode = effectiveWorktreeMode;
|
|
1532
|
-
// 4. Create tasks
|
|
1569
|
+
// 4. Create tasks. Repo-aware DAG dependencies are symbolic until the
|
|
1570
|
+
// state layer returns concrete task IDs, so create those tasks dependency
|
|
1571
|
+
// free and patch runtime dependency fields after ID assignment.
|
|
1572
|
+
const createdTasks = [];
|
|
1533
1573
|
for (const t of tasks) {
|
|
1534
|
-
|
|
1574
|
+
const hasSymbolicDagIdentity = Boolean(t.symbolic_id);
|
|
1575
|
+
const created = await createStateTask(sanitized, {
|
|
1535
1576
|
subject: t.subject,
|
|
1536
1577
|
description: t.description,
|
|
1537
1578
|
status: 'pending',
|
|
1538
1579
|
owner: t.owner,
|
|
1539
|
-
blocked_by: t.blocked_by,
|
|
1580
|
+
blocked_by: hasSymbolicDagIdentity ? undefined : t.blocked_by ?? t.depends_on,
|
|
1581
|
+
depends_on: hasSymbolicDagIdentity ? undefined : t.depends_on ?? t.blocked_by,
|
|
1540
1582
|
role: t.role,
|
|
1583
|
+
delegation: t.delegation ?? synthesizeDelegationPlan(t),
|
|
1584
|
+
requires_code_change: t.requires_code_change,
|
|
1585
|
+
filePaths: t.filePaths,
|
|
1586
|
+
domains: t.domains,
|
|
1587
|
+
lane: t.lane,
|
|
1588
|
+
allocation_reason: t.allocation_reason,
|
|
1589
|
+
}, leaderCwd);
|
|
1590
|
+
createdTasks.push(created);
|
|
1591
|
+
}
|
|
1592
|
+
const effectiveDecompositionMetadata = options.decompositionMetadata
|
|
1593
|
+
? remapRepoAwareDecompositionMetadataToCreatedTasks(options.decompositionMetadata, tasks, createdTasks)
|
|
1594
|
+
: undefined;
|
|
1595
|
+
const nodeIdToTaskId = effectiveDecompositionMetadata?.node_id_to_task_id ?? {};
|
|
1596
|
+
for (let index = 0; index < tasks.length; index += 1) {
|
|
1597
|
+
const planned = tasks[index];
|
|
1598
|
+
if (!planned?.symbolic_id)
|
|
1599
|
+
continue;
|
|
1600
|
+
const created = createdTasks[index];
|
|
1601
|
+
if (!created)
|
|
1602
|
+
continue;
|
|
1603
|
+
const symbolicDeps = planned.symbolic_depends_on
|
|
1604
|
+
?? effectiveDecompositionMetadata?.node_dependencies?.[planned.symbolic_id]
|
|
1605
|
+
?? [];
|
|
1606
|
+
const concreteDeps = symbolicDeps.map((dep) => nodeIdToTaskId[dep]).filter(Boolean);
|
|
1607
|
+
if (concreteDeps.length === 0)
|
|
1608
|
+
continue;
|
|
1609
|
+
await updateTask(sanitized, created.id, {
|
|
1610
|
+
blocked_by: concreteDeps,
|
|
1611
|
+
depends_on: concreteDeps,
|
|
1541
1612
|
}, leaderCwd);
|
|
1542
1613
|
}
|
|
1543
1614
|
// 5. Write team-scoped worker instructions file only for single-workspace mode.
|
|
@@ -1546,6 +1617,9 @@ export async function startTeam(teamName, task, agentType, workerCount, tasks, c
|
|
|
1546
1617
|
setTeamModelInstructionsFile(sanitized, workerInstructionsPath);
|
|
1547
1618
|
}
|
|
1548
1619
|
const allTasks = await listTasks(sanitized, leaderCwd);
|
|
1620
|
+
if (effectiveDecompositionMetadata) {
|
|
1621
|
+
await writeDecompositionArtifacts(sanitized, leaderCwd, effectiveDecompositionMetadata);
|
|
1622
|
+
}
|
|
1549
1623
|
const workerBootstrapPlans = [];
|
|
1550
1624
|
for (let i = 1; i <= workerCount; i++) {
|
|
1551
1625
|
const workerName = `worker-${i}`;
|
|
@@ -1586,6 +1660,7 @@ export async function startTeam(teamName, task, agentType, workerCount, tasks, c
|
|
|
1586
1660
|
workerRole: runtimeRole,
|
|
1587
1661
|
rolePromptContent: rawRolePromptContent ?? undefined,
|
|
1588
1662
|
worktreeRootAgentsCanonical: Boolean(workerWorkspace.worktreePath),
|
|
1663
|
+
taskHints: effectiveDecompositionMetadata?.task_hints,
|
|
1589
1664
|
});
|
|
1590
1665
|
const triggerDirective = buildTriggerDirective(workerName, sanitized, resolveInstructionStateRoot(workerWorkspace.worktreePath));
|
|
1591
1666
|
const trigger = triggerDirective.text;
|
|
@@ -1677,6 +1752,10 @@ export async function startTeam(teamName, task, agentType, workerCount, tasks, c
|
|
|
1677
1752
|
await writeWorkerInbox(sanitized, bootstrapPlan.workerName, bootstrapPlan.inbox, leaderCwd);
|
|
1678
1753
|
};
|
|
1679
1754
|
// 6. Create worker runtime (interactive tmux panes or prompt-mode child processes)
|
|
1755
|
+
await cleanupTeamWorkerLaunchOrphanedMcpProcesses({
|
|
1756
|
+
cleanup: options.cleanupLaunchOrphanedMcpProcesses,
|
|
1757
|
+
writeWarning: options.writeCleanupWarning,
|
|
1758
|
+
});
|
|
1680
1759
|
if (workerLaunchMode === 'interactive') {
|
|
1681
1760
|
const createdSession = createTeamSession(sanitized, workerCount, leaderCwd, sharedWorkerLaunchArgs, workerStartups);
|
|
1682
1761
|
sessionName = createdSession.name;
|
|
@@ -1710,31 +1789,40 @@ export async function startTeam(teamName, task, agentType, workerCount, tasks, c
|
|
|
1710
1789
|
await materializeWorkerStartupState(bootstrapPlan, i, workerPaneIds[i - 1]);
|
|
1711
1790
|
}
|
|
1712
1791
|
await saveTeamConfig(config, leaderCwd);
|
|
1713
|
-
// 7.
|
|
1792
|
+
// 7. Start all safe per-worker readiness/dispatch attempts concurrently.
|
|
1793
|
+
// Pane creation and worktree provisioning above remain dependency-bound and
|
|
1794
|
+
// ordered; readiness polling and startup dispatch must not let worker-1
|
|
1795
|
+
// block later workers from receiving their own startup attempts.
|
|
1714
1796
|
const manifest = await readTeamManifestV2(sanitized, leaderCwd);
|
|
1715
1797
|
const dispatchPolicy = resolveDispatchPolicy(manifest?.policy, workerLaunchMode);
|
|
1716
|
-
|
|
1717
|
-
const bootstrapPlan = workerBootstrapPlans[
|
|
1798
|
+
const runWorkerStartupAttempt = async (workerIndex) => {
|
|
1799
|
+
const bootstrapPlan = workerBootstrapPlans[workerIndex - 1];
|
|
1718
1800
|
if (!bootstrapPlan) {
|
|
1719
|
-
|
|
1801
|
+
return {
|
|
1802
|
+
ok: false,
|
|
1803
|
+
workerIndex,
|
|
1804
|
+
workerName: `worker-${workerIndex}`,
|
|
1805
|
+
error: new Error(`missing bootstrap plan for worker-${workerIndex}`),
|
|
1806
|
+
};
|
|
1720
1807
|
}
|
|
1721
|
-
const
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1808
|
+
const workerName = bootstrapPlan.workerName;
|
|
1809
|
+
const paneId = workerPaneIds[workerIndex - 1];
|
|
1810
|
+
const workerTasks = bootstrapPlan.workerTasks;
|
|
1811
|
+
const inbox = bootstrapPlan.inbox;
|
|
1812
|
+
const trigger = bootstrapPlan.trigger;
|
|
1813
|
+
const triggerIntent = bootstrapPlan.triggerIntent;
|
|
1814
|
+
const initialPrompt = bootstrapPlan.initialPrompt;
|
|
1815
|
+
const taskRoles = workerTasks
|
|
1816
|
+
.map((task) => task.role)
|
|
1817
|
+
.filter((role) => Boolean(role));
|
|
1818
|
+
const uniqueTaskRoles = [...new Set(taskRoles)];
|
|
1819
|
+
if (uniqueTaskRoles.length > 1) {
|
|
1820
|
+
console.log(`[omx:team] ${workerName}: mixed task roles [${uniqueTaskRoles.join(', ')}], falling back to ${agentType}`);
|
|
1732
1821
|
}
|
|
1733
|
-
// Wait for worker readiness
|
|
1734
1822
|
if (workerLaunchMode === 'interactive' && !skipWorkerReadyWait && !initialPrompt) {
|
|
1735
|
-
const ready =
|
|
1823
|
+
const ready = await waitForWorkerReadyAsync(sessionName, workerIndex, workerReadyTimeoutMs, paneId);
|
|
1736
1824
|
if (!ready) {
|
|
1737
|
-
const workerAlive = isWorkerPaneOpen(sessionName,
|
|
1825
|
+
const workerAlive = isWorkerPaneOpen(sessionName, workerIndex, paneId);
|
|
1738
1826
|
if (workerAlive) {
|
|
1739
1827
|
await recordRecoverableStartupIssue({
|
|
1740
1828
|
teamName: sanitized,
|
|
@@ -1743,14 +1831,16 @@ export async function startTeam(teamName, task, agentType, workerCount, tasks, c
|
|
|
1743
1831
|
reason: 'ready_prompt_timeout',
|
|
1744
1832
|
cwd: leaderCwd,
|
|
1745
1833
|
});
|
|
1746
|
-
|
|
1834
|
+
return { ok: true, workerIndex, workerName };
|
|
1747
1835
|
}
|
|
1748
|
-
|
|
1836
|
+
return {
|
|
1837
|
+
ok: false,
|
|
1838
|
+
workerIndex,
|
|
1839
|
+
workerName,
|
|
1840
|
+
error: new Error(`Worker ${workerName} did not become ready in tmux session ${sessionName}`),
|
|
1841
|
+
};
|
|
1749
1842
|
}
|
|
1750
1843
|
}
|
|
1751
|
-
// Queue inbox via MCP/state then notify worker via tmux transport.
|
|
1752
|
-
// Retry dispatch up to 3 times to handle Codex trust prompts that may
|
|
1753
|
-
// block the worker pane during startup (fixes #393).
|
|
1754
1844
|
let dispatchOutcome = initialPrompt
|
|
1755
1845
|
? { ok: true, transport: 'none', reason: 'startup_prompt_delivered_at_launch' }
|
|
1756
1846
|
: { ok: false, transport: 'none', reason: 'not_attempted' };
|
|
@@ -1760,9 +1850,9 @@ export async function startTeam(teamName, task, agentType, workerCount, tasks, c
|
|
|
1760
1850
|
teamName: sanitized,
|
|
1761
1851
|
config: config,
|
|
1762
1852
|
workerName,
|
|
1763
|
-
workerIndex
|
|
1853
|
+
workerIndex,
|
|
1764
1854
|
paneId,
|
|
1765
|
-
workerCli: workerCliPlan[
|
|
1855
|
+
workerCli: workerCliPlan[workerIndex - 1],
|
|
1766
1856
|
inbox,
|
|
1767
1857
|
triggerMessage: trigger,
|
|
1768
1858
|
intent: triggerIntent,
|
|
@@ -1775,25 +1865,24 @@ export async function startTeam(teamName, task, agentType, workerCount, tasks, c
|
|
|
1775
1865
|
if (dispatchOutcome.ok)
|
|
1776
1866
|
break;
|
|
1777
1867
|
if (attempt < startupDispatchRetries) {
|
|
1778
|
-
// Check for trust prompt blocking the worker and dismiss it before retry
|
|
1779
1868
|
if (workerLaunchMode === 'interactive') {
|
|
1780
|
-
if (dismissTrustPromptIfPresent(sessionName,
|
|
1781
|
-
|
|
1869
|
+
if (dismissTrustPromptIfPresent(sessionName, workerIndex, paneId)) {
|
|
1870
|
+
await waitForWorkerReadyAsync(sessionName, workerIndex, workerReadyTimeoutMs, paneId);
|
|
1782
1871
|
}
|
|
1783
1872
|
else {
|
|
1784
|
-
|
|
1873
|
+
await new Promise((resolve) => setTimeout(resolve, Math.max(0, startupRetryDelayS * 1000)));
|
|
1785
1874
|
}
|
|
1786
1875
|
}
|
|
1787
1876
|
else {
|
|
1788
|
-
|
|
1877
|
+
await new Promise((resolve) => setTimeout(resolve, Math.max(0, startupRetryDelayS * 1000)));
|
|
1789
1878
|
}
|
|
1790
1879
|
}
|
|
1791
1880
|
}
|
|
1792
1881
|
}
|
|
1793
1882
|
if (!dispatchOutcome.ok) {
|
|
1794
1883
|
const workerAlive = workerLaunchMode === 'prompt'
|
|
1795
|
-
? isPromptWorkerAlive(config, config.workers[
|
|
1796
|
-
: isWorkerPaneOpen(sessionName,
|
|
1884
|
+
? isPromptWorkerAlive(config, config.workers[workerIndex - 1])
|
|
1885
|
+
: isWorkerPaneOpen(sessionName, workerIndex, paneId);
|
|
1797
1886
|
if (workerLaunchMode === 'interactive'
|
|
1798
1887
|
&& workerAlive
|
|
1799
1888
|
&& isRecoverableInteractiveStartupReason(dispatchOutcome.reason)) {
|
|
@@ -1804,10 +1893,32 @@ export async function startTeam(teamName, task, agentType, workerCount, tasks, c
|
|
|
1804
1893
|
reason: dispatchOutcome.reason,
|
|
1805
1894
|
cwd: leaderCwd,
|
|
1806
1895
|
});
|
|
1807
|
-
|
|
1896
|
+
return { ok: true, workerIndex, workerName };
|
|
1808
1897
|
}
|
|
1809
|
-
|
|
1898
|
+
return {
|
|
1899
|
+
ok: false,
|
|
1900
|
+
workerIndex,
|
|
1901
|
+
workerName,
|
|
1902
|
+
error: new Error(`worker_notify_failed:${workerName}:${dispatchOutcome.reason}`),
|
|
1903
|
+
};
|
|
1810
1904
|
}
|
|
1905
|
+
return { ok: true, workerIndex, workerName };
|
|
1906
|
+
};
|
|
1907
|
+
const startupAttemptResults = await settleStartupAttemptResults(Array.from({ length: workerCount }, (_, index) => {
|
|
1908
|
+
const workerIndex = index + 1;
|
|
1909
|
+
const bootstrapPlan = workerBootstrapPlans[index];
|
|
1910
|
+
const workerName = bootstrapPlan?.workerName ?? `worker-${workerIndex}`;
|
|
1911
|
+
return {
|
|
1912
|
+
workerIndex,
|
|
1913
|
+
workerName,
|
|
1914
|
+
attempt: runWorkerStartupAttempt(workerIndex),
|
|
1915
|
+
};
|
|
1916
|
+
}));
|
|
1917
|
+
const firstStartupError = startupAttemptResults
|
|
1918
|
+
.filter((result) => !result.ok)
|
|
1919
|
+
.sort((a, b) => a.workerIndex - b.workerIndex)[0];
|
|
1920
|
+
if (firstStartupError) {
|
|
1921
|
+
throw firstStartupError.error;
|
|
1811
1922
|
}
|
|
1812
1923
|
await saveTeamConfig(config, leaderCwd);
|
|
1813
1924
|
return {
|
|
@@ -2186,7 +2297,10 @@ export async function assignTask(teamName, workerName, taskId, cwd) {
|
|
|
2186
2297
|
}
|
|
2187
2298
|
try {
|
|
2188
2299
|
// Retry dispatch up to 2 times to handle trust prompts during assignment (fixes #393).
|
|
2189
|
-
const
|
|
2300
|
+
const taskForInbox = task.delegation
|
|
2301
|
+
? task
|
|
2302
|
+
: (await updateTask(sanitized, taskId, { delegation: synthesizeDelegationPlan(task) }, cwd)) ?? task;
|
|
2303
|
+
const inbox = generateTaskAssignmentInbox(workerName, sanitized, taskForInbox);
|
|
2190
2304
|
const maxAssignRetries = 2;
|
|
2191
2305
|
const assignRetryDelayS = 2;
|
|
2192
2306
|
let outcome = { ok: false, transport: 'none', reason: 'not_attempted' };
|
|
@@ -2501,7 +2615,7 @@ export async function shutdownTeam(teamName, cwd, options = {}) {
|
|
|
2501
2615
|
});
|
|
2502
2616
|
}
|
|
2503
2617
|
}
|
|
2504
|
-
const artifactCwd = config
|
|
2618
|
+
const artifactCwd = resolveTeamCommitHygieneArtifactCwd(config, cwd);
|
|
2505
2619
|
const ledger = await appendTeamCommitHygieneEntries(sanitized, commitHygieneEntries, artifactCwd);
|
|
2506
2620
|
const taskView = await listTasks(sanitized, cwd).catch(() => []);
|
|
2507
2621
|
const commitHygieneContext = buildTeamCommitHygieneContext({
|
|
@@ -2567,7 +2681,8 @@ export async function resumeTeam(teamName, cwd) {
|
|
|
2567
2681
|
return null;
|
|
2568
2682
|
config.lifecycle_profile = 'default';
|
|
2569
2683
|
if (config.worker_launch_mode === 'prompt') {
|
|
2570
|
-
const
|
|
2684
|
+
const handleTeamConfig = { ...config, name: sanitized };
|
|
2685
|
+
const hasLivePromptWorker = config.workers.some((worker) => isPromptWorkerAlive(handleTeamConfig, worker));
|
|
2571
2686
|
if (!hasLivePromptWorker)
|
|
2572
2687
|
return null;
|
|
2573
2688
|
const missingHandles = config.workers
|
|
@@ -3290,9 +3405,15 @@ async function sendLeaderMailboxMessage(params) {
|
|
|
3290
3405
|
cwd,
|
|
3291
3406
|
transportPreference,
|
|
3292
3407
|
fallbackAllowed: transportPreference === 'hook_preferred_with_fallback',
|
|
3293
|
-
notify: async (_target, message) =>
|
|
3294
|
-
|
|
3295
|
-
|
|
3408
|
+
notify: async (_target, message) => {
|
|
3409
|
+
if (transportPreference === 'hook_preferred_with_fallback') {
|
|
3410
|
+
return { ok: true, transport: 'hook', reason: 'queued_for_hook_dispatch' };
|
|
3411
|
+
}
|
|
3412
|
+
if (!config.leader_pane_id) {
|
|
3413
|
+
return { ok: false, transport: 'mailbox', reason: 'leader_pane_missing_transport_direct_failed' };
|
|
3414
|
+
}
|
|
3415
|
+
return await notifyLeaderAsync(config, message, cwd);
|
|
3416
|
+
},
|
|
3296
3417
|
});
|
|
3297
3418
|
if (!isExistingMailboxNotificationOutcome(queuedOutcome)
|
|
3298
3419
|
&& transportPreference === 'hook_preferred_with_fallback'
|
|
@@ -3322,6 +3443,26 @@ async function sendLeaderMailboxMessage(params) {
|
|
|
3322
3443
|
});
|
|
3323
3444
|
return deferredOutcome;
|
|
3324
3445
|
}
|
|
3446
|
+
if (!isExistingMailboxNotificationOutcome(queuedOutcome)
|
|
3447
|
+
&& transportPreference === 'transport_direct'
|
|
3448
|
+
&& !config.leader_pane_id) {
|
|
3449
|
+
const failedOutcome = {
|
|
3450
|
+
...queuedOutcome,
|
|
3451
|
+
ok: false,
|
|
3452
|
+
transport: 'mailbox',
|
|
3453
|
+
reason: 'leader_pane_missing_transport_direct_failed',
|
|
3454
|
+
};
|
|
3455
|
+
await logRuntimeDispatchOutcome({
|
|
3456
|
+
cwd,
|
|
3457
|
+
teamName,
|
|
3458
|
+
workerName: 'leader-fixed',
|
|
3459
|
+
requestId: failedOutcome.request_id,
|
|
3460
|
+
messageId: failedOutcome.message_id,
|
|
3461
|
+
intent: triggerDirective.intent,
|
|
3462
|
+
outcome: failedOutcome,
|
|
3463
|
+
});
|
|
3464
|
+
return failedOutcome;
|
|
3465
|
+
}
|
|
3325
3466
|
const canLeaderFallbackDirectly = Boolean(config.leader_pane_id) && isTmuxAvailable();
|
|
3326
3467
|
return await finalizeQueuedMailboxDispatch({
|
|
3327
3468
|
queuedOutcome,
|