oh-my-codex 0.21.2 → 0.21.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.
Files changed (110) hide show
  1. package/Cargo.toml +1 -1
  2. package/LICENSE +21 -0
  3. package/README.md +2 -1
  4. package/crates/omx-sparkshell/src/codex_bridge.rs +2 -2
  5. package/crates/omx-sparkshell/tests/execution.rs +49 -36
  6. package/dist/agents/__tests__/definitions.test.js +5 -3
  7. package/dist/agents/__tests__/definitions.test.js.map +1 -1
  8. package/dist/agents/__tests__/native-config.test.js +68 -11
  9. package/dist/agents/__tests__/native-config.test.js.map +1 -1
  10. package/dist/agents/definitions.d.ts +1 -1
  11. package/dist/agents/definitions.d.ts.map +1 -1
  12. package/dist/agents/definitions.js +3 -3
  13. package/dist/agents/definitions.js.map +1 -1
  14. package/dist/agents/native-config.d.ts +1 -1
  15. package/dist/agents/native-config.d.ts.map +1 -1
  16. package/dist/agents/native-config.js +1 -1
  17. package/dist/agents/native-config.js.map +1 -1
  18. package/dist/autopilot/__tests__/planner-routing.test.js +12 -2
  19. package/dist/autopilot/__tests__/planner-routing.test.js.map +1 -1
  20. package/dist/autopilot/planner-routing.d.ts.map +1 -1
  21. package/dist/autopilot/planner-routing.js +2 -2
  22. package/dist/autopilot/planner-routing.js.map +1 -1
  23. package/dist/cli/__tests__/agents.test.js +1 -1
  24. package/dist/cli/__tests__/agents.test.js.map +1 -1
  25. package/dist/cli/__tests__/auth.test.js +1 -1
  26. package/dist/cli/__tests__/doctor-spark-routing.test.js +1 -1
  27. package/dist/cli/__tests__/doctor-spark-routing.test.js.map +1 -1
  28. package/dist/cli/__tests__/index.test.js +21 -2
  29. package/dist/cli/__tests__/index.test.js.map +1 -1
  30. package/dist/cli/__tests__/setup-install-mode.test.js +68 -0
  31. package/dist/cli/__tests__/setup-install-mode.test.js.map +1 -1
  32. package/dist/cli/__tests__/setup-refresh.test.js +7 -6
  33. package/dist/cli/__tests__/setup-refresh.test.js.map +1 -1
  34. package/dist/cli/agents.d.ts.map +1 -1
  35. package/dist/cli/agents.js +2 -1
  36. package/dist/cli/agents.js.map +1 -1
  37. package/dist/cli/auth.d.ts.map +1 -1
  38. package/dist/cli/auth.js +2 -1
  39. package/dist/cli/auth.js.map +1 -1
  40. package/dist/cli/index.d.ts +6 -2
  41. package/dist/cli/index.d.ts.map +1 -1
  42. package/dist/cli/index.js +33 -5
  43. package/dist/cli/index.js.map +1 -1
  44. package/dist/cli/setup.d.ts.map +1 -1
  45. package/dist/cli/setup.js +4 -1
  46. package/dist/cli/setup.js.map +1 -1
  47. package/dist/config/__tests__/generator-notify.test.js +4 -3
  48. package/dist/config/__tests__/generator-notify.test.js.map +1 -1
  49. package/dist/config/__tests__/models.test.js +9 -3
  50. package/dist/config/__tests__/models.test.js.map +1 -1
  51. package/dist/config/generator.d.ts +1 -1
  52. package/dist/config/models.d.ts +6 -6
  53. package/dist/config/models.d.ts.map +1 -1
  54. package/dist/config/models.js +5 -5
  55. package/dist/config/models.js.map +1 -1
  56. package/dist/hooks/__tests__/keyword-detector.test.js +2 -2
  57. package/dist/scripts/notify-hook/team-leader-nudge.d.ts.map +1 -1
  58. package/dist/scripts/notify-hook/team-leader-nudge.js +6 -2
  59. package/dist/scripts/notify-hook/team-leader-nudge.js.map +1 -1
  60. package/dist/scripts/notify-hook/team-worker-stop.d.ts.map +1 -1
  61. package/dist/scripts/notify-hook/team-worker-stop.js +6 -2
  62. package/dist/scripts/notify-hook/team-worker-stop.js.map +1 -1
  63. package/dist/scripts/notify-hook/team-worker.d.ts.map +1 -1
  64. package/dist/scripts/notify-hook/team-worker.js +10 -2
  65. package/dist/scripts/notify-hook/team-worker.js.map +1 -1
  66. package/dist/team/__tests__/delegation-policy.test.js +2 -2
  67. package/dist/team/__tests__/delegation-policy.test.js.map +1 -1
  68. package/dist/team/__tests__/model-contract.test.js +10 -10
  69. package/dist/team/__tests__/model-contract.test.js.map +1 -1
  70. package/dist/team/__tests__/notice-ledger.test.js +66 -5
  71. package/dist/team/__tests__/notice-ledger.test.js.map +1 -1
  72. package/dist/team/__tests__/runtime.test.js +97 -15
  73. package/dist/team/__tests__/runtime.test.js.map +1 -1
  74. package/dist/team/__tests__/shutdown-fallback.test.js +11 -1
  75. package/dist/team/__tests__/shutdown-fallback.test.js.map +1 -1
  76. package/dist/team/__tests__/state.test.js +195 -2
  77. package/dist/team/__tests__/state.test.js.map +1 -1
  78. package/dist/team/__tests__/team-ops-contract.test.js +1 -0
  79. package/dist/team/__tests__/team-ops-contract.test.js.map +1 -1
  80. package/dist/team/__tests__/worker-runtime-identity.test.js +14 -4
  81. package/dist/team/__tests__/worker-runtime-identity.test.js.map +1 -1
  82. package/dist/team/mcp-comm.d.ts.map +1 -1
  83. package/dist/team/mcp-comm.js +130 -125
  84. package/dist/team/mcp-comm.js.map +1 -1
  85. package/dist/team/model-contract.d.ts +1 -1
  86. package/dist/team/model-contract.d.ts.map +1 -1
  87. package/dist/team/notice-ledger.d.ts +5 -0
  88. package/dist/team/notice-ledger.d.ts.map +1 -1
  89. package/dist/team/notice-ledger.js +82 -4
  90. package/dist/team/notice-ledger.js.map +1 -1
  91. package/dist/team/runtime.d.ts.map +1 -1
  92. package/dist/team/runtime.js +44 -13
  93. package/dist/team/runtime.js.map +1 -1
  94. package/dist/team/state/mailbox.js +22 -22
  95. package/dist/team/state/mailbox.js.map +1 -1
  96. package/dist/team/state.d.ts +2 -0
  97. package/dist/team/state.d.ts.map +1 -1
  98. package/dist/team/state.js +100 -4
  99. package/dist/team/state.js.map +1 -1
  100. package/dist/team/team-ops.d.ts +1 -0
  101. package/dist/team/team-ops.d.ts.map +1 -1
  102. package/dist/team/team-ops.js +1 -0
  103. package/dist/team/team-ops.js.map +1 -1
  104. package/dist/utils/__tests__/agents-model-table.test.js +13 -10
  105. package/dist/utils/__tests__/agents-model-table.test.js.map +1 -1
  106. package/package.json +1 -1
  107. package/plugins/oh-my-codex/.codex-plugin/plugin.json +1 -1
  108. package/src/scripts/notify-hook/team-leader-nudge.ts +6 -2
  109. package/src/scripts/notify-hook/team-worker-stop.ts +6 -2
  110. package/src/scripts/notify-hook/team-worker.ts +10 -2
