@cortexkit/opencode-magic-context 0.49.27 → 0.49.29

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 (115) hide show
  1. package/dist/auto-search-worker.js +3 -3
  2. package/dist/chunk-embedding-write-worker.js +1 -1
  3. package/dist/config/commit-retention-recovery.d.ts +9 -0
  4. package/dist/config/commit-retention-recovery.d.ts.map +1 -0
  5. package/dist/config/index.d.ts +2 -1
  6. package/dist/config/index.d.ts.map +1 -1
  7. package/dist/config/live-child-output-cap.d.ts.map +1 -1
  8. package/dist/config/live-run-config.d.ts.map +1 -1
  9. package/dist/config/project-security.d.ts +1 -0
  10. package/dist/config/project-security.d.ts.map +1 -1
  11. package/dist/{conflict-warning-hook-tgnw019g.js → conflict-warning-hook-xgskea1v.js} +3 -3
  12. package/dist/{context-t2k97d6v.js → context-836j3vte.js} +63 -27
  13. package/dist/{embedding-backfill-cwnyr4fj.js → embedding-backfill-mms9nb0h.js} +2 -2
  14. package/dist/features/magic-context/dreamer/evaluate-smart-notes.d.ts.map +1 -1
  15. package/dist/features/magic-context/dreamer/hidden-single-shot.d.ts.map +1 -1
  16. package/dist/features/magic-context/dreamer/map-memories.d.ts +2 -2
  17. package/dist/features/magic-context/dreamer/map-memories.d.ts.map +1 -1
  18. package/dist/features/magic-context/dreamer/task-executor.d.ts.map +1 -1
  19. package/dist/features/magic-context/dreamer/verify-diff.d.ts.map +1 -1
  20. package/dist/features/magic-context/dreamer/verify.d.ts.map +1 -1
  21. package/dist/features/magic-context/git-commits/indexer.d.ts +2 -0
  22. package/dist/features/magic-context/git-commits/indexer.d.ts.map +1 -1
  23. package/dist/features/magic-context/project-embedding-registry.d.ts +3 -1
  24. package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
  25. package/dist/features/magic-context/smart-notes/compiler.d.ts.map +1 -1
  26. package/dist/features/magic-context/work-metrics.d.ts +5 -3
  27. package/dist/features/magic-context/work-metrics.d.ts.map +1 -1
  28. package/dist/hooks/magic-context/apply-operations.d.ts +2 -0
  29. package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
  30. package/dist/hooks/magic-context/compartment-runner-types.d.ts +5 -1
  31. package/dist/hooks/magic-context/compartment-runner-types.d.ts.map +1 -1
  32. package/dist/hooks/magic-context/lkg-recovery-prefix.d.ts +3 -1
  33. package/dist/hooks/magic-context/lkg-recovery-prefix.d.ts.map +1 -1
  34. package/dist/hooks/magic-context/lkg-replay.d.ts.map +1 -1
  35. package/dist/hooks/magic-context/lkg-slot.d.ts +7 -0
  36. package/dist/hooks/magic-context/lkg-slot.d.ts.map +1 -1
  37. package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -1
  38. package/dist/hooks/magic-context/read-session-db.d.ts +3 -2
  39. package/dist/hooks/magic-context/read-session-db.d.ts.map +1 -1
  40. package/dist/hooks/magic-context/replay-committed-drops.d.ts.map +1 -1
  41. package/dist/hooks/magic-context/transform.d.ts.map +1 -1
  42. package/dist/{index-n8qmmd7f.js → index-093c4g1c.js} +3 -3
  43. package/dist/{index-89k1w6x2.js → index-a1h316s9.js} +2 -2
  44. package/dist/{index-fq2p158w.js → index-bps8vn9r.js} +13 -7
  45. package/dist/{index-tvzvjggy.js → index-gkee6p4g.js} +1 -1
  46. package/dist/{index-a2fz9hpa.js → index-gxkhzmjq.js} +4 -2
  47. package/dist/{index-4cpc59jv.js → index-h4s5jk7f.js} +1 -1
  48. package/dist/{index-t3rbb8wr.js → index-pe6b4bhs.js} +1 -1
  49. package/dist/{index-dcqk0y27.js → index-q9zvphbq.js} +104 -24
  50. package/dist/{index-7gbcg8xv.js → index-tx68g9nc.js} +1 -1
  51. package/dist/{index-4ypqzvhf.js → index-vnn5405n.js} +1 -1
  52. package/dist/{index-077ht5cq.js → index-waktfbjy.js} +1 -1
  53. package/dist/{index-qzbpbnqt.js → index-wpcdk76y.js} +343 -252
  54. package/dist/{index-dzfevacx.js → index-wvffze8y.js} +10 -6
  55. package/dist/{index-31y1mznz.js → index-wyt5m81v.js} +4 -4
  56. package/dist/{index-v0dhhxsq.js → index-y1qwzvxn.js} +5 -5
  57. package/dist/{index-yzjhx10y.js → index-zhgqgxtt.js} +5 -1
  58. package/dist/index.d.ts.map +1 -1
  59. package/dist/index.js +26 -30
  60. package/dist/{message-index-bounded-7ayzb2ah.js → message-index-bounded-7qsn4fd3.js} +3 -3
  61. package/dist/migration-worker.js +1 -1
  62. package/dist/plugin/dream-timer.d.ts.map +1 -1
  63. package/dist/plugin/embedding-bootstrap-helpers.d.ts +5 -1
  64. package/dist/plugin/embedding-bootstrap-helpers.d.ts.map +1 -1
  65. package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
  66. package/dist/plugin/rpc-handlers.d.ts.map +1 -1
  67. package/dist/{project-embedding-registry-94nncs5g.js → project-embedding-registry-cg281d9j.js} +1 -1
  68. package/dist/raw-ordinal-warmup-worker.js +2 -2
  69. package/dist/{read-session-chunk-jzb6w9w5.js → read-session-chunk-a5d0q3m0.js} +2 -2
  70. package/dist/{recomp-orchestrator-02sa2ngr.js → recomp-orchestrator-na34m4c5.js} +10 -10
  71. package/dist/{search-spq6nfyf.js → search-0cd6hx7a.js} +7 -7
  72. package/dist/{search-archive-q1vw7zg4.js → search-archive-66pm17gm.js} +3 -3
  73. package/dist/{send-session-notification-afzzqy5b.js → send-session-notification-vz86nt79.js} +2 -2
  74. package/dist/{transform-postprocess-phase-6menyyxc.js → transform-postprocess-phase-27we33af.js} +10 -10
  75. package/dist/v2/auto-search-worker.js +3 -3
  76. package/dist/v2/chunk-embedding-write-worker.js +1 -1
  77. package/dist/v2/{context-na0esngr.js → context-g4ptae4x.js} +215 -83
  78. package/dist/v2/{embedding-backfill-rh5dgsva.js → embedding-backfill-35k6czrr.js} +2 -2
  79. package/dist/v2/hidden-completion.d.ts.map +1 -1
  80. package/dist/v2/hooks/dream-timer.d.ts.map +1 -1
  81. package/dist/v2/hooks/store.d.ts.map +1 -1
  82. package/dist/v2/{message-index-bounded-n09b74vr.js → message-index-bounded-7363502m.js} +3 -3
  83. package/dist/v2/migration-worker.js +1 -1
  84. package/dist/v2/{project-embedding-registry-6pak822h.js → project-embedding-registry-p1p10ks7.js} +1 -1
  85. package/dist/v2/raw-ordinal-warmup-worker.js +2 -2
  86. package/dist/v2/{read-session-chunk-vpt69tw9.js → read-session-chunk-kkppfhft.js} +2 -2
  87. package/dist/v2/{recomp-orchestrator-txsmbnvw.js → recomp-orchestrator-f1df1gb8.js} +10 -10
  88. package/dist/v2/{search-dcy9b6gd.js → search-2v3xyzse.js} +7 -7
  89. package/dist/v2/{search-archive-t9bcz4ht.js → search-archive-v07jpw25.js} +3 -3
  90. package/dist/v2/{send-session-notification-vdsgnf4c.js → send-session-notification-x5nzy34v.js} +2 -2
  91. package/dist/v2/{server-e3hc93wk.js → server-77gznpmf.js} +1 -1
  92. package/dist/v2/{server-94wk1ey3.js → server-835q39kd.js} +45 -5
  93. package/dist/v2/{server-txbc3czn.js → server-976dxaxh.js} +10 -6
  94. package/dist/v2/{server-3vhxy2k5.js → server-a7x00tw8.js} +5 -5
  95. package/dist/v2/{server-z2n2xaeh.js → server-k9je35ev.js} +1 -1
  96. package/dist/v2/{server-xkvxss5g.js → server-mxzj3r0y.js} +5 -1
  97. package/dist/v2/{server-6avtp9jp.js → server-p0snacz3.js} +1 -1
  98. package/dist/v2/{server-z3mk9jdc.js → server-ph300d6m.js} +1 -1
  99. package/dist/v2/{server-jj9qye8y.js → server-q50ttc2g.js} +62 -21
  100. package/dist/v2/{server-6v3cdzsx.js → server-qc915kw2.js} +1 -1
  101. package/dist/v2/{server-zmcrvpm3.js → server-w79f8ejn.js} +2 -2
  102. package/dist/v2/{server-yqek3s4k.js → server-zh3esb0z.js} +4 -2
  103. package/dist/v2/server.js +3 -3
  104. package/dist/v2/{wrapup-orchestrator-gjkszser.js → wrapup-orchestrator-jq33fda8.js} +10 -10
  105. package/dist/{wrapup-orchestrator-n5h5sr1x.js → wrapup-orchestrator-f0xr7pft.js} +11 -11
  106. package/package.json +1 -1
  107. package/src/config/commit-retention-recovery.ts +34 -0
  108. package/src/config/index.ts +22 -2
  109. package/src/config/live-child-output-cap.test.ts +28 -0
  110. package/src/config/live-child-output-cap.ts +2 -0
  111. package/src/config/live-run-config.test.ts +44 -1
  112. package/src/config/live-run-config.ts +8 -1
  113. package/src/config/project-config-trust-boundary.test.ts +57 -0
  114. package/src/config/project-security.ts +6 -2
  115. package/src/shared/windows-hidden-spawns.test.ts +133 -23
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ensureMemoryEmbeddings2
3
- } from "./server-6avtp9jp.js";
4
- import"./server-yqek3s4k.js";
3
+ } from "./server-p0snacz3.js";
4
+ import"./server-zh3esb0z.js";
5
5
  import"./server-4dhv7mqz.js";
