@cortexkit/opencode-magic-context 0.49.86 → 0.49.87

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 (142) hide show
  1. package/dist/auto-search-worker.js +13 -7
  2. package/dist/chunk-embedding-write-worker.js +4 -4
  3. package/dist/{compartment-chunk-embedding-ymc9mtwv.js → compartment-chunk-embedding-fey2bsyf.js} +3 -1
  4. package/dist/{conflict-warning-hook-a0wrnzch.js → conflict-warning-hook-kbq6ppjf.js} +2 -2
  5. package/dist/{context-xesm7rj3.js → context-gnk68pyy.js} +126 -46
  6. package/dist/{embedding-backfill-v6sw58m8.js → embedding-backfill-9khxv6a9.js} +4 -4
  7. package/dist/{embedding-cache-mgyr73ef.js → embedding-cache-zn4r1c31.js} +5 -1
  8. package/dist/features/magic-context/compartment-chunk-embedding.d.ts +1 -0
  9. package/dist/features/magic-context/compartment-chunk-embedding.d.ts.map +1 -1
  10. package/dist/features/magic-context/dreamer/task-executor.d.ts.map +1 -1
  11. package/dist/features/magic-context/dreamer/token-budget.d.ts +8 -3
  12. package/dist/features/magic-context/dreamer/token-budget.d.ts.map +1 -1
  13. package/dist/features/magic-context/memory/embedding-cache.d.ts +7 -0
  14. package/dist/features/magic-context/memory/embedding-cache.d.ts.map +1 -1
  15. package/dist/features/magic-context/search.d.ts +6 -0
  16. package/dist/features/magic-context/search.d.ts.map +1 -1
  17. package/dist/features/magic-context/tool-definition-tokens.d.ts +2 -0
  18. package/dist/features/magic-context/tool-definition-tokens.d.ts.map +1 -1
  19. package/dist/hooks/magic-context/auto-search-worker-client.d.ts.map +1 -1
  20. package/dist/hooks/magic-context/auto-search-worker-probe.fixture.d.ts +2 -0
  21. package/dist/hooks/magic-context/auto-search-worker-probe.fixture.d.ts.map +1 -0
  22. package/dist/hooks/magic-context/dropped-input-guard.d.ts.map +1 -1
  23. package/dist/hooks/magic-context/emergency-fail-closed.d.ts +2 -0
  24. package/dist/hooks/magic-context/emergency-fail-closed.d.ts.map +1 -1
  25. package/dist/hooks/magic-context/send-session-notification.d.ts +11 -1
  26. package/dist/hooks/magic-context/send-session-notification.d.ts.map +1 -1
  27. package/dist/hooks/magic-context/transform.d.ts +1 -0
  28. package/dist/hooks/magic-context/transform.d.ts.map +1 -1
  29. package/dist/{index-7j2zv9nm.js → index-2qsca7h7.js} +47 -11
  30. package/dist/{index-25nktq8n.js → index-3jgzd7nz.js} +7 -7
  31. package/dist/{index-snbpdpa3.js → index-3pdknr07.js} +4 -4
  32. package/dist/{index-k0tb2z28.js → index-3x4qvp29.js} +2 -2
  33. package/dist/{index-d0rtbv0f.js → index-5nmqgvz2.js} +21 -14
  34. package/dist/{index-xrnhxkz7.js → index-60wnwcwz.js} +1 -1
  35. package/dist/{index-g6hfh4h4.js → index-6zewd2n5.js} +14 -8
  36. package/dist/{index-nny4gm06.js → index-74sh122g.js} +2 -2
  37. package/dist/{index-70cv85b0.js → index-78t37mcq.js} +2 -2
  38. package/dist/{index-stx8zd81.js → index-83qd3n7s.js} +2 -2
  39. package/dist/{index-jjvbk92s.js → index-9emdjcb5.js} +1 -1
  40. package/dist/{index-gxdc95cp.js → index-awyqqnd8.js} +585 -82
  41. package/dist/{index-022w6314.js → index-b364vr04.js} +109 -505
  42. package/dist/{index-4w5rx7de.js → index-bxrfq3mv.js} +1 -1
  43. package/dist/{index-1bqkqde0.js → index-c1s40xmj.js} +3 -3
  44. package/dist/{index-05bm2ndp.js → index-chpzb6xy.js} +1 -1
  45. package/dist/{index-ttk3trse.js → index-csztadkj.js} +46 -17
  46. package/dist/{index-798s7c8s.js → index-hdyfvdag.js} +1 -1
  47. package/dist/{index-4ntnt8ee.js → index-jka4y6mv.js} +1 -1
  48. package/dist/{index-w6v4dw5f.js → index-kmrv1fw3.js} +4 -4
  49. package/dist/{index-jrj95cce.js → index-m6dnydf8.js} +9 -2
  50. package/dist/{index-e32b3x4n.js → index-pmcvg3k1.js} +4 -4
  51. package/dist/{index-4dhv7mqz.js → index-qjwpqvnf.js} +48 -1
  52. package/dist/{index-xccywqdj.js → index-rvf1726x.js} +3 -3
  53. package/dist/{index-1pf5qrx4.js → index-vyfrgwhk.js} +3 -3
  54. package/dist/{index-s8ks5nz4.js → index-watde7a1.js} +2 -2
  55. package/dist/{v2/server-fzgyvsb1.js → index-y14pawe1.js} +3 -0
  56. package/dist/index.d.ts.map +1 -1
  57. package/dist/index.js +61 -52
  58. package/dist/{message-index-bounded-6fr624zf.js → message-index-bounded-r1qys471.js} +4 -4
  59. package/dist/migration-worker.js +3 -3
  60. package/dist/plugin/messages-transform.d.ts +3 -4
  61. package/dist/plugin/messages-transform.d.ts.map +1 -1
  62. package/dist/plugin/refusal-notice.d.ts +3 -0
  63. package/dist/plugin/refusal-notice.d.ts.map +1 -0
  64. package/dist/{project-embedding-registry-q80scexh.js → project-embedding-registry-8t0gwf59.js} +3 -3
  65. package/dist/raw-ordinal-warmup-worker.js +4 -4
  66. package/dist/{read-session-chunk-6wedfths.js → read-session-chunk-xv9f0wgb.js} +3 -3
  67. package/dist/{recomp-orchestrator-7ecg8ryx.js → recomp-orchestrator-2ztmtxt2.js} +18 -18
  68. package/dist/{render-yqp7q79f.js → render-d6q6h9hy.js} +10 -10
  69. package/dist/{rpc-notifications-t9q0ynq7.js → rpc-notifications-ta2zsxpq.js} +1 -1
  70. package/dist/{search-archive-r4h96j2z.js → search-archive-g96jn6p0.js} +5 -5
  71. package/dist/{search-bw22d7zc.js → search-d5aajhs3.js} +14 -14
  72. package/dist/{send-session-notification-7x518gew.js → send-session-notification-gzxz88vq.js} +1 -1
  73. package/dist/shared/assistant-message-extractor.d.ts +2 -0
  74. package/dist/shared/assistant-message-extractor.d.ts.map +1 -1
  75. package/dist/shared/prompt-async-transport.d.ts.map +1 -1
  76. package/dist/shared/rpc-notifications.d.ts +1 -1
  77. package/dist/shared/rpc-notifications.d.ts.map +1 -1
  78. package/dist/{storage-memory-e6a7mb0k.js → storage-memory-hhrvfw0x.js} +2 -2
  79. package/dist/{storage-tags-y2mrb8e6.js → storage-tags-f1ftvjpw.js} +2 -2
  80. package/dist/{transform-postprocess-phase-t99yj9vt.js → transform-postprocess-phase-b2yjw8by.js} +19 -19
  81. package/dist/v2/auto-search-worker.js +13 -7
  82. package/dist/v2/chunk-embedding-write-worker.js +4 -4
  83. package/dist/v2/{compartment-chunk-embedding-x6qw6mjk.js → compartment-chunk-embedding-knt2468v.js} +3 -1
  84. package/dist/v2/{context-k8sx1nyy.js → context-s86114yy.js} +219 -62
  85. package/dist/v2/{embedding-backfill-k8kqnwfq.js → embedding-backfill-tazkbpyg.js} +4 -4
  86. package/dist/v2/{embedding-cache-mgyr73ef.js → embedding-cache-zn4r1c31.js} +5 -1
  87. package/dist/v2/fold/native-replay.d.ts +3 -1
  88. package/dist/v2/fold/native-replay.d.ts.map +1 -1
  89. package/dist/v2/hidden-child-record.d.ts +1 -0
  90. package/dist/v2/hidden-child-record.d.ts.map +1 -1
  91. package/dist/v2/hidden-completion.d.ts.map +1 -1
  92. package/dist/v2/hooks/context.d.ts.map +1 -1
  93. package/dist/v2/{message-index-bounded-jqy7283g.js → message-index-bounded-b07r9cjv.js} +4 -4
  94. package/dist/v2/migration-worker.js +3 -3
  95. package/dist/v2/{project-embedding-registry-2jp1antr.js → project-embedding-registry-ah3gsg48.js} +3 -3
  96. package/dist/v2/raw-ordinal-warmup-worker.js +4 -4
  97. package/dist/v2/{read-session-chunk-n3nhfvd7.js → read-session-chunk-38wdy8nd.js} +3 -3
  98. package/dist/v2/{recomp-orchestrator-ssde9ft1.js → recomp-orchestrator-kc62xgb9.js} +17 -17
  99. package/dist/v2/{render-fezgh7pa.js → render-j05per51.js} +10 -10
  100. package/dist/v2/{rpc-notifications-t9q0ynq7.js → rpc-notifications-ta2zsxpq.js} +1 -1
  101. package/dist/v2/{search-archive-zz1kza50.js → search-archive-b4ptw02k.js} +5 -5
  102. package/dist/v2/{search-m251amra.js → search-kg31ad2s.js} +13 -13
  103. package/dist/v2/{send-session-notification-p52rhjzy.js → send-session-notification-zazaxxpf.js} +1 -1
  104. package/dist/v2/{server-ps6rz88g.js → server-2p0qayr1.js} +1 -1
  105. package/dist/v2/{server-fsw8kbng.js → server-2r9btf0g.js} +46 -17
  106. package/dist/v2/{server-wdq85mxj.js → server-6250cxzs.js} +14 -8
  107. package/dist/v2/{server-brgandk4.js → server-6vnbz81n.js} +2 -2
  108. package/dist/v2/{server-jjvbk92s.js → server-9emdjcb5.js} +1 -1
  109. package/dist/v2/{server-ap81bk3c.js → server-9n2qgk29.js} +1 -1
  110. package/dist/v2/{server-mbkwcwgw.js → server-axdmkvd5.js} +2 -2
  111. package/dist/v2/{server-2k8tkbhz.js → server-c7awk5s2.js} +10 -4
  112. package/dist/v2/{server-4wwwm2ya.js → server-ct0gs8fc.js} +4 -4
  113. package/dist/v2/{server-97w51d8n.js → server-ff5wcfy4.js} +3 -3
  114. package/dist/v2/{server-ssg29wjg.js → server-gqrw0br5.js} +20 -13
  115. package/dist/v2/{server-y31y6gws.js → server-gwhj0362.js} +3 -3
  116. package/dist/v2/{server-w7mpvkpj.js → server-pbp58w5x.js} +1 -1
  117. package/dist/v2/{server-s15knz0w.js → server-pmws7we9.js} +1 -1
  118. package/dist/v2/{server-4dhv7mqz.js → server-qjwpqvnf.js} +48 -1
  119. package/dist/v2/{server-a2f1bhyj.js → server-stjy5dxv.js} +9 -2
  120. package/dist/v2/{server-hn8b7sfe.js → server-xn7zqs4j.js} +2 -2
  121. package/dist/{index-fzgyvsb1.js → v2/server-y14pawe1.js} +3 -0
  122. package/dist/v2/{server-8pdfmc27.js → server-y17r5ryz.js} +4 -4
  123. package/dist/v2/{server-n5zr7190.js → server-yh2z4gg2.js} +3 -3
  124. package/dist/v2/{server-sxfbjdye.js → server-yx0nyj1q.js} +2 -2
  125. package/dist/v2/server.js +3 -3
  126. package/dist/v2/{storage-memory-e6a7mb0k.js → storage-memory-hhrvfw0x.js} +2 -2
  127. package/dist/v2/{storage-tags-xq81zgt2.js → storage-tags-pmw33chf.js} +2 -2
  128. package/dist/v2/{v2-archive-reader-e2w39c3p.js → v2-archive-reader-2ayz16s4.js} +1 -1
  129. package/dist/v2/{wrapup-orchestrator-eg5b1p89.js → wrapup-orchestrator-e20sjbdz.js} +17 -17
  130. package/dist/{v2-archive-reader-8dsngf2j.js → v2-archive-reader-x39mzvwn.js} +1 -1
  131. package/dist/{wrapup-orchestrator-nmk6yf7f.js → wrapup-orchestrator-h3s905vs.js} +19 -19
  132. package/package.json +1 -1
  133. package/src/shared/assistant-message-extractor.test.ts +22 -0
  134. package/src/shared/assistant-message-extractor.ts +13 -0
  135. package/src/shared/model-suggestion-retry.test.ts +43 -12
  136. package/src/shared/prompt-async-transport.test.ts +275 -8
  137. package/src/shared/prompt-async-transport.ts +41 -2
  138. package/src/shared/reusable-worker.fixture.ts +15 -3
  139. package/src/shared/reusable-worker.test.ts +20 -10
  140. package/src/shared/rpc-notifications.ts +4 -1
  141. package/src/shared/sqlite-foreground-wait.test.ts +2 -2
  142. package/src/shared/startup-maintenance-policy.test.ts +4 -2
