@cortexkit/opencode-magic-context 0.49.83 → 0.49.84

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.
Files changed (95) hide show
  1. package/dist/auto-search-worker.js +1 -1
  2. package/dist/chunk-embedding-write-worker.js +1 -1
  3. package/dist/{context-xmyke353.js → context-3sajdysh.js} +302 -96
  4. package/dist/{derive-budgets-2z6xxm7e.js → derive-budgets-0kcek5ex.js} +1 -1
  5. package/dist/features/magic-context/mural/render-trigger.d.ts +3 -3
  6. package/dist/features/magic-context/mural/render-trigger.d.ts.map +1 -1
  7. package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
  8. package/dist/{index-zzvd4a9z.js → index-05bm2ndp.js} +1 -1
  9. package/dist/{index-2xhzmwf6.js → index-0wehkw71.js} +5 -5
  10. package/dist/{index-zvane1rq.js → index-5wjv4c41.js} +1 -1
  11. package/dist/{index-twmeey4h.js → index-70cv85b0.js} +2 -2
  12. package/dist/{index-2q0t43fy.js → index-7j2zv9nm.js} +1 -1
  13. package/dist/{index-wxxcfpxh.js → index-cfy5k1pa.js} +6 -6
  14. package/dist/{index-b2787fk6.js → index-d028gmgp.js} +25 -9
  15. package/dist/{index-dg5jvh9r.js → index-k0jnsjcp.js} +3 -3
  16. package/dist/{index-tky3j43e.js → index-kthfyf45.js} +55 -11
  17. package/dist/{index-hz1xdb15.js → index-qybp04ff.js} +3 -3
  18. package/dist/{index-e21n48yd.js → index-rdh63md0.js} +23 -0
  19. package/dist/{index-x8qgqnym.js → index-skwwbcnv.js} +2 -2
  20. package/dist/{index-2ygw6q5s.js → index-szwrpyac.js} +2 -2
  21. package/dist/{index-eptthgkw.js → index-tqnvn9pa.js} +5 -5
  22. package/dist/{index-93rezfvc.js → index-tvbkemec.js} +37 -6
  23. package/dist/{index-rnyaa7cj.js → index-xd0ww0ns.js} +1 -1
  24. package/dist/{index-eyk7msgw.js → index-xjfan0za.js} +17 -17
  25. package/dist/{index-y208s7zx.js → index-xrnhxkz7.js} +6 -1
  26. package/dist/index.js +20 -20
  27. package/dist/{message-index-bounded-cfkeyf72.js → message-index-bounded-6fr624zf.js} +3 -3
  28. package/dist/migration-worker.js +1 -1
  29. package/dist/raw-ordinal-warmup-worker.js +4 -4
  30. package/dist/{read-session-chunk-s3qac56g.js → read-session-chunk-6wedfths.js} +2 -2
  31. package/dist/{recomp-orchestrator-fjdp3t1d.js → recomp-orchestrator-m2s3jpvj.js} +9 -9
  32. package/dist/{render-c9fjwrad.js → render-p2j7rn9a.js} +7 -7
  33. package/dist/{search-archive-s2jas2jb.js → search-archive-hz9xh7nh.js} +4 -4
  34. package/dist/{search-1jejx5cx.js → search-ksx0f1qd.js} +5 -5
  35. package/dist/shared/models-dev-cache.d.ts +6 -1
  36. package/dist/shared/models-dev-cache.d.ts.map +1 -1
  37. package/dist/shared/test-git-env.d.ts +3 -0
  38. package/dist/shared/test-git-env.d.ts.map +1 -0
  39. package/dist/{storage-tags-6e83pvff.js → storage-tags-y2mrb8e6.js} +1 -1
  40. package/dist/{store-reader-tr64nxyy.js → store-reader-tsv1w4vt.js} +1 -1
  41. package/dist/{store-ggrq9e14.js → store-x0swqb5c.js} +2 -2
  42. package/dist/{transform-postprocess-phase-p2egg02g.js → transform-postprocess-phase-1wb2rrr1.js} +10 -10
  43. package/dist/v2/auto-search-worker.js +1 -1
  44. package/dist/v2/chunk-embedding-write-worker.js +3 -3
  45. package/dist/v2/{context-zn18k0yk.js → context-at9nje0j.js} +431 -233
  46. package/dist/v2/{derive-budgets-2eam671q.js → derive-budgets-xbwcap8k.js} +2 -2
  47. package/dist/v2/fold/restore.d.ts.map +1 -1
  48. package/dist/v2/hooks/context.d.ts.map +1 -1
  49. package/dist/v2/hooks/revert-message-state.d.ts +12 -0
  50. package/dist/v2/hooks/revert-message-state.d.ts.map +1 -0
  51. package/dist/v2/hooks/storage-notice.d.ts +12 -6
  52. package/dist/v2/hooks/storage-notice.d.ts.map +1 -1
  53. package/dist/v2/{message-index-bounded-0xy4dn04.js → message-index-bounded-jqy7283g.js} +4 -4
  54. package/dist/v2/migration-worker.js +3 -3
  55. package/dist/v2/raw-ordinal-warmup-worker.js +4 -4
  56. package/dist/v2/{read-session-chunk-6mt2t6dy.js → read-session-chunk-n3nhfvd7.js} +3 -3
  57. package/dist/v2/{recomp-orchestrator-jn39mxh0.js → recomp-orchestrator-nhef90gc.js} +13 -13
  58. package/dist/v2/{render-q2aj9bgy.js → render-c9r2g2jv.js} +10 -10
  59. package/dist/v2/{search-archive-fj59gjv1.js → search-archive-80ckv9kq.js} +5 -5
  60. package/dist/v2/{search-9xn6ds9x.js → search-t06js5dc.js} +7 -7
  61. package/dist/v2/{server-2ktxmtbd.js → server-210rc0z9.js} +1 -1
  62. package/dist/v2/{server-2gcfmd47.js → server-2k8tkbhz.js} +2 -2
  63. package/dist/v2/{server-c8mqs0v5.js → server-3cndh146.js} +10 -10
  64. package/dist/v2/{server-vt6nj2hn.js → server-3hhakg5a.js} +35 -19
  65. package/dist/v2/{server-53n8hv5q.js → server-863bwkga.js} +4 -4
  66. package/dist/v2/{server-5yfq912a.js → server-9nk5h6w6.js} +23 -0
  67. package/dist/v2/{server-xepx8t43.js → server-a2f1bhyj.js} +1 -1
  68. package/dist/v2/{server-r00xyx66.js → server-ap81bk3c.js} +28 -28
  69. package/dist/v2/{server-1efjj215.js → server-cce6m31c.js} +37 -6
  70. package/dist/v2/{server-2w1rdttn.js → server-dfesqfv1.js} +2 -2
  71. package/dist/v2/{server-569he5mh.js → server-hhw6rzsn.js} +1 -1
  72. package/dist/v2/{server-1cn3kryt.js → server-mr9rqn0y.js} +5 -5
  73. package/dist/v2/{server-g1a0nhtk.js → server-ry6rpspz.js} +4 -4
  74. package/dist/v2/{server-xdh4r20h.js → server-s15knz0w.js} +642 -627
  75. package/dist/v2/{server-0dmzr7f9.js → server-sxfbjdye.js} +2 -2
  76. package/dist/v2/{server-nqdzv8b7.js → server-sy98vksf.js} +55 -11
  77. package/dist/v2/{server-rp52f40v.js → server-w1jfaxas.js} +1 -1
  78. package/dist/v2/{server-bj779zmp.js → server-y4favn4d.js} +1 -1
  79. package/dist/v2/server.js +4 -4
  80. package/dist/v2/{storage-tags-z8j8wq34.js → storage-tags-xq81zgt2.js} +2 -2
  81. package/dist/v2/{store-qdgzd38f.js → store-h3s95ywe.js} +2 -2
  82. package/dist/v2/{store-reader-83tka051.js → store-reader-paamf0ac.js} +1 -1
  83. package/dist/v2/store-reader.d.ts +11 -0
  84. package/dist/v2/store-reader.d.ts.map +1 -1
  85. package/dist/v2/{v2-archive-reader-9z8z97db.js → v2-archive-reader-1zzteaa5.js} +1 -1
  86. package/dist/v2/{wrapup-orchestrator-vd5zfp3v.js → wrapup-orchestrator-9y98qcqz.js} +13 -13
  87. package/dist/{v2-archive-reader-r0xpxsb1.js → v2-archive-reader-3yjxaj5z.js} +1 -1
  88. package/dist/{wrapup-orchestrator-k29zqfp9.js → wrapup-orchestrator-sa3a075a.js} +10 -10
  89. package/package.json +1 -1
  90. package/src/shared/models-dev-cache.ts +90 -21
  91. package/src/shared/reusable-worker.test.ts +31 -29
  92. package/src/shared/sqlite.test.ts +19 -6
  93. package/src/shared/test-db.test.ts +5 -3
  94. package/src/shared/test-git-env.test.ts +38 -0
  95. package/src/shared/test-git-env.ts +10 -0