6
6
  import"./server-qt1qqasc.js";
7
7
  import"./server-vr4szghm.js";
@@ -1 +1 @@
1
- {"version":3,"file":"hidden-completion.d.ts","sourceRoot":"","sources":["../../src/v2/hidden-completion.ts"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAER,wBAAwB,EAG3B,MAAM,iDAAiD,CAAC;AAczD,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAGjD,OAAO,EAGH,KAAK,eAAe,EAIpB,KAAK,eAAe,EAGvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAIH,KAAK,kBAAkB,EACvB,KAAK,eAAe,EAGvB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE/C,YAAY,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AAI9E,MAAM,WAAW,yBAAyB;IACtC,EAAE,EAAE,QAAQ,CAAC;IACb,eAAe,EAAE,MAAM,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,eAAe,CAAC;IACtB,UAAU,EAAE,MAAM,eAAe,GAAG;QAAE,KAAK,CAAC,EAA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EAAE,CAOd;AAKD;;;;;;GAMG;AACH,wBAAiB,kCAAkC,CAC/C,UAAU,EAAE,MAAM,aAAa,EAC/B,SAAS,EAAE,MAAM,EACjB,QAAQ,SAAuB,GAChC,SAAS,CAAC,UAAU,EAAE,EAAE,IAAI,EAAE,IAAI,CAAC,CAgBrC;AAED,oFAAoF;AACpF,wBAAgB,wBAAwB,CAAC,UAAU,EAAE,MAAM,aAAa,GAAG,kBAAkB,CAqI5F;AAED,wBAAgB,0BAA0B,CACtC,MAAM,EAAE,kBAAkB,EAC1B,SAAS,EAAE,MAAM,GAClB,yBAAyB,CA0B3B"}
@@ -14,8 +14,8 @@ import"./server-51779zs2.js";
14
14
  import"./server-cpjk5jd2.js";
15
15
  import"./server-6vd2n183.js";
16
16
  import"./server-2ra6pwf3.js";
17
- import"./server-3vhxy2k5.js";
18
- import"./server-xkvxss5g.js";
17
+ import"./server-a7x00tw8.js";
18
+ import"./server-mxzj3r0y.js";
19
19
  import"./server-cqjvxyrp.js";
20
20
  import {
21
21
  MESSAGE_INDEX_MAX_FTS_BYTES,
@@ -24,7 +24,7 @@ import {
24
24
  markMessageIndexDirty,
25
25
  getIndexableContent,
26
26
  indexSingleMessage
27
- } from "./server-z2n2xaeh.js";
27
+ } from "./server-k9je35ev.js";
28
28
  import"./server-awr8qa4c.js";
29
29
  import"./server-gyy4k6mf.js";
30
30
 
@@ -18,7 +18,7 @@ import"./server-fb3zxn06.js";
18
18
  import {
19
19
  setSqlitePragmaConfig,
20
20
  initializeDatabase
21
- } from "./server-e3hc93wk.js";
21
+ } from "./server-77gznpmf.js";
22
22
  import"./server-51779zs2.js";
23
23
  import"./server-cpjk5jd2.js";
24
24
  import"./server-6vd2n183.js";
@@ -35,7 +35,7 @@ import {
35
35
  sweepAllRegisteredProjects2,
36
36
  _setTestProviderFactoryForProject2,
37
37
  _resetProjectEmbeddingRegistryForTests2
38
- } from "./server-yqek3s4k.js";
38
+ } from "./server-zh3esb0z.js";
39
39
  import"./server-4dhv7mqz.js";
