oh-my-codex 0.16.0 → 0.16.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Cargo.lock +5 -5
- package/Cargo.toml +1 -1
- package/README.md +2 -2
- package/crates/omx-explore/src/main.rs +434 -28
- package/dist/agents/__tests__/native-config.test.js +50 -0
- package/dist/agents/__tests__/native-config.test.js.map +1 -1
- package/dist/agents/native-config.d.ts.map +1 -1
- package/dist/agents/native-config.js +3 -2
- package/dist/agents/native-config.js.map +1 -1
- package/dist/cli/__tests__/codex-plugin-layout.test.js +1 -0
- package/dist/cli/__tests__/codex-plugin-layout.test.js.map +1 -1
- package/dist/cli/__tests__/doctor-warning-copy.test.js +1 -1
- package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
- package/dist/cli/__tests__/explore.test.js +120 -3
- package/dist/cli/__tests__/explore.test.js.map +1 -1
- package/dist/cli/__tests__/imagegen-continuation.test.d.ts +2 -0
- package/dist/cli/__tests__/imagegen-continuation.test.d.ts.map +1 -0
- package/dist/cli/__tests__/imagegen-continuation.test.js +135 -0
- package/dist/cli/__tests__/imagegen-continuation.test.js.map +1 -0
- package/dist/cli/__tests__/index.test.js +182 -18
- package/dist/cli/__tests__/index.test.js.map +1 -1
- package/dist/cli/__tests__/launch-fallback.test.js +88 -2
- package/dist/cli/__tests__/launch-fallback.test.js.map +1 -1
- package/dist/cli/__tests__/ralph.test.js +62 -0
- package/dist/cli/__tests__/ralph.test.js.map +1 -1
- package/dist/cli/__tests__/setup-install-mode.test.js +48 -0
- package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -1
- package/dist/cli/__tests__/setup-scope.test.js +12 -0
- package/dist/cli/__tests__/setup-scope.test.js.map +1 -1
- package/dist/cli/__tests__/team.test.js +465 -12
- package/dist/cli/__tests__/team.test.js.map +1 -1
- package/dist/cli/__tests__/ultragoal.test.js +50 -5
- package/dist/cli/__tests__/ultragoal.test.js.map +1 -1
- package/dist/cli/__tests__/uninstall.test.js +6 -2
- package/dist/cli/__tests__/uninstall.test.js.map +1 -1
- package/dist/cli/explore.d.ts.map +1 -1
- package/dist/cli/explore.js +211 -12
- package/dist/cli/explore.js.map +1 -1
- package/dist/cli/index.d.ts +11 -3
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +124 -18
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/ralph.d.ts.map +1 -1
- package/dist/cli/ralph.js +37 -3
- package/dist/cli/ralph.js.map +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +100 -9
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/team.d.ts +1 -0
- package/dist/cli/team.d.ts.map +1 -1
- package/dist/cli/team.js +42 -7
- package/dist/cli/team.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 +29 -8
- package/dist/cli/ultragoal.js.map +1 -1
- package/dist/cli/uninstall.d.ts.map +1 -1
- package/dist/cli/uninstall.js +2 -1
- package/dist/cli/uninstall.js.map +1 -1
- package/dist/config/__tests__/codex-hooks.test.js +97 -2
- package/dist/config/__tests__/codex-hooks.test.js.map +1 -1
- package/dist/config/__tests__/generator-idempotent.test.js +1 -1
- package/dist/config/__tests__/generator-idempotent.test.js.map +1 -1
- package/dist/config/__tests__/generator-notify.test.js +22 -0
- package/dist/config/__tests__/generator-notify.test.js.map +1 -1
- package/dist/config/__tests__/models.test.js +18 -1
- package/dist/config/__tests__/models.test.js.map +1 -1
- package/dist/config/__tests__/wiki-config-contract.test.js +2 -1
- package/dist/config/__tests__/wiki-config-contract.test.js.map +1 -1
- package/dist/config/codex-hooks.d.ts +17 -3
- package/dist/config/codex-hooks.d.ts.map +1 -1
- package/dist/config/codex-hooks.js +102 -2
- package/dist/config/codex-hooks.js.map +1 -1
- package/dist/config/generator.d.ts +4 -1
- package/dist/config/generator.d.ts.map +1 -1
- package/dist/config/generator.js +69 -12
- package/dist/config/generator.js.map +1 -1
- package/dist/config/models.d.ts +6 -0
- package/dist/config/models.d.ts.map +1 -1
- package/dist/config/models.js +37 -0
- package/dist/config/models.js.map +1 -1
- package/dist/exec/followup.d.ts +1 -0
- package/dist/exec/followup.d.ts.map +1 -1
- package/dist/exec/followup.js +9 -3
- package/dist/exec/followup.js.map +1 -1
- package/dist/hooks/__tests__/anti-slop-workflow.test.js +19 -0
- package/dist/hooks/__tests__/anti-slop-workflow.test.js.map +1 -1
- package/dist/hooks/__tests__/consensus-execution-handoff.test.js +19 -2
- package/dist/hooks/__tests__/consensus-execution-handoff.test.js.map +1 -1
- package/dist/hooks/__tests__/deep-interview-contract.test.js +40 -0
- package/dist/hooks/__tests__/deep-interview-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/foreground-isolation-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/foreground-isolation-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/foreground-isolation-contract.test.js +28 -0
- package/dist/hooks/__tests__/foreground-isolation-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/keyword-detector.test.js +37 -25
- package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js +10 -4
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js.map +1 -1
- package/dist/hooks/__tests__/session.test.js +32 -0
- package/dist/hooks/__tests__/session.test.js.map +1 -1
- package/dist/hooks/__tests__/wiki-docs-contract.test.js +6 -4
- package/dist/hooks/__tests__/wiki-docs-contract.test.js.map +1 -1
- package/dist/hooks/codebase-map.d.ts.map +1 -1
- package/dist/hooks/codebase-map.js +3 -2
- package/dist/hooks/codebase-map.js.map +1 -1
- package/dist/hooks/extensibility/dispatcher.d.ts.map +1 -1
- package/dist/hooks/extensibility/dispatcher.js +6 -4
- package/dist/hooks/extensibility/dispatcher.js.map +1 -1
- package/dist/hooks/extensibility/logging.d.ts.map +1 -1
- package/dist/hooks/extensibility/logging.js +3 -2
- package/dist/hooks/extensibility/logging.js.map +1 -1
- package/dist/hooks/extensibility/sdk/paths.d.ts.map +1 -1
- package/dist/hooks/extensibility/sdk/paths.js +4 -3
- package/dist/hooks/extensibility/sdk/paths.js.map +1 -1
- package/dist/hooks/keyword-detector.d.ts.map +1 -1
- package/dist/hooks/keyword-detector.js +2 -4
- package/dist/hooks/keyword-detector.js.map +1 -1
- package/dist/hooks/session.d.ts.map +1 -1
- package/dist/hooks/session.js +22 -12
- package/dist/hooks/session.js.map +1 -1
- package/dist/hud/__tests__/hud-tmux-injection.test.js +8 -7
- package/dist/hud/__tests__/hud-tmux-injection.test.js.map +1 -1
- package/dist/hud/__tests__/reconcile.test.js +1 -1
- package/dist/hud/__tests__/state.test.js +24 -0
- package/dist/hud/__tests__/state.test.js.map +1 -1
- package/dist/hud/index.js +1 -1
- package/dist/hud/index.js.map +1 -1
- package/dist/hud/state.d.ts.map +1 -1
- package/dist/hud/state.js +22 -8
- package/dist/hud/state.js.map +1 -1
- package/dist/hud/tmux.js +1 -1
- package/dist/hud/tmux.js.map +1 -1
- package/dist/imagegen/continuation.d.ts +44 -0
- package/dist/imagegen/continuation.d.ts.map +1 -0
- package/dist/imagegen/continuation.js +220 -0
- package/dist/imagegen/continuation.js.map +1 -0
- package/dist/mcp/__tests__/bootstrap.test.js +47 -2
- package/dist/mcp/__tests__/bootstrap.test.js.map +1 -1
- package/dist/mcp/__tests__/server-lifecycle.test.js +49 -1
- package/dist/mcp/__tests__/server-lifecycle.test.js.map +1 -1
- package/dist/mcp/__tests__/state-server.test.js +145 -6
- package/dist/mcp/__tests__/state-server.test.js.map +1 -1
- package/dist/mcp/__tests__/wiki-server.test.js +97 -1
- package/dist/mcp/__tests__/wiki-server.test.js.map +1 -1
- package/dist/mcp/bootstrap.d.ts +2 -0
- package/dist/mcp/bootstrap.d.ts.map +1 -1
- package/dist/mcp/bootstrap.js +95 -15
- package/dist/mcp/bootstrap.js.map +1 -1
- package/dist/mcp/lifecycle-telemetry.d.ts +16 -0
- package/dist/mcp/lifecycle-telemetry.d.ts.map +1 -0
- package/dist/mcp/lifecycle-telemetry.js +95 -0
- package/dist/mcp/lifecycle-telemetry.js.map +1 -0
- package/dist/mcp/wiki-server.d.ts.map +1 -1
- package/dist/mcp/wiki-server.js +11 -2
- package/dist/mcp/wiki-server.js.map +1 -1
- package/dist/pipeline/__tests__/stages.test.js +274 -5
- package/dist/pipeline/__tests__/stages.test.js.map +1 -1
- package/dist/pipeline/stages/team-exec.d.ts +2 -0
- package/dist/pipeline/stages/team-exec.d.ts.map +1 -1
- package/dist/pipeline/stages/team-exec.js +51 -26
- package/dist/pipeline/stages/team-exec.js.map +1 -1
- package/dist/planning/__tests__/artifacts.test.js +138 -3
- package/dist/planning/__tests__/artifacts.test.js.map +1 -1
- package/dist/planning/__tests__/context-pack-status.test.d.ts +2 -0
- package/dist/planning/__tests__/context-pack-status.test.d.ts.map +1 -0
- package/dist/planning/__tests__/context-pack-status.test.js +271 -0
- package/dist/planning/__tests__/context-pack-status.test.js.map +1 -0
- package/dist/planning/artifacts.d.ts +12 -1
- package/dist/planning/artifacts.d.ts.map +1 -1
- package/dist/planning/artifacts.js +32 -9
- package/dist/planning/artifacts.js.map +1 -1
- package/dist/planning/context-pack-status.d.ts +42 -0
- package/dist/planning/context-pack-status.d.ts.map +1 -0
- package/dist/planning/context-pack-status.js +479 -0
- package/dist/planning/context-pack-status.js.map +1 -0
- package/dist/runtime/__tests__/process-tree.test.d.ts +2 -0
- package/dist/runtime/__tests__/process-tree.test.d.ts.map +1 -0
- package/dist/runtime/__tests__/process-tree.test.js +107 -0
- package/dist/runtime/__tests__/process-tree.test.js.map +1 -0
- package/dist/runtime/process-tree.d.ts +28 -0
- package/dist/runtime/process-tree.d.ts.map +1 -0
- package/dist/runtime/process-tree.js +230 -0
- package/dist/runtime/process-tree.js.map +1 -0
- package/dist/scripts/__tests__/codex-native-hook.test.js +267 -2
- package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
- package/dist/scripts/__tests__/notify-state-io.test.d.ts +2 -0
- package/dist/scripts/__tests__/notify-state-io.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/notify-state-io.test.js +40 -0
- package/dist/scripts/__tests__/notify-state-io.test.js.map +1 -0
- package/dist/scripts/codex-execution-surface.d.ts +1 -1
- package/dist/scripts/codex-execution-surface.d.ts.map +1 -1
- package/dist/scripts/codex-execution-surface.js.map +1 -1
- package/dist/scripts/codex-native-hook.d.ts +1 -1
- package/dist/scripts/codex-native-hook.d.ts.map +1 -1
- package/dist/scripts/codex-native-hook.js +141 -9
- package/dist/scripts/codex-native-hook.js.map +1 -1
- package/dist/scripts/notify-hook/managed-tmux.d.ts.map +1 -1
- package/dist/scripts/notify-hook/managed-tmux.js +6 -9
- package/dist/scripts/notify-hook/managed-tmux.js.map +1 -1
- package/dist/scripts/notify-hook/process-runner.d.ts.map +1 -1
- package/dist/scripts/notify-hook/process-runner.js +4 -1
- package/dist/scripts/notify-hook/process-runner.js.map +1 -1
- package/dist/scripts/notify-hook/state-io.d.ts.map +1 -1
- package/dist/scripts/notify-hook/state-io.js +4 -7
- package/dist/scripts/notify-hook/state-io.js.map +1 -1
- package/dist/scripts/notify-hook.js +25 -3
- package/dist/scripts/notify-hook.js.map +1 -1
- package/dist/scripts/verify-native-agents.d.ts.map +1 -1
- package/dist/scripts/verify-native-agents.js +3 -1
- package/dist/scripts/verify-native-agents.js.map +1 -1
- package/dist/sidecar/__tests__/tmux.test.js +1 -1
- package/dist/sidecar/__tests__/tmux.test.js.map +1 -1
- package/dist/sidecar/tmux.js +1 -1
- package/dist/sidecar/tmux.js.map +1 -1
- package/dist/state/__tests__/operations.test.js +79 -0
- package/dist/state/__tests__/operations.test.js.map +1 -1
- package/dist/state/__tests__/skill-active.test.js +10 -18
- package/dist/state/__tests__/skill-active.test.js.map +1 -1
- package/dist/state/__tests__/workflow-transition.test.js +45 -1
- package/dist/state/__tests__/workflow-transition.test.js.map +1 -1
- package/dist/state/operations.d.ts.map +1 -1
- package/dist/state/operations.js +1 -20
- package/dist/state/operations.js.map +1 -1
- package/dist/state/skill-active.d.ts +1 -0
- package/dist/state/skill-active.d.ts.map +1 -1
- package/dist/state/skill-active.js +28 -18
- package/dist/state/skill-active.js.map +1 -1
- package/dist/state/workflow-transition-reconcile.d.ts.map +1 -1
- package/dist/state/workflow-transition-reconcile.js +3 -2
- package/dist/state/workflow-transition-reconcile.js.map +1 -1
- package/dist/state/workflow-transition.js +2 -2
- package/dist/state/workflow-transition.js.map +1 -1
- package/dist/team/__tests__/approved-execution.test.js +96 -0
- package/dist/team/__tests__/approved-execution.test.js.map +1 -1
- package/dist/team/__tests__/followup-planner.test.js +16 -0
- package/dist/team/__tests__/followup-planner.test.js.map +1 -1
- package/dist/team/__tests__/model-contract.test.js +16 -0
- package/dist/team/__tests__/model-contract.test.js.map +1 -1
- package/dist/team/__tests__/repo-aware-decomposition.test.js +20 -0
- package/dist/team/__tests__/repo-aware-decomposition.test.js.map +1 -1
- package/dist/team/__tests__/runtime-cli.test.js +16 -0
- package/dist/team/__tests__/runtime-cli.test.js.map +1 -1
- package/dist/team/__tests__/runtime.test.js +209 -11
- package/dist/team/__tests__/runtime.test.js.map +1 -1
- package/dist/team/__tests__/scaling.test.js +110 -0
- package/dist/team/__tests__/scaling.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.test.js +9 -0
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/__tests__/worker-runtime-identity.test.js +6 -0
- package/dist/team/__tests__/worker-runtime-identity.test.js.map +1 -1
- package/dist/team/approved-execution.d.ts +13 -0
- package/dist/team/approved-execution.d.ts.map +1 -1
- package/dist/team/approved-execution.js +40 -22
- package/dist/team/approved-execution.js.map +1 -1
- package/dist/team/followup-planner.d.ts +1 -0
- package/dist/team/followup-planner.d.ts.map +1 -1
- package/dist/team/followup-planner.js +9 -9
- package/dist/team/followup-planner.js.map +1 -1
- package/dist/team/model-contract.d.ts +1 -1
- package/dist/team/model-contract.d.ts.map +1 -1
- package/dist/team/model-contract.js +4 -3
- package/dist/team/model-contract.js.map +1 -1
- package/dist/team/repo-aware-decomposition.d.ts +1 -0
- package/dist/team/repo-aware-decomposition.d.ts.map +1 -1
- package/dist/team/repo-aware-decomposition.js +5 -1
- package/dist/team/repo-aware-decomposition.js.map +1 -1
- package/dist/team/runtime-cli.d.ts +4 -0
- package/dist/team/runtime-cli.d.ts.map +1 -1
- package/dist/team/runtime-cli.js +14 -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 +46 -16
- package/dist/team/runtime.js.map +1 -1
- package/dist/team/scaling.d.ts.map +1 -1
- package/dist/team/scaling.js +13 -6
- package/dist/team/scaling.js.map +1 -1
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +7 -0
- package/dist/team/tmux-session.js.map +1 -1
- package/dist/ultragoal/__tests__/artifacts.test.js +129 -4
- package/dist/ultragoal/__tests__/artifacts.test.js.map +1 -1
- package/dist/ultragoal/__tests__/docs-contract.test.d.ts +2 -0
- package/dist/ultragoal/__tests__/docs-contract.test.d.ts.map +1 -0
- package/dist/ultragoal/__tests__/docs-contract.test.js +31 -0
- package/dist/ultragoal/__tests__/docs-contract.test.js.map +1 -0
- package/dist/ultragoal/artifacts.d.ts +6 -2
- package/dist/ultragoal/artifacts.d.ts.map +1 -1
- package/dist/ultragoal/artifacts.js +108 -4
- package/dist/ultragoal/artifacts.js.map +1 -1
- package/dist/utils/paths.d.ts +3 -1
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +6 -2
- package/dist/utils/paths.js.map +1 -1
- package/dist/verification/__tests__/ci-rust-gates.test.js +44 -14
- package/dist/verification/__tests__/ci-rust-gates.test.js.map +1 -1
- package/dist/wiki/__tests__/ingest.test.js +35 -1
- package/dist/wiki/__tests__/ingest.test.js.map +1 -1
- package/dist/wiki/__tests__/lint.test.js +14 -1
- package/dist/wiki/__tests__/lint.test.js.map +1 -1
- package/dist/wiki/__tests__/query.test.js +28 -3
- package/dist/wiki/__tests__/query.test.js.map +1 -1
- package/dist/wiki/__tests__/session-hooks.test.js +30 -2
- package/dist/wiki/__tests__/session-hooks.test.js.map +1 -1
- package/dist/wiki/__tests__/storage.test.js +62 -22
- package/dist/wiki/__tests__/storage.test.js.map +1 -1
- package/dist/wiki/index.d.ts +2 -2
- package/dist/wiki/index.d.ts.map +1 -1
- package/dist/wiki/index.js +2 -2
- package/dist/wiki/index.js.map +1 -1
- package/dist/wiki/ingest.js +2 -2
- package/dist/wiki/ingest.js.map +1 -1
- package/dist/wiki/lifecycle.d.ts +5 -0
- package/dist/wiki/lifecycle.d.ts.map +1 -1
- package/dist/wiki/lifecycle.js +31 -4
- package/dist/wiki/lifecycle.js.map +1 -1
- package/dist/wiki/lint.d.ts.map +1 -1
- package/dist/wiki/lint.js +12 -8
- package/dist/wiki/lint.js.map +1 -1
- package/dist/wiki/query.d.ts.map +1 -1
- package/dist/wiki/query.js +3 -2
- package/dist/wiki/query.js.map +1 -1
- package/dist/wiki/storage.d.ts +4 -0
- package/dist/wiki/storage.d.ts.map +1 -1
- package/dist/wiki/storage.js +54 -18
- package/dist/wiki/storage.js.map +1 -1
- package/package.json +1 -1
- package/plugins/oh-my-codex/.codex-plugin/plugin.json +1 -1
- package/plugins/oh-my-codex/skills/ai-slop-cleaner/SKILL.md +9 -0
- package/plugins/oh-my-codex/skills/deep-interview/SKILL.md +25 -2
- package/plugins/oh-my-codex/skills/omx-setup/SKILL.md +1 -1
- package/plugins/oh-my-codex/skills/plan/SKILL.md +7 -4
- package/plugins/oh-my-codex/skills/ralplan/SKILL.md +13 -3
- package/plugins/oh-my-codex/skills/team/SKILL.md +2 -2
- package/plugins/oh-my-codex/skills/ultragoal/SKILL.md +11 -7
- package/plugins/oh-my-codex/skills/visual-ralph/SKILL.md +8 -0
- package/plugins/oh-my-codex/skills/wiki/SKILL.md +5 -5
- package/prompts/planner.md +1 -1
- package/skills/ai-slop-cleaner/SKILL.md +9 -0
- package/skills/deep-interview/SKILL.md +25 -2
- package/skills/omx-setup/SKILL.md +1 -1
- package/skills/plan/SKILL.md +7 -4
- package/skills/ralplan/SKILL.md +13 -3
- package/skills/team/SKILL.md +2 -2
- package/skills/ultragoal/SKILL.md +11 -7
- package/skills/visual-ralph/SKILL.md +8 -0
- package/skills/wiki/SKILL.md +5 -5
- package/src/scripts/__tests__/codex-native-hook.test.ts +302 -2
- package/src/scripts/__tests__/notify-state-io.test.ts +73 -0
- package/src/scripts/codex-execution-surface.ts +2 -0
- package/src/scripts/codex-native-hook.ts +163 -16
- package/src/scripts/notify-hook/managed-tmux.ts +6 -7
- package/src/scripts/notify-hook/process-runner.ts +4 -1
- package/src/scripts/notify-hook/state-io.ts +5 -7
- package/src/scripts/notify-hook.ts +26 -3
- package/src/scripts/verify-native-agents.ts +3 -1
package/dist/cli/index.d.ts
CHANGED
|
@@ -10,8 +10,8 @@ import { type NotifyTempContract, type ParseNotifyTempContractResult } from "../
|
|
|
10
10
|
export declare function resolveNotifyFallbackWatcherScript(pkgRoot?: string): string;
|
|
11
11
|
export declare function resolveHookDerivedWatcherScript(pkgRoot?: string): string;
|
|
12
12
|
export declare function resolveNotifyHookScript(pkgRoot?: string): string;
|
|
13
|
-
export declare const HELP = "\noh-my-codex (omx) - Multi-agent orchestration for Codex CLI\n\nUsage:\n omx Launch Codex CLI (detached tmux by default on supported interactive terminals)\n omx exec Run codex exec non-interactively with OMX AGENTS/overlay injection\n omx exec inject <session-id> --prompt <text>\n Queue audited follow-up instructions for a running non-interactive exec job\n omx setup Install skills, prompts, MCP servers, and scope-specific AGENTS.md\n (user scope prompts for legacy vs plugin skill delivery when needed)\n omx update Check npm now, update the global install immediately, then refresh setup\n omx uninstall Remove OMX configuration and clean up installed artifacts\n omx doctor Check installation health\n omx list List packaged OMX skills and native agent prompts (--json)\n omx cleanup Kill orphaned OMX MCP server processes and remove stale OMX /tmp directories\n omx doctor --team Check team/swarm runtime health diagnostics\n omx ask Ask local provider CLI (claude|gemini) and write artifact output\n omx question OMX-owned blocking question UI entrypoint for agent-invoked user questions\n omx adapt Scaffold OMX-owned adapter foundations for persistent external targets\n omx resume Resume a previous interactive Codex session\n omx explore Default read-only exploration entrypoint (may adaptively use sparkshell backend)\n omx session Search prior local session transcripts and history artifacts\n omx agents-init [path]\n Bootstrap lightweight AGENTS.md files for a repo/subtree\n omx agents Manage Codex native agent TOML files\n omx deepinit [path]\n Alias for agents-init (lightweight AGENTS bootstrap only)\n omx team Spawn parallel worker panes in tmux and bootstrap inbox/task state\n omx ralph Launch Codex with ralph persistence mode active\n omx ultragoal Create, resume, and checkpoint durable multi-goal plans over Codex goal mode\n omx performance-goal\n Create, hand off, and gate evaluator-backed performance goals\n omx autoresearch-goal\n Create, hand off, and gate professor-critic research goals\n omx autoresearch [DEPRECATED] Use $autoresearch; direct CLI launch removed\n omx version Show version information\n omx tmux-hook Manage tmux prompt injection workaround (init|status|validate|test)\n omx hooks Manage hook plugins (init|status|validate|test)\n omx hud Show HUD statusline (--watch, --json, --preset=NAME)\n omx sidecar Show read-only team/multi-agent visualization (--watch, --json, --tmux)\n omx state Read/write/list OMX mode state via CLI parity surface\n omx notepad CLI parity for OMX notepad MCP tools\n omx project-memory\n CLI parity for OMX project-memory MCP tools\n omx trace CLI parity for OMX trace MCP tools\n omx code-intel\n CLI parity for OMX code-intel MCP tools\n omx wiki CLI parity for OMX wiki MCP tools\n omx mcp-serve Launch an OMX stdio MCP server target (plugin/runtime use)\n omx sparkshell <command> [args...]\n omx sparkshell --tmux-pane <pane-id> [--tail-lines <100-1000>]\n Run native sparkshell sidecar for direct command execution or explicit tmux-pane summarization\n (also used as an adaptive backend for qualifying read-only explore tasks)\n omx help Show this help message\n omx status Show active modes and state\n omx cancel Cancel active execution modes\n omx reasoning Show or set model reasoning effort (low|medium|high|xhigh)\n\nOptions:\n --yolo Launch Codex in yolo mode (shorthand for: omx launch --yolo)\n --high Launch Codex with high reasoning effort\n (shorthand for: -c model_reasoning_effort=\"high\")\n --xhigh Launch Codex with xhigh reasoning effort\n (shorthand for: -c model_reasoning_effort=\"xhigh\")\n --madmax DANGEROUS: bypass Codex approvals and sandbox\n (alias for --dangerously-bypass-approvals-and-sandbox)\n --spark Use the Codex spark model (~1.3x faster) for team workers only\n Workers get the configured low-complexity team model; leader model unchanged\n --madmax-spark spark model for workers + bypass approvals for leader and workers\n (shorthand for: --spark --madmax)\n --notify-temp Enable temporary notification routing for this run/session only\n --direct Launch the interactive leader directly without OMX tmux/HUD management\n --tmux Launch the interactive leader session in detached tmux\n --discord Select Discord provider for temporary notification mode\n --slack Select Slack provider for temporary notification mode\n --telegram Select Telegram provider for temporary notification mode\n --custom <name>\n Select custom/OpenClaw gateway name for temporary notification mode\n -w, --worktree[=<name>]\n Launch Codex in a git worktree (detached when no name is given)\n --force Force reinstall (overwrite existing files)\n --merge-agents\n Merge OMX-managed AGENTS.md sections into an existing AGENTS.md\n instead of overwriting user-authored content\n --dry-run Show what would be done without doing it\n --plugin Use Codex plugin delivery for omx setup and remove legacy OMX-managed user/project components\n --legacy Use legacy setup delivery for omx setup, overriding persisted plugin mode\n --install-mode <legacy|plugin>\n Explicit setup install mode (canonical form; --legacy/--plugin are aliases)\n --keep-config Skip config.toml cleanup during uninstall\n --purge Remove .omx/ cache directory during uninstall\n --verbose Show detailed output\n --scope Setup scope for \"omx setup\" only:\n user | project\n\nLaunch policy:\n OMX_LAUNCH_POLICY=
|
|
14
|
-
type CliCommand = "launch" | "exec" | "setup" | "update" | "list" | "agents" | "agents-init" | "deepinit" | "uninstall" | "doctor" | "cleanup" | "ask" | "question" | "adapt" | "explore" | "sparkshell" | "team" | "session" | "resume" | "version" | "tmux-hook" | "hooks" | "hud" | "sidecar" | "state" | "wiki" | "mcp-serve" | "status" | "cancel" | "help" | "reasoning" | string;
|
|
13
|
+
export declare const HELP = "\noh-my-codex (omx) - Multi-agent orchestration for Codex CLI\n\nUsage:\n omx Launch Codex CLI (detached tmux by default on supported interactive terminals)\n omx exec Run codex exec non-interactively with OMX AGENTS/overlay injection\n omx exec inject <session-id> --prompt <text>\n Queue audited follow-up instructions for a running non-interactive exec job\n omx imagegen continuation <session-id> --artifact <name>\n Queue a Stop-hook continuation for built-in image generation turns\n omx setup Install skills, prompts, MCP servers, and scope-specific AGENTS.md\n (user scope prompts for legacy vs plugin skill delivery when needed)\n omx update Check npm now, update the global install immediately, then refresh setup\n omx uninstall Remove OMX configuration and clean up installed artifacts\n omx doctor Check installation health\n omx list List packaged OMX skills and native agent prompts (--json)\n omx cleanup Kill orphaned OMX MCP server processes and remove stale OMX /tmp directories\n omx doctor --team Check team/swarm runtime health diagnostics\n omx ask Ask local provider CLI (claude|gemini) and write artifact output\n omx question OMX-owned blocking question UI entrypoint for agent-invoked user questions\n omx adapt Scaffold OMX-owned adapter foundations for persistent external targets\n omx resume Resume a previous interactive Codex session\n omx explore Default read-only exploration entrypoint (may adaptively use sparkshell backend)\n omx session Search prior local session transcripts and history artifacts\n omx agents-init [path]\n Bootstrap lightweight AGENTS.md files for a repo/subtree\n omx agents Manage Codex native agent TOML files\n omx deepinit [path]\n Alias for agents-init (lightweight AGENTS bootstrap only)\n omx team Spawn parallel worker panes in tmux and bootstrap inbox/task state\n omx ralph Launch Codex with ralph persistence mode active\n omx ultragoal Create, resume, and checkpoint durable multi-goal plans over Codex goal mode\n omx performance-goal\n Create, hand off, and gate evaluator-backed performance goals\n omx autoresearch-goal\n Create, hand off, and gate professor-critic research goals\n omx autoresearch [DEPRECATED] Use $autoresearch; direct CLI launch removed\n omx version Show version information\n omx tmux-hook Manage tmux prompt injection workaround (init|status|validate|test)\n omx hooks Manage hook plugins (init|status|validate|test)\n omx hud Show HUD statusline (--watch, --json, --preset=NAME)\n omx sidecar Show read-only team/multi-agent visualization (--watch, --json, --tmux)\n omx state Read/write/list OMX mode state via CLI parity surface\n omx notepad CLI parity for OMX notepad MCP tools\n omx project-memory\n CLI parity for OMX project-memory MCP tools\n omx trace CLI parity for OMX trace MCP tools\n omx code-intel\n CLI parity for OMX code-intel MCP tools\n omx wiki CLI parity for OMX wiki MCP tools\n omx mcp-serve Launch an OMX stdio MCP server target (plugin/runtime use)\n omx sparkshell <command> [args...]\n omx sparkshell --tmux-pane <pane-id> [--tail-lines <100-1000>]\n Run native sparkshell sidecar for direct command execution or explicit tmux-pane summarization\n (also used as an adaptive backend for qualifying read-only explore tasks)\n omx help Show this help message\n omx status Show active modes and state\n omx cancel Cancel active execution modes\n omx reasoning Show or set model reasoning effort (low|medium|high|xhigh)\n\nOptions:\n --yolo Launch Codex in yolo mode (shorthand for: omx launch --yolo)\n --high Launch Codex with high reasoning effort\n (shorthand for: -c model_reasoning_effort=\"high\")\n --xhigh Launch Codex with xhigh reasoning effort\n (shorthand for: -c model_reasoning_effort=\"xhigh\")\n --madmax DANGEROUS: bypass Codex approvals and sandbox\n (alias for --dangerously-bypass-approvals-and-sandbox)\n --spark Use the Codex spark model (~1.3x faster) for team workers only\n Workers get the configured low-complexity team model; leader model unchanged\n --madmax-spark spark model for workers + bypass approvals for leader and workers\n (shorthand for: --spark --madmax)\n --notify-temp Enable temporary notification routing for this run/session only\n --direct Launch the interactive leader directly without OMX tmux/HUD management\n --tmux Launch the interactive leader session in detached tmux\n --discord Select Discord provider for temporary notification mode\n --slack Select Slack provider for temporary notification mode\n --telegram Select Telegram provider for temporary notification mode\n --custom <name>\n Select custom/OpenClaw gateway name for temporary notification mode\n -w, --worktree[=<name>]\n Launch Codex in a git worktree (detached when no name is given)\n --force Force reinstall (overwrite existing files)\n --merge-agents\n Merge OMX-managed AGENTS.md sections into an existing AGENTS.md\n instead of overwriting user-authored content\n --dry-run Show what would be done without doing it\n --plugin Use Codex plugin delivery for omx setup and remove legacy OMX-managed user/project components\n --legacy Use legacy setup delivery for omx setup, overriding persisted plugin mode\n --install-mode <legacy|plugin>\n Explicit setup install mode (canonical form; --legacy/--plugin are aliases)\n --keep-config Skip config.toml cleanup during uninstall\n --purge Remove .omx/ cache directory during uninstall\n --verbose Show detailed output\n --scope Setup scope for \"omx setup\" only:\n user | project\n\nLaunch policy:\n OMX_LAUNCH_POLICY=auto\n Use the default policy: detached tmux when supported, direct otherwise\n OMX_LAUNCH_POLICY=direct\n Run without OMX tmux/HUD management\n OMX_LAUNCH_POLICY=tmux\n Force OMX-managed detached tmux launch\n OMX_LAUNCH_POLICY=detached-tmux\n Force OMX-managed detached tmux launch\n CLI policy flags (--direct/--tmux) override OMX_LAUNCH_POLICY; the last flag before -- wins.\n Unset or empty OMX_LAUNCH_POLICY returns to auto/default behavior.\n Config files are intentionally not used for launch policy in this release.\n";
|
|
14
|
+
type CliCommand = "launch" | "exec" | "imagegen" | "setup" | "update" | "list" | "agents" | "agents-init" | "deepinit" | "uninstall" | "doctor" | "cleanup" | "ask" | "question" | "adapt" | "explore" | "sparkshell" | "team" | "session" | "resume" | "version" | "tmux-hook" | "hooks" | "hud" | "sidecar" | "state" | "wiki" | "mcp-serve" | "status" | "cancel" | "help" | "reasoning" | string;
|
|
15
15
|
export interface ResolvedCliInvocation {
|
|
16
16
|
command: CliCommand;
|
|
17
17
|
launchArgs: string[];
|
|
@@ -28,9 +28,11 @@ export declare function resolveEffectiveLeaderLaunchPolicyOverride(args: string[
|
|
|
28
28
|
export declare function resolveCodexLaunchPolicy(env?: NodeJS.ProcessEnv, _platform?: NodeJS.Platform, tmuxAvailable?: boolean, nativeWindows?: boolean, stdinIsTTY?: boolean, stdoutIsTTY?: boolean, explicitPolicy?: CodexLaunchPolicy): CodexLaunchPolicy;
|
|
29
29
|
export interface PreparedCodexHomeForLaunch {
|
|
30
30
|
codexHomeOverride?: string;
|
|
31
|
+
sqliteHomeOverride?: string;
|
|
31
32
|
projectLocalCodexHomeForCleanup?: string;
|
|
32
33
|
runtimeCodexHomeForCleanup?: string;
|
|
33
34
|
}
|
|
35
|
+
export declare const CODEX_SQLITE_HOME_ENV = "CODEX_SQLITE_HOME";
|
|
34
36
|
export declare function runtimeCodexHomePath(cwd: string, sessionId: string): string;
|
|
35
37
|
/**
|
|
36
38
|
* Project-scope setup keeps durable Codex config under <repo>/.codex, but the
|
|
@@ -60,6 +62,12 @@ export interface DetachedSessionTmuxStep {
|
|
|
60
62
|
}
|
|
61
63
|
export declare function buildHudPaneCleanupTargets(existingPaneIds: string[], createdPaneId: string | null, leaderPaneId?: string): string[];
|
|
62
64
|
export declare function resolveOmxRootForLaunch(cwd: string, env?: NodeJS.ProcessEnv): string | undefined;
|
|
65
|
+
export declare function resolveDisposableWorktreeOmxRootForLaunch(ensuredWorktree: {
|
|
66
|
+
enabled: true;
|
|
67
|
+
repoRoot: string;
|
|
68
|
+
} | {
|
|
69
|
+
enabled: false;
|
|
70
|
+
} | undefined, env?: NodeJS.ProcessEnv): string | undefined;
|
|
63
71
|
export declare function shouldAutoIsolateMadmaxLaunch(command: string, launchArgs: string[], env?: NodeJS.ProcessEnv): boolean;
|
|
64
72
|
export declare function createMadmaxIsolatedRoot(sourceCwd: string, argv: string[], env?: NodeJS.ProcessEnv): string;
|
|
65
73
|
export declare function main(args: string[]): Promise<void>;
|
|
@@ -85,7 +93,7 @@ type TmuxExecSync = (file: string, args: readonly string[]) => string;
|
|
|
85
93
|
export declare function acquireTmuxExtendedKeysLease(cwd: string, execFileSyncImpl?: TmuxExecSync, ownerPid?: number): string | null;
|
|
86
94
|
export declare function releaseTmuxExtendedKeysLease(cwd: string, leaseHandle: string, execFileSyncImpl?: TmuxExecSync): void;
|
|
87
95
|
export declare function withTmuxExtendedKeys<T>(cwd: string, run: () => T, execFileSyncImpl?: TmuxExecSync): T;
|
|
88
|
-
export declare function buildDetachedSessionBootstrapSteps(sessionName: string, cwd: string, codexCmd: string, hudCmd: string, workerLaunchArgs: string | null, codexHomeOverride?: string, notifyTempContractRaw?: string | null, nativeWindows?: boolean, sessionId?: string, projectLocalCodexHomeForCleanup?: string, runtimeCodexHomeForCleanup?: string, omxRootOverride?: string, env?: NodeJS.ProcessEnv): DetachedSessionTmuxStep[];
|
|
96
|
+
export declare function buildDetachedSessionBootstrapSteps(sessionName: string, cwd: string, codexCmd: string, hudCmd: string, workerLaunchArgs: string | null, codexHomeOverride?: string, notifyTempContractRaw?: string | null, nativeWindows?: boolean, sessionId?: string, projectLocalCodexHomeForCleanup?: string, runtimeCodexHomeForCleanup?: string, omxRootOverride?: string, env?: NodeJS.ProcessEnv, sqliteHomeOverride?: string): DetachedSessionTmuxStep[];
|
|
89
97
|
export declare function buildDetachedSessionFinalizeSteps(sessionName: string, hudPaneId: string | null, hookWindowIndex: string | null, enableMouse: boolean, nativeWindows?: boolean): DetachedSessionTmuxStep[];
|
|
90
98
|
export declare function buildDetachedSessionRollbackSteps(sessionName: string, hookTarget: string | null, hookName: string | null, clientAttachedHookName: string | null): DetachedSessionTmuxStep[];
|
|
91
99
|
export declare function buildNotifyTempStartupMessages(contract: NotifyTempContract, hasValidProviders: boolean): {
|
package/dist/cli/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAAuB,KAAK,gBAAgB,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAczF,OAAO,EAIL,KAAK,mBAAmB,EACxB,KAAK,aAAa,EACnB,MAAM,cAAc,CAAC;AAiCtB,OAAO,EACL,6BAA6B,EAC7B,uBAAuB,EACvB,+BAA+B,EAC/B,yBAAyB,EACzB,qCAAqC,GACtC,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/cli/index.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,OAAO,EAAuB,KAAK,gBAAgB,EAAE,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAczF,OAAO,EAIL,KAAK,mBAAmB,EACxB,KAAK,aAAa,EACnB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AAY,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IACzD,IAAI,CAAC,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,GAAG,cAAc,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACjE,gBAAgB,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;CACxC,GACL,OAAO,CAAC,IAAI,CAAC,CA2Bf"}
|
package/dist/cli/index.js
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Multi-agent orchestration for OpenAI Codex CLI
|
|
4
4
|
*/
|
|
5
5
|
import { execFileSync, spawn } from "child_process";
|
|
6
|
-
import { basename, dirname, join } from "path";
|
|
6
|
+
import { basename, dirname, join, posix, win32 } from "path";
|
|
7
7
|
import { existsSync, mkdirSync, readFileSync, rmSync, statSync, writeFileSync } from "fs";
|
|
8
8
|
import { copyFile, cp, lstat, mkdir, readdir, rm, symlink } from "fs/promises";
|
|
9
9
|
import { constants as osConstants, homedir } from "os";
|
|
@@ -37,7 +37,7 @@ import { MADMAX_FLAG, CODEX_BYPASS_FLAG, HIGH_REASONING_FLAG, XHIGH_REASONING_FL
|
|
|
37
37
|
import { getBaseStateDir, getStateDir, listModeStateFilesWithScopePreference, } from "../mcp/state-paths.js";
|
|
38
38
|
import { resolveCodexConfigPathForLaunch, resolveCodexHomeForLaunch, resolveProjectLocalCodexHomeForLaunch, } from "./codex-home.js";
|
|
39
39
|
export { readPersistedSetupPreferences, readPersistedSetupScope, resolveCodexConfigPathForLaunch, resolveCodexHomeForLaunch, resolveProjectLocalCodexHomeForLaunch, } from "./codex-home.js";
|
|
40
|
-
import { SKILL_ACTIVE_STATE_MODE, syncCanonicalSkillStateForMode } from "../state/skill-active.js";
|
|
40
|
+
import { SKILL_ACTIVE_STATE_MODE, extractSessionIdFromInitializedStatePath, getSkillActiveStatePaths, listActiveSkills, readSkillActiveState, syncCanonicalSkillStateForMode, } from "../state/skill-active.js";
|
|
41
41
|
import { isTrackedWorkflowMode } from "../state/workflow-transition.js";
|
|
42
42
|
import { maybeCheckAndPromptUpdate, runImmediateUpdate } from "./update.js";
|
|
43
43
|
import { maybePromptGithubStar } from "./star-prompt.js";
|
|
@@ -60,6 +60,7 @@ import { parseWorktreeMode, planWorktreeTarget, ensureWorktree, } from "../team/
|
|
|
60
60
|
import { ensureReusableNodeModules } from "../utils/repo-deps.js";
|
|
61
61
|
import { OMX_NOTIFY_TEMP_CONTRACT_ENV, parseNotifyTempContractFromArgs, serializeNotifyTempContract, } from "../notifications/temp-contract.js";
|
|
62
62
|
import { execInjectCommand } from "../exec/followup.js";
|
|
63
|
+
import { imagegenCommand } from "../imagegen/continuation.js";
|
|
63
64
|
export function resolveNotifyFallbackWatcherScript(pkgRoot = getPackageRoot()) {
|
|
64
65
|
return resolveDistScript(pkgRoot, "notify-fallback-watcher.js");
|
|
65
66
|
}
|
|
@@ -80,6 +81,8 @@ Usage:
|
|
|
80
81
|
omx exec Run codex exec non-interactively with OMX AGENTS/overlay injection
|
|
81
82
|
omx exec inject <session-id> --prompt <text>
|
|
82
83
|
Queue audited follow-up instructions for a running non-interactive exec job
|
|
84
|
+
omx imagegen continuation <session-id> --artifact <name>
|
|
85
|
+
Queue a Stop-hook continuation for built-in image generation turns
|
|
83
86
|
omx setup Install skills, prompts, MCP servers, and scope-specific AGENTS.md
|
|
84
87
|
(user scope prompts for legacy vs plugin skill delivery when needed)
|
|
85
88
|
omx update Check npm now, update the global install immediately, then refresh setup
|
|
@@ -168,16 +171,16 @@ Options:
|
|
|
168
171
|
user | project
|
|
169
172
|
|
|
170
173
|
Launch policy:
|
|
171
|
-
OMX_LAUNCH_POLICY=
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
OMX_LAUNCH_POLICY=
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
174
|
+
OMX_LAUNCH_POLICY=auto
|
|
175
|
+
Use the default policy: detached tmux when supported, direct otherwise
|
|
176
|
+
OMX_LAUNCH_POLICY=direct
|
|
177
|
+
Run without OMX tmux/HUD management
|
|
178
|
+
OMX_LAUNCH_POLICY=tmux
|
|
179
|
+
Force OMX-managed detached tmux launch
|
|
180
|
+
OMX_LAUNCH_POLICY=detached-tmux
|
|
181
|
+
Force OMX-managed detached tmux launch
|
|
182
|
+
CLI policy flags (--direct/--tmux) override OMX_LAUNCH_POLICY; the last flag before -- wins.
|
|
183
|
+
Unset or empty OMX_LAUNCH_POLICY returns to auto/default behavior.
|
|
181
184
|
Config files are intentionally not used for launch policy in this release.
|
|
182
185
|
`;
|
|
183
186
|
const REASONING_KEY = "model_reasoning_effort";
|
|
@@ -228,6 +231,7 @@ const NESTED_HELP_COMMANDS = new Set([
|
|
|
228
231
|
"agents-init",
|
|
229
232
|
"deepinit",
|
|
230
233
|
"exec",
|
|
234
|
+
"imagegen",
|
|
231
235
|
"hooks",
|
|
232
236
|
"list",
|
|
233
237
|
"hud",
|
|
@@ -406,6 +410,7 @@ export function resolveCodexLaunchPolicy(env = process.env, _platform = process.
|
|
|
406
410
|
function resolveTmuxExecutableForLaunch() {
|
|
407
411
|
return resolveTmuxBinaryForPlatform() || "tmux";
|
|
408
412
|
}
|
|
413
|
+
export const CODEX_SQLITE_HOME_ENV = "CODEX_SQLITE_HOME";
|
|
409
414
|
export function runtimeCodexHomePath(cwd, sessionId) {
|
|
410
415
|
return join(omxRoot(cwd), "runtime", "codex-home", sessionId);
|
|
411
416
|
}
|
|
@@ -422,6 +427,9 @@ async function linkOrCopyCodexHomeEntry(source, destination) {
|
|
|
422
427
|
await copyFile(source, destination);
|
|
423
428
|
}
|
|
424
429
|
}
|
|
430
|
+
function isCodexSqliteArtifact(entryName) {
|
|
431
|
+
return /^(?:state|logs)_\d+\.sqlite(?:-(?:shm|wal))?$/.test(entryName);
|
|
432
|
+
}
|
|
425
433
|
/**
|
|
426
434
|
* Project-scope setup keeps durable Codex config under <repo>/.codex, but the
|
|
427
435
|
* Codex TUI also stores model-availability NUX counters in CODEX_HOME/config.toml.
|
|
@@ -435,6 +443,8 @@ export async function prepareRuntimeCodexHomeForProjectLaunch(cwd, sessionId, pr
|
|
|
435
443
|
if (!existsSync(projectCodexHome))
|
|
436
444
|
return runtimeCodexHome;
|
|
437
445
|
for (const entry of await readdir(projectCodexHome, { withFileTypes: true })) {
|
|
446
|
+
if (isCodexSqliteArtifact(entry.name))
|
|
447
|
+
continue;
|
|
438
448
|
const source = join(projectCodexHome, entry.name);
|
|
439
449
|
const destination = join(runtimeCodexHome, entry.name);
|
|
440
450
|
if (entry.name === "config.toml") {
|
|
@@ -445,12 +455,19 @@ export async function prepareRuntimeCodexHomeForProjectLaunch(cwd, sessionId, pr
|
|
|
445
455
|
}
|
|
446
456
|
return runtimeCodexHome;
|
|
447
457
|
}
|
|
458
|
+
function resolveProjectSqliteHomeForLaunch(projectCodexHome, env) {
|
|
459
|
+
const configured = env[CODEX_SQLITE_HOME_ENV];
|
|
460
|
+
if (typeof configured === "string" && configured.trim() !== "")
|
|
461
|
+
return undefined;
|
|
462
|
+
return projectCodexHome;
|
|
463
|
+
}
|
|
448
464
|
export async function prepareCodexHomeForLaunch(cwd, sessionId, env = process.env) {
|
|
449
465
|
const projectLocalCodexHomeForCleanup = resolveProjectLocalCodexHomeForLaunch(cwd, env);
|
|
450
466
|
if (projectLocalCodexHomeForCleanup) {
|
|
451
467
|
const runtimeCodexHome = await prepareRuntimeCodexHomeForProjectLaunch(cwd, sessionId, projectLocalCodexHomeForCleanup);
|
|
452
468
|
return {
|
|
453
469
|
codexHomeOverride: runtimeCodexHome,
|
|
470
|
+
sqliteHomeOverride: resolveProjectSqliteHomeForLaunch(projectLocalCodexHomeForCleanup, env),
|
|
454
471
|
projectLocalCodexHomeForCleanup,
|
|
455
472
|
runtimeCodexHomeForCleanup: runtimeCodexHome,
|
|
456
473
|
};
|
|
@@ -654,11 +671,30 @@ export function buildHudPaneCleanupTargets(existingPaneIds, createdPaneId, leade
|
|
|
654
671
|
}
|
|
655
672
|
return [...targets];
|
|
656
673
|
}
|
|
674
|
+
function isCrossPlatformAbsolutePath(raw) {
|
|
675
|
+
return posix.isAbsolute(raw) || win32.isAbsolute(raw);
|
|
676
|
+
}
|
|
657
677
|
export function resolveOmxRootForLaunch(cwd, env = process.env) {
|
|
658
678
|
const raw = env.OMX_ROOT || env.OMX_STATE_ROOT;
|
|
659
679
|
if (typeof raw !== "string" || raw.trim() === "")
|
|
660
680
|
return undefined;
|
|
661
|
-
return raw
|
|
681
|
+
return isCrossPlatformAbsolutePath(raw) ? raw : join(cwd, raw);
|
|
682
|
+
}
|
|
683
|
+
function hasExplicitOmxRootEnv(env = process.env) {
|
|
684
|
+
return [env.OMX_ROOT, env.OMX_STATE_ROOT].some((value) => typeof value === "string" && value.trim() !== "");
|
|
685
|
+
}
|
|
686
|
+
export function resolveDisposableWorktreeOmxRootForLaunch(ensuredWorktree, env = process.env) {
|
|
687
|
+
if (!ensuredWorktree?.enabled)
|
|
688
|
+
return undefined;
|
|
689
|
+
if (hasExplicitOmxRootEnv(env))
|
|
690
|
+
return undefined;
|
|
691
|
+
return ensuredWorktree.repoRoot;
|
|
692
|
+
}
|
|
693
|
+
function applyDisposableWorktreeOmxRootForLaunch(ensuredWorktree, env = process.env) {
|
|
694
|
+
const omxRootOverride = resolveDisposableWorktreeOmxRootForLaunch(ensuredWorktree, env);
|
|
695
|
+
if (!omxRootOverride)
|
|
696
|
+
return;
|
|
697
|
+
env.OMX_ROOT = omxRootOverride;
|
|
662
698
|
}
|
|
663
699
|
export function shouldAutoIsolateMadmaxLaunch(command, launchArgs, env = process.env) {
|
|
664
700
|
if (command !== "launch" && command !== "exec")
|
|
@@ -703,6 +739,7 @@ export async function main(args) {
|
|
|
703
739
|
const knownCommands = new Set([
|
|
704
740
|
"launch",
|
|
705
741
|
"exec",
|
|
742
|
+
"imagegen",
|
|
706
743
|
"setup",
|
|
707
744
|
"update",
|
|
708
745
|
"list",
|
|
@@ -828,6 +865,9 @@ export async function main(args) {
|
|
|
828
865
|
await execWithOverlay(launchArgs);
|
|
829
866
|
}
|
|
830
867
|
break;
|
|
868
|
+
case "imagegen":
|
|
869
|
+
await imagegenCommand(args.slice(1));
|
|
870
|
+
break;
|
|
831
871
|
case "sparkshell":
|
|
832
872
|
await sparkshellCommand(args.slice(1));
|
|
833
873
|
break;
|
|
@@ -1010,6 +1050,7 @@ export async function launchWithHud(args) {
|
|
|
1010
1050
|
const normalizedArgs = normalizeCodexLaunchArgs(notifyTempResult.passthroughArgs);
|
|
1011
1051
|
let cwd = launchCwd;
|
|
1012
1052
|
let worktreeDirty = false;
|
|
1053
|
+
let ensuredLaunchWorktree;
|
|
1013
1054
|
if (parsedWorktree.mode.enabled) {
|
|
1014
1055
|
const planned = planWorktreeTarget({
|
|
1015
1056
|
cwd: launchCwd,
|
|
@@ -1017,6 +1058,7 @@ export async function launchWithHud(args) {
|
|
|
1017
1058
|
mode: parsedWorktree.mode,
|
|
1018
1059
|
});
|
|
1019
1060
|
const ensured = ensureWorktree(planned, { allowDirtyReuse: true });
|
|
1061
|
+
ensuredLaunchWorktree = ensured;
|
|
1020
1062
|
if (ensured.enabled) {
|
|
1021
1063
|
cwd = ensured.worktreePath;
|
|
1022
1064
|
if (ensured.dirty) {
|
|
@@ -1033,6 +1075,7 @@ export async function launchWithHud(args) {
|
|
|
1033
1075
|
}
|
|
1034
1076
|
}
|
|
1035
1077
|
}
|
|
1078
|
+
applyDisposableWorktreeOmxRootForLaunch(ensuredLaunchWorktree);
|
|
1036
1079
|
const sessionId = `omx-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
1037
1080
|
try {
|
|
1038
1081
|
await maybeCheckAndPromptUpdate(cwd);
|
|
@@ -1063,6 +1106,7 @@ export async function launchWithHud(args) {
|
|
|
1063
1106
|
}
|
|
1064
1107
|
const preparedCodexHome = await prepareCodexHomeForLaunch(launchCwd, sessionId, process.env);
|
|
1065
1108
|
const codexHomeOverride = preparedCodexHome.codexHomeOverride;
|
|
1109
|
+
const sqliteHomeOverride = preparedCodexHome.sqliteHomeOverride;
|
|
1066
1110
|
const projectLocalCodexHomeForCleanup = preparedCodexHome.projectLocalCodexHomeForCleanup;
|
|
1067
1111
|
// ── Phase 1: preLaunch ──────────────────────────────────────────────────
|
|
1068
1112
|
try {
|
|
@@ -1078,7 +1122,7 @@ export async function launchWithHud(args) {
|
|
|
1078
1122
|
const notifyTempContractRaw = notifyTempResult.contract.active
|
|
1079
1123
|
? serializeNotifyTempContract(notifyTempResult.contract)
|
|
1080
1124
|
: null;
|
|
1081
|
-
const launchResult = runCodex(cwd, normalizedArgs, sessionId, workerSparkModel, codexHomeOverride, notifyTempContractRaw, effectiveExplicitLaunchPolicy, projectLocalCodexHomeForCleanup, preparedCodexHome.runtimeCodexHomeForCleanup);
|
|
1125
|
+
const launchResult = runCodex(cwd, normalizedArgs, sessionId, workerSparkModel, codexHomeOverride, sqliteHomeOverride, notifyTempContractRaw, effectiveExplicitLaunchPolicy, projectLocalCodexHomeForCleanup, preparedCodexHome.runtimeCodexHomeForCleanup);
|
|
1082
1126
|
postLaunchHandledExternally = launchResult.postLaunchHandledExternally;
|
|
1083
1127
|
}
|
|
1084
1128
|
finally {
|
|
@@ -1096,6 +1140,7 @@ export async function execWithOverlay(args) {
|
|
|
1096
1140
|
const normalizedArgs = normalizeCodexLaunchArgs(notifyTempResult.passthroughArgs);
|
|
1097
1141
|
let cwd = launchCwd;
|
|
1098
1142
|
let worktreeDirty = false;
|
|
1143
|
+
let ensuredLaunchWorktree;
|
|
1099
1144
|
if (parsedWorktree.mode.enabled) {
|
|
1100
1145
|
const planned = planWorktreeTarget({
|
|
1101
1146
|
cwd: launchCwd,
|
|
@@ -1103,6 +1148,7 @@ export async function execWithOverlay(args) {
|
|
|
1103
1148
|
mode: parsedWorktree.mode,
|
|
1104
1149
|
});
|
|
1105
1150
|
const ensured = ensureWorktree(planned, { allowDirtyReuse: true });
|
|
1151
|
+
ensuredLaunchWorktree = ensured;
|
|
1106
1152
|
if (ensured.enabled) {
|
|
1107
1153
|
cwd = ensured.worktreePath;
|
|
1108
1154
|
if (ensured.dirty) {
|
|
@@ -1119,6 +1165,7 @@ export async function execWithOverlay(args) {
|
|
|
1119
1165
|
}
|
|
1120
1166
|
}
|
|
1121
1167
|
}
|
|
1168
|
+
applyDisposableWorktreeOmxRootForLaunch(ensuredLaunchWorktree);
|
|
1122
1169
|
const sessionId = `omx-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
|
|
1123
1170
|
try {
|
|
1124
1171
|
await maybeCheckAndPromptUpdate(cwd);
|
|
@@ -1143,6 +1190,7 @@ export async function execWithOverlay(args) {
|
|
|
1143
1190
|
}
|
|
1144
1191
|
const preparedCodexHome = await prepareCodexHomeForLaunch(launchCwd, sessionId, process.env);
|
|
1145
1192
|
const codexHomeOverride = preparedCodexHome.codexHomeOverride;
|
|
1193
|
+
const sqliteHomeOverride = preparedCodexHome.sqliteHomeOverride;
|
|
1146
1194
|
const projectLocalCodexHomeForCleanup = preparedCodexHome.projectLocalCodexHomeForCleanup;
|
|
1147
1195
|
try {
|
|
1148
1196
|
await preLaunch(cwd, sessionId, notifyTempResult.contract, codexHomeOverride, true, worktreeDirty);
|
|
@@ -1159,6 +1207,7 @@ export async function execWithOverlay(args) {
|
|
|
1159
1207
|
const codexEnvBase = {
|
|
1160
1208
|
...process.env,
|
|
1161
1209
|
...(codexHomeOverride ? { CODEX_HOME: codexHomeOverride } : {}),
|
|
1210
|
+
...(sqliteHomeOverride ? { [CODEX_SQLITE_HOME_ENV]: sqliteHomeOverride } : {}),
|
|
1162
1211
|
...(omxRootOverride ? { OMX_ROOT: omxRootOverride } : {}),
|
|
1163
1212
|
};
|
|
1164
1213
|
const codexEnv = notifyTempContractRaw
|
|
@@ -1854,7 +1903,7 @@ export function withTmuxExtendedKeys(cwd, run, execFileSyncImpl = (file, tmuxArg
|
|
|
1854
1903
|
releaseTmuxExtendedKeysLease(cwd, leaseHandle, execFileSyncImpl);
|
|
1855
1904
|
}
|
|
1856
1905
|
}
|
|
1857
|
-
export function buildDetachedSessionBootstrapSteps(sessionName, cwd, codexCmd, hudCmd, workerLaunchArgs, codexHomeOverride, notifyTempContractRaw, nativeWindows = false, sessionId, projectLocalCodexHomeForCleanup, runtimeCodexHomeForCleanup, omxRootOverride, env = process.env) {
|
|
1906
|
+
export function buildDetachedSessionBootstrapSteps(sessionName, cwd, codexCmd, hudCmd, workerLaunchArgs, codexHomeOverride, notifyTempContractRaw, nativeWindows = false, sessionId, projectLocalCodexHomeForCleanup, runtimeCodexHomeForCleanup, omxRootOverride, env = process.env, sqliteHomeOverride) {
|
|
1858
1907
|
const detachedLeaderCmd = nativeWindows
|
|
1859
1908
|
? "powershell.exe"
|
|
1860
1909
|
: buildDetachedSessionLeaderCommand(cwd, sessionName, codexCmd, sessionId, codexHomeOverride, projectLocalCodexHomeForCleanup, runtimeCodexHomeForCleanup);
|
|
@@ -1874,6 +1923,7 @@ export function buildDetachedSessionBootstrapSteps(sessionName, cwd, codexCmd, h
|
|
|
1874
1923
|
...(sessionId ? ["-e", `OMX_SESSION_ID=${sessionId}`] : []),
|
|
1875
1924
|
...(sessionId ? ["-e", `${OMX_TMUX_HUD_OWNER_ENV}=1`] : []),
|
|
1876
1925
|
...(codexHomeOverride ? ["-e", `CODEX_HOME=${codexHomeOverride}`] : []),
|
|
1926
|
+
...(sqliteHomeOverride ? ["-e", `${CODEX_SQLITE_HOME_ENV}=${sqliteHomeOverride}`] : []),
|
|
1877
1927
|
...(omxRootOverride ? ["-e", `OMX_ROOT=${omxRootOverride}`] : []),
|
|
1878
1928
|
...(env.OMX_STATE_ROOT ? ["-e", `OMX_STATE_ROOT=${env.OMX_STATE_ROOT}`] : []),
|
|
1879
1929
|
...(env.OMXBOX_ACTIVE ? ["-e", `OMXBOX_ACTIVE=${env.OMXBOX_ACTIVE}`] : []),
|
|
@@ -2089,6 +2139,48 @@ async function readPostLaunchModeStateFile(path, dependencies = {}) {
|
|
|
2089
2139
|
}
|
|
2090
2140
|
return { kind: "recoverable" };
|
|
2091
2141
|
}
|
|
2142
|
+
function cleanPostLaunchString(value) {
|
|
2143
|
+
return typeof value === "string" ? value.trim() : "";
|
|
2144
|
+
}
|
|
2145
|
+
function postLaunchUniqueStrings(values) {
|
|
2146
|
+
return [...new Set(values.map((value) => value.trim()).filter(Boolean))];
|
|
2147
|
+
}
|
|
2148
|
+
async function scrubPostLaunchRootSkillActiveForSession(cwd, sessionId, nowIso, writeFileFn, rootStateBeforeCleanup) {
|
|
2149
|
+
const normalizedSessionId = cleanPostLaunchString(sessionId);
|
|
2150
|
+
if (!normalizedSessionId)
|
|
2151
|
+
return;
|
|
2152
|
+
const { rootPath } = getSkillActiveStatePaths(cwd);
|
|
2153
|
+
const rootState = rootStateBeforeCleanup ?? await readSkillActiveState(rootPath);
|
|
2154
|
+
if (!rootState)
|
|
2155
|
+
return;
|
|
2156
|
+
const rootSessionIds = postLaunchUniqueStrings([
|
|
2157
|
+
cleanPostLaunchString(rootState.session_id),
|
|
2158
|
+
cleanPostLaunchString(extractSessionIdFromInitializedStatePath(rootState.initialized_state_path)),
|
|
2159
|
+
]);
|
|
2160
|
+
const rootBelongsToSession = rootSessionIds.includes(normalizedSessionId);
|
|
2161
|
+
const entries = listActiveSkills(rootState);
|
|
2162
|
+
const keptEntries = entries.filter((entry) => {
|
|
2163
|
+
const entrySessionId = cleanPostLaunchString(entry.session_id);
|
|
2164
|
+
if (entrySessionId)
|
|
2165
|
+
return entrySessionId !== normalizedSessionId;
|
|
2166
|
+
return !rootBelongsToSession;
|
|
2167
|
+
});
|
|
2168
|
+
if (keptEntries.length === entries.length && rootState.active !== true)
|
|
2169
|
+
return;
|
|
2170
|
+
if (keptEntries.length === entries.length && !rootBelongsToSession)
|
|
2171
|
+
return;
|
|
2172
|
+
const nextRoot = {
|
|
2173
|
+
...rootState,
|
|
2174
|
+
active: keptEntries.length > 0,
|
|
2175
|
+
skill: keptEntries[0]?.skill ?? (keptEntries.length > 0 ? cleanPostLaunchString(rootState.skill) : ""),
|
|
2176
|
+
phase: keptEntries[0]?.phase ?? (keptEntries.length > 0 ? cleanPostLaunchString(rootState.phase) : "complete"),
|
|
2177
|
+
updated_at: nowIso,
|
|
2178
|
+
active_skills: keptEntries,
|
|
2179
|
+
post_launch_reconciled_at: nowIso,
|
|
2180
|
+
post_launch_reconciliation_reason: "terminal_session_cleanup",
|
|
2181
|
+
};
|
|
2182
|
+
await writeFileFn(rootPath, JSON.stringify(nextRoot, null, 2));
|
|
2183
|
+
}
|
|
2092
2184
|
function buildRecoveredPostLaunchModeState(mode, completedAt) {
|
|
2093
2185
|
return {
|
|
2094
2186
|
active: false,
|
|
@@ -2113,7 +2205,12 @@ export async function cleanupPostLaunchModeStateFiles(cwd, sessionId, dependenci
|
|
|
2113
2205
|
const writeFile = dependencies.writeFile ?? (await import("fs/promises")).writeFile;
|
|
2114
2206
|
const writeWarn = dependencies.writeWarn ?? console.warn;
|
|
2115
2207
|
const now = dependencies.now ?? (() => new Date());
|
|
2116
|
-
const scopedDirs =
|
|
2208
|
+
const scopedDirs = sessionId
|
|
2209
|
+
? [getStateDir(cwd, sessionId)]
|
|
2210
|
+
: [getBaseStateDir(cwd)];
|
|
2211
|
+
const rootSkillActiveStateBeforeCleanup = sessionId
|
|
2212
|
+
? await readSkillActiveState(getSkillActiveStatePaths(cwd).rootPath)
|
|
2213
|
+
: null;
|
|
2117
2214
|
for (const stateDir of scopedDirs) {
|
|
2118
2215
|
const files = await readdir(stateDir).catch(() => []);
|
|
2119
2216
|
for (const file of files) {
|
|
@@ -2186,6 +2283,14 @@ export async function cleanupPostLaunchModeStateFiles(cwd, sessionId, dependenci
|
|
|
2186
2283
|
}
|
|
2187
2284
|
}
|
|
2188
2285
|
}
|
|
2286
|
+
if (sessionId) {
|
|
2287
|
+
try {
|
|
2288
|
+
await scrubPostLaunchRootSkillActiveForSession(cwd, sessionId, now().toISOString(), writeFile, rootSkillActiveStateBeforeCleanup);
|
|
2289
|
+
}
|
|
2290
|
+
catch (err) {
|
|
2291
|
+
writeWarn(`[omx] postLaunch: failed to reconcile root skill-active state: ${err instanceof Error ? err.message : err}`);
|
|
2292
|
+
}
|
|
2293
|
+
}
|
|
2189
2294
|
}
|
|
2190
2295
|
export async function reapPostLaunchOrphanedMcpProcesses(dependencies = {}) {
|
|
2191
2296
|
const cleanup = dependencies.cleanup ?? cleanupLaunchOrphanedMcpProcesses;
|
|
@@ -2312,7 +2417,7 @@ ${launchAppendix}${dirtyWorktreeGuidance}`
|
|
|
2312
2417
|
* runCodex: Launch Codex CLI (blocks until exit).
|
|
2313
2418
|
* All 3 paths (new tmux, existing tmux, no tmux) block via execSync/execFileSync.
|
|
2314
2419
|
*/
|
|
2315
|
-
function runCodex(cwd, args, sessionId, workerDefaultModel, codexHomeOverride, notifyTempContractRaw, explicitLaunchPolicy, projectLocalCodexHomeForCleanup, runtimeCodexHomeForCleanup) {
|
|
2420
|
+
function runCodex(cwd, args, sessionId, workerDefaultModel, codexHomeOverride, sqliteHomeOverride, notifyTempContractRaw, explicitLaunchPolicy, projectLocalCodexHomeForCleanup, runtimeCodexHomeForCleanup) {
|
|
2316
2421
|
const launchArgs = injectModelInstructionsBypassArgs(cwd, args, process.env, sessionModelInstructionsPath(cwd, sessionId));
|
|
2317
2422
|
const nativeWindows = isNativeWindows();
|
|
2318
2423
|
const omxBin = resolveOmxEntryPath();
|
|
@@ -2328,6 +2433,7 @@ function runCodex(cwd, args, sessionId, workerDefaultModel, codexHomeOverride, n
|
|
|
2328
2433
|
const codexBaseEnv = {
|
|
2329
2434
|
...process.env,
|
|
2330
2435
|
...(codexHomeOverride ? { CODEX_HOME: codexHomeOverride } : {}),
|
|
2436
|
+
...(sqliteHomeOverride ? { [CODEX_SQLITE_HOME_ENV]: sqliteHomeOverride } : {}),
|
|
2331
2437
|
...(omxRootOverride ? { OMX_ROOT: omxRootOverride } : {}),
|
|
2332
2438
|
};
|
|
2333
2439
|
const codexEnvWithSession = {
|
|
@@ -2425,7 +2531,7 @@ function runCodex(cwd, args, sessionId, workerDefaultModel, codexHomeOverride, n
|
|
|
2425
2531
|
let registeredHookName = null;
|
|
2426
2532
|
let registeredClientAttachedHookName = null;
|
|
2427
2533
|
try {
|
|
2428
|
-
const bootstrapSteps = buildDetachedSessionBootstrapSteps(sessionName, cwd, codexCmd, hudCmd, workerLaunchArgs, codexHomeOverride, notifyTempContractRaw, nativeWindows, sessionId, projectLocalCodexHomeForCleanup, runtimeCodexHomeForCleanup, omxRootOverride, process.env);
|
|
2534
|
+
const bootstrapSteps = buildDetachedSessionBootstrapSteps(sessionName, cwd, codexCmd, hudCmd, workerLaunchArgs, codexHomeOverride, notifyTempContractRaw, nativeWindows, sessionId, projectLocalCodexHomeForCleanup, runtimeCodexHomeForCleanup, omxRootOverride, process.env, sqliteHomeOverride);
|
|
2429
2535
|
for (const step of bootstrapSteps) {
|
|
2430
2536
|
const output = execTmuxFileSync(step.args, {
|
|
2431
2537
|
stdio: "pipe",
|