@@ -198,7 +198,7 @@ import {
198
198
  snapRangeToCompartments,
199
199
  getActiveCompartmentRun,
200
200
  startCompartmentAgent
201
- } from "./index-b2787fk6.js";
201
+ } from "./index-d028gmgp.js";
202
202
  import {
203
203
  hasTrustedAbsoluteWall,
204
204
  applyProvenInputFloor,
@@ -210,7 +210,7 @@ import {
210
210
  deriveTriggerBudget2,
211
211
  resolveKnownHistorianContextLimit2,
212
212
  resolveHistorianProducerLimits2
213
- } from "./index-tky3j43e.js";
213
+ } from "./index-kthfyf45.js";
214
214
  import {
215
215
  resolveModelCalibration,
216
216
  calibrateBuckets,
@@ -357,7 +357,7 @@ import {
357
357
  getTagsByNumbers2,
358
358
  getDroppedTagsByNumbers2,
359
359
  getMaxDroppedTagNumber2
360
- } from "./index-y208s7zx.js";
360
+ } from "./index-xrnhxkz7.js";
361
361
  import {
362
362
  BoundedSessionMap,
363
363
  observeTemporalDecisions,
@@ -429,7 +429,7 @@ import {
429
429
  readRawSessionMessageById2,
430
430
  readSessionChunk2,
431
431
  readRawSessionSeedTail2
432
- } from "./index-2q0t43fy.js";
432
+ } from "./index-7j2zv9nm.js";
433
433
  import {
434
434
  isFailClosedBlockingError,
435
435
  shouldBypassFailClosedBlock,
@@ -455,7 +455,7 @@ import {
455
455
  runSqliteOptimize,
456
456
  openDatabase,
457
457
  openCurrentDatabase
458
- } from "./index-zvane1rq.js";
458
+ } from "./index-5wjv4c41.js";
459
459
  import {
460
460
  unescapeXml,
461
461
  resolveWorkspaceShareCategories,
@@ -571,10 +571,10 @@ import {
571
571
  GLOBAL_USER_PROFILE_PROJECT_PATH,
572
572
  getProjectState,
573
573
  bumpProjectUserProfileVersion
574
- } from "./index-x8qgqnym.js";
574
+ } from "./index-skwwbcnv.js";
575
575
  import {
576
576
  getLastIndexedOrdinal
577
- } from "./index-zzvd4a9z.js";
577
+ } from "./index-05bm2ndp.js";
578
578
  import {
579
579
  SESSION_NOTE_CONDITION_ERROR,
580
580
  getNoteByIdInScope,
@@ -707,13 +707,13 @@ import {
707
707
  resolveMemoriesByIdsForSearch2,
708
708
  unifiedSearch2,
709
709
  formatSearchResults2
710
- } from "./index-dg5jvh9r.js";
710
+ } from "./index-k0jnsjcp.js";
711
711
  import {
712
712
  scheduleReconciliation,
713
713
  scheduleIncrementalIndex,
714
714
  getMessageIndexQueueHeapStats,
715
715
  clearSessionTracking
716
- } from "./index-rnyaa7cj.js";
716
+ } from "./index-xd0ww0ns.js";
717
717
  import {
718
718
  flushIgnoredMessages2,
719
719
  clearIgnoredMessages2,
@@ -723,7 +723,7 @@ import {
723
723
  import {
724
724
  setRecompStarting2,
725
725
  setRecompTerminal2
726
- } from "./index-hz1xdb15.js";
726
+ } from "./index-qybp04ff.js";
727
727
  import {
728
728
  makeToolCompositeKey,
729
729
  searchMessageHistoryOffThread,
@@ -808,7 +808,7 @@ import {
808
808
  abortSessionFailClosed2,
809
809
  evaluateEmergencyFailClosed2,
810
810
  runPostTransformPhase2
811
- } from "./index-wxxcfpxh.js";
811
+ } from "./index-cfy5k1pa.js";
812
812
  import {
813
813
  ANNOUNCEMENT_VERSION2,
814
814
  ANNOUNCEMENT_FEATURES2,
@@ -823,13 +823,13 @@ import {
823
823
  renderMessageByOrdinal2,
824
824
  renderVerboseRangeForTool2,
825
825
  renderItemByTag2
826
- } from "./index-twmeey4h.js";
826
+ } from "./index-70cv85b0.js";
827
827
  import {
828
828
  readV2ArchiveOffThread2
829
- } from "./index-2xhzmwf6.js";
829
+ } from "./index-0wehkw71.js";
830
830
  import {
831
831
  renderSearchArchiveOffThread2
832
- } from "./index-2ygw6q5s.js";
832
+ } from "./index-szwrpyac.js";
833
833
  import {
834
834
  COMPACTION_ENABLED_PATH,
835
835
  isDreamerRunnable,
@@ -16735,7 +16735,7 @@ function registerRpcHandlers(rpcServer, args) {
16735
16735
  return { count: buildCompartmentCount(db, sessionId, moduleStatus) };
16736
16736
  });