@@ -53,11 +53,11 @@ async function trySendTuiToast(sessionId, text, params, forcePersist) {
53
53
  const message = text.length > 200 ? `${text.slice(0, 200)}…` : text;
54
54
  const toastVariant = inferToastVariant(text);
55
55
  const duration = params.toastDurationMs ?? 5000;
56
- const { isTuiConnected: checkTui } = await importPluginModule(() => import("./rpc-notifications-t9q0ynq7.js"));
56
+ const { isTuiConnected: checkTui } = await importPluginModule(() => import("./rpc-notifications-ta2zsxpq.js"));
57
57
  if (!checkTui(sessionId))
58
58
  return false;
59
59
  try {
60
- const { pushNotification } = await importPluginModule(() => import("./rpc-notifications-t9q0ynq7.js"));
60
+ const { pushNotification } = await importPluginModule(() => import("./rpc-notifications-ta2zsxpq.js"));
61
61
  pushNotification("toast", {
62
62
  title,
63
63
  message,
@@ -286,7 +286,7 @@ async function sendCommandResult2(client, sessionId, text, params) {
286
286
  if (shouldHoldIgnoredNotification(sessionId)) {
287
287
  return sendIgnoredMessage2(client, sessionId, text, params);
288
288
  }
289
- const { isTuiConnected } = await importPluginModule(() => import("./rpc-notifications-t9q0ynq7.js"));
289
+ const { isTuiConnected } = await importPluginModule(() => import("./rpc-notifications-ta2zsxpq.js"));
290
290
  if (isTuiConnected(sessionId))
291
291
  return sendIgnoredMessage2(client, sessionId, text, params);
292
292
  const session = client?.session;
@@ -386,13 +386,19 @@ function observeIgnoredNotificationEvent2(event) {
386
386
  }
387
387
  async function sendStatusNotification2(_client, sessionId, text, params) {
388
388
  try {
389
- const { pushNotification } = await importPluginModule(() => import("./rpc-notifications-t9q0ynq7.js"));
390
- pushNotification("toast", {
391
- title: extractToastTitle(text),
389
+ const { pushLiveNotification, pushNotification } = await importPluginModule(() => import("./rpc-notifications-ta2zsxpq.js"));
390
+ const toast = {
391
+ title: params.toastTitle ?? extractToastTitle(text),
392
392
  message: text,
393
- variant: inferToastVariant(text),
393
+ variant: params.toastVariant ?? inferToastVariant(text),
394
394
  duration: params.toastDurationMs ?? 5000
395
- }, sessionId);
395
+ };
396
+ if (params.liveOnly) {
397
+ if (!pushLiveNotification("toast", toast, sessionId))
398
+ return "skipped";
399
+ } else {
400
+ pushNotification("toast", toast, sessionId);
401
+ }
396
402
  notifyDelivered(sessionId, params);
397
403
  return "sent";
398
404
  } catch (error) {
@@ -19,10 +19,10 @@ import {
19
19
  rawMessageWorkerSource2,
20
20
  rawMessageOffThreadRangeReader2,
21
21
  readRawSessionMessageIdOrdinalsForRange2
22
- } from "./index-7j2zv9nm.js";
22
+ } from "./index-2qsca7h7.js";
23
23
  import {
24
24
  readV2ArchiveOffThread2
25
- } from "./index-1pf5qrx4.js";
25
+ } from "./index-vyfrgwhk.js";
26
26
 
27
27
  // src/tools/ctx-expand/search-archive.ts
28
28
  var archiveReadsOnThisThread = 0;
@@ -3,12 +3,12 @@ import {
3
3
  } from "./index-5vsk2cpp.js";
4
4
  import {
5
5
  getTagById2
6
- } from "./index-xrnhxkz7.js";
6
+ } from "./index-60wnwcwz.js";
7
7
  import {
8
8
  expandToolPart,
9
9
  visitRawSessionMessages2,
10
10
  readRawSessionMessageById2
11
- } from "./index-7j2zv9nm.js";
11
+ } from "./index-2qsca7h7.js";
12
12
 
13
13
  // src/tools/ctx-expand/render.ts
14
14
  import { createHash } from "node:crypto";
@@ -4,7 +4,7 @@ import {
4
4
  } from "./index-ywrz4wy2.js";
5
5
  import {
6
6
  sendStatusNotification2
7
- } from "./index-g6hfh4h4.js";
7
+ } from "./index-6zewd2n5.js";
8
8
  import {
9
9
  formatConflictShort
10
10
  } from "./index-nxxzeq4y.js";
@@ -235,7 +235,7 @@ async function sendStartupAnnouncement2(client, directory, version, features, fo
235
235
  if (!sessionId) {
236
236
  return;
237
237
  }
238
- const { isTuiConnected } = await importPluginModule(() => import("./rpc-notifications-t9q0ynq7.js"));
238
+ const { isTuiConnected } = await importPluginModule(() => import("./rpc-notifications-ta2zsxpq.js"));
239
239
  if (isTuiConnected(sessionId) || isTuiConnected())
240
240
  return;
241
241
  const bullets = features.map((line) => ` • ${line}`).join(`
@@ -7,7 +7,7 @@ import {
7
7
  import {
8
8
  invalidateProject2,
9
9
  invalidateMemory2
10
- } from "./index-4dhv7mqz.js";
10
+ } from "./index-qjwpqvnf.js";
11
11
  import {
12
12
  computeNormalizedHash
13
13
  } from "./index-2bvekkfy.js";