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
|
@@ -10,16 +10,21 @@ import { resolveWorkerNotifyTeamStateRootPath } from '../../team/state-root.js';
|
|
|
10
10
|
import { asNumber, safeString, isTerminalPhase } from './utils.js';
|
|
11
11
|
import { readJsonIfExists } from './state-io.js';
|
|
12
12
|
import { logTmuxHookEvent } from './log.js';
|
|
13
|
-
import { evaluatePaneInjectionReadiness, sendPaneInput } from './team-tmux-guard.js';
|
|
14
|
-
import { resolvePaneTarget } from './tmux-injection.js';
|
|
13
|
+
import { evaluatePaneInjectionReadiness, normalizeExactPaneId, sendPaneInput } from './team-tmux-guard.js';
|
|
15
14
|
import {
|
|
16
15
|
classifyLeaderActionState,
|
|
17
16
|
resolveAllWorkersIdleIntent,
|
|
18
17
|
resolveWorkerIdleIntent,
|
|
19
18
|
} from './orchestration-intent.js';
|
|
20
|
-
import { DEFAULT_MARKER } from '../tmux-hook-engine.js';
|
|
19
|
+
import { DEFAULT_MARKER, paneHasActiveTask } from '../tmux-hook-engine.js';
|
|
20
|
+
import { registerTeamNotice, releaseTeamNoticeWake } from '../../team/notice-ledger.js';
|
|
21
21
|
const LEADER_PANE_SHELL_NO_INJECTION_REASON = 'leader_pane_shell_no_injection';
|
|
22
22
|
|
|
23
|
+
function positivePanePid(value) {
|
|
24
|
+
return Number.isInteger(value) && Number(value) > 0 ? Number(value) : undefined;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
|
|
23
28
|
export async function resolveTeamStateDirForWorker(cwd, parsedTeamWorker) {
|
|
24
29
|
return resolveWorkerNotifyTeamStateRootPath(cwd, parsedTeamWorker, process.env);
|
|
25
30
|
}
|
|
@@ -216,8 +221,11 @@ export async function readTeamWorkersForIdleCheck(stateDir, teamName) {
|
|
|
216
221
|
if (!Array.isArray(workers) || workers.length === 0) continue;
|
|
217
222
|
const tmuxSession = safeString(parsed.tmux_session || '').trim();
|
|
218
223
|
const leaderPaneId = safeString(parsed.leader_pane_id || '').trim();
|
|
219
|
-
const
|
|
220
|
-
|
|
224
|
+
const hudPaneId = safeString(parsed.hud_pane_id || '').trim();
|
|
225
|
+
const leaderPanePid = positivePanePid(parsed.leader_pane_pid);
|
|
226
|
+
const tmuxPaneOwnerId = safeString(parsed.tmux_pane_owner_id || '').trim();
|
|
227
|
+
const result = { workers, tmuxSession, leaderPaneId, leaderPanePid, tmuxPaneOwnerId, hudPaneId };
|
|
228
|
+
if (leaderPaneId && leaderPanePid && tmuxPaneOwnerId) return result;
|
|
221
229
|
if (!fallback) fallback = result;
|
|
222
230
|
} catch {
|
|
223
231
|
// Try the next state source.
|
|
@@ -253,22 +261,11 @@ async function readTeamTaskCounts(stateDir, teamName) {
|
|
|
253
261
|
return taskCounts;
|
|
254
262
|
}
|
|
255
263
|
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
if (normalizedLeaderPaneId) {
|
|
259
|
-
try {
|
|
260
|
-
const resolved = await resolvePaneTarget({ type: 'pane', value: normalizedLeaderPaneId }, '', '', '', {});
|
|
261
|
-
const paneTarget = safeString(resolved?.paneTarget).trim();
|
|
262
|
-
if (paneTarget) return paneTarget;
|
|
263
|
-
} catch {
|
|
264
|
-
// fall through to tmux session scan
|
|
265
|
-
}
|
|
266
|
-
return normalizedLeaderPaneId;
|
|
267
|
-
}
|
|
268
|
-
return '';
|
|
264
|
+
function resolveCanonicalLeaderPaneId(_tmuxSession, leaderPaneId) {
|
|
265
|
+
return normalizeExactPaneId(leaderPaneId);
|
|
269
266
|
}
|
|
270
267
|
|
|
271
|
-
async function checkLeaderPaneReadyForWorkerStateReminder(paneTarget) {
|
|
268
|
+
async function checkLeaderPaneReadyForWorkerStateReminder(paneTarget, exactPaneId, expectedPanePid, expectedPaneOwnerId) {
|
|
272
269
|
return evaluatePaneInjectionReadiness(paneTarget, {
|
|
273
270
|
skipIfScrolling: true,
|
|
274
271
|
// Worker-state reminders are their own trigger path. They should still
|
|
@@ -277,6 +274,9 @@ async function checkLeaderPaneReadyForWorkerStateReminder(paneTarget) {
|
|
|
277
274
|
requireRunningAgent: true,
|
|
278
275
|
requireReady: false,
|
|
279
276
|
requireIdle: false,
|
|
277
|
+
exactPaneId,
|
|
278
|
+
expectedPanePid,
|
|
279
|
+
expectedPaneOwnerId,
|
|
280
280
|
});
|
|
281
281
|
}
|
|
282
282
|
|
|
@@ -367,8 +367,11 @@ export async function maybeNotifyLeaderAllWorkersIdle({ cwd, stateDir, logsDir,
|
|
|
367
367
|
// Read team config to get worker list and leader tmux target
|
|
368
368
|
const teamInfo = await readTeamWorkersForIdleCheck(stateDir, teamName);
|
|
369
369
|
if (!teamInfo) return;
|
|
370
|
-
const { workers, tmuxSession, leaderPaneId } = teamInfo;
|
|
371
|
-
const
|
|
370
|
+
const { workers, tmuxSession, leaderPaneId, leaderPanePid, tmuxPaneOwnerId, hudPaneId } = teamInfo;
|
|
371
|
+
const resolvedLeaderPaneId = await resolveCanonicalLeaderPaneId(tmuxSession, leaderPaneId);
|
|
372
|
+
const canonicalLeaderPaneId = resolvedLeaderPaneId && resolvedLeaderPaneId !== normalizeExactPaneId(hudPaneId)
|
|
373
|
+
? resolvedLeaderPaneId
|
|
374
|
+
: '';
|
|
372
375
|
|
|
373
376
|
// Check cooldown to prevent notification spam
|
|
374
377
|
const idleStatePath = join(stateDir, 'team', teamName, 'all-workers-idle.json');
|
|
@@ -399,7 +402,7 @@ export async function maybeNotifyLeaderAllWorkersIdle({ cwd, stateDir, logsDir,
|
|
|
399
402
|
});
|
|
400
403
|
const orchestrationIntent = resolveAllWorkersIdleIntent(leaderActionState);
|
|
401
404
|
|
|
402
|
-
if (!canonicalLeaderPaneId) {
|
|
405
|
+
if (!canonicalLeaderPaneId || !positivePanePid(leaderPanePid) || !tmuxPaneOwnerId) {
|
|
403
406
|
const nextIdleState = {
|
|
404
407
|
...idleState,
|
|
405
408
|
last_notified_at_ms: nowMs,
|
|
@@ -423,10 +426,8 @@ export async function maybeNotifyLeaderAllWorkersIdle({ cwd, stateDir, logsDir,
|
|
|
423
426
|
}
|
|
424
427
|
|
|
425
428
|
const N = workers.length;
|
|
426
|
-
const nextAction = `Run \`omx team status ${teamName}\` now, read unread worker messages, then assign the next concrete task, reconcile results, or shut the team down.`;
|
|
427
|
-
const message = `[OMX] All ${N} worker${N === 1 ? '' : 's'} idle. ${nextAction} ${DEFAULT_MARKER}`;
|
|
428
429
|
const tmuxTarget = canonicalLeaderPaneId;
|
|
429
|
-
const paneGuard = await checkLeaderPaneReadyForWorkerStateReminder(tmuxTarget);
|
|
430
|
+
const paneGuard = await checkLeaderPaneReadyForWorkerStateReminder(tmuxTarget, canonicalLeaderPaneId, leaderPanePid, tmuxPaneOwnerId);
|
|
430
431
|
if (!paneGuard.ok) {
|
|
431
432
|
const nextIdleState = {
|
|
432
433
|
...idleState,
|
|
@@ -452,6 +453,22 @@ export async function maybeNotifyLeaderAllWorkersIdle({ cwd, stateDir, logsDir,
|
|
|
452
453
|
});
|
|
453
454
|
return;
|
|
454
455
|
}
|
|
456
|
+
const leaderBusy = paneHasActiveTask(paneGuard.paneCapture);
|
|
457
|
+
let queuedNoticeRegistration = null;
|
|
458
|
+
let message = `[OMX] All ${N} worker${N === 1 ? '' : 's'} idle. Run \`omx team status ${teamName}\` now, read unread worker messages, then assign the next concrete task, reconcile results, or shut the team down. ${DEFAULT_MARKER}`;
|
|
459
|
+
if (leaderBusy) {
|
|
460
|
+
const noticeRegistration = await registerTeamNotice({
|
|
461
|
+
stateRoot: stateDir,
|
|
462
|
+
targetId: tmuxPaneOwnerId,
|
|
463
|
+
teamName,
|
|
464
|
+
noticeClass: 'all_idle',
|
|
465
|
+
generation: `${nowIso}:${N}:${orchestrationIntent}`,
|
|
466
|
+
source: { kind: 'all_workers_idle', detail: orchestrationIntent },
|
|
467
|
+
}).catch(() => null);
|
|
468
|
+
if (!noticeRegistration?.queued || !noticeRegistration.prompt) return;
|
|
469
|
+
message = `${noticeRegistration.prompt} ${DEFAULT_MARKER}`;
|
|
470
|
+
queuedNoticeRegistration = noticeRegistration;
|
|
471
|
+
}
|
|
455
472
|
|
|
456
473
|
try {
|
|
457
474
|
const sendResult = await sendPaneInput({
|
|
@@ -459,8 +476,13 @@ export async function maybeNotifyLeaderAllWorkersIdle({ cwd, stateDir, logsDir,
|
|
|
459
476
|
prompt: message,
|
|
460
477
|
submitKeyPresses: 2,
|
|
461
478
|
submitDelayMs: 100,
|
|
479
|
+
exactPaneId: canonicalLeaderPaneId,
|
|
480
|
+
expectedPanePid: leaderPanePid,
|
|
481
|
+
expectedPaneOwnerId: tmuxPaneOwnerId,
|
|
482
|
+
expectedHudPaneId: hudPaneId,
|
|
462
483
|
});
|
|
463
484
|
if (!sendResult.ok) throw new Error(sendResult.error || sendResult.reason || 'send_failed');
|
|
485
|
+
queuedNoticeRegistration = null;
|
|
464
486
|
|
|
465
487
|
const nextIdleState = {
|
|
466
488
|
...idleState,
|
|
@@ -497,6 +519,9 @@ export async function maybeNotifyLeaderAllWorkersIdle({ cwd, stateDir, logsDir,
|
|
|
497
519
|
orchestration_intent: orchestrationIntent,
|
|
498
520
|
});
|
|
499
521
|
} catch (err) {
|
|
522
|
+
if (queuedNoticeRegistration?.targetKey && queuedNoticeRegistration?.wakeId) {
|
|
523
|
+
await releaseTeamNoticeWake(stateDir, queuedNoticeRegistration.targetKey, queuedNoticeRegistration.wakeId).catch(() => {});
|
|
524
|
+
}
|
|
500
525
|
await logTmuxHookEvent(logsDir, {
|
|
501
526
|
timestamp: nowIso,
|
|
502
527
|
type: 'all_workers_idle_notification',
|
|
@@ -591,10 +616,13 @@ export async function maybeNotifyLeaderWorkerIdle({ cwd, stateDir, logsDir, pars
|
|
|
591
616
|
// Read team config for tmux target
|
|
592
617
|
const teamInfo = await readTeamWorkersForIdleCheck(stateDir, teamName);
|
|
593
618
|
if (!teamInfo) return;
|
|
594
|
-
const { tmuxSession, leaderPaneId } = teamInfo;
|
|
595
|
-
const
|
|
619
|
+
const { tmuxSession, leaderPaneId, leaderPanePid, tmuxPaneOwnerId, hudPaneId } = teamInfo;
|
|
620
|
+
const resolvedLeaderPaneId = await resolveCanonicalLeaderPaneId(tmuxSession, leaderPaneId);
|
|
621
|
+
const canonicalLeaderPaneId = resolvedLeaderPaneId && resolvedLeaderPaneId !== normalizeExactPaneId(hudPaneId)
|
|
622
|
+
? resolvedLeaderPaneId
|
|
623
|
+
: '';
|
|
596
624
|
|
|
597
|
-
if (!canonicalLeaderPaneId) {
|
|
625
|
+
if (!canonicalLeaderPaneId || !positivePanePid(leaderPanePid) || !tmuxPaneOwnerId) {
|
|
598
626
|
await emitLeaderPaneMissingDeferred({
|
|
599
627
|
stateDir,
|
|
600
628
|
logsDir,
|
|
@@ -608,7 +636,7 @@ export async function maybeNotifyLeaderWorkerIdle({ cwd, stateDir, logsDir, pars
|
|
|
608
636
|
return;
|
|
609
637
|
}
|
|
610
638
|
const tmuxTarget = canonicalLeaderPaneId;
|
|
611
|
-
const paneGuard = await checkLeaderPaneReadyForWorkerStateReminder(tmuxTarget);
|
|
639
|
+
const paneGuard = await checkLeaderPaneReadyForWorkerStateReminder(tmuxTarget, canonicalLeaderPaneId, leaderPanePid, tmuxPaneOwnerId);
|
|
612
640
|
if (!paneGuard.ok) {
|
|
613
641
|
try {
|
|
614
642
|
const tmpPath = cooldownPath + '.tmp.' + process.pid;
|
|
@@ -637,13 +665,28 @@ export async function maybeNotifyLeaderWorkerIdle({ cwd, stateDir, logsDir, pars
|
|
|
637
665
|
return;
|
|
638
666
|
}
|
|
639
667
|
|
|
640
|
-
// Build notification message with context
|
|
668
|
+
// Build notification message with context. Busy panes use the durable ledger wake.
|
|
641
669
|
const parts = [`[OMX] ${workerName} ${currentState}`];
|
|
642
670
|
if (prevState && prevState !== 'unknown') parts.push(`(was: ${prevState})`);
|
|
643
671
|
if (currentTaskId) parts.push(`task: ${currentTaskId}`);
|
|
644
672
|
if (currentReason) parts.push(`reason: ${currentReason}`);
|
|
645
673
|
parts.push(`Next: read ${workerName}'s latest message/output, then assign the next concrete step or mark the task complete.`);
|
|
646
|
-
const
|
|
674
|
+
const leaderBusy = paneHasActiveTask(paneGuard.paneCapture);
|
|
675
|
+
let queuedNoticeRegistration = null;
|
|
676
|
+
let message = `${parts.join('. ')}. ${DEFAULT_MARKER}`;
|
|
677
|
+
if (leaderBusy) {
|
|
678
|
+
const noticeRegistration = await registerTeamNotice({
|
|
679
|
+
stateRoot: stateDir,
|
|
680
|
+
targetId: tmuxPaneOwnerId,
|
|
681
|
+
teamName,
|
|
682
|
+
noticeClass: 'worker_idle',
|
|
683
|
+
generation: `${workerName}:${currentState}:${currentTaskId}:${safeString(heartbeat.last_turn_at)}`,
|
|
684
|
+
source: { kind: 'worker_idle', detail: orchestrationIntent },
|
|
685
|
+
}).catch(() => null);
|
|
686
|
+
if (!noticeRegistration?.queued || !noticeRegistration.prompt) return;
|
|
687
|
+
queuedNoticeRegistration = noticeRegistration;
|
|
688
|
+
message = `${noticeRegistration.prompt} ${DEFAULT_MARKER}`;
|
|
689
|
+
}
|
|
647
690
|
|
|
648
691
|
try {
|
|
649
692
|
const sendResult = await sendPaneInput({
|
|
@@ -651,8 +694,13 @@ export async function maybeNotifyLeaderWorkerIdle({ cwd, stateDir, logsDir, pars
|
|
|
651
694
|
prompt: message,
|
|
652
695
|
submitKeyPresses: 2,
|
|
653
696
|
submitDelayMs: 100,
|
|
697
|
+
exactPaneId: canonicalLeaderPaneId,
|
|
698
|
+
expectedPanePid: leaderPanePid,
|
|
699
|
+
expectedPaneOwnerId: tmuxPaneOwnerId,
|
|
700
|
+
expectedHudPaneId: hudPaneId,
|
|
654
701
|
});
|
|
655
702
|
if (!sendResult.ok) throw new Error(sendResult.error || sendResult.reason || 'send_failed');
|
|
703
|
+
queuedNoticeRegistration = null;
|
|
656
704
|
|
|
657
705
|
// Update cooldown state
|
|
658
706
|
try {
|
|
@@ -696,6 +744,9 @@ export async function maybeNotifyLeaderWorkerIdle({ cwd, stateDir, logsDir, pars
|
|
|
696
744
|
orchestration_intent: orchestrationIntent,
|
|
697
745
|
});
|
|
698
746
|
} catch (err) {
|
|
747
|
+
if (queuedNoticeRegistration?.targetKey && queuedNoticeRegistration?.wakeId) {
|
|
748
|
+
await releaseTeamNoticeWake(stateDir, queuedNoticeRegistration.targetKey, queuedNoticeRegistration.wakeId).catch(() => {});
|
|
749
|
+
}
|
|
699
750
|
await logTmuxHookEvent(logsDir, {
|
|
700
751
|
timestamp: nowIso,
|
|
701
752
|
type: 'worker_idle_notification',
|
|
@@ -37,6 +37,10 @@ import {
|
|
|
37
37
|
} from '../tmux-hook-engine.js';
|
|
38
38
|
import type { ResolvedPromptTurnContext } from '../../hooks/prompt-session-provenance.js';
|
|
39
39
|
|
|
40
|
+
export function isNotifyModeStateFilename(file: string): boolean {
|
|
41
|
+
return file.endsWith('-state.json') && file !== 'tmux-hook-state.json' && file !== 'run-state.json';
|
|
42
|
+
}
|
|
43
|
+
|
|
40
44
|
function isHudPaneStartCommand(startCommand: any): boolean {
|
|
41
45
|
return /\bomx\b.*\bhud\b.*--watch/i.test(safeString(startCommand));
|
|
42
46
|
}
|
|
@@ -483,7 +487,7 @@ export async function handleTmuxInjection({ payload, cwd, stateDir, logsDir, con
|
|
|
483
487
|
|
|
484
488
|
const files = await readdir(scopedDir).catch(() => []);
|
|
485
489
|
for (const file of files) {
|
|
486
|
-
if (!
|
|
490
|
+
if (!isNotifyModeStateFilename(file)) continue;
|
|
487
491
|
const path = join(scopedDir, file);
|
|
488
492
|
const parsed = JSON.parse(await readFile(path, 'utf-8'));
|
|
489
493
|
if (parsed && parsed.active) {
|
|
@@ -687,9 +691,11 @@ export async function handleTmuxInjection({ payload, cwd, stateDir, logsDir, con
|
|
|
687
691
|
|
|
688
692
|
// Shared pane-state guard: skip injection when the target pane is scrolling,
|
|
689
693
|
// has returned to a shell, is still bootstrapping, or is visibly busy.
|
|
694
|
+
let readinessPanePid: number | undefined;
|
|
690
695
|
try {
|
|
691
696
|
const paneGuard = await evaluatePaneInjectionReadiness(paneTarget, {
|
|
692
697
|
skipIfScrolling: config.skip_if_scrolling,
|
|
698
|
+
exactPaneId: paneTarget,
|
|
693
699
|
});
|
|
694
700
|
if (!paneGuard.ok) {
|
|
695
701
|
const reason = mapPaneInjectionReadinessReason(paneGuard.reason);
|
|
@@ -706,8 +712,30 @@ export async function handleTmuxInjection({ payload, cwd, stateDir, logsDir, con
|
|
|
706
712
|
});
|
|
707
713
|
return;
|
|
708
714
|
}
|
|
709
|
-
|
|
710
|
-
|
|
715
|
+
readinessPanePid = asNumber(paneGuard.exactPaneProof?.pid);
|
|
716
|
+
if (!Number.isInteger(readinessPanePid) || readinessPanePid <= 0) {
|
|
717
|
+
state.last_reason = 'pane_readiness_unverified';
|
|
718
|
+
state.last_event_at = nowIso;
|
|
719
|
+
await writeFile(hookStatePath, JSON.stringify(state, null, 2)).catch(() => {});
|
|
720
|
+
await logTmuxHookEvent(logsDir, {
|
|
721
|
+
...baseLog,
|
|
722
|
+
event: 'injection_skipped',
|
|
723
|
+
reason: 'pane_readiness_unverified',
|
|
724
|
+
pane_target: paneTarget,
|
|
725
|
+
});
|
|
726
|
+
return;
|
|
727
|
+
}
|
|
728
|
+
} catch (error) {
|
|
729
|
+
const reason = `pane_proof_unavailable:${error instanceof Error ? error.message : String(error)}`;
|
|
730
|
+
updateStateForAttempt(false, reason);
|
|
731
|
+
await writeFile(hookStatePath, JSON.stringify(state, null, 2)).catch(() => {});
|
|
732
|
+
await logTmuxHookEvent(logsDir, {
|
|
733
|
+
...baseLog,
|
|
734
|
+
event: 'injection_skipped',
|
|
735
|
+
reason,
|
|
736
|
+
pane_target: paneTarget,
|
|
737
|
+
});
|
|
738
|
+
return;
|
|
711
739
|
}
|
|
712
740
|
|
|
713
741
|
if (config.dry_run) {
|
|
@@ -727,6 +755,8 @@ export async function handleTmuxInjection({ payload, cwd, stateDir, logsDir, con
|
|
|
727
755
|
const sendResult = await sendPaneInput({
|
|
728
756
|
paneTarget,
|
|
729
757
|
prompt,
|
|
758
|
+
exactPaneId: paneTarget,
|
|
759
|
+
expectedPanePid: readinessPanePid,
|
|
730
760
|
submitKeyPresses: argv.submitArgv.length,
|
|
731
761
|
submitDelayMs: 25,
|
|
732
762
|
});
|
|
@@ -550,6 +550,66 @@ async function resolveLeaderNotifyWriteDecision(
|
|
|
550
550
|
};
|
|
551
551
|
}
|
|
552
552
|
|
|
553
|
+
async function dispatchTurnCompleteHookEvents(
|
|
554
|
+
payload: Record<string, any>,
|
|
555
|
+
cwd: string,
|
|
556
|
+
payloadSessionId: string,
|
|
557
|
+
sessionIdForHooks: string,
|
|
558
|
+
): Promise<void> {
|
|
559
|
+
try {
|
|
560
|
+
const { buildNativeHookEvent, buildDerivedHookEvent } = await import('../hooks/extensibility/events.js');
|
|
561
|
+
const { dispatchHookEvent } = await import('../hooks/extensibility/dispatcher.js');
|
|
562
|
+
const threadIdForHooks = safeString(payload['thread-id'] || payload.thread_id || '');
|
|
563
|
+
const turnIdForHooks = safeString(payload['turn-id'] || payload.turn_id || '');
|
|
564
|
+
const modeForHooks = safeString(payload.mode || '');
|
|
565
|
+
const outputPreview = safeString(payload['last-assistant-message'] || payload.last_assistant_message || '').slice(0, 400);
|
|
566
|
+
const event = buildNativeHookEvent('turn-complete', {
|
|
567
|
+
source: safeString(payload.source || 'native'),
|
|
568
|
+
type: safeString(payload.type || 'agent-turn-complete'),
|
|
569
|
+
input_messages: normalizeInputMessages(payload),
|
|
570
|
+
output_preview: outputPreview,
|
|
571
|
+
native_session_id: payloadSessionId || null,
|
|
572
|
+
omx_session_id: sessionIdForHooks || null,
|
|
573
|
+
...readRepositoryMetadata(cwd),
|
|
574
|
+
session_name: resolveOperationalSessionName(cwd, sessionIdForHooks),
|
|
575
|
+
project_path: cwd,
|
|
576
|
+
project_name: safeString(payload.project_name || ''),
|
|
577
|
+
}, {
|
|
578
|
+
session_id: sessionIdForHooks,
|
|
579
|
+
thread_id: threadIdForHooks,
|
|
580
|
+
turn_id: turnIdForHooks,
|
|
581
|
+
mode: modeForHooks,
|
|
582
|
+
});
|
|
583
|
+
await dispatchHookEvent(event, { cwd });
|
|
584
|
+
|
|
585
|
+
for (const signal of deriveAssistantSignalEvents(outputPreview)) {
|
|
586
|
+
const derivedEvent = buildDerivedHookEvent(signal.event, buildOperationalContext({
|
|
587
|
+
cwd,
|
|
588
|
+
normalizedEvent: signal.normalized_event,
|
|
589
|
+
sessionId: sessionIdForHooks,
|
|
590
|
+
text: outputPreview,
|
|
591
|
+
status: signal.normalized_event,
|
|
592
|
+
errorSummary: signal.error_summary,
|
|
593
|
+
extra: {
|
|
594
|
+
native_session_id: payloadSessionId || null,
|
|
595
|
+
omx_session_id: sessionIdForHooks || null,
|
|
596
|
+
source_event: safeString(payload.type || 'agent-turn-complete'),
|
|
597
|
+
},
|
|
598
|
+
}), {
|
|
599
|
+
session_id: sessionIdForHooks,
|
|
600
|
+
thread_id: threadIdForHooks,
|
|
601
|
+
turn_id: turnIdForHooks,
|
|
602
|
+
mode: modeForHooks,
|
|
603
|
+
confidence: signal.confidence,
|
|
604
|
+
parser_reason: signal.parser_reason,
|
|
605
|
+
});
|
|
606
|
+
await dispatchHookEvent(derivedEvent, { cwd });
|
|
607
|
+
}
|
|
608
|
+
} catch {
|
|
609
|
+
// Non-fatal: extensibility modules may not be built yet
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
|
|
553
613
|
async function main() {
|
|
554
614
|
const rawPayload = process.argv[process.argv.length - 1];
|
|
555
615
|
if (!rawPayload || rawPayload.startsWith('-')) {
|
|
@@ -578,15 +638,26 @@ async function main() {
|
|
|
578
638
|
const isTurnComplete = isTurnCompletePayload(payload);
|
|
579
639
|
const isNotifyFallbackTaskComplete = isNotifyFallbackTaskCompletePayload(payload);
|
|
580
640
|
|
|
581
|
-
// Team worker detection
|
|
582
|
-
|
|
583
|
-
const
|
|
641
|
+
// Team worker detection is authorized only by a syntactically valid internal identity.
|
|
642
|
+
// Public OMX_TEAM_WORKER is a display alias and must never authorize worker or leader writes.
|
|
643
|
+
const rawInternalTeamWorker = safeString(process.env.OMX_TEAM_INTERNAL_WORKER).trim();
|
|
644
|
+
const rawPublicTeamWorker = safeString(process.env.OMX_TEAM_WORKER).trim();
|
|
645
|
+
const parsedInternalTeamWorker = parseTeamWorkerEnv(rawInternalTeamWorker);
|
|
646
|
+
const parsedPublicTeamWorker = parseTeamWorkerEnv(rawPublicTeamWorker);
|
|
647
|
+
const hasTeamWorkerDeclaration = rawInternalTeamWorker !== '' || rawPublicTeamWorker !== '';
|
|
648
|
+
if (hasTeamWorkerDeclaration && (!parsedInternalTeamWorker
|
|
649
|
+
|| (rawPublicTeamWorker !== '' && !parsedPublicTeamWorker)
|
|
650
|
+
|| (parsedPublicTeamWorker && parsedPublicTeamWorker.workerName !== parsedInternalTeamWorker.workerName))) {
|
|
651
|
+
return;
|
|
652
|
+
}
|
|
653
|
+
const parsedTeamWorker = parsedInternalTeamWorker;
|
|
584
654
|
const isTeamWorker = !!parsedTeamWorker;
|
|
585
655
|
|
|
586
656
|
const resolvedWorkerStateDir = (isTeamWorker && parsedTeamWorker)
|
|
587
657
|
? await resolveTeamStateDirForWorker(cwd, parsedTeamWorker)
|
|
588
658
|
: null;
|
|
589
659
|
const workerStateRootResolved = !isTeamWorker || !!resolvedWorkerStateDir;
|
|
660
|
+
if (isTeamWorker && !workerStateRootResolved) return;
|
|
590
661
|
const stateDir = resolvedWorkerStateDir || getBaseStateDir(cwd);
|
|
591
662
|
const logsDir = join(cwd, '.omx', 'logs');
|
|
592
663
|
const omxDir = join(cwd, '.omx');
|
|
@@ -703,31 +774,6 @@ async function main() {
|
|
|
703
774
|
return;
|
|
704
775
|
}
|
|
705
776
|
|
|
706
|
-
if (isTeamWorker && !workerStateRootResolved) {
|
|
707
|
-
await logNotifyHookEvent(logsDir, {
|
|
708
|
-
timestamp: new Date().toISOString(),
|
|
709
|
-
level: 'warn',
|
|
710
|
-
type: 'team_worker_state_root_unresolved',
|
|
711
|
-
team_worker: teamWorkerEnv || null,
|
|
712
|
-
reason: 'skip_team_worker_state_mutations',
|
|
713
|
-
}).catch(() => {});
|
|
714
|
-
|
|
715
|
-
// Keep the fail-closed worker state-root behavior for normal team-worker
|
|
716
|
-
// mutations, but allow the narrow auto-nudge path to use an explicitly
|
|
717
|
-
// supplied, already-existing worker state root. Auto-nudge only needs the
|
|
718
|
-
// worker-scoped state files/pane anchor and should not fall back to creating
|
|
719
|
-
// local `.omx/state` when identity resolution failed.
|
|
720
|
-
const explicitWorkerStateRoot = safeString(process.env.OMX_TEAM_STATE_ROOT || '').trim();
|
|
721
|
-
const autoNudgeStateDir = explicitWorkerStateRoot ? resolve(cwd, explicitWorkerStateRoot) : '';
|
|
722
|
-
if (autoNudgeStateDir && existsSync(autoNudgeStateDir)) {
|
|
723
|
-
try {
|
|
724
|
-
await maybeAutoNudge({ cwd, stateDir: autoNudgeStateDir, logsDir, payload });
|
|
725
|
-
} catch {
|
|
726
|
-
// Non-critical
|
|
727
|
-
}
|
|
728
|
-
}
|
|
729
|
-
return;
|
|
730
|
-
}
|
|
731
777
|
|
|
732
778
|
// Reconcile Ralph ownership for same-Codex-session continuation before
|
|
733
779
|
// lifecycle counters or injection read the active scope.
|
|
@@ -942,8 +988,9 @@ async function main() {
|
|
|
942
988
|
|
|
943
989
|
// 4.45. Skill activation tracking: update skill-active-state.json before any nudge logic.
|
|
944
990
|
if (isTeamWorker || canWriteLeaderScopedState) {
|
|
991
|
+
let activationResult: SkillActiveState | null = null;
|
|
945
992
|
if (latestUserInput) {
|
|
946
|
-
await recordNotifySkillActivationNonFatal({
|
|
993
|
+
activationResult = await recordNotifySkillActivationNonFatal({
|
|
947
994
|
stateDir,
|
|
948
995
|
sourceCwd: cwd,
|
|
949
996
|
text: latestUserInput,
|
|
@@ -963,6 +1010,12 @@ async function main() {
|
|
|
963
1010
|
}),
|
|
964
1011
|
});
|
|
965
1012
|
}
|
|
1013
|
+
if (activationResult?.skill === 'autopilot'
|
|
1014
|
+
&& activationResult.active === false
|
|
1015
|
+
&& activationResult.error === 'documented_host_consensus_receipt_unavailable') {
|
|
1016
|
+
await dispatchTurnCompleteHookEvents(payload, cwd, payloadSessionId, getEffectiveSessionId());
|
|
1017
|
+
return;
|
|
1018
|
+
}
|
|
966
1019
|
|
|
967
1020
|
try {
|
|
968
1021
|
skillSyncResult = await syncSkillStateFromTurn(
|
|
@@ -1029,59 +1082,7 @@ async function main() {
|
|
|
1029
1082
|
}
|
|
1030
1083
|
|
|
1031
1084
|
// 7. Dispatch native turn-complete hook event (best effort, post-dedupe)
|
|
1032
|
-
|
|
1033
|
-
const { buildNativeHookEvent, buildDerivedHookEvent } = await import('../hooks/extensibility/events.js');
|
|
1034
|
-
const { dispatchHookEvent } = await import('../hooks/extensibility/dispatcher.js');
|
|
1035
|
-
const sessionIdForHooks = getEffectiveSessionId();
|
|
1036
|
-
const threadIdForHooks = safeString(payload['thread-id'] || payload.thread_id || '');
|
|
1037
|
-
const turnIdForHooks = safeString(payload['turn-id'] || payload.turn_id || '');
|
|
1038
|
-
const modeForHooks = safeString(payload.mode || '');
|
|
1039
|
-
const outputPreview = safeString(payload['last-assistant-message'] || payload.last_assistant_message || '').slice(0, 400);
|
|
1040
|
-
const event = buildNativeHookEvent('turn-complete', {
|
|
1041
|
-
source: safeString(payload.source || 'native'),
|
|
1042
|
-
type: safeString(payload.type || 'agent-turn-complete'),
|
|
1043
|
-
input_messages: normalizeInputMessages(payload),
|
|
1044
|
-
output_preview: outputPreview,
|
|
1045
|
-
native_session_id: payloadSessionId || null,
|
|
1046
|
-
omx_session_id: sessionIdForHooks || null,
|
|
1047
|
-
...readRepositoryMetadata(cwd),
|
|
1048
|
-
session_name: resolveOperationalSessionName(cwd, sessionIdForHooks),
|
|
1049
|
-
project_path: cwd,
|
|
1050
|
-
project_name: safeString(payload.project_name || ''),
|
|
1051
|
-
}, {
|
|
1052
|
-
session_id: sessionIdForHooks,
|
|
1053
|
-
thread_id: threadIdForHooks,
|
|
1054
|
-
turn_id: turnIdForHooks,
|
|
1055
|
-
mode: modeForHooks,
|
|
1056
|
-
});
|
|
1057
|
-
await dispatchHookEvent(event, { cwd });
|
|
1058
|
-
|
|
1059
|
-
for (const signal of deriveAssistantSignalEvents(outputPreview)) {
|
|
1060
|
-
const derivedEvent = buildDerivedHookEvent(signal.event, buildOperationalContext({
|
|
1061
|
-
cwd,
|
|
1062
|
-
normalizedEvent: signal.normalized_event,
|
|
1063
|
-
sessionId: sessionIdForHooks,
|
|
1064
|
-
text: outputPreview,
|
|
1065
|
-
status: signal.normalized_event,
|
|
1066
|
-
errorSummary: signal.error_summary,
|
|
1067
|
-
extra: {
|
|
1068
|
-
native_session_id: payloadSessionId || null,
|
|
1069
|
-
omx_session_id: sessionIdForHooks || null,
|
|
1070
|
-
source_event: safeString(payload.type || 'agent-turn-complete'),
|
|
1071
|
-
},
|
|
1072
|
-
}), {
|
|
1073
|
-
session_id: sessionIdForHooks,
|
|
1074
|
-
thread_id: threadIdForHooks,
|
|
1075
|
-
turn_id: turnIdForHooks,
|
|
1076
|
-
mode: modeForHooks,
|
|
1077
|
-
confidence: signal.confidence,
|
|
1078
|
-
parser_reason: signal.parser_reason,
|
|
1079
|
-
});
|
|
1080
|
-
await dispatchHookEvent(derivedEvent, { cwd });
|
|
1081
|
-
}
|
|
1082
|
-
} catch {
|
|
1083
|
-
// Non-fatal: extensibility modules may not be built yet
|
|
1084
|
-
}
|
|
1085
|
+
await dispatchTurnCompleteHookEvents(payload, cwd, payloadSessionId, getEffectiveSessionId());
|
|
1085
1086
|
|
|
1086
1087
|
// 8. Dispatch session-idle lifecycle notification (lead session only, best effort)
|
|
1087
1088
|
if (!isTeamWorker) {
|
|
@@ -1218,6 +1219,7 @@ async function main() {
|
|
|
1218
1219
|
const csText = `${csResult.message} ${DEFAULT_MARKER}`;
|
|
1219
1220
|
const sendResult = await sendPaneInput({
|
|
1220
1221
|
paneTarget: csPaneId,
|
|
1222
|
+
exactPaneId: csPaneId,
|
|
1221
1223
|
prompt: csText,
|
|
1222
1224
|
submitKeyPresses: 2,
|
|
1223
1225
|
submitDelayMs: 100,
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { mkdir, readFile, writeFile } from 'node:fs/promises';
|
|
3
|
+
import { dirname } from 'node:path';
|
|
4
|
+
import { omxUserInstallStampPath } from '../utils/paths.js';
|
|
5
|
+
|
|
6
|
+
export interface UserInstallStamp {
|
|
7
|
+
installed_version: string;
|
|
8
|
+
setup_completed_version?: string;
|
|
9
|
+
install_channel?: 'stable' | 'dev';
|
|
10
|
+
install_source?: string;
|
|
11
|
+
install_revision?: string;
|
|
12
|
+
dev_base_version?: string;
|
|
13
|
+
package_manager?: 'npm' | 'bun';
|
|
14
|
+
updated_at: string;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function stripLeadingV(version: string): string {
|
|
18
|
+
return version.trim().replace(/^v/i, '');
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export async function readUserInstallStamp(
|
|
22
|
+
path = omxUserInstallStampPath(),
|
|
23
|
+
): Promise<UserInstallStamp | null> {
|
|
24
|
+
if (!existsSync(path)) return null;
|
|
25
|
+
try {
|
|
26
|
+
const content = await readFile(path, 'utf-8');
|
|
27
|
+
const parsed = JSON.parse(content) as Partial<UserInstallStamp>;
|
|
28
|
+
if (typeof parsed.installed_version !== 'string' || typeof parsed.updated_at !== 'string') {
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
31
|
+
return {
|
|
32
|
+
installed_version: parsed.installed_version,
|
|
33
|
+
...(typeof parsed.setup_completed_version === 'string'
|
|
34
|
+
? { setup_completed_version: parsed.setup_completed_version }
|
|
35
|
+
: {}),
|
|
36
|
+
...(parsed.install_channel === 'stable' || parsed.install_channel === 'dev'
|
|
37
|
+
? { install_channel: parsed.install_channel }
|
|
38
|
+
: {}),
|
|
39
|
+
...(typeof parsed.install_source === 'string' ? { install_source: parsed.install_source } : {}),
|
|
40
|
+
...(typeof parsed.install_revision === 'string' ? { install_revision: parsed.install_revision } : {}),
|
|
41
|
+
...(typeof parsed.dev_base_version === 'string' ? { dev_base_version: parsed.dev_base_version } : {}),
|
|
42
|
+
...(parsed.package_manager === 'npm' || parsed.package_manager === 'bun'
|
|
43
|
+
? { package_manager: parsed.package_manager }
|
|
44
|
+
: {}),
|
|
45
|
+
updated_at: parsed.updated_at,
|
|
46
|
+
};
|
|
47
|
+
} catch {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export async function writeUserInstallStamp(
|
|
53
|
+
stamp: UserInstallStamp,
|
|
54
|
+
path = omxUserInstallStampPath(),
|
|
55
|
+
): Promise<void> {
|
|
56
|
+
await mkdir(dirname(path), { recursive: true });
|
|
57
|
+
await writeFile(path, JSON.stringify(stamp, null, 2));
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function isInstallVersionBump(
|
|
61
|
+
currentVersion: string | null | undefined,
|
|
62
|
+
stamp: UserInstallStamp | null,
|
|
63
|
+
): boolean {
|
|
64
|
+
if (!currentVersion) return false;
|
|
65
|
+
if (!stamp?.installed_version) return true;
|
|
66
|
+
return stripLeadingV(currentVersion) !== stripLeadingV(stamp.installed_version);
|
|
67
|
+
}
|