16737
16737
  const buildManagedCtx = async (db) => {
16738
- const { deriveHistorianChunkTokens, resolveHistorianContextLimit } = await importPluginModule(() => import("./derive-budgets-2z6xxm7e.js"));
16738
+ const { deriveHistorianChunkTokens, resolveHistorianContextLimit } = await importPluginModule(() => import("./derive-budgets-0kcek5ex.js"));
16739
16739
  const { resolveHistorianModel } = await importPluginModule(() => import("./model-resolution-280gmqvd.js"));
16740
16740
  const { userObservationCollectionEnabled, userObservationsRequested } = await importPluginModule(() => import("./task-config-qt6n4bxm.js"));
16741
16741
  const DEFAULT_HISTORIAN_TIMEOUT_MS = 10 * 60 * 1000;
@@ -16787,7 +16787,7 @@ function registerRpcHandlers(rpcServer, args) {
16787
16787
  const db = readDatabase();
16788
16788
  if (!db)
16789
16789
  return { ok: false, error: "db unavailable" };
16790
- const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-fjdp3t1d.js"));
16790
+ const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-m2s3jpvj.js"));
16791
16791
  const { sendIgnoredMessage } = await importPluginModule(() => import("./send-session-notification-7x518gew.js"));
16792
16792
  log2(`[rpc] recomp requested for session ${sessionId}`);
16793
16793
  if (!args.client && !args.hiddenCompletionExecutor) {
@@ -16872,7 +16872,7 @@ function registerRpcHandlers(rpcServer, args) {
16872
16872
  const db = readDatabase();
16873
16873
  if (!db)
16874
16874
  return { ok: false, error: "db unavailable" };
16875
- const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-k29zqfp9.js"));
16875
+ const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-sa3a075a.js"));
16876
16876
  const model = await args.readSelectedSessionModel?.(sessionId) ?? liveSessionState.liveModelBySession.get(sessionId);
16877
16877
  const window = resolveOpenCodeWrapupWindow(db, sessionId, model);
16878
16878
  if (!window)
@@ -4153,6 +4153,11 @@ function removeNoteNudgeAnchorByMessageId(db, sessionId, messageId) {
4153
4153
  }, { ensureRow: false });
4154
4154
  return ok && removed;
4155
4155
  }
4156
+ function pruneAutoSearchHintDecisions(db, sessionId, retiredMessageIds) {
4157
+ if (retiredMessageIds.size === 0)
4158
+ return 0;
4159
+ return updateAutoSearchHintRetirement(db, sessionId, retiredMessageIds).pruned;
4160
+ }
4156
4161
  var pendingAutoSearchRetirements = new WeakMap;
4157
4162
  var AUTO_SEARCH_DECISION_SOFT_LIMIT = 2000;
4158
4163
  function queueAutoSearchHintDecisionRetirement(db, sessionId, messageIds) {
@@ -8953,4 +8958,4 @@ function deleteToolTagsByOwner(db, sessionId, ownerMsgId) {
8953
8958
  return getDeleteToolTagsByOwnerStatement(db).all(sessionId, ownerMsgId).length;
8954
8959
  }
8955
8960
 
8956
- 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, getPersistedReasoningWatermark, setPersistedReasoningWatermark, clearPersistedReasoningWatermark, getEmergencyInputSample, setEmergencyDropSample, clearEmergencyDropSample, getLastNudgeUndropped, setLastNudgeUndropped, getChannel1NudgeState, setChannel1NudgeState, markChannel1PostReduceGracePending, captureChannel1PostReduceGraceBaseline, getChannel2NudgeState, getChannel2NudgeClaim, setChannel2NudgeState, casChannel2NudgeState, claimChannel2NudgeState, casChannel2NudgeClaim, getPersistedNoteNudge, setPersistedNoteNudgeTrigger, setPersistedNoteNudgeTriggerMessageId, getNoteNudgeAnchors, getAutoSearchHintDecisions, deliverNoteNudgeAtomic, appendAutoSearchHintDecision, pruneNoteNudgeAnchors, removeNoteNudgeAnchorByMessageId, queueAutoSearchHintDecisionRetirement, flushAutoSearchHintDecisionRetirement, removeAutoSearchHintDecisionByMessageId, 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, removeStrippedPlaceholderId, 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, getSessionsWithPendingMarker, cachedHeadCoversPendingCompactionMarker, 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 };
8961
+ 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, getPersistedReasoningWatermark, setPersistedReasoningWatermark, clearPersistedReasoningWatermark, getEmergencyInputSample, setEmergencyDropSample, clearEmergencyDropSample, getLastNudgeUndropped, setLastNudgeUndropped, getChannel1NudgeState, setChannel1NudgeState, markChannel1PostReduceGracePending, captureChannel1PostReduceGraceBaseline, getChannel2NudgeState, getChannel2NudgeClaim, setChannel2NudgeState, casChannel2NudgeState, claimChannel2NudgeState, casChannel2NudgeClaim, getPersistedNoteNudge, setPersistedNoteNudgeTrigger, setPersistedNoteNudgeTriggerMessageId, getNoteNudgeAnchors, getAutoSearchHintDecisions, deliverNoteNudgeAtomic, appendAutoSearchHintDecision, pruneNoteNudgeAnchors, removeNoteNudgeAnchorByMessageId, pruneAutoSearchHintDecisions, queueAutoSearchHintDecisionRetirement, flushAutoSearchHintDecisionRetirement, removeAutoSearchHintDecisionByMessageId, 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, removeStrippedPlaceholderId, 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, getSessionsWithPendingMarker, cachedHeadCoversPendingCompactionMarker, 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 };
package/dist/index.js CHANGED
@@ -4,7 +4,7 @@ import {
4
4
  recordToolParameters,
5
5
  createDroppedInputToolExecuteBeforeHook,
6
6
  readRawSessionMessages2
7
- } from "./index-2q0t43fy.js";
7
+ } from "./index-7j2zv9nm.js";
8
8
  import {
9
9
  setHarness2
10
10
  } from "./index-pavzsdc6.js";
