@cortexkit/opencode-magic-context 0.49.28 → 0.49.30

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 (128) 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-dxfztzsd.js → context-vnfr6d7t.js} +210 -50
  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.map +1 -1
  17. package/dist/features/magic-context/dreamer/task-executor.d.ts.map +1 -1
  18. package/dist/features/magic-context/dreamer/verify-diff.d.ts.map +1 -1
  19. package/dist/features/magic-context/dreamer/verify.d.ts.map +1 -1
  20. package/dist/features/magic-context/git-commits/indexer.d.ts +2 -0
  21. package/dist/features/magic-context/git-commits/indexer.d.ts.map +1 -1
  22. package/dist/features/magic-context/project-embedding-registry.d.ts +3 -1
  23. package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
  24. package/dist/features/magic-context/smart-notes/compiler.d.ts.map +1 -1
  25. package/dist/features/magic-context/work-metrics.d.ts +5 -3
  26. package/dist/features/magic-context/work-metrics.d.ts.map +1 -1
  27. package/dist/hooks/magic-context/apply-operations.d.ts +2 -0
  28. package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
  29. package/dist/hooks/magic-context/compartment-runner-types.d.ts +5 -1
  30. package/dist/hooks/magic-context/compartment-runner-types.d.ts.map +1 -1
  31. package/dist/hooks/magic-context/history-boundary-repair.d.ts +1 -1
  32. package/dist/hooks/magic-context/history-boundary-repair.d.ts.map +1 -1
  33. package/dist/hooks/magic-context/lkg-recovery-prefix.d.ts +3 -1
  34. package/dist/hooks/magic-context/lkg-recovery-prefix.d.ts.map +1 -1
  35. package/dist/hooks/magic-context/lkg-replay.d.ts.map +1 -1
  36. package/dist/hooks/magic-context/lkg-slot.d.ts +7 -0
  37. package/dist/hooks/magic-context/lkg-slot.d.ts.map +1 -1
  38. package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -1
  39. package/dist/hooks/magic-context/read-session-db.d.ts +3 -2
  40. package/dist/hooks/magic-context/read-session-db.d.ts.map +1 -1
  41. package/dist/hooks/magic-context/replay-committed-drops.d.ts.map +1 -1
  42. package/dist/hooks/magic-context/strip-content.d.ts +1 -1
  43. package/dist/hooks/magic-context/strip-content.d.ts.map +1 -1
  44. package/dist/hooks/magic-context/transform.d.ts.map +1 -1
  45. package/dist/{index-yzjhx10y.js → index-0fe4q77z.js} +12 -6
  46. package/dist/{index-89k1w6x2.js → index-3jmx3fae.js} +2 -2
  47. package/dist/{index-7gbcg8xv.js → index-4s4zq97n.js} +1 -1
  48. package/dist/{index-31y1mznz.js → index-69gd2scx.js} +4 -4
  49. package/dist/{index-n8qmmd7f.js → index-adr4vfys.js} +3 -3
  50. package/dist/{index-k9jx7ma9.js → index-ekzzw66a.js} +328 -249
  51. package/dist/{index-tvzvjggy.js → index-gkee6p4g.js} +1 -1
  52. package/dist/{index-a2fz9hpa.js → index-gxkhzmjq.js} +4 -2
  53. package/dist/{index-4cpc59jv.js → index-hbt0sbv2.js} +1 -1
  54. package/dist/{index-dcqk0y27.js → index-k0dpkyn7.js} +139 -28
  55. package/dist/{index-t3rbb8wr.js → index-pe6b4bhs.js} +1 -1
  56. package/dist/{index-4ypqzvhf.js → index-vnn5405n.js} +1 -1
  57. package/dist/{index-dzfevacx.js → index-vtz789ex.js} +10 -6
  58. package/dist/{index-fq2p158w.js → index-vzz570j8.js} +13 -7
  59. package/dist/{index-077ht5cq.js → index-waktfbjy.js} +1 -1
  60. package/dist/{index-v0dhhxsq.js → index-y1qwzvxn.js} +5 -5
  61. package/dist/index.d.ts.map +1 -1
  62. package/dist/index.js +26 -30
  63. package/dist/{message-index-bounded-7ayzb2ah.js → message-index-bounded-zq7a5nm6.js} +3 -3
  64. package/dist/migration-worker.js +1 -1
  65. package/dist/plugin/dream-timer.d.ts.map +1 -1
  66. package/dist/plugin/embedding-bootstrap-helpers.d.ts +5 -1
  67. package/dist/plugin/embedding-bootstrap-helpers.d.ts.map +1 -1
  68. package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
  69. package/dist/plugin/rpc-handlers.d.ts.map +1 -1
  70. package/dist/{project-embedding-registry-94nncs5g.js → project-embedding-registry-cg281d9j.js} +1 -1
  71. package/dist/raw-ordinal-warmup-worker.js +2 -2
  72. package/dist/{read-session-chunk-jzb6w9w5.js → read-session-chunk-1ndphmb8.js} +2 -2
  73. package/dist/{recomp-orchestrator-02sa2ngr.js → recomp-orchestrator-w3pjp33d.js} +10 -10
  74. package/dist/{search-archive-q1vw7zg4.js → search-archive-sr07c6aj.js} +3 -3
  75. package/dist/{search-spq6nfyf.js → search-fbaz1m8r.js} +7 -7
  76. package/dist/{send-session-notification-afzzqy5b.js → send-session-notification-vz86nt79.js} +2 -2
  77. package/dist/shared/marker-only-text.d.ts +2 -0
  78. package/dist/shared/marker-only-text.d.ts.map +1 -0
  79. package/dist/{transform-postprocess-phase-6menyyxc.js → transform-postprocess-phase-6ccazq85.js} +10 -10
  80. package/dist/v2/auto-search-worker.js +3 -3
  81. package/dist/v2/chunk-embedding-write-worker.js +1 -1
  82. package/dist/v2/{context-0qhz1nnj.js → context-wx4sfhgr.js} +345 -102
  83. package/dist/v2/{embedding-backfill-rh5dgsva.js → embedding-backfill-35k6czrr.js} +2 -2
  84. package/dist/v2/hidden-child-cleanup.d.ts.map +1 -1
  85. package/dist/v2/hidden-child-native.d.ts.map +1 -1
  86. package/dist/v2/hidden-completion.d.ts.map +1 -1
  87. package/dist/v2/hooks/context.d.ts.map +1 -1
  88. package/dist/v2/hooks/dream-timer.d.ts.map +1 -1
  89. package/dist/v2/hooks/store.d.ts.map +1 -1
  90. package/dist/v2/{message-index-bounded-n09b74vr.js → message-index-bounded-jvgz7vk9.js} +3 -3
  91. package/dist/v2/message-times.d.ts +17 -0
  92. package/dist/v2/message-times.d.ts.map +1 -0
  93. package/dist/v2/migration-worker.js +1 -1
  94. package/dist/v2/{project-embedding-registry-6pak822h.js → project-embedding-registry-p1p10ks7.js} +1 -1
  95. package/dist/v2/raw-ordinal-warmup-worker.js +2 -2
  96. package/dist/v2/{read-session-chunk-vpt69tw9.js → read-session-chunk-djzgm4jg.js} +2 -2
  97. package/dist/v2/{recomp-orchestrator-txsmbnvw.js → recomp-orchestrator-wb28kr9k.js} +10 -10
  98. package/dist/v2/{search-archive-t9bcz4ht.js → search-archive-n3dhns4r.js} +3 -3
  99. package/dist/v2/{search-dcy9b6gd.js → search-q3jjw6zp.js} +7 -7
  100. package/dist/v2/{send-session-notification-vdsgnf4c.js → send-session-notification-x5nzy34v.js} +2 -2
  101. package/dist/v2/{server-txbc3czn.js → server-42nebt63.js} +10 -6
  102. package/dist/v2/{server-94wk1ey3.js → server-835q39kd.js} +45 -5
  103. package/dist/v2/{server-3vhxy2k5.js → server-a7x00tw8.js} +5 -5
  104. package/dist/v2/{server-e3hc93wk.js → server-d01pe8q5.js} +1 -1
  105. package/dist/v2/{server-z2n2xaeh.js → server-hwag0khr.js} +1 -1
  106. package/dist/v2/{server-jj9qye8y.js → server-k33t88h3.js} +97 -25
  107. package/dist/v2/{server-6avtp9jp.js → server-p0snacz3.js} +1 -1
  108. package/dist/v2/{server-z3mk9jdc.js → server-ph300d6m.js} +1 -1
  109. package/dist/v2/{server-6v3cdzsx.js → server-qc915kw2.js} +1 -1
  110. package/dist/v2/{server-xkvxss5g.js → server-rb8m4vry.js} +12 -6
  111. package/dist/v2/{server-zmcrvpm3.js → server-rr4cbkr0.js} +2 -2
  112. package/dist/v2/{server-yqek3s4k.js → server-zh3esb0z.js} +4 -2
  113. package/dist/v2/server.js +3 -3
  114. package/dist/v2/store-reader.d.ts +14 -2
  115. package/dist/v2/store-reader.d.ts.map +1 -1
  116. package/dist/v2/{wrapup-orchestrator-gjkszser.js → wrapup-orchestrator-2t0pdqzm.js} +10 -10
  117. package/dist/{wrapup-orchestrator-n5h5sr1x.js → wrapup-orchestrator-kjmkms5g.js} +11 -11
  118. package/package.json +1 -1
  119. package/src/config/commit-retention-recovery.ts +34 -0
  120. package/src/config/index.ts +22 -2
  121. package/src/config/live-child-output-cap.test.ts +28 -0
  122. package/src/config/live-child-output-cap.ts +2 -0
  123. package/src/config/live-run-config.test.ts +44 -1
  124. package/src/config/live-run-config.ts +8 -1
  125. package/src/config/project-config-trust-boundary.test.ts +57 -0
  126. package/src/config/project-security.ts +6 -2
  127. package/src/shared/marker-only-text.ts +8 -0
  128. package/src/shared/windows-hidden-spawns.test.ts +133 -23
