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
package/Cargo.lock
CHANGED
|
@@ -20,9 +20,9 @@ checksum = "8f42a60cbdf9a97f5d2305f08a87dc4e09308d1276d28c869c684d7777685682"
|
|
|
20
20
|
|
|
21
21
|
[[package]]
|
|
22
22
|
name = "libc"
|
|
23
|
-
version = "0.2.
|
|
23
|
+
version = "0.2.189"
|
|
24
24
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
25
|
-
checksum = "
|
|
25
|
+
checksum = "3eaf3ede3fee6db1a4c2ee091bf8a8b4dccdc6d17f656fb07896ee72867612f2"
|
|
26
26
|
|
|
27
27
|
[[package]]
|
|
28
28
|
name = "memchr"
|
|
@@ -32,7 +32,7 @@ checksum = "6b947ae49db0d222b1dbc6b113ce7248a3fc3a6ca21b696717bfc000ba4484d8"
|
|
|
32
32
|
|
|
33
33
|
[[package]]
|
|
34
34
|
name = "omx-api"
|
|
35
|
-
version = "0.20.
|
|
35
|
+
version = "0.20.5"
|
|
36
36
|
dependencies = [
|
|
37
37
|
"serde",
|
|
38
38
|
"serde_json",
|
|
@@ -40,14 +40,14 @@ dependencies = [
|
|
|
40
40
|
|
|
41
41
|
[[package]]
|
|
42
42
|
name = "omx-explore-harness"
|
|
43
|
-
version = "0.20.
|
|
43
|
+
version = "0.20.5"
|
|
44
44
|
dependencies = [
|
|
45
45
|
"libc",
|
|
46
46
|
]
|
|
47
47
|
|
|
48
48
|
[[package]]
|
|
49
49
|
name = "omx-mux"
|
|
50
|
-
version = "0.20.
|
|
50
|
+
version = "0.20.5"
|
|
51
51
|
dependencies = [
|
|
52
52
|
"serde",
|
|
53
53
|
"serde_json",
|
|
@@ -55,16 +55,19 @@ dependencies = [
|
|
|
55
55
|
|
|
56
56
|
[[package]]
|
|
57
57
|
name = "omx-runtime"
|
|
58
|
-
version = "0.20.
|
|
58
|
+
version = "0.20.5"
|
|
59
59
|
dependencies = [
|
|
60
|
+
"fs2",
|
|
61
|
+
"libc",
|
|
60
62
|
"omx-mux",
|
|
61
63
|
"omx-runtime-core",
|
|
62
64
|
"serde_json",
|
|
65
|
+
"windows-sys",
|
|
63
66
|
]
|
|
64
67
|
|
|
65
68
|
[[package]]
|
|
66
69
|
name = "omx-runtime-core"
|
|
67
|
-
version = "0.20.
|
|
70
|
+
version = "0.20.5"
|
|
68
71
|
dependencies = [
|
|
69
72
|
"fs2",
|
|
70
73
|
"serde",
|
|
@@ -73,7 +76,7 @@ dependencies = [
|
|
|
73
76
|
|
|
74
77
|
[[package]]
|
|
75
78
|
name = "omx-sparkshell"
|
|
76
|
-
version = "0.20.
|
|
79
|
+
version = "0.20.5"
|
|
77
80
|
dependencies = [
|
|
78
81
|
"omx-mux",
|
|
79
82
|
]
|
|
@@ -98,9 +101,9 @@ dependencies = [
|
|
|
98
101
|
|
|
99
102
|
[[package]]
|
|
100
103
|
name = "serde"
|
|
101
|
-
version = "1.0.
|
|
104
|
+
version = "1.0.229"
|
|
102
105
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
103
|
-
checksum = "
|
|
106
|
+
checksum = "4148590afebada386688f18773da617792bf2ef03ffc1e4cbd2b1d45b023e0ba"
|
|
104
107
|
dependencies = [
|
|
105
108
|
"serde_core",
|
|
106
109
|
"serde_derive",
|
|
@@ -108,18 +111,18 @@ dependencies = [
|
|
|
108
111
|
|
|
109
112
|
[[package]]
|
|
110
113
|
name = "serde_core"
|
|
111
|
-
version = "1.0.
|
|
114
|
+
version = "1.0.229"
|
|
112
115
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
113
|
-
checksum = "
|
|
116
|
+
checksum = "67dca2c9c51e58a4791a4b1ed58308b39c64224d349a935ab5039aa360942a48"
|
|
114
117
|
dependencies = [
|
|
115
118
|
"serde_derive",
|
|
116
119
|
]
|
|
117
120
|
|
|
118
121
|
[[package]]
|
|
119
122
|
name = "serde_derive"
|
|
120
|
-
version = "1.0.
|
|
123
|
+
version = "1.0.229"
|
|
121
124
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
122
|
-
checksum = "
|
|
125
|
+
checksum = "e7a5d71263a5a7d47b41f6b3f06ba276f10cc18b0931f1799f710578e2309348"
|
|
123
126
|
dependencies = [
|
|
124
127
|
"proc-macro2",
|
|
125
128
|
"quote",
|
|
@@ -128,9 +131,9 @@ dependencies = [
|
|
|
128
131
|
|
|
129
132
|
[[package]]
|
|
130
133
|
name = "serde_json"
|
|
131
|
-
version = "1.0.
|
|
134
|
+
version = "1.0.151"
|
|
132
135
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
133
|
-
checksum = "
|
|
136
|
+
checksum = "c841b55ecdae098c80dcae9cf767f6f8a0c2cdb3416bbef72181df4d0fe73f14"
|
|
134
137
|
dependencies = [
|
|
135
138
|
"itoa",
|
|
136
139
|
"memchr",
|
|
@@ -141,9 +144,9 @@ dependencies = [
|
|
|
141
144
|
|
|
142
145
|
[[package]]
|
|
143
146
|
name = "syn"
|
|
144
|
-
version = "
|
|
147
|
+
version = "3.0.2"
|
|
145
148
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
146
|
-
checksum = "
|
|
149
|
+
checksum = "a207d6d6a2b7fc470b80443726053f18a2481b7e1eee970597051596567987a3"
|
|
147
150
|
dependencies = [
|
|
148
151
|
"proc-macro2",
|
|
149
152
|
"quote",
|
|
@@ -178,6 +181,21 @@ version = "0.4.0"
|
|
|
178
181
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
179
182
|
checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
|
|
180
183
|
|
|
184
|
+
[[package]]
|
|
185
|
+
name = "windows-link"
|
|
186
|
+
version = "0.2.1"
|
|
187
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
188
|
+
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
|
189
|
+
|
|
190
|
+
[[package]]
|
|
191
|
+
name = "windows-sys"
|
|
192
|
+
version = "0.61.2"
|
|
193
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
194
|
+
checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
|
|
195
|
+
dependencies = [
|
|
196
|
+
"windows-link",
|
|
197
|
+
]
|
|
198
|
+
|
|
181
199
|
[[package]]
|
|
182
200
|
name = "zmij"
|
|
183
201
|
version = "1.0.21"
|
package/Cargo.toml
CHANGED
package/README.md
CHANGED
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
[](https://www.npmjs.com/package/oh-my-codex)
|
|
10
10
|
[](https://opensource.org/licenses/MIT)
|
|
11
11
|
[](https://nodejs.org)
|
|
12
|
-
[](https://discord.gg/
|
|
12
|
+
[](https://discord.gg/jq6jnSGABY)
|
|
13
13
|
|
|
14
14
|
**Website:** https://yeachan-heo.github.io/oh-my-codex-website/
|
|
15
15
|
|
|
16
16
|
**Docs:** [Getting Started](./docs/getting-started.html) · [Agents](./docs/agents.html) · [Skills](./docs/skills.html) · [Integrations](./docs/integrations.html) · [Demo](./DEMO.md) · [OpenClaw guide](./docs/openclaw-integration.md)
|
|
17
17
|
|
|
18
|
-
**Community:** [Discord](https://discord.gg/
|
|
18
|
+
**Community:** [Discord](https://discord.gg/jq6jnSGABY) — shared OMX/community server for oh-my-codex and related tooling.
|
|
19
19
|
|
|
20
20
|
## Official project and package
|
|
21
21
|
|
|
@@ -165,6 +165,32 @@ created and recovered. `--worktree` also moves the launch into a separate git
|
|
|
165
165
|
checkout, which is the safer default when using `--madmax`. Replace
|
|
166
166
|
`feat/task` with a branch-like name for the task.
|
|
167
167
|
|
|
168
|
+
### Concurrent standard conversations
|
|
169
|
+
|
|
170
|
+
A standard launch owns one writable session pointer under its selected `OMX_ROOT`. A second ordinary `omx` launch from the same checkout therefore fails closed instead of sharing or silently changing that root. Give each additional conversation an explicit, distinct root:
|
|
171
|
+
|
|
172
|
+
```bash
|
|
173
|
+
omx
|
|
174
|
+
OMX_ROOT="$HOME/.omx/instances/second-conversation" omx
|
|
175
|
+
OMX_ROOT="$HOME/.omx/instances/third-conversation" omx
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
PowerShell:
|
|
179
|
+
|
|
180
|
+
```powershell
|
|
181
|
+
$env:OMX_ROOT = "$HOME/.omx/instances/second-conversation"
|
|
182
|
+
omx
|
|
183
|
+
```
|
|
184
|
+
|
|
185
|
+
Command Prompt:
|
|
186
|
+
|
|
187
|
+
```bat
|
|
188
|
+
set "OMX_ROOT=%USERPROFILE%\.omx\instances\second-conversation"
|
|
189
|
+
omx
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
User-specified roots are literal: launching twice with the same explicit `OMX_ROOT` remains a fatal owner conflict. Separate checkouts have separate default roots, while `--worktree` and `--madmax` keep their existing isolation behavior.
|
|
193
|
+
|
|
168
194
|
### Madmax and worktree launch safety
|
|
169
195
|
|
|
170
196
|
`--madmax` is OMX shorthand for Codex
|
|
@@ -7,7 +7,11 @@ license.workspace = true
|
|
|
7
7
|
repository.workspace = true
|
|
8
8
|
|
|
9
9
|
[dependencies]
|
|
10
|
+
libc = "0.2"
|
|
10
11
|
omx-mux = { path = "../omx-mux" }
|
|
11
12
|
omx-runtime-core = { path = "../omx-runtime-core" }
|
|
13
|
+
fs2 = "0.4"
|
|
12
14
|
serde_json = "1"
|
|
13
15
|
|
|
16
|
+
[target.'cfg(target_os = "windows")'.dependencies]
|
|
17
|
+
windows-sys = { version = "0.61", features = ["Win32_System_Threading", "Win32_Foundation"] }
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
use fs2::FileExt;
|
|
1
2
|
use omx_mux::{canonical_contract_summary, MuxAdapter, MuxOperation, MuxTarget, TmuxAdapter};
|
|
2
3
|
use omx_runtime_core::{runtime_contract_summary, RuntimeCommand, RuntimeEngine};
|
|
3
4
|
use std::env;
|
|
@@ -71,9 +72,31 @@ fn run() -> Result<(), String> {
|
|
|
71
72
|
let json_input = second.ok_or("exec requires a JSON command argument")?;
|
|
72
73
|
let state_dir = args.iter().find_map(|a| a.strip_prefix("--state-dir="));
|
|
73
74
|
let compact = args.iter().any(|a| a == "--compact");
|
|
75
|
+
let _mutation_lock = if let Some(dir) = state_dir {
|
|
76
|
+
std::fs::create_dir_all(dir).map_err(|e| e.to_string())?;
|
|
77
|
+
let lock =
|
|
78
|
+
std::fs::File::create(std::path::Path::new(dir).join("runtime-mutation.lock"))
|
|
79
|
+
.map_err(|e| e.to_string())?;
|
|
80
|
+
lock.lock_exclusive().map_err(|e| e.to_string())?;
|
|
81
|
+
Some(lock)
|
|
82
|
+
} else {
|
|
83
|
+
None
|
|
84
|
+
};
|
|
74
85
|
let mut engine = match state_dir {
|
|
75
|
-
Some(dir) => RuntimeEngine::load(dir)
|
|
76
|
-
|
|
86
|
+
Some(dir) => match RuntimeEngine::load(dir) {
|
|
87
|
+
Ok(engine) => engine,
|
|
88
|
+
Err(error) => {
|
|
89
|
+
let has_persisted_state = ["events.json", "snapshot.json", "mailbox.json"]
|
|
90
|
+
.iter()
|
|
91
|
+
.any(|name| std::path::Path::new(dir).join(name).exists());
|
|
92
|
+
if has_persisted_state {
|
|
93
|
+
return Err(format!(
|
|
94
|
+
"failed to load authoritative runtime state: {error}"
|
|
95
|
+
));
|
|
96
|
+
}
|
|
97
|
+
RuntimeEngine::new().with_state_dir(dir)
|
|
98
|
+
}
|
|
99
|
+
},
|
|
77
100
|
None => RuntimeEngine::new(),
|
|
78
101
|
};
|
|
79
102
|
|
|
@@ -100,6 +123,8 @@ fn run() -> Result<(), String> {
|
|
|
100
123
|
);
|
|
101
124
|
Ok(())
|
|
102
125
|
}
|
|
126
|
+
Some("fs-rename-no-replace") => run_fs_rename_no_replace(&args[1..]),
|
|
127
|
+
Some("process-identity") => run_process_identity(&args[1..]),
|
|
103
128
|
Some("init") => {
|
|
104
129
|
let dir = second.ok_or("init requires a state directory path")?;
|
|
105
130
|
let engine = RuntimeEngine::new().with_state_dir(dir);
|
|
@@ -111,12 +136,400 @@ fn run() -> Result<(), String> {
|
|
|
111
136
|
}
|
|
112
137
|
}
|
|
113
138
|
|
|
139
|
+
#[derive(Debug, Clone, Copy)]
|
|
140
|
+
enum FsRenameOutcome {
|
|
141
|
+
Moved,
|
|
142
|
+
NotMoved,
|
|
143
|
+
Unsupported(&'static str),
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
fn run_fs_rename_no_replace(args: &[String]) -> Result<(), String> {
|
|
147
|
+
if args.len() != 2 {
|
|
148
|
+
return Err("fs-rename-no-replace requires exactly <from> and <to> paths".to_string());
|
|
149
|
+
}
|
|
150
|
+
|
|
151
|
+
let from = validate_absolute_path(&args[0], "from")?;
|
|
152
|
+
let to = validate_absolute_path(&args[1], "to")?;
|
|
153
|
+
let outcome = fs_rename_no_replace(&from, &to)?;
|
|
154
|
+
let json = match outcome {
|
|
155
|
+
FsRenameOutcome::Moved => serde_json::json!({ "outcome": "moved" }),
|
|
156
|
+
FsRenameOutcome::NotMoved => {
|
|
157
|
+
serde_json::json!({ "outcome": "not-moved", "code": "EEXIST" })
|
|
158
|
+
}
|
|
159
|
+
FsRenameOutcome::Unsupported(code) => {
|
|
160
|
+
serde_json::json!({ "outcome": "unsupported", "code": code })
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
println!(
|
|
164
|
+
"{}",
|
|
165
|
+
serde_json::to_string(&json).map_err(|error| error.to_string())?
|
|
166
|
+
);
|
|
167
|
+
Ok(())
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
fn validate_absolute_path(raw: &str, name: &str) -> Result<std::ffi::CString, String> {
|
|
171
|
+
if raw.is_empty() {
|
|
172
|
+
return Err(format!("{name} path must be a non-empty absolute path"));
|
|
173
|
+
}
|
|
174
|
+
if !std::path::Path::new(raw).is_absolute() {
|
|
175
|
+
return Err(format!("{name} path must be absolute"));
|
|
176
|
+
}
|
|
177
|
+
std::ffi::CString::new(raw.as_bytes())
|
|
178
|
+
.map_err(|_| format!("{name} path contains an embedded NUL byte"))
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
#[cfg(all(target_os = "linux", not(target_env = "musl")))]
|
|
182
|
+
fn fs_rename_no_replace(
|
|
183
|
+
from: &std::ffi::CString,
|
|
184
|
+
to: &std::ffi::CString,
|
|
185
|
+
) -> Result<FsRenameOutcome, String> {
|
|
186
|
+
let result = unsafe {
|
|
187
|
+
libc::renameat2(
|
|
188
|
+
libc::AT_FDCWD,
|
|
189
|
+
from.as_ptr(),
|
|
190
|
+
libc::AT_FDCWD,
|
|
191
|
+
to.as_ptr(),
|
|
192
|
+
libc::RENAME_NOREPLACE,
|
|
193
|
+
)
|
|
194
|
+
};
|
|
195
|
+
if result == 0 {
|
|
196
|
+
return Ok(FsRenameOutcome::Moved);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
let error = std::io::Error::last_os_error();
|
|
200
|
+
match error.raw_os_error() {
|
|
201
|
+
Some(libc::EEXIST) => Ok(FsRenameOutcome::NotMoved),
|
|
202
|
+
Some(libc::ENOSYS) => Ok(FsRenameOutcome::Unsupported("ENOSYS")),
|
|
203
|
+
Some(libc::EINVAL) => Ok(FsRenameOutcome::Unsupported("EINVAL")),
|
|
204
|
+
Some(libc::ENOTSUP) => Ok(FsRenameOutcome::Unsupported("ENOTSUP")),
|
|
205
|
+
Some(code) => Err(format!("renameat2 failed with errno {code}: {error}")),
|
|
206
|
+
None => Err(format!("renameat2 failed: {error}")),
|
|
207
|
+
}
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
#[cfg(all(target_os = "linux", target_env = "musl"))]
|
|
211
|
+
fn fs_rename_no_replace(
|
|
212
|
+
from: &std::ffi::CString,
|
|
213
|
+
to: &std::ffi::CString,
|
|
214
|
+
) -> Result<FsRenameOutcome, String> {
|
|
215
|
+
// libc 0.2.189 added a musl binding for renameat2, but the release
|
|
216
|
+
// runner's older musl exported symbol surface does not include it,
|
|
217
|
+
// causing an undefined-symbol link failure. Invoke the syscall
|
|
218
|
+
// directly via libc::syscall so the atomic no-replace rename works
|
|
219
|
+
// regardless of the musl version. The outcome and errno mapping are
|
|
220
|
+
// equivalent to the libc::renameat2 wrapper above (both classify the
|
|
221
|
+
// same errno values to the same FsRenameOutcome variants).
|
|
222
|
+
let result = unsafe {
|
|
223
|
+
libc::syscall(
|
|
224
|
+
libc::SYS_renameat2,
|
|
225
|
+
libc::AT_FDCWD,
|
|
226
|
+
from.as_ptr(),
|
|
227
|
+
libc::AT_FDCWD,
|
|
228
|
+
to.as_ptr(),
|
|
229
|
+
libc::RENAME_NOREPLACE,
|
|
230
|
+
)
|
|
231
|
+
};
|
|
232
|
+
if result == 0 {
|
|
233
|
+
return Ok(FsRenameOutcome::Moved);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
let error = std::io::Error::last_os_error();
|
|
237
|
+
match error.raw_os_error() {
|
|
238
|
+
Some(libc::EEXIST) => Ok(FsRenameOutcome::NotMoved),
|
|
239
|
+
Some(libc::ENOSYS) => Ok(FsRenameOutcome::Unsupported("ENOSYS")),
|
|
240
|
+
Some(libc::EINVAL) => Ok(FsRenameOutcome::Unsupported("EINVAL")),
|
|
241
|
+
Some(libc::ENOTSUP) => Ok(FsRenameOutcome::Unsupported("ENOTSUP")),
|
|
242
|
+
Some(code) => Err(format!("renameat2 failed with errno {code}: {error}")),
|
|
243
|
+
None => Err(format!("renameat2 failed: {error}")),
|
|
244
|
+
}
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
#[cfg(target_os = "macos")]
|
|
248
|
+
fn fs_rename_no_replace(
|
|
249
|
+
from: &std::ffi::CString,
|
|
250
|
+
to: &std::ffi::CString,
|
|
251
|
+
) -> Result<FsRenameOutcome, String> {
|
|
252
|
+
let result = unsafe { libc::renamex_np(from.as_ptr(), to.as_ptr(), libc::RENAME_EXCL) };
|
|
253
|
+
if result == 0 {
|
|
254
|
+
return Ok(FsRenameOutcome::Moved);
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
let error = std::io::Error::last_os_error();
|
|
258
|
+
match error.raw_os_error() {
|
|
259
|
+
Some(libc::EEXIST) => Ok(FsRenameOutcome::NotMoved),
|
|
260
|
+
Some(libc::ENOSYS) => Ok(FsRenameOutcome::Unsupported("ENOSYS")),
|
|
261
|
+
Some(libc::EINVAL) | Some(libc::ENOTSUP) => Ok(FsRenameOutcome::Unsupported("ENOTSUP")),
|
|
262
|
+
Some(code) => Err(format!("renamex_np failed with errno {code}: {error}")),
|
|
263
|
+
None => Err(format!("renamex_np failed: {error}")),
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
#[cfg(not(any(target_os = "linux", target_os = "macos")))]
|
|
268
|
+
fn fs_rename_no_replace(
|
|
269
|
+
_from: &std::ffi::CString,
|
|
270
|
+
_to: &std::ffi::CString,
|
|
271
|
+
) -> Result<FsRenameOutcome, String> {
|
|
272
|
+
Ok(FsRenameOutcome::Unsupported("platform"))
|
|
273
|
+
}
|
|
274
|
+
|
|
275
|
+
// ---------------------------------------------------------------------------
|
|
276
|
+
// process-identity subcommand
|
|
277
|
+
// ---------------------------------------------------------------------------
|
|
278
|
+
|
|
279
|
+
#[allow(dead_code)]
|
|
280
|
+
enum ProcessIdentityError {
|
|
281
|
+
Denied,
|
|
282
|
+
Gone,
|
|
283
|
+
Unsupported,
|
|
284
|
+
Error(String),
|
|
285
|
+
}
|
|
286
|
+
|
|
287
|
+
struct ProcessIdentityResult {
|
|
288
|
+
platform: &'static str,
|
|
289
|
+
birth: String,
|
|
290
|
+
cmdline: Option<String>,
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
fn run_process_identity(args: &[String]) -> Result<(), String> {
|
|
294
|
+
if args.len() != 1 {
|
|
295
|
+
return Err("process-identity requires exactly <pid>".to_string());
|
|
296
|
+
}
|
|
297
|
+
let pid: u32 = args[0].parse().map_err(|_| {
|
|
298
|
+
format!(
|
|
299
|
+
"process-identity pid must be a positive integer, got: {}",
|
|
300
|
+
args[0]
|
|
301
|
+
)
|
|
302
|
+
})?;
|
|
303
|
+
if pid == 0 {
|
|
304
|
+
return Err("process-identity pid must be > 0".to_string());
|
|
305
|
+
}
|
|
306
|
+
let result = process_identity(pid);
|
|
307
|
+
let json = match result {
|
|
308
|
+
Ok(identity) => {
|
|
309
|
+
let mut obj = serde_json::json!({
|
|
310
|
+
"platform": identity.platform,
|
|
311
|
+
"birth": identity.birth,
|
|
312
|
+
});
|
|
313
|
+
if let Some(cmdline) = &identity.cmdline {
|
|
314
|
+
obj["cmdline"] = serde_json::Value::String(cmdline.clone());
|
|
315
|
+
}
|
|
316
|
+
obj
|
|
317
|
+
}
|
|
318
|
+
Err(ProcessIdentityError::Denied) => {
|
|
319
|
+
serde_json::json!({ "outcome": "denied" })
|
|
320
|
+
}
|
|
321
|
+
Err(ProcessIdentityError::Gone) => {
|
|
322
|
+
serde_json::json!({ "outcome": "gone" })
|
|
323
|
+
}
|
|
324
|
+
Err(ProcessIdentityError::Unsupported) => {
|
|
325
|
+
serde_json::json!({ "outcome": "unsupported" })
|
|
326
|
+
}
|
|
327
|
+
Err(ProcessIdentityError::Error(reason)) => {
|
|
328
|
+
serde_json::json!({ "outcome": "error", "reason": reason })
|
|
329
|
+
}
|
|
330
|
+
};
|
|
331
|
+
println!(
|
|
332
|
+
"{}",
|
|
333
|
+
serde_json::to_string(&json).map_err(|error| error.to_string())?
|
|
334
|
+
);
|
|
335
|
+
Ok(())
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
#[cfg(target_os = "linux")]
|
|
339
|
+
fn process_identity(pid: u32) -> Result<ProcessIdentityResult, ProcessIdentityError> {
|
|
340
|
+
let stat_path = format!("/proc/{pid}/stat");
|
|
341
|
+
let stat_content = match std::fs::read_to_string(&stat_path) {
|
|
342
|
+
Ok(content) => content,
|
|
343
|
+
Err(e) => {
|
|
344
|
+
return match e.raw_os_error() {
|
|
345
|
+
Some(libc::ENOENT) | Some(libc::ESRCH) => Err(ProcessIdentityError::Gone),
|
|
346
|
+
Some(libc::EACCES) | Some(libc::EPERM) => Err(ProcessIdentityError::Denied),
|
|
347
|
+
_ => Err(ProcessIdentityError::Error(format!(
|
|
348
|
+
"read stat failed: {e}"
|
|
349
|
+
))),
|
|
350
|
+
};
|
|
351
|
+
}
|
|
352
|
+
};
|
|
353
|
+
|
|
354
|
+
// Parse field 22: skip past the comm field (in parens) then count fields
|
|
355
|
+
let command_end = stat_content.rfind(')');
|
|
356
|
+
let start_ticks = match command_end {
|
|
357
|
+
Some(idx) => {
|
|
358
|
+
let fields: Vec<&str> = stat_content[idx + 1..].split_whitespace().collect();
|
|
359
|
+
// After ')', field 1 is state, field 2 is ppid, ..., field 20 is starttime
|
|
360
|
+
// (field 3 in the full stat is ppid; the 20th field after ')' is starttime)
|
|
361
|
+
if fields.len() <= 19 {
|
|
362
|
+
return Err(ProcessIdentityError::Error(
|
|
363
|
+
"stat content too short for starttime field".to_string(),
|
|
364
|
+
));
|
|
365
|
+
}
|
|
366
|
+
match fields[19].parse::<u64>() {
|
|
367
|
+
Ok(v) => v,
|
|
368
|
+
Err(_) => {
|
|
369
|
+
return Err(ProcessIdentityError::Error(format!(
|
|
370
|
+
"starttime field is not a valid integer: {}",
|
|
371
|
+
fields[19]
|
|
372
|
+
)))
|
|
373
|
+
}
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
None => {
|
|
377
|
+
return Err(ProcessIdentityError::Error(
|
|
378
|
+
"stat content has no closing paren".to_string(),
|
|
379
|
+
))
|
|
380
|
+
}
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
// Read cmdline if accessible
|
|
384
|
+
let cmdline = read_linux_cmdline(pid);
|
|
385
|
+
|
|
386
|
+
Ok(ProcessIdentityResult {
|
|
387
|
+
platform: "linux",
|
|
388
|
+
birth: start_ticks.to_string(),
|
|
389
|
+
cmdline,
|
|
390
|
+
})
|
|
391
|
+
}
|
|
392
|
+
|
|
393
|
+
#[cfg(target_os = "linux")]
|
|
394
|
+
fn read_linux_cmdline(pid: u32) -> Option<String> {
|
|
395
|
+
use std::io::Read;
|
|
396
|
+
let cmdline_path = format!("/proc/{pid}/cmdline");
|
|
397
|
+
let mut content = String::new();
|
|
398
|
+
let result =
|
|
399
|
+
std::fs::File::open(&cmdline_path).and_then(|mut f| f.read_to_string(&mut content));
|
|
400
|
+
match result {
|
|
401
|
+
Ok(_) => {
|
|
402
|
+
let text = content.replace('\u{0}', " ").trim().to_string();
|
|
403
|
+
if text.is_empty() {
|
|
404
|
+
None
|
|
405
|
+
} else {
|
|
406
|
+
Some(text)
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
Err(_) => None,
|
|
410
|
+
}
|
|
411
|
+
}
|
|
412
|
+
|
|
413
|
+
// Darwin: proc_pidinfo with PROC_PIDTBSDINFO for pbi_start_tvsec/pbi_start_tvusec
|
|
414
|
+
#[cfg(target_os = "macos")]
|
|
415
|
+
fn process_identity(pid: u32) -> Result<ProcessIdentityResult, ProcessIdentityError> {
|
|
416
|
+
// Use libc's maintained Darwin ABI definition instead of a partial local
|
|
417
|
+
// prefix. PROC_PIDTBSDINFO requires a full proc_bsdinfo-sized buffer.
|
|
418
|
+
let mut process_info: libc::proc_bsdinfo = unsafe { std::mem::zeroed() };
|
|
419
|
+
let buffer_size = std::mem::size_of::<libc::proc_bsdinfo>() as libc::c_int;
|
|
420
|
+
let bytes_read = unsafe {
|
|
421
|
+
libc::proc_pidinfo(
|
|
422
|
+
pid as libc::c_int,
|
|
423
|
+
libc::PROC_PIDTBSDINFO,
|
|
424
|
+
0,
|
|
425
|
+
&mut process_info as *mut _ as *mut libc::c_void,
|
|
426
|
+
buffer_size,
|
|
427
|
+
)
|
|
428
|
+
};
|
|
429
|
+
|
|
430
|
+
if bytes_read <= 0 {
|
|
431
|
+
let errno_val = std::io::Error::last_os_error().raw_os_error().unwrap_or(0);
|
|
432
|
+
return match errno_val {
|
|
433
|
+
libc::EPERM | libc::EACCES => Err(ProcessIdentityError::Denied),
|
|
434
|
+
libc::ESRCH | libc::ENOENT => Err(ProcessIdentityError::Gone),
|
|
435
|
+
_ => Err(ProcessIdentityError::Error(format!(
|
|
436
|
+
"proc_pidinfo(PROC_PIDTBSDINFO) failed: errno={}",
|
|
437
|
+
errno_val
|
|
438
|
+
))),
|
|
439
|
+
};
|
|
440
|
+
}
|
|
441
|
+
if bytes_read != buffer_size {
|
|
442
|
+
return Err(ProcessIdentityError::Error(format!(
|
|
443
|
+
"proc_pidinfo(PROC_PIDTBSDINFO) returned {bytes_read} bytes; expected {buffer_size}"
|
|
444
|
+
)));
|
|
445
|
+
}
|
|
446
|
+
|
|
447
|
+
// Birth is exact decimal string: seconds.microseconds since Unix epoch.
|
|
448
|
+
// Two processes started in the same second will differ in microseconds
|
|
449
|
+
// unless they genuinely started at the same microsecond instant.
|
|
450
|
+
let birth = format!(
|
|
451
|
+
"{}.{}",
|
|
452
|
+
process_info.pbi_start_tvsec, process_info.pbi_start_tvusec
|
|
453
|
+
);
|
|
454
|
+
|
|
455
|
+
Ok(ProcessIdentityResult {
|
|
456
|
+
platform: "darwin",
|
|
457
|
+
birth,
|
|
458
|
+
cmdline: None,
|
|
459
|
+
})
|
|
460
|
+
}
|
|
461
|
+
|
|
462
|
+
// Windows: OpenProcess + GetProcessTimes for creation FILETIME
|
|
463
|
+
#[cfg(target_os = "windows")]
|
|
464
|
+
fn process_identity(pid: u32) -> Result<ProcessIdentityResult, ProcessIdentityError> {
|
|
465
|
+
use windows_sys::Win32::Foundation::{CloseHandle, FILETIME};
|
|
466
|
+
use windows_sys::Win32::System::Threading::{
|
|
467
|
+
GetProcessTimes, OpenProcess, PROCESS_QUERY_LIMITED_INFORMATION,
|
|
468
|
+
};
|
|
469
|
+
|
|
470
|
+
let handle = unsafe { OpenProcess(PROCESS_QUERY_LIMITED_INFORMATION, 0, pid) };
|
|
471
|
+
if handle.is_null() {
|
|
472
|
+
let err = unsafe { windows_sys::Win32::Foundation::GetLastError() };
|
|
473
|
+
return match err {
|
|
474
|
+
5 => Err(ProcessIdentityError::Denied), // ERROR_ACCESS_DENIED
|
|
475
|
+
87 => Err(ProcessIdentityError::Gone), // ERROR_INVALID_PARAMETER
|
|
476
|
+
_ => Err(ProcessIdentityError::Error(format!(
|
|
477
|
+
"OpenProcess failed: error code {}",
|
|
478
|
+
err
|
|
479
|
+
))),
|
|
480
|
+
};
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
// RAII guard: CloseHandle on all paths
|
|
484
|
+
struct HandleGuard(*mut std::ffi::c_void);
|
|
485
|
+
impl Drop for HandleGuard {
|
|
486
|
+
fn drop(&mut self) {
|
|
487
|
+
if !self.0.is_null() {
|
|
488
|
+
unsafe { CloseHandle(self.0) };
|
|
489
|
+
}
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
let _guard = HandleGuard(handle);
|
|
493
|
+
|
|
494
|
+
let mut creation: FILETIME = unsafe { std::mem::zeroed() };
|
|
495
|
+
let mut exit: FILETIME = unsafe { std::mem::zeroed() };
|
|
496
|
+
let mut kernel: FILETIME = unsafe { std::mem::zeroed() };
|
|
497
|
+
let mut user: FILETIME = unsafe { std::mem::zeroed() };
|
|
498
|
+
|
|
499
|
+
let ok = unsafe { GetProcessTimes(handle, &mut creation, &mut exit, &mut kernel, &mut user) };
|
|
500
|
+
|
|
501
|
+
if ok == 0 {
|
|
502
|
+
let err = unsafe { windows_sys::Win32::Foundation::GetLastError() };
|
|
503
|
+
return Err(ProcessIdentityError::Error(format!(
|
|
504
|
+
"GetProcessTimes failed: error code {}",
|
|
505
|
+
err
|
|
506
|
+
)));
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
// Combine FILETIME (100ns intervals since 1601-01-01) into u64
|
|
510
|
+
let birth_u64 = ((creation.dwHighDateTime as u64) << 32) | (creation.dwLowDateTime as u64);
|
|
511
|
+
|
|
512
|
+
Ok(ProcessIdentityResult {
|
|
513
|
+
platform: "win32",
|
|
514
|
+
birth: birth_u64.to_string(),
|
|
515
|
+
cmdline: None,
|
|
516
|
+
})
|
|
517
|
+
}
|
|
518
|
+
|
|
519
|
+
// Unsupported platform fallback
|
|
520
|
+
#[cfg(not(any(target_os = "linux", target_os = "macos", target_os = "windows")))]
|
|
521
|
+
fn process_identity(_pid: u32) -> Result<ProcessIdentityResult, ProcessIdentityError> {
|
|
522
|
+
Err(ProcessIdentityError::Unsupported)
|
|
523
|
+
}
|
|
524
|
+
|
|
114
525
|
fn print_usage() {
|
|
115
526
|
println!(concat!(
|
|
116
527
|
"usage: omx-runtime <command> [options]\n",
|
|
117
528
|
"\n",
|
|
118
529
|
"commands:\n",
|
|
119
530
|
" schema [--json] print the runtime contract summary\n",
|
|
531
|
+
" fs-rename-no-replace <from> <to> atomically move without replacing destination\n",
|
|
532
|
+
" process-identity <pid> print process birth identity as JSON\n",
|
|
120
533
|
" snapshot [--json] [--state-dir=DIR] print a runtime snapshot\n",
|
|
121
534
|
" mux-contract print the mux boundary summary\n",
|
|
122
535
|
" exec <json> [--state-dir=DIR] process a runtime command from JSON\n",
|