@cortexkit/pi-magic-context 0.49.49 → 0.49.50

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 (29) hide show
  1. package/dist/auto-search-worker.js +3 -3
  2. package/dist/chunk-embedding-write-worker.js +1 -1
  3. package/dist/{embedding-backfill-xsd7fc5c.js → embedding-backfill-fbhpk2yy.js} +4 -4
  4. package/dist/embedding-worker.js +2 -2
  5. package/dist/{index-y2g8rdmm.js → index-06rdy9h6.js} +4 -2
  6. package/dist/{index-vdrqxca5.js → index-38bm78h4.js} +14 -10
  7. package/dist/{index-zrbvwxtb.js → index-38pf5bqw.js} +4 -2
  8. package/dist/{index-9036v8ay.js → index-4j5442b0.js} +1 -1
  9. package/dist/{index-bjeb4ya4.js → index-4ss8c8ky.js} +3 -3
  10. package/dist/{index-gzk7d940.js → index-aec63gtj.js} +3 -0
  11. package/dist/{index-zggajt0j.js → index-ch3rvpjg.js} +1 -1
  12. package/dist/{index-8bpxfq4c.js → index-jexm22qn.js} +3 -3
  13. package/dist/{index-9n1hyjck.js → index-jy9fq8gp.js} +3 -3
  14. package/dist/{index-cmyk3bmf.js → index-r6dj8rm9.js} +20 -4
  15. package/dist/{index-yc4vfwvm.js → index-ty2m0s0s.js} +4 -3
  16. package/dist/{index-wz66mger.js → index-ywvhr524.js} +1 -1
  17. package/dist/index.js +157 -97
  18. package/dist/{message-index-bounded-6zghm1jn.js → message-index-bounded-wg71m86d.js} +3 -3
  19. package/dist/migration-worker.js +1 -1
  20. package/dist/{project-embedding-registry-j4ywdpq0.js → project-embedding-registry-hpca84nz.js} +3 -3
  21. package/dist/raw-ordinal-warmup-worker.js +3 -3
  22. package/dist/{read-session-chunk-hs4jtxsm.js → read-session-chunk-dmpabgvh.js} +2 -2
  23. package/dist/{render-n3y6kvwq.js → render-71rpjt3g.js} +5 -5
  24. package/dist/{search-archive-1g44f9jt.js → search-archive-w12r0c45.js} +4 -4
  25. package/dist/{search-gzkbjgx0.js → search-m61nenns.js} +7 -7
  26. package/dist/subagent-entry.js +12 -12
  27. package/dist/tag-snapshot-worker-pi.js +1 -1
  28. package/dist/{v2-archive-reader-sez4pjd8.js → v2-archive-reader-5n1w78zj.js} +1 -1
  29. package/package.json +1 -1
@@ -27,11 +27,11 @@ serveWorkerJobs(async (initial, port) => {
27
27
  { Database, registerSqliteDiagnosticSink },
28
28
  { log }
29
29
  ] = await Promise.all([
30
- import("./embedding-backfill-xsd7fc5c.js"),
30
+ import("./embedding-backfill-fbhpk2yy.js"),
31
31
  import("./embedding-cache-7rp4gqzr.js"),
32
32
  import("./storage-memory-0ndn65fm.js"),
33
- import("./project-embedding-registry-j4ywdpq0.js"),
34
- import("./search-gzkbjgx0.js"),
33
+ import("./project-embedding-registry-hpca84nz.js"),
34
+ import("./search-m61nenns.js"),
35
35
  import("./compartment-chunk-embedding-wg7emg3z.js"),
36
36
  import("./embedding-activity-ew6dshfd.js"),
37
37
  import("./harness-9872e0ym.js"),
@@ -35,7 +35,7 @@ import"./index-xx1911hb.js";
35
35
  import {
36
36
  LATEST_SUPPORTED_VERSION,
37
37
  enforceSchemaFence
38
- } from "./index-y2g8rdmm.js";
38
+ } from "./index-06rdy9h6.js";
39
39
  import"./index-3bb24eb6.js";
40
40
  import"./index-zc6fdyx7.js";
41
41
  import"./index-jxm4bvm4.js";
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  ensureMemoryEmbeddings2
3
- } from "./index-yc4vfwvm.js";
4
- import"./index-cmyk3bmf.js";
3
+ } from "./index-ty2m0s0s.js";
4
+ import"./index-r6dj8rm9.js";
5
5
  import"./index-9p40dgkm.js";
6
6
  import"./index-hgd00nas.js";
7
7
  import"./index-yhzhdp3m.js";
8
8
  import"./index-zxm7ckvc.js";
9
9
  import"./index-ndg15t3x.js";
10
- import"./index-zrbvwxtb.js";
10
+ import"./index-38pf5bqw.js";
11
11
  import"./index-qm139qq2.js";
12
- import"./index-gzk7d940.js";
12
+ import"./index-aec63gtj.js";
13
13
  import"./index-xx1911hb.js";
14
14
  import"./index-6d0bby9d.js";
15
15
  import"./index-szn2tac8.js";
@@ -5,7 +5,7 @@ import {
5
5
  log2
6
6
  } from "./index-yxeg8zaa.js";
7
7
  import"./index-dnp1jjar.js";
8
- import"./index-gzk7d940.js";
8
+ import"./index-aec63gtj.js";
9
9
  import"./index-qm139qq2.js";
10
10
  import"./index-7y60kyea.js";
11
11
  import"./index-2qtx0q6h.js";
@@ -13,7 +13,7 @@ import {
13
13
  resolveLocalEmbeddingWorkerRuntime,
14
14
  getLocalEmbeddingNativeMemoryStats,
15
15
  LocalEmbeddingProvider
16
- } from "./index-zrbvwxtb.js";
16
+ } from "./index-38pf5bqw.js";
17
17
  import {
18
18
  setStoragePrivatePermissionEnforcement
19
19
  } from "./index-81nthk8j.js";
@@ -1336,6 +1336,7 @@ var databases = new Map;
1336
1336
  var pendingAsyncOpens = new Map;
1337
1337
  var pendingDatabaseCloses = new Set;
1338
1338
  var startupBackfills = new WeakMap;
1339
+ var scheduleStartupMaintenanceOnOpen = true;
1339
1340
  var persistenceByDatabase = new WeakMap;
1340
1341
  var persistenceErrorByDatabase = new WeakMap;
1341
1342
  var pathByDatabase = new WeakMap;
@@ -1768,7 +1769,7 @@ function finishDatabaseOpen(db, dbPath, explicitDbPath, latestSupportedVersion)
1768
1769
  return null;
1769
1770
  }
1770
1771
  healWedgedChannel2Claims(db);
1771
- if (!explicitDbPath) {
1772
+ if (!explicitDbPath && scheduleStartupMaintenanceOnOpen) {
1772
1773
  const readsOpenCodeStore = harnessOwnsOpenCodeStore2();
1773
1774
  const state = { controller: new AbortController };
1774
1775
  startupBackfills.set(db, state);
@@ -1788,7 +1789,7 @@ function finishDatabaseOpen(db, dbPath, explicitDbPath, latestSupportedVersion)
1788
1789
  state.running = startMessageFtsRowidMapBackfill2(db, signal).then(async () => {
1789
1790
  if (signal.aborted || !readsOpenCodeStore)
1790
1791
  return;
1791
- const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-hs4jtxsm.js"));
1792
+ const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-dmpabgvh.js"));
1792
1793
  const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-krre2qnb.js"));
1793
1794
  if (signal.aborted)
1794
1795
  return;
@@ -1809,6 +1810,7 @@ function finishDatabaseOpen(db, dbPath, explicitDbPath, latestSupportedVersion)
1809
1810
  log2(`[magic-context] message-index backfill failed (will resume next startup): ${getErrorMessage(error)}`);
1810
1811
  });
1811
1812
  }));
1813
+ state.run = runBackfills;
1812
1814
  state.timer = scheduleAfterBootQuiet(runBackfills);
1813
1815
  }
1814
1816
  setDatabase(db);
@@ -30,7 +30,7 @@ import {
30
30
  PER_HARNESS_MODEL_KEYS,
31
31
  ConfigProfilesSchema,
32
32
  MagicContextConfigSchema
33
- } from "./index-gzk7d940.js";
33
+ } from "./index-aec63gtj.js";
34
34
  import {
35
35
  V2_MEMORY_CATEGORIES,
36
36
  CATEGORY_PRIORITY,
@@ -56,7 +56,7 @@ import {
56
56
  import {
57
57
  piHarnessKindFromExecutable,
58
58
  getErrorMessage
59
- } from "./index-y2g8rdmm.js";
59
+ } from "./index-06rdy9h6.js";
60
60
  import {
61
61
  getOrCreateSessionMeta,
62
62
  updateSessionMeta,
@@ -70,10 +70,10 @@ import {
70
70
  renderMessageByOrdinal2,
71
71
  renderVerboseRange2,
72
72
  renderItemByTag2
73
- } from "./index-9n1hyjck.js";
73
+ } from "./index-jy9fq8gp.js";
74
74
  import {
75
75
  getLastIndexedOrdinal
76
- } from "./index-wz66mger.js";
76
+ } from "./index-ywvhr524.js";
77
77
  import {
78
78
  setNoteLastReadAt,
79
79
  getPersistedCompactionMarkerState,
@@ -83,7 +83,7 @@ import {
83
83
  hasRawMessageProvider2,
84
84
  setRawMessageProvider2,
85
85
  readSessionChunk2
86
- } from "./index-9036v8ay.js";
86
+ } from "./index-4j5442b0.js";
87
87
  import {
88
88
  stableStringify
89
89
  } from "./index-jxm4bvm4.js";
