@opengeni/db 4.6.1 → 4.6.2-canary.39853438886001

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 (78) hide show
  1. package/dist/canonical-human-identities.js +3 -3
  2. package/dist/capability-reconciliation.js +2 -2
  3. package/dist/{chunk-575FUJE2.js → chunk-2AYATAKX.js} +3 -3
  4. package/dist/{chunk-ZWXHVIPE.js → chunk-2ND6WB3I.js} +79 -34
  5. package/dist/{chunk-ZWXHVIPE.js.map → chunk-2ND6WB3I.js.map} +1 -1
  6. package/dist/{chunk-MSAWMGWJ.js → chunk-3SPJSY7W.js} +6 -6
  7. package/dist/{chunk-M6TNKUGE.js → chunk-4FIFLPZC.js} +9 -1
  8. package/dist/chunk-4FIFLPZC.js.map +1 -0
  9. package/dist/{chunk-YOFYG5ZI.js → chunk-C3QSQSR4.js} +2 -2
  10. package/dist/{chunk-4LVV4R4F.js → chunk-CUFE2VRQ.js} +2 -2
  11. package/dist/{chunk-GYAQYECK.js → chunk-EWOI5BFP.js} +2 -2
  12. package/dist/{chunk-7LFHUC35.js → chunk-HDLB6TE6.js} +2 -2
  13. package/dist/{chunk-GSZZDYPV.js → chunk-HFJRCJWS.js} +2 -2
  14. package/dist/{chunk-C3FI3DJ5.js → chunk-HT7WH7RH.js} +11 -3
  15. package/dist/chunk-HT7WH7RH.js.map +1 -0
  16. package/dist/{chunk-TIF52FMJ.js → chunk-JSXB6FWX.js} +3 -3
  17. package/dist/{chunk-TLCTS7CZ.js → chunk-LJA7IRDK.js} +4 -4
  18. package/dist/{chunk-XX5M3TJJ.js → chunk-LLMVN6ZL.js} +2 -2
  19. package/dist/{chunk-VXCIFQX7.js → chunk-PB7JKMHJ.js} +2 -2
  20. package/dist/{chunk-KMBU4KDY.js → chunk-PKY6KWEP.js} +26 -1
  21. package/dist/chunk-PKY6KWEP.js.map +1 -0
  22. package/dist/{chunk-OFQDECMZ.js → chunk-QAG55O3L.js} +4 -4
  23. package/dist/{chunk-K2YN562I.js → chunk-RXKWURPN.js} +2 -2
  24. package/dist/{chunk-7P67EF5K.js → chunk-SLTEPCXD.js} +5 -5
  25. package/dist/{chunk-BH2HBICR.js → chunk-XNTQSEZT.js} +4 -4
  26. package/dist/connect-attempts.js +3 -3
  27. package/dist/editable-artifact-durable-export.js +2 -2
  28. package/dist/editable-artifacts.js +3 -3
  29. package/dist/index.js +19 -19
  30. package/dist/managed-auth-session-sets.js +3 -3
  31. package/dist/mcp-operations.js +2 -2
  32. package/dist/migrate.js +19 -19
  33. package/dist/organization-integration-policy.js +3 -3
  34. package/dist/provision-roles.js +1 -1
  35. package/dist/retained-provider-commands.js +6 -6
  36. package/dist/runtime-posture.d.ts +2 -2
  37. package/dist/schema.d.ts +118 -0
  38. package/dist/schema.js +3 -1
  39. package/dist/session-background-commands.js +5 -5
  40. package/dist/session-command-output.js +5 -5
  41. package/dist/session-event-slices.js +3 -3
  42. package/dist/session-mcp-credential-rotation.js +6 -6
  43. package/dist/session-message-search.d.ts +3 -0
  44. package/dist/session-tenancy.js +6 -6
  45. package/dist/{subscription-core-codex-L7NPFWAH.js → subscription-core-codex-D3IQ4SYO.js} +6 -6
  46. package/dist/{subscription-core-codex-compat-AK2UMLE3.js → subscription-core-codex-compat-SLRJTJ4T.js} +8 -8
  47. package/dist/video-generation.js +3 -3
  48. package/dist/workspace-tool-defaults.js +5 -5
  49. package/drizzle/0909_session_message_search_index.sql +230 -0
  50. package/drizzle/0910_session_message_search_backfill.sql +45 -0
  51. package/drizzle/0911_session_message_search_trigram_index.sql +5 -0
  52. package/drizzle/0912_session_message_search_backfill_cleanup.sql +11 -0
  53. package/package.json +9 -9
  54. package/src/connection-token-resolver.ts +28 -0
  55. package/src/migration-runner-settings.ts +3 -0
  56. package/src/runtime-posture.ts +8 -0
  57. package/src/schema.ts +35 -0
  58. package/src/session-message-search.ts +87 -27
  59. package/dist/chunk-C3FI3DJ5.js.map +0 -1
  60. package/dist/chunk-KMBU4KDY.js.map +0 -1
  61. package/dist/chunk-M6TNKUGE.js.map +0 -1
  62. /package/dist/{chunk-575FUJE2.js.map → chunk-2AYATAKX.js.map} +0 -0
  63. /package/dist/{chunk-MSAWMGWJ.js.map → chunk-3SPJSY7W.js.map} +0 -0
  64. /package/dist/{chunk-YOFYG5ZI.js.map → chunk-C3QSQSR4.js.map} +0 -0
  65. /package/dist/{chunk-4LVV4R4F.js.map → chunk-CUFE2VRQ.js.map} +0 -0
  66. /package/dist/{chunk-GYAQYECK.js.map → chunk-EWOI5BFP.js.map} +0 -0
  67. /package/dist/{chunk-7LFHUC35.js.map → chunk-HDLB6TE6.js.map} +0 -0
  68. /package/dist/{chunk-GSZZDYPV.js.map → chunk-HFJRCJWS.js.map} +0 -0
  69. /package/dist/{chunk-TIF52FMJ.js.map → chunk-JSXB6FWX.js.map} +0 -0
  70. /package/dist/{chunk-TLCTS7CZ.js.map → chunk-LJA7IRDK.js.map} +0 -0
  71. /package/dist/{chunk-XX5M3TJJ.js.map → chunk-LLMVN6ZL.js.map} +0 -0
  72. /package/dist/{chunk-VXCIFQX7.js.map → chunk-PB7JKMHJ.js.map} +0 -0
  73. /package/dist/{chunk-OFQDECMZ.js.map → chunk-QAG55O3L.js.map} +0 -0
  74. /package/dist/{chunk-K2YN562I.js.map → chunk-RXKWURPN.js.map} +0 -0
  75. /package/dist/{chunk-7P67EF5K.js.map → chunk-SLTEPCXD.js.map} +0 -0
  76. /package/dist/{chunk-BH2HBICR.js.map → chunk-XNTQSEZT.js.map} +0 -0
  77. /package/dist/{subscription-core-codex-L7NPFWAH.js.map → subscription-core-codex-D3IQ4SYO.js.map} +0 -0
  78. /package/dist/{subscription-core-codex-compat-AK2UMLE3.js.map → subscription-core-codex-compat-SLRJTJ4T.js.map} +0 -0
