@cortexkit/opencode-magic-context 0.49.98 → 0.49.100

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/{context-0ae81pg4.js → context-k2tdh146.js} +293 -32
  4. package/dist/{embedding-backfill-7terr34j.js → embedding-backfill-79br4kk6.js} +2 -2
  5. package/dist/features/magic-context/memory/embedding-openai.d.ts.map +1 -1
  6. package/dist/features/magic-context/memory/embedding-probe.d.ts +10 -9
  7. package/dist/features/magic-context/memory/embedding-probe.d.ts.map +1 -1
  8. package/dist/features/magic-context/memory/embedding-response-slots.d.ts +13 -0
  9. package/dist/features/magic-context/memory/embedding-response-slots.d.ts.map +1 -0
  10. package/dist/features/magic-context/overflow-detection.d.ts +7 -0
  11. package/dist/features/magic-context/overflow-detection.d.ts.map +1 -1
  12. package/dist/features/magic-context/storage-native-replay.d.ts +2 -0
  13. package/dist/features/magic-context/storage-native-replay.d.ts.map +1 -1
  14. package/dist/hooks/magic-context/apply-operations.d.ts +1 -1
  15. package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
  16. package/dist/hooks/magic-context/emergency-drop.d.ts +8 -1
  17. package/dist/hooks/magic-context/emergency-drop.d.ts.map +1 -1
  18. package/dist/hooks/magic-context/execute-flush.d.ts +1 -1
  19. package/dist/hooks/magic-context/execute-flush.d.ts.map +1 -1
  20. package/dist/hooks/magic-context/final-wire-token-estimate.d.ts +4 -0
  21. package/dist/hooks/magic-context/final-wire-token-estimate.d.ts.map +1 -1
  22. package/dist/hooks/magic-context/heuristic-cleanup.d.ts +1 -0
  23. package/dist/hooks/magic-context/heuristic-cleanup.d.ts.map +1 -1
  24. package/dist/hooks/magic-context/image-token-estimate.d.ts +1 -0
  25. package/dist/hooks/magic-context/image-token-estimate.d.ts.map +1 -1
  26. package/dist/hooks/magic-context/provider-refusal-count.d.ts +84 -0
  27. package/dist/hooks/magic-context/provider-refusal-count.d.ts.map +1 -0
  28. package/dist/hooks/magic-context/signed-thinking-hold.d.ts +2 -0
  29. package/dist/hooks/magic-context/signed-thinking-hold.d.ts.map +1 -1
  30. package/dist/hooks/magic-context/tag-messages.d.ts +1 -1
  31. package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -1
  32. package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +1 -0
  33. package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
  34. package/dist/hooks/magic-context/transform.d.ts.map +1 -1
  35. package/dist/{index-p52gf8a6.js → index-0eyxarpb.js} +7 -7
  36. package/dist/{index-a1295271.js → index-0tqhr9zs.js} +5 -5
  37. package/dist/{index-xw608ytx.js → index-3cgh0ght.js} +1 -1
  38. package/dist/{index-hmrkgd4v.js → index-634cww4x.js} +7 -7
  39. package/dist/{index-h1xvt8fw.js → index-63kp05sy.js} +1 -1
  40. package/dist/{index-k86ec4j2.js → index-6hjbeeth.js} +4 -4
  41. package/dist/{index-04zhtsb1.js → index-e6s2jpr8.js} +1 -1
  42. package/dist/{index-db1art1p.js → index-esym6cw4.js} +1 -1
  43. package/dist/{index-tyjx0dwz.js → index-jjy4shhy.js} +1 -1
  44. package/dist/{index-8hhmv0ff.js → index-kjhgxkdx.js} +1 -1
  45. package/dist/{index-z1mj8fv5.js → index-mhdavdd4.js} +22 -17
  46. package/dist/{index-5wbqmvg8.js → index-n3tebmah.js} +25 -18
  47. package/dist/{index-0wj3jr8n.js → index-qjcye18f.js} +3 -3
  48. package/dist/{index-9eqt7755.js → index-rakm1eay.js} +2 -2
  49. package/dist/{index-w6kcwhhj.js → index-rjxg7a7m.js} +212 -4
  50. package/dist/{index-vxsxz3sp.js → index-txthzqrm.js} +286 -36
  51. package/dist/{index-em72jhc0.js → index-z1hc2g06.js} +1 -1
  52. package/dist/{index-kjdys7e2.js → index-zg5r2syy.js} +1 -1
  53. package/dist/{index-xbna9akt.js → index-zyb7tndy.js} +3 -3
  54. package/dist/index.d.ts.map +1 -1
  55. package/dist/index.js +138 -26
  56. package/dist/{message-index-bounded-6y7p974x.js → message-index-bounded-289186ah.js} +3 -3
  57. package/dist/migration-worker.js +1 -1
  58. package/dist/plugin/messages-transform.d.ts +1 -0
  59. package/dist/plugin/messages-transform.d.ts.map +1 -1
  60. package/dist/plugin/provider-refusal-v1.d.ts +15 -0
  61. package/dist/plugin/provider-refusal-v1.d.ts.map +1 -0
  62. package/dist/{project-embedding-registry-5rp9w92w.js → project-embedding-registry-xy8dcdys.js} +1 -1
  63. package/dist/raw-ordinal-warmup-worker.js +4 -4
  64. package/dist/{read-session-chunk-9ejnbe07.js → read-session-chunk-frnwxnjg.js} +2 -2
  65. package/dist/{recomp-orchestrator-kmkf8dm4.js → recomp-orchestrator-e7n124g0.js} +10 -10
  66. package/dist/{render-9712q3gp.js → render-argap54x.js} +6 -6
  67. package/dist/{search-archive-5jr011gc.js → search-archive-ads5mh9s.js} +5 -5
  68. package/dist/{search-kd84wg76.js → search-fxtb4844.js} +9 -9
  69. package/dist/shared/transcript.d.ts +1 -1
  70. package/dist/shared/transcript.d.ts.map +1 -1
  71. package/dist/{storage-tags-vd3sgd4s.js → storage-tags-2d2ba8e9.js} +1 -1
  72. package/dist/{transform-postprocess-phase-n4q1yd72.js → transform-postprocess-phase-2y0st4gk.js} +11 -11
  73. package/dist/v2/auto-search-worker.js +3 -3
  74. package/dist/v2/chunk-embedding-write-worker.js +1 -1
  75. package/dist/v2/{context-fqeg60th.js → context-v56v40cx.js} +600 -87
  76. package/dist/v2/{embedding-backfill-dm33f3ce.js → embedding-backfill-nhgp8znm.js} +2 -2
  77. package/dist/v2/hooks/context.d.ts.map +1 -1
  78. package/dist/v2/hooks/http-refusal-count.d.ts +41 -0
  79. package/dist/v2/hooks/http-refusal-count.d.ts.map +1 -0
  80. package/dist/v2/hooks/overflow-recovery.d.ts +3 -0
  81. package/dist/v2/hooks/overflow-recovery.d.ts.map +1 -1
  82. package/dist/v2/hooks/types.d.ts +5 -0
  83. package/dist/v2/hooks/types.d.ts.map +1 -1
  84. package/dist/v2/{message-index-bounded-wj5rs9az.js → message-index-bounded-p69v4wpy.js} +3 -3
  85. package/dist/v2/migration-worker.js +1 -1
  86. package/dist/v2/{project-embedding-registry-z9qxkdxm.js → project-embedding-registry-qz9x79kn.js} +1 -1
  87. package/dist/v2/raw-ordinal-warmup-worker.js +4 -4
  88. package/dist/v2/{read-session-chunk-89ep8br4.js → read-session-chunk-qzw3vedr.js} +2 -2
  89. package/dist/v2/{recomp-orchestrator-79362xbm.js → recomp-orchestrator-5gkzamy2.js} +9 -9
  90. package/dist/v2/{render-bzzypsgy.js → render-atxj9eaf.js} +6 -6
  91. package/dist/v2/{search-4f6kmq31.js → search-51qr14ed.js} +8 -8
  92. package/dist/v2/{search-archive-4yr4hw2m.js → search-archive-vgwnvdx2.js} +5 -5
  93. package/dist/v2/{server-1bks09js.js → server-08jh9wew.js} +3 -3
  94. package/dist/v2/{server-b38pxt0e.js → server-2ek9exbe.js} +1 -1
  95. package/dist/v2/{server-8xgs110k.js → server-606mnrv4.js} +212 -4
  96. package/dist/v2/{server-md1cabvq.js → server-7wpw3wc6.js} +22 -17
  97. package/dist/v2/{server-zedjjdc5.js → server-8vby30m5.js} +1 -1
  98. package/dist/v2/{server-7861dnm3.js → server-awth2wsg.js} +1 -1
  99. package/dist/v2/{server-62t1852h.js → server-b25nvm9c.js} +1 -1
  100. package/dist/v2/{server-4ccgfzr2.js → server-bhr92yb4.js} +1 -1
  101. package/dist/v2/{server-6mq43ear.js → server-c1vcbszm.js} +1 -1
  102. package/dist/v2/{server-70dhx58s.js → server-d2a639dg.js} +6 -6
  103. package/dist/v2/{server-e8ybwfv8.js → server-p2wxmjc3.js} +2 -2
  104. package/dist/v2/{server-tk4hpcxq.js → server-rwdp3hw6.js} +7 -7
  105. package/dist/v2/{server-h95cdc30.js → server-s3m2y97h.js} +1 -1
  106. package/dist/v2/{server-d0h1gjz2.js → server-wdmcqhv6.js} +3 -3
  107. package/dist/v2/server.js +2 -2
  108. package/dist/v2/{storage-tags-8kktww54.js → storage-tags-4t9fb4ch.js} +1 -1
  109. package/dist/v2/{v2-archive-reader-veyqp15a.js → v2-archive-reader-1wc5wb1a.js} +1 -1
  110. package/dist/v2/{wrapup-orchestrator-97s5wznb.js → wrapup-orchestrator-ksdn2emb.js} +9 -9
  111. package/dist/{v2-archive-reader-3s332fn7.js → v2-archive-reader-4pk46nc1.js} +1 -1
  112. package/dist/{wrapup-orchestrator-bm0x49e5.js → wrapup-orchestrator-sc2fsfct.js} +11 -11
  113. package/package.json +1 -1
  114. package/src/shared/tag-transcript.ts +5 -4
  115. package/src/shared/transcript.ts +1 -1