@@ -109,7 +109,7 @@ import {
109
109
  } from "./index-yhzhdp3m.js";
110
110
  import {
111
111
  preflightLocalEmbeddingPooling
112
- } from "./index-zrbvwxtb.js";
112
+ } from "./index-38pf5bqw.js";
113
113
  import {
114
114
  withQueryEmbeddingDeadline,
115
115
  markProjectLoadUntrusted2,
@@ -121,7 +121,7 @@ import {
121
121
  unregisterProjectEmbedding2,
122
122
  getProjectEmbeddingSnapshot2,
123
123
  embedTextForProject2
124
- } from "./index-cmyk3bmf.js";
124
+ } from "./index-r6dj8rm9.js";
125
125
  import {
126
126
  directoryHasGitMetadata,
127
127
  resolveProjectIdentityForSession,
@@ -134,7 +134,7 @@ import {
134
134
  resolveMemoriesByIdsForSearch2,
135
135
  unifiedSearch2,
136
136
  formatSearchResults2
137
- } from "./index-bjeb4ya4.js";
137
+ } from "./index-4ss8c8ky.js";
138
138
  import {
139
139
  TODO_STATUSES,
140
140
  TODO_PRIORITIES,
@@ -184,7 +184,7 @@ import {
184
184
  } from "./index-xssjy4z9.js";
185
185
  import {
186
186
  renderSearchArchive2
187
- } from "./index-zggajt0j.js";
187
+ } from "./index-ch3rvpjg.js";
188
188
  import {
189
189
  computeNormalizedHash
190
190
  } from "./index-9x1f96r8.js";
@@ -1732,7 +1732,8 @@ var EMBEDDING_USER_ONLY_FIELDS = [
1732
1732
  "provider",
1733
1733
  "fallback_provider",
1734
1734
  "query_instruction",
1735
- "document_prefix"
1735
+ "document_prefix",
1736
+ "dimensions"
1736
1737
  ];
1737
1738
  var PERCENTAGE_THRESHOLD_REASON = "security: a repository may only raise compaction thresholds above the user's effective value; it cannot force earlier historian work or cloned-repo cost escalation.";
1738
1739
  var TOKEN_THRESHOLD_REASON = "security: a repository may only raise execute_threshold_tokens above the user's trusted token threshold; it cannot force earlier historian work or cloned-repo cost escalation.";
