oh-my-opencode 5.0.0-beta.24 → 5.0.0-beta.26

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.
Files changed (57) hide show
  1. package/dist/cli/index.js +98 -28
  2. package/dist/cli-node/index.js +98 -28
  3. package/dist/features/team-mode/tools/messaging-fallback-wake.d.ts +15 -0
  4. package/dist/index.js +369 -163
  5. package/dist/tui.js +78 -12
  6. package/package.json +15 -15
  7. package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
  8. package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
  9. package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
  10. package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
  11. package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
  12. package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
  13. package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
  14. package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
  15. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
  16. package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
  17. package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +2 -2
  18. package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
  19. package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
  20. package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
  21. package/packages/omo-codex/plugin/components/rules/package.json +1 -1
  22. package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
  23. package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
  24. package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
  25. package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
  26. package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
  27. package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
  28. package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +2 -2
  29. package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
  30. package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
  31. package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
  32. package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
  33. package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
  34. package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
  35. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
  36. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
  37. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
  38. package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
  39. package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
  40. package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
  41. package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
  42. package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
  43. package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
  44. package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
  45. package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
  46. package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
  47. package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
  48. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
  49. package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
  50. package/packages/omo-codex/plugin/hooks/subagent-stop-checking-ulw-execute-continuation.json +1 -1
  51. package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
  52. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
  53. package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
  54. package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
  55. package/packages/omo-codex/plugin/package-lock.json +13 -13
  56. package/packages/omo-codex/plugin/package.json +1 -1
  57. package/packages/omo-codex/scripts/install-dist/install-local.mjs +2 -2