@@ -11,7 +11,7 @@ import {
11
11
  getCompartments,
12
12
  getLastCompartmentEndMessage,
13
13
  requestPendingMaterialization
14
- } from "./server-zedjjdc5.js";
14
+ } from "./server-8vby30m5.js";
15
15
  import"./server-2amn2s73.js";
16
16
  import"./server-d46xewmt.js";
17
17
  import"./server-b5eg9ct6.js";
@@ -24,7 +24,7 @@ import"./server-1d042x6w.js";
24
24
  import"./server-54nc921b.js";
25
25
  import"./server-98xd6j4r.js";
26
26
  import"./server-ghk96d57.js";
27
- import"./server-6mq43ear.js";
27
+ import"./server-c1vcbszm.js";
28
28
  import {
29
29
  getWrapupInProgressState,
30
30
  acquireWrapupInProgress,
@@ -32,16 +32,16 @@ import {
32
32
  releaseWrapupInProgress,
33
33
  getHistorianFailureState,
34
34
  clearEmergencyRecovery
35
- } from "./server-8xgs110k.js";
35
+ } from "./server-606mnrv4.js";
36
36
  import"./server-bzebqckc.js";
37
- import"./server-62t1852h.js";
37
+ import"./server-b25nvm9c.js";
38
38
  import"./server-1zx87sdm.js";