@@ -58,7 +58,7 @@ import {
58
58
  checkCompactionMarkerConsistency,
59
59
  clearInjectionCache,
60
60
  clearNoteNudgeTriggerOnly
61
- } from "./index-b2787fk6.js";
61
+ } from "./index-d028gmgp.js";
62
62
  import"./index-sd3egckz.js";
63
63
  import {
64
64
  hasTrustedAbsoluteWall,
@@ -68,7 +68,7 @@ import {
68
68
  deriveHistorianChunkTokens2,
69
69
  resolveKnownHistorianContextLimit2,
70
70
  resolveHistorianContextLimit2
71
- } from "./index-tky3j43e.js";
71
+ } from "./index-kthfyf45.js";
72
72
  import {
73
73
  buildDreamTaskRuntimeConfigs2,
74
74
  userMemoryCollectionEnabled2,
@@ -145,7 +145,7 @@ import {
145
145
  parameterDescriptionsFor,
146
146
  MagicContextRpcServer,
147
147
  applyHiddenSubagentTemperature
148
- } from "./index-eyk7msgw.js";
148
+ } from "./index-xjfan0za.js";
149
149
  import {
150
150
  resolveOpenCodeDbPath,
151
151
  openCodeDbPathExists,
@@ -197,7 +197,7 @@ import {
197
197
  dropServedRecord,
198
198
  registerLkgPersistence,
199
199
  dropSlot
200
- } from "./index-x8qgqnym.js";
200
+ } from "./index-skwwbcnv.js";
201
201
  import {
202
202
  recordSessionProjectIdentity
203
203
  } from "./index-vpw46557.js";
