oh-my-codex 0.15.0 → 0.15.2
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/Cargo.lock +5 -5
- package/Cargo.toml +1 -1
- package/README.md +36 -5
- package/crates/omx-explore/src/main.rs +222 -12
- package/dist/agents/__tests__/native-config.test.js +40 -0
- package/dist/agents/__tests__/native-config.test.js.map +1 -1
- package/dist/agents/native-config.d.ts +1 -0
- package/dist/agents/native-config.d.ts.map +1 -1
- package/dist/agents/native-config.js +6 -1
- package/dist/agents/native-config.js.map +1 -1
- package/dist/agents/policy.d.ts +1 -0
- package/dist/agents/policy.d.ts.map +1 -1
- package/dist/agents/policy.js +4 -0
- package/dist/agents/policy.js.map +1 -1
- package/dist/cli/__tests__/autoresearch-guided.test.js +37 -13
- package/dist/cli/__tests__/autoresearch-guided.test.js.map +1 -1
- package/dist/cli/__tests__/codex-plugin-layout.test.js +1 -1
- package/dist/cli/__tests__/codex-plugin-layout.test.js.map +1 -1
- 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 +15 -2
- package/dist/cli/__tests__/explore.test.js.map +1 -1
- package/dist/cli/__tests__/index.test.js +292 -3
- package/dist/cli/__tests__/index.test.js.map +1 -1
- package/dist/cli/__tests__/launch-fallback.test.js +223 -0
- package/dist/cli/__tests__/launch-fallback.test.js.map +1 -1
- 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__/package-bin-contract.test.js +23 -0
- package/dist/cli/__tests__/package-bin-contract.test.js.map +1 -1
- package/dist/cli/__tests__/question.test.js +76 -11
- package/dist/cli/__tests__/question.test.js.map +1 -1
- package/dist/cli/__tests__/setup-agents-overwrite.test.js +140 -1
- package/dist/cli/__tests__/setup-agents-overwrite.test.js.map +1 -1
- package/dist/cli/__tests__/setup-install-mode.test.js +310 -4
- package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -1
- package/dist/cli/__tests__/setup-prompts-overwrite.test.js +78 -19
- package/dist/cli/__tests__/setup-prompts-overwrite.test.js.map +1 -1
- package/dist/cli/__tests__/setup-refresh.test.js +79 -2
- package/dist/cli/__tests__/setup-refresh.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 +54 -7
- package/dist/cli/__tests__/team.test.js.map +1 -1
- package/dist/cli/autoresearch-guided.d.ts.map +1 -1
- package/dist/cli/autoresearch-guided.js +12 -4
- package/dist/cli/autoresearch-guided.js.map +1 -1
- package/dist/cli/codex-home.d.ts +4 -6
- package/dist/cli/codex-home.d.ts.map +1 -1
- package/dist/cli/codex-home.js +9 -41
- 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 -279
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.d.ts +6 -4
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +284 -25
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/omx.js +3 -1
- package/dist/cli/omx.js.map +1 -1
- 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 +1 -1
- package/dist/cli/question.d.ts.map +1 -1
- package/dist/cli/question.js +26 -12
- 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 +7 -5
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +271 -152
- 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 +70 -15
- package/dist/cli/team.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 +23 -1
- package/dist/config/__tests__/models.test.js.map +1 -1
- package/dist/config/generator.d.ts +9 -1
- package/dist/config/generator.d.ts.map +1 -1
- package/dist/config/generator.js +184 -16
- package/dist/config/generator.js.map +1 -1
- package/dist/config/models.d.ts +5 -1
- package/dist/config/models.d.ts.map +1 -1
- package/dist/config/models.js +12 -2
- package/dist/config/models.js.map +1 -1
- 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__/autopilot-skill-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/autopilot-skill-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/autopilot-skill-contract.test.js +37 -0
- package/dist/hooks/__tests__/autopilot-skill-contract.test.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__/consensus-execution-handoff.test.d.ts +1 -1
- package/dist/hooks/__tests__/consensus-execution-handoff.test.js +5 -5
- package/dist/hooks/__tests__/consensus-execution-handoff.test.js.map +1 -1
- package/dist/hooks/__tests__/deep-interview-contract.test.js +12 -9
- package/dist/hooks/__tests__/deep-interview-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/keyword-detector.test.js +25 -18
- package/dist/hooks/__tests__/keyword-detector.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 +45 -2
- 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 +121 -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-leader-nudge.test.js +2 -2
- package/dist/hooks/__tests__/notify-hook-team-leader-nudge.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-tmux-heal.test.js +215 -0
- package/dist/hooks/__tests__/notify-hook-tmux-heal.test.js.map +1 -1
- 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-guidance-wave-two.test.js +9 -0
- package/dist/hooks/__tests__/prompt-guidance-wave-two.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/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 +1 -1
- package/dist/hooks/keyword-detector.d.ts.map +1 -1
- package/dist/hooks/keyword-detector.js +35 -4
- 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 +117 -13
- 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/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 +23 -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 +70 -12
- package/dist/mcp/__tests__/state-server.test.js.map +1 -1
- package/dist/mcp/bootstrap.d.ts +10 -1
- package/dist/mcp/bootstrap.d.ts.map +1 -1
- package/dist/mcp/bootstrap.js +71 -26
- 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/modes/__tests__/base-autoresearch-contract.test.js +1 -1
- package/dist/modes/__tests__/base-autoresearch-contract.test.js.map +1 -1
- package/dist/pipeline/__tests__/orchestrator.test.js +89 -5
- package/dist/pipeline/__tests__/orchestrator.test.js.map +1 -1
- package/dist/pipeline/__tests__/stages.test.js +98 -1
- package/dist/pipeline/__tests__/stages.test.js.map +1 -1
- package/dist/pipeline/index.d.ts +5 -3
- package/dist/pipeline/index.d.ts.map +1 -1
- package/dist/pipeline/index.js +4 -3
- package/dist/pipeline/index.js.map +1 -1
- package/dist/pipeline/orchestrator.d.ts +7 -6
- package/dist/pipeline/orchestrator.d.ts.map +1 -1
- package/dist/pipeline/orchestrator.js +90 -11
- package/dist/pipeline/orchestrator.js.map +1 -1
- package/dist/pipeline/review-verdict.d.ts +3 -0
- package/dist/pipeline/review-verdict.d.ts.map +1 -0
- package/dist/pipeline/review-verdict.js +14 -0
- package/dist/pipeline/review-verdict.js.map +1 -0
- package/dist/pipeline/stages/code-review.d.ts +33 -0
- package/dist/pipeline/stages/code-review.d.ts.map +1 -0
- package/dist/pipeline/stages/code-review.js +51 -0
- package/dist/pipeline/stages/code-review.js.map +1 -0
- package/dist/pipeline/stages/ralph-verify.d.ts +12 -2
- package/dist/pipeline/stages/ralph-verify.d.ts.map +1 -1
- package/dist/pipeline/stages/ralph-verify.js +24 -6
- package/dist/pipeline/stages/ralph-verify.js.map +1 -1
- package/dist/pipeline/stages/ralplan.d.ts +1 -1
- package/dist/pipeline/stages/ralplan.d.ts.map +1 -1
- package/dist/pipeline/stages/ralplan.js +21 -1
- package/dist/pipeline/stages/ralplan.js.map +1 -1
- package/dist/pipeline/types.d.ts +14 -7
- package/dist/pipeline/types.d.ts.map +1 -1
- package/dist/pipeline/types.js +2 -2
- 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__/client.test.js +23 -3
- package/dist/question/__tests__/client.test.js.map +1 -1
- package/dist/question/__tests__/renderer.test.js +148 -37
- package/dist/question/__tests__/renderer.test.js.map +1 -1
- package/dist/question/__tests__/types.test.js +21 -0
- package/dist/question/__tests__/types.test.js.map +1 -1
- package/dist/question/__tests__/ui.test.js +155 -7
- package/dist/question/__tests__/ui.test.js.map +1 -1
- package/dist/question/client.d.ts +14 -4
- package/dist/question/client.d.ts.map +1 -1
- package/dist/question/client.js.map +1 -1
- package/dist/question/renderer.d.ts +11 -1
- package/dist/question/renderer.d.ts.map +1 -1
- package/dist/question/renderer.js +102 -7
- package/dist/question/renderer.js.map +1 -1
- package/dist/question/state.d.ts +2 -2
- package/dist/question/state.d.ts.map +1 -1
- package/dist/question/state.js +26 -17
- package/dist/question/state.js.map +1 -1
- package/dist/question/types.d.ts +25 -1
- package/dist/question/types.d.ts.map +1 -1
- package/dist/question/types.js +48 -13
- package/dist/question/types.js.map +1 -1
- package/dist/question/ui.d.ts +15 -2
- package/dist/question/ui.d.ts.map +1 -1
- package/dist/question/ui.js +268 -162
- package/dist/question/ui.js.map +1 -1
- package/dist/scripts/__tests__/codex-native-hook.test.js +415 -94
- package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
- package/dist/scripts/__tests__/generate-release-body.test.js +36 -0
- package/dist/scripts/__tests__/generate-release-body.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/codex-native-hook.d.ts.map +1 -1
- package/dist/scripts/codex-native-hook.js +232 -54
- package/dist/scripts/codex-native-hook.js.map +1 -1
- package/dist/scripts/codex-native-pre-post.d.ts.map +1 -1
- package/dist/scripts/codex-native-pre-post.js +12 -9
- package/dist/scripts/codex-native-pre-post.js.map +1 -1
- package/dist/scripts/generate-release-body.d.ts.map +1 -1
- package/dist/scripts/generate-release-body.js +12 -3
- package/dist/scripts/generate-release-body.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 +4 -2
- package/dist/scripts/notify-hook/managed-tmux.d.ts.map +1 -1
- package/dist/scripts/notify-hook/managed-tmux.js +188 -6
- 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/tmux-injection.d.ts.map +1 -1
- package/dist/scripts/notify-hook/tmux-injection.js +25 -4
- package/dist/scripts/notify-hook/tmux-injection.js.map +1 -1
- package/dist/scripts/notify-hook.js +36 -5
- package/dist/scripts/notify-hook.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 +1 -0
- package/dist/scripts/run-test-files.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/__tests__/workflow-transition.test.js +9 -1
- package/dist/state/__tests__/workflow-transition.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/state/workflow-transition.d.ts.map +1 -1
- package/dist/state/workflow-transition.js +1 -0
- package/dist/state/workflow-transition.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 +16 -0
- 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 +623 -14
- 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 +399 -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 +27 -0
- package/dist/team/runtime.d.ts.map +1 -1
- package/dist/team/runtime.js +172 -52
- 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 +105 -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/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/package.json +3 -2
- package/plugins/oh-my-codex/.codex-plugin/plugin.json +2 -2
- package/plugins/oh-my-codex/skills/ai-slop-cleaner/SKILL.md +1 -1
- package/plugins/oh-my-codex/skills/analyze/SKILL.md +1 -1
- package/plugins/oh-my-codex/skills/autopilot/SKILL.md +134 -205
- package/plugins/oh-my-codex/skills/code-review/SKILL.md +4 -4
- package/plugins/oh-my-codex/skills/deep-interview/SKILL.md +14 -7
- package/plugins/oh-my-codex/skills/doctor/SKILL.md +1 -1
- package/plugins/oh-my-codex/skills/help/SKILL.md +1 -1
- package/plugins/oh-my-codex/skills/omx-setup/SKILL.md +41 -10
- package/plugins/oh-my-codex/skills/plan/SKILL.md +12 -14
- package/plugins/oh-my-codex/skills/ralph/SKILL.md +2 -4
- package/plugins/oh-my-codex/skills/ralplan/SKILL.md +5 -9
- package/plugins/oh-my-codex/skills/security-review/SKILL.md +4 -4
- package/plugins/oh-my-codex/skills/team/SKILL.md +2 -5
- package/plugins/oh-my-codex/skills/ultraqa/SKILL.md +2 -5
- package/plugins/oh-my-codex/skills/ultrawork/SKILL.md +2 -3
- package/prompts/analyst.md +2 -2
- package/prompts/api-reviewer.md +2 -2
- package/prompts/architect.md +2 -2
- package/prompts/build-fixer.md +2 -2
- package/prompts/code-reviewer.md +15 -5
- package/prompts/code-simplifier.md +1 -1
- package/prompts/critic.md +35 -83
- package/prompts/debugger.md +2 -2
- package/prompts/dependency-expert.md +2 -2
- package/prompts/designer.md +2 -2
- package/prompts/executor.md +40 -114
- package/prompts/explore-harness.md +1 -1
- package/prompts/explore.md +37 -90
- package/prompts/git-master.md +2 -2
- package/prompts/information-architect.md +1 -1
- package/prompts/performance-reviewer.md +2 -2
- package/prompts/planner.md +35 -62
- package/prompts/product-analyst.md +2 -2
- package/prompts/product-manager.md +2 -2
- package/prompts/qa-tester.md +2 -2
- package/prompts/quality-reviewer.md +2 -2
- package/prompts/quality-strategist.md +2 -2
- package/prompts/researcher.md +46 -78
- package/prompts/security-reviewer.md +2 -2
- package/prompts/sisyphus-lite.md +2 -2
- package/prompts/style-reviewer.md +2 -2
- package/prompts/team-executor.md +1 -1
- package/prompts/test-engineer.md +2 -2
- package/prompts/ux-researcher.md +2 -2
- package/prompts/verifier.md +29 -34
- package/prompts/vision.md +2 -2
- package/prompts/writer.md +2 -2
- package/skills/ai-slop-cleaner/SKILL.md +1 -1
- package/skills/analyze/SKILL.md +1 -1
- package/skills/autopilot/SKILL.md +134 -205
- package/skills/build-fix/SKILL.md +4 -4
- package/skills/code-review/SKILL.md +4 -4
- package/skills/deep-interview/SKILL.md +14 -7
- package/skills/doctor/SKILL.md +1 -1
- package/skills/help/SKILL.md +1 -1
- package/skills/omx-setup/SKILL.md +41 -10
- package/skills/plan/SKILL.md +12 -14
- package/skills/ralph/SKILL.md +2 -4
- package/skills/ralplan/SKILL.md +5 -9
- package/skills/security-review/SKILL.md +4 -4
- package/skills/team/SKILL.md +2 -5
- package/skills/ultraqa/SKILL.md +2 -5
- package/skills/ultrawork/SKILL.md +2 -3
- package/src/scripts/__tests__/codex-native-hook.test.ts +502 -94
- package/src/scripts/__tests__/generate-release-body.test.ts +41 -0
- package/src/scripts/__tests__/prompt-inventory.test.ts +64 -0
- package/src/scripts/codex-native-hook.ts +293 -61
- package/src/scripts/codex-native-pre-post.ts +10 -8
- package/src/scripts/generate-release-body.ts +13 -2
- package/src/scripts/notify-hook/__tests__/team-worker-posttooluse.test.ts +180 -0
- package/src/scripts/notify-hook/managed-tmux.ts +196 -9
- 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/tmux-injection.ts +24 -6
- package/src/scripts/notify-hook.ts +36 -5
- package/src/scripts/prompt-inventory.ts +218 -0
- package/src/scripts/run-test-files.ts +1 -0
- package/templates/AGENTS.md +34 -95
|
@@ -6,7 +6,7 @@ import { PassThrough } from 'node:stream';
|
|
|
6
6
|
import { chmod, mkdir, mkdtemp, readFile, rm, writeFile } from 'fs/promises';
|
|
7
7
|
import { join } from 'path';
|
|
8
8
|
import { tmpdir } from 'os';
|
|
9
|
-
import { buildClientAttachedReconcileHookName, assertTeamWorkerCliBinaryAvailable, buildWorkerProcessLaunchSpec, buildReconcileHudResizeArgs, buildRegisterClientAttachedReconcileArgs, buildRegisterResizeHookArgs, buildResizeHookName, buildResizeHookTarget, buildScheduleDelayedHudResizeArgs, buildUnregisterClientAttachedReconcileArgs, buildUnregisterResizeHookArgs, buildWorkerStartupCommand, buildHudPaneTarget, chooseTeamLeaderPaneId, createTeamSession, enableMouseScrolling, isMsysOrGitBash, isNativeWindows, isTmuxAvailable, restoreStandaloneHudPane, translatePathForMsys, isWsl2, isWorkerAlive, killWorker, killWorkerByPaneId, teardownWorkerPanes, listTeamSessions, resolveTeamWorkerCli, resolveTeamWorkerLaunchMode, resolveWorkerCliForSend, resolveTeamWorkerCliPlan, buildWorkerSubmitPlan, sanitizeTeamName, shouldAttemptAdaptiveRetry, sendToWorker, sendToWorkerStdin, sleepFractionalSeconds, translateWorkerLaunchArgsForCli, waitForWorkerReady, paneIsBootstrapping, dismissTrustPromptIfPresent, mitigateCopyModeUnderlineArtifacts, } from '../tmux-session.js';
|
|
9
|
+
import { buildClientAttachedReconcileHookName, assertTeamWorkerCliBinaryAvailable, buildWorkerProcessLaunchSpec, buildReconcileHudResizeArgs, buildRegisterClientAttachedReconcileArgs, buildRegisterResizeHookArgs, buildResizeHookName, buildResizeHookTarget, buildScheduleDelayedHudResizeArgs, buildUnregisterClientAttachedReconcileArgs, buildUnregisterResizeHookArgs, buildWorkerStartupCommand, buildHudPaneTarget, chooseTeamLeaderPaneId, createTeamSession, enableMouseScrolling, isMsysOrGitBash, isNativeWindows, isTmuxAvailable, restoreStandaloneHudPane, translatePathForMsys, isWsl2, isWorkerAlive, killWorker, killWorkerByPaneId, teardownWorkerPanes, listTeamSessions, resolveTeamWorkerCli, resolveTeamWorkerLaunchMode, resolveWorkerCliForSend, resolveTeamWorkerCliPlan, buildWorkerSubmitPlan, sanitizeTeamName, shouldAttemptAdaptiveRetry, sendToWorker, sendToWorkerStdin, sleepFractionalSeconds, translateWorkerLaunchArgsForCli, waitForWorkerReady, waitForWorkerReadyAsync, paneIsBootstrapping, dismissTrustPromptIfPresent, mitigateCopyModeUnderlineArtifacts, } from '../tmux-session.js';
|
|
10
10
|
import { HUD_RESIZE_RECONCILE_DELAY_SECONDS, HUD_TMUX_TEAM_HEIGHT_LINES } from '../../hud/constants.js';
|
|
11
11
|
import * as tmuxSessionModule from '../tmux-session.js';
|
|
12
12
|
import { OMX_ENTRY_PATH_ENV, OMX_STARTUP_CWD_ENV } from '../../utils/paths.js';
|
|
@@ -773,6 +773,28 @@ describe('buildWorkerStartupCommand', () => {
|
|
|
773
773
|
delete process.env.OMX_BYPASS_DEFAULT_SYSTEM_PROMPT;
|
|
774
774
|
}
|
|
775
775
|
});
|
|
776
|
+
it('accepts MacPorts zsh as a supported worker shell without falling back', () => {
|
|
777
|
+
const prevShell = process.env.SHELL;
|
|
778
|
+
const prevBypass = process.env.OMX_BYPASS_DEFAULT_SYSTEM_PROMPT;
|
|
779
|
+
process.env.SHELL = '/opt/local/bin/zsh';
|
|
780
|
+
process.env.OMX_BYPASS_DEFAULT_SYSTEM_PROMPT = '0';
|
|
781
|
+
try {
|
|
782
|
+
const cmd = withMockedExistsSync((candidate) => candidate === '/opt/local/bin/zsh', () => buildWorkerStartupCommand('alpha', 2));
|
|
783
|
+
assert.match(cmd, /'\/opt\/local\/bin\/zsh' -c/);
|
|
784
|
+
assert.doesNotMatch(cmd, /'\/bin\/sh' -c/);
|
|
785
|
+
assert.match(cmd, /source ~\/\.zshrc/);
|
|
786
|
+
}
|
|
787
|
+
finally {
|
|
788
|
+
if (typeof prevShell === 'string')
|
|
789
|
+
process.env.SHELL = prevShell;
|
|
790
|
+
else
|
|
791
|
+
delete process.env.SHELL;
|
|
792
|
+
if (typeof prevBypass === 'string')
|
|
793
|
+
process.env.OMX_BYPASS_DEFAULT_SYSTEM_PROMPT = prevBypass;
|
|
794
|
+
else
|
|
795
|
+
delete process.env.OMX_BYPASS_DEFAULT_SYSTEM_PROMPT;
|
|
796
|
+
}
|
|
797
|
+
});
|
|
776
798
|
it('uses bash with ~/.bashrc and preserves launch args', () => {
|
|
777
799
|
const prevShell = process.env.SHELL;
|
|
778
800
|
process.env.SHELL = '/bin/bash';
|
|
@@ -1907,6 +1929,48 @@ describe('team worker launch mode helpers', () => {
|
|
|
1907
1929
|
await rm(fakeRoot, { recursive: true, force: true });
|
|
1908
1930
|
}
|
|
1909
1931
|
});
|
|
1932
|
+
it('buildWorkerProcessLaunchSpec preserves ambient CODEX_HOME so Codex workers keep provider websocket metadata', async () => {
|
|
1933
|
+
const prevBypass = process.env.OMX_BYPASS_DEFAULT_SYSTEM_PROMPT;
|
|
1934
|
+
const prevCodexHome = process.env.CODEX_HOME;
|
|
1935
|
+
const prevProviderEnv = process.env.CUSTOM_PROVIDER_API_KEY;
|
|
1936
|
+
const codexHome = await mkdtemp(join(tmpdir(), 'omx-team-provider-websocket-'));
|
|
1937
|
+
process.env.OMX_BYPASS_DEFAULT_SYSTEM_PROMPT = '0';
|
|
1938
|
+
process.env.CODEX_HOME = codexHome;
|
|
1939
|
+
process.env.CUSTOM_PROVIDER_API_KEY = 'test-secret';
|
|
1940
|
+
try {
|
|
1941
|
+
await writeFile(join(codexHome, 'config.toml'), [
|
|
1942
|
+
'model = "gpt-5.5"',
|
|
1943
|
+
'model_provider = "custom_provider"',
|
|
1944
|
+
'',
|
|
1945
|
+
'[model_providers.custom_provider]',
|
|
1946
|
+
'name = "custom_provider"',
|
|
1947
|
+
'base_url = "http://localhost:3000/v1"',
|
|
1948
|
+
'wire_api = "responses"',
|
|
1949
|
+
'supports_websockets = true',
|
|
1950
|
+
'requires_openai_auth = true',
|
|
1951
|
+
'env_key = "CUSTOM_PROVIDER_API_KEY"',
|
|
1952
|
+
'',
|
|
1953
|
+
].join('\n'));
|
|
1954
|
+
const spec = buildWorkerProcessLaunchSpec('websocket-team', 1, [], '/tmp/workspace', {}, 'codex');
|
|
1955
|
+
assert.equal(spec.env.CODEX_HOME, codexHome);
|
|
1956
|
+
assert.equal(spec.env.CUSTOM_PROVIDER_API_KEY, 'test-secret');
|
|
1957
|
+
}
|
|
1958
|
+
finally {
|
|
1959
|
+
if (typeof prevBypass === 'string')
|
|
1960
|
+
process.env.OMX_BYPASS_DEFAULT_SYSTEM_PROMPT = prevBypass;
|
|
1961
|
+
else
|
|
1962
|
+
delete process.env.OMX_BYPASS_DEFAULT_SYSTEM_PROMPT;
|
|
1963
|
+
if (typeof prevCodexHome === 'string')
|
|
1964
|
+
process.env.CODEX_HOME = prevCodexHome;
|
|
1965
|
+
else
|
|
1966
|
+
delete process.env.CODEX_HOME;
|
|
1967
|
+
if (typeof prevProviderEnv === 'string')
|
|
1968
|
+
process.env.CUSTOM_PROVIDER_API_KEY = prevProviderEnv;
|
|
1969
|
+
else
|
|
1970
|
+
delete process.env.CUSTOM_PROVIDER_API_KEY;
|
|
1971
|
+
await rm(codexHome, { recursive: true, force: true });
|
|
1972
|
+
}
|
|
1973
|
+
});
|
|
1910
1974
|
it('buildWorkerProcessLaunchSpec injects the active provider env_key from CODEX_HOME config.toml', async () => {
|
|
1911
1975
|
const prevBypass = process.env.OMX_BYPASS_DEFAULT_SYSTEM_PROMPT;
|
|
1912
1976
|
const prevCodexHome = process.env.CODEX_HOME;
|
|
@@ -1946,6 +2010,60 @@ describe('team worker launch mode helpers', () => {
|
|
|
1946
2010
|
await rm(codexHome, { recursive: true, force: true });
|
|
1947
2011
|
}
|
|
1948
2012
|
});
|
|
2013
|
+
it('buildWorkerProcessLaunchSpec uses CLI model_provider override for Codex provider env injection', async () => {
|
|
2014
|
+
const prevBypass = process.env.OMX_BYPASS_DEFAULT_SYSTEM_PROMPT;
|
|
2015
|
+
const prevCodexHome = process.env.CODEX_HOME;
|
|
2016
|
+
const prevDefaultProviderEnv = process.env.DEFAULT_PROVIDER_API_KEY;
|
|
2017
|
+
const prevCheapProviderEnv = process.env.CHEAP_PROVIDER_API_KEY;
|
|
2018
|
+
const codexHome = await mkdtemp(join(tmpdir(), 'omx-team-provider-cli-override-'));
|
|
2019
|
+
process.env.OMX_BYPASS_DEFAULT_SYSTEM_PROMPT = '0';
|
|
2020
|
+
process.env.CODEX_HOME = codexHome;
|
|
2021
|
+
process.env.DEFAULT_PROVIDER_API_KEY = 'default-secret';
|
|
2022
|
+
process.env.CHEAP_PROVIDER_API_KEY = 'cheap-secret';
|
|
2023
|
+
try {
|
|
2024
|
+
await writeFile(join(codexHome, 'config.toml'), [
|
|
2025
|
+
'model_provider = "default_provider"',
|
|
2026
|
+
'',
|
|
2027
|
+
'[model_providers.default_provider]',
|
|
2028
|
+
'name = "default_provider"',
|
|
2029
|
+
'base_url = "http://localhost:3000/v1"',
|
|
2030
|
+
'wire_api = "responses"',
|
|
2031
|
+
'requires_openai_auth = true',
|
|
2032
|
+
'env_key = "DEFAULT_PROVIDER_API_KEY"',
|
|
2033
|
+
'',
|
|
2034
|
+
'[model_providers.cheapRouter]',
|
|
2035
|
+
'name = "cheapRouter"',
|
|
2036
|
+
'base_url = "http://localhost:4000/v1"',
|
|
2037
|
+
'wire_api = "responses"',
|
|
2038
|
+
'requires_openai_auth = true',
|
|
2039
|
+
'env_key = "CHEAP_PROVIDER_API_KEY"',
|
|
2040
|
+
'',
|
|
2041
|
+
].join('\n'));
|
|
2042
|
+
const spec = buildWorkerProcessLaunchSpec('provider-override-team', 1, ['-c', 'model_provider="cheapRouter"', '--model', 'gpt-5.5'], '/tmp/workspace', {}, 'codex');
|
|
2043
|
+
assert.equal(spec.env.CHEAP_PROVIDER_API_KEY, 'cheap-secret');
|
|
2044
|
+
assert.equal(spec.env.DEFAULT_PROVIDER_API_KEY, undefined);
|
|
2045
|
+
assert.deepEqual(spec.args.slice(0, 4), ['-c', 'model_provider="cheapRouter"', '--model', 'gpt-5.5']);
|
|
2046
|
+
}
|
|
2047
|
+
finally {
|
|
2048
|
+
if (typeof prevBypass === 'string')
|
|
2049
|
+
process.env.OMX_BYPASS_DEFAULT_SYSTEM_PROMPT = prevBypass;
|
|
2050
|
+
else
|
|
2051
|
+
delete process.env.OMX_BYPASS_DEFAULT_SYSTEM_PROMPT;
|
|
2052
|
+
if (typeof prevCodexHome === 'string')
|
|
2053
|
+
process.env.CODEX_HOME = prevCodexHome;
|
|
2054
|
+
else
|
|
2055
|
+
delete process.env.CODEX_HOME;
|
|
2056
|
+
if (typeof prevDefaultProviderEnv === 'string')
|
|
2057
|
+
process.env.DEFAULT_PROVIDER_API_KEY = prevDefaultProviderEnv;
|
|
2058
|
+
else
|
|
2059
|
+
delete process.env.DEFAULT_PROVIDER_API_KEY;
|
|
2060
|
+
if (typeof prevCheapProviderEnv === 'string')
|
|
2061
|
+
process.env.CHEAP_PROVIDER_API_KEY = prevCheapProviderEnv;
|
|
2062
|
+
else
|
|
2063
|
+
delete process.env.CHEAP_PROVIDER_API_KEY;
|
|
2064
|
+
await rm(codexHome, { recursive: true, force: true });
|
|
2065
|
+
}
|
|
2066
|
+
});
|
|
1949
2067
|
it('buildWorkerProcessLaunchSpec does not inject the active provider env_key for non-codex workers', async () => {
|
|
1950
2068
|
const prevBypass = process.env.OMX_BYPASS_DEFAULT_SYSTEM_PROMPT;
|
|
1951
2069
|
const prevCodexHome = process.env.CODEX_HOME;
|
|
@@ -1968,6 +2086,7 @@ describe('team worker launch mode helpers', () => {
|
|
|
1968
2086
|
].join('\n'));
|
|
1969
2087
|
const spec = buildWorkerProcessLaunchSpec('delta-team', 1, [], '/tmp/workspace', {}, 'claude');
|
|
1970
2088
|
assert.equal(spec.workerCli, 'claude');
|
|
2089
|
+
assert.equal(spec.env.CODEX_HOME, undefined);
|
|
1971
2090
|
assert.equal(spec.env.CUSTOM_PROVIDER_API_KEY, undefined);
|
|
1972
2091
|
}
|
|
1973
2092
|
finally {
|
|
@@ -2294,7 +2413,7 @@ EOF
|
|
|
2294
2413
|
;;
|
|
2295
2414
|
esac
|
|
2296
2415
|
`, async ({ logPath }) => {
|
|
2297
|
-
assert.equal(waitForWorkerReady('omx-team-x', 1,
|
|
2416
|
+
assert.equal(waitForWorkerReady('omx-team-x', 1, 5_000), true);
|
|
2298
2417
|
const log = await readFile(logPath, 'utf-8');
|
|
2299
2418
|
assert.match(log, /send-keys -t omx-team-x:1 -l -- 2/);
|
|
2300
2419
|
assert.match(log, /send-keys -t omx-team-x:1 C-m/);
|
|
@@ -2337,6 +2456,284 @@ esac
|
|
|
2337
2456
|
});
|
|
2338
2457
|
});
|
|
2339
2458
|
});
|
|
2459
|
+
describe('waitForWorkerReadyAsync parity', () => {
|
|
2460
|
+
it('uses visible capture-pane argv without tail flags', async () => {
|
|
2461
|
+
await withMockTmuxFixture('omx-tmux-worker-ready-async-visible-capture-', (logPath) => `#!/bin/sh
|
|
2462
|
+
set -eu
|
|
2463
|
+
printf '%s\n' "$*" >> "${logPath}"
|
|
2464
|
+
case "$1" in
|
|
2465
|
+
capture-pane)
|
|
2466
|
+
cat <<'EOF'
|
|
2467
|
+
${READY_HELPER_CAPTURE}
|
|
2468
|
+
EOF
|
|
2469
|
+
exit 0
|
|
2470
|
+
;;
|
|
2471
|
+
*)
|
|
2472
|
+
exit 0
|
|
2473
|
+
;;
|
|
2474
|
+
esac
|
|
2475
|
+
`, async ({ logPath }) => {
|
|
2476
|
+
assert.equal(await waitForWorkerReadyAsync('omx-team-x', 1, 1_000), true);
|
|
2477
|
+
const log = await readFile(logPath, 'utf-8');
|
|
2478
|
+
assert.match(log, /capture-pane -t omx-team-x:1 -p/);
|
|
2479
|
+
assert.doesNotMatch(log, /capture-pane -t omx-team-x:1 -p -S/);
|
|
2480
|
+
});
|
|
2481
|
+
});
|
|
2482
|
+
it('falls back to recent scrollback only when visible slice shows a live Codex viewport', async () => {
|
|
2483
|
+
await withMockTmuxFixture('omx-tmux-worker-ready-async-scrollback-fallback-', (logPath) => `#!/bin/sh
|
|
2484
|
+
set -eu
|
|
2485
|
+
printf '%s\n' "$*" >> "${logPath}"
|
|
2486
|
+
case "$1" in
|
|
2487
|
+
capture-pane)
|
|
2488
|
+
if printf '%s\n' "$*" | grep -q -- ' -S -80'; then
|
|
2489
|
+
cat <<'EOF'
|
|
2490
|
+
${VIEWPORT_SCROLLBACK_READY_CAPTURE}
|
|
2491
|
+
EOF
|
|
2492
|
+
else
|
|
2493
|
+
cat <<'EOF'
|
|
2494
|
+
${VIEWPORT_WITHOUT_VISIBLE_PROMPT_CAPTURE}
|
|
2495
|
+
EOF
|
|
2496
|
+
fi
|
|
2497
|
+
exit 0
|
|
2498
|
+
;;
|
|
2499
|
+
*)
|
|
2500
|
+
exit 0
|
|
2501
|
+
;;
|
|
2502
|
+
esac
|
|
2503
|
+
`, async ({ logPath }) => {
|
|
2504
|
+
assert.equal(await waitForWorkerReadyAsync('omx-team-x', 1, 1_000), true);
|
|
2505
|
+
const log = await readFile(logPath, 'utf-8');
|
|
2506
|
+
assert.match(log, /capture-pane -t omx-team-x:1 -p/);
|
|
2507
|
+
assert.match(log, /capture-pane -t omx-team-x:1 -p -S -80/);
|
|
2508
|
+
});
|
|
2509
|
+
await withMockTmuxFixture('omx-tmux-worker-ready-async-no-scrollback-status-', (logPath) => `#!/bin/sh
|
|
2510
|
+
set -eu
|
|
2511
|
+
printf '%s\n' "$*" >> "${logPath}"
|
|
2512
|
+
case "$1" in
|
|
2513
|
+
capture-pane)
|
|
2514
|
+
printf 'gpt-5 50%% left\n'
|
|
2515
|
+
exit 0
|
|
2516
|
+
;;
|
|
2517
|
+
*)
|
|
2518
|
+
exit 0
|
|
2519
|
+
;;
|
|
2520
|
+
esac
|
|
2521
|
+
`, async ({ logPath }) => {
|
|
2522
|
+
assert.equal(await waitForWorkerReadyAsync('omx-team-x', 1, 250), false);
|
|
2523
|
+
const log = await readFile(logPath, 'utf-8');
|
|
2524
|
+
assert.match(log, /capture-pane -t omx-team-x:1 -p/);
|
|
2525
|
+
assert.doesNotMatch(log, /capture-pane -t omx-team-x:1 -p -S -80/);
|
|
2526
|
+
});
|
|
2527
|
+
});
|
|
2528
|
+
it('auto-accepts trust prompts and then observes readiness', async () => {
|
|
2529
|
+
const previousAutoTrust = process.env.OMX_TEAM_AUTO_TRUST;
|
|
2530
|
+
delete process.env.OMX_TEAM_AUTO_TRUST;
|
|
2531
|
+
try {
|
|
2532
|
+
await withMockTmuxFixture('omx-tmux-worker-ready-async-trust-', (logPath) => `#!/bin/sh
|
|
2533
|
+
set -eu
|
|
2534
|
+
state_dir="$(dirname "${logPath}")"
|
|
2535
|
+
accepted_file="$state_dir/accepted"
|
|
2536
|
+
printf '%s\n' "$*" >> "${logPath}"
|
|
2537
|
+
case "$1" in
|
|
2538
|
+
capture-pane)
|
|
2539
|
+
if [ -f "$accepted_file" ]; then
|
|
2540
|
+
cat <<'EOF'
|
|
2541
|
+
${READY_HELPER_CAPTURE}
|
|
2542
|
+
EOF
|
|
2543
|
+
else
|
|
2544
|
+
cat <<'EOF'
|
|
2545
|
+
Do you trust the contents of this directory?
|
|
2546
|
+
Press enter to continue
|
|
2547
|
+
EOF
|
|
2548
|
+
fi
|
|
2549
|
+
exit 0
|
|
2550
|
+
;;
|
|
2551
|
+
send-keys)
|
|
2552
|
+
if [ "\${4:-}" = "C-m" ]; then
|
|
2553
|
+
: > "$accepted_file"
|
|
2554
|
+
fi
|
|
2555
|
+
exit 0
|
|
2556
|
+
;;
|
|
2557
|
+
*)
|
|
2558
|
+
exit 0
|
|
2559
|
+
;;
|
|
2560
|
+
esac
|
|
2561
|
+
`, async ({ logPath }) => {
|
|
2562
|
+
assert.equal(await waitForWorkerReadyAsync('omx-team-x', 1, 5_000), true);
|
|
2563
|
+
const log = await readFile(logPath, 'utf-8');
|
|
2564
|
+
assert.match(log, /send-keys -t omx-team-x:1 C-m/);
|
|
2565
|
+
});
|
|
2566
|
+
}
|
|
2567
|
+
finally {
|
|
2568
|
+
if (typeof previousAutoTrust === 'string')
|
|
2569
|
+
process.env.OMX_TEAM_AUTO_TRUST = previousAutoTrust;
|
|
2570
|
+
else
|
|
2571
|
+
delete process.env.OMX_TEAM_AUTO_TRUST;
|
|
2572
|
+
}
|
|
2573
|
+
});
|
|
2574
|
+
it('auto-accepts the Claude bypass prompt and then observes readiness', async () => {
|
|
2575
|
+
const previousAutoAccept = process.env.OMX_TEAM_AUTO_ACCEPT_BYPASS;
|
|
2576
|
+
delete process.env.OMX_TEAM_AUTO_ACCEPT_BYPASS;
|
|
2577
|
+
try {
|
|
2578
|
+
await withMockTmuxFixture('omx-tmux-worker-ready-async-claude-bypass-', (logPath) => `#!/bin/sh
|
|
2579
|
+
set -eu
|
|
2580
|
+
state_dir="$(dirname "${logPath}")"
|
|
2581
|
+
accepted_file="$state_dir/accepted"
|
|
2582
|
+
printf '%s\n' "$*" >> "${logPath}"
|
|
2583
|
+
case "$1" in
|
|
2584
|
+
capture-pane)
|
|
2585
|
+
if [ -f "$accepted_file" ]; then
|
|
2586
|
+
cat <<'EOF'
|
|
2587
|
+
${READY_HELPER_CAPTURE}
|
|
2588
|
+
EOF
|
|
2589
|
+
else
|
|
2590
|
+
cat <<'EOF'
|
|
2591
|
+
${CLAUDE_BYPASS_PROMPT_CAPTURE}
|
|
2592
|
+
EOF
|
|
2593
|
+
fi
|
|
2594
|
+
exit 0
|
|
2595
|
+
;;
|
|
2596
|
+
send-keys)
|
|
2597
|
+
if [ "\${4:-}" = "-l" ] && [ "\${6:-}" = "2" ]; then
|
|
2598
|
+
: > "$accepted_file"
|
|
2599
|
+
fi
|
|
2600
|
+
exit 0
|
|
2601
|
+
;;
|
|
2602
|
+
*)
|
|
2603
|
+
exit 0
|
|
2604
|
+
;;
|
|
2605
|
+
esac
|
|
2606
|
+
`, async ({ logPath }) => {
|
|
2607
|
+
assert.equal(await waitForWorkerReadyAsync('omx-team-x', 1, 5_000), true);
|
|
2608
|
+
const log = await readFile(logPath, 'utf-8');
|
|
2609
|
+
assert.match(log, /send-keys -t omx-team-x:1 -l -- 2/);
|
|
2610
|
+
});
|
|
2611
|
+
}
|
|
2612
|
+
finally {
|
|
2613
|
+
if (typeof previousAutoAccept === 'string')
|
|
2614
|
+
process.env.OMX_TEAM_AUTO_ACCEPT_BYPASS = previousAutoAccept;
|
|
2615
|
+
else
|
|
2616
|
+
delete process.env.OMX_TEAM_AUTO_ACCEPT_BYPASS;
|
|
2617
|
+
}
|
|
2618
|
+
});
|
|
2619
|
+
it('returns false on timeout or tmux command failure', async () => {
|
|
2620
|
+
await withMockTmuxFixture('omx-tmux-worker-ready-async-capture-failure-', (logPath) => `#!/bin/sh
|
|
2621
|
+
set -eu
|
|
2622
|
+
printf '%s\n' "$*" >> "${logPath}"
|
|
2623
|
+
case "$1" in
|
|
2624
|
+
capture-pane)
|
|
2625
|
+
exit 1
|
|
2626
|
+
;;
|
|
2627
|
+
*)
|
|
2628
|
+
exit 0
|
|
2629
|
+
;;
|
|
2630
|
+
esac
|
|
2631
|
+
`, async () => {
|
|
2632
|
+
assert.equal(await waitForWorkerReadyAsync('omx-team-x', 1, 1), false);
|
|
2633
|
+
});
|
|
2634
|
+
await withEmptyPath(async () => {
|
|
2635
|
+
assert.equal(await waitForWorkerReadyAsync('omx-team-x', 1, 1), false);
|
|
2636
|
+
});
|
|
2637
|
+
});
|
|
2638
|
+
});
|
|
2639
|
+
describe('createTeamSession tmux instance tagging', () => {
|
|
2640
|
+
it('tags leader, worker, and HUD panes with pane-scoped instance ownership', async () => {
|
|
2641
|
+
const cwd = await mkdtemp(join(tmpdir(), 'omx-team-pane-tags-'));
|
|
2642
|
+
const prevTmux = process.env.TMUX;
|
|
2643
|
+
const prevTmuxPane = process.env.TMUX_PANE;
|
|
2644
|
+
const prevSessionId = process.env.OMX_SESSION_ID;
|
|
2645
|
+
const prevWorkerCli = process.env.OMX_TEAM_WORKER_CLI;
|
|
2646
|
+
try {
|
|
2647
|
+
await withMockTmuxFixture('omx-tmux-pane-tags-', (logPath) => `#!/bin/sh
|
|
2648
|
+
set -eu
|
|
2649
|
+
printf '%s\n' "$*" >> "${logPath}"
|
|
2650
|
+
case "\${1:-}" in
|
|
2651
|
+
-V)
|
|
2652
|
+
echo "tmux 3.4"
|
|
2653
|
+
exit 0
|
|
2654
|
+
;;
|
|
2655
|
+
display-message)
|
|
2656
|
+
case "$*" in
|
|
2657
|
+
*"#{window_width}"*)
|
|
2658
|
+
echo "120"
|
|
2659
|
+
;;
|
|
2660
|
+
*)
|
|
2661
|
+
echo "shared:0 %1"
|
|
2662
|
+
;;
|
|
2663
|
+
esac
|
|
2664
|
+
exit 0
|
|
2665
|
+
;;
|
|
2666
|
+
list-panes)
|
|
2667
|
+
case "$*" in
|
|
2668
|
+
*"pane_current_command"*)
|
|
2669
|
+
printf "%%1\\tnode\\t'codex'\\n"
|
|
2670
|
+
;;
|
|
2671
|
+
*)
|
|
2672
|
+
printf "%%1\\n"
|
|
2673
|
+
;;
|
|
2674
|
+
esac
|
|
2675
|
+
exit 0
|
|
2676
|
+
;;
|
|
2677
|
+
split-window)
|
|
2678
|
+
case "$*" in
|
|
2679
|
+
*" -h "*)
|
|
2680
|
+
echo "%2"
|
|
2681
|
+
;;
|
|
2682
|
+
*)
|
|
2683
|
+
echo "%3"
|
|
2684
|
+
;;
|
|
2685
|
+
esac
|
|
2686
|
+
exit 0
|
|
2687
|
+
;;
|
|
2688
|
+
set-option|resize-pane|select-layout|set-window-option|select-pane|set-hook|run-shell)
|
|
2689
|
+
exit 0
|
|
2690
|
+
;;
|
|
2691
|
+
*)
|
|
2692
|
+
exit 0
|
|
2693
|
+
;;
|
|
2694
|
+
esac
|
|
2695
|
+
`, async ({ logPath }) => {
|
|
2696
|
+
const fakeBinDir = join(logPath, '..');
|
|
2697
|
+
const geminiPath = join(fakeBinDir, 'gemini');
|
|
2698
|
+
await writeFile(geminiPath, '#!/bin/sh\nexit 0\n');
|
|
2699
|
+
await chmod(geminiPath, 0o755);
|
|
2700
|
+
process.env.TMUX = '1';
|
|
2701
|
+
process.env.TMUX_PANE = '%1';
|
|
2702
|
+
process.env.OMX_SESSION_ID = 'omx-pane-scope';
|
|
2703
|
+
process.env.OMX_TEAM_WORKER_CLI = 'gemini';
|
|
2704
|
+
const session = createTeamSession('Pane Tags', 1, cwd);
|
|
2705
|
+
assert.equal(session.name, 'shared:0');
|
|
2706
|
+
assert.equal(session.leaderPaneId, '%1');
|
|
2707
|
+
assert.deepEqual(session.workerPaneIds, ['%2']);
|
|
2708
|
+
assert.equal(session.hudPaneId, '%3');
|
|
2709
|
+
const tmuxLog = await readFile(logPath, 'utf-8');
|
|
2710
|
+
assert.match(tmuxLog, /set-option -t shared @omx_instance_id omx-pane-scope/);
|
|
2711
|
+
assert.match(tmuxLog, /set-option -p -t %1 @omx_pane_instance_id omx-pane-scope/);
|
|
2712
|
+
assert.match(tmuxLog, /set-option -p -t %2 @omx_pane_instance_id omx-pane-scope/);
|
|
2713
|
+
assert.match(tmuxLog, /set-option -p -t %3 @omx_pane_instance_id omx-pane-scope/);
|
|
2714
|
+
});
|
|
2715
|
+
}
|
|
2716
|
+
finally {
|
|
2717
|
+
if (typeof prevTmux === 'string')
|
|
2718
|
+
process.env.TMUX = prevTmux;
|
|
2719
|
+
else
|
|
2720
|
+
delete process.env.TMUX;
|
|
2721
|
+
if (typeof prevTmuxPane === 'string')
|
|
2722
|
+
process.env.TMUX_PANE = prevTmuxPane;
|
|
2723
|
+
else
|
|
2724
|
+
delete process.env.TMUX_PANE;
|
|
2725
|
+
if (typeof prevSessionId === 'string')
|
|
2726
|
+
process.env.OMX_SESSION_ID = prevSessionId;
|
|
2727
|
+
else
|
|
2728
|
+
delete process.env.OMX_SESSION_ID;
|
|
2729
|
+
if (typeof prevWorkerCli === 'string')
|
|
2730
|
+
process.env.OMX_TEAM_WORKER_CLI = prevWorkerCli;
|
|
2731
|
+
else
|
|
2732
|
+
delete process.env.OMX_TEAM_WORKER_CLI;
|
|
2733
|
+
await rm(cwd, { recursive: true, force: true });
|
|
2734
|
+
}
|
|
2735
|
+
});
|
|
2736
|
+
});
|
|
2340
2737
|
describe('native Windows HUD reconciliation', () => {
|
|
2341
2738
|
it('allows team startup on native Windows when current tmux client is reachable without TMUX env vars', async () => {
|
|
2342
2739
|
const cwd = await mkdtemp(join(tmpdir(), 'omx-team-win32-no-env-'));
|