@gakim-digital/dexter-bridge 0.11.21 → 0.11.23

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gakim-digital/dexter-bridge",
3
- "version": "0.11.21",
3
+ "version": "0.11.23",
4
4
  "description": "Local bridge for InstaWebAI and Dexter — runs Codex, Claude Code, or OpenCode on your machine.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/agent.js CHANGED
@@ -1532,6 +1532,8 @@ function controlCancellationSource(response) {
1532
1532
  return 'unknown';
1533
1533
  }
1534
1534
 
1535
+ const MAX_OUTCOME_DURATION_MS = 24 * 60 * 60 * 1000;
1536
+
1535
1537
  function boundedDurationMs(value, fallback, minimum = 10, maximum = 60 * 60 * 1000) {
1536
1538
  const parsed = Number(value);
1537
1539
  if (!Number.isFinite(parsed)) return fallback;
@@ -2361,12 +2363,15 @@ async function executeOutcomeRun(run, send, agent, options = {}) {
2361
2363
  ? requestedModel.trim()
2362
2364
  : definition.model
2363
2365
  );
2366
+ // Dexter owns the run limit (a 2-hour safety limit for local runs), so it is
2367
+ // not clamped here; the inactivity timeout below is the stall guard.
2364
2368
  const outcomeMaxDurationMs = boundedDurationMs(
2365
2369
  run?.outcome?.maxDurationMs
2366
2370
  ?? options.maxDurationMs
2367
2371
  ?? options.env?.DEXTER_BRIDGE_AGENT_MAX_DURATION_MS,
2368
2372
  20 * 60_000,
2369
2373
  1_000,
2374
+ MAX_OUTCOME_DURATION_MS,
2370
2375
  );
2371
2376
  const outcomeInactivityTimeoutMs = Math.min(
2372
2377
  outcomeMaxDurationMs,
@@ -239,6 +239,10 @@ export const CODEX_APP_SERVER_METHODS = {
239
239
  skillsExtraRootsSet: 'skills/extraRoots/set',
240
240
  };
241
241
 
242
+ // The first thread in a freshly woken hosted container loads Codex auth and
243
+ // config over the network and has taken longer than 30s.
244
+ const THREAD_START_TIMEOUT_MS = 90_000;
245
+
242
246
  export const CODEX_APP_SERVER_NOTIFICATIONS = {
243
247
  loginCompleted: 'account/login/completed',
244
248
  itemStarted: 'item/started',
@@ -1240,7 +1244,7 @@ export function createCodexAppServerAdapter({
1240
1244
  ...(model ? { model } : {}),
1241
1245
  modelProvider: params.modelProvider,
1242
1246
  },
1243
- { timeoutMs: 30000 },
1247
+ { timeoutMs: THREAD_START_TIMEOUT_MS },
1244
1248
  );
1245
1249
  } catch {
1246
1250
  response = null;
@@ -1248,7 +1252,7 @@ export function createCodexAppServerAdapter({
1248
1252
  }
1249
1253
  if (!response) {
1250
1254
  response = await active.request(CODEX_APP_SERVER_METHODS.threadStart, params, {
1251
- timeoutMs: 30000,
1255
+ timeoutMs: THREAD_START_TIMEOUT_MS,
1252
1256
  });
1253
1257
  }
1254
1258
  const threadId = response?.thread?.id || response?.threadId || response?.id;