@@ -6554,6 +6555,7 @@ var EMBEDDING_AFFECTING_KEYS = new Set([
6554
6555
  "embedding.provider",
6555
6556
  "embedding.input_type",
6556
6557
  "embedding.truncate",
6558
+ "embedding.dimensions",
6557
6559
  "embedding.max_input_tokens",
6558
6560
  "embedding.query_input_type",
6559
6561
  "embedding.query_instruction",
@@ -6672,6 +6674,7 @@ function fallbackConfig(config, provider) {
6672
6674
  const queryInstruction = typeof raw.query_instruction === "string" || raw.query_instruction === false ? raw.query_instruction : undefined;
6673
6675
  const documentPrefix = typeof raw.document_prefix === "string" ? raw.document_prefix : undefined;
6674
6676
  const truncate = typeof raw.truncate === "string" ? raw.truncate.trim() : "";
6677
+ const dimensions = typeof raw.dimensions === "number" ? raw.dimensions : undefined;
6675
6678
  const maxInputTokens = typeof raw.max_input_tokens === "number" ? raw.max_input_tokens : undefined;
6676
6679
  if (provider === "off")
6677
6680
  return { provider: "off" };
@@ -6686,6 +6689,7 @@ function fallbackConfig(config, provider) {
6686
6689
  ...queryInstruction !== undefined ? { query_instruction: queryInstruction } : {},
6687
6690
  ...documentPrefix !== undefined ? { document_prefix: documentPrefix } : {},
6688
6691
  ...truncate ? { truncate } : {},
6692
+ ...dimensions !== undefined ? { dimensions } : {},
6689
6693
  ...maxInputTokens !== undefined ? { max_input_tokens: maxInputTokens } : {}
6690
6694
  };
6691
6695
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_LOCAL_EMBEDDING_MODEL
3
- } from "./index-gzk7d940.js";
3
+ } from "./index-aec63gtj.js";
4
4
  import {
5
5
  getSynapseLaneIdentity
6
6
  } from "./index-qm139qq2.js";
@@ -543,6 +543,7 @@ function getEmbeddingProviderIdentity(config) {
543
543
  throw new Error("Unknown embedding provider");
544
544
  }
545
545
  const truncate = config.provider === "openai-compatible" ? config.truncate?.trim() : undefined;
546
+ const dimensions = config.provider === "openai-compatible" ? config.dimensions : undefined;
546
547
  const documentPrefix = config.provider === "openai-compatible" ? resolveEmbeddingTextPrefixes(config.model, config.query_instruction, config.document_prefix).documentPrefix : "";
547
548
  const localDtype = config.provider === "local" && config.local_dtype && config.local_dtype !== "fp32" ? config.local_dtype : undefined;
548
549
  const localPooling = config.provider === "local" ? getCachedLocalEmbeddingPooling(config.model?.trim() || DEFAULT_LOCAL_EMBEDDING_MODEL) : null;
@@ -554,7 +555,8 @@ function getEmbeddingProviderIdentity(config) {
554
555
  apiKeyPresent: Boolean(config.api_key?.trim()),
555
556
  inputType: config.input_type?.trim() || "",
556
557
  ...documentPrefix ? { documentPrefix } : {},
557
- ...truncate ? { truncate } : {}
558
+ ...truncate ? { truncate } : {},
559
+ ...dimensions ? { dimensions } : {}
558
560
  } : {
559
561
  provider: "local",
560
562
  model: config.model?.trim() || DEFAULT_LOCAL_EMBEDDING_MODEL,
@@ -4,7 +4,7 @@ import {
4
4
  renderToolTemplate,
5
5
  resolveModelConfigValue,
6
6
  deriveDefaultProtectedTokens
7
- } from "./index-gzk7d940.js";
7
+ } from "./index-aec63gtj.js";
8
8
  import {
9
9
  getHarness2,
10
10
  harnessOwnsOpenCodeStore2
@@ -47,7 +47,7 @@ import {
47
47
  getProjectEmbeddingSnapshot2,
48
48
  embedTextForProject2,
49
49
  embedItemsForProject2
50
- } from "./index-cmyk3bmf.js";
50
+ } from "./index-r6dj8rm9.js";
51
51
  import {
52
52
  recordEmbeddingMeasurement
53
53
  } from "./index-hgd00nas.js";
@@ -63,7 +63,7 @@ import {
63
63
  isEmbeddingEnabled,
64
64
  embedText,
65
65
  ensureMemoryEmbeddings2
66
- } from "./index-yc4vfwvm.js";
66
+ } from "./index-ty2m0s0s.js";
67
67
  import {
68
68
  getMemorySelectColumns2,
69
69
  isMemoryRow2,
@@ -91,7 +91,7 @@ import {
91
91
  clearIndexedMessages,
92
92
  indexSingleMessage,
93
93
  indexMessagesAfterOrdinal
94
- } from "./index-wz66mger.js";
94
+ } from "./index-ywvhr524.js";
95
95
  import {
96
96
  MESSAGE_FTS_SESSION_FILTER_SQL,
97
97
  withMessageFtsSessionFilter
@@ -6710,6 +6710,7 @@ var BaseEmbeddingConfigSchema = object({
6710
6710
  query_instruction: union([string2(), literal(false)]).optional().describe("OpenAI-compatible query prefix override. A string is prepended verbatim to search queries; false disables the built-in model-family instruction. Qwen3-Embedding, gte-Qwen instruct, e5 instruct, and Nomic families have built-in recipes. Query-only changes do not re-embed stored content. User-level only; project values are ignored."),
6711
6711
  document_prefix: string2().optional().describe("OpenAI-compatible stored-document prefix override, prepended verbatim. Defaults to the model-family recipe (empty for Qwen3/gte/e5 instruct; 'search_document: ' for Nomic). Changing it changes stored vectors and triggers re-embedding. User-level only; project values are ignored."),
6712
6712
  truncate: string2().optional().describe("Optional truncate mode sent in the embedding request body (e.g. NVIDIA NIM accepts 'NONE' | 'START' | 'END'). Omitted from the request when unset."),
6713
+ dimensions: number2().int().min(1).max(8192).optional().describe("Optional output width for Matryoshka embedding models (e.g. Qwen3-Embedding-8B accepts 768 | 1024 | 2048 | 4096; OpenAI text-embedding-3-* accept smaller widths than native). Sent as the OpenAI-compatible `dimensions` request field. Omitted from the request when unset, so the endpoint default applies. Changing it changes the produced vectors and folds into the embedding model identity, so switching widths re-embeds rather than mixing vector spaces. Not supported for the local provider, and ignored from project config like the other embedding fields (a repository cannot choose how private text is embedded)."),
6713
6714
  max_input_tokens: number2().int().positive().optional().describe("Optional maximum input tokens for chunk embeddings. Defaults conservatively to 512 when omitted."),
6714
6715
  local_runtime: _enum(["auto", "native", "wasm"]).default("auto").describe("Local provider only: ONNX runtime selection. 'auto' uses native under Node and uses WASM under Bun versions before 1.4.0, where Bun's NAPI teardown race can panic on quit; native is restored automatically on Bun 1.4.0+. Inference runs in a dedicated worker after disabling POSIX telemetry in the native process environment. Compiled Bun hosts and hosts without a verified in-process opt-out use a subprocess instead. Windows native ONNX emits OS-controlled ETW diagnostics, not direct uploads. On Bun before 1.4.0, even explicit 'native' uses WASM because native worker teardown can crash the process. Set 'wasm' to avoid loading the native addon on newer hosts too."),
6715
6716
  local_dtype: _enum([
@@ -6758,6 +6759,7 @@ var EmbeddingConfigSchema = BaseEmbeddingConfigSchema.transform((data) => {
6758
6759
  ...model ? { model } : {},
6759
6760
  ...endpoint ? { endpoint } : {},
6760
6761
  ...apiKey ? { api_key: apiKey } : {},
6762
+ ...data.dimensions ? { dimensions: data.dimensions } : {},
6761
6763
  ...inputType ? { input_type: inputType } : {},
6762
6764
  ...queryInputType ? { query_input_type: queryInputType } : {},
6763
6765
  ...data.query_instruction !== undefined ? { query_instruction: data.query_instruction } : {},
@@ -6784,6 +6786,7 @@ var EmbeddingConfigSchema = BaseEmbeddingConfigSchema.transform((data) => {
6784
6786
  provider: "openai-compatible",
6785
6787
  model: data.model?.trim() ?? "",
6786
6788
  endpoint: data.endpoint?.trim() ?? "",
6789
+ ...data.dimensions ? { dimensions: data.dimensions } : {},
6787
6790
  ...apiKey ? { api_key: apiKey } : {},
6788
6791
  ...inputType ? { input_type: inputType } : {},
6789
6792
  ...queryInputType ? { query_input_type: queryInputType } : {},
@@ -6,7 +6,7 @@ import {
6
6
  } from "./index-7y60kyea.js";
7
7
  import {
8
8
  readRawSessionMessageIdOrdinalsForRange2
9
- } from "./index-9036v8ay.js";
9
+ } from "./index-4j5442b0.js";
10
10
 
11
11
  // ../plugin/src/tools/ctx-expand/search-archive.ts
12
12
  var archiveReadsOnThisThread = 0;
@@ -139,9 +139,9 @@ async function serveV2ArchiveReads2(port, openConnections) {
139
139
  import("./sqlite-v89bj0yy.js"),
140
140
  import("./store-reader-mmfw2h48.js"),
141
141
  import("./store-0hhs1db3.js"),
142
- import("./read-session-chunk-hs4jtxsm.js"),
143
- import("./render-n3y6kvwq.js"),
144
- import("./search-archive-1g44f9jt.js"),
142
+ import("./read-session-chunk-dmpabgvh.js"),
143
+ import("./render-71rpjt3g.js"),
144
+ import("./search-archive-w12r0c45.js"),
145
145
  import("./expand-attachments-8sxeyj26.js")
146
146
  ]);
147
147
  const pool = new V2StoreReaderPool;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  piModelRefToCanonical
3
- } from "./index-gzk7d940.js";
3
+ } from "./index-aec63gtj.js";
4
4
  import {
5
5
  getHarness2
6
6
  } from "./index-0h2mkab2.js";
@@ -39,7 +39,7 @@ import {
39
39
  expandToolPart,
40
40
  visitRawSessionMessages2,
41
41
  readRawSessionMessageById2
42
- } from "./index-9036v8ay.js";
42
+ } from "./index-4j5442b0.js";
43
43
  import {
44
44
  isRecord,
45
45
  providerVisibleMessage,
@@ -64,7 +64,7 @@ import {
64
64
  import {
65
65
  isPidAlive,
66
66
  readProcessStartTime
67
- } from "./index-y2g8rdmm.js";
67
+ } from "./index-06rdy9h6.js";
68
68
  import {
69
69
  gaDatabasePath2,
70
70
  V2StoreReader2
@@ -46,7 +46,7 @@ import {
46
46
  } from "./index-ndg15t3x.js";
47
47
  import {
48
48
  DEFAULT_LOCAL_EMBEDDING_MODEL
49
- } from "./index-gzk7d940.js";
49
+ } from "./index-aec63gtj.js";
50
50
  import {
51
51
  embeddingModelsMatch,
52
52
  resolveEmbeddingTextPrefixes,
@@ -56,7 +56,7 @@ import {
56
56
  getEmbeddingProviderIdentity,
57
57
  dominantEmbeddingFailure,
58
58
  LocalEmbeddingProvider
59
- } from "./index-zrbvwxtb.js";
59
+ } from "./index-38pf5bqw.js";
60
60
  import {
61
61
  embedPauseBySession,
62
62
  activeEmbeddingSessions,
@@ -284,6 +284,7 @@ class OpenAICompatibleEmbeddingProvider {
284
284
  queryPrefix;
285
285
  documentPrefix;
286
286
  truncate;
287
+ dimensions;
287
288
  initialized = false;
288
289
  failureTimes = [];
289
290
  circuitOpenUntil = 0;
@@ -303,6 +304,7 @@ class OpenAICompatibleEmbeddingProvider {
303
304
  this.queryPrefix = prefixes.queryPrefix;
304
305
  this.documentPrefix = prefixes.documentPrefix;
305
306
  this.truncate = options.truncate?.trim() ?? "";
307
+ this.dimensions = typeof options.dimensions === "number" && Number.isInteger(options.dimensions) && options.dimensions > 0 ? options.dimensions : undefined;
306
308
  this.rateLimitKey = rateLimitStateKey(this.endpoint, this.apiKey);
307
309
  const maxInputTokensSet = typeof options.maxInputTokens === "number" && Number.isFinite(options.maxInputTokens);
308
310
  this.maxInputTokens = maxInputTokensSet ? Math.max(1, Math.floor(options.maxInputTokens)) : DEFAULT_COMPARTMENT_CHUNK_MAX_INPUT_TOKENS2;
@@ -320,7 +322,8 @@ class OpenAICompatibleEmbeddingProvider {
320
322
  ...this.apiKey ? { api_key: this.apiKey } : {},
321
323
  ...this.inputType ? { input_type: this.inputType } : {},
322
324
  ...options.documentPrefix !== undefined ? { document_prefix: options.documentPrefix } : {},
323
- ...this.truncate ? { truncate: this.truncate } : {}
325
+ ...this.truncate ? { truncate: this.truncate } : {},
326
+ ...this.dimensions ? { dimensions: this.dimensions } : {}
324
327
  });
325
328
  }
326
329
  async initialize() {
@@ -426,7 +429,8 @@ class OpenAICompatibleEmbeddingProvider {
426
429
  model: this.model,
427
430
  input: requestTexts,
428
431
  ...inputTypeForRequest ? { input_type: inputTypeForRequest } : {},
429
- ...this.truncate ? { truncate: this.truncate } : {}
432
+ ...this.truncate ? { truncate: this.truncate } : {},
433
+ ...this.dimensions ? { dimensions: this.dimensions } : {}
430
434
  }),
431
435
  redirect: "error",
432
436
  signal: internalController.signal
@@ -499,6 +503,16 @@ class OpenAICompatibleEmbeddingProvider {
499
503
  results[slot] = Float32Array.from(embedding);
500
504
  }
501
505
  });
506
+ if (this.dimensions !== undefined) {
507
+ const requested = this.dimensions;
508
+ const returned = results.find((r) => r !== null && r.length !== requested)?.length;
509
+ if (returned !== undefined) {
510
+ const failure = this.failure("invalid_envelope", `requested dimensions=${requested} but endpoint returned ${returned}-dim vectors; the endpoint may not support the dimensions parameter for this model`, false);
511
+ log2(`[magic-context] openai-compatible embedding request failed: ${failure.reason}`);
512
+ this.recordFailure(requestStartedAt, isProbe, failure);
513
+ return Array.from({ length: texts.length }, () => null);
514
+ }
515
+ }
502
516
  if (results.every((r) => r === null)) {
503
517
  const failure = this.failure("invalid_envelope", `response had keys [${responseKeys.join(", ")}] but data[].embedding was absent`, false);
504
518
  log2(`[magic-context] openai-compatible embedding request failed: ${failure.reason}`);
@@ -1240,6 +1254,7 @@ function resolveEmbeddingConfig(config) {
1240
1254
  ...config.query_instruction !== undefined ? { query_instruction: config.query_instruction } : {},
1241
1255
  ...config.document_prefix !== undefined ? { document_prefix: config.document_prefix } : {},
1242
1256
  ...truncate ? { truncate } : {},
1257
+ ...config.dimensions ? { dimensions: config.dimensions } : {},
1243
1258
  ...config.max_input_tokens ? {
1244
1259
  max_input_tokens: normalizeCompartmentChunkMaxInputTokens2(config.max_input_tokens)
1245
1260
  } : {}
@@ -1289,6 +1304,7 @@ function createProvider(config, context) {
1289
1304
  queryInstruction: config.query_instruction,
1290
1305
  documentPrefix: config.document_prefix,
1291
1306
  truncate: config.truncate,
1307
+ dimensions: config.dimensions,
1292
1308
  maxInputTokens: config.max_input_tokens
1293
1309
  });
1294
1310
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  DEFAULT_LOCAL_EMBEDDING_MODEL
3
- } from "./index-gzk7d940.js";
3
+ } from "./index-aec63gtj.js";
4
4
  import {
5
5
  log2
6
6
  } from "./index-yxeg8zaa.js";
@@ -10,12 +10,12 @@ import {
10
10
  } from "./index-qm139qq2.js";
11
11
  import {
12
12
  LocalEmbeddingProvider
13
- } from "./index-zrbvwxtb.js";
13
+ } from "./index-38pf5bqw.js";
14
14
  import {
15
15
  OpenAICompatibleEmbeddingProvider,
16
16
  getProjectEmbeddingSnapshot2,
17
17
  embedBatchForProject2
18
- } from "./index-cmyk3bmf.js";
18
+ } from "./index-r6dj8rm9.js";
19
19
  import {
20
20
  isEmbeddingHostBusy2
21
21
  } from "./index-9p40dgkm.js";
@@ -62,6 +62,7 @@ function createProvider(config) {
62
62
  queryInstruction: config.query_instruction,
63
63
  documentPrefix: config.document_prefix,
64
64
  truncate: config.truncate,
65
+ dimensions: config.dimensions,
65
66
  maxInputTokens: config.max_input_tokens
66
67
  });