40
40
  import"./server-qt1qqasc.js";
41
41
  import"./server-vr4szghm.js";
@@ -51,7 +51,7 @@ async function main() {
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-t9bcz4ht.js");
54
+ const { renderSearchArchive } = await import("./search-archive-v07jpw25.js");
55
55
  const { readRawSessionMessageIdOrdinalsForRangeFromDb } = await import("./read-session-raw-5x088amc.js");
56
56
  const archive = input.searchArchive;
57
57
  let raw;
@@ -81,7 +81,7 @@ async function main() {
81
81
  const { setHarness } = await import("./harness-e4avh192.js");
82
82
  setHarness(input.harness ?? "opencode");
83
83
  const [{ indexMessageInShortChunks }, { configureContextDatabasePragmas }] = await Promise.all([
84
- import("./message-index-bounded-n09b74vr.js"),
84
+ import("./message-index-bounded-7363502m.js"),
85
85
  import("./sqlite-context-pragmas-mv9jqwjh.js")
86
86
  ]);
87
87
  configureContextDatabasePragmas(db);
@@ -36,10 +36,10 @@ import {
36
36
  readSessionChunk2,
37
37
  getRawSessionMessageIdsThrough2,
38
38
  readRawSessionSeedTail2
39
- } from "./server-xkvxss5g.js";
39
+ } from "./server-mxzj3r0y.js";
40
40
  import"./server-nxas8v1d.js";
41
41
  import"./server-1zx87sdm.js";
42
- import"./server-3vhxy2k5.js";
42
+ import"./server-a7x00tw8.js";
43
43
  import"./server-24g8r2d0.js";
44
44
  import"./server-cqjvxyrp.js";
45
45
  import"./server-v77xa5wj.js";
@@ -7,23 +7,23 @@ import {
7
7
  setRecompTerminal2,
8
8
  buildRecompDeps2,
9
9
  runManagedRecomp2
10
- } from "./server-jj9qye8y.js";
10
+ } from "./server-q50ttc2g.js";
11
11
  import"./server-806rzhs6.js";
