oh-my-codex 0.20.2 → 0.20.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.lock +7 -6
- package/Cargo.toml +1 -1
- package/README.md +26 -0
- package/crates/omx-runtime/Cargo.toml +1 -0
- package/crates/omx-runtime/src/main.rs +25 -2
- package/crates/omx-runtime/tests/execution.rs +219 -0
- package/crates/omx-runtime-core/src/dispatch.rs +96 -10
- package/crates/omx-runtime-core/src/engine.rs +839 -29
- package/crates/omx-runtime-core/src/lib.rs +8 -0
- package/dist/agents/__tests__/definitions.test.js +81 -0
- package/dist/agents/__tests__/definitions.test.js.map +1 -1
- package/dist/agents/__tests__/native-config.test.js +25 -0
- package/dist/agents/__tests__/native-config.test.js.map +1 -1
- package/dist/agents/native-config.d.ts +2 -1
- package/dist/agents/native-config.d.ts.map +1 -1
- package/dist/agents/native-config.js.map +1 -1
- package/dist/auth/hotswap.d.ts +6 -0
- package/dist/auth/hotswap.d.ts.map +1 -1
- package/dist/auth/hotswap.js +85 -15
- package/dist/auth/hotswap.js.map +1 -1
- package/dist/autopilot/__tests__/ralplan-gate.test.js +1 -1
- package/dist/autopilot/__tests__/ralplan-gate.test.js.map +1 -1
- package/dist/cli/__tests__/auth.test.js +60 -6
- package/dist/cli/__tests__/auth.test.js.map +1 -1
- package/dist/cli/__tests__/codex-plugin-layout.test.js +80 -0
- package/dist/cli/__tests__/codex-plugin-layout.test.js.map +1 -1
- package/dist/cli/__tests__/doctor-warning-copy.test.js +103 -1
- package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
- package/dist/cli/__tests__/exec.test.js +136 -0
- package/dist/cli/__tests__/exec.test.js.map +1 -1
- package/dist/cli/__tests__/index.test.js +258 -4
- package/dist/cli/__tests__/index.test.js.map +1 -1
- package/dist/cli/__tests__/launch-fallback.test.js +287 -1
- package/dist/cli/__tests__/launch-fallback.test.js.map +1 -1
- package/dist/cli/__tests__/mcp-parity.test.js +4 -1
- package/dist/cli/__tests__/mcp-parity.test.js.map +1 -1
- package/dist/cli/__tests__/native-hook-claim-journal.test.js +84 -6
- package/dist/cli/__tests__/native-hook-claim-journal.test.js.map +1 -1
- package/dist/cli/__tests__/ralph-goal-mode-contract.test.js +3 -3
- package/dist/cli/__tests__/ralph-goal-mode-contract.test.js.map +1 -1
- package/dist/cli/__tests__/ralph.test.js +3 -3
- package/dist/cli/__tests__/ralph.test.js.map +1 -1
- package/dist/cli/__tests__/ralplan-bootstrap-3181.test.js +56 -171
- package/dist/cli/__tests__/ralplan-bootstrap-3181.test.js.map +1 -1
- package/dist/cli/__tests__/ralplan.test.js +37 -111
- package/dist/cli/__tests__/ralplan.test.js.map +1 -1
- package/dist/cli/__tests__/resume.test.js +11 -10
- package/dist/cli/__tests__/resume.test.js.map +1 -1
- package/dist/cli/__tests__/session-search-help.test.js +25 -1
- package/dist/cli/__tests__/session-search-help.test.js.map +1 -1
- package/dist/cli/__tests__/setup-install-mode.test.js +42 -4
- package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -1
- package/dist/cli/__tests__/team.test.js +105 -7
- package/dist/cli/__tests__/team.test.js.map +1 -1
- package/dist/cli/__tests__/uninstall.test.js +46 -0
- package/dist/cli/__tests__/uninstall.test.js.map +1 -1
- package/dist/cli/__tests__/windows-popup-loop-contract.test.js +2 -1
- package/dist/cli/__tests__/windows-popup-loop-contract.test.js.map +1 -1
- package/dist/cli/doctor.d.ts +3 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +15 -2
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.d.ts +4 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +138 -38
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/mcp-parity.js +2 -2
- package/dist/cli/mcp-parity.js.map +1 -1
- package/dist/cli/native-hook-claim-journal.d.ts +16 -5
- package/dist/cli/native-hook-claim-journal.d.ts.map +1 -1
- package/dist/cli/native-hook-claim-journal.js +42 -29
- package/dist/cli/native-hook-claim-journal.js.map +1 -1
- package/dist/cli/ralph.js +2 -2
- package/dist/cli/ralph.js.map +1 -1
- package/dist/cli/ralplan.d.ts +4 -8
- package/dist/cli/ralplan.d.ts.map +1 -1
- package/dist/cli/ralplan.js +19 -112
- package/dist/cli/ralplan.js.map +1 -1
- package/dist/cli/session-search.d.ts +5 -0
- package/dist/cli/session-search.d.ts.map +1 -1
- package/dist/cli/session-search.js +87 -0
- package/dist/cli/session-search.js.map +1 -1
- package/dist/cli/setup.d.ts +5 -0
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +80 -31
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/uninstall.d.ts +9 -0
- package/dist/cli/uninstall.d.ts.map +1 -1
- package/dist/cli/uninstall.js +61 -19
- package/dist/cli/uninstall.js.map +1 -1
- package/dist/compat/__tests__/rust-runtime-compat.test.js +1 -1
- package/dist/config/__tests__/generator-idempotent.test.js +330 -1
- package/dist/config/__tests__/generator-idempotent.test.js.map +1 -1
- package/dist/config/__tests__/generator-notify.test.js +2 -2
- package/dist/config/__tests__/generator-notify.test.js.map +1 -1
- package/dist/config/__tests__/models.test.js +67 -3
- package/dist/config/__tests__/models.test.js.map +1 -1
- package/dist/config/generator.d.ts +4 -20
- package/dist/config/generator.d.ts.map +1 -1
- package/dist/config/generator.js +499 -119
- package/dist/config/generator.js.map +1 -1
- package/dist/config/models.d.ts +12 -2
- package/dist/config/models.d.ts.map +1 -1
- package/dist/config/models.js +15 -1
- package/dist/config/models.js.map +1 -1
- package/dist/hooks/__tests__/agents-overlay.test.js +2 -2
- package/dist/hooks/__tests__/agents-overlay.test.js.map +1 -1
- package/dist/hooks/__tests__/keyword-detector.test.js +4 -4
- package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js +238 -543
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js +38 -4
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js +96 -9
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js +531 -12
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js +155 -23
- 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 +482 -32
- package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-tmux-heal.test.js +68 -1
- package/dist/hooks/__tests__/notify-hook-tmux-heal.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-tmux-scrollback.test.js +7 -1
- package/dist/hooks/__tests__/notify-hook-tmux-scrollback.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js +43 -4
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js.map +1 -1
- package/dist/hooks/__tests__/session.test.js +348 -2
- package/dist/hooks/__tests__/session.test.js.map +1 -1
- package/dist/hooks/agents-overlay.js +1 -1
- package/dist/hooks/session.d.ts +26 -2
- package/dist/hooks/session.d.ts.map +1 -1
- package/dist/hooks/session.js +169 -13
- package/dist/hooks/session.js.map +1 -1
- package/dist/leader/__tests__/contract.test.js +57 -7
- package/dist/leader/__tests__/contract.test.js.map +1 -1
- package/dist/leader/contract.d.ts +16 -0
- package/dist/leader/contract.d.ts.map +1 -1
- package/dist/leader/contract.js +79 -4
- package/dist/leader/contract.js.map +1 -1
- package/dist/mcp/__tests__/code-intel-server.test.js +31 -3
- package/dist/mcp/__tests__/code-intel-server.test.js.map +1 -1
- package/dist/mcp/__tests__/wiki-server.test.js +18 -0
- package/dist/mcp/__tests__/wiki-server.test.js.map +1 -1
- package/dist/mcp/code-intel-server.d.ts.map +1 -1
- package/dist/mcp/code-intel-server.js +13 -3
- package/dist/mcp/code-intel-server.js.map +1 -1
- package/dist/mcp/wiki-server.d.ts +11 -0
- package/dist/mcp/wiki-server.d.ts.map +1 -1
- package/dist/mcp/wiki-server.js +9 -2
- package/dist/mcp/wiki-server.js.map +1 -1
- package/dist/modes/__tests__/base-tmux-pane.test.js +4 -4
- package/dist/modes/__tests__/base-tmux-pane.test.js.map +1 -1
- package/dist/notifications/temp-contract.d.ts.map +1 -1
- package/dist/notifications/temp-contract.js +4 -0
- package/dist/notifications/temp-contract.js.map +1 -1
- package/dist/pipeline/__tests__/orchestrator.test.js +4 -4
- package/dist/pipeline/__tests__/orchestrator.test.js.map +1 -1
- package/dist/pipeline/__tests__/stages.test.js +8 -8
- package/dist/pipeline/__tests__/stages.test.js.map +1 -1
- package/dist/ralplan/__tests__/consensus-gate.test.js +134 -10
- package/dist/ralplan/__tests__/consensus-gate.test.js.map +1 -1
- package/dist/ralplan/__tests__/documented-leader-preflight.test.d.ts +2 -0
- package/dist/ralplan/__tests__/documented-leader-preflight.test.d.ts.map +1 -0
- package/dist/ralplan/__tests__/documented-leader-preflight.test.js +46 -0
- package/dist/ralplan/__tests__/documented-leader-preflight.test.js.map +1 -0
- package/dist/ralplan/__tests__/runtime.test.js +8 -4
- package/dist/ralplan/__tests__/runtime.test.js.map +1 -1
- package/dist/ralplan/consensus-gate.d.ts.map +1 -1
- package/dist/ralplan/consensus-gate.js +58 -50
- package/dist/ralplan/consensus-gate.js.map +1 -1
- package/dist/ralplan/documented-leader-preflight.d.ts +34 -0
- package/dist/ralplan/documented-leader-preflight.d.ts.map +1 -0
- package/dist/ralplan/documented-leader-preflight.js +58 -0
- package/dist/ralplan/documented-leader-preflight.js.map +1 -0
- package/dist/ralplan/runtime.d.ts +1 -0
- package/dist/ralplan/runtime.d.ts.map +1 -1
- package/dist/ralplan/runtime.js +11 -7
- package/dist/ralplan/runtime.js.map +1 -1
- package/dist/runtime/__tests__/bridge.test.js +42 -1
- package/dist/runtime/__tests__/bridge.test.js.map +1 -1
- package/dist/runtime/bridge.d.ts +12 -0
- package/dist/runtime/bridge.d.ts.map +1 -1
- package/dist/runtime/bridge.js +52 -1
- package/dist/runtime/bridge.js.map +1 -1
- package/dist/scripts/__tests__/codex-native-hook.test.js +2620 -487
- package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
- package/dist/scripts/__tests__/reasoning-artifact-contract.test.d.ts +2 -0
- package/dist/scripts/__tests__/reasoning-artifact-contract.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/reasoning-artifact-contract.test.js +108 -0
- package/dist/scripts/__tests__/reasoning-artifact-contract.test.js.map +1 -0
- package/dist/scripts/__tests__/role-intent-bootstrap-e2e-3181.test.js +46 -173
- package/dist/scripts/__tests__/role-intent-bootstrap-e2e-3181.test.js.map +1 -1
- package/dist/scripts/__tests__/role-intent-durable-recovery-3181.test.js +39 -159
- package/dist/scripts/__tests__/role-intent-durable-recovery-3181.test.js.map +1 -1
- package/dist/scripts/__tests__/smoke-packed-install.test.js +254 -2
- package/dist/scripts/__tests__/smoke-packed-install.test.js.map +1 -1
- package/dist/scripts/codex-native-hook.d.ts +4 -1
- package/dist/scripts/codex-native-hook.d.ts.map +1 -1
- package/dist/scripts/codex-native-hook.js +11013 -1153
- package/dist/scripts/codex-native-hook.js.map +1 -1
- package/dist/scripts/notify-fallback-watcher.js +82 -108
- package/dist/scripts/notify-fallback-watcher.js.map +1 -1
- package/dist/scripts/notify-hook/auto-nudge.d.ts.map +1 -1
- package/dist/scripts/notify-hook/auto-nudge.js +74 -3
- package/dist/scripts/notify-hook/auto-nudge.js.map +1 -1
- package/dist/scripts/notify-hook/team-dispatch.d.ts +9 -0
- package/dist/scripts/notify-hook/team-dispatch.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-dispatch.js +234 -79
- package/dist/scripts/notify-hook/team-dispatch.js.map +1 -1
- package/dist/scripts/notify-hook/team-leader-nudge.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-leader-nudge.js +39 -13
- package/dist/scripts/notify-hook/team-leader-nudge.js.map +1 -1
- package/dist/scripts/notify-hook/team-tmux-guard.d.ts +12 -4
- package/dist/scripts/notify-hook/team-tmux-guard.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-tmux-guard.js +365 -44
- package/dist/scripts/notify-hook/team-tmux-guard.js.map +1 -1
- package/dist/scripts/notify-hook/team-worker-stop.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-worker-stop.js +19 -18
- package/dist/scripts/notify-hook/team-worker-stop.js.map +1 -1
- package/dist/scripts/notify-hook/team-worker.d.ts +3 -0
- package/dist/scripts/notify-hook/team-worker.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-worker.js +37 -28
- 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 +28 -2
- package/dist/scripts/notify-hook/tmux-injection.js.map +1 -1
- package/dist/scripts/notify-hook.js +1 -0
- package/dist/scripts/notify-hook.js.map +1 -1
- package/dist/scripts/smoke-packed-install.d.ts +48 -3
- package/dist/scripts/smoke-packed-install.d.ts.map +1 -1
- package/dist/scripts/smoke-packed-install.js +2796 -13
- package/dist/scripts/smoke-packed-install.js.map +1 -1
- package/dist/state/__tests__/mode-state-context.test.js +54 -0
- package/dist/state/__tests__/mode-state-context.test.js.map +1 -1
- package/dist/state/__tests__/operations.test.js +2 -0
- package/dist/state/__tests__/operations.test.js.map +1 -1
- package/dist/state/mode-state-context.d.ts +5 -0
- package/dist/state/mode-state-context.d.ts.map +1 -1
- package/dist/state/mode-state-context.js +59 -0
- package/dist/state/mode-state-context.js.map +1 -1
- package/dist/subagents/__tests__/leader-bootstrap-3181.test.js +24 -245
- package/dist/subagents/__tests__/leader-bootstrap-3181.test.js.map +1 -1
- package/dist/subagents/tracker.d.ts +1 -82
- package/dist/subagents/tracker.d.ts.map +1 -1
- package/dist/subagents/tracker.js +3 -275
- package/dist/subagents/tracker.js.map +1 -1
- package/dist/team/__tests__/api-interop.test.js +91 -1
- package/dist/team/__tests__/api-interop.test.js.map +1 -1
- package/dist/team/__tests__/delivery-e2e-smoke.test.js +52 -10
- package/dist/team/__tests__/delivery-e2e-smoke.test.js.map +1 -1
- package/dist/team/__tests__/idle-nudge.test.js +45 -15
- package/dist/team/__tests__/idle-nudge.test.js.map +1 -1
- package/dist/team/__tests__/mcp-comm.test.js +93 -27
- package/dist/team/__tests__/mcp-comm.test.js.map +1 -1
- package/dist/team/__tests__/model-contract.test.js +110 -3
- package/dist/team/__tests__/model-contract.test.js.map +1 -1
- package/dist/team/__tests__/runtime-cli.test.js +9 -0
- package/dist/team/__tests__/runtime-cli.test.js.map +1 -1
- package/dist/team/__tests__/runtime.test.js +3204 -335
- package/dist/team/__tests__/runtime.test.js.map +1 -1
- package/dist/team/__tests__/scaling.test.js +2359 -142
- package/dist/team/__tests__/scaling.test.js.map +1 -1
- package/dist/team/__tests__/state.test.js +804 -36
- package/dist/team/__tests__/state.test.js.map +1 -1
- package/dist/team/__tests__/team-ops-contract.test.js +6 -0
- package/dist/team/__tests__/team-ops-contract.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.test.js +3049 -784
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/__tests__/worker-runtime-identity.test.js +38 -2
- package/dist/team/__tests__/worker-runtime-identity.test.js.map +1 -1
- package/dist/team/__tests__/worktree.test.js +6 -0
- package/dist/team/__tests__/worktree.test.js.map +1 -1
- package/dist/team/api-interop.d.ts.map +1 -1
- package/dist/team/api-interop.js +15 -9
- package/dist/team/api-interop.js.map +1 -1
- package/dist/team/exact-pane.d.ts +23 -0
- package/dist/team/exact-pane.d.ts.map +1 -0
- package/dist/team/exact-pane.js +133 -0
- package/dist/team/exact-pane.js.map +1 -0
- package/dist/team/idle-nudge.d.ts +12 -1
- package/dist/team/idle-nudge.d.ts.map +1 -1
- package/dist/team/idle-nudge.js +41 -14
- package/dist/team/idle-nudge.js.map +1 -1
- package/dist/team/model-contract.d.ts +2 -5
- package/dist/team/model-contract.d.ts.map +1 -1
- package/dist/team/model-contract.js +59 -17
- package/dist/team/model-contract.js.map +1 -1
- package/dist/team/runtime.d.ts +1 -0
- package/dist/team/runtime.d.ts.map +1 -1
- package/dist/team/runtime.js +1244 -180
- package/dist/team/runtime.js.map +1 -1
- package/dist/team/scaling.d.ts +13 -1
- package/dist/team/scaling.d.ts.map +1 -1
- package/dist/team/scaling.js +1430 -384
- package/dist/team/scaling.js.map +1 -1
- package/dist/team/state/dispatch.d.ts.map +1 -1
- package/dist/team/state/dispatch.js +26 -8
- package/dist/team/state/dispatch.js.map +1 -1
- package/dist/team/state/locks.d.ts.map +1 -1
- package/dist/team/state/locks.js +61 -13
- package/dist/team/state/locks.js.map +1 -1
- package/dist/team/state/tasks.d.ts.map +1 -1
- package/dist/team/state/tasks.js +4 -3
- package/dist/team/state/tasks.js.map +1 -1
- package/dist/team/state.d.ts +67 -1
- package/dist/team/state.d.ts.map +1 -1
- package/dist/team/state.js +636 -129
- package/dist/team/state.js.map +1 -1
- package/dist/team/team-ops.d.ts +5 -0
- package/dist/team/team-ops.d.ts.map +1 -1
- package/dist/team/team-ops.js +4 -0
- package/dist/team/team-ops.js.map +1 -1
- package/dist/team/tmux-session.d.ts +123 -23
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +1250 -291
- package/dist/team/tmux-session.js.map +1 -1
- package/dist/team/worktree.d.ts.map +1 -1
- package/dist/team/worktree.js +4 -0
- package/dist/team/worktree.js.map +1 -1
- package/dist/utils/__tests__/file-durability.test.d.ts +2 -0
- package/dist/utils/__tests__/file-durability.test.d.ts.map +1 -0
- package/dist/utils/__tests__/file-durability.test.js +57 -0
- package/dist/utils/__tests__/file-durability.test.js.map +1 -0
- package/dist/utils/file-durability.d.ts +15 -0
- package/dist/utils/file-durability.d.ts.map +1 -0
- package/dist/utils/file-durability.js +37 -0
- package/dist/utils/file-durability.js.map +1 -0
- package/dist/verification/__tests__/dev-merge-issue-close-workflow.test.js +3 -0
- package/dist/verification/__tests__/dev-merge-issue-close-workflow.test.js.map +1 -1
- package/dist/wiki/lint.d.ts +4 -1
- package/dist/wiki/lint.d.ts.map +1 -1
- package/dist/wiki/lint.js +3 -2
- package/dist/wiki/lint.js.map +1 -1
- package/package.json +1 -1
- package/plugins/oh-my-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/oh-my-codex/hooks/codex-native-hook.mjs +24 -0
- package/plugins/oh-my-codex/skills/ralph/SKILL.md +6 -4
- package/plugins/oh-my-codex/skills/ralplan/SKILL.md +3 -2
- package/plugins/oh-my-codex/skills/team/SKILL.md +13 -9
- package/skills/ralph/SKILL.md +6 -4
- package/skills/ralplan/SKILL.md +3 -2
- package/skills/team/SKILL.md +13 -9
- package/src/scripts/__tests__/codex-native-hook.test.ts +2826 -497
- package/src/scripts/__tests__/reasoning-artifact-contract.test.ts +129 -0
- package/src/scripts/__tests__/role-intent-bootstrap-e2e-3181.test.ts +48 -185
- package/src/scripts/__tests__/role-intent-durable-recovery-3181.test.ts +44 -177
- package/src/scripts/__tests__/smoke-packed-install.test.ts +320 -2
- package/src/scripts/codex-native-hook.ts +10715 -1069
- package/src/scripts/notify-fallback-watcher.ts +84 -115
- package/src/scripts/notify-hook/auto-nudge.ts +71 -3
- package/src/scripts/notify-hook/team-dispatch.ts +242 -75
- package/src/scripts/notify-hook/team-leader-nudge.ts +40 -18
- package/src/scripts/notify-hook/team-tmux-guard.ts +366 -39
- package/src/scripts/notify-hook/team-worker-stop.ts +20 -16
- package/src/scripts/notify-hook/team-worker.ts +39 -26
- package/src/scripts/notify-hook/tmux-injection.ts +28 -2
- package/src/scripts/notify-hook.ts +1 -0
- package/src/scripts/smoke-packed-install.ts +3196 -14
- package/dist/subagents/__tests__/adapted-role-binding.test.d.ts +0 -2
- package/dist/subagents/__tests__/adapted-role-binding.test.d.ts.map +0 -1
- package/dist/subagents/__tests__/adapted-role-binding.test.js +0 -988
- package/dist/subagents/__tests__/adapted-role-binding.test.js.map +0 -1
- package/dist/subagents/adapted-role-binding.d.ts +0 -17
- package/dist/subagents/adapted-role-binding.d.ts.map +0 -1
- package/dist/subagents/adapted-role-binding.js +0 -75
- package/dist/subagents/adapted-role-binding.js.map +0 -1
|
@@ -1147,6 +1147,12 @@ describe('teamCommand shutdown --force parsing', () => {
|
|
|
1147
1147
|
await mkdir(join(wd, '.omx', 'state'), { recursive: true });
|
|
1148
1148
|
await writeFile(join(wd, '.omx', 'state', 'session.json'), JSON.stringify({ session_id: 'sess-team-shutdown-state' }));
|
|
1149
1149
|
await initTeamState('team-shutdown-mode-state', 'persist cancelled team mode state after shutdown', 'executor', 1, wd);
|
|
1150
|
+
const config = await readTeamConfig('team-shutdown-mode-state', wd);
|
|
1151
|
+
assert.ok(config);
|
|
1152
|
+
if (!config)
|
|
1153
|
+
return;
|
|
1154
|
+
config.tmux_session = '';
|
|
1155
|
+
await saveTeamConfig(config, wd);
|
|
1150
1156
|
console.log = (...args) => logs.push(args.map(String).join(' '));
|
|
1151
1157
|
console.warn = (...args) => warns.push(args.map(String).join(' '));
|
|
1152
1158
|
await teamCommand(['shutdown', 'team-shutdown-mode-state', '--force']);
|
|
@@ -1183,6 +1189,12 @@ describe('teamCommand shutdown --force parsing', () => {
|
|
|
1183
1189
|
team_name: teamName,
|
|
1184
1190
|
}, null, 2));
|
|
1185
1191
|
await initTeamState(teamName, 'persist cancelled session-scoped team mode state after shutdown', 'executor', 1, wd);
|
|
1192
|
+
const config = await readTeamConfig(teamName, wd);
|
|
1193
|
+
assert.ok(config);
|
|
1194
|
+
if (!config)
|
|
1195
|
+
return;
|
|
1196
|
+
config.tmux_session = '';
|
|
1197
|
+
await saveTeamConfig(config, wd);
|
|
1186
1198
|
await teamCommand(['shutdown', teamName, '--force']);
|
|
1187
1199
|
const scopedState = JSON.parse(await readFile(join(scopedStateDir, 'team-state.json'), 'utf-8'));
|
|
1188
1200
|
assert.equal(scopedState.active, false);
|
|
@@ -1213,6 +1225,12 @@ describe('teamCommand shutdown --force parsing', () => {
|
|
|
1213
1225
|
team_name: teamName,
|
|
1214
1226
|
}, null, 2));
|
|
1215
1227
|
await initTeamState(teamName, 'shutdown should not create scoped team mode state from a root-only mode state', 'executor', 1, wd);
|
|
1228
|
+
const config = await readTeamConfig(teamName, wd);
|
|
1229
|
+
assert.ok(config);
|
|
1230
|
+
if (!config)
|
|
1231
|
+
return;
|
|
1232
|
+
config.tmux_session = '';
|
|
1233
|
+
await saveTeamConfig(config, wd);
|
|
1216
1234
|
await teamCommand(['shutdown', teamName, '--force']);
|
|
1217
1235
|
assert.equal(existsSync(scopedStatePath), false);
|
|
1218
1236
|
const rootState = JSON.parse(await readFile(join(stateDir, 'team-state.json'), 'utf-8'));
|
|
@@ -1245,6 +1263,12 @@ describe('teamCommand shutdown --force parsing', () => {
|
|
|
1245
1263
|
team_name: teamName,
|
|
1246
1264
|
}, null, 2));
|
|
1247
1265
|
await initTeamState(teamName, 'shutdown should ignore stale session.json when only root team mode state exists', 'executor', 1, wd);
|
|
1266
|
+
const config = await readTeamConfig(teamName, wd);
|
|
1267
|
+
assert.ok(config);
|
|
1268
|
+
if (!config)
|
|
1269
|
+
return;
|
|
1270
|
+
config.tmux_session = '';
|
|
1271
|
+
await saveTeamConfig(config, wd);
|
|
1248
1272
|
await teamCommand(['shutdown', teamName, '--force']);
|
|
1249
1273
|
assert.equal(existsSync(scopedStatePath), false);
|
|
1250
1274
|
const rootState = JSON.parse(await readFile(join(stateDir, 'team-state.json'), 'utf-8'));
|
|
@@ -1266,6 +1290,8 @@ describe('teamCommand shutdown --force parsing', () => {
|
|
|
1266
1290
|
const wd = await mkdtemp(join(tmpdir(), 'omx-team-shutdown-shared-cli-'));
|
|
1267
1291
|
const binDir = join(wd, 'bin');
|
|
1268
1292
|
const tmuxLogPath = join(wd, 'tmux.log');
|
|
1293
|
+
const killedHudPanePath = join(wd, 'killed-hud-pane');
|
|
1294
|
+
const restoredHudPanePath = join(wd, 'restored-hud-pane');
|
|
1269
1295
|
const tmuxPath = join(binDir, 'tmux');
|
|
1270
1296
|
const previousPath = process.env.PATH;
|
|
1271
1297
|
await mkdir(binDir, { recursive: true });
|
|
@@ -1279,15 +1305,27 @@ case "$1" in
|
|
|
1279
1305
|
;;
|
|
1280
1306
|
list-panes)
|
|
1281
1307
|
case "$*" in
|
|
1308
|
+
"list-panes -a -F #{pane_id}\t#{pane_dead}\t#{pane_pid}")
|
|
1309
|
+
printf "%%11\t0\t1111\n"
|
|
1310
|
+
[ -f "${killedHudPanePath}" ] || printf "%%12\t0\t1212\n"
|
|
1311
|
+
[ -f "${wd}/killed-pane-%13" ] || printf "%%13\t0\t1313\n"
|
|
1312
|
+
[ -f "${wd}/killed-pane-%14" ] || printf "%%14\t0\t1414\n"
|
|
1313
|
+
[ ! -f "${restoredHudPanePath}" ] || printf "%%44\t0\t4444\n"
|
|
1314
|
+
exit 0
|
|
1315
|
+
;;
|
|
1316
|
+
|
|
1282
1317
|
*"-F #{pane_dead} #{pane_pid}"*)
|
|
1283
1318
|
exit 1
|
|
1284
1319
|
;;
|
|
1285
|
-
*"-
|
|
1286
|
-
printf "%%11
|
|
1320
|
+
*"-F #{pane_id}\t#{pane_current_command}\t#{pane_start_command}"*)
|
|
1321
|
+
printf "%%11\tzsh\tzsh\n%%12\tnode\tnode /tmp/bin/omx.js hud --watch\n%%13\tcodex\tenv OMX_TEAM_INTERNAL_WORKER=shared-shutdown-cli/worker-1 codex\n%%14\tcodex\tenv OMX_TEAM_INTERNAL_WORKER=shared-shutdown-cli/worker-2 codex\n"
|
|
1322
|
+
if [ -f "${restoredHudPanePath}" ]; then
|
|
1323
|
+
printf "%%44\tnode\tenv OMX_TMUX_HUD_OWNER=1 OMX_TMUX_HUD_LEADER_PANE=%%11 node /tmp/bin/omx.js hud --watch\n"
|
|
1324
|
+
fi
|
|
1287
1325
|
exit 0
|
|
1288
1326
|
;;
|
|
1289
|
-
*"-
|
|
1290
|
-
printf "%%11
|
|
1327
|
+
*"-F #{pane_id}"*)
|
|
1328
|
+
printf "%%11\n%%12\n%%13\n%%14\n"
|
|
1291
1329
|
exit 0
|
|
1292
1330
|
;;
|
|
1293
1331
|
*)
|
|
@@ -1296,7 +1334,8 @@ case "$1" in
|
|
|
1296
1334
|
esac
|
|
1297
1335
|
;;
|
|
1298
1336
|
split-window)
|
|
1299
|
-
|
|
1337
|
+
: > "${restoredHudPanePath}"
|
|
1338
|
+
printf '%%44\n'
|
|
1300
1339
|
exit 0
|
|
1301
1340
|
;;
|
|
1302
1341
|
show-option)
|
|
@@ -1307,6 +1346,15 @@ case "$1" in
|
|
|
1307
1346
|
*"-p -t %12 @omx_team_pane_owner_id"*)
|
|
1308
1347
|
echo "team:shared-shutdown-cli"
|
|
1309
1348
|
;;
|
|
1349
|
+
*"-p -t %13 @omx_team_pane_owner_id"*)
|
|
1350
|
+
echo "team:shared-shutdown-cli"
|
|
1351
|
+
;;
|
|
1352
|
+
*"-p -t %14 @omx_team_pane_owner_id"*)
|
|
1353
|
+
echo "team:shared-shutdown-cli"
|
|
1354
|
+
;;
|
|
1355
|
+
*"-p -t %44 @omx_team_pane_owner_id"*)
|
|
1356
|
+
echo "team:shared-shutdown-cli"
|
|
1357
|
+
;;
|
|
1310
1358
|
*)
|
|
1311
1359
|
exit 1
|
|
1312
1360
|
;;
|
|
@@ -1314,6 +1362,10 @@ case "$1" in
|
|
|
1314
1362
|
exit 0
|
|
1315
1363
|
;;
|
|
1316
1364
|
kill-pane)
|
|
1365
|
+
case "$3" in
|
|
1366
|
+
%12) : > "${killedHudPanePath}" ;;
|
|
1367
|
+
%13|%14) : > "${wd}/killed-pane-$3" ;;
|
|
1368
|
+
esac
|
|
1317
1369
|
# Shared-session runtime coverage should validate pane-targeted teardown
|
|
1318
1370
|
# only. Detached leader-wrapper signal behavior is covered separately in
|
|
1319
1371
|
# cli/index detached-session tests.
|
|
@@ -1336,9 +1388,14 @@ esac
|
|
|
1336
1388
|
return;
|
|
1337
1389
|
config.tmux_session = 'leader:0';
|
|
1338
1390
|
config.leader_pane_id = '%11';
|
|
1391
|
+
config.leader_pane_pid = 1111;
|
|
1339
1392
|
config.hud_pane_id = '%12';
|
|
1393
|
+
config.hud_pane_pid = 1212;
|
|
1394
|
+
config.tmux_pane_owner_id = 'team:shared-shutdown-cli';
|
|
1340
1395
|
config.workers[0].pane_id = '%13';
|
|
1396
|
+
config.workers[0].pid = 1313;
|
|
1341
1397
|
config.workers[1].pane_id = '%14';
|
|
1398
|
+
config.workers[1].pid = 1414;
|
|
1342
1399
|
await saveTeamConfig(config, wd);
|
|
1343
1400
|
const result = await runNodeCli(['team', 'shutdown', 'shared-shutdown-cli', '--force'], {
|
|
1344
1401
|
cwd: wd,
|
|
@@ -1357,6 +1414,16 @@ esac
|
|
|
1357
1414
|
assert.match(tmuxLog, /kill-pane -t %13/);
|
|
1358
1415
|
assert.match(tmuxLog, /kill-pane -t %14/);
|
|
1359
1416
|
assert.doesNotMatch(tmuxLog, /kill-pane -t %11/);
|
|
1417
|
+
const tmuxCommands = tmuxLog.trim().split('\n').filter(Boolean);
|
|
1418
|
+
const exactGlobalPaneProof = /^list-panes -a -F #\{pane_id\}\t#\{pane_dead\}\t#\{pane_pid\}$/;
|
|
1419
|
+
for (const paneId of ['%12', '%13', '%14']) {
|
|
1420
|
+
const killIndex = tmuxCommands.indexOf(`kill-pane -t ${paneId}`);
|
|
1421
|
+
assert.ok(killIndex > 2, `expected teardown for ${paneId}`);
|
|
1422
|
+
assert.match(tmuxCommands[killIndex - 3] ?? '', exactGlobalPaneProof, `${paneId} teardown must begin with a fresh exact global proof`);
|
|
1423
|
+
assert.equal(tmuxCommands[killIndex - 2], `show-option -qv -p -t ${paneId} @omx_team_pane_owner_id`, `${paneId} teardown must include adjacent owner authorization`);
|
|
1424
|
+
assert.match(tmuxCommands[killIndex - 1] ?? '', exactGlobalPaneProof, `${paneId} teardown must end with a final exact global PID proof`);
|
|
1425
|
+
}
|
|
1426
|
+
assert.doesNotMatch(tmuxLog, /list-panes -t %(12|13|14)\b/, 'explicit teardown panes must not use target-scoped fallback proof');
|
|
1360
1427
|
}
|
|
1361
1428
|
finally {
|
|
1362
1429
|
if (typeof previousPath === 'string')
|
|
@@ -1373,9 +1440,29 @@ esac
|
|
|
1373
1440
|
await withTempTmuxSession(async (fixture) => {
|
|
1374
1441
|
const teamName = 'shared-shutdown-in-pane';
|
|
1375
1442
|
const teamStateRoot = join(wd, '.omx', 'state');
|
|
1443
|
+
const runtimeDir = join(teamStateRoot, 'team', teamName, 'runtime');
|
|
1444
|
+
const workerPaneOneScript = join(runtimeDir, 'worker-1-startup.sh');
|
|
1445
|
+
const workerPaneTwoScript = join(runtimeDir, 'worker-2-startup.sh');
|
|
1446
|
+
await mkdir(runtimeDir, { recursive: true });
|
|
1447
|
+
await writeFile(workerPaneOneScript, '#!/bin/sh\nexec sleep 300\n');
|
|
1448
|
+
await writeFile(workerPaneTwoScript, '#!/bin/sh\nexec sleep 300\n');
|
|
1449
|
+
await chmod(workerPaneOneScript, 0o755);
|
|
1450
|
+
await chmod(workerPaneTwoScript, 0o755);
|
|
1376
1451
|
const hudPaneId = runFixtureTmux(fixture, ['split-window', '-d', '-P', '-F', '#{pane_id}', '-t', fixture.windowTarget, 'sleep 300']);
|
|
1377
|
-
const workerPaneOne = runFixtureTmux(fixture, ['split-window', '-d', '-P', '-F', '#{pane_id}', '-t', fixture.windowTarget,
|
|
1378
|
-
const workerPaneTwo = runFixtureTmux(fixture, ['split-window', '-d', '-P', '-F', '#{pane_id}', '-t', fixture.windowTarget,
|
|
1452
|
+
const workerPaneOne = runFixtureTmux(fixture, ['split-window', '-d', '-P', '-F', '#{pane_id}', '-t', fixture.windowTarget, workerPaneOneScript]);
|
|
1453
|
+
const workerPaneTwo = runFixtureTmux(fixture, ['split-window', '-d', '-P', '-F', '#{pane_id}', '-t', fixture.windowTarget, workerPaneTwoScript]);
|
|
1454
|
+
const leaderPanePid = Number(runFixtureTmux(fixture, ['display-message', '-p', '-t', fixture.leaderPaneId, '#{pane_pid}']));
|
|
1455
|
+
const hudPanePid = Number(runFixtureTmux(fixture, ['display-message', '-p', '-t', hudPaneId, '#{pane_pid}']));
|
|
1456
|
+
const workerPaneOnePid = Number(runFixtureTmux(fixture, ['display-message', '-p', '-t', workerPaneOne, '#{pane_pid}']));
|
|
1457
|
+
const workerPaneTwoPid = Number(runFixtureTmux(fixture, ['display-message', '-p', '-t', workerPaneTwo, '#{pane_pid}']));
|
|
1458
|
+
assert.ok(leaderPanePid > 0);
|
|
1459
|
+
assert.ok(hudPanePid > 0);
|
|
1460
|
+
assert.ok(workerPaneOnePid > 0);
|
|
1461
|
+
assert.ok(workerPaneTwoPid > 0);
|
|
1462
|
+
const paneOwnerId = 'team:shared-shutdown-in-pane';
|
|
1463
|
+
for (const paneId of [fixture.leaderPaneId, hudPaneId, workerPaneOne, workerPaneTwo]) {
|
|
1464
|
+
runFixtureTmux(fixture, ['set-option', '-p', '-t', paneId, '@omx_team_pane_owner_id', paneOwnerId]);
|
|
1465
|
+
}
|
|
1379
1466
|
await initTeamState(teamName, 'shared shutdown in-pane test', 'executor', 2, wd);
|
|
1380
1467
|
const config = await readTeamConfig(teamName, wd);
|
|
1381
1468
|
assert.ok(config);
|
|
@@ -1383,9 +1470,14 @@ esac
|
|
|
1383
1470
|
return;
|
|
1384
1471
|
config.tmux_session = fixture.windowTarget;
|
|
1385
1472
|
config.leader_pane_id = fixture.leaderPaneId;
|
|
1473
|
+
config.leader_pane_pid = leaderPanePid;
|
|
1386
1474
|
config.hud_pane_id = hudPaneId;
|
|
1475
|
+
config.hud_pane_pid = hudPanePid;
|
|
1476
|
+
config.tmux_pane_owner_id = paneOwnerId;
|
|
1387
1477
|
config.workers[0].pane_id = workerPaneOne;
|
|
1478
|
+
config.workers[0].pid = workerPaneOnePid;
|
|
1388
1479
|
config.workers[1].pane_id = workerPaneTwo;
|
|
1480
|
+
config.workers[1].pid = workerPaneTwoPid;
|
|
1389
1481
|
await saveTeamConfig(config, wd);
|
|
1390
1482
|
const result = await runNodeCli(['team', 'shutdown', teamName, '--force'], {
|
|
1391
1483
|
cwd: wd,
|
|
@@ -2035,10 +2127,12 @@ describe('teamCommand status', () => {
|
|
|
2035
2127
|
const wd = await mkdtemp(join(tmpdir(), 'omx-team-status-json-'));
|
|
2036
2128
|
const previousCwd = process.cwd();
|
|
2037
2129
|
const previousTeamStateRoot = process.env.OMX_TEAM_STATE_ROOT;
|
|
2130
|
+
const previousPath = process.env.PATH;
|
|
2038
2131
|
const logs = [];
|
|
2039
2132
|
const originalLog = console.log;
|
|
2040
2133
|
try {
|
|
2041
2134
|
delete process.env.OMX_TEAM_STATE_ROOT;
|
|
2135
|
+
process.env.PATH = wd;
|
|
2042
2136
|
process.chdir(wd);
|
|
2043
2137
|
const config = await withoutTeamTestWorkerEnv(() => initTeamState('pane-json-team', 'inspect worker panes', 'executor', 1, wd));
|
|
2044
2138
|
await withoutTeamTestWorkerEnv(() => createTask('pane-json-team', {
|
|
@@ -2265,6 +2359,10 @@ describe('teamCommand status', () => {
|
|
|
2265
2359
|
process.env.OMX_TEAM_STATE_ROOT = previousTeamStateRoot;
|
|
2266
2360
|
else
|
|
2267
2361
|
delete process.env.OMX_TEAM_STATE_ROOT;
|
|
2362
|
+
if (typeof previousPath === 'string')
|
|
2363
|
+
process.env.PATH = previousPath;
|
|
2364
|
+
else
|
|
2365
|
+
delete process.env.PATH;
|
|
2268
2366
|
console.log = originalLog;
|
|
2269
2367
|
process.chdir(previousCwd);
|
|
2270
2368
|
await rm(wd, { recursive: true, force: true });
|