package/dist/cli/index.js CHANGED
@@ -176,7 +176,7 @@ Options:
176
176
  (shorthand for: -c model_reasoning_effort="xhigh")
177
177
  --madmax DANGEROUS: bypass Codex approvals and sandbox
178
178
  (alias for --dangerously-bypass-approvals-and-sandbox)
179
- --spark Use the Codex spark model (~1.3x faster) for team workers only
179
+ --spark Use the configured spark-lane model for team workers only
180
180
  Workers get the configured low-complexity team model; leader model unchanged
181
181
  --madmax-spark spark model for workers + bypass approvals for leader and workers
182
182
  (shorthand for: --spark --madmax)
@@ -2438,10 +2438,38 @@ export function registerDetachedHudLayoutReconcileHook(options) {
2438
2438
  env: buildDetachedHudHookEnv(options.baseEnv ?? process.env, options.sessionId, detachedLeaderPaneId, tmuxEnvValue, options.omxBin, options.omxRootOverride),
2439
2439
  });
2440
2440
  }
2441
- export const DETACHED_TMUX_HISTORY_LIMIT = 500;
2441
+ // #3611: this clamp bounds tmux scrollback memory for detached leader sessions,
2442
+ // but it also decides how much assistant output survives in the pane. At 500
2443
+ // lines a long session drops multi-line responses out of scrollback while the
2444
+ // session still holds them (`/copy` returns the whole response), which reads as
2445
+ // "the response was cut to one line". Keep the clamp, but at a size that holds a
2446
+ // realistic transcript, and let operators override it.
2447
+ export const DETACHED_TMUX_HISTORY_LIMIT = 5000;
2448
+ export const DETACHED_TMUX_HISTORY_LIMIT_MIN = 500;
2449
+ export const DETACHED_TMUX_HISTORY_LIMIT_MAX = 200_000;
2450
+ export const DETACHED_TMUX_HISTORY_LIMIT_ENV = "OMX_TMUX_HISTORY_LIMIT";
2442
2451
  const TMUX_HOOK_INDEX_MAX = 1_000_000;