@@ -11,10 +11,10 @@ import {
11
11
  getCanonicalHumanIdentityProjection,
12
12
  synchronizeCanonicalHumanLoginBindings,
13
13
  validateCanonicalHumanSession
14
- } from "./chunk-XX5M3TJJ.js";
15
- import "./chunk-K2YN562I.js";
14
+ } from "./chunk-LLMVN6ZL.js";
15
+ import "./chunk-RXKWURPN.js";
16
16
  import "./chunk-SMCA7PNJ.js";
17
- import "./chunk-KMBU4KDY.js";
17
+ import "./chunk-PKY6KWEP.js";
18
18
  import "./chunk-PZ5AY32C.js";
19
19
  export {
20
20
  CanonicalHumanIdentityAuthorityError,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  withWorkspaceRls
3
- } from "./chunk-K2YN562I.js";
3
+ } from "./chunk-RXKWURPN.js";
4
4
  import "./chunk-SMCA7PNJ.js";
5
- import "./chunk-KMBU4KDY.js";
5
+ import "./chunk-PKY6KWEP.js";
6
6
  import "./chunk-PZ5AY32C.js";
7
7
 
8
8
  // src/capability-reconciliation.ts
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  rawRows,
3
3
  withWorkspaceRls
4
- } from "./chunk-K2YN562I.js";
4
+ } from "./chunk-RXKWURPN.js";
5
5
  import {
6
6
  LOSSLESS_JSON_STRING_PREFIX,
7
7
  fromPostgresLosslessJson,
8
8
  sessionEvents,
9
9
  sessionTurns,
10
10
  toPostgresLosslessJson
11
- } from "./chunk-KMBU4KDY.js";
11
+ } from "./chunk-PKY6KWEP.js";
12
12
 
