@cortexkit/opencode-magic-context 0.49.68 → 0.49.69
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-45s8k2z1.js → context-rcts8w54.js} +14 -14
- package/dist/hooks/magic-context/tail-hygiene-walk.d.ts +13 -0
- package/dist/hooks/magic-context/tail-hygiene-walk.d.ts.map +1 -1
- package/dist/{index-h1r752qh.js → index-0dbc9rxd.js} +3 -3
- package/dist/{index-nn2tvw8c.js → index-51anehwt.js} +3 -3
- package/dist/{index-vqb038xf.js → index-5hc4kjg0.js} +1 -1
- package/dist/{index-tdz2yrtq.js → index-95475ngp.js} +15 -15
- package/dist/{index-9rcfa1mj.js → index-cdyhpdqx.js} +3 -3
- package/dist/{index-p18ycyd3.js → index-d0mb17q4.js} +2 -2
- package/dist/{index-8xzxx8ww.js → index-fcrp1k8s.js} +1 -1
- package/dist/{index-9ej822m7.js → index-fm0bpxc6.js} +1 -1
- package/dist/{index-tcsej1z7.js → index-gvnt9yka.js} +5 -5
- package/dist/{index-j87shhef.js → index-mejvnav7.js} +6 -6
- package/dist/{index-b4m3e6hp.js → index-mey1nc1v.js} +1 -1
- package/dist/{index-50kb03a8.js → index-mxjdj2cz.js} +17 -2
- package/dist/{index-6az16nk1.js → index-n19pqsnh.js} +2 -2
- package/dist/{index-gcbwag0s.js → index-rzxzap49.js} +5 -5
- package/dist/{index-x48amv92.js → index-y664y8kq.js} +1 -1
- package/dist/index.js +18 -18
- package/dist/{message-index-bounded-gbvck1sn.js → message-index-bounded-n2j33x8n.js} +3 -3
- package/dist/migration-worker.js +1 -1
- package/dist/raw-ordinal-warmup-worker.js +4 -4
- package/dist/{read-session-chunk-pf17ry28.js → read-session-chunk-6kdtfa7k.js} +2 -2
- package/dist/{recomp-orchestrator-xkwv21gx.js → recomp-orchestrator-t9670x13.js} +7 -7
- package/dist/{render-fpzx40a6.js → render-re3akx9j.js} +6 -6
- package/dist/{search-archive-fvswev6b.js → search-archive-0q8rdnrd.js} +4 -4
- package/dist/{search-n3c00q00.js → search-rppmngr5.js} +5 -5
- package/dist/{storage-tags-k7r6mh7y.js → storage-tags-rptkad9p.js} +1 -1
- package/dist/{transform-postprocess-phase-te4p4f1r.js → transform-postprocess-phase-qtd2wr52.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-afpzfn3v.js → context-wv122q62.js} +12 -12
- package/dist/v2/{message-index-bounded-6mh661z7.js → message-index-bounded-hfnsznj0.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-vzah3d38.js → read-session-chunk-qzd376gb.js} +2 -2
- package/dist/v2/{recomp-orchestrator-r680z2yp.js → recomp-orchestrator-rrsbcsmc.js} +6 -6
- package/dist/v2/{render-rreeqwtd.js → render-qwy9ydnb.js} +6 -6
- package/dist/v2/{search-archive-jrmydwtk.js → search-archive-gewpafej.js} +4 -4
- package/dist/v2/{search-y6xf7rek.js → search-q3xcyyq8.js} +4 -4
- package/dist/v2/{server-mm00e4hd.js → server-07z334y6.js} +1 -1
- package/dist/v2/{server-f1ryxejb.js → server-0c7egkzr.js} +2 -2
- package/dist/v2/{server-6j81j52a.js → server-axmk8rr2.js} +1 -1
- package/dist/v2/{server-8p0b0p5q.js → server-fczyr89c.js} +2 -2
- package/dist/v2/{server-cf2w8xyq.js → server-h8y2948e.js} +3 -3
- package/dist/v2/{server-0n9297e9.js → server-nc4qrjde.js} +1 -1
- package/dist/v2/{server-j0jy9twd.js → server-ssdfdrpv.js} +5 -5
- package/dist/v2/{server-fwxm5t54.js → server-vqkqv7ze.js} +17 -2
- package/dist/v2/{server-ygjd2cys.js → server-vzrj39bj.js} +1 -1
- package/dist/v2/{server-tky6gx9c.js → server-xxy28mq5.js} +2 -2
- package/dist/v2/server.js +2 -2
- package/dist/v2/{storage-tags-nxg71m93.js → storage-tags-msa1qvk8.js} +1 -1
- package/dist/v2/{v2-archive-reader-f1k1g9tx.js → v2-archive-reader-nwaw9qph.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-kgf60271.js → wrapup-orchestrator-xyd3r2t1.js} +6 -6
- package/dist/{v2-archive-reader-asajy6ts.js → v2-archive-reader-dv00gb2a.js} +1 -1
- package/dist/{wrapup-orchestrator-gr88denr.js → wrapup-orchestrator-fzygp85w.js} +8 -8
- package/package.json +1 -1
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderSearchArchive2,
|
|
3
3
|
renderSearchArchiveOffThread2
|
|
4
|
-
} from "./server-
|
|
5
|
-
import"./server-
|
|
4
|
+
} from "./server-xxy28mq5.js";
|
|
5
|
+
import"./server-h8y2948e.js";
|
|
6
6
|
import"./server-52x68mj4.js";
|
|
7
|
-
import"./server-
|
|
8
|
-
import"./server-
|
|
7
|
+
import"./server-axmk8rr2.js";
|
|
8
|
+
import"./server-vqkqv7ze.js";
|
|
9
9
|
import"./server-1zx87sdm.js";
|
|
10
10
|
import"./server-3ap5dmhc.js";
|
|
11
11
|
import"./server-rz6g5xne.js";
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
resolveMemoriesByIdsForSearch2,
|
|
6
6
|
unifiedSearch2,
|
|
7
7
|
formatSearchResults2
|
|
8
|
-
} from "./server-
|
|
8
|
+
} from "./server-fczyr89c.js";
|
|
9
9
|
import"./server-52x68mj4.js";
|
|
10
10
|
import"./server-d07yxksx.js";
|
|
11
11
|
import"./server-d9aayyxk.js";
|
|
@@ -13,11 +13,11 @@ import"./server-jjvbk92s.js";
|
|
|
13
13
|
import"./server-z5255w05.js";
|
|
14
14
|
import"./server-4dhv7mqz.js";
|
|
15
15
|
import"./server-rbtx6q5v.js";
|
|
16
|
-
import"./server-
|
|
16
|
+
import"./server-07z334y6.js";
|
|
17
17
|
import"./server-2amn2s73.js";
|
|
18
18
|
import"./server-qt1qqasc.js";
|
|
19
|
-
import"./server-
|
|
20
|
-
import"./server-
|
|
19
|
+
import"./server-axmk8rr2.js";
|
|
20
|
+
import"./server-vqkqv7ze.js";
|
|
21
21
|
import"./server-1zx87sdm.js";
|
|
22
22
|
import"./server-3ap5dmhc.js";
|
|
23
23
|
import"./server-d706s5xn.js";
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
} from "./server-y8xjr8rx.js";
|
|
4
4
|
import {
|
|
5
5
|
getTagById2
|
|
6
|
-
} from "./server-
|
|
6
|
+
} from "./server-vqkqv7ze.js";
|
|
7
7
|
import {
|
|
8
8
|
expandToolPart,
|
|
9
9
|
visitRawSessionMessages2,
|
|
10
10
|
readRawSessionMessageById2
|
|
11
|
-
} from "./server-
|
|
11
|
+
} from "./server-axmk8rr2.js";
|
|
12
12
|
|
|
13
13
|
// src/tools/ctx-expand/render.ts
|
|
14
14
|
import { createHash } from "node:crypto";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
} from "./server-afsz3cmx.js";
|
|
16
16
|
import {
|
|
17
17
|
isRecord
|
|
18
|
-
} from "./server-
|
|
18
|
+
} from "./server-vqkqv7ze.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-07z334y6.js";
|
|
29
29
|
import {
|
|
30
30
|
Priority,
|
|
31
31
|
AdmissionClass,
|
|
@@ -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-4se2a0n0.js"),
|
|
142
|
-
import("./read-session-chunk-
|
|
143
|
-
import("./render-
|
|
144
|
-
import("./search-archive-
|
|
142
|
+
import("./read-session-chunk-qzd376gb.js"),
|
|
143
|
+
import("./render-qwy9ydnb.js"),
|
|
144
|
+
import("./search-archive-gewpafej.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-qzd376gb.js"));
|
|
1025
1025
|
const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-ynb3vg6r.js"));
|
|
1026
1026
|
if (signal.aborted)
|
|
1027
1027
|
return;
|
|
@@ -101,7 +101,7 @@ import {
|
|
|
101
101
|
foldShrunkPartTags2,
|
|
102
102
|
getTagNumberByMessageId2,
|
|
103
103
|
getActiveTagsBySession2
|
|
104
|
-
} from "./server-
|
|
104
|
+
} from "./server-vqkqv7ze.js";
|
|
105
105
|
import {
|
|
106
106
|
hasMeaningfulUserText2,
|
|
107
107
|
estimateTokens,
|
|
@@ -156,14 +156,14 @@ import {
|
|
|
156
156
|
getRawSessionTagKeysThrough2,
|
|
157
157
|
getLegacyProtectedTailStartOrdinal2,
|
|
158
158
|
readSessionChunk2
|
|
159
|
-
} from "./server-
|
|
159
|
+
} from "./server-axmk8rr2.js";
|
|
160
160
|
import {
|
|
161
161
|
clearCompressionDepth,
|
|
162
162
|
clearCompressionDepthRange,
|
|
163
163
|
toMessageIndexSource,
|
|
164
164
|
clearIndexedMessagesInTransaction,
|
|
165
165
|
indexSourcesAfterOrdinal
|
|
166
|
-
} from "./server-
|
|
166
|
+
} from "./server-07z334y6.js";
|
|
167
167
|
import {
|
|
168
168
|
COMPARTMENT_LEASE_RENEWAL_MS,
|
|
169
169
|
getCompartmentLeaseBlocker,
|
|
@@ -209,7 +209,7 @@ import {
|
|
|
209
209
|
getProjectState,
|
|
210
210
|
recordSubagentInvocation,
|
|
211
211
|
getLatestHistorianInvocationId
|
|
212
|
-
} from "./server-
|
|
212
|
+
} from "./server-vzrj39bj.js";
|
|
213
213
|
import {
|
|
214
214
|
invalidateAutoEmbedSession
|
|
215
215
|
} from "./server-2amn2s73.js";
|
|
@@ -269,7 +269,7 @@ import {
|
|
|
269
269
|
LATEST_SUPPORTED_VERSION,
|
|
270
270
|
getPersistedSchemaVersion,
|
|
271
271
|
openDatabase
|
|
272
|
-
} from "./server-
|
|
272
|
+
} from "./server-nc4qrjde.js";
|
|
273
273
|
import {
|
|
274
274
|
parseCompartmentOutput,
|
|
275
275
|
resolveWorkspaceShareCategories,
|
|
@@ -1100,12 +1100,21 @@ function buildTagAttribution(args) {
|
|
|
1100
1100
|
}
|
|
1101
1101
|
return { protectedNumbers, messageTags, toolTagsByPart };
|
|
1102
1102
|
}
|
|
1103
|
+
function reclaimableTailTokens(part) {
|
|
1104
|
+
return part.tagStatus === "active" && !part.protected && !part.queuedForDrop && part.kind !== "excluded" && part.kind !== "text" ? part.tokens : 0;
|
|
1105
|
+
}
|
|
1103
1106
|
function snapshot(args) {
|
|
1104
1107
|
const memo = memoizedContent(args.kind, args.content);
|
|
1105
1108
|
const tag = args.tag;
|
|
1106
1109
|
const isProtected = tag ? args.protectedNumbers.has(tag.tagNumber) : false;
|
|
1107
1110
|
const queuedForDrop = tag ? args.pendingDropTagNumbers.has(tag.tagNumber) : false;
|
|
1108
|
-
const uTokens =
|
|
1111
|
+
const uTokens = reclaimableTailTokens({
|
|
1112
|
+
kind: args.kind,
|
|
1113
|
+
tokens: args.tokens,
|
|
1114
|
+
tagStatus: tag?.status,
|
|
1115
|
+
protected: isProtected,
|
|
1116
|
+
queuedForDrop
|
|
1117
|
+
});
|
|
1109
1118
|
return {
|
|
1110
1119
|
key: args.key,
|
|
1111
1120
|
contentHash: memo.hash,
|
|
@@ -1269,7 +1278,13 @@ function measureWithReplay(input, replay) {
|
|
|
1269
1278
|
const tag = prior.kind === "text" ? attribution.messageTags.get(`${message.info.id}:p${partIndex}`) : prior.kind === "file" ? attribution.messageTags.get(`${message.info.id}:file${partIndex}`) : prior.kind === "toolInput" || prior.kind === "toolOutput" ? attribution.toolTagsByPart.get(message.parts[partIndex]) : undefined;
|
|
1270
1279
|
const protectedPart = tag ? attribution.protectedNumbers.has(tag.tagNumber) : false;
|
|
1271
1280
|
const queuedForDrop = tag ? pendingDropTagNumbers.has(tag.tagNumber) : false;
|
|
1272
|
-
const uTokens =
|
|
1281
|
+
const uTokens = reclaimableTailTokens({
|
|
1282
|
+
kind: prior.kind,
|
|
1283
|
+
tokens: prior.tokens,
|
|
1284
|
+
tagStatus: tag?.status,
|
|
1285
|
+
protected: protectedPart,
|
|
1286
|
+
queuedForDrop
|
|
1287
|
+
});
|
|
1273
1288
|
const measured = prior.tagNumber === (tag?.tagNumber ?? null) && prior.tagStatus === (tag?.status ?? null) && prior.protected === protectedPart && prior.queuedForDrop === queuedForDrop && prior.uTokens === uTokens ? prior : {
|
|
1274
1289
|
...prior,
|
|
1275
1290
|
tagNumber: tag?.tagNumber ?? null,
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
rawMessageWorkerSource2,
|
|
20
20
|
rawMessageOffThreadRangeReader2,
|
|
21
21
|
readRawSessionMessageIdOrdinalsForRange2
|
|
22
|
-
} from "./server-
|
|
22
|
+
} from "./server-axmk8rr2.js";
|
|
23
23
|
import {
|
|
24
24
|
readV2ArchiveOffThread2
|
|
25
|
-
} from "./server-
|
|
25
|
+
} from "./server-h8y2948e.js";
|
|
26
26
|
|
|
27
27
|
// src/tools/ctx-expand/search-archive.ts
|
|
28
28
|
var archiveReadsOnThisThread = 0;
|
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.69",
|
|
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-wv122q62.js");
|
|
8200
8200
|
setHarness2("opencode2");
|
|
8201
8201
|
bindStaleBuildNotice({}, import.meta.url, "opencode2");
|
|
8202
8202
|
const duties = await registerContext(context);
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
releaseCompartmentLeaseBestEffort,
|
|
12
12
|
getCompartments,
|
|
13
13
|
getLastCompartmentEndMessage
|
|
14
|
-
} from "./server-
|
|
14
|
+
} from "./server-vzrj39bj.js";
|
|
15
15
|
import"./server-2amn2s73.js";
|
|
16
16
|
import"./server-y8xjr8rx.js";
|
|
17
17
|
import"./server-x6fn9x8q.js";
|
|
@@ -24,7 +24,7 @@ import"./server-1d042x6w.js";
|
|
|
24
24
|
import"./server-6ash6z8z.js";
|
|
25
25
|
import"./server-ds8vpfkr.js";
|
|
26
26
|
import"./server-8pdfmc27.js";
|
|
27
|
-
import"./server-
|
|
27
|
+
import"./server-07z334y6.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-
|
|
35
|
+
} from "./server-vqkqv7ze.js";
|
|
36
36
|
import"./server-xepx8t43.js";
|
|
37
|
-
import"./server-
|
|
37
|
+
import"./server-nc4qrjde.js";
|
|
38
38
|
import"./server-1zx87sdm.js";
|
|
39
39
|
import"./server-rz6g5xne.js";
|
|
40
40
|
import"./server-2ra6pwf3.js";
|
|
41
41
|
import"./server-3ap5dmhc.js";
|
|
42
42
|
import {
|
|
43
43
|
prepareRawSessionOrdinals2
|
|
44
|
-
} from "./server-
|
|
44
|
+
} from "./server-axmk8rr2.js";
|
|
45
45
|
import"./server-fr0wbhdn.js";
|
|
46
46
|
import"./server-jn4pktdk.js";
|
|
47
47
|
import"./server-afsz3cmx.js";
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
registerActiveCompartmentRun,
|
|
64
64
|
setRecompStarting2,
|
|
65
65
|
setRecompTerminal2
|
|
66
|
-
} from "./server-
|
|
66
|
+
} from "./server-ssdfdrpv.js";
|
|
67
67
|
import"./server-qt1qqasc.js";
|
|
68
68
|
import"./server-z5255w05.js";
|
|
69
69
|
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-rzxzap49.js";
|
|
4
|
+
import"./index-cdyhpdqx.js";
|
|
5
|
+
import"./index-gvnt9yka.js";
|
|
6
6
|
import"./index-832w615x.js";
|
|
7
7
|
import"./index-sd3egckz.js";
|
|
8
8
|
import"./index-n6aye6ny.js";
|
|
@@ -10,16 +10,16 @@ import"./index-zxj39ba2.js";
|
|
|
10
10
|
import"./index-jjvbk92s.js";
|
|
11
11
|
import"./index-gq1g9a3a.js";
|
|
12
12
|
import"./index-4dhv7mqz.js";
|
|
13
|
-
import"./index-
|
|
13
|
+
import"./index-y664y8kq.js";
|
|
14
14
|
import"./index-tebcx987.js";
|
|
15
|
-
import"./index-
|
|
15
|
+
import"./index-5hc4kjg0.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-fm0bpxc6.js";
|
|
22
|
+
import"./index-mxjdj2cz.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-fcrp1k8s.js";
|
|
33
33
|
import"./index-fb3zxn06.js";
|
|
34
34
|
import"./index-xx05vta0.js";
|
|
35
35
|
import"./index-fr0wbhdn.js";
|
package/package.json
CHANGED