@cortexkit/opencode-magic-context 0.49.78 → 0.49.79
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.
- package/dist/auto-search-worker.js +1 -1
- package/dist/chunk-embedding-write-worker.js +1 -1
- package/dist/{context-6pxdmpay.js → context-gb3gjahp.js} +14 -14
- package/dist/features/magic-context/dreamer/curate-category-rotation.d.ts +1 -1
- package/dist/features/magic-context/dreamer/curate-category-rotation.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/curate-memory-safety.d.ts +5 -1
- package/dist/features/magic-context/dreamer/curate-memory-safety.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-executor.d.ts +2 -0
- package/dist/features/magic-context/dreamer/task-executor.d.ts.map +1 -1
- package/dist/hooks/magic-context/image-token-estimate.d.ts.map +1 -1
- package/dist/{index-c7xvvhdd.js → index-2dadxknq.js} +110 -59
- package/dist/{index-8mt6vvwx.js → index-2q0t43fy.js} +1 -1
- package/dist/{index-1pfjvk89.js → index-8ykmp4jv.js} +6 -6
- package/dist/{index-kn23xzst.js → index-aawwdt26.js} +1 -1
- package/dist/{index-xkn7vq89.js → index-f619wjj9.js} +3 -3
- package/dist/{index-c3a833vk.js → index-hgdkwp21.js} +2 -2
- package/dist/{index-72qk8fs8.js → index-m0tbtzqh.js} +3 -3
- package/dist/{index-r865s8hf.js → index-m6rkq3t4.js} +1 -1
- package/dist/{index-dcdk1thy.js → index-sy5wbbw6.js} +5 -5
- package/dist/{index-7jj5jk78.js → index-tvkzkk4s.js} +5 -5
- package/dist/{index-k6b1av2m.js → index-twmeey4h.js} +2 -2
- package/dist/{index-cssarkg7.js → index-v8x07j6c.js} +3 -3
- package/dist/{index-rjm4hjyb.js → index-xsdaz3mq.js} +1 -1
- package/dist/{index-bdnak4d0.js → index-y208s7zx.js} +5 -3
- package/dist/{index-vr6t0y4w.js → index-zzvd4a9z.js} +1 -1
- package/dist/index.js +18 -18
- package/dist/{message-index-bounded-s0bckzqz.js → message-index-bounded-cfkeyf72.js} +3 -3
- package/dist/migration-worker.js +1 -1
- package/dist/raw-ordinal-warmup-worker.js +4 -4
- package/dist/{read-session-chunk-kqyb1y8c.js → read-session-chunk-s3qac56g.js} +2 -2
- package/dist/{recomp-orchestrator-38ed4yhj.js → recomp-orchestrator-jf60eef6.js} +7 -7
- package/dist/{render-8s531gd5.js → render-bjxgkrk6.js} +6 -6
- package/dist/{search-archive-2f1j2dh8.js → search-archive-a60k0x2n.js} +4 -4
- package/dist/{search-m4r4v4aw.js → search-mpde08f1.js} +5 -5
- package/dist/shared/subagent-runner.d.ts +9 -0
- package/dist/shared/subagent-runner.d.ts.map +1 -1
- package/dist/{storage-tags-d3nqrva7.js → storage-tags-6e83pvff.js} +1 -1
- package/dist/{transform-postprocess-phase-ch5fsw7h.js → transform-postprocess-phase-m1be339w.js} +8 -8
- package/dist/v2/auto-search-worker.js +1 -1
- package/dist/v2/chunk-embedding-write-worker.js +1 -1
- package/dist/v2/{context-h3r9gxrd.js → context-fzp6ynz4.js} +107 -56
- package/dist/v2/{message-index-bounded-vfx2zx9y.js → message-index-bounded-0xy4dn04.js} +3 -3
- package/dist/v2/migration-worker.js +1 -1
- package/dist/v2/raw-ordinal-warmup-worker.js +4 -4
- package/dist/v2/{read-session-chunk-bh402br0.js → read-session-chunk-6mt2t6dy.js} +2 -2
- package/dist/v2/{recomp-orchestrator-43grkr1k.js → recomp-orchestrator-4r63zen2.js} +6 -6
- package/dist/v2/{render-90pve6jf.js → render-7tr9d67f.js} +6 -6
- package/dist/v2/{search-archive-ha08g13n.js → search-archive-2ck9sbsc.js} +4 -4
- package/dist/v2/{search-xr5wb3a3.js → search-y01mww69.js} +4 -4
- package/dist/v2/{server-86vydsx9.js → server-0dmzr7f9.js} +2 -2
- package/dist/v2/{server-92fhew3p.js → server-1svqwm7m.js} +5 -5
- package/dist/v2/{server-6jxvkyrr.js → server-2gcfmd47.js} +1 -1
- package/dist/v2/{server-fjd90bk0.js → server-d7dbk2h6.js} +2 -2
- package/dist/v2/{server-gsz7h1zr.js → server-dhdn8mwq.js} +1 -1
- package/dist/v2/{server-qcbxjpkv.js → server-qpnjsg1v.js} +3 -3
- package/dist/v2/{server-fw2sjpkx.js → server-r00xyx66.js} +1 -1
- package/dist/v2/{server-b8qp1ark.js → server-r9xsgnez.js} +1 -1
- package/dist/v2/{server-65r7p1z4.js → server-tkznm2j9.js} +2 -2
- package/dist/v2/{server-cxkb9725.js → server-xdh4r20h.js} +5 -3
- package/dist/v2/server.js +2 -2
- package/dist/v2/{storage-tags-j4he6hwe.js → storage-tags-z8j8wq34.js} +1 -1
- package/dist/v2/{v2-archive-reader-xs0d7yyr.js → v2-archive-reader-jatkdt2s.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-ghbsa00k.js → wrapup-orchestrator-z91sebhb.js} +6 -6
- package/dist/{v2-archive-reader-maj9xst8.js → v2-archive-reader-sw01917z.js} +1 -1
- package/dist/{wrapup-orchestrator-q12ejyw9.js → wrapup-orchestrator-1k48hzxg.js} +8 -8
- package/package.json +1 -1
- package/src/shared/subagent-runner.ts +10 -0
|
@@ -139,9 +139,9 @@ async function serveV2ArchiveReads2(port, openConnections) {
|
|
|
139
139
|
import("./sqlite-zdgm52sv.js"),
|
|
140
140
|
import("./store-reader-yaxtdy6f.js"),
|
|
141
141
|
import("./store-1fax2zhj.js"),
|
|
142
|
-
import("./read-session-chunk-
|
|
143
|
-
import("./render-
|
|
144
|
-
import("./search-archive-
|
|
142
|
+
import("./read-session-chunk-6mt2t6dy.js"),
|
|
143
|
+
import("./render-7tr9d67f.js"),
|
|
144
|
+
import("./search-archive-2ck9sbsc.js"),
|
|
145
145
|
import("./expand-attachments-h33jbgyz.js")
|
|
146
146
|
]);
|
|
147
147
|
const pool = new V2StoreReaderPool;
|
|
@@ -1021,7 +1021,7 @@ function finishDatabaseOpen(db, dbPath, explicitDbPath, latestSupportedVersion)
|
|
|
1021
1021
|
state.running = startMessageFtsRowidMapBackfill2(db, signal).then(async () => {
|
|
1022
1022
|
if (signal.aborted || !readsOpenCodeStore)
|
|
1023
1023
|
return;
|
|
1024
|
-
const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-
|
|
1024
|
+
const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-6mt2t6dy.js"));
|
|
1025
1025
|
const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-ynb3vg6r.js"));
|
|
1026
1026
|
if (signal.aborted)
|
|
1027
1027
|
return;
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./server-afsz3cmx.js";
|
|
16
16
|
import {
|
|
17
17
|
isRecord
|
|
18
|
-
} from "./server-
|
|
18
|
+
} from "./server-xdh4r20h.js";
|
|
19
19
|
import {
|
|
20
20
|
cleanSearchText,
|
|
21
21
|
hintKeywordRelevance,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
isMessageIndexReconciledThrough,
|
|
26
26
|
clearIndexedMessages,
|
|
27
27
|
indexMessagesAfterOrdinal
|
|
28
|
-
} from "./server-
|
|
28
|
+
} from "./server-r00xyx66.js";
|
|
29
29
|
import {
|
|
30
30
|
Priority,
|
|
31
31
|
AdmissionClass,
|
|
@@ -346,15 +346,17 @@ function estimateImageTokensFromHeader(header, bytes, jpegReader) {
|
|
|
346
346
|
function nativeMediaImage(part) {
|
|
347
347
|
if (part.type !== "media" || !isRecord(part.media))
|
|
348
348
|
return;
|
|
349
|
-
const { mediaType, source } = part.media;
|
|
349
|
+
const { mediaType: assetMediaType, source } = part.media;
|
|
350
|
+
const encoded = assetMediaType === undefined;
|
|
351
|
+
const mediaType = encoded && isRecord(source) ? source.mediaType : assetMediaType;
|
|
350
352
|
if (typeof mediaType !== "string" || !mediaType.startsWith("image/"))
|
|
351
353
|
return;
|
|
352
354
|
let inline;
|
|
353
355
|
if (isRecord(source)) {
|
|
354
356
|
const { type, data } = source;
|
|
355
|
-
if (type === "base64" && typeof data === "string" && data.length > 0)
|
|
357
|
+
if ((type === "base64" || encoded && type === "bytes") && typeof data === "string" && data.length > 0)
|
|
356
358
|
inline = data;
|
|
357
|
-
if (type === "bytes" && data instanceof Uint8Array && data.byteLength > 0)
|
|
359
|
+
if (!encoded && type === "bytes" && data instanceof Uint8Array && data.byteLength > 0)
|
|
358
360
|
inline = data;
|
|
359
361
|
}
|
|
360
362
|
return { mediaType, inline };
|
package/dist/v2/server.js
CHANGED
|
@@ -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.
|
|
7878
|
+
version: "0.49.79",
|
|
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-
|
|
8199
|
+
const { registerContext } = await import("./context-fzp6ynz4.js");
|
|
8200
8200
|
setHarness2("opencode2");
|
|
8201
8201
|
bindStaleBuildNotice({}, import.meta.url, "opencode2");
|
|
8202
8202
|
const duties = await registerContext(context);
|
|
@@ -12,7 +12,7 @@ import {
|
|
|
12
12
|
getCompartments,
|
|
13
13
|
getLastCompartmentEndMessage,
|
|
14
14
|
requestPendingMaterialization
|
|
15
|
-
} from "./server-
|
|
15
|
+
} from "./server-dhdn8mwq.js";
|
|
16
16
|
import"./server-2amn2s73.js";
|
|
17
17
|
import"./server-y8xjr8rx.js";
|
|
18
18
|
import"./server-x6fn9x8q.js";
|
|
@@ -25,7 +25,7 @@ import"./server-1d042x6w.js";
|
|
|
25
25
|
import"./server-6ash6z8z.js";
|
|
26
26
|
import"./server-ds8vpfkr.js";
|
|
27
27
|
import"./server-8pdfmc27.js";
|
|
28
|
-
import"./server-
|
|
28
|
+
import"./server-r00xyx66.js";
|
|
29
29
|
import {
|
|
30
30
|
getWrapupInProgressState,
|
|
31
31
|
acquireWrapupInProgress,
|
|
@@ -33,16 +33,16 @@ import {
|
|
|
33
33
|
releaseWrapupInProgress,
|
|
34
34
|
getHistorianFailureState,
|
|
35
35
|
clearEmergencyRecovery
|
|
36
|
-
} from "./server-
|
|
36
|
+
} from "./server-xdh4r20h.js";
|
|
37
37
|
import"./server-xepx8t43.js";
|
|
38
|
-
import"./server-
|
|
38
|
+
import"./server-r9xsgnez.js";
|
|
39
39
|
import"./server-1zx87sdm.js";
|
|
40
40
|
import"./server-rz6g5xne.js";
|
|
41
41
|
import"./server-2ra6pwf3.js";
|
|
42
42
|
import"./server-3ap5dmhc.js";
|
|
43
43
|
import {
|
|
44
44
|
prepareRawSessionOrdinals2
|
|
45
|
-
} from "./server-
|
|
45
|
+
} from "./server-2gcfmd47.js";
|
|
46
46
|
import"./server-fr0wbhdn.js";
|
|
47
47
|
import"./server-jn4pktdk.js";
|
|
48
48
|
import"./server-afsz3cmx.js";
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
registerActiveCompartmentRun,
|
|
65
65
|
setRecompStarting2,
|
|
66
66
|
setRecompTerminal2
|
|
67
|
-
} from "./server-
|
|
67
|
+
} from "./server-1svqwm7m.js";
|
|
68
68
|
import"./server-qt1qqasc.js";
|
|
69
69
|
import"./server-mhrgymcs.js";
|
|
70
70
|
import"./server-jtq03rkb.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runManagedWrapup2
|
|
3
|
-
} from "./index-
|
|
4
|
-
import"./index-
|
|
5
|
-
import"./index-
|
|
3
|
+
} from "./index-tvkzkk4s.js";
|
|
4
|
+
import"./index-f619wjj9.js";
|
|
5
|
+
import"./index-sy5wbbw6.js";
|
|
6
6
|
import"./index-832w615x.js";
|
|
7
7
|
import"./index-sd3egckz.js";
|
|
8
8
|
import"./index-jfs6k0xk.js";
|
|
@@ -10,16 +10,16 @@ import"./index-16h5fhem.js";
|
|
|
10
10
|
import"./index-jjvbk92s.js";
|
|
11
11
|
import"./index-yfn52pb6.js";
|
|
12
12
|
import"./index-4dhv7mqz.js";
|
|
13
|
-
import"./index-
|
|
13
|
+
import"./index-xsdaz3mq.js";
|
|
14
14
|
import"./index-tebcx987.js";
|
|
15
|
-
import"./index-
|
|
15
|
+
import"./index-zzvd4a9z.js";
|
|
16
16
|
import"./index-2amn2s73.js";
|
|
17
17
|
import"./index-6athgjba.js";
|
|
18
18
|
import"./index-ngwmx6nt.js";
|
|
19
19
|
import"./index-1sq1krqw.js";
|
|
20
20
|
import"./index-qt1qqasc.js";
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
21
|
+
import"./index-2q0t43fy.js";
|
|
22
|
+
import"./index-y208s7zx.js";
|
|
23
23
|
import"./index-1zx87sdm.js";
|
|
24
24
|
import"./index-x40zr813.js";
|
|
25
25
|
import"./index-x8a7jmkh.js";
|
|
@@ -29,7 +29,7 @@ import"./index-6nqz8hsz.js";
|
|
|
29
29
|
import"./index-jg7sbt3v.js";
|
|
30
30
|
import"./index-snbpdpa3.js";
|
|
31
31
|
import"./index-pxnzyvjc.js";
|
|
32
|
-
import"./index-
|
|
32
|
+
import"./index-aawwdt26.js";
|
|
33
33
|
import"./index-fb3zxn06.js";
|
|
34
34
|
import"./index-xx05vta0.js";
|
|
35
35
|
import"./index-fr0wbhdn.js";
|
package/package.json
CHANGED
|
@@ -192,6 +192,14 @@ export interface CompletedSubagentToolCall {
|
|
|
192
192
|
arguments: Record<string, unknown>;
|
|
193
193
|
}
|
|
194
194
|
|
|
195
|
+
export interface CurateMemoryToolCall {
|
|
196
|
+
id: string;
|
|
197
|
+
name: "ctx_memory";
|
|
198
|
+
arguments: Record<string, unknown>;
|
|
199
|
+
status: "pending" | "completed" | "error";
|
|
200
|
+
output?: string;
|
|
201
|
+
}
|
|
202
|
+
|
|
195
203
|
export type SubagentRunResult =
|
|
196
204
|
| {
|
|
197
205
|
ok: true;
|
|
@@ -209,6 +217,8 @@ export type SubagentRunResult =
|
|
|
209
217
|
/** Completed, non-error tool results preserved by runners that can
|
|
210
218
|
* reconstruct invocation/result pairs from their transcript. */
|
|
211
219
|
completedToolCalls?: CompletedSubagentToolCall[];
|
|
220
|
+
/** Real ctx_memory call outcomes, including refusals and unresolved calls, for curate. */
|
|
221
|
+
curateMemoryToolCalls?: CurateMemoryToolCall[];
|
|
212
222
|
meta?: Record<string, unknown>;
|
|
213
223
|
}
|
|
214
224
|
| {
|