12
- import"./server-z3mk9jdc.js";
13
- import"./server-z2n2xaeh.js";
14
- import"./server-6avtp9jp.js";
12
+ import"./server-ph300d6m.js";
13
+ import"./server-k9je35ev.js";
14
+ import"./server-p0snacz3.js";
15
15
  import"./server-jjvbk92s.js";
16
- import"./server-yqek3s4k.js";
16
+ import"./server-zh3esb0z.js";
17
17
  import"./server-4dhv7mqz.js";
18
18
  import"./server-53eh1r8r.js";
19
- import"./server-6v3cdzsx.js";
19
+ import"./server-qc915kw2.js";
20
20
  import"./server-qt1qqasc.js";
21
- import"./server-xkvxss5g.js";
21
+ import"./server-mxzj3r0y.js";
22
22
  import"./server-nxas8v1d.js";
23
23
  import"./server-1zx87sdm.js";
24
- import"./server-3vhxy2k5.js";
24
+ import"./server-a7x00tw8.js";
25
25
  import"./server-1bw1wcbp.js";
26
- import"./server-94wk1ey3.js";
26
+ import"./server-835q39kd.js";
27
27
  import"./server-29qp8nz4.js";
28
28
  import"./server-x8a7jmkh.js";
29
29
  import"./server-vr4szghm.js";
@@ -31,7 +31,7 @@ import"./server-24g8r2d0.js";
31
31
  import"./server-bsgd4dk1.js";
32
32
  import"./server-4sn3at8p.js";
33
33
  import"./server-ab1g0wn9.js";
34
- import"./server-e3hc93wk.js";
34
+ import"./server-77gznpmf.js";
35
35
  import"./server-fb3zxn06.js";
36
36
  import"./server-6g98c227.js";
37
37
  import"./server-fr0wbhdn.js";
@@ -5,19 +5,19 @@ import {
5
5
  resolveMemoriesByIdsForSearch2,
6
6
  unifiedSearch2,
7
7
  formatSearchResults2
8
- } from "./server-txbc3czn.js";
8
+ } from "./server-976dxaxh.js";
9
9
  import"./server-kaqs6h31.js";
10
- import"./server-z3mk9jdc.js";
11
- import"./server-z2n2xaeh.js";
12
- import"./server-6avtp9jp.js";
10
+ import"./server-ph300d6m.js";
11
+ import"./server-k9je35ev.js";
12
+ import"./server-p0snacz3.js";
13
13
  import"./server-jjvbk92s.js";
14
- import"./server-yqek3s4k.js";
14
+ import"./server-zh3esb0z.js";
15
15
  import"./server-4dhv7mqz.js";
16
16
  import"./server-qt1qqasc.js";
17
- import"./server-xkvxss5g.js";
17
+ import"./server-mxzj3r0y.js";
18
18
  import"./server-nxas8v1d.js";
