oh-my-codex 0.11.13 → 0.12.0
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 +27 -17
- package/crates/omx-runtime/src/main.rs +6 -2
- package/dist/agents/native-config.js +1 -1
- package/dist/agents/native-config.js.map +1 -1
- package/dist/cli/__tests__/autoresearch-guided.test.js +74 -2
- package/dist/cli/__tests__/autoresearch-guided.test.js.map +1 -1
- package/dist/cli/__tests__/cleanup.test.js +22 -30
- package/dist/cli/__tests__/cleanup.test.js.map +1 -1
- package/dist/cli/__tests__/error-handling-warnings.test.js +3 -1
- package/dist/cli/__tests__/error-handling-warnings.test.js.map +1 -1
- package/dist/cli/__tests__/index.test.js +217 -4
- package/dist/cli/__tests__/index.test.js.map +1 -1
- package/dist/cli/__tests__/setup-refresh.test.js +49 -9
- package/dist/cli/__tests__/setup-refresh.test.js.map +1 -1
- package/dist/cli/__tests__/setup-scope.test.js +9 -0
- package/dist/cli/__tests__/setup-scope.test.js.map +1 -1
- package/dist/cli/__tests__/team.test.js +136 -11
- package/dist/cli/__tests__/team.test.js.map +1 -1
- package/dist/cli/__tests__/uninstall.test.js +10 -0
- package/dist/cli/__tests__/uninstall.test.js.map +1 -1
- package/dist/cli/__tests__/windows-popup-loop-contract.test.js +1 -0
- package/dist/cli/__tests__/windows-popup-loop-contract.test.js.map +1 -1
- package/dist/cli/autoresearch-guided.d.ts.map +1 -1
- package/dist/cli/autoresearch-guided.js +2 -1
- package/dist/cli/autoresearch-guided.js.map +1 -1
- package/dist/cli/autoresearch.d.ts.map +1 -1
- package/dist/cli/autoresearch.js +2 -1
- package/dist/cli/autoresearch.js.map +1 -1
- package/dist/cli/cleanup.d.ts.map +1 -1
- package/dist/cli/cleanup.js +4 -2
- package/dist/cli/cleanup.js.map +1 -1
- package/dist/cli/index.d.ts +12 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +238 -30
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/omx.js +2 -0
- package/dist/cli/omx.js.map +1 -1
- package/dist/cli/setup.d.ts +1 -0
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +41 -7
- package/dist/cli/setup.js.map +1 -1
- package/dist/cli/team.d.ts.map +1 -1
- package/dist/cli/team.js +16 -557
- package/dist/cli/team.js.map +1 -1
- package/dist/cli/uninstall.d.ts.map +1 -1
- package/dist/cli/uninstall.js +34 -9
- package/dist/cli/uninstall.js.map +1 -1
- package/dist/config/__tests__/generator-idempotent.test.js +79 -2
- package/dist/config/__tests__/generator-idempotent.test.js.map +1 -1
- package/dist/config/__tests__/generator-notify.test.js +2 -0
- package/dist/config/__tests__/generator-notify.test.js.map +1 -1
- package/dist/config/codex-hooks.d.ts +11 -0
- package/dist/config/codex-hooks.d.ts.map +1 -0
- package/dist/config/codex-hooks.js +50 -0
- package/dist/config/codex-hooks.js.map +1 -0
- package/dist/config/generator.d.ts +5 -3
- package/dist/config/generator.d.ts.map +1 -1
- package/dist/config/generator.js +24 -14
- package/dist/config/generator.js.map +1 -1
- package/dist/hooks/__tests__/debugger-log-recency-contract.test.d.ts +2 -0
- package/dist/hooks/__tests__/debugger-log-recency-contract.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/debugger-log-recency-contract.test.js +20 -0
- package/dist/hooks/__tests__/debugger-log-recency-contract.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js +236 -2
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js +86 -0
- package/dist/hooks/__tests__/notify-hook-all-workers-idle.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js +40 -0
- package/dist/hooks/__tests__/notify-hook-auto-nudge.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-managed-tmux.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-hook-managed-tmux.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-managed-tmux.test.js +54 -0
- package/dist/hooks/__tests__/notify-hook-managed-tmux.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-modules.test.js +31 -0
- package/dist/hooks/__tests__/notify-hook-modules.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-ralph-resume.test.js +51 -0
- package/dist/hooks/__tests__/notify-hook-ralph-resume.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-session-idle-dedupe.test.d.ts +2 -0
- package/dist/hooks/__tests__/notify-hook-session-idle-dedupe.test.d.ts.map +1 -0
- package/dist/hooks/__tests__/notify-hook-session-idle-dedupe.test.js +136 -0
- package/dist/hooks/__tests__/notify-hook-session-idle-dedupe.test.js.map +1 -0
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js +120 -0
- package/dist/hooks/__tests__/notify-hook-team-dispatch.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-team-leader-nudge.test.js +145 -20
- 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 +116 -0
- package/dist/hooks/__tests__/notify-hook-team-tmux-guard.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js +86 -0
- package/dist/hooks/__tests__/notify-hook-worker-idle.test.js.map +1 -1
- package/dist/hooks/__tests__/pre-context-gate-skills.test.js +1 -0
- package/dist/hooks/__tests__/pre-context-gate-skills.test.js.map +1 -1
- package/dist/hooks/extensibility/__tests__/runtime.test.js +49 -0
- package/dist/hooks/extensibility/__tests__/runtime.test.js.map +1 -1
- package/dist/hooks/extensibility/runtime.d.ts.map +1 -1
- package/dist/hooks/extensibility/runtime.js +10 -0
- package/dist/hooks/extensibility/runtime.js.map +1 -1
- package/dist/hooks/extensibility/types.d.ts +1 -1
- package/dist/hooks/extensibility/types.d.ts.map +1 -1
- package/dist/hooks/prompt-guidance-contract.d.ts.map +1 -1
- package/dist/hooks/prompt-guidance-contract.js +12 -8
- package/dist/hooks/prompt-guidance-contract.js.map +1 -1
- package/dist/hooks/session.d.ts +5 -1
- package/dist/hooks/session.d.ts.map +1 -1
- package/dist/hooks/session.js +10 -6
- package/dist/hooks/session.js.map +1 -1
- package/dist/hud/index.d.ts.map +1 -1
- package/dist/hud/index.js +6 -1
- package/dist/hud/index.js.map +1 -1
- package/dist/mcp/__tests__/bootstrap.test.js +0 -3
- package/dist/mcp/__tests__/bootstrap.test.js.map +1 -1
- package/dist/mcp/__tests__/code-intel-server.test.js +27 -1
- package/dist/mcp/__tests__/code-intel-server.test.js.map +1 -1
- package/dist/mcp/__tests__/server-lifecycle.test.js +0 -5
- package/dist/mcp/__tests__/server-lifecycle.test.js.map +1 -1
- package/dist/mcp/bootstrap.d.ts +1 -1
- package/dist/mcp/bootstrap.d.ts.map +1 -1
- package/dist/mcp/bootstrap.js +0 -1
- package/dist/mcp/bootstrap.js.map +1 -1
- package/dist/mcp/code-intel-server.d.ts +20 -0
- package/dist/mcp/code-intel-server.d.ts.map +1 -1
- package/dist/mcp/code-intel-server.js +6 -5
- package/dist/mcp/code-intel-server.js.map +1 -1
- package/dist/notifications/__tests__/idle-cooldown.test.js +24 -1
- package/dist/notifications/__tests__/idle-cooldown.test.js.map +1 -1
- package/dist/notifications/__tests__/reply-listener.test.js +20 -1
- package/dist/notifications/__tests__/reply-listener.test.js.map +1 -1
- package/dist/notifications/__tests__/tmux.test.js +41 -0
- package/dist/notifications/__tests__/tmux.test.js.map +1 -1
- package/dist/notifications/idle-cooldown.d.ts +13 -0
- package/dist/notifications/idle-cooldown.d.ts.map +1 -1
- package/dist/notifications/idle-cooldown.js +50 -16
- package/dist/notifications/idle-cooldown.js.map +1 -1
- package/dist/notifications/reply-listener.d.ts.map +1 -1
- package/dist/notifications/reply-listener.js +2 -0
- package/dist/notifications/reply-listener.js.map +1 -1
- package/dist/notifications/tmux.d.ts.map +1 -1
- package/dist/notifications/tmux.js +4 -0
- package/dist/notifications/tmux.js.map +1 -1
- package/dist/scripts/__tests__/codex-native-hook.test.d.ts +2 -0
- package/dist/scripts/__tests__/codex-native-hook.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/codex-native-hook.test.js +720 -0
- package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -0
- package/dist/scripts/codex-native-hook.d.ts +22 -0
- package/dist/scripts/codex-native-hook.d.ts.map +1 -0
- package/dist/scripts/codex-native-hook.js +594 -0
- package/dist/scripts/codex-native-hook.js.map +1 -0
- package/dist/scripts/codex-native-pre-post.d.ts +26 -0
- package/dist/scripts/codex-native-pre-post.d.ts.map +1 -0
- package/dist/scripts/codex-native-pre-post.js +118 -0
- package/dist/scripts/codex-native-pre-post.js.map +1 -0
- package/dist/scripts/notify-fallback-watcher.js +262 -18
- package/dist/scripts/notify-fallback-watcher.js.map +1 -1
- package/dist/scripts/notify-hook/auto-nudge.d.ts.map +1 -1
- package/dist/scripts/notify-hook/auto-nudge.js +5 -6
- package/dist/scripts/notify-hook/auto-nudge.js.map +1 -1
- package/dist/scripts/notify-hook/log.d.ts +2 -2
- package/dist/scripts/notify-hook/log.d.ts.map +1 -1
- package/dist/scripts/notify-hook/log.js +10 -2
- package/dist/scripts/notify-hook/log.js.map +1 -1
- package/dist/scripts/notify-hook/managed-tmux.d.ts.map +1 -1
- package/dist/scripts/notify-hook/managed-tmux.js +2 -0
- package/dist/scripts/notify-hook/managed-tmux.js.map +1 -1
- package/dist/scripts/notify-hook/orchestration-intent.d.ts +18 -0
- package/dist/scripts/notify-hook/orchestration-intent.d.ts.map +1 -0
- package/dist/scripts/notify-hook/orchestration-intent.js +72 -0
- package/dist/scripts/notify-hook/orchestration-intent.js.map +1 -0
- package/dist/scripts/notify-hook/process-runner.js.map +1 -1
- package/dist/scripts/notify-hook/ralph-session-resume.d.ts.map +1 -1
- package/dist/scripts/notify-hook/ralph-session-resume.js +7 -0
- package/dist/scripts/notify-hook/ralph-session-resume.js.map +1 -1
- package/dist/scripts/notify-hook/team-dispatch.d.ts +15 -6
- package/dist/scripts/notify-hook/team-dispatch.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-dispatch.js +125 -6
- package/dist/scripts/notify-hook/team-dispatch.js.map +1 -1
- package/dist/scripts/notify-hook/team-leader-nudge.d.ts +3 -2
- package/dist/scripts/notify-hook/team-leader-nudge.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-leader-nudge.js +165 -37
- package/dist/scripts/notify-hook/team-leader-nudge.js.map +1 -1
- package/dist/scripts/notify-hook/team-tmux-guard.d.ts +4 -1
- package/dist/scripts/notify-hook/team-tmux-guard.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-tmux-guard.js +33 -44
- package/dist/scripts/notify-hook/team-tmux-guard.js.map +1 -1
- package/dist/scripts/notify-hook/team-worker.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-worker.js +68 -5
- package/dist/scripts/notify-hook/team-worker.js.map +1 -1
- package/dist/scripts/notify-hook/utils.d.ts +1 -1
- package/dist/scripts/notify-hook/utils.d.ts.map +1 -1
- package/dist/scripts/notify-hook/utils.js.map +1 -1
- package/dist/scripts/notify-hook.js +55 -32
- package/dist/scripts/notify-hook.js.map +1 -1
- package/dist/team/__tests__/api-interop.test.js +344 -18
- package/dist/team/__tests__/api-interop.test.js.map +1 -1
- package/dist/team/__tests__/delivery-e2e-smoke.test.d.ts +2 -0
- package/dist/team/__tests__/delivery-e2e-smoke.test.d.ts.map +1 -0
- package/dist/team/__tests__/delivery-e2e-smoke.test.js +671 -0
- package/dist/team/__tests__/delivery-e2e-smoke.test.js.map +1 -0
- package/dist/team/__tests__/mcp-comm.test.js +5 -0
- package/dist/team/__tests__/mcp-comm.test.js.map +1 -1
- package/dist/team/__tests__/runtime.test.js +422 -12
- package/dist/team/__tests__/runtime.test.js.map +1 -1
- package/dist/team/__tests__/state.test.js +126 -8
- package/dist/team/__tests__/state.test.js.map +1 -1
- package/dist/team/__tests__/team-ops-contract.test.js +4 -0
- package/dist/team/__tests__/team-ops-contract.test.js.map +1 -1
- package/dist/team/__tests__/tmux-session.test.js +160 -0
- package/dist/team/__tests__/tmux-session.test.js.map +1 -1
- package/dist/team/__tests__/worker-bootstrap.test.js +19 -1
- package/dist/team/__tests__/worker-bootstrap.test.js.map +1 -1
- package/dist/team/api-interop.d.ts.map +1 -1
- package/dist/team/api-interop.js +95 -23
- package/dist/team/api-interop.js.map +1 -1
- package/dist/team/contracts.d.ts +11 -1
- package/dist/team/contracts.d.ts.map +1 -1
- package/dist/team/contracts.js +29 -0
- package/dist/team/contracts.js.map +1 -1
- package/dist/team/delivery-log.d.ts +14 -0
- package/dist/team/delivery-log.d.ts.map +1 -0
- package/dist/team/delivery-log.js +35 -0
- package/dist/team/delivery-log.js.map +1 -0
- package/dist/team/idle-nudge.d.ts +2 -2
- package/dist/team/idle-nudge.js +2 -2
- package/dist/team/mcp-comm.d.ts +4 -0
- package/dist/team/mcp-comm.d.ts.map +1 -1
- package/dist/team/mcp-comm.js +84 -1
- package/dist/team/mcp-comm.js.map +1 -1
- package/dist/team/pane-status.d.ts +149 -0
- package/dist/team/pane-status.d.ts.map +1 -0
- package/dist/team/pane-status.js +558 -0
- package/dist/team/pane-status.js.map +1 -0
- package/dist/team/reminder-intents.d.ts +11 -0
- package/dist/team/reminder-intents.d.ts.map +1 -0
- package/dist/team/reminder-intents.js +40 -0
- package/dist/team/reminder-intents.js.map +1 -0
- package/dist/team/runtime-cli.d.ts +1 -1
- package/dist/team/runtime-cli.js +2 -2
- package/dist/team/runtime-cli.js.map +1 -1
- package/dist/team/runtime.d.ts +2 -1
- package/dist/team/runtime.d.ts.map +1 -1
- package/dist/team/runtime.js +407 -190
- package/dist/team/runtime.js.map +1 -1
- package/dist/team/scaling.d.ts.map +1 -1
- package/dist/team/scaling.js +6 -5
- package/dist/team/scaling.js.map +1 -1
- package/dist/team/state/dispatch.d.ts +4 -1
- package/dist/team/state/dispatch.d.ts.map +1 -1
- package/dist/team/state/dispatch.js +59 -18
- package/dist/team/state/dispatch.js.map +1 -1
- package/dist/team/state/mailbox.d.ts.map +1 -1
- package/dist/team/state/mailbox.js +39 -2
- package/dist/team/state/mailbox.js.map +1 -1
- package/dist/team/state/monitor.d.ts +2 -1
- package/dist/team/state/monitor.d.ts.map +1 -1
- package/dist/team/state/monitor.js +30 -1
- package/dist/team/state/monitor.js.map +1 -1
- package/dist/team/state/types.d.ts +5 -2
- package/dist/team/state/types.d.ts.map +1 -1
- package/dist/team/state/types.js.map +1 -1
- package/dist/team/state.d.ts +30 -3
- package/dist/team/state.d.ts.map +1 -1
- package/dist/team/state.js +170 -2
- package/dist/team/state.js.map +1 -1
- package/dist/team/team-ops.d.ts +5 -1
- package/dist/team/team-ops.d.ts.map +1 -1
- package/dist/team/team-ops.js +4 -0
- package/dist/team/team-ops.js.map +1 -1
- package/dist/team/tmux-session.d.ts +2 -0
- package/dist/team/tmux-session.d.ts.map +1 -1
- package/dist/team/tmux-session.js +19 -3
- package/dist/team/tmux-session.js.map +1 -1
- package/dist/team/worker-bootstrap.d.ts +4 -0
- package/dist/team/worker-bootstrap.d.ts.map +1 -1
- package/dist/team/worker-bootstrap.js +33 -6
- package/dist/team/worker-bootstrap.js.map +1 -1
- package/dist/utils/__tests__/paths.test.js +63 -1
- package/dist/utils/__tests__/paths.test.js.map +1 -1
- package/dist/utils/__tests__/platform-command.test.js +50 -4
- package/dist/utils/__tests__/platform-command.test.js.map +1 -1
- package/dist/utils/paths.d.ts +12 -0
- package/dist/utils/paths.d.ts.map +1 -1
- package/dist/utils/paths.js +44 -2
- package/dist/utils/paths.js.map +1 -1
- package/dist/utils/platform-command.d.ts.map +1 -1
- package/dist/utils/platform-command.js +13 -5
- package/dist/utils/platform-command.js.map +1 -1
- package/dist/utils/sleep.d.ts.map +1 -1
- package/dist/utils/sleep.js +10 -1
- package/dist/utils/sleep.js.map +1 -1
- package/package.json +1 -1
- package/prompts/analyst.md +2 -2
- package/prompts/api-reviewer.md +2 -2
- package/prompts/architect.md +2 -2
- package/prompts/build-fixer.md +2 -2
- package/prompts/code-reviewer.md +2 -2
- package/prompts/code-simplifier.md +1 -1
- package/prompts/critic.md +2 -2
- package/prompts/debugger.md +3 -2
- package/prompts/dependency-expert.md +2 -2
- package/prompts/designer.md +2 -2
- package/prompts/executor.md +3 -2
- package/prompts/explore.md +2 -2
- package/prompts/git-master.md +2 -2
- package/prompts/information-architect.md +2 -2
- package/prompts/performance-reviewer.md +2 -2
- package/prompts/planner.md +3 -2
- package/prompts/product-analyst.md +2 -2
- package/prompts/product-manager.md +2 -2
- package/prompts/qa-tester.md +2 -2
- package/prompts/quality-reviewer.md +2 -2
- package/prompts/quality-strategist.md +2 -2
- package/prompts/researcher.md +2 -2
- package/prompts/security-reviewer.md +2 -2
- package/prompts/sisyphus-lite.md +2 -2
- package/prompts/style-reviewer.md +2 -2
- package/prompts/team-executor.md +2 -2
- package/prompts/test-engineer.md +2 -2
- package/prompts/ux-researcher.md +2 -2
- package/prompts/verifier.md +3 -2
- package/prompts/vision.md +2 -2
- package/prompts/writer.md +2 -2
- package/skills/team/SKILL.md +18 -33
- package/src/scripts/__tests__/codex-native-hook.test.ts +931 -0
- package/src/scripts/codex-native-hook.ts +721 -0
- package/src/scripts/codex-native-pre-post.ts +161 -0
- package/src/scripts/notify-fallback-watcher.ts +318 -26
- package/src/scripts/notify-hook/auto-nudge.ts +5 -10
- package/src/scripts/notify-hook/log.ts +18 -4
- package/src/scripts/notify-hook/managed-tmux.ts +1 -0
- package/src/scripts/notify-hook/orchestration-intent.ts +82 -0
- package/src/scripts/notify-hook/process-runner.ts +4 -4
- package/src/scripts/notify-hook/ralph-session-resume.ts +9 -0
- package/src/scripts/notify-hook/team-dispatch.ts +134 -6
- package/src/scripts/notify-hook/team-leader-nudge.ts +183 -37
- package/src/scripts/notify-hook/team-tmux-guard.ts +35 -43
- package/src/scripts/notify-hook/team-worker.ts +73 -4
- package/src/scripts/notify-hook/utils.ts +1 -1
- package/src/scripts/notify-hook.ts +64 -32
- package/templates/AGENTS.md +21 -11
- package/README.de.md +0 -263
- package/README.el.md +0 -223
- package/README.es.md +0 -263
- package/README.fr.md +0 -263
- package/README.it.md +0 -263
- package/README.ja.md +0 -264
- package/README.ko.md +0 -264
- package/README.pl.md +0 -216
- package/README.pt.md +0 -263
- package/README.ru.md +0 -263
- package/README.tr.md +0 -263
- package/README.vi.md +0 -223
- package/README.zh-TW.md +0 -293
- package/README.zh.md +0 -264
- package/dist/mcp/__tests__/team-server-cleanup.test.d.ts +0 -2
- package/dist/mcp/__tests__/team-server-cleanup.test.d.ts.map +0 -1
- package/dist/mcp/__tests__/team-server-cleanup.test.js +0 -219
- package/dist/mcp/__tests__/team-server-cleanup.test.js.map +0 -1
- package/dist/mcp/__tests__/team-server-runtime-deps.test.d.ts +0 -2
- package/dist/mcp/__tests__/team-server-runtime-deps.test.d.ts.map +0 -1
- package/dist/mcp/__tests__/team-server-runtime-deps.test.js +0 -13
- package/dist/mcp/__tests__/team-server-runtime-deps.test.js.map +0 -1
- package/dist/mcp/__tests__/team-server-wait.test.d.ts +0 -2
- package/dist/mcp/__tests__/team-server-wait.test.d.ts.map +0 -1
- package/dist/mcp/__tests__/team-server-wait.test.js +0 -155
- package/dist/mcp/__tests__/team-server-wait.test.js.map +0 -1
- package/dist/mcp/team-server.d.ts +0 -24
- package/dist/mcp/team-server.d.ts.map +0 -1
- package/dist/mcp/team-server.js +0 -482
- package/dist/mcp/team-server.js.map +0 -1
|
@@ -3,14 +3,19 @@
|
|
|
3
3
|
* Team worker: heartbeat, idle detection, and leader notification.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { readFile, writeFile, mkdir, appendFile, rename, stat } from 'fs/promises';
|
|
6
|
+
import { readFile, writeFile, mkdir, appendFile, rename, stat, readdir } from 'fs/promises';
|
|
7
7
|
import { existsSync } from 'fs';
|
|
8
8
|
import { join, resolve as resolvePath } from 'path';
|
|
9
9
|
import { asNumber, safeString, isTerminalPhase } from './utils.js';
|
|
10
10
|
import { readJsonIfExists } from './state-io.js';
|
|
11
11
|
import { logTmuxHookEvent } from './log.js';
|
|
12
|
-
import {
|
|
12
|
+
import { evaluatePaneInjectionReadiness, sendPaneInput } from './team-tmux-guard.js';
|
|
13
13
|
import { resolvePaneTarget } from './tmux-injection.js';
|
|
14
|
+
import {
|
|
15
|
+
classifyLeaderActionState,
|
|
16
|
+
resolveAllWorkersIdleIntent,
|
|
17
|
+
resolveWorkerIdleIntent,
|
|
18
|
+
} from './orchestration-intent.js';
|
|
14
19
|
import { DEFAULT_MARKER } from '../tmux-hook-engine.js';
|
|
15
20
|
const LEADER_PANE_SHELL_NO_INJECTION_REASON = 'leader_pane_shell_no_injection';
|
|
16
21
|
|
|
@@ -258,6 +263,31 @@ export async function readTeamWorkersForIdleCheck(stateDir, teamName) {
|
|
|
258
263
|
}
|
|
259
264
|
}
|
|
260
265
|
|
|
266
|
+
async function readTeamTaskCounts(stateDir, teamName) {
|
|
267
|
+
const tasksDir = join(stateDir, 'team', teamName, 'tasks');
|
|
268
|
+
const taskCounts = { pending: 0, blocked: 0, in_progress: 0, completed: 0, failed: 0 };
|
|
269
|
+
if (!existsSync(tasksDir)) return taskCounts;
|
|
270
|
+
|
|
271
|
+
try {
|
|
272
|
+
const taskFiles = (await readdir(tasksDir))
|
|
273
|
+
.filter((entry) => /^task-\d+\.json$/.test(entry))
|
|
274
|
+
.sort();
|
|
275
|
+
for (const entry of taskFiles) {
|
|
276
|
+
try {
|
|
277
|
+
const parsed = JSON.parse(await readFile(join(tasksDir, entry), 'utf-8'));
|
|
278
|
+
const status = safeString(parsed?.status || 'pending').trim() || 'pending';
|
|
279
|
+
if (Object.hasOwn(taskCounts, status)) taskCounts[status] += 1;
|
|
280
|
+
} catch {
|
|
281
|
+
// ignore malformed task files
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
} catch {
|
|
285
|
+
return taskCounts;
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
return taskCounts;
|
|
289
|
+
}
|
|
290
|
+
|
|
261
291
|
async function resolveCanonicalLeaderPaneId(_tmuxSession, leaderPaneId) {
|
|
262
292
|
const normalizedLeaderPaneId = safeString(leaderPaneId).trim();
|
|
263
293
|
if (normalizedLeaderPaneId) {
|
|
@@ -273,6 +303,18 @@ async function resolveCanonicalLeaderPaneId(_tmuxSession, leaderPaneId) {
|
|
|
273
303
|
return '';
|
|
274
304
|
}
|
|
275
305
|
|
|
306
|
+
async function checkLeaderPaneReadyForWorkerStateReminder(paneTarget) {
|
|
307
|
+
return evaluatePaneInjectionReadiness(paneTarget, {
|
|
308
|
+
skipIfScrolling: true,
|
|
309
|
+
// Worker-state reminders are their own trigger path. They should still
|
|
310
|
+
// queue into a live Codex pane even while the leader is busy or not
|
|
311
|
+
// visibly input-ready; only shell/copy-mode style safety guards remain.
|
|
312
|
+
requireRunningAgent: true,
|
|
313
|
+
requireReady: false,
|
|
314
|
+
requireIdle: false,
|
|
315
|
+
});
|
|
316
|
+
}
|
|
317
|
+
|
|
276
318
|
async function emitLeaderPaneMissingDeferred({
|
|
277
319
|
stateDir,
|
|
278
320
|
logsDir,
|
|
@@ -283,6 +325,7 @@ async function emitLeaderPaneMissingDeferred({
|
|
|
283
325
|
reason = 'leader_pane_missing_no_injection',
|
|
284
326
|
paneCurrentCommand = '',
|
|
285
327
|
sourceType = 'unknown',
|
|
328
|
+
orchestrationIntent = '',
|
|
286
329
|
}) {
|
|
287
330
|
const nowIso = new Date().toISOString();
|
|
288
331
|
await logTmuxHookEvent(logsDir, {
|
|
@@ -294,6 +337,7 @@ async function emitLeaderPaneMissingDeferred({
|
|
|
294
337
|
reason,
|
|
295
338
|
leader_pane_id: leaderPaneId || null,
|
|
296
339
|
tmux_session: tmuxSession || null,
|
|
340
|
+
orchestration_intent: orchestrationIntent || null,
|
|
297
341
|
tmux_injection_attempted: false,
|
|
298
342
|
pane_current_command: paneCurrentCommand || null,
|
|
299
343
|
source_type: sourceType,
|
|
@@ -312,6 +356,7 @@ async function emitLeaderPaneMissingDeferred({
|
|
|
312
356
|
created_at: nowIso,
|
|
313
357
|
leader_pane_id: leaderPaneId || null,
|
|
314
358
|
tmux_session: tmuxSession || null,
|
|
359
|
+
orchestration_intent: orchestrationIntent || null,
|
|
315
360
|
tmux_injection_attempted: false,
|
|
316
361
|
pane_current_command: paneCurrentCommand || null,
|
|
317
362
|
source_type: sourceType,
|
|
@@ -381,12 +426,21 @@ export async function maybeNotifyLeaderAllWorkersIdle({ cwd, stateDir, logsDir,
|
|
|
381
426
|
);
|
|
382
427
|
if (!allIdle) return;
|
|
383
428
|
|
|
429
|
+
const taskCounts = await readTeamTaskCounts(stateDir, teamName);
|
|
430
|
+
const leaderActionState = classifyLeaderActionState({
|
|
431
|
+
allWorkersIdle: allIdle,
|
|
432
|
+
workerPanesAlive: snapshots.length > 0,
|
|
433
|
+
taskCounts,
|
|
434
|
+
});
|
|
435
|
+
const orchestrationIntent = resolveAllWorkersIdleIntent(leaderActionState);
|
|
436
|
+
|
|
384
437
|
if (!canonicalLeaderPaneId) {
|
|
385
438
|
const nextIdleState = {
|
|
386
439
|
...idleState,
|
|
387
440
|
last_notified_at_ms: nowMs,
|
|
388
441
|
last_notified_at: nowIso,
|
|
389
442
|
worker_count: workers.length,
|
|
443
|
+
orchestration_intent: orchestrationIntent,
|
|
390
444
|
delivery: 'deferred',
|
|
391
445
|
};
|
|
392
446
|
await writeFile(idleStatePath, JSON.stringify(nextIdleState, null, 2)).catch(() => {});
|
|
@@ -398,6 +452,7 @@ export async function maybeNotifyLeaderAllWorkersIdle({ cwd, stateDir, logsDir,
|
|
|
398
452
|
sourceType: 'all_workers_idle',
|
|
399
453
|
tmuxSession,
|
|
400
454
|
leaderPaneId: canonicalLeaderPaneId,
|
|
455
|
+
orchestrationIntent,
|
|
401
456
|
});
|
|
402
457
|
return;
|
|
403
458
|
}
|
|
@@ -406,13 +461,14 @@ export async function maybeNotifyLeaderAllWorkersIdle({ cwd, stateDir, logsDir,
|
|
|
406
461
|
const nextAction = `Next: run omx team status ${teamName}, read unread worker messages, then decide whether to assign the next concrete task, reconcile results, or shut the team down.`;
|
|
407
462
|
const message = `[OMX] All ${N} worker${N === 1 ? '' : 's'} idle. ${nextAction} ${DEFAULT_MARKER}`;
|
|
408
463
|
const tmuxTarget = canonicalLeaderPaneId;
|
|
409
|
-
const paneGuard = await
|
|
464
|
+
const paneGuard = await checkLeaderPaneReadyForWorkerStateReminder(tmuxTarget);
|
|
410
465
|
if (!paneGuard.ok) {
|
|
411
466
|
const nextIdleState = {
|
|
412
467
|
...idleState,
|
|
413
468
|
last_notified_at_ms: nowMs,
|
|
414
469
|
last_notified_at: nowIso,
|
|
415
470
|
worker_count: N,
|
|
471
|
+
orchestration_intent: orchestrationIntent,
|
|
416
472
|
delivery: 'deferred_shell',
|
|
417
473
|
pane_current_command: paneGuard.paneCurrentCommand || null,
|
|
418
474
|
};
|
|
@@ -427,6 +483,7 @@ export async function maybeNotifyLeaderAllWorkersIdle({ cwd, stateDir, logsDir,
|
|
|
427
483
|
sourceType: 'all_workers_idle',
|
|
428
484
|
tmuxSession,
|
|
429
485
|
leaderPaneId: canonicalLeaderPaneId,
|
|
486
|
+
orchestrationIntent,
|
|
430
487
|
});
|
|
431
488
|
return;
|
|
432
489
|
}
|
|
@@ -445,6 +502,7 @@ export async function maybeNotifyLeaderAllWorkersIdle({ cwd, stateDir, logsDir,
|
|
|
445
502
|
last_notified_at_ms: nowMs,
|
|
446
503
|
last_notified_at: nowIso,
|
|
447
504
|
worker_count: N,
|
|
505
|
+
orchestration_intent: orchestrationIntent,
|
|
448
506
|
};
|
|
449
507
|
await writeFile(idleStatePath, JSON.stringify(nextIdleState, null, 2)).catch(() => {});
|
|
450
508
|
|
|
@@ -458,6 +516,7 @@ export async function maybeNotifyLeaderAllWorkersIdle({ cwd, stateDir, logsDir,
|
|
|
458
516
|
type: 'all_workers_idle',
|
|
459
517
|
worker: workerName,
|
|
460
518
|
worker_count: N,
|
|
519
|
+
orchestration_intent: orchestrationIntent,
|
|
461
520
|
created_at: nowIso,
|
|
462
521
|
};
|
|
463
522
|
await appendFile(eventsPath, JSON.stringify(event) + '\n');
|
|
@@ -470,6 +529,7 @@ export async function maybeNotifyLeaderAllWorkersIdle({ cwd, stateDir, logsDir,
|
|
|
470
529
|
tmux_target: tmuxTarget,
|
|
471
530
|
worker: workerName,
|
|
472
531
|
worker_count: N,
|
|
532
|
+
orchestration_intent: orchestrationIntent,
|
|
473
533
|
});
|
|
474
534
|
} catch (err) {
|
|
475
535
|
await logTmuxHookEvent(logsDir, {
|
|
@@ -478,6 +538,7 @@ export async function maybeNotifyLeaderAllWorkersIdle({ cwd, stateDir, logsDir,
|
|
|
478
538
|
team: teamName,
|
|
479
539
|
tmux_target: tmuxTarget,
|
|
480
540
|
worker: workerName,
|
|
541
|
+
orchestration_intent: orchestrationIntent,
|
|
481
542
|
error: err instanceof Error ? err.message : safeString(err),
|
|
482
543
|
}).catch(() => {});
|
|
483
544
|
}
|
|
@@ -545,6 +606,7 @@ export async function maybeNotifyLeaderWorkerIdle({ cwd, stateDir, logsDir, pars
|
|
|
545
606
|
if (currentState !== 'idle' && currentState !== 'done') return;
|
|
546
607
|
if (!statusFresh) return;
|
|
547
608
|
if (prevState === 'idle' || prevState === 'done') return;
|
|
609
|
+
const orchestrationIntent = resolveWorkerIdleIntent(currentState);
|
|
548
610
|
|
|
549
611
|
const heartbeat = await readWorkerHeartbeatSnapshot(stateDir, teamName, workerName, nowMs);
|
|
550
612
|
if (!heartbeat.fresh) return;
|
|
@@ -576,11 +638,12 @@ export async function maybeNotifyLeaderWorkerIdle({ cwd, stateDir, logsDir, pars
|
|
|
576
638
|
sourceType: 'worker_idle',
|
|
577
639
|
tmuxSession,
|
|
578
640
|
leaderPaneId: canonicalLeaderPaneId,
|
|
641
|
+
orchestrationIntent,
|
|
579
642
|
});
|
|
580
643
|
return;
|
|
581
644
|
}
|
|
582
645
|
const tmuxTarget = canonicalLeaderPaneId;
|
|
583
|
-
const paneGuard = await
|
|
646
|
+
const paneGuard = await checkLeaderPaneReadyForWorkerStateReminder(tmuxTarget);
|
|
584
647
|
if (!paneGuard.ok) {
|
|
585
648
|
try {
|
|
586
649
|
const tmpPath = cooldownPath + '.tmp.' + process.pid;
|
|
@@ -588,6 +651,7 @@ export async function maybeNotifyLeaderWorkerIdle({ cwd, stateDir, logsDir, pars
|
|
|
588
651
|
last_notified_at_ms: nowMs,
|
|
589
652
|
last_notified_at: nowIso,
|
|
590
653
|
prev_state: prevState,
|
|
654
|
+
orchestration_intent: orchestrationIntent,
|
|
591
655
|
delivery: 'deferred_shell',
|
|
592
656
|
pane_current_command: paneGuard.paneCurrentCommand || null,
|
|
593
657
|
}, null, 2));
|
|
@@ -603,6 +667,7 @@ export async function maybeNotifyLeaderWorkerIdle({ cwd, stateDir, logsDir, pars
|
|
|
603
667
|
sourceType: 'worker_idle',
|
|
604
668
|
tmuxSession,
|
|
605
669
|
leaderPaneId: canonicalLeaderPaneId,
|
|
670
|
+
orchestrationIntent,
|
|
606
671
|
});
|
|
607
672
|
return;
|
|
608
673
|
}
|
|
@@ -631,6 +696,7 @@ export async function maybeNotifyLeaderWorkerIdle({ cwd, stateDir, logsDir, pars
|
|
|
631
696
|
last_notified_at_ms: nowMs,
|
|
632
697
|
last_notified_at: nowIso,
|
|
633
698
|
prev_state: prevState,
|
|
699
|
+
orchestration_intent: orchestrationIntent,
|
|
634
700
|
}, null, 2));
|
|
635
701
|
await rename(tmpPath, cooldownPath);
|
|
636
702
|
} catch { /* best effort */ }
|
|
@@ -648,6 +714,7 @@ export async function maybeNotifyLeaderWorkerIdle({ cwd, stateDir, logsDir, pars
|
|
|
648
714
|
prev_state: prevState,
|
|
649
715
|
task_id: currentTaskId || null,
|
|
650
716
|
reason: currentReason || null,
|
|
717
|
+
orchestration_intent: orchestrationIntent,
|
|
651
718
|
created_at: nowIso,
|
|
652
719
|
};
|
|
653
720
|
await appendFile(eventsPath, JSON.stringify(event) + '\n');
|
|
@@ -661,6 +728,7 @@ export async function maybeNotifyLeaderWorkerIdle({ cwd, stateDir, logsDir, pars
|
|
|
661
728
|
worker: workerName,
|
|
662
729
|
prev_state: prevState,
|
|
663
730
|
task_id: currentTaskId || null,
|
|
731
|
+
orchestration_intent: orchestrationIntent,
|
|
664
732
|
});
|
|
665
733
|
} catch (err) {
|
|
666
734
|
await logTmuxHookEvent(logsDir, {
|
|
@@ -669,6 +737,7 @@ export async function maybeNotifyLeaderWorkerIdle({ cwd, stateDir, logsDir, pars
|
|
|
669
737
|
team: teamName,
|
|
670
738
|
tmux_target: tmuxTarget,
|
|
671
739
|
worker: workerName,
|
|
740
|
+
orchestration_intent: orchestrationIntent,
|
|
672
741
|
error: err instanceof Error ? err.message : safeString(err),
|
|
673
742
|
}).catch(() => {});
|
|
674
743
|
}
|
|
@@ -26,6 +26,6 @@ export function clampPct(value: any): number | null {
|
|
|
26
26
|
return Math.round(value);
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
-
export function isTerminalPhase(phase:
|
|
29
|
+
export function isTerminalPhase(phase: string): boolean {
|
|
30
30
|
return phase === 'complete' || phase === 'failed' || phase === 'cancelled';
|
|
31
31
|
}
|
|
@@ -145,6 +145,11 @@ function buildIdleNotificationFingerprint(payload: Record<string, unknown>): str
|
|
|
145
145
|
});
|
|
146
146
|
}
|
|
147
147
|
|
|
148
|
+
function isTurnCompletePayload(payload: Record<string, unknown>): boolean {
|
|
149
|
+
const type = safeString(payload.type || '').trim().toLowerCase();
|
|
150
|
+
return type === '' || type === 'agent-turn-complete' || type === 'turn-complete';
|
|
151
|
+
}
|
|
152
|
+
|
|
148
153
|
async function main() {
|
|
149
154
|
const rawPayload = process.argv[process.argv.length - 1];
|
|
150
155
|
if (!rawPayload || rawPayload.startsWith('-')) {
|
|
@@ -163,6 +168,7 @@ async function main() {
|
|
|
163
168
|
const payloadThreadId = safeString(payload['thread-id'] || payload.thread_id || '');
|
|
164
169
|
const inputMessages = normalizeInputMessages(payload);
|
|
165
170
|
const latestUserInput = safeString(inputMessages.length > 0 ? inputMessages[inputMessages.length - 1] : '');
|
|
171
|
+
const isTurnComplete = isTurnCompletePayload(payload);
|
|
166
172
|
|
|
167
173
|
// Team worker detection via environment variable
|
|
168
174
|
const teamWorkerEnv = process.env.OMX_TEAM_WORKER; // e.g., "fix-ts/worker-1"
|
|
@@ -239,6 +245,10 @@ async function main() {
|
|
|
239
245
|
const logFile = join(logsDir, `turns-${new Date().toISOString().split('T')[0]}.jsonl`);
|
|
240
246
|
await appendFile(logFile, JSON.stringify(logEntry) + '\n').catch(() => {});
|
|
241
247
|
|
|
248
|
+
if (!isTurnComplete) {
|
|
249
|
+
return;
|
|
250
|
+
}
|
|
251
|
+
|
|
242
252
|
// Reconcile Ralph ownership for same-Codex-session continuation before
|
|
243
253
|
// lifecycle counters or injection read the active scope.
|
|
244
254
|
if (!isTeamWorker) {
|
|
@@ -556,7 +566,12 @@ async function main() {
|
|
|
556
566
|
if (!isTeamWorker) {
|
|
557
567
|
try {
|
|
558
568
|
const { notifyLifecycle } = await import('../notifications/index.js');
|
|
559
|
-
const {
|
|
569
|
+
const {
|
|
570
|
+
shouldSendIdleNotification,
|
|
571
|
+
recordIdleNotificationSent,
|
|
572
|
+
shouldSendSessionIdleHookEvent,
|
|
573
|
+
recordSessionIdleHookEventSent,
|
|
574
|
+
} = await import('../notifications/idle-cooldown.js');
|
|
560
575
|
const sessionJsonPath = join(stateDir, 'session.json');
|
|
561
576
|
const idleFingerprint = buildIdleNotificationFingerprint(payload);
|
|
562
577
|
let notifySessionId = '';
|
|
@@ -565,37 +580,50 @@ async function main() {
|
|
|
565
580
|
notifySessionId = safeString(sessionData && sessionData.session_id ? sessionData.session_id : '');
|
|
566
581
|
} catch { /* no session file */ }
|
|
567
582
|
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
const { dispatchHookEvent } = await import('../hooks/extensibility/dispatcher.js');
|
|
579
|
-
const event = buildNativeHookEvent('session-idle', {
|
|
580
|
-
...buildOperationalContext({
|
|
581
|
-
cwd,
|
|
582
|
-
normalizedEvent: 'blocked',
|
|
583
|
-
sessionId: notifySessionId,
|
|
584
|
-
status: 'blocked',
|
|
585
|
-
extra: {
|
|
586
|
-
project_path: cwd,
|
|
587
|
-
reason: 'post_turn_idle_notification',
|
|
588
|
-
},
|
|
589
|
-
}),
|
|
590
|
-
}, {
|
|
591
|
-
session_id: notifySessionId,
|
|
592
|
-
thread_id: safeString(payload['thread-id'] || payload.thread_id || ''),
|
|
593
|
-
turn_id: safeString(payload['turn-id'] || payload.turn_id || ''),
|
|
594
|
-
mode: safeString(payload.mode || ''),
|
|
583
|
+
const shouldNotifyLifecycle = notifySessionId
|
|
584
|
+
&& shouldSendIdleNotification(stateDir, notifySessionId, idleFingerprint);
|
|
585
|
+
const shouldDispatchSessionIdleHookEvent = notifySessionId
|
|
586
|
+
&& shouldSendSessionIdleHookEvent(stateDir, notifySessionId, idleFingerprint);
|
|
587
|
+
|
|
588
|
+
if (shouldNotifyLifecycle || shouldDispatchSessionIdleHookEvent) {
|
|
589
|
+
if (shouldNotifyLifecycle) {
|
|
590
|
+
const idleResult = await notifyLifecycle('session-idle', {
|
|
591
|
+
sessionId: notifySessionId,
|
|
592
|
+
projectPath: cwd,
|
|
595
593
|
});
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
594
|
+
if (idleResult && idleResult.anySuccess) {
|
|
595
|
+
recordIdleNotificationSent(stateDir, notifySessionId, idleFingerprint);
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
|
|
599
|
+
if (shouldDispatchSessionIdleHookEvent) {
|
|
600
|
+
try {
|
|
601
|
+
const { buildNativeHookEvent } = await import('../hooks/extensibility/events.js');
|
|
602
|
+
const { dispatchHookEvent } = await import('../hooks/extensibility/dispatcher.js');
|
|
603
|
+
const event = buildNativeHookEvent('session-idle', {
|
|
604
|
+
...buildOperationalContext({
|
|
605
|
+
cwd,
|
|
606
|
+
normalizedEvent: 'blocked',
|
|
607
|
+
sessionId: notifySessionId,
|
|
608
|
+
status: 'blocked',
|
|
609
|
+
extra: {
|
|
610
|
+
project_path: cwd,
|
|
611
|
+
reason: 'post_turn_idle_notification',
|
|
612
|
+
},
|
|
613
|
+
}),
|
|
614
|
+
}, {
|
|
615
|
+
session_id: notifySessionId,
|
|
616
|
+
thread_id: safeString(payload['thread-id'] || payload.thread_id || ''),
|
|
617
|
+
turn_id: safeString(payload['turn-id'] || payload.turn_id || ''),
|
|
618
|
+
mode: safeString(payload.mode || ''),
|
|
619
|
+
});
|
|
620
|
+
const hookDispatchResult = await dispatchHookEvent(event, { cwd });
|
|
621
|
+
if (hookDispatchResult.results.some((result) => result.ok)) {
|
|
622
|
+
recordSessionIdleHookEventSent(stateDir, notifySessionId, idleFingerprint);
|
|
623
|
+
}
|
|
624
|
+
} catch {
|
|
625
|
+
// Non-fatal
|
|
626
|
+
}
|
|
599
627
|
}
|
|
600
628
|
}
|
|
601
629
|
} catch {
|
|
@@ -685,4 +713,8 @@ async function main() {
|
|
|
685
713
|
}
|
|
686
714
|
}
|
|
687
715
|
|
|
688
|
-
main().catch(() =>
|
|
716
|
+
main().catch((err) => {
|
|
717
|
+
process.exitCode = 1;
|
|
718
|
+
// eslint-disable-next-line no-console
|
|
719
|
+
console.error('[notify-hook] fatal error:', err);
|
|
720
|
+
});
|
package/templates/AGENTS.md
CHANGED
|
@@ -36,10 +36,12 @@ Keep runtime marker contracts stable and non-destructive when overlays are appli
|
|
|
36
36
|
- Check official documentation before implementing with unfamiliar SDKs, frameworks, or APIs.
|
|
37
37
|
- Within a single Codex session or team pane, use Codex native subagents for independent, bounded parallel subtasks when that improves throughput.
|
|
38
38
|
<!-- OMX:GUIDANCE:OPERATING:START -->
|
|
39
|
-
- Default to
|
|
39
|
+
- Default to quality-first, intent-deepening responses; think one more step before replying or asking for clarification, and use as much detail as needed for a strong result without empty verbosity.
|
|
40
40
|
- Proceed automatically on clear, low-risk, reversible next steps; ask only for irreversible, side-effectful, or materially branching actions.
|
|
41
41
|
- Treat newer user task updates as local overrides for the active task while preserving earlier non-conflicting instructions.
|
|
42
|
+
- When the user provides newer same-thread evidence (for example logs, stack traces, or test output), treat it as the current source of truth, re-evaluate earlier hypotheses against it, and do not anchor on older evidence unless the user reaffirms it.
|
|
42
43
|
- Persist with tool use when correctness depends on retrieval, inspection, execution, or verification; do not skip prerequisites just because the likely answer seems obvious.
|
|
44
|
+
- More effort does not mean reflexive web/tool escalation; browse or use tools when the task materially benefits, not as a default show of effort.
|
|
43
45
|
<!-- OMX:GUIDANCE:OPERATING:END -->
|
|
44
46
|
</operating_principles>
|
|
45
47
|
|
|
@@ -203,19 +205,26 @@ The `deep-interview` skill is the Socratic deep interview workflow and includes
|
|
|
203
205
|
|
|
204
206
|
| Keyword(s) | Skill | Action |
|
|
205
207
|
|-------------|-------|--------|
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
208
|
+
Runtime availability gate:
|
|
209
|
+
- Treat `autopilot`, `ralph`, `ultrawork`, `ultraqa`, `team`/`swarm`, and `ecomode` as **OMX runtime workflows**, not generic prompt aliases.
|
|
210
|
+
- Auto-activate those runtime workflows only when the current session is actually running under OMX CLI/runtime (for example, launched via `omx`, with OMX session overlay/runtime state available, or when the user explicitly asks to run `omx ...` in the shell).
|
|
211
|
+
- In Codex App or plain Codex sessions without OMX runtime, do **not** treat those keywords alone as activation. Explain that they require OMX CLI runtime support, and continue with the nearest App-safe surface (`deep-interview`, `ralplan`, `plan`, `/prompts:*`, or native subagents) unless the user explicitly wants you to launch OMX from the shell.
|
|
212
|
+
|
|
213
|
+
| Keyword(s) | Skill | Action |
|
|
214
|
+
|-------------|-------|--------|
|
|
215
|
+
| "ralph", "don't stop", "must complete", "keep going" | `$ralph` | Runtime-only: read `~/.codex/skills/ralph/SKILL.md`, execute persistence loop only inside OMX CLI/runtime |
|
|
216
|
+
| "autopilot", "build me", "I want a" | `$autopilot` | Runtime-only: read `~/.codex/skills/autopilot/SKILL.md`, execute autonomous pipeline only inside OMX CLI/runtime |
|
|
217
|
+
| "ultrawork", "ulw", "parallel" | `$ultrawork` | Runtime-only: read `~/.codex/skills/ultrawork/SKILL.md`, execute parallel agents only inside OMX CLI/runtime |
|
|
218
|
+
| "ultraqa" | `$ultraqa` | Runtime-only: read `~/.codex/skills/ralph/SKILL.md`, run persistent completion and verification loop only inside OMX CLI/runtime (UltraQA compatibility alias) |
|
|
219
|
+
| "analyze", "investigate" | `$analyze` | Read `~/.codex/prompts/debugger.md`, run root-cause analysis (analyze compatibility alias) |
|
|
211
220
|
| "plan this", "plan the", "let's plan" | `$plan` | Read `~/.codex/skills/plan/SKILL.md`, start planning workflow |
|
|
212
221
|
| "interview", "deep interview", "gather requirements", "interview me", "don't assume", "ouroboros" | `$deep-interview` | Read `~/.codex/skills/deep-interview/SKILL.md`, run Ouroboros-inspired Socratic ambiguity-gated interview workflow |
|
|
213
222
|
| "ralplan", "consensus plan" | `$ralplan` | Read `~/.codex/skills/ralplan/SKILL.md`, start consensus planning with RALPLAN-DR structured deliberation (short by default, `--deliberate` for high-risk) |
|
|
214
|
-
| "team", "swarm", "coordinated team", "coordinated swarm" | `$team` |
|
|
215
|
-
| "ecomode", "eco", "budget" | `$ecomode` |
|
|
223
|
+
| "team", "swarm", "coordinated team", "coordinated swarm" | `$team` | Runtime-only: read `~/.codex/skills/team/SKILL.md`, start tmux-based team orchestration only inside OMX CLI/runtime (swarm compatibility alias) |
|
|
224
|
+
| "ecomode", "eco", "budget" | `$ecomode` | Runtime-only: read `~/.codex/skills/ultrawork/SKILL.md`, execute cost-aware parallel workflow only inside OMX CLI/runtime (ecomode compatibility alias) |
|
|
216
225
|
| "cancel", "stop", "abort" | `$cancel` | Read `~/.codex/skills/cancel/SKILL.md`, cancel active modes |
|
|
217
|
-
| "tdd", "test first" | `$tdd` | Read `~/.codex/
|
|
218
|
-
| "fix build", "type errors" | `$build-fix` | Read `~/.codex/
|
|
226
|
+
| "tdd", "test first" | `$tdd` | Read `~/.codex/prompts/test-engineer.md`, run test-first workflow (tdd compatibility alias) |
|
|
227
|
+
| "fix build", "type errors" | `$build-fix` | Read `~/.codex/prompts/build-fixer.md`, fix build errors with minimal diff (build-fix compatibility alias) |
|
|
219
228
|
| "review code", "code review", "code-review" | `$code-review` | Read `~/.codex/skills/code-review/SKILL.md`, run code review |
|
|
220
229
|
| "security review" | `$security-review` | Read `~/.codex/skills/security-review/SKILL.md`, run security audit |
|
|
221
230
|
| "web-clone", "clone site", "clone website", "copy webpage" | `$web-clone` | Read `~/.codex/skills/web-clone/SKILL.md`, start website cloning pipeline |
|
|
@@ -224,6 +233,7 @@ Detection rules:
|
|
|
224
233
|
- Keywords are case-insensitive and match anywhere in the user message.
|
|
225
234
|
- Explicit `$name` invocations run left-to-right and override non-explicit keyword resolution.
|
|
226
235
|
- If multiple non-explicit keywords match, use the most specific match.
|
|
236
|
+
- Runtime-only keywords must pass the runtime availability gate before activation.
|
|
227
237
|
- If the user explicitly invokes `/prompts:<name>`, do not auto-activate keyword skills unless explicit `$name` tokens are also present.
|
|
228
238
|
- The rest of the user message becomes the task description.
|
|
229
239
|
|
|
@@ -286,7 +296,7 @@ Sizing guidance:
|
|
|
286
296
|
- Large or security/architectural changes: thorough verification
|
|
287
297
|
|
|
288
298
|
<!-- OMX:GUIDANCE:VERIFYSEQ:START -->
|
|
289
|
-
Verification loop: identify what proves the claim, run the verification, read the output, then report with evidence. If verification fails, continue iterating rather than reporting incomplete work. Default to
|
|
299
|
+
Verification loop: identify what proves the claim, run the verification, read the output, then report with evidence. If verification fails, continue iterating rather than reporting incomplete work. Default to quality-first evidence summaries: think one more step before declaring completion, and include enough detail to make the proof actionable without padding.
|
|
290
300
|
|
|
291
301
|
- Run dependent tasks sequentially; verify prerequisites before starting downstream actions.
|
|
292
302
|
- If a task update changes only the current branch of work, apply it locally and continue without reinterpreting unrelated standing instructions.
|