package/dist/cli/index.js CHANGED
@@ -54,7 +54,7 @@ var package_default;
54
54
  var init_package = __esm(() => {
55
55
  package_default = {
56
56
  name: "oh-my-opencode",
57
- version: "5.0.0-beta.24",
57
+ version: "5.0.0-beta.26",
58
58
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
59
59
  main: "./dist/index.js",
60
60
  types: "dist/index.d.ts",
@@ -235,7 +235,7 @@ var init_package = __esm(() => {
235
235
  zod: "^4.4.3"
236
236
  },
237
237
  devDependencies: {
238
- "@code-yeongyu/senpi": "2026.8.28",
238
+ "@code-yeongyu/senpi": "2026.8.28-2",
239
239
  "@oh-my-opencode/agents-md-core": "workspace:*",
240
240
  "@oh-my-opencode/ast-grep-mcp": "workspace:*",
241
241
  "@oh-my-opencode/boulder-state": "workspace:*",
@@ -276,18 +276,18 @@ var init_package = __esm(() => {
276
276
  typescript: "^7.0.2"
277
277
  },
278
278
  optionalDependencies: {
279
- "oh-my-opencode-darwin-arm64": "5.0.0-beta.24",
280
- "oh-my-opencode-darwin-x64": "5.0.0-beta.24",
281
- "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.24",
282
- "oh-my-opencode-linux-arm64": "5.0.0-beta.24",
283
- "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.24",
284
- "oh-my-opencode-linux-x64": "5.0.0-beta.24",
285
- "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.24",
286
- "oh-my-opencode-linux-x64-musl": "5.0.0-beta.24",
287
- "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.24",
288
- "oh-my-opencode-windows-arm64": "5.0.0-beta.24",
289
- "oh-my-opencode-windows-x64": "5.0.0-beta.24",
290
- "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.24"
279
+ "oh-my-opencode-darwin-arm64": "5.0.0-beta.26",
280
+ "oh-my-opencode-darwin-x64": "5.0.0-beta.26",
281
+ "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.26",
282
+ "oh-my-opencode-linux-arm64": "5.0.0-beta.26",
283
+ "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.26",
284
+ "oh-my-opencode-linux-x64": "5.0.0-beta.26",
285
+ "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.26",
286
+ "oh-my-opencode-linux-x64-musl": "5.0.0-beta.26",
287
+ "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.26",
288
+ "oh-my-opencode-windows-arm64": "5.0.0-beta.26",
289
+ "oh-my-opencode-windows-x64": "5.0.0-beta.26",
290
+ "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.26"
291
291
  },
292
292
  overrides: {
293
293
  "@earendil-works/pi-agent-core": "0.84.2",
@@ -305,7 +305,7 @@ var init_package = __esm(() => {
305
305
  "@code-yeongyu/comment-checker"
306
306
  ],
307
307
  patchedDependencies: {
308
- "@code-yeongyu/senpi@2026.8.28": "patches/@code-yeongyu%2Fsenpi@2026.8.28.patch"
308
+ "@code-yeongyu/senpi@2026.8.28-2": "patches/@code-yeongyu%2Fsenpi@2026.8.28-2.patch"
309
309
  }
310
310
  };
311
311
  });
@@ -23100,6 +23100,9 @@ var init_message_inspection_error = () => {};
23100
23100
  function getPromptGateMessagesFetchTimeoutMs() {
23101
23101
  return promptGateMessagesFetchTimeoutMsForTesting ?? DEFAULT_PROMPT_GATE_MESSAGES_FETCH_TIMEOUT_MS;
23102
23102
  }
23103
+ function getPromptGateRevalidationTimeoutMs() {
23104
+ return promptGateRevalidationTimeoutMsForTesting ?? DEFAULT_PROMPT_REVALIDATION_TIMEOUT_MS;
23105
+ }
23103
23106
  async function withDispatchTimeout(operation, dispatchTimeoutMs, operationName) {
23104
23107
  if (dispatchTimeoutMs <= 0) {
23105
23108
  return operation;
@@ -23118,7 +23121,7 @@ async function withDispatchTimeout(operation, dispatchTimeoutMs, operationName)
23118
23121
  }
23119
23122
  }
23120
23123
  }
23121
- var DEFAULT_PROMPT_ASYNC_POST_DISPATCH_HOLD_MS = 2000, DEFAULT_PROMPT_SEMANTIC_DEDUPE_HOLD_MS = 15000, DEFAULT_PROMPT_DISPATCH_TIMEOUT_MS = 30000, DEFAULT_PROMPT_GATE_MESSAGES_FETCH_TIMEOUT_MS = 5000, DEFAULT_PROMPT_QUEUE_RETRY_MS = 250, promptGateMessagesFetchTimeoutMsForTesting;
23124
+ var DEFAULT_PROMPT_ASYNC_POST_DISPATCH_HOLD_MS = 2000, DEFAULT_PROMPT_SEMANTIC_DEDUPE_HOLD_MS = 15000, DEFAULT_PROMPT_DISPATCH_TIMEOUT_MS = 30000, DEFAULT_PROMPT_GATE_MESSAGES_FETCH_TIMEOUT_MS = 5000, DEFAULT_PROMPT_REVALIDATION_TIMEOUT_MS = 5000, DEFAULT_PROMPT_QUEUE_RETRY_MS = 250, promptGateMessagesFetchTimeoutMsForTesting, promptGateRevalidationTimeoutMsForTesting;
23122
23125
 
23123
23126
  // packages/utils/src/prompt-async-gate/pending-tool-turn.ts
23124
23127
  function getPromptQuery(input) {
@@ -23319,6 +23322,7 @@ async function dispatchAfterSessionIdle(args) {
23319
23322
  checkStatus,
23320
23323
  checkToolState,
23321
23324
  shouldDispatch,
23325
+ retryDispatchFailure,
23322
23326
  dispatch
23323
23327
  } = args;
23324
23328
  const existing = getActiveReservation(sessionID);
@@ -23373,7 +23377,9 @@ async function dispatchAfterSessionIdle(args) {
23373
23377
  });
23374
23378
  return { status: "active" };
23375
23379
  }
23376
- if (shouldDispatch?.() === false) {
23380
+ const dispatchDecision = shouldDispatch?.();
23381
+ const resolvedDispatchDecision = dispatchDecision !== undefined && typeof dispatchDecision !== "boolean" ? await withDispatchTimeout(dispatchDecision, Math.min(dispatchTimeoutMs, getPromptGateRevalidationTimeoutMs()), `[prompt-async-gate] ${sessionName} shouldDispatch`) : dispatchDecision;
23382
+ if (resolvedDispatchDecision === false) {
23377
23383
  log(`[prompt-async-gate] ${sessionName} cancelled before dispatch`, { sessionID, source });
23378
23384
  return { status: "cancelled" };
23379
23385
  }
@@ -23389,6 +23395,7 @@ async function dispatchAfterSessionIdle(args) {
23389
23395
  log(`[prompt-async-gate] ${sessionName} dispatched`, { sessionID, source });
23390
23396
  return { status: "dispatched", response };
23391
23397
  } catch (error51) {
23398
+ const queueRetryable = dispatchAttempted && retryDispatchFailure?.(error51) === true;
23392
23399
  if (dispatchAttempted) {
23393
23400
  rememberRecentPromptDispatch({
23394
23401
  sessionID,
@@ -23399,7 +23406,12 @@ async function dispatchAfterSessionIdle(args) {
23399
23406
  }
23400
23407
  const errorText = error51 instanceof Error ? `${error51.name}: ${error51.message}` : String(error51);
23401
23408
  log(`[prompt-async-gate] ${sessionName} failed`, { sessionID, source, error: errorText });
23402
- return { status: "failed", error: error51, dispatchAttempted };
23409
+ return {
23410
+ status: "failed",
23411
+ error: error51,
23412
+ dispatchAttempted,
23413
+ ...queueRetryable ? { queueRetryable: true } : {}
23414
+ };
23403
23415
  } finally {
23404
23416
  finishPromptReservation(sessionID, reservation, dispatchAttempted, postDispatchHoldMs);
23405
23417
  }
@@ -23461,6 +23473,7 @@ function schedulePromptQueueDrain(sessionID, delayMs) {
23461
23473
  promptQueueTimers.set(sessionID, timer);
23462
23474
  }
23463
23475
  function removePromptQueueEntry(sessionID, entry) {
23476
+ promptQueueRetryStates.delete(entry.id);
23464
23477
  const queue = promptQueues.get(sessionID);
23465
23478
  if (!queue) {
23466
23479
  return;
@@ -23490,6 +23503,7 @@ async function drainPromptQueue(sessionID, awaitedEntry) {
23490
23503
  promptQueueDraining.add(sessionID);
23491
23504
  clearPromptQueueTimer(sessionID);
23492
23505
  let awaitedResult;
23506
+ const deferredRetryIds = new Set;
23493
23507
  try {
23494
23508
  while (true) {
23495
23509
  const queue = promptQueues.get(sessionID);
@@ -23497,6 +23511,20 @@ async function drainPromptQueue(sessionID, awaitedEntry) {
23497
23511
  if (!entry) {
23498
23512
  break;
23499
23513
  }
23514
+ const retryState = promptQueueRetryStates.get(entry.id);
23515
+ if (entry.durableRetry && retryState?.retryAfter !== undefined && retryState.retryAfter > Date.now()) {
23516
+ if (deferredRetryIds.has(entry.id)) {
23517
+ const nextRetryAt = Math.min(...queue.flatMap((queued) => {
23518
+ const retryAfter = promptQueueRetryStates.get(queued.id)?.retryAfter;
23519
+ return retryAfter === undefined ? [] : [retryAfter];
23520
+ }));
23521
+ schedulePromptQueueDrain(sessionID, nextRetryAt - Date.now());
23522
+ break;
23523
+ }
23524
+ deferredRetryIds.add(entry.id);
23525
+ setPromptQueue(sessionID, [...queue.slice(1), entry]);
23526
+ continue;
23527
+ }
23500
23528
  promptQueueInFlight.set(sessionID, entry);
23501
23529
  const result = await dispatchAfterSessionIdle({
23502
23530
  sessionName: entry.sessionName,
@@ -23512,12 +23540,45 @@ async function drainPromptQueue(sessionID, awaitedEntry) {
23512
23540
  checkStatus: entry.checkStatus,
23513
23541
  checkToolState: entry.checkToolState,
23514
23542
  shouldDispatch: entry.shouldDispatch,
23543
+ retryDispatchFailure: entry.retryDispatchFailure,
23515
23544
  dispatch: entry.dispatch
23516
23545
  });
23517
23546
  if (promptQueueInFlight.get(sessionID)?.id === entry.id) {
23518
23547
  promptQueueInFlight.delete(sessionID);
23519
23548
  }
23520
- if (result.status === "active" || result.status === "reserved") {
23549
+ const retryableQueuedFailure = result.status === "failed" && (!result.dispatchAttempted || result.queueRetryable === true);
23550
+ if (retryableQueuedFailure) {
23551
+ const failureCount = (promptQueueRetryStates.get(entry.id)?.failureCount ?? 0) + 1;
23552
+ if (entry.durableRetry) {
23553
+ const exponentialBackoffMs = entry.queueRetryMs * 2 ** Math.min(failureCount, 7);
23554
+ const retryDelayMs = Math.max(entry.postDispatchHoldMs, Math.min(exponentialBackoffMs, MAX_DURABLE_RETRY_BACKOFF_MS));
23555
+ promptQueueRetryStates.set(entry.id, {
23556
+ failureCount,
23557
+ retryAfter: Date.now() + retryDelayMs
23558
+ });
23559
+ const currentQueue = promptQueues.get(sessionID);
23560
+ if (currentQueue && currentQueue.length > 1) {
23561
+ setPromptQueue(sessionID, [...currentQueue.slice(1), entry]);
23562
+ continue;
23563
+ }
23564
+ schedulePromptQueueDrain(sessionID, retryDelayMs);
23565
+ break;
23566
+ }
23567
+ if (failureCount >= MAX_QUEUED_RETRYABLE_FAILURES) {
23568
+ log("[prompt-async-gate] dropping queued prompt after repeated retryable failures", {
23569
+ sessionID,
23570
+ source: entry.source,
23571
+ failureCount
23572
+ });
23573
+ removePromptQueueEntry(sessionID, entry);
23574
+ if (awaitedEntry?.id === entry.id) {
23575
+ awaitedResult = result;
23576
+ }
23577
+ continue;
23578
+ }
23579
+ promptQueueRetryStates.set(entry.id, { failureCount });
23580
+ }
23581
+ if (result.status === "active" || result.status === "reserved" || retryableQueuedFailure) {
23521
23582
  const queued = queuedResult(entry, 1, result.status === "reserved" ? result.reservedBy : entry.source);
23522
23583
  if (awaitedEntry?.id === entry.id) {
23523
23584
  awaitedResult = queued;
@@ -23578,7 +23639,7 @@ async function enqueueInternalPrompt(entry) {
23578
23639
  const result = await drainPromptQueue(entry.sessionID, entry);
23579
23640
  return result ?? queuedResult(entry, 1);
23580
23641
  }
23581
- var promptQueues, promptQueueDraining, promptQueueInFlight, promptQueueTimers, promptQueueSequence = 0;
23642
+ var promptQueues, promptQueueDraining, promptQueueInFlight, promptQueueTimers, promptQueueRetryStates, MAX_QUEUED_RETRYABLE_FAILURES = 3, MAX_DURABLE_RETRY_BACKOFF_MS = 30000, promptQueueSequence = 0;
23582
23643
  var init_queue = __esm(() => {
23583
23644
  init_session_idle_dispatch();
23584
23645
  init_reservations();
@@ -23586,6 +23647,7 @@ var init_queue = __esm(() => {
23586
23647
  promptQueueDraining = new Set;
23587
23648
  promptQueueInFlight = new Map;
23588
23649
  promptQueueTimers = new Map;
23650
+ promptQueueRetryStates = new Map;
23589
23651
  setExpiredReservationHandler((sessionID) => {
23590
23652
  schedulePromptQueueDrain(sessionID, 0);
23591
23653
  });
@@ -23833,6 +23895,7 @@ async function dispatchInternalPrompt(args) {
23833
23895
  checkStatus: args.checkStatus !== false,
23834
23896
  checkToolState: args.checkToolState !== false,
23835
23897
  shouldDispatch: args.shouldDispatch,
23898
+ retryDispatchFailure: args.retryDispatchFailure,
23836
23899
  dispatch: (dispatchInput) => dispatchWithPathCompatibility(dispatch, dispatchInput)
23837
23900
  });
23838
23901
  if (deferResult.status === "failed" && resolved.route === "live" && deferResult.error instanceof Error && deferResult.error.message.startsWith(dispatchTimeoutPrefix)) {
@@ -23860,7 +23923,9 @@ async function dispatchInternalPrompt(args) {
23860
23923
  queueRetryMs,
23861
23924
  checkStatus: args.checkStatus !== false,
23862
23925
  checkToolState: args.checkToolState !== false,
23926
+ durableRetry: args.durableRetry === true,
23863
23927
  shouldDispatch: args.shouldDispatch,
23928
+ retryDispatchFailure: args.retryDispatchFailure,
23864
23929
  dispatch: async (_dispatchInput) => dispatchWithPathCompatibility(dispatch, input)
23865
23930
  });
23866
23931
  }
@@ -23882,6 +23947,7 @@ async function dispatchInternalPrompt(args) {
23882
23947
  checkStatus: args.checkStatus !== false,
23883
23948
  checkToolState: args.checkToolState !== false,
23884
23949
  shouldDispatch: args.shouldDispatch,
23950
+ retryDispatchFailure: args.retryDispatchFailure,
23885
23951
  dispatch: (dispatchInput) => dispatchWithPathCompatibility(dispatch, dispatchInput)
23886
23952
  });
23887
23953
  if (directResult.status === "failed" && resolved.route === "live" && directResult.error instanceof Error && directResult.error.message.startsWith(dispatchTimeoutPrefix)) {
@@ -83790,7 +83856,17 @@ function isPreSendConnectionFailure2(error51) {
83790
83856
  if (error51.name === "AbortError") {
83791
83857
  return false;
83792
83858
  }
83793
- const CONNECTION_CODES = new Set(["ECONNREFUSED", "ENOTFOUND", "EAI_AGAIN"]);
83859
+ const CONNECTION_CODES = new Set([
83860
+ "ECONNREFUSED",
83861
+ "ENOTFOUND",
83862
+ "EAI_AGAIN",
83863
+ "ENETUNREACH",
83864
+ "EHOSTUNREACH",
83865
+ "ENETDOWN",
83866
+ "EHOSTDOWN",
83867
+ "EADDRNOTAVAIL",
83868
+ "UND_ERR_CONNECT_TIMEOUT"
83869
+ ]);
83794
83870
  const self = error51;
83795
83871
  if (self.code && CONNECTION_CODES.has(self.code)) {
83796
83872
  return true;
@@ -83802,12 +83878,6 @@ function isPreSendConnectionFailure2(error51) {
83802
83878
  return true;
83803
83879
  }
83804
83880
  }
83805
- if (error51 instanceof TypeError) {
83806
- const msg = error51.message;
83807
- if (msg.includes("fetch failed") || msg.includes("Unable to connect")) {
83808
- return true;
83809
- }
83810
- }
83811
83881
  return false;
83812
83882
  }
83813
83883
  function markLiveRouteUnavailable2(reason) {
@@ -94320,7 +94390,7 @@ var package_default2;
94320
94390
  var init_package2 = __esm(() => {
94321
94391
  package_default2 = {
94322
94392
  name: "@oh-my-opencode/omo-codex",
94323
- version: "5.0.0-beta.24",
94393
+ version: "5.0.0-beta.26",
94324
94394
  type: "module",
94325
94395
  private: true,
94326
94396
  description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -55,7 +55,7 @@ var package_default;
55
55
  var init_package = __esm(() => {
56
56
  package_default = {
57
57
  name: "oh-my-opencode",
58
- version: "5.0.0-beta.24",
58
+ version: "5.0.0-beta.26",
59
59
  description: "The Best AI Agent Harness - Batteries-Included OpenCode Plugin with Multi-Model Orchestration, Parallel Background Agents, and Crafted LSP/AST Tools",
60
60
  main: "./dist/index.js",
61
61
  types: "dist/index.d.ts",
@@ -236,7 +236,7 @@ var init_package = __esm(() => {
236
236
  zod: "^4.4.3"
237
237
  },
238
238
  devDependencies: {
239
- "@code-yeongyu/senpi": "2026.8.28",
239
+ "@code-yeongyu/senpi": "2026.8.28-2",
240
240
  "@oh-my-opencode/agents-md-core": "workspace:*",
241
241
  "@oh-my-opencode/ast-grep-mcp": "workspace:*",
242
242
  "@oh-my-opencode/boulder-state": "workspace:*",
@@ -277,18 +277,18 @@ var init_package = __esm(() => {
277
277
  typescript: "^7.0.2"
278
278
  },
279
279
  optionalDependencies: {
280
- "oh-my-opencode-darwin-arm64": "5.0.0-beta.24",
281
- "oh-my-opencode-darwin-x64": "5.0.0-beta.24",
282
- "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.24",
283
- "oh-my-opencode-linux-arm64": "5.0.0-beta.24",
284
- "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.24",
285
- "oh-my-opencode-linux-x64": "5.0.0-beta.24",
286
- "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.24",
287
- "oh-my-opencode-linux-x64-musl": "5.0.0-beta.24",
288
- "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.24",
289
- "oh-my-opencode-windows-arm64": "5.0.0-beta.24",
290
- "oh-my-opencode-windows-x64": "5.0.0-beta.24",
291
- "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.24"
280
+ "oh-my-opencode-darwin-arm64": "5.0.0-beta.26",
281
+ "oh-my-opencode-darwin-x64": "5.0.0-beta.26",
282
+ "oh-my-opencode-darwin-x64-baseline": "5.0.0-beta.26",
283
+ "oh-my-opencode-linux-arm64": "5.0.0-beta.26",
284
+ "oh-my-opencode-linux-arm64-musl": "5.0.0-beta.26",
285
+ "oh-my-opencode-linux-x64": "5.0.0-beta.26",
286
+ "oh-my-opencode-linux-x64-baseline": "5.0.0-beta.26",
287
+ "oh-my-opencode-linux-x64-musl": "5.0.0-beta.26",
288
+ "oh-my-opencode-linux-x64-musl-baseline": "5.0.0-beta.26",
289
+ "oh-my-opencode-windows-arm64": "5.0.0-beta.26",
290
+ "oh-my-opencode-windows-x64": "5.0.0-beta.26",
291
+ "oh-my-opencode-windows-x64-baseline": "5.0.0-beta.26"
292
292
  },
293
293
  overrides: {
294
294
  "@earendil-works/pi-agent-core": "0.84.2",
@@ -306,7 +306,7 @@ var init_package = __esm(() => {
306
306
  "@code-yeongyu/comment-checker"
307
307
  ],
308
308
  patchedDependencies: {
309
- "@code-yeongyu/senpi@2026.8.28": "patches/@code-yeongyu%2Fsenpi@2026.8.28.patch"
309
+ "@code-yeongyu/senpi@2026.8.28-2": "patches/@code-yeongyu%2Fsenpi@2026.8.28-2.patch"
310
310
  }
311
311
  };
312
312
  });
@@ -23101,6 +23101,9 @@ var init_message_inspection_error = () => {};
23101
23101
  function getPromptGateMessagesFetchTimeoutMs() {
23102
23102
  return promptGateMessagesFetchTimeoutMsForTesting ?? DEFAULT_PROMPT_GATE_MESSAGES_FETCH_TIMEOUT_MS;
23103
23103
  }
23104
+ function getPromptGateRevalidationTimeoutMs() {
23105
+ return promptGateRevalidationTimeoutMsForTesting ?? DEFAULT_PROMPT_REVALIDATION_TIMEOUT_MS;
23106
+ }
23104
23107
  async function withDispatchTimeout(operation, dispatchTimeoutMs, operationName) {
23105
23108
  if (dispatchTimeoutMs <= 0) {
23106
23109
  return operation;
@@ -23119,7 +23122,7 @@ async function withDispatchTimeout(operation, dispatchTimeoutMs, operationName)
23119
23122
  }
23120
23123
  }
23121
23124
  }
23122
- var DEFAULT_PROMPT_ASYNC_POST_DISPATCH_HOLD_MS = 2000, DEFAULT_PROMPT_SEMANTIC_DEDUPE_HOLD_MS = 15000, DEFAULT_PROMPT_DISPATCH_TIMEOUT_MS = 30000, DEFAULT_PROMPT_GATE_MESSAGES_FETCH_TIMEOUT_MS = 5000, DEFAULT_PROMPT_QUEUE_RETRY_MS = 250, promptGateMessagesFetchTimeoutMsForTesting;
23125
+ var DEFAULT_PROMPT_ASYNC_POST_DISPATCH_HOLD_MS = 2000, DEFAULT_PROMPT_SEMANTIC_DEDUPE_HOLD_MS = 15000, DEFAULT_PROMPT_DISPATCH_TIMEOUT_MS = 30000, DEFAULT_PROMPT_GATE_MESSAGES_FETCH_TIMEOUT_MS = 5000, DEFAULT_PROMPT_REVALIDATION_TIMEOUT_MS = 5000, DEFAULT_PROMPT_QUEUE_RETRY_MS = 250, promptGateMessagesFetchTimeoutMsForTesting, promptGateRevalidationTimeoutMsForTesting;
23123
23126
 
23124
23127
  // packages/utils/src/prompt-async-gate/pending-tool-turn.ts
23125
23128
  function getPromptQuery(input) {
@@ -23320,6 +23323,7 @@ async function dispatchAfterSessionIdle(args) {
23320
23323
  checkStatus,
23321
23324
  checkToolState,
23322
23325
  shouldDispatch,
23326
+ retryDispatchFailure,
23323
23327
  dispatch
23324
23328
  } = args;
23325
23329
  const existing = getActiveReservation(sessionID);
@@ -23374,7 +23378,9 @@ async function dispatchAfterSessionIdle(args) {
23374
23378
  });
23375
23379
  return { status: "active" };
23376
23380
  }
23377
- if (shouldDispatch?.() === false) {
23381
+ const dispatchDecision = shouldDispatch?.();
23382
+ const resolvedDispatchDecision = dispatchDecision !== undefined && typeof dispatchDecision !== "boolean" ? await withDispatchTimeout(dispatchDecision, Math.min(dispatchTimeoutMs, getPromptGateRevalidationTimeoutMs()), `[prompt-async-gate] ${sessionName} shouldDispatch`) : dispatchDecision;
23383
+ if (resolvedDispatchDecision === false) {
23378
23384
  log(`[prompt-async-gate] ${sessionName} cancelled before dispatch`, { sessionID, source });
23379
23385
  return { status: "cancelled" };
23380
23386
  }
@@ -23390,6 +23396,7 @@ async function dispatchAfterSessionIdle(args) {
23390
23396
  log(`[prompt-async-gate] ${sessionName} dispatched`, { sessionID, source });
23391
23397
  return { status: "dispatched", response };
23392
23398
  } catch (error51) {
23399
+ const queueRetryable = dispatchAttempted && retryDispatchFailure?.(error51) === true;
23393
23400
  if (dispatchAttempted) {
23394
23401
  rememberRecentPromptDispatch({
23395
23402
  sessionID,
@@ -23400,7 +23407,12 @@ async function dispatchAfterSessionIdle(args) {
23400
23407
  }
23401
23408
  const errorText = error51 instanceof Error ? `${error51.name}: ${error51.message}` : String(error51);
23402
23409
  log(`[prompt-async-gate] ${sessionName} failed`, { sessionID, source, error: errorText });
23403
- return { status: "failed", error: error51, dispatchAttempted };
23410
+ return {
23411
+ status: "failed",
23412
+ error: error51,
23413
+ dispatchAttempted,
23414
+ ...queueRetryable ? { queueRetryable: true } : {}
23415
+ };
23404
23416
  } finally {
23405
23417
  finishPromptReservation(sessionID, reservation, dispatchAttempted, postDispatchHoldMs);
23406
23418
  }
@@ -23462,6 +23474,7 @@ function schedulePromptQueueDrain(sessionID, delayMs) {
23462
23474
  promptQueueTimers.set(sessionID, timer);
23463
23475
  }
23464
23476
  function removePromptQueueEntry(sessionID, entry) {
23477
+ promptQueueRetryStates.delete(entry.id);
23465
23478
  const queue = promptQueues.get(sessionID);
23466
23479
  if (!queue) {
23467
23480
  return;
@@ -23491,6 +23504,7 @@ async function drainPromptQueue(sessionID, awaitedEntry) {
23491
23504
  promptQueueDraining.add(sessionID);
23492
23505
  clearPromptQueueTimer(sessionID);
23493
23506
  let awaitedResult;
23507
+ const deferredRetryIds = new Set;
23494
23508
  try {
23495
23509
  while (true) {
23496
23510
  const queue = promptQueues.get(sessionID);
@@ -23498,6 +23512,20 @@ async function drainPromptQueue(sessionID, awaitedEntry) {
23498
23512
  if (!entry) {
23499
23513
  break;
23500
23514
  }
23515
+ const retryState = promptQueueRetryStates.get(entry.id);
23516
+ if (entry.durableRetry && retryState?.retryAfter !== undefined && retryState.retryAfter > Date.now()) {
23517
+ if (deferredRetryIds.has(entry.id)) {
23518
+ const nextRetryAt = Math.min(...queue.flatMap((queued) => {
23519
+ const retryAfter = promptQueueRetryStates.get(queued.id)?.retryAfter;
23520
+ return retryAfter === undefined ? [] : [retryAfter];
23521
+ }));
23522
+ schedulePromptQueueDrain(sessionID, nextRetryAt - Date.now());
23523
+ break;
23524
+ }
23525
+ deferredRetryIds.add(entry.id);
23526
+ setPromptQueue(sessionID, [...queue.slice(1), entry]);
23527
+ continue;
23528
+ }
23501
23529
  promptQueueInFlight.set(sessionID, entry);
23502
23530
  const result = await dispatchAfterSessionIdle({
23503
23531
  sessionName: entry.sessionName,
@@ -23513,12 +23541,45 @@ async function drainPromptQueue(sessionID, awaitedEntry) {
23513
23541
  checkStatus: entry.checkStatus,
23514
23542
  checkToolState: entry.checkToolState,
23515
23543
  shouldDispatch: entry.shouldDispatch,
23544
+ retryDispatchFailure: entry.retryDispatchFailure,
23516
23545
  dispatch: entry.dispatch
23517
23546
  });
23518
23547
  if (promptQueueInFlight.get(sessionID)?.id === entry.id) {
23519
23548
  promptQueueInFlight.delete(sessionID);
23520
23549
  }
23521
- if (result.status === "active" || result.status === "reserved") {
23550
+ const retryableQueuedFailure = result.status === "failed" && (!result.dispatchAttempted || result.queueRetryable === true);
23551
+ if (retryableQueuedFailure) {
23552
+ const failureCount = (promptQueueRetryStates.get(entry.id)?.failureCount ?? 0) + 1;
23553
+ if (entry.durableRetry) {
23554
+ const exponentialBackoffMs = entry.queueRetryMs * 2 ** Math.min(failureCount, 7);
23555
+ const retryDelayMs = Math.max(entry.postDispatchHoldMs, Math.min(exponentialBackoffMs, MAX_DURABLE_RETRY_BACKOFF_MS));
23556
+ promptQueueRetryStates.set(entry.id, {
23557
+ failureCount,
23558
+ retryAfter: Date.now() + retryDelayMs
23559
+ });
23560
+ const currentQueue = promptQueues.get(sessionID);
23561
+ if (currentQueue && currentQueue.length > 1) {
23562
+ setPromptQueue(sessionID, [...currentQueue.slice(1), entry]);
23563
+ continue;
23564
+ }
23565
+ schedulePromptQueueDrain(sessionID, retryDelayMs);
23566
+ break;
23567
+ }
23568
+ if (failureCount >= MAX_QUEUED_RETRYABLE_FAILURES) {
23569
+ log("[prompt-async-gate] dropping queued prompt after repeated retryable failures", {
23570
+ sessionID,
23571
+ source: entry.source,
23572
+ failureCount
23573
+ });
23574
+ removePromptQueueEntry(sessionID, entry);
23575
+ if (awaitedEntry?.id === entry.id) {
23576
+ awaitedResult = result;
23577
+ }
23578
+ continue;
23579
+ }
23580
+ promptQueueRetryStates.set(entry.id, { failureCount });
23581
+ }
23582
+ if (result.status === "active" || result.status === "reserved" || retryableQueuedFailure) {
23522
23583
  const queued = queuedResult(entry, 1, result.status === "reserved" ? result.reservedBy : entry.source);
23523
23584
  if (awaitedEntry?.id === entry.id) {
23524
23585
  awaitedResult = queued;
@@ -23579,7 +23640,7 @@ async function enqueueInternalPrompt(entry) {
23579
23640
  const result = await drainPromptQueue(entry.sessionID, entry);
23580
23641
  return result ?? queuedResult(entry, 1);
23581
23642
  }
23582
- var promptQueues, promptQueueDraining, promptQueueInFlight, promptQueueTimers, promptQueueSequence = 0;
23643
+ var promptQueues, promptQueueDraining, promptQueueInFlight, promptQueueTimers, promptQueueRetryStates, MAX_QUEUED_RETRYABLE_FAILURES = 3, MAX_DURABLE_RETRY_BACKOFF_MS = 30000, promptQueueSequence = 0;
23583
23644
  var init_queue = __esm(() => {
23584
23645
  init_session_idle_dispatch();
23585
23646
  init_reservations();
@@ -23587,6 +23648,7 @@ var init_queue = __esm(() => {
23587
23648
  promptQueueDraining = new Set;
23588
23649
  promptQueueInFlight = new Map;
23589
23650
  promptQueueTimers = new Map;
23651
+ promptQueueRetryStates = new Map;
23590
23652
  setExpiredReservationHandler((sessionID) => {
23591
23653
  schedulePromptQueueDrain(sessionID, 0);
23592
23654
  });
@@ -23834,6 +23896,7 @@ async function dispatchInternalPrompt(args) {
23834
23896
  checkStatus: args.checkStatus !== false,
23835
23897
  checkToolState: args.checkToolState !== false,
23836
23898
  shouldDispatch: args.shouldDispatch,
23899
+ retryDispatchFailure: args.retryDispatchFailure,
23837
23900
  dispatch: (dispatchInput) => dispatchWithPathCompatibility(dispatch, dispatchInput)
23838
23901
  });
23839
23902
  if (deferResult.status === "failed" && resolved.route === "live" && deferResult.error instanceof Error && deferResult.error.message.startsWith(dispatchTimeoutPrefix)) {
@@ -23861,7 +23924,9 @@ async function dispatchInternalPrompt(args) {
23861
23924
  queueRetryMs,
23862
23925
  checkStatus: args.checkStatus !== false,
23863
23926
  checkToolState: args.checkToolState !== false,
23927
+ durableRetry: args.durableRetry === true,
23864
23928
  shouldDispatch: args.shouldDispatch,
23929
+ retryDispatchFailure: args.retryDispatchFailure,
23865
23930
  dispatch: async (_dispatchInput) => dispatchWithPathCompatibility(dispatch, input)
23866
23931
  });
23867
23932
  }
@@ -23883,6 +23948,7 @@ async function dispatchInternalPrompt(args) {
23883
23948
  checkStatus: args.checkStatus !== false,
23884
23949
  checkToolState: args.checkToolState !== false,
23885
23950
  shouldDispatch: args.shouldDispatch,
23951
+ retryDispatchFailure: args.retryDispatchFailure,
23886
23952
  dispatch: (dispatchInput) => dispatchWithPathCompatibility(dispatch, dispatchInput)
23887
23953
  });
23888
23954
  if (directResult.status === "failed" && resolved.route === "live" && directResult.error instanceof Error && directResult.error.message.startsWith(dispatchTimeoutPrefix)) {
@@ -83791,7 +83857,17 @@ function isPreSendConnectionFailure2(error51) {
83791
83857
  if (error51.name === "AbortError") {
83792
83858
  return false;
83793
83859
  }
83794
- const CONNECTION_CODES = new Set(["ECONNREFUSED", "ENOTFOUND", "EAI_AGAIN"]);
83860
+ const CONNECTION_CODES = new Set([
83861
+ "ECONNREFUSED",
83862
+ "ENOTFOUND",
83863
+ "EAI_AGAIN",
83864
+ "ENETUNREACH",
83865
+ "EHOSTUNREACH",
83866
+ "ENETDOWN",
83867
+ "EHOSTDOWN",
83868
+ "EADDRNOTAVAIL",
83869
+ "UND_ERR_CONNECT_TIMEOUT"
83870
+ ]);
83795
83871
  const self = error51;
83796
83872
  if (self.code && CONNECTION_CODES.has(self.code)) {
83797
83873
  return true;
@@ -83803,12 +83879,6 @@ function isPreSendConnectionFailure2(error51) {
83803
83879
  return true;
83804
83880
  }
83805
83881
  }
83806
- if (error51 instanceof TypeError) {
83807
- const msg = error51.message;
83808
- if (msg.includes("fetch failed") || msg.includes("Unable to connect")) {
83809
- return true;
83810
- }
83811
- }
83812
83882
  return false;
83813
83883
  }
83814
83884
  function markLiveRouteUnavailable2(reason) {
@@ -94376,7 +94446,7 @@ var package_default2;
94376
94446
  var init_package2 = __esm(() => {
94377
94447
  package_default2 = {
94378
94448
  name: "@oh-my-opencode/omo-codex",
94379
- version: "5.0.0-beta.24",
94449
+ version: "5.0.0-beta.26",
94380
94450
  type: "module",
94381
94451
  private: true,
94382
94452
  description: "Codex harness adapter for oh-my-openagent. Vendored Codex plugin namespace (omo) + TypeScript installer + telemetry.",
@@ -0,0 +1,15 @@
1
+ import type { TeamModeConfig } from "../../../config/schema/team-mode";
2
+ import type { RuntimeState } from "@oh-my-opencode/team-core/types";
3
+ import type { LiveDeliveryClient } from "./messaging-live-delivery-client";
4
+ type RuntimeMember = RuntimeState["members"][number];
5
+ export declare function enqueueFallbackMailboxWake(input: {
6
+ readonly client: LiveDeliveryClient;
7
+ readonly recipientMember: RuntimeMember;
8
+ readonly recipientSessionId: string;
9
+ readonly directory: string;
10
+ readonly teamRunId: string;
11
+ readonly recipientName: string;
12
+ readonly messageId: string;
13
+ readonly config: TeamModeConfig;
14
+ }): Promise<void>;
15
+ export {};