@cortexkit/opencode-magic-context 0.49.72 → 0.49.74
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-830ksymq.js → context-966c0vdq.js} +86 -11
- package/dist/features/magic-context/transform-decision-log.d.ts +1 -1
- package/dist/features/magic-context/transform-decision-log.d.ts.map +1 -1
- package/dist/hooks/magic-context/command-handler.d.ts +4 -0
- package/dist/hooks/magic-context/command-handler.d.ts.map +1 -1
- package/dist/hooks/magic-context/event-resolvers.d.ts +12 -0
- package/dist/hooks/magic-context/event-resolvers.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 +4 -0
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/pending-materialization.d.ts +4 -1
- package/dist/hooks/magic-context/pending-materialization.d.ts.map +1 -1
- 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/hooks/magic-context/wrapup-orchestrator.d.ts +0 -1
- package/dist/hooks/magic-context/wrapup-orchestrator.d.ts.map +1 -1
- package/dist/{index-64qpnmjb.js → index-238xbkhk.js} +1 -1
- package/dist/{index-yh7hxjxm.js → index-6qqc8ef2.js} +56 -21
- package/dist/{index-y6q5qvdz.js → index-cpmqvc1c.js} +15 -13
- package/dist/{index-q5rcetym.js → index-h2w3kzkt.js} +2 -2
- package/dist/{index-sc5segqg.js → index-k2rk6z1y.js} +2 -2
- package/dist/{index-cw3j0pwy.js → index-ne2awfqp.js} +10 -1
- package/dist/{index-2m1j98fj.js → index-ypm4aa3h.js} +2 -2
- package/dist/{index-w8sv1v0j.js → index-ztjgymb9.js} +15 -6
- package/dist/index.js +30 -27
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/rpc-handlers.d.ts +4 -0
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/raw-ordinal-warmup-worker.js +2 -2
- package/dist/{recomp-orchestrator-sa4f2mkj.js → recomp-orchestrator-z0m2vgbe.js} +3 -3
- package/dist/{render-qkjgrg31.js → render-rf6dmb9v.js} +1 -1
- package/dist/{search-archive-cmfs3myg.js → search-archive-myb6n35b.js} +2 -2
- package/dist/{transform-postprocess-phase-ecrcsc2w.js → transform-postprocess-phase-r6t8m6qq.js} +3 -3
- package/dist/v2/{context-q846asea.js → context-f4v3ptyh.js} +140 -26
- 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/raw-ordinal-warmup-worker.js +2 -2
- package/dist/v2/{recomp-orchestrator-egbf57qa.js → recomp-orchestrator-14bek576.js} +2 -2
- package/dist/v2/{render-47vjswds.js → render-rw6tk2fj.js} +1 -1
- package/dist/v2/{search-archive-3tpaqkg4.js → search-archive-w33x2z9z.js} +2 -2
- package/dist/v2/{server-canf6f29.js → server-11rbew2r.js} +10 -1
- package/dist/v2/{server-4nh02tdw.js → server-ds7y8nmk.js} +1 -1
- package/dist/v2/{server-3jggqcpa.js → server-kya7jvx5.js} +2 -2
- package/dist/v2/{server-wb00e7b0.js → server-yspcz6v9.js} +2 -2
- package/dist/v2/server.js +2 -2
- package/dist/v2/{v2-archive-reader-x1yvzqs8.js → v2-archive-reader-cw9fm88j.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-5bccsgy0.js → wrapup-orchestrator-sk2zx55m.js} +14 -12
- package/dist/{v2-archive-reader-xnnwexnw.js → v2-archive-reader-42chk89p.js} +1 -1
- package/dist/{wrapup-orchestrator-yrpqmwc7.js → wrapup-orchestrator-4sfkj8z4.js} +4 -4
- package/package.json +1 -1
|
@@ -196,7 +196,7 @@ import {
|
|
|
196
196
|
snapRangeToCompartments,
|
|
197
197
|
getActiveCompartmentRun,
|
|
198
198
|
startCompartmentAgent
|
|
199
|
-
} from "./index-
|
|
199
|
+
} from "./index-k2rk6z1y.js";
|
|
200
200
|
import {
|
|
201
201
|
hasTrustedAbsoluteWall,
|
|
202
202
|
applyProvenInputFloor,
|
|
@@ -504,7 +504,7 @@ import {
|
|
|
504
504
|
retryPendingSessionCleanups,
|
|
505
505
|
retryPendingRustSessionCleanupsForProject,
|
|
506
506
|
requestPendingMaterialization,
|
|
507
|
-
|
|
507
|
+
hasExplicitRefreshRequest,
|
|
508
508
|
clearPendingMaterialization,
|
|
509
509
|
recordSystemPromptForRequest,
|
|
510
510
|
recordHeldHeadForRequest,
|
|
@@ -569,7 +569,7 @@ import {
|
|
|
569
569
|
GLOBAL_USER_PROFILE_PROJECT_PATH,
|
|
570
570
|
getProjectState,
|
|
571
571
|
bumpProjectUserProfileVersion
|
|
572
|
-
} from "./index-
|
|
572
|
+
} from "./index-ne2awfqp.js";
|
|
573
573
|
import {
|
|
574
574
|
getLastIndexedOrdinal
|
|
575
575
|
} from "./index-etm62gd7.js";
|
|
@@ -720,7 +720,7 @@ import {
|
|
|
720
720
|
import {
|
|
721
721
|
setRecompStarting2,
|
|
722
722
|
setRecompTerminal2
|
|
723
|
-
} from "./index-
|
|
723
|
+
} from "./index-h2w3kzkt.js";
|
|
724
724
|
import {
|
|
725
725
|
makeToolCompositeKey,
|
|
726
726
|
searchMessageHistoryOffThread,
|
|
@@ -805,7 +805,7 @@ import {
|
|
|
805
805
|
abortSessionFailClosed2,
|
|
806
806
|
evaluateEmergencyFailClosed2,
|
|
807
807
|
runPostTransformPhase2
|
|
808
|
-
} from "./index-
|
|
808
|
+
} from "./index-ztjgymb9.js";
|
|
809
809
|
import {
|
|
810
810
|
ANNOUNCEMENT_VERSION2,
|
|
811
811
|
ANNOUNCEMENT_FEATURES2,
|
|
@@ -823,10 +823,10 @@ import {
|
|
|
823
823
|
} from "./index-zt6d9fag.js";
|
|
824
824
|
import {
|
|
825
825
|
readV2ArchiveOffThread2
|
|
826
|
-
} from "./index-
|
|
826
|
+
} from "./index-ypm4aa3h.js";
|
|
827
827
|
import {
|
|
828
828
|
renderSearchArchiveOffThread2
|
|
829
|
-
} from "./index-
|
|
829
|
+
} from "./index-238xbkhk.js";
|
|
830
830
|
import {
|
|
831
831
|
COMPACTION_ENABLED_PATH,
|
|
832
832
|
isDreamerRunnable,
|
|
@@ -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") {
|
|
@@ -12780,6 +12784,28 @@ function resolveTrustedContextLimit(providerID, modelID, ctx) {
|
|
|
12780
12784
|
const persisted = modelMatchedPersistedUsage(ctx?.db, ctx?.sessionID, modelKey);
|
|
12781
12785
|
return isSaneLimit(persisted?.lastUsageContextLimit) ? persisted.lastUsageContextLimit : undefined;
|
|
12782
12786
|
}
|
|
12787
|
+
var WRAPUP_WINDOW_UNAVAILABLE = "Cannot run /ctx-wrapup: the model's context window is unknown. Select a model with a configured context window or send a message with that model, then retry.";
|
|
12788
|
+
function readPersistedWrapupWindow(db, sessionId, modelKey) {
|
|
12789
|
+
const { lastUsageContextLimit, lastObservedModelKey } = getOrCreateSessionMeta(db, sessionId);
|
|
12790
|
+
if (!isSaneLimit(lastUsageContextLimit) || !lastObservedModelKey)
|
|
12791
|
+
return;
|
|
12792
|
+
if (modelKey && piModelRefToCanonical(modelKey) !== piModelRefToCanonical(lastObservedModelKey))
|
|
12793
|
+
return;
|
|
12794
|
+
return { contextLimit: lastUsageContextLimit, modelKey: lastObservedModelKey };
|
|
12795
|
+
}
|
|
12796
|
+
function resolveOpenCodeWrapupWindow(db, sessionId, model) {
|
|
12797
|
+
const route = model ?? findLastAssistantModelFromOpenCodeDb(sessionId);
|
|
12798
|
+
const modelKey = resolveModelKey(route?.providerID, route?.modelID);
|
|
12799
|
+
if (modelKey) {
|
|
12800
|
+
const contextLimit = resolveTrustedContextLimit(route?.providerID, route?.modelID, {
|
|
12801
|
+
db,
|
|
12802
|
+
sessionID: sessionId
|
|
12803
|
+
});
|
|
12804
|
+
if (contextLimit !== undefined)
|
|
12805
|
+
return { contextLimit, modelKey };
|
|
12806
|
+
}
|
|
12807
|
+
return readPersistedWrapupWindow(db, sessionId, modelKey);
|
|
12808
|
+
}
|
|
12783
12809
|
var clampWarnSeen = new Set;
|
|
12784
12810
|
function isFinitePositive(v) {
|
|
12785
12811
|
return typeof v === "number" && Number.isFinite(v) && v > 0;
|
|
@@ -15044,7 +15070,13 @@ ${renderCapabilityRefusal("history_compression")}`;
|
|
|
15044
15070
|
/ctx-wrapup is unavailable because the historian handler is not configured.`;
|
|
15045
15071
|
} else {
|
|
15046
15072
|
result = await deps.executeWrapup(sessionId, {
|
|
15047
|
-
messagesToKeep: parsed.messagesToKeep
|
|
15073
|
+
messagesToKeep: parsed.messagesToKeep,
|
|
15074
|
+
..._params.providerId && _params.modelId ? {
|
|
15075
|
+
model: {
|
|
15076
|
+
providerID: _params.providerId,
|
|
15077
|
+
modelID: _params.modelId
|
|
15078
|
+
}
|
|
15079
|
+
} : {}
|
|
15048
15080
|
});
|
|
15049
15081
|
}
|
|
15050
15082
|
}
|
|
@@ -16538,7 +16570,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
16538
16570
|
const db = readDatabase();
|
|
16539
16571
|
if (!db)
|
|
16540
16572
|
return { ok: false, error: "db unavailable" };
|
|
16541
|
-
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-
|
|
16573
|
+
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-z0m2vgbe.js"));
|
|
16542
16574
|
const { sendIgnoredMessage } = await importPluginModule(() => import("./send-session-notification-ykvt5k2s.js"));
|
|
16543
16575
|
log2(`[rpc] recomp requested for session ${sessionId}`);
|
|
16544
16576
|
if (!args.client && !args.hiddenCompletionExecutor) {
|
|
@@ -16623,19 +16655,21 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
16623
16655
|
const db = readDatabase();
|
|
16624
16656
|
if (!db)
|
|
16625
16657
|
return { ok: false, error: "db unavailable" };
|
|
16626
|
-
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-
|
|
16627
|
-
const model = liveSessionState.liveModelBySession.get(sessionId);
|
|
16628
|
-
const
|
|
16658
|
+
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-4sfkj8z4.js"));
|
|
16659
|
+
const model = await args.readSelectedSessionModel?.(sessionId) ?? liveSessionState.liveModelBySession.get(sessionId);
|
|
16660
|
+
const window = resolveOpenCodeWrapupWindow(db, sessionId, model);
|
|
16661
|
+
if (!window)
|
|
16662
|
+
return { ok: false, error: WRAPUP_WINDOW_UNAVAILABLE };
|
|
16663
|
+
const { contextLimit, modelKey } = window;
|
|
16629
16664
|
const ctx = {
|
|
16630
16665
|
...await buildManagedCtx(db),
|
|
16631
16666
|
memoryInjectionBudgetTokens: config.memory?.injection_budget_tokens,
|
|
16632
16667
|
contextLimit,
|
|
16633
|
-
executeThresholdPercentage: resolveExecuteThresholdDetail(config.execute_threshold_percentage ?? 65,
|
|
16668
|
+
executeThresholdPercentage: resolveExecuteThresholdDetail(config.execute_threshold_percentage ?? 65, modelKey, 65, {
|
|
16634
16669
|
tokensConfig: config.execute_threshold_tokens,
|
|
16635
16670
|
contextLimit,
|
|
16636
16671
|
sessionId
|
|
16637
|
-
}).percentage
|
|
16638
|
-
hasPendingNaturalBust: (sid) => liveSessionState.historyRefreshSessions.has(sid) || liveSessionState.systemPromptRefreshSessions.has(sid) || liveSessionState.pendingMaterializationSessions.has(sid)
|
|
16672
|
+
}).percentage
|
|
16639
16673
|
};
|
|
16640
16674
|
log2(`[rpc] wrapup requested for session ${sessionId} (keep ${messagesToKeep})`);
|
|
16641
16675
|
args.prepareHistorySession?.(sessionId);
|
|
@@ -16801,6 +16835,7 @@ var canonicalReasons = new Set([
|
|
|
16801
16835
|
"ttl_idle",
|
|
16802
16836
|
"explicit_flush",
|
|
16803
16837
|
"user_flush",
|
|
16838
|
+
"user_wrapup",
|
|
16804
16839
|
"fit_retry",
|
|
16805
16840
|
"pending_materialization",
|
|
16806
16841
|
"variant_change",
|
|
@@ -25698,7 +25733,7 @@ Historian previously failed ${historianFailureState.failureCount} time(s), so Ma
|
|
|
25698
25733
|
}, {
|
|
25699
25734
|
hardFold: false,
|
|
25700
25735
|
force: contextUsageEarly.percentage >= forceMaterializationPercentage && (contextUsageEarly.percentage >= 95 || getEmergencyInputSample(db, sessionId) === 0),
|
|
25701
|
-
explicitFlush:
|
|
25736
|
+
explicitFlush: hasExplicitRefreshRequest(deps.pendingMaterializationSessions, sessionId),
|
|
25702
25737
|
publishedHistory: isCacheBusting,
|
|
25703
25738
|
permission: {
|
|
25704
25739
|
signedThinkingHold: activeThinkingPrefixHold,
|
|
@@ -26093,7 +26128,7 @@ Historian previously failed ${historianFailureState.failureCount} time(s), so Ma
|
|
|
26093
26128
|
signedThinkingHoldCapPercentage: !compactionOff && signedThinkingHold?.held === true ? signedThinkingHold.capPercentage : undefined,
|
|
26094
26129
|
firstRender: servesHead && !(sessionMeta.cachedM0Bytes != null && sessionMeta.cachedM1Bytes != null) && !hasCompleteCachedM0M1(db, sessionId),
|
|
26095
26130
|
folds: protectionFoldWillBust,
|
|
26096
|
-
explicitFlush:
|
|
26131
|
+
explicitFlush: hasExplicitRefreshRequest(deps.pendingMaterializationSessions, sessionId),
|
|
26097
26132
|
materializationRequested: deps.pendingMaterializationSessions.has(sessionId) || canConsumeDeferredLate && deferredMaterializationSessions.has(sessionId),
|
|
26098
26133
|
historyRebuilt: historyRebuiltThisPass || pendingCompartmentInjection?.rebuiltFromDb === true || rebuiltHistoryFromInitialPrepare,
|
|
26099
26134
|
alreadyRanThisTurn: heuristicsAlreadyRanThisTurn(deps.lastHeuristicsTurnId, sessionId, currentTurnId)
|
|
@@ -30707,4 +30742,4 @@ function applyHiddenSubagentTemperature(input, output, log) {
|
|
|
30707
30742
|
output.temperature = temperature;
|
|
30708
30743
|
}
|
|
30709
30744
|
|
|
30710
|
-
export { logConfigDependencyNotesOnce, openOpenCodeDb, DREAMER_SYSTEM_PROMPT, runSessionProjectBackfill, SMART_NOTE_COMPILER_SYSTEM_PROMPT, createLiveSessionState, RETROSPECTIVE_MAX_USER_MESSAGE_CHARS, RETROSPECTIVE_MESSAGE_TRUNCATION_MARKER, OpenCodeRetrospectiveRawProvider, createDreamTaskExecutor, runManualDream, runDueTasksForProject, startDreamScheduleTimer, createDreamTimerModuleClient, ensureProjectRegisteredFromOpenCodeDirectory, recordOpenCodeProvenInputFloor, resolveOpenCodeProvenInputFloor, resolveContextWindowGeometry, resolveContextLimit, resolveExecuteThresholdDetail, resolveModelKey, resolveSessionId, parseCacheTtl, createScheduler, computeHardCacheExpired, describeStorageUnavailability, resolveSessionCacheTtl, runEmbedHistoryDrain, pauseEmbedHistoryDrain, formatEmbedStatusText, getSessionProperties, getSessionCreatedInfo, getMessageUpdatedAssistantInfo, getMessageUpdatedInfo, getSessionErrorInfo, getMessageRemovedInfo, summarizeManualDream, createMagicContextCommandHandler, getLiveNotificationParams, createChatMessageHook, createEventHook, createCommandExecuteBeforeHook, createToolExecuteAfterHook, recordHiddenVariantWarning, buildStatusDetail, isDebugRpcEnabled, registerRpcHandlers, maybeAutoEmbedSessionBackfill, clearTransformDecisionSession, scheduleOpenCodeTransformDecisionWrite, stageOpenCodeV2TransformDecision, bindOpenCodeV2TransformDecision, maybeDeliverChannel2, createM0RenderOptions, lkgReplayLimit, measureLkgReplay, STORAGE_BUSY_MESSAGE, StorageBusyRefusalError, bindSystemDateRequestIdentity, bindSystemDateOutput, registerSystemDateRefresh, rustWrapupHistorianFields, isClearlyOverWindow, UnmanagedOverWindowError, UnresolvedHistoryBoundaryError, clearMessageTokensCache, createTransform, createSubcModuleClient, createModuleToolBackends, createRustRefusalRecovery, createSystemPromptHashHandler, tryMessagesTransformLkgReplay, createMessagesTransformHandler, primaryOnlyToolIds, subagentToolRefusal, guardSubagentTools, hideSubagentTools, removePrimaryOnlyTools, storedSubagentMode, createCtxExpandTools, CTX_MEMORY_LIST_TOOL_NAME, CTX_MEMORY_ACTIONS, createCtxMemoryTools, createCtxMemoryListTools, CTX_NOTE_DESCRIPTION, withoutSmartNoteText, createCtxNoteTools, createCtxReduceTools, createCtxSearchTools, parameterDescriptionsFor, applyJsonSchemaParameterDescriptions, MagicContextRpcServer, subagentTemperature, applyHiddenSubagentTemperature };
|
|
30745
|
+
export { logConfigDependencyNotesOnce, openOpenCodeDb, DREAMER_SYSTEM_PROMPT, runSessionProjectBackfill, SMART_NOTE_COMPILER_SYSTEM_PROMPT, createLiveSessionState, RETROSPECTIVE_MAX_USER_MESSAGE_CHARS, RETROSPECTIVE_MESSAGE_TRUNCATION_MARKER, OpenCodeRetrospectiveRawProvider, createDreamTaskExecutor, runManualDream, runDueTasksForProject, startDreamScheduleTimer, createDreamTimerModuleClient, ensureProjectRegisteredFromOpenCodeDirectory, recordOpenCodeProvenInputFloor, resolveOpenCodeProvenInputFloor, resolveContextWindowGeometry, resolveContextLimit, WRAPUP_WINDOW_UNAVAILABLE, resolveOpenCodeWrapupWindow, resolveExecuteThresholdDetail, resolveModelKey, resolveSessionId, parseCacheTtl, createScheduler, computeHardCacheExpired, describeStorageUnavailability, resolveSessionCacheTtl, runEmbedHistoryDrain, pauseEmbedHistoryDrain, formatEmbedStatusText, getSessionProperties, getSessionCreatedInfo, getMessageUpdatedAssistantInfo, getMessageUpdatedInfo, getSessionErrorInfo, getMessageRemovedInfo, summarizeManualDream, createMagicContextCommandHandler, getLiveNotificationParams, createChatMessageHook, createEventHook, createCommandExecuteBeforeHook, createToolExecuteAfterHook, recordHiddenVariantWarning, buildStatusDetail, isDebugRpcEnabled, registerRpcHandlers, maybeAutoEmbedSessionBackfill, clearTransformDecisionSession, scheduleOpenCodeTransformDecisionWrite, stageOpenCodeV2TransformDecision, bindOpenCodeV2TransformDecision, maybeDeliverChannel2, createM0RenderOptions, lkgReplayLimit, measureLkgReplay, STORAGE_BUSY_MESSAGE, StorageBusyRefusalError, bindSystemDateRequestIdentity, bindSystemDateOutput, registerSystemDateRefresh, rustWrapupHistorianFields, isClearlyOverWindow, UnmanagedOverWindowError, UnresolvedHistoryBoundaryError, clearMessageTokensCache, createTransform, createSubcModuleClient, createModuleToolBackends, createRustRefusalRecovery, createSystemPromptHashHandler, tryMessagesTransformLkgReplay, createMessagesTransformHandler, primaryOnlyToolIds, subagentToolRefusal, guardSubagentTools, hideSubagentTools, removePrimaryOnlyTools, storedSubagentMode, createCtxExpandTools, CTX_MEMORY_LIST_TOOL_NAME, CTX_MEMORY_ACTIONS, createCtxMemoryTools, createCtxMemoryListTools, CTX_NOTE_DESCRIPTION, withoutSmartNoteText, createCtxNoteTools, createCtxReduceTools, createCtxSearchTools, parameterDescriptionsFor, applyJsonSchemaParameterDescriptions, MagicContextRpcServer, subagentTemperature, applyHiddenSubagentTemperature };
|
|
@@ -7,8 +7,9 @@ import {
|
|
|
7
7
|
renewCompartmentLease,
|
|
8
8
|
releaseCompartmentLeaseBestEffort,
|
|
9
9
|
getCompartments,
|
|
10
|
-
getLastCompartmentEndMessage
|
|
11
|
-
|
|
10
|
+
getLastCompartmentEndMessage,
|
|
11
|
+
requestPendingMaterialization
|
|
12
|
+
} from "./index-ne2awfqp.js";
|
|
12
13
|
import {
|
|
13
14
|
inRootAsyncContext2
|
|
14
15
|
} from "./index-gzy5w8ya.js";
|
|
@@ -34,14 +35,14 @@ import {
|
|
|
34
35
|
getActiveCompartmentRun,
|
|
35
36
|
markActiveCompartmentRunPublished,
|
|
36
37
|
registerActiveCompartmentRun
|
|
37
|
-
} from "./index-
|
|
38
|
+
} from "./index-k2rk6z1y.js";
|
|
38
39
|
import {
|
|
39
40
|
sendStatusNotification2
|
|
40
41
|
} from "./index-1sq1krqw.js";
|
|
41
42
|
import {
|
|
42
43
|
setRecompStarting2,
|
|
43
44
|
setRecompTerminal2
|
|
44
|
-
} from "./index-
|
|
45
|
+
} from "./index-h2w3kzkt.js";
|
|
45
46
|
|
|
46
47
|
// src/hooks/magic-context/wrapup-orchestrator.ts
|
|
47
48
|
import * as crypto from "node:crypto";
|
|
@@ -80,11 +81,6 @@ function formatAlreadyRunningMessage(state) {
|
|
|
80
81
|
const through = state.lastCompartmentEnd > 0 ? ` through message ${state.lastCompartmentEnd}` : "";
|
|
81
82
|
return `/ctx-wrapup is already running for this session${chunk}${through}. Wait for it to finish, then run /ctx-wrapup again if more history remains.`;
|
|
82
83
|
}
|
|
83
|
-
function appendFlushHint(ctx, sessionId, message) {
|
|
84
|
-
if (ctx.hasPendingNaturalBust?.(sessionId))
|
|
85
|
-
return message;
|
|
86
|
-
return `${message} If you want it applied on the very next message, run /ctx-flush first.`;
|
|
87
|
-
}
|
|
88
84
|
function buildPlan(ctx, sessionId, messagesToKeep, anchorRawMessageCount) {
|
|
89
85
|
return resolveWrapupProtectedTailBoundary({
|
|
90
86
|
db: ctx.db,
|
|
@@ -270,8 +266,8 @@ ${message}`;
|
|
|
270
266
|
|
|
271
267
|
${message}`;
|
|
272
268
|
}
|
|
273
|
-
|
|
274
|
-
|
|
269
|
+
let startLastEnd = getLastCompartmentEndMessage(ctx.db, sessionId);
|
|
270
|
+
let startCompartmentCount = getCompartments(ctx.db, sessionId).length;
|
|
275
271
|
let chunkIndex = 0;
|
|
276
272
|
let lastEnd = startLastEnd;
|
|
277
273
|
let stoppedForFailure = false;
|
|
@@ -315,6 +311,9 @@ ${message}`;
|
|
|
315
311
|
if (activeAtStart === "timeout") {
|
|
316
312
|
stoppedForFailure = true;
|
|
317
313
|
stoppedReason = "Timed out waiting for the active historian run.";
|
|
314
|
+
} else {
|
|
315
|
+
startLastEnd = lastEnd = getLastCompartmentEndMessage(ctx.db, sessionId);
|
|
316
|
+
startCompartmentCount = getCompartments(ctx.db, sessionId).length;
|
|
318
317
|
}
|
|
319
318
|
if (!stoppedForFailure) {
|
|
320
319
|
try {
|
|
@@ -422,8 +421,11 @@ ${message}`;
|
|
|
422
421
|
try {
|
|
423
422
|
clearEmergencyRecovery(ctx.db, sessionId);
|
|
424
423
|
} catch {}
|
|
425
|
-
|
|
426
|
-
|
|
424
|
+
let message = `Wrapped up ${messagesWrapped} messages into ${compartmentsCreated} compartments.`;
|
|
425
|
+
if (compartmentsCreated > 0) {
|
|
426
|
+
requestPendingMaterialization(ctx.liveSessionState.pendingMaterializationSessions, sessionId, "user_wrapup");
|
|
427
|
+
message += " The compacted history applies on your next message, or on the next rebuild if the host restarts first.";
|
|
428
|
+
}
|
|
427
429
|
setRecompTerminal2(ctx.liveSessionState, sessionId, "done", message);
|
|
428
430
|
return message;
|
|
429
431
|
}
|
|
@@ -7,10 +7,10 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
requestPendingMaterialization,
|
|
9
9
|
dropSlot
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-ne2awfqp.js";
|
|
11
11
|
import {
|
|
12
12
|
executeContextRecomp
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-k2rk6z1y.js";
|
|
14
14
|
import {
|
|
15
15
|
renderUserFacingFailure,
|
|
16
16
|
userFacingFailureCode
|
|
@@ -201,7 +201,7 @@ import {
|
|
|
201
201
|
getProjectState,
|
|
202
202
|
recordSubagentInvocation,
|
|
203
203
|
getLatestHistorianInvocationId
|
|
204
|
-
} from "./index-
|
|
204
|
+
} from "./index-ne2awfqp.js";
|
|
205
205
|
import {
|
|
206
206
|
clearCompressionDepth,
|
|
207
207
|
clearCompressionDepthRange,
|
|
@@ -12587,7 +12587,7 @@ function injectM0M1(options) {
|
|
|
12587
12587
|
const M1_ABSOLUTE_CAP_RATIO = 0.2;
|
|
12588
12588
|
const m1AbsoluteBudget = (options.historyBudgetTokens ?? DEFAULT_HISTORY_BUDGET_TOKENS) * M1_ABSOLUTE_CAP_RATIO;
|
|
12589
12589
|
let driftNeedsRefold = false;
|
|
12590
|
-
if (!rematerialized && !contentionExhausted && m1Recomputed && options.isCacheBustingPass) {
|
|
12590
|
+
if (!rematerialized && !contentionExhausted && m1Recomputed && options.isCacheBustingPass && !options.skipPressureRefold) {
|
|
12591
12591
|
driftNeedsRefold = memoryUpdateCount > 40;
|
|
12592
12592
|
if (!driftNeedsRefold && m1Text !== M1_EMPTY_PLACEHOLDER) {
|
|
12593
12593
|
const m1Tokens = estimateTokens(m1Text);
|
|
@@ -1630,11 +1630,20 @@ function pendingMaterializationOrigin(sessions, sessionId) {
|
|
|
1630
1630
|
function hasPendingMaterializationOrigin(sessions, sessionId, origin) {
|
|
1631
1631
|
return sessions.has(sessionId) && causes.get(sessions)?.get(sessionId)?.has(origin) === true;
|
|
1632
1632
|
}
|
|
1633
|
+
function hasExplicitRefreshRequest(sessions, sessionId) {
|
|
1634
|
+
return hasPendingMaterializationOrigin(sessions, sessionId, "user_flush") || hasPendingMaterializationOrigin(sessions, sessionId, "user_wrapup");
|
|
1635
|
+
}
|
|
1633
1636
|
function clearPendingMaterialization(sessions, sessionId) {
|
|
1634
1637
|
sessions.delete(sessionId);
|
|
1635
1638
|
origins.get(sessions)?.delete(sessionId);
|
|
1636
1639
|
causes.get(sessions)?.delete(sessionId);
|
|
1637
1640
|
}
|
|
1641
|
+
function clearReclaimedMaterialization(sessions, sessionId) {
|
|
1642
|
+
const wrapupPending = hasPendingMaterializationOrigin(sessions, sessionId, "user_wrapup");
|
|
1643
|
+
clearPendingMaterialization(sessions, sessionId);
|
|
1644
|
+
if (wrapupPending)
|
|
1645
|
+
requestPendingMaterialization(sessions, sessionId, "user_wrapup");
|
|
1646
|
+
}
|
|
1638
1647
|
function clearPendingMaterializationOrigin(sessions, sessionId, origin) {
|
|
1639
1648
|
const pendingCauses = causes.get(sessions)?.get(sessionId);
|
|
1640
1649
|
if (!sessions.has(sessionId) || !pendingCauses?.has(origin))
|
|
@@ -5187,4 +5196,4 @@ var ERROR_CLASSES = new Set([
|
|
|
5187
5196
|
"permission_denied",
|
|
5188
5197
|
"unknown"
|
|
5189
5198
|
]);
|
|
5190
|
-
export { advanceSessionActivity, observeSessionActivity, backfillSessionActivity, COMPARTMENT_LEASE_RENEWAL_MS, getCompartmentLeaseBlocker, acquireCompartmentLease, renewCompartmentLease, releaseCompartmentLease, releaseCompartmentLeaseBestEffort, isCompartmentLeaseHeld, isNoContentCompartment, queueM0Mutation, getMaxM0MutationId, getCompartments, getNewestCompartmentIds, getLastCompartmentEndMessage, getLastCompartmentEndMessageId, getCompartmentsByEndMessageId, appendCompartments, buildCompartmentBlock, saveRecompStagingPass, getRecompStaging, clearRecompStaging, getRecompPartialRange, setRecompPartialRange, escapeXmlAttr, escapeXmlContent, getUncoveredCompartmentEndsThrough, isPartialCompartmentEnd, readProjectDocsCanonical, readServerFallbackUsage, providerResponseFailed, isSuccessfulProviderCompletion, LkgRecoveryFenceError, lkgServedArrayDigest, hasCleanLkgRecoveryFence, dirtyLkgRecoveryRevision, ownsLkgDirtyFence, invalidateCleanLkgRecoveryFence, prepareLkgCaptureFence, certifyCommittedLkgCapture, markLkgRecoveryDirty, rememberUnpublishedAutoSearchNoHint, getUnpublishedAutoSearchNoHint, forgetUnpublishedAutoSearchNoHint, registerAutoSearchWork, cancelAutoSearchWork, readSessionMeta, getOrCreateSessionMeta, updateSessionMeta, advanceToolReclaimWatermark, markSessionCleanupPending, retryPendingSessionCleanups, retryPendingRustSessionCleanupsForProject, clearSession, requestPendingMaterialization, pendingMaterializationOrigin, hasPendingMaterializationOrigin, clearPendingMaterialization, clearPendingMaterializationOrigin, recordSystemPromptForRequest, recordHeldHeadForRequest, bindSystemPromptResponse, isHeldHeadForRequest, deferDeliveredSystemRefresh, retirePendingSystemPromptDelivery, lkgProviderInputTotal, beginV2LkgRequest, claimLkgRequestIdentity, currentLkgRequestIdentity, noteCapturedLkgRequest, noteLkgProviderResponse, measuredLkgPrefix, clearLkgMeasuredRequest, saveLkgSlotToDb, clearPersistedLkgSlotStrict, loadPersistedLkgSlot, drainStaleLkgSlots, createDbLkgPersistence, resolveLkgModelKeys, createLkgEntryProjector, captureLkgSlot, validateAnthropicReasoningRuns, validateLkgSeam, replayLkg, coldStartRawServedIndex, coldStartUncapturedReplay, noteUncertifiedNormalLkg, hasProcessLocalLkgProof, lkgDirtyRevision, rememberLkgDirtyRevision, readPersistedLkgUntaggedInputIds, persistLkgUntaggedInputIds, noteLkgRecoveryPrefix, readLkgRecoveryPrefix, noteLkgHealthyPrefix, lkgRecoveryReplayUnproven, lkgRecoveryEntryUnproven, beginServedRequest, noteServedPassPermission, noteServedModel, noteServedReplay, noteServedHostInput, noteServedRefusal, countServedRefusal, dropServedRecord, forgetServedRecord, commitServedRequest, lkgInputIdentity, registerLkgPersistence, beginLkgPass, visitMessageContentFields, contentSnapshotValue, messageContentFields, signatureForFields, exactReusablePrefix, incrementalLkgContentDigests, lkgContentDigest, lkgSlotRejection, captureSlot, getInMemorySlot, getSlot, forgetInMemorySlot, dropSlot, noteEntry, getLkgSlotHeapStats, TOOL_SWEEP_SCOPED_MARKER, useScopedToolSweep, createPreAdoptionToolSweepResolver, copySessionStateForClone, externalHistorianFailureReason, getRecentFailedHistorianRunTimes, recordHistorianRun, summarizeImportance, tallyFactsByCategory, MEMORY_VISIBILITY_MUTATION_CATEGORY, queueMemoryMutation, getMemoryMutationsForRender, getMemoryMutationsForRenderByProjects, getMaxMemoryMutationId, getMaxMemoryMutationIdForProjects, GLOBAL_USER_PROFILE_PROJECT_PATH, getProjectState, bumpProjectUserProfileVersion, saveSourceContent, replaceSourceContent, getSourceContents, recordSubagentInvocation, getLatestHistorianInvocationId };
|
|
5199
|
+
export { advanceSessionActivity, observeSessionActivity, backfillSessionActivity, COMPARTMENT_LEASE_RENEWAL_MS, getCompartmentLeaseBlocker, acquireCompartmentLease, renewCompartmentLease, releaseCompartmentLease, releaseCompartmentLeaseBestEffort, isCompartmentLeaseHeld, isNoContentCompartment, queueM0Mutation, getMaxM0MutationId, getCompartments, getNewestCompartmentIds, getLastCompartmentEndMessage, getLastCompartmentEndMessageId, getCompartmentsByEndMessageId, appendCompartments, buildCompartmentBlock, saveRecompStagingPass, getRecompStaging, clearRecompStaging, getRecompPartialRange, setRecompPartialRange, escapeXmlAttr, escapeXmlContent, getUncoveredCompartmentEndsThrough, isPartialCompartmentEnd, readProjectDocsCanonical, readServerFallbackUsage, providerResponseFailed, isSuccessfulProviderCompletion, LkgRecoveryFenceError, lkgServedArrayDigest, hasCleanLkgRecoveryFence, dirtyLkgRecoveryRevision, ownsLkgDirtyFence, invalidateCleanLkgRecoveryFence, prepareLkgCaptureFence, certifyCommittedLkgCapture, markLkgRecoveryDirty, rememberUnpublishedAutoSearchNoHint, getUnpublishedAutoSearchNoHint, forgetUnpublishedAutoSearchNoHint, registerAutoSearchWork, cancelAutoSearchWork, readSessionMeta, getOrCreateSessionMeta, updateSessionMeta, advanceToolReclaimWatermark, markSessionCleanupPending, retryPendingSessionCleanups, retryPendingRustSessionCleanupsForProject, clearSession, requestPendingMaterialization, pendingMaterializationOrigin, hasPendingMaterializationOrigin, hasExplicitRefreshRequest, clearPendingMaterialization, clearReclaimedMaterialization, clearPendingMaterializationOrigin, recordSystemPromptForRequest, recordHeldHeadForRequest, bindSystemPromptResponse, isHeldHeadForRequest, deferDeliveredSystemRefresh, retirePendingSystemPromptDelivery, lkgProviderInputTotal, beginV2LkgRequest, claimLkgRequestIdentity, currentLkgRequestIdentity, noteCapturedLkgRequest, noteLkgProviderResponse, measuredLkgPrefix, clearLkgMeasuredRequest, saveLkgSlotToDb, clearPersistedLkgSlotStrict, loadPersistedLkgSlot, drainStaleLkgSlots, createDbLkgPersistence, resolveLkgModelKeys, createLkgEntryProjector, captureLkgSlot, validateAnthropicReasoningRuns, validateLkgSeam, replayLkg, coldStartRawServedIndex, coldStartUncapturedReplay, noteUncertifiedNormalLkg, hasProcessLocalLkgProof, lkgDirtyRevision, rememberLkgDirtyRevision, readPersistedLkgUntaggedInputIds, persistLkgUntaggedInputIds, noteLkgRecoveryPrefix, readLkgRecoveryPrefix, noteLkgHealthyPrefix, lkgRecoveryReplayUnproven, lkgRecoveryEntryUnproven, beginServedRequest, noteServedPassPermission, noteServedModel, noteServedReplay, noteServedHostInput, noteServedRefusal, countServedRefusal, dropServedRecord, forgetServedRecord, commitServedRequest, lkgInputIdentity, registerLkgPersistence, beginLkgPass, visitMessageContentFields, contentSnapshotValue, messageContentFields, signatureForFields, exactReusablePrefix, incrementalLkgContentDigests, lkgContentDigest, lkgSlotRejection, captureSlot, getInMemorySlot, getSlot, forgetInMemorySlot, dropSlot, noteEntry, getLkgSlotHeapStats, TOOL_SWEEP_SCOPED_MARKER, useScopedToolSweep, createPreAdoptionToolSweepResolver, copySessionStateForClone, externalHistorianFailureReason, getRecentFailedHistorianRunTimes, recordHistorianRun, summarizeImportance, tallyFactsByCategory, MEMORY_VISIBILITY_MUTATION_CATEGORY, queueMemoryMutation, getMemoryMutationsForRender, getMemoryMutationsForRenderByProjects, getMaxMemoryMutationId, getMaxMemoryMutationIdForProjects, GLOBAL_USER_PROFILE_PROJECT_PATH, getProjectState, bumpProjectUserProfileVersion, saveSourceContent, replaceSourceContent, getSourceContents, recordSubagentInvocation, getLatestHistorianInvocationId };
|
|
@@ -140,8 +140,8 @@ async function serveV2ArchiveReads2(port, openConnections) {
|
|
|
140
140
|
import("./store-reader-3eh1s1m8.js"),
|
|
141
141
|
import("./store-h2a1g3wh.js"),
|
|
142
142
|
import("./read-session-chunk-9jtq1swq.js"),
|
|
143
|
-
import("./render-
|
|
144
|
-
import("./search-archive-
|
|
143
|
+
import("./render-rf6dmb9v.js"),
|
|
144
|
+
import("./search-archive-myb6n35b.js"),
|
|
145
145
|
import("./expand-attachments-h33jbgyz.js")
|
|
146
146
|
]);
|
|
147
147
|
const pool = new V2StoreReaderPool;
|
|
@@ -216,7 +216,8 @@ import {
|
|
|
216
216
|
requestPendingMaterialization,
|
|
217
217
|
pendingMaterializationOrigin,
|
|
218
218
|
hasPendingMaterializationOrigin,
|
|
219
|
-
|
|
219
|
+
hasExplicitRefreshRequest,
|
|
220
|
+
clearReclaimedMaterialization,
|
|
220
221
|
clearPendingMaterializationOrigin,
|
|
221
222
|
noteServedPassPermission,
|
|
222
223
|
dropSlot,
|
|
@@ -224,7 +225,7 @@ import {
|
|
|
224
225
|
saveSourceContent,
|
|
225
226
|
replaceSourceContent,
|
|
226
227
|
getSourceContents
|
|
227
|
-
} from "./index-
|
|
228
|
+
} from "./index-ne2awfqp.js";
|
|
228
229
|
import {
|
|
229
230
|
cleanSearchText,
|
|
230
231
|
matchedSearchSnippet
|
|
@@ -284,7 +285,7 @@ import {
|
|
|
284
285
|
peekNoteNudgeText,
|
|
285
286
|
markNoteNudgeDelivered,
|
|
286
287
|
getActiveCompartmentRun
|
|
287
|
-
} from "./index-
|
|
288
|
+
} from "./index-k2rk6z1y.js";
|
|
288
289
|
import {
|
|
289
290
|
getErrorMessage
|
|
290
291
|
} from "./index-y8v6yerm.js";
|
|
@@ -6999,6 +7000,7 @@ async function runPostTransformPhase2(args) {
|
|
|
6999
7000
|
const pendingMaterializationAtPassStart = args.pendingMaterializationSessions.has(args.sessionId);
|
|
7000
7001
|
beginHostCheckpointPass(args.sessionId, args.pendingMaterializationSessions);
|
|
7001
7002
|
const pendingOrigin = pendingMaterializationOrigin(args.pendingMaterializationSessions, args.sessionId);
|
|
7003
|
+
const wrapupPending = hasPendingMaterializationOrigin(args.pendingMaterializationSessions, args.sessionId, "user_wrapup");
|
|
7002
7004
|
const deferredMaterializationAtPassStart = args.deferredMaterializationSessions.has(args.sessionId);
|
|
7003
7005
|
let isExplicitFlush = pendingMaterializationAtPassStart;
|
|
7004
7006
|
const deferredMaterializationWasPending = deferredMaterializationAtPassStart;
|
|
@@ -7191,6 +7193,7 @@ async function runPostTransformPhase2(args) {
|
|
|
7191
7193
|
historyBudgetPolicyIdentity: args.m0M1.historyBudgetPolicyIdentity,
|
|
7192
7194
|
temporalAwareness: args.m0M1.temporalAwareness,
|
|
7193
7195
|
isCacheBustingPass: true,
|
|
7196
|
+
skipPressureRefold: wrapupPending,
|
|
7194
7197
|
contentionFallbackPrefix: cachedPrefixBeforePreflight,
|
|
7195
7198
|
allowFreshContentionFallback: forceMaterialization || emergencyDropEligible,
|
|
7196
7199
|
hardSignals: args.m0M1.hardSignals,
|
|
@@ -7299,7 +7302,7 @@ async function runPostTransformPhase2(args) {
|
|
|
7299
7302
|
fromEstimate: args.contextUsageFromEstimate === true,
|
|
7300
7303
|
emergencySample: () => getEmergencyInputSample(args.db, args.sessionId)
|
|
7301
7304
|
}),
|
|
7302
|
-
explicitFlush: isExplicitFlush &&
|
|
7305
|
+
explicitFlush: isExplicitFlush && hasExplicitRefreshRequest(args.pendingMaterializationSessions, args.sessionId),
|
|
7303
7306
|
publishedHistory: !prefixPreflightFailed && (publishedM1RefreshedThisPass || !m0M1EnabledForFold && (args.pendingCompartmentInjection?.compartmentCount ?? 0) > 0 && legacyPublishedHeadChanged(args))
|
|
7304
7307
|
};
|
|
7305
7308
|
const protectedToolTags = protectedToolTagNumbers(args.tags, args.protectedTools);
|
|
@@ -7741,7 +7744,7 @@ async function runPostTransformPhase2(args) {
|
|
|
7741
7744
|
heuristicOrReasoningEditBesidesTrim = heuristicMutationCount + clearedReasoning + strippedInline > 0;
|
|
7742
7745
|
droppedCount += clearedReasoning + strippedInline + removedReasoningMessages;
|
|
7743
7746
|
if (pendingMaterializationAtPassStart && !freezeM0M1 && !pendingOps.some((op) => newTargets.get(op.tagId)?.thinkingDropProtected)) {
|
|
7744
|
-
|
|
7747
|
+
clearReclaimedMaterialization(args.pendingMaterializationSessions, args.sessionId);
|
|
7745
7748
|
}
|
|
7746
7749
|
if (args.currentTurnId) {
|
|
7747
7750
|
args.lastHeuristicsTurnId.set(args.sessionId, args.currentTurnId);
|
|
@@ -7947,6 +7950,7 @@ async function runPostTransformPhase2(args) {
|
|
|
7947
7950
|
historyBudgetPolicyIdentity: args.m0M1.historyBudgetPolicyIdentity,
|
|
7948
7951
|
temporalAwareness: args.m0M1.temporalAwareness,
|
|
7949
7952
|
isCacheBustingPass: isCacheBustingPass && !freezeM0M1,
|
|
7953
|
+
skipPressureRefold: wrapupPending,
|
|
7950
7954
|
preparedPrefix,
|
|
7951
7955
|
prefixTrimSourceOrder: args.prefixTrimSourceOrder,
|
|
7952
7956
|
allowFreshContentionFallback: forceMaterialization || emergencyDropEligible,
|
|
@@ -8061,8 +8065,13 @@ async function runPostTransformPhase2(args) {
|
|
|
8061
8065
|
logTransformTiming(args.sessionId, "pp.nudgeAndSticky", tNudgeBlock);
|
|
8062
8066
|
const tMarker = performance.now();
|
|
8063
8067
|
const explicitRebuildHappened = args.historyRefreshExplicitBeforePrepare && args.rebuiltHistoryFromInitialPrepare;
|
|
8068
|
+
const wrapupServed = wrapupPending && isCacheBustingPass && !freezeM0M1 && deliveredPrefix?.injected === true && !deliveredPrefix.materializationContentionRetryExhausted;
|
|
8069
|
+
if (wrapupServed) {
|
|
8070
|
+
clearPendingMaterializationOrigin(args.pendingMaterializationSessions, args.sessionId, "user_wrapup");
|
|
8071
|
+
}
|
|
8064
8072
|
const materializationSatisfied = !deferredMaterializationWasPending || explicitMaterializedSuccessfully || deferredMaterializedSuccessfully;
|
|
8065
|
-
const
|
|
8073
|
+
const wrapupTrimProven = wrapupServed && (deliveredPrefix?.prefixTrimStatus === "applied" || deliveredPrefix?.prefixTrimStatus === "boundary-precedes-window");
|
|
8074
|
+
const historyWasConsumedThisPass = wrapupTrimProven || (!m0M1Enabled || deliveredPrefix?.injected === true && !deliveredPrefix.materializationContentionRetryExhausted) && args.historyRebuiltThisPass && (args.canConsumeDeferredLate || args.phaseJustAwaitedPublication || explicitRebuildHappened) && materializationSatisfied;
|
|
8066
8075
|
let suppressV12HistoryDrain = false;
|
|
8067
8076
|
let persistedCompactionMarkerState = replaySnapshot?.compactionMarker ?? null;
|
|
8068
8077
|
let markerDrainChangedServedRow = false;
|
package/dist/index.js
CHANGED
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
checkCompactionMarkerConsistency,
|
|
59
59
|
clearInjectionCache,
|
|
60
60
|
clearNoteNudgeTriggerOnly
|
|
61
|
-
} from "./index-
|
|
61
|
+
} from "./index-k2rk6z1y.js";
|
|
62
62
|
import"./index-sd3egckz.js";
|
|
63
63
|
import {
|
|
64
64
|
hasTrustedAbsoluteWall,
|
|
@@ -93,6 +93,8 @@ import {
|
|
|
93
93
|
resolveOpenCodeProvenInputFloor,
|
|
94
94
|
resolveContextWindowGeometry,
|
|
95
95
|
resolveContextLimit,
|
|
96
|
+
WRAPUP_WINDOW_UNAVAILABLE,
|
|
97
|
+
resolveOpenCodeWrapupWindow,
|
|
96
98
|
resolveExecuteThresholdDetail,
|
|
97
99
|
resolveModelKey,
|
|
98
100
|
resolveSessionId,
|
|
@@ -143,7 +145,7 @@ import {
|
|
|
143
145
|
parameterDescriptionsFor,
|
|
144
146
|
MagicContextRpcServer,
|
|
145
147
|
applyHiddenSubagentTemperature
|
|
146
|
-
} from "./index-
|
|
148
|
+
} from "./index-6qqc8ef2.js";
|
|
147
149
|
import {
|
|
148
150
|
resolveOpenCodeDbPath,
|
|
149
151
|
openCodeDbPathExists,
|
|
@@ -195,7 +197,7 @@ import {
|
|
|
195
197
|
dropServedRecord,
|
|
196
198
|
registerLkgPersistence,
|
|
197
199
|
dropSlot
|
|
198
|
-
} from "./index-
|
|
200
|
+
} from "./index-ne2awfqp.js";
|
|
199
201
|
import {
|
|
200
202
|
recordSessionProjectIdentity
|
|
201
203
|
} from "./index-jg7sbt3v.js";
|
|
@@ -317,13 +319,13 @@ import {
|
|
|
317
319
|
armBindingRecoverySafely,
|
|
318
320
|
collectForeignTextParts,
|
|
319
321
|
resetDegradedCacheCount2
|
|
320
|
-
} from "./index-
|
|
322
|
+
} from "./index-ztjgymb9.js";
|
|
321
323
|
import {
|
|
322
324
|
scheduleClearAndReindex
|
|
323
325
|
} from "./index-xha0yxhy.js";
|
|
324
326
|
import {
|
|
325
327
|
runManagedRecomp2
|
|
326
|
-
} from "./index-
|
|
328
|
+
} from "./index-h2w3kzkt.js";
|
|
327
329
|
import {
|
|
328
330
|
isValidSemver,
|
|
329
331
|
compareSemverCore
|
|
@@ -331,11 +333,11 @@ import {
|
|
|
331
333
|
import"./index-fmsr7v69.js";
|
|
332
334
|
import {
|
|
333
335
|
runManagedWrapup2
|
|
334
|
-
} from "./index-
|
|
336
|
+
} from "./index-cpmqvc1c.js";
|
|
335
337
|
import"./index-zt6d9fag.js";
|
|
336
338
|
import"./index-52x68mj4.js";
|
|
337
|
-
import"./index-
|
|
338
|
-
import"./index-
|
|
339
|
+
import"./index-ypm4aa3h.js";
|
|
340
|
+
import"./index-238xbkhk.js";
|
|
339
341
|
import {
|
|
340
342
|
isDreamerRunnable,
|
|
341
343
|
isSmartNoteSurfaceAvailable,
|
|
@@ -8203,7 +8205,7 @@ var require_src2 = __commonJS(function(exports, module) {
|
|
|
8203
8205
|
// package.json
|
|
8204
8206
|
var package_default = {
|
|
8205
8207
|
name: "@cortexkit/opencode-magic-context",
|
|
8206
|
-
version: "0.49.
|
|
8208
|
+
version: "0.49.74",
|
|
8207
8209
|
type: "module",
|
|
8208
8210
|
description: "OpenCode plugin for Magic Context — cross-session memory and context management",
|
|
8209
8211
|
main: "dist/index.js",
|
|
@@ -10437,24 +10439,22 @@ function createMagicContextHook(deps) {
|
|
|
10437
10439
|
getNotificationParams: (sid) => getLiveNotificationParams(sid, liveModelBySession, variantBySession, agentBySession, historianRun.toastDurationMs)
|
|
10438
10440
|
};
|
|
10439
10441
|
};
|
|
10440
|
-
const buildManagedWrapupCtx = (sessionId) =>
|
|
10441
|
-
|
|
10442
|
-
|
|
10443
|
-
|
|
10444
|
-
|
|
10445
|
-
|
|
10446
|
-
|
|
10447
|
-
|
|
10448
|
-
|
|
10449
|
-
|
|
10450
|
-
return resolveExecuteThresholdDetail(deps.config.execute_threshold_percentage ?? 65, model ? `${model.providerID}/${model.modelID}` : undefined, 65, {
|
|
10442
|
+
const buildManagedWrapupCtx = (sessionId, selectedModel) => {
|
|
10443
|
+
const window = resolveOpenCodeWrapupWindow(db, sessionId, selectedModel ?? liveModelBySession.get(sessionId));
|
|
10444
|
+
if (!window)
|
|
10445
|
+
return;
|
|
10446
|
+
const { contextLimit, modelKey } = window;
|
|
10447
|
+
return {
|
|
10448
|
+
...buildManagedRecompCtx(sessionId),
|
|
10449
|
+
memoryInjectionBudgetTokens: deps.config.memory?.injection_budget_tokens,
|
|
10450
|
+
contextLimit,
|
|
10451
|
+
executeThresholdPercentage: resolveExecuteThresholdDetail(deps.config.execute_threshold_percentage ?? 65, modelKey, 65, {
|
|
10451
10452
|
tokensConfig: deps.config.execute_threshold_tokens,
|
|
10452
10453
|
contextLimit,
|
|
10453
10454
|
sessionId
|
|
10454
|
-
}).percentage
|
|
10455
|
-
}
|
|
10456
|
-
|
|
10457
|
-
});
|
|
10455
|
+
}).percentage
|
|
10456
|
+
};
|
|
10457
|
+
};
|
|
10458
10458
|
const embedHistoryDeps = {
|
|
10459
10459
|
db,
|
|
10460
10460
|
resolveDirectory: (sessionId) => sessionDirectoryBySession.get(sessionId) ?? deps.directory,
|
|
@@ -10770,7 +10770,10 @@ function createMagicContextHook(deps) {
|
|
|
10770
10770
|
systemPromptRefreshSessions.add(sessionId);
|
|
10771
10771
|
requestPendingMaterialization(pendingMaterializationSessions, sessionId, "user_flush");
|
|
10772
10772
|
},
|
|
10773
|
-
executeWrapup: historianRunnable ? async (sessionId, options) =>
|
|
10773
|
+
executeWrapup: historianRunnable ? async (sessionId, options) => {
|
|
10774
|
+
const ctx = buildManagedWrapupCtx(sessionId, options.model);
|
|
10775
|
+
return ctx ? runManagedWrapup2(ctx, sessionId, options) : WRAPUP_WINDOW_UNAVAILABLE;
|
|
10776
|
+
} : undefined,
|
|
10774
10777
|
executeRecomp: historianRunnable ? async (sessionId, options) => runManagedRecomp2(buildManagedRecompCtx(sessionId), sessionId, options) : undefined,
|
|
10775
10778
|
executeEmbedHistory,
|
|
10776
10779
|
pauseEmbedDrain,
|
|
@@ -12082,7 +12085,7 @@ async function setup(context) {
|
|
|
12082
12085
|
if (claimStorageBackupWarningCheck() && isMagicContextStorageOutsideEngram(storageDir)) {
|
|
12083
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.`);
|
|
12084
12087
|
}
|
|
12085
|
-
const { registerContext } = await import("./context-
|
|
12088
|
+
const { registerContext } = await import("./context-966c0vdq.js");
|
|
12086
12089
|
setHarness2("opencode2");
|
|
12087
12090
|
bindStaleBuildNotice({}, import.meta.url, "opencode2");
|
|
12088
12091
|
const duties = await registerContext(context);
|
|
@@ -12555,7 +12558,7 @@ var server = async (ctx) => {
|
|
|
12555
12558
|
rustReplayParticipant: () => magicContextRuntime.magicContext?.getRustReplayParticipant?.() ?? null,
|
|
12556
12559
|
onStorageBusyRefusal: async (sessionId, message) => {
|
|
12557
12560
|
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-ykvt5k2s.js"));
|
|
12558
|
-
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-
|
|
12561
|
+
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-r6t8m6qq.js"));
|
|
12559
12562
|
await sendStatusNotification(ctx.client, sessionId, message, {
|
|
12560
12563
|
toastDurationMs: 15000
|
|
12561
12564
|
});
|
|
@@ -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;AAE7D,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAKnE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAGnF,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AACrF,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,qCAAqC,CAAC;AAChF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAC9C;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,YAAY,EAAE,wBAAwB;;;;;;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CAAC,OAAO,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACjE;;;;;;;;;;;;;;;;qBA6C8uJ,CAAC;8BAAwC,CAAC;iBAA8C,CAAC;0BAAc,CAAC;uBAAiB,CAAC;;;;;;;;;;;;;qBAAhkG,CAAC;mBAA6B,CAAC;iBAA2B,CAAC;iBAA2B,CAAC;0BAAc,CAAC;uBAAiB,CAAC;;;iBAA2D,CAAC;;oBAA4D,CAAC;uBAAiC,CAAC;yBAAoC,CAAC;;;;;;0BAAu97C,CAAC;;;;;;;;;;;;;;;;GADxjgD"}
|
|
@@ -126,6 +126,10 @@ export declare function registerRpcHandlers(rpcServer: MagicContextRpcServer, ar
|
|
|
126
126
|
prepareHistorySession?: (sessionId: string) => void;
|
|
127
127
|
/** Read the session's current host directory, not the plugin's pre-move cached directory. */
|
|
128
128
|
readSessionDirectory?: (sessionId: string) => Promise<string | null>;
|
|
129
|
+
readSelectedSessionModel?: (sessionId: string) => Promise<{
|
|
130
|
+
providerID: string;
|
|
131
|
+
modelID: string;
|
|
132
|
+
} | undefined>;
|
|
129
133
|
storageDir?: string;
|
|
130
134
|
getDebugMemoryHolders?: () => RuntimeDebugMemoryHolders | undefined;
|
|
131
135
|
getDatabase?: () => Database | null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"rpc-handlers.d.ts","sourceRoot":"","sources":["../../src/plugin/rpc-handlers.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAoCzE,OAAO,EACH,KAAK,eAAe,IAAI,QAAQ,EAEnC,MAAM,mCAAmC,CAAC;AAmB3C,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,iDAAiD,CAAC;
|
|
1
|
+
{"version":3,"file":"rpc-handlers.d.ts","sourceRoot":"","sources":["../../src/plugin/rpc-handlers.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;A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