oh-my-codex 0.21.0 → 0.21.2
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.toml +1 -1
- package/README.md +4 -2
- package/dist/cli/__tests__/detached-launch-diagnostics-3578.test.d.ts +2 -0
- package/dist/cli/__tests__/detached-launch-diagnostics-3578.test.d.ts.map +1 -0
- package/dist/cli/__tests__/detached-launch-diagnostics-3578.test.js +592 -0
- package/dist/cli/__tests__/detached-launch-diagnostics-3578.test.js.map +1 -0
- package/dist/cli/__tests__/detached-leader-teardown.test.js +270 -33
- package/dist/cli/__tests__/detached-leader-teardown.test.js.map +1 -1
- package/dist/cli/__tests__/doctor-warning-copy.test.js +133 -5
- package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
- package/dist/cli/__tests__/index.test.js +543 -2
- package/dist/cli/__tests__/index.test.js.map +1 -1
- package/dist/cli/__tests__/issue-windows-cancel-identity.test.d.ts +2 -0
- package/dist/cli/__tests__/issue-windows-cancel-identity.test.d.ts.map +1 -0
- package/dist/cli/__tests__/issue-windows-cancel-identity.test.js +17 -0
- package/dist/cli/__tests__/issue-windows-cancel-identity.test.js.map +1 -0
- package/dist/cli/__tests__/launch-fallback.test.js +15 -3
- package/dist/cli/__tests__/launch-fallback.test.js.map +1 -1
- package/dist/cli/__tests__/package-bin-contract.test.js +20 -0
- package/dist/cli/__tests__/package-bin-contract.test.js.map +1 -1
- package/dist/cli/__tests__/plugin-cache-stale-lock.test.d.ts +2 -0
- package/dist/cli/__tests__/plugin-cache-stale-lock.test.d.ts.map +1 -0
- package/dist/cli/__tests__/plugin-cache-stale-lock.test.js +76 -0
- package/dist/cli/__tests__/plugin-cache-stale-lock.test.js.map +1 -0
- package/dist/cli/__tests__/plugin-cache-symlink-provenance-3552.test.d.ts +2 -0
- package/dist/cli/__tests__/plugin-cache-symlink-provenance-3552.test.d.ts.map +1 -0
- package/dist/cli/__tests__/plugin-cache-symlink-provenance-3552.test.js +1662 -0
- package/dist/cli/__tests__/plugin-cache-symlink-provenance-3552.test.js.map +1 -0
- package/dist/cli/__tests__/plugin-launcher-provenance-3558.test.d.ts +2 -0
- package/dist/cli/__tests__/plugin-launcher-provenance-3558.test.d.ts.map +1 -0
- package/dist/cli/__tests__/plugin-launcher-provenance-3558.test.js +522 -0
- package/dist/cli/__tests__/plugin-launcher-provenance-3558.test.js.map +1 -0
- package/dist/cli/__tests__/ralplan-advisory.test.d.ts +2 -0
- package/dist/cli/__tests__/ralplan-advisory.test.d.ts.map +1 -0
- package/dist/cli/__tests__/ralplan-advisory.test.js +301 -0
- package/dist/cli/__tests__/ralplan-advisory.test.js.map +1 -0
- package/dist/cli/__tests__/ralplan.test.js +39 -0
- package/dist/cli/__tests__/ralplan.test.js.map +1 -1
- package/dist/cli/__tests__/resume.test.js +81 -6
- package/dist/cli/__tests__/resume.test.js.map +1 -1
- package/dist/cli/__tests__/session-scoped-runtime.test.js +423 -4
- package/dist/cli/__tests__/session-scoped-runtime.test.js.map +1 -1
- package/dist/cli/__tests__/setup-install-mode.test.js +60 -3
- package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -1
- package/dist/cli/__tests__/setup-refresh.test.js +9 -0
- package/dist/cli/__tests__/setup-refresh.test.js.map +1 -1
- package/dist/cli/__tests__/sparkshell-cli.test.js +4 -0
- package/dist/cli/__tests__/sparkshell-cli.test.js.map +1 -1
- package/dist/cli/__tests__/ultragoal.test.js +71 -0
- package/dist/cli/__tests__/ultragoal.test.js.map +1 -1
- package/dist/cli/__tests__/windows-popup-loop-contract.test.js +30 -4
- package/dist/cli/__tests__/windows-popup-loop-contract.test.js.map +1 -1
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +57 -8
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/index.d.ts +113 -7
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +1850 -185
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/native-assets.d.ts +2 -1
- package/dist/cli/native-assets.d.ts.map +1 -1
- package/dist/cli/native-assets.js +7 -7
- package/dist/cli/native-assets.js.map +1 -1
- package/dist/cli/plugin-marketplace.d.ts +89 -4
- package/dist/cli/plugin-marketplace.d.ts.map +1 -1
- package/dist/cli/plugin-marketplace.js +2135 -118
- package/dist/cli/plugin-marketplace.js.map +1 -1
- package/dist/cli/ralplan.d.ts +2 -1
- package/dist/cli/ralplan.d.ts.map +1 -1
- package/dist/cli/ralplan.js +149 -9
- package/dist/cli/ralplan.js.map +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +7 -1
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/sparkshell.d.ts.map +1 -1
- package/dist/cli/sparkshell.js +9 -10
- package/dist/cli/sparkshell.js.map +1 -1
- package/dist/cli/update-worker.js +9 -0
- package/dist/cli/update-worker.js.map +1 -1
- package/dist/cli/update.d.ts +1 -0
- package/dist/cli/update.d.ts.map +1 -1
- package/dist/cli/update.js +9 -0
- package/dist/cli/update.js.map +1 -1
- package/dist/config/__tests__/generator-idempotent.test.js +118 -0
- package/dist/config/__tests__/generator-idempotent.test.js.map +1 -1
- package/dist/config/generator.d.ts.map +1 -1
- package/dist/config/generator.js +74 -4
- package/dist/config/generator.js.map +1 -1
- package/dist/hooks/__tests__/keyword-detector.test.js +74 -0
- package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
- package/dist/hooks/__tests__/ralplan-advisory-keyword.test.d.ts +2 -0
- package/dist/hooks/__tests__/ralplan-advisory-keyword.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/ralplan-advisory-keyword.test.js +250 -0
- package/dist/hooks/__tests__/ralplan-advisory-keyword.test.js.map +1 -0
- package/dist/hooks/__tests__/session.test.js +10 -1
- package/dist/hooks/__tests__/session.test.js.map +1 -1
- package/dist/hooks/keyword-detector.d.ts +8 -1
- package/dist/hooks/keyword-detector.d.ts.map +1 -1
- package/dist/hooks/keyword-detector.js +130 -9
- package/dist/hooks/keyword-detector.js.map +1 -1
- package/dist/hooks/session.d.ts +5 -0
- package/dist/hooks/session.d.ts.map +1 -1
- package/dist/hooks/session.js +17 -3
- package/dist/hooks/session.js.map +1 -1
- package/dist/hud/__tests__/index.test.js +16 -1
- package/dist/hud/__tests__/index.test.js.map +1 -1
- package/dist/hud/__tests__/reconcile.test.js +134 -7
- package/dist/hud/__tests__/reconcile.test.js.map +1 -1
- package/dist/hud/__tests__/render.test.js +57 -0
- package/dist/hud/__tests__/render.test.js.map +1 -1
- package/dist/hud/__tests__/session-attached.test.d.ts +2 -0
- package/dist/hud/__tests__/session-attached.test.d.ts.map +1 -0
- package/dist/hud/__tests__/session-attached.test.js +82 -0
- package/dist/hud/__tests__/session-attached.test.js.map +1 -0
- package/dist/hud/__tests__/state.test.js +94 -2
- package/dist/hud/__tests__/state.test.js.map +1 -1
- package/dist/hud/__tests__/tmux-split-realtmux.test.js +169 -2
- package/dist/hud/__tests__/tmux-split-realtmux.test.js.map +1 -1
- package/dist/hud/__tests__/tmux.test.js +104 -22
- package/dist/hud/__tests__/tmux.test.js.map +1 -1
- package/dist/hud/__tests__/types.test.js +9 -0
- package/dist/hud/__tests__/types.test.js.map +1 -1
- package/dist/hud/__tests__/watch-detached.test.d.ts +2 -0
- package/dist/hud/__tests__/watch-detached.test.d.ts.map +1 -0
- package/dist/hud/__tests__/watch-detached.test.js +383 -0
- package/dist/hud/__tests__/watch-detached.test.js.map +1 -0
- package/dist/hud/__tests__/watch-realtmux.test.d.ts +2 -0
- package/dist/hud/__tests__/watch-realtmux.test.d.ts.map +1 -0
- package/dist/hud/__tests__/watch-realtmux.test.js +322 -0
- package/dist/hud/__tests__/watch-realtmux.test.js.map +1 -0
- package/dist/hud/index.d.ts +3 -0
- package/dist/hud/index.d.ts.map +1 -1
- package/dist/hud/index.js +98 -20
- package/dist/hud/index.js.map +1 -1
- package/dist/hud/reconcile.d.ts.map +1 -1
- package/dist/hud/reconcile.js +68 -24
- package/dist/hud/reconcile.js.map +1 -1
- package/dist/hud/render.d.ts.map +1 -1
- package/dist/hud/render.js +20 -0
- package/dist/hud/render.js.map +1 -1
- package/dist/hud/session-attached.d.ts +15 -0
- package/dist/hud/session-attached.d.ts.map +1 -0
- package/dist/hud/session-attached.js +47 -0
- package/dist/hud/session-attached.js.map +1 -0
- package/dist/hud/state.d.ts +9 -1
- package/dist/hud/state.d.ts.map +1 -1
- package/dist/hud/state.js +140 -3
- package/dist/hud/state.js.map +1 -1
- package/dist/hud/tmux.d.ts +4 -0
- package/dist/hud/tmux.d.ts.map +1 -1
- package/dist/hud/tmux.js +86 -23
- package/dist/hud/tmux.js.map +1 -1
- package/dist/hud/types.d.ts +20 -0
- package/dist/hud/types.d.ts.map +1 -1
- package/dist/hud/types.js +3 -0
- package/dist/hud/types.js.map +1 -1
- package/dist/modes/base.d.ts +15 -2
- package/dist/modes/base.d.ts.map +1 -1
- package/dist/modes/base.js +105 -16
- package/dist/modes/base.js.map +1 -1
- package/dist/question/autopilot-wait.js +2 -2
- package/dist/question/autopilot-wait.js.map +1 -1
- package/dist/question/deep-interview.js +2 -2
- package/dist/question/deep-interview.js.map +1 -1
- package/dist/ralplan/__tests__/advisory-activation.test.d.ts +2 -0
- package/dist/ralplan/__tests__/advisory-activation.test.d.ts.map +1 -0
- package/dist/ralplan/__tests__/advisory-activation.test.js +700 -0
- package/dist/ralplan/__tests__/advisory-activation.test.js.map +1 -0
- package/dist/ralplan/__tests__/advisory-detached-transition.test.d.ts +2 -0
- package/dist/ralplan/__tests__/advisory-detached-transition.test.d.ts.map +1 -0
- package/dist/ralplan/__tests__/advisory-detached-transition.test.js +88 -0
- package/dist/ralplan/__tests__/advisory-detached-transition.test.js.map +1 -0
- package/dist/ralplan/__tests__/advisory.test.d.ts +2 -0
- package/dist/ralplan/__tests__/advisory.test.d.ts.map +1 -0
- package/dist/ralplan/__tests__/advisory.test.js +1087 -0
- package/dist/ralplan/__tests__/advisory.test.js.map +1 -0
- package/dist/ralplan/__tests__/runtime.test.js +416 -7
- package/dist/ralplan/__tests__/runtime.test.js.map +1 -1
- package/dist/ralplan/advisory-activation-verifier.d.ts +19 -0
- package/dist/ralplan/advisory-activation-verifier.d.ts.map +1 -0
- package/dist/ralplan/advisory-activation-verifier.js +77 -0
- package/dist/ralplan/advisory-activation-verifier.js.map +1 -0
- package/dist/ralplan/advisory-activation.d.ts +34 -0
- package/dist/ralplan/advisory-activation.d.ts.map +1 -0
- package/dist/ralplan/advisory-activation.js +205 -0
- package/dist/ralplan/advisory-activation.js.map +1 -0
- package/dist/ralplan/advisory-contract.d.ts +103 -0
- package/dist/ralplan/advisory-contract.d.ts.map +1 -0
- package/dist/ralplan/advisory-contract.js +83 -0
- package/dist/ralplan/advisory-contract.js.map +1 -0
- package/dist/ralplan/advisory-detached-transition.d.ts +11 -0
- package/dist/ralplan/advisory-detached-transition.d.ts.map +1 -0
- package/dist/ralplan/advisory-detached-transition.js +21 -0
- package/dist/ralplan/advisory-detached-transition.js.map +1 -0
- package/dist/ralplan/advisory-evidence.d.ts +91 -0
- package/dist/ralplan/advisory-evidence.d.ts.map +1 -0
- package/dist/ralplan/advisory-evidence.js +393 -0
- package/dist/ralplan/advisory-evidence.js.map +1 -0
- package/dist/ralplan/advisory-lifecycle-validation.d.ts +11 -0
- package/dist/ralplan/advisory-lifecycle-validation.d.ts.map +1 -0
- package/dist/ralplan/advisory-lifecycle-validation.js +72 -0
- package/dist/ralplan/advisory-lifecycle-validation.js.map +1 -0
- package/dist/ralplan/advisory-postconditions.d.ts +3 -0
- package/dist/ralplan/advisory-postconditions.d.ts.map +1 -0
- package/dist/ralplan/advisory-postconditions.js +33 -0
- package/dist/ralplan/advisory-postconditions.js.map +1 -0
- package/dist/ralplan/advisory-recovery-journal.d.ts +56 -0
- package/dist/ralplan/advisory-recovery-journal.d.ts.map +1 -0
- package/dist/ralplan/advisory-recovery-journal.js +136 -0
- package/dist/ralplan/advisory-recovery-journal.js.map +1 -0
- package/dist/ralplan/advisory-storage.d.ts +24 -0
- package/dist/ralplan/advisory-storage.d.ts.map +1 -0
- package/dist/ralplan/advisory-storage.js +106 -0
- package/dist/ralplan/advisory-storage.js.map +1 -0
- package/dist/ralplan/advisory.d.ts +99 -0
- package/dist/ralplan/advisory.d.ts.map +1 -0
- package/dist/ralplan/advisory.js +914 -0
- package/dist/ralplan/advisory.js.map +1 -0
- package/dist/ralplan/documented-leader-preflight.d.ts +8 -0
- package/dist/ralplan/documented-leader-preflight.d.ts.map +1 -1
- package/dist/ralplan/documented-leader-preflight.js +60 -2
- package/dist/ralplan/documented-leader-preflight.js.map +1 -1
- package/dist/ralplan/runtime-advisory-lifecycle.d.ts +74 -0
- package/dist/ralplan/runtime-advisory-lifecycle.d.ts.map +1 -0
- package/dist/ralplan/runtime-advisory-lifecycle.js +352 -0
- package/dist/ralplan/runtime-advisory-lifecycle.js.map +1 -0
- package/dist/ralplan/runtime-contract.d.ts +126 -0
- package/dist/ralplan/runtime-contract.d.ts.map +1 -0
- package/dist/ralplan/runtime-contract.js +2 -0
- package/dist/ralplan/runtime-contract.js.map +1 -0
- package/dist/ralplan/runtime.d.ts +6 -109
- package/dist/ralplan/runtime.d.ts.map +1 -1
- package/dist/ralplan/runtime.js +174 -56
- package/dist/ralplan/runtime.js.map +1 -1
- package/dist/scripts/__tests__/postinstall.test.js +26 -0
- package/dist/scripts/__tests__/postinstall.test.js.map +1 -1
- package/dist/scripts/__tests__/ralplan-advisory-hook.test.d.ts +2 -0
- package/dist/scripts/__tests__/ralplan-advisory-hook.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/ralplan-advisory-hook.test.js +299 -0
- package/dist/scripts/__tests__/ralplan-advisory-hook.test.js.map +1 -0
- package/dist/scripts/__tests__/smoke-packed-install.test.js +102 -8
- package/dist/scripts/__tests__/smoke-packed-install.test.js.map +1 -1
- package/dist/scripts/codex-native-hook.d.ts +20 -0
- package/dist/scripts/codex-native-hook.d.ts.map +1 -1
- package/dist/scripts/codex-native-hook.js +226 -15
- package/dist/scripts/codex-native-hook.js.map +1 -1
- package/dist/scripts/postinstall.d.ts +7 -0
- package/dist/scripts/postinstall.d.ts.map +1 -1
- package/dist/scripts/postinstall.js +40 -0
- package/dist/scripts/postinstall.js.map +1 -1
- package/dist/scripts/smoke-packed-install.d.ts +21 -5
- package/dist/scripts/smoke-packed-install.d.ts.map +1 -1
- package/dist/scripts/smoke-packed-install.js +157 -57
- package/dist/scripts/smoke-packed-install.js.map +1 -1
- package/dist/state/__tests__/mode-binding-lease.test.d.ts +2 -0
- package/dist/state/__tests__/mode-binding-lease.test.d.ts.map +1 -0
- package/dist/state/__tests__/mode-binding-lease.test.js +498 -0
- package/dist/state/__tests__/mode-binding-lease.test.js.map +1 -0
- package/dist/state/__tests__/operations.test.js +1 -0
- package/dist/state/__tests__/operations.test.js.map +1 -1
- package/dist/state/__tests__/pinned-atomic-file.test.d.ts +2 -0
- package/dist/state/__tests__/pinned-atomic-file.test.d.ts.map +1 -0
- package/dist/state/__tests__/pinned-atomic-file.test.js +438 -0
- package/dist/state/__tests__/pinned-atomic-file.test.js.map +1 -0
- package/dist/state/__tests__/skill-active-exact-session-transaction.test.d.ts +2 -0
- package/dist/state/__tests__/skill-active-exact-session-transaction.test.d.ts.map +1 -0
- package/dist/state/__tests__/skill-active-exact-session-transaction.test.js +179 -0
- package/dist/state/__tests__/skill-active-exact-session-transaction.test.js.map +1 -0
- package/dist/state/__tests__/skill-active.test.js +29 -1
- package/dist/state/__tests__/skill-active.test.js.map +1 -1
- package/dist/state/mode-binding-lease-helper.d.ts +2 -0
- package/dist/state/mode-binding-lease-helper.d.ts.map +1 -0
- package/dist/state/mode-binding-lease-helper.js +623 -0
- package/dist/state/mode-binding-lease-helper.js.map +1 -0
- package/dist/state/mode-binding-lease.d.ts +25 -0
- package/dist/state/mode-binding-lease.d.ts.map +1 -0
- package/dist/state/mode-binding-lease.js +380 -0
- package/dist/state/mode-binding-lease.js.map +1 -0
- package/dist/state/operations.d.ts +29 -1
- package/dist/state/operations.d.ts.map +1 -1
- package/dist/state/operations.js +203 -122
- package/dist/state/operations.js.map +1 -1
- package/dist/state/pinned-atomic-file-darwin-client.d.ts +34 -0
- package/dist/state/pinned-atomic-file-darwin-client.d.ts.map +1 -0
- package/dist/state/pinned-atomic-file-darwin-client.js +174 -0
- package/dist/state/pinned-atomic-file-darwin-client.js.map +1 -0
- package/dist/state/pinned-atomic-file-darwin-helper.d.ts +2 -0
- package/dist/state/pinned-atomic-file-darwin-helper.d.ts.map +1 -0
- package/dist/state/pinned-atomic-file-darwin-helper.js +275 -0
- package/dist/state/pinned-atomic-file-darwin-helper.js.map +1 -0
- package/dist/state/pinned-atomic-file-darwin-janitor.d.ts +2 -0
- package/dist/state/pinned-atomic-file-darwin-janitor.d.ts.map +1 -0
- package/dist/state/pinned-atomic-file-darwin-janitor.js +272 -0
- package/dist/state/pinned-atomic-file-darwin-janitor.js.map +1 -0
- package/dist/state/pinned-atomic-file.d.ts +29 -0
- package/dist/state/pinned-atomic-file.d.ts.map +1 -0
- package/dist/state/pinned-atomic-file.js +536 -0
- package/dist/state/pinned-atomic-file.js.map +1 -0
- package/dist/state/process-identity.d.ts +30 -0
- package/dist/state/process-identity.d.ts.map +1 -0
- package/dist/state/process-identity.js +99 -0
- package/dist/state/process-identity.js.map +1 -0
- 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 +82 -5
- package/dist/state/skill-active.js.map +1 -1
- package/dist/state/workflow-transition-reconcile.js +1 -1
- package/dist/state/workflow-transition-reconcile.js.map +1 -1
- package/dist/team/__tests__/tmux-session.test.js +109 -0
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +10 -1
- package/dist/team/tmux-session.js.map +1 -1
- package/dist/utils/__tests__/file-durability.test.js +20 -0
- package/dist/utils/__tests__/file-durability.test.js.map +1 -1
- package/dist/utils/file-durability.d.ts +1 -1
- package/dist/utils/file-durability.d.ts.map +1 -1
- package/dist/utils/file-durability.js.map +1 -1
- package/dist/verification/__tests__/ci-rust-gates.test.js +12 -4
- package/dist/verification/__tests__/ci-rust-gates.test.js.map +1 -1
- package/dist/verification/__tests__/ci-trusted-publish.test.d.ts +2 -0
- package/dist/verification/__tests__/ci-trusted-publish.test.d.ts.map +1 -0
- package/dist/verification/__tests__/ci-trusted-publish.test.js +205 -0
- package/dist/verification/__tests__/ci-trusted-publish.test.js.map +1 -0
- package/dist/verification/__tests__/explore-harness-release-workflow.test.js +10 -5
- package/dist/verification/__tests__/explore-harness-release-workflow.test.js.map +1 -1
- package/dist/verification/__tests__/publish-npm-manual-retired.test.d.ts +2 -0
- package/dist/verification/__tests__/publish-npm-manual-retired.test.d.ts.map +1 -0
- package/dist/verification/__tests__/publish-npm-manual-retired.test.js +22 -0
- package/dist/verification/__tests__/publish-npm-manual-retired.test.js.map +1 -0
- package/package.json +1 -1
- package/plugins/oh-my-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/oh-my-codex/skills/doctor/SKILL.md +1 -1
- package/plugins/oh-my-codex/skills/omx-setup/SKILL.md +1 -1
- package/plugins/oh-my-codex/skills/ralplan/SKILL.md +10 -1
- package/plugins/oh-my-codex/skills/team/SKILL.md +2 -0
- package/skills/doctor/SKILL.md +1 -1
- package/skills/omx-setup/SKILL.md +1 -1
- package/skills/ralplan/SKILL.md +10 -1
- package/skills/team/SKILL.md +2 -0
- package/src/scripts/__tests__/postinstall.test.ts +28 -0
- package/src/scripts/__tests__/ralplan-advisory-hook.test.ts +320 -0
- package/src/scripts/__tests__/smoke-packed-install.test.ts +120 -7
- package/src/scripts/codex-native-hook.ts +220 -10
- package/src/scripts/postinstall.ts +46 -0
- package/src/scripts/smoke-packed-install.ts +175 -70
|
@@ -126,7 +126,7 @@ export const PACKED_INSTALL_NATIVE_HOOK_REGRESSION_PROMPTS = [
|
|
|
126
126
|
{ name: 'compact-explicit-negation', prompt: '$ralplan,$autopilot are prohibited', expectedSkill: null, expectedStopBlock: false },
|
|
127
127
|
{ name: 'compact-implicit-negation', prompt: 'Autopilot mode،deep interview are prohibited.', expectedSkill: null, expectedStopBlock: false },
|
|
128
128
|
{ name: 'doc-clause-local-prefix', prompt: '$ralplan; $autopilot is documented in the guide.', expectedSkill: 'ralplan', expectedStopBlock: true },
|
|
129
|
-
{ name: 'doc-chain-described', prompt: 'use $ralplan is the workflow command; autopilot mode is documented in the guide; $team execute it', expectedSkill: 'team', expectedStopBlock:
|
|
129
|
+
{ name: 'doc-chain-described', prompt: 'use $ralplan is the workflow command; autopilot mode is documented in the guide; $team execute it', expectedSkill: 'team', expectedStopBlock: true, insideTmux: true },
|
|
130
130
|
{ name: 'doc-chain-workflow', prompt: 'use $ralplan is the workflow command; autopilot mode is workflow documentation; use $ralph execute it', expectedSkill: 'ralph', expectedStopBlock: true },
|
|
131
131
|
{ name: 'ref-inline-explicit', prompt: '[docs]: $ralplan\n$autopilot build it', expectedSkill: 'autopilot', expectedStopBlock: true },
|
|
132
132
|
{ name: 'ref-inline-prompts', prompt: '[docs]: /prompts:architect\n$autopilot build it', expectedSkill: 'autopilot', expectedStopBlock: true },
|
|
@@ -152,10 +152,10 @@ export const PACKED_INSTALL_NATIVE_HOOK_REGRESSION_PROMPTS = [
|
|
|
152
152
|
{ name: 'neg-fw-dot-reopen', prompt: 'Do not run $ralplan. use $autopilot build it', expectedSkill: 'autopilot', expectedStopBlock: true },
|
|
153
153
|
{ name: 'neg-greek-q-reopen', prompt: 'Do not run $ralplan; use $autopilot build it', expectedSkill: 'autopilot', expectedStopBlock: true },
|
|
154
154
|
{ name: 'unicode-attached-contrast', prompt: 'Do not use deep interview яbut use autopilot mode.', expectedSkill: null, expectedStopBlock: false },
|
|
155
|
-
{ name: 'prefix-list-followup', prompt: 'Do not run $ralplan, $autopilot; use $team execute it', expectedSkill: 'team', expectedStopBlock:
|
|
155
|
+
{ name: 'prefix-list-followup', prompt: 'Do not run $ralplan, $autopilot; use $team execute it', expectedSkill: 'team', expectedStopBlock: true, insideTmux: true },
|
|
156
156
|
{ name: 'mixed-postposed-chain', prompt: '$ralplan, autopilot mode, $team are prohibited.', expectedSkill: null, expectedStopBlock: false },
|
|
157
|
-
{ name: 'implicit-first-doc-chain', prompt: 'Autopilot mode and $ralplan are workflow commands; use $team execute it', expectedSkill: 'team', expectedStopBlock:
|
|
158
|
-
{ name: 'both-mixed-doc-followup', prompt: 'Both autopilot mode and $ralplan are workflow commands; use $team execute it', expectedSkill: 'team', expectedStopBlock:
|
|
157
|
+
{ name: 'implicit-first-doc-chain', prompt: 'Autopilot mode and $ralplan are workflow commands; use $team execute it', expectedSkill: 'team', expectedStopBlock: true, insideTmux: true },
|
|
158
|
+
{ name: 'both-mixed-doc-followup', prompt: 'Both autopilot mode and $ralplan are workflow commands; use $team execute it', expectedSkill: 'team', expectedStopBlock: true, insideTmux: true },
|
|
159
159
|
{ name: 'doc-semicolon-preserves-earlier', prompt: 'Use autopilot mode; use $ralplan is the workflow command.', expectedSkill: 'autopilot', expectedStopBlock: true },
|
|
160
160
|
{ name: 'doc-independent-comma', prompt: 'Use autopilot mode, and $ralplan is documented in the guide.', expectedSkill: 'autopilot', expectedStopBlock: true },
|
|
161
161
|
{ name: 'reference-unclosed-quote-destination', prompt: '[docs]: "target\n$autopilot build it', expectedSkill: null, expectedStopBlock: false },
|
|
@@ -203,7 +203,7 @@ export const PACKED_INSTALL_NATIVE_HOOK_REGRESSION_PROMPTS = [
|
|
|
203
203
|
{ name: 'percent-suffix', prompt: '$ralplan%docs', expectedSkill: null, expectedStopBlock: false },
|
|
204
204
|
{ name: 'fullwidth-percent-suffix', prompt: '$ralplan%docs', expectedSkill: null, expectedStopBlock: false },
|
|
205
205
|
{ name: 'g1a-ordered-multi-skill', prompt: '$ralplan, $autopilot; $team', expectedSkill: 'ralplan', expectedStopBlock: true, expectedDeferredSkills: ['autopilot', 'team'], expectedActiveSkills: ['ralplan'], insideTmux: true },
|
|
206
|
-
{ name: 'g1c-duplicate-alias', prompt: '$autopilot $oh-my-codex:autopilot build it', expectedSkill: 'autopilot', expectedStopBlock: true, expectedDeferredSkills: [], expectedActiveSkills: [] },
|
|
206
|
+
{ name: 'g1c-duplicate-alias', prompt: '$autopilot $oh-my-codex:autopilot build it', expectedSkill: 'autopilot', expectedStopBlock: true, expectedDeferredSkills: [], expectedActiveSkills: ['autopilot'] },
|
|
207
207
|
{ name: 'b3-longer-valid-fence', prompt: '```text\n$autopilot build it\n````\n$ralplan plan it', expectedSkill: 'ralplan', expectedStopBlock: true },
|
|
208
208
|
{ name: 'b4-shorter-invalid-fence', prompt: '````text\n$autopilot build it\n```\n$ralplan plan it', expectedSkill: null, expectedStopBlock: false },
|
|
209
209
|
{ name: 'b5-different-marker-invalid-fence', prompt: '```text\n$autopilot build it\n~~~\n$ralplan plan it', expectedSkill: null, expectedStopBlock: false },
|
|
@@ -211,8 +211,29 @@ export const PACKED_INSTALL_NATIVE_HOOK_REGRESSION_PROMPTS = [
|
|
|
211
211
|
|
|
212
212
|
export function assertPackedRegressionWorkflowState(
|
|
213
213
|
testCase: { readonly name: string; readonly expectedSkill: string },
|
|
214
|
-
skillState: {
|
|
214
|
+
skillState: {
|
|
215
|
+
readonly active?: boolean;
|
|
216
|
+
readonly skill?: string;
|
|
217
|
+
readonly phase?: string;
|
|
218
|
+
readonly error?: string;
|
|
219
|
+
readonly transition_error?: string;
|
|
220
|
+
readonly active_skills?: readonly unknown[];
|
|
221
|
+
},
|
|
215
222
|
): void {
|
|
223
|
+
// `$ralph` is a retired skill token in 0.21.0. UserPromptSubmit must leave a
|
|
224
|
+
// durable failed sunset receipt instead of activating the legacy workflow.
|
|
225
|
+
if (testCase.expectedSkill === 'ralph') {
|
|
226
|
+
const sunsetError = skillState.transition_error ?? skillState.error ?? '';
|
|
227
|
+
if (
|
|
228
|
+
skillState.active !== false
|
|
229
|
+
|| skillState.skill !== 'ralph'
|
|
230
|
+
|| skillState.phase !== 'failed'
|
|
231
|
+
|| !sunsetError.includes('Skill "$ralph" has been removed. Use "$ultragoal" instead.')
|
|
232
|
+
) {
|
|
233
|
+
throw new Error(`packed regression ${testCase.name} persisted unexpected retired ralph state`);
|
|
234
|
+
}
|
|
235
|
+
return;
|
|
236
|
+
}
|
|
216
237
|
const matchesExpectedState = skillState.active === true && skillState.skill === testCase.expectedSkill;
|
|
217
238
|
if (!matchesExpectedState) {
|
|
218
239
|
throw new Error(`packed regression ${testCase.name} persisted unexpected workflow state`);
|
|
@@ -222,7 +243,9 @@ export function assertPackedRegressionWorkflowState(
|
|
|
222
243
|
export function shouldPackedRegressionStopBlock(
|
|
223
244
|
testCase: { readonly expectedSkill: string | null; readonly expectedStopBlock: boolean },
|
|
224
245
|
): boolean {
|
|
225
|
-
|
|
246
|
+
// A retired `$ralph` prompt records a terminal sunset receipt and must not
|
|
247
|
+
// prevent Stop from completing.
|
|
248
|
+
return testCase.expectedSkill !== 'ralph' && testCase.expectedStopBlock;
|
|
226
249
|
}
|
|
227
250
|
|
|
228
251
|
export function buildPackedRegressionEnvironment(
|
|
@@ -2295,19 +2318,95 @@ function parseNativeHookSmokeOutput(probe: string, stdout: string): Record<strin
|
|
|
2295
2318
|
return parsed as Record<string, unknown>;
|
|
2296
2319
|
}
|
|
2297
2320
|
|
|
2298
|
-
|
|
2299
|
-
|
|
2300
|
-
|
|
2301
|
-
|
|
2321
|
+
/**
|
|
2322
|
+
* #3497/#3481 contract: PreToolUse is advisory-only. Former conductor/planning
|
|
2323
|
+
* hard-gate deny probes now pin the advisory surface instead. Accepts the two
|
|
2324
|
+
* documented advisory shapes (empty no-op output, or systemMessage plus optional
|
|
2325
|
+
* PreToolUse additionalContext) and rejects anything that would hide a real
|
|
2326
|
+
* regression: a hard block, stopped continuation, a stopReason, any
|
|
2327
|
+
* permissionDecision (deny or allow), or unexpected/malformed fields.
|
|
2328
|
+
*/
|
|
2329
|
+
export function assertNativeHookAdvisoryPreToolUse(
|
|
2330
|
+
probe: string,
|
|
2331
|
+
output: Record<string, unknown>,
|
|
2332
|
+
): void {
|
|
2333
|
+
if (output.decision === 'block') {
|
|
2334
|
+
throw new Error(`native hook ${probe} emitted a hard block; PreToolUse is advisory-only`);
|
|
2335
|
+
}
|
|
2336
|
+
if (output.continue === false) {
|
|
2337
|
+
throw new Error(`native hook ${probe} stopped continuation; PreToolUse is advisory-only`);
|
|
2338
|
+
}
|
|
2339
|
+
if (output.decision !== undefined || output.continue !== undefined) {
|
|
2340
|
+
throw new Error(`native hook ${probe} emitted an unexpected decision/continue shape`);
|
|
2341
|
+
}
|
|
2342
|
+
if (output.stopReason !== undefined) {
|
|
2343
|
+
throw new Error(`native hook ${probe} emitted stopReason ${JSON.stringify(output.stopReason)}`);
|
|
2302
2344
|
}
|
|
2303
|
-
const
|
|
2304
|
-
if (
|
|
2305
|
-
throw new Error(`native hook ${probe}
|
|
2345
|
+
const systemMessage = output.systemMessage;
|
|
2346
|
+
if (systemMessage !== undefined && (typeof systemMessage !== 'string' || systemMessage.trim() === '')) {
|
|
2347
|
+
throw new Error(`native hook ${probe} emitted a malformed systemMessage`);
|
|
2306
2348
|
}
|
|
2307
|
-
|
|
2308
|
-
|
|
2349
|
+
const hasHookSpecificOutput = output.hookSpecificOutput !== undefined;
|
|
2350
|
+
const hookOutput = !hasHookSpecificOutput
|
|
2351
|
+
? {}
|
|
2352
|
+
: (typeof output.hookSpecificOutput === 'object' && output.hookSpecificOutput !== null && !Array.isArray(output.hookSpecificOutput))
|
|
2353
|
+
? output.hookSpecificOutput as Record<string, unknown>
|
|
2354
|
+
: null;
|
|
2355
|
+
if (hookOutput === null) {
|
|
2356
|
+
throw new Error(`native hook ${probe} emitted a malformed hookSpecificOutput`);
|
|
2357
|
+
}
|
|
2358
|
+
if (hookOutput.permissionDecision !== undefined) {
|
|
2359
|
+
throw new Error(
|
|
2360
|
+
`native hook ${probe} emitted permissionDecision ${JSON.stringify(hookOutput.permissionDecision)}; PreToolUse is advisory-only`,
|
|
2361
|
+
);
|
|
2362
|
+
}
|
|
2363
|
+
if (hookOutput.hookEventName !== undefined && hookOutput.hookEventName !== 'PreToolUse') {
|
|
2364
|
+
throw new Error(`native hook ${probe} hookSpecificOutput names ${JSON.stringify(hookOutput.hookEventName)}`);
|
|
2365
|
+
}
|
|
2366
|
+
for (const key of Object.keys(output)) {
|
|
2367
|
+
if (key !== 'systemMessage' && key !== 'hookSpecificOutput') {
|
|
2368
|
+
throw new Error(`native hook ${probe} emitted unexpected top-level field ${JSON.stringify(key)}`);
|
|
2369
|
+
}
|
|
2370
|
+
}
|
|
2371
|
+
for (const key of Object.keys(hookOutput)) {
|
|
2372
|
+
if (key !== 'hookEventName' && key !== 'additionalContext') {
|
|
2373
|
+
throw new Error(`native hook ${probe} hookSpecificOutput emitted unexpected field ${JSON.stringify(key)}`);
|
|
2374
|
+
}
|
|
2375
|
+
}
|
|
2376
|
+
if (hasHookSpecificOutput) {
|
|
2377
|
+
if (hookOutput.hookEventName !== 'PreToolUse' || typeof hookOutput.additionalContext !== 'string' || hookOutput.additionalContext.trim() === '') {
|
|
2378
|
+
throw new Error(`native hook ${probe} emitted a malformed PreToolUse advisory envelope`);
|
|
2379
|
+
}
|
|
2380
|
+
if (systemMessage !== hookOutput.additionalContext) {
|
|
2381
|
+
throw new Error(`native hook ${probe} advisory envelope does not mirror systemMessage`);
|
|
2382
|
+
}
|
|
2309
2383
|
}
|
|
2310
2384
|
}
|
|
2385
|
+
/**
|
|
2386
|
+
* Lists persisted artifacts (files or symlinks) under a state root. The
|
|
2387
|
+
* advisory hook may bootstrap an empty `.omx/state` directory (#3497); only
|
|
2388
|
+
* persisted entries constitute authority-sensitive state creation.
|
|
2389
|
+
*/
|
|
2390
|
+
export function listPersistedStateFiles(root: string): string[] {
|
|
2391
|
+
let rootStat;
|
|
2392
|
+
try {
|
|
2393
|
+
rootStat = lstatSync(root);
|
|
2394
|
+
} catch (error) {
|
|
2395
|
+
if (isNodeErrorWithCode(error, 'ENOENT')) return [];
|
|
2396
|
+
throw error;
|
|
2397
|
+
}
|
|
2398
|
+
if (!rootStat.isDirectory() || rootStat.isSymbolicLink()) return [root];
|
|
2399
|
+
const files: string[] = [];
|
|
2400
|
+
const walk = (dir: string): void => {
|
|
2401
|
+
for (const entry of readdirSync(dir, { withFileTypes: true })) {
|
|
2402
|
+
const fullPath = join(dir, entry.name);
|
|
2403
|
+
if (entry.isDirectory()) walk(fullPath);
|
|
2404
|
+
else files.push(fullPath);
|
|
2405
|
+
}
|
|
2406
|
+
};
|
|
2407
|
+
walk(root);
|
|
2408
|
+
return files;
|
|
2409
|
+
}
|
|
2311
2410
|
|
|
2312
2411
|
function smokeInstalledNativeHookDist(prefixDir: string, runtimeBinary: string): void {
|
|
2313
2412
|
function runPackedTransportRegressions(hookScript: string, smokeCwd: string): void {
|
|
@@ -2389,9 +2488,15 @@ function runPackedTransportRegressions(hookScript: string, smokeCwd: string): vo
|
|
|
2389
2488
|
const g2cPayload = { ...PACKED_CODEX_01445_NO_POINTER_NO_TRACKER_FIXTURE, cwd: g2cCwd };
|
|
2390
2489
|
const g2cResult = invoke(g2cCwd, buildPackedRegressionEnvironment({ name: 'g2c-01445' }), g2cPayload);
|
|
2391
2490
|
const g2cStdout = String(g2cResult.stdout || '');
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2491
|
+
// #3497: this historical adapted-Ralplan PreToolUse deny is now advisory;
|
|
2492
|
+
// the CLI preflight still fails closed when the role intent is executed.
|
|
2493
|
+
assertNativeHookAdvisoryPreToolUse(
|
|
2494
|
+
'PreToolUse packed Codex 0.144.5 fixture',
|
|
2495
|
+
parseNativeHookSmokeOutput('PreToolUse packed Codex 0.144.5 fixture', g2cStdout),
|
|
2496
|
+
);
|
|
2497
|
+
if (listPersistedStateFiles(join(g2cCwd, '.omx', 'state')).length > 0) {
|
|
2498
|
+
throw new Error('packed Codex 0.144.5 fixture persisted pointer or tracker state');
|
|
2499
|
+
}
|
|
2395
2500
|
}
|
|
2396
2501
|
|
|
2397
2502
|
const globalNodeModules = resolveGlobalNodeModules(prefixDir);
|
|
@@ -2646,7 +2751,9 @@ function runPackedTransportRegressions(hookScript: string, smokeCwd: string): vo
|
|
|
2646
2751
|
thread_id: leaderAgentId,
|
|
2647
2752
|
}, teamEnv).stdout),
|
|
2648
2753
|
);
|
|
2649
|
-
|
|
2754
|
+
// #3497/#3481: conductor hard gates were deleted; the leader with Team
|
|
2755
|
+
// environment is no longer denied and must emit advisory-only output.
|
|
2756
|
+
assertNativeHookAdvisoryPreToolUse('PreToolUse leader with Team environment', leaderOutput);
|
|
2650
2757
|
|
|
2651
2758
|
const childEnv = {
|
|
2652
2759
|
...hookEnv,
|
|
@@ -2690,12 +2797,11 @@ function runPackedTransportRegressions(hookScript: string, smokeCwd: string): vo
|
|
|
2690
2797
|
actor: 'main-root' | 'native-child',
|
|
2691
2798
|
probe: string,
|
|
2692
2799
|
output: Record<string, unknown>,
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
output
|
|
2697
|
-
|
|
2698
|
-
);
|
|
2800
|
+
): void => {
|
|
2801
|
+
// #3497/#3481: conductor/owner/provenance PreToolUse hard gates were
|
|
2802
|
+
// deleted; these actor probes now pin the advisory-only contract.
|
|
2803
|
+
assertNativeHookAdvisoryPreToolUse(`PreToolUse ${actor} ${probe}`, output);
|
|
2804
|
+
};
|
|
2699
2805
|
for (const actor of ['main-root', 'native-child'] as const) {
|
|
2700
2806
|
for (const [probe, command] of [
|
|
2701
2807
|
['finite cp directory leaf symlink', 'cp .omx/state/payload .omx/state/inbox'],
|
|
@@ -2797,8 +2903,8 @@ function runPackedTransportRegressions(hookScript: string, smokeCwd: string): vo
|
|
|
2797
2903
|
requireActorDeny(actor, probe, runActorProbe(actor, probe, 'Bash', { command }));
|
|
2798
2904
|
}
|
|
2799
2905
|
}
|
|
2800
|
-
|
|
2801
|
-
'identityless remote mutation',
|
|
2906
|
+
assertNativeHookAdvisoryPreToolUse(
|
|
2907
|
+
'PreToolUse identityless remote mutation',
|
|
2802
2908
|
parseNativeHookSmokeOutput(
|
|
2803
2909
|
'PreToolUse identityless remote mutation',
|
|
2804
2910
|
String(invokeAuthorizationProbe({
|
|
@@ -2810,7 +2916,6 @@ function runPackedTransportRegressions(hookScript: string, smokeCwd: string): vo
|
|
|
2810
2916
|
tool_input: { command: 'PATH=/usr/bin:/bin gh issue create --title x --body y' },
|
|
2811
2917
|
}, childEnv).stdout),
|
|
2812
2918
|
),
|
|
2813
|
-
/OWNER_CONFIRMATION_REQUIRED/,
|
|
2814
2919
|
);
|
|
2815
2920
|
for (const [probe, identity] of [
|
|
2816
2921
|
['conflicting owner and current thread aliases', { owner_codex_thread_id: leaderAgentId, thread_id: 'agent-packed-install-child' }],
|
|
@@ -2818,8 +2923,8 @@ function runPackedTransportRegressions(hookScript: string, smokeCwd: string): vo
|
|
|
2818
2923
|
['reversed conflicting session aliases', { session_id: 'foreign-session', sessionId, agent_id: leaderAgentId, thread_id: leaderAgentId }],
|
|
2819
2924
|
['conflicting owner and agent aliases', { owner_codex_thread_id: 'foreign-owner', agent_id: leaderAgentId }],
|
|
2820
2925
|
] as const) {
|
|
2821
|
-
|
|
2822
|
-
probe
|
|
2926
|
+
assertNativeHookAdvisoryPreToolUse(
|
|
2927
|
+
`PreToolUse ${probe}`,
|
|
2823
2928
|
parseNativeHookSmokeOutput(
|
|
2824
2929
|
probe,
|
|
2825
2930
|
String(invokeAuthorizationProbe({
|
|
@@ -2832,15 +2937,14 @@ function runPackedTransportRegressions(hookScript: string, smokeCwd: string): vo
|
|
|
2832
2937
|
tool_input: { command: 'PATH=/usr/bin:/bin gh issue create --title x --body y' },
|
|
2833
2938
|
}, childEnv).stdout),
|
|
2834
2939
|
),
|
|
2835
|
-
/PROVENANCE_DENIED/,
|
|
2836
2940
|
);
|
|
2837
2941
|
}
|
|
2838
2942
|
for (const [probe, identity] of [
|
|
2839
2943
|
['foreign active session', { session_id: 'foreign-session', agent_id: leaderAgentId, thread_id: leaderAgentId }],
|
|
2840
2944
|
['absent active session', { agent_id: leaderAgentId, thread_id: leaderAgentId }],
|
|
2841
2945
|
] as const) {
|
|
2842
|
-
|
|
2843
|
-
probe
|
|
2946
|
+
assertNativeHookAdvisoryPreToolUse(
|
|
2947
|
+
`PreToolUse ${probe}`,
|
|
2844
2948
|
parseNativeHookSmokeOutput(
|
|
2845
2949
|
probe,
|
|
2846
2950
|
String(invokeAuthorizationProbe({
|
|
@@ -2852,7 +2956,6 @@ function runPackedTransportRegressions(hookScript: string, smokeCwd: string): vo
|
|
|
2852
2956
|
tool_input: { file_path: 'src/session-bypass.ts', content: 'owned\n' },
|
|
2853
2957
|
}, childEnv).stdout),
|
|
2854
2958
|
),
|
|
2855
|
-
/PROVENANCE_DENIED/,
|
|
2856
2959
|
);
|
|
2857
2960
|
}
|
|
2858
2961
|
for (const [order, sessionAliases] of [
|
|
@@ -2864,8 +2967,8 @@ function runPackedTransportRegressions(hookScript: string, smokeCwd: string): vo
|
|
|
2864
2967
|
['bash', 'Bash', { command: 'printf pwn >& src/alias-bypass.ts' }],
|
|
2865
2968
|
['state', 'mcp__omx_state__state_write', { mode: 'ultragoal', active: true }],
|
|
2866
2969
|
] as const) {
|
|
2867
|
-
|
|
2868
|
-
`session alias ${order}/${transport}`,
|
|
2970
|
+
assertNativeHookAdvisoryPreToolUse(
|
|
2971
|
+
`PreToolUse session alias ${order}/${transport}`,
|
|
2869
2972
|
parseNativeHookSmokeOutput(
|
|
2870
2973
|
`PreToolUse session alias ${order}/${transport}`,
|
|
2871
2974
|
String(invokeAuthorizationProbe({
|
|
@@ -2879,12 +2982,11 @@ function runPackedTransportRegressions(hookScript: string, smokeCwd: string): vo
|
|
|
2879
2982
|
tool_input: toolInput,
|
|
2880
2983
|
}, childEnv).stdout),
|
|
2881
2984
|
),
|
|
2882
|
-
/PROVENANCE_DENIED/,
|
|
2883
2985
|
);
|
|
2884
2986
|
}
|
|
2885
2987
|
}
|
|
2886
|
-
|
|
2887
|
-
'noncanonical cwd metadata target',
|
|
2988
|
+
assertNativeHookAdvisoryPreToolUse(
|
|
2989
|
+
'PreToolUse noncanonical cwd metadata target',
|
|
2888
2990
|
parseNativeHookSmokeOutput(
|
|
2889
2991
|
'PreToolUse noncanonical cwd metadata target',
|
|
2890
2992
|
String(invokeAuthorizationProbe({
|
|
@@ -2898,10 +3000,9 @@ function runPackedTransportRegressions(hookScript: string, smokeCwd: string): vo
|
|
|
2898
3000
|
tool_input: { file_path: '.omx/state/inbox/cwd-bypass', content: 'owned\n' },
|
|
2899
3001
|
}, childEnv).stdout),
|
|
2900
3002
|
),
|
|
2901
|
-
/Main-root Conductor mode is active/,
|
|
2902
3003
|
);
|
|
2903
|
-
|
|
2904
|
-
'identityless native-session remote mutation',
|
|
3004
|
+
assertNativeHookAdvisoryPreToolUse(
|
|
3005
|
+
'PreToolUse identityless native-session remote mutation',
|
|
2905
3006
|
parseNativeHookSmokeOutput(
|
|
2906
3007
|
'PreToolUse identityless native-session remote mutation',
|
|
2907
3008
|
String(invokeAuthorizationProbe({
|
|
@@ -2913,7 +3014,6 @@ function runPackedTransportRegressions(hookScript: string, smokeCwd: string): vo
|
|
|
2913
3014
|
tool_input: { path: 'src/session-bypass.ts' },
|
|
2914
3015
|
}, childEnv).stdout),
|
|
2915
3016
|
),
|
|
2916
|
-
/OWNER_CONFIRMATION_REQUIRED|Main-root Conductor mode is active/,
|
|
2917
3017
|
);
|
|
2918
3018
|
if (Object.keys(runActorProbe('main-root', 'finite cp metadata leaf control', 'Bash', {
|
|
2919
3019
|
command: 'cp .omx/state/payload .omx/handoffs/run-1/payload',
|
|
@@ -2979,30 +3079,28 @@ function runPackedTransportRegressions(hookScript: string, smokeCwd: string): vo
|
|
|
2979
3079
|
current_phase: 'planning',
|
|
2980
3080
|
session_id: boxedPlanningSiblingSessionId,
|
|
2981
3081
|
}));
|
|
2982
|
-
|
|
2983
|
-
'main-root boxed planning state symlink',
|
|
3082
|
+
assertNativeHookAdvisoryPreToolUse(
|
|
3083
|
+
'PreToolUse main-root boxed planning state symlink',
|
|
2984
3084
|
runActorProbe('main-root', 'boxed planning state symlink', 'Write', { file_path: boxedPlanningStatePath, content: 'owned\n' }, {
|
|
2985
3085
|
OMX_ROOT: boxedPlanningRoot,
|
|
2986
3086
|
OMX_TEAM_STATE_ROOT: '',
|
|
2987
3087
|
}),
|
|
2988
|
-
/(?:Ralplan is active|Main-root Conductor mode is active)/,
|
|
2989
3088
|
);
|
|
2990
|
-
|
|
2991
|
-
'main-root boxed planning state hardlink',
|
|
3089
|
+
assertNativeHookAdvisoryPreToolUse(
|
|
3090
|
+
'PreToolUse main-root boxed planning state hardlink',
|
|
2992
3091
|
runActorProbe('main-root', 'boxed planning state hardlink', 'Write', { file_path: boxedPlanningHardLinkPath, content: 'owned\n' }, {
|
|
2993
3092
|
OMX_ROOT: boxedPlanningRoot,
|
|
2994
3093
|
OMX_TEAM_STATE_ROOT: '',
|
|
2995
3094
|
}),
|
|
2996
|
-
/(?:Ralplan is active|Main-root Conductor mode is active)/,
|
|
2997
3095
|
);
|
|
2998
|
-
|
|
2999
|
-
'main-root boxed planning sibling session',
|
|
3096
|
+
assertNativeHookAdvisoryPreToolUse(
|
|
3097
|
+
'PreToolUse main-root boxed planning sibling session',
|
|
3000
3098
|
runActorProbe('main-root', 'boxed planning sibling session', 'Write', { file_path: boxedPlanningSiblingPath, content: 'owned\n' }, {
|
|
3001
3099
|
OMX_ROOT: boxedPlanningRoot,
|
|
3002
3100
|
OMX_TEAM_STATE_ROOT: '',
|
|
3003
3101
|
}),
|
|
3004
|
-
/(?:Ralplan is active|Main-root Conductor mode is active)/,
|
|
3005
3102
|
);
|
|
3103
|
+
|
|
3006
3104
|
if (Object.keys(runActorProbe('main-root', 'hardlink metadata source control', 'Bash', {
|
|
3007
3105
|
command: 'ln .omx/state/conductor-ledger.json .omx/handoffs/run-1/ledger-link',
|
|
3008
3106
|
})).length !== 0) {
|
|
@@ -3049,7 +3147,7 @@ function runPackedTransportRegressions(hookScript: string, smokeCwd: string): vo
|
|
|
3049
3147
|
tool_input: { file_path: 'src/packed-conflict.ts', content: 'escaped' },
|
|
3050
3148
|
}, childEnv).stdout),
|
|
3051
3149
|
);
|
|
3052
|
-
|
|
3150
|
+
assertNativeHookAdvisoryPreToolUse('PreToolUse conflicting leader identity', output);
|
|
3053
3151
|
}
|
|
3054
3152
|
const consistentLeaderOutput = parseNativeHookSmokeOutput(
|
|
3055
3153
|
'PreToolUse consistent leader identity',
|
|
@@ -3063,7 +3161,8 @@ function runPackedTransportRegressions(hookScript: string, smokeCwd: string): vo
|
|
|
3063
3161
|
tool_input: { file_path: 'src/packed-consistent-leader.ts', content: 'escaped' },
|
|
3064
3162
|
}, childEnv).stdout),
|
|
3065
3163
|
);
|
|
3066
|
-
|
|
3164
|
+
// #3497: the consistent leader identity is no longer conductor-denied.
|
|
3165
|
+
assertNativeHookAdvisoryPreToolUse('PreToolUse consistent leader identity', consistentLeaderOutput);
|
|
3067
3166
|
const ownerSessionClaimOutput = parseNativeHookSmokeOutput(
|
|
3068
3167
|
'PreToolUse owner-session identity claim',
|
|
3069
3168
|
String(invokeAuthorizationProbe({
|
|
@@ -3076,7 +3175,8 @@ function runPackedTransportRegressions(hookScript: string, smokeCwd: string): vo
|
|
|
3076
3175
|
tool_input: { file_path: 'src/packed-session-claim.ts', content: 'escaped' },
|
|
3077
3176
|
}, childEnv).stdout),
|
|
3078
3177
|
);
|
|
3079
|
-
|
|
3178
|
+
// #3481: owner-confirmation PreToolUse hard gate was removed.
|
|
3179
|
+
assertNativeHookAdvisoryPreToolUse('PreToolUse owner-session identity claim', ownerSessionClaimOutput);
|
|
3080
3180
|
|
|
3081
3181
|
const wgetReviewMutationCommands = [
|
|
3082
3182
|
['bare wget download', 'wget https://example.test/file'],
|
|
@@ -3822,8 +3922,8 @@ PY`],
|
|
|
3822
3922
|
if (existsSync(join(packedCancelStateDir, 'skill-active-state.json'))) {
|
|
3823
3923
|
throw new Error('packed issue 3280 cancellation mutated root compatibility state');
|
|
3824
3924
|
}
|
|
3825
|
-
|
|
3826
|
-
'main-root boxed planning CLI poisoned state root',
|
|
3925
|
+
assertNativeHookAdvisoryPreToolUse(
|
|
3926
|
+
'PreToolUse main-root boxed planning CLI poisoned state root',
|
|
3827
3927
|
runActorProbe(
|
|
3828
3928
|
'main-root',
|
|
3829
3929
|
'boxed planning CLI poisoned state root',
|
|
@@ -3831,7 +3931,6 @@ PY`],
|
|
|
3831
3931
|
{ command: `OMX_STATE_ROOT=${join(smokeCwd, 'src', 'state')} ${packedNpmCommandPrefix} omx state write --input '{"mode":"ralplan","active":true}' --json` },
|
|
3832
3932
|
{ OMX_ROOT: boxedPlanningRoot, OMX_TEAM_STATE_ROOT: '' },
|
|
3833
3933
|
),
|
|
3834
|
-
/(?:Ralplan is active|Main-root Conductor mode is active)/,
|
|
3835
3934
|
);
|
|
3836
3935
|
const npmBinPathShadow = join(smokeCwd, '.omx', 'state', 'inbox', 'cat');
|
|
3837
3936
|
symlinkSync('/usr/bin/touch', npmBinPathShadow);
|
|
@@ -4534,21 +4633,20 @@ PY`],
|
|
|
4534
4633
|
'sessionless planning state write',
|
|
4535
4634
|
'mcp__omx_state__state_write',
|
|
4536
4635
|
{ mode: 'ralplan', active: true, current_phase: 'planning' },
|
|
4537
|
-
)
|
|
4636
|
+
));
|
|
4538
4637
|
requireActorDeny('native-child', 'foreign planning state write', runActorProbe(
|
|
4539
4638
|
'native-child',
|
|
4540
4639
|
'foreign planning state write',
|
|
4541
4640
|
'mcp__omx_state__state_write',
|
|
4542
4641
|
{ mode: 'ralplan', active: false, current_phase: 'complete', session_id: 'foreign-session' },
|
|
4543
|
-
)
|
|
4642
|
+
));
|
|
4544
4643
|
symlinkSync(join(smokeCwd, 'src'), join(smokeCwd, '.omx', 'drafts'));
|
|
4545
4644
|
for (const actor of ['main-root', 'native-child'] as const) {
|
|
4546
4645
|
const output = runActorProbe(actor, 'linked planning artifact redirect', 'Bash', {
|
|
4547
4646
|
command: 'printf owned > .omx/drafts/linked-plan.md',
|
|
4548
4647
|
});
|
|
4549
|
-
|
|
4550
|
-
|
|
4551
|
-
}
|
|
4648
|
+
// #3497: planning artifact redirects are advisory-only now.
|
|
4649
|
+
assertNativeHookAdvisoryPreToolUse(`PreToolUse ${actor} linked planning artifact redirect`, output);
|
|
4552
4650
|
}
|
|
4553
4651
|
writeFileSync(join(stateDir, 'sessions', sessionId, 'skill-active-state.json'), JSON.stringify({
|
|
4554
4652
|
active: true,
|
|
@@ -4599,12 +4697,17 @@ PY`],
|
|
|
4599
4697
|
tool_input: { command: 'omx ralplan role-intent write --role architect --parent-thread "$CODEX_THREAD_ID" --json' },
|
|
4600
4698
|
}),
|
|
4601
4699
|
});
|
|
4602
|
-
|
|
4603
|
-
|
|
4604
|
-
|
|
4605
|
-
|
|
4700
|
+
// #3497: the documented-leader PreToolUse hard gate is deleted; the hook
|
|
4701
|
+
// must not hard-deny or emit the unsupported-proof reason. The CLI-level
|
|
4702
|
+
// fail-closed contract below still guards the actual authority boundary.
|
|
4703
|
+
assertNativeHookAdvisoryPreToolUse(
|
|
4704
|
+
'PreToolUse installed #3212 role-intent',
|
|
4705
|
+
parseNativeHookSmokeOutput('PreToolUse installed #3212 role-intent', String(preToolUseResult.stdout || '')),
|
|
4706
|
+
);
|
|
4606
4707
|
const authorityStateRoot = join(roleIntentCwd, '.omx', 'state');
|
|
4607
|
-
if (
|
|
4708
|
+
if (listPersistedStateFiles(authorityStateRoot).length > 0) {
|
|
4709
|
+
throw new Error('installed #3212 PreToolUse persisted authority-sensitive state');
|
|
4710
|
+
}
|
|
4608
4711
|
|
|
4609
4712
|
const roleIntentCliResult = spawnSync(process.execPath, [realpathSync(join(packageRoot, 'dist', 'cli', 'omx.js')), 'ralplan', 'role-intent', 'write', '--role', 'architect', '--parent-thread', roleIntentNativeSessionId, '--json'], {
|
|
4610
4713
|
cwd: roleIntentCwd,
|
|
@@ -4616,7 +4719,9 @@ PY`],
|
|
|
4616
4719
|
if (String(roleIntentCliResult.stdout || '') !== '{"ok":false,"reason":"unsupported_documented_leader_proof"}\n') {
|
|
4617
4720
|
throw new Error('installed #3212 role-intent CLI returned an unexpected fail-closed denial');
|
|
4618
4721
|
}
|
|
4619
|
-
if (
|
|
4722
|
+
if (listPersistedStateFiles(authorityStateRoot).length > 0) {
|
|
4723
|
+
throw new Error('installed #3212 role-intent CLI persisted authority-sensitive state');
|
|
4724
|
+
}
|
|
4620
4725
|
|
|
4621
4726
|
for (const [caseIndex, testCase] of PACKED_INSTALL_NATIVE_HOOK_REGRESSION_PROMPTS.entries()) {
|
|
4622
4727
|
const caseCwd = join(smokeCwd, testCase.name);
|