13
13
  // src/session-event-slices.ts
14
14
  import { and, asc, desc, eq, gt, inArray, lt, notInArray, sql as sql2 } from "drizzle-orm";
@@ -275,4 +275,4 @@ export {
275
275
  readSessionMessageSliceInScope,
276
276
  listSessionEventSlices
277
277
  };
278
- //# sourceMappingURL=chunk-575FUJE2.js.map
278
+ //# sourceMappingURL=chunk-2AYATAKX.js.map
@@ -2,14 +2,14 @@ import {
2
2
  buildConnectionTokenResolver,
3
3
  connectionScopeKey,
4
4
  refreshOAuthConnectionCredential
5
- } from "./chunk-C3FI3DJ5.js";
5
+ } from "./chunk-HT7WH7RH.js";
6
6
  import {
7
7
  retainedProviderCommandPersistence
8
- } from "./chunk-TLCTS7CZ.js";
8
+ } from "./chunk-LJA7IRDK.js";
9
9
  import {
10
10
  excludeUnclaimedHumanPromptEventFilter,
11
11
  readSessionMessageSliceInScope
12
- } from "./chunk-575FUJE2.js";
12
+ } from "./chunk-2AYATAKX.js";
13
13
  import {
14
14
  PROVIDER_RECOVERY_SUSPENDED_AT,
15
15
  recoverProviderClockAfterDependencyWait
@@ -40,7 +40,7 @@ import {
40
40
  throwIfSubscriptionSettingLocked,
41
41
  updateSubscriptionCoreConnectionAccess,
42
42
  withSubscriptionCoreAccessScope
43
- } from "./chunk-MSAWMGWJ.js";
43
+ } from "./chunk-3SPJSY7W.js";
44
44
  import {
45
45
  buildSubscriptionCoreCredentialResolver,
46
46
  decryptEnvironmentValue,
@@ -53,15 +53,15 @@ import {
53
53
  withSubscriptionCoreProviderPlacementWorld,
54
54
  withSubscriptionCoreRefreshLock,
55
55
  withSubscriptionUsageReading
56
- } from "./chunk-BH2HBICR.js";
56
+ } from "./chunk-XNTQSEZT.js";
57
57
  import {
58
58
  memoByProvider,
59
59
  subscriptionCoreConnectionKind,
60
60
  subscriptionCoreProviderId
61
- } from "./chunk-GYAQYECK.js";
61
+ } from "./chunk-EWOI5BFP.js";
62
62
  import {
63
63
  transactionallyAuthorizeEditableArtifactActor
64
- } from "./chunk-GSZZDYPV.js";
64
+ } from "./chunk-HFJRCJWS.js";
65
65
  import {
66
66
  InteractionResourceConflictError,
67
67
  InteractionResourceNotFoundError,
@@ -108,11 +108,11 @@ import {
108
108
  withEffectiveSessionPolicy,
109
109
  withSessionListModelPolicy,
110
110
  withoutLapsedWorkspaceAccountBindings
111
- } from "./chunk-OFQDECMZ.js";
111
+ } from "./chunk-QAG55O3L.js";
112
112
  import {
113
113
  withOrganizationIntegrationAcquisition,
114
114
  withOrganizationIntegrationPolicyFence
115
- } from "./chunk-4LVV4R4F.js";
115
+ } from "./chunk-CUFE2VRQ.js";
116
116
  import {
117
117
  SESSION_DISCOVERY_CONTROL_TITLE_MAX_CHARS,
118
118
  SessionCommandIdempotencyError,
@@ -209,7 +209,7 @@ import {
209
209
  withPoolWakeServiceScopeInTransaction,
210
210
  workspaceControlLockBudget,
211
211
  workspaceControlRequestLockTimeoutMs
212
- } from "./chunk-7P67EF5K.js";
212
+ } from "./chunk-SLTEPCXD.js";
213
213
  import {
214
214
  ClaudeSubscriptionReconnectRequired,
215
215
  SUBSCRIPTION_CORE_CLAUDE,
@@ -253,7 +253,7 @@ import {
253
253
  withCodexTokenDeadline,
254
254
  withoutRetiredProviderKeys,
255
255
  writeSubscriptionSessionBinding
256
- } from "./chunk-VXCIFQX7.js";
256
+ } from "./chunk-PB7JKMHJ.js";
257
257
  import {
258
258
  CreditDebitAttribution,
259
259
  beginPlanCreditSettlement,
@@ -272,7 +272,7 @@ import {
272
272
  planPostUseCreditAllocations,
273
273
  readSubscriptionPlanCatalog,
274
274
  upsertOrganizationPlan
275
- } from "./chunk-TIF52FMJ.js";
275
+ } from "./chunk-JSXB6FWX.js";
276
276
  import {
277
277
  external_exports
278
278
  } from "./chunk-4UJCXBR2.js";
