oh-my-codex 0.20.2 → 0.20.5
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 +36 -18
- package/Cargo.toml +1 -1
- package/README.md +28 -2
- package/crates/omx-runtime/Cargo.toml +4 -0
- package/crates/omx-runtime/src/main.rs +415 -2
- package/crates/omx-runtime/tests/execution.rs +483 -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/adapt/__tests__/herdr-target.test.d.ts +2 -0
- package/dist/adapt/__tests__/herdr-target.test.d.ts.map +1 -0
- package/dist/adapt/__tests__/herdr-target.test.js +72 -0
- package/dist/adapt/__tests__/herdr-target.test.js.map +1 -0
- package/dist/adapt/contracts.d.ts +1 -1
- package/dist/adapt/contracts.d.ts.map +1 -1
- package/dist/adapt/contracts.js +1 -1
- package/dist/adapt/contracts.js.map +1 -1
- package/dist/adapt/herdr/__tests__/authority.test.d.ts +2 -0
- package/dist/adapt/herdr/__tests__/authority.test.d.ts.map +1 -0
- package/dist/adapt/herdr/__tests__/authority.test.js +49 -0
- package/dist/adapt/herdr/__tests__/authority.test.js.map +1 -0
- package/dist/adapt/herdr/__tests__/bridge.test.d.ts +2 -0
- package/dist/adapt/herdr/__tests__/bridge.test.d.ts.map +1 -0
- package/dist/adapt/herdr/__tests__/bridge.test.js +176 -0
- package/dist/adapt/herdr/__tests__/bridge.test.js.map +1 -0
- package/dist/adapt/herdr/__tests__/sanitize.test.d.ts +2 -0
- package/dist/adapt/herdr/__tests__/sanitize.test.d.ts.map +1 -0
- package/dist/adapt/herdr/__tests__/sanitize.test.js +45 -0
- package/dist/adapt/herdr/__tests__/sanitize.test.js.map +1 -0
- package/dist/adapt/herdr/__tests__/semantic.test.d.ts +2 -0
- package/dist/adapt/herdr/__tests__/semantic.test.d.ts.map +1 -0
- package/dist/adapt/herdr/__tests__/semantic.test.js +130 -0
- package/dist/adapt/herdr/__tests__/semantic.test.js.map +1 -0
- package/dist/adapt/herdr/__tests__/seq-store.test.d.ts +2 -0
- package/dist/adapt/herdr/__tests__/seq-store.test.d.ts.map +1 -0
- package/dist/adapt/herdr/__tests__/seq-store.test.js +54 -0
- package/dist/adapt/herdr/__tests__/seq-store.test.js.map +1 -0
- package/dist/adapt/herdr/__tests__/socket-live.test.d.ts +2 -0
- package/dist/adapt/herdr/__tests__/socket-live.test.d.ts.map +1 -0
- package/dist/adapt/herdr/__tests__/socket-live.test.js +104 -0
- package/dist/adapt/herdr/__tests__/socket-live.test.js.map +1 -0
- package/dist/adapt/herdr/__tests__/team-map.test.d.ts +2 -0
- package/dist/adapt/herdr/__tests__/team-map.test.d.ts.map +1 -0
- package/dist/adapt/herdr/__tests__/team-map.test.js +46 -0
- package/dist/adapt/herdr/__tests__/team-map.test.js.map +1 -0
- package/dist/adapt/herdr/__tests__/transport.test.d.ts +2 -0
- package/dist/adapt/herdr/__tests__/transport.test.d.ts.map +1 -0
- package/dist/adapt/herdr/__tests__/transport.test.js +160 -0
- package/dist/adapt/herdr/__tests__/transport.test.js.map +1 -0
- package/dist/adapt/herdr/__tests__/wiring.test.d.ts +2 -0
- package/dist/adapt/herdr/__tests__/wiring.test.d.ts.map +1 -0
- package/dist/adapt/herdr/__tests__/wiring.test.js +118 -0
- package/dist/adapt/herdr/__tests__/wiring.test.js.map +1 -0
- package/dist/adapt/herdr/authority.d.ts +34 -0
- package/dist/adapt/herdr/authority.d.ts.map +1 -0
- package/dist/adapt/herdr/authority.js +71 -0
- package/dist/adapt/herdr/authority.js.map +1 -0
- package/dist/adapt/herdr/bridge.d.ts +84 -0
- package/dist/adapt/herdr/bridge.d.ts.map +1 -0
- package/dist/adapt/herdr/bridge.js +222 -0
- package/dist/adapt/herdr/bridge.js.map +1 -0
- package/dist/adapt/herdr/sanitize.d.ts +20 -0
- package/dist/adapt/herdr/sanitize.d.ts.map +1 -0
- package/dist/adapt/herdr/sanitize.js +70 -0
- package/dist/adapt/herdr/sanitize.js.map +1 -0
- package/dist/adapt/herdr/semantic.d.ts +67 -0
- package/dist/adapt/herdr/semantic.d.ts.map +1 -0
- package/dist/adapt/herdr/semantic.js +170 -0
- package/dist/adapt/herdr/semantic.js.map +1 -0
- package/dist/adapt/herdr/seq-store.d.ts +32 -0
- package/dist/adapt/herdr/seq-store.d.ts.map +1 -0
- package/dist/adapt/herdr/seq-store.js +126 -0
- package/dist/adapt/herdr/seq-store.js.map +1 -0
- package/dist/adapt/herdr/team-map.d.ts +30 -0
- package/dist/adapt/herdr/team-map.d.ts.map +1 -0
- package/dist/adapt/herdr/team-map.js +37 -0
- package/dist/adapt/herdr/team-map.js.map +1 -0
- package/dist/adapt/herdr/transport.d.ts +115 -0
- package/dist/adapt/herdr/transport.d.ts.map +1 -0
- package/dist/adapt/herdr/transport.js +260 -0
- package/dist/adapt/herdr/transport.js.map +1 -0
- package/dist/adapt/herdr/wiring.d.ts +24 -0
- package/dist/adapt/herdr/wiring.d.ts.map +1 -0
- package/dist/adapt/herdr/wiring.js +62 -0
- package/dist/adapt/herdr/wiring.js.map +1 -0
- package/dist/adapt/herdr.d.ts +19 -0
- package/dist/adapt/herdr.d.ts.map +1 -0
- package/dist/adapt/herdr.js +115 -0
- package/dist/adapt/herdr.js.map +1 -0
- package/dist/adapt/index.d.ts +4 -0
- package/dist/adapt/index.d.ts.map +1 -1
- package/dist/adapt/index.js +48 -0
- package/dist/adapt/index.js.map +1 -1
- package/dist/adapt/registry.d.ts.map +1 -1
- package/dist/adapt/registry.js +11 -0
- package/dist/adapt/registry.js.map +1 -1
- 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/__tests__/hotswap.test.js +60 -1
- package/dist/auth/__tests__/hotswap.test.js.map +1 -1
- package/dist/auth/__tests__/storage.test.js +33 -1
- package/dist/auth/__tests__/storage.test.js.map +1 -1
- package/dist/auth/hotswap.d.ts +22 -2
- package/dist/auth/hotswap.d.ts.map +1 -1
- package/dist/auth/hotswap.js +107 -22
- package/dist/auth/hotswap.js.map +1 -1
- package/dist/auth/storage.js +1 -1
- package/dist/auth/storage.js.map +1 -1
- package/dist/autopilot/__tests__/ralplan-gate.test.js +86 -1333
- package/dist/autopilot/__tests__/ralplan-gate.test.js.map +1 -1
- package/dist/autopilot/ralplan-gate.d.ts.map +1 -1
- package/dist/autopilot/ralplan-gate.js +7 -6
- package/dist/autopilot/ralplan-gate.js.map +1 -1
- package/dist/cli/__tests__/agents-init.test.js +4 -23
- package/dist/cli/__tests__/agents-init.test.js.map +1 -1
- package/dist/cli/__tests__/api.test.js +61 -24
- package/dist/cli/__tests__/api.test.js.map +1 -1
- package/dist/cli/__tests__/auth.test.js +63 -7
- package/dist/cli/__tests__/auth.test.js.map +1 -1
- package/dist/cli/__tests__/codex-feature-probe.test.js +66 -1
- package/dist/cli/__tests__/codex-feature-probe.test.js.map +1 -1
- package/dist/cli/__tests__/codex-plugin-layout.test.js +150 -2
- package/dist/cli/__tests__/codex-plugin-layout.test.js.map +1 -1
- package/dist/cli/__tests__/detached-leader-teardown.test.d.ts +2 -0
- package/dist/cli/__tests__/detached-leader-teardown.test.d.ts.map +1 -0
- package/dist/cli/__tests__/detached-leader-teardown.test.js +473 -0
- package/dist/cli/__tests__/detached-leader-teardown.test.js.map +1 -0
- package/dist/cli/__tests__/doctor-process-identity-readiness.test.d.ts +2 -0
- package/dist/cli/__tests__/doctor-process-identity-readiness.test.d.ts.map +1 -0
- package/dist/cli/__tests__/doctor-process-identity-readiness.test.js +103 -0
- package/dist/cli/__tests__/doctor-process-identity-readiness.test.js.map +1 -0
- package/dist/cli/__tests__/doctor-state-root-binding.test.d.ts +2 -0
- package/dist/cli/__tests__/doctor-state-root-binding.test.d.ts.map +1 -0
- package/dist/cli/__tests__/doctor-state-root-binding.test.js +139 -0
- package/dist/cli/__tests__/doctor-state-root-binding.test.js.map +1 -0
- package/dist/cli/__tests__/doctor-warning-copy.test.js +135 -1
- package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
- package/dist/cli/__tests__/exec.test.js +211 -0
- package/dist/cli/__tests__/exec.test.js.map +1 -1
- package/dist/cli/__tests__/index.test.js +878 -463
- package/dist/cli/__tests__/index.test.js.map +1 -1
- package/dist/cli/__tests__/launch-fallback.test.js +1290 -127
- package/dist/cli/__tests__/launch-fallback.test.js.map +1 -1
- package/dist/cli/__tests__/mcp-parity.test.js +8 -4
- package/dist/cli/__tests__/mcp-parity.test.js.map +1 -1
- package/dist/cli/__tests__/native-assets.test.js +398 -16
- package/dist/cli/__tests__/native-assets.test.js.map +1 -1
- package/dist/cli/__tests__/native-hook-claim-journal.test.js +132 -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 +49 -164
- package/dist/cli/__tests__/ralplan-bootstrap-3181.test.js.map +1 -1
- package/dist/cli/__tests__/ralplan-child-binding-3212.test.d.ts +2 -0
- package/dist/cli/__tests__/ralplan-child-binding-3212.test.d.ts.map +1 -0
- package/dist/cli/__tests__/ralplan-child-binding-3212.test.js +56 -0
- package/dist/cli/__tests__/ralplan-child-binding-3212.test.js.map +1 -0
- package/dist/cli/__tests__/ralplan.test.js +107 -109
- 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-scoped-runtime.test.js +1118 -43
- package/dist/cli/__tests__/session-scoped-runtime.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-agents-overwrite.test.js +8 -55
- package/dist/cli/__tests__/setup-agents-overwrite.test.js.map +1 -1
- package/dist/cli/__tests__/setup-install-mode.test.js +224 -7
- package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -1
- package/dist/cli/__tests__/sparkshell-cli.test.js +93 -41
- package/dist/cli/__tests__/sparkshell-cli.test.js.map +1 -1
- package/dist/cli/__tests__/team.test.js +150 -8
- package/dist/cli/__tests__/team.test.js.map +1 -1
- package/dist/cli/__tests__/ultragoal.test.js +117 -2
- package/dist/cli/__tests__/ultragoal.test.js.map +1 -1
- package/dist/cli/__tests__/uninstall.test.js +95 -4
- package/dist/cli/__tests__/uninstall.test.js.map +1 -1
- package/dist/cli/__tests__/update.test.js +669 -177
- package/dist/cli/__tests__/update.test.js.map +1 -1
- package/dist/cli/__tests__/windows-popup-loop-contract.test.js +33 -2
- package/dist/cli/__tests__/windows-popup-loop-contract.test.js.map +1 -1
- package/dist/cli/api.d.ts.map +1 -1
- package/dist/cli/api.js +9 -10
- package/dist/cli/api.js.map +1 -1
- package/dist/cli/codex-feature-probe.d.ts +16 -0
- package/dist/cli/codex-feature-probe.d.ts.map +1 -1
- package/dist/cli/codex-feature-probe.js +44 -0
- package/dist/cli/codex-feature-probe.js.map +1 -1
- package/dist/cli/codex-home.d.ts.map +1 -1
- package/dist/cli/codex-home.js +7 -4
- package/dist/cli/codex-home.js.map +1 -1
- package/dist/cli/doctor.d.ts +20 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +290 -3
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.d.ts +234 -12
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +2409 -746
- 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-assets.d.ts +25 -0
- package/dist/cli/native-assets.d.ts.map +1 -1
- package/dist/cli/native-assets.js +448 -51
- package/dist/cli/native-assets.js.map +1 -1
- package/dist/cli/native-hook-claim-journal.d.ts +20 -5
- package/dist/cli/native-hook-claim-journal.d.ts.map +1 -1
- package/dist/cli/native-hook-claim-journal.js +67 -32
- package/dist/cli/native-hook-claim-journal.js.map +1 -1
- package/dist/cli/package-manager-ownership.d.ts +63 -0
- package/dist/cli/package-manager-ownership.d.ts.map +1 -0
- package/dist/cli/package-manager-ownership.js +323 -0
- package/dist/cli/package-manager-ownership.js.map +1 -0
- package/dist/cli/ralph.js +2 -2
- package/dist/cli/ralph.js.map +1 -1
- package/dist/cli/ralplan.d.ts +5 -7
- package/dist/cli/ralplan.d.ts.map +1 -1
- package/dist/cli/ralplan.js +83 -134
- 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-preferences.d.ts +15 -0
- package/dist/cli/setup-preferences.d.ts.map +1 -1
- package/dist/cli/setup-preferences.js +27 -1
- package/dist/cli/setup-preferences.js.map +1 -1
- package/dist/cli/setup.d.ts +8 -0
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +119 -47
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/sparkshell.d.ts.map +1 -1
- package/dist/cli/sparkshell.js +52 -9
- package/dist/cli/sparkshell.js.map +1 -1
- package/dist/cli/ultragoal.d.ts.map +1 -1
- package/dist/cli/ultragoal.js +2 -2
- package/dist/cli/ultragoal.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 +71 -30
- package/dist/cli/uninstall.js.map +1 -1
- package/dist/cli/update-worker.d.ts +2 -0
- package/dist/cli/update-worker.d.ts.map +1 -0
- package/dist/cli/update-worker.js +142 -0
- package/dist/cli/update-worker.js.map +1 -0
- package/dist/cli/update.d.ts +14 -22
- package/dist/cli/update.d.ts.map +1 -1
- package/dist/cli/update.js +192 -241
- package/dist/cli/update.js.map +1 -1
- package/dist/compat/__tests__/rust-runtime-compat.test.js +1 -1
- package/dist/config/__tests__/generator-idempotent.test.js +503 -30
- package/dist/config/__tests__/generator-idempotent.test.js.map +1 -1
- package/dist/config/__tests__/generator-notify.test.js +5 -3
- 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 +27 -21
- package/dist/config/generator.d.ts.map +1 -1
- package/dist/config/generator.js +610 -152
- 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/goal-workflows/__tests__/codex-goal-snapshot.test.js +25 -0
- package/dist/goal-workflows/__tests__/codex-goal-snapshot.test.js.map +1 -1
- package/dist/goal-workflows/codex-goal-snapshot.d.ts +1 -1
- package/dist/goal-workflows/codex-goal-snapshot.d.ts.map +1 -1
- package/dist/goal-workflows/codex-goal-snapshot.js +2 -0
- package/dist/goal-workflows/codex-goal-snapshot.js.map +1 -1
- package/dist/hooks/__tests__/agents-overlay.test.js +5 -3
- package/dist/hooks/__tests__/agents-overlay.test.js.map +1 -1
- package/dist/hooks/__tests__/autopilot-skill-contract.test.js +27 -4
- package/dist/hooks/__tests__/autopilot-skill-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/issue-3293-autopilot-handoff.test.d.ts +2 -0
- package/dist/hooks/__tests__/issue-3293-autopilot-handoff.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/issue-3293-autopilot-handoff.test.js +172 -0
- package/dist/hooks/__tests__/issue-3293-autopilot-handoff.test.js.map +1 -0
- package/dist/hooks/__tests__/keyword-detector.test.js +176 -37
- package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js +402 -545
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js +39 -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 +161 -26
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-cross-worktree-heartbeat.test.js +27 -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 +10 -118
- package/dist/hooks/__tests__/notify-hook-managed-tmux.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-regression-205.test.js +7 -0
- package/dist/hooks/__tests__/notify-hook-regression-205.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js +533 -14
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js +159 -24
- 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-team-worker-fail-closed.test.js +2 -1
- package/dist/hooks/__tests__/notify-hook-team-worker-fail-closed.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 +44 -4
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js.map +1 -1
- package/dist/hooks/__tests__/prompt-guidance-contract.test.js +9 -0
- package/dist/hooks/__tests__/prompt-guidance-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/session.test.js +3130 -365
- package/dist/hooks/__tests__/session.test.js.map +1 -1
- package/dist/hooks/agents-overlay.js +1 -1
- package/dist/hooks/agents-overlay.js.map +1 -1
- package/dist/hooks/extensibility/__tests__/dispatcher.test.js +108 -2
- package/dist/hooks/extensibility/__tests__/dispatcher.test.js.map +1 -1
- package/dist/hooks/extensibility/__tests__/sdk.test.js +151 -1
- package/dist/hooks/extensibility/__tests__/sdk.test.js.map +1 -1
- package/dist/hooks/extensibility/dispatcher.d.ts.map +1 -1
- package/dist/hooks/extensibility/dispatcher.js +20 -3
- package/dist/hooks/extensibility/dispatcher.js.map +1 -1
- package/dist/hooks/extensibility/plugin-runner.js +1 -0
- package/dist/hooks/extensibility/plugin-runner.js.map +1 -1
- package/dist/hooks/extensibility/runtime.d.ts.map +1 -1
- package/dist/hooks/extensibility/runtime.js.map +1 -1
- package/dist/hooks/extensibility/sdk/paths.d.ts +1 -1
- package/dist/hooks/extensibility/sdk/paths.d.ts.map +1 -1
- package/dist/hooks/extensibility/sdk/paths.js +2 -2
- package/dist/hooks/extensibility/sdk/paths.js.map +1 -1
- package/dist/hooks/extensibility/sdk/runtime-state.d.ts +1 -1
- package/dist/hooks/extensibility/sdk/runtime-state.d.ts.map +1 -1
- package/dist/hooks/extensibility/sdk/runtime-state.js +55 -15
- package/dist/hooks/extensibility/sdk/runtime-state.js.map +1 -1
- package/dist/hooks/extensibility/sdk.d.ts +1 -0
- package/dist/hooks/extensibility/sdk.d.ts.map +1 -1
- package/dist/hooks/extensibility/sdk.js +1 -1
- package/dist/hooks/extensibility/sdk.js.map +1 -1
- package/dist/hooks/extensibility/types.d.ts +7 -0
- package/dist/hooks/extensibility/types.d.ts.map +1 -1
- package/dist/hooks/keyword-detector.d.ts +10 -3
- package/dist/hooks/keyword-detector.d.ts.map +1 -1
- package/dist/hooks/keyword-detector.js +116 -20
- package/dist/hooks/keyword-detector.js.map +1 -1
- package/dist/hooks/session.d.ts +204 -14
- package/dist/hooks/session.d.ts.map +1 -1
- package/dist/hooks/session.js +1500 -223
- package/dist/hooks/session.js.map +1 -1
- package/dist/hud/__tests__/hud-tmux-injection.test.js +6 -6
- package/dist/hud/__tests__/hud-tmux-injection.test.js.map +1 -1
- package/dist/hud/__tests__/index.test.js +26 -16
- package/dist/hud/__tests__/index.test.js.map +1 -1
- package/dist/hud/__tests__/reconcile.test.js +83 -78
- package/dist/hud/__tests__/reconcile.test.js.map +1 -1
- package/dist/hud/__tests__/state.test.js +36 -31
- package/dist/hud/__tests__/state.test.js.map +1 -1
- package/dist/hud/__tests__/tmux.test.js +155 -198
- package/dist/hud/__tests__/tmux.test.js.map +1 -1
- package/dist/hud/tmux.d.ts +42 -4
- package/dist/hud/tmux.d.ts.map +1 -1
- package/dist/hud/tmux.js +1017 -139
- package/dist/hud/tmux.js.map +1 -1
- package/dist/leader/__tests__/contract.test.js +124 -37
- package/dist/leader/__tests__/contract.test.js.map +1 -1
- package/dist/leader/contract.d.ts +17 -6
- package/dist/leader/contract.d.ts.map +1 -1
- package/dist/leader/contract.js +102 -26
- 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__/hermes-bridge.test.js +17 -0
- package/dist/mcp/__tests__/hermes-bridge.test.js.map +1 -1
- package/dist/mcp/__tests__/server-lifecycle.test.js +4 -4
- package/dist/mcp/__tests__/state-paths.test.js +735 -4
- package/dist/mcp/__tests__/state-paths.test.js.map +1 -1
- package/dist/mcp/__tests__/state-server.test.js +1 -1
- package/dist/mcp/__tests__/state-server.test.js.map +1 -1
- package/dist/mcp/__tests__/trace-server.test.js +2 -2
- package/dist/mcp/__tests__/trace-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/hermes-bridge.d.ts.map +1 -1
- package/dist/mcp/hermes-bridge.js +2 -2
- package/dist/mcp/hermes-bridge.js.map +1 -1
- package/dist/mcp/state-paths.d.ts +78 -4
- package/dist/mcp/state-paths.d.ts.map +1 -1
- package/dist/mcp/state-paths.js +543 -40
- package/dist/mcp/state-paths.js.map +1 -1
- package/dist/mcp/state-server.d.ts +4 -4
- package/dist/mcp/state-server.d.ts.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-autopilot-gates.test.js +36 -7
- package/dist/modes/__tests__/base-autopilot-gates.test.js.map +1 -1
- package/dist/modes/__tests__/base-multi-state-compat.test.js +1 -1
- package/dist/modes/__tests__/base-multi-state-compat.test.js.map +1 -1
- package/dist/modes/__tests__/base-session-scope.test.js +17 -8
- package/dist/modes/__tests__/base-session-scope.test.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/modes/base.d.ts +5 -5
- package/dist/modes/base.d.ts.map +1 -1
- package/dist/modes/base.js +76 -21
- package/dist/modes/base.js.map +1 -1
- package/dist/native-assets/archive.d.ts +17 -0
- package/dist/native-assets/archive.d.ts.map +1 -0
- package/dist/native-assets/archive.js +238 -0
- package/dist/native-assets/archive.js.map +1 -0
- package/dist/native-assets/policy.d.ts +42 -0
- package/dist/native-assets/policy.d.ts.map +1 -0
- package/dist/native-assets/policy.js +155 -0
- package/dist/native-assets/policy.js.map +1 -0
- 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 +164 -42
- package/dist/pipeline/__tests__/orchestrator.test.js.map +1 -1
- package/dist/pipeline/__tests__/stages.test.js +72 -155
- package/dist/pipeline/__tests__/stages.test.js.map +1 -1
- package/dist/pipeline/orchestrator.d.ts.map +1 -1
- package/dist/pipeline/orchestrator.js +124 -18
- package/dist/pipeline/orchestrator.js.map +1 -1
- package/dist/pipeline/stages/ralplan.d.ts.map +1 -1
- package/dist/pipeline/stages/ralplan.js +36 -8
- package/dist/pipeline/stages/ralplan.js.map +1 -1
- package/dist/ralplan/__tests__/consensus-gate.test.js +73 -1316
- 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 +335 -0
- package/dist/ralplan/__tests__/documented-leader-preflight.test.js.map +1 -0
- package/dist/ralplan/__tests__/runtime.test.js +85 -101
- package/dist/ralplan/__tests__/runtime.test.js.map +1 -1
- package/dist/ralplan/consensus-gate.d.ts +9 -1
- package/dist/ralplan/consensus-gate.d.ts.map +1 -1
- package/dist/ralplan/consensus-gate.js +82 -338
- package/dist/ralplan/consensus-gate.js.map +1 -1
- package/dist/ralplan/documented-leader-preflight.d.ts +41 -0
- package/dist/ralplan/documented-leader-preflight.d.ts.map +1 -0
- package/dist/ralplan/documented-leader-preflight.js +360 -0
- package/dist/ralplan/documented-leader-preflight.js.map +1 -0
- package/dist/ralplan/runtime.d.ts +2 -1
- package/dist/ralplan/runtime.d.ts.map +1 -1
- package/dist/ralplan/runtime.js +67 -168
- 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/runtime/run-state.d.ts +5 -1
- package/dist/runtime/run-state.d.ts.map +1 -1
- package/dist/runtime/run-state.js +15 -8
- package/dist/runtime/run-state.js.map +1 -1
- package/dist/scripts/__tests__/codex-native-hook.test.js +16323 -8978
- package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
- package/dist/scripts/__tests__/issue-3293-callsite-parity.test.d.ts +2 -0
- package/dist/scripts/__tests__/issue-3293-callsite-parity.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/issue-3293-callsite-parity.test.js +225 -0
- package/dist/scripts/__tests__/issue-3293-callsite-parity.test.js.map +1 -0
- package/dist/scripts/__tests__/issue-3293-cancel-transaction.test.d.ts +2 -0
- package/dist/scripts/__tests__/issue-3293-cancel-transaction.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/issue-3293-cancel-transaction.test.js +188 -0
- package/dist/scripts/__tests__/issue-3293-cancel-transaction.test.js.map +1 -0
- package/dist/scripts/__tests__/issue-3293-hook-owned-cancel.test.d.ts +2 -0
- package/dist/scripts/__tests__/issue-3293-hook-owned-cancel.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/issue-3293-hook-owned-cancel.test.js +259 -0
- package/dist/scripts/__tests__/issue-3293-hook-owned-cancel.test.js.map +1 -0
- package/dist/scripts/__tests__/issue-3311-ultragoal-native-outside-tmux.test.d.ts +2 -0
- package/dist/scripts/__tests__/issue-3311-ultragoal-native-outside-tmux.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/issue-3311-ultragoal-native-outside-tmux.test.js +491 -0
- package/dist/scripts/__tests__/issue-3311-ultragoal-native-outside-tmux.test.js.map +1 -0
- package/dist/scripts/__tests__/issue-3358-ultragoal-cancel-lifecycle.test.d.ts +2 -0
- package/dist/scripts/__tests__/issue-3358-ultragoal-cancel-lifecycle.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/issue-3358-ultragoal-cancel-lifecycle.test.js +708 -0
- package/dist/scripts/__tests__/issue-3358-ultragoal-cancel-lifecycle.test.js.map +1 -0
- package/dist/scripts/__tests__/issue-3369-autopilot-ralplan-state-machine.test.d.ts +2 -0
- package/dist/scripts/__tests__/issue-3369-autopilot-ralplan-state-machine.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/issue-3369-autopilot-ralplan-state-machine.test.js +208 -0
- package/dist/scripts/__tests__/issue-3369-autopilot-ralplan-state-machine.test.js.map +1 -0
- package/dist/scripts/__tests__/notify-state-io.test.js +26 -0
- package/dist/scripts/__tests__/notify-state-io.test.js.map +1 -1
- package/dist/scripts/__tests__/notify-tmux-injection.test.js +23 -1
- package/dist/scripts/__tests__/notify-tmux-injection.test.js.map +1 -1
- package/dist/scripts/__tests__/postinstall.test.js +19 -1
- package/dist/scripts/__tests__/postinstall.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 +63 -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 +74 -159
- package/dist/scripts/__tests__/role-intent-durable-recovery-3181.test.js.map +1 -1
- package/dist/scripts/__tests__/smoke-packed-install.test.js +404 -13
- package/dist/scripts/__tests__/smoke-packed-install.test.js.map +1 -1
- package/dist/scripts/__tests__/verify-native-release-assets.test.d.ts +2 -0
- package/dist/scripts/__tests__/verify-native-release-assets.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/verify-native-release-assets.test.js +235 -0
- package/dist/scripts/__tests__/verify-native-release-assets.test.js.map +1 -0
- package/dist/scripts/codex-native-hook.d.ts +53 -1
- package/dist/scripts/codex-native-hook.d.ts.map +1 -1
- package/dist/scripts/codex-native-hook.js +14448 -1480
- package/dist/scripts/codex-native-hook.js.map +1 -1
- package/dist/scripts/codex-native-pre-post.d.ts +9 -0
- package/dist/scripts/codex-native-pre-post.d.ts.map +1 -1
- package/dist/scripts/codex-native-pre-post.js +35 -12
- package/dist/scripts/codex-native-pre-post.js.map +1 -1
- package/dist/scripts/generate-native-release-manifest.js +80 -51
- package/dist/scripts/generate-native-release-manifest.js.map +1 -1
- package/dist/scripts/notify-fallback-watcher.js +78 -115
- 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/state-io.d.ts.map +1 -1
- package/dist/scripts/notify-hook/state-io.js +5 -0
- package/dist/scripts/notify-hook/state-io.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 +71 -16
- 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 +42 -21
- 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 +82 -33
- package/dist/scripts/notify-hook/team-worker.js.map +1 -1
- package/dist/scripts/notify-hook/tmux-injection.d.ts +1 -0
- package/dist/scripts/notify-hook/tmux-injection.d.ts.map +1 -1
- package/dist/scripts/notify-hook/tmux-injection.js +32 -3
- package/dist/scripts/notify-hook/tmux-injection.js.map +1 -1
- package/dist/scripts/notify-hook.js +79 -82
- package/dist/scripts/notify-hook.js.map +1 -1
- package/dist/scripts/postinstall-advisory.d.ts +14 -0
- package/dist/scripts/postinstall-advisory.d.ts.map +1 -0
- package/dist/scripts/postinstall-advisory.js +49 -0
- package/dist/scripts/postinstall-advisory.js.map +1 -0
- package/dist/scripts/postinstall.d.ts +1 -1
- package/dist/scripts/postinstall.d.ts.map +1 -1
- package/dist/scripts/postinstall.js +1 -1
- package/dist/scripts/postinstall.js.map +1 -1
- package/dist/scripts/smoke-packed-install.d.ts +80 -4
- package/dist/scripts/smoke-packed-install.d.ts.map +1 -1
- package/dist/scripts/smoke-packed-install.js +3162 -26
- package/dist/scripts/smoke-packed-install.js.map +1 -1
- package/dist/scripts/sync-plugin-mirror.d.ts.map +1 -1
- package/dist/scripts/sync-plugin-mirror.js +16 -1
- package/dist/scripts/sync-plugin-mirror.js.map +1 -1
- package/dist/scripts/verify-native-release-assets.js +37 -23
- package/dist/scripts/verify-native-release-assets.js.map +1 -1
- package/dist/state/__tests__/mode-state-context.test.js +61 -0
- package/dist/state/__tests__/mode-state-context.test.js.map +1 -1
- package/dist/state/__tests__/operations.test.js +462 -850
- package/dist/state/__tests__/operations.test.js.map +1 -1
- package/dist/state/__tests__/skill-active.test.js +400 -2
- package/dist/state/__tests__/skill-active.test.js.map +1 -1
- package/dist/state/mode-state-context.d.ts +8 -0
- package/dist/state/mode-state-context.d.ts.map +1 -1
- package/dist/state/mode-state-context.js +73 -0
- package/dist/state/mode-state-context.js.map +1 -1
- package/dist/state/operations.d.ts +3 -0
- package/dist/state/operations.d.ts.map +1 -1
- package/dist/state/operations.js +144 -40
- package/dist/state/operations.js.map +1 -1
- package/dist/state/skill-active.d.ts +18 -1
- package/dist/state/skill-active.d.ts.map +1 -1
- package/dist/state/skill-active.js +420 -23
- package/dist/state/skill-active.js.map +1 -1
- package/dist/state/workflow-transition-reconcile.d.ts +3 -0
- package/dist/state/workflow-transition-reconcile.d.ts.map +1 -1
- package/dist/state/workflow-transition-reconcile.js +10 -4
- package/dist/state/workflow-transition-reconcile.js.map +1 -1
- package/dist/state/workflow-transition.d.ts.map +1 -1
- package/dist/state/workflow-transition.js +3 -1
- package/dist/state/workflow-transition.js.map +1 -1
- package/dist/subagents/__tests__/leader-bootstrap-3181.test.js +53 -247
- package/dist/subagents/__tests__/leader-bootstrap-3181.test.js.map +1 -1
- package/dist/subagents/__tests__/tracker.test.js +837 -1048
- package/dist/subagents/__tests__/tracker.test.js.map +1 -1
- package/dist/subagents/tracker.d.ts +58 -135
- package/dist/subagents/tracker.d.ts.map +1 -1
- package/dist/subagents/tracker.js +811 -632
- 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 +58 -17
- 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 +197 -30
- 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__/notice-ledger.test.d.ts +2 -0
- package/dist/team/__tests__/notice-ledger.test.d.ts.map +1 -0
- package/dist/team/__tests__/notice-ledger.test.js +131 -0
- package/dist/team/__tests__/notice-ledger.test.js.map +1 -0
- package/dist/team/__tests__/pane-teardown-residue-e2e.test.d.ts +2 -0
- package/dist/team/__tests__/pane-teardown-residue-e2e.test.d.ts.map +1 -0
- package/dist/team/__tests__/pane-teardown-residue-e2e.test.js +410 -0
- package/dist/team/__tests__/pane-teardown-residue-e2e.test.js.map +1 -0
- package/dist/team/__tests__/phase-controller.test.js +20 -0
- package/dist/team/__tests__/phase-controller.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 +3963 -428
- package/dist/team/__tests__/runtime.test.js.map +1 -1
- package/dist/team/__tests__/scaling.test.js +2405 -203
- package/dist/team/__tests__/scaling.test.js.map +1 -1
- package/dist/team/__tests__/state-root.test.js +117 -2
- package/dist/team/__tests__/state-root.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 +4099 -1039
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/__tests__/tmux-source-authority-realtmux.test.d.ts +2 -0
- package/dist/team/__tests__/tmux-source-authority-realtmux.test.d.ts.map +1 -0
- package/dist/team/__tests__/tmux-source-authority-realtmux.test.js +149 -0
- package/dist/team/__tests__/tmux-source-authority-realtmux.test.js.map +1 -0
- package/dist/team/__tests__/tmux-test-fixture.d.ts +69 -0
- package/dist/team/__tests__/tmux-test-fixture.d.ts.map +1 -1
- package/dist/team/__tests__/tmux-test-fixture.js +242 -15
- package/dist/team/__tests__/tmux-test-fixture.js.map +1 -1
- package/dist/team/__tests__/tmux-test-fixture.test.js +177 -1
- package/dist/team/__tests__/tmux-test-fixture.test.js.map +1 -1
- package/dist/team/__tests__/worker-runtime-identity.test.js +53 -44
- 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/notice-ledger.d.ts +54 -0
- package/dist/team/notice-ledger.d.ts.map +1 -0
- package/dist/team/notice-ledger.js +259 -0
- package/dist/team/notice-ledger.js.map +1 -0
- package/dist/team/phase-controller.d.ts.map +1 -1
- package/dist/team/phase-controller.js +2 -0
- package/dist/team/phase-controller.js.map +1 -1
- package/dist/team/runtime.d.ts +4 -1
- package/dist/team/runtime.d.ts.map +1 -1
- package/dist/team/runtime.js +1527 -291
- 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 +1503 -387
- 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/monitor.d.ts +10 -0
- package/dist/team/state/monitor.d.ts.map +1 -1
- package/dist/team/state/monitor.js +13 -0
- package/dist/team/state/monitor.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/types.d.ts +15 -0
- 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 +12 -0
- package/dist/team/state-root.d.ts.map +1 -1
- package/dist/team/state-root.js +177 -0
- package/dist/team/state-root.js.map +1 -1
- package/dist/team/state.d.ts +85 -1
- package/dist/team/state.d.ts.map +1 -1
- package/dist/team/state.js +672 -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 +163 -27
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +1682 -376
- 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/ultragoal/__tests__/artifacts.test.js +950 -2
- package/dist/ultragoal/__tests__/artifacts.test.js.map +1 -1
- package/dist/ultragoal/__tests__/docs-contract.test.js +1 -0
- package/dist/ultragoal/__tests__/docs-contract.test.js.map +1 -1
- package/dist/ultragoal/artifacts.d.ts +35 -1
- package/dist/ultragoal/artifacts.d.ts.map +1 -1
- package/dist/ultragoal/artifacts.js +232 -46
- package/dist/ultragoal/artifacts.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 +114 -0
- package/dist/utils/__tests__/file-durability.test.js.map +1 -0
- package/dist/utils/__tests__/paths.test.js +21 -1
- package/dist/utils/__tests__/paths.test.js.map +1 -1
- package/dist/utils/file-durability.d.ts +25 -0
- package/dist/utils/file-durability.d.ts.map +1 -0
- package/dist/utils/file-durability.js +67 -0
- package/dist/utils/file-durability.js.map +1 -0
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +14 -6
- package/dist/utils/paths.js.map +1 -1
- package/dist/verification/__tests__/ci-rust-gates.test.js +49 -4
- package/dist/verification/__tests__/ci-rust-gates.test.js.map +1 -1
- 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/verification/__tests__/explore-harness-release-workflow.test.js +60 -0
- package/dist/verification/__tests__/explore-harness-release-workflow.test.js.map +1 -1
- package/dist/verification/__tests__/native-release-manifest.test.js +157 -4
- package/dist/verification/__tests__/native-release-manifest.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 +13 -5
- package/plugins/oh-my-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/oh-my-codex/hooks/codex-native-hook.mjs +105 -17
- package/plugins/oh-my-codex/skills/autopilot/SKILL.md +13 -5
- package/plugins/oh-my-codex/skills/cancel/SKILL.md +30 -85
- package/plugins/oh-my-codex/skills/ralph/SKILL.md +6 -4
- package/plugins/oh-my-codex/skills/ralplan/SKILL.md +16 -17
- package/plugins/oh-my-codex/skills/team/SKILL.md +13 -9
- package/plugins/oh-my-codex/skills/ultragoal/SKILL.md +3 -2
- package/skills/autopilot/SKILL.md +13 -5
- package/skills/cancel/SKILL.md +30 -85
- package/skills/ralph/SKILL.md +6 -4
- package/skills/ralplan/SKILL.md +16 -17
- package/skills/team/SKILL.md +13 -9
- package/skills/ultragoal/SKILL.md +3 -2
- package/src/scripts/__tests__/codex-native-hook.test.ts +8831 -951
- package/src/scripts/__tests__/issue-3293-callsite-parity.test.ts +187 -0
- package/src/scripts/__tests__/issue-3293-cancel-transaction.test.ts +189 -0
- package/src/scripts/__tests__/issue-3293-hook-owned-cancel.test.ts +187 -0
- package/src/scripts/__tests__/issue-3311-ultragoal-native-outside-tmux.test.ts +591 -0
- package/src/scripts/__tests__/issue-3358-ultragoal-cancel-lifecycle.test.ts +701 -0
- package/src/scripts/__tests__/issue-3369-autopilot-ralplan-state-machine.test.ts +211 -0
- package/src/scripts/__tests__/notify-state-io.test.ts +29 -0
- package/src/scripts/__tests__/notify-tmux-injection.test.ts +26 -1
- package/src/scripts/__tests__/postinstall.test.ts +23 -1
- package/src/scripts/__tests__/reasoning-artifact-contract.test.ts +129 -0
- package/src/scripts/__tests__/role-intent-bootstrap-e2e-3181.test.ts +67 -185
- package/src/scripts/__tests__/role-intent-durable-recovery-3181.test.ts +79 -178
- package/src/scripts/__tests__/smoke-packed-install.test.ts +525 -16
- package/src/scripts/__tests__/verify-native-release-assets.test.ts +240 -0
- package/src/scripts/codex-native-hook.ts +14238 -1429
- package/src/scripts/codex-native-pre-post.ts +43 -12
- package/src/scripts/generate-native-release-manifest.ts +83 -79
- package/src/scripts/notify-fallback-watcher.ts +91 -122
- package/src/scripts/notify-hook/auto-nudge.ts +71 -3
- package/src/scripts/notify-hook/state-io.ts +11 -0
- package/src/scripts/notify-hook/team-dispatch.ts +242 -75
- package/src/scripts/notify-hook/team-leader-nudge.ts +72 -22
- package/src/scripts/notify-hook/team-tmux-guard.ts +366 -39
- package/src/scripts/notify-hook/team-worker-stop.ts +43 -20
- package/src/scripts/notify-hook/team-worker.ts +82 -31
- package/src/scripts/notify-hook/tmux-injection.ts +33 -3
- package/src/scripts/notify-hook.ts +84 -82
- package/src/scripts/postinstall-advisory.ts +67 -0
- package/src/scripts/postinstall.ts +1 -1
- package/src/scripts/smoke-packed-install.ts +3608 -39
- package/src/scripts/sync-plugin-mirror.ts +17 -1
- package/src/scripts/verify-native-release-assets.ts +39 -31
- package/templates/AGENTS.md +1 -0
- 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
|
@@ -559,6 +559,40 @@ export async function capturePane(paneId, lines = 10) {
|
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
561
|
|
|
562
|
+
async function resolveTeamWorkerNudgeBinding(stateDir: string): Promise<{
|
|
563
|
+
paneId: string;
|
|
564
|
+
panePid: number;
|
|
565
|
+
paneOwnerId: string;
|
|
566
|
+
hudPaneId: string;
|
|
567
|
+
} | null> {
|
|
568
|
+
const workerContext = safeString(process.env.OMX_TEAM_WORKER || '').trim();
|
|
569
|
+
if (!workerContext) return null;
|
|
570
|
+
const match = /^([A-Za-z0-9][A-Za-z0-9_-]*)\/(worker-[1-9]\d*)$/.exec(workerContext);
|
|
571
|
+
if (!match) return null;
|
|
572
|
+
const [, teamName, workerName] = match;
|
|
573
|
+
const teamDir = join(stateDir, 'team', teamName);
|
|
574
|
+
try {
|
|
575
|
+
const manifestPath = join(teamDir, 'manifest.v2.json');
|
|
576
|
+
const configPath = join(teamDir, 'config.json');
|
|
577
|
+
let raw: any;
|
|
578
|
+
try {
|
|
579
|
+
raw = JSON.parse(await readFile(manifestPath, 'utf-8'));
|
|
580
|
+
} catch {
|
|
581
|
+
raw = JSON.parse(await readFile(configPath, 'utf-8'));
|
|
582
|
+
}
|
|
583
|
+
if (safeString(raw?.name).trim() !== teamName || !Array.isArray(raw?.workers)) return null;
|
|
584
|
+
const worker = raw.workers.find((entry: any) => safeString(entry?.name).trim() === workerName);
|
|
585
|
+
const paneId = safeString(worker?.pane_id).trim();
|
|
586
|
+
const panePid = asNumber(worker?.pid);
|
|
587
|
+
const hudPaneId = safeString(raw?.hud_pane_id).trim();
|
|
588
|
+
const paneOwnerId = typeof raw?.tmux_pane_owner_id === 'string' ? raw.tmux_pane_owner_id.trim() : '';
|
|
589
|
+
if (!/^%\d+$/.test(paneId) || !Number.isInteger(panePid) || panePid <= 0 || !paneOwnerId || paneId === hudPaneId) return null;
|
|
590
|
+
return { paneId, panePid, paneOwnerId, hudPaneId };
|
|
591
|
+
} catch {
|
|
592
|
+
return null;
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
|
|
562
596
|
export async function resolveNudgePaneTarget(stateDir: any, cwd = '', payload: any = undefined, context: ResolvedPromptTurnContext | null = null) {
|
|
563
597
|
const allowTeamWorker = safeString(process.env.OMX_TEAM_WORKER || '').trim() !== '';
|
|
564
598
|
const managedCurrentPane = context
|
|
@@ -638,14 +672,34 @@ export async function maybeAutoNudge({ cwd, stateDir, logsDir, payload, context
|
|
|
638
672
|
if (!nudgeState || typeof nudgeState !== 'object') {
|
|
639
673
|
nudgeState = { nudgeCount: 0, lastNudgeAt: '', lastSignature: '', lastSemanticSignature: '' };
|
|
640
674
|
}
|
|
641
|
-
const
|
|
675
|
+
const teamWorkerBinding = await resolveTeamWorkerNudgeBinding(stateDir);
|
|
676
|
+
if (safeString(process.env.OMX_TEAM_WORKER || '').trim() && !teamWorkerBinding) return;
|
|
677
|
+
const paneId = teamWorkerBinding?.paneId
|
|
678
|
+
?? await resolveNudgePaneTarget(stateDir, cwd, payload, context);
|
|
679
|
+
const teamPaneOptions = teamWorkerBinding
|
|
680
|
+
? {
|
|
681
|
+
exactPaneId: teamWorkerBinding.paneId,
|
|
682
|
+
expectedPanePid: teamWorkerBinding.panePid,
|
|
683
|
+
expectedPaneOwnerId: teamWorkerBinding.paneOwnerId,
|
|
684
|
+
expectedHudPaneId: teamWorkerBinding.hudPaneId,
|
|
685
|
+
}
|
|
686
|
+
: { exactPaneId: paneId };
|
|
642
687
|
|
|
643
688
|
let detected = detectStallPattern(lastMessage, config.patterns, skillState?.phase);
|
|
644
689
|
let source = 'payload';
|
|
645
690
|
let captured = '';
|
|
646
691
|
|
|
647
692
|
if (!detected && paneId) {
|
|
648
|
-
|
|
693
|
+
if (teamWorkerBinding) {
|
|
694
|
+
const captureGuard = await evaluatePaneInjectionReadiness(paneId, {
|
|
695
|
+
skipIfScrolling: true,
|
|
696
|
+
...teamPaneOptions,
|
|
697
|
+
});
|
|
698
|
+
if (!captureGuard.ok) return;
|
|
699
|
+
captured = captureGuard.paneCapture;
|
|
700
|
+
} else {
|
|
701
|
+
captured = await capturePane(paneId);
|
|
702
|
+
}
|
|
649
703
|
detected = detectStallPattern(filterCapturedTestLines(captured), config.patterns, skillState?.phase);
|
|
650
704
|
source = 'capture-pane';
|
|
651
705
|
}
|
|
@@ -706,7 +760,7 @@ export async function maybeAutoNudge({ cwd, stateDir, logsDir, payload, context
|
|
|
706
760
|
return;
|
|
707
761
|
}
|
|
708
762
|
|
|
709
|
-
const paneGuard = await evaluatePaneInjectionReadiness(paneId, { skipIfScrolling: true });
|
|
763
|
+
const paneGuard = await evaluatePaneInjectionReadiness(paneId, { skipIfScrolling: true, ...teamPaneOptions });
|
|
710
764
|
if (!paneGuard.ok) {
|
|
711
765
|
await logTmuxHookEvent(logsDir, {
|
|
712
766
|
timestamp: new Date().toISOString(),
|
|
@@ -719,6 +773,18 @@ export async function maybeAutoNudge({ cwd, stateDir, logsDir, payload, context
|
|
|
719
773
|
}).catch(() => {});
|
|
720
774
|
return;
|
|
721
775
|
}
|
|
776
|
+
const readinessPanePid = asNumber(paneGuard.exactPaneProof?.pid);
|
|
777
|
+
if (!Number.isInteger(readinessPanePid) || readinessPanePid <= 0) {
|
|
778
|
+
await logTmuxHookEvent(logsDir, {
|
|
779
|
+
timestamp: new Date().toISOString(),
|
|
780
|
+
type: 'auto_nudge_skipped',
|
|
781
|
+
pane_id: paneId,
|
|
782
|
+
reason: 'pane_readiness_unverified',
|
|
783
|
+
source,
|
|
784
|
+
}).catch(() => {});
|
|
785
|
+
return;
|
|
786
|
+
}
|
|
787
|
+
const pinnedPaneOptions = { ...teamPaneOptions, expectedPanePid: readinessPanePid };
|
|
722
788
|
|
|
723
789
|
const blockedAutoApproval = isDeepInterviewAutoApprovalLocked(skillState)
|
|
724
790
|
&& !releaseReason
|
|
@@ -747,6 +813,8 @@ export async function maybeAutoNudge({ cwd, stateDir, logsDir, payload, context
|
|
|
747
813
|
try {
|
|
748
814
|
const sendResult = await sendPaneInput({
|
|
749
815
|
paneTarget: paneId,
|
|
816
|
+
exactPaneId: paneId,
|
|
817
|
+
...pinnedPaneOptions,
|
|
750
818
|
prompt: `${effectiveResponse} ${DEFAULT_MARKER}`,
|
|
751
819
|
submitKeyPresses: 2,
|
|
752
820
|
submitDelayMs: 100,
|
|
@@ -6,6 +6,7 @@ import { mkdir, readFile, readdir, stat, writeFile } from 'fs/promises';
|
|
|
6
6
|
import { dirname, join } from 'path';
|
|
7
7
|
import { validateSessionId } from '../../mcp/state-paths.js';
|
|
8
8
|
import { asNumber, safeString } from './utils.js';
|
|
9
|
+
import { SKILL_ACTIVE_STATE_FILE, writeSkillActiveStateCopiesForStateDir } from '../../state/skill-active.js';
|
|
9
10
|
|
|
10
11
|
|
|
11
12
|
export { readdir };
|
|
@@ -223,6 +224,16 @@ export async function writeScopedJson(
|
|
|
223
224
|
explicitSessionId: string | undefined,
|
|
224
225
|
value: unknown,
|
|
225
226
|
): Promise<void> {
|
|
227
|
+
if (fileName === SKILL_ACTIVE_STATE_FILE) {
|
|
228
|
+
await writeSkillActiveStateCopiesForStateDir(
|
|
229
|
+
baseStateDir,
|
|
230
|
+
value as Record<string, unknown>,
|
|
231
|
+
explicitSessionId,
|
|
232
|
+
undefined,
|
|
233
|
+
{ sessionOnlyWhenRootMissing: Boolean(explicitSessionId) },
|
|
234
|
+
);
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
226
237
|
const targetPath = await getScopedStatePath(baseStateDir, fileName, explicitSessionId);
|
|
227
238
|
await mkdir(dirname(targetPath), { recursive: true });
|
|
228
239
|
await writeFile(targetPath, JSON.stringify(value, null, 2));
|
|
@@ -12,7 +12,14 @@ const __filename = fileURLToPath(import.meta.url);
|
|
|
12
12
|
const __dirname = dirname(__filename);
|
|
13
13
|
import { runProcess } from './process-runner.js';
|
|
14
14
|
import { resolvePaneTarget, resolveSessionToPane } from './tmux-injection.js';
|
|
15
|
-
import {
|
|
15
|
+
import {
|
|
16
|
+
EXACT_PANE_UNAVAILABLE_REASON,
|
|
17
|
+
evaluatePaneInjectionReadiness,
|
|
18
|
+
normalizeExactPaneId,
|
|
19
|
+
sendPaneInput,
|
|
20
|
+
verifyExactPaneLive,
|
|
21
|
+
verifyExactPaneOwnerLive,
|
|
22
|
+
} from './team-tmux-guard.js';
|
|
16
23
|
import {
|
|
17
24
|
buildCapturePaneArgv,
|
|
18
25
|
normalizeTmuxCapture,
|
|
@@ -456,23 +463,83 @@ async function writeBridgeDispatchCompat(stateDir, teamName, requests) {
|
|
|
456
463
|
await writeJsonAtomic(compatPath, { records });
|
|
457
464
|
}
|
|
458
465
|
|
|
466
|
+
function explicitPaneIdentity(value) {
|
|
467
|
+
const rawPaneId = safeString(value).trim();
|
|
468
|
+
return { provided: rawPaneId !== '', paneId: normalizeExactPaneId(rawPaneId), rawPaneId };
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
function positivePanePid(value) {
|
|
472
|
+
return Number.isInteger(value) && Number(value) > 0 ? Number(value) : undefined;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
function resolveAddressedWorker(request, config) {
|
|
477
|
+
const workers = Array.isArray(config?.workers) ? config.workers : [];
|
|
478
|
+
if (Number.isFinite(request?.worker_index)) {
|
|
479
|
+
const worker = workers.find((candidate) => Number(candidate?.index) === Number(request.worker_index));
|
|
480
|
+
if (worker) return worker;
|
|
481
|
+
}
|
|
482
|
+
const recipient = safeString(request?.to_worker).trim();
|
|
483
|
+
return workers.find((candidate) => safeString(candidate?.name).trim() === recipient) || null;
|
|
484
|
+
}
|
|
459
485
|
|
|
460
|
-
function
|
|
486
|
+
function resolveConfiguredPaneIdentity(request, config) {
|
|
461
487
|
if (request.to_worker === 'leader-fixed') {
|
|
462
|
-
|
|
463
|
-
if (leaderPaneId) return { type: 'pane', value: leaderPaneId };
|
|
464
|
-
return null;
|
|
488
|
+
return { source: 'leader_pane_id', expectedPanePid: positivePanePid(config?.leader_pane_pid), expectedPaneOwnerId: safeString(config?.tmux_pane_owner_id).trim(), ...explicitPaneIdentity(config?.leader_pane_id) };
|
|
465
489
|
}
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
490
|
+
const worker = resolveAddressedWorker(request, config);
|
|
491
|
+
const expectedPanePid = positivePanePid(worker?.pid);
|
|
492
|
+
return { source: 'worker_pane_id', expectedPanePid, expectedPaneOwnerId: safeString(config?.tmux_pane_owner_id).trim(), ...explicitPaneIdentity(worker?.pane_id) };
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
function resolveDispatchTarget(request, config) {
|
|
496
|
+
const requestPane = explicitPaneIdentity(request?.pane_id);
|
|
497
|
+
const configuredPane = resolveConfiguredPaneIdentity(request, config);
|
|
498
|
+
const hudPaneId = explicitPaneIdentity(config?.hud_pane_id).paneId;
|
|
499
|
+
if (requestPane.provided) {
|
|
500
|
+
if (!requestPane.paneId) {
|
|
501
|
+
return { failure: 'invalid_explicit_pane', paneId: requestPane.paneId, paneSource: 'request_pane_id', rawPaneId: requestPane.rawPaneId };
|
|
502
|
+
}
|
|
503
|
+
if (requestPane.paneId === hudPaneId) {
|
|
504
|
+
return { failure: 'hud_pane_target', paneId: requestPane.paneId, paneSource: 'request_pane_id' };
|
|
505
|
+
}
|
|
506
|
+
if (configuredPane.provided) {
|
|
507
|
+
if (!configuredPane.paneId) {
|
|
508
|
+
return { failure: 'invalid_explicit_pane', paneId: configuredPane.paneId, paneSource: configuredPane.source, rawPaneId: configuredPane.rawPaneId };
|
|
509
|
+
}
|
|
510
|
+
if (requestPane.paneId !== configuredPane.paneId) {
|
|
511
|
+
return {
|
|
512
|
+
failure: 'exact_pane_mismatch',
|
|
513
|
+
paneId: requestPane.paneId,
|
|
514
|
+
paneSource: 'request_pane_id',
|
|
515
|
+
configuredPaneId: configuredPane.paneId,
|
|
516
|
+
};
|
|
517
|
+
}
|
|
518
|
+
}
|
|
519
|
+
if (!positivePanePid(configuredPane.expectedPanePid)) {
|
|
520
|
+
return { failure: 'missing_exact_pane_pid', paneId: requestPane.paneId, paneSource: configuredPane.source };
|
|
521
|
+
}
|
|
522
|
+
if (!configuredPane.expectedPaneOwnerId) {
|
|
523
|
+
return { failure: 'missing_expected_pane_owner', paneId: requestPane.paneId, paneSource: configuredPane.source };
|
|
524
|
+
}
|
|
525
|
+
return { target: { type: 'pane', value: requestPane.paneId }, exactPaneId: requestPane.paneId, expectedPanePid: configuredPane.expectedPanePid, expectedPaneOwnerId: configuredPane.expectedPaneOwnerId, expectedHudPaneId: hudPaneId, source: 'request_pane_id', reason: 'explicit_request_pane_id' };
|
|
470
526
|
}
|
|
471
|
-
if (
|
|
472
|
-
|
|
527
|
+
if (configuredPane.provided) {
|
|
528
|
+
if (!configuredPane.paneId) {
|
|
529
|
+
return { failure: 'invalid_explicit_pane', paneId: configuredPane.paneId, paneSource: configuredPane.source, rawPaneId: configuredPane.rawPaneId };
|
|
530
|
+
}
|
|
531
|
+
if (configuredPane.paneId === hudPaneId) {
|
|
532
|
+
return { failure: 'hud_pane_target', paneId: configuredPane.paneId, paneSource: configuredPane.source };
|
|
533
|
+
}
|
|
534
|
+
if (!positivePanePid(configuredPane.expectedPanePid)) {
|
|
535
|
+
return { failure: 'missing_exact_pane_pid', paneId: configuredPane.paneId, paneSource: configuredPane.source };
|
|
536
|
+
}
|
|
537
|
+
if (!configuredPane.expectedPaneOwnerId) {
|
|
538
|
+
return { failure: 'missing_expected_pane_owner', paneId: configuredPane.paneId, paneSource: configuredPane.source };
|
|
539
|
+
}
|
|
540
|
+
return { target: { type: 'pane', value: configuredPane.paneId }, exactPaneId: configuredPane.paneId, expectedPanePid: configuredPane.expectedPanePid, expectedPaneOwnerId: configuredPane.expectedPaneOwnerId, expectedHudPaneId: hudPaneId, source: configuredPane.source, reason: configuredPane.source };
|
|
473
541
|
}
|
|
474
|
-
|
|
475
|
-
return null;
|
|
542
|
+
return { target: null };
|
|
476
543
|
}
|
|
477
544
|
|
|
478
545
|
async function appendLeaderNotificationDeferredEvent({
|
|
@@ -754,13 +821,52 @@ const INJECT_VERIFY_DELAY_MS = 250;
|
|
|
754
821
|
const INJECT_VERIFY_ROUNDS = 3;
|
|
755
822
|
|
|
756
823
|
async function injectDispatchRequest(request, config, cwd, stateDir) {
|
|
757
|
-
const
|
|
824
|
+
const dispatchTarget = resolveDispatchTarget(request, config);
|
|
825
|
+
if (dispatchTarget.failure) {
|
|
826
|
+
if (dispatchTarget.failure !== 'exact_pane_mismatch' && dispatchTarget.failure !== 'invalid_explicit_pane') {
|
|
827
|
+
return {
|
|
828
|
+
ok: false,
|
|
829
|
+
reason: dispatchTarget.failure,
|
|
830
|
+
pane: dispatchTarget.paneId || null,
|
|
831
|
+
pane_source: dispatchTarget.paneSource || null,
|
|
832
|
+
exact_pane_proof: null,
|
|
833
|
+
tmux_injection_attempted: false,
|
|
834
|
+
};
|
|
835
|
+
}
|
|
836
|
+
const paneProof = dispatchTarget.failure === 'exact_pane_mismatch'
|
|
837
|
+
? {
|
|
838
|
+
reason: 'exact_pane_mismatch',
|
|
839
|
+
proof: {
|
|
840
|
+
status: 'unavailable',
|
|
841
|
+
paneId: dispatchTarget.paneId,
|
|
842
|
+
reason: 'pane_mismatch',
|
|
843
|
+
detail: `configured pane is ${dispatchTarget.configuredPaneId}`,
|
|
844
|
+
},
|
|
845
|
+
}
|
|
846
|
+
: await verifyExactPaneLive(dispatchTarget.rawPaneId);
|
|
847
|
+
return {
|
|
848
|
+
ok: false,
|
|
849
|
+
reason: paneProof.reason,
|
|
850
|
+
pane: dispatchTarget.paneId || null,
|
|
851
|
+
pane_source: dispatchTarget.paneSource || null,
|
|
852
|
+
exact_pane_proof: paneProof.proof || null,
|
|
853
|
+
tmux_injection_attempted: false,
|
|
854
|
+
};
|
|
855
|
+
}
|
|
856
|
+
|
|
857
|
+
const target = dispatchTarget.target;
|
|
758
858
|
if (!target) {
|
|
759
859
|
return { ok: false, reason: 'missing_tmux_target' };
|
|
760
860
|
}
|
|
761
861
|
const leaderTargeted = request.to_worker === 'leader-fixed';
|
|
762
862
|
let resolution;
|
|
763
|
-
if (
|
|
863
|
+
if (dispatchTarget.exactPaneId) {
|
|
864
|
+
resolution = {
|
|
865
|
+
paneTarget: dispatchTarget.exactPaneId,
|
|
866
|
+
reason: dispatchTarget.reason,
|
|
867
|
+
source: dispatchTarget.source,
|
|
868
|
+
};
|
|
869
|
+
} else if (target.type === 'session') {
|
|
764
870
|
const paneId = await resolveSessionToPane(target.value).catch(() => null);
|
|
765
871
|
resolution = paneId
|
|
766
872
|
? { paneTarget: paneId, reason: 'session_target_resolved' }
|
|
@@ -771,13 +877,26 @@ async function injectDispatchRequest(request, config, cwd, stateDir) {
|
|
|
771
877
|
if (!resolution.paneTarget) {
|
|
772
878
|
return { ok: false, reason: `target_resolution_failed:${resolution.reason}` };
|
|
773
879
|
}
|
|
774
|
-
|
|
880
|
+
|
|
881
|
+
const exactPaneId = dispatchTarget.exactPaneId || normalizeExactPaneId(resolution.paneTarget);
|
|
882
|
+
const exactPaneFailure = (paneProof, tmuxInjectionAttempted) => ({
|
|
883
|
+
ok: false,
|
|
884
|
+
reason: paneProof.reason,
|
|
885
|
+
pane: resolution.paneTarget,
|
|
886
|
+
pane_source: resolution.source || null,
|
|
887
|
+
exact_pane_proof: paneProof.proof || null,
|
|
888
|
+
tmux_injection_attempted: tmuxInjectionAttempted,
|
|
889
|
+
});
|
|
775
890
|
const paneGuard = await evaluatePaneInjectionReadiness(resolution.paneTarget, {
|
|
776
891
|
skipIfScrolling: true,
|
|
777
892
|
requireRunningAgent: leaderTargeted,
|
|
778
893
|
requireReady: false,
|
|
779
894
|
requireIdle: false,
|
|
780
895
|
requireObservableState: leaderTargeted,
|
|
896
|
+
exactPaneId,
|
|
897
|
+
expectedPanePid: dispatchTarget.expectedPanePid,
|
|
898
|
+
expectedPaneOwnerId: dispatchTarget.expectedPaneOwnerId,
|
|
899
|
+
expectedHudPaneId: dispatchTarget.expectedHudPaneId,
|
|
781
900
|
});
|
|
782
901
|
if (!paneGuard.ok) {
|
|
783
902
|
return {
|
|
@@ -787,16 +906,26 @@ async function injectDispatchRequest(request, config, cwd, stateDir) {
|
|
|
787
906
|
pane_source: resolution.source || null,
|
|
788
907
|
readiness_evidence: paneGuard.readinessEvidence || null,
|
|
789
908
|
pane_current_command: paneGuard.paneCurrentCommand || null,
|
|
909
|
+
exact_pane_proof: paneGuard.exactPaneProof || null,
|
|
790
910
|
tmux_injection_attempted: false,
|
|
791
911
|
};
|
|
792
912
|
}
|
|
793
913
|
|
|
914
|
+
let exactPaneProof = paneGuard.exactPaneProof || null;
|
|
915
|
+
const verifyExplicitPane = async () => {
|
|
916
|
+
const paneProof = await verifyExactPaneOwnerLive(exactPaneId, dispatchTarget.expectedPanePid, dispatchTarget.expectedPaneOwnerId);
|
|
917
|
+
exactPaneProof = paneProof.proof || null;
|
|
918
|
+
return paneProof;
|
|
919
|
+
};
|
|
920
|
+
|
|
794
921
|
const attemptCountAtStart = Number.isFinite(request.attempt_count)
|
|
795
922
|
? Math.max(0, Math.floor(request.attempt_count))
|
|
796
923
|
: 0;
|
|
797
924
|
const submitKeyPresses = resolveWorkerCliForRequest(request, config) === 'claude' ? 1 : 2;
|
|
798
925
|
let preCaptureHasTrigger = false;
|
|
799
926
|
if (attemptCountAtStart >= 1) {
|
|
927
|
+
const preCaptureProof = await verifyExplicitPane();
|
|
928
|
+
if (!preCaptureProof.ok) return exactPaneFailure(preCaptureProof, false);
|
|
800
929
|
try {
|
|
801
930
|
// Narrow capture (8 lines) to scope check to input area, not scrollback output
|
|
802
931
|
const preCapture = await runProcess('tmux', buildJoinedCapturePaneArgv(resolution.paneTarget, 8), 2000);
|
|
@@ -809,16 +938,20 @@ async function injectDispatchRequest(request, config, cwd, stateDir) {
|
|
|
809
938
|
// Retype whenever trigger text is NOT in the narrow input area, regardless of attempt count.
|
|
810
939
|
// Pre-0.7.4 bug: 80-line capture matched trigger in scrollback output, falsely skipping retype.
|
|
811
940
|
const shouldTypePrompt = attemptCountAtStart === 0 || !preCaptureHasTrigger;
|
|
812
|
-
if (shouldTypePrompt) {
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
941
|
+
if (shouldTypePrompt && attemptCountAtStart >= 1) {
|
|
942
|
+
// Clear stale text in input buffer before retyping (mirrors sync path tmux-session.ts:1270)
|
|
943
|
+
const clearProof = await verifyExplicitPane();
|
|
944
|
+
if (!clearProof.ok) return exactPaneFailure(clearProof, false);
|
|
945
|
+
await runProcess('tmux', ['send-keys', '-t', resolution.paneTarget, 'C-u'], 1000).catch(() => {});
|
|
946
|
+
await new Promise((r) => setTimeout(r, 50));
|
|
818
947
|
}
|
|
819
948
|
|
|
820
949
|
const sendResult = await sendPaneInput({
|
|
821
950
|
paneTarget: resolution.paneTarget,
|
|
951
|
+
exactPaneId,
|
|
952
|
+
expectedPanePid: dispatchTarget.expectedPanePid,
|
|
953
|
+
expectedPaneOwnerId: dispatchTarget.expectedPaneOwnerId,
|
|
954
|
+
expectedHudPaneId: dispatchTarget.expectedHudPaneId,
|
|
822
955
|
prompt: request.trigger_message,
|
|
823
956
|
submitKeyPresses,
|
|
824
957
|
typePrompt: shouldTypePrompt,
|
|
@@ -832,9 +965,11 @@ async function injectDispatchRequest(request, config, cwd, stateDir) {
|
|
|
832
965
|
pane_source: resolution.source || null,
|
|
833
966
|
readiness_evidence: paneGuard.readinessEvidence || null,
|
|
834
967
|
pane_current_command: paneGuard.paneCurrentCommand || null,
|
|
968
|
+
exact_pane_proof: sendResult.exactPaneProof || null,
|
|
835
969
|
tmux_injection_attempted: true,
|
|
836
970
|
};
|
|
837
971
|
}
|
|
972
|
+
exactPaneProof = sendResult.exactPaneProof || exactPaneProof;
|
|
838
973
|
|
|
839
974
|
// Post-injection verification: confirm the trigger text was consumed.
|
|
840
975
|
// Fixes #391: without this, dispatch marks 'notified' even when the worker
|
|
@@ -843,72 +978,102 @@ async function injectDispatchRequest(request, config, cwd, stateDir) {
|
|
|
843
978
|
const verifyWideArgv = buildJoinedCapturePaneArgv(resolution.paneTarget);
|
|
844
979
|
for (let round = 0; round < INJECT_VERIFY_ROUNDS; round++) {
|
|
845
980
|
await new Promise((r) => setTimeout(r, INJECT_VERIFY_DELAY_MS));
|
|
981
|
+
const narrowProof = await verifyExplicitPane();
|
|
982
|
+
if (!narrowProof.ok) return exactPaneFailure(narrowProof, true);
|
|
983
|
+
|
|
984
|
+
let narrowCap;
|
|
846
985
|
try {
|
|
847
986
|
// Primary: trigger text no longer in narrow input area.
|
|
848
987
|
// Secondary guard: also inspect the recent non-empty tail of wide capture.
|
|
849
988
|
// This avoids false confirmations when Codex leaves the unsent draft just
|
|
850
989
|
// above a large blank area (narrow capture misses it) while still avoiding
|
|
851
990
|
// full-scrollback false positives.
|
|
852
|
-
|
|
853
|
-
const wideCap = await runProcess('tmux', verifyWideArgv, 2000);
|
|
854
|
-
const triggerInNarrow = capturedPaneContainsTrigger(narrowCap.stdout, request.trigger_message);
|
|
855
|
-
const triggerNearTail = capturedPaneContainsTriggerNearTail(wideCap.stdout, request.trigger_message);
|
|
856
|
-
if (triggerInNarrow || triggerNearTail) {
|
|
857
|
-
// Draft is still visible, so C-m has not actually submitted it yet.
|
|
858
|
-
// Do not let transient spinner/active-task text mask an unsent draft.
|
|
859
|
-
await sendPaneInput({
|
|
860
|
-
paneTarget: resolution.paneTarget,
|
|
861
|
-
prompt: request.trigger_message,
|
|
862
|
-
submitKeyPresses,
|
|
863
|
-
typePrompt: false,
|
|
864
|
-
}).catch(() => {});
|
|
865
|
-
continue;
|
|
866
|
-
}
|
|
867
|
-
// Worker is actively processing (mirrors sync path tmux-session.ts:1292-1294)
|
|
868
|
-
if (paneHasActiveTask(wideCap.stdout)) {
|
|
869
|
-
runtimeExec({ command: 'MarkDelivered', request_id: request.request_id }, stateDir, request.team_name);
|
|
870
|
-
return {
|
|
871
|
-
ok: true,
|
|
872
|
-
reason: 'tmux_send_keys_confirmed_active_task',
|
|
873
|
-
pane: resolution.paneTarget,
|
|
874
|
-
pane_source: resolution.source || null,
|
|
875
|
-
readiness_evidence: paneGuard.readinessEvidence || null,
|
|
876
|
-
pane_current_command: paneGuard.paneCurrentCommand || null,
|
|
877
|
-
tmux_injection_attempted: true,
|
|
878
|
-
};
|
|
879
|
-
}
|
|
880
|
-
// Do not declare success while a pane is not input-ready. Otherwise a
|
|
881
|
-
// pre-ready send can be marked "confirmed" and later appear as a stuck
|
|
882
|
-
// unsent draft once the UI finishes loading. This includes leader-fixed:
|
|
883
|
-
// its Codex UI can show "tab to queue message" while busy, and marking
|
|
884
|
-
// delivered before queue/consumption confirmation loses the orchestration
|
|
885
|
-
// nudge until a human presses Tab manually.
|
|
886
|
-
if (!paneLooksReady(wideCap.stdout)) {
|
|
887
|
-
continue;
|
|
888
|
-
}
|
|
889
|
-
if (!triggerInNarrow && !triggerNearTail) {
|
|
890
|
-
runtimeExec({ command: 'MarkDelivered', request_id: request.request_id }, stateDir, request.team_name);
|
|
891
|
-
return {
|
|
892
|
-
ok: true,
|
|
893
|
-
reason: 'tmux_send_keys_confirmed',
|
|
894
|
-
pane: resolution.paneTarget,
|
|
895
|
-
pane_source: resolution.source || null,
|
|
896
|
-
readiness_evidence: paneGuard.readinessEvidence || null,
|
|
897
|
-
pane_current_command: paneGuard.paneCurrentCommand || null,
|
|
898
|
-
tmux_injection_attempted: true,
|
|
899
|
-
};
|
|
900
|
-
}
|
|
991
|
+
narrowCap = await runProcess('tmux', verifyNarrowArgv, 2000);
|
|
901
992
|
} catch {
|
|
902
|
-
//
|
|
993
|
+
// Capture failed; fall through to retry C-m.
|
|
994
|
+
}
|
|
995
|
+
if (narrowCap) {
|
|
996
|
+
const wideProof = await verifyExplicitPane();
|
|
997
|
+
if (!wideProof.ok) return exactPaneFailure(wideProof, true);
|
|
998
|
+
try {
|
|
999
|
+
const wideCap = await runProcess('tmux', verifyWideArgv, 2000);
|
|
1000
|
+
const triggerInNarrow = capturedPaneContainsTrigger(narrowCap.stdout, request.trigger_message);
|
|
1001
|
+
const triggerNearTail = capturedPaneContainsTriggerNearTail(wideCap.stdout, request.trigger_message);
|
|
1002
|
+
if (triggerInNarrow || triggerNearTail) {
|
|
1003
|
+
// Draft is still visible, so C-m has not actually submitted it yet.
|
|
1004
|
+
// Do not let transient spinner/active-task text mask an unsent draft.
|
|
1005
|
+
const retrySend = await sendPaneInput({
|
|
1006
|
+
paneTarget: resolution.paneTarget,
|
|
1007
|
+
exactPaneId,
|
|
1008
|
+
expectedPanePid: dispatchTarget.expectedPanePid,
|
|
1009
|
+
expectedPaneOwnerId: dispatchTarget.expectedPaneOwnerId,
|
|
1010
|
+
expectedHudPaneId: dispatchTarget.expectedHudPaneId,
|
|
1011
|
+
prompt: request.trigger_message,
|
|
1012
|
+
submitKeyPresses,
|
|
1013
|
+
typePrompt: false,
|
|
1014
|
+
});
|
|
1015
|
+
if (!retrySend.ok && retrySend.reason === EXACT_PANE_UNAVAILABLE_REASON) {
|
|
1016
|
+
return exactPaneFailure({ reason: retrySend.reason, proof: retrySend.exactPaneProof }, true);
|
|
1017
|
+
}
|
|
1018
|
+
exactPaneProof = retrySend.exactPaneProof || exactPaneProof;
|
|
1019
|
+
continue;
|
|
1020
|
+
}
|
|
1021
|
+
// Worker is actively processing (mirrors sync path tmux-session.ts:1292-1294)
|
|
1022
|
+
if (paneHasActiveTask(wideCap.stdout)) {
|
|
1023
|
+
runtimeExec({ command: 'MarkDelivered', request_id: request.request_id }, stateDir, request.team_name);
|
|
1024
|
+
return {
|
|
1025
|
+
ok: true,
|
|
1026
|
+
reason: 'tmux_send_keys_confirmed_active_task',
|
|
1027
|
+
pane: resolution.paneTarget,
|
|
1028
|
+
pane_source: resolution.source || null,
|
|
1029
|
+
readiness_evidence: paneGuard.readinessEvidence || null,
|
|
1030
|
+
pane_current_command: paneGuard.paneCurrentCommand || null,
|
|
1031
|
+
exact_pane_proof: exactPaneProof,
|
|
1032
|
+
tmux_injection_attempted: true,
|
|
1033
|
+
};
|
|
1034
|
+
}
|
|
1035
|
+
// Do not declare success while a pane is not input-ready. Otherwise a
|
|
1036
|
+
// pre-ready send can be marked "confirmed" and later appear as a stuck
|
|
1037
|
+
// unsent draft once the UI finishes loading. This includes leader-fixed:
|
|
1038
|
+
// its Codex UI can show "tab to queue message" while busy, and marking
|
|
1039
|
+
// delivered before queue/consumption confirmation loses the orchestration
|
|
1040
|
+
// nudge until a human presses Tab manually.
|
|
1041
|
+
if (!paneLooksReady(wideCap.stdout)) {
|
|
1042
|
+
continue;
|
|
1043
|
+
}
|
|
1044
|
+
if (!triggerInNarrow && !triggerNearTail) {
|
|
1045
|
+
runtimeExec({ command: 'MarkDelivered', request_id: request.request_id }, stateDir, request.team_name);
|
|
1046
|
+
return {
|
|
1047
|
+
ok: true,
|
|
1048
|
+
reason: 'tmux_send_keys_confirmed',
|
|
1049
|
+
pane: resolution.paneTarget,
|
|
1050
|
+
pane_source: resolution.source || null,
|
|
1051
|
+
readiness_evidence: paneGuard.readinessEvidence || null,
|
|
1052
|
+
pane_current_command: paneGuard.paneCurrentCommand || null,
|
|
1053
|
+
exact_pane_proof: exactPaneProof,
|
|
1054
|
+
tmux_injection_attempted: true,
|
|
1055
|
+
};
|
|
1056
|
+
}
|
|
1057
|
+
} catch {
|
|
1058
|
+
// Capture failed; fall through to retry C-m.
|
|
1059
|
+
}
|
|
903
1060
|
}
|
|
904
1061
|
// Draft still visible and no active task — retry C-m
|
|
905
|
-
await sendPaneInput({
|
|
1062
|
+
const retrySend = await sendPaneInput({
|
|
906
1063
|
paneTarget: resolution.paneTarget,
|
|
1064
|
+
exactPaneId,
|
|
1065
|
+
expectedPanePid: dispatchTarget.expectedPanePid,
|
|
1066
|
+
expectedPaneOwnerId: dispatchTarget.expectedPaneOwnerId,
|
|
1067
|
+
expectedHudPaneId: dispatchTarget.expectedHudPaneId,
|
|
907
1068
|
prompt: request.trigger_message,
|
|
908
1069
|
submitKeyPresses,
|
|
909
1070
|
typePrompt: false,
|
|
910
1071
|
queueFirstSubmit: leaderTargeted,
|
|
911
|
-
})
|
|
1072
|
+
});
|
|
1073
|
+
if (!retrySend.ok && retrySend.reason === EXACT_PANE_UNAVAILABLE_REASON) {
|
|
1074
|
+
return exactPaneFailure({ reason: retrySend.reason, proof: retrySend.exactPaneProof }, true);
|
|
1075
|
+
}
|
|
1076
|
+
exactPaneProof = retrySend.exactPaneProof || exactPaneProof;
|
|
912
1077
|
}
|
|
913
1078
|
|
|
914
1079
|
// Trigger text is still visible after all retry rounds.
|
|
@@ -919,6 +1084,7 @@ async function injectDispatchRequest(request, config, cwd, stateDir) {
|
|
|
919
1084
|
pane_source: resolution.source || null,
|
|
920
1085
|
readiness_evidence: paneGuard.readinessEvidence || null,
|
|
921
1086
|
pane_current_command: paneGuard.paneCurrentCommand || null,
|
|
1087
|
+
exact_pane_proof: exactPaneProof,
|
|
922
1088
|
tmux_injection_attempted: true,
|
|
923
1089
|
};
|
|
924
1090
|
}
|
|
@@ -962,6 +1128,7 @@ function buildDispatchAttemptEvidence(result, fallback = {}) {
|
|
|
962
1128
|
pane_source: safeString(result?.pane_source || fallback.pane_source || '').trim() || null,
|
|
963
1129
|
readiness_evidence: safeString(result?.readiness_evidence || fallback.readiness_evidence || '').trim() || null,
|
|
964
1130
|
pane_current_command: safeString(result?.pane_current_command || fallback.pane_current_command || '').trim() || null,
|
|
1131
|
+
exact_pane_proof: result?.exact_pane_proof ?? fallback.exact_pane_proof ?? null,
|
|
965
1132
|
tmux_injection_attempted:
|
|
966
1133
|
typeof result?.tmux_injection_attempted === 'boolean'
|
|
967
1134
|
? result.tmux_injection_attempted
|
|
@@ -1024,7 +1191,7 @@ export async function drainPendingTeamDispatch({
|
|
|
1024
1191
|
continue;
|
|
1025
1192
|
}
|
|
1026
1193
|
|
|
1027
|
-
if (request.to_worker === 'leader-fixed' && !resolveLeaderPaneId(config)) {
|
|
1194
|
+
if (request.to_worker === 'leader-fixed' && !resolveLeaderPaneId(config) && !explicitPaneIdentity(request.pane_id).provided) {
|
|
1028
1195
|
const nowIso = new Date().toISOString();
|
|
1029
1196
|
const alreadyDeferred = safeString(request.last_reason).trim() === LEADER_PANE_MISSING_DEFERRED_REASON;
|
|
1030
1197
|
request.updated_at = nowIso;
|