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
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { describe, it } from "node:test";
|
|
2
2
|
import assert from "node:assert/strict";
|
|
3
|
-
import { existsSync } from "node:fs";
|
|
3
|
+
import { chmodSync, existsSync } from "node:fs";
|
|
4
4
|
import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "node:fs";
|
|
5
5
|
import { tmpdir } from "node:os";
|
|
6
6
|
import { join } from "node:path";
|
|
@@ -91,6 +91,228 @@ describe("notify dispatcher previousNotify guard", () => {
|
|
|
91
91
|
}
|
|
92
92
|
});
|
|
93
93
|
|
|
94
|
+
it("skips stale turn-ended wrappers whose previousNotify is an OMX dispatcher", () => {
|
|
95
|
+
const wd = mkdtempSync(join(tmpdir(), "omx-notify-dispatcher-wrapper-"));
|
|
96
|
+
try {
|
|
97
|
+
const oldPkgScripts = join(wd, "global", "oh-my-codex", "dist", "scripts");
|
|
98
|
+
mkdirSync(oldPkgScripts, { recursive: true });
|
|
99
|
+
const stalePreviousMarker = join(wd, "stale-wrapper-ran");
|
|
100
|
+
const omxMarker = join(wd, "omx-ran");
|
|
101
|
+
const staleDispatcher = join(oldPkgScripts, "notify-dispatcher.js");
|
|
102
|
+
const turnEndedWrapper = join(wd, "SkyComputerUseClient");
|
|
103
|
+
const omxHook = join(wd, "current-notify-hook.js");
|
|
104
|
+
writeFileSync(
|
|
105
|
+
turnEndedWrapper,
|
|
106
|
+
`import { writeFileSync } from "node:fs"; writeFileSync(${JSON.stringify(stalePreviousMarker)}, "ran");\n`,
|
|
107
|
+
);
|
|
108
|
+
writeFileSync(omxHook, `import { writeFileSync } from "node:fs"; writeFileSync(${JSON.stringify(omxMarker)}, "ran");\n`);
|
|
109
|
+
const metadataPath = join(wd, "notify-dispatch.json");
|
|
110
|
+
writeFileSync(
|
|
111
|
+
metadataPath,
|
|
112
|
+
JSON.stringify({
|
|
113
|
+
managedBy: "oh-my-codex",
|
|
114
|
+
version: 1,
|
|
115
|
+
previousNotify: [
|
|
116
|
+
process.execPath,
|
|
117
|
+
turnEndedWrapper,
|
|
118
|
+
"turn-ended",
|
|
119
|
+
"--previous-notify",
|
|
120
|
+
JSON.stringify([
|
|
121
|
+
process.execPath,
|
|
122
|
+
staleDispatcher,
|
|
123
|
+
"--metadata",
|
|
124
|
+
metadataPath,
|
|
125
|
+
]),
|
|
126
|
+
],
|
|
127
|
+
omxNotify: [process.execPath, omxHook],
|
|
128
|
+
}),
|
|
129
|
+
);
|
|
130
|
+
|
|
131
|
+
runDispatcher(metadataPath);
|
|
132
|
+
|
|
133
|
+
assert.equal(existsSync(stalePreviousMarker), false);
|
|
134
|
+
assert.equal(readFileSync(omxMarker, "utf-8"), "ran");
|
|
135
|
+
} finally {
|
|
136
|
+
rmSync(wd, { recursive: true, force: true });
|
|
137
|
+
}
|
|
138
|
+
});
|
|
139
|
+
|
|
140
|
+
it("skips stale turn-ended wrappers whose previousNotify text is an OMX hook", () => {
|
|
141
|
+
const wd = mkdtempSync(join(tmpdir(), "omx-notify-dispatcher-wrapper-text-"));
|
|
142
|
+
try {
|
|
143
|
+
const oldPkgScripts = join(wd, "global", "oh-my-codex", "dist", "scripts");
|
|
144
|
+
mkdirSync(oldPkgScripts, { recursive: true });
|
|
145
|
+
const stalePreviousMarker = join(wd, "stale-wrapper-ran");
|
|
146
|
+
const omxMarker = join(wd, "omx-ran");
|
|
147
|
+
const staleHook = join(oldPkgScripts, "notify-hook.js");
|
|
148
|
+
const turnEndedWrapper = join(wd, "SkyComputerUseClient");
|
|
149
|
+
const omxHook = join(wd, "current-notify-hook.js");
|
|
150
|
+
writeFileSync(
|
|
151
|
+
turnEndedWrapper,
|
|
152
|
+
`import { writeFileSync } from "node:fs"; writeFileSync(${JSON.stringify(stalePreviousMarker)}, "ran");\n`,
|
|
153
|
+
);
|
|
154
|
+
writeFileSync(omxHook, `import { writeFileSync } from "node:fs"; writeFileSync(${JSON.stringify(omxMarker)}, "ran");\n`);
|
|
155
|
+
const metadataPath = join(wd, "notify-dispatch.json");
|
|
156
|
+
writeFileSync(
|
|
157
|
+
metadataPath,
|
|
158
|
+
JSON.stringify({
|
|
159
|
+
managedBy: "oh-my-codex",
|
|
160
|
+
version: 1,
|
|
161
|
+
previousNotify: [
|
|
162
|
+
process.execPath,
|
|
163
|
+
turnEndedWrapper,
|
|
164
|
+
"turn-ended",
|
|
165
|
+
`--previous-notify=node ${staleHook}`,
|
|
166
|
+
],
|
|
167
|
+
omxNotify: [process.execPath, omxHook],
|
|
168
|
+
}),
|
|
169
|
+
);
|
|
170
|
+
|
|
171
|
+
runDispatcher(metadataPath);
|
|
172
|
+
|
|
173
|
+
assert.equal(existsSync(stalePreviousMarker), false);
|
|
174
|
+
assert.equal(readFileSync(omxMarker, "utf-8"), "ran");
|
|
175
|
+
} finally {
|
|
176
|
+
rmSync(wd, { recursive: true, force: true });
|
|
177
|
+
}
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
it("skips SkyComputerUseClient wrappers with quoted nested previousNotify self-references", () => {
|
|
181
|
+
const wd = mkdtempSync(join(tmpdir(), "omx-notify-dispatcher-nested-wrapper-"));
|
|
182
|
+
try {
|
|
183
|
+
const oldPkgScripts = join(wd, "global", "oh-my-codex", "dist", "scripts");
|
|
184
|
+
mkdirSync(oldPkgScripts, { recursive: true });
|
|
185
|
+
const stalePreviousMarker = join(wd, "nested-wrapper-ran");
|
|
186
|
+
const omxMarker = join(wd, "omx-ran");
|
|
187
|
+
const staleDispatcher = join(oldPkgScripts, "notify-dispatcher.js");
|
|
188
|
+
const turnEndedWrapper = join(wd, "SkyComputerUseClient");
|
|
189
|
+
const omxHook = join(wd, "current-notify-hook.js");
|
|
190
|
+
writeFileSync(
|
|
191
|
+
turnEndedWrapper,
|
|
192
|
+
`import { writeFileSync } from "node:fs"; writeFileSync(${JSON.stringify(stalePreviousMarker)}, "ran");\n`,
|
|
193
|
+
);
|
|
194
|
+
writeFileSync(omxHook, `import { writeFileSync } from "node:fs"; writeFileSync(${JSON.stringify(omxMarker)}, "ran");\n`);
|
|
195
|
+
const metadataPath = join(wd, "notify-dispatch.json");
|
|
196
|
+
const nestedSelfReference = JSON.stringify([
|
|
197
|
+
process.execPath,
|
|
198
|
+
turnEndedWrapper,
|
|
199
|
+
"turn-ended",
|
|
200
|
+
"--previous-notify",
|
|
201
|
+
JSON.stringify([process.execPath, staleDispatcher, "--metadata", metadataPath]),
|
|
202
|
+
]);
|
|
203
|
+
writeFileSync(
|
|
204
|
+
metadataPath,
|
|
205
|
+
JSON.stringify({
|
|
206
|
+
managedBy: "oh-my-codex",
|
|
207
|
+
version: 1,
|
|
208
|
+
previousNotify: [
|
|
209
|
+
process.execPath,
|
|
210
|
+
turnEndedWrapper,
|
|
211
|
+
"turn-ended",
|
|
212
|
+
"--previous-notify",
|
|
213
|
+
JSON.stringify(nestedSelfReference),
|
|
214
|
+
],
|
|
215
|
+
omxNotify: [process.execPath, omxHook],
|
|
216
|
+
}),
|
|
217
|
+
);
|
|
218
|
+
|
|
219
|
+
runDispatcher(metadataPath);
|
|
220
|
+
|
|
221
|
+
assert.equal(existsSync(stalePreviousMarker), false);
|
|
222
|
+
assert.equal(readFileSync(omxMarker, "utf-8"), "ran");
|
|
223
|
+
} finally {
|
|
224
|
+
rmSync(wd, { recursive: true, force: true });
|
|
225
|
+
}
|
|
226
|
+
});
|
|
227
|
+
|
|
228
|
+
it("skips wrapper metadata objects with encoded OMX dispatcher payloads", () => {
|
|
229
|
+
const wd = mkdtempSync(join(tmpdir(), "omx-notify-dispatcher-object-wrapper-"));
|
|
230
|
+
try {
|
|
231
|
+
const oldPkgScripts = join(wd, "global", "oh-my-codex", "dist", "scripts");
|
|
232
|
+
mkdirSync(oldPkgScripts, { recursive: true });
|
|
233
|
+
const stalePreviousMarker = join(wd, "object-wrapper-ran");
|
|
234
|
+
const omxMarker = join(wd, "omx-ran");
|
|
235
|
+
const staleDispatcher = join(oldPkgScripts, "notify-dispatcher.js");
|
|
236
|
+
const turnEndedWrapper = join(wd, "SkyComputerUseClient");
|
|
237
|
+
const omxHook = join(wd, "current-notify-hook.js");
|
|
238
|
+
writeFileSync(
|
|
239
|
+
turnEndedWrapper,
|
|
240
|
+
`import { writeFileSync } from "node:fs"; writeFileSync(${JSON.stringify(stalePreviousMarker)}, "ran");\n`,
|
|
241
|
+
);
|
|
242
|
+
writeFileSync(omxHook, `import { writeFileSync } from "node:fs"; writeFileSync(${JSON.stringify(omxMarker)}, "ran");\n`);
|
|
243
|
+
const metadataPath = join(wd, "notify-dispatch.json");
|
|
244
|
+
writeFileSync(
|
|
245
|
+
metadataPath,
|
|
246
|
+
JSON.stringify({
|
|
247
|
+
managedBy: "oh-my-codex",
|
|
248
|
+
version: 1,
|
|
249
|
+
previousNotify: [
|
|
250
|
+
process.execPath,
|
|
251
|
+
turnEndedWrapper,
|
|
252
|
+
"turn-ended",
|
|
253
|
+
`--previous-notify=${JSON.stringify({ previousNotify: JSON.stringify([process.execPath, staleDispatcher]) })}`,
|
|
254
|
+
],
|
|
255
|
+
omxNotify: [process.execPath, omxHook],
|
|
256
|
+
}),
|
|
257
|
+
);
|
|
258
|
+
|
|
259
|
+
runDispatcher(metadataPath);
|
|
260
|
+
|
|
261
|
+
assert.equal(existsSync(stalePreviousMarker), false);
|
|
262
|
+
assert.equal(readFileSync(omxMarker, "utf-8"), "ran");
|
|
263
|
+
} finally {
|
|
264
|
+
rmSync(wd, { recursive: true, force: true });
|
|
265
|
+
}
|
|
266
|
+
});
|
|
267
|
+
|
|
268
|
+
it("skips reporter-shaped SkyComputerUseClient previousNotify dispatcher recursion", () => {
|
|
269
|
+
const wd = mkdtempSync(join(tmpdir(), "omx-notify-dispatcher-reporter-wrapper-"));
|
|
270
|
+
try {
|
|
271
|
+
const pkgScripts = join(wd, "pkg-without-managed-name", "dist", "scripts");
|
|
272
|
+
mkdirSync(pkgScripts, { recursive: true });
|
|
273
|
+
const stalePreviousMarker = join(wd, "skycomputer-ran");
|
|
274
|
+
const omxMarker = join(wd, "omx-ran");
|
|
275
|
+
const dispatcher = join(pkgScripts, "notify-dispatcher.js");
|
|
276
|
+
const turnEndedWrapper = join(wd, "SkyComputerUseClient");
|
|
277
|
+
const omxHook = join(wd, "current-notify-hook.js");
|
|
278
|
+
writeFileSync(dispatcher, `import { writeFileSync } from "node:fs"; writeFileSync(${JSON.stringify(stalePreviousMarker)}, "dispatcher");\n`);
|
|
279
|
+
writeFileSync(
|
|
280
|
+
turnEndedWrapper,
|
|
281
|
+
`#!/usr/bin/env node\nimport { appendFileSync } from "node:fs"; appendFileSync(${JSON.stringify(stalePreviousMarker)}, "wrapper\\n");\n`,
|
|
282
|
+
);
|
|
283
|
+
chmodSync(turnEndedWrapper, 0o755);
|
|
284
|
+
writeFileSync(omxHook, `import { appendFileSync } from "node:fs"; appendFileSync(${JSON.stringify(omxMarker)}, "omx\\n");\n`);
|
|
285
|
+
const metadataPath = join(wd, "notify-dispatch.json");
|
|
286
|
+
writeFileSync(
|
|
287
|
+
metadataPath,
|
|
288
|
+
JSON.stringify({
|
|
289
|
+
managedBy: "oh-my-codex",
|
|
290
|
+
version: 1,
|
|
291
|
+
previousNotify: [
|
|
292
|
+
turnEndedWrapper,
|
|
293
|
+
"turn-ended",
|
|
294
|
+
"--previous-notify",
|
|
295
|
+
JSON.stringify([
|
|
296
|
+
"node",
|
|
297
|
+
dispatcher,
|
|
298
|
+
"--metadata",
|
|
299
|
+
metadataPath,
|
|
300
|
+
]),
|
|
301
|
+
],
|
|
302
|
+
omxNotify: [process.execPath, omxHook],
|
|
303
|
+
dispatcherNotify: ["node", dispatcher, "--metadata", metadataPath],
|
|
304
|
+
}),
|
|
305
|
+
);
|
|
306
|
+
|
|
307
|
+
runDispatcher(metadataPath);
|
|
308
|
+
|
|
309
|
+
assert.equal(existsSync(stalePreviousMarker), false);
|
|
310
|
+
assert.equal(readFileSync(omxMarker, "utf-8"), "omx\n");
|
|
311
|
+
} finally {
|
|
312
|
+
rmSync(wd, { recursive: true, force: true });
|
|
313
|
+
}
|
|
314
|
+
});
|
|
315
|
+
|
|
94
316
|
it("preserves and runs real user previousNotify entries", () => {
|
|
95
317
|
const wd = mkdtempSync(join(tmpdir(), "omx-notify-dispatcher-user-"));
|
|
96
318
|
try {
|
|
@@ -7,20 +7,57 @@ import { test } from 'node:test';
|
|
|
7
7
|
import {
|
|
8
8
|
ensureRepoDependencies,
|
|
9
9
|
hasUsableNodeModules,
|
|
10
|
+
buildNativeHookSmokePayload,
|
|
11
|
+
PACKED_INSTALL_NATIVE_HOOK_SMOKE_EVENTS,
|
|
10
12
|
PACKED_INSTALL_SMOKE_CORE_COMMANDS,
|
|
11
13
|
parseNpmPackJsonOutput,
|
|
12
14
|
resolveGitCommonDir,
|
|
13
15
|
resolveReusableNodeModulesSource,
|
|
16
|
+
validateHookStdout,
|
|
14
17
|
} from '../smoke-packed-install.js';
|
|
15
18
|
|
|
16
19
|
test('packed install smoke stays limited to boot + core commands', () => {
|
|
17
20
|
assert.deepEqual(PACKED_INSTALL_SMOKE_CORE_COMMANDS, [
|
|
18
21
|
['--help'],
|
|
19
22
|
['version'],
|
|
23
|
+
['api', '--help'],
|
|
24
|
+
['sparkshell', '--help'],
|
|
20
25
|
]);
|
|
21
26
|
assert.equal(
|
|
22
|
-
PACKED_INSTALL_SMOKE_CORE_COMMANDS.some((argv) => argv.includes('
|
|
23
|
-
|
|
27
|
+
PACKED_INSTALL_SMOKE_CORE_COMMANDS.some((argv) => argv.includes('api')),
|
|
28
|
+
true,
|
|
29
|
+
);
|
|
30
|
+
assert.equal(
|
|
31
|
+
PACKED_INSTALL_SMOKE_CORE_COMMANDS.some((argv) => argv.includes('sparkshell')),
|
|
32
|
+
true,
|
|
33
|
+
);
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
test('packed install smoke covers every installed native hook event with minimal payloads', () => {
|
|
37
|
+
assert.deepEqual(PACKED_INSTALL_NATIVE_HOOK_SMOKE_EVENTS, [
|
|
38
|
+
'SessionStart',
|
|
39
|
+
'PreToolUse',
|
|
40
|
+
'PostToolUse',
|
|
41
|
+
'UserPromptSubmit',
|
|
42
|
+
'PreCompact',
|
|
43
|
+
'PostCompact',
|
|
44
|
+
'Stop',
|
|
45
|
+
]);
|
|
46
|
+
|
|
47
|
+
for (const eventName of PACKED_INSTALL_NATIVE_HOOK_SMOKE_EVENTS) {
|
|
48
|
+
const payload = buildNativeHookSmokePayload(eventName, '/tmp/omx-packed-hook-smoke');
|
|
49
|
+
assert.equal(payload.hook_event_name, eventName);
|
|
50
|
+
assert.equal(typeof payload.session_id, 'string');
|
|
51
|
+
assert.equal(payload.cwd, '/tmp/omx-packed-hook-smoke');
|
|
52
|
+
}
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
test('packed install native hook stdout validation allows empty or JSON output only', () => {
|
|
56
|
+
assert.doesNotThrow(() => validateHookStdout('PostCompact', ''));
|
|
57
|
+
assert.doesNotThrow(() => validateHookStdout('Stop', '{}\n'));
|
|
58
|
+
assert.throws(
|
|
59
|
+
() => validateHookStdout('UserPromptSubmit', '{not json'),
|
|
60
|
+
/native hook UserPromptSubmit emitted invalid JSON stdout/,
|
|
24
61
|
);
|
|
25
62
|
});
|
|
26
63
|
|
|
@@ -53,7 +53,7 @@ describe("verify-native-agents", () => {
|
|
|
53
53
|
]),
|
|
54
54
|
definitions: { executor: definition, "style-reviewer": { ...definition, name: "style-reviewer" } },
|
|
55
55
|
promptNames: new Set(["executor", "style-reviewer", "explore-harness"]),
|
|
56
|
-
pluginManifest: { skills: "./skills/" },
|
|
56
|
+
pluginManifest: { skills: "./skills/", hooks: "./hooks/hooks.json" },
|
|
57
57
|
});
|
|
58
58
|
|
|
59
59
|
assert.deepEqual(result.installableAgentNames, ["executor"]);
|
|
@@ -183,6 +183,26 @@ describe("verify-native-agents", () => {
|
|
|
183
183
|
pluginManifest: { agents: "./agents/" },
|
|
184
184
|
}),
|
|
185
185
|
);
|
|
186
|
+
|
|
187
|
+
await rejectsWithCode("native_agent_plugin_boundary_violation", () =>
|
|
188
|
+
verifyNativeAgents({
|
|
189
|
+
manifest: manifest([{ name: "executor", category: "build", status: "active" }]),
|
|
190
|
+
definitions: { executor: definition },
|
|
191
|
+
promptNames: new Set(["executor"]),
|
|
192
|
+
pluginManifest: { prompts: "./prompts/" },
|
|
193
|
+
}),
|
|
194
|
+
);
|
|
195
|
+
});
|
|
196
|
+
|
|
197
|
+
it("allows plugin-scoped lifecycle hooks without treating them as native agents", async () => {
|
|
198
|
+
const result = await verifyNativeAgents({
|
|
199
|
+
manifest: manifest([{ name: "executor", category: "build", status: "active" }]),
|
|
200
|
+
definitions: { executor: definition },
|
|
201
|
+
promptNames: new Set(["executor"]),
|
|
202
|
+
pluginManifest: { hooks: "./hooks/hooks.json" },
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
assert.deepEqual(result.installableAgentNames, ["executor"]);
|
|
186
206
|
});
|
|
187
207
|
|
|
188
208
|
it("keeps merged prompt-backed agents out of the installable set", () => {
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { chmodSync, copyFileSync, existsSync, mkdirSync } from 'node:fs';
|
|
2
|
+
import { arch, platform } from 'node:os';
|
|
3
|
+
import { dirname, join } from 'node:path';
|
|
4
|
+
import { fileURLToPath } from 'node:url';
|
|
5
|
+
import { spawnSync } from 'node:child_process';
|
|
6
|
+
|
|
7
|
+
const __filename = fileURLToPath(import.meta.url);
|
|
8
|
+
const __dirname = dirname(__filename);
|
|
9
|
+
const projectRoot = join(__dirname, '..', '..');
|
|
10
|
+
const nativeRoot = join(projectRoot, 'crates', 'omx-api');
|
|
11
|
+
const manifestPath = process.env.OMX_API_MANIFEST ?? join(nativeRoot, 'Cargo.toml');
|
|
12
|
+
const binaryName = platform() === 'win32' ? 'omx-api.exe' : 'omx-api';
|
|
13
|
+
const releaseBinaryPath = join(projectRoot, 'target', 'release', binaryName);
|
|
14
|
+
const stagedBinaryRoot = process.env.OMX_API_STAGE_DIR
|
|
15
|
+
? join(process.env.OMX_API_STAGE_DIR, `${platform()}-${arch()}`)
|
|
16
|
+
: join(projectRoot, 'bin', 'native', `${platform()}-${arch()}`);
|
|
17
|
+
const packagedBinaryDir = stagedBinaryRoot;
|
|
18
|
+
const packagedBinaryPath = join(packagedBinaryDir, binaryName);
|
|
19
|
+
const extraArgs = process.argv.slice(2);
|
|
20
|
+
const args = ['build', '--manifest-path', manifestPath, '--release', ...extraArgs];
|
|
21
|
+
|
|
22
|
+
if (!existsSync(manifestPath)) {
|
|
23
|
+
console.error(`omx api build: missing Rust manifest at ${manifestPath}`);
|
|
24
|
+
process.exit(1);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
const result = spawnSync('cargo', args, {
|
|
28
|
+
cwd: projectRoot,
|
|
29
|
+
stdio: 'inherit',
|
|
30
|
+
env: process.env,
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
if (result.error) {
|
|
34
|
+
console.error(`omx api build: failed to launch cargo: ${result.error.message}`);
|
|
35
|
+
process.exit(1);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if ((result.status ?? 1) !== 0) process.exit(result.status ?? 1);
|
|
39
|
+
|
|
40
|
+
if (!existsSync(releaseBinaryPath)) {
|
|
41
|
+
console.error(`omx api build: expected release binary at ${releaseBinaryPath}`);
|
|
42
|
+
process.exit(1);
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
mkdirSync(packagedBinaryDir, { recursive: true });
|
|
46
|
+
copyFileSync(releaseBinaryPath, packagedBinaryPath);
|
|
47
|
+
if (platform() !== 'win32') chmodSync(packagedBinaryPath, 0o755);
|
|
48
|
+
console.log(`omx api build: staged native binary at ${packagedBinaryPath}`);
|
|
@@ -12,6 +12,7 @@ for (const path of [
|
|
|
12
12
|
join(root, 'bin', 'omx-explore-harness.exe'),
|
|
13
13
|
join(root, 'bin', 'omx-explore-harness.meta.json'),
|
|
14
14
|
join(root, 'bin', 'native'),
|
|
15
|
+
join(root, 'crates', 'omx-sparkshell', '.omx'),
|
|
15
16
|
]) {
|
|
16
17
|
await rm(path, { recursive: true, force: true });
|
|
17
18
|
}
|