39
39
  import"./server-arfzfxe8.js";
40
40
  import"./server-2ra6pwf3.js";
41
41
  import"./server-vgy98kcd.js";
42
42
  import {
43
43
  prepareRawSessionOrdinals2
44
- } from "./server-7861dnm3.js";
44
+ } from "./server-awth2wsg.js";
45
45
  import"./server-fr0wbhdn.js";
46
46
  import"./server-3mb205v9.js";
47
47
  import"./server-3qeqa3b6.js";
@@ -64,14 +64,14 @@ import {
64
64
  registerActiveCompartmentRun,
65
65
  setRecompStarting2,
66
66
  setRecompTerminal2
67
- } from "./server-tk4hpcxq.js";
67
+ } from "./server-rwdp3hw6.js";
68
68
  import"./server-qt1qqasc.js";
69
- import"./server-md1cabvq.js";
69
+ import"./server-7wpw3wc6.js";
70
70
  import"./server-7c5p0bh1.js";
71
71
  import"./server-qjwpqvnf.js";
72
72
  import"./server-pqgnjf38.js";
73
- import"./server-b38pxt0e.js";
74
- import"./server-4ccgfzr2.js";
73
+ import"./server-2ek9exbe.js";
74
+ import"./server-bhr92yb4.js";
75
75
  import"./server-9emdjcb5.js";
76
76
  import"./server-0b3ms151.js";
77
77
  import"./server-d4h86y7v.js";
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  readV2ArchiveOffThread2,
3
3
  serveV2ArchiveReads2
4
- } from "./index-xbna9akt.js";
4
+ } from "./index-zyb7tndy.js";
5
5
  import"./index-v0p37hm2.js";
6
6
  import"./index-gzy5w8ya.js";
7
7
  import"./index-1d042x6w.js";
@@ -1,26 +1,26 @@
1
1
  import {
2
2
  runManagedWrapup2
3
- } from "./index-a1295271.js";
4
- import"./index-k86ec4j2.js";
5
- import"./index-p52gf8a6.js";
3
+ } from "./index-0tqhr9zs.js";
4
+ import"./index-6hjbeeth.js";
5
+ import"./index-0eyxarpb.js";
6
6
  import"./index-qxzk5s30.js";