67
68
  }
@@ -9,7 +9,7 @@ import {
9
9
  } from "./index-7y60kyea.js";
10
10
  import {
11
11
  cleanUserText2
12
- } from "./index-9036v8ay.js";
12
+ } from "./index-4j5442b0.js";
13
13
  import {
14
14
  recordMessageFtsRowid2,
15
15
  recordIndexedMessageTime2,
package/dist/index.js CHANGED
@@ -153,7 +153,7 @@ import {
153
153
  registerTodoStateLifecycle,
154
154
  syncCtxMemoryToolEnabled,
155
155
  registerMagicContextTools
156
- } from "./index-vdrqxca5.js";
156
+ } from "./index-38bm78h4.js";
157
157
  import"./index-4knyh1kt.js";
158
158
  import {
159
159
  canonicalModelIdentity,
@@ -171,7 +171,7 @@ import {
171
171
  DEFAULT_HISTORIAN_TIMEOUT_MS,
172
172
  DREAM_TASK_PROMOTION_DEFAULTS,
173
173
  LIVE_RELOAD_CONFIG_PATHS
174
- } from "./index-gzk7d940.js";
174
+ } from "./index-aec63gtj.js";
175
175
  import {
176
176
  FAIL_CLOSED_DOCTOR_COMMAND,
177
177
  formatFailClosedBlockingMessage,
@@ -356,7 +356,7 @@ import {
356
356
  getRawSessionTagKeysThrough2,
357
357
  getLegacyProtectedTailStartOrdinal2,
358
358
  readSessionChunk2
359
- } from "./index-9036v8ay.js";
359
+ } from "./index-4j5442b0.js";
360
360
  import {
361
361
  UNKNOWN_FIT_RATIO,
362
362
  hasMeasuredDecisionCalibration,
@@ -495,7 +495,7 @@ import {
495
495
  openCurrentDatabase,
496
496
  openDatabaseAsync,
497
497
  closeDatabase
498
- } from "./index-y2g8rdmm.js";
498
+ } from "./index-06rdy9h6.js";
499
499
  import {
500
500
  LkgRecoveryFenceError,
501
501
  clearLkgFenceProcessState,
@@ -612,7 +612,7 @@ import {
612
612
  getSourceContents,
613
613
  recordSubagentInvocation,
614
614
  getLatestHistorianInvocationId
615
- } from "./index-9n1hyjck.js";
615
+ } from "./index-jy9fq8gp.js";
616
616
  import {
617
617
  resolveOpenCodeDbPath,
618
618
  assertOpenCodeStoreGeneration,
@@ -670,7 +670,7 @@ import {
670
670
  clearCompressionDepthRange,
671
671
  cleanSearchText,
672
672
  matchedSearchSnippet
673
- } from "./index-wz66mger.js";
673
+ } from "./index-ywvhr524.js";
674
674
  import {
675
675
  rememberV1HiddenRun
676
676
  } from "./index-6x556c2q.js";
@@ -747,7 +747,7 @@ import {
747
747
  } from "./index-q1yc6bs0.js";
748
748
  import {
749
749
  getCachedLocalEmbeddingPooling
750
- } from "./index-zrbvwxtb.js";
750
+ } from "./index-38pf5bqw.js";
751
751
  import {
752
752
  describeShadowBackfillWriteRefusal2,
753
753
  contentSha2562,
@@ -765,10 +765,10 @@ import {
765
765
  embedSessionCompartmentChunks2,
766
766
  getEmbeddingCoverageStatus2,
767
767
  getAutoEmbeddingSessionCoverage2
768
- } from "./index-cmyk3bmf.js";
768
+ } from "./index-r6dj8rm9.js";
769
769
  import {
770
770
  cosineSimilarity
771
- } from "./index-yc4vfwvm.js";
771
+ } from "./index-ty2m0s0s.js";
772
772
  import {
773
773
  USER_FACING_FAILURES,
774
774
  renderUserFacingFailure,
@@ -802,7 +802,7 @@ import {
802
802
  scheduleClearAndReindex,
803
803
  clearSessionTracking,
804
804
  createAutoSearchDiagnostics
805
- } from "./index-bjeb4ya4.js";
805
+ } from "./index-4ss8c8ky.js";
806
806
  import"./index-xssjy4z9.js";