@@ -212,7 +212,7 @@ import {
212
212
  openDatabaseAsync,
213
213
  isDatabasePersisted,
214
214
  getDatabasePersistenceError
215
- } from "./index-zvane1rq.js";
215
+ } from "./index-5wjv4c41.js";
216
216
  import {
217
217
  registerExitAbort,
218
218
  unregisterExitAbort
@@ -232,7 +232,7 @@ import"./index-pxnzyvjc.js";
232
232
  import {
233
233
  getDefaultSubcConnectionFile,
234
234
  SubcModuleTransport
235
- } from "./index-dg5jvh9r.js";
235
+ } from "./index-k0jnsjcp.js";
236
236
  import"./index-qt1qqasc.js";
237
237
  import"./index-e6ncz7a6.js";
238
238
  import {
@@ -282,7 +282,7 @@ import {
282
282
  isAnthropicFamilyRoute,
283
283
  deleteTagsByMessageId2,
284
284
  getMaxTagNumberBySession2
285
- } from "./index-y208s7zx.js";
285
+ } from "./index-xrnhxkz7.js";
286
286
  import {
287
287
  resolveHistorianModel2,
288
288
  resolveOpenCodeAgentOverrides2,
@@ -295,8 +295,8 @@ import {
295
295
  import"./index-snbpdpa3.js";
296
296
  import {
297
297
  deleteIndexedMessage
298
- } from "./index-zzvd4a9z.js";
299
- import"./index-e21n48yd.js";
298
+ } from "./index-05bm2ndp.js";
299
+ import"./index-rdh63md0.js";
300
300
  import"./index-bd34njzg.js";
301
301
  import {
302
302
  pushNotification2
@@ -319,13 +319,13 @@ import {
319
319
  armBindingRecoverySafely,
320
320
  collectForeignTextParts,
321
321
  resetDegradedCacheCount2
322
- } from "./index-wxxcfpxh.js";
322
+ } from "./index-cfy5k1pa.js";
323
323
  import {
324
324
  scheduleClearAndReindex
325
- } from "./index-rnyaa7cj.js";
325
+ } from "./index-xd0ww0ns.js";
326
326
  import {
327
327
  runManagedRecomp2
328
- } from "./index-hz1xdb15.js";
328
+ } from "./index-qybp04ff.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-eptthgkw.js";
337
- import"./index-twmeey4h.js";
336
+ } from "./index-tqnvn9pa.js";
337
+ import"./index-70cv85b0.js";
338
338
  import"./index-52x68mj4.js";
339
- import"./index-2xhzmwf6.js";
340
- import"./index-2ygw6q5s.js";
339
+ import"./index-0wehkw71.js";
340
+ import"./index-szwrpyac.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.83",
8208
+ version: "0.49.84",
8209
8209
  type: "module",
8210
8210
  description: "OpenCode plugin for Magic Context — cross-session memory and context management",
8211
8211
  main: "dist/index.js",
