oh-my-codex 0.20.1 → 0.20.3
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 +7 -6
- package/Cargo.toml +1 -1
- package/README.md +36 -1
- package/crates/omx-runtime/Cargo.toml +1 -0
- package/crates/omx-runtime/src/main.rs +25 -2
- package/crates/omx-runtime/tests/execution.rs +219 -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__/hermes.test.js.map +1 -1
- package/dist/adapt/contracts.d.ts.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.d.ts +2 -0
- package/dist/auth/__tests__/hotswap.test.d.ts.map +1 -0
- package/dist/auth/__tests__/hotswap.test.js +183 -0
- package/dist/auth/__tests__/hotswap.test.js.map +1 -0
- package/dist/auth/hotswap.d.ts +6 -0
- package/dist/auth/hotswap.d.ts.map +1 -1
- package/dist/auth/hotswap.js +102 -19
- package/dist/auth/hotswap.js.map +1 -1
- package/dist/auth/paths.js.map +1 -1
- package/dist/auth/storage.js.map +1 -1
- package/dist/autopilot/__tests__/ralplan-gate.test.js +5 -5
- package/dist/autopilot/__tests__/ralplan-gate.test.js.map +1 -1
- package/dist/autopilot/completion-gate.js.map +1 -1
- package/dist/autopilot/fsm.d.ts +1 -1
- package/dist/autopilot/fsm.d.ts.map +1 -1
- package/dist/autoresearch/goal.js.map +1 -1
- package/dist/autoresearch/runtime.js.map +1 -1
- package/dist/capabilities/lockfile.js.map +1 -1
- package/dist/catalog/reader.js.map +1 -1
- package/dist/catalog/skill-mirror.js.map +1 -1
- package/dist/cli/__tests__/adapt-help.test.js.map +1 -1
- package/dist/cli/__tests__/agents-init.test.js.map +1 -1
- package/dist/cli/__tests__/agents.test.js.map +1 -1
- package/dist/cli/__tests__/api.test.js.map +1 -1
- package/dist/cli/__tests__/ask.test.js.map +1 -1
- package/dist/cli/__tests__/auth.test.js +60 -6
- package/dist/cli/__tests__/auth.test.js.map +1 -1
- package/dist/cli/__tests__/autoresearch-guided.test.js.map +1 -1
- package/dist/cli/__tests__/autoresearch.test.js.map +1 -1
- package/dist/cli/__tests__/capabilities.test.js.map +1 -1
- package/dist/cli/__tests__/codex-plugin-layout.test.js +80 -0
- package/dist/cli/__tests__/codex-plugin-layout.test.js.map +1 -1
- package/dist/cli/__tests__/doctor-context-window-warning.test.js.map +1 -1
- package/dist/cli/__tests__/doctor-invalid-config.test.js +47 -4
- package/dist/cli/__tests__/doctor-invalid-config.test.js.map +1 -1
- package/dist/cli/__tests__/doctor-team.test.js.map +1 -1
- package/dist/cli/__tests__/doctor-warning-copy.test.js +752 -15
- package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
- package/dist/cli/__tests__/exec.test.js +136 -0
- package/dist/cli/__tests__/exec.test.js.map +1 -1
- package/dist/cli/__tests__/imagegen-continuation.test.js.map +1 -1
- package/dist/cli/__tests__/index.test.js +473 -14
- package/dist/cli/__tests__/index.test.js.map +1 -1
- package/dist/cli/__tests__/launch-fallback.test.js +336 -4
- package/dist/cli/__tests__/launch-fallback.test.js.map +1 -1
- package/dist/cli/__tests__/mcp-parity.test.js +87 -12
- package/dist/cli/__tests__/mcp-parity.test.js.map +1 -1
- package/dist/cli/__tests__/native-hook-claim-journal.test.d.ts +2 -0
- package/dist/cli/__tests__/native-hook-claim-journal.test.d.ts.map +1 -0
- package/dist/cli/__tests__/native-hook-claim-journal.test.js +206 -0
- package/dist/cli/__tests__/native-hook-claim-journal.test.js.map +1 -0
- package/dist/cli/__tests__/nested-help-routing.test.js.map +1 -1
- package/dist/cli/__tests__/question.test.js.map +1 -1
- package/dist/cli/__tests__/ralph-deslop-contract.test.js.map +1 -1
- package/dist/cli/__tests__/ralph-goal-mode-contract.test.js +6 -0
- package/dist/cli/__tests__/ralph-goal-mode-contract.test.js.map +1 -1
- package/dist/cli/__tests__/ralph-prd-deep-interview.test.js.map +1 -1
- package/dist/cli/__tests__/ralph-prd-smoke.test.js.map +1 -1
- package/dist/cli/__tests__/ralph.test.js +8 -3
- package/dist/cli/__tests__/ralph.test.js.map +1 -1
- package/dist/cli/__tests__/ralplan-bootstrap-3181.test.d.ts +2 -0
- package/dist/cli/__tests__/ralplan-bootstrap-3181.test.d.ts.map +1 -0
- package/dist/cli/__tests__/ralplan-bootstrap-3181.test.js +72 -0
- package/dist/cli/__tests__/ralplan-bootstrap-3181.test.js.map +1 -0
- package/dist/cli/__tests__/ralplan.test.d.ts +2 -0
- package/dist/cli/__tests__/ralplan.test.d.ts.map +1 -0
- package/dist/cli/__tests__/ralplan.test.js +55 -0
- package/dist/cli/__tests__/ralplan.test.js.map +1 -0
- package/dist/cli/__tests__/resume.test.js +17 -11
- package/dist/cli/__tests__/resume.test.js.map +1 -1
- package/dist/cli/__tests__/session-scoped-runtime.test.js +25 -0
- 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__/session-search.test.js.map +1 -1
- package/dist/cli/__tests__/setup-agents-overwrite.test.js +79 -0
- package/dist/cli/__tests__/setup-agents-overwrite.test.js.map +1 -1
- package/dist/cli/__tests__/setup-gh-star.test.js.map +1 -1
- package/dist/cli/__tests__/setup-hooks-shared-ownership.test.js +77 -3
- package/dist/cli/__tests__/setup-hooks-shared-ownership.test.js.map +1 -1
- package/dist/cli/__tests__/setup-hooks-trust-e2e.test.d.ts +2 -0
- package/dist/cli/__tests__/setup-hooks-trust-e2e.test.d.ts.map +1 -0
- package/dist/cli/__tests__/setup-hooks-trust-e2e.test.js +285 -0
- package/dist/cli/__tests__/setup-hooks-trust-e2e.test.js.map +1 -0
- package/dist/cli/__tests__/setup-install-mode.test.js +2579 -294
- package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -1
- package/dist/cli/__tests__/setup-preferences.test.d.ts +2 -0
- package/dist/cli/__tests__/setup-preferences.test.d.ts.map +1 -0
- package/dist/cli/__tests__/setup-preferences.test.js +79 -0
- package/dist/cli/__tests__/setup-preferences.test.js.map +1 -0
- package/dist/cli/__tests__/setup-refresh.test.js +33 -2
- package/dist/cli/__tests__/setup-refresh.test.js.map +1 -1
- package/dist/cli/__tests__/setup-scope.test.js +46 -3
- package/dist/cli/__tests__/setup-scope.test.js.map +1 -1
- package/dist/cli/__tests__/sparkshell-cli.test.js.map +1 -1
- package/dist/cli/__tests__/state.test.js +37 -0
- package/dist/cli/__tests__/state.test.js.map +1 -1
- package/dist/cli/__tests__/team.test.js +105 -7
- package/dist/cli/__tests__/team.test.js.map +1 -1
- package/dist/cli/__tests__/ultragoal.test.js +61 -1
- package/dist/cli/__tests__/ultragoal.test.js.map +1 -1
- package/dist/cli/__tests__/uninstall.test.js +1817 -24
- package/dist/cli/__tests__/uninstall.test.js.map +1 -1
- package/dist/cli/__tests__/update.test.js +58 -0
- package/dist/cli/__tests__/update.test.js.map +1 -1
- package/dist/cli/__tests__/url.test.js.map +1 -1
- package/dist/cli/__tests__/windows-popup-loop-contract.test.js +2 -1
- package/dist/cli/__tests__/windows-popup-loop-contract.test.js.map +1 -1
- package/dist/cli/adapt.js.map +1 -1
- package/dist/cli/agents-init.js.map +1 -1
- package/dist/cli/agents.js.map +1 -1
- package/dist/cli/api.js.map +1 -1
- package/dist/cli/ask.d.ts +1 -1
- package/dist/cli/ask.d.ts.map +1 -1
- package/dist/cli/ask.js.map +1 -1
- package/dist/cli/auth.js.map +1 -1
- package/dist/cli/autoresearch-guided.js.map +1 -1
- package/dist/cli/autoresearch-intake.js.map +1 -1
- package/dist/cli/capabilities.js.map +1 -1
- package/dist/cli/cleanup.js.map +1 -1
- package/dist/cli/codex-feature-probe.js.map +1 -1
- package/dist/cli/codex-home.js.map +1 -1
- package/dist/cli/doctor.d.ts +21 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +607 -130
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/explore.js.map +1 -1
- package/dist/cli/index.d.ts +14 -3
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +245 -57
- 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/mcp-serve.js.map +1 -1
- package/dist/cli/mission.js.map +1 -1
- package/dist/cli/native-assets.js.map +1 -1
- package/dist/cli/native-hook-claim-journal.d.ts +29 -0
- package/dist/cli/native-hook-claim-journal.d.ts.map +1 -0
- package/dist/cli/native-hook-claim-journal.js +252 -0
- package/dist/cli/native-hook-claim-journal.js.map +1 -0
- package/dist/cli/omx.js.map +1 -1
- package/dist/cli/plugin-marketplace.js.map +1 -1
- package/dist/cli/project-runtime-codex-homes.js.map +1 -1
- package/dist/cli/question.js.map +1 -1
- package/dist/cli/ralph.d.ts.map +1 -1
- package/dist/cli/ralph.js +3 -2
- package/dist/cli/ralph.js.map +1 -1
- package/dist/cli/ralplan.d.ts +10 -0
- package/dist/cli/ralplan.d.ts.map +1 -0
- package/dist/cli/ralplan.js +110 -0
- package/dist/cli/ralplan.js.map +1 -0
- 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 +11 -0
- package/dist/cli/setup-preferences.d.ts.map +1 -1
- package/dist/cli/setup-preferences.js +32 -0
- package/dist/cli/setup-preferences.js.map +1 -1
- package/dist/cli/setup.d.ts +58 -0
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +1450 -398
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/sparkshell.js.map +1 -1
- package/dist/cli/star-prompt.js.map +1 -1
- package/dist/cli/state.d.ts.map +1 -1
- package/dist/cli/state.js +2 -1
- package/dist/cli/state.js.map +1 -1
- package/dist/cli/team.js.map +1 -1
- package/dist/cli/ultragoal.d.ts +5 -1
- package/dist/cli/ultragoal.d.ts.map +1 -1
- package/dist/cli/ultragoal.js +34 -2
- package/dist/cli/ultragoal.js.map +1 -1
- package/dist/cli/uninstall.d.ts +17 -0
- package/dist/cli/uninstall.d.ts.map +1 -1
- package/dist/cli/uninstall.js +986 -95
- package/dist/cli/uninstall.js.map +1 -1
- package/dist/cli/update.d.ts.map +1 -1
- package/dist/cli/update.js +8 -1
- package/dist/cli/update.js.map +1 -1
- package/dist/cli/url.js.map +1 -1
- package/dist/compat/__tests__/doctor-contract.test.js +5 -1
- package/dist/compat/__tests__/doctor-contract.test.js.map +1 -1
- package/dist/compat/__tests__/rust-runtime-compat.test.js +1 -1
- package/dist/compat/__tests__/rust-runtime-compat.test.js.map +1 -1
- package/dist/config/__tests__/codex-hooks.test.js +1287 -11
- package/dist/config/__tests__/codex-hooks.test.js.map +1 -1
- package/dist/config/__tests__/generator-idempotent.test.js +1179 -32
- package/dist/config/__tests__/generator-idempotent.test.js.map +1 -1
- package/dist/config/__tests__/generator-notify.test.js +6 -1
- 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/codex-feature-flags.d.ts.map +1 -1
- package/dist/config/codex-feature-flags.js.map +1 -1
- package/dist/config/codex-hooks.d.ts +124 -1
- package/dist/config/codex-hooks.d.ts.map +1 -1
- package/dist/config/codex-hooks.js +2142 -265
- package/dist/config/codex-hooks.js.map +1 -1
- package/dist/config/commit-lore-guard.js.map +1 -1
- package/dist/config/generator.d.ts +23 -34
- package/dist/config/generator.d.ts.map +1 -1
- package/dist/config/generator.js +1480 -246
- package/dist/config/generator.js.map +1 -1
- package/dist/config/mcp-registry.js.map +1 -1
- package/dist/config/models.d.ts +14 -4
- 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/config/omx-first-party-mcp.js.map +1 -1
- package/dist/config/team-mode.d.ts.map +1 -1
- package/dist/document-refresh/__tests__/enforcer.test.js.map +1 -1
- package/dist/document-refresh/enforcer.js.map +1 -1
- package/dist/exec/followup.js.map +1 -1
- package/dist/goal-workflows/artifacts.js.map +1 -1
- package/dist/hooks/__tests__/agents-overlay.test.js +7 -4
- package/dist/hooks/__tests__/agents-overlay.test.js.map +1 -1
- package/dist/hooks/__tests__/analyze-routing-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/analyze-skill-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/anti-slop-workflow.test.js.map +1 -1
- package/dist/hooks/__tests__/autopilot-skill-contract.test.js +9 -3
- package/dist/hooks/__tests__/autopilot-skill-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/code-review-skill-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/consensus-execution-handoff.test.js.map +1 -1
- package/dist/hooks/__tests__/deep-interview-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/design-skill.test.js.map +1 -1
- package/dist/hooks/__tests__/keyword-detector.test.js +1376 -6
- package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js +252 -543
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js +38 -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 +765 -10
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-cross-worktree-heartbeat.test.js +2 -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 +142 -1
- package/dist/hooks/__tests__/notify-hook-managed-tmux.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-modules.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-non-omx-guard.test.js +48 -2
- package/dist/hooks/__tests__/notify-hook-non-omx-guard.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-ralph-resume.test.js +61 -44
- package/dist/hooks/__tests__/notify-hook-ralph-resume.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-regression-205.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-session-idle-dedupe.test.js +3 -2
- package/dist/hooks/__tests__/notify-hook-session-idle-dedupe.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-session-scope.test.js +243 -4
- package/dist/hooks/__tests__/notify-hook-session-scope.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js +531 -12
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js +163 -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-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-visual-verdict.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js +43 -4
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js.map +1 -1
- package/dist/hooks/__tests__/openclaw-setup-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/pre-context-gate-skills.test.js.map +1 -1
- package/dist/hooks/__tests__/prometheus-strict-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/prompt-guidance-fragments.test.js.map +1 -1
- package/dist/hooks/__tests__/prompt-guidance-test-helpers.js.map +1 -1
- package/dist/hooks/__tests__/prompt-session-provenance.test.d.ts +2 -0
- package/dist/hooks/__tests__/prompt-session-provenance.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/prompt-session-provenance.test.js +82 -0
- package/dist/hooks/__tests__/prompt-session-provenance.test.js.map +1 -0
- package/dist/hooks/__tests__/session.test.js +878 -11
- package/dist/hooks/__tests__/session.test.js.map +1 -1
- package/dist/hooks/__tests__/skill-catalog-hygiene.test.js.map +1 -1
- package/dist/hooks/__tests__/team-runtime-gating-docs-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/visual-ralph-skill.test.js.map +1 -1
- package/dist/hooks/__tests__/visual-verdict-loop.test.js.map +1 -1
- package/dist/hooks/agents-overlay.js +5 -5
- package/dist/hooks/agents-overlay.js.map +1 -1
- package/dist/hooks/code-simplifier/index.js.map +1 -1
- package/dist/hooks/explore-routing.js.map +1 -1
- package/dist/hooks/extensibility/dispatcher.js.map +1 -1
- package/dist/hooks/extensibility/events.js.map +1 -1
- package/dist/hooks/extensibility/loader.js.map +1 -1
- package/dist/hooks/extensibility/plugin-runner-stdin.js.map +1 -1
- package/dist/hooks/extensibility/sdk/logging.js.map +1 -1
- package/dist/hooks/keyword-detector.d.ts +33 -7
- package/dist/hooks/keyword-detector.d.ts.map +1 -1
- package/dist/hooks/keyword-detector.js +2228 -119
- package/dist/hooks/keyword-detector.js.map +1 -1
- package/dist/hooks/keyword-registry.d.ts +12 -0
- package/dist/hooks/keyword-registry.d.ts.map +1 -1
- package/dist/hooks/keyword-registry.js +41 -0
- package/dist/hooks/keyword-registry.js.map +1 -1
- package/dist/hooks/prompt-session-provenance.d.ts +87 -0
- package/dist/hooks/prompt-session-provenance.d.ts.map +1 -0
- package/dist/hooks/prompt-session-provenance.js +180 -0
- package/dist/hooks/prompt-session-provenance.js.map +1 -0
- package/dist/hooks/session.d.ts +163 -34
- package/dist/hooks/session.d.ts.map +1 -1
- package/dist/hooks/session.js +1395 -317
- package/dist/hooks/session.js.map +1 -1
- package/dist/hooks/task-size-detector.js.map +1 -1
- package/dist/hud/__tests__/state.test.js.map +1 -1
- package/dist/hud/authority.js.map +1 -1
- package/dist/hud/constants.js.map +1 -1
- package/dist/hud/index.js.map +1 -1
- package/dist/hud/reconcile.js.map +1 -1
- package/dist/hud/render.js.map +1 -1
- package/dist/hud/state.js.map +1 -1
- package/dist/hud/tmux.js.map +1 -1
- package/dist/leader/__tests__/contract.test.js +153 -1
- package/dist/leader/__tests__/contract.test.js.map +1 -1
- package/dist/leader/contract.d.ts +42 -5
- package/dist/leader/contract.d.ts.map +1 -1
- package/dist/leader/contract.js +184 -3
- package/dist/leader/contract.js.map +1 -1
- package/dist/mcp/__tests__/bootstrap.test.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__/server-lifecycle.test.js +15 -2
- package/dist/mcp/__tests__/server-lifecycle.test.js.map +1 -1
- package/dist/mcp/__tests__/state-paths.test.js +98 -1
- package/dist/mcp/__tests__/state-paths.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/bootstrap.js.map +1 -1
- package/dist/mcp/code-intel-server.d.ts +58 -58
- 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.js.map +1 -1
- package/dist/mcp/hermes-server.d.ts +70 -70
- package/dist/mcp/hermes-server.d.ts.map +1 -1
- package/dist/mcp/lifecycle-telemetry.js.map +1 -1
- package/dist/mcp/memory-server.d.ts +34 -34
- package/dist/mcp/memory-server.d.ts.map +1 -1
- package/dist/mcp/memory-server.js.map +1 -1
- package/dist/mcp/state-paths.d.ts +14 -0
- package/dist/mcp/state-paths.d.ts.map +1 -1
- package/dist/mcp/state-paths.js +96 -20
- package/dist/mcp/state-paths.js.map +1 -1
- package/dist/mcp/state-server.d.ts +47 -47
- package/dist/mcp/state-server.d.ts.map +1 -1
- package/dist/mcp/trace-server.d.ts +4 -4
- package/dist/mcp/trace-server.d.ts.map +1 -1
- package/dist/mcp/trace-server.js.map +1 -1
- package/dist/mcp/wiki-server.d.ts +34 -23
- 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-session-scope.test.js +53 -1
- 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.map +1 -1
- package/dist/modes/base.js +5 -5
- package/dist/modes/base.js.map +1 -1
- package/dist/notifications/__tests__/lifecycle-dedupe.test.js.map +1 -1
- package/dist/notifications/__tests__/reply-listener.test.js.map +1 -1
- package/dist/notifications/__tests__/session-idle-tail-dedupe.test.js +177 -85
- package/dist/notifications/__tests__/session-idle-tail-dedupe.test.js.map +1 -1
- package/dist/notifications/__tests__/session-registry.test.js.map +1 -1
- package/dist/notifications/__tests__/template-engine.test.js.map +1 -1
- package/dist/notifications/__tests__/verbosity.test.js.map +1 -1
- package/dist/notifications/http-client.js.map +1 -1
- package/dist/notifications/index.d.ts +4 -1
- package/dist/notifications/index.d.ts.map +1 -1
- package/dist/notifications/index.js +3 -9
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/lifecycle-dedupe.js.map +1 -1
- package/dist/notifications/reply-listener.d.ts.map +1 -1
- package/dist/notifications/reply-listener.js.map +1 -1
- package/dist/notifications/session-registry.js.map +1 -1
- package/dist/notifications/session-status.js.map +1 -1
- 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/notifications/tmux-detector.js.map +1 -1
- package/dist/notifications/tmux.js.map +1 -1
- package/dist/openclaw/config.js.map +1 -1
- package/dist/openclaw/dispatcher.js.map +1 -1
- package/dist/pipeline/__tests__/orchestrator.test.js +4 -4
- package/dist/pipeline/__tests__/orchestrator.test.js.map +1 -1
- package/dist/pipeline/__tests__/stages.test.js +16 -13
- package/dist/pipeline/__tests__/stages.test.js.map +1 -1
- package/dist/pipeline/stages/code-review.js.map +1 -1
- package/dist/pipeline/stages/ralph-verify.js.map +1 -1
- package/dist/pipeline/stages/ralplan.js.map +1 -1
- package/dist/pipeline/stages/team-exec.js.map +1 -1
- package/dist/pipeline/stages/ultragoal.js.map +1 -1
- package/dist/pipeline/stages/ultraqa.js.map +1 -1
- package/dist/planning/__tests__/approved-execution-lifecycle-matrix.test.js.map +1 -1
- package/dist/planning/artifact-names.js.map +1 -1
- package/dist/planning/artifacts.js.map +1 -1
- package/dist/question/__tests__/state.test.js.map +1 -1
- package/dist/question/__tests__/ui.test.js.map +1 -1
- package/dist/question/autopilot-wait.js.map +1 -1
- package/dist/question/client.d.ts.map +1 -1
- package/dist/question/client.js.map +1 -1
- package/dist/question/deep-interview.js.map +1 -1
- package/dist/question/events.js.map +1 -1
- package/dist/question/renderer.js.map +1 -1
- package/dist/question/state.d.ts.map +1 -1
- package/dist/question/state.js.map +1 -1
- package/dist/question/ui.js.map +1 -1
- package/dist/ralph/contract.d.ts +1 -1
- package/dist/ralph/contract.d.ts.map +1 -1
- package/dist/ralplan/__tests__/consensus-gate.test.js +527 -8
- 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 +46 -0
- package/dist/ralplan/__tests__/documented-leader-preflight.test.js.map +1 -0
- package/dist/ralplan/__tests__/runtime.test.js +116 -14
- package/dist/ralplan/__tests__/runtime.test.js.map +1 -1
- package/dist/ralplan/consensus-gate.d.ts +3 -3
- package/dist/ralplan/consensus-gate.d.ts.map +1 -1
- package/dist/ralplan/consensus-gate.js +173 -70
- package/dist/ralplan/consensus-gate.js.map +1 -1
- package/dist/ralplan/documented-leader-preflight.d.ts +34 -0
- package/dist/ralplan/documented-leader-preflight.d.ts.map +1 -0
- package/dist/ralplan/documented-leader-preflight.js +58 -0
- package/dist/ralplan/documented-leader-preflight.js.map +1 -0
- package/dist/ralplan/runtime.d.ts +3 -2
- package/dist/ralplan/runtime.d.ts.map +1 -1
- package/dist/ralplan/runtime.js +12 -9
- 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/process-tree.js.map +1 -1
- package/dist/runtime/run-loop.js.map +1 -1
- package/dist/runtime/run-outcome.d.ts +3 -3
- package/dist/runtime/run-outcome.d.ts.map +1 -1
- package/dist/runtime/run-outcome.js.map +1 -1
- package/dist/runtime/run-state.js.map +1 -1
- package/dist/scripts/__tests__/codex-native-hook.test.js +6657 -995
- package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
- package/dist/scripts/__tests__/fixtures/issue-3138-installed-smoke.d.ts +2 -0
- package/dist/scripts/__tests__/fixtures/issue-3138-installed-smoke.d.ts.map +1 -0
- package/dist/scripts/__tests__/fixtures/issue-3138-installed-smoke.js +634 -0
- package/dist/scripts/__tests__/fixtures/issue-3138-installed-smoke.js.map +1 -0
- package/dist/scripts/__tests__/generate-release-body.test.js.map +1 -1
- package/dist/scripts/__tests__/hook-derived-watcher.test.js.map +1 -1
- package/dist/scripts/__tests__/notify-dispatcher.test.js.map +1 -1
- package/dist/scripts/__tests__/notify-fallback-delivery.test.d.ts +2 -0
- package/dist/scripts/__tests__/notify-fallback-delivery.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/notify-fallback-delivery.test.js +174 -0
- package/dist/scripts/__tests__/notify-fallback-delivery.test.js.map +1 -0
- package/dist/scripts/__tests__/notify-state-io.test.js +57 -1
- package/dist/scripts/__tests__/notify-state-io.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.d.ts +2 -0
- package/dist/scripts/__tests__/role-intent-bootstrap-e2e-3181.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/role-intent-bootstrap-e2e-3181.test.js +78 -0
- package/dist/scripts/__tests__/role-intent-bootstrap-e2e-3181.test.js.map +1 -0
- package/dist/scripts/__tests__/role-intent-durable-recovery-3181.test.d.ts +2 -0
- package/dist/scripts/__tests__/role-intent-durable-recovery-3181.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/role-intent-durable-recovery-3181.test.js +55 -0
- package/dist/scripts/__tests__/role-intent-durable-recovery-3181.test.js.map +1 -0
- package/dist/scripts/__tests__/run-test-files.test.js.map +1 -1
- package/dist/scripts/__tests__/smoke-packed-install.test.js +1100 -4
- package/dist/scripts/__tests__/smoke-packed-install.test.js.map +1 -1
- package/dist/scripts/__tests__/test-reply-listener-live.test.js.map +1 -1
- package/dist/scripts/build-api.js.map +1 -1
- package/dist/scripts/build-explore-harness.js.map +1 -1
- package/dist/scripts/build-sparkshell.js.map +1 -1
- package/dist/scripts/cleanup-explore-harness.js.map +1 -1
- package/dist/scripts/codex-execution-surface.js.map +1 -1
- package/dist/scripts/codex-native-hook.d.ts +4 -1
- package/dist/scripts/codex-native-hook.d.ts.map +1 -1
- package/dist/scripts/codex-native-hook.js +11577 -1184
- package/dist/scripts/codex-native-hook.js.map +1 -1
- package/dist/scripts/generate-native-release-manifest.js.map +1 -1
- package/dist/scripts/generate-release-body.js.map +1 -1
- package/dist/scripts/hook-payload-guard.d.ts.map +1 -1
- package/dist/scripts/hook-payload-guard.js.map +1 -1
- package/dist/scripts/notify-fallback-delivery.d.ts +48 -0
- package/dist/scripts/notify-fallback-delivery.d.ts.map +1 -0
- package/dist/scripts/notify-fallback-delivery.js +419 -0
- package/dist/scripts/notify-fallback-delivery.js.map +1 -0
- package/dist/scripts/notify-fallback-watcher.js +218 -138
- package/dist/scripts/notify-fallback-watcher.js.map +1 -1
- package/dist/scripts/notify-hook/auto-nudge.d.ts +18 -9
- package/dist/scripts/notify-hook/auto-nudge.d.ts.map +1 -1
- package/dist/scripts/notify-hook/auto-nudge.js +112 -15
- package/dist/scripts/notify-hook/auto-nudge.js.map +1 -1
- package/dist/scripts/notify-hook/managed-tmux.d.ts +23 -0
- package/dist/scripts/notify-hook/managed-tmux.d.ts.map +1 -1
- package/dist/scripts/notify-hook/managed-tmux.js +122 -12
- package/dist/scripts/notify-hook/managed-tmux.js.map +1 -1
- package/dist/scripts/notify-hook/orchestration-intent.d.ts +7 -7
- package/dist/scripts/notify-hook/orchestration-intent.d.ts.map +1 -1
- package/dist/scripts/notify-hook/ralph-session-resume.d.ts +5 -2
- package/dist/scripts/notify-hook/ralph-session-resume.d.ts.map +1 -1
- package/dist/scripts/notify-hook/ralph-session-resume.js +33 -37
- package/dist/scripts/notify-hook/ralph-session-resume.js.map +1 -1
- package/dist/scripts/notify-hook/state-io.d.ts +17 -0
- package/dist/scripts/notify-hook/state-io.d.ts.map +1 -1
- package/dist/scripts/notify-hook/state-io.js +73 -11
- package/dist/scripts/notify-hook/state-io.js.map +1 -1
- package/dist/scripts/notify-hook/team-dispatch.d.ts +10 -1
- 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 +2 -2
- package/dist/scripts/notify-hook/team-leader-nudge.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-leader-nudge.js +39 -13
- package/dist/scripts/notify-hook/team-leader-nudge.js.map +1 -1
- package/dist/scripts/notify-hook/team-tmux-guard.d.ts +16 -8
- 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-posttooluse.js.map +1 -1
- package/dist/scripts/notify-hook/team-worker-stop.d.ts +1 -1
- package/dist/scripts/notify-hook/team-worker-stop.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-worker-stop.js +19 -18
- package/dist/scripts/notify-hook/team-worker-stop.js.map +1 -1
- package/dist/scripts/notify-hook/team-worker.d.ts +5 -2
- package/dist/scripts/notify-hook/team-worker.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-worker.js +37 -28
- package/dist/scripts/notify-hook/team-worker.js.map +1 -1
- package/dist/scripts/notify-hook/tmux-injection.d.ts +8 -1
- package/dist/scripts/notify-hook/tmux-injection.d.ts.map +1 -1
- package/dist/scripts/notify-hook/tmux-injection.js +53 -18
- package/dist/scripts/notify-hook/tmux-injection.js.map +1 -1
- package/dist/scripts/notify-hook/visual-verdict.d.ts +1 -1
- package/dist/scripts/notify-hook/visual-verdict.d.ts.map +1 -1
- package/dist/scripts/notify-hook/visual-verdict.js +15 -13
- package/dist/scripts/notify-hook/visual-verdict.js.map +1 -1
- package/dist/scripts/notify-hook.d.ts +24 -1
- package/dist/scripts/notify-hook.d.ts.map +1 -1
- package/dist/scripts/notify-hook.js +267 -90
- package/dist/scripts/notify-hook.js.map +1 -1
- package/dist/scripts/postinstall.js.map +1 -1
- package/dist/scripts/prompt-inventory.js.map +1 -1
- package/dist/scripts/smoke-packed-install.d.ts +927 -5
- package/dist/scripts/smoke-packed-install.d.ts.map +1 -1
- package/dist/scripts/smoke-packed-install.js +4317 -13
- package/dist/scripts/smoke-packed-install.js.map +1 -1
- package/dist/scripts/sync-plugin-mirror.js.map +1 -1
- package/dist/scripts/test-reply-listener-live.js.map +1 -1
- package/dist/scripts/test-sparkshell.js.map +1 -1
- package/dist/scripts/verify-native-agents.js.map +1 -1
- package/dist/session-history/friction.js.map +1 -1
- package/dist/session-history/search.js.map +1 -1
- package/dist/sidecar/__tests__/boundary.test.js.map +1 -1
- package/dist/sidecar/collector.js.map +1 -1
- package/dist/sidecar/index.js.map +1 -1
- package/dist/sidecar/render.js.map +1 -1
- package/dist/sidecar/tmux.js.map +1 -1
- package/dist/state/__tests__/mode-state-context.test.js +54 -0
- package/dist/state/__tests__/mode-state-context.test.js.map +1 -1
- package/dist/state/__tests__/operations.test.js +66 -15
- package/dist/state/__tests__/operations.test.js.map +1 -1
- package/dist/state/__tests__/skill-active.test.js +19 -1
- package/dist/state/__tests__/skill-active.test.js.map +1 -1
- package/dist/state/__tests__/workflow-transition.test.js +61 -0
- package/dist/state/__tests__/workflow-transition.test.js.map +1 -1
- package/dist/state/mode-state-context.d.ts +5 -0
- package/dist/state/mode-state-context.d.ts.map +1 -1
- package/dist/state/mode-state-context.js +59 -0
- package/dist/state/mode-state-context.js.map +1 -1
- package/dist/state/operations.d.ts +1 -1
- package/dist/state/operations.d.ts.map +1 -1
- package/dist/state/operations.js +49 -55
- package/dist/state/operations.js.map +1 -1
- package/dist/state/paths.d.ts +1 -1
- package/dist/state/paths.d.ts.map +1 -1
- package/dist/state/paths.js +1 -1
- package/dist/state/paths.js.map +1 -1
- package/dist/state/skill-active.d.ts +13 -1
- package/dist/state/skill-active.d.ts.map +1 -1
- package/dist/state/skill-active.js +43 -4
- package/dist/state/skill-active.js.map +1 -1
- package/dist/state/terminal-normalization.js.map +1 -1
- package/dist/state/workflow-transition-reconcile.d.ts.map +1 -1
- package/dist/state/workflow-transition-reconcile.js +20 -4
- package/dist/state/workflow-transition-reconcile.js.map +1 -1
- package/dist/state/workflow-transition.d.ts +1 -1
- package/dist/state/workflow-transition.d.ts.map +1 -1
- package/dist/state/workflow-transition.js.map +1 -1
- package/dist/subagents/__tests__/leader-bootstrap-3181.test.d.ts +2 -0
- package/dist/subagents/__tests__/leader-bootstrap-3181.test.d.ts.map +1 -0
- package/dist/subagents/__tests__/leader-bootstrap-3181.test.js +52 -0
- package/dist/subagents/__tests__/leader-bootstrap-3181.test.js.map +1 -0
- package/dist/subagents/__tests__/tracker.test.js +1550 -10
- package/dist/subagents/__tests__/tracker.test.js.map +1 -1
- package/dist/subagents/role-routing-marker.d.ts +10 -0
- package/dist/subagents/role-routing-marker.d.ts.map +1 -0
- package/dist/subagents/role-routing-marker.js +136 -0
- package/dist/subagents/role-routing-marker.js.map +1 -0
- package/dist/subagents/tracker.d.ts +91 -0
- package/dist/subagents/tracker.d.ts.map +1 -1
- package/dist/subagents/tracker.js +806 -62
- 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__/approved-execution.test.js.map +1 -1
- package/dist/team/__tests__/delivery-e2e-smoke.test.js +52 -10
- 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 +93 -27
- package/dist/team/__tests__/mcp-comm.test.js.map +1 -1
- package/dist/team/__tests__/model-contract.test.js +341 -4
- package/dist/team/__tests__/model-contract.test.js.map +1 -1
- package/dist/team/__tests__/role-router.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 +3624 -355
- package/dist/team/__tests__/runtime.test.js.map +1 -1
- package/dist/team/__tests__/scaling.test.js +2516 -118
- package/dist/team/__tests__/scaling.test.js.map +1 -1
- 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 +3664 -969
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/__tests__/tmux-test-fixture.js.map +1 -1
- package/dist/team/__tests__/worker-runtime-identity.test.js +38 -2
- 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 +2 -2
- 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/commit-hygiene.js.map +1 -1
- package/dist/team/contracts.d.ts +5 -5
- package/dist/team/contracts.d.ts.map +1 -1
- package/dist/team/delivery-log.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/followup-planner.js.map +1 -1
- package/dist/team/goal-workflow.js.map +1 -1
- 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 +18 -2
- package/dist/team/model-contract.d.ts.map +1 -1
- package/dist/team/model-contract.js +314 -35
- package/dist/team/model-contract.js.map +1 -1
- package/dist/team/orchestrator.js.map +1 -1
- package/dist/team/pane-status.js.map +1 -1
- package/dist/team/phase-controller.js.map +1 -1
- package/dist/team/reminder-intents.d.ts +1 -1
- package/dist/team/reminder-intents.d.ts.map +1 -1
- package/dist/team/reminder-intents.js.map +1 -1
- package/dist/team/runtime-cli.js.map +1 -1
- package/dist/team/runtime.d.ts +1 -0
- package/dist/team/runtime.d.ts.map +1 -1
- package/dist/team/runtime.js +1326 -231
- package/dist/team/runtime.js.map +1 -1
- package/dist/team/scaling.d.ts +22 -8
- package/dist/team/scaling.d.ts.map +1 -1
- package/dist/team/scaling.js +1463 -376
- package/dist/team/scaling.js.map +1 -1
- package/dist/team/state/dispatch-lock.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/events.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/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-root.js.map +1 -1
- package/dist/team/state.d.ts +67 -1
- package/dist/team/state.d.ts.map +1 -1
- package/dist/team/state.js +636 -129
- package/dist/team/state.js.map +1 -1
- package/dist/team/team-identity.d.ts.map +1 -1
- package/dist/team/team-identity.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 +125 -23
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +1340 -333
- package/dist/team/tmux-session.js.map +1 -1
- package/dist/team/worker-bootstrap.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.map +1 -1
- package/dist/ultragoal/__tests__/docs-contract.test.js.map +1 -1
- package/dist/ultragoal/artifacts.d.ts.map +1 -1
- package/dist/ultragoal/artifacts.js +4 -1
- package/dist/ultragoal/artifacts.js.map +1 -1
- package/dist/url-reader/index.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 +57 -0
- package/dist/utils/__tests__/file-durability.test.js.map +1 -0
- package/dist/utils/agents-model-table.js.map +1 -1
- package/dist/utils/file-durability.d.ts +15 -0
- package/dist/utils/file-durability.d.ts.map +1 -0
- package/dist/utils/file-durability.js +37 -0
- package/dist/utils/file-durability.js.map +1 -0
- package/dist/utils/package.js.map +1 -1
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/platform-command.js.map +1 -1
- package/dist/utils/repo-deps.js.map +1 -1
- package/dist/utils/version.js.map +1 -1
- package/dist/verification/__tests__/ci-rust-gates.test.js +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/verifier.js.map +1 -1
- package/dist/visual/constants.d.ts +1 -1
- package/dist/visual/constants.d.ts.map +1 -1
- package/dist/vscode/__tests__/index.test.js.map +1 -1
- package/dist/vscode/index.js.map +1 -1
- package/dist/wiki/__tests__/cjk-tokenize.test.js.map +1 -1
- package/dist/wiki/__tests__/lint.test.js.map +1 -1
- package/dist/wiki/__tests__/query.test.js.map +1 -1
- package/dist/wiki/__tests__/storage.test.js.map +1 -1
- package/dist/wiki/__tests__/test-helpers.d.ts.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/dist/wiki/query.js.map +1 -1
- package/dist/wiki/storage.js.map +1 -1
- package/package.json +2 -2
- package/plugins/oh-my-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/oh-my-codex/hooks/codex-native-hook.mjs +24 -0
- package/plugins/oh-my-codex/skills/omx-setup/SKILL.md +10 -5
- package/plugins/oh-my-codex/skills/ralph/SKILL.md +6 -2
- package/plugins/oh-my-codex/skills/ralplan/SKILL.md +6 -2
- package/plugins/oh-my-codex/skills/team/SKILL.md +13 -9
- package/skills/omx-setup/SKILL.md +10 -5
- package/skills/ralph/SKILL.md +6 -2
- package/skills/ralplan/SKILL.md +6 -2
- package/skills/team/SKILL.md +13 -9
- package/src/scripts/__tests__/codex-native-hook.test.ts +20048 -10827
- package/src/scripts/__tests__/fixtures/issue-3138-installed-smoke.ts +734 -0
- package/src/scripts/__tests__/notify-fallback-delivery.test.ts +177 -0
- package/src/scripts/__tests__/notify-state-io.test.ts +73 -0
- package/src/scripts/__tests__/reasoning-artifact-contract.test.ts +129 -0
- package/src/scripts/__tests__/role-intent-bootstrap-e2e-3181.test.ts +78 -0
- package/src/scripts/__tests__/role-intent-durable-recovery-3181.test.ts +60 -0
- package/src/scripts/__tests__/smoke-packed-install.test.ts +1309 -4
- package/src/scripts/codex-native-hook.ts +11429 -1163
- package/src/scripts/notify-fallback-delivery.ts +416 -0
- package/src/scripts/notify-fallback-watcher.ts +216 -155
- package/src/scripts/notify-hook/auto-nudge.ts +113 -14
- package/src/scripts/notify-hook/managed-tmux.ts +149 -12
- package/src/scripts/notify-hook/ralph-session-resume.ts +37 -36
- package/src/scripts/notify-hook/state-io.ts +100 -13
- package/src/scripts/notify-hook/team-dispatch.ts +242 -75
- package/src/scripts/notify-hook/team-leader-nudge.ts +40 -18
- package/src/scripts/notify-hook/team-tmux-guard.ts +366 -39
- package/src/scripts/notify-hook/team-worker-stop.ts +20 -16
- package/src/scripts/notify-hook/team-worker.ts +39 -26
- package/src/scripts/notify-hook/tmux-injection.ts +66 -23
- package/src/scripts/notify-hook/visual-verdict.ts +22 -12
- package/src/scripts/notify-hook.ts +336 -90
- package/src/scripts/smoke-packed-install.ts +5154 -149
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { describe, it } from 'node:test';
|
|
3
|
+
import { mkdir, mkdtemp, rm, symlink, writeFile } from 'node:fs/promises';
|
|
4
|
+
import { tmpdir } from 'node:os';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
import { deliverNotifyFallback, compactNotifyFallbackDeliveries, NOTIFY_FALLBACK_LEASE_MS, NOTIFY_FALLBACK_RETENTION_MS } from '../notify-fallback-delivery.js';
|
|
7
|
+
import { createHash } from 'node:crypto';
|
|
8
|
+
|
|
9
|
+
function deliveryKeyHash(threadId: string, turnId: string): string {
|
|
10
|
+
const part = (value: string) => {
|
|
11
|
+
const data = Buffer.from(value, 'utf8');
|
|
12
|
+
const length = Buffer.alloc(4);
|
|
13
|
+
length.writeUInt32BE(data.length);
|
|
14
|
+
return Buffer.concat([length, data]);
|
|
15
|
+
};
|
|
16
|
+
return createHash('sha256').update(Buffer.from('omx-notify-fallback-delivery-v1\0')).update(part(threadId)).update(part(turnId)).digest('hex');
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
async function withState(run: (stateDir: string) => Promise<void>): Promise<void> {
|
|
20
|
+
const root = await mkdtemp(join(tmpdir(), 'omx-notify-fallback-delivery-'));
|
|
21
|
+
try { await run(join(root, 'state')); } finally { await rm(root, { recursive: true, force: true }); }
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
describe('notify fallback delivery', () => {
|
|
25
|
+
it('allows only one simultaneous claimant to start a hook', async () => withState(async (stateDir) => {
|
|
26
|
+
let starts = 0;
|
|
27
|
+
const options = {
|
|
28
|
+
stateDir,
|
|
29
|
+
threadId: 'thread-a',
|
|
30
|
+
turnId: 'turn-a',
|
|
31
|
+
eventTimestampMs: 1_000,
|
|
32
|
+
rolloutPath: '/rollout-a.jsonl',
|
|
33
|
+
watcherMode: 'persistent' as const,
|
|
34
|
+
deadlineAtMs: 100_000,
|
|
35
|
+
now: () => 2_000,
|
|
36
|
+
spawnHook: async () => {
|
|
37
|
+
starts += 1;
|
|
38
|
+
return { spawned: true, childPid: 42, status: 0, signal: null };
|
|
39
|
+
},
|
|
40
|
+
};
|
|
41
|
+
const results = await Promise.all([deliverNotifyFallback(options), deliverNotifyFallback(options)]);
|
|
42
|
+
assert.equal(starts, 1);
|
|
43
|
+
assert.equal(results.filter((result) => result.kind === 'acquired_effect').length, 1);
|
|
44
|
+
}));
|
|
45
|
+
|
|
46
|
+
it('retries once after durable pre-spawn failure and makes attempt two terminal', async () => withState(async (stateDir) => {
|
|
47
|
+
let clock = 10_000;
|
|
48
|
+
const base = { stateDir, threadId: 'thread-b', turnId: 'turn-b', eventTimestampMs: 9_000, rolloutPath: '/rollout-b.jsonl', watcherMode: 'once' as const, deadlineAtMs: 100_000, now: () => clock };
|
|
49
|
+
const first = await deliverNotifyFallback({ ...base, spawnHook: async () => ({ spawned: false, error: new Error('ENOENT') }) });
|
|
50
|
+
assert.equal(first.kind, 'retry_eligible');
|
|
51
|
+
clock += 251;
|
|
52
|
+
const second = await deliverNotifyFallback({ ...base, spawnHook: async () => ({ spawned: false, error: new Error('ENOENT') }) });
|
|
53
|
+
assert.equal(second.kind, 'terminal_failed');
|
|
54
|
+
const third = await deliverNotifyFallback({ ...base, spawnHook: async () => { throw new Error('must not spawn attempt three'); } });
|
|
55
|
+
assert.equal(third.kind, 'terminal_failed');
|
|
56
|
+
await compactNotifyFallbackDeliveries(stateDir, Date.now() + NOTIFY_FALLBACK_RETENTION_MS + 1);
|
|
57
|
+
const afterCompaction = await deliverNotifyFallback({ ...base, spawnHook: async () => ({ spawned: true, childPid: 77, status: 0 }) });
|
|
58
|
+
assert.equal(afterCompaction.kind, 'acquired_effect');
|
|
59
|
+
}));
|
|
60
|
+
|
|
61
|
+
it('fails closed for malformed timestamps and expired authority', async () => withState(async (stateDir) => {
|
|
62
|
+
const invalid = await deliverNotifyFallback({
|
|
63
|
+
stateDir, threadId: 'thread-c', turnId: 'turn-c', eventTimestampMs: Number.NaN, rolloutPath: '/rollout-c.jsonl', watcherMode: 'once', deadlineAtMs: 1,
|
|
64
|
+
now: () => 2, spawnHook: async () => ({ spawned: true, childPid: 1, status: 0 }),
|
|
65
|
+
});
|
|
66
|
+
assert.deepEqual(invalid, { kind: 'invalid_skip', reason: 'invalid_event_timestamp' });
|
|
67
|
+
const deadline = await deliverNotifyFallback({
|
|
68
|
+
stateDir, threadId: 'thread-d', turnId: 'turn-d', eventTimestampMs: 0, rolloutPath: '/rollout-d.jsonl', watcherMode: 'once', deadlineAtMs: NOTIFY_FALLBACK_LEASE_MS,
|
|
69
|
+
now: () => NOTIFY_FALLBACK_LEASE_MS, spawnHook: async () => ({ spawned: true, childPid: 1, status: 0 }),
|
|
70
|
+
});
|
|
71
|
+
assert.deepEqual(deadline, { kind: 'deadline_skip', reason: 'authority_deadline' });
|
|
72
|
+
}));
|
|
73
|
+
|
|
74
|
+
it('isolates workspace roots and turns while retaining delivered authority', async () => {
|
|
75
|
+
const rootA = await mkdtemp(join(tmpdir(), 'omx-notify-isolation-a-'));
|
|
76
|
+
const rootB = await mkdtemp(join(tmpdir(), 'omx-notify-isolation-b-'));
|
|
77
|
+
try {
|
|
78
|
+
let starts = 0;
|
|
79
|
+
const build = (stateDir: string, turnId: string, threadId = 'thread') => ({
|
|
80
|
+
stateDir, threadId, turnId, eventTimestampMs: 1_000, rolloutPath: '/rollout.jsonl', watcherMode: 'persistent' as const,
|
|
81
|
+
deadlineAtMs: 10_000, now: () => 2_000,
|
|
82
|
+
spawnHook: async () => { starts += 1; return { spawned: true, childPid: starts, status: 0, signal: null }; },
|
|
83
|
+
});
|
|
84
|
+
assert.equal((await deliverNotifyFallback(build(join(rootA, 'state'), 'turn'))).kind, 'acquired_effect');
|
|
85
|
+
assert.equal((await deliverNotifyFallback(build(join(rootB, 'state'), 'turn'))).kind, 'acquired_effect');
|
|
86
|
+
assert.equal((await deliverNotifyFallback(build(join(rootA, 'state'), 'other-turn'))).kind, 'acquired_effect');
|
|
87
|
+
assert.equal((await deliverNotifyFallback(build(join(rootA, 'state'), 'turn', 'other-thread'))).kind, 'acquired_effect');
|
|
88
|
+
assert.equal((await deliverNotifyFallback(build(join(rootA, 'state'), 'turn'))).kind, 'terminal_delivered');
|
|
89
|
+
assert.equal(starts, 4);
|
|
90
|
+
} finally {
|
|
91
|
+
await rm(rootA, { recursive: true, force: true });
|
|
92
|
+
await rm(rootB, { recursive: true, force: true });
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
it('treats a spawned nonzero child as terminal ambiguity without retry', async () => withState(async (stateDir) => {
|
|
97
|
+
const options = {
|
|
98
|
+
stateDir, threadId: 'thread-e', turnId: 'turn-e', eventTimestampMs: 1_000, rolloutPath: '/rollout-e.jsonl', watcherMode: 'once' as const,
|
|
99
|
+
deadlineAtMs: 20_000, now: () => 2_000,
|
|
100
|
+
spawnHook: async () => ({ spawned: true, childPid: 55, status: 1, signal: null }),
|
|
101
|
+
};
|
|
102
|
+
assert.equal((await deliverNotifyFallback(options)).kind, 'acquired_effect');
|
|
103
|
+
assert.equal((await deliverNotifyFallback(options)).kind, 'terminal_ambiguous');
|
|
104
|
+
}));
|
|
105
|
+
|
|
106
|
+
it('rejects event timestamps more than five minutes in the future', async () => withState(async (stateDir) => {
|
|
107
|
+
const result = await deliverNotifyFallback({
|
|
108
|
+
stateDir, threadId: 'thread-f', turnId: 'turn-f', eventTimestampMs: 302_001, rolloutPath: '/rollout-f.jsonl', watcherMode: 'persistent',
|
|
109
|
+
deadlineAtMs: 400_000, now: () => 2_000, spawnHook: async () => ({ spawned: true, childPid: 99, status: 0 }),
|
|
110
|
+
});
|
|
111
|
+
assert.deepEqual(result, { kind: 'invalid_skip', reason: 'invalid_event_timestamp' });
|
|
112
|
+
}));
|
|
113
|
+
|
|
114
|
+
it('compacts terminal delivery authority after the 26 hour retention boundary', async () => withState(async (stateDir) => {
|
|
115
|
+
let starts = 0;
|
|
116
|
+
const options = {
|
|
117
|
+
stateDir, threadId: 'thread-g', turnId: 'turn-g', eventTimestampMs: Date.now(), rolloutPath: '/rollout-g.jsonl', watcherMode: 'persistent' as const,
|
|
118
|
+
deadlineAtMs: Date.now() + 100_000, now: () => Date.now(),
|
|
119
|
+
spawnHook: async () => ({ spawned: true, childPid: ++starts, status: 0, signal: null }),
|
|
120
|
+
};
|
|
121
|
+
await deliverNotifyFallback(options);
|
|
122
|
+
await compactNotifyFallbackDeliveries(stateDir, Date.now() + NOTIFY_FALLBACK_RETENTION_MS + 1);
|
|
123
|
+
assert.equal((await deliverNotifyFallback(options)).kind, 'acquired_effect');
|
|
124
|
+
assert.equal(starts, 2);
|
|
125
|
+
}));
|
|
126
|
+
|
|
127
|
+
it('does not retry a termination-unconfirmed hook outcome', async () => withState(async (stateDir) => {
|
|
128
|
+
const options = {
|
|
129
|
+
stateDir, threadId: 'thread-h', turnId: 'turn-h', eventTimestampMs: 1_000, rolloutPath: '/rollout-h.jsonl', watcherMode: 'once' as const,
|
|
130
|
+
deadlineAtMs: 20_000, now: () => 2_000,
|
|
131
|
+
spawnHook: async () => ({ spawned: true, childPid: 88, status: null, signal: null, terminationUnconfirmed: true }),
|
|
132
|
+
};
|
|
133
|
+
assert.equal((await deliverNotifyFallback(options)).kind, 'acquired_effect');
|
|
134
|
+
assert.equal((await deliverNotifyFallback(options)).kind, 'terminal_ambiguous');
|
|
135
|
+
}));
|
|
136
|
+
});
|
|
137
|
+
it('fails closed when the delivery store root is a symlink', async () => {
|
|
138
|
+
const root = await mkdtemp(join(tmpdir(), 'omx-notify-symlink-'));
|
|
139
|
+
const external = await mkdtemp(join(tmpdir(), 'omx-notify-external-'));
|
|
140
|
+
try {
|
|
141
|
+
const stateDir = join(root, 'state');
|
|
142
|
+
await mkdir(stateDir, { recursive: true });
|
|
143
|
+
await symlink(external, join(stateDir, 'notify-fallback-delivery-v1'), 'dir');
|
|
144
|
+
let starts = 0;
|
|
145
|
+
const result = await deliverNotifyFallback({
|
|
146
|
+
stateDir, threadId: 'thread-link', turnId: 'turn-link', eventTimestampMs: 1_000, rolloutPath: '/rollout-link.jsonl', watcherMode: 'once', deadlineAtMs: 10_000, now: () => 2_000,
|
|
147
|
+
spawnHook: async () => { starts += 1; return { spawned: true, childPid: 1, status: 0 }; },
|
|
148
|
+
});
|
|
149
|
+
assert.equal(result.kind, 'io_skip');
|
|
150
|
+
assert.equal(starts, 0);
|
|
151
|
+
await assert.rejects(() => compactNotifyFallbackDeliveries(stateDir, 100_000), /unsafe_directory_path/);
|
|
152
|
+
} finally {
|
|
153
|
+
await rm(root, { recursive: true, force: true });
|
|
154
|
+
await rm(external, { recursive: true, force: true });
|
|
155
|
+
}
|
|
156
|
+
});
|
|
157
|
+
|
|
158
|
+
it('rejects a retry authorization published before lease expiry', async () => withState(async (stateDir) => {
|
|
159
|
+
const threadId = 'thread-premature';
|
|
160
|
+
const turnId = 'turn-premature';
|
|
161
|
+
const hash = deliveryKeyHash(threadId, turnId);
|
|
162
|
+
const token = 'a'.repeat(64);
|
|
163
|
+
const keyDir = join(stateDir, 'notify-fallback-delivery-v1', hash.slice(0, 2), `${hash}.key`);
|
|
164
|
+
const attemptDir = join(keyDir, 'attempt-1');
|
|
165
|
+
await mkdir(join(attemptDir, `owner-${token}`), { recursive: true });
|
|
166
|
+
const identity = { schema_version: 1, key_hash: hash, thread_id: threadId, turn_id: turnId };
|
|
167
|
+
await writeFile(join(keyDir, 'key.json'), JSON.stringify({ ...identity, created_at_ms: 1_000 }));
|
|
168
|
+
await writeFile(join(attemptDir, `owner-${token}`, 'claim.json'), JSON.stringify({ ...identity, attempt: 1, owner_token: token, watcher_mode: 'once', claimed_at_ms: 1_000, lease_expires_at_ms: 1_000 + NOTIFY_FALLBACK_LEASE_MS, event_timestamp_ms: 1_000, rollout_path_hash: 'b'.repeat(64) }));
|
|
169
|
+
await writeFile(join(attemptDir, 'decision'), JSON.stringify({ ...identity, attempt: 1, owner_token: token, publisher_token: 'c'.repeat(64), published_at_ms: 2_000, kind: 'retry_authorized', reason: 'pre_effect_lease_expired', observed_lease_expires_at_ms: 1_000 + NOTIFY_FALLBACK_LEASE_MS }));
|
|
170
|
+
let starts = 0;
|
|
171
|
+
const result = await deliverNotifyFallback({
|
|
172
|
+
stateDir, threadId, turnId, eventTimestampMs: 1_000, rolloutPath: '/rollout-premature.jsonl', watcherMode: 'once', deadlineAtMs: 100_000, now: () => 32_000,
|
|
173
|
+
spawnHook: async () => { starts += 1; return { spawned: true, childPid: 1, status: 0 }; },
|
|
174
|
+
});
|
|
175
|
+
assert.deepEqual(result, { kind: 'invalid_skip', reason: 'invalid_retry_proof' });
|
|
176
|
+
assert.equal(starts, 0);
|
|
177
|
+
}));
|
|
@@ -1,11 +1,15 @@
|
|
|
1
1
|
import { describe, it } from 'node:test';
|
|
2
2
|
import assert from 'node:assert/strict';
|
|
3
|
+
import { existsSync } from 'node:fs';
|
|
3
4
|
import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises';
|
|
4
5
|
import { tmpdir } from 'node:os';
|
|
5
6
|
import { join } from 'node:path';
|
|
6
7
|
|
|
7
8
|
import {
|
|
8
9
|
getScopedStatePath,
|
|
10
|
+
getScopedStatePathAtScope,
|
|
11
|
+
readScopedJsonAtScope,
|
|
12
|
+
writeScopedJsonAtScope,
|
|
9
13
|
readCurrentSessionId,
|
|
10
14
|
readScopedJsonIfExists,
|
|
11
15
|
resolveScopedStateDir,
|
|
@@ -165,4 +169,73 @@ describe('notify-hook state I/O session authority', () => {
|
|
|
165
169
|
await rm(wd, { recursive: true, force: true });
|
|
166
170
|
}
|
|
167
171
|
});
|
|
172
|
+
|
|
173
|
+
it('maps the recorded OMX owner alias to the canonical session for implicit and explicit writes', async () => {
|
|
174
|
+
const wd = await mkdtemp(join(tmpdir(), 'omx-notify-state-io-owner-alias-'));
|
|
175
|
+
const previousOmxSessionId = process.env.OMX_SESSION_ID;
|
|
176
|
+
try {
|
|
177
|
+
const stateDir = join(wd, '.omx', 'state');
|
|
178
|
+
const canonicalSessionId = 'omx-canonical';
|
|
179
|
+
const ownerSessionId = 'omx-owner';
|
|
180
|
+
await mkdir(join(stateDir, 'sessions', canonicalSessionId), { recursive: true });
|
|
181
|
+
await writeFile(
|
|
182
|
+
join(stateDir, 'session.json'),
|
|
183
|
+
JSON.stringify({
|
|
184
|
+
session_id: canonicalSessionId,
|
|
185
|
+
owner_omx_session_id: ownerSessionId,
|
|
186
|
+
cwd: wd,
|
|
187
|
+
}, null, 2),
|
|
188
|
+
'utf-8',
|
|
189
|
+
);
|
|
190
|
+
process.env.OMX_SESSION_ID = ownerSessionId;
|
|
191
|
+
|
|
192
|
+
assert.equal(await readCurrentSessionId(stateDir), canonicalSessionId);
|
|
193
|
+
assert.equal(
|
|
194
|
+
await resolveScopedStateDir(stateDir),
|
|
195
|
+
join(stateDir, 'sessions', canonicalSessionId),
|
|
196
|
+
);
|
|
197
|
+
assert.equal(
|
|
198
|
+
await resolveScopedStateDir(stateDir, ownerSessionId),
|
|
199
|
+
join(stateDir, 'sessions', canonicalSessionId),
|
|
200
|
+
);
|
|
201
|
+
|
|
202
|
+
await writeScopedJson(stateDir, 'hud-state.json', ownerSessionId, { turn_count: 12 });
|
|
203
|
+
const value = JSON.parse(
|
|
204
|
+
await readFile(join(stateDir, 'sessions', canonicalSessionId, 'hud-state.json'), 'utf-8'),
|
|
205
|
+
) as { turn_count?: unknown };
|
|
206
|
+
assert.equal(value.turn_count, 12);
|
|
207
|
+
assert.equal(existsSync(join(stateDir, 'sessions', ownerSessionId)), false);
|
|
208
|
+
} finally {
|
|
209
|
+
if (typeof previousOmxSessionId === 'string') process.env.OMX_SESSION_ID = previousOmxSessionId;
|
|
210
|
+
else delete process.env.OMX_SESSION_ID;
|
|
211
|
+
await rm(wd, { recursive: true, force: true });
|
|
212
|
+
}
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
it('uses the immutable target scope without consulting a stale environment session', async () => {
|
|
216
|
+
const wd = await mkdtemp(join(tmpdir(), 'omx-notify-state-io-context-'));
|
|
217
|
+
const previousOmxSessionId = process.env.OMX_SESSION_ID;
|
|
218
|
+
try {
|
|
219
|
+
const stateDir = join(wd, '.omx', 'state');
|
|
220
|
+
const scope = {
|
|
221
|
+
targetSessionId: 'fork-existing',
|
|
222
|
+
ownerCodexSessionId: 'payload-owner',
|
|
223
|
+
allowedStorageSessionIds: ['fork-existing'],
|
|
224
|
+
};
|
|
225
|
+
await mkdir(join(stateDir, 'sessions', 'fork-existing'), { recursive: true });
|
|
226
|
+
process.env.OMX_SESSION_ID = 'stale-singleton';
|
|
227
|
+
|
|
228
|
+
assert.equal(
|
|
229
|
+
await getScopedStatePathAtScope(stateDir, 'hud-state.json', scope),
|
|
230
|
+
join(stateDir, 'sessions', 'fork-existing', 'hud-state.json'),
|
|
231
|
+
);
|
|
232
|
+
await writeScopedJsonAtScope(stateDir, 'hud-state.json', scope, { turn_count: 1 });
|
|
233
|
+
assert.deepEqual(await readScopedJsonAtScope(stateDir, 'hud-state.json', scope, null), { turn_count: 1 });
|
|
234
|
+
assert.equal(existsSync(join(stateDir, 'sessions', 'stale-singleton')), false);
|
|
235
|
+
} finally {
|
|
236
|
+
if (typeof previousOmxSessionId === 'string') process.env.OMX_SESSION_ID = previousOmxSessionId;
|
|
237
|
+
else delete process.env.OMX_SESSION_ID;
|
|
238
|
+
await rm(wd, { recursive: true, force: true });
|
|
239
|
+
}
|
|
240
|
+
});
|
|
168
241
|
});
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { existsSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs';
|
|
3
|
+
import { spawnSync } from 'node:child_process';
|
|
4
|
+
import { tmpdir } from 'node:os';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
import { pathToFileURL } from 'node:url';
|
|
7
|
+
import { parse as parseToml } from '@iarna/toml';
|
|
8
|
+
import { test } from 'node:test';
|
|
9
|
+
import {
|
|
10
|
+
assertInstalledReasoningDeclarationContract,
|
|
11
|
+
assertInstalledRootReasoningHelp,
|
|
12
|
+
assertInstalledRootReasoningRejection,
|
|
13
|
+
assertInstalledTeamSkillContract,
|
|
14
|
+
} from '../smoke-packed-install.js';
|
|
15
|
+
|
|
16
|
+
const root = process.cwd();
|
|
17
|
+
const dist = join(root, 'dist');
|
|
18
|
+
|
|
19
|
+
function read(relativePath: string): string {
|
|
20
|
+
return readFileSync(join(root, relativePath), 'utf-8');
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
test('compiled reasoning artifacts preserve exact surface-specific max contracts', async () => {
|
|
24
|
+
const requiredArtifacts = [
|
|
25
|
+
'dist/config/models.js',
|
|
26
|
+
'dist/config/models.d.ts',
|
|
27
|
+
'dist/agents/definitions.js',
|
|
28
|
+
'dist/agents/definitions.d.ts',
|
|
29
|
+
'dist/agents/native-config.js',
|
|
30
|
+
'dist/agents/native-config.d.ts',
|
|
31
|
+
'dist/team/model-contract.js',
|
|
32
|
+
'dist/team/model-contract.d.ts',
|
|
33
|
+
'dist/cli/index.js',
|
|
34
|
+
'dist/cli/index.d.ts',
|
|
35
|
+
'dist/cli/omx.js',
|
|
36
|
+
'dist/cli/omx.d.ts',
|
|
37
|
+
];
|
|
38
|
+
for (const relativePath of requiredArtifacts) {
|
|
39
|
+
assert.equal(existsSync(join(root, relativePath)), true, `missing compiled artifact: ${relativePath}`);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const modelsDeclaration = read('dist/config/models.d.ts');
|
|
43
|
+
const definitionsDeclaration = read('dist/agents/definitions.d.ts');
|
|
44
|
+
const nativeDeclaration = read('dist/agents/native-config.d.ts');
|
|
45
|
+
const teamDeclaration = read('dist/team/model-contract.d.ts');
|
|
46
|
+
assertInstalledReasoningDeclarationContract({
|
|
47
|
+
models: modelsDeclaration,
|
|
48
|
+
definitions: definitionsDeclaration,
|
|
49
|
+
nativeConfig: nativeDeclaration,
|
|
50
|
+
team: teamDeclaration,
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
const models = await import(pathToFileURL(join(dist, 'config/models.js')).href);
|
|
54
|
+
assert.deepEqual(models.CANONICAL_REASONING_EFFORTS, ['low', 'medium', 'high', 'xhigh']);
|
|
55
|
+
assert.deepEqual(models.AMBIGUOUS_UNSUPPORTED_REASONING_EFFORTS, ['max', 'ultra']);
|
|
56
|
+
assert.deepEqual(models.PER_AGENT_REASONING_EFFORTS, ['low', 'medium', 'high', 'xhigh', 'max']);
|
|
57
|
+
assert.deepEqual(models.ROOT_REASONING_EFFORTS, ['low', 'medium', 'high', 'xhigh']);
|
|
58
|
+
assert.deepEqual(models.ROOT_UNSUPPORTED_REASONING_EFFORTS, ['max', 'ultra']);
|
|
59
|
+
assert.equal(models.isAmbiguousUnsupportedReasoningEffort('MAX'), true);
|
|
60
|
+
assert.equal(models.isUnsupportedRootReasoningEffort('MAX'), true);
|
|
61
|
+
assert.equal(models.isUnsupportedRootReasoningEffort('ultra'), true);
|
|
62
|
+
assert.equal(models.isUnsupportedRootReasoningEffort('xhigh'), false);
|
|
63
|
+
assert.equal(models.normalizeUnsupportedRootReasoningEffort(' MAX '), 'max');
|
|
64
|
+
assert.equal(models.normalizeUnsupportedRootReasoningEffort('Ultra'), 'ultra');
|
|
65
|
+
assert.equal(models.normalizeUnsupportedRootReasoningEffort('xhigh'), undefined);
|
|
66
|
+
|
|
67
|
+
const nativeConfig = await import(pathToFileURL(join(dist, 'agents/native-config.js')).href);
|
|
68
|
+
const definitions = await import(pathToFileURL(join(dist, 'agents/definitions.js')).href);
|
|
69
|
+
const codexHome = mkdtempSync(join(tmpdir(), 'omx-artifact-max-native-'));
|
|
70
|
+
try {
|
|
71
|
+
writeFileSync(join(codexHome, '.omx-config.json'), JSON.stringify({
|
|
72
|
+
agentReasoning: { architect: ' MAX ', critic: 'ultra' },
|
|
73
|
+
}));
|
|
74
|
+
const maxToml = nativeConfig.generateAgentToml(
|
|
75
|
+
definitions.AGENT_DEFINITIONS.architect,
|
|
76
|
+
'compiled native max contract',
|
|
77
|
+
{ codexHomeOverride: codexHome },
|
|
78
|
+
);
|
|
79
|
+
assert.match(maxToml, /model_reasoning_effort = "max"/);
|
|
80
|
+
assert.doesNotMatch(maxToml, /model_reasoning_effort = "xhigh"/);
|
|
81
|
+
assert.equal((parseToml(maxToml) as { model_reasoning_effort?: unknown }).model_reasoning_effort, 'max');
|
|
82
|
+
|
|
83
|
+
const fallbackToml = nativeConfig.generateAgentToml(
|
|
84
|
+
definitions.AGENT_DEFINITIONS.critic,
|
|
85
|
+
'compiled native ultra fallback contract',
|
|
86
|
+
{ codexHomeOverride: codexHome },
|
|
87
|
+
);
|
|
88
|
+
assert.match(fallbackToml, /model_reasoning_effort = "high"/);
|
|
89
|
+
assert.doesNotMatch(fallbackToml, /model_reasoning_effort = "ultra"/);
|
|
90
|
+
} finally {
|
|
91
|
+
rmSync(codexHome, { recursive: true, force: true });
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
const team = await import(pathToFileURL(join(dist, 'team/model-contract.js')).href);
|
|
95
|
+
const maxArgs = team.resolveTeamWorkerLaunchArgs({ preferredReasoning: 'max' });
|
|
96
|
+
assert.deepEqual(maxArgs, ['-c', 'model_reasoning_effort="max"']);
|
|
97
|
+
assert.equal(maxArgs.includes('model_reasoning_effort="xhigh"'), false);
|
|
98
|
+
const opaqueUltra = team.resolveTeamWorkerLaunchDiagnostics({
|
|
99
|
+
existingRaw: '-c model_reasoning_effort="ultra"',
|
|
100
|
+
preferredReasoning: 'max',
|
|
101
|
+
});
|
|
102
|
+
assert.equal(opaqueUltra.reasoningSource, 'explicit');
|
|
103
|
+
assert.equal(opaqueUltra.actualReasoning, undefined);
|
|
104
|
+
|
|
105
|
+
const canonicalSkill = readFileSync(join(root, 'skills/team/SKILL.md'));
|
|
106
|
+
const pluginSkill = readFileSync(join(root, 'plugins/oh-my-codex/skills/team/SKILL.md'));
|
|
107
|
+
assertInstalledTeamSkillContract(canonicalSkill, pluginSkill);
|
|
108
|
+
});
|
|
109
|
+
|
|
110
|
+
test('compiled root reasoning keeps four-value help and rejects max/ultra without mutation', () => {
|
|
111
|
+
const omxPath = join(dist, 'cli/omx.js');
|
|
112
|
+
const codexHome = mkdtempSync(join(tmpdir(), 'omx-artifact-root-reasoning-'));
|
|
113
|
+
try {
|
|
114
|
+
const env = { ...process.env, CODEX_HOME: codexHome };
|
|
115
|
+
const configPath = join(codexHome, 'config.toml');
|
|
116
|
+
const help = spawnSync(process.execPath, [omxPath, 'reasoning'], { encoding: 'utf-8', env });
|
|
117
|
+
assert.equal(help.status, 0, help.stderr);
|
|
118
|
+
assertInstalledRootReasoningHelp(help.stdout);
|
|
119
|
+
const max = spawnSync(process.execPath, [omxPath, 'reasoning', 'max'], { encoding: 'utf-8', env });
|
|
120
|
+
assertInstalledRootReasoningRejection('max', max, undefined, existsSync(configPath) ? readFileSync(configPath, 'utf-8') : undefined);
|
|
121
|
+
|
|
122
|
+
const originalConfig = 'model = "preserve-root-config"\n';
|
|
123
|
+
writeFileSync(configPath, originalConfig);
|
|
124
|
+
const ultra = spawnSync(process.execPath, [omxPath, 'reasoning', 'ultra'], { encoding: 'utf-8', env });
|
|
125
|
+
assertInstalledRootReasoningRejection('ultra', ultra, originalConfig, readFileSync(configPath, 'utf-8'));
|
|
126
|
+
} finally {
|
|
127
|
+
rmSync(codexHome, { recursive: true, force: true });
|
|
128
|
+
}
|
|
129
|
+
});
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { existsSync } from 'node:fs';
|
|
3
|
+
import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises';
|
|
4
|
+
import { tmpdir } from 'node:os';
|
|
5
|
+
import { join } from 'node:path';
|
|
6
|
+
import { describe, it } from 'node:test';
|
|
7
|
+
|
|
8
|
+
import { recordSubagentTurnForSession, readSubagentTrackingState } from '../../subagents/tracker.js';
|
|
9
|
+
import { dispatchCodexNativeHook } from '../codex-native-hook.js';
|
|
10
|
+
|
|
11
|
+
describe('#3194 role-intent native-hook e2e', () => {
|
|
12
|
+
it('does not treat legacy thread_id as leader authority and preserves a child record', async () => {
|
|
13
|
+
const cwd = await mkdtemp(join(tmpdir(), 'omx-3194-'));
|
|
14
|
+
try {
|
|
15
|
+
await recordSubagentTurnForSession(cwd, {
|
|
16
|
+
sessionId: 'synthetic-leader-session', threadId: 'synthetic-child-thread', kind: 'subagent',
|
|
17
|
+
leaderThreadId: 'synthetic-leader-thread', timestamp: new Date(0).toISOString(),
|
|
18
|
+
});
|
|
19
|
+
const before = await readSubagentTrackingState(cwd);
|
|
20
|
+
const result = await dispatchCodexNativeHook({
|
|
21
|
+
hook_event_name: 'PreToolUse', cwd, session_id: 'synthetic-child-thread', thread_id: 'synthetic-child-thread',
|
|
22
|
+
tool_name: 'Bash', tool_use_id: 'synthetic-tool-use', tool_input: { command: 'omx ralplan role-intent write --role architect --parent-thread "$CODEX_THREAD_ID" --json' },
|
|
23
|
+
}, { cwd, sessionOwnerPid: process.pid });
|
|
24
|
+
assert.deepEqual(result.outputJson, {
|
|
25
|
+
hookSpecificOutput: {
|
|
26
|
+
hookEventName: 'PreToolUse', permissionDecision: 'deny',
|
|
27
|
+
permissionDecisionReason: 'unsupported_documented_leader_proof: Codex 0.144.5 hooks do not expose documented root identity required for adapted Ralplan.',
|
|
28
|
+
},
|
|
29
|
+
});
|
|
30
|
+
assert.deepEqual(await readSubagentTrackingState(cwd), before);
|
|
31
|
+
} finally {
|
|
32
|
+
await rm(cwd, { recursive: true, force: true });
|
|
33
|
+
}
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
it('does not create session state for a fresh documented payload without thread_id', async () => {
|
|
37
|
+
const cwd = await mkdtemp(join(tmpdir(), 'omx-3194-'));
|
|
38
|
+
try {
|
|
39
|
+
const result = await dispatchCodexNativeHook({
|
|
40
|
+
hook_event_name: 'PreToolUse', cwd, session_id: 'synthetic-session', tool_name: 'Bash', tool_use_id: 'synthetic-tool-use',
|
|
41
|
+
tool_input: { command: 'omx ralplan role-intent write --role architect --parent-thread "$CODEX_THREAD_ID" --json' },
|
|
42
|
+
}, { cwd, sessionOwnerPid: process.pid });
|
|
43
|
+
assert.deepEqual(result.outputJson, {
|
|
44
|
+
hookSpecificOutput: {
|
|
45
|
+
hookEventName: 'PreToolUse', permissionDecision: 'deny',
|
|
46
|
+
permissionDecisionReason: 'unsupported_documented_leader_proof: Codex 0.144.5 hooks do not expose documented root identity required for adapted Ralplan.',
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
assert.equal(existsSync(join(cwd, '.omx', 'state')), false);
|
|
50
|
+
} finally {
|
|
51
|
+
await rm(cwd, { recursive: true, force: true });
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
it('does not mutate a foreign or stale pointer before denying the documented payload', async () => {
|
|
56
|
+
const cwd = await mkdtemp(join(tmpdir(), 'omx-3194-'));
|
|
57
|
+
try {
|
|
58
|
+
const stateDir = join(cwd, '.omx', 'state');
|
|
59
|
+
const pointerPath = join(stateDir, 'session.json');
|
|
60
|
+
const pointer = '{"session_id":"synthetic-foreign","native_session_id":"synthetic-foreign","started_at":"1970-01-01T00:00:00.000Z"}\n';
|
|
61
|
+
await mkdir(stateDir, { recursive: true });
|
|
62
|
+
await writeFile(pointerPath, pointer);
|
|
63
|
+
const result = await dispatchCodexNativeHook({
|
|
64
|
+
hook_event_name: 'PreToolUse', cwd, session_id: 'synthetic-current', tool_name: 'Bash', tool_use_id: 'synthetic-tool-use',
|
|
65
|
+
tool_input: { command: 'omx ralplan role-intent write --role architect --parent-thread "$CODEX_THREAD_ID" --json' },
|
|
66
|
+
}, { cwd, sessionOwnerPid: process.pid });
|
|
67
|
+
assert.deepEqual(result.outputJson, {
|
|
68
|
+
hookSpecificOutput: {
|
|
69
|
+
hookEventName: 'PreToolUse', permissionDecision: 'deny',
|
|
70
|
+
permissionDecisionReason: 'unsupported_documented_leader_proof: Codex 0.144.5 hooks do not expose documented root identity required for adapted Ralplan.',
|
|
71
|
+
},
|
|
72
|
+
});
|
|
73
|
+
assert.equal(await readFile(pointerPath, 'utf8'), pointer);
|
|
74
|
+
} finally {
|
|
75
|
+
await rm(cwd, { recursive: true, force: true });
|
|
76
|
+
}
|
|
77
|
+
});
|
|
78
|
+
});
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import assert from 'node:assert/strict';
|
|
2
|
+
import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises';
|
|
3
|
+
import { tmpdir } from 'node:os';
|
|
4
|
+
import { dirname, join } from 'node:path';
|
|
5
|
+
import { describe, it } from 'node:test';
|
|
6
|
+
|
|
7
|
+
import {
|
|
8
|
+
bindPendingRoleIntentUnderLock,
|
|
9
|
+
readSubagentTrackingState,
|
|
10
|
+
readSubagentTrackingStateStrict,
|
|
11
|
+
recordPendingRoleIntent,
|
|
12
|
+
subagentTrackingPath,
|
|
13
|
+
} from '../../subagents/tracker.js';
|
|
14
|
+
|
|
15
|
+
const ARCHITECT_TOKEN = 'abcdef0123456789abcdef0123456789';
|
|
16
|
+
const CRITIC_TOKEN = '00112233445566778899aabbccddeeff';
|
|
17
|
+
|
|
18
|
+
async function withCwd(fn: (cwd: string) => Promise<void>): Promise<void> {
|
|
19
|
+
const cwd = await mkdtemp(join(tmpdir(), 'omx-3194-'));
|
|
20
|
+
try { await fn(cwd); } finally { await rm(cwd, { recursive: true, force: true }); }
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
describe('#3194 pending role-intent durability', () => {
|
|
24
|
+
it('keeps Architect before Critic as distinct single-flight intents and preserves binding integrity', async () => {
|
|
25
|
+
await withCwd(async (cwd) => {
|
|
26
|
+
const architect = recordPendingRoleIntent(cwd, {
|
|
27
|
+
role: 'architect', sessionId: 'synthetic-session', parentThreadId: 'synthetic-parent', correlationToken: ARCHITECT_TOKEN, nowMs: 0,
|
|
28
|
+
});
|
|
29
|
+
assert.equal(architect.ok, true);
|
|
30
|
+
const critic = recordPendingRoleIntent(cwd, {
|
|
31
|
+
role: 'critic', sessionId: 'synthetic-session', parentThreadId: 'synthetic-parent', correlationToken: CRITIC_TOKEN, nowMs: 0,
|
|
32
|
+
});
|
|
33
|
+
assert.deepEqual(critic, { ok: false, reason: 'single_flight_conflict' });
|
|
34
|
+
const binding = bindPendingRoleIntentUnderLock(cwd, {
|
|
35
|
+
sessionId: 'synthetic-session', parentThreadId: 'synthetic-parent', correlationToken: ARCHITECT_TOKEN, nowMs: 1,
|
|
36
|
+
}, (state) => state);
|
|
37
|
+
assert.equal(binding?.role, 'architect');
|
|
38
|
+
assert.equal(binding?.alreadyBound, false);
|
|
39
|
+
const retry = bindPendingRoleIntentUnderLock(cwd, {
|
|
40
|
+
sessionId: 'synthetic-session', parentThreadId: 'synthetic-parent', correlationToken: ARCHITECT_TOKEN, nowMs: 2,
|
|
41
|
+
}, () => { throw new Error('an existing binding must not invoke the callback'); });
|
|
42
|
+
assert.equal(retry?.alreadyBound, true);
|
|
43
|
+
const state = await readSubagentTrackingState(cwd);
|
|
44
|
+
assert.equal(state.pending_role_intents.length, 1);
|
|
45
|
+
assert.equal(state.pending_role_intents[0]?.binding_state, 'bound');
|
|
46
|
+
assert.equal(state.pending_role_intents[0]?.correlation_token, ARCHITECT_TOKEN);
|
|
47
|
+
});
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
it('strictly rejects corrupt durable tracker bytes without mutation', async () => {
|
|
51
|
+
await withCwd(async (cwd) => {
|
|
52
|
+
const path = subagentTrackingPath(cwd);
|
|
53
|
+
const corrupt = '{ synthetic corrupt tracker';
|
|
54
|
+
await mkdir(dirname(path), { recursive: true });
|
|
55
|
+
await writeFile(path, corrupt);
|
|
56
|
+
assert.deepEqual(await readSubagentTrackingStateStrict(cwd), { ok: false });
|
|
57
|
+
assert.equal(await readFile(path, 'utf8'), corrupt);
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
});
|