807
807
  import {
808
808
  DREAMER_PRIMER_INVESTIGATOR_ALLOWED_TOOLS,
@@ -833,8 +833,8 @@ import {
833
833
  } from "./index-pkg07s54.js";
834
834
  import"./index-yjgkjkjs.js";
835
835
  import"./index-1cvyaw9a.js";
836
- import"./index-8bpxfq4c.js";
837
- import"./index-zggajt0j.js";
836
+ import"./index-jexm22qn.js";
837
+ import"./index-ch3rvpjg.js";
838
838
  import {
839
839
  __toESM
840
840
  } from "./index-22jkk6wg.js";
@@ -866,7 +866,7 @@ import {
866
866
  } from "./index-81nthk8j.js";
867
867
 
868
868
  // src/index.ts
869
- import { AsyncLocalStorage as AsyncLocalStorage3 } from "node:async_hooks";
869
+ import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
870
870
  import { createRequire as createRequire2 } from "node:module";
871
871
  import { join as join16, resolve as resolve3 } from "node:path";
872
872
 
@@ -3589,7 +3589,7 @@ function startHostStallProfilerSwitch() {
3589
3589
  // package.json
3590
3590
  var package_default = {
3591
3591
  name: "@cortexkit/pi-magic-context",
3592
- version: "0.49.49",
3592
+ version: "0.49.50",
3593
3593
  type: "module",
3594
3594
  description: "Pi and OMP coding agent extension for Magic Context — cross-session memory and context management",
3595
3595
  main: "dist/index.js",
@@ -4867,7 +4867,6 @@ class HiddenCompletionRefusal extends Error {
4867
4867
  }
4868
4868
  }
4869
4869
  // ../plugin/src/features/magic-context/dreamer/provider-output-failure.ts
4870
- import { AsyncLocalStorage } from "node:async_hooks";
4871
4870
  import { createHash as createHash3 } from "node:crypto";
4872
4871
  var MAX_NEAR_ZERO_OUTPUT_TOKENS = 32;
4873
4872
 
@@ -4875,52 +4874,18 @@ class DreamerProviderOutputFailureError extends Error {
4875
4874
  fingerprint;
4876
4875
  outputTokens;
4877
4876
  reasoningTokens;
4878
- quotaResetAt;
4879
4877
  transient = true;
4880
- constructor(fingerprint, outputTokens, reasoningTokens, responseText, quotaResetAt) {
4878
+ constructor(fingerprint, outputTokens, reasoningTokens, responseText) {
4881
4879
  const preview = responseText.trim().replace(/\s+/g, " ").slice(0, 160);
4882
- super(quotaResetAt !== undefined ? `provider quota exhausted until ${new Date(quotaResetAt).toISOString()} (account-pool rate limit)` : `dreamer provider-outage completion (output_tokens=${outputTokens}, reasoning_tokens=${reasoningTokens}): ${JSON.stringify(preview)}`);
4880
+ super(`dreamer provider-outage completion (output_tokens=${outputTokens}, reasoning_tokens=${reasoningTokens}): ${JSON.stringify(preview)}`);
4883
4881
  this.fingerprint = fingerprint;
4884
4882
  this.outputTokens = outputTokens;
4885
4883
  this.reasoningTokens = reasoningTokens;
4886
- this.quotaResetAt = quotaResetAt;
4887
4884
  this.name = "DreamerProviderOutputFailureError";
4888
4885
  }
4889
4886
  }
4890
- var primaryQuotas = new AsyncLocalStorage;
4891
- function withDreamerModelCooldown(run) {
4892
- return primaryQuotas.getStore() ? run() : primaryQuotas.run(new Map, run);
4893
- }
4894
- function rememberPrimaryQuota(model, error) {
4895
- const quotas = primaryQuotas.getStore();
4896
- if (!quotas || model === "primary" || !(error instanceof DreamerProviderOutputFailureError) || error.quotaResetAt === undefined || error.quotaResetAt <= Date.now())
4897
- return null;
4898
- const cached = new DreamerProviderOutputFailureError(error.fingerprint, error.outputTokens, error.reasoningTokens, "", error.quotaResetAt);
4899
- cached.message = error.message;
4900
- quotas.set(model, cached);
4901
- return error;
4902
- }
4903
- function primaryQuotaFailure(model) {
4904
- const quotas = primaryQuotas.getStore();
4905
- const error = quotas?.get(model);
4906
- if (!error)
4907
- return null;
4908
- if (error.quotaResetAt === undefined || error.quotaResetAt <= Date.now()) {
4909
- quotas?.delete(model);
4910
- return null;
4911
- }
4912
- const failure = new DreamerProviderOutputFailureError(error.fingerprint, error.outputTokens, error.reasoningTokens, "", error.quotaResetAt);
4913
- failure.message = error.message;
4914
- return failure;
4915
- }
4916
- function quotaResetAt(responseText, now) {
4917
- const notice = /^All [1-9]\d* account\(s\) rate-limited for [\w.-]+\. Quota resets in ((?:\d+[hms] ?)+)\. Add more accounts with `opencode auth login` or wait and retry\.$/.exec(responseText.trim());
4918
- if (!notice)
4919
- return;
4920
- const units = { h: 3600000, m: 60000, s: 1000 };
4921
- const duration = [...notice[1].matchAll(/(\d+)([hms])/g)].reduce((sum, match) => sum + Number(match[1]) * units[match[2]], 0);
4922
- const resetAt = now + duration;
4923
- return duration > 0 && Number.isSafeInteger(resetAt) && resetAt < 8640000000000000 ? resetAt : undefined;
4887
+ function isAccountPoolQuotaNotice(responseText) {
4888
+ return /^All [1-9]\d* account\(s\) rate-limited for [\w.-]+\. Quota resets in (?:\d+[hms] ?)+\. Add more accounts with `opencode auth login` or wait and retry\.$/.test(responseText.trim());
4924
4889
  }
4925
4890
  function finiteTokenCount(value) {
4926
4891
  return typeof value === "number" && Number.isFinite(value) && value >= 0 ? value : null;
@@ -4952,7 +4917,7 @@ function latestAssistantCompletion(messages) {
4952
4917
  }
4953
4918
  return latest;
4954
4919
  }
4955
- function providerOutputFailureFromInvalidManifest(messages, responseText, now = Date.now()) {
4920
+ function providerOutputFailureFromInvalidManifest(messages, responseText) {
4956
4921
  const completion = latestAssistantCompletion(messages);
4957
4922
  if (completion?.finish?.toLowerCase() !== "stop")
4958
4923
  return null;
@@ -4962,11 +4927,10 @@ function providerOutputFailureFromInvalidManifest(messages, responseText, now =
4962
4927
  const normalized = responseText.trim().replace(/\s+/g, " ").toLowerCase();
4963
4928
  if (!normalized)
4964
4929
  return null;
4965
- const resetAt = quotaResetAt(responseText, now);
4966
- if (resetAt === undefined && completion.outputTokens > MAX_NEAR_ZERO_OUTPUT_TOKENS)
4930
+ if (!isAccountPoolQuotaNotice(responseText) && completion.outputTokens > MAX_NEAR_ZERO_OUTPUT_TOKENS)
4967
4931
  return null;
4968
4932
  const fingerprint = createHash3("sha256").update(normalized).digest("hex").slice(0, 16);
4969
- return new DreamerProviderOutputFailureError(fingerprint, completion.outputTokens, completion.reasoningTokens, responseText, resetAt);
4933
+ return new DreamerProviderOutputFailureError(fingerprint, completion.outputTokens, completion.reasoningTokens, responseText);
4970
4934
  }
4971
4935
 
4972
4936
  // ../plugin/src/v2/hooks/hidden-child.ts
@@ -5112,6 +5076,94 @@ function toModelEntry(spec) {
5112
5076
  return spec;
5113
5077
  }
5114
5078
 
5079
+ // ../plugin/src/shared/hidden-model-cooldown.ts
5080
+ var MAX_SKIP_MS = 7 * 24 * 60 * 60 * 1000;
5081
+ var MIN_SKIP_MS = 60000;
5082
+ var RETRY_LATER_REASON = "provider said to retry later";
5083
+
5084
+ class HiddenModelCooldowns {
5085
+ now;
5086
+ entries = new Map;
5087
+ constructor(now = () => Date.now()) {
5088
+ this.now = now;
5089
+ }
5090
+ record(model, error) {
5091
+ if (!model?.includes("/"))
5092
+ return;
5093
+ const now = this.now();
5094
+ const delay = retryDelay(error, now);
5095
+ if (delay === undefined || !Number.isFinite(delay) || delay <= MIN_SKIP_MS)
5096
+ return;
5097
+ this.entries.set(model, {
5098
+ model,
5099
+ until: now + Math.min(delay, MAX_SKIP_MS),
5100
+ reason: RETRY_LATER_REASON
5101
+ });
5102
+ }
5103
+ succeeded(model) {
5104
+ if (model)
5105
+ this.entries.delete(model);
5106
+ }
5107
+ live() {
5108
+ const now = this.now();
5109
+ for (const [model, entry] of this.entries) {
5110
+ if (entry.until <= now)
5111
+ this.entries.delete(model);
5112
+ }
5113
+ return [...this.entries.values()];
5114
+ }
5115
+ startIndex(models, log) {
5116
+ const live = new Map(this.live().map((entry) => [entry.model, entry]));
5117
+ let start = models.findIndex((model) => !live.has(model));
5118
+ if (start < 0) {
5119
+ start = 0;
5120
+ for (let i = 1;i < models.length; i++) {
5121
+ if ((live.get(models[i])?.until ?? Infinity) < (live.get(models[start])?.until ?? Infinity))
5122
+ start = i;
5123
+ }
5124
+ }
5125
+ const logged = new Set;
5126
+ for (const model of models.slice(0, start)) {
5127
+ const entry = live.get(model);
5128
+ if (entry && !logged.has(model)) {
5129
+ log(`skipping ${model} until ${new Date(entry.until).toISOString()}: provider said to retry later`);
5130
+ logged.add(model);
5131
+ }
5132
+ }
5133
+ return start;
5134
+ }
5135
+ }
5136
+ function retryDelay(error, now, depth = 0) {
5137
+ if (!isRecord(error) || depth > 4)
5138
+ return;
5139
+ const data = typeof error.statusCode === "number" || typeof error.status === "number" ? error : isRecord(error.data) ? error.data : error;
5140
+ const status = data.statusCode ?? data.status;
5141
+ if (status === 412 || status === 429 || status === 503) {
5142
+ if (typeof data.retryAfterMs === "number")
5143
+ return data.retryAfterMs;
5144
+ const headers = data.responseHeaders;
5145
+ if (isRecord(headers)) {
5146
+ const value = Object.entries(headers).find(([name]) => name.toLowerCase() === "retry-after")?.[1];
5147
+ if (typeof value === "string") {
5148
+ const text = value.trim();
5149
+ if (/^\d+$/.test(text))
5150
+ return Number(text) * 1000;
5151
+ if (/^(?:(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun), \d{2} [A-Z][a-z]{2} \d{4} \d{2}:\d{2}:\d{2} GMT|(?:Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), \d{2}-[A-Z][a-z]{2}-\d{2} \d{2}:\d{2}:\d{2} GMT|(?:Mon|Tue|Wed|Thu|Fri|Sat|Sun) [A-Z][a-z]{2} [ \d]\d \d{2}:\d{2}:\d{2} \d{4})$/.test(text))
5152
+ return Date.parse(text) - now;
5153
+ }
5154
+ }
5155
+ }
5156
+ return retryDelay(error.hostError ?? error.cause, now, depth + 1);
5157
+ }
5158
+ var hiddenModelCooldowns = new HiddenModelCooldowns;
5159
+ function selectHiddenModelStart(primary, fallbacks = [], note) {
5160
+ if (!primary)
5161
+ return { primary, fallbacks };
5162
+ const chain = [primary, ...fallbacks];
5163
+ const start = hiddenModelCooldowns.startIndex(chain.map((entry) => toModelEntry(entry)?.model ?? ""), note);
5164
+ return { primary: chain[start], fallbacks: chain.slice(start + 1) };
5165
+ }
5166
+
5115
5167
  // ../plugin/src/shared/model-suggestion-retry.ts
5116
5168
  var ABORT_CALL_TIMEOUT_MS = 3000;
5117
5169
  function copyPromptArgs(args, body) {
@@ -5350,14 +5402,11 @@ function throwWithPromptFailure(legacyError, failedAttempts, args, timeoutMs, tr
5350
5402
  const error = legacyError instanceof Error ? legacyError : new Error(extractMessage(legacyError));
5351
5403
  const last = failedAttempts.at(-1);
5352
5404
  const failureClass = last?.failureClass ?? "unknown";
5353
- const quota = failedAttempts.find((failure) => failure.error instanceof DreamerProviderOutputFailureError && failure.error.quotaResetAt !== undefined)?.error;
5354
- if (quota && error !== quota && !error.message.includes(quota.message))
5355
- error.message = `${quota.message}; ${error.message}`;
5356
- const providerError = failureClass === "provider_error" || quota ? sanitizeDiagnosticText(`${quota ? `${quota.message}; ` : ""}${shortErr(last?.error ?? legacyError)}`).slice(0, 500) : null;
5405
+ const providerError = failureClass === "provider_error" ? sanitizeDiagnosticText(shortErr(last?.error ?? legacyError)).slice(0, 500) : null;
5357
5406
  promptFailureDetails.set(error, {
5358
5407
  failureClass,
5359
5408
  modelAttempted: last?.attempt.label ?? null,
5360
- modelsTried: failedAttempts.filter((failure) => !failure.attempt.skipped).map((failure) => failure.attempt.label),
5409
+ modelsTried: failedAttempts.map((failure) => failure.attempt.label),
5361
5410
  providerError,
5362
5411
  timeoutMs: failureClass === "provider_timeout" ? timeoutMs : null,
5363
5412
  childSessionId: transport ? transport.childSessionId ?? null : args.path.id || null,
@@ -5374,6 +5423,8 @@ async function attemptOnce(client, args, timeoutMs, signal, callContext, label,
5374
5423
  await promptWithTimeout(client, attemptArgs, timeoutMs, signal, transport, firstOutputTimeoutMs);
5375
5424
  return;
5376
5425
  } catch (error) {
5426
+ if (!signal?.aborted && !isPromptTimeoutError(error))
5427
+ hiddenModelCooldowns.record(label, error);
5377
5428
  if (isNonRetryable(error, signal) || !allowModelSuggestions)
5378
5429
  throw error;
5379
5430
  const suggestion = parseModelSuggestion(error);
@@ -5414,7 +5465,19 @@ function createChainClock(options, timeoutMs) {
5414
5465
  }
5415
5466
  };
5416
5467
  }
5468
+ function cooldownStart(args, options) {
5469
+ const model = args.body.model;
5470
+ if (!model)
5471
+ return { args, options };
5472
+ const selected = selectHiddenModelStart({ model: `${model.providerID}/${model.modelID}`, qualifier: args.body.variant }, options.fallbackModels, log2);
5473
+ const { variant: _variant, ...body } = args.body;
5474
+ return {
5475
+ args: copyPromptArgs(args, { ...body, ...modelBodyField(selected.primary) }),
5476
+ options: { ...options, fallbackModels: selected.fallbacks }
5477
+ };
5478
+ }
5417
5479
  async function promptSyncWithModelSuggestionRetry(client, args, options = {}) {
5480
+ ({ args, options } = cooldownStart(args, options));
5418
5481
  const timeoutMs = options.timeoutMs ?? 300000;
5419
5482
  const callContext = options.callContext ?? "subagent";
5420
5483
  const fallbacks = options.fallbackModels ?? [];
@@ -5486,6 +5549,8 @@ async function attemptAndValidate(client, args, timeoutMs, signal, callContext,
5486
5549
  try {
5487
5550
  output = await raceWithSignal(options.fetchOutput(args, attempt), options.signal);
5488
5551
  } catch (error) {
5552
+ if (!signal?.aborted && !isPromptTimeoutError(error))
5553
+ hiddenModelCooldowns.record(attempt.label, error);
5489
5554
  throw {
5490
5555
  error,
5491
5556
  failureClass: classifyPromptFailure(error, "output", signal),
@@ -5497,7 +5562,7 @@ async function attemptAndValidate(client, args, timeoutMs, signal, callContext,
5497
5562
  const text = extractLatestAssistantText(messages);
5498
5563
  if (text) {
5499
5564
  const failure = providerOutputFailureFromInvalidManifest(messages, text);
5500
- if (failure?.quotaResetAt !== undefined)
5565
+ if (failure && isAccountPoolQuotaNotice(text))
5501
5566
  throw failure;
5502
5567
  }
5503
5568
  if (!extractLatestAssistantText(output)) {
@@ -5506,11 +5571,14 @@ async function attemptAndValidate(client, args, timeoutMs, signal, callContext,
5506
5571
  const error = new Error(`Host recorded assistant error: ${describeAssistantError(assistantFailure.error)}`);
5507
5572
  Object.assign(error, {
5508
5573
  name: "DreamerProviderOutputFailureError",
5509
- transient: true
5574
+ transient: true,
5575
+ hostError: assistantFailure.error
5510
5576
  });
5577
+ hiddenModelCooldowns.record(attempt.label, assistantFailure.error);
5511
5578
  throw error;
5512
5579
  }
5513
5580
  }
5581
+ hiddenModelCooldowns.succeeded(attempt.label);
5514
5582
  const validated = await options.validateOutput(output, attempt);
5515
5583
  return { output, validated, attempt };
5516
5584
  } catch (error) {
@@ -5525,6 +5593,7 @@ async function attemptAndValidate(client, args, timeoutMs, signal, callContext,
5525
5593
  }
5526
5594
  }
5527
5595
  async function promptSyncWithValidatedOutputRetry(client, args, options) {
5596
+ ({ args, options } = cooldownStart(args, options));
5528
5597
  const timeoutMs = options.timeoutMs ?? 300000;
5529
5598
  const callContext = options.callContext ?? "subagent";
5530
5599
  const fallbacks = options.fallbackModels ?? [];
@@ -5535,23 +5604,9 @@ async function promptSyncWithValidatedOutputRetry(client, args, options) {
5535
5604
  const failedAttempts = [];
5536
5605
  let firstError = null;
5537
5606
  let lastError = null;
5538
- const cooledPrimary = primaryQuotaFailure(explicitPrimaryLabel);
5539
5607
  const clock = createChainClock(options, timeoutMs);
5540
5608
  const primaryStartedAt = Date.now();
5541
5609
  try {
5542
- if (cooledPrimary)
5543
- throw {
5544
- error: cooledPrimary,
5545
- failureClass: "provider_error",
5546
- attempt: {
5547
- label: explicitPrimaryLabel,
5548
- attemptIndex: 0,
5549
- isFallback: false,
5550
- totalAttempts,
5551
- model: baseBody.model,
5552
- skipped: true
5553
- }
5554
- };
5555
5610
  const budget = clock.budget(0);
5556
5611
  return await attemptAndValidate(client, baseArgs, budget.timeoutMs, options.signal, callContext, {
5557
5612
  label: explicitPrimaryLabel,
@@ -5566,19 +5621,13 @@ async function promptSyncWithValidatedOutputRetry(client, args, options) {
5566
5621
  clock.settle(failure.error, primaryStartedAt);
5567
5622
  firstError = failure.error;
5568
5623
  lastError = failure.error;
5569
- if (failure.error instanceof DreamerProviderOutputFailureError && failure.error.quotaResetAt !== undefined)
5570
- failure.error.message = failure.error.message.replace(/^provider quota exhausted/, "primary quota exhausted");
5571
- const quota = !cooledPrimary && rememberPrimaryQuota(explicitPrimaryLabel, failure.error);
5572
- if (quota)
5573
- log2(`[${callContext}] ${quota.message}; skipping ${explicitPrimaryLabel} for this run until reset`);
5574
5624
  if (isNonRetryable(failure.error, options.signal)) {
5575
5625
  throwWithPromptFailure(failure.error, failedAttempts, args, timeoutMs, options.transport);
5576
5626
  }
5577
5627
  if (fallbacks.length === 0) {
5578
5628
  throwWithPromptFailure(failure.error, failedAttempts, args, timeoutMs, options.transport);
5579
5629
  }
5580
- if (!cooledPrimary && !quota)
5581
- log2(`[${callContext}] primary (${explicitPrimaryLabel}) failed validation/prompt: ${shortErr(failure.error)}; ${fallbacks.length} fallback(s) configured, subject to remaining budget`);
5630
+ log2(`[${callContext}] primary (${explicitPrimaryLabel}) failed validation/prompt: ${shortErr(failure.error)}; ${fallbacks.length} fallback(s) configured, subject to remaining budget`);
5582
5631
  }
5583
5632
  for (let i = 0;i < fallbacks.length; i += 1) {
5584
5633
  const fallback = toModelEntry(fallbacks[i]);
@@ -9825,7 +9874,7 @@ function createV1HiddenCompletionExecutor(client, db, directory) {
9825
9874
  preferResponseOnMissingData: true
9826
9875
  });
9827
9876
  const assistantFailure = extractLatestAssistantFailure(messages);
9828
- const hostError = hostErrors.get(handle.id);
9877
+ const hostError = assistantFailure?.error ?? hostErrors.get(handle.id);
9829
9878
  if (assistantFailure || hostError !== undefined) {
9830
9879
  const finish = assistantFailure?.finish ? ` (finish=${assistantFailure.finish})` : "";
9831
9880
  const error = new Error(`Historian host recorded an assistant error${finish}: ${describeAssistantFailure(assistantFailure?.error ?? hostError)}`, hostError === undefined ? undefined : { cause: hostError });
@@ -9874,6 +9923,8 @@ function historianReasoningBudgetDiagnostic(outputTokens, tokens) {
9874
9923
  return `historian ran out of output budget while reasoning (length-capped at ${outputTokens} tokens, no text${tokens ? `; ${formatRunTokenLog(tokens)}` : ""}) — set historian.maxTokens or route historian.model to a low-reasoning lane/variant`;
9875
9924
  }
9876
9925
  async function runValidatedHistorianPass(args) {
9926
+ const selected = selectHiddenModelStart(args.model, args.fallbackModels, (message) => sessionLog2(args.parentSessionId, message));
9927
+ args = { ...args, model: selected.primary, fallbackModels: selected.fallbacks };
9877
9928
  const firstRun = await runHistorianPrompt({
9878
9929
  ...args,
9879
9930
  dumpLabel: `${args.dumpLabelBase}-initial`,
@@ -10132,6 +10183,7 @@ async function runHistorianPrompt(args) {
10132
10183
  }
10133
10184
  }
10134
10185
  completion = await executor.collect(handle, 50);
10186
+ hiddenModelCooldowns.succeeded(handle.attemptedModel ?? toModelEntry(modelOverride)?.model);
10135
10187
  const lengthCapped = completion.lengthCapped;
10136
10188
  const tokens = {
10137
10189
  ...runTokenLog(undefined, args.maxOutputTokens),
@@ -10168,6 +10220,7 @@ async function runHistorianPrompt(args) {
10168
10220
  const dumpPath = dumpHistorianResponse(parentSessionId, sessionDirectory, dumpLabel ?? "historian-response", result);
10169
10221
  return { ok: true, result, dumpPath, invocationId: invocationId ?? undefined };
10170
10222
  } catch (modelError) {
10223
+ hiddenModelCooldowns.record(handle?.attemptedModel ?? toModelEntry(modelOverride)?.model, modelError);
10171
10224
  const desc = describeError(modelError);
10172
10225
  sessionLog2(parentSessionId, `historian prompt failed: ${desc.brief} promptLength=${prompt.length}${desc.stackHead ? ` stackHead="${desc.stackHead}"` : ""}`);
10173
10226
  recordInvocation({
@@ -17334,9 +17387,6 @@ function closeBroadCycle(args, cycleStartAt) {
17334
17387
  });
17335
17388
  }
17336
17389
  async function runVerify(args) {
17337
- return withDreamerModelCooldown(() => runVerifyWithCooldown(args));
17338
- }
17339
- async function runVerifyWithCooldown(args) {
17340
17390
  const runStartedAt = Date.now();
17341
17391
  const result = {
17342
17392
  verified: 0,
@@ -19519,9 +19569,6 @@ function recordTransientFailure(db, projectIdentity, due, finishedAt, error, sch
19519
19569
  var LEASE_WAIT_POLL_MS = 2000;
19520
19570
  var MANUAL_RUN_LEASE_WAIT_MS = 60000;
19521
19571
  async function runDomainGroup(deps, group, cb) {
19522
- return withDreamerModelCooldown(() => runDomainGroupWithCooldown(deps, group, cb));
19523
- }
19524
- async function runDomainGroupWithCooldown(deps, group, cb) {
19525
19572
  const { db, projectIdentity, executor } = deps;
19526
19573
  const leaseKey = leaseKeyFor(group[0].config.task, projectIdentity);
19527
19574
  const holderId = crypto.randomUUID();
@@ -24634,6 +24681,7 @@ var pendingDecisionBySession = new Map;
24634
24681
  var pendingPiDecisionBySession = new Map;
24635
24682
  var lastBoundMessageIdBySession = new Map;
24636
24683
  var scheduledWriteTokensBySession = new Map;
24684
+ var scheduledWriteWaitersBySession = new Map;
24637
24685
  var systemHashChangedSessions = new Set;
24638
24686
  var piSystemHashChangedSessions = new Set;
24639
24687
  var unbustedPassBySession = new Map;
@@ -24758,8 +24806,12 @@ function deleteScheduledWriteToken(sessionId, token) {
24758
24806
  if (!tokens)
24759
24807
  return;
24760
24808
  tokens.delete(token);
24761
- if (tokens.size === 0)
24809
+ if (tokens.size === 0) {
24762
24810
  scheduledWriteTokensBySession.delete(sessionId);
24811
+ for (const resolve of scheduledWriteWaitersBySession.get(sessionId) ?? [])
24812
+ resolve();
24813
+ scheduledWriteWaitersBySession.delete(sessionId);
24814
+ }
24763
24815
  }
24764
24816
  function findNewestPiAssistantEntryIdAfter(entries, snapshotNewestAssistantEntryId) {
24765
24817
  if (!Array.isArray(entries))
@@ -27972,9 +28024,9 @@ function resolveUnknownUsageFromWireEstimate(input) {
27972
28024
  }
27973
28025
 
27974
28026
  // ../plugin/src/hooks/magic-context/transform-stage-logger.ts
27975
- import { AsyncLocalStorage as AsyncLocalStorage2 } from "node:async_hooks";
28027
+ import { AsyncLocalStorage } from "node:async_hooks";
27976
28028
  var SLOW_STAGE_MS = 100;
27977
- var passes = new AsyncLocalStorage2;
28029
+ var passes = new AsyncLocalStorage;
27978
28030
  async function withTransformTimingSummary(run) {
27979
28031
  const pass = {
27980
28032
  stages: [],
@@ -51224,6 +51276,8 @@ function renderUserStatusSummary(summary, style) {
51224
51276
  values.push(["Dreamer skipped", skipped]);
51225
51277
  for (const quota of summary.dreamerQuotas ?? [])
51226
51278
  values.push(["Dreamer quota", quota]);
51279
+ for (const quota of summary.hiddenModelSkips ?? [])
51280
+ values.push(["Hidden model quota", quota]);
51227
51281
  if (summary.historianRefusal) {
51228
51282
  values.push([
51229
51283
  "Historian refusal",
@@ -51412,6 +51466,7 @@ function checkStatusViewSource(candidate) {
51412
51466
  lastDreamerRunAt: optional.read("lastDreamerRunAt", isNullableNumber),
51413
51467
  dreamerUnsupportedTasks: optional.readArray("dreamerUnsupportedTasks", isString),
51414
51468
  dreamerSkipped: optional.readArray("dreamerSkipped", isString),
51469
+ hiddenModelSkips: optional.readArray("hiddenModelSkips", isString),
51415
51470
  dreamerFailures: optional.readArray("dreamerFailures", (value) => isRecord6(value) && isString(value.task) && isString(value.error)),
51416
51471
  dreamerTickFailure: optional.read("dreamerTickFailure", (value) => value === null || isTickFailure(value)),
51417
51472
  sessionNoteCount: optional.read("sessionNoteCount", isNumber),
@@ -51750,6 +51805,11 @@ function dreamerTickFailureRows(source, now) {
51750
51805
  return quota ? [quota] : [];
51751
51806
  }))
51752
51807
  ].map((value) => ({ label: "Dreamer quota", value, tone: "warning" }));
51808
+ quotas.push(...(source.hiddenModelSkips ?? []).map((value) => ({
51809
+ label: "Hidden model quota",
51810
+ value,
51811
+ tone: "warning"
51812
+ })));
51753
51813
  const failure = source.dreamerTickFailure;
51754
51814
  if (!failure)
51755
51815
  return quotas;
@@ -53778,9 +53838,9 @@ var PI_STARTUP_MAINTENANCE_SCHEDULED = Symbol.for("magic-context.pi.startup-main
53778
53838
  function getPiChildInitContext() {
53779
53839
  const globals = globalThis;
53780
53840
  const existing = globals[PI_CHILD_INIT_CONTEXT];
53781
- if (existing instanceof AsyncLocalStorage3)
53841
+ if (existing instanceof AsyncLocalStorage2)
53782
53842
  return existing;
53783
- const context = new AsyncLocalStorage3;
53843
+ const context = new AsyncLocalStorage2;
53784
53844
  globals[PI_CHILD_INIT_CONTEXT] = context;
53785
53845
  return context;
53786
53846
  }
@@ -9,13 +9,13 @@ import"./index-0h2mkab2.js";
9
9
  import"./index-yxeg8zaa.js";
10
10
  import"./index-dnp1jjar.js";
11
11
  import"./index-jxm4bvm4.js";
12
- import"./index-gzk7d940.js";
12
+ import"./index-aec63gtj.js";
13
13
  import"./index-8sqebjzk.js";
14
14
  import"./index-wfqysrwq.js";
15
15
  import"./index-x2n261wp.js";
16
16
  import"./index-szn2tac8.js";
17
17
  import"./index-n0zjvs3h.js";
18
- import"./index-9036v8ay.js";
18
+ import"./index-4j5442b0.js";
19
19
  import"./index-6x556c2q.js";
20
20
  import"./index-c6wbq66z.js";
21
21
  import {
@@ -25,7 +25,7 @@ import {
25
25
  markMessageIndexDirty,
26
26
  getIndexableContent,
27
27
  indexSingleMessage
28
- } from "./index-wz66mger.js";
28
+ } from "./index-ywvhr524.js";
29
29
  import"./index-6d0bby9d.js";
30
30
  import"./index-j0eagxkz.js";
31
31
 
@@ -17,7 +17,7 @@ import"./index-xx1911hb.js";
17
17
  import {
18
18
  setSqlitePragmaConfig,
19
19
  initializeDatabase
20
- } from "./index-y2g8rdmm.js";
20
+ } from "./index-06rdy9h6.js";
21
21
  import"./index-fapenpch.js";
22
22
  import"./index-3bb24eb6.js";
23
23
  import"./index-8sqebjzk.js";
@@ -33,15 +33,15 @@ import {
33
33
  sweepAllRegisteredProjects2,
34
34
  _setTestProviderFactoryForProject2,
35
35
  _resetProjectEmbeddingRegistryForTests2
36
- } from "./index-cmyk3bmf.js";
36
+ } from "./index-r6dj8rm9.js";
37
37
  import"./index-9p40dgkm.js";
38
38
  import"./index-hgd00nas.js";
39
39
  import"./index-yhzhdp3m.js";
40
40
  import"./index-zxm7ckvc.js";
41
41
  import"./index-ndg15t3x.js";
42
- import"./index-zrbvwxtb.js";
42
+ import"./index-38pf5bqw.js";
43
43
  import"./index-qm139qq2.js";
44
- import"./index-gzk7d940.js";
44
+ import"./index-aec63gtj.js";
45
45
  import"./index-xx1911hb.js";
46
46
  import"./index-6d0bby9d.js";
47
47
  import"./index-szn2tac8.js";
@@ -19,7 +19,7 @@ serveWorkerJobs(async (input, port) => {
19
19
  await main();
20
20
  async function main() {
21
21
  if (input.v2ArchiveReader) {
22
- const { serveV2ArchiveReads } = await import("./v2-archive-reader-sez4pjd8.js");
22
+ const { serveV2ArchiveReads } = await import("./v2-archive-reader-5n1w78zj.js");
23
23
  await serveV2ArchiveReads(port, openConnections);
24
24
  return;
25
25
  }
@@ -51,7 +51,7 @@ serveWorkerJobs(async (input, port) => {
51
51
  await runMessageFtsRowidMapBackfill(db);
52
52
  reply = { kind: "fts-rowid-backfill" };
53
53
  } else if (input.searchArchive) {
54
- const { renderSearchArchive } = await import("./search-archive-1g44f9jt.js");
54
+ const { renderSearchArchive } = await import("./search-archive-w12r0c45.js");
55
55
  const { readRawSessionMessageIdOrdinalsForRangeFromDb } = await import("./read-session-raw-75dcxtdy.js");
56
56
  const archive = input.searchArchive;
57
57
  let raw;
@@ -81,7 +81,7 @@ serveWorkerJobs(async (input, port) => {
81
81
  const { setHarness } = await import("./harness-9872e0ym.js");
82
82
  setHarness(input.harness ?? "opencode");
83
83
  const [{ indexMessageInShortChunks }, { configureContextDatabasePragmas }] = await Promise.all([
84
- import("./message-index-bounded-6zghm1jn.js"),
84
+ import("./message-index-bounded-wg71m86d.js"),
85
85
  import("./sqlite-context-pragmas-gcgch6qz.js")
86
86
  ]);
87
87
  configureContextDatabasePragmas(db);
@@ -38,10 +38,10 @@ import {
38
38
  readSessionChunk2,
39
39
  getRawSessionMessageIdsThrough2,
40
40
  readRawSessionSeedTail2
41
- } from "./index-9036v8ay.js";
41
+ } from "./index-4j5442b0.js";
42
42
  import"./index-qcsjj9m0.js";
43
43
  import"./index-6x556c2q.js";
44
- import"./index-gzk7d940.js";
44
+ import"./index-aec63gtj.js";
45
45
  import"./index-c6wbq66z.js";
46
46
  import"./index-jxm4bvm4.js";
47
47
  import"./index-szn2tac8.js";
@@ -3,18 +3,18 @@ import {
3
3
  renderVerboseRange2,
4
4
  renderVerboseRangeForTool2,
5
5
  renderItemByTag2
6
- } from "./index-9n1hyjck.js";
6
+ } from "./index-jy9fq8gp.js";
7
7
  import"./index-46wk0td0.js";
8
- import"./index-wz66mger.js";
8
+ import"./index-ywvhr524.js";
9
9
  import"./index-hgd00nas.js";
10
10
  import"./index-nvh6d3bz.js";
11
11
  import"./index-ndg15t3x.js";
12
- import"./index-9036v8ay.js";
12
+ import"./index-4j5442b0.js";
13
13
  import"./index-qcsjj9m0.js";
14
14
  import"./index-6x556c2q.js";
15
15
  import"./index-qm139qq2.js";
16
- import"./index-gzk7d940.js";
17
- import"./index-y2g8rdmm.js";
16
+ import"./index-aec63gtj.js";
17
+ import"./index-06rdy9h6.js";
18
18
  import"./index-fapenpch.js";
19
19
  import"./index-zc6fdyx7.js";
20
20
  import"./index-135e8hvg.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  renderSearchArchive2
3
- } from "./index-zggajt0j.js";
4
- import"./index-8bpxfq4c.js";
3
+ } from "./index-ch3rvpjg.js";
4
+ import"./index-jexm22qn.js";
5
5
  import"./index-1cvyaw9a.js";
6
- import"./index-9036v8ay.js";
6
+ import"./index-4j5442b0.js";
7
7
  import"./index-qcsjj9m0.js";
8
8
  import"./index-6x556c2q.js";
9
- import"./index-gzk7d940.js";
9
+ import"./index-aec63gtj.js";
10
10
  import"./index-c6wbq66z.js";
11
11
  import"./index-jxm4bvm4.js";
12
12
  import"./index-szn2tac8.js";
@@ -5,24 +5,24 @@ import {
5
5
  resolveMemoriesByIdsForSearch2,
6
6
  unifiedSearch2,
7
7
  formatSearchResults2
8
- } from "./index-bjeb4ya4.js";
8
+ } from "./index-4ss8c8ky.js";
9
9
  import"./index-46wk0td0.js";
10
- import"./index-wz66mger.js";
10
+ import"./index-ywvhr524.js";
11
11
  import"./index-1cvyaw9a.js";
12
- import"./index-yc4vfwvm.js";
12
+ import"./index-ty2m0s0s.js";
13
13
  import"./index-29nw7n1r.js";
14
- import"./index-cmyk3bmf.js";
14
+ import"./index-r6dj8rm9.js";
15
15
  import"./index-9p40dgkm.js";
16
16
  import"./index-hgd00nas.js";
17
17
  import"./index-yhzhdp3m.js";
18
18
  import"./index-zxm7ckvc.js";
19
19
  import"./index-ndg15t3x.js";
20
- import"./index-9036v8ay.js";
20
+ import"./index-4j5442b0.js";
21
21
  import"./index-qcsjj9m0.js";
22
22
  import"./index-6x556c2q.js";
23
- import"./index-zrbvwxtb.js";
23
+ import"./index-38pf5bqw.js";
24
24
  import"./index-qm139qq2.js";
25
- import"./index-gzk7d940.js";
25
+ import"./index-aec63gtj.js";
26
26
  import"./index-zc6fdyx7.js";
27
27
  import"./index-135e8hvg.js";
28
28
  import"./index-xx1911hb.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TOKEN_BUDGET_TOOL_REFUSAL
3
- } from "./index-9036v8ay.js";
3
+ } from "./index-4j5442b0.js";
4
4
  import {
5
5
  setHarness2
6
6
  } from "./index-0h2mkab2.js";
@@ -14,7 +14,7 @@ import {
14
14
  import"./index-2qtx0q6h.js";
15
15
  import {
16
16
  openDatabase
17
- } from "./index-y2g8rdmm.js";
17
+ } from "./index-06rdy9h6.js";
18
18
  import"./index-fapenpch.js";
19
19
  import"./index-3bb24eb6.js";
20
20
  import"./index-8sqebjzk.js";
@@ -34,28 +34,28 @@ import {
34
34
  ensureProjectRegisteredFromPiDirectory,
35
35
  resolvePiHarnessKind,
36
36
  registerMagicContextTools
37
- } from "./index-vdrqxca5.js";
38
- import"./index-gzk7d940.js";
37
+ } from "./index-38bm78h4.js";
38
+ import"./index-aec63gtj.js";
39
39
  import"./index-qm139qq2.js";
40
40
  import"./index-ndg15t3x.js";
41
- import"./index-zrbvwxtb.js";
42
- import"./index-cmyk3bmf.js";
41
+ import"./index-38pf5bqw.js";
42
+ import"./index-r6dj8rm9.js";
43
43
  import"./index-hgd00nas.js";
44
44
  import"./index-9p40dgkm.js";
45
45
  import"./index-zxm7ckvc.js";
46
46
  import"./index-yhzhdp3m.js";
47
- import"./index-yc4vfwvm.js";
48
- import"./index-9n1hyjck.js";
49
- import"./index-wz66mger.js";
47
+ import"./index-ty2m0s0s.js";
48
+ import"./index-jy9fq8gp.js";
49
+ import"./index-ywvhr524.js";
50
50
  import"./index-qcsjj9m0.js";
51
51
  import"./index-6x556c2q.js";
52
52
  import"./index-nvh6d3bz.js";
53
53
  import"./index-46wk0td0.js";
54
54
  import"./index-1cvyaw9a.js";
55
- import"./index-8bpxfq4c.js";
56
- import"./index-zggajt0j.js";
55
+ import"./index-jexm22qn.js";
56
+ import"./index-ch3rvpjg.js";
57
57
  import"./index-29nw7n1r.js";
58
- import"./index-bjeb4ya4.js";
58
+ import"./index-4ss8c8ky.js";
59
59
  import"./index-xssjy4z9.js";
60
60
  import"./index-j0eagxkz.js";
61
61
  import {
@@ -8,7 +8,7 @@ import"./index-yxeg8zaa.js";
8
8
  import {
9
9
  LATEST_SUPPORTED_VERSION,
10
10
  getPersistedSchemaVersion
11
- } from "./index-y2g8rdmm.js";
11
+ } from "./index-06rdy9h6.js";
12
12
  import"./index-fapenpch.js";
13
13
  import"./index-3bb24eb6.js";
14
14
  import"./index-8sqebjzk.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readV2ArchiveOffThread2,
3
3
  serveV2ArchiveReads2
4
- } from "./index-8bpxfq4c.js";
4
+ } from "./index-jexm22qn.js";
5
5
  import"./index-8sqebjzk.js";
6
6
  import"./index-2qtx0q6h.js";
7
7
  import"./index-x2n261wp.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/pi-magic-context",
3
- "version": "0.49.49",
3
+ "version": "0.49.50",
4
4
  "type": "module",
5
5
  "description": "Pi and OMP coding agent extension for Magic Context — cross-session memory and context management",
6
6
  "main": "dist/index.js",