@@ -12085,7 +12085,7 @@ async function setup(context) {
12085
12085
  if (claimStorageBackupWarningCheck() && isMagicContextStorageOutsideEngram(storageDir)) {
12086
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.`);
12087
12087
  }
12088
- const { registerContext } = await import("./context-xmyke353.js");
12088
+ const { registerContext } = await import("./context-3sajdysh.js");
12089
12089
  setHarness2("opencode2");
12090
12090
  bindStaleBuildNotice({}, import.meta.url, "opencode2");
12091
12091
  const duties = await registerContext(context);
@@ -12558,7 +12558,7 @@ var server = async (ctx) => {
12558
12558
  rustReplayParticipant: () => magicContextRuntime.magicContext?.getRustReplayParticipant?.() ?? null,
12559
12559
  onStorageBusyRefusal: async (sessionId, message) => {
12560
12560
  const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-7x518gew.js"));
12561
- const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-p2egg02g.js"));
12561
+ const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-1wb2rrr1.js"));
12562
12562
  await sendStatusNotification(ctx.client, sessionId, message, {
12563
12563
  toastDurationMs: 15000
12564
12564
  });
@@ -4,7 +4,7 @@ import {
4
4
  yieldIndexChunk2
5
5
  } from "./index-gzy5w8ya.js";
6
6
  import"./index-1zx87sdm.js";
7
- import"./index-y208s7zx.js";
7
+ import"./index-xrnhxkz7.js";
8
8
  import"./index-5vsk2cpp.js";
9
9
  import"./index-pavzsdc6.js";
10
10
  import"./index-ywrz4wy2.js";
@@ -17,7 +17,7 @@ import"./index-1d042x6w.js";
17
17
  import"./index-q7q6qp1f.js";
18
18
  import"./index-58e3y90n.js";
19
19
  import"./index-x40zr813.js";
20
- import"./index-2q0t43fy.js";
20
+ import"./index-7j2zv9nm.js";
21
21
  import {
22
22
  MESSAGE_INDEX_MAX_FTS_BYTES,
23
23
  messageIndexSkipKey,
@@ -25,7 +25,7 @@ import {
25
25
  markMessageIndexDirty,
26
26
  getIndexableContent,
27
27
  indexSingleMessage
28
- } from "./index-zzvd4a9z.js";
28
+ } from "./index-05bm2ndp.js";
29
29
  import"./index-s32f8y67.js";
30
30
  import"./index-m0pwswv9.js";
31
31
 
@@ -19,7 +19,7 @@ import"./index-fb3zxn06.js";
19
19
  import {
20
20
  setSqlitePragmaConfig,
21
21
  initializeDatabase
22
- } from "./index-zvane1rq.js";
22
+ } from "./index-5wjv4c41.js";
23
23
  import"./index-wh9fxds5.js";
24
24
  import"./index-v0p37hm2.js";
25
25
  import"./index-96ztjvkn.js";
@@ -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-r0xpxsb1.js");
22
+ const { serveV2ArchiveReads } = await import("./v2-archive-reader-3yjxaj5z.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-s2jas2jb.js");
54
+ const { renderSearchArchive } = await import("./search-archive-hz9xh7nh.js");
55
55
  const { readRawSessionMessageIdOrdinalsForRangeFromDb } = await import("./read-session-raw-3sc9231y.js");
56
56
  const archive = input.searchArchive;
57
57
  let raw;
@@ -81,7 +81,7 @@ serveWorkerJobs(async (input, port) => {
81
81
  const { setHarness } = await import("./harness-e4avh192.js");
82
82
  setHarness(input.harness ?? "opencode");
83
83
  const [{ indexMessageInShortChunks }, { configureContextDatabasePragmas }] = await Promise.all([
84
- import("./message-index-bounded-cfkeyf72.js"),
84
+ import("./message-index-bounded-6fr624zf.js"),
85
85
  import("./sqlite-context-pragmas-mv9jqwjh.js")
86
86
  ]);
87
87
  configureContextDatabasePragmas(db);
@@ -95,7 +95,7 @@ serveWorkerJobs(async (input, port) => {
95
95
  measurements: result.measurements
96
96
  };
97
97
  } else if (input.tagRatio !== undefined) {
98
- const { scanTagOwnerSummary, scanTagOwnerDelta } = await import("./storage-tags-6e83pvff.js");
98
+ const { scanTagOwnerSummary, scanTagOwnerDelta } = await import("./storage-tags-y2mrb8e6.js");
99
99
  const delta = input.tagState ? scanTagOwnerDelta(db, input.sessionId, input.tagState) : null;
100
100
  if (delta)
101
101
  reply = { kind: "tag-delta", delta };
@@ -38,8 +38,8 @@ import {
38
38
  readSessionChunk2,
39
39
  getRawSessionMessageIdsThrough2,
40
40
  readRawSessionSeedTail2
41
- } from "./index-2q0t43fy.js";
42
- import"./index-y208s7zx.js";
41
+ } from "./index-7j2zv9nm.js";
42
+ import"./index-xrnhxkz7.js";
43
43
  import"./index-1zx87sdm.js";
44
44
  import"./index-x40zr813.js";
45
45
  import"./index-6nqz8hsz.js";
@@ -7,8 +7,8 @@ import {
7
7
  setRecompTerminal2,
8
8
  buildRecompDeps2,
9
9
  runManagedRecomp2
10
- } from "./index-hz1xdb15.js";
11
- import"./index-b2787fk6.js";
10
+ } from "./index-qybp04ff.js";
11
+ import"./index-d028gmgp.js";
12
12
  import"./index-832w615x.js";
13
13
  import"./index-sd3egckz.js";
14
14
  import"./index-fgy6hnr3.js";
@@ -16,16 +16,16 @@ import"./index-w8dcjt7f.js";
16
16
  import"./index-jjvbk92s.js";
17
17
  import"./index-shpyv8gq.js";
18
18
  import"./index-4dhv7mqz.js";
19
- import"./index-x8qgqnym.js";
19
+ import"./index-skwwbcnv.js";
20
20
  import"./index-bd34njzg.js";
21
- import"./index-zzvd4a9z.js";
21
+ import"./index-05bm2ndp.js";
22
22
  import"./index-2amn2s73.js";
23
- import"./index-e21n48yd.js";
24
- import"./index-tky3j43e.js";
23
+ import"./index-rdh63md0.js";
24
+ import"./index-kthfyf45.js";
25
25
  import"./index-g6hfh4h4.js";
26
26
  import"./index-qt1qqasc.js";
27
- import"./index-2q0t43fy.js";
28
- import"./index-y208s7zx.js";
27
+ import"./index-7j2zv9nm.js";
28
+ import"./index-xrnhxkz7.js";
29
29
  import"./index-1zx87sdm.js";
30
30
  import"./index-x40zr813.js";
31
31
  import"./index-fzgyvsb1.js";
@@ -35,7 +35,7 @@ import"./index-6nqz8hsz.js";
35
35
  import"./index-vpw46557.js";
36
36
  import"./index-snbpdpa3.js";
37
37
  import"./index-pxnzyvjc.js";
38
- import"./index-zvane1rq.js";
38
+ import"./index-5wjv4c41.js";
39
39
  import"./index-fb3zxn06.js";
40
40
  import"./index-w2wpx7t5.js";
41
41
  import"./index-fr0wbhdn.js";
@@ -2,20 +2,20 @@ import {
2
2
  renderMessageByOrdinal2,
3
3
  renderVerboseRangeForTool2,
4
4
  renderItemByTag2
5
- } from "./index-twmeey4h.js";
6
- import"./index-x8qgqnym.js";
5
+ } from "./index-70cv85b0.js";
6
+ import"./index-skwwbcnv.js";
7
7
  import"./index-bd34njzg.js";
8
- import"./index-zzvd4a9z.js";
8
+ import"./index-05bm2ndp.js";
9
9
  import"./index-2amn2s73.js";
10
- import"./index-e21n48yd.js";
11
- import"./index-2q0t43fy.js";
12
- import"./index-y208s7zx.js";
10
+ import"./index-rdh63md0.js";
11
+ import"./index-7j2zv9nm.js";
12
+ import"./index-xrnhxkz7.js";
13
13
  import"./index-1zx87sdm.js";
14
14
  import"./index-x40zr813.js";
15
15
  import"./index-6nqz8hsz.js";
16
16
  import"./index-snbpdpa3.js";
17
17
  import"./index-pxnzyvjc.js";
18
- import"./index-zvane1rq.js";
18
+ import"./index-5wjv4c41.js";
19
19
  import"./index-fb3zxn06.js";
20
20
  import"./index-w2wpx7t5.js";
21
21
  import"./index-fr0wbhdn.js";
@@ -1,11 +1,11 @@
1
1
  import {
2
2
  renderSearchArchive2,
3
3
  renderSearchArchiveOffThread2
4
- } from "./index-2ygw6q5s.js";
5
- import"./index-2xhzmwf6.js";
4
+ } from "./index-szwrpyac.js";
5
+ import"./index-0wehkw71.js";
6
6
  import"./index-52x68mj4.js";
7
- import"./index-2q0t43fy.js";
8
- import"./index-y208s7zx.js";
7
+ import"./index-7j2zv9nm.js";
8
+ import"./index-xrnhxkz7.js";
9
9
  import"./index-1zx87sdm.js";
10
10
  import"./index-x40zr813.js";
11
11
  import"./index-6nqz8hsz.js";
@@ -5,8 +5,8 @@ import {
5
5
  resolveMemoriesByIdsForSearch2,
6
6
  unifiedSearch2,
7
7
  formatSearchResults2
8
- } from "./index-dg5jvh9r.js";
9
- import"./index-rnyaa7cj.js";
8
+ } from "./index-k0jnsjcp.js";
9
+ import"./index-xd0ww0ns.js";
10
10
  import"./index-52x68mj4.js";
11
11
  import"./index-fgy6hnr3.js";
12
12
  import"./index-w8dcjt7f.js";
@@ -14,11 +14,11 @@ import"./index-jjvbk92s.js";
14
14
  import"./index-shpyv8gq.js";
15
15
  import"./index-4dhv7mqz.js";
16
16
  import"./index-bd34njzg.js";
17
- import"./index-zzvd4a9z.js";
17
+ import"./index-05bm2ndp.js";
18
18
  import"./index-2amn2s73.js";
19
19
  import"./index-qt1qqasc.js";
20
- import"./index-2q0t43fy.js";
21
- import"./index-y208s7zx.js";
20
+ import"./index-7j2zv9nm.js";
21
+ import"./index-xrnhxkz7.js";
22
22
  import"./index-1zx87sdm.js";
23
23
  import"./index-x40zr813.js";
24
24
  import"./index-zb4h9nrk.js";
@@ -79,11 +79,16 @@ export declare function resolveLimit(limit: ModelLimit | undefined, providerID:
79
79
  * a few times so the cache warms instead of leaving the session on the 128k
80
80
  * default until the next restart. A successful load (any providers) stops early.
81
81
  *
82
- * Safe to call concurrently; only overwrites the cache on success.
82
+ * A full catalog replaces the previous snapshot. When OpenCode 2 reads the
83
+ * list while recording usage, merge mode keeps unlisted models and replaces
84
+ * the limits for listed models. Only a row synthesized from the request
85
+ * because its model was not listed retains omitted limits field by field.
83
86
  */
84
87
  export declare function refreshModelLimitsFromApi(client: OpencodeClientLike, options?: {
85
88
  retries?: number;
86
89
  retryDelayMs?: number;
90
+ mode?: "merge" | "replace";
91
+ draftOnlyModelKey?: string;
87
92
  }): Promise<void>;
88
93
  /**
89
94
  * Re-warm the limit cache ONCE per process, after auth is provably live.
@@ -1 +1 @@
1
- {"version":3,"file":"models-dev-cache.d.ts","sourceRoot":"","sources":["../../src/shared/models-dev-c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,CAAC,EAAE,MAAM,EAC7B,OAAO,CAAC,EAAE;IACN,uBAAuB,CAAC,EAAE,sBAAsB,CAAC;IACjD,OAAO,CAAC,EAAE,UAAU,GAAG,IAAI,CAAC;CAC/B,GACF,oBAAoB,GAAG,SAAS,CAoClC;AAED,wBAAgB,kBAAkB,CAC9B,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,MAAM,EACf,oBAAoB,CAAC,EAAE,MAAM,EAC7B,OAAO,CAAC,EAAE;IACN,WAAW,CAAC,EAAE,SAAS,GAAG,MAAM,CAAC;IACjC,uBAAuB,CAAC,EAAE,sBAAsB,CAAC;CACpD,GACF,MAAM,GAAG,SAAS,CAiCpB;AAED;;;GAGG;AACH,qFAAqF;AACrF,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAShF;AAED,wBAAgB,iBAAiB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAGzF;AAED,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAWxF;AA2BD,gFAAgF;AAChF,wBAAgB,mBAAmB,IAAI,IAAI,CAK1C;AAED,oDAAoD;AACpD,wBAAgB,sBAAsB,IAAI;IACtC,SAAS,EAAE,OAAO,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CACpB,CAMA"}
@@ -0,0 +1,3 @@
1
+ /** Keep caller config, hooks, and repository paths out of fixture Git commands. */
2
+ export declare function isolatedTestGitEnv(overrides?: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
3
+ //# sourceMappingURL=test-git-env.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"test-git-env.d.ts","sourceRoot":"","sources":["../../src/shared/test-git-env.ts"],"names":[],"mappings":"AAEA,mFAAmF;AACnF,wBAAgB,kBAAkB,CAAC,SAAS,GAAE,MAAM,CAAC,UAAe,GAAG,MAAM,CAAC,UAAU,CAMvF"}
@@ -64,7 +64,7 @@ import {
64
64
  adoptNullOwnerToolTag2,
65
65
  getCandidateToolOwners2,
66
66
  pickNearestPriorOwner2
67
- } from "./index-y208s7zx.js";
67
+ } from "./index-xrnhxkz7.js";
68
68
  import"./index-1zx87sdm.js";
69
69
  import"./index-6nqz8hsz.js";
70
70
  import"./index-jrj95cce.js";
@@ -3,7 +3,7 @@ import {
3
3
  RAW_MESSAGE_TYPES2,
4
4
  V2StoreReaderPool2,
5
5
  V2StoreReader2
6
- } from "./index-e21n48yd.js";
6
+ } from "./index-rdh63md0.js";
7
7
  import"./index-58e3y90n.js";
8
8
  import"./index-gzy5w8ya.js";
9
9
  export {
@@ -8,8 +8,8 @@ import {
8
8
  readV2RawMessagePagesForConversion2,
9
9
  createV2RawMessageReader2,
10
10
  createV2RawMessageProvider2
11
- } from "./index-93rezfvc.js";
12
- import"./index-e21n48yd.js";
11
+ } from "./index-tvbkemec.js";
12
+ import"./index-rdh63md0.js";
13
13
  import"./index-wh9fxds5.js";
14
14
  import"./index-58e3y90n.js";
15
15
  import"./index-gzy5w8ya.js";
@@ -19,9 +19,9 @@ import {
19
19
  finalizeMessageRepresentation2,
20
20
  runPostTransformPhase2,
21
21
  checkM0MutationDriftAndSignal2
22
- } from "./index-wxxcfpxh.js";
23
- import"./index-rnyaa7cj.js";
24
- import"./index-b2787fk6.js";
22
+ } from "./index-cfy5k1pa.js";
23
+ import"./index-xd0ww0ns.js";
24
+ import"./index-d028gmgp.js";
25
25
  import"./index-832w615x.js";
26
26
  import"./index-sd3egckz.js";
27
27
  import"./index-fgy6hnr3.js";
@@ -29,16 +29,16 @@ import"./index-w8dcjt7f.js";
29
29
  import"./index-jjvbk92s.js";
30
30
  import"./index-shpyv8gq.js";
31
31
  import"./index-4dhv7mqz.js";
32
- import"./index-x8qgqnym.js";
32
+ import"./index-skwwbcnv.js";
33
33
  import"./index-bd34njzg.js";
34
- import"./index-zzvd4a9z.js";
34
+ import"./index-05bm2ndp.js";
35
35
  import"./index-2amn2s73.js";
36
- import"./index-e21n48yd.js";
37
- import"./index-tky3j43e.js";
36
+ import"./index-rdh63md0.js";
37
+ import"./index-kthfyf45.js";
38
38
  import"./index-g6hfh4h4.js";
39
39
  import"./index-qt1qqasc.js";
40
- import"./index-2q0t43fy.js";
41
- import"./index-y208s7zx.js";
40
+ import"./index-7j2zv9nm.js";
41
+ import"./index-xrnhxkz7.js";
42
42
  import"./index-1zx87sdm.js";
43
43
  import"./index-x40zr813.js";
44
44
  import"./index-fzgyvsb1.js";
@@ -48,7 +48,7 @@ import"./index-6nqz8hsz.js";
48
48
  import"./index-vpw46557.js";
49
49
  import"./index-snbpdpa3.js";
50
50
  import"./index-pxnzyvjc.js";
51
- import"./index-zvane1rq.js";
51
+ import"./index-5wjv4c41.js";
52
52
  import"./index-fb3zxn06.js";
53
53
  import"./index-w2wpx7t5.js";
54
54
  import"./index-fr0wbhdn.js";