@cortexkit/opencode-magic-context 0.49.44 → 0.49.45

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 (107) hide show
  1. package/dist/auto-search-worker.js +4 -4
  2. package/dist/chunk-embedding-write-worker.js +7 -7
  3. package/dist/{compartment-chunk-embedding-ypktm0tk.js → compartment-chunk-embedding-snj51nmg.js} +5 -5
  4. package/dist/{conflict-warning-hook-b75jn458.js → conflict-warning-hook-w1aw6w5t.js} +4 -4
  5. package/dist/{context-ws6gbyrr.js → context-y85dvs6j.js} +26 -26
  6. package/dist/{embedding-backfill-zxj35jkq.js → embedding-backfill-kpy5shsa.js} +8 -8
  7. package/dist/embedding-worker.js +3 -3
  8. package/dist/features/magic-context/memory/embedding-openai.d.ts.map +1 -1
  9. package/dist/features/magic-context/memory/embedding-query-deadline.d.ts +8 -0
  10. package/dist/features/magic-context/memory/embedding-query-deadline.d.ts.map +1 -0
  11. package/dist/features/magic-context/overflow-detection.d.ts +16 -6
  12. package/dist/features/magic-context/overflow-detection.d.ts.map +1 -1
  13. package/dist/hooks/auto-update-checker/index.d.ts +6 -0
  14. package/dist/hooks/auto-update-checker/index.d.ts.map +1 -1
  15. package/dist/hooks/magic-context/read-session-formatting.d.ts +2 -1
  16. package/dist/hooks/magic-context/read-session-formatting.d.ts.map +1 -1
  17. package/dist/hooks/magic-context/read-session-raw.d.ts.map +1 -1
  18. package/dist/{index-8w3y6pxc.js → index-0a79y98x.js} +12 -12
  19. package/dist/{index-jggt5gf2.js → index-1hwn96x1.js} +1 -1
  20. package/dist/{index-ae1ar4v1.js → index-25ka1jza.js} +1 -1
  21. package/dist/{index-7y8c2n52.js → index-7na94cjf.js} +3 -3
  22. package/dist/{index-v64se1t6.js → index-980brvjr.js} +8 -8
  23. package/dist/{index-4xyjr62e.js → index-ak11t3gm.js} +4 -0
  24. package/dist/{index-vd2ywmfe.js → index-brj6was5.js} +1 -1
  25. package/dist/{index-m1mttf6y.js → index-bzq05g00.js} +3 -3
  26. package/dist/{index-66qexmjw.js → index-d4qw2h43.js} +3 -3
  27. package/dist/{index-24y47287.js → index-dcdvyaeh.js} +4 -4
  28. package/dist/{index-g4t7850m.js → index-dj2p8653.js} +1 -1
  29. package/dist/{index-ntssp0dt.js → index-fs3zfby1.js} +28 -30
  30. package/dist/{index-knnscj54.js → index-gf1vx3bn.js} +3 -3
  31. package/dist/{index-8jjjmhab.js → index-gxqr0sbd.js} +1 -1
  32. package/dist/{index-b1ydbp95.js → index-h9m41624.js} +1 -1
  33. package/dist/{index-p6gs3xpx.js → index-hkh8x221.js} +1 -1
  34. package/dist/{index-dasvhxwg.js → index-jwa5t1s4.js} +6 -6
  35. package/dist/{index-dcjkw41m.js → index-qcz1fy7h.js} +3 -3
  36. package/dist/{index-g7rrfjkq.js → index-qdx8dq60.js} +5 -5
  37. package/dist/{index-g0mjm7e4.js → index-rk5hyc41.js} +5 -5
  38. package/dist/{index-rhcwddn9.js → index-s79g172v.js} +63 -21
  39. package/dist/{index-kgk64zyx.js → index-sd2s4t4p.js} +1 -1
  40. package/dist/{index-jkanybgq.js → index-smtbdmc3.js} +1 -1
  41. package/dist/{index-91y4xvx6.js → index-tvd2j34s.js} +2 -2
  42. package/dist/{index-1j8m4ad0.js → index-wwg1je98.js} +8 -5
  43. package/dist/{index-r2epb000.js → index-xa9mmq6c.js} +2 -1
  44. package/dist/{index-wapyeb06.js → index-xejh7cqv.js} +13 -13
  45. package/dist/{index-6qnhaaa0.js → index-z8dacvkt.js} +3 -3
  46. package/dist/index.d.ts.map +1 -1
  47. package/dist/index.js +42 -38
  48. package/dist/{message-fts-rowid-map-t6qsyg9s.js → message-fts-rowid-map-msffhkve.js} +2 -2
  49. package/dist/{message-index-bounded-dmq6ne7d.js → message-index-bounded-d8xt6q5c.js} +8 -8
  50. package/dist/migration-worker.js +5 -5
  51. package/dist/{project-embedding-registry-m47vg1ce.js → project-embedding-registry-r6xfsrbe.js} +7 -7
  52. package/dist/raw-ordinal-warmup-worker.js +7 -7
  53. package/dist/{read-session-chunk-3m7z9v3t.js → read-session-chunk-k3fqshw8.js} +6 -6
  54. package/dist/{read-session-raw-j7c9w57v.js → read-session-raw-x7a9b3jm.js} +1 -1
  55. package/dist/{recomp-orchestrator-9wtcpd7d.js → recomp-orchestrator-y75thsc3.js} +19 -19
  56. package/dist/{render-esw55s0k.js → render-3psbedzk.js} +13 -13
  57. package/dist/{search-archive-wna5basn.js → search-archive-rvr7j5gx.js} +8 -8
  58. package/dist/{search-3b4kbhtw.js → search-hd16c8gq.js} +16 -16
  59. package/dist/{send-session-notification-14p3yje4.js → send-session-notification-j93pn2hn.js} +3 -3
  60. package/dist/{storage-tags-vj0yj7ed.js → storage-tags-ye9aqrqy.js} +2 -2
  61. package/dist/tools/ctx-search/tools.d.ts.map +1 -1
  62. package/dist/{transform-postprocess-phase-1y6p9ccc.js → transform-postprocess-phase-1rzxmkhb.js} +20 -20
  63. package/dist/v2/auto-search-worker.js +4 -4
  64. package/dist/v2/chunk-embedding-write-worker.js +7 -7
  65. package/dist/v2/{compartment-chunk-embedding-qfk791bd.js → compartment-chunk-embedding-nj5nrnbj.js} +5 -5
  66. package/dist/v2/{context-sfgk72cj.js → context-0e946t63.js} +25 -27
  67. package/dist/v2/{embedding-backfill-ahwzfc7v.js → embedding-backfill-360efh1t.js} +8 -8
  68. package/dist/v2/embedding-worker.js +3 -3
  69. package/dist/v2/{message-fts-rowid-map-z86avy0n.js → message-fts-rowid-map-qe7cpksd.js} +2 -2
  70. package/dist/v2/{message-index-bounded-mapha2ag.js → message-index-bounded-wt64v2rn.js} +7 -7
  71. package/dist/v2/migration-worker.js +5 -5
  72. package/dist/v2/{project-embedding-registry-mn403rp5.js → project-embedding-registry-ek0cy0d5.js} +7 -7
  73. package/dist/v2/raw-ordinal-warmup-worker.js +7 -7
  74. package/dist/v2/{read-session-chunk-svcthp0n.js → read-session-chunk-4b31z6bz.js} +5 -5
  75. package/dist/v2/{read-session-raw-qpp6x9kg.js → read-session-raw-yss2ev98.js} +1 -1
  76. package/dist/v2/{recomp-orchestrator-2bkv46am.js → recomp-orchestrator-6qrm2nea.js} +16 -16
  77. package/dist/v2/{render-315tv10c.js → render-f8mw16pp.js} +12 -12
  78. package/dist/v2/{search-archive-hnx40ts0.js → search-archive-7d0xdp54.js} +7 -7
  79. package/dist/v2/{search-bhrr075t.js → search-ecjd7e50.js} +14 -14
  80. package/dist/v2/{send-session-notification-kxp47tsw.js → send-session-notification-na3q825m.js} +1 -1
  81. package/dist/v2/{server-t5gxvcc3.js → server-0ymsgh0j.js} +3 -3
  82. package/dist/v2/{server-nmyganc8.js → server-131h608x.js} +1 -1
  83. package/dist/v2/{server-86sk7h34.js → server-2gjqhmn9.js} +63 -21
  84. package/dist/v2/{server-xy7w7hrd.js → server-2j87594q.js} +1 -1
  85. package/dist/v2/{server-1c720m9s.js → server-2qyfev3b.js} +5 -5
  86. package/dist/v2/{server-1yx5455s.js → server-39kzpp8q.js} +4 -4
  87. package/dist/v2/{server-969cdpmg.js → server-7vb38e51.js} +4 -0
  88. package/dist/v2/{server-rqypazrp.js → server-an1ff8d8.js} +3 -3
  89. package/dist/v2/{server-tnzbk64q.js → server-b3r080cm.js} +2 -1
  90. package/dist/v2/{server-zzgtgqmd.js → server-ddw42d76.js} +1 -1
  91. package/dist/v2/{server-g8xvnxcf.js → server-ftyc8awt.js} +3 -3
  92. package/dist/v2/{server-xfjjbrkt.js → server-gwqfwtzq.js} +1 -1
  93. package/dist/v2/{server-qs0mdpc1.js → server-hq7fdqfm.js} +7 -7
  94. package/dist/v2/{server-xnz3nrt2.js → server-pej5rnye.js} +1 -1
  95. package/dist/v2/{server-8xdnk7vz.js → server-sg2qjkrb.js} +1 -1
  96. package/dist/v2/{server-aqgg41wb.js → server-sr8tf5dt.js} +3 -3
  97. package/dist/v2/{server-78mc9sxx.js → server-vnpnmrsv.js} +7 -4
  98. package/dist/v2/{server-63cz4w5t.js → server-wbxbk3za.js} +3 -3
  99. package/dist/v2/{server-cp1a03vc.js → server-y8n33d9j.js} +3 -3
  100. package/dist/v2/{server-ngdrh7rv.js → server-zqzh2ybj.js} +11 -11
  101. package/dist/v2/server.js +2 -2
  102. package/dist/v2/{storage-tags-cw07ky67.js → storage-tags-8nttt1sk.js} +2 -2
  103. package/dist/v2/{v2-archive-reader-qwn0me88.js → v2-archive-reader-53kp5mme.js} +1 -1
  104. package/dist/v2/{wrapup-orchestrator-ts0sqwp3.js → wrapup-orchestrator-bng0dfxy.js} +16 -16
  105. package/dist/{v2-archive-reader-vqqjkeaq.js → v2-archive-reader-0fcxs5e9.js} +1 -1
  106. package/dist/{wrapup-orchestrator-qxvbvr4r.js → wrapup-orchestrator-r5cqgyrg.js} +20 -20
  107. package/package.json +1 -1
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  estimateTokens
3
- } from "./index-4xyjr62e.js";
3
+ } from "./index-ak11t3gm.js";
4
4
  import {
5
5
  getHarness2
6
6
  } from "./index-pavzsdc6.js";