@@ -76,7 +76,7 @@ import {
76
76
  withReadOnlySessionDb,
77
77
  getRawSessionMessageCountFromDb,
78
78
  getMessageTimesFromOpenCodeDb
79
- } from "./index-v0dhhxsq.js";
79
+ } from "./index-y1qwzvxn.js";
80
80
  import {
81
81
  getToolDefinitionMeasurementSignature,
82
82
  getMeasuredToolDefinitionTokens,
@@ -4704,6 +4704,13 @@ function hasAnthropicReasoning(messages) {
4704
4704
  });
4705
4705
  }
4706
4706
 
4707
+ // src/shared/marker-only-text.ts
4708
+ var MARKER_ONLY_PATTERN = /^(?:(?:§\d+§|\[dropped\s*(?:\d+|§\d*§)?\]|\[cleared\])\s*)+$/;
4709
+ function isMarkerOnlyText(text) {
4710
+ const trimmed = text.trim();
4711
+ return trimmed.length > 0 && MARKER_ONLY_PATTERN.test(trimmed);
4712
+ }
4713
+
4707
4714
  // src/shared/processed-image-eligibility.ts
4708
4715
  function createProcessedImageEligibility(messages, messageTagNumbers, options) {
4709
4716
  const ageTags = new Map;
@@ -4840,11 +4847,6 @@ function prepareServedShapeRepair(db, sessionID, messages, readPreviouslyServed,
4840
4847
  }
4841
4848
 
4842
4849
  // src/hooks/magic-context/strip-content.ts
4843
- var MARKER_ONLY_PATTERN = /^(?:(?:§\d+§|\[dropped(?: §\d+§)?\]|\[cleared\])\s*)+$/;
4844
- function isMarkerOnlyText(text) {
4845
- const trimmed = text.trim();
4846
- return trimmed.length > 0 && MARKER_ONLY_PATTERN.test(trimmed);
4847
- }
4848
4850
  var TAG_PREFIX_PATTERN = /^§\d+§\s*/;
4849
4851
  var SYSTEM_INJECTION_PATTERNS = [
4850
4852
  /^<!-- OMO_INTERNAL_INITIATOR -->$/,
@@ -7411,6 +7413,10 @@ function readSessionChunk2(sessionId, tokenBudget, offset = 1, eligibleEndOrdina
7411
7413
  const meta = { ordinal: msg.ordinal, messageId: msg.id };
7412
7414
  if (isHostUnservedRow(msg))
7413
7415
  markHostUnservedRow(meta);
7416
+ if (msg.role === "system") {
7417
+ recordFilteredNoise(meta);
7418
+ continue;
7419
+ }
7414
7420
  if (msg.role === "user" && !hasMeaningfulChunkUserText(msg.parts)) {
7415
7421
  const tcSummaries = msg.parts.flatMap((part) => {
7416
7422
  if (expandedResults.has(part))
@@ -13,11 +13,11 @@ import {
13
13
  import {
14
14
  openCodeDbExists,
15
15
  withReadOnlySessionDb
16
- } from "./index-v0dhhxsq.js";
16
+ } from "./index-y1qwzvxn.js";
17
17
  import {
18
18
  hasRawMessageProvider2,
19
19
  readRawSessionMessageIdOrdinalsForRange2
20
- } from "./index-yzjhx10y.js";
20
+ } from "./index-0fe4q77z.js";
21
21
 
22
22
  // src/tools/ctx-expand/search-archive.ts
23
23
  var archiveReadsOnThisThread = 0;
@@ -9,7 +9,7 @@ import {
9
9
  } from "./index-b88dwwrh.js";
10
10
  import {
11
11
  cleanUserText2
12
- } from "./index-yzjhx10y.js";
12
+ } from "./index-0fe4q77z.js";
13
13
  import {
14
14
  recordMessageFtsRowid2,
15
15
  recordIndexedMessageTime2,
@@ -15,7 +15,7 @@ import {
15
15
  getActiveCompartmentRun,
16
16
  markActiveCompartmentRunPublished,
17
17
  registerActiveCompartmentRun
18
- } from "./index-dcqk0y27.js";
18
+ } from "./index-k0dpkyn7.js";
19
19
  import {
20
20
  inRootAsyncContext2
21
21
  } from "./index-gzy5w8ya.js";
@@ -27,17 +27,17 @@ import {
27
27
  getHistorianFailureState,
28
28
  clearEmergencyRecovery,
29
29
  prepareRawSessionOrdinals2
30
- } from "./index-yzjhx10y.js";
30
+ } from "./index-0fe4q77z.js";
31
31
  import {
32
32
  pushNotification2
33
33
  } from "./index-x8a7jmkh.js";
34
34
  import {
35
35
  sendStatusNotification2
36
- } from "./index-077ht5cq.js";
36
+ } from "./index-waktfbjy.js";
37
37
  import {
38
38
  setRecompStarting2,
39
39
  setRecompTerminal2
40
- } from "./index-n8qmmd7f.js";
40
+ } from "./index-adr4vfys.js";
41
41
 
42
42
  // src/hooks/magic-context/wrapup-orchestrator.ts
43
43
  import * as crypto from "node:crypto";
@@ -3,16 +3,16 @@ import {
3
3
  } from "./index-h7tgn49j.js";
4
4
  import {
5
5
  clearEmergencyRecovery
6
- } from "./index-yzjhx10y.js";
6
+ } from "./index-0fe4q77z.js";
7
7
  import {
8
8
  requestPendingMaterialization,
9
9
  dropSlot,
10
10
  executeContextRecomp
11
- } from "./index-dcqk0y27.js";
11
+ } from "./index-k0dpkyn7.js";
12
12
  import {
13
13
  renderUserFacingFailure,
14
14
  userFacingFailureCode
15
- } from "./index-t3rbb8wr.js";
15
+ } from "./index-pe6b4bhs.js";
16
16
 
17
17
  // src/hooks/magic-context/recomp-orchestrator.ts
18
18
  function resolveLiveModelKey(liveSessionState, sessionId) {