19
19
  import"./server-1zx87sdm.js";
20
- import"./server-3vhxy2k5.js";
20
+ import"./server-a7x00tw8.js";
21
21
  import"./server-vr4szghm.js";
22
22
  import"./server-24g8r2d0.js";
23
23
  import"./server-bsgd4dk1.js";
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  renderSearchArchive2,
3
3
  renderSearchArchiveOffThread2
4
- } from "./server-zmcrvpm3.js";
4
+ } from "./server-w79f8ejn.js";
5
5
  import"./server-kaqs6h31.js";
6
- import"./server-xkvxss5g.js";
6
+ import"./server-mxzj3r0y.js";
7
7
  import"./server-nxas8v1d.js";
8
8
  import"./server-1zx87sdm.js";
9
- import"./server-3vhxy2k5.js";
9
+ import"./server-a7x00tw8.js";
10
10
  import"./server-24g8r2d0.js";
11
11
  import"./server-cqjvxyrp.js";
12
12
  import"./server-v77xa5wj.js";
@@ -8,9 +8,9 @@ import {
8
8
  clearIgnoredMessages2,
9
9
  observeIgnoredNotificationEvent2,
10
10
  sendStatusNotification2
11
- } from "./server-6v3cdzsx.js";
11
+ } from "./server-qc915kw2.js";
12
12
  import"./server-qt1qqasc.js";
13
- import"./server-3vhxy2k5.js";
13
+ import"./server-a7x00tw8.js";
14
14
  import"./server-1bw1wcbp.js";
15
15
  import"./server-2ra6pwf3.js";
16
16
  import"./server-6vd2n183.js";