@@ -308,7 +308,7 @@ import {
308
308
  withWorkspaceSubjectSessionActivityRls,
309
309
  withWorkspaceUsageLock,
310
310
  withoutSessionRlsActor
311
- } from "./chunk-K2YN562I.js";
311
+ } from "./chunk-RXKWURPN.js";
312
312
  import {
313
313
  databaseBootConnectOptions
314
314
  } from "./chunk-SMCA7PNJ.js";
@@ -478,6 +478,7 @@ import {
478
478
  sessionHumanInputRequests,
479
479
  sessionListSnapshots,
480
480
  sessionMcpServers,
481
+ sessionMessageSearchTexts,
481
482
  sessionPendingToolCalls,
482
483
  sessionPins,
483
484
  sessionRealtimeConnections,
@@ -555,7 +556,7 @@ import {
555
556
  workspaceWebhookDeliveries,
556
557
  workspaceWebhooks,
557
558
  workspaces
558
- } from "./chunk-KMBU4KDY.js";
559
+ } from "./chunk-PKY6KWEP.js";
559
560
 
560
561
  // src/migrate.ts
561
562
  import { readdir, readFile } from "fs/promises";
@@ -1299,6 +1300,9 @@ function batchedBackfillTransactionLocalSetting(file) {
1299
1300
  value: "1"
1300
1301
  };
1301
1302
  }
1303
+ if (file === "0910_session_message_search_backfill.sql") {
1304
+ return { guc: "opengeni.session_message_search_backfill_v1", value: "1" };
1305
+ }
1302
1306
  return null;
1303
1307
  }
1304
1308
 
@@ -15970,6 +15974,7 @@ var Cursor = external_exports.object({
15970
15974
  matched: external_exports.number().int().nonnegative().safe(),
15971
15975
  occurrences: external_exports.number().int().nonnegative().safe()
15972
15976
  }).strict();
