negotium 0.22.6 → 0.22.7

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 (70) hide show
  1. package/dist/agent-helpers.js +1349 -410
  2. package/dist/agent-helpers.js.map +7 -7
  3. package/dist/background-bash.js +12 -12
  4. package/dist/background-bash.js.map +2 -2
  5. package/dist/browser-runtime.js +81 -52
  6. package/dist/browser-runtime.js.map +4 -4
  7. package/dist/canonical-mcp-bridge.js +9 -8
  8. package/dist/canonical-mcp-bridge.js.map +1 -1
  9. package/dist/{chunk-e59kzyvy.js → chunk-1gznvrth.js} +5 -4
  10. package/dist/{chunk-e59kzyvy.js.map → chunk-1gznvrth.js.map} +2 -2
  11. package/dist/chunk-2mx7fq49.js +6 -0
  12. package/dist/{chunk-bnyvxss3.js.map → chunk-2mx7fq49.js.map} +1 -1
  13. package/dist/{chunk-1mba9m1j.js → chunk-9zn0bkc9.js} +116 -77
  14. package/dist/{chunk-1mba9m1j.js.map → chunk-9zn0bkc9.js.map} +2 -2
  15. package/dist/{chunk-ww8a4ej4.js → chunk-f7p0h1gs.js} +5 -5
  16. package/dist/{chunk-ww8a4ej4.js.map → chunk-f7p0h1gs.js.map} +2 -2
  17. package/dist/{chunk-9a50csg6.js → chunk-pr8p6pap.js} +125 -116
  18. package/dist/{chunk-9a50csg6.js.map → chunk-pr8p6pap.js.map} +7 -7
  19. package/dist/chunk-q5djsg78.js +200 -0
  20. package/dist/chunk-q5djsg78.js.map +9 -0
  21. package/dist/{chunk-1e0nxy7p.js → chunk-z4r7tt2p.js} +12 -12
  22. package/dist/{chunk-1e0nxy7p.js.map → chunk-z4r7tt2p.js.map} +2 -2
  23. package/dist/hosted-agent.js +128 -120
  24. package/dist/hosted-agent.js.map +4 -4
  25. package/dist/main.js +5174 -3278
  26. package/dist/main.js.map +9 -9
  27. package/dist/mcp-catalog.js +4 -4
  28. package/dist/mcp-catalog.js.map +1 -1
  29. package/dist/mcp-factories.js +1563 -632
  30. package/dist/mcp-factories.js.map +7 -7
  31. package/dist/mcp-servers.js +5 -5
  32. package/dist/mcp-servers.js.map +1 -1
  33. package/dist/media.js +3 -3
  34. package/dist/media.js.map +1 -1
  35. package/dist/outbox.js +15 -15
  36. package/dist/outbox.js.map +2 -2
  37. package/dist/platform-runtime.js +7 -7
  38. package/dist/platform-runtime.js.map +1 -1
  39. package/dist/prompts.js +6 -6
  40. package/dist/prompts.js.map +2 -2
  41. package/dist/query-runtime.js +18 -16
  42. package/dist/query-runtime.js.map +2 -2
  43. package/dist/registry.js +20 -19
  44. package/dist/registry.js.map +2 -2
  45. package/dist/rollout.js +41 -41
  46. package/dist/rollout.js.map +2 -2
  47. package/dist/runtime/src/platform/playwright/manager.ts +77 -15
  48. package/dist/runtime/src/storage/api-topics.ts +6 -0
  49. package/dist/runtime/src/storage/browser-profiles.ts +18 -0
  50. package/dist/runtime/src/topics/lifecycle.ts +2 -5
  51. package/dist/runtime/src/topics/update.ts +17 -0
  52. package/dist/runtime/src/types/api.ts +6 -0
  53. package/dist/runtime/src/version.ts +1 -1
  54. package/dist/runtime-gateway.js +12 -12
  55. package/dist/runtime-gateway.js.map +2 -2
  56. package/dist/runtime-helpers.js +54 -52
  57. package/dist/runtime-helpers.js.map +2 -2
  58. package/dist/sqlite.js +5 -3
  59. package/dist/sqlite.js.map +2 -2
  60. package/dist/storage.js +640 -664
  61. package/dist/storage.js.map +3 -3
  62. package/dist/types/packages/core/src/platform/playwright/manager.d.ts +8 -0
  63. package/dist/types/packages/core/src/storage/api-topics.d.ts +1 -0
  64. package/dist/types/packages/core/src/storage/browser-profiles.d.ts +4 -0
  65. package/dist/types/packages/core/src/types/api.d.ts +6 -0
  66. package/dist/types/packages/core/src/version.d.ts +1 -1
  67. package/dist/vault.js +22 -20
  68. package/dist/vault.js.map +2 -2
  69. package/package.json +1 -1
  70. package/dist/chunk-bnyvxss3.js +0 -77
