@cortexkit/opencode-magic-context 0.49.42 → 0.49.44

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 +3 -3
  2. package/dist/chunk-embedding-write-worker.js +1 -1
  3. package/dist/{compaction-marker-candidates-5c44h1m9.js → compaction-marker-candidates-dkfp1q9j.js} +12 -2
  4. package/dist/compaction-marker-candidates-worker.js +5 -2
  5. package/dist/{context-zf1yj1g0.js → context-ws6gbyrr.js} +19 -19
  6. package/dist/{embedding-backfill-rma0v2ct.js → embedding-backfill-zxj35jkq.js} +4 -4
  7. package/dist/embedding-worker.js +2 -2
  8. package/dist/features/magic-context/compaction-marker-candidates.d.ts +57 -4
  9. package/dist/features/magic-context/compaction-marker-candidates.d.ts.map +1 -1
  10. package/dist/features/magic-context/compaction-marker.d.ts +18 -3
  11. package/dist/features/magic-context/compaction-marker.d.ts.map +1 -1
  12. package/dist/features/magic-context/scheduler.d.ts.map +1 -1
  13. package/dist/hooks/magic-context/apply-operations.d.ts +5 -4
  14. package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
  15. package/dist/hooks/magic-context/cache-busting-signals.d.ts +4 -4
  16. package/dist/hooks/magic-context/cache-busting-signals.d.ts.map +1 -1
  17. package/dist/hooks/magic-context/compaction-marker-manager.d.ts +7 -1
  18. package/dist/hooks/magic-context/compaction-marker-manager.d.ts.map +1 -1
  19. package/dist/hooks/magic-context/compaction-marker-publication.d.ts.map +1 -1
  20. package/dist/hooks/magic-context/event-handler.d.ts.map +1 -1
  21. package/dist/hooks/magic-context/inject-compartments.d.ts +7 -2
  22. package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
  23. package/dist/hooks/magic-context/local-wire-reading.d.ts +54 -0
  24. package/dist/hooks/magic-context/local-wire-reading.d.ts.map +1 -0
  25. package/dist/hooks/magic-context/rust-mode-transform.d.ts.map +1 -1
  26. package/dist/hooks/magic-context/system-date-refresh.d.ts +1 -2
  27. package/dist/hooks/magic-context/system-date-refresh.d.ts.map +1 -1
  28. package/dist/hooks/magic-context/system-prompt-hash.d.ts.map +1 -1
  29. package/dist/hooks/magic-context/transform-context-state.d.ts +38 -6
  30. package/dist/hooks/magic-context/transform-context-state.d.ts.map +1 -1
  31. package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +5 -2
  32. package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
  33. package/dist/hooks/magic-context/transform.d.ts.map +1 -1
  34. package/dist/{index-zqsp3z0d.js → index-1j8m4ad0.js} +1 -1
  35. package/dist/{index-5m2azs6v.js → index-24y47287.js} +4 -4
  36. package/dist/{index-c5dzns43.js → index-4dpvnp8k.js} +1 -1
  37. package/dist/{index-ty4vhe4n.js → index-66qexmjw.js} +3 -3
  38. package/dist/{index-kfsqk1q7.js → index-6qnhaaa0.js} +1 -1
  39. package/dist/{index-n8bsqg7b.js → index-7y8c2n52.js} +3 -3
  40. package/dist/{index-ayk4we2k.js → index-8w3y6pxc.js} +36 -26
  41. package/dist/{index-p2e7j9p1.js → index-91y4xvx6.js} +1 -1
  42. package/dist/{index-rdx17j04.js → index-dasvhxwg.js} +1 -1
  43. package/dist/{index-z6v8086q.js → index-g0mjm7e4.js} +2 -2
  44. package/dist/{index-1zv08avf.js → index-g7rrfjkq.js} +4 -4
  45. package/dist/{index-3w1pbn85.js → index-gn6gfz4y.js} +64 -12
  46. package/dist/{index-xnm0wq1r.js → index-kgk64zyx.js} +1 -1
  47. package/dist/{index-xjw9rres.js → index-knnscj54.js} +1 -1
  48. package/dist/{index-gsqz39wk.js → index-m1mttf6y.js} +1 -1
  49. package/dist/{index-adt3jghq.js → index-ntssp0dt.js} +159 -49
  50. package/dist/{index-xd2p95m7.js → index-p6gs3xpx.js} +1 -1
  51. package/dist/{index-21fgrfrf.js → index-rhcwddn9.js} +2 -2
  52. package/dist/{index-fas76dft.js → index-v64se1t6.js} +5 -5
  53. package/dist/{index-xmqj3cf5.js → index-wapyeb06.js} +129 -56
  54. package/dist/index.js +23 -23
  55. package/dist/{message-index-bounded-5mj8p6nq.js → message-index-bounded-dmq6ne7d.js} +3 -3
  56. package/dist/migration-worker.js +1 -1
  57. package/dist/{project-embedding-registry-3yyegjma.js → project-embedding-registry-m47vg1ce.js} +3 -3
  58. package/dist/raw-ordinal-warmup-worker.js +3 -3
  59. package/dist/{read-session-chunk-k70bhfjm.js → read-session-chunk-3m7z9v3t.js} +2 -2
  60. package/dist/{recomp-orchestrator-2q4rmerf.js → recomp-orchestrator-9wtcpd7d.js} +12 -12
  61. package/dist/{render-36fvvwz6.js → render-esw55s0k.js} +6 -6
  62. package/dist/{search-6v2na3af.js → search-3b4kbhtw.js} +9 -9
  63. package/dist/{search-archive-jwb2ctnq.js → search-archive-wna5basn.js} +4 -4
  64. package/dist/shared/status-view.d.ts.map +1 -1
  65. package/dist/{transform-postprocess-phase-0ms3ga4h.js → transform-postprocess-phase-1y6p9ccc.js} +13 -13
  66. package/dist/v2/auto-search-worker.js +3 -3
  67. package/dist/v2/chunk-embedding-write-worker.js +1 -1
  68. package/dist/v2/compaction-marker-candidates-worker.js +5 -2
  69. package/dist/v2/{compaction-marker-candidates-jy65jt49.js → compaction-marker-candidates-y737qb1v.js} +12 -2
  70. package/dist/v2/{context-2xr6vbt2.js → context-sfgk72cj.js} +184 -64
  71. package/dist/v2/{embedding-backfill-00tw59rx.js → embedding-backfill-ahwzfc7v.js} +4 -4
  72. package/dist/v2/embedding-worker.js +2 -2
  73. package/dist/v2/hooks/context.d.ts.map +1 -1
  74. package/dist/v2/{message-index-bounded-5341qsqd.js → message-index-bounded-mapha2ag.js} +3 -3
  75. package/dist/v2/migration-worker.js +1 -1
  76. package/dist/v2/{project-embedding-registry-jqq2qeqb.js → project-embedding-registry-mn403rp5.js} +3 -3
  77. package/dist/v2/raw-ordinal-warmup-worker.js +3 -3
  78. package/dist/v2/{read-session-chunk-dgmq3ntm.js → read-session-chunk-svcthp0n.js} +2 -2
  79. package/dist/v2/{recomp-orchestrator-2vmyhtst.js → recomp-orchestrator-2bkv46am.js} +12 -12
  80. package/dist/v2/{render-kz0f40ws.js → render-315tv10c.js} +6 -6
  81. package/dist/v2/{search-archive-wajxd01m.js → search-archive-hnx40ts0.js} +4 -4
  82. package/dist/v2/{search-a9hwy1sw.js → search-bhrr075t.js} +8 -8
  83. package/dist/v2/{server-7qc9tk6z.js → server-1c720m9s.js} +1 -1
  84. package/dist/v2/{server-qehn6btp.js → server-1yx5455s.js} +2 -2
  85. package/dist/v2/{server-p78wdf43.js → server-63cz4w5t.js} +1 -1
  86. package/dist/v2/{server-kqrpt2ht.js → server-78mc9sxx.js} +1 -1
  87. package/dist/v2/{server-7acq7815.js → server-86sk7h34.js} +2 -2
  88. package/dist/v2/{server-6vzh6wej.js → server-8xdnk7vz.js} +1 -1
  89. package/dist/v2/{server-gkse1wyz.js → server-aqgg41wb.js} +3 -3
  90. package/dist/v2/{server-3m7p4g9w.js → server-g8xvnxcf.js} +1 -1
  91. package/dist/v2/{server-dwpgzm0t.js → server-gwxys0d0.js} +64 -12
  92. package/dist/v2/{server-5ydn39x3.js → server-ngdrh7rv.js} +130 -57
  93. package/dist/v2/{server-7zacmty5.js → server-p9s40wfa.js} +1 -1
  94. package/dist/v2/{server-dqs8e4yt.js → server-qs0mdpc1.js} +4 -4
  95. package/dist/v2/{server-sfcp13bn.js → server-rqypazrp.js} +3 -3
  96. package/dist/v2/{server-09td1wgc.js → server-t5gxvcc3.js} +1 -1
  97. package/dist/v2/{server-avdveykk.js → server-vjhk8v41.js} +1 -1
  98. package/dist/v2/{server-nq3cb7be.js → server-xnz3nrt2.js} +1 -1
  99. package/dist/v2/server.js +4 -4
  100. package/dist/v2/{v2-archive-reader-ag6sk771.js → v2-archive-reader-qwn0me88.js} +1 -1
  101. package/dist/v2/{wrapup-orchestrator-2a077zew.js → wrapup-orchestrator-ts0sqwp3.js} +12 -12
  102. package/dist/{v2-archive-reader-chk95syc.js → v2-archive-reader-vqqjkeaq.js} +1 -1
  103. package/dist/{wrapup-orchestrator-rhs675kj.js → wrapup-orchestrator-qxvbvr4r.js} +13 -13
  104. package/package.json +1 -1
  105. package/src/config/schema/magic-context.ts +1 -1
  106. package/src/shared/status-view.ts +3 -5
  107. package/src/tui/dialogs/status-dialog-render.test.ts +1 -1