15977
+ var SESSION_MESSAGE_SEARCH_WINDOW = 2e3;
15973
15978
  var SessionMessageSearchCursorError = class extends Error {
15974
15979
  constructor() {
15975
15980
  super("Invalid session message search cursor or changed search scope");
@@ -16074,31 +16079,50 @@ async function scanSessionMessages(db, workspaceId, request, filters, authorityI
16074
16079
  const matches = [];
16075
16080
  let exhausted = false;
16076
16081
  const e = sessionEvents;
16077
- {
16078
- const boundary = position ? position.skipSession ? sql46`${e.sessionId} > ${position.sessionId}::uuid` : sql46`(${e.sessionId} > ${position.sessionId}::uuid or (${e.sessionId} = ${position.sessionId}::uuid and ${position.done ? sql46`${e.sequence} > ${position.sequence}` : sql46`${e.sequence} >= ${position.sequence}`}))` : sql46`true`;
16082
+ const c = sessionMessageSearchTexts;
16083
+ await db.execute(
16084
+ sql46`select pg_catalog.set_config('opengeni.session_message_search_pattern', ${sessionMessagePostgresPattern(request.query) ?? ""}, true)`
16085
+ );
16086
+ const limit = request.limit ?? 20;
16087
+ const budgetStarted = performance.now();
16088
+ let slots = 0;
16089
+ for (; ; ) {
16090
+ signal?.throwIfAborted();
16091
+ const boundary = position ? position.skipSession ? sql46`${c.sessionId} > ${position.sessionId}::uuid` : sql46`(${c.sessionId}, ${c.sequence}) ${position.done ? sql46`>` : sql46`>=`} (${position.sessionId}::uuid, ${position.sequence}::int)` : sql46`true`;
16079
16092
  const textMatch = sessionMessageTextMatchSql(request.query, sql46`${e.payload}->>'text'`);
16080
16093
  const rows2 = await db.execute(sql46`
16081
16094
  with eligible as materialized (
16082
16095
  select ${e.id} as id, ${e.sessionId} as session_id, ${e.sequence} as sequence,
16083
16096
  ${textMatch.matched} as matched, ${textMatch.encoded} as encoded
16084
- from ${e}
16097
+ from ${c}
16098
+ inner join ${e} on ${e.workspaceId} = ${c.workspaceId}
16099
+ and ${e.sessionId} = ${c.sessionId} and ${e.sequence} = ${c.sequence}
16085
16100
  inner join ${sessions}
16086
16101
  on ${sessions.workspaceId} = ${e.workspaceId} and ${sessions.id} = ${e.sessionId}
16087
16102
  where ${and19(
16103
+ eq20(c.workspaceId, workspaceId),
16088
16104
  eq20(e.workspaceId, workspaceId),
16089
16105
  ...filters,
16090
16106
  boundary,
16091
- request.sessionId ? eq20(e.sessionId, request.sessionId) : sql46`true`,
16107
+ request.sessionId ? eq20(c.sessionId, request.sessionId) : sql46`true`,
16092
16108
  sql46`${e.type} in ('user.message', 'agent.message.completed')`,
16093
16109
  sql46`(${e.turnAssociation} is null or ${e.turnAssociation} = 'current')`,
16094
16110
  sql46`${e.duplicateOfEventId} is null`,
16095
16111
  sql46`jsonb_typeof(${e.payload}->'text') = 'string'`
16096
16112
  )}
16113
+ order by ${c.sessionId}, ${c.sequence}
16114
+ limit ${sql46.raw(String(SESSION_MESSAGE_SEARCH_WINDOW))}
16097
16115
  ), visited as (
16098
16116
  select count(*)::int as visited from eligible
16117
+ ), last_visited as (
16118
+ select eligible.session_id as "lastSessionId", eligible.sequence as "lastSequence"
16119
+ from eligible
16120
+ order by eligible.session_id desc, eligible.sequence desc
16121
+ limit 1
16099
16122
  )
16100
- select visited.visited, candidate.*
16123
+ select visited.visited, last_visited.*, candidate.*
16101
16124
  from visited
16125
+ left join last_visited on true
16102
16126
  left join lateral (
16103
16127
  select * from (
16104
16128
  select valid.*${request.groupBy === "session" ? sql46`, (count(*) filter (where valid.definite) over (partition by valid."sessionId"
@@ -16153,6 +16177,8 @@ async function scanSessionMessages(db, workspaceId, request, filters, authorityI
16153
16177
  order by candidate.rank
16154
16178
  `);
16155
16179
  const visited = rows2[0]?.visited ?? 0;
16180
+ const lastSessionId = rows2[0]?.lastSessionId ?? null;
16181
+ const lastSequence = rows2[0]?.lastSequence ?? null;
16156
16182
  const identities = rows2.flatMap(
16157
16183
  (row) => row.rank === null || row.sessionId === null || row.eventId === null || row.sequence === null || row.type === null ? [] : [
16158
16184
  {
@@ -16166,16 +16192,16 @@ async function scanSessionMessages(db, workspaceId, request, filters, authorityI
16166
16192
  ]
16167
16193
  );
16168
16194
  const visitedBefore = scanned - (position && !position.done ? 1 : 0);
16169
- const budgetStarted = performance.now();
16170
16195
  let identityIndex = 0;
16171
- for (let window = 0; window < 32 && matches.length < (request.limit ?? 20); window++) {
16196
+ let interrupted = false;
16197
+ for (; matches.length < limit; slots++) {
16172
16198
  signal?.throwIfAborted();
16173
- if (window > 0 && performance.now() - budgetStarted >= 1500) break;
16174
- const identity = identities[identityIndex];
16175
- if (!identity) {
16176
- exhausted = identities.length < 33;
16199
+ if (slots >= 32 || slots > 0 && performance.now() - budgetStarted >= 1500) {
16200
+ interrupted = true;
16177
16201
  break;
16178
16202
  }
16203
+ const identity = identities[identityIndex];
16204
+ if (!identity) break;
16179
16205
  const continuing = position && !position.done && position.sessionId === identity.sessionId && position.sequence === identity.sequence;
16180
16206
  if (!continuing) {
16181
16207
  scanned = visitedBefore + identity.rank;
@@ -16192,7 +16218,7 @@ async function scanSessionMessages(db, workspaceId, request, filters, authorityI
16192
16218
  const offset = position.offset;
16193
16219
  const utf16Offset = position.utf16Offset;
16194
16220
  const smallText = fromPostgresLosslessJson(identity.smallText, identity.codec);
16195
- const scalarWindows = typeof smallText === "string" ? 1 : Math.min(4, 32 - window);
16221
+ const scalarWindows = typeof smallText === "string" ? 1 : Math.min(4, 32 - slots);
16196
16222
  const slice = typeof smallText === "string" ? {
16197
16223
  offset: 0,
16198
16224
  total: smallText.length,
@@ -16214,7 +16240,7 @@ async function scanSessionMessages(db, workspaceId, request, filters, authorityI
16214
16240
  offset,
16215
16241
  scalarWindows
16216
16242
  );
16217
- window += scalarWindows - 1;
16243
+ slots += scalarWindows - 1;
16218
16244
  if (!slice || slice.omitted) {
16219
16245
  position = { ...position, done: true };
16220
16246
  identityIndex++;
@@ -16223,7 +16249,7 @@ async function scanSessionMessages(db, workspaceId, request, filters, authorityI
16223
16249
  pattern.lastIndex = Math.max(0, position.minimumMatchOffset - utf16Offset);
16224
16250
  let found;
16225
16251
  const messageId = fromPostgresLosslessJson(identity.messageId, identity.codec);
16226
- while (matches.length < (request.limit ?? 20) && (found = pattern.exec(slice.text))) {
16252
+ while (matches.length < limit && (found = pattern.exec(slice.text))) {
16227
16253
  matches.push({
16228
16254
  sessionId: identity.sessionId,
16229
16255
  sessionTitle: identity.sessionTitle,
@@ -16254,7 +16280,7 @@ async function scanSessionMessages(db, workspaceId, request, filters, authorityI
16254
16280
  continue;
16255
16281
  }
16256
16282
  const units = slice.unit === "utf16" ? slice.text.length : Array.from(slice.text).length;
16257
- if (matches.length >= (request.limit ?? 20)) {
16283
+ if (matches.length >= limit) {
16258
16284
  if (offset + units >= slice.total && position.minimumMatchOffset >= utf16Offset + slice.text.length) {
16259
16285
  position = { ...position, done: true };
16260
16286
  identityIndex++;
@@ -16281,8 +16307,27 @@ async function scanSessionMessages(db, workspaceId, request, filters, authorityI
16281
16307
  done: false
16282
16308
  };
16283
16309
  }
16284
- if (identityIndex >= identities.length && identities.length < 33) exhausted = true;
16285
- if (exhausted) scanned = visitedBefore + visited;
16310
+ const drained = identityIndex >= identities.length && identities.length < 33;
16311
+ if (drained && (visited < SESSION_MESSAGE_SEARCH_WINDOW || lastSessionId === null)) {
16312
+ scanned = visitedBefore + visited;
16313
+ exhausted = true;
16314
+ break;
16315
+ }
16316
+ if (matches.length >= limit || interrupted) break;
16317
+ if (drained && lastSessionId !== null && lastSequence !== null) {
16318
+ scanned = visitedBefore + visited;
16319
+ if (!(position?.skipSession && position.sessionId === lastSessionId))
16320
+ position = {
16321
+ sessionId: lastSessionId,
16322
+ sequence: lastSequence,
16323
+ offset: 0,
16324
+ utf16Offset: 0,
16325
+ minimumMatchOffset: 0,
16326
+ matched: false,
16327
+ done: true
16328
+ };
16329
+ }
16330
+ if (performance.now() - budgetStarted >= 1500) break;
16286
16331
  }
16287
16332
  signal?.throwIfAborted();
16288
16333
  return {
@@ -70132,10 +70177,10 @@ async function isCodexBilledTurn(input) {
70132
70177
  if (!input.settings.codexSubscriptionEnabled) return false;
70133
70178
  if (input.acceptedTurn) {
70134
70179
  const accountId = input.accountId ?? (await rlsContextForWorkspace(input.db, input.workspaceId)).accountId;
70135
- const { readCodexCutoverDisposition: readCodexCutoverDisposition2 } = await import("./subscription-core-codex-compat-AK2UMLE3.js");
70180
+ const { readCodexCutoverDisposition: readCodexCutoverDisposition2 } = await import("./subscription-core-codex-compat-SLRJTJ4T.js");
70136
70181
  const disposition = await readCodexCutoverDisposition2(input.db, accountId, input.workspaceId);
70137
70182
  if (disposition !== "core") return false;
70138
- const { subscriptionCoreAcceptedCodexTurnIsFunded } = await import("./subscription-core-codex-L7NPFWAH.js");
70183
+ const { subscriptionCoreAcceptedCodexTurnIsFunded } = await import("./subscription-core-codex-D3IQ4SYO.js");
70139
70184
  return subscriptionCoreAcceptedCodexTurnIsFunded(input.db, {
70140
70185
  accountId,
70141
70186
  workspaceId: input.workspaceId,
@@ -114727,4 +114772,4 @@ export {
114727
114772
  isCodexBilledModel2 as isCodexBilledModel,
114728
114773
  sql151 as sql
114729
114774
  };
114730
- //# sourceMappingURL=chunk-ZWXHVIPE.js.map
114775
+ //# sourceMappingURL=chunk-2ND6WB3I.js.map