@@ -1221,7 +1221,7 @@ function finishDatabaseOpen(db, dbPath, explicitDbPath, latestSupportedVersion)
1221
1221
  state.running = startMessageFtsRowidMapBackfill2(db, signal).then(async () => {
1222
1222
  if (signal.aborted || !readsOpenCodeStore)
1223
1223
  return;
1224
- const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-vpt69tw9.js"));
1224
+ const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-kkppfhft.js"));
1225
1225
  const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-zvthw6xb.js"));
1226
1226
  if (signal.aborted)
1227
1227
  return;
@@ -1642,6 +1642,30 @@ function detectConfigFile(basePath) {
1642
1642
  return { format: "none", path: jsoncPath };
1643
1643
  }
1644
1644
 
1645
+ // src/config/commit-retention-recovery.ts
1646
+ var pausedRetention = new WeakSet;
1647
+ var RETENTION_FIELD = "memory.git_commit_indexing.max_commits";
1648
+ function applyCommitRetentionRecovery(config, recoveredFieldPaths, warnings) {
1649
+ if (!recoveredFieldPaths.some((path) => RETENTION_FIELD === path || RETENTION_FIELD.startsWith(`${path}.`)))
1650
+ return;
1651
+ pausedRetention.add(config.memory.git_commit_indexing);
1652
+ const message = `${RETENTION_FIELD}: retention eviction is paused until the invalid value is fixed.`;
1653
+ const index = warnings.findIndex((warning) => warning.includes(RETENTION_FIELD));
1654
+ if (index >= 0)
1655
+ warnings[index] = `${warnings[index]} ${message}`;
1656
+ else
1657
+ warnings.push(message);
1658
+ }
1659
+ function isCommitRetentionPaused(settings) {
1660
+ return pausedRetention.has(settings);
1661
+ }
1662
+ function copyCommitRetentionRecovery(from, to) {
1663
+ if (pausedRetention.has(from))
1664
+ pausedRetention.add(to);
1665
+ else
1666
+ pausedRetention.delete(to);
1667
+ }
1668
+
1645
1669
  // src/config/deprecated-config.ts
1646
1670
  var MURAL_MODEL_DEPRECATION_WARNING = "mural.model is deprecated and ignored; compress-cues now uses the dreamer model for each harness, like every other dreamer task. To override it, set dreamer.opencode.tasks.compress-cues.model (or the pi/omp equivalent). This key no longer does anything; remove it.";
1647
1671
  var WINDOW_OVERLAY_PATH_DEPRECATION_WARNING = "models.window_overlay_path is deprecated and ignored; Fusiform no longer publishes window-overlay data, so this setting no longer changes model window geometry. Remove this key.";
@@ -2752,7 +2776,11 @@ function restoreTrustedValuesOverInvalidProjectValues(args) {
2752
2776
  if (!changed)
2753
2777
  break;
2754
2778
  }
2755
- return { warnings, restoredTopLevelKeys: [...restoredTopLevelKeys] };
2779
+ return {
2780
+ warnings,
2781
+ restoredTopLevelKeys: [...restoredTopLevelKeys],
2782
+ restoredFieldPaths: [...restored]
2783
+ };
2756
2784
  }
2757
2785
  var PROJECT_COMMAND_STRING_FIELDS = ["description", "agent", "model"];
2758
2786
  function wellFormedCommand(value) {
@@ -3528,7 +3556,7 @@ function warnProtectedTagsDeprecationOnce() {
3528
3556
  log2("[magic-context] protected_tags is deprecated and ignored; use protected_tokens instead.");
3529
3557
  }
3530
3558
  }
3531
- function parsePluginConfig(rawConfig, recoveredTopLevelKeys = []) {
3559
+ function parsePluginConfig(rawConfig, recoveredTopLevelKeys = [], recoveredFieldPaths = []) {
3532
3560
  const preMigrationWarnings = [];
3533
3561
  const configWithoutRemovedAgent = stripRemovedAgentConfig(rawConfig, preMigrationWarnings);
3534
3562
  if (Object.hasOwn(rawConfig, "clear_reasoning_age")) {
@@ -3610,11 +3638,13 @@ function parsePluginConfig(rawConfig, recoveredTopLevelKeys = []) {
3610
3638
  }
3611
3639
  if (prunedLeaves.length === issuePaths.length) {
3612
3640
  patched[key] = prunedBlock;
3641
+ recoveredFieldPaths.push(...prunedLeaves.map((leaf) => `${key}.${leaf}`));
3613
3642
  const reason = customMessagesByKey.get(key);
3614
3643
  warnings.push(`"${key}": invalid nested field(s) ${prunedLeaves.map((leaf) => `"${key}.${leaf}"`).join(", ")}, using defaults for those.${reason ? ` ${reason}` : ""}`);
3615
3644
  continue;
3616
3645
  }
3617
3646
  }
3647
+ recoveredFieldPaths.push(key);
3618
3648
  if (isAgentConfig) {
3619
3649
  delete patched[key];
3620
3650
  warnings.push(`"${key}": invalid agent configuration, ignoring. Check your magic-context.jsonc.`);
@@ -3641,6 +3671,7 @@ function parsePluginConfig(rawConfig, recoveredTopLevelKeys = []) {
3641
3671
  };
3642
3672
  }
3643
3673
  warnings.push("Config recovery failed, using all defaults.");
3674
+ recoveredFieldPaths.push("embedding", "memory", "subc", "shadow_embedding", "allow_home_project");
3644
3675
  return {
3645
3676
  ...defaults,
3646
3677
  disabled_hooks: disabledHooks,
@@ -3749,6 +3780,7 @@ function loadPluginConfigDetailed(directory, applyRuntimeGlobals = true) {
3749
3780
  let mergedRaw = trustedProfiledRaw;
3750
3781
  const trustedBaseConfig = parsePluginConfig(trustedProfiledRaw);
3751
3782
  let projectRestoredTopLevelKeys = [];
3783
+ let projectRestoredFieldPaths = [];
3752
3784
  if (projectLoaded) {
3753
3785
  mergedRaw = deepMergeRawConfig(mergedRaw, profileResolution.projectBase);
3754
3786
  for (const warning of dropInheritedEmbeddingKeyOnRedirect(projectRaw, mergedRaw, profileResolution.userBase)) {
@@ -3771,6 +3803,7 @@ function loadPluginConfigDetailed(directory, applyRuntimeGlobals = true) {
3771
3803
  allWarnings.push(`[project config] ${warning}`);
3772
3804
  }
3773
3805
  projectRestoredTopLevelKeys = restoredOverProject.restoredTopLevelKeys;
3806
+ projectRestoredFieldPaths = restoredOverProject.restoredFieldPaths;
3774
3807
  for (const warning of constrainProjectCommands({
3775
3808
  mergedRaw,
3776
3809
  trustedRaw: trustedProfiledRaw,
@@ -3781,8 +3814,10 @@ function loadPluginConfigDetailed(directory, applyRuntimeGlobals = true) {
3781
3814
  }
3782
3815
  }
3783
3816
  const recoveredTopLevelKeys = [];
3817
+ const recoveredFieldPaths = [];
3784
3818
  const cacheTtlConfigured = Object.hasOwn(mergedRaw, "cache_ttl");
3785
- const config = parsePluginConfig(mergedRaw, recoveredTopLevelKeys);
3819
+ const config = parsePluginConfig(mergedRaw, recoveredTopLevelKeys, recoveredFieldPaths);
3820
+ recoveredFieldPaths.push(...projectRestoredFieldPaths);
3786
3821
  for (const key of projectRestoredTopLevelKeys) {
3787
3822
  if (!recoveredTopLevelKeys.includes(key))
3788
3823
  recoveredTopLevelKeys.push(key);
@@ -3796,7 +3831,11 @@ function loadPluginConfigDetailed(directory, applyRuntimeGlobals = true) {
3796
3831
  if (applyRuntimeGlobals) {
3797
3832
  setOutputReserveConfig(config.output_reserve);
3798
3833
  }
3799
- const leafValidationWarnings = [...config.configWarnings ?? []];
3834
+ const recoveryWarnings = config.configWarnings ?? [];
3835
+ applyCommitRetentionRecovery(config, recoveredFieldPaths, recoveryWarnings);
3836
+ if (recoveryWarnings.length > 0)
3837
+ config.configWarnings = recoveryWarnings;
3838
+ const leafValidationWarnings = [...recoveryWarnings];
3800
3839
  if (config.configWarnings?.length) {
3801
3840
  allWarnings.push(...config.configWarnings.map((w) => {
3802
3841
  if (userLoaded && projectLoaded)
@@ -3848,10 +3887,11 @@ function loadPluginConfigDetailed(directory, applyRuntimeGlobals = true) {
3848
3887
  sources,
3849
3888
  substitutionFailures,
3850
3889
  recoveredTopLevelKeys,
3890
+ recoveredFieldPaths,
3851
3891
  configParseFailures,
3852
3892
  warningDetails,
3853
3893
  cacheTtlConfigured
3854
3894
  };
3855
3895
  }
3856
3896
 
3857
- export { getMagicContextBuiltinCommands, parseTree, parseJsoncRecovering, readJsoncFile, detectConfigFile, cortexKitUserConfigBasePath, cortexKitProjectConfigBasePath, resolveLegacyConfigSources, resolveLegacyConfigSourcesForHarness, getProtectedTokensTierOverrides, loadPluginConfigDetailed };
3897
+ export { getMagicContextBuiltinCommands, parseTree, parseJsoncRecovering, readJsoncFile, detectConfigFile, isCommitRetentionPaused, copyCommitRetentionRecovery, cortexKitUserConfigBasePath, cortexKitProjectConfigBasePath, resolveLegacyConfigSources, resolveLegacyConfigSourcesForHarness, getProtectedTokensTierOverrides, loadPluginConfigDetailed };
@@ -39,7 +39,7 @@ import {
39
39
  enqueueShadowEmbeddingItems2,
40
40
  getProjectEmbeddingSnapshot2,
41
41
  embedItemsForProject2
42
- } from "./server-yqek3s4k.js";
42
+ } from "./server-zh3esb0z.js";
43
43
  import {
44
44
  getProjectEmbeddings2
45
45
  } from "./server-4dhv7mqz.js";
@@ -48,7 +48,7 @@ import {
48
48
  isEmbeddingEnabled,
49
49
  embedText,
50
50
  ensureMemoryEmbeddings2
51
- } from "./server-6avtp9jp.js";
51
+ } from "./server-p0snacz3.js";
52
52
  import {
53
53
  ModuleMemoryAuthorityError2,
54
54
  getMemoriesByProject2,
@@ -63,13 +63,13 @@ import {
63
63
  sanitizeFtsQuery,
64
64
  searchMemoriesFTS,
65
65
  searchMemoriesFTSUnion
66
- } from "./server-z3mk9jdc.js";
66
+ } from "./server-ph300d6m.js";
67
67
  import {
68
68
  cleanSearchText,
69
69
  keywordRelevance,
70
70
  matchedSearchSnippet,
71
71
  getIndexedMessageCorpusSize
72
- } from "./server-z2n2xaeh.js";
72
+ } from "./server-k9je35ev.js";
73
73
  import {
74
74
  MESSAGE_FTS_SESSION_FILTER_SQL,
75
75
  withMessageFtsSessionFilter
@@ -998,7 +998,9 @@ async function indexCommitsForProject(db, projectPath, directory, options) {
998
998
  return result;
999
999
  }
1000
1000
  if (commits.length === 0) {
1001
- result.evicted = enforceProjectCap(db, projectPath, options.maxCommits);
1001
+ if (!options.skipRetention) {
1002
+ result.evicted = enforceProjectCap(db, projectPath, options.maxCommits);
1003
+ }
1002
1004
  log2(`[git-commits] no new commits for ${projectPath} (sinceMs=${sinceMs} latestIndexed=${latestIndexed?.slice(0, 7) ?? "none"} evicted=${result.evicted})`);
1003
1005
  return result;
1004
1006
  }
@@ -1006,7 +1008,9 @@ async function indexCommitsForProject(db, projectPath, directory, options) {
1006
1008
  const upsert = upsertCommits(db, projectPath, commits);
1007
1009
  result.inserted = upsert.inserted;
1008
1010
  result.updated = upsert.updated;
1009
- result.evicted = enforceProjectCap(db, projectPath, options.maxCommits);
1011
+ if (!options.skipRetention) {
1012
+ result.evicted = enforceProjectCap(db, projectPath, options.maxCommits);
1013
+ }
1010
1014
  const snapshot = getProjectEmbeddingSnapshot2(projectPath);
1011
1015
  if (options.skipEmbed || !snapshot?.gitCommitEnabled) {
1012
1016
  log2(`[git-commits] indexed ${projectPath}: scanned=${result.scanned} inserted=${result.inserted} updated=${result.updated} evicted=${result.evicted} embedded=0 (embedding skipped: skipEmbed=${options.skipEmbed === true} gitCommitEnabled=${snapshot?.gitCommitEnabled === true})`);
@@ -21,8 +21,8 @@ import {
21
21
  } from "./server-8ajstryz.js";
22
22
 
23
23
  // src/hooks/magic-context/read-session-db.ts
24
- function openCodeDbExists() {
25
- return harnessOwnsOpenCodeStore2() && openCodeDbPathExists(resolveOpenCodeDbPath());
24
+ function openCodeDbExists(generation = "v1") {
25
+ return harnessOwnsOpenCodeStore2() && openCodeDbPathExists(resolveOpenCodeDbPath(generation));
26
26
  }
27
27
  var cachedReadOnlyDbs = {
28
28
  v1: null,
@@ -45,7 +45,7 @@ function getReadOnlySessionDb(generation = "v1") {
45
45
  if (!harnessOwnsOpenCodeStore2()) {
46
46
  throw new Error("OpenCode session database is not readable from a Pi-compatible process; its history lives in Pi sessions");
47
47
  }
48
- const resolution = resolveOpenCodeDbPath();
48
+ const resolution = resolveOpenCodeDbPath(generation);
49
49
  const dbPath = resolution.path;
50
50
  if (!openCodeDbPathExists(resolution)) {
51
51
  throw new Error(`OpenCode session database is unavailable at ${dbPath} (source=${resolution.source})`);
@@ -66,8 +66,8 @@ function getReadOnlySessionDb(generation = "v1") {
66
66
  clearOpenCodeDbReadFailure();
67
67
  return db;
68
68
  }
69
- function withReadOnlySessionDb(fn) {
70
- return fn(getReadOnlySessionDb());
69
+ function withReadOnlySessionDb(fn, generation = "v1") {
70
+ return fn(getReadOnlySessionDb(generation));
71
71
  }
72
72
  function getRawSessionMessageCountFromDb(db, sessionId) {
73
73
  const row = db.prepare(`SELECT COUNT(*) as count FROM message WHERE session_id = ?
@@ -9,7 +9,7 @@ import {
9
9
  } from "./server-pavzsdc6.js";
10
10
  import {
11
11
  cleanUserText2
12
- } from "./server-xkvxss5g.js";
12
+ } from "./server-mxzj3r0y.js";
13
13
  import {
14
14
  recordMessageFtsRowid2,
15
15
  recordIndexedMessageTime2,
@@ -76,7 +76,7 @@ import {
76
76
  withReadOnlySessionDb,
77
77
  getRawSessionMessageCountFromDb,
78
78
  getMessageTimesFromOpenCodeDb
79
- } from "./server-3vhxy2k5.js";
79
+ } from "./server-a7x00tw8.js";
80
80
  import {
81
81
  getToolDefinitionMeasurementSignature,
82
82
  getMeasuredToolDefinitionTokens,
@@ -7277,6 +7277,10 @@ function readSessionChunk2(sessionId, tokenBudget, offset = 1, eligibleEndOrdina
7277
7277
  const meta = { ordinal: msg.ordinal, messageId: msg.id };
7278
7278
  if (isHostUnservedRow(msg))
7279
7279
  markHostUnservedRow(meta);
7280
+ if (msg.role === "system") {
7281
+ recordFilteredNoise(meta);
7282
+ continue;
7283
+ }
7280
7284
  if (msg.role === "user" && !hasMeaningfulChunkUserText(msg.parts)) {
7281
7285
  const tcSummaries = msg.parts.flatMap((part) => {
7282
7286
  if (expandedResults.has(part))
@@ -15,7 +15,7 @@ import {
15
15
  OpenAICompatibleEmbeddingProvider,
16
16
  getProjectEmbeddingSnapshot2,
17
17
  embedBatchForProject2
18
- } from "./server-yqek3s4k.js";
18
+ } from "./server-zh3esb0z.js";
19
19
  import {
20
20
  isEmbeddingHostBusy2
21
21
  } from "./server-qt1qqasc.js";
@@ -17,7 +17,7 @@ import {
17
17
  } from "./server-6g98c227.js";
18
18
  import {
19
19
  embedTextForProject2
20
- } from "./server-yqek3s4k.js";
20
+ } from "./server-zh3esb0z.js";
21
21
  import {
22
22
  saveEmbeddingIfHashMatches
23
23
  } from "./server-4dhv7mqz.js";