@@ -15,7 +15,7 @@ import {
15
15
  isSynapseEmbeddingTruncated,
16
16
  getSynapseBatchRequestKey,
17
17
  SynapseEmbeddingProvider
18
- } from "./index-g4t7850m.js";
18
+ } from "./index-dj2p8653.js";
19
19
  import {
20
20
  inRootAsyncContext2,
21
21
  getSqliteDatabasePath2
@@ -43,7 +43,7 @@ import {
43
43
  countSessionCompartmentEmbedCoverage2,
44
44
  countSessionCompartmentEmbedCoveragePolite2,
45
45
  countUnembeddedSessionCompartmentsPolite2
46
- } from "./index-dcjkw41m.js";
46
+ } from "./index-qcz1fy7h.js";
47
47
  import {
48
48
  DEFAULT_LOCAL_EMBEDDING_MODEL
49
49
  } from "./index-4dpvnp8k.js";
@@ -56,7 +56,7 @@ import {
56
56
  getEmbeddingProviderIdentity,
57
57
  dominantEmbeddingFailure,
58
58
  LocalEmbeddingProvider
59
- } from "./index-p6gs3xpx.js";
59
+ } from "./index-hkh8x221.js";
60
60
  import {
61
61
  embedPauseBySession,
62
62
  activeEmbeddingSessions,
@@ -94,6 +94,36 @@ import {
94
94
  // src/features/magic-context/memory/embedding-openai.ts
95
95
  import { createHash } from "node:crypto";
96
96
 
97
+ // src/features/magic-context/memory/embedding-query-deadline.ts
98
+ var QUERY_EMBEDDING_TIMEOUT_MS = 5000;
99
+
100
+ class EmbeddingQueryTimeoutError extends Error {
101
+ timeoutMs = QUERY_EMBEDDING_TIMEOUT_MS;
102
+ constructor() {
103
+ super(`query embedding timed out after ${QUERY_EMBEDDING_TIMEOUT_MS}ms`);
104
+ this.name = "EmbeddingQueryTimeoutError";
105
+ }
106
+ }
107
+ async function withQueryEmbeddingDeadline(embed, signal) {
108
+ if (signal?.aborted)
109
+ return null;
110
+ const deadline = new AbortController;
111
+ const combined = signal ? AbortSignal.any([signal, deadline.signal]) : deadline.signal;
112
+ let onAbort;
113
+ const aborted = new Promise((resolve) => {
114
+ onAbort = () => resolve(null);
115
+ combined.addEventListener("abort", onAbort, { once: true });
116
+ });
117
+ const timer = setTimeout(() => deadline.abort(new EmbeddingQueryTimeoutError), QUERY_EMBEDDING_TIMEOUT_MS);
118
+ try {
119
+ return await Promise.race([embed(combined), aborted]);
120
+ } finally {
121
+ clearTimeout(timer);
122
+ if (onAbort)
123
+ combined.removeEventListener("abort", onAbort);
124
+ }
125
+ }
126
+
97
127
  // src/features/magic-context/memory/embedding-ssrf.ts
98
128
  var METADATA_HOSTNAMES = new Set(["metadata.google.internal", "metadata.goog"]);
99
129
  var IPV6_METADATA_HOSTS = new Set(["fd00:ec2::254"]);
@@ -190,9 +220,9 @@ function normalizeEndpoint(endpoint) {
190
220
  return endpoint?.trim().replace(/\/+$/, "") ?? "";
191
221
  }
192
222
  var FAILURE_THRESHOLD = 3;
193
- var FAILURE_WINDOW_MS = 60000;
194
223
  var OPEN_DURATION_MS = 5 * 60000;
195
224
  var FETCH_TIMEOUT_MS = 30000;
225
+ var FAILURE_WINDOW_MS = FAILURE_THRESHOLD * FETCH_TIMEOUT_MS;
196
226
  var RETRY_AFTER_CAP_MS = 60000;
197
227
  var RATE_LIMIT_BACKOFF_BASE_MS = 1000;
198
228
  var RATE_LIMIT_BACKOFF_CAP_MS = 30000;
@@ -364,6 +394,8 @@ class OpenAICompatibleEmbeddingProvider {
364
394
  let internalController;
365
395
  let timeoutHandle;
366
396
  let onOuterAbort;
397
+ let rateLimitedResponse = false;
398
+ const requestStartedAt = Date.now();
367
399
  try {
368
400
  const claim = this.claimProbeOrShortCircuit();
369
401
  if (claim === "short_circuit") {
@@ -372,7 +404,14 @@ class OpenAICompatibleEmbeddingProvider {
372
404
  isProbe = claim === "probe";
373
405
  internalController = new AbortController;
374
406
  timeoutHandle = setTimeout(() => internalController?.abort(), FETCH_TIMEOUT_MS);
375
- onOuterAbort = () => internalController?.abort();
407
+ onOuterAbort = () => {
408
+ if (signal?.reason instanceof EmbeddingQueryTimeoutError && !rateLimitedResponse) {
409
+ const timeoutMs = signal.reason.timeoutMs;
410
+ log2(`[magic-context] openai-compatible embedding request timed out after ${timeoutMs}ms`);
411
+ this.recordFailure(requestStartedAt, isProbe, this.failure("transport_error", `request timed out after ${timeoutMs}ms`, true));
412
+ }
413
+ internalController?.abort();
414
+ };
376
415
  if (signal) {
377
416
  signal.addEventListener("abort", onOuterAbort, { once: true });
378
417
  }
@@ -393,22 +432,25 @@ class OpenAICompatibleEmbeddingProvider {
393
432
  signal: internalController.signal
394
433
  });
395
434
  if (response.status === 429) {
435
+ rateLimitedResponse = true;
396
436
  await response.text().catch(() => "");
397
437
  this.noteRateLimit(response.headers.get("retry-after"));
398
438
  return RATE_LIMITED;
399
439
  }
400
440
  if (!response.ok) {
401
441
  const excerpt = await response.text().catch(() => "");
442
+ if (signal?.aborted)
443
+ return Array.from({ length: texts.length }, () => null);
402
444
  const failure = this.failure("http_error", `HTTP ${response.status} from endpoint${this.bodyExcerpt(excerpt)}`, response.status >= 500 || response.status === 408);
403
445
  log2(`[magic-context] openai-compatible embedding request failed: ${failure.reason}`);
404
- this.recordFailure(isProbe, failure);
446
+ this.recordFailure(requestStartedAt, isProbe, failure);
405
447
  return Array.from({ length: texts.length }, () => null);
406
448
  }
407
449
  const rawBody = await response.text();
408
450
  if (rawBody.trim().length === 0) {
409
451
  const failure = this.failure("invalid_envelope", "response body was empty", false);
410
452
  log2(`[magic-context] openai-compatible embedding request failed: ${failure.reason}`);
411
- this.recordFailure(isProbe, failure);
453
+ this.recordFailure(requestStartedAt, isProbe, failure);
412
454
  return Array.from({ length: texts.length }, () => null);
413
455
  }
414
456
  let body;
@@ -417,7 +459,7 @@ class OpenAICompatibleEmbeddingProvider {
417
459
  } catch {
418
460
  const failure = this.failure("invalid_envelope", `response body was not valid JSON${this.bodyExcerpt(rawBody)}`, false);
419
461
  log2(`[magic-context] openai-compatible embedding request failed: ${failure.reason}`);
420
- this.recordFailure(isProbe, failure);
462
+ this.recordFailure(requestStartedAt, isProbe, failure);
421
463
  return Array.from({ length: texts.length }, () => null);
422
464
  }
423
465
  const servedModel = typeof body.model === "string" ? body.model : "";
@@ -426,27 +468,27 @@ class OpenAICompatibleEmbeddingProvider {
426
468
  log2(`[magic-context] embedding endpoint served a DIFFERENT model than requested — refusing the substituted vectors (they have the wrong dimensions/space). requested="${sanitizeDiagnosticText(this.model)}" served="${sanitizeDiagnosticText(servedModel)}". Check that the endpoint serves the requested model; variant suffixes and vendor prefixes are matched automatically.`);
427
469
  this.modelMismatchLogged = true;
428
470
  }
429
- this.recordFailure(isProbe, this.failure("substitution_rejected", `served model '${sanitizeDiagnosticText(servedModel)}' does not match requested '${sanitizeDiagnosticText(this.model)}' (substitution guard)`, false));
471
+ this.recordFailure(requestStartedAt, isProbe, this.failure("substitution_rejected", `served model '${sanitizeDiagnosticText(servedModel)}' does not match requested '${sanitizeDiagnosticText(this.model)}' (substitution guard)`, false));
430
472
  return Array.from({ length: texts.length }, () => null);
431
473
  }
432
474
  const responseKeys = Object.keys(body).sort();
433
475
  if (!Array.isArray(body.data)) {
434
476
  const failure = this.failure("invalid_envelope", `response had keys [${responseKeys.join(", ")}] but data[] was absent`, false);
435
477
  log2(`[magic-context] openai-compatible embedding request failed: ${failure.reason}`);
436
- this.recordFailure(isProbe, failure);
478
+ this.recordFailure(requestStartedAt, isProbe, failure);
437
479
  return Array.from({ length: texts.length }, () => null);
438
480
  }
439
481
  if (body.data.length === 0) {
440
482
  const failure = this.failure("empty_result", "response data[] was empty", true);
441
483
  log2(`[magic-context] openai-compatible embedding request failed: ${failure.reason}`);
442
- this.recordFailure(isProbe, failure);
484
+ this.recordFailure(requestStartedAt, isProbe, failure);
443
485
  return Array.from({ length: texts.length }, () => null);
444
486
  }
445
487
  const slots = responseSlots(body.data, texts.length);
446
488
  if (!slots) {
447
489
  const failure = this.failure("invalid_envelope", "response data[].index values were missing, duplicated or out of range", false);
448
490
  log2(`[magic-context] openai-compatible embedding request failed: ${failure.reason}`);
449
- this.recordFailure(isProbe, failure);
491
+ this.recordFailure(requestStartedAt, isProbe, failure);
450
492
  return Array.from({ length: texts.length }, () => null);
451
493
  }
452
494
  const results = Array.from({ length: texts.length }, () => null);
@@ -460,7 +502,7 @@ class OpenAICompatibleEmbeddingProvider {
460
502
  if (results.every((r) => r === null)) {
461
503
  const failure = this.failure("invalid_envelope", `response had keys [${responseKeys.join(", ")}] but data[].embedding was absent`, false);
462
504
  log2(`[magic-context] openai-compatible embedding request failed: ${failure.reason}`);
463
- this.recordFailure(isProbe, failure);
505
+ this.recordFailure(requestStartedAt, isProbe, failure);
464
506
  } else {
465
507
  this.recordSuccess();
466
508
  }
@@ -471,13 +513,13 @@ class OpenAICompatibleEmbeddingProvider {
471
513
  if (signal?.aborted) {} else {
472
514
  log2(`[magic-context] openai-compatible embedding request timed out after ${FETCH_TIMEOUT_MS}ms`);
473
515
  const failure = this.failure("transport_error", `request timed out after ${FETCH_TIMEOUT_MS}ms`, true);
474
- this.recordFailure(isProbe, failure);
516
+ this.recordFailure(requestStartedAt, isProbe, failure);
475
517
  }
476
518
  } else {
477
519
  const detail = error instanceof Error ? error.message : String(error);
478
520
  const failure = this.failure("transport_error", `transport error: ${sanitizeDiagnosticText(detail)}`, true);
479
521
  log2(`[magic-context] openai-compatible embedding request failed: ${failure.reason}`);
480
- this.recordFailure(isProbe, failure);
522
+ this.recordFailure(requestStartedAt, isProbe, failure);
481
523
  }
482
524
  return Array.from({ length: texts.length }, () => null);
483
525
  } finally {
@@ -549,7 +591,7 @@ class OpenAICompatibleEmbeddingProvider {
549
591
  const excerpt = sanitizeDiagnosticText(body).replace(/\s+/g, " ").trim().slice(0, 200);
550
592
  return excerpt ? `: ${excerpt}` : "";
551
593
  }
552
- recordFailure(isProbe, failure) {
594
+ recordFailure(requestStartedAt, isProbe, failure) {
553
595
  if (failure)
554
596
  this.lastFailureReason = failure;
555
597
  if (isProbe) {
@@ -562,9 +604,9 @@ class OpenAICompatibleEmbeddingProvider {
562
604
  return;
563
605
  }
564
606
  const now = Date.now();
565
- const cutoff = now - FAILURE_WINDOW_MS;
566
- this.failureTimes = this.failureTimes.filter((t) => t > cutoff);
567
- this.failureTimes.push(now);
607
+ const cutoff = requestStartedAt - FAILURE_WINDOW_MS;
608
+ this.failureTimes = this.failureTimes.filter((t) => t >= cutoff);
609
+ this.failureTimes.push(requestStartedAt);
568
610
  if (this.failureTimes.length >= FAILURE_THRESHOLD) {
569
611
  this.circuitOpenUntil = now + OPEN_DURATION_MS;
570
612
  if (!this.openLogged) {
@@ -3102,4 +3144,4 @@ function _resetProjectEmbeddingRegistryForTests2() {
3102
3144
  setBootQuietPeriodForTests(null);
3103
3145
  }
3104
3146
 
3105
- export { OpenAICompatibleEmbeddingProvider, saveCommitEmbedding, loadProjectCommitEmbeddings, loadUnembeddedCommits, countEmbeddedCommits, upsertCommits, getLatestIndexedCommitSha, enforceProjectCap, describeShadowBackfillWriteRefusal2, listShadowBackfillStalls2, retainProjectEmbedding2, getShadowBackfillStopReason2, markProjectLoadUntrusted2, contentSha2562, drainProjectEmbeddingIdentityMaintenance2, drainStaleEmbeddingIdentitiesForProject2, registerProjectEmbedding2, registerProjectShadowEmbedding2, getShadowEmbeddingMeasurementCohort2, getPrimaryEmbeddingMeasurementCohort2, embedShadowTextForProject2, enqueueShadowEmbeddingItems2, getShadowBackfillRemaining2, flushShadowEmbeddingBacklog2, registerProjectInObservationMode2, unregisterProjectShadowEmbedding2, unregisterProjectEmbedding2, getProjectEmbeddingSnapshot2, installProjectEmbeddingSearchBridge2, getProjectChunkEmbeddingModelId2, getProjectEmbeddingMaxInputTokens2, embedTextForProject2, embedBatchForProject2, embedItemsForProject2, embedUnembeddedMemoriesForProject2, embedUnembeddedMemoriesForProjectOutcome2, drainCommitBacklogForProject2, embedUnembeddedCompartmentChunksForProject2, embedSessionCompartmentChunks2, getEmbeddingCoverageStatus2, getAutoEmbeddingSessionCoverage2, sweepAllRegisteredProjects2, _setTestProviderFactoryForProject2, _resetProjectEmbeddingRegistryForTests2 };
3147
+ export { withQueryEmbeddingDeadline, OpenAICompatibleEmbeddingProvider, saveCommitEmbedding, loadProjectCommitEmbeddings, loadUnembeddedCommits, countEmbeddedCommits, upsertCommits, getLatestIndexedCommitSha, enforceProjectCap, describeShadowBackfillWriteRefusal2, listShadowBackfillStalls2, retainProjectEmbedding2, getShadowBackfillStopReason2, markProjectLoadUntrusted2, contentSha2562, drainProjectEmbeddingIdentityMaintenance2, drainStaleEmbeddingIdentitiesForProject2, registerProjectEmbedding2, registerProjectShadowEmbedding2, getShadowEmbeddingMeasurementCohort2, getPrimaryEmbeddingMeasurementCohort2, embedShadowTextForProject2, enqueueShadowEmbeddingItems2, getShadowBackfillRemaining2, flushShadowEmbeddingBacklog2, registerProjectInObservationMode2, unregisterProjectShadowEmbedding2, unregisterProjectEmbedding2, getProjectEmbeddingSnapshot2, installProjectEmbeddingSearchBridge2, getProjectChunkEmbeddingModelId2, getProjectEmbeddingMaxInputTokens2, embedTextForProject2, embedBatchForProject2, embedItemsForProject2, embedUnembeddedMemoriesForProject2, embedUnembeddedMemoriesForProjectOutcome2, drainCommitBacklogForProject2, embedUnembeddedCompartmentChunksForProject2, embedSessionCompartmentChunks2, getEmbeddingCoverageStatus2, getAutoEmbeddingSessionCoverage2, sweepAllRegisteredProjects2, _setTestProviderFactoryForProject2, _resetProjectEmbeddingRegistryForTests2 };
@@ -10,7 +10,7 @@ import {
10
10
  } from "./index-jrfre9ah.js";
11
11
  import {
12
12
  embedTextForProject2
13
- } from "./index-rhcwddn9.js";
13
+ } from "./index-s79g172v.js";
14
14
  import {
15
15
  saveEmbeddingIfHashMatches
16
16
  } from "./index-4dhv7mqz.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  estimateTokens
3
- } from "./index-4xyjr62e.js";
3
+ } from "./index-ak11t3gm.js";
4
4
  import {
5
5
  stableStringify
6
6
  } from "./index-9wnbnx8f.js";
@@ -13,7 +13,7 @@ import {
13
13
  } from "./index-gzy5w8ya.js";
14
14
  import {
15
15
  runSessionWarmupWorker
16
- } from "./index-r2epb000.js";
16
+ } from "./index-xa9mmq6c.js";
17
17
  import {
18
18
  scheduleAfterBootQuiet
19
19
  } from "./index-txs8tce6.js";
@@ -28,7 +28,7 @@ import {
28
28
  clearIndexedMessages,
29
29
  indexSingleMessage,
30
30
  indexMessagesAfterOrdinal
31
- } from "./index-m1mttf6y.js";
31
+ } from "./index-bzq05g00.js";
32
32
 
33
33
  // src/features/magic-context/message-index-async.ts
34
34
  var indexCancellations = new Map;
@@ -24,7 +24,7 @@ import {
24
24
  TAG_SELECT_COLUMNS2,
25
25
  getCandidateToolOwners2,
26
26
  pickNearestPriorOwner2
27
- } from "./index-8jjjmhab.js";
27
+ } from "./index-gxqr0sbd.js";
28
28
  import {
29
29
  OMO_INTERNAL_INITIATOR_MARKER,
30
30
  isSystemDirective,
@@ -42,7 +42,7 @@ import {
42
42
  formatBlock,
43
43
  compactTextForSummary,
44
44
  mergeCommitHashes
45
- } from "./index-4xyjr62e.js";
45
+ } from "./index-ak11t3gm.js";
46
46
  import {
47
47
  prepareCachedStatement2
48
48
  } from "./index-gzy5w8ya.js";
@@ -70,18 +70,18 @@ import {
70
70
  readRawSeedTailFromDb2,
71
71
  readRawSessionBoundaryEndpointsFromDb2,
72
72
  prewarmRawSessionOrdinalsForDb
73
- } from "./index-r2epb000.js";
73
+ } from "./index-xa9mmq6c.js";
74
74
  import {
75
75
  openCodeDbExists,
76
76
  withReadOnlySessionDb,
77
77
  getRawSessionMessageCountFromDb,
78
78
  getMessageTimesFromOpenCodeDb
79
- } from "./index-vd2ywmfe.js";
79
+ } from "./index-brj6was5.js";
80
80
  import {
81
81
  getToolDefinitionMeasurementSignature,
82
82
  getMeasuredToolDefinitionTokens,
83
83
  getSessionToolDefinitionTokens
84
- } from "./index-jkanybgq.js";
84
+ } from "./index-smtbdmc3.js";
85
85
  import {
86
86
  markHostUnservedRow,
87
87
  isHostUnservedRow
@@ -4472,6 +4472,9 @@ function detectLatestTurnThinkingMismatch(error) {
4472
4472
  }
4473
4473
  var PREFIX_BOUND_THINKING_MODELS = [
4474
4474
  ["fable", 5, 1],
4475
+ ["fable", 5, 2],
4476
+ ["mythos", 5, 1],
4477
+ ["mythos", 5, 2],
4475
4478
  ["opus", 5, 5],
4476
4479
  ["sonnet", 5, 5],
4477
4480
  ["haiku", 5, 5]
@@ -236,7 +236,8 @@ var RAW_SUMMARY_TOOL_INPUT_KEYS = [
236
236
  "query",
237
237
  "symbol",
238
238
  "module",
239
- "action"
239
+ "action",
240
+ "command"
240
241
  ];
241
242
  function summaryStringField(jsonPath) {
242
243
  return `CASE WHEN json_type(data, '${jsonPath}') = 'text' THEN substr(json_extract(data, '${jsonPath}'), 1, ${RAW_SUMMARY_ARG_MAX_CHARS}) END`;
@@ -72,7 +72,7 @@ import {
72
72
  getRawSessionTagKeysThrough2,
73
73
  getLegacyProtectedTailStartOrdinal2,
74
74
  readSessionChunk2
75
- } from "./index-1j8m4ad0.js";
75
+ } from "./index-wwg1je98.js";
76
76
  import {
77
77
  getHarness2,
78
78
  harnessOwnsOpenCodeStore2
@@ -133,7 +133,7 @@ import {
133
133
  hasMeaningfulUserText2,
134
134
  estimateTokens,
135
135
  estimateFixedPromptTokens
136
- } from "./index-4xyjr62e.js";
136
+ } from "./index-ak11t3gm.js";
137
137
  import {
138
138
  FAIL_CLOSED_DOCTOR_COMMAND
139
139
  } from "./index-wh9fxds5.js";
@@ -153,7 +153,7 @@ import {
153
153
  LATEST_SUPPORTED_VERSION,
154
154
  getPersistedSchemaVersion,
155
155
  openDatabase
156
- } from "./index-6qnhaaa0.js";
156
+ } from "./index-z8dacvkt.js";
157
157
  import {
158
158
  areRustHistorianSyntheticParts2,
159
159
  isStrictGapHealingMessage2,
@@ -161,7 +161,7 @@ import {
161
161
  RawOrdinalsNotReady2,
162
162
  dropRawSessionOrdinalCheckpoints2,
163
163
  runSessionWarmupWorker
164
- } from "./index-r2epb000.js";
164
+ } from "./index-xa9mmq6c.js";
165
165
  import {
166
166
  parseCompartmentOutput,
167
167
  resolveWorkspaceShareCategories,
@@ -184,7 +184,7 @@ import {
184
184
  } from "./index-58e3y90n.js";
185
185
  import {
186
186
  BoundedSessionMap
187
- } from "./index-jkanybgq.js";
187
+ } from "./index-smtbdmc3.js";
188
188
  import {
189
189
  invalidateAutoEmbedSession
190
190
  } from "./index-2amn2s73.js";
@@ -197,7 +197,7 @@ import {
197
197
  replaceCompartmentChunkEmbeddings2,
198
198
  deleteChunkEmbedBackoffForSession2,
199
199
  chunkWindowSourceKey2
200
- } from "./index-dcjkw41m.js";
200
+ } from "./index-qcz1fy7h.js";
201
201
  import {
202
202
  COMPARTMENT_LEASE_RENEWAL_MS,
203
203
  getCompartmentLeaseBlocker,
@@ -239,14 +239,14 @@ import {
239
239
  getProjectState,
240
240
  recordSubagentInvocation,
241
241
  getLatestHistorianInvocationId
242
- } from "./index-dasvhxwg.js";
242
+ } from "./index-jwa5t1s4.js";
243
243
  import {
244
244
  clearCompressionDepth,
245
245
  clearCompressionDepthRange,
246
246
  toMessageIndexSource,
247
247
  clearIndexedMessagesInTransaction,
248
248
  indexSourcesAfterOrdinal
249
- } from "./index-m1mttf6y.js";
249
+ } from "./index-bzq05g00.js";
250
250
  import {
251
251
  stripWellFormedLeadingTagPrefix,
252
252
  peelLeadingMcTagNotation,
@@ -257,12 +257,12 @@ import {
257
257
  foldShrunkPartTags2,
258
258
  getTagNumberByMessageId2,
259
259
  getActiveTagsBySession2
260
- } from "./index-8jjjmhab.js";
260
+ } from "./index-gxqr0sbd.js";
261
261
  import {
262
262
  openCodeDbExists,
263
263
  withReadOnlySessionDb,
264
264
  getMessageTimesFromOpenCodeDb
265
- } from "./index-vd2ywmfe.js";
265
+ } from "./index-brj6was5.js";
266
266
  import {
267
267
  getSessionNotes,
268
268
  getReadySmartNotes,
@@ -285,13 +285,13 @@ import {
285
285
  getProjectChunkEmbeddingModelId2,
286
286
  getProjectEmbeddingMaxInputTokens2,
287
287
  embedItemsForProject2
288
- } from "./index-rhcwddn9.js";
288
+ } from "./index-s79g172v.js";
289
289
  import {
290
290
  renderUserFacingFailure,
291
291
  userFacingFailureCode,
292
292
  promoteSessionFactsDurable,
293
293
  embedPromotedFacts
294
- } from "./index-kgk64zyx.js";
294
+ } from "./index-sd2s4t4p.js";
295
295
  import {
296
296
  isMarkerCandidateBasisCurrent2,
297
297
  invalidateMarkerCandidateBasis2,
@@ -305,7 +305,7 @@ import {
305
305
  } from "./index-gn6gfz4y.js";
306
306
  import {
307
307
  sendStatusNotification2
308
- } from "./index-ae1ar4v1.js";
308
+ } from "./index-25ka1jza.js";
309
309
  import {
310
310
  isCompactionEnabled,
311
311
  migrateLegacyAgentEnabledInMemory
@@ -49,7 +49,7 @@ import {
49
49
  } from "./index-96ztjvkn.js";
50
50
  import {
51
51
  startMessageFtsRowidMapBackfill2
52
- } from "./index-b1ydbp95.js";
52
+ } from "./index-h9m41624.js";
53
53
  import {
54
54
  LKG_SLOT_CHUNKS_DDL,
55
55
  SESSION_REPLAY_DECISIONS_DDL,
@@ -72,7 +72,7 @@ import {
72
72
  import {
73
73
  setDatabase,
74
74
  loadToolDefinitionMeasurements
75
- } from "./index-jkanybgq.js";
75
+ } from "./index-smtbdmc3.js";
76
76
  import {
77
77
  getErrorMessage
78
78
  } from "./index-y8v6yerm.js";
@@ -1024,7 +1024,7 @@ function finishDatabaseOpen(db, dbPath, explicitDbPath, latestSupportedVersion)
1024
1024
  state.running = startMessageFtsRowidMapBackfill2(db, signal).then(async () => {
1025
1025
  if (signal.aborted || !readsOpenCodeStore)
1026
1026
  return;
1027
- const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-3m7z9v3t.js"));
1027
+ const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-k3fqshw8.js"));
1028
1028
  const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-39bm498k.js"));
1029
1029
  if (signal.aborted)
1030
1030
  return;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAmHvE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AA6jCpC,QAAA,MAAM,MAAM,EAAE,YAAY,GAAG;IAAE,KAAK,EAAE,OAAO,KAAK,CAAA;CAIjD,CAAC;AAEF,eAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiB,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAsHvE,OAAO,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AA8jCpC,QAAA,MAAM,MAAM,EAAE,YAAY,GAAG;IAAE,KAAK,EAAE,OAAO,KAAK,CAAA;CAIjD,CAAC;AAEF,eAAe,MAAM,CAAC"}