oh-my-codex 0.18.2 → 0.18.4
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 +6 -6
- package/Cargo.toml +1 -1
- package/README.md +1 -0
- package/dist/agents/__tests__/definitions.test.js +9 -0
- package/dist/agents/__tests__/definitions.test.js.map +1 -1
- package/dist/agents/__tests__/native-config.test.js +1 -0
- package/dist/agents/__tests__/native-config.test.js.map +1 -1
- package/dist/agents/definitions.d.ts.map +1 -1
- package/dist/agents/definitions.js +10 -0
- package/dist/agents/definitions.js.map +1 -1
- package/dist/auth/__tests__/config-sessions.test.d.ts +2 -0
- package/dist/auth/__tests__/config-sessions.test.d.ts.map +1 -0
- package/dist/auth/__tests__/config-sessions.test.js +48 -0
- package/dist/auth/__tests__/config-sessions.test.js.map +1 -0
- package/dist/auth/__tests__/quota-rotation.test.d.ts +2 -0
- package/dist/auth/__tests__/quota-rotation.test.d.ts.map +1 -0
- package/dist/auth/__tests__/quota-rotation.test.js +33 -0
- package/dist/auth/__tests__/quota-rotation.test.js.map +1 -0
- package/dist/auth/__tests__/redact.test.d.ts +2 -0
- package/dist/auth/__tests__/redact.test.d.ts.map +1 -0
- package/dist/auth/__tests__/redact.test.js +20 -0
- package/dist/auth/__tests__/redact.test.js.map +1 -0
- package/dist/auth/__tests__/storage.test.d.ts +2 -0
- package/dist/auth/__tests__/storage.test.d.ts.map +1 -0
- package/dist/auth/__tests__/storage.test.js +108 -0
- package/dist/auth/__tests__/storage.test.js.map +1 -0
- package/dist/auth/config.d.ts +9 -0
- package/dist/auth/config.d.ts.map +1 -0
- package/dist/auth/config.js +77 -0
- package/dist/auth/config.js.map +1 -0
- package/dist/auth/hotswap.d.ts +36 -0
- package/dist/auth/hotswap.d.ts.map +1 -0
- package/dist/auth/hotswap.js +159 -0
- package/dist/auth/hotswap.js.map +1 -0
- package/dist/auth/index.d.ts +8 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +8 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/paths.d.ts +12 -0
- package/dist/auth/paths.d.ts.map +1 -0
- package/dist/auth/paths.js +78 -0
- package/dist/auth/paths.js.map +1 -0
- package/dist/auth/quota-detector.d.ts +10 -0
- package/dist/auth/quota-detector.d.ts.map +1 -0
- package/dist/auth/quota-detector.js +40 -0
- package/dist/auth/quota-detector.js.map +1 -0
- package/dist/auth/redact.d.ts +2 -0
- package/dist/auth/redact.d.ts.map +1 -0
- package/dist/auth/redact.js +26 -0
- package/dist/auth/redact.js.map +1 -0
- package/dist/auth/rotation.d.ts +9 -0
- package/dist/auth/rotation.d.ts.map +1 -0
- package/dist/auth/rotation.js +26 -0
- package/dist/auth/rotation.js.map +1 -0
- package/dist/auth/sessions.d.ts +15 -0
- package/dist/auth/sessions.d.ts.map +1 -0
- package/dist/auth/sessions.js +62 -0
- package/dist/auth/sessions.js.map +1 -0
- package/dist/auth/storage.d.ts +27 -0
- package/dist/auth/storage.d.ts.map +1 -0
- package/dist/auth/storage.js +111 -0
- package/dist/auth/storage.js.map +1 -0
- package/dist/cli/__tests__/auth.test.d.ts +2 -0
- package/dist/cli/__tests__/auth.test.d.ts.map +1 -0
- package/dist/cli/__tests__/auth.test.js +168 -0
- package/dist/cli/__tests__/auth.test.js.map +1 -0
- package/dist/cli/__tests__/doctor-warning-copy.test.js +88 -3
- package/dist/cli/__tests__/doctor-warning-copy.test.js.map +1 -1
- package/dist/cli/__tests__/explore.test.js +28 -7
- package/dist/cli/__tests__/explore.test.js.map +1 -1
- package/dist/cli/__tests__/index.test.js +70 -2
- package/dist/cli/__tests__/index.test.js.map +1 -1
- package/dist/cli/__tests__/nested-help-routing.test.js +1 -0
- package/dist/cli/__tests__/nested-help-routing.test.js.map +1 -1
- package/dist/cli/__tests__/setup-agents-overwrite.test.js +30 -1
- package/dist/cli/__tests__/setup-agents-overwrite.test.js.map +1 -1
- package/dist/cli/__tests__/setup-install-mode.test.js +103 -17
- package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -1
- package/dist/cli/__tests__/setup-scope.test.js +1 -1
- package/dist/cli/__tests__/sparkshell-cli.test.js +2 -2
- package/dist/cli/__tests__/sparkshell-cli.test.js.map +1 -1
- package/dist/cli/auth.d.ts +4 -0
- package/dist/cli/auth.d.ts.map +1 -0
- package/dist/cli/auth.js +89 -0
- package/dist/cli/auth.js.map +1 -0
- package/dist/cli/doctor.d.ts.map +1 -1
- package/dist/cli/doctor.js +128 -19
- package/dist/cli/doctor.js.map +1 -1
- package/dist/cli/explore.d.ts +1 -0
- package/dist/cli/explore.d.ts.map +1 -1
- package/dist/cli/explore.js +18 -0
- package/dist/cli/explore.js.map +1 -1
- package/dist/cli/index.d.ts +20 -2
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +114 -10
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/question.d.ts.map +1 -1
- package/dist/cli/question.js +5 -1
- package/dist/cli/question.js.map +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +29 -57
- package/dist/cli/setup.js.map +1 -1
- package/dist/config/__tests__/deep-interview.test.d.ts +2 -0
- package/dist/config/__tests__/deep-interview.test.d.ts.map +1 -0
- package/dist/config/__tests__/deep-interview.test.js +239 -0
- package/dist/config/__tests__/deep-interview.test.js.map +1 -0
- package/dist/config/__tests__/generator-idempotent.test.js +128 -5
- package/dist/config/__tests__/generator-idempotent.test.js.map +1 -1
- package/dist/config/deep-interview.d.ts +22 -0
- package/dist/config/deep-interview.d.ts.map +1 -0
- package/dist/config/deep-interview.js +151 -0
- package/dist/config/deep-interview.js.map +1 -0
- package/dist/config/generator.d.ts +13 -4
- package/dist/config/generator.d.ts.map +1 -1
- package/dist/config/generator.js +154 -40
- package/dist/config/generator.js.map +1 -1
- package/dist/hooks/__tests__/agents-overlay.test.js +9 -7
- package/dist/hooks/__tests__/agents-overlay.test.js.map +1 -1
- package/dist/hooks/__tests__/autopilot-skill-contract.test.js +10 -1
- package/dist/hooks/__tests__/autopilot-skill-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/consensus-execution-handoff.test.js +13 -0
- package/dist/hooks/__tests__/consensus-execution-handoff.test.js.map +1 -1
- package/dist/hooks/__tests__/explore-routing.test.js +10 -12
- package/dist/hooks/__tests__/explore-routing.test.js.map +1 -1
- package/dist/hooks/__tests__/explore-sparkshell-guidance-contract.test.js +13 -15
- package/dist/hooks/__tests__/explore-sparkshell-guidance-contract.test.js.map +1 -1
- package/dist/hooks/__tests__/keyword-detector.test.js +301 -0
- package/dist/hooks/__tests__/keyword-detector.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js +33 -0
- package/dist/hooks/__tests__/notify-fallback-watcher.test.js.map +1 -1
- package/dist/hooks/__tests__/notify-hook-ralph-resume.test.js +60 -0
- package/dist/hooks/__tests__/notify-hook-ralph-resume.test.js.map +1 -1
- package/dist/hooks/deep-interview-config-instruction.d.ts +3 -0
- package/dist/hooks/deep-interview-config-instruction.d.ts.map +1 -0
- package/dist/hooks/deep-interview-config-instruction.js +47 -0
- package/dist/hooks/deep-interview-config-instruction.js.map +1 -0
- package/dist/hooks/explore-routing.d.ts.map +1 -1
- package/dist/hooks/explore-routing.js +8 -13
- package/dist/hooks/explore-routing.js.map +1 -1
- package/dist/hooks/keyword-detector.d.ts +5 -0
- package/dist/hooks/keyword-detector.d.ts.map +1 -1
- package/dist/hooks/keyword-detector.js +52 -8
- package/dist/hooks/keyword-detector.js.map +1 -1
- package/dist/hud/__tests__/hud-tmux-injection.test.js +19 -14
- package/dist/hud/__tests__/hud-tmux-injection.test.js.map +1 -1
- package/dist/hud/__tests__/reconcile.test.js +117 -9
- package/dist/hud/__tests__/reconcile.test.js.map +1 -1
- package/dist/hud/__tests__/tmux.test.js +103 -1
- package/dist/hud/__tests__/tmux.test.js.map +1 -1
- package/dist/hud/index.d.ts +1 -1
- package/dist/hud/index.d.ts.map +1 -1
- package/dist/hud/index.js +24 -2
- package/dist/hud/index.js.map +1 -1
- package/dist/hud/reconcile.d.ts +1 -1
- package/dist/hud/reconcile.d.ts.map +1 -1
- package/dist/hud/reconcile.js +23 -0
- package/dist/hud/reconcile.js.map +1 -1
- package/dist/hud/tmux.d.ts +7 -0
- package/dist/hud/tmux.d.ts.map +1 -1
- package/dist/hud/tmux.js +46 -9
- package/dist/hud/tmux.js.map +1 -1
- package/dist/question/__tests__/deep-interview.test.js +80 -7
- package/dist/question/__tests__/deep-interview.test.js.map +1 -1
- package/dist/question/__tests__/policy.test.js +83 -9
- package/dist/question/__tests__/policy.test.js.map +1 -1
- package/dist/question/autopilot-wait.d.ts +10 -0
- package/dist/question/autopilot-wait.d.ts.map +1 -0
- package/dist/question/autopilot-wait.js +134 -0
- package/dist/question/autopilot-wait.js.map +1 -0
- package/dist/question/deep-interview.d.ts +2 -0
- package/dist/question/deep-interview.d.ts.map +1 -1
- package/dist/question/deep-interview.js +4 -0
- package/dist/question/deep-interview.js.map +1 -1
- package/dist/question/policy.d.ts +1 -0
- package/dist/question/policy.d.ts.map +1 -1
- package/dist/question/policy.js +19 -0
- package/dist/question/policy.js.map +1 -1
- package/dist/scripts/__tests__/codex-native-hook.test.js +718 -0
- package/dist/scripts/__tests__/codex-native-hook.test.js.map +1 -1
- package/dist/scripts/codex-native-hook.d.ts.map +1 -1
- package/dist/scripts/codex-native-hook.js +69 -5
- package/dist/scripts/codex-native-hook.js.map +1 -1
- package/dist/scripts/notify-hook.js +13 -0
- package/dist/scripts/notify-hook.js.map +1 -1
- package/dist/state/__tests__/planning-gate.test.d.ts +2 -0
- package/dist/state/__tests__/planning-gate.test.d.ts.map +1 -0
- package/dist/state/__tests__/planning-gate.test.js +219 -0
- package/dist/state/__tests__/planning-gate.test.js.map +1 -0
- package/dist/state/workflow-transition.d.ts +23 -0
- package/dist/state/workflow-transition.d.ts.map +1 -1
- package/dist/state/workflow-transition.js +63 -0
- package/dist/state/workflow-transition.js.map +1 -1
- package/dist/subagents/__tests__/tracker.test.js +69 -0
- package/dist/subagents/__tests__/tracker.test.js.map +1 -1
- package/dist/subagents/tracker.d.ts +5 -0
- package/dist/subagents/tracker.d.ts.map +1 -1
- package/dist/subagents/tracker.js +16 -0
- package/dist/subagents/tracker.js.map +1 -1
- package/dist/team/__tests__/tmux-session.test.js +86 -0
- package/dist/team/__tests__/tmux-session.test.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 +126 -0
- package/dist/ultragoal/__tests__/artifacts.test.js.map +1 -1
- package/dist/ultragoal/artifacts.d.ts.map +1 -1
- package/dist/ultragoal/artifacts.js +126 -8
- package/dist/ultragoal/artifacts.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/autopilot/SKILL.md +2 -2
- package/plugins/oh-my-codex/skills/deep-interview/SKILL.md +11 -1
- package/plugins/oh-my-codex/skills/omx-setup/SKILL.md +4 -4
- package/plugins/oh-my-codex/skills/plan/SKILL.md +5 -5
- package/plugins/oh-my-codex/skills/ralph/SKILL.md +1 -1
- package/plugins/oh-my-codex/skills/ralplan/SKILL.md +10 -6
- package/prompts/executor.md +1 -1
- package/prompts/explore-harness.md +2 -2
- package/prompts/explore.md +1 -1
- package/prompts/planner.md +1 -1
- package/prompts/scholastic.md +11 -0
- package/prompts/sisyphus-lite.md +1 -1
- package/skills/autopilot/SKILL.md +2 -2
- package/skills/deep-interview/SKILL.md +11 -1
- package/skills/omx-setup/SKILL.md +4 -4
- package/skills/plan/SKILL.md +5 -5
- package/skills/ralph/SKILL.md +1 -1
- package/skills/ralplan/SKILL.md +10 -6
- package/src/scripts/__tests__/codex-native-hook.test.ts +853 -0
- package/src/scripts/codex-native-hook.ts +73 -3
- package/src/scripts/notify-hook.ts +15 -0
- package/templates/AGENTS.md +3 -3
- package/templates/catalog-manifest.json +5 -0
|
@@ -30,6 +30,7 @@ import {
|
|
|
30
30
|
import {
|
|
31
31
|
appendTeamEvent,
|
|
32
32
|
readTeamLeaderAttention,
|
|
33
|
+
readTeamConfig,
|
|
33
34
|
readTeamManifestV2,
|
|
34
35
|
readTeamPhase,
|
|
35
36
|
writeTeamLeaderAttention,
|
|
@@ -44,6 +45,7 @@ import {
|
|
|
44
45
|
recordSkillActivation,
|
|
45
46
|
type SkillActiveState,
|
|
46
47
|
} from "../hooks/keyword-detector.js";
|
|
48
|
+
import { buildDeepInterviewConfigInstruction } from "../hooks/deep-interview-config-instruction.js";
|
|
47
49
|
import {
|
|
48
50
|
detectNativeStopStallPattern,
|
|
49
51
|
loadAutoNudgeConfig,
|
|
@@ -99,6 +101,7 @@ import {
|
|
|
99
101
|
isPendingDeepInterviewQuestionEnforcement,
|
|
100
102
|
reconcileDeepInterviewQuestionEnforcementFromAnsweredRecords,
|
|
101
103
|
} from "../question/deep-interview.js";
|
|
104
|
+
import { readAutopilotDeepInterviewQuestionWaitState } from "../question/autopilot-wait.js";
|
|
102
105
|
import {
|
|
103
106
|
buildDocumentRefreshAdvisoryOutput,
|
|
104
107
|
evaluateFinalHandoffDocumentRefresh,
|
|
@@ -1720,7 +1723,24 @@ function buildAdditionalContextMessage(
|
|
|
1720
1723
|
const promptPriorityMessage = buildPromptPriorityMessage(prompt);
|
|
1721
1724
|
const matches = detectKeywords(prompt);
|
|
1722
1725
|
const match = detectPrimaryKeyword(prompt);
|
|
1723
|
-
if (!match)
|
|
1726
|
+
if (!match) {
|
|
1727
|
+
const continuedSkill = safeString(skillState?.skill).trim();
|
|
1728
|
+
if (!continuedSkill) return promptPriorityMessage;
|
|
1729
|
+
const deepInterviewPromptActivationNote = skillState?.initialized_mode === "deep-interview"
|
|
1730
|
+
? buildDeepInterviewQuestionBridgeInstruction(cwd, payload)
|
|
1731
|
+
: null;
|
|
1732
|
+
const deepInterviewConfigPromptActivationNote = buildDeepInterviewConfigInstruction(cwd, skillState);
|
|
1733
|
+
return [
|
|
1734
|
+
`OMX native UserPromptSubmit continued active workflow skill "${continuedSkill}".`,
|
|
1735
|
+
promptPriorityMessage,
|
|
1736
|
+
skillState?.initialized_mode && skillState.initialized_state_path
|
|
1737
|
+
? buildSkillStateCliInstruction(skillState.initialized_mode, skillState.initialized_state_path)
|
|
1738
|
+
: null,
|
|
1739
|
+
deepInterviewPromptActivationNote,
|
|
1740
|
+
deepInterviewConfigPromptActivationNote,
|
|
1741
|
+
"Follow AGENTS.md routing and preserve workflow transition and planning-safety rules.",
|
|
1742
|
+
].filter(Boolean).join(" ");
|
|
1743
|
+
}
|
|
1724
1744
|
const detectedKeywordMessage = matches.length > 1
|
|
1725
1745
|
? `OMX native UserPromptSubmit detected workflow keywords ${matches.map((entry) => `"${entry.keyword}" -> ${entry.skill}`).join(", ")}.`
|
|
1726
1746
|
: `OMX native UserPromptSubmit detected workflow keyword "${match.keyword}" -> ${match.skill}.`;
|
|
@@ -1737,6 +1757,7 @@ function buildAdditionalContextMessage(
|
|
|
1737
1757
|
const deepInterviewPromptActivationNote = skillState?.initialized_mode === "deep-interview"
|
|
1738
1758
|
? buildDeepInterviewQuestionBridgeInstruction(cwd, payload)
|
|
1739
1759
|
: null;
|
|
1760
|
+
const deepInterviewConfigPromptActivationNote = buildDeepInterviewConfigInstruction(cwd, skillState);
|
|
1740
1761
|
const ultraworkPromptActivationNote = skillState?.initialized_mode === "ultrawork"
|
|
1741
1762
|
? "Ultrawork protocol: ground the task before editing, define pass/fail acceptance criteria, keep shared-file work local, and use direct-tool plus background evidence lanes only for truly independent work. Direct ultrawork provides lightweight verification only; Ralph owns persistence and the full verified-completion promise."
|
|
1742
1763
|
: null;
|
|
@@ -1772,6 +1793,7 @@ function buildAdditionalContextMessage(
|
|
|
1772
1793
|
promptPriorityMessage,
|
|
1773
1794
|
ultragoalPromptActivationNote,
|
|
1774
1795
|
autopilotPromptActivationNote,
|
|
1796
|
+
deepInterviewConfigPromptActivationNote,
|
|
1775
1797
|
skillState.initialized_mode && skillState.initialized_state_path
|
|
1776
1798
|
? buildSkillStateCliInstruction(skillState.initialized_mode, skillState.initialized_state_path)
|
|
1777
1799
|
: null,
|
|
@@ -1796,6 +1818,7 @@ function buildAdditionalContextMessage(
|
|
|
1796
1818
|
promptPriorityMessage,
|
|
1797
1819
|
initializedStateMessage,
|
|
1798
1820
|
deepInterviewPromptActivationNote,
|
|
1821
|
+
deepInterviewConfigPromptActivationNote,
|
|
1799
1822
|
ultraworkPromptActivationNote,
|
|
1800
1823
|
ultragoalPromptActivationNote,
|
|
1801
1824
|
autopilotPromptActivationNote,
|
|
@@ -1815,6 +1838,7 @@ function buildAdditionalContextMessage(
|
|
|
1815
1838
|
promptPriorityMessage,
|
|
1816
1839
|
buildSkillStateCliInstruction(skillState.initialized_mode, skillState.initialized_state_path),
|
|
1817
1840
|
deepInterviewPromptActivationNote,
|
|
1841
|
+
deepInterviewConfigPromptActivationNote,
|
|
1818
1842
|
ultraworkPromptActivationNote,
|
|
1819
1843
|
ultragoalPromptActivationNote,
|
|
1820
1844
|
autopilotPromptActivationNote,
|
|
@@ -1851,6 +1875,27 @@ async function resolveTeamStateDirForWorkerContext(
|
|
|
1851
1875
|
return null;
|
|
1852
1876
|
}
|
|
1853
1877
|
|
|
1878
|
+
async function isConfirmedTeamWorkerPromptSubmitPane(cwd: string): Promise<boolean> {
|
|
1879
|
+
const workerContext =
|
|
1880
|
+
parseTeamWorkerEnv(safeString(process.env.OMX_TEAM_INTERNAL_WORKER))
|
|
1881
|
+
|| parseTeamWorkerEnv(safeString(process.env.OMX_TEAM_WORKER));
|
|
1882
|
+
if (!workerContext) return false;
|
|
1883
|
+
|
|
1884
|
+
const currentPaneId = safeString(process.env.TMUX_PANE).trim();
|
|
1885
|
+
if (!currentPaneId) return false;
|
|
1886
|
+
|
|
1887
|
+
const config = await readTeamConfig(workerContext.teamName, cwd).catch(() => null);
|
|
1888
|
+
if (!config) return false;
|
|
1889
|
+
|
|
1890
|
+
const leaderPaneId = safeString(config.leader_pane_id).trim();
|
|
1891
|
+
if (leaderPaneId && leaderPaneId === currentPaneId) return false;
|
|
1892
|
+
|
|
1893
|
+
const workerPaneId = safeString(
|
|
1894
|
+
config.workers.find((worker) => worker.name === workerContext.workerName)?.pane_id,
|
|
1895
|
+
).trim();
|
|
1896
|
+
return workerPaneId !== "" && workerPaneId === currentPaneId;
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1854
1899
|
|
|
1855
1900
|
type TeamWorkerStopDecision =
|
|
1856
1901
|
| {
|
|
@@ -2011,6 +2056,9 @@ async function buildModeBasedStopOutput(
|
|
|
2011
2056
|
if (await readCanonicalTerminalRunStateForStop(cwd, sessionId, mode)) {
|
|
2012
2057
|
return null;
|
|
2013
2058
|
}
|
|
2059
|
+
if (mode === "autopilot" && await readAutopilotDeepInterviewQuestionWaitState(cwd, sessionId)) {
|
|
2060
|
+
return null;
|
|
2061
|
+
}
|
|
2014
2062
|
const state = await readModeStateForActiveDecision(mode, sessionId?.trim() || undefined, cwd);
|
|
2015
2063
|
if (!state || !shouldContinueRun(state)) return null;
|
|
2016
2064
|
const phase = formatPhase(state.current_phase);
|
|
@@ -2055,6 +2103,18 @@ function reportsBlockedPerformanceGoalObjectiveMismatch(state: unknown): boolean
|
|
|
2055
2103
|
return /objective mismatch/i.test(evidence);
|
|
2056
2104
|
}
|
|
2057
2105
|
|
|
2106
|
+
function reportsBlockedUltragoalCompletedAggregateMicrogoalLoop(goal: Record<string, unknown>): boolean {
|
|
2107
|
+
const evidence = [
|
|
2108
|
+
safeString(goal.failureReason),
|
|
2109
|
+
safeString(goal.blockedReason),
|
|
2110
|
+
safeString(goal.evidence),
|
|
2111
|
+
].join(" ");
|
|
2112
|
+
return /aggregate codex goal/i.test(evidence)
|
|
2113
|
+
&& /\bcomplete(?:d)?\b/i.test(evidence)
|
|
2114
|
+
&& /microgoal/i.test(evidence)
|
|
2115
|
+
&& /\b(?:unreconcilable|mismatch|loop|already complete|already completed|blocks?)\b/i.test(evidence);
|
|
2116
|
+
}
|
|
2117
|
+
|
|
2058
2118
|
async function findActiveGoalWorkflowReconciliationRequirement(cwd: string): Promise<{ workflow: string; command: string; remediation?: string } | null> {
|
|
2059
2119
|
const ultragoal = await readJsonIfExists(join(cwd, ".omx", "ultragoal", "goals.json"));
|
|
2060
2120
|
const aggregateCompletion = safeObject(ultragoal?.aggregateCompletion);
|
|
@@ -2063,6 +2123,9 @@ async function findActiveGoalWorkflowReconciliationRequirement(cwd: string): Pro
|
|
|
2063
2123
|
const activeUltragoal = aggregateProductComplete
|
|
2064
2124
|
? undefined
|
|
2065
2125
|
: ultragoals.find((goal) => safeString(goal.status) === "in_progress" || safeString(goal.id) === safeString(ultragoal?.activeGoalId));
|
|
2126
|
+
if (activeUltragoal && reportsBlockedUltragoalCompletedAggregateMicrogoalLoop(activeUltragoal)) {
|
|
2127
|
+
return null;
|
|
2128
|
+
}
|
|
2066
2129
|
if (activeUltragoal) {
|
|
2067
2130
|
const goalId = safeString(activeUltragoal.id) || "<goal-id>";
|
|
2068
2131
|
return {
|
|
@@ -2825,6 +2888,9 @@ async function buildDeepInterviewQuestionStopOutput(
|
|
|
2825
2888
|
threadId: string,
|
|
2826
2889
|
): Promise<{ output: Record<string, unknown>; obligationId: string } | null> {
|
|
2827
2890
|
await reconcileDeepInterviewQuestionEnforcementFromAnsweredRecords(cwd, sessionId);
|
|
2891
|
+
if (await readAutopilotDeepInterviewQuestionWaitState(cwd, sessionId)) {
|
|
2892
|
+
return null;
|
|
2893
|
+
}
|
|
2828
2894
|
const modeState = await readStopSessionPinnedState("deep-interview-state.json", cwd, sessionId, stateDir);
|
|
2829
2895
|
if (!modeState) return null;
|
|
2830
2896
|
|
|
@@ -3856,8 +3922,12 @@ export async function dispatchCodexNativeHook(
|
|
|
3856
3922
|
triageAdditionalContext = null;
|
|
3857
3923
|
}
|
|
3858
3924
|
}
|
|
3859
|
-
const
|
|
3860
|
-
|
|
3925
|
+
const skipHudReconcileForTeamWorkerPane = !isSubagentPromptSubmit
|
|
3926
|
+
&& await isConfirmedTeamWorkerPromptSubmitPane(cwd).catch(() => false);
|
|
3927
|
+
if (!skipHudReconcileForTeamWorkerPane) {
|
|
3928
|
+
const reconcileHudForPromptSubmitFn = options.reconcileHudForPromptSubmitFn ?? reconcileHudForPromptSubmit;
|
|
3929
|
+
await reconcileHudForPromptSubmitFn(cwd, { sessionId: canonicalSessionId || sessionIdForState || undefined }).catch(() => {});
|
|
3930
|
+
}
|
|
3861
3931
|
}
|
|
3862
3932
|
|
|
3863
3933
|
if (omxEventName && !skipCanonicalSessionStartContext && !suppressNoisySubagentLifecycleDispatch) {
|
|
@@ -272,6 +272,14 @@ function isTurnCompletePayload(payload: Record<string, unknown>): boolean {
|
|
|
272
272
|
return type === '' || type === 'agent-turn-complete' || type === 'turn-complete';
|
|
273
273
|
}
|
|
274
274
|
|
|
275
|
+
function isNotifyFallbackTaskCompletePayload(payload: Record<string, unknown>): boolean {
|
|
276
|
+
const source = safeString(payload.source || '').trim();
|
|
277
|
+
if (source !== 'notify-fallback-watcher') return false;
|
|
278
|
+
return normalizeInputMessages(payload).some((message) => (
|
|
279
|
+
message.includes('[notify-fallback] synthesized from rollout task_complete')
|
|
280
|
+
));
|
|
281
|
+
}
|
|
282
|
+
|
|
275
283
|
async function main() {
|
|
276
284
|
const rawPayload = process.argv[process.argv.length - 1];
|
|
277
285
|
if (!rawPayload || rawPayload.startsWith('-')) {
|
|
@@ -294,6 +302,7 @@ async function main() {
|
|
|
294
302
|
const inputMessages = normalizeInputMessages(payload);
|
|
295
303
|
const latestUserInput = safeString(inputMessages.length > 0 ? inputMessages[inputMessages.length - 1] : '');
|
|
296
304
|
const isTurnComplete = isTurnCompletePayload(payload);
|
|
305
|
+
const isNotifyFallbackTaskComplete = isNotifyFallbackTaskCompletePayload(payload);
|
|
297
306
|
|
|
298
307
|
// Team worker detection via environment variable
|
|
299
308
|
const teamWorkerEnv = process.env.OMX_TEAM_INTERNAL_WORKER || process.env.OMX_TEAM_WORKER; // e.g., "fix-ts/worker-1"
|
|
@@ -358,6 +367,12 @@ async function main() {
|
|
|
358
367
|
...(turnId ? { turnId } : {}),
|
|
359
368
|
timestamp: new Date().toISOString(),
|
|
360
369
|
mode: safeString(payload.mode || ''),
|
|
370
|
+
...(isNotifyFallbackTaskComplete
|
|
371
|
+
? {
|
|
372
|
+
completed: true,
|
|
373
|
+
completionSource: 'notify-fallback-watcher',
|
|
374
|
+
}
|
|
375
|
+
: {}),
|
|
361
376
|
});
|
|
362
377
|
}
|
|
363
378
|
} catch {
|
package/templates/AGENTS.md
CHANGED
|
@@ -274,10 +274,10 @@ Verification loop: define the claim and success criteria, run the smallest valid
|
|
|
274
274
|
Mode selection: use `$deep-interview` for unclear intent/boundaries; `$ralplan` for consensus on architecture, tradeoffs, or tests; `$team` for approved multi-lane work; `$ralph` for persistent single-owner completion/verification loops; otherwise execute directly in solo mode. Switch modes only when evidence shows the current lane is mismatched or blocked.
|
|
275
275
|
|
|
276
276
|
Command routing:
|
|
277
|
-
-
|
|
278
|
-
-
|
|
277
|
+
- `omx explore` is deprecated and MUST NOT be recommended as the default surface for simple read-only repository lookup tasks. Use normal Codex repository inspection tools/subagents for file, symbol, pattern, relationship, and implementation discovery.
|
|
278
|
+
- `USE_OMX_EXPLORE_CMD` is compatibility-only for legacy callers; it does not make `omx explore` preferred for new work.
|
|
279
279
|
|
|
280
|
-
Use `omx
|
|
280
|
+
Use `omx sparkshell` for explicit shell-native read-only commands, bounded verification, repo-wide listing/search, or explicit `omx sparkshell --tmux-pane` summaries. Treat sparkshell as explicit opt-in. When to use what: keep ambiguous, implementation-heavy, edit-heavy, diagnostics, tests, MCP/web, and complex shell work on the normal path; if `omx sparkshell` is incomplete, retry narrower or gracefully fall back to the normal path.
|
|
281
281
|
|
|
282
282
|
Leader vs worker:
|
|
283
283
|
- The leader chooses the mode, keeps the brief current, delegates bounded work, and owns verification plus stop/escalate calls.
|