7
7
  import"./index-sd3egckz.js";
8
- import"./index-db1art1p.js";
9
- import"./index-04zhtsb1.js";
8
+ import"./index-esym6cw4.js";
9
+ import"./index-e6s2jpr8.js";
10
10
  import"./index-9emdjcb5.js";
11
- import"./index-z1mj8fv5.js";
11
+ import"./index-mhdavdd4.js";
12
12
  import"./index-qjwpqvnf.js";
13
- import"./index-em72jhc0.js";
13
+ import"./index-z1hc2g06.js";
14
14
  import"./index-ab86c21b.js";
15
- import"./index-tyjx0dwz.js";
15
+ import"./index-jjy4shhy.js";
16
16
  import"./index-2amn2s73.js";
17
17
  import"./index-ajmy0v5j.js";
18
18
  import"./index-h1qh9n8b.js";
19
19
  import"./index-fqth7850.js";
20
20
  import"./index-61a853ky.js";
21
21
  import"./index-qt1qqasc.js";
22
- import"./index-8hhmv0ff.js";
23
- import"./index-w6kcwhhj.js";
22
+ import"./index-kjhgxkdx.js";
23
+ import"./index-rjxg7a7m.js";
24
24
  import"./index-1zx87sdm.js";
25
25
  import"./index-vdzd98ry.js";
26
26
  import"./index-y14pawe1.js";
@@ -30,7 +30,7 @@ import"./index-r3f85n7y.js";
30
30
  import"./index-fd3hkyk1.js";
31
31
  import"./index-1vv1ka4a.js";
32
32
  import"./index-gcf2x04k.js";
33
- import"./index-xw608ytx.js";
33
+ import"./index-3cgh0ght.js";
34
34
  import"./index-fb3zxn06.js";
35
35
  import"./index-hyvxmz3e.js";
36
36
  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.98",
3
+ "version": "0.49.100",
4
4
  "type": "module",
5
5
  "description": "OpenCode plugin for Magic Context — cross-session memory and context management",
6
6
  "main": "dist/index.js",
@@ -1425,10 +1425,10 @@ function buildAggregateTarget(
1425
1425
 
1426
1426
  // Whether the host keeps this kept call's real arguments. Asks every call
1427
1427
  // occurrence, so the host learns about each call it must send that way.
1428
- const keepsRealArgumentsWhenKept = (): boolean => {
1428
+ const keepsRealArgumentsWhenKept = (force?: boolean): boolean => {
1429
1429
  let keeps = false;
1430
1430
  for (const occ of occurrences) {
1431
- if (occ.kind === "tool_use" && occ.part.keepsRealArgumentsWhenKept?.() === true)
1431
+ if (occ.kind === "tool_use" && occ.part.keepsRealArgumentsWhenKept?.(force) === true)
1432
1432
  keeps = true;
1433
1433
  }
1434
1434
  return keeps;
@@ -1512,7 +1512,7 @@ function buildAggregateTarget(
1512
1512
  }
1513
1513
  return occurrences[0]?.part.getText() ?? null;
1514
1514
  },
1515
- drop(): "removed" | "truncated" | "absent" | "incomplete" {
1515
+ drop(keepRealArguments?: boolean): "removed" | "truncated" | "absent" | "incomplete" {
1516
1516
  if (!complete()) return "incomplete";
1517
1517
  if (!requiresToolArcSkeleton) {
1518
1518
  const authorization = occurrences.map((occ) => occ.part.canRemove?.());
@@ -1548,7 +1548,8 @@ function buildAggregateTarget(
1548
1548
  // whose model allowed it), this renders the bytes of a
1549
1549
  // `skeleton_real` row: real arguments, `[dropped §N§]` result. The
1550
1550
  // row stays `full`, so a later pass that can remove the call does.
1551
- if (keepsRealArgumentsWhenKept()) return skeletonReal();
1551
+ if (keepsRealArgumentsWhenKept(keepRealArguments) || keepRealArguments)
1552
+ return skeletonReal();
1552
1553
  // Otherwise the call keeps its place with a `{"dropped": …}` marker
1553
1554
  // in its arguments. That is the form such a row has had since it was
1554
1555
  // dropped, and replaying it keeps the cached prompt's bytes: a `full`
@@ -184,7 +184,7 @@ export interface TranscriptPart {
184
184
  * means the marker. A host that answers true may note the call, so every
185
185
  * copy of it the host sends carries the same arguments.
186
186
  */
187
- keepsRealArgumentsWhenKept?(): boolean;
187
+ keepsRealArgumentsWhenKept?(force?: boolean): boolean;
188
188
 
189
189
  /** Remove one half of a complete tool arc. Callers must remove both halves together. */
190
190
  remove?(): boolean;