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
|
@@ -178,6 +178,56 @@ fn exec_with_state_dir_persists() {
|
|
|
178
178
|
let _ = std::fs::remove_dir_all(&dir);
|
|
179
179
|
}
|
|
180
180
|
|
|
181
|
+
#[test]
|
|
182
|
+
fn exec_rejects_missing_seen_ledger_after_persisted_dispatch_history() {
|
|
183
|
+
let dir = std::env::temp_dir().join("omx-runtime-test-exec-missing-seen-ledger");
|
|
184
|
+
let _ = std::fs::remove_dir_all(&dir);
|
|
185
|
+
let state_arg = format!("--state-dir={}", dir.display());
|
|
186
|
+
let queued = Command::new(env!("CARGO_BIN_EXE_omx-runtime"))
|
|
187
|
+
.args([
|
|
188
|
+
"exec",
|
|
189
|
+
r#"{"command":"QueueDispatch","request_id":"request-1","target":"worker"}"#,
|
|
190
|
+
&state_arg,
|
|
191
|
+
])
|
|
192
|
+
.output()
|
|
193
|
+
.expect("queued dispatch");
|
|
194
|
+
assert!(queued.status.success());
|
|
195
|
+
std::fs::remove_file(dir.join("dispatch-seen.json")).expect("removed seen ledger");
|
|
196
|
+
|
|
197
|
+
let reloaded = Command::new(env!("CARGO_BIN_EXE_omx-runtime"))
|
|
198
|
+
.args(["exec", r#"{"command":"CaptureSnapshot"}"#, &state_arg])
|
|
199
|
+
.output()
|
|
200
|
+
.expect("reloaded persisted state");
|
|
201
|
+
assert!(!reloaded.status.success());
|
|
202
|
+
assert!(String::from_utf8_lossy(&reloaded.stderr).contains("missing dispatch seen ledger"));
|
|
203
|
+
let _ = std::fs::remove_dir_all(&dir);
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
#[test]
|
|
207
|
+
fn exec_ignores_dispatch_compat_without_authoritative_runtime_state() {
|
|
208
|
+
let dir = std::env::temp_dir().join("omx-runtime-test-dispatch-compat-only");
|
|
209
|
+
let _ = std::fs::remove_dir_all(&dir);
|
|
210
|
+
std::fs::create_dir_all(&dir).unwrap();
|
|
211
|
+
std::fs::write(dir.join("dispatch.json"), "[]\n").unwrap();
|
|
212
|
+
|
|
213
|
+
let cmd_json = r#"{"command":"CaptureSnapshot"}"#;
|
|
214
|
+
let state_arg = format!("--state-dir={}", dir.display());
|
|
215
|
+
let output = Command::new(env!("CARGO_BIN_EXE_omx-runtime"))
|
|
216
|
+
.args(["exec", cmd_json, &state_arg])
|
|
217
|
+
.output()
|
|
218
|
+
.expect("ran omx-runtime");
|
|
219
|
+
|
|
220
|
+
assert!(
|
|
221
|
+
output.status.success(),
|
|
222
|
+
"dispatch compatibility output must not poison fresh authoritative state: {}",
|
|
223
|
+
String::from_utf8_lossy(&output.stderr)
|
|
224
|
+
);
|
|
225
|
+
assert!(dir.join("events.json").exists());
|
|
226
|
+
assert!(dir.join("snapshot.json").exists());
|
|
227
|
+
|
|
228
|
+
let _ = std::fs::remove_dir_all(&dir);
|
|
229
|
+
}
|
|
230
|
+
|
|
181
231
|
#[test]
|
|
182
232
|
fn snapshot_from_state_dir_reads_persisted_state() {
|
|
183
233
|
let dir = std::env::temp_dir().join("omx-runtime-test-snapshot-statedir");
|
|
@@ -210,3 +260,436 @@ fn snapshot_from_state_dir_reads_persisted_state() {
|
|
|
210
260
|
|
|
211
261
|
let _ = std::fs::remove_dir_all(&dir);
|
|
212
262
|
}
|
|
263
|
+
|
|
264
|
+
#[test]
|
|
265
|
+
fn exec_compact_immediately_persists_only_nonterminal_dispatch_records() {
|
|
266
|
+
let dir = std::env::temp_dir().join("omx-runtime-test-exec-compact-dispatch");
|
|
267
|
+
let _ = std::fs::remove_dir_all(&dir);
|
|
268
|
+
let state_arg = format!("--state-dir={}", dir.display());
|
|
269
|
+
let run_exec = |json: &str, compact: bool| {
|
|
270
|
+
let mut command = Command::new(env!("CARGO_BIN_EXE_omx-runtime"));
|
|
271
|
+
command.args(["exec", json, &state_arg]);
|
|
272
|
+
if compact {
|
|
273
|
+
command.arg("--compact");
|
|
274
|
+
}
|
|
275
|
+
let output = command.output().expect("ran omx-runtime");
|
|
276
|
+
assert!(
|
|
277
|
+
output.status.success(),
|
|
278
|
+
"exec failed: {}",
|
|
279
|
+
String::from_utf8_lossy(&output.stderr)
|
|
280
|
+
);
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
run_exec(
|
|
284
|
+
r#"{"command":"QueueDispatch","request_id":"pending","target":"worker-pending"}"#,
|
|
285
|
+
false,
|
|
286
|
+
);
|
|
287
|
+
run_exec(
|
|
288
|
+
r#"{"command":"QueueDispatch","request_id":"notified","target":"worker-notified"}"#,
|
|
289
|
+
false,
|
|
290
|
+
);
|
|
291
|
+
run_exec(
|
|
292
|
+
r#"{"command":"MarkNotified","request_id":"notified","channel":"tmux"}"#,
|
|
293
|
+
false,
|
|
294
|
+
);
|
|
295
|
+
run_exec(
|
|
296
|
+
r#"{"command":"QueueDispatch","request_id":"delivered","target":"worker-delivered"}"#,
|
|
297
|
+
false,
|
|
298
|
+
);
|
|
299
|
+
run_exec(
|
|
300
|
+
r#"{"command":"MarkNotified","request_id":"delivered","channel":"tmux"}"#,
|
|
301
|
+
false,
|
|
302
|
+
);
|
|
303
|
+
run_exec(
|
|
304
|
+
r#"{"command":"MarkDelivered","request_id":"delivered"}"#,
|
|
305
|
+
false,
|
|
306
|
+
);
|
|
307
|
+
run_exec(r#"{"command":"CaptureSnapshot"}"#, false);
|
|
308
|
+
run_exec(
|
|
309
|
+
r#"{"command":"QueueDispatch","request_id":"failed","target":"worker-failed"}"#,
|
|
310
|
+
false,
|
|
311
|
+
);
|
|
312
|
+
run_exec(
|
|
313
|
+
r#"{"command":"MarkFailed","request_id":"failed","reason":"target unavailable"}"#,
|
|
314
|
+
true,
|
|
315
|
+
);
|
|
316
|
+
|
|
317
|
+
let duplicate = Command::new(env!("CARGO_BIN_EXE_omx-runtime"))
|
|
318
|
+
.args([
|
|
319
|
+
"exec",
|
|
320
|
+
r#"{"command":"QueueDispatch","request_id":"failed","target":"replacement"}"#,
|
|
321
|
+
&state_arg,
|
|
322
|
+
])
|
|
323
|
+
.output()
|
|
324
|
+
.expect("ran duplicate dispatch exec");
|
|
325
|
+
assert!(!duplicate.status.success());
|
|
326
|
+
assert!(String::from_utf8_lossy(&duplicate.stderr)
|
|
327
|
+
.contains("duplicate dispatch request id: failed"));
|
|
328
|
+
assert!(dir.join("dispatch-seen.json").exists());
|
|
329
|
+
|
|
330
|
+
let dispatch: serde_json::Value = serde_json::from_str(
|
|
331
|
+
&std::fs::read_to_string(dir.join("dispatch.json")).expect("read immediate dispatch view"),
|
|
332
|
+
)
|
|
333
|
+
.expect("valid dispatch JSON");
|
|
334
|
+
let records = dispatch["records"]
|
|
335
|
+
.as_array()
|
|
336
|
+
.expect("dispatch records array");
|
|
337
|
+
assert_eq!(records.len(), 2);
|
|
338
|
+
assert_eq!(records[0]["request_id"], "pending");
|
|
339
|
+
assert_eq!(records[0]["status"], "pending");
|
|
340
|
+
assert_eq!(records[1]["request_id"], "notified");
|
|
341
|
+
assert_eq!(records[1]["status"], "notified");
|
|
342
|
+
|
|
343
|
+
run_exec(r#"{"command":"CaptureSnapshot"}"#, false);
|
|
344
|
+
let reloaded_dispatch: serde_json::Value = serde_json::from_str(
|
|
345
|
+
&std::fs::read_to_string(dir.join("dispatch.json"))
|
|
346
|
+
.expect("read reload-persisted dispatch view"),
|
|
347
|
+
)
|
|
348
|
+
.expect("valid reload-persisted dispatch JSON");
|
|
349
|
+
let reloaded_records = reloaded_dispatch["records"]
|
|
350
|
+
.as_array()
|
|
351
|
+
.expect("reload-persisted dispatch records array");
|
|
352
|
+
assert_eq!(reloaded_records.len(), records.len());
|
|
353
|
+
for (immediate, reloaded) in records.iter().zip(reloaded_records) {
|
|
354
|
+
for field in ["request_id", "target", "status", "metadata", "reason"] {
|
|
355
|
+
assert_eq!(reloaded[field], immediate[field], "semantic field {field}");
|
|
356
|
+
}
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
let snapshot: serde_json::Value = serde_json::from_str(
|
|
360
|
+
&std::fs::read_to_string(dir.join("snapshot.json"))
|
|
361
|
+
.expect("read reload-persisted snapshot"),
|
|
362
|
+
)
|
|
363
|
+
.expect("valid reload-persisted snapshot JSON");
|
|
364
|
+
assert_eq!(snapshot["backlog"]["pending"], 1);
|
|
365
|
+
assert_eq!(snapshot["backlog"]["notified"], 1);
|
|
366
|
+
assert_eq!(snapshot["backlog"]["delivered"], 0);
|
|
367
|
+
assert_eq!(snapshot["backlog"]["failed"], 0);
|
|
368
|
+
|
|
369
|
+
let events: serde_json::Value = serde_json::from_str(
|
|
370
|
+
&std::fs::read_to_string(dir.join("events.json")).expect("read compacted events"),
|
|
371
|
+
)
|
|
372
|
+
.expect("valid events JSON");
|
|
373
|
+
let events = events.as_array().expect("events array");
|
|
374
|
+
assert!(events
|
|
375
|
+
.iter()
|
|
376
|
+
.any(|event| event["event"] == "SnapshotCaptured"));
|
|
377
|
+
assert!(events
|
|
378
|
+
.iter()
|
|
379
|
+
.all(|event| { event["request_id"] != "delivered" && event["request_id"] != "failed" }));
|
|
380
|
+
|
|
381
|
+
let event_request_ids: Vec<&str> = events
|
|
382
|
+
.iter()
|
|
383
|
+
.filter_map(|event| event["request_id"].as_str())
|
|
384
|
+
.collect();
|
|
385
|
+
assert_eq!(event_request_ids, vec!["pending", "notified", "notified"]);
|
|
386
|
+
let _ = std::fs::remove_dir_all(&dir);
|
|
387
|
+
}
|
|
388
|
+
|
|
389
|
+
#[test]
|
|
390
|
+
fn concurrent_exec_queue_accepts_exactly_one_request_id() {
|
|
391
|
+
let dir = std::env::temp_dir().join("omx-runtime-test-concurrent-dispatch-id");
|
|
392
|
+
let _ = std::fs::remove_dir_all(&dir);
|
|
393
|
+
let state_arg = format!("--state-dir={}", dir.display());
|
|
394
|
+
let barrier = std::sync::Arc::new(std::sync::Barrier::new(3));
|
|
395
|
+
let mut workers = Vec::new();
|
|
396
|
+
for target in ["worker-a", "worker-b"] {
|
|
397
|
+
let barrier = std::sync::Arc::clone(&barrier);
|
|
398
|
+
let state_arg = state_arg.clone();
|
|
399
|
+
workers.push(std::thread::spawn(move || {
|
|
400
|
+
barrier.wait();
|
|
401
|
+
Command::new(env!("CARGO_BIN_EXE_omx-runtime"))
|
|
402
|
+
.args([
|
|
403
|
+
"exec",
|
|
404
|
+
&format!(
|
|
405
|
+
r#"{{"command":"QueueDispatch","request_id":"concurrent","target":"{target}"}}"#
|
|
406
|
+
),
|
|
407
|
+
&state_arg,
|
|
408
|
+
])
|
|
409
|
+
.output()
|
|
410
|
+
.expect("ran concurrent dispatch exec")
|
|
411
|
+
.status
|
|
412
|
+
.success()
|
|
413
|
+
}));
|
|
414
|
+
}
|
|
415
|
+
barrier.wait();
|
|
416
|
+
assert_eq!(
|
|
417
|
+
workers
|
|
418
|
+
.into_iter()
|
|
419
|
+
.map(|worker| worker.join().unwrap())
|
|
420
|
+
.filter(|accepted| *accepted)
|
|
421
|
+
.count(),
|
|
422
|
+
1
|
|
423
|
+
);
|
|
424
|
+
let dispatch: serde_json::Value = serde_json::from_str(
|
|
425
|
+
&std::fs::read_to_string(dir.join("dispatch.json")).expect("read dispatch view"),
|
|
426
|
+
)
|
|
427
|
+
.expect("valid dispatch JSON");
|
|
428
|
+
assert_eq!(dispatch["records"].as_array().unwrap().len(), 1);
|
|
429
|
+
assert_eq!(dispatch["records"][0]["request_id"], "concurrent");
|
|
430
|
+
let _ = std::fs::remove_dir_all(&dir);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
// ---------------------------------------------------------------------------
|
|
434
|
+
// fs-rename-no-replace integration tests
|
|
435
|
+
//
|
|
436
|
+
// These tests exercise the omx-runtime `fs-rename-no-replace` subcommand
|
|
437
|
+
// through the compiled binary. On Linux (both gnu and musl) this exercises
|
|
438
|
+
// the SYS_renameat2 syscall path with RENAME_NOREPLACE.
|
|
439
|
+
// ---------------------------------------------------------------------------
|
|
440
|
+
|
|
441
|
+
/// Helper: run `fs-rename-no-replace <from> <to>` and return (exit_ok, stdout, stderr).
|
|
442
|
+
fn run_rename_no_replace(from: &str, to: &str) -> (bool, String, String) {
|
|
443
|
+
let output = Command::new(env!("CARGO_BIN_EXE_omx-runtime"))
|
|
444
|
+
.args(["fs-rename-no-replace", from, to])
|
|
445
|
+
.output()
|
|
446
|
+
.expect("ran omx-runtime fs-rename-no-replace");
|
|
447
|
+
(
|
|
448
|
+
output.status.success(),
|
|
449
|
+
String::from_utf8_lossy(&output.stdout).into_owned(),
|
|
450
|
+
String::from_utf8_lossy(&output.stderr).into_owned(),
|
|
451
|
+
)
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
#[cfg(target_os = "linux")]
|
|
455
|
+
mod fs_rename_no_replace_linux {
|
|
456
|
+
use super::*;
|
|
457
|
+
|
|
458
|
+
fn temp_dir() -> std::path::PathBuf {
|
|
459
|
+
let dir = std::env::temp_dir().join(format!(
|
|
460
|
+
"omx-rename-test-{}-{}",
|
|
461
|
+
std::process::id(),
|
|
462
|
+
std::time::SystemTime::now()
|
|
463
|
+
.duration_since(std::time::UNIX_EPOCH)
|
|
464
|
+
.unwrap()
|
|
465
|
+
.as_nanos()
|
|
466
|
+
));
|
|
467
|
+
std::fs::create_dir_all(&dir).unwrap();
|
|
468
|
+
dir
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
#[test]
|
|
472
|
+
fn moves_regular_file_and_source_removed() {
|
|
473
|
+
let dir = temp_dir();
|
|
474
|
+
let src = dir.join("source.txt");
|
|
475
|
+
let dst = dir.join("dest.txt");
|
|
476
|
+
std::fs::write(&src, "hello").unwrap();
|
|
477
|
+
|
|
478
|
+
let (ok, stdout, _stderr) =
|
|
479
|
+
run_rename_no_replace(src.to_str().unwrap(), dst.to_str().unwrap());
|
|
480
|
+
assert!(ok, "command should succeed: {stdout}");
|
|
481
|
+
|
|
482
|
+
if stdout.contains(r#""outcome":"unsupported""#) {
|
|
483
|
+
// Kernel/filesystem does not support RENAME_NOREPLACE; the
|
|
484
|
+
// binary correctly classified it as unsupported. Source must
|
|
485
|
+
// still exist (no move occurred).
|
|
486
|
+
assert!(src.exists(), "source must be preserved when unsupported");
|
|
487
|
+
let _ = std::fs::remove_dir_all(&dir);
|
|
488
|
+
return;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
assert!(stdout.contains(r#""outcome":"moved""#), "stdout: {stdout}");
|
|
492
|
+
|
|
493
|
+
// Source must be gone; destination must contain the content.
|
|
494
|
+
assert!(!src.exists(), "source must be removed after move");
|
|
495
|
+
assert!(dst.exists(), "destination must exist after move");
|
|
496
|
+
assert_eq!(std::fs::read_to_string(&dst).unwrap(), "hello");
|
|
497
|
+
|
|
498
|
+
let _ = std::fs::remove_dir_all(&dir);
|
|
499
|
+
}
|
|
500
|
+
|
|
501
|
+
#[test]
|
|
502
|
+
fn moves_directory_and_source_removed() {
|
|
503
|
+
let dir = temp_dir();
|
|
504
|
+
let src = dir.join("source_dir");
|
|
505
|
+
let dst = dir.join("dest_dir");
|
|
506
|
+
std::fs::create_dir(&src).unwrap();
|
|
507
|
+
std::fs::write(src.join("inner.txt"), "inner").unwrap();
|
|
508
|
+
|
|
509
|
+
let (ok, stdout, _stderr) =
|
|
510
|
+
run_rename_no_replace(src.to_str().unwrap(), dst.to_str().unwrap());
|
|
511
|
+
assert!(ok, "directory move should succeed: {stdout}");
|
|
512
|
+
|
|
513
|
+
if stdout.contains(r#""outcome":"unsupported""#) {
|
|
514
|
+
assert!(
|
|
515
|
+
src.exists(),
|
|
516
|
+
"source dir must be preserved when unsupported"
|
|
517
|
+
);
|
|
518
|
+
let _ = std::fs::remove_dir_all(&dir);
|
|
519
|
+
return;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
assert!(stdout.contains(r#""outcome":"moved""#), "stdout: {stdout}");
|
|
523
|
+
|
|
524
|
+
assert!(!src.exists(), "source directory must be removed");
|
|
525
|
+
assert!(dst.exists(), "destination directory must exist");
|
|
526
|
+
assert!(dst.join("inner.txt").exists(), "inner file must survive");
|
|
527
|
+
|
|
528
|
+
let _ = std::fs::remove_dir_all(&dir);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
#[test]
|
|
532
|
+
fn destination_collision_returns_not_moved_and_source_preserved() {
|
|
533
|
+
let dir = temp_dir();
|
|
534
|
+
let src = dir.join("source.txt");
|
|
535
|
+
let dst = dir.join("dest.txt");
|
|
536
|
+
std::fs::write(&src, "source-content").unwrap();
|
|
537
|
+
std::fs::write(&dst, "dest-content").unwrap();
|
|
538
|
+
|
|
539
|
+
let (ok, stdout, _stderr) =
|
|
540
|
+
run_rename_no_replace(src.to_str().unwrap(), dst.to_str().unwrap());
|
|
541
|
+
assert!(ok, "command should succeed: {stdout}");
|
|
542
|
+
|
|
543
|
+
if stdout.contains(r#""outcome":"unsupported""#) {
|
|
544
|
+
// On unsupported filesystems both files must be untouched.
|
|
545
|
+
assert_eq!(std::fs::read_to_string(&src).unwrap(), "source-content");
|
|
546
|
+
assert_eq!(std::fs::read_to_string(&dst).unwrap(), "dest-content");
|
|
547
|
+
let _ = std::fs::remove_dir_all(&dir);
|
|
548
|
+
return;
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
assert!(
|
|
552
|
+
stdout.contains(r#""outcome":"not-moved""#),
|
|
553
|
+
"stdout: {stdout}"
|
|
554
|
+
);
|
|
555
|
+
|
|
556
|
+
// Both files must be untouched.
|
|
557
|
+
assert!(src.exists(), "source must still exist");
|
|
558
|
+
assert!(dst.exists(), "destination must still exist");
|
|
559
|
+
assert_eq!(std::fs::read_to_string(&src).unwrap(), "source-content");
|
|
560
|
+
assert_eq!(std::fs::read_to_string(&dst).unwrap(), "dest-content");
|
|
561
|
+
|
|
562
|
+
let _ = std::fs::remove_dir_all(&dir);
|
|
563
|
+
}
|
|
564
|
+
|
|
565
|
+
#[test]
|
|
566
|
+
fn nonexistent_source_returns_error() {
|
|
567
|
+
let dir = temp_dir();
|
|
568
|
+
let src = dir.join("nope.txt");
|
|
569
|
+
let dst = dir.join("dest.txt");
|
|
570
|
+
|
|
571
|
+
let (ok, _stdout, stderr) =
|
|
572
|
+
run_rename_no_replace(src.to_str().unwrap(), dst.to_str().unwrap());
|
|
573
|
+
assert!(!ok, "command should fail for nonexistent source");
|
|
574
|
+
assert!(
|
|
575
|
+
stderr.contains("omx-runtime:") || stderr.contains("error"),
|
|
576
|
+
"stderr should contain error: {stderr}"
|
|
577
|
+
);
|
|
578
|
+
|
|
579
|
+
let _ = std::fs::remove_dir_all(&dir);
|
|
580
|
+
}
|
|
581
|
+
|
|
582
|
+
#[test]
|
|
583
|
+
fn relative_path_rejected_with_error() {
|
|
584
|
+
let (ok, _stdout, stderr) = run_rename_no_replace("relative.txt", "dest.txt");
|
|
585
|
+
assert!(!ok, "relative paths should be rejected");
|
|
586
|
+
assert!(
|
|
587
|
+
stderr.contains("absolute") || stderr.contains("error"),
|
|
588
|
+
"stderr should mention absolute: {stderr}"
|
|
589
|
+
);
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
#[cfg(any(target_os = "linux", target_os = "macos", target_os = "windows"))]
|
|
594
|
+
#[test]
|
|
595
|
+
fn process_identity_current_process_returns_identity() {
|
|
596
|
+
let pid = std::process::id().to_string();
|
|
597
|
+
let output = Command::new(env!("CARGO_BIN_EXE_omx-runtime"))
|
|
598
|
+
.args(["process-identity", &pid])
|
|
599
|
+
.output()
|
|
600
|
+
.expect("ran omx-runtime process-identity");
|
|
601
|
+
|
|
602
|
+
assert!(
|
|
603
|
+
output.status.success(),
|
|
604
|
+
"process-identity failed: {}",
|
|
605
|
+
String::from_utf8_lossy(&output.stderr)
|
|
606
|
+
);
|
|
607
|
+
let stdout = String::from_utf8(output.stdout).expect("utf8 stdout");
|
|
608
|
+
let parsed: serde_json::Value = serde_json::from_str(&stdout).expect("valid JSON");
|
|
609
|
+
|
|
610
|
+
let platform = parsed["platform"].as_str().expect("platform string");
|
|
611
|
+
let expected_platform = if cfg!(target_os = "macos") {
|
|
612
|
+
"darwin"
|
|
613
|
+
} else if cfg!(target_os = "windows") {
|
|
614
|
+
"win32"
|
|
615
|
+
} else {
|
|
616
|
+
"linux"
|
|
617
|
+
};
|
|
618
|
+
assert_eq!(platform, expected_platform);
|
|
619
|
+
let birth = parsed["birth"].as_str().expect("birth string");
|
|
620
|
+
assert!(!birth.is_empty(), "birth must not be empty");
|
|
621
|
+
if cfg!(target_os = "macos") {
|
|
622
|
+
let (seconds, microseconds) = birth
|
|
623
|
+
.split_once('.')
|
|
624
|
+
.expect("darwin birth must contain seconds.microseconds");
|
|
625
|
+
assert!(
|
|
626
|
+
!seconds.is_empty() && seconds.chars().all(|character| character.is_ascii_digit()),
|
|
627
|
+
"darwin birth seconds must be decimal: {birth}"
|
|
628
|
+
);
|
|
629
|
+
assert!(
|
|
630
|
+
!microseconds.is_empty()
|
|
631
|
+
&& microseconds
|
|
632
|
+
.chars()
|
|
633
|
+
.all(|character| character.is_ascii_digit()),
|
|
634
|
+
"darwin birth microseconds must be decimal: {birth}"
|
|
635
|
+
);
|
|
636
|
+
} else {
|
|
637
|
+
assert!(
|
|
638
|
+
birth.chars().all(|character| character.is_ascii_digit()),
|
|
639
|
+
"birth must be a decimal string: {birth}"
|
|
640
|
+
);
|
|
641
|
+
}
|
|
642
|
+
if let Some(cmdline) = parsed.get("cmdline") {
|
|
643
|
+
assert!(cmdline.is_string(), "cmdline must be a string when present");
|
|
644
|
+
}
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
#[test]
|
|
648
|
+
fn process_identity_zero_pid_fails() {
|
|
649
|
+
let output = Command::new(env!("CARGO_BIN_EXE_omx-runtime"))
|
|
650
|
+
.args(["process-identity", "0"])
|
|
651
|
+
.output()
|
|
652
|
+
.expect("ran omx-runtime process-identity");
|
|
653
|
+
|
|
654
|
+
assert_eq!(output.status.code(), Some(1));
|
|
655
|
+
let stderr = String::from_utf8(output.stderr).expect("utf8 stderr");
|
|
656
|
+
assert!(stderr.contains("process-identity pid must be > 0"));
|
|
657
|
+
}
|
|
658
|
+
|
|
659
|
+
#[test]
|
|
660
|
+
fn process_identity_non_numeric_pid_fails() {
|
|
661
|
+
let output = Command::new(env!("CARGO_BIN_EXE_omx-runtime"))
|
|
662
|
+
.args(["process-identity", "abc"])
|
|
663
|
+
.output()
|
|
664
|
+
.expect("ran omx-runtime process-identity");
|
|
665
|
+
|
|
666
|
+
assert_eq!(output.status.code(), Some(1));
|
|
667
|
+
let stderr = String::from_utf8(output.stderr).expect("utf8 stderr");
|
|
668
|
+
assert!(stderr.contains("process-identity pid must be a positive integer"));
|
|
669
|
+
}
|
|
670
|
+
|
|
671
|
+
#[cfg(target_os = "linux")]
|
|
672
|
+
#[test]
|
|
673
|
+
fn process_identity_nonexistent_pid_reports_gone() {
|
|
674
|
+
let output = Command::new(env!("CARGO_BIN_EXE_omx-runtime"))
|
|
675
|
+
.args(["process-identity", "999999999"])
|
|
676
|
+
.output()
|
|
677
|
+
.expect("ran omx-runtime process-identity");
|
|
678
|
+
|
|
679
|
+
assert_eq!(output.status.code(), Some(0));
|
|
680
|
+
let stdout = String::from_utf8(output.stdout).expect("utf8 stdout");
|
|
681
|
+
let parsed: serde_json::Value = serde_json::from_str(&stdout).expect("valid JSON");
|
|
682
|
+
assert_eq!(parsed["outcome"], "gone");
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
#[test]
|
|
686
|
+
fn process_identity_missing_pid_fails() {
|
|
687
|
+
let output = Command::new(env!("CARGO_BIN_EXE_omx-runtime"))
|
|
688
|
+
.arg("process-identity")
|
|
689
|
+
.output()
|
|
690
|
+
.expect("ran omx-runtime process-identity");
|
|
691
|
+
|
|
692
|
+
assert_eq!(output.status.code(), Some(1));
|
|
693
|
+
let stderr = String::from_utf8(output.stderr).expect("utf8 stderr");
|
|
694
|
+
assert!(stderr.contains("process-identity requires exactly <pid>"));
|
|
695
|
+
}
|
|
@@ -39,6 +39,12 @@ pub struct DispatchRecord {
|
|
|
39
39
|
|
|
40
40
|
#[derive(Debug, Clone, PartialEq, Eq)]
|
|
41
41
|
pub enum DispatchError {
|
|
42
|
+
DuplicateRequestId {
|
|
43
|
+
request_id: String,
|
|
44
|
+
},
|
|
45
|
+
InvalidRequestId {
|
|
46
|
+
request_id: String,
|
|
47
|
+
},
|
|
42
48
|
NotFound {
|
|
43
49
|
request_id: String,
|
|
44
50
|
},
|
|
@@ -52,6 +58,12 @@ pub enum DispatchError {
|
|
|
52
58
|
impl fmt::Display for DispatchError {
|
|
53
59
|
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
|
54
60
|
match self {
|
|
61
|
+
Self::DuplicateRequestId { request_id } => {
|
|
62
|
+
write!(f, "duplicate dispatch request id: {request_id}")
|
|
63
|
+
}
|
|
64
|
+
Self::InvalidRequestId { request_id } => {
|
|
65
|
+
write!(f, "invalid dispatch request id: {request_id:?}")
|
|
66
|
+
}
|
|
55
67
|
Self::NotFound { request_id } => {
|
|
56
68
|
write!(f, "dispatch record not found: {request_id}")
|
|
57
69
|
}
|
|
@@ -85,9 +97,20 @@ impl DispatchLog {
|
|
|
85
97
|
request_id: impl Into<String>,
|
|
86
98
|
target: impl Into<String>,
|
|
87
99
|
metadata: Option<serde_json::Value>,
|
|
88
|
-
) {
|
|
100
|
+
) -> Result<(), DispatchError> {
|
|
101
|
+
let request_id = request_id.into();
|
|
102
|
+
if request_id.is_empty() {
|
|
103
|
+
return Err(DispatchError::InvalidRequestId { request_id });
|
|
104
|
+
}
|
|
105
|
+
if self
|
|
106
|
+
.records
|
|
107
|
+
.iter()
|
|
108
|
+
.any(|record| record.request_id == request_id)
|
|
109
|
+
{
|
|
110
|
+
return Err(DispatchError::DuplicateRequestId { request_id });
|
|
111
|
+
}
|
|
89
112
|
self.records.push(DispatchRecord {
|
|
90
|
-
request_id
|
|
113
|
+
request_id,
|
|
91
114
|
target: target.into(),
|
|
92
115
|
status: DispatchStatus::Pending,
|
|
93
116
|
created_at: now_iso(),
|
|
@@ -97,6 +120,7 @@ impl DispatchLog {
|
|
|
97
120
|
reason: None,
|
|
98
121
|
metadata,
|
|
99
122
|
});
|
|
123
|
+
Ok(())
|
|
100
124
|
}
|
|
101
125
|
|
|
102
126
|
pub fn mark_notified(
|
|
@@ -156,6 +180,23 @@ impl DispatchLog {
|
|
|
156
180
|
&self.records
|
|
157
181
|
}
|
|
158
182
|
|
|
183
|
+
pub fn request_ids(&self) -> impl Iterator<Item = &str> {
|
|
184
|
+
self.records.iter().map(|record| record.request_id.as_str())
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
pub fn contains_request_id(&self, request_id: &str) -> bool {
|
|
188
|
+
self.records
|
|
189
|
+
.iter()
|
|
190
|
+
.any(|record| record.request_id == request_id)
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/// Remove records that have reached a terminal delivery state.
|
|
194
|
+
pub fn prune_terminal_records(&mut self) {
|
|
195
|
+
self.records.retain(|record| {
|
|
196
|
+
record.status != DispatchStatus::Delivered && record.status != DispatchStatus::Failed
|
|
197
|
+
});
|
|
198
|
+
}
|
|
199
|
+
|
|
159
200
|
pub fn to_backlog_snapshot(&self) -> BacklogSnapshot {
|
|
160
201
|
let mut snapshot = BacklogSnapshot::default();
|
|
161
202
|
for record in &self.records {
|
|
@@ -248,7 +289,7 @@ mod tests {
|
|
|
248
289
|
#[test]
|
|
249
290
|
fn queue_and_transition_happy_path() {
|
|
250
291
|
let mut log = DispatchLog::new();
|
|
251
|
-
log.queue("req-1", "worker-1", None);
|
|
292
|
+
log.queue("req-1", "worker-1", None).unwrap();
|
|
252
293
|
assert_eq!(log.records().len(), 1);
|
|
253
294
|
assert_eq!(log.records()[0].status, DispatchStatus::Pending);
|
|
254
295
|
|
|
@@ -262,7 +303,7 @@ mod tests {
|
|
|
262
303
|
#[test]
|
|
263
304
|
fn mark_failed_from_notified() {
|
|
264
305
|
let mut log = DispatchLog::new();
|
|
265
|
-
log.queue("req-1", "worker-1", None);
|
|
306
|
+
log.queue("req-1", "worker-1", None).unwrap();
|
|
266
307
|
log.mark_notified("req-1", "tmux").unwrap();
|
|
267
308
|
log.mark_failed("req-1", "send_error").unwrap();
|
|
268
309
|
assert_eq!(log.records()[0].status, DispatchStatus::Failed);
|
|
@@ -271,7 +312,7 @@ mod tests {
|
|
|
271
312
|
#[test]
|
|
272
313
|
fn invalid_transition_errors() {
|
|
273
314
|
let mut log = DispatchLog::new();
|
|
274
|
-
log.queue("req-1", "worker-1", None);
|
|
315
|
+
log.queue("req-1", "worker-1", None).unwrap();
|
|
275
316
|
|
|
276
317
|
// Can't deliver from pending
|
|
277
318
|
let err = log.mark_delivered("req-1").unwrap_err();
|
|
@@ -282,7 +323,7 @@ mod tests {
|
|
|
282
323
|
fn mark_failed_from_pending() {
|
|
283
324
|
// Matches TS behavior: pending -> failed allowed for target resolution failures
|
|
284
325
|
let mut log = DispatchLog::new();
|
|
285
|
-
log.queue("req-1", "worker-1", None);
|
|
326
|
+
log.queue("req-1", "worker-1", None).unwrap();
|
|
286
327
|
log.mark_failed("req-1", "target_resolution_failed")
|
|
287
328
|
.unwrap();
|
|
288
329
|
assert_eq!(log.records()[0].status, DispatchStatus::Failed);
|
|
@@ -298,9 +339,9 @@ mod tests {
|
|
|
298
339
|
#[test]
|
|
299
340
|
fn backlog_snapshot_counts() {
|
|
300
341
|
let mut log = DispatchLog::new();
|
|
301
|
-
log.queue("req-1", "w1", None);
|
|
302
|
-
log.queue("req-2", "w2", None);
|
|
303
|
-
log.queue("req-3", "w3", None);
|
|
342
|
+
log.queue("req-1", "w1", None).unwrap();
|
|
343
|
+
log.queue("req-2", "w2", None).unwrap();
|
|
344
|
+
log.queue("req-3", "w3", None).unwrap();
|
|
304
345
|
log.mark_notified("req-2", "tmux").unwrap();
|
|
305
346
|
log.mark_notified("req-3", "tmux").unwrap();
|
|
306
347
|
log.mark_delivered("req-2").unwrap();
|
|
@@ -313,11 +354,34 @@ mod tests {
|
|
|
313
354
|
assert_eq!(snap.failed, 1);
|
|
314
355
|
}
|
|
315
356
|
|
|
357
|
+
#[test]
|
|
358
|
+
fn prune_terminal_records_keeps_pending_and_notified_records() {
|
|
359
|
+
let mut log = DispatchLog::new();
|
|
360
|
+
log.queue("pending", "w1", None).unwrap();
|
|
361
|
+
log.queue("notified", "w2", None).unwrap();
|
|
362
|
+
log.queue("delivered", "w3", None).unwrap();
|
|
363
|
+
log.queue("failed", "w4", None).unwrap();
|
|
364
|
+
log.mark_notified("notified", "tmux").unwrap();
|
|
365
|
+
log.mark_notified("delivered", "tmux").unwrap();
|
|
366
|
+
log.mark_delivered("delivered").unwrap();
|
|
367
|
+
log.mark_failed("failed", "target resolution failed")
|
|
368
|
+
.unwrap();
|
|
369
|
+
|
|
370
|
+
log.prune_terminal_records();
|
|
371
|
+
|
|
372
|
+
assert_eq!(log.records().len(), 2);
|
|
373
|
+
assert_eq!(log.records()[0].request_id, "pending");
|
|
374
|
+
assert_eq!(log.records()[0].status, DispatchStatus::Pending);
|
|
375
|
+
assert_eq!(log.records()[1].request_id, "notified");
|
|
376
|
+
assert_eq!(log.records()[1].status, DispatchStatus::Notified);
|
|
377
|
+
}
|
|
378
|
+
|
|
316
379
|
#[test]
|
|
317
380
|
fn queue_with_metadata_round_trips() {
|
|
318
381
|
let mut log = DispatchLog::new();
|
|
319
382
|
let meta = serde_json::json!({"priority": "high", "tags": ["urgent"]});
|
|
320
|
-
log.queue("req-meta", "worker-1", Some(meta.clone()))
|
|
383
|
+
log.queue("req-meta", "worker-1", Some(meta.clone()))
|
|
384
|
+
.unwrap();
|
|
321
385
|
|
|
322
386
|
assert_eq!(log.records()[0].metadata, Some(meta.clone()));
|
|
323
387
|
|
|
@@ -327,4 +391,26 @@ mod tests {
|
|
|
327
391
|
assert_eq!(loaded.records()[0].metadata, Some(meta));
|
|
328
392
|
assert_eq!(loaded.records()[0].request_id, "req-meta");
|
|
329
393
|
}
|
|
394
|
+
|
|
395
|
+
#[test]
|
|
396
|
+
fn queue_rejects_duplicate_request_id_after_terminal_transition() {
|
|
397
|
+
let mut log = DispatchLog::new();
|
|
398
|
+
log.queue("req-1", "worker-1", None).unwrap();
|
|
399
|
+
log.mark_failed("req-1", "target unavailable").unwrap();
|
|
400
|
+
|
|
401
|
+
let err = log.queue("req-1", "worker-2", None).unwrap_err();
|
|
402
|
+
assert!(
|
|
403
|
+
matches!(err, DispatchError::DuplicateRequestId { request_id } if request_id == "req-1")
|
|
404
|
+
);
|
|
405
|
+
assert_eq!(log.records().len(), 1);
|
|
406
|
+
}
|
|
407
|
+
|
|
408
|
+
#[test]
|
|
409
|
+
fn queue_rejects_empty_request_id() {
|
|
410
|
+
let mut log = DispatchLog::new();
|
|
411
|
+
assert!(matches!(
|
|
412
|
+
log.queue("", "worker", None),
|
|
413
|
+
Err(DispatchError::InvalidRequestId { request_id }) if request_id.is_empty()
|
|
414
|
+
));
|
|
415
|
+
}
|
|
330
416
|
}
|