@@ -20,7 +20,7 @@ import {
20
20
  cortexKitProjectConfigBasePath,
21
21
  resolveLegacyConfigSourcesForHarness,
22
22
  loadPluginConfigDetailed
23
- } from "./server-avdveykk.js";
23
+ } from "./server-vjhk8v41.js";
24
24
  import {
25
25
  catalogOutputReserve,
26
26
  getSdkContextLimit,
@@ -33,7 +33,7 @@ import {
33
33
  resolvePromptSurface,
34
34
  DEFAULT_HISTORIAN_TIMEOUT_MS,
35
35
  LIVE_RELOAD_CONFIG_PATHS
36
- } from "./server-7zacmty5.js";
36
+ } from "./server-p9s40wfa.js";
37
37
  import {
38
38
  inRootAsyncContext2,
39
39
  Database2,
@@ -152,7 +152,7 @@ import {
152
152
  getRawSessionTagKeysThrough2,
153
153
  getLegacyProtectedTailStartOrdinal2,
154
154
  readSessionChunk2
155
- } from "./server-kqrpt2ht.js";
155
+ } from "./server-78mc9sxx.js";
156
156
  import {
157
157
  BoundedSessionMap
158
158
  } from "./server-xy7w7hrd.js";
@@ -162,7 +162,7 @@ import {
162
162
  toMessageIndexSource,
163
163
  clearIndexedMessagesInTransaction,
164
164
  indexSourcesAfterOrdinal
165
- } from "./server-3m7p4g9w.js";
165
+ } from "./server-g8xvnxcf.js";
166
166
  import {
167
167
  COMPARTMENT_LEASE_RENEWAL_MS,
168
168
  getCompartmentLeaseBlocker,
@@ -206,7 +206,7 @@ import {
206
206
  getProjectState,
207
207
  recordSubagentInvocation,
208
208
  getLatestHistorianInvocationId
209
- } from "./server-7qc9tk6z.js";
209
+ } from "./server-1c720m9s.js";
210
210
  import {
211
211
  invalidateAutoEmbedSession
212
212
  } from "./server-2amn2s73.js";
