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
|
@@ -6,7 +6,7 @@ import { dirname, join } from "node:path";
|
|
|
6
6
|
import { tmpdir } from "node:os";
|
|
7
7
|
import { fileURLToPath } from "node:url";
|
|
8
8
|
import { once } from "node:events";
|
|
9
|
-
import { HELP, normalizeCodexLaunchArgs, buildTmuxShellCommand, buildTmuxPaneCommand, buildWindowsPromptCommand, buildTmuxSessionName, resolveCliInvocation, commandOwnsLocalHelp, resolveCodexLaunchPolicy, resolveLeaderLaunchPolicyOverride, classifyCodexExecFailure, resolveSignalExitCode, parseTmuxPaneSnapshot, findHudWatchPaneIds, buildHudPaneCleanupTargets, readTopLevelTomlString, upsertTopLevelTomlString, collectInheritableTeamWorkerArgs, resolveTeamWorkerLaunchArgsEnv, injectModelInstructionsBypassArgs, resolveWorkerSparkModel, resolveSetupScopeArg, readPersistedSetupPreferences, readPersistedSetupScope, resolveCodexConfigPathForLaunch, resolveCodexHomeForLaunch, buildDetachedSessionBootstrapSteps, buildDetachedTmuxSessionName, buildDetachedSessionFinalizeSteps, buildDetachedSessionRollbackSteps, detectDetachedSessionWindowIndex, resolveNotifyTempContract, buildNotifyTempStartupMessages, buildNotifyFallbackWatcherEnv, shouldEnableNotifyFallbackWatcher, reapStaleNotifyFallbackWatcher, cleanupLaunchOrphanedMcpProcesses, reapPostLaunchOrphanedMcpProcesses, cleanupPostLaunchModeStateFiles, resolveBackgroundHelperLaunchMode, shouldDetachBackgroundHelper, resolveNotifyFallbackWatcherScript, resolveHookDerivedWatcherScript, resolveNotifyHookScript, buildDetachedWindowsBootstrapScript, acquireTmuxExtendedKeysLease, resolveNativeSessionName, releaseTmuxExtendedKeysLease, withTmuxExtendedKeys, } from "../index.js";
|
|
9
|
+
import { HELP, normalizeCodexLaunchArgs, buildTmuxShellCommand, buildTmuxPaneCommand, buildWindowsPromptCommand, buildTmuxSessionName, resolveCliInvocation, commandOwnsLocalHelp, resolveCodexLaunchPolicy, resolveEffectiveLeaderLaunchPolicyOverride, resolveEnvLaunchPolicyOverride, resolveLeaderLaunchPolicyOverride, classifyCodexExecFailure, resolveSignalExitCode, parseTmuxPaneSnapshot, findHudWatchPaneIds, buildHudPaneCleanupTargets, readTopLevelTomlString, upsertTopLevelTomlString, collectInheritableTeamWorkerArgs, resolveTeamWorkerLaunchArgsEnv, injectModelInstructionsBypassArgs, resolveWorkerSparkModel, resolveSetupInstallModeArg, resolveSetupScopeArg, readPersistedSetupPreferences, readPersistedSetupScope, resolveCodexConfigPathForLaunch, resolveCodexHomeForLaunch, resolveProjectLocalCodexHomeForLaunch, buildDetachedSessionBootstrapSteps, buildDetachedTmuxSessionName, buildDetachedSessionFinalizeSteps, buildDetachedSessionRollbackSteps, detectDetachedSessionWindowIndex, resolveNotifyTempContract, buildNotifyTempStartupMessages, buildNotifyFallbackWatcherEnv, shouldEnableNotifyFallbackWatcher, reapStaleNotifyFallbackWatcher, cleanupLaunchOrphanedMcpProcesses, reapPostLaunchOrphanedMcpProcesses, cleanupPostLaunchModeStateFiles, resolveBackgroundHelperLaunchMode, shouldDetachBackgroundHelper, resolveNotifyFallbackWatcherScript, resolveHookDerivedWatcherScript, resolveNotifyHookScript, buildDetachedWindowsBootstrapScript, acquireTmuxExtendedKeysLease, resolveNativeSessionName, releaseTmuxExtendedKeysLease, withTmuxExtendedKeys, } from "../index.js";
|
|
10
10
|
import { ensureReusableNodeModules } from "../../utils/repo-deps.js";
|
|
11
11
|
import { readAllState } from "../../hud/state.js";
|
|
12
12
|
import { generateOverlay } from "../../hooks/agents-overlay.js";
|
|
@@ -15,6 +15,12 @@ import { createHudWatchPane as createSharedHudWatchPane, listCurrentWindowHudPan
|
|
|
15
15
|
import { DEFAULT_FRONTIER_MODEL, getTeamLowComplexityModel, } from "../../config/models.js";
|
|
16
16
|
const testDir = dirname(fileURLToPath(import.meta.url));
|
|
17
17
|
const repoRoot = join(testDir, "..", "..", "..");
|
|
18
|
+
function normalizeDarwinTmpPath(value) {
|
|
19
|
+
return process.platform === "darwin" ? value.replaceAll("/private/var/", "/var/") : value;
|
|
20
|
+
}
|
|
21
|
+
function escapeRegExp(value) {
|
|
22
|
+
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
23
|
+
}
|
|
18
24
|
function expectedLowComplexityModel(codexHomeOverride) {
|
|
19
25
|
return getTeamLowComplexityModel(codexHomeOverride);
|
|
20
26
|
}
|
|
@@ -132,6 +138,11 @@ describe("normalizeCodexLaunchArgs", () => {
|
|
|
132
138
|
"--yolo",
|
|
133
139
|
]);
|
|
134
140
|
});
|
|
141
|
+
it("strips --direct from leader codex args", () => {
|
|
142
|
+
assert.deepEqual(normalizeCodexLaunchArgs(["--direct", "--yolo"]), [
|
|
143
|
+
"--yolo",
|
|
144
|
+
]);
|
|
145
|
+
});
|
|
135
146
|
it("preserves literal --tmux after -- in leader codex args", () => {
|
|
136
147
|
assert.deepEqual(normalizeCodexLaunchArgs(["--", "--tmux", "--yolo"]), [
|
|
137
148
|
"--",
|
|
@@ -139,17 +150,64 @@ describe("normalizeCodexLaunchArgs", () => {
|
|
|
139
150
|
"--yolo",
|
|
140
151
|
]);
|
|
141
152
|
});
|
|
153
|
+
it("preserves literal --direct after -- in leader codex args", () => {
|
|
154
|
+
assert.deepEqual(normalizeCodexLaunchArgs(["--", "--direct", "--yolo"]), [
|
|
155
|
+
"--",
|
|
156
|
+
"--direct",
|
|
157
|
+
"--yolo",
|
|
158
|
+
]);
|
|
159
|
+
});
|
|
142
160
|
});
|
|
143
161
|
describe("resolveLeaderLaunchPolicyOverride", () => {
|
|
144
162
|
it("detects explicit detached tmux launch requests", () => {
|
|
145
163
|
assert.equal(resolveLeaderLaunchPolicyOverride(["--tmux", "--model", "gpt-5"]), "detached-tmux");
|
|
146
164
|
});
|
|
165
|
+
it("detects explicit direct launch requests", () => {
|
|
166
|
+
assert.equal(resolveLeaderLaunchPolicyOverride(["--direct", "--model", "gpt-5"]), "direct");
|
|
167
|
+
});
|
|
168
|
+
it("uses the last CLI launch policy flag before --", () => {
|
|
169
|
+
assert.equal(resolveLeaderLaunchPolicyOverride(["--direct", "--tmux"]), "detached-tmux");
|
|
170
|
+
assert.equal(resolveLeaderLaunchPolicyOverride(["--tmux", "--direct"]), "direct");
|
|
171
|
+
});
|
|
147
172
|
it("returns undefined when no explicit policy override is present", () => {
|
|
148
173
|
assert.equal(resolveLeaderLaunchPolicyOverride(["--model", "gpt-5"]), undefined);
|
|
149
174
|
});
|
|
150
175
|
it("stops scanning for --tmux after the end-of-options marker", () => {
|
|
151
176
|
assert.equal(resolveLeaderLaunchPolicyOverride(["--", "--tmux", "--model", "gpt-5"]), undefined);
|
|
152
177
|
});
|
|
178
|
+
it("stops scanning for --direct after the end-of-options marker", () => {
|
|
179
|
+
assert.equal(resolveLeaderLaunchPolicyOverride(["--", "--direct", "--model", "gpt-5"]), undefined);
|
|
180
|
+
});
|
|
181
|
+
});
|
|
182
|
+
describe("resolveEnvLaunchPolicyOverride", () => {
|
|
183
|
+
it("accepts direct, tmux, detached-tmux, auto, and empty policy values", () => {
|
|
184
|
+
assert.equal(resolveEnvLaunchPolicyOverride({ OMX_LAUNCH_POLICY: "direct" }), "direct");
|
|
185
|
+
assert.equal(resolveEnvLaunchPolicyOverride({ OMX_LAUNCH_POLICY: "tmux" }), "detached-tmux");
|
|
186
|
+
assert.equal(resolveEnvLaunchPolicyOverride({ OMX_LAUNCH_POLICY: "detached-tmux" }), "detached-tmux");
|
|
187
|
+
assert.equal(resolveEnvLaunchPolicyOverride({ OMX_LAUNCH_POLICY: "auto" }), undefined);
|
|
188
|
+
assert.equal(resolveEnvLaunchPolicyOverride({ OMX_LAUNCH_POLICY: "" }), undefined);
|
|
189
|
+
});
|
|
190
|
+
it("warns once for invalid OMX_LAUNCH_POLICY and falls back to auto", () => {
|
|
191
|
+
const warn = mock.method(console, "warn", () => { });
|
|
192
|
+
assert.equal(resolveEnvLaunchPolicyOverride({ OMX_LAUNCH_POLICY: "banana" }), undefined);
|
|
193
|
+
assert.equal(resolveEnvLaunchPolicyOverride({ OMX_LAUNCH_POLICY: "banana" }), undefined);
|
|
194
|
+
assert.equal(warn.mock.callCount(), 1);
|
|
195
|
+
});
|
|
196
|
+
});
|
|
197
|
+
describe("resolveEffectiveLeaderLaunchPolicyOverride", () => {
|
|
198
|
+
it("uses env policy when no CLI policy flag is present", () => {
|
|
199
|
+
assert.equal(resolveEffectiveLeaderLaunchPolicyOverride(["--yolo"], {
|
|
200
|
+
OMX_LAUNCH_POLICY: "direct",
|
|
201
|
+
}), "direct");
|
|
202
|
+
});
|
|
203
|
+
it("lets CLI policy flags override OMX_LAUNCH_POLICY", () => {
|
|
204
|
+
assert.equal(resolveEffectiveLeaderLaunchPolicyOverride(["--tmux", "--yolo"], {
|
|
205
|
+
OMX_LAUNCH_POLICY: "direct",
|
|
206
|
+
}), "detached-tmux");
|
|
207
|
+
assert.equal(resolveEffectiveLeaderLaunchPolicyOverride(["--direct", "--yolo"], {
|
|
208
|
+
OMX_LAUNCH_POLICY: "tmux",
|
|
209
|
+
}), "direct");
|
|
210
|
+
});
|
|
153
211
|
});
|
|
154
212
|
describe("resolveNotifyTempContract", () => {
|
|
155
213
|
it("activates from --notify-temp with no providers", () => {
|
|
@@ -711,6 +769,31 @@ describe("resolveCliInvocation", () => {
|
|
|
711
769
|
it("advertises the explicit update command in top-level help", () => {
|
|
712
770
|
assert.match(HELP, /omx update\s+Check npm now, update the global install immediately, then refresh setup/);
|
|
713
771
|
});
|
|
772
|
+
it("advertises direct launch policy controls in top-level help", () => {
|
|
773
|
+
assert.match(HELP, /--direct\s+Launch the interactive leader directly/);
|
|
774
|
+
assert.match(HELP, /OMX_LAUNCH_POLICY=direct\|tmux\|detached-tmux\|auto/);
|
|
775
|
+
assert.match(HELP, /unset OMX_LAUNCH_POLICY/);
|
|
776
|
+
assert.match(HELP, /omx --direct --yolo/);
|
|
777
|
+
assert.match(HELP, /OMX_LAUNCH_POLICY=direct omx --tmux --yolo/);
|
|
778
|
+
assert.match(HELP, /Config files are intentionally not used/);
|
|
779
|
+
});
|
|
780
|
+
});
|
|
781
|
+
describe("resolveSetupInstallModeArg", () => {
|
|
782
|
+
it("maps explicit setup install mode flags", () => {
|
|
783
|
+
assert.equal(resolveSetupInstallModeArg(["--dry-run"]), undefined);
|
|
784
|
+
assert.equal(resolveSetupInstallModeArg(["--plugin"]), "plugin");
|
|
785
|
+
assert.equal(resolveSetupInstallModeArg(["--legacy"]), "legacy");
|
|
786
|
+
assert.equal(resolveSetupInstallModeArg(["--install-mode", "legacy"]), "legacy");
|
|
787
|
+
assert.equal(resolveSetupInstallModeArg(["--install-mode=plugin"]), "plugin");
|
|
788
|
+
assert.equal(resolveSetupInstallModeArg(["--scope", "project", "--plugin"]), "plugin");
|
|
789
|
+
});
|
|
790
|
+
it("rejects invalid setup install mode flags", () => {
|
|
791
|
+
assert.throws(() => resolveSetupInstallModeArg(["--install-mode"]), /Missing setup install mode value after --install-mode/);
|
|
792
|
+
assert.throws(() => resolveSetupInstallModeArg(["--install-mode", "workspace"]), /Invalid setup install mode: workspace/);
|
|
793
|
+
assert.throws(() => resolveSetupInstallModeArg(["--plugin", "--legacy"]), /Conflicting setup install mode flags/);
|
|
794
|
+
assert.throws(() => resolveSetupInstallModeArg(["--plugin", "--install-mode", "legacy"]), /Conflicting setup install mode flags/);
|
|
795
|
+
assert.throws(() => resolveSetupInstallModeArg(["--legacy", "--install-mode=plugin"]), /Conflicting setup install mode flags/);
|
|
796
|
+
});
|
|
714
797
|
});
|
|
715
798
|
describe("resolveSetupScopeArg", () => {
|
|
716
799
|
it("returns undefined when scope is omitted", () => {
|
|
@@ -741,13 +824,14 @@ describe("project launch scope helpers", () => {
|
|
|
741
824
|
await rm(wd, { recursive: true, force: true });
|
|
742
825
|
}
|
|
743
826
|
});
|
|
744
|
-
it("reads persisted setup preferences when
|
|
827
|
+
it("reads persisted setup preferences when install mode is present", async () => {
|
|
745
828
|
const wd = await mkdtemp(join(tmpdir(), "omx-launch-scope-"));
|
|
746
829
|
try {
|
|
747
830
|
await mkdir(join(wd, ".omx"), { recursive: true });
|
|
748
|
-
await writeFile(join(wd, ".omx", "setup-scope.json"), JSON.stringify({ scope: "user" }));
|
|
831
|
+
await writeFile(join(wd, ".omx", "setup-scope.json"), JSON.stringify({ scope: "user", installMode: "plugin" }));
|
|
749
832
|
assert.deepEqual(readPersistedSetupPreferences(wd), {
|
|
750
833
|
scope: "user",
|
|
834
|
+
installMode: "plugin",
|
|
751
835
|
});
|
|
752
836
|
}
|
|
753
837
|
finally {
|
|
@@ -801,6 +885,30 @@ describe("project launch scope helpers", () => {
|
|
|
801
885
|
await rm(wd, { recursive: true, force: true });
|
|
802
886
|
}
|
|
803
887
|
});
|
|
888
|
+
it("marks only persisted project CODEX_HOME as project-local cleanup target", async () => {
|
|
889
|
+
const wd = await mkdtemp(join(tmpdir(), "omx-launch-scope-"));
|
|
890
|
+
try {
|
|
891
|
+
await mkdir(join(wd, ".omx"), { recursive: true });
|
|
892
|
+
await writeFile(join(wd, ".omx", "setup-scope.json"), JSON.stringify({ scope: "project" }));
|
|
893
|
+
assert.equal(resolveProjectLocalCodexHomeForLaunch(wd, {}), join(wd, ".codex"));
|
|
894
|
+
}
|
|
895
|
+
finally {
|
|
896
|
+
await rm(wd, { recursive: true, force: true });
|
|
897
|
+
}
|
|
898
|
+
});
|
|
899
|
+
it("does not mark explicit CODEX_HOME as project-local cleanup target", async () => {
|
|
900
|
+
const wd = await mkdtemp(join(tmpdir(), "omx-launch-scope-"));
|
|
901
|
+
try {
|
|
902
|
+
await mkdir(join(wd, ".omx"), { recursive: true });
|
|
903
|
+
await writeFile(join(wd, ".omx", "setup-scope.json"), JSON.stringify({ scope: "project" }));
|
|
904
|
+
assert.equal(resolveProjectLocalCodexHomeForLaunch(wd, {
|
|
905
|
+
CODEX_HOME: "/tmp/user-global-codex-home",
|
|
906
|
+
}), undefined);
|
|
907
|
+
}
|
|
908
|
+
finally {
|
|
909
|
+
await rm(wd, { recursive: true, force: true });
|
|
910
|
+
}
|
|
911
|
+
});
|
|
804
912
|
it("keeps explicit CODEX_HOME override from env", async () => {
|
|
805
913
|
const wd = await mkdtemp(join(tmpdir(), "omx-launch-scope-"));
|
|
806
914
|
try {
|
|
@@ -872,6 +980,18 @@ describe("resolveCodexLaunchPolicy", () => {
|
|
|
872
980
|
it("honors explicit detached tmux launch requests when tmux is available", () => {
|
|
873
981
|
assert.equal(resolveCodexLaunchPolicy({}, "linux", true, false, true, true, "detached-tmux"), "detached-tmux");
|
|
874
982
|
});
|
|
983
|
+
it("honors explicit direct launch requests outside tmux", () => {
|
|
984
|
+
assert.equal(resolveCodexLaunchPolicy({}, "linux", true, false, true, true, "direct"), "direct");
|
|
985
|
+
});
|
|
986
|
+
it("honors explicit direct launch requests inside tmux", () => {
|
|
987
|
+
assert.equal(resolveCodexLaunchPolicy({ TMUX: "/tmp/tmux-1000/default,123,0" }, "linux", true, false, true, true, "direct"), "direct");
|
|
988
|
+
});
|
|
989
|
+
it("keeps explicit tmux policy tmux-aware inside tmux", () => {
|
|
990
|
+
assert.equal(resolveCodexLaunchPolicy({ TMUX: "/tmp/tmux-1000/default,123,0" }, "linux", true, false, true, true, "detached-tmux"), "inside-tmux");
|
|
991
|
+
});
|
|
992
|
+
it("falls back directly for explicit tmux requests when tmux is unavailable", () => {
|
|
993
|
+
assert.equal(resolveCodexLaunchPolicy({}, "linux", false, false, true, true, "detached-tmux"), "direct");
|
|
994
|
+
});
|
|
875
995
|
it("launches directly when stdin is not a tty outside tmux", () => {
|
|
876
996
|
assert.equal(resolveCodexLaunchPolicy({}, "linux", true, false, false, true), "direct");
|
|
877
997
|
});
|
|
@@ -1036,7 +1156,7 @@ describe("detached tmux new-session sequencing", () => {
|
|
|
1036
1156
|
});
|
|
1037
1157
|
it("runCodex builds inside-tmux HUD command with OMX_SESSION_ID", async () => {
|
|
1038
1158
|
const source = await readFile(join(repoRoot, 'src', 'cli', 'index.ts'), 'utf-8');
|
|
1039
|
-
assert.match(source, /buildTmuxPaneCommand\("env"
|
|
1159
|
+
assert.match(source, /buildTmuxPaneCommand\("env",\s*\[\s*`OMX_SESSION_ID=\$\{sessionId\}`,\s*"node",\s*omxBin,\s*"hud",\s*"--watch",?\s*\]\)/);
|
|
1040
1160
|
});
|
|
1041
1161
|
it("buildDetachedSessionBootstrapSteps starts native Windows detached sessions with powershell", () => {
|
|
1042
1162
|
const hudCmd = buildWindowsPromptCommand("node", [
|
|
@@ -1175,7 +1295,7 @@ exit 0
|
|
|
1175
1295
|
});
|
|
1176
1296
|
const log = await readFile(logPath, "utf-8");
|
|
1177
1297
|
assert.match(log, /codex:--dangerously-bypass-approvals-and-sandbox/);
|
|
1178
|
-
assert.match(log, new RegExp(`codex-pwd:${
|
|
1298
|
+
assert.match(normalizeDarwinTmpPath(log), new RegExp(`codex-pwd:${escapeRegExp(normalizeDarwinTmpPath(cwd))}`));
|
|
1179
1299
|
assert.match(log, /tmux:display-message -p #\{socket_path\}/);
|
|
1180
1300
|
assert.match(log, /tmux:show-options -sv extended-keys/);
|
|
1181
1301
|
assert.match(log, /tmux:set-option -sq extended-keys always/);
|
|
@@ -1219,7 +1339,7 @@ exit 0
|
|
|
1219
1339
|
const steps = buildDetachedSessionBootstrapSteps("omx-demo", cwd, buildTmuxPaneCommand("codex", ["--dangerously-bypass-approvals-and-sandbox"], "/bin/sh"), "'node' '/tmp/omx.js' 'hud' '--watch'", null);
|
|
1220
1340
|
const leaderCmd = steps[0]?.args.at(-1);
|
|
1221
1341
|
assert.equal(typeof leaderCmd, "string");
|
|
1222
|
-
const result = (await import("node:child_process")).spawnSync("/bin/sh", ["-
|
|
1342
|
+
const result = (await import("node:child_process")).spawnSync("/bin/sh", ["-c", leaderCmd], {
|
|
1223
1343
|
cwd,
|
|
1224
1344
|
env: {
|
|
1225
1345
|
...process.env,
|
|
@@ -1283,7 +1403,7 @@ exit 0
|
|
|
1283
1403
|
detached: true,
|
|
1284
1404
|
});
|
|
1285
1405
|
try {
|
|
1286
|
-
for (let i = 0; i <
|
|
1406
|
+
for (let i = 0; i < 50; i += 1) {
|
|
1287
1407
|
if (existsSync(pidFile))
|
|
1288
1408
|
break;
|
|
1289
1409
|
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
@@ -1338,6 +1458,25 @@ exit 0
|
|
|
1338
1458
|
["set-option", "-sq", "extended-keys", "off"],
|
|
1339
1459
|
]);
|
|
1340
1460
|
});
|
|
1461
|
+
it("acquireTmuxExtendedKeysLease can bind lease liveness to a long-lived owner pid", async () => {
|
|
1462
|
+
const cwd = await mkdtemp(join(tmpdir(), "omx-tmux-lease-owner-pid-"));
|
|
1463
|
+
try {
|
|
1464
|
+
const execStub = (_file, args) => {
|
|
1465
|
+
if (args[0] === "display-message")
|
|
1466
|
+
return "/tmp/tmux-owner-pid.sock\n";
|
|
1467
|
+
if (args[0] === "show-options")
|
|
1468
|
+
return "off\n";
|
|
1469
|
+
return "";
|
|
1470
|
+
};
|
|
1471
|
+
const lease = acquireTmuxExtendedKeysLease(cwd, execStub, 12345);
|
|
1472
|
+
assert.match(lease ?? "", /^\/tmp\/tmux-owner-pid\.sock\t12345-/);
|
|
1473
|
+
if (lease)
|
|
1474
|
+
releaseTmuxExtendedKeysLease(cwd, lease, execStub);
|
|
1475
|
+
}
|
|
1476
|
+
finally {
|
|
1477
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1478
|
+
}
|
|
1479
|
+
});
|
|
1341
1480
|
it("overlapping tmux extended-keys leases restore only after the last holder exits", async () => {
|
|
1342
1481
|
const cwd = await mkdtemp(join(tmpdir(), "omx-tmux-lease-overlap-"));
|
|
1343
1482
|
const calls = [];
|
|
@@ -1480,6 +1619,145 @@ exit 0
|
|
|
1480
1619
|
releaseTmuxExtendedKeysLease(cwd, lease, execStub);
|
|
1481
1620
|
await rm(cwd, { recursive: true, force: true });
|
|
1482
1621
|
});
|
|
1622
|
+
it("acquireTmuxExtendedKeysLease reaps dead holders and restores before taking a new lease", async () => {
|
|
1623
|
+
const cwd = await mkdtemp(join(tmpdir(), "omx-tmux-dead-holder-acquire-"));
|
|
1624
|
+
try {
|
|
1625
|
+
const leaseDir = join(cwd, ".omx", "state", "tmux-extended-keys");
|
|
1626
|
+
const leasePath = join(leaseDir, "tmp-stale-holder-sock.json");
|
|
1627
|
+
await mkdir(leaseDir, { recursive: true });
|
|
1628
|
+
await writeFile(leasePath, JSON.stringify({
|
|
1629
|
+
originalMode: "off",
|
|
1630
|
+
holders: ["2147483647-stale-holder"],
|
|
1631
|
+
}), "utf-8");
|
|
1632
|
+
const calls = [];
|
|
1633
|
+
const execStub = (_file, args) => {
|
|
1634
|
+
calls.push([...args]);
|
|
1635
|
+
if (args[0] === "display-message")
|
|
1636
|
+
return "/tmp/stale-holder.sock\n";
|
|
1637
|
+
if (args[0] === "show-options")
|
|
1638
|
+
return "off\n";
|
|
1639
|
+
return "";
|
|
1640
|
+
};
|
|
1641
|
+
const lease = acquireTmuxExtendedKeysLease(cwd, execStub);
|
|
1642
|
+
assert.equal(typeof lease, "string");
|
|
1643
|
+
const persisted = JSON.parse(await readFile(leasePath, "utf-8"));
|
|
1644
|
+
assert.equal(persisted.holders.length, 1);
|
|
1645
|
+
const holder = persisted.holders[0];
|
|
1646
|
+
const holderId = typeof holder === "string" ? holder : holder?.id ?? "";
|
|
1647
|
+
assert.match(holderId, new RegExp(`^${process.pid}-`));
|
|
1648
|
+
assert.equal(typeof holder === "object" ? holder.pid : process.pid, process.pid);
|
|
1649
|
+
assert.doesNotMatch(JSON.stringify(persisted), /2147483647-stale-holder/);
|
|
1650
|
+
if (lease)
|
|
1651
|
+
releaseTmuxExtendedKeysLease(cwd, lease, execStub);
|
|
1652
|
+
assert.deepEqual(calls, [
|
|
1653
|
+
["display-message", "-p", "#{socket_path}"],
|
|
1654
|
+
["set-option", "-sq", "extended-keys", "off"],
|
|
1655
|
+
["show-options", "-sv", "extended-keys"],
|
|
1656
|
+
["set-option", "-sq", "extended-keys", "always"],
|
|
1657
|
+
["set-option", "-sq", "extended-keys", "off"],
|
|
1658
|
+
]);
|
|
1659
|
+
}
|
|
1660
|
+
finally {
|
|
1661
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1662
|
+
}
|
|
1663
|
+
});
|
|
1664
|
+
it("releaseTmuxExtendedKeysLease preserves live legacy string holders", async () => {
|
|
1665
|
+
const cwd = await mkdtemp(join(tmpdir(), "omx-tmux-live-legacy-holder-"));
|
|
1666
|
+
try {
|
|
1667
|
+
const leaseDir = join(cwd, ".omx", "state", "tmux-extended-keys");
|
|
1668
|
+
const leasePath = join(leaseDir, "tmp-live-legacy-sock.json");
|
|
1669
|
+
const legacyHolder = `${process.pid}-legacy-holder`;
|
|
1670
|
+
await mkdir(leaseDir, { recursive: true });
|
|
1671
|
+
await writeFile(leasePath, JSON.stringify({
|
|
1672
|
+
originalMode: "off",
|
|
1673
|
+
holders: [legacyHolder],
|
|
1674
|
+
}), "utf-8");
|
|
1675
|
+
const calls = [];
|
|
1676
|
+
const execStub = (_file, args) => {
|
|
1677
|
+
calls.push([...args]);
|
|
1678
|
+
return "";
|
|
1679
|
+
};
|
|
1680
|
+
releaseTmuxExtendedKeysLease(cwd, "/tmp/live-legacy.sock\tmissing-holder", execStub);
|
|
1681
|
+
const persisted = JSON.parse(await readFile(leasePath, "utf-8"));
|
|
1682
|
+
assert.deepEqual(persisted.holders, [legacyHolder]);
|
|
1683
|
+
assert.deepEqual(calls, [], "live legacy string holders should not be restored away");
|
|
1684
|
+
}
|
|
1685
|
+
finally {
|
|
1686
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1687
|
+
}
|
|
1688
|
+
});
|
|
1689
|
+
it("acquireTmuxExtendedKeysLease reaps Linux PID-reuse identity mismatches", async () => {
|
|
1690
|
+
const cwd = await mkdtemp(join(tmpdir(), "omx-tmux-pid-reuse-holder-"));
|
|
1691
|
+
try {
|
|
1692
|
+
const leaseDir = join(cwd, ".omx", "state", "tmux-extended-keys");
|
|
1693
|
+
const leasePath = join(leaseDir, "tmp-pid-reuse-sock.json");
|
|
1694
|
+
await mkdir(leaseDir, { recursive: true });
|
|
1695
|
+
await writeFile(leasePath, JSON.stringify({
|
|
1696
|
+
originalMode: "off",
|
|
1697
|
+
holders: [{
|
|
1698
|
+
id: `${process.pid}-reused-holder`,
|
|
1699
|
+
pid: process.pid,
|
|
1700
|
+
platform: "linux",
|
|
1701
|
+
linuxStartTicks: -1,
|
|
1702
|
+
}],
|
|
1703
|
+
}), "utf-8");
|
|
1704
|
+
const calls = [];
|
|
1705
|
+
const execStub = (_file, args) => {
|
|
1706
|
+
calls.push([...args]);
|
|
1707
|
+
if (args[0] === "display-message")
|
|
1708
|
+
return "/tmp/pid-reuse.sock\n";
|
|
1709
|
+
if (args[0] === "show-options")
|
|
1710
|
+
return "off\n";
|
|
1711
|
+
return "";
|
|
1712
|
+
};
|
|
1713
|
+
const lease = acquireTmuxExtendedKeysLease(cwd, execStub);
|
|
1714
|
+
assert.equal(typeof lease, "string");
|
|
1715
|
+
const persisted = JSON.parse(await readFile(leasePath, "utf-8"));
|
|
1716
|
+
const holderIds = persisted.holders.map((holder) => typeof holder === "string" ? holder : holder.id ?? "");
|
|
1717
|
+
if (process.platform === "linux") {
|
|
1718
|
+
assert.equal(persisted.holders.length, 1);
|
|
1719
|
+
assert.match(holderIds[0] ?? "", new RegExp(`^${process.pid}-`));
|
|
1720
|
+
assert.doesNotMatch(JSON.stringify(persisted), /reused-holder/);
|
|
1721
|
+
assert.deepEqual(calls, [
|
|
1722
|
+
["display-message", "-p", "#{socket_path}"],
|
|
1723
|
+
["set-option", "-sq", "extended-keys", "off"],
|
|
1724
|
+
["show-options", "-sv", "extended-keys"],
|
|
1725
|
+
["set-option", "-sq", "extended-keys", "always"],
|
|
1726
|
+
]);
|
|
1727
|
+
}
|
|
1728
|
+
else {
|
|
1729
|
+
assert.ok(holderIds.includes(`${process.pid}-reused-holder`));
|
|
1730
|
+
}
|
|
1731
|
+
if (lease)
|
|
1732
|
+
releaseTmuxExtendedKeysLease(cwd, lease, execStub);
|
|
1733
|
+
}
|
|
1734
|
+
finally {
|
|
1735
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1736
|
+
}
|
|
1737
|
+
});
|
|
1738
|
+
it("releaseTmuxExtendedKeysLease restores when all remaining holders are dead", async () => {
|
|
1739
|
+
const cwd = await mkdtemp(join(tmpdir(), "omx-tmux-dead-holder-release-"));
|
|
1740
|
+
try {
|
|
1741
|
+
const leaseDir = join(cwd, ".omx", "state", "tmux-extended-keys");
|
|
1742
|
+
const leasePath = join(leaseDir, "tmp-dead-release-sock.json");
|
|
1743
|
+
await mkdir(leaseDir, { recursive: true });
|
|
1744
|
+
await writeFile(leasePath, JSON.stringify({
|
|
1745
|
+
originalMode: "off",
|
|
1746
|
+
holders: ["2147483647-stale-holder"],
|
|
1747
|
+
}), "utf-8");
|
|
1748
|
+
const calls = [];
|
|
1749
|
+
const execStub = (_file, args) => {
|
|
1750
|
+
calls.push([...args]);
|
|
1751
|
+
return "";
|
|
1752
|
+
};
|
|
1753
|
+
releaseTmuxExtendedKeysLease(cwd, "/tmp/dead-release.sock\tmissing-holder", execStub);
|
|
1754
|
+
assert.ok(!existsSync(leasePath), "stale-only lease file should be removed");
|
|
1755
|
+
assert.deepEqual(calls, [["set-option", "-sq", "extended-keys", "off"]]);
|
|
1756
|
+
}
|
|
1757
|
+
finally {
|
|
1758
|
+
await rm(cwd, { recursive: true, force: true });
|
|
1759
|
+
}
|
|
1760
|
+
});
|
|
1483
1761
|
it("buildDetachedSessionFinalizeSteps keeps schedule after split-capture and before attach", () => {
|
|
1484
1762
|
const steps = buildDetachedSessionFinalizeSteps("omx-demo", "%12", "3", true);
|
|
1485
1763
|
const names = steps.map((step) => step.name);
|
|
@@ -1564,6 +1842,12 @@ describe("buildTmuxPaneCommand", () => {
|
|
|
1564
1842
|
assert.ok(!result.startsWith("'/bin/sh' -c "), "should not fall back to /bin/sh for supported Homebrew zsh");
|
|
1565
1843
|
assert.ok(result.includes("source ~/.zshrc"), "should source .zshrc");
|
|
1566
1844
|
});
|
|
1845
|
+
it("keeps MacPorts zsh instead of downgrading to /bin/sh", () => {
|
|
1846
|
+
const result = buildTmuxPaneCommand("codex", ["--model", "gpt-5"], "/opt/local/bin/zsh");
|
|
1847
|
+
assert.ok(result.startsWith("'/opt/local/bin/zsh' -c "), "should preserve MacPorts zsh when SHELL points to it");
|
|
1848
|
+
assert.ok(!result.startsWith("'/bin/sh' -c "), "should not fall back to /bin/sh for supported MacPorts zsh");
|
|
1849
|
+
assert.ok(result.includes("source ~/.zshrc"), "should source .zshrc");
|
|
1850
|
+
});
|
|
1567
1851
|
it("wraps command with bash profile sourcing while preserving tmux cwd", () => {
|
|
1568
1852
|
const result = buildTmuxPaneCommand("codex", [], "/bin/bash");
|
|
1569
1853
|
assert.ok(result.startsWith("'/bin/bash' -c "), "should start with bash non-login shell to preserve tmux cwd");
|
|
@@ -1724,6 +2008,16 @@ describe("team worker launch arg inheritance helpers", () => {
|
|
|
1724
2008
|
it("collectInheritableTeamWorkerArgs supports --model=<value> syntax", () => {
|
|
1725
2009
|
assert.deepEqual(collectInheritableTeamWorkerArgs(["--model=gpt-5.3-codex"]), ["--model", "gpt-5.3-codex"]);
|
|
1726
2010
|
});
|
|
2011
|
+
it("collectInheritableTeamWorkerArgs preserves only safe model_provider config overrides", () => {
|
|
2012
|
+
assert.deepEqual(collectInheritableTeamWorkerArgs([
|
|
2013
|
+
"-c",
|
|
2014
|
+
'sandbox_mode="danger-full-access"',
|
|
2015
|
+
"-c",
|
|
2016
|
+
'model_provider="cheapRouter"',
|
|
2017
|
+
"--model",
|
|
2018
|
+
"gpt-5.5",
|
|
2019
|
+
]), ["-c", 'model_provider="cheapRouter"', "--model", "gpt-5.5"]);
|
|
2020
|
+
});
|
|
1727
2021
|
it("resolveTeamWorkerLaunchArgsEnv merges and normalizes with de-dupe + last reasoning/model wins", () => {
|
|
1728
2022
|
assert.equal(resolveTeamWorkerLaunchArgsEnv('--dangerously-bypass-approvals-and-sandbox -c model_reasoning_effort="high" --model old-a --no-alt-screen --model=old-b', [
|
|
1729
2023
|
"-c",
|