@cortexkit/opencode-magic-context 0.49.13 → 0.49.15
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-azqk0vfd.js → context-0m46day0.js} +133 -17
- package/dist/features/magic-context/dreamer/map-memories.d.ts.map +1 -1
- package/dist/features/magic-context/dreamer/verify.d.ts +22 -3
- package/dist/features/magic-context/dreamer/verify.d.ts.map +1 -1
- package/dist/features/magic-context/storage-tags.d.ts +2 -0
- package/dist/features/magic-context/storage-tags.d.ts.map +1 -1
- package/dist/hooks/magic-context/apply-operations.d.ts +3 -1
- package/dist/hooks/magic-context/apply-operations.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-types.d.ts +2 -2
- package/dist/hooks/magic-context/compartment-runner-types.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-validation.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner.d.ts +4 -0
- package/dist/hooks/magic-context/compartment-runner.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-trigger.d.ts +1 -1
- package/dist/hooks/magic-context/compartment-trigger.d.ts.map +1 -1
- package/dist/hooks/magic-context/degraded-pass-refusal.d.ts +2 -0
- package/dist/hooks/magic-context/degraded-pass-refusal.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/pending-drop-eligibility.d.ts +14 -0
- package/dist/hooks/magic-context/pending-drop-eligibility.d.ts.map +1 -0
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +1 -0
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/{index-hnm8raee.js → index-1vc7jrkg.js} +2 -2
- package/dist/{index-wj6ht7nm.js → index-42vcjcwe.js} +52 -17
- package/dist/{index-b16gpywn.js → index-944w16m0.js} +2 -2
- package/dist/{index-wz6mzzb1.js → index-mc1cqza6.js} +3 -3
- package/dist/{index-2jr1smmh.js → index-snp5wbge.js} +99 -11
- package/dist/{index-v13skev1.js → index-thvnpfsv.js} +1 -1
- package/dist/{index-sj89f3b0.js → index-ts1hjk1h.js} +100 -15
- package/dist/{index-aw1bh90w.js → index-xn6q9pg6.js} +2 -2
- package/dist/{index-qkd9zz0p.js → index-yxycg7fs.js} +1 -1
- package/dist/index.js +13 -13
- package/dist/{message-index-seaqpb7c.js → message-index-a6gztaqx.js} +3 -3
- package/dist/{message-index-bounded-vm64mqpq.js → message-index-bounded-vtgpq6b4.js} +3 -3
- package/dist/migration-worker.js +1 -1
- package/dist/raw-ordinal-warmup-worker.js +3 -3
- package/dist/{read-session-chunk-ax05f7gr.js → read-session-chunk-3ae3nfdn.js} +2 -2
- package/dist/{recomp-orchestrator-dmbeadwt.js → recomp-orchestrator-nwzcfhx4.js} +6 -6
- package/dist/{search-5yd5ytzs.js → search-deajrd90.js} +4 -4
- package/dist/{storage-tags-yygfb9c8.js → storage-tags-s5bg1ahx.js} +1 -1
- package/dist/{transform-postprocess-phase-72v86syx.js → transform-postprocess-phase-ne3z1zmt.js} +6 -6
- package/dist/v2/auto-search-worker.js +1 -1
- package/dist/v2/chunk-embedding-write-worker.js +1 -1
- package/dist/v2/{context-w055w17c.js → context-4qczzck7.js} +265 -32
- package/dist/v2/hidden-completion.d.ts +23 -3
- package/dist/v2/hidden-completion.d.ts.map +1 -1
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/hooks/hidden-child.d.ts +19 -0
- package/dist/v2/hooks/hidden-child.d.ts.map +1 -1
- package/dist/v2/{message-index-bounded-wepg5723.js → message-index-bounded-rxxznd34.js} +3 -3
- package/dist/v2/{message-index-gcmd0ng0.js → message-index-f947qtbz.js} +3 -3
- package/dist/v2/migration-worker.js +1 -1
- package/dist/v2/raw-ordinal-warmup-worker.js +3 -3
- package/dist/v2/{read-session-chunk-hr3w5bjk.js → read-session-chunk-rq9nx1nn.js} +2 -2
- package/dist/v2/{recomp-orchestrator-ca7qt75a.js → recomp-orchestrator-5zhxtwha.js} +5 -5
- package/dist/v2/{search-c86dcv14.js → search-n8wqxb1j.js} +4 -4
- package/dist/v2/{server-xh7jar6k.js → server-cfbr1s2x.js} +2 -2
- package/dist/v2/{server-b81w6sw3.js → server-dd0tz6cn.js} +99 -11
- package/dist/v2/{server-t4prcjc1.js → server-e298hswg.js} +1 -1
- package/dist/v2/{server-m97brnat.js → server-ehyava47.js} +2 -2
- package/dist/v2/{server-n8ch9683.js → server-kmbarfmn.js} +1 -1
- package/dist/v2/server.js +2 -2
- package/dist/v2/{storage-tags-a2gq6dw7.js → storage-tags-hcc2adpf.js} +1 -1
- package/dist/v2/store-reader.d.ts +27 -1
- package/dist/v2/store-reader.d.ts.map +1 -1
- package/dist/v2/{wrapup-orchestrator-e1a2w6jh.js → wrapup-orchestrator-65pwye0d.js} +5 -5
- package/dist/{wrapup-orchestrator-2051r6qm.js → wrapup-orchestrator-28xzsj5q.js} +7 -7
- package/package.json +1 -1
- /package/dist/{index-fwefky9w.js → index-mht7bq0z.js} +0 -0
- /package/dist/v2/{server-bxpwy6fy.js → server-atbc19ab.js} +0 -0
|
@@ -2,6 +2,7 @@ import {
|
|
|
2
2
|
getHarness2
|
|
3
3
|
} from "./index-pavzsdc6.js";
|
|
4
4
|
import {
|
|
5
|
+
tagRevisionKey,
|
|
5
6
|
tagIdentityRevisionKey,
|
|
6
7
|
getTemporalDecisions,
|
|
7
8
|
freezeTemporalDecisions,
|
|
@@ -70,7 +71,7 @@ import {
|
|
|
70
71
|
adoptNullOwnerToolTag2,
|
|
71
72
|
getCandidateToolOwners2,
|
|
72
73
|
pickNearestPriorOwner2
|
|
73
|
-
} from "./index-
|
|
74
|
+
} from "./index-mht7bq0z.js";
|
|
74
75
|
import {
|
|
75
76
|
textMentionsRecentCommit,
|
|
76
77
|
hasMeaningfulUserText2,
|
|
@@ -110,9 +111,11 @@ import {
|
|
|
110
111
|
HYGIENE_PROVIDER_UNITS_VERSION,
|
|
111
112
|
sessionDecisionCalibration,
|
|
112
113
|
transitionSessionHygieneUnits,
|
|
114
|
+
readEpochFloorSnapshot,
|
|
113
115
|
ReplayDocumentError,
|
|
114
116
|
readReplayEnvelope,
|
|
115
117
|
updateReplayDocument,
|
|
118
|
+
loadProtectedTailMeta,
|
|
116
119
|
getEmergencyInputSample,
|
|
117
120
|
setEmergencyDropSample,
|
|
118
121
|
clearEmergencyDropSample,
|
|
@@ -190,7 +193,7 @@ import {
|
|
|
190
193
|
extractToolCallObservation,
|
|
191
194
|
ToolMutationBatch,
|
|
192
195
|
createToolDropTarget
|
|
193
|
-
} from "./index-
|
|
196
|
+
} from "./index-944w16m0.js";
|
|
194
197
|
import {
|
|
195
198
|
getMaxM0MutationId,
|
|
196
199
|
rememberUnpublishedAutoSearchNoHint,
|
|
@@ -225,7 +228,7 @@ import {
|
|
|
225
228
|
peekNoteNudgeText,
|
|
226
229
|
markNoteNudgeDelivered,
|
|
227
230
|
getActiveCompartmentRun
|
|
228
|
-
} from "./index-
|
|
231
|
+
} from "./index-snp5wbge.js";
|
|
229
232
|
import {
|
|
230
233
|
runSessionWarmupWorker
|
|
231
234
|
} from "./index-mmfa86mt.js";
|
|
@@ -236,9 +239,9 @@ import {
|
|
|
236
239
|
} from "./index-1d289pq2.js";
|
|
237
240
|
import {
|
|
238
241
|
BoundedSessionMap
|
|
239
|
-
} from "./index-
|
|
242
|
+
} from "./index-thvnpfsv.js";
|
|
240
243
|
import {
|
|
241
|
-
|
|
244
|
+
userFacingFailureCode
|
|
242
245
|
} from "./index-bxdg2nbt.js";
|
|
243
246
|
import {
|
|
244
247
|
normalizeProtectedToolName,
|
|
@@ -2741,6 +2744,20 @@ function replayCavemanCompression(sessionId, db, targets, tags) {
|
|
|
2741
2744
|
}
|
|
2742
2745
|
|
|
2743
2746
|
// src/hooks/magic-context/degraded-pass-refusal.ts
|
|
2747
|
+
function describeDegradedPassFailure(site, cause) {
|
|
2748
|
+
const details = [site];
|
|
2749
|
+
const seen = new Set;
|
|
2750
|
+
while (cause !== undefined && cause !== null && !seen.has(cause)) {
|
|
2751
|
+
seen.add(cause);
|
|
2752
|
+
const current = cause;
|
|
2753
|
+
const detail = typeof current.site === "string" ? current.site : typeof current.message === "string" ? current.message : String(cause);
|
|
2754
|
+
if (!details.includes(detail))
|
|
2755
|
+
details.push(detail);
|
|
2756
|
+
cause = current.cause;
|
|
2757
|
+
}
|
|
2758
|
+
return `Magic Context could not safely prepare this turn [${userFacingFailureCode("transform_pass_degraded")}] (${details.join(": ")}). This request was not sent.`;
|
|
2759
|
+
}
|
|
2760
|
+
|
|
2744
2761
|
class DegradedPassRefusalError extends Error {
|
|
2745
2762
|
site;
|
|
2746
2763
|
code = "DEGRADED_PASS_REFUSAL";
|
|
@@ -2748,7 +2765,7 @@ class DegradedPassRefusalError extends Error {
|
|
|
2748
2765
|
estimatedTokens;
|
|
2749
2766
|
contextLimitTokens;
|
|
2750
2767
|
constructor(site, options) {
|
|
2751
|
-
super(
|
|
2768
|
+
super(describeDegradedPassFailure(site, options?.cause), {
|
|
2752
2769
|
cause: options?.cause
|
|
2753
2770
|
});
|
|
2754
2771
|
this.site = site;
|
|
@@ -2765,6 +2782,76 @@ function degradedPassError(site, error) {
|
|
|
2765
2782
|
return new DegradedPassRefusalError(site, { cause: error });
|
|
2766
2783
|
}
|
|
2767
2784
|
|
|
2785
|
+
// src/hooks/magic-context/pending-drop-eligibility.ts
|
|
2786
|
+
function pendingDropVeto(tagNumber, target, protectedTagIds) {
|
|
2787
|
+
if (protectedTagIds.has(tagNumber))
|
|
2788
|
+
return "protected";
|
|
2789
|
+
if (target?.thinkingDropProtected)
|
|
2790
|
+
return "active_thinking";
|
|
2791
|
+
return null;
|
|
2792
|
+
}
|
|
2793
|
+
function capturePendingDropEligibility(targets, protectedTagIds) {
|
|
2794
|
+
const eligible = new Set;
|
|
2795
|
+
for (const [number, target] of targets) {
|
|
2796
|
+
if (pendingDropVeto(number, target, protectedTagIds))
|
|
2797
|
+
continue;
|
|
2798
|
+
if (target.drop) {
|
|
2799
|
+
if (target.canDrop?.() === true)
|
|
2800
|
+
eligible.add(number);
|
|
2801
|
+
} else {
|
|
2802
|
+
const content = target.getContent?.();
|
|
2803
|
+
if (typeof content === "string" && content.length > `[dropped §${number}§]`.length)
|
|
2804
|
+
eligible.add(number);
|
|
2805
|
+
}
|
|
2806
|
+
}
|
|
2807
|
+
return eligible;
|
|
2808
|
+
}
|
|
2809
|
+
function pendingDropEligibilityKey(db, sessionId, input, protectionInputs) {
|
|
2810
|
+
const digests = input.map((message) => message.contentDigest?.() ?? null);
|
|
2811
|
+
if (digests.some((digest) => digest === null))
|
|
2812
|
+
return null;
|
|
2813
|
+
const revision = db.prepare("SELECT value FROM schema_migrations_meta WHERE key = ?").get(tagRevisionKey(sessionId));
|
|
2814
|
+
if (!revision?.value)
|
|
2815
|
+
return null;
|
|
2816
|
+
return JSON.stringify([
|
|
2817
|
+
input.map((message, index) => [
|
|
2818
|
+
message.id,
|
|
2819
|
+
message.role,
|
|
2820
|
+
message.synthetic,
|
|
2821
|
+
digests[index]
|
|
2822
|
+
]),
|
|
2823
|
+
revision.value,
|
|
2824
|
+
readEpochFloorSnapshot(db, sessionId),
|
|
2825
|
+
sessionDecisionCalibration(db, sessionId).toolsRatio,
|
|
2826
|
+
loadProtectedTailMeta(db, sessionId),
|
|
2827
|
+
[...getMergedReasoningStrippedIds(db, sessionId)].sort(),
|
|
2828
|
+
[...getReasoningRemovalState(db, sessionId).messageIds].sort(),
|
|
2829
|
+
protectionInputs
|
|
2830
|
+
]);
|
|
2831
|
+
}
|
|
2832
|
+
function createPendingDropEligibilityCache() {
|
|
2833
|
+
const sessions = new Map;
|
|
2834
|
+
return {
|
|
2835
|
+
read(sessionId, key) {
|
|
2836
|
+
const previous = sessions.get(sessionId);
|
|
2837
|
+
if (key === null || previous?.key !== key) {
|
|
2838
|
+
sessions.delete(sessionId);
|
|
2839
|
+
return;
|
|
2840
|
+
}
|
|
2841
|
+
return previous.eligible;
|
|
2842
|
+
},
|
|
2843
|
+
record(sessionId, key, eligible) {
|
|
2844
|
+
sessions.delete(sessionId);
|
|
2845
|
+
if (key === null)
|
|
2846
|
+
return;
|
|
2847
|
+
const oldest = sessions.keys().next().value;
|
|
2848
|
+
if (sessions.size >= 64 && oldest !== undefined)
|
|
2849
|
+
sessions.delete(oldest);
|
|
2850
|
+
sessions.set(sessionId, { key, eligible: new Set(eligible) });
|
|
2851
|
+
}
|
|
2852
|
+
};
|
|
2853
|
+
}
|
|
2854
|
+
|
|
2768
2855
|
// src/hooks/magic-context/apply-operations.ts
|
|
2769
2856
|
var RECENT_TOOL_SKELETON_WINDOW = 20;
|
|
2770
2857
|
function buildReplacementContent(tagId) {
|
|
@@ -2885,7 +2972,7 @@ function renderConvertedToolSkeletons(targets, converted) {
|
|
|
2885
2972
|
}
|
|
2886
2973
|
return didMutate;
|
|
2887
2974
|
}
|
|
2888
|
-
function applyPendingOperations(sessionId, db, targets, protectedTagIds, preloadedTags, preloadedPendingOps, syntheticPendingOps = [], editMarkerTagIds = new Set, onTagReduced, onBatchComplete) {
|
|
2975
|
+
function applyPendingOperations(sessionId, db, targets, protectedTagIds, preloadedTags, preloadedPendingOps, syntheticPendingOps = [], editMarkerTagIds = new Set, onTagReduced, onBatchComplete, onEligibilitySnapshot) {
|
|
2889
2976
|
let didMutateMessage = false;
|
|
2890
2977
|
let diagnostics;
|
|
2891
2978
|
const reject = (reason) => {
|
|
@@ -2900,6 +2987,7 @@ function applyPendingOperations(sessionId, db, targets, protectedTagIds, preload
|
|
|
2900
2987
|
}).immediate();
|
|
2901
2988
|
{
|
|
2902
2989
|
const pendingOps = preloadedPendingOps ?? getPendingOps(db, sessionId);
|
|
2990
|
+
onEligibilitySnapshot?.(capturePendingDropEligibility(targets, protectedTagIds));
|
|
2903
2991
|
const tags = preloadedTags ?? getTagsByNumbers2(db, sessionId, [
|
|
2904
2992
|
...new Set([
|
|
2905
2993
|
...pendingOps.map((op) => op.tagId),
|
|
@@ -2930,13 +3018,10 @@ function applyPendingOperations(sessionId, db, targets, protectedTagIds, preload
|
|
|
2930
3018
|
removePendingOp(db, sessionId, pendingOp.tagId);
|
|
2931
3019
|
continue;
|
|
2932
3020
|
}
|
|
2933
|
-
if (protectedTagIds.has(pendingOp.tagId)) {
|
|
2934
|
-
reject("protected");
|
|
2935
|
-
continue;
|
|
2936
|
-
}
|
|
2937
3021
|
const target = targets.get(pendingOp.tagId);
|
|
2938
|
-
|
|
2939
|
-
|
|
3022
|
+
const veto = pendingDropVeto(pendingOp.tagId, target, protectedTagIds);
|
|
3023
|
+
if (veto) {
|
|
3024
|
+
reject(veto);
|
|
2940
3025
|
continue;
|
|
2941
3026
|
}
|
|
2942
3027
|
const isToolTag = tagTypeById.get(pendingOp.tagId) === "tool";
|
|
@@ -5699,7 +5784,7 @@ async function runPostTransformPhase2(args) {
|
|
|
5699
5784
|
pendingOpsDidMutate = applyPendingOperations(args.sessionId, args.db, newTargets, new Set([
|
|
5700
5785
|
...args.contextUsage.percentage >= 95 ? [] : args.protectedTagIds,
|
|
5701
5786
|
...protectedToolTags
|
|
5702
|
-
]), undefined, pendingOps, [], new Set, (reduction) => droppedTokenReductions.push(reduction));
|
|
5787
|
+
]), undefined, pendingOps, [], new Set, (reduction) => droppedTokenReductions.push(reduction), undefined, args.onPendingDropEligibility);
|
|
5703
5788
|
if (pendingOpsDidMutate) {
|
|
5704
5789
|
droppedCount += pendingOps.length;
|
|
5705
5790
|
for (const pendingOp of pendingOps) {
|
|
@@ -6736,4 +6821,4 @@ function checkM0MutationDriftAndSignal2(args) {
|
|
|
6736
6821
|
return false;
|
|
6737
6822
|
}
|
|
6738
6823
|
|
|
6739
|
-
export { makeToolCompositeKey, createTagger, cavemanWordRulesForLanguage, searchMessageHistoryOffThread, findSessionId, findLastUserMessageId, clearAutoSearchForSession, setCtxReduceRegisteredGlobally, resolveCtxReduceAvailabilityFromMessages, resolveCtxReduceAvailability, primeCtxReduceSpawnPermission, ctxReduceSpawnPermissionReadNeeded, spawnAgentFromMessages, spawnAgentFromOpenCodeDb, todowritePermissionDenied, cachedToolPermissionDenied, clearToolPermissionDenied, resolveTodowriteAvailabilityFromMessages, resolveTodowriteAvailability, canConsumeDeferredOnThisPass, hasReclaimRide, reclaimRideLabel, captureOpencodeReasoningBudgetStatus, reasoningBudgetStatusLine, ENGINE_RECONNECTING_USER_MESSAGE, ENGINE_BUSY_USER_MESSAGE, SIGNED_THINKING_RESET_FENCE_FAILED, contextRefusalError, protectedToolRefusal, outgoingContextRefusal, signedTurnContextRefusal, EmergencyFailClosedError, latestAssistantTurnStart, latestAssistantTurnMessages, hasActiveAnthropicThinkingTurn, replayCavemanCompression, DegradedPassRefusalError, degradedPassError, applyFlushedStatuses, prewarmTagOwners, waitForTagOwners, stripStructuralNoise, logTransformTiming, hasRecentAssistantCommit, tagMessages, resetDegradedCacheCount2, isSyntheticHeadMessage2, applyTodoSynthesis2, freezeReasoningOnBustingPass2, firstServedDivergenceIndex2, rustModeServedKeyAfterPersistedStrips2, replayRustModeBindingMismatchStrips2, RUST_MARKER_LOCK_SKIP_LOG2, applyRustModeDeferredCompactionMarker2, clearRustModeBoundaryRecord2, runRustModePostprocess2, reconcileMarkerRepresentation2, clearPendingCompactionMarkerAfterSuccessfulDrain2, defaultCompactionMarkerStrategy2, abortSessionFailClosed2, evaluateEmergencyFailClosed2, finalizeMessageRepresentation2, runPostTransformPhase2, checkM0MutationDriftAndSignal2 };
|
|
6824
|
+
export { makeToolCompositeKey, createTagger, cavemanWordRulesForLanguage, searchMessageHistoryOffThread, findSessionId, findLastUserMessageId, clearAutoSearchForSession, setCtxReduceRegisteredGlobally, resolveCtxReduceAvailabilityFromMessages, resolveCtxReduceAvailability, primeCtxReduceSpawnPermission, ctxReduceSpawnPermissionReadNeeded, spawnAgentFromMessages, spawnAgentFromOpenCodeDb, todowritePermissionDenied, cachedToolPermissionDenied, clearToolPermissionDenied, resolveTodowriteAvailabilityFromMessages, resolveTodowriteAvailability, canConsumeDeferredOnThisPass, hasReclaimRide, reclaimRideLabel, captureOpencodeReasoningBudgetStatus, reasoningBudgetStatusLine, ENGINE_RECONNECTING_USER_MESSAGE, ENGINE_BUSY_USER_MESSAGE, SIGNED_THINKING_RESET_FENCE_FAILED, contextRefusalError, protectedToolRefusal, outgoingContextRefusal, signedTurnContextRefusal, EmergencyFailClosedError, latestAssistantTurnStart, latestAssistantTurnMessages, hasActiveAnthropicThinkingTurn, replayCavemanCompression, DegradedPassRefusalError, degradedPassError, pendingDropEligibilityKey, createPendingDropEligibilityCache, applyFlushedStatuses, prewarmTagOwners, waitForTagOwners, stripStructuralNoise, logTransformTiming, hasRecentAssistantCommit, tagMessages, resetDegradedCacheCount2, isSyntheticHeadMessage2, applyTodoSynthesis2, freezeReasoningOnBustingPass2, firstServedDivergenceIndex2, rustModeServedKeyAfterPersistedStrips2, replayRustModeBindingMismatchStrips2, RUST_MARKER_LOCK_SKIP_LOG2, applyRustModeDeferredCompactionMarker2, clearRustModeBoundaryRecord2, runRustModePostprocess2, reconcileMarkerRepresentation2, clearPendingCompactionMarkerAfterSuccessfulDrain2, defaultCompactionMarkerStrategy2, abortSessionFailClosed2, evaluateEmergencyFailClosed2, finalizeMessageRepresentation2, runPostTransformPhase2, checkM0MutationDriftAndSignal2 };
|
|
@@ -66,10 +66,10 @@ import {
|
|
|
66
66
|
} from "./index-bxdg2nbt.js";
|
|
67
67
|
import {
|
|
68
68
|
isRecord
|
|
69
|
-
} from "./index-
|
|
69
|
+
} from "./index-mht7bq0z.js";
|
|
70
70
|
import {
|
|
71
71
|
getIndexedMessageCorpusSize2
|
|
72
|
-
} from "./index-
|
|
72
|
+
} from "./index-thvnpfsv.js";
|
|
73
73
|
import {
|
|
74
74
|
resolveWorkspaceShareCategories,
|
|
75
75
|
resolveWorkspaceIdentitySet,
|
|
@@ -1270,7 +1270,7 @@ function finishDatabaseOpen(db, dbPath, explicitDbPath, latestSupportedVersion)
|
|
|
1270
1270
|
startMessageFtsRowidMapBackfill(db).then(async () => {
|
|
1271
1271
|
if (!readsOpenCodeStore)
|
|
1272
1272
|
return;
|
|
1273
|
-
const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-
|
|
1273
|
+
const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-3ae3nfdn.js"));
|
|
1274
1274
|
const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-qjge9044.js"));
|
|
1275
1275
|
await startMessageTimeBackfill(db, Object.assign(readRawSessionMessages, {
|
|
1276
1276
|
readPage: readRawSessionMessagePage
|
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
detectOverflow,
|
|
29
29
|
isAnthropicFamilyRoute,
|
|
30
30
|
readRawSessionMessages2
|
|
31
|
-
} from "./index-
|
|
31
|
+
} from "./index-944w16m0.js";
|
|
32
32
|
import {
|
|
33
33
|
setHarness2
|
|
34
34
|
} from "./index-pavzsdc6.js";
|
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
checkCompactionMarkerConsistency,
|
|
98
98
|
clearInjectionCache,
|
|
99
99
|
clearNoteNudgeTriggerOnly
|
|
100
|
-
} from "./index-
|
|
100
|
+
} from "./index-snp5wbge.js";
|
|
101
101
|
import"./index-sd3egckz.js";
|
|
102
102
|
import {
|
|
103
103
|
hasTrustedAbsoluteWall,
|
|
@@ -185,7 +185,7 @@ import {
|
|
|
185
185
|
parameterDescriptionsFor,
|
|
186
186
|
MagicContextRpcServer,
|
|
187
187
|
applyHiddenSubagentTemperature
|
|
188
|
-
} from "./index-
|
|
188
|
+
} from "./index-42vcjcwe.js";
|
|
189
189
|
import {
|
|
190
190
|
resolveOpenCodeDbPath,
|
|
191
191
|
openCodeDbPathExists,
|
|
@@ -209,7 +209,7 @@ import {
|
|
|
209
209
|
openDatabaseAsync,
|
|
210
210
|
isDatabasePersisted,
|
|
211
211
|
getDatabasePersistenceError
|
|
212
|
-
} from "./index-
|
|
212
|
+
} from "./index-yxycg7fs.js";
|
|
213
213
|
import {
|
|
214
214
|
setHomeProjectPermission,
|
|
215
215
|
ProjectIdentityError,
|
|
@@ -229,7 +229,7 @@ import {
|
|
|
229
229
|
observeSessionActivity,
|
|
230
230
|
backfillSessionActivity,
|
|
231
231
|
deleteIndexedMessage2
|
|
232
|
-
} from "./index-
|
|
232
|
+
} from "./index-thvnpfsv.js";
|
|
233
233
|
import {
|
|
234
234
|
recordSessionProjectIdentity
|
|
235
235
|
} from "./index-saews2s3.js";
|
|
@@ -249,7 +249,7 @@ import"./index-fkx2qnvw.js";
|
|
|
249
249
|
import {
|
|
250
250
|
getDefaultSubcConnectionFile,
|
|
251
251
|
SubcModuleTransport
|
|
252
|
-
} from "./index-
|
|
252
|
+
} from "./index-xn6q9pg6.js";
|
|
253
253
|
import"./index-qt1qqasc.js";
|
|
254
254
|
import"./index-y9f76s3f.js";
|
|
255
255
|
import {
|
|
@@ -281,7 +281,7 @@ import {
|
|
|
281
281
|
stripPersistedAssistantText,
|
|
282
282
|
deleteTagsByMessageId2,
|
|
283
283
|
getMaxTagNumberBySession2
|
|
284
|
-
} from "./index-
|
|
284
|
+
} from "./index-mht7bq0z.js";
|
|
285
285
|
import {
|
|
286
286
|
resolveHistorianModel2,
|
|
287
287
|
resolveOpenCodeAgentOverrides2,
|
|
@@ -308,10 +308,10 @@ import {
|
|
|
308
308
|
setCtxReduceRegisteredGlobally,
|
|
309
309
|
clearToolPermissionDenied,
|
|
310
310
|
resetDegradedCacheCount2
|
|
311
|
-
} from "./index-
|
|
311
|
+
} from "./index-ts1hjk1h.js";
|
|
312
312
|
import {
|
|
313
313
|
runManagedRecomp2
|
|
314
|
-
} from "./index-
|
|
314
|
+
} from "./index-1vc7jrkg.js";
|
|
315
315
|
import {
|
|
316
316
|
isValidSemver,
|
|
317
317
|
compareSemverCore
|
|
@@ -319,7 +319,7 @@ import {
|
|
|
319
319
|
import"./index-fmsr7v69.js";
|
|
320
320
|
import {
|
|
321
321
|
runManagedWrapup2
|
|
322
|
-
} from "./index-
|
|
322
|
+
} from "./index-mc1cqza6.js";
|
|
323
323
|
import {
|
|
324
324
|
isDreamerRunnable,
|
|
325
325
|
isSmartNoteSurfaceAvailable,
|
|
@@ -8187,7 +8187,7 @@ var require_src2 = __commonJS(function(exports, module) {
|
|
|
8187
8187
|
// package.json
|
|
8188
8188
|
var package_default = {
|
|
8189
8189
|
name: "@cortexkit/opencode-magic-context",
|
|
8190
|
-
version: "0.49.
|
|
8190
|
+
version: "0.49.15",
|
|
8191
8191
|
type: "module",
|
|
8192
8192
|
description: "OpenCode plugin for Magic Context — cross-session memory and context management",
|
|
8193
8193
|
main: "dist/index.js",
|
|
@@ -12033,7 +12033,7 @@ async function setup(context) {
|
|
|
12033
12033
|
if (claimStorageBackupWarningCheck() && isMagicContextStorageOutsideEngram(storageDir)) {
|
|
12034
12034
|
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.`);
|
|
12035
12035
|
}
|
|
12036
|
-
const { registerContext } = await import("./context-
|
|
12036
|
+
const { registerContext } = await import("./context-0m46day0.js");
|
|
12037
12037
|
setHarness2("opencode2");
|
|
12038
12038
|
bindStaleBuildNotice({}, import.meta.url, "opencode2");
|
|
12039
12039
|
const duties = await registerContext(context);
|
|
@@ -12510,7 +12510,7 @@ var server = async (ctx) => {
|
|
|
12510
12510
|
rustReplayParticipant: () => magicContextRuntime.magicContext?.getRustReplayParticipant?.() ?? null,
|
|
12511
12511
|
onStorageBusyRefusal: async (sessionId, message) => {
|
|
12512
12512
|
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-24r4esbh.js"));
|
|
12513
|
-
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-
|
|
12513
|
+
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-ne3z1zmt.js"));
|
|
12514
12514
|
await sendStatusNotification(ctx.client, sessionId, message, {
|
|
12515
12515
|
toastDurationMs: 15000
|
|
12516
12516
|
});
|
|
@@ -17,9 +17,9 @@ import {
|
|
|
17
17
|
indexMessagesAfterOrdinal2,
|
|
18
18
|
indexSourcesAfterOrdinal2,
|
|
19
19
|
sweepOrphanedOpenCodeMessageIndexes2
|
|
20
|
-
} from "./index-
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
20
|
+
} from "./index-thvnpfsv.js";
|
|
21
|
+
import"./index-944w16m0.js";
|
|
22
|
+
import"./index-mht7bq0z.js";
|
|
23
23
|
import"./index-1zx87sdm.js";
|
|
24
24
|
import"./index-1d289pq2.js";
|
|
25
25
|
import"./index-mmfa86mt.js";
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
yieldIndexChunk2
|
|
5
5
|
} from "./index-wafzvyhg.js";
|
|
6
6
|
import"./index-1zx87sdm.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-mht7bq0z.js";
|
|
8
8
|
import"./index-hqkczed7.js";
|
|
9
9
|
import"./index-pavzsdc6.js";
|
|
10
10
|
import"./index-g2q4htwp.js";
|
|
@@ -15,7 +15,7 @@ import"./index-v0p37hm2.js";
|
|
|
15
15
|
import"./index-mmfa86mt.js";
|
|
16
16
|
import"./index-58e3y90n.js";
|
|
17
17
|
import"./index-1d289pq2.js";
|
|
18
|
-
import"./index-
|
|
18
|
+
import"./index-944w16m0.js";
|
|
19
19
|
import"./index-n6m03s3n.js";
|
|
20
20
|
import {
|
|
21
21
|
MESSAGE_INDEX_MAX_FTS_BYTES2,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
markMessageIndexDirty2,
|
|
25
25
|
getIndexableContent2,
|
|
26
26
|
indexSingleMessage2
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-thvnpfsv.js";
|
|
28
28
|
import"./index-dyvbsvga.js";
|
|
29
29
|
import"./index-nj7yykkx.js";
|
|
30
30
|
import"./index-fkx2qnvw.js";
|
package/dist/migration-worker.js
CHANGED
|
@@ -35,7 +35,7 @@ try {
|
|
|
35
35
|
{ configureContextDatabasePragmas }
|
|
36
36
|
] = await Promise.all([
|
|
37
37
|
import("./harness-e4avh192.js"),
|
|
38
|
-
import("./message-index-
|
|
38
|
+
import("./message-index-a6gztaqx.js"),
|
|
39
39
|
import("./sqlite-context-pragmas-mv9jqwjh.js")
|
|
40
40
|
]);
|
|
41
41
|
setHarness(input.harness ?? "opencode");
|
|
@@ -49,7 +49,7 @@ try {
|
|
|
49
49
|
const { setHarness } = await import("./harness-e4avh192.js");
|
|
50
50
|
setHarness(input.harness ?? "opencode");
|
|
51
51
|
const [{ indexMessageInShortChunks }, { configureContextDatabasePragmas }] = await Promise.all([
|
|
52
|
-
import("./message-index-bounded-
|
|
52
|
+
import("./message-index-bounded-vtgpq6b4.js"),
|
|
53
53
|
import("./sqlite-context-pragmas-mv9jqwjh.js")
|
|
54
54
|
]);
|
|
55
55
|
configureContextDatabasePragmas(db);
|
|
@@ -59,7 +59,7 @@ try {
|
|
|
59
59
|
const result = await indexMessageInShortChunks(writer, input.sessionId, message, input, () => !cancellation || Atomics.load(cancellation, 0) === 0);
|
|
60
60
|
reply = { kind: "indexed", inserted: result.inserted, measurements: result.measurements };
|
|
61
61
|
} else if (input.tagRatio !== undefined) {
|
|
62
|
-
const { scanTagOwnerSummary, scanTagOwnerDelta } = await import("./storage-tags-
|
|
62
|
+
const { scanTagOwnerSummary, scanTagOwnerDelta } = await import("./storage-tags-s5bg1ahx.js");
|
|
63
63
|
const delta = input.tagState ? scanTagOwnerDelta(db, input.sessionId, input.tagState) : null;
|
|
64
64
|
if (delta)
|
|
65
65
|
reply = { kind: "tag-delta", delta };
|
|
@@ -35,8 +35,8 @@ import {
|
|
|
35
35
|
readSessionChunk2,
|
|
36
36
|
getRawSessionMessageIdsThrough2,
|
|
37
37
|
readRawSessionSeedTail2
|
|
38
|
-
} from "./index-
|
|
39
|
-
import"./index-
|
|
38
|
+
} from "./index-944w16m0.js";
|
|
39
|
+
import"./index-mht7bq0z.js";
|
|
40
40
|
import"./index-1zx87sdm.js";
|
|
41
41
|
import"./index-1d289pq2.js";
|
|
42
42
|
import"./index-mmfa86mt.js";
|
|
@@ -7,11 +7,11 @@ import {
|
|
|
7
7
|
setRecompTerminal2,
|
|
8
8
|
buildRecompDeps2,
|
|
9
9
|
runManagedRecomp2
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
10
|
+
} from "./index-1vc7jrkg.js";
|
|
11
|
+
import"./index-snp5wbge.js";
|
|
12
12
|
import"./index-f71thw8j.js";
|
|
13
13
|
import"./index-bxdg2nbt.js";
|
|
14
|
-
import"./index-
|
|
14
|
+
import"./index-thvnpfsv.js";
|
|
15
15
|
import"./index-sd3egckz.js";
|
|
16
16
|
import"./index-3kdm78zp.js";
|
|
17
17
|
import"./index-y1qysm3q.js";
|
|
@@ -20,8 +20,8 @@ import"./index-4dhv7mqz.js";
|
|
|
20
20
|
import"./index-v10f1rjv.js";
|
|
21
21
|
import"./index-dgs16axy.js";
|
|
22
22
|
import"./index-qt1qqasc.js";
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
23
|
+
import"./index-944w16m0.js";
|
|
24
|
+
import"./index-mht7bq0z.js";
|
|
25
25
|
import"./index-1zx87sdm.js";
|
|
26
26
|
import"./index-1d289pq2.js";
|
|
27
27
|
import"./index-mmfa86mt.js";
|
|
@@ -33,7 +33,7 @@ import"./index-1sarmj9z.js";
|
|
|
33
33
|
import"./index-saews2s3.js";
|
|
34
34
|
import"./index-3kx0kg0f.js";
|
|
35
35
|
import"./index-fkx2qnvw.js";
|
|
36
|
-
import"./index-
|
|
36
|
+
import"./index-yxycg7fs.js";
|
|
37
37
|
import"./index-fb3zxn06.js";
|
|
38
38
|
import"./index-wk0n1cgt.js";
|
|
39
39
|
import"./index-a8bvhwqs.js";
|
|
@@ -5,16 +5,16 @@ import {
|
|
|
5
5
|
resolveMemoriesByIdsForSearch2,
|
|
6
6
|
unifiedSearch2,
|
|
7
7
|
formatSearchResults2
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-xn6q9pg6.js";
|
|
9
9
|
import"./index-bxdg2nbt.js";
|
|
10
|
-
import"./index-
|
|
10
|
+
import"./index-thvnpfsv.js";
|
|
11
11
|
import"./index-3kdm78zp.js";
|
|
12
12
|
import"./index-y1qysm3q.js";
|
|
13
13
|
import"./index-n78avt2p.js";
|
|
14
14
|
import"./index-4dhv7mqz.js";
|
|
15
15
|
import"./index-qt1qqasc.js";
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
16
|
+
import"./index-944w16m0.js";
|
|
17
|
+
import"./index-mht7bq0z.js";
|
|
18
18
|
import"./index-1zx87sdm.js";
|
|
19
19
|
import"./index-1d289pq2.js";
|
|
20
20
|
import"./index-mmfa86mt.js";
|
package/dist/{transform-postprocess-phase-72v86syx.js → transform-postprocess-phase-ne3z1zmt.js}
RENAMED
|
@@ -18,11 +18,11 @@ import {
|
|
|
18
18
|
finalizeMessageRepresentation2,
|
|
19
19
|
runPostTransformPhase2,
|
|
20
20
|
checkM0MutationDriftAndSignal2
|
|
21
|
-
} from "./index-
|
|
22
|
-
import"./index-
|
|
21
|
+
} from "./index-ts1hjk1h.js";
|
|
22
|
+
import"./index-snp5wbge.js";
|
|
23
23
|
import"./index-f71thw8j.js";
|
|
24
24
|
import"./index-bxdg2nbt.js";
|
|
25
|
-
import"./index-
|
|
25
|
+
import"./index-thvnpfsv.js";
|
|
26
26
|
import"./index-sd3egckz.js";
|
|
27
27
|
import"./index-3kdm78zp.js";
|
|
28
28
|
import"./index-y1qysm3q.js";
|
|
@@ -31,8 +31,8 @@ import"./index-4dhv7mqz.js";
|
|
|
31
31
|
import"./index-v10f1rjv.js";
|
|
32
32
|
import"./index-dgs16axy.js";
|
|
33
33
|
import"./index-qt1qqasc.js";
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
34
|
+
import"./index-944w16m0.js";
|
|
35
|
+
import"./index-mht7bq0z.js";
|
|
36
36
|
import"./index-1zx87sdm.js";
|
|
37
37
|
import"./index-1d289pq2.js";
|
|
38
38
|
import"./index-mmfa86mt.js";
|
|
@@ -44,7 +44,7 @@ import"./index-1sarmj9z.js";
|
|
|
44
44
|
import"./index-saews2s3.js";
|
|
45
45
|
import"./index-3kx0kg0f.js";
|
|
46
46
|
import"./index-fkx2qnvw.js";
|
|
47
|
-
import"./index-
|
|
47
|
+
import"./index-yxycg7fs.js";
|
|
48
48
|
import"./index-fb3zxn06.js";
|
|
49
49
|
import"./index-wk0n1cgt.js";
|
|
50
50
|
import"./index-a8bvhwqs.js";
|
|
@@ -22,7 +22,7 @@ var [
|
|
|
22
22
|
import("./embedding-cache-mgyr73ef.js"),
|
|
23
23
|
import("./storage-memory-j3v3hc83.js"),
|
|
24
24
|
import("./project-embedding-registry-0msp56p8.js"),
|
|
25
|
-
import("./search-
|
|
25
|
+
import("./search-n8wqxb1j.js"),
|
|
26
26
|
import("./embedding-activity-g1dhes6g.js"),
|
|
27
27
|
import("./harness-e4avh192.js"),
|
|
28
28
|
import("./sqlite-4pqyynrs.js"),
|