@cortexkit/opencode-magic-context 0.49.73 → 0.49.75
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/{context-641fmxg4.js → context-966c0vdq.js} +73 -5
- package/dist/{index-t74kawez.js → index-6qqc8ef2.js} +7 -3
- package/dist/index.js +3 -3
- package/dist/v2/{context-4rmbpek8.js → context-f4v3ptyh.js} +82 -10
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/generate.d.ts +1 -0
- package/dist/v2/hooks/generate.d.ts.map +1 -1
- package/dist/v2/server.js +2 -2
- package/package.json +1 -1
|
@@ -130,7 +130,7 @@ import {
|
|
|
130
130
|
applyJsonSchemaParameterDescriptions,
|
|
131
131
|
MagicContextRpcServer,
|
|
132
132
|
subagentTemperature
|
|
133
|
-
} from "./index-
|
|
133
|
+
} from "./index-6qqc8ef2.js";
|
|
134
134
|
import {
|
|
135
135
|
resolveHistorianModel2
|
|
136
136
|
} from "./index-5kym00ag.js";
|
|
@@ -5492,6 +5492,67 @@ function createV2EmbeddingScope(initialProject) {
|
|
|
5492
5492
|
}
|
|
5493
5493
|
|
|
5494
5494
|
// src/v2/hooks/generate.ts
|
|
5495
|
+
import { createHash as createHash2 } from "node:crypto";
|
|
5496
|
+
var typedArrayName = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype), Symbol.toStringTag)?.get;
|
|
5497
|
+
function hostPrefixDigest(messages, end) {
|
|
5498
|
+
const hash = createHash2("sha256");
|
|
5499
|
+
const header = Buffer.allocUnsafe(9);
|
|
5500
|
+
const number = Buffer.allocUnsafe(8);
|
|
5501
|
+
const mark = (type, length = 0) => {
|
|
5502
|
+
header[0] = type.charCodeAt(0);
|
|
5503
|
+
header.writeDoubleLE(length, 1);
|
|
5504
|
+
hash.update(header);
|
|
5505
|
+
};
|
|
5506
|
+
const text = (type, value) => {
|
|
5507
|
+
mark(type, value.length * 2);
|
|
5508
|
+
hash.update(value, "utf16le");
|
|
5509
|
+
};
|
|
5510
|
+
const visit = (value) => {
|
|
5511
|
+
if (typeof value === "string") {
|
|
5512
|
+
text("s", value);
|
|
5513
|
+
} else if (typeof value === "number") {
|
|
5514
|
+
mark("n", number.length);
|
|
5515
|
+
number.writeDoubleLE(value);
|
|
5516
|
+
hash.update(number);
|
|
5517
|
+
} else if (typeof value === "boolean") {
|
|
5518
|
+
mark(value ? "t" : "f");
|
|
5519
|
+
} else if (value === null) {
|
|
5520
|
+
mark("0");
|
|
5521
|
+
} else if (value === undefined) {
|
|
5522
|
+
mark("u");
|
|
5523
|
+
} else if (ArrayBuffer.isView(value)) {
|
|
5524
|
+
mark("v", value.byteLength);
|
|
5525
|
+
text("s", typedArrayName?.call(value) ?? "DataView");
|
|
5526
|
+
hash.update(new Uint8Array(value.buffer, value.byteOffset, value.byteLength));
|
|
5527
|
+
} else if (value instanceof ArrayBuffer) {
|
|
5528
|
+
mark("b", value.byteLength);
|
|
5529
|
+
hash.update(new Uint8Array(value));
|
|
5530
|
+
} else if (Array.isArray(value)) {
|
|
5531
|
+
mark("a", value.length);
|
|
5532
|
+
for (let index = 0;index < value.length; index++) {
|
|
5533
|
+
if (Object.hasOwn(value, index))
|
|
5534
|
+
visit(value[index]);
|
|
5535
|
+
else
|
|
5536
|
+
mark("h");
|
|
5537
|
+
}
|
|
5538
|
+
} else if (typeof value === "object") {
|
|
5539
|
+
const entries = Object.entries(value);
|
|
5540
|
+
mark("o", entries.length);
|
|
5541
|
+
for (const [key, child] of entries) {
|
|
5542
|
+
text("s", key);
|
|
5543
|
+
visit(child);
|
|
5544
|
+
}
|
|
5545
|
+
} else if (typeof value === "bigint") {
|
|
5546
|
+
text("i", value.toString());
|
|
5547
|
+
} else {
|
|
5548
|
+
mark(typeof value === "function" ? "x" : "y");
|
|
5549
|
+
}
|
|
5550
|
+
};
|
|
5551
|
+
mark("a", end);
|
|
5552
|
+
for (let index = 0;index < end; index++)
|
|
5553
|
+
visit(messages[index]);
|
|
5554
|
+
return hash.digest("hex");
|
|
5555
|
+
}
|
|
5495
5556
|
function generateReplayAnchor(messages) {
|
|
5496
5557
|
let index = messages.length - 1;
|
|
5497
5558
|
while (index >= 0 && !messages[index]?.id)
|
|
@@ -5501,7 +5562,11 @@ function generateReplayAnchor(messages) {
|
|
|
5501
5562
|
const id = messages.at(index)?.id;
|
|
5502
5563
|
if (!id)
|
|
5503
5564
|
return;
|
|
5504
|
-
return {
|
|
5565
|
+
return {
|
|
5566
|
+
id,
|
|
5567
|
+
prefixDigest: hostPrefixDigest(messages, index),
|
|
5568
|
+
tail: clonePreservingInstances(messages.slice(index + 1))
|
|
5569
|
+
};
|
|
5505
5570
|
}
|
|
5506
5571
|
var DEFAULT_GENERATE_REPLAY_LIMITS = Object.freeze({
|
|
5507
5572
|
maxSessions: 16,
|
|
@@ -5588,6 +5653,8 @@ class V2GenerateReplay {
|
|
|
5588
5653
|
const end = index + 1 + prefix.anchor.tail.length;
|
|
5589
5654
|
if (JSON.stringify(draft.messages.slice(index + 1, end)) !== JSON.stringify(prefix.anchor.tail))
|
|
5590
5655
|
return skip("anchor-tail-mismatch");
|
|
5656
|
+
if (hostPrefixDigest(draft.messages, index) !== prefix.anchor.prefixDigest)
|
|
5657
|
+
return skip("history-mismatch");
|
|
5591
5658
|
const tail = draft.messages.slice(end);
|
|
5592
5659
|
draft.messages.splice(0, draft.messages.length, ...clonePreservingInstances(prefix.messages), ...tail);
|
|
5593
5660
|
draft.system.splice(0, draft.system.length, ...clonePreservingInstances(prefix.system));
|
|
@@ -5606,9 +5673,9 @@ function hiddenTerminalError(event) {
|
|
|
5606
5673
|
}
|
|
5607
5674
|
|
|
5608
5675
|
// src/v2/hooks/lkg-system.ts
|
|
5609
|
-
import { createHash as
|
|
5676
|
+
import { createHash as createHash3 } from "node:crypto";
|
|
5610
5677
|
function identity2(slot) {
|
|
5611
|
-
return
|
|
5678
|
+
return createHash3("sha256").update(JSON.stringify({
|
|
5612
5679
|
capturedAt: slot.capturedAt,
|
|
5613
5680
|
captureSequence: slot.captureSequence,
|
|
5614
5681
|
rowVersion: slot.rowVersion,
|
|
@@ -7321,6 +7388,7 @@ async function registerContext(context) {
|
|
|
7321
7388
|
nativeFoldReplay?.onEvent(event);
|
|
7322
7389
|
restoredRows.forget(sessionID);
|
|
7323
7390
|
messageTimesCache.delete(sessionID);
|
|
7391
|
+
generateReplay.forget(sessionID);
|
|
7324
7392
|
}
|
|
7325
7393
|
if (event.type === "session.step.started" || event.type === "session.step.ended" || event.type === "session.step.failed") {
|
|
7326
7394
|
const messageID = event.data.assistantMessageID;
|
|
@@ -8278,7 +8346,7 @@ async function registerContext(context) {
|
|
|
8278
8346
|
};
|
|
8279
8347
|
await context.session.hook("context", (draft) => withSqliteTransformPass2(async () => {
|
|
8280
8348
|
hostFoldIdle?.active(draft.sessionID);
|
|
8281
|
-
const anchor = generateReplayAnchor(draft.messages);
|
|
8349
|
+
const anchor = compactionOff ? undefined : generateReplayAnchor(draft.messages);
|
|
8282
8350
|
beginServedRequest(draft.sessionID);
|
|
8283
8351
|
let returned = false;
|
|
8284
8352
|
try {
|
|
@@ -9727,7 +9727,7 @@ async function applyParsedVerifyManifest(args, batch, parsed, headAtPrompt, budg
|
|
|
9727
9727
|
const verifiedHead = headAtPrompt === undefined ? await readGitHead(args.sessionDirectory) : headAtPrompt;
|
|
9728
9728
|
const writes = [];
|
|
9729
9729
|
let refused = 0;
|
|
9730
|
-
|
|
9730
|
+
let skipped = valid.skipped.length;
|
|
9731
9731
|
for (const v of valid.verified) {
|
|
9732
9732
|
const files = await normalizeFiles(args, v.files);
|
|
9733
9733
|
writes.push({ kind: "verify", id: v.id, files });
|
|
@@ -9841,6 +9841,12 @@ async function applyParsedVerifyManifest(args, batch, parsed, headAtPrompt, budg
|
|
|
9841
9841
|
const memory = getMemoryById2(args.db, w.id);
|
|
9842
9842
|
if (!isPrimaryMutable(memory))
|
|
9843
9843
|
continue;
|
|
9844
|
+
if (memory.content !== batchById.get(w.id)?.content) {
|
|
9845
|
+
log2(`[dreamer] verify skipped: memory_id=${w.id} verdict=${w.kind} reason=content-changed-since-prompt`);
|
|
9846
|
+
if (w.kind === "skip")
|
|
9847
|
+
skipped -= 1;
|
|
9848
|
+
continue;
|
|
9849
|
+
}
|
|
9844
9850
|
if (w.kind === "verify") {
|
|
9845
9851
|
recordMemoryVerifications(args.db, w.id, w.files, now);
|
|
9846
9852
|
updateMemoryVerification2(args.db, w.id, "verified");
|
|
@@ -9850,8 +9856,6 @@ async function applyParsedVerifyManifest(args, batch, parsed, headAtPrompt, budg
|
|
|
9850
9856
|
recordVerifiedCommit(args.db, verifiedMemory, now, verifiedHead);
|
|
9851
9857
|
verified += 1;
|
|
9852
9858
|
} else if (w.kind === "skip") {
|
|
9853
|
-
if (memory.content !== batchById.get(w.id)?.content)
|
|
9854
|
-
continue;
|
|
9855
9859
|
updateMemoryVerification2(args.db, w.id, "unverified");
|
|
9856
9860
|
recordVerificationVerdict(args.db, memory, "skip", now, w.fingerprint);
|
|
9857
9861
|
} else if (w.kind === "update") {
|
package/dist/index.js
CHANGED
|
@@ -145,7 +145,7 @@ import {
|
|
|
145
145
|
parameterDescriptionsFor,
|
|
146
146
|
MagicContextRpcServer,
|
|
147
147
|
applyHiddenSubagentTemperature
|
|
148
|
-
} from "./index-
|
|
148
|
+
} from "./index-6qqc8ef2.js";
|
|
149
149
|
import {
|
|
150
150
|
resolveOpenCodeDbPath,
|
|
151
151
|
openCodeDbPathExists,
|
|
@@ -8205,7 +8205,7 @@ var require_src2 = __commonJS(function(exports, module) {
|
|
|
8205
8205
|
// package.json
|
|
8206
8206
|
var package_default = {
|
|
8207
8207
|
name: "@cortexkit/opencode-magic-context",
|
|
8208
|
-
version: "0.49.
|
|
8208
|
+
version: "0.49.75",
|
|
8209
8209
|
type: "module",
|
|
8210
8210
|
description: "OpenCode plugin for Magic Context — cross-session memory and context management",
|
|
8211
8211
|
main: "dist/index.js",
|
|
@@ -12085,7 +12085,7 @@ async function setup(context) {
|
|
|
12085
12085
|
if (claimStorageBackupWarningCheck() && isMagicContextStorageOutsideEngram(storageDir)) {
|
|
12086
12086
|
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.`);
|
|
12087
12087
|
}
|
|
12088
|
-
const { registerContext } = await import("./context-
|
|
12088
|
+
const { registerContext } = await import("./context-966c0vdq.js");
|
|
12089
12089
|
setHarness2("opencode2");
|
|
12090
12090
|
bindStaleBuildNotice({}, import.meta.url, "opencode2");
|
|
12091
12091
|
const duties = await registerContext(context);
|
|
@@ -38536,7 +38536,7 @@ async function applyParsedVerifyManifest(args, batch, parsed, headAtPrompt, budg
|
|
|
38536
38536
|
const verifiedHead = headAtPrompt === undefined ? await readGitHead(args.sessionDirectory) : headAtPrompt;
|
|
38537
38537
|
const writes = [];
|
|
38538
38538
|
let refused = 0;
|
|
38539
|
-
|
|
38539
|
+
let skipped = valid.skipped.length;
|
|
38540
38540
|
for (const v of valid.verified) {
|
|
38541
38541
|
const files = await normalizeFiles(args, v.files);
|
|
38542
38542
|
writes.push({ kind: "verify", id: v.id, files });
|
|
@@ -38650,6 +38650,12 @@ async function applyParsedVerifyManifest(args, batch, parsed, headAtPrompt, budg
|
|
|
38650
38650
|
const memory = getMemoryById2(args.db, w.id);
|
|
38651
38651
|
if (!isPrimaryMutable(memory))
|
|
38652
38652
|
continue;
|
|
38653
|
+
if (memory.content !== batchById.get(w.id)?.content) {
|
|
38654
|
+
log2(`[dreamer] verify skipped: memory_id=${w.id} verdict=${w.kind} reason=content-changed-since-prompt`);
|
|
38655
|
+
if (w.kind === "skip")
|
|
38656
|
+
skipped -= 1;
|
|
38657
|
+
continue;
|
|
38658
|
+
}
|
|
38653
38659
|
if (w.kind === "verify") {
|
|
38654
38660
|
recordMemoryVerifications(args.db, w.id, w.files, now);
|
|
38655
38661
|
updateMemoryVerification2(args.db, w.id, "verified");
|
|
@@ -38659,8 +38665,6 @@ async function applyParsedVerifyManifest(args, batch, parsed, headAtPrompt, budg
|
|
|
38659
38665
|
recordVerifiedCommit(args.db, verifiedMemory, now, verifiedHead);
|
|
38660
38666
|
verified += 1;
|
|
38661
38667
|
} else if (w.kind === "skip") {
|
|
38662
|
-
if (memory.content !== batchById.get(w.id)?.content)
|
|
38663
|
-
continue;
|
|
38664
38668
|
updateMemoryVerification2(args.db, w.id, "unverified");
|
|
38665
38669
|
recordVerificationVerdict(args.db, memory, "skip", now, w.fingerprint);
|
|
38666
38670
|
} else if (w.kind === "update") {
|
|
@@ -41460,6 +41464,67 @@ function createV2EmbeddingScope(initialProject) {
|
|
|
41460
41464
|
}
|
|
41461
41465
|
|
|
41462
41466
|
// src/v2/hooks/generate.ts
|
|
41467
|
+
import { createHash as createHash17 } from "node:crypto";
|
|
41468
|
+
var typedArrayName = Object.getOwnPropertyDescriptor(Object.getPrototypeOf(Uint8Array.prototype), Symbol.toStringTag)?.get;
|
|
41469
|
+
function hostPrefixDigest(messages, end) {
|
|
41470
|
+
const hash = createHash17("sha256");
|
|
41471
|
+
const header = Buffer.allocUnsafe(9);
|
|
41472
|
+
const number = Buffer.allocUnsafe(8);
|
|
41473
|
+
const mark = (type, length = 0) => {
|
|
41474
|
+
header[0] = type.charCodeAt(0);
|
|
41475
|
+
header.writeDoubleLE(length, 1);
|
|
41476
|
+
hash.update(header);
|
|
41477
|
+
};
|
|
41478
|
+
const text = (type, value) => {
|
|
41479
|
+
mark(type, value.length * 2);
|
|
41480
|
+
hash.update(value, "utf16le");
|
|
41481
|
+
};
|
|
41482
|
+
const visit = (value) => {
|
|
41483
|
+
if (typeof value === "string") {
|
|
41484
|
+
text("s", value);
|
|
41485
|
+
} else if (typeof value === "number") {
|
|
41486
|
+
mark("n", number.length);
|
|
41487
|
+
number.writeDoubleLE(value);
|
|
41488
|
+
hash.update(number);
|
|
41489
|
+
} else if (typeof value === "boolean") {
|
|
41490
|
+
mark(value ? "t" : "f");
|
|
41491
|
+
} else if (value === null) {
|
|
41492
|
+
mark("0");
|
|
41493
|
+
} else if (value === undefined) {
|
|
41494
|
+
mark("u");
|
|
41495
|
+
} else if (ArrayBuffer.isView(value)) {
|
|
41496
|
+
mark("v", value.byteLength);
|
|
41497
|
+
text("s", typedArrayName?.call(value) ?? "DataView");
|
|
41498
|
+
hash.update(new Uint8Array(value.buffer, value.byteOffset, value.byteLength));
|
|
41499
|
+
} else if (value instanceof ArrayBuffer) {
|
|
41500
|
+
mark("b", value.byteLength);
|
|
41501
|
+
hash.update(new Uint8Array(value));
|
|
41502
|
+
} else if (Array.isArray(value)) {
|
|
41503
|
+
mark("a", value.length);
|
|
41504
|
+
for (let index = 0;index < value.length; index++) {
|
|
41505
|
+
if (Object.hasOwn(value, index))
|
|
41506
|
+
visit(value[index]);
|
|
41507
|
+
else
|
|
41508
|
+
mark("h");
|
|
41509
|
+
}
|
|
41510
|
+
} else if (typeof value === "object") {
|
|
41511
|
+
const entries = Object.entries(value);
|
|
41512
|
+
mark("o", entries.length);
|
|
41513
|
+
for (const [key, child] of entries) {
|
|
41514
|
+
text("s", key);
|
|
41515
|
+
visit(child);
|
|
41516
|
+
}
|
|
41517
|
+
} else if (typeof value === "bigint") {
|
|
41518
|
+
text("i", value.toString());
|
|
41519
|
+
} else {
|
|
41520
|
+
mark(typeof value === "function" ? "x" : "y");
|
|
41521
|
+
}
|
|
41522
|
+
};
|
|
41523
|
+
mark("a", end);
|
|
41524
|
+
for (let index = 0;index < end; index++)
|
|
41525
|
+
visit(messages[index]);
|
|
41526
|
+
return hash.digest("hex");
|
|
41527
|
+
}
|
|
41463
41528
|
function generateReplayAnchor(messages) {
|
|
41464
41529
|
let index = messages.length - 1;
|
|
41465
41530
|
while (index >= 0 && !messages[index]?.id)
|
|
@@ -41469,7 +41534,11 @@ function generateReplayAnchor(messages) {
|
|
|
41469
41534
|
const id = messages.at(index)?.id;
|
|
41470
41535
|
if (!id)
|
|
41471
41536
|
return;
|
|
41472
|
-
return {
|
|
41537
|
+
return {
|
|
41538
|
+
id,
|
|
41539
|
+
prefixDigest: hostPrefixDigest(messages, index),
|
|
41540
|
+
tail: clonePreservingInstances(messages.slice(index + 1))
|
|
41541
|
+
};
|
|
41473
41542
|
}
|
|
41474
41543
|
var DEFAULT_GENERATE_REPLAY_LIMITS = Object.freeze({
|
|
41475
41544
|
maxSessions: 16,
|
|
@@ -41556,6 +41625,8 @@ class V2GenerateReplay {
|
|
|
41556
41625
|
const end = index + 1 + prefix.anchor.tail.length;
|
|
41557
41626
|
if (JSON.stringify(draft.messages.slice(index + 1, end)) !== JSON.stringify(prefix.anchor.tail))
|
|
41558
41627
|
return skip("anchor-tail-mismatch");
|
|
41628
|
+
if (hostPrefixDigest(draft.messages, index) !== prefix.anchor.prefixDigest)
|
|
41629
|
+
return skip("history-mismatch");
|
|
41559
41630
|
const tail = draft.messages.slice(end);
|
|
41560
41631
|
draft.messages.splice(0, draft.messages.length, ...clonePreservingInstances(prefix.messages), ...tail);
|
|
41561
41632
|
draft.system.splice(0, draft.system.length, ...clonePreservingInstances(prefix.system));
|
|
@@ -41574,9 +41645,9 @@ function hiddenTerminalError(event) {
|
|
|
41574
41645
|
}
|
|
41575
41646
|
|
|
41576
41647
|
// src/v2/hooks/lkg-system.ts
|
|
41577
|
-
import { createHash as
|
|
41648
|
+
import { createHash as createHash18 } from "node:crypto";
|
|
41578
41649
|
function identity2(slot) {
|
|
41579
|
-
return
|
|
41650
|
+
return createHash18("sha256").update(JSON.stringify({
|
|
41580
41651
|
capturedAt: slot.capturedAt,
|
|
41581
41652
|
captureSequence: slot.captureSequence,
|
|
41582
41653
|
rowVersion: slot.rowVersion,
|
|
@@ -55862,7 +55933,7 @@ function formatCtxReduceReply(stampedCount, selfStampCount = 0) {
|
|
|
55862
55933
|
return parts.join(" ");
|
|
55863
55934
|
}
|
|
55864
55935
|
// src/tools/ctx-reduce/tools.ts
|
|
55865
|
-
import { createHash as
|
|
55936
|
+
import { createHash as createHash19 } from "node:crypto";
|
|
55866
55937
|
|
|
55867
55938
|
// src/features/magic-context/range-parser.ts
|
|
55868
55939
|
function parseRangeString(input) {
|
|
@@ -55925,11 +55996,11 @@ function createCtxReduceTool(deps) {
|
|
|
55925
55996
|
const stableId = `oc-${sessionId}-${callId}`;
|
|
55926
55997
|
if (Buffer.byteLength(stableId) <= 128)
|
|
55927
55998
|
return stableId;
|
|
55928
|
-
return `oc-${
|
|
55999
|
+
return `oc-${createHash19("sha256").update(stableId).digest("hex")}`;
|
|
55929
56000
|
}
|
|
55930
56001
|
fallbackCommandSequence += 1;
|
|
55931
56002
|
const monotonicId = `oc-${sessionId}-${fallbackCommandSequence}`;
|
|
55932
|
-
return Buffer.byteLength(monotonicId) <= 128 ? monotonicId : `oc-${
|
|
56003
|
+
return Buffer.byteLength(monotonicId) <= 128 ? monotonicId : `oc-${createHash19("sha256").update(monotonicId).digest("hex")}`;
|
|
55933
56004
|
};
|
|
55934
56005
|
return tool({
|
|
55935
56006
|
description: CTX_REDUCE_DESCRIPTION,
|
|
@@ -57582,6 +57653,7 @@ async function registerContext(context) {
|
|
|
57582
57653
|
nativeFoldReplay?.onEvent(event);
|
|
57583
57654
|
restoredRows.forget(sessionID);
|
|
57584
57655
|
messageTimesCache.delete(sessionID);
|
|
57656
|
+
generateReplay.forget(sessionID);
|
|
57585
57657
|
}
|
|
57586
57658
|
if (event.type === "session.step.started" || event.type === "session.step.ended" || event.type === "session.step.failed") {
|
|
57587
57659
|
const messageID = event.data.assistantMessageID;
|
|
@@ -58539,7 +58611,7 @@ async function registerContext(context) {
|
|
|
58539
58611
|
};
|
|
58540
58612
|
await context.session.hook("context", (draft) => withSqliteTransformPass2(async () => {
|
|
58541
58613
|
hostFoldIdle?.active(draft.sessionID);
|
|
58542
|
-
const anchor = generateReplayAnchor(draft.messages);
|
|
58614
|
+
const anchor = compactionOff ? undefined : generateReplayAnchor(draft.messages);
|
|
58543
58615
|
beginServedRequest(draft.sessionID);
|
|
58544
58616
|
let returned = false;
|
|
58545
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GAeG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,EAAE,cAAc,GAAG,IAAI,CAqBnE;AAED;;;;;GAKG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,cAAc,GAAG,uBAAuB,CAE7F;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAsB,mBAAmB,CACrC,YAAY,EAAE,IAAI,CAAC,UAAU,CAAC,OAAO,6BAA6B,CAAC,EAAE,SAAS,CAAC,EAC/E,KAAK,EAAE,IAAI,CAAC,cAAc,EAAE,WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC,GACrF,OAAO,CAAC,IAAI,CAAC,CAwCf;AAyBD,wBAAsB,eAAe,CAAC,OAAO,EAAE,SAAS;;eAuxFvD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/generate.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/generate.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzD,UAAU,oBAAoB;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,SAAS,EAAE,CAAC;CACrB;AAqED,kFAAkF;AAClF,wBAAgB,oBAAoB,CAAC,QAAQ,EAAE,SAAS,EAAE,GAAG,oBAAoB,GAAG,SAAS,CAW5F;AAaD,MAAM,WAAW,oBAAoB;IACjC,kFAAkF;IAClF,WAAW,EAAE,MAAM,CAAC;IACpB,iFAAiF;IACjF,eAAe,EAAE,MAAM,CAAC;IACxB,8DAA8D;IAC9D,aAAa,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;GAQG;AACH,eAAO,MAAM,8BAA8B,EAAE,QAAQ,CAAC,oBAAoB,CAIxE,CAAC;AAEH;;;;;;mFAMmF;AACnF,qBAAa,gBAAgB;IACzB,sEAAsE;IACtE,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAmC;IAC5D,OAAO,CAAC,UAAU,CAAK;IACvB,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiC;gBAE5C,MAAM,GAAE,oBAAqD;IAazE,OAAO,CAAC,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,oBAAoB,GAAG,SAAS,GAAG,IAAI;IAgD9E,MAAM,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI;IAO/B,6EAA6E;IAC7E,KAAK,IAAI;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,KAAK,CAAC;YAAE,SAAS,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAA;SAAE,CAAC,CAAA;KAAE;IAUtF,KAAK,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO;CA0CxC"}
|
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.75",
|
|
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-f4v3ptyh.js");
|
|
8200
8200
|
setHarness2("opencode2");
|
|
8201
8201
|
bindStaleBuildNotice({}, import.meta.url, "opencode2");
|
|
8202
8202
|
const duties = await registerContext(context);
|
package/package.json
CHANGED