@@ -1,4 +1,6 @@
1
1
  // @bun
2
+ var __require = import.meta.require;
3
+
2
4
  // ../../packages/core/src/agents/rollout/shared.ts
3
5
  import { mkdirSync as mkdirSync2 } from "fs";
4
6
  import { resolve as resolve3 } from "path";
@@ -387,7 +389,7 @@ var trustedWorkspaceRoots = [
387
389
  SESSION_WORKSPACE_DIR,
388
390
  TOPIC_WORKSPACE_DIR
389
391
  ].map((root) => resolve3(root));
390
- function configureRolloutHost2(options) {
392
+ function configureRolloutHost(options) {
391
393
  if (!options.workspaceRoots && !options.fixturesDir) {
392
394
  throw new Error("configureRolloutHost requires workspaceRoots or fixturesDir");
393
395
  }
@@ -439,7 +441,7 @@ function truncate(text, n) {
439
441
  const cps = Array.from(text);
440
442
  return cps.length > n ? `${cps.slice(0, n).join("")}\u2026` : text;
441
443
  }
442
- function extractChatPairs2(entries, opts = { includeToolAnnotations: true }) {
444
+ function extractChatPairs(entries, opts = { includeToolAnnotations: true }) {
443
445
  const pairs = [];
444
446
  let pendingUsers = [];
445
447
  let pendingBatchSize = null;
@@ -543,91 +545,9 @@ ${toolBuffer.join(`
543
545
  return pairs;
544
546
  }
545
547
 
546
- // ../../packages/core/src/platform/jsonl.ts
547
- import {
548
- appendFileSync,
549
- closeSync,
550
- fsyncSync,
551
- mkdirSync as mkdirSync3,
552
- openSync,
553
- readFileSync as readFileSync2,
554
- renameSync,
555
- statSync,
556
- unlinkSync as unlinkSync2,
557
- writeFileSync as writeFileSync2
558
- } from "fs";
559
- import { dirname as dirname3 } from "path";
560
-
561
- // ../../packages/core/src/platform/file-utils.ts
562
- import { unlinkSync } from "fs";
563
- function createSafeUnlink(host) {
564
- return (path, warnLabel) => {
565
- try {
566
- host.unlink(path);
567
- } catch (e) {
568
- if (e?.code === "ENOENT")
569
- return;
570
- if (warnLabel)
571
- host.warn({ err: e, path }, warnLabel);
572
- }
573
- };
574
- }
575
- var defaultSafeUnlink = createSafeUnlink({
576
- unlink: unlinkSync,
577
- warn: (context, message) => logger.warn(context, message)
578
- });
579
-
580
- // ../../packages/core/src/platform/jsonl.ts
581
- function parseJsonlText(raw) {
582
- return raw.trim().split(`
583
- `).filter(Boolean).map((line) => JSON.parse(line));
584
- }
585
- var LOCK_SLEEP = new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT));
586
- function writeJsonlFile(filePath, entries) {
587
- const dir = dirname3(filePath);
588
- mkdirSync3(dir, { recursive: true });
589
- const tmpPath = `${filePath}.tmp-${process.pid}-${Date.now()}-${Math.random().toString(16).slice(2)}`;
590
- const payload = `${entries.map((e) => JSON.stringify(e)).join(`
591
- `)}
592
- `;
593
- let fd = null;
594
- try {
595
- fd = openSync(tmpPath, "w");
596
- writeFileSync2(fd, payload);
597
- fsyncSync(fd);
598
- closeSync(fd);
599
- fd = null;
600
- renameSync(tmpPath, filePath);
601
- fsyncDirectoryBestEffort(dir);
602
- } catch (err) {
603
- if (fd !== null) {
604
- try {
605
- closeSync(fd);
606
- } catch {}
607
- }
608
- try {
609
- unlinkSync2(tmpPath);
610
- } catch {}
611
- throw err;
612
- }
613
- }
614
- function fsyncDirectoryBestEffort(dir) {
615
- let fd = null;
616
- try {
617
- fd = openSync(dir, "r");
618
- fsyncSync(fd);
619
- } catch {} finally {
620
- if (fd !== null) {
621
- try {
622
- closeSync(fd);
623
- } catch {}
624
- }
625
- }
626
- }
627
-
628
548
  // ../../packages/core/src/agents/execution-host.ts
629
549
  import { AsyncLocalStorage } from "async_hooks";
630
- import { dirname as dirname5 } from "path";
550
+ import { dirname as dirname4 } from "path";
631
551
 
632
552
  // ../../packages/core/src/security/sensitive-path.ts
633
553
  import { realpathSync as realpathSync2 } from "fs";
@@ -1285,12 +1205,12 @@ function createBackgroundBashManager(options = {}) {
1285
1205
  usedPorts.clear();
1286
1206
  knownContexts.clear();
1287
1207
  const deadline = now() + 3000;
1288
- await Promise.all(entries.map((instance) => new Promise((resolve) => {
1208
+ await Promise.all(entries.map((instance) => new Promise((resolve5) => {
1289
1209
  if (instance.process.exitCode !== null || instance.process.killed)
1290
- return resolve();
1291
- instance.process.once("exit", resolve);
1292
- instance.process.once("error", resolve);
1293
- const timer = setTimeout(resolve, Math.max(0, deadline - now()));
1210
+ return resolve5();
1211
+ instance.process.once("exit", resolve5);
1212
+ instance.process.once("error", resolve5);
1213
+ const timer = setTimeout(resolve5, Math.max(0, deadline - now()));
1294
1214
  timer.unref?.();
1295
1215
  })));
1296
1216
  }
@@ -1385,9 +1305,9 @@ var RESERVED_TOPIC_NAMES = new Set([
1385
1305
  var GENERAL_TOPIC_ID = "general";
1386
1306
 
1387
1307
  // ../../packages/core/src/storage/storage-host.ts
1388
- import { mkdirSync as mkdirSync4 } from "fs";
1308
+ import { mkdirSync as mkdirSync3 } from "fs";
1389
1309
  import { homedir as homedir2 } from "os";
1390
- import { dirname as dirname4, join as join2, resolve as resolve5 } from "path";
1310
+ import { dirname as dirname3, join as join2, resolve as resolve5 } from "path";
1391
1311
 
1392
1312
  // ../../packages/core/src/storage/sqlite.ts
1393
1313
  var isBun = typeof process.versions.bun === "string";
@@ -1522,7 +1442,7 @@ function defaultDatabase() {
1522
1442
  return state.fallbackDatabase;
1523
1443
  if (state.fallbackDatabase)
1524
1444
  closeDatabase(state.fallbackDatabase);
1525
- mkdirSync4(dirname4(path), { recursive: true });
1445
+ mkdirSync3(dirname3(path), { recursive: true });
1526
1446
  state.fallbackDatabase = new Database(path, { create: true });
1527
1447
  state.fallbackDatabasePath = path;
1528
1448
  initializeDatabase(state.fallbackDatabase);
@@ -1722,7 +1642,7 @@ var SCHEMA_TRIGGERS = {
1722
1642
  };
1723
1643
  var OTIUM_TOPIC_SCOPE_IMMUTABLE_ERROR = "otium_topic_scope_immutable";
1724
1644
  function topicLinkSchemaIsCurrent(database, nodeId) {
1725
- const objects = new Map(database.query("SELECT name, sql FROM sqlite_master WHERE type IN ('table','index','trigger')").all().map((row) => [row.name, row.sql ?? ""]));
1645
+ const objects = new Map(database.query("SELECT name, sql FROM sqlite_master WHERE type IN ('table','index','trigger')").all().map((row2) => [row2.name, row2.sql ?? ""]));
1726
1646
  for (const name of [...SCHEMA_TABLES, ...SCHEMA_INDEXES, ...SCHEMA_INDEXES_TOMBSTONES]) {
1727
1647
  if (!objects.has(name))
1728
1648
  return false;
@@ -1739,7 +1659,7 @@ function topicLinkSchemaIsCurrent(database, nodeId) {
1739
1659
  return false;
1740
1660
  }
1741
1661
  const identity = database.query("SELECT node_id, epoch_id FROM api_node_identity WHERE singleton = 1").all();
1742
- if (identity.some((row) => row.epoch_id === null))
1662
+ if (identity.some((row2) => row2.epoch_id === null))
1743
1663
  return false;
1744
1664
  if (nodeId && identity[0]?.node_id !== nodeId)
1745
1665
  return false;
@@ -2149,6 +2069,7 @@ function initializeApiTopicsSchema() {
2149
2069
  surface_scope TEXT,
2150
2070
  browser_profile TEXT NOT NULL DEFAULT 'default',
2151
2071
  browser_profile_owner TEXT,
2072
+ browser_connect_port INTEGER,
2152
2073
  session_id TEXT,
2153
2074
  CHECK (
2154
2075
  (kind = 'channel' AND response_policy = 'off' AND agent IS NULL) OR
@@ -2266,6 +2187,9 @@ function initializeApiTopicsSchema() {
2266
2187
  if (!tableColumns("api_topics").has("browser_profile_owner")) {
2267
2188
  db.exec("ALTER TABLE api_topics ADD COLUMN browser_profile_owner TEXT");
2268
2189
  }
2190
+ if (!tableColumns("api_topics").has("browser_connect_port")) {
2191
+ db.exec("ALTER TABLE api_topics ADD COLUMN browser_connect_port INTEGER");
2192
+ }
2269
2193
  if (!tableColumns("api_topics").has("subagent_report_mode")) {
2270
2194
  db.exec("ALTER TABLE api_topics ADD COLUMN subagent_report_mode TEXT NOT NULL DEFAULT 'auto'");
2271
2195
  }
@@ -2503,7 +2427,8 @@ function rowToDto(r, participants = getTopicParticipants(r.id), tellTargets) {
2503
2427
  } : {},
2504
2428
  visibility: normalizeTopicVisibility(r.visibility),
2505
2429
  surface: normalizeTopicSurface(r.surface),
2506
- surfaceScope: normalizeSurfaceScope(r.surface_scope)
2430
+ surfaceScope: normalizeSurfaceScope(r.surface_scope),
2431
+ ...r.browser_connect_port != null ? { browserConnectPort: r.browser_connect_port } : {}
2507
2432
  };
2508
2433
  }
2509
2434
  function normalizeTopicVisibility(value) {
@@ -3173,7 +3098,7 @@ function hideProviderIntrospectionForOtium(servers, topicId) {
3173
3098
  }
3174
3099
 
3175
3100
  // ../../packages/core/src/storage/vault.ts
3176
- import { chmodSync as chmodSync2, mkdirSync as mkdirSync5 } from "fs";
3101
+ import { chmodSync as chmodSync2, mkdirSync as mkdirSync4 } from "fs";
3177
3102
  import { join as join3 } from "path";
3178
3103
 
3179
3104
  // ../../packages/core/src/storage/vault-crypto-core.ts
@@ -3267,7 +3192,7 @@ function initializeVaultDatabase(database) {
3267
3192
  function openVaultDatabase(dataDir) {
3268
3193
  const vaultDir = join3(dataDir, "vault");
3269
3194
  const path = join3(vaultDir, "vault.db");
3270
- mkdirSync5(vaultDir, { recursive: true, mode: 448 });
3195
+ mkdirSync4(vaultDir, { recursive: true, mode: 448 });
3271
3196
  const database = new Database(path, { create: true });
3272
3197
  chmodSync2(path, 384);
3273
3198
  initializeVaultDatabase(database);
@@ -3388,13 +3313,97 @@ function hostedCodexAuthFilePath() {
3388
3313
  return activeHost().codexAuthFilePath();
3389
3314
  }
3390
3315
  function hostedCodexHomePath() {
3391
- return dirname5(hostedCodexAuthFilePath());
3316
+ return dirname4(hostedCodexAuthFilePath());
3392
3317
  }
3393
3318
 
3394
3319
  // ../../packages/core/src/agents/rollout/codex.ts
3395
3320
  import { randomBytes as randomBytes4 } from "crypto";
3396
3321
  import { existsSync as existsSync3, readFileSync as readFileSync3, realpathSync as realpathSync3, statSync as statSync2, unlinkSync as unlinkSync3 } from "fs";
3397
3322
  import { basename, dirname as dirname6, join as join4, resolve as resolve6 } from "path";
3323
+
3324
+ // ../../packages/core/src/platform/jsonl.ts
3325
+ import {
3326
+ appendFileSync,
3327
+ closeSync,
3328
+ fsyncSync,
3329
+ mkdirSync as mkdirSync5,
3330
+ openSync,
3331
+ readFileSync as readFileSync2,
3332
+ renameSync,
3333
+ statSync,
3334
+ unlinkSync as unlinkSync2,
3335
+ writeFileSync as writeFileSync2
3336
+ } from "fs";
3337
+ import { dirname as dirname5 } from "path";
3338
+
3339
+ // ../../packages/core/src/platform/file-utils.ts
3340
+ import { unlinkSync } from "fs";
3341
+ function createSafeUnlink(host) {
3342
+ return (path, warnLabel) => {
3343
+ try {
3344
+ host.unlink(path);
3345
+ } catch (e) {
3346
+ if (e?.code === "ENOENT")
3347
+ return;
3348
+ if (warnLabel)
3349
+ host.warn({ err: e, path }, warnLabel);
3350
+ }
3351
+ };
3352
+ }
3353
+ var defaultSafeUnlink = createSafeUnlink({
3354
+ unlink: unlinkSync,
3355
+ warn: (context, message) => logger.warn(context, message)
3356
+ });
3357
+
3358
+ // ../../packages/core/src/platform/jsonl.ts
3359
+ function parseJsonlText(raw) {
3360
+ return raw.trim().split(`
3361
+ `).filter(Boolean).map((line) => JSON.parse(line));
3362
+ }
3363
+ var LOCK_SLEEP = new Int32Array(new SharedArrayBuffer(Int32Array.BYTES_PER_ELEMENT));
3364
+ function writeJsonlFile(filePath, entries) {
3365
+ const dir = dirname5(filePath);
3366
+ mkdirSync5(dir, { recursive: true });
3367
+ const tmpPath = `${filePath}.tmp-${process.pid}-${Date.now()}-${Math.random().toString(16).slice(2)}`;
3368
+ const payload = `${entries.map((e) => JSON.stringify(e)).join(`
3369
+ `)}
3370
+ `;
3371
+ let fd = null;
3372
+ try {
3373
+ fd = openSync(tmpPath, "w");
3374
+ writeFileSync2(fd, payload);
3375
+ fsyncSync(fd);
3376
+ closeSync(fd);
3377
+ fd = null;
3378
+ renameSync(tmpPath, filePath);
3379
+ fsyncDirectoryBestEffort(dir);
3380
+ } catch (err) {
3381
+ if (fd !== null) {
3382
+ try {
3383
+ closeSync(fd);
3384
+ } catch {}
3385
+ }
3386
+ try {
3387
+ unlinkSync2(tmpPath);
3388
+ } catch {}
3389
+ throw err;
3390
+ }
3391
+ }
3392
+ function fsyncDirectoryBestEffort(dir) {
3393
+ let fd = null;
3394
+ try {
3395
+ fd = openSync(dir, "r");
3396
+ fsyncSync(fd);
3397
+ } catch {} finally {
3398
+ if (fd !== null) {
3399
+ try {
3400
+ closeSync(fd);
3401
+ } catch {}
3402
+ }
3403
+ }
3404
+ }
3405
+
3406
+ // ../../packages/core/src/agents/rollout/codex.ts
3398
3407
  function codexSessionsDir() {
3399
3408
  return join4(hostedCodexHomePath(), "sessions");
3400
3409
  }
@@ -3461,7 +3470,7 @@ function patchEnvContext(envContext, cwd, currentDate, timezone) {
3461
3470
  }
3462
3471
  }
3463
3472
  function codexRolloutPath(threadId, fallback) {
3464
- const threadCreatedAt = decodeUuidV7Timestamp2(threadId);
3473
+ const threadCreatedAt = decodeUuidV7Timestamp(threadId);
3465
3474
  const createdAt = threadCreatedAt === null ? fallback : new Date(threadCreatedAt);
3466
3475
  const yyyy = String(createdAt.getFullYear());
3467
3476
  const mm = String(createdAt.getMonth() + 1).padStart(2, "0");
@@ -3533,7 +3542,7 @@ function changedPatchLines(value) {
3533
3542
  `) } : {}
3534
3543
  };
3535
3544
  }
3536
- function extractLatestCodexPatchPreview2(jsonl, expectedPaths, consumedCallIds = new Set, expectedCallId) {
3545
+ function extractLatestCodexPatchPreview(jsonl, expectedPaths, consumedCallIds = new Set, expectedCallId) {
3537
3546
  const expected = expectedPaths.map(canonicalFilePath);
3538
3547
  const lines = jsonl.trimEnd().split(`
3539
3548
  `);
@@ -3570,7 +3579,7 @@ function extractLatestCodexPatchPreview2(jsonl, expectedPaths, consumedCallIds =
3570
3579
  }
3571
3580
  return;
3572
3581
  }
3573
- function extractCodexPatchCallIds2(jsonl) {
3582
+ function extractCodexPatchCallIds(jsonl) {
3574
3583
  const callIds = [];
3575
3584
  for (const line of jsonl.trimEnd().split(`
3576
3585
  `)) {
@@ -3583,29 +3592,29 @@ function extractCodexPatchCallIds2(jsonl) {
3583
3592
  }
3584
3593
  return callIds;
3585
3594
  }
3586
- function readCodexPatchCallIds2(threadId) {
3595
+ function readCodexPatchCallIds(threadId) {
3587
3596
  const path = latestCodexRolloutPath(threadId);
3588
3597
  if (!path)
3589
3598
  return [];
3590
3599
  try {
3591
- return extractCodexPatchCallIds2(readFileSync3(path, "utf8"));
3600
+ return extractCodexPatchCallIds(readFileSync3(path, "utf8"));
3592
3601
  } catch (error) {
3593
3602
  logger.debug({ error, threadId }, "codex patch ids: rollout read failed");
3594
3603
  return [];
3595
3604
  }
3596
3605
  }
3597
- function readLatestCodexPatchPreview2(threadId, expectedPaths, consumedCallIds = new Set, expectedCallId) {
3606
+ function readLatestCodexPatchPreview(threadId, expectedPaths, consumedCallIds = new Set, expectedCallId) {
3598
3607
  const path = latestCodexRolloutPath(threadId);
3599
3608
  if (!path)
3600
3609
  return;
3601
3610
  try {
3602
- return extractLatestCodexPatchPreview2(readFileSync3(path, "utf8"), expectedPaths, consumedCallIds, expectedCallId);
3611
+ return extractLatestCodexPatchPreview(readFileSync3(path, "utf8"), expectedPaths, consumedCallIds, expectedCallId);
3603
3612
  } catch (error) {
3604
3613
  logger.debug({ error, threadId }, "codex patch preview: rollout read failed");
3605
3614
  return;
3606
3615
  }
3607
3616
  }
3608
- function extractLatestCodexContextUsage2(jsonl) {
3617
+ function extractLatestCodexContextUsage(jsonl) {
3609
3618
  const lines = jsonl.trimEnd().split(`
3610
3619
  `);
3611
3620
  for (let index = lines.length - 1;index >= 0; index -= 1) {
@@ -3622,18 +3631,18 @@ function extractLatestCodexContextUsage2(jsonl) {
3622
3631
  }
3623
3632
  return;
3624
3633
  }
3625
- function readLatestCodexContextUsage2(threadId) {
3634
+ function readLatestCodexContextUsage(threadId) {
3626
3635
  const path = latestCodexRolloutPath(threadId);
3627
3636
  if (!path)
3628
3637
  return;
3629
3638
  try {
3630
- return extractLatestCodexContextUsage2(readFileSync3(path, "utf8"));
3639
+ return extractLatestCodexContextUsage(readFileSync3(path, "utf8"));
3631
3640
  } catch (error) {
3632
3641
  logger.debug({ error, threadId }, "codex context usage: rollout read failed");
3633
3642
  return;
3634
3643
  }
3635
3644
  }
3636
- function migrateCodexRolloutNativeMultiAgentMetadata2(threadId) {
3645
+ function migrateCodexRolloutNativeMultiAgentMetadata(threadId) {
3637
3646
  const path = latestCodexRolloutPath(threadId);
3638
3647
  if (!path)
3639
3648
  return false;
@@ -3688,11 +3697,11 @@ function latestCodexRolloutPath(threadId) {
3688
3697
  return;
3689
3698
  }
3690
3699
  }
3691
- function writeCodexRollout2(opts) {
3700
+ function writeCodexRollout(opts) {
3692
3701
  const threadId = opts.threadId ?? uuidv7();
3693
3702
  assertUuidLike("threadId", threadId);
3694
3703
  ensureCwdExists(opts.cwd);
3695
- const pairs = opts.pairs ?? extractChatPairs2(opts.entries ?? []);
3704
+ const pairs = opts.pairs ?? extractChatPairs(opts.entries ?? []);
3696
3705
  const now = new Date;
3697
3706
  const tsIso = now.toISOString();
3698
3707
  const currentDate = [
@@ -3841,7 +3850,7 @@ var MAX_DAY_SPAN = 30;
3841
3850
  var DAY_MS = 86400000;
3842
3851
  var LOCAL_DATE_SKEW_DAYS = 1;
3843
3852
  function candidateDateBuckets(threadId) {
3844
- const tidMs = decodeUuidV7Timestamp2(threadId);
3853
+ const tidMs = decodeUuidV7Timestamp(threadId);
3845
3854
  if (tidMs === null)
3846
3855
  return null;
3847
3856
  const nowMs = Date.now();
@@ -3858,7 +3867,7 @@ function candidateDateBuckets(threadId) {
3858
3867
  }
3859
3868
  return buckets;
3860
3869
  }
3861
- function decodeUuidV7Timestamp2(threadId) {
3870
+ function decodeUuidV7Timestamp(threadId) {
3862
3871
  if (typeof threadId !== "string")
3863
3872
  return null;
3864
3873
  const m = /^([0-9a-fA-F]{8})-([0-9a-fA-F]{4})-7[0-9a-fA-F]{3}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$/.exec(threadId);
@@ -3881,6 +3890,6 @@ function formatDateBucket(d) {
3881
3890
  return `${yyyy}/${mm}/${dd}`;
3882
3891
  }
3883
3892
 
3884
- export { CLAUDE_EFFORT_VALUES, CODEX_EFFORT_VALUES, MAESTRO_EFFORT_VALUES, logger, MODEL_SONNET, MODEL_OPUS, MODEL_FABLE, configureRolloutHost2, FIXTURES_DIR, clone, assertUuidLike, ensureCwdExists, extractChatPairs2, parseJsonlText, writeJsonlFile, hostedCodexHomePath, extractLatestCodexPatchPreview2, extractCodexPatchCallIds2, readCodexPatchCallIds2, readLatestCodexPatchPreview2, extractLatestCodexContextUsage2, readLatestCodexContextUsage2, migrateCodexRolloutNativeMultiAgentMetadata2, latestCodexRolloutPath, writeCodexRollout2, decodeUuidV7Timestamp2 };
3893
+ export { __require, CLAUDE_EFFORT_VALUES, CODEX_EFFORT_VALUES, MAESTRO_EFFORT_VALUES, logger, MODEL_SONNET, MODEL_OPUS, MODEL_FABLE, configureRolloutHost, FIXTURES_DIR, clone, assertUuidLike, ensureCwdExists, extractChatPairs, parseJsonlText, writeJsonlFile, hostedCodexHomePath, extractLatestCodexPatchPreview, extractCodexPatchCallIds, readCodexPatchCallIds, readLatestCodexPatchPreview, extractLatestCodexContextUsage, readLatestCodexContextUsage, migrateCodexRolloutNativeMultiAgentMetadata, latestCodexRolloutPath, writeCodexRollout, decodeUuidV7Timestamp };
3885
3894
 
3886
- //# debugId=D6748D5B00827E4364756E2164756E21
3895
+ //# debugId=AFB262F3B408CADE64756E2164756E21