oh-my-codex 0.17.3 → 0.18.1
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 +13 -5
- package/Cargo.toml +2 -1
- package/README.md +44 -19
- package/crates/omx-api/Cargo.toml +19 -0
- package/crates/omx-api/src/lib.rs +2997 -0
- package/crates/omx-api/src/main.rs +10 -0
- package/crates/omx-api/tests/cli.rs +558 -0
- package/crates/omx-explore/src/main.rs +4 -0
- package/crates/omx-sparkshell/src/codex_bridge.rs +437 -123
- package/crates/omx-sparkshell/src/exec.rs +127 -1
- package/crates/omx-sparkshell/src/main.rs +829 -30
- package/crates/omx-sparkshell/src/prompt.rs +25 -3
- package/crates/omx-sparkshell/src/redaction.rs +241 -0
- package/crates/omx-sparkshell/tests/execution.rs +702 -237
- package/dist/cli/__tests__/api.test.d.ts +2 -0
- package/dist/cli/__tests__/api.test.d.ts.map +1 -0
- package/dist/cli/__tests__/api.test.js +175 -0
- package/dist/cli/__tests__/api.test.js.map +1 -0
- package/dist/cli/__tests__/ask.test.js +72 -5
- package/dist/cli/__tests__/ask.test.js.map +1 -1
- package/dist/cli/__tests__/autoresearch-goal.test.js +14 -1
- package/dist/cli/__tests__/autoresearch-goal.test.js.map +1 -1
- package/dist/cli/__tests__/codex-plugin-layout.test.js +15 -7
- package/dist/cli/__tests__/codex-plugin-layout.test.js.map +1 -1
- package/dist/cli/__tests__/doctor-warning-copy.test.js +76 -3
- package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
- package/dist/cli/__tests__/explore.test.js +23 -0
- package/dist/cli/__tests__/explore.test.js.map +1 -1
- package/dist/cli/__tests__/index.test.js +171 -5
- package/dist/cli/__tests__/index.test.js.map +1 -1
- package/dist/cli/__tests__/install-docs-contract.test.d.ts +2 -0
- package/dist/cli/__tests__/install-docs-contract.test.d.ts.map +1 -0
- package/dist/cli/__tests__/install-docs-contract.test.js +55 -0
- package/dist/cli/__tests__/install-docs-contract.test.js.map +1 -0
- package/dist/cli/__tests__/launch-fallback.test.js +191 -0
- package/dist/cli/__tests__/launch-fallback.test.js.map +1 -1
- package/dist/cli/__tests__/package-bin-contract.test.js +4 -3
- package/dist/cli/__tests__/package-bin-contract.test.js.map +1 -1
- package/dist/cli/__tests__/question.test.js +27 -41
- package/dist/cli/__tests__/question.test.js.map +1 -1
- package/dist/cli/__tests__/setup-install-mode.test.js +232 -35
- package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -1
- package/dist/cli/__tests__/sparkshell-cli.test.js +25 -1
- package/dist/cli/__tests__/sparkshell-cli.test.js.map +1 -1
- package/dist/cli/__tests__/sparkshell-packaging.test.js +1 -0
- package/dist/cli/__tests__/sparkshell-packaging.test.js.map +1 -1
- package/dist/cli/__tests__/ultragoal.test.js +227 -4
- package/dist/cli/__tests__/ultragoal.test.js.map +1 -1
- package/dist/cli/__tests__/update.test.js +72 -1
- package/dist/cli/__tests__/update.test.js.map +1 -1
- package/dist/cli/__tests__/version-sync-contract.test.js +4 -0
- package/dist/cli/__tests__/version-sync-contract.test.js.map +1 -1
- package/dist/cli/__tests__/windows-popup-loop-contract.test.js +1 -1
- package/dist/cli/__tests__/windows-popup-loop-contract.test.js.map +1 -1
- package/dist/cli/api.d.ts +26 -0
- package/dist/cli/api.d.ts.map +1 -0
- package/dist/cli/api.js +153 -0
- package/dist/cli/api.js.map +1 -0
- package/dist/cli/codex-feature-probe.d.ts +5 -0
- package/dist/cli/codex-feature-probe.d.ts.map +1 -1
- package/dist/cli/codex-feature-probe.js +13 -7
- package/dist/cli/codex-feature-probe.js.map +1 -1
- package/dist/cli/doctor.d.ts +7 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +119 -10
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/explore.d.ts +2 -0
- package/dist/cli/explore.d.ts.map +1 -1
- package/dist/cli/explore.js +43 -1
- package/dist/cli/explore.js.map +1 -1
- package/dist/cli/index.d.ts +12 -4
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +460 -87
- 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 +1 -0
- package/dist/cli/native-assets.js.map +1 -1
- package/dist/cli/plugin-marketplace.d.ts +2 -0
- package/dist/cli/plugin-marketplace.d.ts.map +1 -1
- package/dist/cli/plugin-marketplace.js +15 -1
- package/dist/cli/plugin-marketplace.js.map +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +71 -11
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/sparkshell.d.ts +7 -1
- package/dist/cli/sparkshell.d.ts.map +1 -1
- package/dist/cli/sparkshell.js +31 -4
- package/dist/cli/sparkshell.js.map +1 -1
- package/dist/cli/ultragoal.d.ts +1 -1
- package/dist/cli/ultragoal.d.ts.map +1 -1
- package/dist/cli/ultragoal.js +184 -10
- package/dist/cli/ultragoal.js.map +1 -1
- package/dist/cli/update.d.ts +2 -0
- package/dist/cli/update.d.ts.map +1 -1
- package/dist/cli/update.js +14 -3
- package/dist/cli/update.js.map +1 -1
- package/dist/compat/__tests__/doctor-contract.test.js +3 -0
- package/dist/compat/__tests__/doctor-contract.test.js.map +1 -1
- package/dist/config/__tests__/codex-feature-flags.test.js +11 -1
- package/dist/config/__tests__/codex-feature-flags.test.js.map +1 -1
- package/dist/config/__tests__/codex-hooks.test.js +19 -8
- package/dist/config/__tests__/codex-hooks.test.js.map +1 -1
- package/dist/config/__tests__/commit-lore-guard.test.d.ts +2 -0
- package/dist/config/__tests__/commit-lore-guard.test.d.ts.map +1 -0
- package/dist/config/__tests__/commit-lore-guard.test.js +20 -0
- package/dist/config/__tests__/commit-lore-guard.test.js.map +1 -0
- package/dist/config/codex-feature-flags.d.ts +4 -0
- package/dist/config/codex-feature-flags.d.ts.map +1 -1
- package/dist/config/codex-feature-flags.js +4 -0
- package/dist/config/codex-feature-flags.js.map +1 -1
- package/dist/config/codex-hooks.js +6 -6
- package/dist/config/codex-hooks.js.map +1 -1
- package/dist/config/commit-lore-guard.d.ts +1 -0
- package/dist/config/commit-lore-guard.d.ts.map +1 -1
- package/dist/config/commit-lore-guard.js +29 -3
- package/dist/config/commit-lore-guard.js.map +1 -1
- package/dist/config/generator.d.ts +3 -1
- package/dist/config/generator.d.ts.map +1 -1
- package/dist/config/generator.js +114 -10
- package/dist/config/generator.js.map +1 -1
- package/dist/goal-workflows/codex-goal-snapshot.d.ts +1 -0
- package/dist/goal-workflows/codex-goal-snapshot.d.ts.map +1 -1
- package/dist/goal-workflows/codex-goal-snapshot.js +5 -1
- package/dist/goal-workflows/codex-goal-snapshot.js.map +1 -1
- package/dist/hooks/__tests__/autopilot-skill-contract.test.js +10 -6
- package/dist/hooks/__tests__/autopilot-skill-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/best-practice-research-skill.test.d.ts +2 -0
- package/dist/hooks/__tests__/best-practice-research-skill.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/best-practice-research-skill.test.js +27 -0
- package/dist/hooks/__tests__/best-practice-research-skill.test.js.map +1 -0
- package/dist/hooks/__tests__/consensus-execution-handoff.test.d.ts +1 -1
- package/dist/hooks/__tests__/consensus-execution-handoff.test.js +13 -11
- package/dist/hooks/__tests__/consensus-execution-handoff.test.js.map +1 -1
- package/dist/hooks/__tests__/deep-interview-contract.test.js +4 -3
- package/dist/hooks/__tests__/deep-interview-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/keyword-detector.test.js +15 -3
- package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js +6 -0
- 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 +33 -0
- package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js.map +1 -1
- package/dist/hooks/__tests__/prompt-guidance-wave-two.test.js +4 -0
- package/dist/hooks/__tests__/prompt-guidance-wave-two.test.js.map +1 -1
- package/dist/hooks/extensibility/__tests__/dispatcher.test.js +26 -3
- package/dist/hooks/extensibility/__tests__/dispatcher.test.js.map +1 -1
- package/dist/hooks/extensibility/dispatcher.d.ts.map +1 -1
- package/dist/hooks/extensibility/dispatcher.js +29 -14
- package/dist/hooks/extensibility/dispatcher.js.map +1 -1
- package/dist/hooks/keyword-detector.d.ts.map +1 -1
- package/dist/hooks/keyword-detector.js +8 -3
- package/dist/hooks/keyword-detector.js.map +1 -1
- package/dist/hooks/keyword-registry.d.ts.map +1 -1
- package/dist/hooks/keyword-registry.js +1 -0
- package/dist/hooks/keyword-registry.js.map +1 -1
- package/dist/hooks/prompt-guidance-contract.d.ts.map +1 -1
- package/dist/hooks/prompt-guidance-contract.js +3 -2
- package/dist/hooks/prompt-guidance-contract.js.map +1 -1
- package/dist/hud/__tests__/hud-tmux-injection.test.js +14 -8
- package/dist/hud/__tests__/hud-tmux-injection.test.js.map +1 -1
- package/dist/hud/__tests__/reconcile.test.js +4 -4
- package/dist/hud/__tests__/reconcile.test.js.map +1 -1
- package/dist/hud/__tests__/resource-leak-watch.test.d.ts +2 -0
- package/dist/hud/__tests__/resource-leak-watch.test.d.ts.map +1 -0
- package/dist/hud/__tests__/resource-leak-watch.test.js +28 -0
- package/dist/hud/__tests__/resource-leak-watch.test.js.map +1 -0
- package/dist/hud/__tests__/tmux.test.js +23 -18
- package/dist/hud/__tests__/tmux.test.js.map +1 -1
- package/dist/hud/index.d.ts +1 -1
- package/dist/hud/index.d.ts.map +1 -1
- package/dist/hud/index.js +10 -4
- package/dist/hud/index.js.map +1 -1
- package/dist/hud/tmux.d.ts.map +1 -1
- package/dist/hud/tmux.js +9 -8
- package/dist/hud/tmux.js.map +1 -1
- package/dist/mcp/__tests__/bootstrap.test.js +75 -1
- package/dist/mcp/__tests__/bootstrap.test.js.map +1 -1
- package/dist/mcp/bootstrap.d.ts +3 -1
- package/dist/mcp/bootstrap.d.ts.map +1 -1
- package/dist/mcp/bootstrap.js +71 -2
- package/dist/mcp/bootstrap.js.map +1 -1
- package/dist/notifications/__tests__/http-client-resource.test.d.ts +2 -0
- package/dist/notifications/__tests__/http-client-resource.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/http-client-resource.test.js +41 -0
- package/dist/notifications/__tests__/http-client-resource.test.js.map +1 -0
- package/dist/notifications/__tests__/verbosity.test.js +20 -0
- package/dist/notifications/__tests__/verbosity.test.js.map +1 -1
- package/dist/notifications/config.d.ts.map +1 -1
- package/dist/notifications/config.js +6 -3
- package/dist/notifications/config.js.map +1 -1
- package/dist/notifications/http-client.d.ts.map +1 -1
- package/dist/notifications/http-client.js +78 -27
- package/dist/notifications/http-client.js.map +1 -1
- package/dist/notifications/types.d.ts +2 -0
- package/dist/notifications/types.d.ts.map +1 -1
- package/dist/openclaw/__tests__/dispatcher.test.js +49 -1
- package/dist/openclaw/__tests__/dispatcher.test.js.map +1 -1
- package/dist/openclaw/dispatcher.d.ts +7 -4
- package/dist/openclaw/dispatcher.d.ts.map +1 -1
- package/dist/openclaw/dispatcher.js +32 -69
- package/dist/openclaw/dispatcher.js.map +1 -1
- package/dist/pipeline/__tests__/orchestrator.test.js +65 -3
- package/dist/pipeline/__tests__/orchestrator.test.js.map +1 -1
- package/dist/pipeline/__tests__/stages.test.js +50 -5
- package/dist/pipeline/__tests__/stages.test.js.map +1 -1
- package/dist/pipeline/index.d.ts +8 -2
- package/dist/pipeline/index.d.ts.map +1 -1
- package/dist/pipeline/index.js +5 -2
- package/dist/pipeline/index.js.map +1 -1
- package/dist/pipeline/orchestrator.d.ts +5 -4
- package/dist/pipeline/orchestrator.d.ts.map +1 -1
- package/dist/pipeline/orchestrator.js +56 -15
- package/dist/pipeline/orchestrator.js.map +1 -1
- package/dist/pipeline/stages/code-review.d.ts +2 -2
- package/dist/pipeline/stages/code-review.d.ts.map +1 -1
- package/dist/pipeline/stages/code-review.js +5 -3
- package/dist/pipeline/stages/code-review.js.map +1 -1
- package/dist/pipeline/stages/deep-interview.d.ts +15 -0
- package/dist/pipeline/stages/deep-interview.d.ts.map +1 -0
- package/dist/pipeline/stages/deep-interview.js +32 -0
- package/dist/pipeline/stages/deep-interview.js.map +1 -0
- package/dist/pipeline/stages/ralph-verify.d.ts +5 -5
- package/dist/pipeline/stages/ralph-verify.d.ts.map +1 -1
- package/dist/pipeline/stages/ralph-verify.js +2 -2
- package/dist/pipeline/stages/ralph-verify.js.map +1 -1
- package/dist/pipeline/stages/ultragoal.d.ts +19 -0
- package/dist/pipeline/stages/ultragoal.d.ts.map +1 -0
- package/dist/pipeline/stages/ultragoal.js +38 -0
- package/dist/pipeline/stages/ultragoal.js.map +1 -0
- package/dist/pipeline/stages/ultraqa.d.ts +30 -0
- package/dist/pipeline/stages/ultraqa.d.ts.map +1 -0
- package/dist/pipeline/stages/ultraqa.js +46 -0
- package/dist/pipeline/stages/ultraqa.js.map +1 -0
- package/dist/pipeline/types.d.ts +8 -6
- package/dist/pipeline/types.d.ts.map +1 -1
- package/dist/pipeline/types.js +2 -2
- package/dist/scripts/__tests__/codex-native-hook.test.js +1488 -117
- package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
- package/dist/scripts/__tests__/notify-dispatcher.test.js +183 -1
- package/dist/scripts/__tests__/notify-dispatcher.test.js.map +1 -1
- package/dist/scripts/__tests__/smoke-packed-install.test.js +27 -2
- package/dist/scripts/__tests__/smoke-packed-install.test.js.map +1 -1
- package/dist/scripts/__tests__/verify-native-agents.test.js +16 -1
- package/dist/scripts/__tests__/verify-native-agents.test.js.map +1 -1
- package/dist/scripts/build-api.d.ts +2 -0
- package/dist/scripts/build-api.d.ts.map +1 -0
- package/dist/scripts/build-api.js +44 -0
- package/dist/scripts/build-api.js.map +1 -0
- package/dist/scripts/cleanup-explore-harness.js +1 -0
- package/dist/scripts/cleanup-explore-harness.js.map +1 -1
- package/dist/scripts/codex-native-hook.d.ts.map +1 -1
- package/dist/scripts/codex-native-hook.js +364 -16
- package/dist/scripts/codex-native-hook.js.map +1 -1
- package/dist/scripts/codex-native-pre-post.d.ts.map +1 -1
- package/dist/scripts/codex-native-pre-post.js +98 -25
- package/dist/scripts/codex-native-pre-post.js.map +1 -1
- package/dist/scripts/notify-dispatcher.js +88 -0
- package/dist/scripts/notify-dispatcher.js.map +1 -1
- package/dist/scripts/notify-hook/process-runner.d.ts.map +1 -1
- package/dist/scripts/notify-hook/process-runner.js +39 -17
- package/dist/scripts/notify-hook/process-runner.js.map +1 -1
- package/dist/scripts/notify-hook/team-dispatch.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-dispatch.js +36 -14
- package/dist/scripts/notify-hook/team-dispatch.js.map +1 -1
- package/dist/scripts/notify-hook/team-leader-nudge.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-leader-nudge.js +26 -11
- package/dist/scripts/notify-hook/team-leader-nudge.js.map +1 -1
- package/dist/scripts/notify-hook/team-tmux-guard.d.ts +2 -1
- package/dist/scripts/notify-hook/team-tmux-guard.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-tmux-guard.js +45 -1
- package/dist/scripts/notify-hook/team-tmux-guard.js.map +1 -1
- package/dist/scripts/notify-hook/team-worker-stop.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-worker-stop.js +27 -14
- package/dist/scripts/notify-hook/team-worker-stop.js.map +1 -1
- package/dist/scripts/run-provider-advisor.js +9 -3
- package/dist/scripts/run-provider-advisor.js.map +1 -1
- package/dist/scripts/smoke-packed-install.d.ts +4 -1
- package/dist/scripts/smoke-packed-install.d.ts.map +1 -1
- package/dist/scripts/smoke-packed-install.js +101 -1
- package/dist/scripts/smoke-packed-install.js.map +1 -1
- package/dist/scripts/sync-plugin-mirror.js +2 -2
- package/dist/scripts/sync-plugin-mirror.js.map +1 -1
- package/dist/scripts/verify-native-agents.js +2 -2
- package/dist/scripts/verify-native-agents.js.map +1 -1
- package/dist/sidecar/__tests__/resource-leak-watch.test.d.ts +2 -0
- package/dist/sidecar/__tests__/resource-leak-watch.test.d.ts.map +1 -0
- package/dist/sidecar/__tests__/resource-leak-watch.test.js +38 -0
- package/dist/sidecar/__tests__/resource-leak-watch.test.js.map +1 -0
- package/dist/sidecar/index.d.ts +1 -1
- package/dist/sidecar/index.d.ts.map +1 -1
- package/dist/sidecar/index.js +29 -12
- package/dist/sidecar/index.js.map +1 -1
- package/dist/state/__tests__/operations-ralph-phase.test.js +88 -1
- package/dist/state/__tests__/operations-ralph-phase.test.js.map +1 -1
- package/dist/state/operations.d.ts.map +1 -1
- package/dist/state/operations.js +11 -0
- package/dist/state/operations.js.map +1 -1
- package/dist/team/__tests__/runtime.test.js +2 -2
- package/dist/team/__tests__/runtime.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.test.js +207 -22
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/tmux-session.d.ts +1 -0
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +73 -28
- package/dist/team/tmux-session.js.map +1 -1
- package/dist/ultragoal/__tests__/artifacts.test.js +714 -10
- package/dist/ultragoal/__tests__/artifacts.test.js.map +1 -1
- package/dist/ultragoal/__tests__/docs-contract.test.js +57 -1
- package/dist/ultragoal/__tests__/docs-contract.test.js.map +1 -1
- package/dist/ultragoal/__tests__/steering-fixtures.d.ts +68 -0
- package/dist/ultragoal/__tests__/steering-fixtures.d.ts.map +1 -0
- package/dist/ultragoal/__tests__/steering-fixtures.js +259 -0
- package/dist/ultragoal/__tests__/steering-fixtures.js.map +1 -0
- package/dist/ultragoal/__tests__/steering-fixtures.test.d.ts +2 -0
- package/dist/ultragoal/__tests__/steering-fixtures.test.d.ts.map +1 -0
- package/dist/ultragoal/__tests__/steering-fixtures.test.js +65 -0
- package/dist/ultragoal/__tests__/steering-fixtures.test.js.map +1 -0
- package/dist/ultragoal/artifacts.d.ts +97 -2
- package/dist/ultragoal/artifacts.d.ts.map +1 -1
- package/dist/ultragoal/artifacts.js +811 -256
- package/dist/ultragoal/artifacts.js.map +1 -1
- package/dist/utils/__tests__/sleep-resource.test.d.ts +2 -0
- package/dist/utils/__tests__/sleep-resource.test.d.ts.map +1 -0
- package/dist/utils/__tests__/sleep-resource.test.js +39 -0
- package/dist/utils/__tests__/sleep-resource.test.js.map +1 -0
- package/dist/utils/sleep.d.ts.map +1 -1
- package/dist/utils/sleep.js +17 -6
- package/dist/utils/sleep.js.map +1 -1
- package/dist/verification/__tests__/ci-rust-gates.test.js +85 -10
- package/dist/verification/__tests__/ci-rust-gates.test.js.map +1 -1
- package/dist/verification/__tests__/explore-harness-release-workflow.test.js +1 -0
- package/dist/verification/__tests__/explore-harness-release-workflow.test.js.map +1 -1
- package/package.json +5 -3
- package/plugins/oh-my-codex/.codex-plugin/plugin.json +4 -3
- package/plugins/oh-my-codex/hooks/codex-native-hook.mjs +56 -0
- package/plugins/oh-my-codex/hooks/hooks.json +77 -0
- package/plugins/oh-my-codex/skills/autopilot/SKILL.md +77 -47
- package/plugins/oh-my-codex/skills/best-practice-research/SKILL.md +83 -0
- package/plugins/oh-my-codex/skills/cancel/SKILL.md +2 -2
- package/plugins/oh-my-codex/skills/deep-interview/SKILL.md +9 -8
- package/plugins/oh-my-codex/skills/omx-setup/SKILL.md +1 -1
- package/plugins/oh-my-codex/skills/pipeline/SKILL.md +22 -11
- package/plugins/oh-my-codex/skills/plan/SKILL.md +8 -8
- package/plugins/oh-my-codex/skills/ralph/SKILL.md +7 -0
- package/plugins/oh-my-codex/skills/ralplan/SKILL.md +5 -5
- package/plugins/oh-my-codex/skills/team/SKILL.md +1 -1
- package/plugins/oh-my-codex/skills/ultragoal/SKILL.md +38 -4
- package/plugins/oh-my-codex/skills/ultrawork/SKILL.md +1 -1
- package/prompts/planner.md +1 -1
- package/prompts/researcher.md +15 -10
- package/skills/autopilot/SKILL.md +77 -47
- package/skills/best-practice-research/SKILL.md +83 -0
- package/skills/cancel/SKILL.md +2 -2
- package/skills/deep-interview/SKILL.md +9 -8
- package/skills/omx-setup/SKILL.md +1 -1
- package/skills/pipeline/SKILL.md +22 -11
- package/skills/plan/SKILL.md +8 -8
- package/skills/ralph/SKILL.md +7 -0
- package/skills/ralplan/SKILL.md +5 -5
- package/skills/team/SKILL.md +1 -1
- package/skills/ultragoal/SKILL.md +38 -4
- package/skills/ultrawork/SKILL.md +1 -1
- package/src/scripts/__tests__/codex-native-hook.test.ts +1758 -166
- package/src/scripts/__tests__/notify-dispatcher.test.ts +223 -1
- package/src/scripts/__tests__/smoke-packed-install.test.ts +39 -2
- package/src/scripts/__tests__/verify-native-agents.test.ts +21 -1
- package/src/scripts/build-api.ts +48 -0
- package/src/scripts/cleanup-explore-harness.ts +1 -0
- package/src/scripts/codex-native-hook.ts +416 -18
- package/src/scripts/codex-native-pre-post.ts +119 -25
- package/src/scripts/notify-dispatcher.ts +97 -0
- package/src/scripts/notify-hook/process-runner.ts +40 -16
- package/src/scripts/notify-hook/team-dispatch.ts +36 -13
- package/src/scripts/notify-hook/team-leader-nudge.ts +25 -11
- package/src/scripts/notify-hook/team-tmux-guard.ts +49 -0
- package/src/scripts/notify-hook/team-worker-stop.ts +24 -13
- package/src/scripts/run-provider-advisor.ts +11 -3
- package/src/scripts/smoke-packed-install.ts +107 -0
- package/src/scripts/sync-plugin-mirror.ts +3 -3
- package/src/scripts/verify-native-agents.ts +2 -2
- package/templates/catalog-manifest.json +7 -0
|
@@ -8,12 +8,12 @@
|
|
|
8
8
|
|
|
9
9
|
import { appendFile, mkdir, rename, writeFile } from 'fs/promises';
|
|
10
10
|
import { dirname, join } from 'path';
|
|
11
|
-
import { DEFAULT_MARKER } from '../tmux-hook-engine.js';
|
|
11
|
+
import { DEFAULT_MARKER, paneHasActiveTask } from '../tmux-hook-engine.js';
|
|
12
12
|
import { appendTeamDeliveryLog } from '../../team/delivery-log.js';
|
|
13
13
|
import { safeString, asNumber } from './utils.js';
|
|
14
14
|
import { readJsonIfExists } from './state-io.js';
|
|
15
15
|
import { logTmuxHookEvent } from './log.js';
|
|
16
|
-
import { evaluatePaneInjectionReadiness, sendPaneInput } from './team-tmux-guard.js';
|
|
16
|
+
import { evaluatePaneInjectionReadiness, queuePaneInput, sendPaneInput } from './team-tmux-guard.js';
|
|
17
17
|
import { resolvePaneTarget } from './tmux-injection.js';
|
|
18
18
|
import { readTeamWorkersForIdleCheck } from './team-worker.js';
|
|
19
19
|
|
|
@@ -185,17 +185,28 @@ export async function maybeNudgeLeaderForAllowedWorkerStop({
|
|
|
185
185
|
+ DEFAULT_MARKER;
|
|
186
186
|
|
|
187
187
|
try {
|
|
188
|
-
const
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
188
|
+
const leaderHasActiveTask = paneHasActiveTask(paneGuard.paneCapture);
|
|
189
|
+
let deliveryMode = 'sent';
|
|
190
|
+
if (leaderHasActiveTask) {
|
|
191
|
+
const sendResult = await queuePaneInput({
|
|
192
|
+
paneTarget: tmuxTarget,
|
|
193
|
+
prompt,
|
|
194
|
+
});
|
|
195
|
+
if (!sendResult.ok) throw new Error(sendResult.error || sendResult.reason || 'send_failed');
|
|
196
|
+
deliveryMode = 'queued';
|
|
197
|
+
} else {
|
|
198
|
+
const sendResult = await sendPaneInput({
|
|
199
|
+
paneTarget: tmuxTarget,
|
|
200
|
+
prompt,
|
|
201
|
+
submitKeyPresses: 2,
|
|
202
|
+
submitDelayMs: 100,
|
|
203
|
+
});
|
|
204
|
+
if (!sendResult.ok) throw new Error(sendResult.error || sendResult.reason || 'send_failed');
|
|
205
|
+
}
|
|
195
206
|
|
|
196
207
|
await writeStopNudgeState(statePath, {
|
|
197
208
|
...nextState,
|
|
198
|
-
delivery:
|
|
209
|
+
delivery: deliveryMode,
|
|
199
210
|
leader_pane_id: leaderPaneId || null,
|
|
200
211
|
tmux_target: tmuxTarget,
|
|
201
212
|
});
|
|
@@ -205,7 +216,7 @@ export async function maybeNudgeLeaderForAllowedWorkerStop({
|
|
|
205
216
|
type: 'worker_stop_leader_nudge',
|
|
206
217
|
worker: workerName,
|
|
207
218
|
to_worker: 'leader-fixed',
|
|
208
|
-
delivery:
|
|
219
|
+
delivery: deliveryMode,
|
|
209
220
|
created_at: nowIso,
|
|
210
221
|
source_type: SOURCE_TYPE,
|
|
211
222
|
});
|
|
@@ -225,10 +236,10 @@ export async function maybeNudgeLeaderForAllowedWorkerStop({
|
|
|
225
236
|
from_worker: workerName,
|
|
226
237
|
to_worker: 'leader-fixed',
|
|
227
238
|
transport: 'send-keys',
|
|
228
|
-
result:
|
|
239
|
+
result: deliveryMode,
|
|
229
240
|
reason: 'worker_stop_allowed',
|
|
230
241
|
}).catch(() => {});
|
|
231
|
-
return { ok: true, result:
|
|
242
|
+
return { ok: true, result: deliveryMode };
|
|
232
243
|
} catch (err) {
|
|
233
244
|
await recordDeferred({
|
|
234
245
|
stateDir,
|
|
@@ -83,6 +83,16 @@ function shouldUseClaudeIssuePermissionsBypass(provider: string, prompt: string)
|
|
|
83
83
|
return ISSUE_WORK_PROMPT_PATTERNS.some((pattern) => pattern.test(trimmed));
|
|
84
84
|
}
|
|
85
85
|
|
|
86
|
+
function buildProviderLaunchArgs(provider: string, prompt: string, originalTask: string): string[] {
|
|
87
|
+
const promptArgs = provider === 'claude'
|
|
88
|
+
? ['-p', '--', prompt]
|
|
89
|
+
: ['-p', prompt];
|
|
90
|
+
|
|
91
|
+
return shouldUseClaudeIssuePermissionsBypass(provider, originalTask)
|
|
92
|
+
? [CLAUDE_SKIP_PERMISSIONS_FLAG, ...promptArgs]
|
|
93
|
+
: promptArgs;
|
|
94
|
+
}
|
|
95
|
+
|
|
86
96
|
function buildSummary(exitCode: number, output: string): string {
|
|
87
97
|
if (exitCode === 0) {
|
|
88
98
|
return 'Provider completed successfully. Review the raw output for details.';
|
|
@@ -165,9 +175,7 @@ async function main(): Promise<void> {
|
|
|
165
175
|
|
|
166
176
|
ensureBinary(binary);
|
|
167
177
|
|
|
168
|
-
const launchArgs =
|
|
169
|
-
? [CLAUDE_SKIP_PERMISSIONS_FLAG, '-p', prompt]
|
|
170
|
-
: ['-p', prompt];
|
|
178
|
+
const launchArgs = buildProviderLaunchArgs(provider, prompt, originalTask);
|
|
171
179
|
|
|
172
180
|
const run = spawnSync(binary, launchArgs, {
|
|
173
181
|
encoding: 'utf8',
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
mkdtempSync,
|
|
3
|
+
realpathSync,
|
|
3
4
|
rmSync,
|
|
4
5
|
} from 'node:fs';
|
|
5
6
|
import { mkdirSync } from 'node:fs';
|
|
@@ -20,6 +21,18 @@ export {
|
|
|
20
21
|
export const PACKED_INSTALL_SMOKE_CORE_COMMANDS = [
|
|
21
22
|
['--help'],
|
|
22
23
|
['version'],
|
|
24
|
+
['api', '--help'],
|
|
25
|
+
['sparkshell', '--help'],
|
|
26
|
+
] as const;
|
|
27
|
+
|
|
28
|
+
export const PACKED_INSTALL_NATIVE_HOOK_SMOKE_EVENTS = [
|
|
29
|
+
'SessionStart',
|
|
30
|
+
'PreToolUse',
|
|
31
|
+
'PostToolUse',
|
|
32
|
+
'UserPromptSubmit',
|
|
33
|
+
'PreCompact',
|
|
34
|
+
'PostCompact',
|
|
35
|
+
'Stop',
|
|
23
36
|
] as const;
|
|
24
37
|
|
|
25
38
|
function usage(): string {
|
|
@@ -110,6 +123,99 @@ function npmBinName(name: string): string {
|
|
|
110
123
|
return process.platform === 'win32' ? `${name}.cmd` : name;
|
|
111
124
|
}
|
|
112
125
|
|
|
126
|
+
function resolveGlobalNodeModules(prefixDir: string): string {
|
|
127
|
+
const result = run('npm', ['root', '-g', '--prefix', prefixDir], { cwd: prefixDir });
|
|
128
|
+
const root = String(result.stdout || '').trim();
|
|
129
|
+
if (!root) throw new Error('npm root -g did not return a node_modules directory');
|
|
130
|
+
return root;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
export function validateHookStdout(eventName: string, stdout: string): void {
|
|
134
|
+
const trimmed = stdout.trim();
|
|
135
|
+
if (!trimmed) return;
|
|
136
|
+
try {
|
|
137
|
+
JSON.parse(trimmed);
|
|
138
|
+
} catch (error) {
|
|
139
|
+
throw new Error(
|
|
140
|
+
`native hook ${eventName} emitted invalid JSON stdout: ${error instanceof Error ? error.message : String(error)}`,
|
|
141
|
+
);
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
export function buildNativeHookSmokePayload(
|
|
146
|
+
eventName: typeof PACKED_INSTALL_NATIVE_HOOK_SMOKE_EVENTS[number],
|
|
147
|
+
smokeCwd: string,
|
|
148
|
+
): Record<string, unknown> {
|
|
149
|
+
const base = {
|
|
150
|
+
hook_event_name: eventName,
|
|
151
|
+
session_id: `packed-install-smoke-${eventName}`,
|
|
152
|
+
cwd: smokeCwd,
|
|
153
|
+
};
|
|
154
|
+
switch (eventName) {
|
|
155
|
+
case 'SessionStart':
|
|
156
|
+
return {
|
|
157
|
+
...base,
|
|
158
|
+
transcript_path: join(smokeCwd, 'nonexistent-transcript.jsonl'),
|
|
159
|
+
};
|
|
160
|
+
case 'PreToolUse':
|
|
161
|
+
return {
|
|
162
|
+
...base,
|
|
163
|
+
tool_name: 'Bash',
|
|
164
|
+
tool_use_id: 'packed-install-smoke-tool',
|
|
165
|
+
tool_input: { command: 'echo packed install smoke' },
|
|
166
|
+
};
|
|
167
|
+
case 'PostToolUse':
|
|
168
|
+
return {
|
|
169
|
+
...base,
|
|
170
|
+
tool_name: 'Bash',
|
|
171
|
+
tool_use_id: 'packed-install-smoke-tool',
|
|
172
|
+
tool_input: { command: 'echo packed install smoke' },
|
|
173
|
+
tool_response: {
|
|
174
|
+
exit_code: 0,
|
|
175
|
+
stdout: 'packed install smoke\n',
|
|
176
|
+
stderr: '',
|
|
177
|
+
},
|
|
178
|
+
};
|
|
179
|
+
case 'UserPromptSubmit':
|
|
180
|
+
return {
|
|
181
|
+
...base,
|
|
182
|
+
transcript_path: join(smokeCwd, 'nonexistent-transcript.jsonl'),
|
|
183
|
+
prompt: 'packed install native hook smoke test',
|
|
184
|
+
};
|
|
185
|
+
case 'PreCompact':
|
|
186
|
+
case 'PostCompact':
|
|
187
|
+
case 'Stop':
|
|
188
|
+
return base;
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
function smokeInstalledNativeHookDist(prefixDir: string): void {
|
|
193
|
+
const globalNodeModules = resolveGlobalNodeModules(prefixDir);
|
|
194
|
+
const packageRoot = join(globalNodeModules, 'oh-my-codex');
|
|
195
|
+
const hookScript = join(packageRoot, 'dist', 'scripts', 'codex-native-hook.js');
|
|
196
|
+
const smokeCwd = mkdtempSync(join(tmpdir(), 'omx-packed-hook-smoke-'));
|
|
197
|
+
try {
|
|
198
|
+
for (const eventName of PACKED_INSTALL_NATIVE_HOOK_SMOKE_EVENTS) {
|
|
199
|
+
const payload = buildNativeHookSmokePayload(eventName, smokeCwd);
|
|
200
|
+
const result = run(process.execPath, [realpathSync(hookScript)], {
|
|
201
|
+
cwd: smokeCwd,
|
|
202
|
+
env: {
|
|
203
|
+
...process.env,
|
|
204
|
+
OMX_NATIVE_HOOK_DOCTOR_SMOKE: '1',
|
|
205
|
+
OMX_ROOT: join(smokeCwd, '.omx-packed-hook-root'),
|
|
206
|
+
OMX_SESSION_ID: `packed-install-smoke-${eventName}`,
|
|
207
|
+
OMX_SOURCE_CWD: smokeCwd,
|
|
208
|
+
OMX_STARTUP_CWD: smokeCwd,
|
|
209
|
+
},
|
|
210
|
+
input: JSON.stringify(payload),
|
|
211
|
+
});
|
|
212
|
+
validateHookStdout(eventName, result.stdout as string);
|
|
213
|
+
}
|
|
214
|
+
} finally {
|
|
215
|
+
rmSync(smokeCwd, { recursive: true, force: true });
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
|
|
113
219
|
export function parseNpmPackJsonOutput(stdout: string): Array<{ filename: string }> {
|
|
114
220
|
const start = stdout.lastIndexOf('\n[');
|
|
115
221
|
const jsonText = (start >= 0 ? stdout.slice(start + 1) : stdout).trim();
|
|
@@ -145,6 +251,7 @@ async function main(): Promise<void> {
|
|
|
145
251
|
for (const argv of PACKED_INSTALL_SMOKE_CORE_COMMANDS) {
|
|
146
252
|
run(omxPath, argv, { cwd: repoRoot });
|
|
147
253
|
}
|
|
254
|
+
smokeInstalledNativeHookDist(prefixDir);
|
|
148
255
|
|
|
149
256
|
console.log('packed install smoke: PASS');
|
|
150
257
|
} finally {
|
|
@@ -55,7 +55,6 @@ const PLUGIN_NAME = "oh-my-codex";
|
|
|
55
55
|
const SETUP_OWNED_PLUGIN_MANIFEST_FIELDS = [
|
|
56
56
|
"agents",
|
|
57
57
|
"prompts",
|
|
58
|
-
"hooks",
|
|
59
58
|
] as const;
|
|
60
59
|
|
|
61
60
|
async function readJsonFile<T>(path: string): Promise<T> {
|
|
@@ -199,13 +198,14 @@ async function assertPluginManifestPolicy(
|
|
|
199
198
|
const pkg = await readJsonFile<PackageJson>(join(root, "package.json"));
|
|
200
199
|
const expectedFields: Pick<
|
|
201
200
|
PluginManifest,
|
|
202
|
-
"name" | "version" | "skills" | "mcpServers" | "apps"
|
|
201
|
+
"name" | "version" | "skills" | "mcpServers" | "apps" | "hooks"
|
|
203
202
|
> = {
|
|
204
203
|
name: PLUGIN_NAME,
|
|
205
204
|
version: pkg.version,
|
|
206
205
|
skills: "./skills/",
|
|
207
206
|
mcpServers: "./.mcp.json",
|
|
208
207
|
apps: "./.app.json",
|
|
208
|
+
hooks: "./hooks/hooks.json",
|
|
209
209
|
};
|
|
210
210
|
|
|
211
211
|
for (const [field, expectedValue] of Object.entries(expectedFields)) {
|
|
@@ -229,7 +229,7 @@ async function assertPluginManifestPolicy(
|
|
|
229
229
|
"plugin_bundle_metadata_out_of_sync",
|
|
230
230
|
"kind=plugin-manifest",
|
|
231
231
|
`field=${field}`,
|
|
232
|
-
"message=setup-owned agents/prompts
|
|
232
|
+
"message=setup-owned agents/prompts must not be plugin-scoped",
|
|
233
233
|
].join("\n"),
|
|
234
234
|
);
|
|
235
235
|
}
|
|
@@ -199,11 +199,11 @@ export async function verifyNativeAgents(
|
|
|
199
199
|
? await readPluginManifest(root)
|
|
200
200
|
: options.pluginManifest;
|
|
201
201
|
if (pluginManifest) {
|
|
202
|
-
for (const field of ["agents", "prompts"
|
|
202
|
+
for (const field of ["agents", "prompts"]) {
|
|
203
203
|
if (pluginManifest[field] !== undefined) {
|
|
204
204
|
throw errorBlock("native_agent_plugin_boundary_violation", {
|
|
205
205
|
field,
|
|
206
|
-
message: "native agents/prompts
|
|
206
|
+
message: "native agents/prompts are setup-owned, not plugin-scoped",
|
|
207
207
|
});
|
|
208
208
|
}
|
|
209
209
|
}
|
|
@@ -108,6 +108,13 @@
|
|
|
108
108
|
"core": false,
|
|
109
109
|
"internalRequired": false
|
|
110
110
|
},
|
|
111
|
+
{
|
|
112
|
+
"name": "best-practice-research",
|
|
113
|
+
"category": "planning",
|
|
114
|
+
"status": "active",
|
|
115
|
+
"core": false,
|
|
116
|
+
"internalRequired": false
|
|
117
|
+
},
|
|
111
118
|
{
|
|
112
119
|
"name": "analyze",
|
|
113
120
|
"category": "shortcut",
|