@cortexkit/opencode-magic-context 0.33.0 → 0.33.1
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/config/schema/magic-context.d.ts +62 -22
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/{conflict-warning-hook-bwa99a04.js → conflict-warning-hook-n48c783v.js} +1 -1
- package/dist/features/magic-context/compaction-marker.d.ts +49 -0
- package/dist/features/magic-context/compaction-marker.d.ts.map +1 -1
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts +0 -2
- package/dist/features/magic-context/compartment-chunk-embedding.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/task-registry.d.ts +0 -1
- package/dist/features/magic-context/dreamer/task-registry.d.ts.map +1 -1
- package/dist/features/magic-context/git-commits/index.d.ts +2 -2
- package/dist/features/magic-context/git-commits/index.d.ts.map +1 -1
- package/dist/features/magic-context/git-commits/storage-git-commit-embeddings.d.ts +0 -2
- package/dist/features/magic-context/git-commits/storage-git-commit-embeddings.d.ts.map +1 -1
- package/dist/features/magic-context/git-commits/storage-git-commits.d.ts +0 -13
- package/dist/features/magic-context/git-commits/storage-git-commits.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding.d.ts +1 -2
- package/dist/features/magic-context/memory/embedding.d.ts.map +1 -1
- package/dist/features/magic-context/memory/memory-migration.d.ts +0 -6
- package/dist/features/magic-context/memory/memory-migration.d.ts.map +1 -1
- package/dist/features/magic-context/memory/storage-memory-embeddings.d.ts +0 -1
- package/dist/features/magic-context/memory/storage-memory-embeddings.d.ts.map +1 -1
- package/dist/features/magic-context/memory/storage-memory.d.ts +1 -6
- package/dist/features/magic-context/memory/storage-memory.d.ts.map +1 -1
- package/dist/features/magic-context/memory/verification-paths.d.ts +0 -1
- package/dist/features/magic-context/memory/verification-paths.d.ts.map +1 -1
- package/dist/features/magic-context/migrations.d.ts.map +1 -1
- package/dist/features/magic-context/mural/storage-mural.d.ts +0 -1
- package/dist/features/magic-context/mural/storage-mural.d.ts.map +1 -1
- package/dist/features/magic-context/project-embedding-registry.d.ts +16 -2
- package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/capabilities.d.ts +0 -2
- package/dist/features/magic-context/smart-notes/capabilities.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/compiler.d.ts +0 -1
- package/dist/features/magic-context/smart-notes/compiler.d.ts.map +1 -1
- package/dist/features/magic-context/smart-notes/types.d.ts +0 -16
- package/dist/features/magic-context/smart-notes/types.d.ts.map +1 -1
- package/dist/features/magic-context/storage-db.d.ts +1 -1
- package/dist/features/magic-context/storage-db.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-persisted.d.ts +0 -1
- package/dist/features/magic-context/storage-meta-persisted.d.ts.map +1 -1
- package/dist/features/magic-context/user-memory/storage-user-memory.d.ts +0 -2
- package/dist/features/magic-context/user-memory/storage-user-memory.d.ts.map +1 -1
- package/dist/hooks/auto-update-checker/types.d.ts +0 -3
- package/dist/hooks/auto-update-checker/types.d.ts.map +1 -1
- package/dist/hooks/magic-context/cache-busting-signals.d.ts +0 -1
- package/dist/hooks/magic-context/cache-busting-signals.d.ts.map +1 -1
- package/dist/hooks/magic-context/channel2-delivery.d.ts.map +1 -1
- package/dist/hooks/magic-context/compaction-marker-manager.d.ts +49 -0
- package/dist/hooks/magic-context/compaction-marker-manager.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-parser.d.ts +12 -0
- package/dist/hooks/magic-context/compartment-parser.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-mapping.d.ts +0 -12
- package/dist/hooks/magic-context/compartment-runner-mapping.d.ts.map +1 -1
- package/dist/hooks/magic-context/event-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/historian-prompt.generated.d.ts +1 -1
- package/dist/hooks/magic-context/historian-prompt.generated.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook-handlers.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts +9 -0
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/sentinel.d.ts +39 -0
- package/dist/hooks/magic-context/sentinel.d.ts.map +1 -1
- package/dist/hooks/magic-context/tag-messages.d.ts.map +1 -1
- package/dist/hooks/magic-context/tool-drop-target.d.ts +19 -0
- package/dist/hooks/magic-context/tool-drop-target.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/{index-kxz4tn6m.js → index-56yjaeb2.js} +56 -4
- package/dist/{index-h86twgsp.js → index-c2gahrks.js} +516 -177
- package/dist/{index-bmkea2dq.js → index-ey1bc14z.js} +36 -26
- package/dist/{index-k5y60ymm.js → index-xyaekybw.js} +21 -2
- package/dist/index.js +83 -23
- package/dist/plugin/hooks/create-session-hooks.d.ts +8 -8
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/{recomp-orchestrator-yh7pepvx.js → recomp-orchestrator-2yb2hfh2.js} +2 -3
- package/dist/shared/conflict-detector.d.ts.map +1 -1
- package/dist/shared/sqlite.d.ts +9 -4
- package/dist/shared/sqlite.d.ts.map +1 -1
- package/dist/{storage-meta-session-1phy0b1z.js → storage-meta-session-td6bwtky.js} +1 -1
- package/dist/{task-config-dn9k9szr.js → task-config-5nx3qfz8.js} +1 -2
- package/package.json +2 -2
- package/src/shared/conflict-detector.test.ts +130 -1
- package/src/shared/conflict-detector.ts +34 -2
- package/src/shared/sqlite.ts +13 -33
- package/dist/config/schema.d.ts +0 -3
- package/dist/config/schema.d.ts.map +0 -1
- package/dist/features/magic-context/plugin-messages.d.ts +0 -75
- package/dist/features/magic-context/plugin-messages.d.ts.map +0 -1
- package/dist/hooks/magic-context/compartment-runner-state-xml.d.ts +0 -21
- package/dist/hooks/magic-context/compartment-runner-state-xml.d.ts.map +0 -1
- package/dist/index-anhrfygk.js +0 -57
- package/dist/shared/opencode-compaction-detector.d.ts +0 -2
- package/dist/shared/opencode-compaction-detector.d.ts.map +0 -1
- package/dist/shared/transcript-opencode.d.ts +0 -71
- package/dist/shared/transcript-opencode.d.ts.map +0 -1
- package/dist/tools/index.d.ts +0 -6
- package/dist/tools/index.d.ts.map +0 -1
- package/src/shared/opencode-compaction-detector.test.ts +0 -239
- package/src/shared/opencode-compaction-detector.ts +0 -81
- package/src/shared/transcript-opencode.ts +0 -302
|
@@ -121,30 +121,11 @@ function buildNodeSqliteDatabaseClass(DatabaseSync) {
|
|
|
121
121
|
}
|
|
122
122
|
var Database = DatabaseImpl;
|
|
123
123
|
var privilegeDepth = new WeakMap;
|
|
124
|
-
var registeredPrivilegeFunctions = new WeakSet;
|
|
125
|
-
var privilegeUdfAvailable = new WeakSet;
|
|
126
|
-
function registerPrivilegedWriter(db) {
|
|
127
|
-
if (registeredPrivilegeFunctions.has(db))
|
|
128
|
-
return;
|
|
129
|
-
const native = db;
|
|
130
|
-
const implementation = () => (privilegeDepth.get(db) ?? 0) > 0 ? 1 : 0;
|
|
131
|
-
if (typeof native.function === "function") {
|
|
132
|
-
native.function("mc_privileged_writer", implementation);
|
|
133
|
-
} else if (typeof native.createFunction === "function") {
|
|
134
|
-
native.createFunction("mc_privileged_writer", implementation);
|
|
135
|
-
} else {
|
|
136
|
-
registeredPrivilegeFunctions.add(db);
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
privilegeUdfAvailable.add(db);
|
|
140
|
-
registeredPrivilegeFunctions.add(db);
|
|
141
|
-
}
|
|
142
124
|
function isInTransaction(db) {
|
|
143
125
|
const candidate = db;
|
|
144
126
|
return candidate.inTransaction === true || candidate.isTransaction === true;
|
|
145
127
|
}
|
|
146
128
|
function withPrivilegedWriter(db, operation) {
|
|
147
|
-
registerPrivilegedWriter(db);
|
|
148
129
|
const previousDepth = privilegeDepth.get(db) ?? 0;
|
|
149
130
|
const nested = isInTransaction(db);
|
|
150
131
|
const savepoint = "mc_privilege_scope";
|
|
@@ -155,11 +136,9 @@ function withPrivilegedWriter(db, operation) {
|
|
|
155
136
|
}
|
|
156
137
|
privilegeDepth.set(db, previousDepth + 1);
|
|
157
138
|
try {
|
|
158
|
-
|
|
159
|
-
db.prepare("INSERT INTO context_privilege_state(id, enabled) VALUES (1, 1) ON CONFLICT(id) DO UPDATE SET enabled = 1").run();
|
|
160
|
-
}
|
|
139
|
+
db.prepare("INSERT INTO context_privilege_state(id, enabled) VALUES (1, 1) ON CONFLICT(id) DO UPDATE SET enabled = 1").run();
|
|
161
140
|
const result = operation();
|
|
162
|
-
if (
|
|
141
|
+
if (previousDepth === 0) {
|
|
163
142
|
db.prepare("UPDATE context_privilege_state SET enabled = 0 WHERE id = 1").run();
|
|
164
143
|
}
|
|
165
144
|
if (nested) {
|
|
@@ -133427,6 +133406,27 @@ function setToolContent(part, content) {
|
|
|
133427
133406
|
part.content = content;
|
|
133428
133407
|
}
|
|
133429
133408
|
}
|
|
133409
|
+
function clonePart(part) {
|
|
133410
|
+
if (part === null || typeof part !== "object")
|
|
133411
|
+
return part;
|
|
133412
|
+
try {
|
|
133413
|
+
return structuredClone(part);
|
|
133414
|
+
} catch {
|
|
133415
|
+
try {
|
|
133416
|
+
return JSON.parse(JSON.stringify(part));
|
|
133417
|
+
} catch {
|
|
133418
|
+
return part;
|
|
133419
|
+
}
|
|
133420
|
+
}
|
|
133421
|
+
}
|
|
133422
|
+
function clampCloneInPlace(occurrence, clamp) {
|
|
133423
|
+
const clone = clonePart(occurrence.part);
|
|
133424
|
+
clamp(clone);
|
|
133425
|
+
const parts = occurrence.message.parts;
|
|
133426
|
+
const index = parts.indexOf(occurrence.part);
|
|
133427
|
+
if (index >= 0)
|
|
133428
|
+
parts[index] = clone;
|
|
133429
|
+
}
|
|
133430
133430
|
function truncateToolPart(part, tagId) {
|
|
133431
133431
|
if (!isRecord(part))
|
|
133432
133432
|
return;
|
|
@@ -133548,6 +133548,16 @@ function clearThinkingParts(thinkingParts) {
|
|
|
133548
133548
|
part.text = "[cleared]";
|
|
133549
133549
|
}
|
|
133550
133550
|
}
|
|
133551
|
+
function partHasCompletedResult(part) {
|
|
133552
|
+
if (!isRecord(part))
|
|
133553
|
+
return false;
|
|
133554
|
+
if (part.type === "tool") {
|
|
133555
|
+
if (!isRecord(part.state))
|
|
133556
|
+
return false;
|
|
133557
|
+
return typeof part.state.output === "string" || part.state.status === "error";
|
|
133558
|
+
}
|
|
133559
|
+
return part.type === "tool_result";
|
|
133560
|
+
}
|
|
133551
133561
|
function extractToolCallObservation(part) {
|
|
133552
133562
|
if (!isRecord(part))
|
|
133553
133563
|
return null;
|
|
@@ -133616,7 +133626,7 @@ function createToolDropTarget(compositeKey, thinkingParts, index, batch, tagId)
|
|
|
133616
133626
|
if (!entry.hasResult)
|
|
133617
133627
|
return "incomplete";
|
|
133618
133628
|
for (const occurrence of entry.occurrences) {
|
|
133619
|
-
|
|
133629
|
+
clampCloneInPlace(occurrence, (part) => truncateToolPart(part, tagId));
|
|
133620
133630
|
}
|
|
133621
133631
|
clearThinkingParts(thinkingParts);
|
|
133622
133632
|
return "truncated";
|
|
@@ -133628,7 +133638,7 @@ function createToolDropTarget(compositeKey, thinkingParts, index, batch, tagId)
|
|
|
133628
133638
|
if (!entry.hasResult)
|
|
133629
133639
|
return "incomplete";
|
|
133630
133640
|
for (const occurrence of entry.occurrences) {
|
|
133631
|
-
|
|
133641
|
+
clampCloneInPlace(occurrence, (part) => editMarkerToolPart(part, tagId));
|
|
133632
133642
|
}
|
|
133633
133643
|
clearThinkingParts(thinkingParts);
|
|
133634
133644
|
return "truncated";
|
|
@@ -135028,4 +135038,4 @@ function clearSession(db, sessionId) {
|
|
|
135028
135038
|
})();
|
|
135029
135039
|
}
|
|
135030
135040
|
|
|
135031
|
-
export { Database,
|
|
135041
|
+
export { Database, withPrivilegedWriter, closeQuietly, isRecord, clearCompressionDepth, clearCompressionDepthRange, ensureSessionMetaRow, persistCachedM0, clearCachedM0M1, openCodeDbExists, withReadOnlySessionDb, isMidTurn, getMessageTimesFromOpenCodeDb, findLastAssistantModelFromOpenCodeDb, textMentionsRecentCommit, hasMeaningfulUserText, extractTexts, extractToolCallSummaries, estimateTokens, normalizeText, isRawCompactionSummaryInfo, extractInMemoryMessageViews, buildInMemoryTailRawMessages, stripPersistedAssistantText, byteSize, stripTagPrefix, peelLeadingMcTagNotation, prependTag, isThinkingPart, isTextPart, isToolPartWithOutput, isFilePart, buildFileSourceContent, isEditTool, partHasCompletedResult, extractToolCallObservation, ToolMutationBatch, createToolDropTarget, setRawMessageProvider, cleanUserText, withRawSessionMessageCache, readRawSessionMessages, primeTailRawMessageCache, getCachedAbsoluteMessageCount, primeInMemoryTailRawMessageCache, readRawSessionMessageOrdinalPage, getRawSessionStoredMessageCount, readRawSessionMessagePartsById, readRawSessionMessageOrdinalById, readRawSessionMessageById, getRawSessionMessageCount, getRawSessionTagKeysThrough, getLegacyProtectedTailStartOrdinal, readSessionChunk, getMessageIndexSourceIdentity, isMessageIndexSourceCurrent, getLastIndexedOrdinal, getIndexedMessageCorpusSize, getMessageIndexReconciliationStartOrdinal, isMessageIndexReconciledThrough, deleteIndexedMessage, clearIndexedMessages, indexSingleMessage, indexMessagesAfterOrdinal, sweepOrphanedOpenCodeMessageIndexes, getOrCreateSessionMeta, updateSessionMeta, advanceToolReclaimWatermark, markSessionCleanupPending, retryPendingSessionCleanups, clearSession };
|
|
@@ -10,10 +10,11 @@ import {
|
|
|
10
10
|
|
|
11
11
|
// src/plugin/conflict-warning-hook.ts
|
|
12
12
|
import { existsSync as existsSync2, readFileSync as readFileSync2 } from "node:fs";
|
|
13
|
-
import { homedir as
|
|
13
|
+
import { homedir as homedir3, platform } from "node:os";
|
|
14
14
|
import { join as join3 } from "node:path";
|
|
15
15
|
|
|
16
16
|
// src/shared/conflict-detector.ts
|
|
17
|
+
import { homedir as homedir2 } from "node:os";
|
|
17
18
|
import { join as join2 } from "node:path";
|
|
18
19
|
|
|
19
20
|
// src/shared/jsonc-parser.ts
|
|
@@ -342,6 +343,24 @@ function readOmoDisabledHooks(directory) {
|
|
|
342
343
|
}
|
|
343
344
|
}
|
|
344
345
|
}
|
|
346
|
+
const homeDir = process.env.HOME || homedir2();
|
|
347
|
+
const omoHomeDir = join2(homeDir, ".omo");
|
|
348
|
+
for (const name of ["omo.jsonc", "omo.json"]) {
|
|
349
|
+
const config = readJsoncFile(join2(omoHomeDir, name));
|
|
350
|
+
if (config?.["[opencode]"]?.disabled_hooks) {
|
|
351
|
+
for (const hook of config["[opencode]"].disabled_hooks) {
|
|
352
|
+
disabled.add(hook);
|
|
353
|
+
}
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
for (const name of ["omo.jsonc", "omo.json"]) {
|
|
357
|
+
const config = readJsoncFile(join2(directory, ".omo", name));
|
|
358
|
+
if (config?.["[opencode]"]?.disabled_hooks) {
|
|
359
|
+
for (const hook of config["[opencode]"].disabled_hooks) {
|
|
360
|
+
disabled.add(hook);
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
}
|
|
345
364
|
return disabled;
|
|
346
365
|
}
|
|
347
366
|
function formatConflictShort(result) {
|
|
@@ -365,7 +384,7 @@ var ENABLED_MARKER = "✨ Magic Context is now enabled";
|
|
|
365
384
|
var ANNOUNCEMENT_MARKER = "✨ Magic Context — what's new in";
|
|
366
385
|
function getDesktopStatePath() {
|
|
367
386
|
const os = platform();
|
|
368
|
-
const home =
|
|
387
|
+
const home = homedir3();
|
|
369
388
|
if (os === "darwin") {
|
|
370
389
|
return join3(home, "Library", "Application Support", "ai.opencode.desktop", "opencode.global.dat");
|
|
371
390
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
|
+
CANONICAL_DREAM_TASKS,
|
|
2
3
|
buildDreamTaskRuntimeConfigs,
|
|
4
|
+
compareTaskOrder,
|
|
5
|
+
isCanonicalDreamTask,
|
|
6
|
+
leaseKeyFor,
|
|
7
|
+
leaseKindFor,
|
|
3
8
|
userMemoryCollectionEnabled
|
|
4
|
-
} from "./index-
|
|
9
|
+
} from "./index-56yjaeb2.js";
|
|
5
10
|
import {
|
|
6
11
|
AGE_RECLAIM_MIN_TOKENS,
|
|
7
12
|
AdmissionClass,
|
|
@@ -345,7 +350,7 @@ import {
|
|
|
345
350
|
upsertCommits,
|
|
346
351
|
verificationFileExists,
|
|
347
352
|
withContentLanguageDirective
|
|
348
|
-
} from "./index-
|
|
353
|
+
} from "./index-c2gahrks.js";
|
|
349
354
|
import {
|
|
350
355
|
deriveHistorianChunkTokens,
|
|
351
356
|
deriveTriggerBudget,
|
|
@@ -355,13 +360,6 @@ import {
|
|
|
355
360
|
refreshModelLimitsFromApi,
|
|
356
361
|
resolveHistorianContextLimit
|
|
357
362
|
} from "./index-63dq2g4d.js";
|
|
358
|
-
import {
|
|
359
|
-
CANONICAL_DREAM_TASKS,
|
|
360
|
-
compareTaskOrder,
|
|
361
|
-
isCanonicalDreamTask,
|
|
362
|
-
leaseKeyFor,
|
|
363
|
-
leaseKindFor
|
|
364
|
-
} from "./index-anhrfygk.js";
|
|
365
363
|
import {
|
|
366
364
|
modelBodyField,
|
|
367
365
|
resolveFallbackChain
|
|
@@ -414,6 +412,7 @@ import {
|
|
|
414
412
|
markSessionCleanupPending,
|
|
415
413
|
normalizeText,
|
|
416
414
|
openCodeDbExists,
|
|
415
|
+
partHasCompletedResult,
|
|
417
416
|
prependTag,
|
|
418
417
|
primeInMemoryTailRawMessageCache,
|
|
419
418
|
primeTailRawMessageCache,
|
|
@@ -432,7 +431,7 @@ import {
|
|
|
432
431
|
updateSessionMeta,
|
|
433
432
|
withRawSessionMessageCache,
|
|
434
433
|
withReadOnlySessionDb
|
|
435
|
-
} from "./index-
|
|
434
|
+
} from "./index-ey1bc14z.js";
|
|
436
435
|
import {
|
|
437
436
|
cleanupConflictWarnings,
|
|
438
437
|
detectConfigFile,
|
|
@@ -440,7 +439,7 @@ import {
|
|
|
440
439
|
parseJsonc,
|
|
441
440
|
sendConflictWarning,
|
|
442
441
|
stripJsonComments
|
|
443
|
-
} from "./index-
|
|
442
|
+
} from "./index-xyaekybw.js";
|
|
444
443
|
import {
|
|
445
444
|
ANNOUNCEMENT_FEATURES,
|
|
446
445
|
ANNOUNCEMENT_FOOTER,
|
|
@@ -21390,6 +21389,35 @@ ${body}${hintText}
|
|
|
21390
21389
|
}
|
|
21391
21390
|
|
|
21392
21391
|
// src/hooks/magic-context/channel2-delivery.ts
|
|
21392
|
+
function subagentRunIsActive(deps, sessionId) {
|
|
21393
|
+
try {
|
|
21394
|
+
const meta = getOrCreateSessionMeta(deps.db, sessionId);
|
|
21395
|
+
if (!meta.isSubagent)
|
|
21396
|
+
return true;
|
|
21397
|
+
return isMidTurn(deps, sessionId);
|
|
21398
|
+
} catch (error) {
|
|
21399
|
+
sessionLog(sessionId, "channel2 subagent run-state check failed; refusing delivery:", error);
|
|
21400
|
+
return false;
|
|
21401
|
+
}
|
|
21402
|
+
}
|
|
21403
|
+
function clearPendingChannel2Intent(db, sessionId) {
|
|
21404
|
+
try {
|
|
21405
|
+
if (casChannel2NudgeState(db, sessionId, "pending", "")) {
|
|
21406
|
+
sessionLog(sessionId, "channel2 intent cleared because the subagent run is terminal");
|
|
21407
|
+
}
|
|
21408
|
+
} catch (error) {
|
|
21409
|
+
sessionLog(sessionId, "channel2 terminal-run intent clear failed; leaving lease to heal:", error);
|
|
21410
|
+
}
|
|
21411
|
+
}
|
|
21412
|
+
function releaseClaimWithoutDelivery(db, sessionId, claimToken) {
|
|
21413
|
+
try {
|
|
21414
|
+
if (casChannel2NudgeClaim(db, sessionId, "", claimToken)) {
|
|
21415
|
+
sessionLog(sessionId, "channel2 claim released because the subagent run completed before delivery");
|
|
21416
|
+
}
|
|
21417
|
+
} catch (error) {
|
|
21418
|
+
sessionLog(sessionId, "channel2 terminal-run claim release failed; lease will heal:", error);
|
|
21419
|
+
}
|
|
21420
|
+
}
|
|
21393
21421
|
async function maybeDeliverChannel2(sessionId, deps) {
|
|
21394
21422
|
let state;
|
|
21395
21423
|
try {
|
|
@@ -21399,6 +21427,10 @@ async function maybeDeliverChannel2(sessionId, deps) {
|
|
|
21399
21427
|
}
|
|
21400
21428
|
if (state !== "pending")
|
|
21401
21429
|
return false;
|
|
21430
|
+
if (!subagentRunIsActive(deps, sessionId)) {
|
|
21431
|
+
clearPendingChannel2Intent(deps.db, sessionId);
|
|
21432
|
+
return false;
|
|
21433
|
+
}
|
|
21402
21434
|
if (deps.directiveText === undefined && (deps.reclaimableTokens === undefined || deps.usableTokens === undefined)) {
|
|
21403
21435
|
return false;
|
|
21404
21436
|
}
|
|
@@ -21419,6 +21451,10 @@ async function maybeDeliverChannel2(sessionId, deps) {
|
|
|
21419
21451
|
if (!claimChannel2NudgeState(deps.db, sessionId, claimToken)) {
|
|
21420
21452
|
return false;
|
|
21421
21453
|
}
|
|
21454
|
+
if (!subagentRunIsActive(deps, sessionId)) {
|
|
21455
|
+
releaseClaimWithoutDelivery(deps.db, sessionId, claimToken);
|
|
21456
|
+
return false;
|
|
21457
|
+
}
|
|
21422
21458
|
try {
|
|
21423
21459
|
const promptContext = await resolvePromptContext(client, sessionId);
|
|
21424
21460
|
const reminder = deps.directiveText ?? buildChannel2Reminder(deps.reclaimableTokens, deps.oldestReclaimableToolTags);
|
|
@@ -21445,6 +21481,10 @@ async function maybeDeliverChannel2(sessionId, deps) {
|
|
|
21445
21481
|
sessionLog(sessionId, `channel2 ceiling nudge delivery skipped: claim no longer owned before send (state=${claim.state || "empty"})`);
|
|
21446
21482
|
return false;
|
|
21447
21483
|
}
|
|
21484
|
+
if (!subagentRunIsActive(deps, sessionId)) {
|
|
21485
|
+
releaseClaimWithoutDelivery(deps.db, sessionId, claimToken);
|
|
21486
|
+
return false;
|
|
21487
|
+
}
|
|
21448
21488
|
await session.promptAsync({ path: { id: sessionId }, body });
|
|
21449
21489
|
} catch (error) {
|
|
21450
21490
|
try {
|
|
@@ -25891,6 +25931,17 @@ var WHOLE_MESSAGE_PLACEHOLDER_TEXT = "[dropped]";
|
|
|
25891
25931
|
function modelAcceptsEmptyContent(providerID) {
|
|
25892
25932
|
return providerID === "anthropic";
|
|
25893
25933
|
}
|
|
25934
|
+
function variantChangeBustsProviderCache(providerID) {
|
|
25935
|
+
if (providerID === undefined)
|
|
25936
|
+
return true;
|
|
25937
|
+
if (providerID === "anthropic")
|
|
25938
|
+
return true;
|
|
25939
|
+
if (providerID === "google-vertex-anthropic")
|
|
25940
|
+
return true;
|
|
25941
|
+
if (providerID.includes("bedrock"))
|
|
25942
|
+
return true;
|
|
25943
|
+
return false;
|
|
25944
|
+
}
|
|
25894
25945
|
function makeSentinel(originalPart) {
|
|
25895
25946
|
const sentinel = {
|
|
25896
25947
|
type: "text",
|
|
@@ -27475,7 +27526,7 @@ function tagMessages(sessionId, messages, tagger, db, options = {}) {
|
|
|
27475
27526
|
hasResult: false
|
|
27476
27527
|
};
|
|
27477
27528
|
entry.occurrences.push({ message, part, kind: toolObservation.kind });
|
|
27478
|
-
if (toolObservation.kind === "result")
|
|
27529
|
+
if (toolObservation.kind === "result" && partHasCompletedResult(part))
|
|
27479
27530
|
entry.hasResult = true;
|
|
27480
27531
|
toolCallIndex.set(compositeKey, entry);
|
|
27481
27532
|
const _tGetTool = performance.now();
|
|
@@ -30657,6 +30708,10 @@ Historian previously failed ${historianFailureState.failureCount} time(s), so Ma
|
|
|
30657
30708
|
const compartmentInProgress = compartmentPhase.compartmentInProgress;
|
|
30658
30709
|
sessionMeta = { ...sessionMeta, compartmentInProgress };
|
|
30659
30710
|
logTransformTiming(sessionId, "compartmentPhase", tCompartmentPhase);
|
|
30711
|
+
if (pendingCompartmentInjection?.needsFreshMaterialization) {
|
|
30712
|
+
deps.pendingMaterializationSessions.add(sessionId);
|
|
30713
|
+
deferredMaterializationSessions.add(sessionId);
|
|
30714
|
+
}
|
|
30660
30715
|
const hardModel = deps.liveModelBySession?.get(sessionId);
|
|
30661
30716
|
const hardModelKey = hardModel ? `${hardModel.providerID}/${hardModel.modelID}` : "";
|
|
30662
30717
|
const hardSystemHash = typeof sessionMeta.systemPromptHash === "string" ? sessionMeta.systemPromptHash : "";
|
|
@@ -31794,11 +31849,16 @@ function createChatMessageHook(args) {
|
|
|
31794
31849
|
args.agentBySession.set(sessionId, input.agent);
|
|
31795
31850
|
}
|
|
31796
31851
|
if (previousVariant !== undefined && input.variant !== undefined && previousVariant !== input.variant) {
|
|
31797
|
-
|
|
31798
|
-
|
|
31799
|
-
|
|
31800
|
-
|
|
31801
|
-
|
|
31852
|
+
const providerID = input.model?.providerID ?? args.liveModelBySession.get(sessionId)?.providerID;
|
|
31853
|
+
if (variantChangeBustsProviderCache(providerID)) {
|
|
31854
|
+
sessionLog(sessionId, `variant changed (${previousVariant} -> ${input.variant}), triggering flush`);
|
|
31855
|
+
args.historyRefreshSessions.add(sessionId);
|
|
31856
|
+
args.systemPromptRefreshSessions.add(sessionId);
|
|
31857
|
+
args.pendingMaterializationSessions.add(sessionId);
|
|
31858
|
+
args.lastHeuristicsTurnId.delete(sessionId);
|
|
31859
|
+
} else {
|
|
31860
|
+
sessionLog(sessionId, `variant changed (${previousVariant} -> ${input.variant}) on provider ${providerID} whose cache ignores request params; deferring flush to next natural bust`);
|
|
31861
|
+
}
|
|
31802
31862
|
}
|
|
31803
31863
|
};
|
|
31804
31864
|
}
|
|
@@ -33947,7 +34007,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
33947
34007
|
const buildManagedCtx = async (db) => {
|
|
33948
34008
|
const { deriveHistorianChunkTokens: deriveHistorianChunkTokens2, resolveHistorianContextLimit: resolveHistorianContextLimit2 } = await import("./derive-budgets-e9j09sjr.js");
|
|
33949
34009
|
const { resolveFallbackChain: resolveFallbackChain2 } = await import("./resolve-fallbacks-5n5tvge1.js");
|
|
33950
|
-
const { userMemoryCollectionEnabled: userMemoryCollectionEnabled2 } = await import("./task-config-
|
|
34010
|
+
const { userMemoryCollectionEnabled: userMemoryCollectionEnabled2 } = await import("./task-config-5nx3qfz8.js");
|
|
33951
34011
|
const DEFAULT_HISTORIAN_TIMEOUT_MS2 = 600000;
|
|
33952
34012
|
return {
|
|
33953
34013
|
client: args.client,
|
|
@@ -33972,7 +34032,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
33972
34032
|
const db = getDb();
|
|
33973
34033
|
if (!db)
|
|
33974
34034
|
return { ok: false, error: "db unavailable" };
|
|
33975
|
-
const { runManagedRecomp: runManagedRecomp2 } = await import("./recomp-orchestrator-
|
|
34035
|
+
const { runManagedRecomp: runManagedRecomp2 } = await import("./recomp-orchestrator-2yb2hfh2.js");
|
|
33976
34036
|
const { sendIgnoredMessage: sendIgnoredMessage2 } = await import("./send-session-notification-tghq9gnh.js");
|
|
33977
34037
|
log(`[rpc] recomp requested for session ${sessionId}`);
|
|
33978
34038
|
const ctx = await buildManagedCtx(db);
|
|
@@ -33988,7 +34048,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
33988
34048
|
const db = getDb();
|
|
33989
34049
|
if (!db)
|
|
33990
34050
|
return { ok: false, error: "db unavailable" };
|
|
33991
|
-
const { runManagedUpgrade: runManagedUpgrade2 } = await import("./recomp-orchestrator-
|
|
34051
|
+
const { runManagedUpgrade: runManagedUpgrade2 } = await import("./recomp-orchestrator-2yb2hfh2.js");
|
|
33992
34052
|
const { sendIgnoredMessage: sendIgnoredMessage2 } = await import("./send-session-notification-tghq9gnh.js");
|
|
33993
34053
|
log(`[rpc] session-upgrade requested for session ${sessionId}`);
|
|
33994
34054
|
const ctx = await buildManagedCtx(db);
|
|
@@ -34005,7 +34065,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
34005
34065
|
if (!db)
|
|
34006
34066
|
return { ok: false, error: "db unavailable" };
|
|
34007
34067
|
try {
|
|
34008
|
-
const { updateSessionMeta: updateSessionMeta2 } = await import("./storage-meta-session-
|
|
34068
|
+
const { updateSessionMeta: updateSessionMeta2 } = await import("./storage-meta-session-td6bwtky.js");
|
|
34009
34069
|
updateSessionMeta2(db, sessionId, { upgradeRemindedAt: Date.now() });
|
|
34010
34070
|
return { ok: true };
|
|
34011
34071
|
} catch (error) {
|
|
@@ -36317,7 +36377,7 @@ var server = async (ctx) => {
|
|
|
36317
36377
|
{
|
|
36318
36378
|
const fence = getSchemaFenceRejection();
|
|
36319
36379
|
if (fence) {
|
|
36320
|
-
import("./conflict-warning-hook-
|
|
36380
|
+
import("./conflict-warning-hook-n48c783v.js").then(({ sendSchemaFenceWarning }) => sendSchemaFenceWarning(ctx.client, ctx.directory, fence));
|
|
36321
36381
|
}
|
|
36322
36382
|
}
|
|
36323
36383
|
if (conflictResult?.hasConflict) {
|
|
@@ -36338,7 +36398,7 @@ var server = async (ctx) => {
|
|
|
36338
36398
|
} = await import("./announcement-gms2nhya.js");
|
|
36339
36399
|
if (shouldShowAnnouncement2()) {
|
|
36340
36400
|
setTimeout(() => {
|
|
36341
|
-
import("./conflict-warning-hook-
|
|
36401
|
+
import("./conflict-warning-hook-n48c783v.js").then(({ sendStartupAnnouncement }) => sendStartupAnnouncement(ctx.client, ctx.directory, ANNOUNCEMENT_VERSION2, ANNOUNCEMENT_FEATURES2, ANNOUNCEMENT_FOOTER2, markAnnouncementSeen2)).catch(() => {});
|
|
36342
36402
|
}, 8000);
|
|
36343
36403
|
}
|
|
36344
36404
|
} catch {}
|
|
@@ -24,12 +24,12 @@ export declare function buildMagicContextHookConfig(pluginConfig: MagicContextPl
|
|
|
24
24
|
subtask?: boolean;
|
|
25
25
|
}>;
|
|
26
26
|
enabled: boolean;
|
|
27
|
-
experimental: import("../../config/schema").ExperimentalConfig;
|
|
27
|
+
experimental: import("../../config/schema/magic-context").ExperimentalConfig;
|
|
28
28
|
transform_mode: "ts" | "rust";
|
|
29
29
|
auto_update?: boolean;
|
|
30
30
|
language?: string;
|
|
31
|
-
historian?: import("../../config/schema").HistorianConfig;
|
|
32
|
-
dreamer?: import("../../config/schema").DreamerConfig;
|
|
31
|
+
historian?: import("../../config/schema/magic-context").HistorianConfig;
|
|
32
|
+
dreamer?: import("../../config/schema/magic-context").DreamerConfig;
|
|
33
33
|
cache_ttl: string | {
|
|
34
34
|
default: string;
|
|
35
35
|
[modelKey: string]: string;
|
|
@@ -61,15 +61,15 @@ export declare function buildMagicContextHookConfig(pluginConfig: MagicContextPl
|
|
|
61
61
|
enabled: boolean;
|
|
62
62
|
overlay: boolean;
|
|
63
63
|
};
|
|
64
|
-
pi?: import("../../config/schema").PiConfig;
|
|
64
|
+
pi?: import("../../config/schema/magic-context").PiConfig;
|
|
65
65
|
smart_drops: boolean;
|
|
66
66
|
caveman_text_compression: {
|
|
67
67
|
enabled: boolean;
|
|
68
68
|
min_chars: number;
|
|
69
69
|
};
|
|
70
|
-
embedding: import("../../config/schema").EmbeddingConfig;
|
|
71
|
-
subc?: import("../../config/schema").SubcConfig;
|
|
72
|
-
shadow_embedding?: import("../../config/schema").ShadowEmbeddingConfig;
|
|
70
|
+
embedding: import("../../config/schema/magic-context").EmbeddingConfig;
|
|
71
|
+
subc?: import("../../config/schema/magic-context").SubcConfig;
|
|
72
|
+
shadow_embedding?: import("../../config/schema/magic-context").ShadowEmbeddingConfig;
|
|
73
73
|
memory: {
|
|
74
74
|
enabled: boolean;
|
|
75
75
|
injection_budget_tokens: number;
|
|
@@ -86,7 +86,7 @@ export declare function buildMagicContextHookConfig(pluginConfig: MagicContextPl
|
|
|
86
86
|
max_commits: number;
|
|
87
87
|
};
|
|
88
88
|
};
|
|
89
|
-
sidekick?: import("../../
|
|
89
|
+
sidekick?: import("../../features/magic-context").SidekickConfig;
|
|
90
90
|
};
|
|
91
91
|
export declare function createSessionHooks(args: {
|
|
92
92
|
ctx: PluginContext;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"create-session-hooks.d.ts","sourceRoot":"","sources":["../../../src/plugin/hooks/create-session-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAO7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,wBAAwB;;;;;;;;;mBAAhD,CAAC;aAA2B,CAAC;aAS3D,CARC;eAA6B,CAAC;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"create-session-hooks.d.ts","sourceRoot":"","sources":["../../../src/plugin/hooks/create-session-hooks.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAO7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,wBAAwB;;;;;;;;;mBAAhD,CAAC;aAA2B,CAAC;aAS3D,CARC;eAA6B,CAAC;;;;;;;;;;;;;;;eAuF8ie,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAzEjle;AAED,wBAAgB,kBAAkB,CAAC,IAAI,EAAE;IACrC,GAAG,EAAE,aAAa,CAAC;IACnB,YAAY,EAAE,wBAAwB,CAAC;IACvC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC/C;;;;;;;;;qBAkE4zI,CAAC;;;;;;;;;;;;qBAAzmD,CAAC;mBAAyB,CAAC;iBAAuB,CAAC;iBAAuB,CAAC;0BAAc,CAAC;uBAAiB,CAAC;;;;;;0BAAohpD,CAAC;;;;;;;;;EArCr1uD;AAED,wBAAsB,uBAAuB,CAAC,IAAI,EAAE;IAChD,GAAG,EAAE,aAAa,CAAC;IACnB,YAAY,EAAE,wBAAwB,CAAC;IACvC,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,oBAAoB,CAAC,EAAE,oBAAoB,CAAC;CAC/C;;;;;;;;;qBA8B4zI,CAAC;;;;;;;;;;;;qBAAzmD,CAAC;mBAAyB,CAAC;iBAAuB,CAAC;iBAAuB,CAAC;0BAAc,CAAC;uBAAiB,CAAC;;;;;;0BAAohpD,CAAC;;;;;;;;;GADr1uD"}
|
|
@@ -9,12 +9,11 @@ import {
|
|
|
9
9
|
setRecompNote,
|
|
10
10
|
setRecompStarting,
|
|
11
11
|
setRecompTerminal
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-c2gahrks.js";
|
|
13
13
|
import"./index-63dq2g4d.js";
|
|
14
|
-
import"./index-anhrfygk.js";
|
|
15
14
|
import"./index-td9depx5.js";
|
|
16
15
|
import"./index-y1c9tcm3.js";
|
|
17
|
-
import"./index-
|
|
16
|
+
import"./index-ey1bc14z.js";
|
|
18
17
|
import"./index-k1esqfwk.js";
|
|
19
18
|
import"./index-kvrcg31b.js";
|
|
20
19
|
import"./index-wckvcay0.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"conflict-detector.d.ts","sourceRoot":"","sources":["../../src/shared/conflict-detector.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"conflict-detector.d.ts","sourceRoot":"","sources":["../../src/shared/conflict-detector.ts"],"names":[],"mappings":"AA0BA,MAAM,WAAW,cAAc;IAC3B,8CAA8C;IAC9C,WAAW,EAAE,OAAO,CAAC;IACrB,+CAA+C;IAC/C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,2DAA2D;IAC3D,SAAS,EAAE;QACP,cAAc,EAAE,OAAO,CAAC;QACxB,eAAe,EAAE,OAAO,CAAC;QACzB,SAAS,EAAE,OAAO,CAAC;QACnB,uBAAuB,EAAE,OAAO,CAAC;QACjC,uBAAuB,EAAE,OAAO,CAAC;QACjC,oBAAoB,EAAE,OAAO,CAAC;KACjC,CAAC;CACL;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc,CAyDjE;AA4ED;;;;;;;;;;GAUG;AACH,eAAO,MAAM,iBAAiB,aAAuC,CAAC;AAOtE;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,CAAC,MAAM,CAAC,GAAG,OAAO,CAoBtF;AAED;;;;iEAIiE;AACjE,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,GAAG,IAAI,CAI/D;AAwCD;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,iBAAiB,aAAiD,CAAC;AA2FhF;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,cAAc,GAAG,MAAM,CAWlE"}
|
package/dist/shared/sqlite.d.ts
CHANGED
|
@@ -53,11 +53,16 @@ export type Database = BetterSqlite3.Database;
|
|
|
53
53
|
* historical behavior in this codebase).
|
|
54
54
|
*/
|
|
55
55
|
export type Statement = BetterSqlite3.Statement<unknown[], unknown>;
|
|
56
|
-
/** Register the connection-local privilege predicate used by managed-write guards. */
|
|
57
|
-
export declare function registerPrivilegedWriter(db: Database): void;
|
|
58
56
|
/**
|
|
59
|
-
* Run a storage operation
|
|
60
|
-
*
|
|
57
|
+
* Run a storage operation with the managed-write privilege enabled.
|
|
58
|
+
*
|
|
59
|
+
* The privilege is recorded in the durable `context_privilege_state` table (row
|
|
60
|
+
* id=1, enabled=1) so the guard triggers — which reference that table, never a
|
|
61
|
+
* connection-local UDF — stand down for this connection's writes. The write happens
|
|
62
|
+
* inside a BEGIN IMMEDIATE transaction (single writer), and enabled is cleared back
|
|
63
|
+
* to 0 before commit, so no second connection can ever observe enabled=1. Nesting is
|
|
64
|
+
* tracked by privilegeDepth (outside SQLite): only the outermost scope clears the
|
|
65
|
+
* flag, so an inner scope releasing does not drop permission out from under its caller.
|
|
61
66
|
*/
|
|
62
67
|
export declare function withPrivilegedWriter<T>(db: Database, operation: () => T): T;
|
|
63
68
|
//# sourceMappingURL=sqlite.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../src/shared/sqlite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAMH,OAAO,KAAK,aAAa,MAAM,gBAAgB,CAAC;AA4IhD,eAAO,MAAM,QAAQ,EAAE,OAAO,aAA4B,CAAC;AAE3D,+DAA+D;AAC/D,MAAM,MAAM,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAC;AAE9C;;;;;;;;;GASG;AACH,MAAM,MAAM,SAAS,GAAG,aAAa,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"sqlite.d.ts","sourceRoot":"","sources":["../../src/shared/sqlite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAMH,OAAO,KAAK,aAAa,MAAM,gBAAgB,CAAC;AA4IhD,eAAO,MAAM,QAAQ,EAAE,OAAO,aAA4B,CAAC;AAE3D,+DAA+D;AAC/D,MAAM,MAAM,QAAQ,GAAG,aAAa,CAAC,QAAQ,CAAC;AAE9C;;;;;;;;;GASG;AACH,MAAM,MAAM,SAAS,GAAG,aAAa,CAAC,SAAS,CAAC,OAAO,EAAE,EAAE,OAAO,CAAC,CAAC;AASpE;;;;;;;;;;GAUG;AACH,wBAAgB,oBAAoB,CAAC,CAAC,EAAE,EAAE,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,GAAG,CAAC,CAwC3E"}
|
|
@@ -5,8 +5,7 @@ import {
|
|
|
5
5
|
summarizeDreamSchedule,
|
|
6
6
|
userMemoryCollectionEnabled,
|
|
7
7
|
userMemoryPromotionThreshold
|
|
8
|
-
} from "./index-
|
|
9
|
-
import"./index-anhrfygk.js";
|
|
8
|
+
} from "./index-56yjaeb2.js";
|
|
10
9
|
import"./index-td9depx5.js";
|
|
11
10
|
import"./index-wckvcay0.js";
|
|
12
11
|
export {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cortexkit/opencode-magic-context",
|
|
3
|
-
"version": "0.33.
|
|
3
|
+
"version": "0.33.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "OpenCode plugin for Magic Context — cross-session memory and context management",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"README.md"
|
|
31
31
|
],
|
|
32
32
|
"scripts": {
|
|
33
|
-
"build": "bun run build:tui && bun build src/index.ts --outdir dist --target node --format esm --splitting --external @opencode-ai/plugin --external @huggingface/transformers --external onnxruntime-web --external bun:sqlite --external node:sqlite && tsc --emitDeclarationOnly",
|
|
33
|
+
"build": "bun run build:tui && rm -f dist/index.js dist/*-*.js && bun build src/index.ts --outdir dist --target node --format esm --splitting --external @opencode-ai/plugin --external @huggingface/transformers --external onnxruntime-web --external bun:sqlite --external node:sqlite && tsc --emitDeclarationOnly",
|
|
34
34
|
"build:tui": "bun scripts/build-tui.ts",
|
|
35
35
|
"check:tui-compiled": "bun run build:tui && git diff --exit-code -- src/tui-compiled && test -z \"$(git status --porcelain -- src/tui-compiled)\"",
|
|
36
36
|
"typecheck": "tsc --noEmit && tsc -p tsconfig.scripts.json",
|