2452
+ // Resolves the scrollback clamp applied to OMX-owned tmux leader sessions.
2453
+ // Invalid, non-integer, or out-of-range overrides fall back to the default so a
2454
+ // typo can never silently shrink a user's transcript to nothing.
2455
+ export function resolveDetachedTmuxHistoryLimit(env = process.env) {
2456
+ const raw = env[DETACHED_TMUX_HISTORY_LIMIT_ENV];
2457
+ if (raw === undefined)
2458
+ return DETACHED_TMUX_HISTORY_LIMIT;
2459
+ const trimmed = raw.trim();
2460
+ if (!/^[0-9]+$/.test(trimmed))
2461
+ return DETACHED_TMUX_HISTORY_LIMIT;
2462
+ const parsed = Number.parseInt(trimmed, 10);
2463
+ if (!Number.isSafeInteger(parsed))
2464
+ return DETACHED_TMUX_HISTORY_LIMIT;
2465
+ if (parsed < DETACHED_TMUX_HISTORY_LIMIT_MIN)
2466
+ return DETACHED_TMUX_HISTORY_LIMIT_MIN;
2467
+ if (parsed > DETACHED_TMUX_HISTORY_LIMIT_MAX)
2468
+ return DETACHED_TMUX_HISTORY_LIMIT_MAX;
2469
+ return parsed;
2470
+ }
2443
2471
  function setDetachedTmuxSessionHistoryLimit(sessionName, leaderPaneId) {
2444
- const boundedHistoryLimit = String(DETACHED_TMUX_HISTORY_LIMIT);
2472
+ const boundedHistoryLimit = String(resolveDetachedTmuxHistoryLimit());
2445
2473
  try {
2446
2474
  execTmuxFileSync(["set-option", "-q", "-t", sessionName, "history-limit", boundedHistoryLimit], { stdio: "ignore" });
2447
2475
  }
@@ -6316,8 +6344,8 @@ async function runCodex(cwd, args, sessionId, workerDefaultModel, codexHomeOverr
6316
6344
  // evaluation sees it. Retrying this idempotent first owner-guarded
6317
6345
  // mutation once gives the server a command boundary without relaxing
6318
6346
  // any part of the captured session, window, pane, PID, or owner fence.
6319
- runDetachedLeaderMutation(authority, ["set-option", "-q", "-t", authority.sessionName, "history-limit", String(DETACHED_TMUX_HISTORY_LIMIT)], true, true);
6320
- runDetachedLeaderMutation(authority, ["set-option", "-pq", "-t", authority.paneId, "history-limit", String(DETACHED_TMUX_HISTORY_LIMIT)]);
6347
+ runDetachedLeaderMutation(authority, ["set-option", "-q", "-t", authority.sessionName, "history-limit", String(resolveDetachedTmuxHistoryLimit())], true, true);
6348
+ runDetachedLeaderMutation(authority, ["set-option", "-pq", "-t", authority.paneId, "history-limit", String(resolveDetachedTmuxHistoryLimit())]);
6321
6349
  // #3266: the owned leader pane must close with its process so a normal
6322
6350
  // child exit destroys the session naturally even when the user's tmux
6323
6351
  // config inherits remain-on-exit=on/failed.