oh-my-codex 0.22.4 → 0.22.6
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/crates/omx-api/src/lib.rs +7 -2
- package/crates/omx-api/tests/cli.rs +58 -0
- package/dist/cli/__tests__/cleanup.test.js +58 -73
- package/dist/cli/__tests__/cleanup.test.js.map +1 -1
- package/dist/cli/__tests__/launch-fallback.test.js +41 -0
- package/dist/cli/__tests__/launch-fallback.test.js.map +1 -1
- package/dist/cli/__tests__/question.test.js +193 -2
- package/dist/cli/__tests__/question.test.js.map +1 -1
- package/dist/cli/cleanup.d.ts +0 -16
- package/dist/cli/cleanup.d.ts.map +1 -1
- package/dist/cli/cleanup.js +2 -71
- package/dist/cli/cleanup.js.map +1 -1
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +8 -4
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/question.d.ts.map +1 -1
- package/dist/cli/question.js +38 -20
- package/dist/cli/question.js.map +1 -1
- package/dist/mcp/__tests__/memory-server-concurrency.test.d.ts +2 -0
- package/dist/mcp/__tests__/memory-server-concurrency.test.d.ts.map +1 -0
- package/dist/mcp/__tests__/memory-server-concurrency.test.js +128 -0
- package/dist/mcp/__tests__/memory-server-concurrency.test.js.map +1 -0
- package/dist/mcp/memory-server.d.ts.map +1 -1
- package/dist/mcp/memory-server.js +40 -49
- package/dist/mcp/memory-server.js.map +1 -1
- package/dist/notifications/__tests__/reply-routing-realtmux.test.d.ts +2 -0
- package/dist/notifications/__tests__/reply-routing-realtmux.test.d.ts.map +1 -0
- package/dist/notifications/__tests__/reply-routing-realtmux.test.js +133 -0
- package/dist/notifications/__tests__/reply-routing-realtmux.test.js.map +1 -0
- package/dist/notifications/index.d.ts.map +1 -1
- package/dist/notifications/index.js +5 -1
- package/dist/notifications/index.js.map +1 -1
- package/dist/notifications/reply-listener.d.ts +2 -1
- package/dist/notifications/reply-listener.d.ts.map +1 -1
- package/dist/notifications/reply-listener.js +13 -5
- package/dist/notifications/reply-listener.js.map +1 -1
- package/dist/notifications/session-registry.d.ts +2 -0
- package/dist/notifications/session-registry.d.ts.map +1 -1
- package/dist/notifications/session-registry.js.map +1 -1
- package/dist/notifications/tmux-detector.d.ts +12 -0
- package/dist/notifications/tmux-detector.d.ts.map +1 -1
- package/dist/notifications/tmux-detector.js +46 -2
- package/dist/notifications/tmux-detector.js.map +1 -1
- package/dist/question/__tests__/renderer.test.js +84 -50
- package/dist/question/__tests__/renderer.test.js.map +1 -1
- package/dist/question/__tests__/state.test.js +192 -2
- package/dist/question/__tests__/state.test.js.map +1 -1
- package/dist/question/__tests__/ui.test.js +82 -1
- package/dist/question/__tests__/ui.test.js.map +1 -1
- package/dist/question/renderer.d.ts +2 -2
- package/dist/question/renderer.d.ts.map +1 -1
- package/dist/question/renderer.js +14 -22
- package/dist/question/renderer.js.map +1 -1
- package/dist/question/state.d.ts +4 -0
- package/dist/question/state.d.ts.map +1 -1
- package/dist/question/state.js +76 -23
- package/dist/question/state.js.map +1 -1
- package/dist/question/ui.d.ts.map +1 -1
- package/dist/question/ui.js +8 -2
- package/dist/question/ui.js.map +1 -1
- package/dist/scripts/__tests__/worker-stop-task-read.test.d.ts +2 -0
- package/dist/scripts/__tests__/worker-stop-task-read.test.d.ts.map +1 -0
- package/dist/scripts/__tests__/worker-stop-task-read.test.js +76 -0
- package/dist/scripts/__tests__/worker-stop-task-read.test.js.map +1 -0
- package/dist/scripts/codex-native-hook.d.ts.map +1 -1
- package/dist/scripts/codex-native-hook.js +28 -14
- package/dist/scripts/codex-native-hook.js.map +1 -1
- package/dist/scripts/notify-hook/team-dispatch.d.ts.map +1 -1
- package/dist/scripts/notify-hook/team-dispatch.js +137 -128
- package/dist/scripts/notify-hook/team-dispatch.js.map +1 -1
- package/dist/subagents/tracker.d.ts.map +1 -1
- package/dist/subagents/tracker.js +12 -2
- package/dist/subagents/tracker.js.map +1 -1
- package/dist/team/__tests__/lock-recovery.test.d.ts +2 -0
- package/dist/team/__tests__/lock-recovery.test.d.ts.map +1 -0
- package/dist/team/__tests__/lock-recovery.test.js +304 -0
- package/dist/team/__tests__/lock-recovery.test.js.map +1 -0
- package/dist/team/__tests__/state.test.js +8 -6
- package/dist/team/__tests__/state.test.js.map +1 -1
- package/dist/team/state/dispatch-lock.d.ts.map +1 -1
- package/dist/team/state/dispatch-lock.js +3 -11
- package/dist/team/state/dispatch-lock.js.map +1 -1
- package/dist/team/state/locks.d.ts +1 -0
- package/dist/team/state/locks.d.ts.map +1 -1
- package/dist/team/state/locks.js +29 -13
- package/dist/team/state/locks.js.map +1 -1
- package/dist/vscode/__tests__/index.test.js +21 -0
- package/dist/vscode/__tests__/index.test.js.map +1 -1
- package/dist/vscode/index.d.ts.map +1 -1
- package/dist/vscode/index.js +8 -4
- package/dist/vscode/index.js.map +1 -1
- package/package.json +1 -1
- package/plugins/oh-my-codex/.codex-plugin/plugin.json +1 -1
- package/src/scripts/__tests__/worker-stop-task-read.test.ts +77 -0
- package/src/scripts/codex-native-hook.ts +25 -11
- package/src/scripts/notify-hook/team-dispatch.ts +133 -125
|
@@ -20,6 +20,7 @@ import { syncRegularFile } from "../utils/file-durability.js";
|
|
|
20
20
|
import { appendPromptSessionProvenanceRejection, appendToLog, isSessionPointerLaunchAbort, isSessionStateUsable, isSessionStateAuthoritativeForCwd, normalizeSessionId, readNativeSessionOwner, readSessionPointer, readSessionState, readUsableSessionState, reconcileNativeSessionStart, resolveSessionPointerContext, sessionOwnerFileIdentityMatches, writeNativeSessionOwner } from "../hooks/session.js";
|
|
21
21
|
import { evaluateResolvedPromptTurn, extractSelectedTargetOwnerEvidence, preflightSelectedTargetOwner, } from "../hooks/prompt-session-provenance.js";
|
|
22
22
|
import { appendTeamEvent, readTeamLeaderAttention, readTeamManifestV2, readTeamPhase, writeTeamLeaderAttention, writeTeamPhase, } from "../team/state.js";
|
|
23
|
+
import { TEAM_TASK_STATUSES } from "../team/contracts.js";
|
|
23
24
|
import { parseTeamNoticeLedgerPrompt, reconcileTeamNoticeLedger } from "../team/notice-ledger.js";
|
|
24
25
|
import { canonicalizeComparablePath, omxLogsDir, omxNotepadPath, resolveProjectMemoryPath, sameFilePath, } from "../utils/paths.js";
|
|
25
26
|
import { findGitLayout } from "../utils/git-layout.js";
|
|
@@ -2399,20 +2400,33 @@ async function resolveTeamWorkerStopDecision(cwd) {
|
|
|
2399
2400
|
candidateTaskIds.add(normalized);
|
|
2400
2401
|
}
|
|
2401
2402
|
const tasksDir = join(stateDir, "team", workerContext.teamName, "tasks");
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2409
|
-
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
|
|
2414
|
-
|
|
2415
|
-
|
|
2403
|
+
let taskFiles;
|
|
2404
|
+
try {
|
|
2405
|
+
const info = await lstat(tasksDir);
|
|
2406
|
+
if (!info.isDirectory() || info.isSymbolicLink())
|
|
2407
|
+
throw new Error("not_regular_directory");
|
|
2408
|
+
taskFiles = await readdir(tasksDir);
|
|
2409
|
+
}
|
|
2410
|
+
catch (error) {
|
|
2411
|
+
if (error.code === 'ENOENT' && candidateTaskIds.size === 0) {
|
|
2412
|
+
return blockWorkerStop("missing_task_assignment", "no current_task_id or assigned_tasks are recorded", stateDir);
|
|
2413
|
+
}
|
|
2414
|
+
return blockWorkerStop("unreadable_tasks", "task directory cannot be enumerated safely", stateDir);
|
|
2415
|
+
}
|
|
2416
|
+
for (const entry of taskFiles) {
|
|
2417
|
+
const idFromFile = /^task-(\d+)\.json$/.exec(entry)?.[1];
|
|
2418
|
+
if (!idFromFile)
|
|
2419
|
+
continue;
|
|
2420
|
+
const taskPath = join(tasksDir, entry);
|
|
2421
|
+
const info = await lstat(taskPath).catch(() => null);
|
|
2422
|
+
const task = info?.isFile() && !info.isSymbolicLink() ? await readJsonIfExists(taskPath) : null;
|
|
2423
|
+
if (!task || Array.isArray(task) || safeString(task.id) !== idFromFile || !TEAM_TASK_STATUSES.includes(task.status)) {
|
|
2424
|
+
return blockWorkerStop(`unreadable_task_${idFromFile}`, `task ${idFromFile} has no trustworthy task state`, stateDir);
|
|
2425
|
+
}
|
|
2426
|
+
const taskOwner = safeString(task.owner).trim();
|
|
2427
|
+
const taskClaimOwner = safeString(safeObject(task.claim).owner).trim();
|
|
2428
|
+
if (taskOwner === workerContext.workerName || taskClaimOwner === workerContext.workerName) {
|
|
2429
|
+
candidateTaskIds.add(idFromFile);
|
|
2416
2430
|
}
|
|
2417
2431
|
}
|
|
2418
2432
|
if (candidateTaskIds.size === 0) {
|