@cortexkit/opencode-magic-context 0.49.64 → 0.49.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auto-search-worker.js +1 -1
- package/dist/chunk-embedding-write-worker.js +1 -1
- package/dist/{context-v1apxpct.js → context-1acz1d4x.js} +18 -15
- package/dist/features/magic-context/compartment-storage.d.ts +7 -0
- package/dist/features/magic-context/compartment-storage.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-session.d.ts.map +1 -1
- package/dist/features/magic-context/storage-meta-shared.d.ts +5 -1
- package/dist/features/magic-context/storage-meta-shared.d.ts.map +1 -1
- package/dist/features/magic-context/types.d.ts +2 -0
- package/dist/features/magic-context/types.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-prompt.d.ts +8 -1
- package/dist/hooks/magic-context/compartment-prompt.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-historian.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-types.d.ts +5 -0
- package/dist/hooks/magic-context/compartment-runner-types.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-trigger.d.ts.map +1 -1
- package/dist/hooks/magic-context/historian-prompt-fit.d.ts +10 -3
- package/dist/hooks/magic-context/historian-prompt-fit.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts +3 -0
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts +35 -1
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/reference-retrieval.d.ts +3 -2
- package/dist/hooks/magic-context/reference-retrieval.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-compartment-phase.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform.d.ts +3 -0
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/unmanaged-over-window.d.ts +4 -0
- package/dist/hooks/magic-context/unmanaged-over-window.d.ts.map +1 -1
- package/dist/hooks/magic-context/wrapup-orchestrator.d.ts +1 -0
- package/dist/hooks/magic-context/wrapup-orchestrator.d.ts.map +1 -1
- package/dist/{index-aq4yfcq6.js → index-2t9e10mt.js} +122 -43
- package/dist/{index-7dj3s7qq.js → index-2x46rnct.js} +1 -1
- package/dist/{index-71h616be.js → index-3v5mfapn.js} +1 -1
- package/dist/{index-m568xww6.js → index-8a1m48va.js} +3 -3
- package/dist/{index-gwb2wpz7.js → index-fybdhbd4.js} +2 -2
- package/dist/{index-qn27gh4e.js → index-g53qhdrb.js} +1 -1
- package/dist/{index-5fbeycst.js → index-gy33sq5h.js} +6 -6
- package/dist/{index-zdd01nhc.js → index-m47yte97.js} +124 -38
- package/dist/{index-c0k54yhd.js → index-m6cv2hv3.js} +3 -3
- package/dist/{index-g59gpt1j.js → index-nfvyraa3.js} +3 -3
- package/dist/{index-ezr8mr1c.js → index-ngrrs3yb.js} +13 -4
- package/dist/{index-6kgsfb81.js → index-q73yeb83.js} +1 -1
- package/dist/{index-kvfrse61.js → index-t20q6aj6.js} +12 -1
- package/dist/{index-0ab398z2.js → index-xmk2a6pq.js} +2 -2
- package/dist/{index-hs9xxmmy.js → index-z10dryn5.js} +6 -5
- package/dist/index.js +19 -18
- package/dist/{message-index-bounded-zs7ah2te.js → message-index-bounded-f27039js.js} +3 -3
- package/dist/migration-worker.js +1 -1
- package/dist/plugin/hooks/create-session-hooks.d.ts +6 -0
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/raw-ordinal-warmup-worker.js +4 -4
- package/dist/{read-session-chunk-jf2f8jz8.js → read-session-chunk-4ma2vsva.js} +2 -2
- package/dist/{recomp-orchestrator-6vxnrh2w.js → recomp-orchestrator-p9c4jg9m.js} +7 -7
- package/dist/{render-n46wpv2n.js → render-h16ea0th.js} +6 -6
- package/dist/{search-archive-9k6vsp44.js → search-archive-km2ahm3e.js} +4 -4
- package/dist/{search-s386bwwh.js → search-m9rpnh7m.js} +5 -5
- package/dist/{storage-tags-2r952wqy.js → storage-tags-ktp70q1e.js} +1 -1
- package/dist/{transform-postprocess-phase-jjc9jcer.js → transform-postprocess-phase-120s1ep8.js} +8 -8
- package/dist/v2/auto-search-worker.js +1 -1
- package/dist/v2/chunk-embedding-write-worker.js +1 -1
- package/dist/v2/{context-nfkhb5sv.js → context-p0z7mrsf.js} +121 -40
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/{message-index-bounded-axbs1s97.js → message-index-bounded-td516y9c.js} +3 -3
- package/dist/v2/migration-worker.js +1 -1
- package/dist/v2/raw-ordinal-warmup-worker.js +4 -4
- package/dist/v2/{read-session-chunk-41cm522x.js → read-session-chunk-6dz32wmh.js} +2 -2
- package/dist/v2/{recomp-orchestrator-krccyz0a.js → recomp-orchestrator-ayy7xzm3.js} +6 -6
- package/dist/v2/{render-7v7yx9xb.js → render-gqp4fwqn.js} +6 -6
- package/dist/v2/{search-archive-1yc8bh6y.js → search-archive-qn82j8k0.js} +4 -4
- package/dist/v2/{search-mabwkzw2.js → search-dhekqtfc.js} +4 -4
- package/dist/v2/{server-yxw43z2w.js → server-166m5nrw.js} +13 -4
- package/dist/v2/{server-bh9yzxpz.js → server-34vhmd1d.js} +2 -2
- package/dist/v2/{server-k97r77x3.js → server-77207nf4.js} +2 -2
- package/dist/v2/{server-hcgqsdrh.js → server-jew1m85s.js} +1 -1
- package/dist/v2/{server-xse5jngy.js → server-n6hdj0fn.js} +124 -38
- package/dist/v2/{server-8w9b5exq.js → server-q8ta10e5.js} +1 -1
- package/dist/v2/{server-cdddk5d1.js → server-s1a0bwpc.js} +1 -1
- package/dist/v2/{server-anh8gf0w.js → server-s66wvkpf.js} +2 -2
- package/dist/v2/{server-hb5zm7yh.js → server-verzg5w8.js} +12 -1
- package/dist/v2/{server-bnka2vf2.js → server-xwcg55a8.js} +3 -3
- package/dist/v2/server.js +2 -2
- package/dist/v2/{storage-tags-9zs0gc7w.js → storage-tags-qe8r1n9w.js} +1 -1
- package/dist/v2/{v2-archive-reader-pgk140pb.js → v2-archive-reader-tbjwxvc5.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-v2rgtczc.js → wrapup-orchestrator-ksdzyfby.js} +7 -6
- package/dist/{v2-archive-reader-cv6veqnz.js → v2-archive-reader-j16k987e.js} +1 -1
- package/dist/{wrapup-orchestrator-qbtg1dhm.js → wrapup-orchestrator-w09bkgmk.js} +8 -8
- package/package.json +1 -1
|
@@ -2438,6 +2438,12 @@ function getProtectionWindowForSession(db, sessionId, floor) {
|
|
|
2438
2438
|
|
|
2439
2439
|
// src/features/magic-context/storage-meta-shared.ts
|
|
2440
2440
|
import { Buffer as Buffer2 } from "node:buffer";
|
|
2441
|
+
var CACHED_TRIM_PARTIAL_SQL = `EXISTS (
|
|
2442
|
+
SELECT 1 FROM compartments
|
|
2443
|
+
WHERE compartments.session_id = session_meta.session_id
|
|
2444
|
+
AND compartments.end_message_id = session_meta.cached_m0_last_baseline_end_message_id
|
|
2445
|
+
AND compartments.end_block_index IS NOT NULL
|
|
2446
|
+
)`;
|
|
2441
2447
|
var SESSION_META_SELECT_COLUMNS = [
|
|
2442
2448
|
"session_id",
|
|
2443
2449
|
"last_response_time",
|
|
@@ -2464,6 +2470,7 @@ var SESSION_META_SELECT_COLUMNS = [
|
|
|
2464
2470
|
"cached_m0_mural_data_url",
|
|
2465
2471
|
"cached_m0_mural_hash",
|
|
2466
2472
|
"cached_m1_bytes",
|
|
2473
|
+
"cached_m0_last_baseline_end_message_id",
|
|
2467
2474
|
"cached_m0_project_memory_epoch",
|
|
2468
2475
|
"cached_m0_workspace_fingerprint",
|
|
2469
2476
|
"cached_m0_project_user_profile_version",
|
|
@@ -2623,6 +2630,8 @@ function getDefaultSessionMeta(sessionId) {
|
|
|
2623
2630
|
cachedM0MuralDataUrl: null,
|
|
2624
2631
|
cachedM0MuralHash: null,
|
|
2625
2632
|
cachedM1Bytes: null,
|
|
2633
|
+
cachedM0TrimBoundaryId: null,
|
|
2634
|
+
cachedM0TrimBoundaryPartial: false,
|
|
2626
2635
|
cachedM0ProjectMemoryEpoch: null,
|
|
2627
2636
|
cachedM0WorkspaceFingerprint: null,
|
|
2628
2637
|
cachedM0ProjectUserProfileVersion: null,
|
|
@@ -2700,6 +2709,8 @@ function toSessionMeta(row) {
|
|
|
2700
2709
|
cachedM0MuralDataUrl: stringOrNull(row.cached_m0_mural_data_url),
|
|
2701
2710
|
cachedM0MuralHash: stringOrNull(row.cached_m0_mural_hash),
|
|
2702
2711
|
cachedM1Bytes: toBufferOrNull(row.cached_m1_bytes),
|
|
2712
|
+
cachedM0TrimBoundaryId: row.cached_m0_last_baseline_end_message_id || null,
|
|
2713
|
+
cachedM0TrimBoundaryPartial: row.cached_trim_partial === 1,
|
|
2703
2714
|
cachedM0ProjectMemoryEpoch: numOrNull(row.cached_m0_project_memory_epoch),
|
|
2704
2715
|
cachedM0WorkspaceFingerprint: stringOrNull(row.cached_m0_workspace_fingerprint),
|
|
2705
2716
|
cachedM0ProjectUserProfileVersion: numOrNull(row.cached_m0_project_user_profile_version),
|
|
@@ -8806,4 +8817,4 @@ function deleteToolTagsByOwner(db, sessionId, ownerMsgId) {
|
|
|
8806
8817
|
return getDeleteToolTagsByOwnerStatement(db).all(sessionId, ownerMsgId).length;
|
|
8807
8818
|
}
|
|
8808
8819
|
|
|
8809
|
-
export { protectedToolTagNumbers, protectedToolTokenCount, stripWellFormedLeadingTagPrefix, stripPersistedAssistantText, byteSize, stripTagPrefix, peelLeadingMcTagNotation, prependTag, isThinkingPart, currentReclaimableToolOutputCount, isRecord, contentTagOwnerMessageId, estimateImageTokensFromDataUrl, estimateToolAttachmentImageTokens, providerVisiblePart, providerVisibleMessage, CLEARED_TODO_STATE_JSON, normalizeTodoStateJson, buildSyntheticTodoPart, computeSyntheticCallId, isSyntheticTodoPart, countRealUserMessages, tailHygieneStructuralSignature, sameTailHygieneStructuralSignature, formatTailHygienePrefixMismatch, refreshTailHygieneBaseline, effectiveTailHygiene, assertTailHygieneContentUnchangedIfEnabled, CHANNEL1_SENTINEL, CHANNEL1_FLOOR_TOKENS, isDroppedToolOutput, toolOutputTokens, decideChannel1, evaluateChannel2, formatChannel1Evaluation, formatChannel2Evaluation, buildChannel2Reminder, buildChannel1Reminder, createFinalWireIncompleteLogger, MERGED_REASONING_PARTS_PREFIX, decodeMergedReasoningParts, readFrozenMergedReasoningParts, MAX_EXECUTE_THRESHOLD, escalationBands, HYGIENE_PROVIDER_UNITS_VERSION, sessionDecisionCalibration, transitionSessionHygieneUnits, readEpochFloorSnapshot, getProtectionWindowForSession, SESSION_META_SELECT_COLUMNS, META_COLUMNS, BOOLEAN_META_KEYS, NULL_BIND_META_KEYS, isSessionMetaRow, getDefaultSessionMeta, ensureSessionMetaRow, toSessionMeta, persistCachedM0, clearCachedM0M1, clearCachedM0, withReplayEnvelopeSnapshot, invalidateReplayEnvelopeSnapshot, isRustMarkerAdmissionFenced, setRustMarkerAdmissionFence, ReplayDocumentError, readReplayEnvelope, readReplayDocument, updateReplayDocument, writeReplayDocument, isEmergencyRecoveryArmed, isProviderOverflowReconfirmed, isProviderOverflowFailClosedProven, getEmergencyRecoveryArmedAt, describeProtectedTailDrainBudgetSkip, loadPersistedUsage, loadProtectedTailMeta, markProtectedTailPolicyV3Seeded, recordProtectedTailPublicationFloor, recordProtectedTailNoEligibleHead, resetProtectedTailNoEligibleHead, getWrapupInProgressState, isWrapupInProgress, acquireWrapupInProgress, updateWrapupInProgress, releaseWrapupInProgress, resolveCompactionModeRecord, getCompactionModeRecord, setCompactionModeRecord, getProtectedTailDrainBudgetSkip, reserveProtectedTailDrainTokens, clearEmergencyDrainLatch, recordHistorianDrainFailure, clearHistorianDrainFailure, rollbackProtectedTailDrainReservation, clearPersistedReasoningWatermark, getEmergencyInputSample, setEmergencyDropSample, clearEmergencyDropSample, getLastNudgeUndropped, setLastNudgeUndropped, getChannel1NudgeState, setChannel1NudgeState, markChannel1PostReduceGracePending, captureChannel1PostReduceGraceBaseline, getChannel2NudgeState, setChannel2NudgeState, casChannel2NudgeState, claimChannel2NudgeState, casChannel2NudgeClaim, getPersistedNoteNudge, setPersistedNoteNudgeTrigger, setPersistedNoteNudgeTriggerMessageId, getNoteNudgeAnchors, getAutoSearchHintDecisions, deliverNoteNudgeAtomic, appendAutoSearchHintDecision, pruneNoteNudgeAnchors, queueAutoSearchHintDecisionRetirement, flushAutoSearchHintDecisionRetirement, getPersistedTodoPermissionDenied, setPersistedTodoPermissionDenied, getPersistedTodoSyntheticAnchor, setPersistedTodoSyntheticAnchor, clearPersistedTodoSyntheticAnchor, getNoteLastReadAt, setNoteLastReadAt, getHistorianFailureState, incrementHistorianFailure, clearHistorianFailureState, getOverflowState, loadTransformPassStateSnapshot, recordOverflowDetected, recordDetectedContextLimit, clearEmergencyRecovery, clearDetectedContextLimit, getPersistedCompactionMarkerState, getCompactionMarkerPublicationState, compareAndSetCompactionMarkerPublicationState, setPersistedCompactionMarkerState, getDeferredClearedCompactionMarkerState, retireDeferredClearedCompactionMarkerState, parseStrippedPlaceholderState, serializeStrippedPlaceholderState, getStrippedPlaceholderIds, applyStrippedPlaceholderDelta, THINKING_BINDING_RECOVERY_FROZEN_PREFIX, THINKING_BINDING_STRIP_ORDER_END_MARKER, thinkingBindingRecoveryFrozenId, COMPACTION_OFF_THINKING_FROZEN_PREFIX, compactionOffThinkingFrozenId, compactionOffFrozenThinkingIds, getThinkingBindingRecoveryTarget, armThinkingBindingRecovery, noteBindingRecoveryAwaitingClear, bindingRecoveryAwaitingClear, retryBindingRecoveryClear, clearThinkingBindingRecoveryIf, getMergedReasoningStrippedIds, addMergedReasoningStrippedIds, getTrailingBlankDecisions, addTrailingBlankDecisions, demoteTrailingBlankKeepDecisions, getStaleReduceStrippedIds, addStaleReduceStrippedIds, getProcessedImageStrippedIds, parseProcessedImageMarkers, serializeProcessedImageMarkers, getProcessedImageMarkers, addProcessedImageStrippedIds, getPendingCompactionMarkerState, getCompactionMarkerHealth, loadPostprocessReplaySnapshot, setPendingCompactionMarkerState, replacePendingCompactionMarkerStateIf, clearPendingCompactionMarkerStateIf, getPendingPiCompactionMarkerState, clearPendingPiCompactionMarkerStateIf, logPiCompactionMarkerClear, getObservedEpochFloor, resolveEpochFloorForPass, getReasoningRemovalState, addRemovedReasoningIds, markDropLeavesReasoning, detectThinkingBindingMismatch, detectLatestTurnThinkingMismatch, isPrefixBoundThinkingModel, detectOverflow, modelAcceptsEmptyContent, isAnthropicFamilyRoute, neutralizeDroppedReasoningPart, restoreNeutralizedReasoningPart, isNeutralizedReasoningPart, variantChangeBustsProviderCache, makeSentinel, makeWholeMessageSentinel, isSentinel, replaySentinelByMessageIds, isInActiveAnthropicTurn, activeAnthropicTurnStart, hasAnthropicReasoning, markServedShapeRepair, prepareServedShapeRepair, stripSystemInjectedMessages, stripDroppedPlaceholderMessages, replayClearedReasoning, replayStrippedInlineThinking, clearOldReasoning, stripClearedReasoning, captureInlineThinkingRepairs, stripInlineThinking, findReasoningBearingAssistantIds, findLatestAssistantReasoningMutationExemptMessage, snapshotTrailingBlankSourceDecisions, findTrailingBlankDecisionCandidates, applyFrozenTrailingBlankDecisions, stripReasoningFromAssistantIds, findMergedReasoningStripDecisions, stripReasoningFromMergedAssistants, getEmptyImageParts, stripProcessedImages, projectOpencodeReasoningBudgetCutoff, DEFAULT_KEEP_REASONING_TOKENS, resolveKeepReasoningTokens, reasoningStepCost, reasoningBudgetCutoff, reasoningTextAndOpaque, opencodeReasoningBudgetCutoff, describeFinalWireTail, estimatePartImageTokens, openCode2ThinkingPayload, estimateMessageTokens, wireContentBytes, createFinalWireUsageTracker, estimateFinalWireInputTokens, estimateAppendedWireTokens, estimateEmergencyDropReclaimTokens, planEmergencyDrop, measureEmergencyTag, snapshotEmergencyServedMass, tagsSinceReading, emergencyServedMassRemovedSince, queuePendingOp, queuePendingDropForUnchangedTag, getPendingOps, hasPendingDropOps, getPendingOpsCount, clearPendingOps, removePendingOp, updateTagByteSize2, getRecentTagOwnerMessageIds2, getActiveTagTokenAggregate2, AGE_RECLAIM_MIN_TOKENS2, getOldestActiveUnprotectedToolTags2, getActiveToolTagsForAgeReclaim2, getTriggerTagTokenUpperBound2, getActiveTagTokenTotalsByMessage2, updateTagTokenCount2, getPersistedToolTagAccounting2, getAllStatusTagTokenTotalsFlat2, getReasoningTokenEstimatesByMessage2, tryGetReasoningTokenEstimatesByMessage2, getMaxTagNumberByOwnerMessage2, TagOwnerSummaryNotReady2, scanTagOwnerSummary2, cachedTagOwnerRatios2, tagOwnerWarmupState2, scanTagOwnerDelta2, installTagOwnerDelta2, installTagOwnerSummary2, isTagOwnerSummaryReady2, tagTokenCountIsNull2, backfillTagTokenCounts2, insertTag2, updateTagStatus2, markTagDropped2, markWhitespaceAssistantTagInert2, getInertWhitespaceAssistantTags2, getInertWhitespaceAssistantTagsByNumbers2, updateTagDropMode2, updateCavemanDepth2, updateTagMessageId2, hasPiFallbackMessageTags2, findAdoptableFallbackTags2, adoptFallbackTagMessageId2, foldShrunkPartTags2, hasPiFallbackToolOwnerTags2, findPiFallbackToolOwnerTags2, adoptPiFallbackToolOwnerTag2, adoptPiFallbackMessageTag2, markTagsCompactedByMessageIds2, deleteTagsByMessageId2, getMaxTagNumberBySession2, getTagNumberByMessageId2, getAssignableTagNumberByMessageId2, getMinMessageTagNumberForRawId2, deriveTagLoadFloor2, TAG_SELECT_COLUMNS2, getTagsBySession2, getActiveTagsBySession2, getTailHygieneTags2, getDroppedTagsBySession2, getTagsForPendingOperations2, getTagsByNumbers2, getNewestToolTagNumbers2, getDroppedTagsByNumbers2, getMaxDroppedTagNumber2, getTagById2, getTopNBySize2, getToolTagNumberByOwner2, getNullOwnerToolTag2, adoptNullOwnerToolTag2, getCandidateToolOwners2, pickNearestPriorOwner2 };
|
|
8820
|
+
export { protectedToolTagNumbers, protectedToolTokenCount, stripWellFormedLeadingTagPrefix, stripPersistedAssistantText, byteSize, stripTagPrefix, peelLeadingMcTagNotation, prependTag, isThinkingPart, currentReclaimableToolOutputCount, isRecord, contentTagOwnerMessageId, estimateImageTokensFromDataUrl, estimateToolAttachmentImageTokens, providerVisiblePart, providerVisibleMessage, CLEARED_TODO_STATE_JSON, normalizeTodoStateJson, buildSyntheticTodoPart, computeSyntheticCallId, isSyntheticTodoPart, countRealUserMessages, tailHygieneStructuralSignature, sameTailHygieneStructuralSignature, formatTailHygienePrefixMismatch, refreshTailHygieneBaseline, effectiveTailHygiene, assertTailHygieneContentUnchangedIfEnabled, CHANNEL1_SENTINEL, CHANNEL1_FLOOR_TOKENS, isDroppedToolOutput, toolOutputTokens, decideChannel1, evaluateChannel2, formatChannel1Evaluation, formatChannel2Evaluation, buildChannel2Reminder, buildChannel1Reminder, createFinalWireIncompleteLogger, MERGED_REASONING_PARTS_PREFIX, decodeMergedReasoningParts, readFrozenMergedReasoningParts, MAX_EXECUTE_THRESHOLD, escalationBands, HYGIENE_PROVIDER_UNITS_VERSION, sessionDecisionCalibration, transitionSessionHygieneUnits, readEpochFloorSnapshot, getProtectionWindowForSession, CACHED_TRIM_PARTIAL_SQL, SESSION_META_SELECT_COLUMNS, META_COLUMNS, BOOLEAN_META_KEYS, NULL_BIND_META_KEYS, isSessionMetaRow, getDefaultSessionMeta, ensureSessionMetaRow, toSessionMeta, persistCachedM0, clearCachedM0M1, clearCachedM0, withReplayEnvelopeSnapshot, invalidateReplayEnvelopeSnapshot, isRustMarkerAdmissionFenced, setRustMarkerAdmissionFence, ReplayDocumentError, readReplayEnvelope, readReplayDocument, updateReplayDocument, writeReplayDocument, isEmergencyRecoveryArmed, isProviderOverflowReconfirmed, isProviderOverflowFailClosedProven, getEmergencyRecoveryArmedAt, describeProtectedTailDrainBudgetSkip, loadPersistedUsage, loadProtectedTailMeta, markProtectedTailPolicyV3Seeded, recordProtectedTailPublicationFloor, recordProtectedTailNoEligibleHead, resetProtectedTailNoEligibleHead, getWrapupInProgressState, isWrapupInProgress, acquireWrapupInProgress, updateWrapupInProgress, releaseWrapupInProgress, resolveCompactionModeRecord, getCompactionModeRecord, setCompactionModeRecord, getProtectedTailDrainBudgetSkip, reserveProtectedTailDrainTokens, clearEmergencyDrainLatch, recordHistorianDrainFailure, clearHistorianDrainFailure, rollbackProtectedTailDrainReservation, clearPersistedReasoningWatermark, getEmergencyInputSample, setEmergencyDropSample, clearEmergencyDropSample, getLastNudgeUndropped, setLastNudgeUndropped, getChannel1NudgeState, setChannel1NudgeState, markChannel1PostReduceGracePending, captureChannel1PostReduceGraceBaseline, getChannel2NudgeState, setChannel2NudgeState, casChannel2NudgeState, claimChannel2NudgeState, casChannel2NudgeClaim, getPersistedNoteNudge, setPersistedNoteNudgeTrigger, setPersistedNoteNudgeTriggerMessageId, getNoteNudgeAnchors, getAutoSearchHintDecisions, deliverNoteNudgeAtomic, appendAutoSearchHintDecision, pruneNoteNudgeAnchors, queueAutoSearchHintDecisionRetirement, flushAutoSearchHintDecisionRetirement, getPersistedTodoPermissionDenied, setPersistedTodoPermissionDenied, getPersistedTodoSyntheticAnchor, setPersistedTodoSyntheticAnchor, clearPersistedTodoSyntheticAnchor, getNoteLastReadAt, setNoteLastReadAt, getHistorianFailureState, incrementHistorianFailure, clearHistorianFailureState, getOverflowState, loadTransformPassStateSnapshot, recordOverflowDetected, recordDetectedContextLimit, clearEmergencyRecovery, clearDetectedContextLimit, getPersistedCompactionMarkerState, getCompactionMarkerPublicationState, compareAndSetCompactionMarkerPublicationState, setPersistedCompactionMarkerState, getDeferredClearedCompactionMarkerState, retireDeferredClearedCompactionMarkerState, parseStrippedPlaceholderState, serializeStrippedPlaceholderState, getStrippedPlaceholderIds, applyStrippedPlaceholderDelta, THINKING_BINDING_RECOVERY_FROZEN_PREFIX, THINKING_BINDING_STRIP_ORDER_END_MARKER, thinkingBindingRecoveryFrozenId, COMPACTION_OFF_THINKING_FROZEN_PREFIX, compactionOffThinkingFrozenId, compactionOffFrozenThinkingIds, getThinkingBindingRecoveryTarget, armThinkingBindingRecovery, noteBindingRecoveryAwaitingClear, bindingRecoveryAwaitingClear, retryBindingRecoveryClear, clearThinkingBindingRecoveryIf, getMergedReasoningStrippedIds, addMergedReasoningStrippedIds, getTrailingBlankDecisions, addTrailingBlankDecisions, demoteTrailingBlankKeepDecisions, getStaleReduceStrippedIds, addStaleReduceStrippedIds, getProcessedImageStrippedIds, parseProcessedImageMarkers, serializeProcessedImageMarkers, getProcessedImageMarkers, addProcessedImageStrippedIds, getPendingCompactionMarkerState, getCompactionMarkerHealth, loadPostprocessReplaySnapshot, setPendingCompactionMarkerState, replacePendingCompactionMarkerStateIf, clearPendingCompactionMarkerStateIf, getPendingPiCompactionMarkerState, clearPendingPiCompactionMarkerStateIf, logPiCompactionMarkerClear, getObservedEpochFloor, resolveEpochFloorForPass, getReasoningRemovalState, addRemovedReasoningIds, markDropLeavesReasoning, detectThinkingBindingMismatch, detectLatestTurnThinkingMismatch, isPrefixBoundThinkingModel, detectOverflow, modelAcceptsEmptyContent, isAnthropicFamilyRoute, neutralizeDroppedReasoningPart, restoreNeutralizedReasoningPart, isNeutralizedReasoningPart, variantChangeBustsProviderCache, makeSentinel, makeWholeMessageSentinel, isSentinel, replaySentinelByMessageIds, isInActiveAnthropicTurn, activeAnthropicTurnStart, hasAnthropicReasoning, markServedShapeRepair, prepareServedShapeRepair, stripSystemInjectedMessages, stripDroppedPlaceholderMessages, replayClearedReasoning, replayStrippedInlineThinking, clearOldReasoning, stripClearedReasoning, captureInlineThinkingRepairs, stripInlineThinking, findReasoningBearingAssistantIds, findLatestAssistantReasoningMutationExemptMessage, snapshotTrailingBlankSourceDecisions, findTrailingBlankDecisionCandidates, applyFrozenTrailingBlankDecisions, stripReasoningFromAssistantIds, findMergedReasoningStripDecisions, stripReasoningFromMergedAssistants, getEmptyImageParts, stripProcessedImages, projectOpencodeReasoningBudgetCutoff, DEFAULT_KEEP_REASONING_TOKENS, resolveKeepReasoningTokens, reasoningStepCost, reasoningBudgetCutoff, reasoningTextAndOpaque, opencodeReasoningBudgetCutoff, describeFinalWireTail, estimatePartImageTokens, openCode2ThinkingPayload, estimateMessageTokens, wireContentBytes, createFinalWireUsageTracker, estimateFinalWireInputTokens, estimateAppendedWireTokens, estimateEmergencyDropReclaimTokens, planEmergencyDrop, measureEmergencyTag, snapshotEmergencyServedMass, tagsSinceReading, emergencyServedMassRemovedSince, queuePendingOp, queuePendingDropForUnchangedTag, getPendingOps, hasPendingDropOps, getPendingOpsCount, clearPendingOps, removePendingOp, updateTagByteSize2, getRecentTagOwnerMessageIds2, getActiveTagTokenAggregate2, AGE_RECLAIM_MIN_TOKENS2, getOldestActiveUnprotectedToolTags2, getActiveToolTagsForAgeReclaim2, getTriggerTagTokenUpperBound2, getActiveTagTokenTotalsByMessage2, updateTagTokenCount2, getPersistedToolTagAccounting2, getAllStatusTagTokenTotalsFlat2, getReasoningTokenEstimatesByMessage2, tryGetReasoningTokenEstimatesByMessage2, getMaxTagNumberByOwnerMessage2, TagOwnerSummaryNotReady2, scanTagOwnerSummary2, cachedTagOwnerRatios2, tagOwnerWarmupState2, scanTagOwnerDelta2, installTagOwnerDelta2, installTagOwnerSummary2, isTagOwnerSummaryReady2, tagTokenCountIsNull2, backfillTagTokenCounts2, insertTag2, updateTagStatus2, markTagDropped2, markWhitespaceAssistantTagInert2, getInertWhitespaceAssistantTags2, getInertWhitespaceAssistantTagsByNumbers2, updateTagDropMode2, updateCavemanDepth2, updateTagMessageId2, hasPiFallbackMessageTags2, findAdoptableFallbackTags2, adoptFallbackTagMessageId2, foldShrunkPartTags2, hasPiFallbackToolOwnerTags2, findPiFallbackToolOwnerTags2, adoptPiFallbackToolOwnerTag2, adoptPiFallbackMessageTag2, markTagsCompactedByMessageIds2, deleteTagsByMessageId2, getMaxTagNumberBySession2, getTagNumberByMessageId2, getAssignableTagNumberByMessageId2, getMinMessageTagNumberForRawId2, deriveTagLoadFloor2, TAG_SELECT_COLUMNS2, getTagsBySession2, getActiveTagsBySession2, getTailHygieneTags2, getDroppedTagsBySession2, getTagsForPendingOperations2, getTagsByNumbers2, getNewestToolTagNumbers2, getDroppedTagsByNumbers2, getMaxDroppedTagNumber2, getTagById2, getTopNBySize2, getToolTagNumberByOwner2, getNullOwnerToolTag2, adoptNullOwnerToolTag2, getCandidateToolOwners2, pickNearestPriorOwner2 };
|
|
@@ -139,9 +139,9 @@ async function serveV2ArchiveReads2(port, openConnections) {
|
|
|
139
139
|
import("./sqlite-zdgm52sv.js"),
|
|
140
140
|
import("./store-reader-yaxtdy6f.js"),
|
|
141
141
|
import("./store-skkhh3rd.js"),
|
|
142
|
-
import("./read-session-chunk-
|
|
143
|
-
import("./render-
|
|
144
|
-
import("./search-archive-
|
|
142
|
+
import("./read-session-chunk-6dz32wmh.js"),
|
|
143
|
+
import("./render-gqp4fwqn.js"),
|
|
144
|
+
import("./search-archive-qn82j8k0.js"),
|
|
145
145
|
import("./expand-attachments-h33jbgyz.js")
|
|
146
146
|
]);
|
|
147
147
|
const pool = new V2StoreReaderPool;
|
package/dist/v2/server.js
CHANGED
|
@@ -7875,7 +7875,7 @@ var require_src2 = __commonJS(function(exports, module) {
|
|
|
7875
7875
|
// package.json
|
|
7876
7876
|
var package_default = {
|
|
7877
7877
|
name: "@cortexkit/opencode-magic-context",
|
|
7878
|
-
version: "0.49.
|
|
7878
|
+
version: "0.49.66",
|
|
7879
7879
|
type: "module",
|
|
7880
7880
|
description: "OpenCode plugin for Magic Context — cross-session memory and context management",
|
|
7881
7881
|
main: "dist/index.js",
|
|
@@ -8196,7 +8196,7 @@ async function setup(context) {
|
|
|
8196
8196
|
if (claimStorageBackupWarningCheck() && isMagicContextStorageOutsideEngram(storageDir)) {
|
|
8197
8197
|
log2(`[magic-context] Magic Context storage is at ${storageDir}, outside the folder Engram backs up (~/.local/share/cortexkit/magic-context). It is not included in CortexKit backups.`);
|
|
8198
8198
|
}
|
|
8199
|
-
const { registerContext } = await import("./context-
|
|
8199
|
+
const { registerContext } = await import("./context-p0z7mrsf.js");
|
|
8200
8200
|
setHarness2("opencode2");
|
|
8201
8201
|
bindStaleBuildNotice({}, import.meta.url, "opencode2");
|
|
8202
8202
|
const duties = await registerContext(context);
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
releaseCompartmentLeaseBestEffort,
|
|
12
12
|
getCompartments,
|
|
13
13
|
getLastCompartmentEndMessage
|
|
14
|
-
} from "./server-
|
|
14
|
+
} from "./server-166m5nrw.js";
|
|
15
15
|
import"./server-2amn2s73.js";
|
|
16
16
|
import"./server-y8xjr8rx.js";
|
|
17
17
|
import"./server-x6fn9x8q.js";
|
|
@@ -24,7 +24,7 @@ import"./server-1d042x6w.js";
|
|
|
24
24
|
import"./server-6ash6z8z.js";
|
|
25
25
|
import"./server-ds8vpfkr.js";
|
|
26
26
|
import"./server-8pdfmc27.js";
|
|
27
|
-
import"./server-
|
|
27
|
+
import"./server-q8ta10e5.js";
|
|
28
28
|
import {
|
|
29
29
|
getWrapupInProgressState,
|
|
30
30
|
acquireWrapupInProgress,
|
|
@@ -32,16 +32,16 @@ import {
|
|
|
32
32
|
releaseWrapupInProgress,
|
|
33
33
|
getHistorianFailureState,
|
|
34
34
|
clearEmergencyRecovery
|
|
35
|
-
} from "./server-
|
|
35
|
+
} from "./server-verzg5w8.js";
|
|
36
36
|
import"./server-xepx8t43.js";
|
|
37
|
-
import"./server-
|
|
37
|
+
import"./server-jew1m85s.js";
|
|
38
38
|
import"./server-1zx87sdm.js";
|
|
39
39
|
import"./server-rz6g5xne.js";
|
|
40
40
|
import"./server-2ra6pwf3.js";
|
|
41
41
|
import"./server-3ap5dmhc.js";
|
|
42
42
|
import {
|
|
43
43
|
prepareRawSessionOrdinals2
|
|
44
|
-
} from "./server-
|
|
44
|
+
} from "./server-s1a0bwpc.js";
|
|
45
45
|
import"./server-fr0wbhdn.js";
|
|
46
46
|
import"./server-jn4pktdk.js";
|
|
47
47
|
import"./server-afsz3cmx.js";
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
registerActiveCompartmentRun,
|
|
64
64
|
setRecompStarting2,
|
|
65
65
|
setRecompTerminal2
|
|
66
|
-
} from "./server-
|
|
66
|
+
} from "./server-n6hdj0fn.js";
|
|
67
67
|
import"./server-qt1qqasc.js";
|
|
68
68
|
import"./server-z5255w05.js";
|
|
69
69
|
import"./server-jtq03rkb.js";
|
|
@@ -231,6 +231,7 @@ async function runOneWrapupIteration(args) {
|
|
|
231
231
|
historianTwoPass: ctx.historianTwoPass,
|
|
232
232
|
historianExpandTools: ctx.historianExpandTools,
|
|
233
233
|
memoryEnabled: ctx.memoryEnabled,
|
|
234
|
+
memoryInjectionBudgetTokens: ctx.memoryInjectionBudgetTokens,
|
|
234
235
|
autoPromote: ctx.autoPromote,
|
|
235
236
|
experimentalUserMemories: ctx.userMemoriesEnabled,
|
|
236
237
|
userObservationsRequested: ctx.userObservationsRequested,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
runManagedWrapup2
|
|
3
|
-
} from "./index-
|
|
4
|
-
import"./index-
|
|
5
|
-
import"./index-
|
|
3
|
+
} from "./index-z10dryn5.js";
|
|
4
|
+
import"./index-8a1m48va.js";
|
|
5
|
+
import"./index-m47yte97.js";
|
|
6
6
|
import"./index-832w615x.js";
|
|
7
7
|
import"./index-sd3egckz.js";
|
|
8
8
|
import"./index-n6aye6ny.js";
|
|
@@ -10,16 +10,16 @@ import"./index-zxj39ba2.js";
|
|
|
10
10
|
import"./index-jjvbk92s.js";
|
|
11
11
|
import"./index-gq1g9a3a.js";
|
|
12
12
|
import"./index-4dhv7mqz.js";
|
|
13
|
-
import"./index-
|
|
13
|
+
import"./index-ngrrs3yb.js";
|
|
14
14
|
import"./index-tebcx987.js";
|
|
15
|
-
import"./index-
|
|
15
|
+
import"./index-2x46rnct.js";
|
|
16
16
|
import"./index-2amn2s73.js";
|
|
17
17
|
import"./index-6athgjba.js";
|
|
18
18
|
import"./index-ngwmx6nt.js";
|
|
19
19
|
import"./index-1sq1krqw.js";
|
|
20
20
|
import"./index-qt1qqasc.js";
|
|
21
|
-
import"./index-
|
|
22
|
-
import"./index-
|
|
21
|
+
import"./index-q73yeb83.js";
|
|
22
|
+
import"./index-t20q6aj6.js";
|
|
23
23
|
import"./index-1zx87sdm.js";
|
|
24
24
|
import"./index-x40zr813.js";
|
|
25
25
|
import"./index-x8a7jmkh.js";
|
|
@@ -29,7 +29,7 @@ import"./index-6nqz8hsz.js";
|
|
|
29
29
|
import"./index-jg7sbt3v.js";
|
|
30
30
|
import"./index-snbpdpa3.js";
|
|
31
31
|
import"./index-pxnzyvjc.js";
|
|
32
|
-
import"./index-
|
|
32
|
+
import"./index-g53qhdrb.js";
|
|
33
33
|
import"./index-fb3zxn06.js";
|
|
34
34
|
import"./index-xx05vta0.js";
|
|
35
35
|
import"./index-fr0wbhdn.js";
|
package/package.json
CHANGED