@@ -223,9 +223,14 @@ import {
223
223
  import {
224
224
  isMarkerCandidateBasisCurrent2,
225
225
  invalidateMarkerCandidateBasis2,
226
+ discardMarkerCandidateBasis2,
226
227
  readMarkerCandidateBasis2,
227
- prepareMarkerCandidateBasis2
228
- } from "./server-dwpgzm0t.js";
228
+ prepareMarkerCandidateBasis2,
229
+ readMarkerFrontiers2,
230
+ certifiedMarkerReferenceFloor2,
231
+ readMarkerReferenceRows2,
232
+ readKnownMarkerReferenceRows2
233
+ } from "./server-gwxys0d0.js";
229
234
  import {
230
235
  shouldSkipHomeProjectMemory,
231
236
  resolveProjectIdentity
@@ -236,7 +241,7 @@ import {
236
241
  getProjectChunkEmbeddingModelId2,
237
242
  getProjectEmbeddingMaxInputTokens2,
238
243
  embedItemsForProject2
239
- } from "./server-7acq7815.js";
244
+ } from "./server-86sk7h34.js";
240
245
  import {
241
246
  V2_MEMORY_CATEGORIES,
242
247
  CATEGORY_PRIORITY,
@@ -255,13 +260,13 @@ import {
255
260
  userFacingFailureCode,
256
261
  promoteSessionFactsDurable,
257
262
  embedPromotedFacts
258
- } from "./server-nq3cb7be.js";
263
+ } from "./server-xnz3nrt2.js";
259
264
  import {
260
265
  getSchemaFenceRejection,
261
266
  LATEST_SUPPORTED_VERSION,
262
267
  getPersistedSchemaVersion,
263
268
  openDatabase
264
- } from "./server-09td1wgc.js";
269
+ } from "./server-t5gxvcc3.js";
265
270
  import {
266
271
  parseCompartmentOutput,
267
272
  resolveWorkspaceShareCategories,
@@ -1564,18 +1569,27 @@ function isCompactionMarkerIntentAbsent(marker, targetEndMessageId) {
1564
1569
  return !db.prepare(`SELECT 1 FROM message WHERE id IN (?, ?)
1565
1570
  UNION ALL SELECT 1 FROM part WHERE id IN (?, ?) LIMIT 1`).get(targetEndMessageId, marker.summaryMessageId, marker.compactionPartId, marker.summaryPartId);
1566
1571
  }
1567
- function withCompactionMarkerPublicationLock(operation, sessionId) {
1572
+ function withCompactionMarkerPublicationLock(operation, sessionId, onReferencesMissing) {
1568
1573
  const db = getWritableOpenCodeDb();
1569
1574
  const snapshot = prepareMarkerReplacementSnapshot(db, sessionId);
1570
- return runMarkerWriteTransaction(db, "compaction-marker-replace", () => {
1571
- if (snapshot)
1572
- activeMarkerReplacementSnapshots.set(db, snapshot);
1573
- try {
1574
- return operation();
1575
- } finally {
1576
- activeMarkerReplacementSnapshots.delete(db);
1577
- }
1578
- });
1575
+ if (snapshot === "references-missing" && onReferencesMissing) {
1576
+ startCompactionMarkerCandidatePreparation(sessionId);
1577
+ return onReferencesMissing();
1578
+ }
1579
+ try {
1580
+ return runMarkerWriteTransaction(db, "compaction-marker-replace", () => {
1581
+ if (typeof snapshot === "object")
1582
+ activeMarkerReplacementSnapshots.set(db, snapshot);
1583
+ try {
1584
+ return operation();
1585
+ } finally {
1586
+ activeMarkerReplacementSnapshots.delete(db);
1587
+ }
1588
+ });
1589
+ } finally {
1590
+ if (warmAfterCommit.delete(sessionId) && !db.inTransaction)
1591
+ startCompactionMarkerCandidatePreparation(sessionId);
1592
+ }
1579
1593
  }
1580
1594
  function inspectCompactionMarkerPublication(sessionId, recognized, summaryText, targetBoundaryMessageId, preferred) {
1581
1595
  const db = getWritableOpenCodeDb();
@@ -1683,12 +1697,37 @@ async function prepareCompactionMarkerCandidates(sessionId, options = {}) {
1683
1697
  if (!harnessOwnsOpenCodeStore2())
1684
1698
  return true;
1685
1699
  try {
1686
- return await prepareMarkerCandidateBasis2(getWritableOpenCodeDb(), sessionId, options);
1700
+ const db = getWritableOpenCodeDb();
1701
+ if (markerDiscoveryReady(db, sessionId))
1702
+ return true;
1703
+ discardMarkerCandidateBasis2(db, sessionId);
1704
+ const prepared = await prepareMarkerCandidateBasis2(db, sessionId, {
1705
+ references: !markerReplacementSnapshots.get(db)?.has(sessionId),
1706
+ ...options
1707
+ });
1708
+ return prepared && markerDiscoveryReady(db, sessionId);
1687
1709
  } catch (error) {
1688
1710
  log2(`[magic-context] compaction-marker: deferred candidate preparation for ${sessionId}: ${error instanceof Error ? error.message : String(error)}; marker unchanged`);
1689
1711
  return false;
1690
1712
  }
1691
1713
  }
1714
+ function startCompactionMarkerCandidatePreparation(sessionId) {
1715
+ if (!harnessOwnsOpenCodeStore2())
1716
+ return "ready";
1717
+ try {
1718
+ if (markerDiscoveryReady(getWritableOpenCodeDb(), sessionId))
1719
+ return "ready";
1720
+ } catch (error) {
1721
+ log2(`[magic-context] compaction-marker: deferred candidate preparation for ${sessionId}: ${error instanceof Error ? error.message : String(error)}; marker unchanged`);
1722
+ return "unavailable";
1723
+ }
1724
+ prepareCompactionMarkerCandidates(sessionId);
1725
+ return "preparing";
1726
+ }
1727
+ function markerDiscoveryReady(db, sessionId) {
1728
+ const basis = readMarkerCandidateBasis2(db, sessionId);
1729
+ return basis !== undefined && (basis.references !== undefined || markerReplacementSnapshots.get(db)?.has(sessionId) === true);
1730
+ }
1692
1731
  function injectCompactionMarkerFromBasis(args, validatedBasis, preserveExistingLineages = false) {
1693
1732
  const db = getWritableOpenCodeDb();
1694
1733
  if (!isOpenCodeSchemaCompatible(db, getOpenCodeDbPath())) {
@@ -1783,18 +1822,7 @@ class MarkerCandidateUnavailableError extends Error {
1783
1822
  }
1784
1823
  var activeMarkerReplacementSnapshots = new WeakMap;
1785
1824
  var markerReplacementSnapshots = new WeakMap;
1786
- var MARKER_TAIL_REFERENCE_COLUMNS = `id,
1787
- CASE WHEN data LIKE '%tail_start_id%' THEN json_extract(data, '$.tail_start_id') END AS direct,
1788
- CASE WHEN data LIKE '%tail_start_id%' THEN json_extract(data, '$.compaction.tail_start_id') END AS nested`;
1789
- function readMarkerReferenceRows(db, sessionId, table, highestId) {
1790
- return db.prepare(`SELECT ${MARKER_TAIL_REFERENCE_COLUMNS} FROM ${table}
1791
- WHERE ${highestId === undefined ? "session_id = ?" : "id > ? AND +session_id = ?"}
1792
- AND ${table === "part" ? "data LIKE '%compaction%' AND json_valid(data) AND json_extract(data, '$.type') = 'compaction'" : "(data LIKE '%compaction%' OR data LIKE '%tail_start_id%') AND json_valid(data) AND (json_type(data, '$.compaction') IS NOT NULL OR json_type(data, '$.tail_start_id') IS NOT NULL)"}`).all(...highestId === undefined ? [sessionId] : [highestId, sessionId]);
1793
- }
1794
- function readKnownMarkerReferenceRows(db, sessionId, table, ids) {
1795
- const byId = db.prepare(`SELECT ${MARKER_TAIL_REFERENCE_COLUMNS} FROM ${table} WHERE id = ? AND session_id = ?`);
1796
- return ids.flatMap((id) => byId.all(id, sessionId));
1797
- }
1825
+ var warmAfterCommit = new Set;
1798
1826
  function prepareMarkerReplacementSnapshot(db, sessionId) {
1799
1827
  const sessions = markerReplacementSnapshots.get(db) ?? new Map;
1800
1828
  markerReplacementSnapshots.set(db, sessions);
@@ -1822,23 +1850,37 @@ function prepareMarkerReplacementSnapshot(db, sessionId) {
1822
1850
  sessions.delete(sessionId);
1823
1851
  return;
1824
1852
  }
1825
- const previous = sessions.get(sessionId);
1826
- const highestId = (table) => reader.prepare(`SELECT id FROM ${table} ORDER BY id DESC LIMIT 1`).all()[0]?.id ?? "";
1827
- const discover = (table, ids, highest) => previous ? [
1853
+ const cached = sessions.get(sessionId);
1854
+ let knownParts;
1855
+ for (const seed of [cached, basis.references]) {
1856
+ const floor = seed ? certifiedMarkerReferenceFloor2(reader, "part", seed.partFrontiers) : undefined;
1857
+ if (seed && floor !== undefined) {
1858
+ knownParts = { seed, floor };
1859
+ break;
1860
+ }
1861
+ }
1862
+ if (!knownParts) {
1863
+ sessions.delete(sessionId);
1864
+ discardMarkerCandidateBasis2(db, sessionId);
1865
+ log2(`[magic-context] compaction-marker: deferred replacement for ${sessionId}: part reference discovery is missing or its frontier changed; marker unchanged`);
1866
+ return "references-missing";
1867
+ }
1868
+ const discover = (table, ids, floor) => [
1828
1869
  ...new Map([
1829
- ...readKnownMarkerReferenceRows(reader, sessionId, table, ids),
1830
- ...readMarkerReferenceRows(reader, sessionId, table, highest)
1870
+ ...readKnownMarkerReferenceRows2(reader, sessionId, table, ids),
1871
+ ...readMarkerReferenceRows2(reader, sessionId, table, floor)
1831
1872
  ].map((row) => [row.id, row])).values()
1832
- ] : readMarkerReferenceRows(reader, sessionId, table);
1833
- const parts = discover("part", previous?.partIds ?? [], previous?.highestPartId ?? "");
1834
- const messages = discover("message", previous?.messageIds ?? [], previous?.highestMessageId ?? "");
1873
+ ];
1874
+ const parts = discover("part", knownParts.seed.partIds, knownParts.floor);
1875
+ const messageFloor = cached ? certifiedMarkerReferenceFloor2(reader, "message", cached.messageFrontiers) : undefined;
1876
+ const messages = cached && messageFloor !== undefined ? discover("message", cached.messageIds, messageFloor) : readMarkerReferenceRows2(reader, sessionId, "message");
1835
1877
  snapshot = {
1836
1878
  sessionId,
1837
1879
  basis,
1838
1880
  partIds: parts.map((row) => row.id),
1839
1881
  messageIds: messages.map((row) => row.id),
1840
- highestPartId: highestId("part"),
1841
- highestMessageId: highestId("message"),
1882
+ partFrontiers: readMarkerFrontiers2(reader, "part"),
1883
+ messageFrontiers: readMarkerFrontiers2(reader, "message"),
1842
1884
  references: [...parts, ...messages]
1843
1885
  };
1844
1886
  } finally {
@@ -1855,7 +1897,7 @@ function prepareMarkerReplacementSnapshot(db, sessionId) {
1855
1897
  throw error;
1856
1898
  }
1857
1899
  }
1858
- function markerRowsAreReferenced(db, snapshot, existing) {
1900
+ function markerRowsAreReferenced(db, snapshot, existing, seen) {
1859
1901
  const deleted = new Set([
1860
1902
  existing.summaryMessageId,
1861
1903
  existing.summaryPartId,
@@ -1864,13 +1906,18 @@ function markerRowsAreReferenced(db, snapshot, existing) {
1864
1906
  const referencesDeleted = (row) => !deleted.has(row.id) && [row.direct, row.nested].some((id) => typeof id === "string" && deleted.has(id));
1865
1907
  if (snapshot.references.some(referencesDeleted))
1866
1908
  throw new Error("a surviving tail_start_id references a recorded marker row; marker unchanged");
1867
- for (const [table, ids, highestId] of [
1868
- ["part", snapshot.partIds, snapshot.highestPartId],
1869
- ["message", snapshot.messageIds, snapshot.highestMessageId]
1909
+ for (const [table, ids, frontiers] of [
1910
+ ["part", snapshot.partIds, snapshot.partFrontiers],
1911
+ ["message", snapshot.messageIds, snapshot.messageFrontiers]
1870
1912
  ]) {
1871
- if (readKnownMarkerReferenceRows(db, snapshot.sessionId, table, ids).some(referencesDeleted))
1913
+ const floor = certifiedMarkerReferenceFloor2(db, table, frontiers);
1914
+ if (floor === undefined)
1915
+ throw new MarkerCandidateUnavailableError(`host ${table} frontier changed after marker reference discovery; marker unchanged`);
1916
+ if (readKnownMarkerReferenceRows2(db, snapshot.sessionId, table, ids).some(referencesDeleted))
1872
1917
  return true;
1873
- if (readMarkerReferenceRows(db, snapshot.sessionId, table, highestId).some(referencesDeleted))
1918
+ const suffix = readMarkerReferenceRows2(db, snapshot.sessionId, table, floor);
1919
+ seen[table].push(...suffix.map((row) => row.id));
1920
+ if (suffix.some(referencesDeleted))
1874
1921
  return true;
1875
1922
  }
1876
1923
  return false;
@@ -1883,19 +1930,21 @@ function replaceCompactionMarker(existing, args, preserveExistingLineages = fals
1883
1930
  const db = getWritableOpenCodeDb();
1884
1931
  connection = db;
1885
1932
  const snapshot = activeMarkerReplacementSnapshots.get(db) ?? prepareMarkerReplacementSnapshot(db, args.sessionId);
1886
- if (!snapshot || snapshot.sessionId !== args.sessionId) {
1933
+ if (typeof snapshot !== "object" || snapshot.sessionId !== args.sessionId) {
1887
1934
  return {
1888
1935
  kind: "deferred",
1889
1936
  error: new Error("marker candidate preparation pending; marker unchanged")
1890
1937
  };
1891
1938
  }
1892
1939
  const { basis } = snapshot;
1940
+ let advanceFrontiers;
1893
1941
  const marker = runMarkerWriteTransaction(db, "compaction-marker-replace", () => {
1894
1942
  entered = true;
1895
1943
  if (!isMarkerCandidateBasisCurrent2(db, basis))
1896
1944
  throw new MarkerCandidateUnavailableError("host store changed after marker candidate preparation; marker unchanged");
1945
+ const seen = { part: [], message: [] };
1897
1946
  if (existing) {
1898
- if (markerRowsAreReferenced(db, snapshot, existing))
1947
+ if (markerRowsAreReferenced(db, snapshot, existing, seen))
1899
1948
  throw new MarkerCandidateUnavailableError("a surviving tail_start_id references a recorded marker row; marker unchanged");
1900
1949
  db.prepare("DELETE FROM part WHERE id = ?").run(existing.summaryPartId);
1901
1950
  db.prepare("DELETE FROM message WHERE id = ?").run(existing.summaryMessageId);
@@ -1905,9 +1954,28 @@ function replaceCompactionMarker(existing, args, preserveExistingLineages = fals
1905
1954
  if (!replacement) {
1906
1955
  throw new Error(`failed to inject replacement marker at ordinal ${args.endOrdinal}`);
1907
1956
  }
1957
+ if (existing) {
1958
+ try {
1959
+ const partFrontiers = readMarkerFrontiers2(db, "part");
1960
+ const messageFrontiers = readMarkerFrontiers2(db, "message");
1961
+ advanceFrontiers = () => {
1962
+ snapshot.partIds = [...new Set([...snapshot.partIds, ...seen.part])];
1963
+ snapshot.messageIds = [
1964
+ ...new Set([...snapshot.messageIds, ...seen.message])
1965
+ ];
1966
+ snapshot.partFrontiers = partFrontiers;
1967
+ snapshot.messageFrontiers = messageFrontiers;
1968
+ };
1969
+ } catch {}
1970
+ }
1908
1971
  readyToCommit = true;
1909
1972
  return replacement;
1910
1973
  });
1974
+ advanceFrontiers?.();
1975
+ if (db.inTransaction)
1976
+ warmAfterCommit.add(args.sessionId);
1977
+ else
1978
+ startCompactionMarkerCandidatePreparation(args.sessionId);
1911
1979
  return { kind: "committed", marker };
1912
1980
  } catch (error) {
1913
1981
  if (error instanceof MarkerCandidateUnavailableError)
@@ -4586,7 +4654,13 @@ function publishRecoverableCompactionMarker(db, args, targetIsCurrent) {
4586
4654
  if (replacement.kind !== "committed")
4587
4655
  cut = replacement.kind === "uncertain" ? "uncertain" : "definitely-no-cut";
4588
4656
  return replacement;
4589
- }, sessionId);
4657
+ }, sessionId, () => {
4658
+ reason = "candidate-preparation";
4659
+ return {
4660
+ kind: "deferred",
4661
+ error: new Error("marker reference discovery pending; marker unchanged")
4662
+ };
4663
+ });
4590
4664
  if (result.kind === "committed") {
4591
4665
  if (!intended)
4592
4666
  throw new Error("committed marker has no publication intent");
@@ -4672,7 +4746,7 @@ function boundaryWouldDiscardUncoveredMessage(db, sessionId, ordinal, boundaryMe
4672
4746
  }
4673
4747
  return false;
4674
4748
  }
4675
- function applyDeferredCompactionMarker(db, sessionId, pending, directory, trustedBoundary) {
4749
+ function applyDeferredCompactionMarker(db, sessionId, pending, directory, trustedBoundary, options = {}) {
4676
4750
  let cut = "uncertain";
4677
4751
  let stepStartedAt = performance.now();
4678
4752
  const stepMs = [];
@@ -4728,6 +4802,8 @@ function applyDeferredCompactionMarker(db, sessionId, pending, directory, truste
4728
4802
  return { kind: "stale-skip", reason: "partial-message-boundary" };
4729
4803
  }
4730
4804
  endStep("discardCheck");
4805
+ if (options.validateOnly)
4806
+ return { kind: "deferred", reason: "candidate-preparation" };
4731
4807
  cut = "uncertain";
4732
4808
  const replacement = publishRecoverableCompactionMarker(db, {
4733
4809
  sessionId,
@@ -8513,9 +8589,6 @@ function mustMaterialize(args) {
8513
8589
  m0ToolSetHashNew: liveToolSetHash
8514
8590
  } : null;
8515
8591
  const withToolSetHashComparison = (decision) => toolSetHashComparison ? { ...decision, ...toolSetHashComparison } : decision;
8516
- if (hard.cacheExpired && hard.lastResponseTime > 0 && hard.lastResponseTime > (args.state.cachedM0MaterializedAt ?? 0)) {
8517
- return withToolSetHashComparison({ value: true, reason: "ttl_idle" });
8518
- }
8519
8592
  const hostCompaction = hard.hostCompaction;
8520
8593
  if (hostCompaction !== undefined && hostCompaction.completedAt > (args.state.cachedM0MaterializedAt ?? 0)) {
8521
8594
  return withToolSetHashComparison({ value: true, reason: "host_compaction" });
@@ -15941,4 +16014,4 @@ ${failure}`;
15941
16014
  }
15942
16015
  }
15943
16016
 
15944
- export { historianRunConfig, dreamerRunConfig, pluginConfigReader, currentPluginConfigReader, withLiveDreamerOutputCap, v2ToolDefinitionsHash, readCoordinateGeneration, rebaseSessionCoordinatesAsync, HiddenCompletionRefusal, getOpenCodeDbPath, compareOpenCodeMessagesByCanonicalOrder, prepareCompactionMarkerCandidates, removeMcOwnedCompactionMarkers, getCompartmentEvents, USER_MEMORY_CANDIDATE_TTL_MS, insertUserMemoryCandidates, getUserMemoryCandidates, deleteUserMemoryCandidates, pruneExpiredUserMemoryCandidates, insertUserMemory, getActiveUserMemories, updateUserMemoryContent, dismissUserMemory, DreamerProviderOutputFailureError, withDreamerModelCooldown, providerOutputFailureFromInvalidManifest, DREAMER_AGENT, DREAMER_RETROSPECTIVE_AGENT, DREAMER_PRIMER_INVESTIGATOR_AGENT, DREAMER_MEMORY_MAPPER_AGENT, DREAMER_CLASSIFIER_AGENT, DREAMER_DOCS_AGENT, DREAMER_REVIEWER_AGENT, HIDDEN_HISTORIAN_AGENT, HIDDEN_DREAMER_AGENT, HIDDEN_CURATE_AGENT, hiddenAgentFor, hiddenToolLoop, HIDDEN_RUN_DISPOSED_REASON, noteChildOfDisposedInstance, hiddenChildPermissions, registerHiddenChildAgents, hiddenToolCallRefusal, HiddenAgentStepLimit, HiddenChildHook, extractLatestAssistantText, hasLengthCappedOutput, parseProviderModel, modelBodyField, toModelEntry, ModelProducedNoOutputError, noteModelActivityMonitored, noteModelOutputReceived, isPromptTimeoutError, getPromptFailureDetail, raceWithSignal, promptSyncWithValidatedOutputRetry, normalizeSDKResponse, annotateSubagentInvocationError, failedInvocationStatus, emptyTokenTotals, sumTokensFromChildMessages, recordChildInvocation, createPromptAsyncTransport, CTX_NOTE_LIGHT_DESCRIPTION, ACTIVE_TOOL_IDS, systemPromptFingerprint, createPromptSurfaceRuntime, createPromptSurfaceGuidanceEpochCache, MARKER_SUMMARY_TEXT, markerUpdateDefinitelyDidNotCut, applyDeferredCompactionMarker, teardownChildSession, runTokenLog, formatRunTokenLog, createChildSessionWithFence, buildMagicContextSection, getMuralIdentity, getMural, modelKeyAcceptsImages, resolveMuralWire, extractM0Block, formatDate, TEMPORAL_MARKER_REPLAY_PATTERN, collectTemporalCandidates, injectTemporalMarkers, clearInjectionCache, getVisibleMemoryIds, selectHiddenMessagesAtCompactionSeam, prepareCompartmentInjection, renderCompartmentInjection, MaterializeContentionError, mustMaterialize, trimMemoriesToBudgetV2, renderMemoryBlockV2, materializeM0, hydrateCachedM0Mural, resetPrefixTrimFallbackState, findHostCompactionWindow, capturePrefixTrimSourceOrder, prepareCachedM0M1Replay, hasCompleteCachedM0M1, injectM0M1, clampProducerAtomChars, producerInputTokenLimit, historianProducerReserve, producerPromptFailureReason, resolveHiddenCompletionExecutor, createV1HiddenCompletionExecutor, shouldWaitForNewHistorianHistory, EMPTY_READ_REPLY, noteTouchedAt, renderGlance, renderNotesById, formatWriteReply, observeNoteNudgeServe, onNoteTrigger, peekNoteNudgeText, markNoteNudgeDelivered, clearNoteNudgeTriggerAndCooldown, omitIncompleteFileTokenTotals, describeBoundaryDiagnostics, RECOVERY_NO_HEAD_LIMIT, deriveProtectedTailTokenTarget, selectPerRunCap, resolveOpenCodeProtectedTailBoundary, resolveWrapupProtectedTailBoundary, getRawHistoryEligibility, hasRunnableCompartmentWindow, recordHighPressureNoEligibleHead, noteTransformPassForExactOrdinalReads, runCompartmentAgent, getActiveCompartmentRun, markActiveCompartmentRunPublished, registerActiveCompartmentRun, startCompartmentAgent, isRecompFailure2, isRecompSkip2, extractRecompReason2, setRecompStarting2, setRecompNote2, setRecompTerminal2, buildRecompDeps2, runManagedRecomp2 };
16017
+ export { historianRunConfig, dreamerRunConfig, pluginConfigReader, currentPluginConfigReader, withLiveDreamerOutputCap, v2ToolDefinitionsHash, readCoordinateGeneration, rebaseSessionCoordinatesAsync, HiddenCompletionRefusal, getOpenCodeDbPath, compareOpenCodeMessagesByCanonicalOrder, startCompactionMarkerCandidatePreparation, removeMcOwnedCompactionMarkers, getCompartmentEvents, USER_MEMORY_CANDIDATE_TTL_MS, insertUserMemoryCandidates, getUserMemoryCandidates, deleteUserMemoryCandidates, pruneExpiredUserMemoryCandidates, insertUserMemory, getActiveUserMemories, updateUserMemoryContent, dismissUserMemory, DreamerProviderOutputFailureError, withDreamerModelCooldown, providerOutputFailureFromInvalidManifest, DREAMER_AGENT, DREAMER_RETROSPECTIVE_AGENT, DREAMER_PRIMER_INVESTIGATOR_AGENT, DREAMER_MEMORY_MAPPER_AGENT, DREAMER_CLASSIFIER_AGENT, DREAMER_DOCS_AGENT, DREAMER_REVIEWER_AGENT, HIDDEN_HISTORIAN_AGENT, HIDDEN_DREAMER_AGENT, HIDDEN_CURATE_AGENT, hiddenAgentFor, hiddenToolLoop, HIDDEN_RUN_DISPOSED_REASON, noteChildOfDisposedInstance, hiddenChildPermissions, registerHiddenChildAgents, hiddenToolCallRefusal, HiddenAgentStepLimit, HiddenChildHook, extractLatestAssistantText, hasLengthCappedOutput, parseProviderModel, modelBodyField, toModelEntry, ModelProducedNoOutputError, noteModelActivityMonitored, noteModelOutputReceived, isPromptTimeoutError, getPromptFailureDetail, raceWithSignal, promptSyncWithValidatedOutputRetry, normalizeSDKResponse, annotateSubagentInvocationError, failedInvocationStatus, emptyTokenTotals, sumTokensFromChildMessages, recordChildInvocation, createPromptAsyncTransport, CTX_NOTE_LIGHT_DESCRIPTION, ACTIVE_TOOL_IDS, systemPromptFingerprint, createPromptSurfaceRuntime, createPromptSurfaceGuidanceEpochCache, MARKER_SUMMARY_TEXT, markerUpdateDefinitelyDidNotCut, applyDeferredCompactionMarker, teardownChildSession, runTokenLog, formatRunTokenLog, createChildSessionWithFence, buildMagicContextSection, getMuralIdentity, getMural, modelKeyAcceptsImages, resolveMuralWire, extractM0Block, formatDate, TEMPORAL_MARKER_REPLAY_PATTERN, collectTemporalCandidates, injectTemporalMarkers, clearInjectionCache, getVisibleMemoryIds, selectHiddenMessagesAtCompactionSeam, prepareCompartmentInjection, renderCompartmentInjection, MaterializeContentionError, mustMaterialize, trimMemoriesToBudgetV2, renderMemoryBlockV2, materializeM0, hydrateCachedM0Mural, resetPrefixTrimFallbackState, findHostCompactionWindow, capturePrefixTrimSourceOrder, prepareCachedM0M1Replay, hasCompleteCachedM0M1, injectM0M1, clampProducerAtomChars, producerInputTokenLimit, historianProducerReserve, producerPromptFailureReason, resolveHiddenCompletionExecutor, createV1HiddenCompletionExecutor, shouldWaitForNewHistorianHistory, EMPTY_READ_REPLY, noteTouchedAt, renderGlance, renderNotesById, formatWriteReply, observeNoteNudgeServe, onNoteTrigger, peekNoteNudgeText, markNoteNudgeDelivered, clearNoteNudgeTriggerAndCooldown, omitIncompleteFileTokenTotals, describeBoundaryDiagnostics, RECOVERY_NO_HEAD_LIMIT, deriveProtectedTailTokenTarget, selectPerRunCap, resolveOpenCodeProtectedTailBoundary, resolveWrapupProtectedTailBoundary, getRawHistoryEligibility, hasRunnableCompartmentWindow, recordHighPressureNoEligibleHead, noteTransformPassForExactOrdinalReads, runCompartmentAgent, getActiveCompartmentRun, markActiveCompartmentRunPublished, registerActiveCompartmentRun, startCompartmentAgent, isRecompFailure2, isRecompSkip2, extractRecompReason2, setRecompStarting2, setRecompNote2, setRecompTerminal2, buildRecompDeps2, runManagedRecomp2 };
@@ -7002,7 +7002,7 @@ var MagicContextConfigSchema = object({
7002
7002
  enabled: boolean().default(true).describe("Enable smart-note authoring and condition evaluation. Needs a runnable dreamer, which evaluates the conditions: with dreamer.disable true (or no dreamer block) ctx_note offers no surface_condition whatever this says. User-level only: tool definitions are process-wide. Changes require a host restart and rebuild each session's cached prompt once. Pending notes remain stored and unchecked; already-ready notes still surface."),
7003
7003
  retina_handoff: boolean().default(false).describe("When true, dreamer skips smart notes whose surface conditions compiled to retina provider configs at authoring time. Default false keeps both paths active until the retina consumer is deployed.")
7004
7004
  }).default({ enabled: true, retina_handoff: false }).describe("Smart-note ownership transition controls."),
7005
- cache_ttl: union([string(), object({ default: string() }).catchall(string())]).default("5m").describe(`How long Magic Context assumes the provider's cached prefix stays valid. This is MC's own deferral gate — it does not change the provider's actual cache lifetime. String (e.g. "5m", "1h", "30s") or per-model object ({ default: "5m", "provider/model": "1h", "provider/*": "never" }); keys resolve most-specific first (exact provider/model, bare model ID, shorter dash-prefixes, then the provider/* wildcard, then default). User and project settings, including an explicit "5m" or object default, apply on the next pass. Only built-in defaults are frozen per session, including across restarts: when unset, GPT-5.6 and later (including gpt-6*, through any provider prefix) use 30m, other models use 5m. /ctx-status shows the effective TTL and whether it comes from your config or a frozen built-in default. Editing the TTL does not itself rewrite prompt bytes; a lowered TTL rebuilds only after normal idle expiry. OpenAI documents at least 30 minutes since the latest write or reuse: https://developers.openai.com/api/docs/guides/prompt-caching (Cache lifetime and Summary of model differences). Set to "never" to mean MC never assumes expiry (for lanes kept warm externally by a cache-keep tool) — disables the idle-TTL heuristic so MC never initiates a rebuild based on elapsed time. Provider-side extended TTL is a separate request-level concern (cache_control: { ttl } in the request body).`),
7005
+ cache_ttl: union([string(), object({ default: string() }).catchall(string())]).default("5m").describe(`How long Magic Context assumes the provider's cached prefix stays valid. It does not change the provider's actual cache lifetime, and it triggers no rebuild or fold: after an expiry the next request replays the same bytes. Magic Context uses it for diagnostics and, on OpenCode 2, to time an idle checkpoint in the host's session store (the experimental Rust transform still rebuilds on it). String (e.g. "5m", "1h", "30s") or per-model object ({ default: "5m", "provider/model": "1h", "provider/*": "never" }); keys resolve most-specific first (exact provider/model, bare model ID, shorter dash-prefixes, then the provider/* wildcard, then default). User and project settings, including an explicit "5m" or object default, apply on the next pass. Only built-in defaults are frozen per session, including across restarts: when unset, GPT-5.6 and later (including gpt-6*, through any provider prefix) use 30m, other models use 5m. /ctx-status shows the effective TTL and whether it comes from your config or a frozen built-in default. Editing the TTL never rewrites prompt bytes. OpenAI documents at least 30 minutes since the latest write or reuse: https://developers.openai.com/api/docs/guides/prompt-caching (Cache lifetime and Summary of model differences). Set to "never" to mean MC never assumes expiry (for a provider cache that an external cache-keep tool keeps warm). Provider-side extended TTL is a separate request-level concern (cache_control: { ttl } in the request body).`),
7006
7006
  prompt_surface: PromptSurfaceConfigSchema.default({ default: "full" }).describe("Prompt-surface presets: default is full; models use bare model IDs, provider/model, or provider/* routing keys. Guidance and tool-description overrides are user-level only. OpenCode 1.x, Pi, and OMP register tool descriptions once per process (they follow the default preset). OpenCode 2 rewrites the five ctx_* descriptions per request from the draft model."),
7007
7007
  output_reserve: union([
7008
7008
  number().min(0),
@@ -25,7 +25,7 @@ import {
25
25
  isMessageIndexReconciledThrough,
26
26
  clearIndexedMessages,
27
27
  indexMessagesAfterOrdinal
28
- } from "./server-3m7p4g9w.js";
28
+ } from "./server-g8xvnxcf.js";
29
29
  import {
30
30
  Priority,
31
31
  AdmissionClass,
@@ -56,7 +56,7 @@ import {
56
56
  enqueueShadowEmbeddingItems2,
57
57
  getProjectEmbeddingSnapshot2,
58
58
  embedItemsForProject2
59
- } from "./server-7acq7815.js";
59
+ } from "./server-86sk7h34.js";
60
60
  import {
61
61
  recordEmbeddingMeasurement
62
62
  } from "./server-2amn2s73.js";
@@ -68,7 +68,7 @@ import {
68
68
  isEmbeddingEnabled,
69
69
  embedText,
70
70
  ensureMemoryEmbeddings2
71
- } from "./server-gkse1wyz.js";
71
+ } from "./server-aqgg41wb.js";
72
72
  import {
73
73
  ModuleMemoryAuthorityError2,
74
74
  getMemoriesByProject2,
@@ -81,7 +81,7 @@ import {
81
81
  sanitizeFtsQuery,
82
82
  searchMemoriesFTS,
83
83
  searchMemoriesFTSUnion
84
- } from "./server-nq3cb7be.js";
84
+ } from "./server-xnz3nrt2.js";
85
85
  import {
86
86
  MESSAGE_FTS_SESSION_FILTER_SQL,
87
87
  withMessageFtsSessionFilter
@@ -139,9 +139,9 @@ async function serveV2ArchiveReads2(port, openConnections) {
139
139
  import("./sqlite-zdgm52sv.js"),
140
140
  import("./store-reader-cgx47zkp.js"),
141
141
  import("./store-pebs9m52.js"),
142
- import("./read-session-chunk-dgmq3ntm.js"),
143
- import("./render-kz0f40ws.js"),
144
- import("./search-archive-wajxd01m.js"),
142
+ import("./read-session-chunk-svcthp0n.js"),
143
+ import("./render-315tv10c.js"),
144
+ import("./search-archive-hnx40ts0.js"),
145
145
  import("./expand-attachments-h33jbgyz.js")
146
146
  ]);
147
147
  const pool = new V2StoreReaderPool;
@@ -1022,7 +1022,7 @@ function finishDatabaseOpen(db, dbPath, explicitDbPath, latestSupportedVersion)
1022
1022
  state.running = startMessageFtsRowidMapBackfill2(db, signal).then(async () => {
1023
1023
  if (signal.aborted || !readsOpenCodeStore)
1024
1024
  return;
1025
- const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-dgmq3ntm.js"));
1025
+ const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-svcthp0n.js"));
1026
1026
  const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-0c4h7sg6.js"));
1027
1027
  if (signal.aborted)
1028
1028
  return;
@@ -11,7 +11,7 @@ import {
11
11
  PER_HARNESS_MODEL_KEYS,
12
12
  ConfigProfilesSchema,
13
13
  MagicContextConfigSchema
14
- } from "./server-7zacmty5.js";
14
+ } from "./server-p9s40wfa.js";
15
15
  import {
16
16
  isCompactionEnabled,
17
17
  migrateLegacyAgentEnabledInMemory
@@ -10,7 +10,7 @@ import {
10
10
  } from "./server-jb6tjyeb.js";
11
11
  import {
12
12
  embedTextForProject2
13
- } from "./server-7acq7815.js";
13
+ } from "./server-86sk7h34.js";
14
14
  import {
15
15
  saveEmbeddingIfHashMatches
16
16
  } from "./server-4dhv7mqz.js";
package/dist/v2/server.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  loadPluginConfigDetailed
3
- } from "./server-avdveykk.js";
3
+ } from "./server-vjhk8v41.js";
4
4
  import {
5
5
  setHarness2
6
6
  } from "./server-pavzsdc6.js";
@@ -22,7 +22,7 @@ import {
22
22
  union,
23
23
  tuple,
24
24
  record
25
- } from "./server-7zacmty5.js";
25
+ } from "./server-p9s40wfa.js";
26
26
  import {
27
27
  pushNotification2
28
28
  } from "./server-x8a7jmkh.js";
@@ -7875,7 +7875,7 @@ var require_src2 = __commonJS(function(exports, module) {
7875
7875
  // package.json
7876
7876
  var package_default = {
7877
7877
  name: "@cortexkit/opencode-magic-context",
7878
- version: "0.49.42",
7878
+ version: "0.49.44",
7879
7879
  type: "module",
7880
7880
  description: "OpenCode plugin for Magic Context — cross-session memory and context management",
7881
7881
  main: "dist/index.js",
@@ -8196,7 +8196,7 @@ async function setup(context) {
8196
8196
  if (claimStorageBackupWarningCheck() && isMagicContextStorageOutsideEngram(storageDir)) {
8197
8197
  log2(`[magic-context] Magic Context storage is at ${storageDir}, outside the folder Engram backs up (~/.local/share/cortexkit/magic-context). It is not included in CortexKit backups.`);
8198
8198
  }
8199
- const { registerContext } = await import("./context-2xr6vbt2.js");
8199
+ const { registerContext } = await import("./context-sfgk72cj.js");
8200
8200
  setHarness2("opencode2");
8201
8201
  bindStaleBuildNotice({}, import.meta.url, "opencode2");
8202
8202
  const duties = await registerContext(context);
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readV2ArchiveOffThread2,
3
3
  serveV2ArchiveReads2
4
- } from "./server-sfcp13bn.js";
4
+ } from "./server-rqypazrp.js";
5
5
  import"./server-v0p37hm2.js";
6
6
  import"./server-gzy5w8ya.js";
7
7
  import"./server-1d042x6w.js";
@@ -11,7 +11,7 @@ import {
11
11
  releaseCompartmentLeaseBestEffort,
12
12
  getCompartments,
13
13
  getLastCompartmentEndMessage
14
- } from "./server-7qc9tk6z.js";
14
+ } from "./server-1c720m9s.js";
15
15
  import"./server-2amn2s73.js";
16
16
  import"./server-969cdpmg.js";
17
17
  import"./server-zzgtgqmd.js";
@@ -24,7 +24,7 @@ import"./server-1d042x6w.js";
24
24
  import"./server-tnzbk64q.js";
25
25
  import"./server-nmyganc8.js";
26
26
  import"./server-cp1a03vc.js";
27
- import"./server-3m7p4g9w.js";
27
+ import"./server-g8xvnxcf.js";
28
28
  import {
29
29
  getWrapupInProgressState,
30
30
  acquireWrapupInProgress,
@@ -33,12 +33,12 @@ import {
33
33
  getHistorianFailureState,
34
34
  clearEmergencyRecovery,
35
35
  prepareRawSessionOrdinals2
36
- } from "./server-kqrpt2ht.js";
36
+ } from "./server-78mc9sxx.js";
37
37
  import"./server-tpt7bwq8.js";
38
- import"./server-09td1wgc.js";
38
+ import"./server-t5gxvcc3.js";
39
39
  import"./server-1zx87sdm.js";
40
40
  import"./server-xfjjbrkt.js";
41
- import"./server-7zacmty5.js";
41
+ import"./server-p9s40wfa.js";
42
42
  import"./server-2ra6pwf3.js";
43
43
  import"./server-mfn1yf9d.js";
44
44
  import"./server-xy7w7hrd.js";
@@ -52,7 +52,7 @@ import"./server-ypf1ap0v.js";
52
52
  import {
53
53
  pushNotification2
54
54
  } from "./server-x8a7jmkh.js";
55
- import"./server-dwpgzm0t.js";
55
+ import"./server-gwxys0d0.js";
56
56
  import {
57
57
  describeBoundaryDiagnostics,
58
58
  resolveWrapupProtectedTailBoundary,
@@ -63,16 +63,16 @@ import {
63
63
  registerActiveCompartmentRun,
64
64
  setRecompStarting2,
65
65
  setRecompTerminal2
66
- } from "./server-5ydn39x3.js";
66
+ } from "./server-ngdrh7rv.js";
67
67
  import"./server-qt1qqasc.js";
68
- import"./server-7acq7815.js";
68
+ import"./server-86sk7h34.js";
69
69
  import"./server-dcws5831.js";
70
70
  import"./server-4dhv7mqz.js";
71
- import"./server-6vzh6wej.js";
72
- import"./server-gkse1wyz.js";
71
+ import"./server-8xdnk7vz.js";
72
+ import"./server-aqgg41wb.js";
73
73
  import"./server-jjvbk92s.js";
74
- import"./server-nq3cb7be.js";
75
- import"./server-avdveykk.js";
74
+ import"./server-xnz3nrt2.js";
75
+ import"./server-vjhk8v41.js";
76
76
  import"./server-qxzbmtqt.js";
77
77
  import"./server-sd8hvzte.js";
78
78
  import"./server-f0j864ma.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readV2ArchiveOffThread2,
3
3
  serveV2ArchiveReads2
4
- } from "./index-n8bsqg7b.js";
4
+ } from "./index-7y8c2n52.js";
5
5
  import"./index-v0p37hm2.js";
6
6
  import"./index-gzy5w8ya.js";
7
7
  import"./index-1d042x6w.js";
@@ -1,35 +1,35 @@
1
1
  import {
2
2
  runManagedWrapup2
3
- } from "./index-1zv08avf.js";
4
- import"./index-5m2azs6v.js";
5
- import"./index-xmqj3cf5.js";
6
- import"./index-3w1pbn85.js";
3
+ } from "./index-g7rrfjkq.js";
4
+ import"./index-24y47287.js";
5
+ import"./index-wapyeb06.js";
6
+ import"./index-gn6gfz4y.js";
7
7
  import"./index-sd3egckz.js";
8
- import"./index-xnm0wq1r.js";
9
- import"./index-ty4vhe4n.js";
8
+ import"./index-kgk64zyx.js";
9
+ import"./index-66qexmjw.js";
10
10
  import"./index-jjvbk92s.js";
11
- import"./index-21fgrfrf.js";
11
+ import"./index-rhcwddn9.js";
12
12
  import"./index-4dhv7mqz.js";
13
- import"./index-rdx17j04.js";
13
+ import"./index-dasvhxwg.js";
14
14
  import"./index-2qbtqg1w.js";
15
- import"./index-gsqz39wk.js";
15
+ import"./index-m1mttf6y.js";
16
16
  import"./index-2amn2s73.js";
17
17
  import"./index-66a50f3e.js";
18
18
  import"./index-dnqqqc5f.js";
19
19
  import"./index-ae1ar4v1.js";
20
20
  import"./index-qt1qqasc.js";
21
- import"./index-zqsp3z0d.js";
21
+ import"./index-1j8m4ad0.js";
22
22
  import"./index-8jjjmhab.js";
23
23
  import"./index-1zx87sdm.js";
24
24
  import"./index-vd2ywmfe.js";
25
25
  import"./index-x8a7jmkh.js";
26
26
  import"./index-fw42ms3m.js";
27
- import"./index-xd2p95m7.js";
28
- import"./index-c5dzns43.js";
27
+ import"./index-p6gs3xpx.js";
28
+ import"./index-4dpvnp8k.js";
29
29
  import"./index-jz5bk7xd.js";
30
30
  import"./index-dcjkw41m.js";
31
31
  import"./index-g4t7850m.js";
32
- import"./index-kfsqk1q7.js";
32
+ import"./index-6qnhaaa0.js";
33
33
  import"./index-fb3zxn06.js";
34
34
  import"./index-nj360hcs.js";
35
35
  import"./index-fr0wbhdn.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/opencode-magic-context",
3
- "version": "0.49.42",
3
+ "version": "0.49.44",
4
4
  "type": "module",
5
5
  "description": "OpenCode plugin for Magic Context — cross-session memory and context management",
6
6
  "main": "dist/index.js",