@cortexkit/opencode-magic-context 0.49.46 → 0.49.47
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-cb51adcz.js → context-hvkjxqhs.js} +61 -10
- package/dist/features/magic-context/request-tool-definitions.d.ts +57 -0
- package/dist/features/magic-context/request-tool-definitions.d.ts.map +1 -1
- package/dist/hooks/magic-context/cache-busting-signals.d.ts +6 -3
- package/dist/hooks/magic-context/cache-busting-signals.d.ts.map +1 -1
- package/dist/hooks/magic-context/host-checkpoint-ride.d.ts +80 -0
- package/dist/hooks/magic-context/host-checkpoint-ride.d.ts.map +1 -0
- package/dist/hooks/magic-context/latest-thinking-recovery.d.ts +19 -0
- package/dist/hooks/magic-context/latest-thinking-recovery.d.ts.map +1 -1
- package/dist/hooks/magic-context/pending-materialization.d.ts +3 -0
- package/dist/hooks/magic-context/pending-materialization.d.ts.map +1 -1
- package/dist/hooks/magic-context/request-tools-release.d.ts +26 -0
- package/dist/hooks/magic-context/request-tools-release.d.ts.map +1 -0
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +7 -0
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +9 -0
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/{index-n9q8c1dr.js → index-1qmv26ga.js} +15 -2
- package/dist/{index-tajstyw4.js → index-2x3kd999.js} +143 -12
- package/dist/{index-pwfmcg4e.js → index-37a9bfta.js} +3 -3
- package/dist/{index-66a50f3e.js → index-6athgjba.js} +66 -14
- package/dist/{index-55ngkbqa.js → index-bqhjzhv4.js} +147 -2
- package/dist/{index-snztv1f0.js → index-c99tqfge.js} +124 -10
- package/dist/{index-kevd267m.js → index-eej9kwad.js} +2 -2
- package/dist/{index-gaxktvxm.js → index-esr8qcc4.js} +1 -1
- package/dist/{index-29gd1zcx.js → index-w6fh4v87.js} +1 -1
- package/dist/{index-a4t7pdmm.js → index-xgczbhyx.js} +4 -4
- package/dist/index.js +12 -12
- package/dist/raw-ordinal-warmup-worker.js +2 -2
- package/dist/{recomp-orchestrator-qnactdw7.js → recomp-orchestrator-43g9tjya.js} +4 -4
- package/dist/{render-da999saz.js → render-4m7x9cq4.js} +2 -2
- package/dist/{search-archive-0z9cxv8e.js → search-archive-f6kwv02s.js} +2 -2
- package/dist/{store-pd1e9hnr.js → store-h20ny8b8.js} +2 -2
- package/dist/{store-reader-yh19h38c.js → store-reader-3eh1s1m8.js} +1 -1
- package/dist/{transform-postprocess-phase-k9d1r13f.js → transform-postprocess-phase-5746a5b6.js} +4 -4
- package/dist/v2/auto-search-worker.js +1 -1
- package/dist/v2/chunk-embedding-write-worker.js +1 -1
- package/dist/v2/{context-jtqj5e1r.js → context-e9n2mxax.js} +358 -61
- package/dist/v2/fold/manual-baseline.d.ts +7 -0
- package/dist/v2/fold/manual-baseline.d.ts.map +1 -1
- package/dist/v2/hooks/context.d.ts +8 -0
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/{message-index-bounded-60tdhht5.js → message-index-bounded-na8debr6.js} +2 -2
- package/dist/v2/migration-worker.js +1 -1
- package/dist/v2/raw-ordinal-warmup-worker.js +3 -3
- package/dist/v2/{read-session-chunk-9tmsxwb2.js → read-session-chunk-x33xeg2g.js} +1 -1
- package/dist/v2/{recomp-orchestrator-7y8smqqp.js → recomp-orchestrator-jyjpn5jm.js} +6 -6
- package/dist/v2/{render-j0y57skn.js → render-mp82ns36.js} +6 -6
- package/dist/v2/{search-archive-1e2tr8eq.js → search-archive-d0fcqch9.js} +3 -3
- package/dist/v2/{search-qhd2m8kn.js → search-ebd0yr40.js} +3 -3
- package/dist/v2/{server-ht0dyq9r.js → server-1f03b92k.js} +1 -1
- package/dist/v2/{server-ymn9w46x.js → server-5zzt9rah.js} +1 -1
- package/dist/v2/{server-5dtrzs6j.js → server-c43zxc9k.js} +24 -1
- package/dist/v2/{server-sscb1r3e.js → server-epvj1cey.js} +1 -1
- package/dist/v2/{server-4m71jpaj.js → server-fhxe5jgm.js} +2 -2
- package/dist/v2/{server-5vy0xt3p.js → server-gy26cwvw.js} +1 -1
- package/dist/v2/{server-ahy062xr.js → server-rg92e592.js} +150 -5
- package/dist/v2/{server-ef1mskas.js → server-rthnpmbp.js} +66 -14
- package/dist/v2/{server-rshcp4gy.js → server-wwmaqtxy.js} +5 -5
- package/dist/v2/{server-rjn4msjj.js → server-xsrykjkj.js} +16 -3
- package/dist/v2/{server-3rp821fw.js → server-zypeavf0.js} +1 -1
- package/dist/v2/server.js +2 -2
- package/dist/v2/{store-reader-cgx47zkp.js → store-reader-yaxtdy6f.js} +1 -1
- package/dist/v2/store-reader.d.ts +22 -1
- package/dist/v2/store-reader.d.ts.map +1 -1
- package/dist/v2/{store-pebs9m52.js → store-skkhh3rd.js} +2 -2
- package/dist/v2/{v2-archive-reader-tme5988n.js → v2-archive-reader-gm6mygag.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-k7m16xze.js → wrapup-orchestrator-y9a02xpd.js} +6 -6
- package/dist/{v2-archive-reader-dq5ebwe6.js → v2-archive-reader-yp9956t8.js} +1 -1
- package/dist/{wrapup-orchestrator-4pqwet8p.js → wrapup-orchestrator-ese0epyk.js} +5 -5
- package/package.json +1 -1
|
@@ -239,7 +239,7 @@ import {
|
|
|
239
239
|
getProjectState,
|
|
240
240
|
recordSubagentInvocation,
|
|
241
241
|
getLatestHistorianInvocationId
|
|
242
|
-
} from "./index-
|
|
242
|
+
} from "./index-1qmv26ga.js";
|
|
243
243
|
import {
|
|
244
244
|
clearCompressionDepth,
|
|
245
245
|
clearCompressionDepthRange,
|
|
@@ -7895,6 +7895,151 @@ function describeRequestToolDefinitionChange(previous, current) {
|
|
|
7895
7895
|
}
|
|
7896
7896
|
return { previousHash: before.hash, currentHash: after.hash, firstDifferingTool };
|
|
7897
7897
|
}
|
|
7898
|
+
var v2SchemaDigests = new Map;
|
|
7899
|
+
var V2_SCHEMA_DIGEST_NAMES = 2048;
|
|
7900
|
+
function v2SchemaDigest(name, schema) {
|
|
7901
|
+
let text;
|
|
7902
|
+
try {
|
|
7903
|
+
text = JSON.stringify(schema);
|
|
7904
|
+
} catch {
|
|
7905
|
+
return requestToolSchemaDigest(schema);
|
|
7906
|
+
}
|
|
7907
|
+
if (text === undefined)
|
|
7908
|
+
return requestToolSchemaDigest(schema);
|
|
7909
|
+
const cached = v2SchemaDigests.get(name);
|
|
7910
|
+
if (cached?.text === text)
|
|
7911
|
+
return cached.digest;
|
|
7912
|
+
const digest = requestToolSchemaDigest(schema);
|
|
7913
|
+
if (!cached && v2SchemaDigests.size >= V2_SCHEMA_DIGEST_NAMES) {
|
|
7914
|
+
const oldest = v2SchemaDigests.keys().next().value;
|
|
7915
|
+
if (oldest !== undefined)
|
|
7916
|
+
v2SchemaDigests.delete(oldest);
|
|
7917
|
+
}
|
|
7918
|
+
v2SchemaDigests.set(name, { text, digest });
|
|
7919
|
+
return digest;
|
|
7920
|
+
}
|
|
7921
|
+
function v2RequestToolsFingerprint(tools, messages = []) {
|
|
7922
|
+
const entries = [];
|
|
7923
|
+
for (const [name, tool] of Object.entries(tools)) {
|
|
7924
|
+
if (!tool)
|
|
7925
|
+
continue;
|
|
7926
|
+
const declared = tool;
|
|
7927
|
+
entries.push({
|
|
7928
|
+
name,
|
|
7929
|
+
description: typeof tool.description === "string" ? tool.description : "",
|
|
7930
|
+
schemaDigest: v2SchemaDigest(name, tool.input),
|
|
7931
|
+
deferLoading: declared.defer_loading === true || declared.deferLoading === true
|
|
7932
|
+
});
|
|
7933
|
+
}
|
|
7934
|
+
return requestToolsFingerprint(entries, () => {
|
|
7935
|
+
const referenced = new Set;
|
|
7936
|
+
for (const message of messages)
|
|
7937
|
+
for (const part of message.content) {
|
|
7938
|
+
if (typeof part.type !== "string" || !part.type.includes("tool"))
|
|
7939
|
+
continue;
|
|
7940
|
+
if (typeof part.name === "string")
|
|
7941
|
+
referenced.add(part.name);
|
|
7942
|
+
if (typeof part.tool === "string")
|
|
7943
|
+
referenced.add(part.tool);
|
|
7944
|
+
}
|
|
7945
|
+
return referenced;
|
|
7946
|
+
});
|
|
7947
|
+
}
|
|
7948
|
+
function requestToolsFingerprint(tools, referencedNames) {
|
|
7949
|
+
let referenced;
|
|
7950
|
+
const included = [];
|
|
7951
|
+
for (const tool of tools) {
|
|
7952
|
+
if (tool.deferLoading === true) {
|
|
7953
|
+
referenced ??= referencedNames?.() ?? new Set;
|
|
7954
|
+
if (!referenced.has(tool.name))
|
|
7955
|
+
continue;
|
|
7956
|
+
}
|
|
7957
|
+
included.push(tool);
|
|
7958
|
+
}
|
|
7959
|
+
included.sort((left, right) => left.name < right.name ? -1 : left.name > right.name ? 1 : 0);
|
|
7960
|
+
return {
|
|
7961
|
+
names: sha(included.map((tool) => tool.name)),
|
|
7962
|
+
descriptions: sha(included.map((tool) => [tool.name, tool.description])),
|
|
7963
|
+
schemas: sha(included.map((tool) => tool.deferLoading === true ? [tool.name, tool.description, tool.schemaDigest, "defer_loading"] : [tool.name, tool.description, tool.schemaDigest]))
|
|
7964
|
+
};
|
|
7965
|
+
}
|
|
7966
|
+
function classifyRequestToolsChange(previous, current) {
|
|
7967
|
+
if (previous.names !== current.names)
|
|
7968
|
+
return "names";
|
|
7969
|
+
if (previous.descriptions !== current.descriptions)
|
|
7970
|
+
return "descriptions";
|
|
7971
|
+
if (previous.schemas !== current.schemas)
|
|
7972
|
+
return "schemas";
|
|
7973
|
+
return null;
|
|
7974
|
+
}
|
|
7975
|
+
function requestToolSchemaDigest(schema) {
|
|
7976
|
+
const pieces = [];
|
|
7977
|
+
writeCanonicalJson(toJsonValue(schema, ""), [], pieces);
|
|
7978
|
+
return createHash6("sha256").update(pieces.join("")).digest("hex");
|
|
7979
|
+
}
|
|
7980
|
+
function isJsonValue(value) {
|
|
7981
|
+
return value !== undefined && typeof value !== "function" && typeof value !== "symbol";
|
|
7982
|
+
}
|
|
7983
|
+
function toJsonValue(value, key) {
|
|
7984
|
+
if (typeof value !== "object" || value === null)
|
|
7985
|
+
return value;
|
|
7986
|
+
const toJSON = value.toJSON;
|
|
7987
|
+
const resolved = typeof toJSON === "function" ? toJSON.call(value, key) : value;
|
|
7988
|
+
if (resolved instanceof Number)
|
|
7989
|
+
return Number(resolved);
|
|
7990
|
+
if (resolved instanceof String)
|
|
7991
|
+
return String(resolved);
|
|
7992
|
+
if (resolved instanceof Boolean)
|
|
7993
|
+
return resolved.valueOf();
|
|
7994
|
+
return resolved;
|
|
7995
|
+
}
|
|
7996
|
+
function writeCanonicalJson(value, ancestors, out) {
|
|
7997
|
+
if (value === null || typeof value === "boolean" || typeof value === "string") {
|
|
7998
|
+
out.push(JSON.stringify(value));
|
|
7999
|
+
return;
|
|
8000
|
+
}
|
|
8001
|
+
if (typeof value === "number") {
|
|
8002
|
+
out.push(Number.isFinite(value) ? JSON.stringify(value) : "null");
|
|
8003
|
+
return;
|
|
8004
|
+
}
|
|
8005
|
+
if (typeof value === "bigint") {
|
|
8006
|
+
out.push(JSON.stringify(value.toString()));
|
|
8007
|
+
return;
|
|
8008
|
+
}
|
|
8009
|
+
if (typeof value !== "object") {
|
|
8010
|
+
out.push("null");
|
|
8011
|
+
return;
|
|
8012
|
+
}
|
|
8013
|
+
if (ancestors.includes(value)) {
|
|
8014
|
+
out.push('"[Circular]"');
|
|
8015
|
+
return;
|
|
8016
|
+
}
|
|
8017
|
+
ancestors.push(value);
|
|
8018
|
+
if (Array.isArray(value)) {
|
|
8019
|
+
out.push("[");
|
|
8020
|
+
for (let index = 0;index < value.length; index += 1) {
|
|
8021
|
+
if (index > 0)
|
|
8022
|
+
out.push(",");
|
|
8023
|
+
const item = toJsonValue(value[index], String(index));
|
|
8024
|
+
if (isJsonValue(item))
|
|
8025
|
+
writeCanonicalJson(item, ancestors, out);
|
|
8026
|
+
else
|
|
8027
|
+
out.push("null");
|
|
8028
|
+
}
|
|
8029
|
+
out.push("]");
|
|
8030
|
+
} else {
|
|
8031
|
+
const entries = Object.entries(value).map(([key, child]) => [key, toJsonValue(child, key)]).filter(([, child]) => isJsonValue(child)).sort(([left], [right]) => left < right ? -1 : left > right ? 1 : 0);
|
|
8032
|
+
out.push("{");
|
|
8033
|
+
entries.forEach(([key, child], index) => {
|
|
8034
|
+
if (index > 0)
|
|
8035
|
+
out.push(",");
|
|
8036
|
+
out.push(JSON.stringify(key), ":");
|
|
8037
|
+
writeCanonicalJson(child, ancestors, out);
|
|
8038
|
+
});
|
|
8039
|
+
out.push("}");
|
|
8040
|
+
}
|
|
8041
|
+
ancestors.pop();
|
|
8042
|
+
}
|
|
7898
8043
|
|
|
7899
8044
|
// src/features/magic-context/user-memory/storage-user-memory.ts
|
|
7900
8045
|
var USER_MEMORY_CANDIDATE_TTL_MS = 30 * 24 * 60 * 60 * 1000;
|
|
@@ -18792,4 +18937,4 @@ async function executeContextRecomp(deps, options = {}) {
|
|
|
18792
18937
|
return (await executeContextRecompWithResult(deps, options)).message;
|
|
18793
18938
|
}
|
|
18794
18939
|
|
|
18795
|
-
export { denyTaskRoutingToCallerAgents, buildHiddenAgentRegistrations, buildZenReadAgentRegistrations, buildHiddenAgentConfig, getMagicContextBuiltinCommands, formatConfigParseStatusLine, claimConfigParseFailuresOnce, isCommitRetentionPaused, cortexKitUserConfigBasePath, cortexKitProjectConfigBasePath, resolveLegacyConfigSources, migrateMagicContextConfigLocations, getProtectedTokensTierOverrides, loadPluginConfigDetailed, historianRunConfig, dreamerRunConfig, pluginConfigReader, currentPluginConfigReader, withLiveDreamerOutputCap, createDreamerOutputCapSampler, COMPARTMENT_AGENT_SYSTEM_PROMPT, HISTORIAN_EDITOR_SYSTEM_PROMPT, COMPARTMENT_STRUCTURAL_SYSTEM_PROMPT, clampProducerAtomChars, producerInputTokenLimit, historianProducerReserve, producerPromptFailureReason, DREAMER_AGENT, DREAMER_RETROSPECTIVE_AGENT, DREAMER_PRIMER_INVESTIGATOR_AGENT, DREAMER_MEMORY_MAPPER_AGENT, DREAMER_CLASSIFIER_AGENT, DREAMER_DOCS_AGENT, DREAMER_REVIEWER_AGENT, createChildSessionWithFence, HiddenCompletionRefusal, DreamerProviderOutputFailureError, withDreamerModelCooldown, providerOutputFailureFromInvalidManifest, HIDDEN_HISTORIAN_AGENT, HIDDEN_DREAMER_AGENT, HIDDEN_CURATE_AGENT, hiddenAgentFor, hiddenToolLoop, HIDDEN_RUN_DISPOSED_REASON, noteChildOfDisposedInstance, hiddenChildPermissions, registerHiddenChildAgents, hiddenToolCallRefusal, HiddenAgentStepLimit, HiddenChildHook, extractLatestAssistantText, hasLengthCappedOutput, parseProviderModel, modelBodyField, toModelEntry, ModelProducedNoOutputError, noteModelActivityMonitored, noteModelOutputReceived, isPromptTimeoutError, getPromptFailureDetail, raceWithSignal, promptSyncWithValidatedOutputRetry, normalizeSDKResponse, annotateSubagentInvocationError, failedInvocationStatus, emptyTokenTotals, sumTokensFromChildMessages, recordChildInvocation, recordPromptSessionError, createPromptAsyncTransport, CTX_NOTE_LIGHT_DESCRIPTION, ACTIVE_TOOL_IDS, systemPromptFingerprint, createPromptSurfaceRuntime, createPromptSurfaceGuidanceEpochCache, setKeepSubagents, teardownChildSession, getCompartmentEvents, runTokenLog, formatRunTokenLog, buildMagicContextSection, getMuralIdentity, getMural, modelKeyAcceptsImages, resolveMuralWire, v2ToolDefinitionsHash, USER_MEMORY_CANDIDATE_TTL_MS, insertUserMemoryCandidates, getUserMemoryCandidates, deleteUserMemoryCandidates, pruneExpiredUserMemoryCandidates, insertUserMemory, getActiveUserMemories, updateUserMemoryContent, dismissUserMemory, getOpenCodeDbPath, compareOpenCodeMessagesByCanonicalOrder, startCompactionMarkerCandidatePreparation, removeMcOwnedCompactionMarkers, MARKER_SUMMARY_TEXT, markerUpdateDefinitelyDidNotCut, applyDeferredCompactionMarker, removeCompactionMarkerForSession, checkCompactionMarkerConsistency, extractM0Block, formatDate, TEMPORAL_MARKER_REPLAY_PATTERN, collectTemporalCandidates, injectTemporalMarkers, clearInjectionCache, getVisibleMemoryIds, selectHiddenMessagesAtCompactionSeam, prepareCompartmentInjection, renderCompartmentInjection, MaterializeContentionError, mustMaterialize, trimMemoriesToBudgetV2, renderMemoryBlockV2, materializeM0, hydrateCachedM0Mural, resetPrefixTrimFallbackState, findHostCompactionWindow, capturePrefixTrimSourceOrder, prepareCachedM0M1Replay, headMessagesForSizing, rawTailAfterNewestCompartment, hasCompleteCachedM0M1, injectM0M1, resolveHiddenCompletionExecutor, createV1HiddenCompletionExecutor, readCoordinateGeneration, readCoordinateRebaseNotice, formatCoordinateRebaseNotice, rebaseSessionCoordinatesAsync, shouldWaitForNewHistorianHistory, EMPTY_READ_REPLY, noteTouchedAt, renderGlance, renderNotesById, formatWriteReply, observeNoteNudgeServe, onNoteTrigger, peekNoteNudgeText, markNoteNudgeDelivered, clearNoteNudgeTriggerAndCooldown, resetNoteNudgeCooldownOnly, clearNoteNudgeTriggerOnly, omitIncompleteFileTokenTotals, describeBoundaryDiagnostics, RECOVERY_NO_HEAD_LIMIT, deriveProtectedTailTokenTarget, selectPerRunCap, resolveOpenCodeProtectedTailBoundary, resolveWrapupProtectedTailBoundary, getRawHistoryEligibility, hasRunnableCompartmentWindow, recordHighPressureNoEligibleHead, noteTransformPassForExactOrdinalReads, runCompartmentAgent, snapRangeToCompartments, getActiveCompartmentRun, markActiveCompartmentRunPublished, registerActiveCompartmentRun, startCompartmentAgent, executeContextRecomp };
|
|
18940
|
+
export { denyTaskRoutingToCallerAgents, buildHiddenAgentRegistrations, buildZenReadAgentRegistrations, buildHiddenAgentConfig, getMagicContextBuiltinCommands, formatConfigParseStatusLine, claimConfigParseFailuresOnce, isCommitRetentionPaused, cortexKitUserConfigBasePath, cortexKitProjectConfigBasePath, resolveLegacyConfigSources, migrateMagicContextConfigLocations, getProtectedTokensTierOverrides, loadPluginConfigDetailed, historianRunConfig, dreamerRunConfig, pluginConfigReader, currentPluginConfigReader, withLiveDreamerOutputCap, createDreamerOutputCapSampler, COMPARTMENT_AGENT_SYSTEM_PROMPT, HISTORIAN_EDITOR_SYSTEM_PROMPT, COMPARTMENT_STRUCTURAL_SYSTEM_PROMPT, clampProducerAtomChars, producerInputTokenLimit, historianProducerReserve, producerPromptFailureReason, DREAMER_AGENT, DREAMER_RETROSPECTIVE_AGENT, DREAMER_PRIMER_INVESTIGATOR_AGENT, DREAMER_MEMORY_MAPPER_AGENT, DREAMER_CLASSIFIER_AGENT, DREAMER_DOCS_AGENT, DREAMER_REVIEWER_AGENT, createChildSessionWithFence, HiddenCompletionRefusal, DreamerProviderOutputFailureError, withDreamerModelCooldown, providerOutputFailureFromInvalidManifest, HIDDEN_HISTORIAN_AGENT, HIDDEN_DREAMER_AGENT, HIDDEN_CURATE_AGENT, hiddenAgentFor, hiddenToolLoop, HIDDEN_RUN_DISPOSED_REASON, noteChildOfDisposedInstance, hiddenChildPermissions, registerHiddenChildAgents, hiddenToolCallRefusal, HiddenAgentStepLimit, HiddenChildHook, extractLatestAssistantText, hasLengthCappedOutput, parseProviderModel, modelBodyField, toModelEntry, ModelProducedNoOutputError, noteModelActivityMonitored, noteModelOutputReceived, isPromptTimeoutError, getPromptFailureDetail, raceWithSignal, promptSyncWithValidatedOutputRetry, normalizeSDKResponse, annotateSubagentInvocationError, failedInvocationStatus, emptyTokenTotals, sumTokensFromChildMessages, recordChildInvocation, recordPromptSessionError, createPromptAsyncTransport, CTX_NOTE_LIGHT_DESCRIPTION, ACTIVE_TOOL_IDS, systemPromptFingerprint, createPromptSurfaceRuntime, createPromptSurfaceGuidanceEpochCache, setKeepSubagents, teardownChildSession, getCompartmentEvents, runTokenLog, formatRunTokenLog, buildMagicContextSection, getMuralIdentity, getMural, modelKeyAcceptsImages, resolveMuralWire, v2ToolDefinitionsHash, v2RequestToolsFingerprint, classifyRequestToolsChange, USER_MEMORY_CANDIDATE_TTL_MS, insertUserMemoryCandidates, getUserMemoryCandidates, deleteUserMemoryCandidates, pruneExpiredUserMemoryCandidates, insertUserMemory, getActiveUserMemories, updateUserMemoryContent, dismissUserMemory, getOpenCodeDbPath, compareOpenCodeMessagesByCanonicalOrder, startCompactionMarkerCandidatePreparation, removeMcOwnedCompactionMarkers, MARKER_SUMMARY_TEXT, markerUpdateDefinitelyDidNotCut, applyDeferredCompactionMarker, removeCompactionMarkerForSession, checkCompactionMarkerConsistency, extractM0Block, formatDate, TEMPORAL_MARKER_REPLAY_PATTERN, collectTemporalCandidates, injectTemporalMarkers, clearInjectionCache, getVisibleMemoryIds, selectHiddenMessagesAtCompactionSeam, prepareCompartmentInjection, renderCompartmentInjection, MaterializeContentionError, mustMaterialize, trimMemoriesToBudgetV2, renderMemoryBlockV2, stripMemoryMuralBlock, materializeM0, hydrateCachedM0Mural, resetPrefixTrimFallbackState, findHostCompactionWindow, capturePrefixTrimSourceOrder, prepareCachedM0M1Replay, headMessagesForSizing, rawTailAfterNewestCompartment, hasCompleteCachedM0M1, injectM0M1, resolveHiddenCompletionExecutor, createV1HiddenCompletionExecutor, readCoordinateGeneration, readCoordinateRebaseNotice, formatCoordinateRebaseNotice, rebaseSessionCoordinatesAsync, shouldWaitForNewHistorianHistory, EMPTY_READ_REPLY, noteTouchedAt, renderGlance, renderNotesById, formatWriteReply, observeNoteNudgeServe, onNoteTrigger, peekNoteNudgeText, markNoteNudgeDelivered, clearNoteNudgeTriggerAndCooldown, resetNoteNudgeCooldownOnly, clearNoteNudgeTriggerOnly, omitIncompleteFileTokenTotals, describeBoundaryDiagnostics, RECOVERY_NO_HEAD_LIMIT, deriveProtectedTailTokenTarget, selectPerRunCap, resolveOpenCodeProtectedTailBoundary, resolveWrapupProtectedTailBoundary, getRawHistoryEligibility, hasRunnableCompartmentWindow, recordHighPressureNoEligibleHead, noteTransformPassForExactOrdinalReads, runCompartmentAgent, snapRangeToCompartments, getActiveCompartmentRun, markActiveCompartmentRunPublished, registerActiveCompartmentRun, startCompartmentAgent, executeContextRecomp };
|
|
@@ -137,6 +137,7 @@ import {
|
|
|
137
137
|
getMural,
|
|
138
138
|
modelKeyAcceptsImages,
|
|
139
139
|
resolveMuralWire,
|
|
140
|
+
classifyRequestToolsChange,
|
|
140
141
|
USER_MEMORY_CANDIDATE_TTL_MS,
|
|
141
142
|
insertUserMemoryCandidates,
|
|
142
143
|
getUserMemoryCandidates,
|
|
@@ -194,7 +195,7 @@ import {
|
|
|
194
195
|
snapRangeToCompartments,
|
|
195
196
|
getActiveCompartmentRun,
|
|
196
197
|
startCompartmentAgent
|
|
197
|
-
} from "./index-
|
|
198
|
+
} from "./index-bqhjzhv4.js";
|
|
198
199
|
import {
|
|
199
200
|
hasTrustedAbsoluteWall,
|
|
200
201
|
applyProvenInputFloor,
|
|
@@ -377,6 +378,7 @@ import {
|
|
|
377
378
|
getObservedEpochFloor,
|
|
378
379
|
resolveEpochFloorForPass,
|
|
379
380
|
getReasoningRemovalState,
|
|
381
|
+
detectThinkingBindingMismatch,
|
|
380
382
|
detectLatestTurnThinkingMismatch,
|
|
381
383
|
isPrefixBoundThinkingModel,
|
|
382
384
|
detectOverflow,
|
|
@@ -563,7 +565,7 @@ import {
|
|
|
563
565
|
GLOBAL_USER_PROFILE_PROJECT_PATH,
|
|
564
566
|
getProjectState,
|
|
565
567
|
bumpProjectUserProfileVersion
|
|
566
|
-
} from "./index-
|
|
568
|
+
} from "./index-1qmv26ga.js";
|
|
567
569
|
import {
|
|
568
570
|
getLastIndexedOrdinal
|
|
569
571
|
} from "./index-etn2hmb5.js";
|
|
@@ -716,7 +718,7 @@ import {
|
|
|
716
718
|
import {
|
|
717
719
|
setRecompStarting2,
|
|
718
720
|
setRecompTerminal2
|
|
719
|
-
} from "./index-
|
|
721
|
+
} from "./index-eej9kwad.js";
|
|
720
722
|
import {
|
|
721
723
|
makeToolCompositeKey,
|
|
722
724
|
searchMessageHistoryOffThread,
|
|
@@ -762,6 +764,8 @@ import {
|
|
|
762
764
|
replayCavemanCompression,
|
|
763
765
|
DegradedPassRefusalError,
|
|
764
766
|
degradedPassError,
|
|
767
|
+
revertHostCheckpointPass,
|
|
768
|
+
forgetHostCheckpointPass,
|
|
765
769
|
hostInstructionRetentionEnabled,
|
|
766
770
|
isHostInstructionRetentionOn,
|
|
767
771
|
pressureBands,
|
|
@@ -792,7 +796,7 @@ import {
|
|
|
792
796
|
abortSessionFailClosed2,
|
|
793
797
|
evaluateEmergencyFailClosed2,
|
|
794
798
|
runPostTransformPhase2
|
|
795
|
-
} from "./index-
|
|
799
|
+
} from "./index-2x3kd999.js";
|
|
796
800
|
import {
|
|
797
801
|
ANNOUNCEMENT_VERSION2,
|
|
798
802
|
ANNOUNCEMENT_FEATURES2,
|
|
@@ -810,10 +814,10 @@ import {
|
|
|
810
814
|
} from "./index-kw7azjmy.js";
|
|
811
815
|
import {
|
|
812
816
|
readV2ArchiveOffThread2
|
|
813
|
-
} from "./index-
|
|
817
|
+
} from "./index-xgczbhyx.js";
|
|
814
818
|
import {
|
|
815
819
|
renderSearchArchiveOffThread2
|
|
816
|
-
} from "./index-
|
|
820
|
+
} from "./index-esr8qcc4.js";
|
|
817
821
|
import {
|
|
818
822
|
COMPACTION_ENABLED_PATH,
|
|
819
823
|
isDreamerRunnable,
|
|
@@ -16423,7 +16427,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
16423
16427
|
const db = readDatabase();
|
|
16424
16428
|
if (!db)
|
|
16425
16429
|
return { ok: false, error: "db unavailable" };
|
|
16426
|
-
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-
|
|
16430
|
+
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-43g9tjya.js"));
|
|
16427
16431
|
const { sendIgnoredMessage } = await importPluginModule(() => import("./send-session-notification-j93pn2hn.js"));
|
|
16428
16432
|
log2(`[rpc] recomp requested for session ${sessionId}`);
|
|
16429
16433
|
if (!args.client && !args.hiddenCompletionExecutor) {
|
|
@@ -16508,7 +16512,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
16508
16512
|
const db = readDatabase();
|
|
16509
16513
|
if (!db)
|
|
16510
16514
|
return { ok: false, error: "db unavailable" };
|
|
16511
|
-
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-
|
|
16515
|
+
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-ese0epyk.js"));
|
|
16512
16516
|
const model = liveSessionState.liveModelBySession.get(sessionId);
|
|
16513
16517
|
const contextLimit = model ? resolveContextLimit(model.providerID, model.modelID, { db, sessionID: sessionId }) : 128000;
|
|
16514
16518
|
const ctx = {
|
|
@@ -17258,6 +17262,17 @@ function armLatestThinkingRecoveryFromError(args) {
|
|
|
17258
17262
|
dropSlot(args.sessionId, "latest-thinking-recovery-arm");
|
|
17259
17263
|
return true;
|
|
17260
17264
|
}
|
|
17265
|
+
function armThinkingBindingRecoveryFromError(args) {
|
|
17266
|
+
const mismatch = detectThinkingBindingMismatch(args.error);
|
|
17267
|
+
if (!mismatch.isBindingMismatch)
|
|
17268
|
+
return false;
|
|
17269
|
+
if (!isPrefixBoundThinkingModel(args.providerID, args.modelID))
|
|
17270
|
+
return true;
|
|
17271
|
+
armBindingRecoverySafely(args.db, args.sessionId);
|
|
17272
|
+
sessionLog2(args.sessionId, `thinking binding recovery armed from ${args.source} (provider paths: failing=${mismatch.failingBlockPath ?? "?"} firstChanged=${mismatch.firstChangedPath ?? "?"})`);
|
|
17273
|
+
dropSlot(args.sessionId, "thinking-binding-recovery-arm");
|
|
17274
|
+
return true;
|
|
17275
|
+
}
|
|
17261
17276
|
|
|
17262
17277
|
// src/hooks/magic-context/compaction-off-transition.ts
|
|
17263
17278
|
import { existsSync as existsSync7 } from "node:fs";
|
|
@@ -17770,6 +17785,89 @@ function resolveHistoryBudgetTokens(historyBudgetPercentage, contextUsage, execu
|
|
|
17770
17785
|
}) / 100) * historyBudgetPercentage);
|
|
17771
17786
|
}
|
|
17772
17787
|
|
|
17788
|
+
// src/hooks/magic-context/request-tools-release.ts
|
|
17789
|
+
var NAMESPACE = "requestToolsRelease";
|
|
17790
|
+
var MAX_MODEL_RECORDS = 8;
|
|
17791
|
+
function parseEntry(value) {
|
|
17792
|
+
if (typeof value !== "object" || value === null)
|
|
17793
|
+
return null;
|
|
17794
|
+
const record = value;
|
|
17795
|
+
if (typeof record.modelKey !== "string" || typeof record.names !== "string" || typeof record.descriptions !== "string" || typeof record.schemas !== "string")
|
|
17796
|
+
return null;
|
|
17797
|
+
return {
|
|
17798
|
+
modelKey: record.modelKey,
|
|
17799
|
+
names: record.names,
|
|
17800
|
+
descriptions: record.descriptions,
|
|
17801
|
+
schemas: record.schemas
|
|
17802
|
+
};
|
|
17803
|
+
}
|
|
17804
|
+
function parseStored(value) {
|
|
17805
|
+
const models = value?.models;
|
|
17806
|
+
if (!Array.isArray(models))
|
|
17807
|
+
return [];
|
|
17808
|
+
const entries = [];
|
|
17809
|
+
for (const item of models) {
|
|
17810
|
+
const entry = parseEntry(item);
|
|
17811
|
+
if (entry)
|
|
17812
|
+
entries.push(entry);
|
|
17813
|
+
}
|
|
17814
|
+
return entries;
|
|
17815
|
+
}
|
|
17816
|
+
function sameEntry(left, right) {
|
|
17817
|
+
return left !== undefined && left.modelKey === right.modelKey && left.names === right.names && left.descriptions === right.descriptions && left.schemas === right.schemas;
|
|
17818
|
+
}
|
|
17819
|
+
function isLatest(entries, current) {
|
|
17820
|
+
return sameEntry(entries.at(-1), current);
|
|
17821
|
+
}
|
|
17822
|
+
function withLatest(entries, current) {
|
|
17823
|
+
const next = entries.filter((entry) => entry.modelKey !== current.modelKey);
|
|
17824
|
+
next.push(current);
|
|
17825
|
+
return next.slice(-MAX_MODEL_RECORDS);
|
|
17826
|
+
}
|
|
17827
|
+
function evaluateRequestToolsRelease(args) {
|
|
17828
|
+
const current = { modelKey: args.modelKey, ...args.fingerprint };
|
|
17829
|
+
let entries = [];
|
|
17830
|
+
let readable = true;
|
|
17831
|
+
try {
|
|
17832
|
+
entries = parseStored(readReplayEnvelope(args.db, args.sessionId, "read")[NAMESPACE]);
|
|
17833
|
+
} catch (error) {
|
|
17834
|
+
readable = false;
|
|
17835
|
+
sessionLog2(args.sessionId, "request tools record unreadable:", error);
|
|
17836
|
+
}
|
|
17837
|
+
const stored = entries.find((entry) => entry.modelKey === current.modelKey);
|
|
17838
|
+
const change = stored ? classifyRequestToolsChange(stored, current) : null;
|
|
17839
|
+
if (change !== null) {
|
|
17840
|
+
sessionLog2(args.sessionId, `request tools changed (kind=${change === "schemas" ? "schema-only" : change}, model=${current.modelKey}, schemas ${stored?.schemas.slice(0, 12)}→${current.schemas.slice(0, 12)}): releasing signed thinking`);
|
|
17841
|
+
} else if (readable && !stored) {
|
|
17842
|
+
sessionLog2(args.sessionId, `request tools fingerprint adopted for model=${current.modelKey}${entries.length > 0 ? ` (records kept for ${entries.map((entry) => entry.modelKey).join(",")})` : ""}`);
|
|
17843
|
+
}
|
|
17844
|
+
return {
|
|
17845
|
+
change,
|
|
17846
|
+
commit: () => {
|
|
17847
|
+
if (!readable || isLatest(entries, current))
|
|
17848
|
+
return;
|
|
17849
|
+
try {
|
|
17850
|
+
let next = entries;
|
|
17851
|
+
const written = updateReplayDocument(args.db, args.sessionId, (doc) => {
|
|
17852
|
+
const latest = parseStored(doc[NAMESPACE]);
|
|
17853
|
+
if (isLatest(latest, current))
|
|
17854
|
+
return false;
|
|
17855
|
+
next = withLatest(latest, current);
|
|
17856
|
+
doc.version = 2;
|
|
17857
|
+
doc[NAMESPACE] = { models: next };
|
|
17858
|
+
return true;
|
|
17859
|
+
});
|
|
17860
|
+
if (written)
|
|
17861
|
+
entries = next;
|
|
17862
|
+
else
|
|
17863
|
+
sessionLog2(args.sessionId, "request tools record not written");
|
|
17864
|
+
} catch (error) {
|
|
17865
|
+
sessionLog2(args.sessionId, "request tools record write failed:", error);
|
|
17866
|
+
}
|
|
17867
|
+
}
|
|
17868
|
+
};
|
|
17869
|
+
}
|
|
17870
|
+
|
|
17773
17871
|
// src/hooks/magic-context/rust-mode-transform.ts
|
|
17774
17872
|
import { createHash as createHash13, randomUUID as randomUUID6 } from "node:crypto";
|
|
17775
17873
|
|
|
@@ -25193,7 +25291,15 @@ function createTransform(deps) {
|
|
|
25193
25291
|
return estimateTokens(text) * holdProseRatio;
|
|
25194
25292
|
}
|
|
25195
25293
|
}) : null;
|
|
25196
|
-
|
|
25294
|
+
const requestToolsFingerprint = modelForBudget && isPrefixBoundThinkingModel(modelForBudget.providerID, modelForBudget.modelID) ? deps.getRequestToolsFingerprint?.(sessionId) : undefined;
|
|
25295
|
+
const requestToolsRelease = modelForBudget && requestToolsFingerprint ? evaluateRequestToolsRelease({
|
|
25296
|
+
db,
|
|
25297
|
+
sessionId,
|
|
25298
|
+
modelKey: `${modelForBudget.providerID}/${modelForBudget.modelID}`,
|
|
25299
|
+
fingerprint: requestToolsFingerprint
|
|
25300
|
+
}) : undefined;
|
|
25301
|
+
const requestToolsChanged = requestToolsRelease?.change != null;
|
|
25302
|
+
activeThinkingPrefixHold = !requestToolsChanged && signedThinkingPrefixBound && (compactionOff || signedThinkingHold?.held === true);
|
|
25197
25303
|
freezeM0M1 ||= activeThinkingPrefixHold;
|
|
25198
25304
|
const originalForThinkingFit = takeSignedThinkingFitSnapshot({
|
|
25199
25305
|
sessionId,
|
|
@@ -25999,6 +26105,7 @@ Historian previously failed ${historianFailureState.failureCount} time(s), so Ma
|
|
|
25999
26105
|
directoryPrefixHold: unresolvedDirectoryHold,
|
|
26000
26106
|
forceSignedRebuildForFit: thinkingFitRetries.has(sessionId) || !!recovery.rebuildReason,
|
|
26001
26107
|
compactionModeTransition: compactionModeTransitionPending.has(sessionId),
|
|
26108
|
+
requestToolsChange: requestToolsRelease?.change ?? null,
|
|
26002
26109
|
readLastServedMessages: () => {
|
|
26003
26110
|
const slot = getInMemorySlot(sessionId) ?? loadPersistedLkgSlot(db, sessionId);
|
|
26004
26111
|
try {
|
|
@@ -26057,6 +26164,7 @@ Historian previously failed ${historianFailureState.failureCount} time(s), so Ma
|
|
|
26057
26164
|
}
|
|
26058
26165
|
});
|
|
26059
26166
|
compactionModeTransitionPending.delete(sessionId);
|
|
26167
|
+
requestToolsRelease?.commit();
|
|
26060
26168
|
if (recovery.prefix && recoveryReleased && !recoveryNormalized) {
|
|
26061
26169
|
if (!recoveryBeforePostprocess)
|
|
26062
26170
|
throw new Error("Cannot release recovery without its pre-edit snapshot");
|
|
@@ -26522,9 +26630,15 @@ Historian previously failed ${historianFailureState.failureCount} time(s), so Ma
|
|
|
26522
26630
|
};
|
|
26523
26631
|
const timedTransform = (input, output) => withTransformTimingSummary(async () => {
|
|
26524
26632
|
const sessionId = findSessionId(output.messages);
|
|
26633
|
+
if (sessionId)
|
|
26634
|
+
forgetHostCheckpointPass(sessionId);
|
|
26525
26635
|
try {
|
|
26526
26636
|
await transform(input, output);
|
|
26637
|
+
if (sessionId)
|
|
26638
|
+
forgetHostCheckpointPass(sessionId);
|
|
26527
26639
|
} catch (error) {
|
|
26640
|
+
if (sessionId)
|
|
26641
|
+
revertHostCheckpointPass(sessionId, deps.pendingMaterializationSessions);
|
|
26528
26642
|
if (sessionId && !deps.compactionOff && error instanceof EmergencyFailClosedError)
|
|
26529
26643
|
recordUsageRefusal(deps.db, sessionId);
|
|
26530
26644
|
throw error;
|
|
@@ -30285,4 +30399,4 @@ function applyHiddenSubagentTemperature(input, output, log) {
|
|
|
30285
30399
|
output.temperature = temperature;
|
|
30286
30400
|
}
|
|
30287
30401
|
|
|
30288
|
-
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, armLatestThinkingRecovery, armBindingRecoverySafely, armLatestThinkingRecoveryFromError, createM0RenderOptions, lkgReplayLimit, measureLkgReplay, STORAGE_BUSY_MESSAGE, StorageBusyRefusalError, bindSystemDateRequestIdentity, bindSystemDateOutput, registerSystemDateRefresh, rustWrapupHistorianFields, 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 };
|
|
30402
|
+
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, armLatestThinkingRecovery, armBindingRecoverySafely, armLatestThinkingRecoveryFromError, armThinkingBindingRecoveryFromError, createM0RenderOptions, lkgReplayLimit, measureLkgReplay, STORAGE_BUSY_MESSAGE, StorageBusyRefusalError, bindSystemDateRequestIdentity, bindSystemDateOutput, registerSystemDateRefresh, rustWrapupHistorianFields, 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,10 +7,10 @@ import {
|
|
|
7
7
|
import {
|
|
8
8
|
requestPendingMaterialization,
|
|
9
9
|
dropSlot
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-1qmv26ga.js";
|
|
11
11
|
import {
|
|
12
12
|
executeContextRecomp
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-bqhjzhv4.js";
|
|
14
14
|
import {
|
|
15
15
|
renderUserFacingFailure,
|
|
16
16
|
userFacingFailureCode
|
|
@@ -137,11 +137,11 @@ async function serveV2ArchiveReads2(port, openConnections) {
|
|
|
137
137
|
{ createV2RecoveryAttachments }
|
|
138
138
|
] = await Promise.all([
|
|
139
139
|
import("./sqlite-zdgm52sv.js"),
|
|
140
|
-
import("./store-reader-
|
|
141
|
-
import("./store-
|
|
140
|
+
import("./store-reader-3eh1s1m8.js"),
|
|
141
|
+
import("./store-h20ny8b8.js"),
|
|
142
142
|
import("./read-session-chunk-7h9f32sz.js"),
|
|
143
|
-
import("./render-
|
|
144
|
-
import("./search-archive-
|
|
143
|
+
import("./render-4m7x9cq4.js"),
|
|
144
|
+
import("./search-archive-f6kwv02s.js"),
|
|
145
145
|
import("./expand-attachments-h33jbgyz.js")
|
|
146
146
|
]);
|
|
147
147
|
const pool = new V2StoreReaderPool;
|
package/dist/index.js
CHANGED
|
@@ -84,7 +84,7 @@ import {
|
|
|
84
84
|
checkCompactionMarkerConsistency,
|
|
85
85
|
clearInjectionCache,
|
|
86
86
|
clearNoteNudgeTriggerOnly
|
|
87
|
-
} from "./index-
|
|
87
|
+
} from "./index-bqhjzhv4.js";
|
|
88
88
|
import"./index-sd3egckz.js";
|
|
89
89
|
import {
|
|
90
90
|
hasTrustedAbsoluteWall,
|
|
@@ -171,7 +171,7 @@ import {
|
|
|
171
171
|
parameterDescriptionsFor,
|
|
172
172
|
MagicContextRpcServer,
|
|
173
173
|
applyHiddenSubagentTemperature
|
|
174
|
-
} from "./index-
|
|
174
|
+
} from "./index-c99tqfge.js";
|
|
175
175
|
import {
|
|
176
176
|
resolveOpenCodeDbPath,
|
|
177
177
|
openCodeDbPathExists,
|
|
@@ -219,7 +219,7 @@ import {
|
|
|
219
219
|
createDbLkgPersistence,
|
|
220
220
|
registerLkgPersistence,
|
|
221
221
|
dropSlot
|
|
222
|
-
} from "./index-
|
|
222
|
+
} from "./index-1qmv26ga.js";
|
|
223
223
|
import {
|
|
224
224
|
recordSessionProjectIdentity
|
|
225
225
|
} from "./index-jz5bk7xd.js";
|
|
@@ -298,7 +298,7 @@ import"./index-qcz1fy7h.js";
|
|
|
298
298
|
import {
|
|
299
299
|
deleteIndexedMessage
|
|
300
300
|
} from "./index-etn2hmb5.js";
|
|
301
|
-
import"./index-
|
|
301
|
+
import"./index-6athgjba.js";
|
|
302
302
|
import"./index-2qbtqg1w.js";
|
|
303
303
|
import {
|
|
304
304
|
pushNotification2
|
|
@@ -319,13 +319,13 @@ import {
|
|
|
319
319
|
clearToolPermissionDenied,
|
|
320
320
|
collectForeignTextParts,
|
|
321
321
|
resetDegradedCacheCount2
|
|
322
|
-
} from "./index-
|
|
322
|
+
} from "./index-2x3kd999.js";
|
|
323
323
|
import {
|
|
324
324
|
scheduleClearAndReindex
|
|
325
325
|
} from "./index-44pp3vrj.js";
|
|
326
326
|
import {
|
|
327
327
|
runManagedRecomp2
|
|
328
|
-
} from "./index-
|
|
328
|
+
} from "./index-eej9kwad.js";
|
|
329
329
|
import {
|
|
330
330
|
isValidSemver,
|
|
331
331
|
compareSemverCore
|
|
@@ -333,11 +333,11 @@ import {
|
|
|
333
333
|
import"./index-fmsr7v69.js";
|
|
334
334
|
import {
|
|
335
335
|
runManagedWrapup2
|
|
336
|
-
} from "./index-
|
|
336
|
+
} from "./index-37a9bfta.js";
|
|
337
337
|
import"./index-kw7azjmy.js";
|
|
338
338
|
import"./index-kaqs6h31.js";
|
|
339
|
-
import"./index-
|
|
340
|
-
import"./index-
|
|
339
|
+
import"./index-xgczbhyx.js";
|
|
340
|
+
import"./index-esr8qcc4.js";
|
|
341
341
|
import {
|
|
342
342
|
isDreamerRunnable,
|
|
343
343
|
isSmartNoteSurfaceAvailable,
|
|
@@ -8205,7 +8205,7 @@ var require_src2 = __commonJS(function(exports, module) {
|
|
|
8205
8205
|
// package.json
|
|
8206
8206
|
var package_default = {
|
|
8207
8207
|
name: "@cortexkit/opencode-magic-context",
|
|
8208
|
-
version: "0.49.
|
|
8208
|
+
version: "0.49.47",
|
|
8209
8209
|
type: "module",
|
|
8210
8210
|
description: "OpenCode plugin for Magic Context — cross-session memory and context management",
|
|
8211
8211
|
main: "dist/index.js",
|
|
@@ -12063,7 +12063,7 @@ async function setup(context) {
|
|
|
12063
12063
|
if (claimStorageBackupWarningCheck() && isMagicContextStorageOutsideEngram(storageDir)) {
|
|
12064
12064
|
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.`);
|
|
12065
12065
|
}
|
|
12066
|
-
const { registerContext } = await import("./context-
|
|
12066
|
+
const { registerContext } = await import("./context-hvkjxqhs.js");
|
|
12067
12067
|
setHarness2("opencode2");
|
|
12068
12068
|
bindStaleBuildNotice({}, import.meta.url, "opencode2");
|
|
12069
12069
|
const duties = await registerContext(context);
|
|
@@ -12536,7 +12536,7 @@ var server = async (ctx) => {
|
|
|
12536
12536
|
rustReplayParticipant: () => magicContextRuntime.magicContext?.getRustReplayParticipant?.() ?? null,
|
|
12537
12537
|
onStorageBusyRefusal: async (sessionId, message) => {
|
|
12538
12538
|
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-j93pn2hn.js"));
|
|
12539
|
-
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-
|
|
12539
|
+
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-5746a5b6.js"));
|
|
12540
12540
|
await sendStatusNotification(ctx.client, sessionId, message, {
|
|
12541
12541
|
toastDurationMs: 15000
|
|
12542
12542
|
});
|
|
@@ -19,7 +19,7 @@ serveWorkerJobs(async (input, port) => {
|
|
|
19
19
|
await main();
|
|
20
20
|
async function main() {
|
|
21
21
|
if (input.v2ArchiveReader) {
|
|
22
|
-
const { serveV2ArchiveReads } = await import("./v2-archive-reader-
|
|
22
|
+
const { serveV2ArchiveReads } = await import("./v2-archive-reader-yp9956t8.js");
|
|
23
23
|
await serveV2ArchiveReads(port, openConnections);
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
@@ -51,7 +51,7 @@ serveWorkerJobs(async (input, port) => {
|
|
|
51
51
|
await runMessageFtsRowidMapBackfill(db);
|
|
52
52
|
reply = { kind: "fts-rowid-backfill" };
|
|
53
53
|
} else if (input.searchArchive) {
|
|
54
|
-
const { renderSearchArchive } = await import("./search-archive-
|
|
54
|
+
const { renderSearchArchive } = await import("./search-archive-f6kwv02s.js");
|
|
55
55
|
const { readRawSessionMessageIdOrdinalsForRangeFromDb } = await import("./read-session-raw-x7a9b3jm.js");
|
|
56
56
|
const archive = input.searchArchive;
|
|
57
57
|
let raw;
|
|
@@ -7,8 +7,8 @@ import {
|
|
|
7
7
|
setRecompTerminal2,
|
|
8
8
|
buildRecompDeps2,
|
|
9
9
|
runManagedRecomp2
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
10
|
+
} from "./index-eej9kwad.js";
|
|
11
|
+
import"./index-bqhjzhv4.js";
|
|
12
12
|
import"./index-gn6gfz4y.js";
|
|
13
13
|
import"./index-sd3egckz.js";
|
|
14
14
|
import"./index-sd2s4t4p.js";
|
|
@@ -16,11 +16,11 @@ import"./index-d4qw2h43.js";
|
|
|
16
16
|
import"./index-jjvbk92s.js";
|
|
17
17
|
import"./index-s79g172v.js";
|
|
18
18
|
import"./index-4dhv7mqz.js";
|
|
19
|
-
import"./index-
|
|
19
|
+
import"./index-1qmv26ga.js";
|
|
20
20
|
import"./index-2qbtqg1w.js";
|
|
21
21
|
import"./index-etn2hmb5.js";
|
|
22
22
|
import"./index-2amn2s73.js";
|
|
23
|
-
import"./index-
|
|
23
|
+
import"./index-6athgjba.js";
|
|
24
24
|
import"./index-8cfnaagj.js";
|
|
25
25
|
import"./index-25ka1jza.js";
|
|
26
26
|
import"./index-qt1qqasc.js";
|
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
renderVerboseRangeForTool2,
|
|
4
4
|
renderItemByTag2
|
|
5
5
|
} from "./index-kw7azjmy.js";
|
|
6
|
-
import"./index-
|
|
6
|
+
import"./index-1qmv26ga.js";
|
|
7
7
|
import"./index-2qbtqg1w.js";
|
|
8
8
|
import"./index-etn2hmb5.js";
|
|
9
9
|
import"./index-2amn2s73.js";
|
|
10
|
-
import"./index-
|
|
10
|
+
import"./index-6athgjba.js";
|
|
11
11
|
import"./index-xgnh498s.js";
|
|
12
12
|
import"./index-x53gnmce.js";
|
|
13
13
|
import"./index-1zx87sdm.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderSearchArchive2,
|
|
3
3
|
renderSearchArchiveOffThread2
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
4
|
+
} from "./index-esr8qcc4.js";
|
|
5
|
+
import"./index-xgczbhyx.js";
|
|
6
6
|
import"./index-kaqs6h31.js";
|
|
7
7
|
import"./index-xgnh498s.js";
|
|
8
8
|
import"./index-x53gnmce.js";
|
|
@@ -5,8 +5,8 @@ import {
|
|
|
5
5
|
readV2RawMessagePagesForConversion2,
|
|
6
6
|
createV2RawMessageReader2,
|
|
7
7
|
createV2RawMessageProvider2
|
|
8
|
-
} from "./index-
|
|
9
|
-
import"./index-
|
|
8
|
+
} from "./index-w6fh4v87.js";
|
|
9
|
+
import"./index-6athgjba.js";
|
|
10
10
|
import"./index-wh9fxds5.js";
|
|
11
11
|
import"./index-58e3y90n.js";
|
|
12
12
|
import"./index-gzy5w8ya.js";
|