@cortexkit/pi-magic-context 0.49.13 → 0.49.14

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.
@@ -56,7 +56,7 @@ import {
56
56
  readRawSessionMessageIdOrdinalsForRange2,
57
57
  readRawSessionMessageById2,
58
58
  readSessionChunk2
59
- } from "./index-53xdqb3d.js";
59
+ } from "./index-75ah9413.js";
60
60
  import {
61
61
  isRecord,
62
62
  providerVisibleMessage,
@@ -70,7 +70,7 @@ import {
70
70
  getTagNumberByMessageId2,
71
71
  getTagsBySession2,
72
72
  getTagById2
73
- } from "./index-ed9d2ded.js";
73
+ } from "./index-j0n09wtp.js";
74
74
  import {
75
75
  estimateTokens
76
76
  } from "./index-g4jf772p.js";
@@ -103,7 +103,7 @@ import {
103
103
  clearLkgRecoveryFence,
104
104
  deleteSessionScopedRows,
105
105
  getLastIndexedOrdinal2
106
- } from "./index-vv1j5cak.js";
106
+ } from "./index-a4pk5yv9.js";
107
107
  import {
108
108
  SubcClient,
109
109
  connectionFileExists,
@@ -129,7 +129,7 @@ import {
129
129
  } from "./index-nwbhe6qv.js";
130
130
  import {
131
131
  getErrorMessage
132
- } from "./index-t27xk4r7.js";
132
+ } from "./index-ccsscaap.js";
133
133
  import {
134
134
  V2_MEMORY_CATEGORIES,
135
135
  CATEGORY_PRIORITY,
@@ -143,7 +143,7 @@ import {
143
143
  expandWorkspaceIdentitySetWithAliases,
144
144
  resolveStoredPathWorkspaceIdentity,
145
145
  storedPathBelongsToWorkspace
146
- } from "./index-3cnarwf8.js";
146
+ } from "./index-bet4sd3e.js";
147
147
  import {
148
148
  directoryHasGitMetadata,
149
149
  resolveProjectIdentityForSession,
@@ -166,7 +166,7 @@ import {
166
166
  resolveMemoriesByIdsForSearch2,
167
167
  unifiedSearch2,
168
168
  formatSearchResults2
169
- } from "./index-wp9q91kn.js";
169
+ } from "./index-0awvkeb5.js";
170
170
  import {
171
171
  computeCueContentHash,
172
172
  getMuralCueState,
@@ -23,7 +23,7 @@ import {
23
23
  TAG_SELECT_COLUMNS2,
24
24
  getCandidateToolOwners2,
25
25
  pickNearestPriorOwner2
26
- } from "./index-ed9d2ded.js";
26
+ } from "./index-j0n09wtp.js";
27
27
  import {
28
28
  OMO_INTERNAL_INITIATOR_MARKER,
29
29
  isSystemDirective,
@@ -37,7 +37,7 @@ import {
37
37
  } from "./index-jrap43gc.js";
38
38
  import {
39
39
  cleanUserText2
40
- } from "./index-53xdqb3d.js";
40
+ } from "./index-75ah9413.js";
41
41
  import {
42
42
  logSlowWriteTransaction
43
43
  } from "./index-d4dt19md.js";
@@ -51,7 +51,7 @@ import {
51
51
  hasPendingMigrations,
52
52
  getMainThreadMigrationBodyCount,
53
53
  runMigrations
54
- } from "./index-3cnarwf8.js";
54
+ } from "./index-bet4sd3e.js";
55
55
  import {
56
56
  closeQuietly,
57
57
  ensureColumn,
@@ -1298,7 +1298,7 @@ function finishDatabaseOpen(db, dbPath, explicitDbPath, latestSupportedVersion)
1298
1298
  startMessageFtsRowidMapBackfill(db).then(async () => {
1299
1299
  if (!readsOpenCodeStore)
1300
1300
  return;
1301
- const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-83864b37.js"));
1301
+ const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-0fsgg2k1.js"));
1302
1302
  const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-r2ar1qvk.js"));
1303
1303
  await startMessageTimeBackfill(db, Object.assign(readRawSessionMessages, {
1304
1304
  readPage: readRawSessionMessagePage
@@ -2511,6 +2511,9 @@ function toTagEntry(row) {
2511
2511
  tokenCount: typeof row.token_count === "number" ? row.token_count : null
2512
2512
  };
2513
2513
  }
2514
+ function normalizeTagSnapshotRow2(row) {
2515
+ return isTagRow(row) ? toTagEntry(row) : null;
2516
+ }
2514
2517
  function isTagNumberRow(row) {
2515
2518
  if (row === null || typeof row !== "object")
2516
2519
  return false;
@@ -3380,4 +3383,4 @@ function deleteToolTagsByOwner(db, sessionId, ownerMsgId) {
3380
3383
  return getDeleteToolTagsByOwnerStatement(db).all(sessionId, ownerMsgId).length;
3381
3384
  }
3382
3385
 
3383
- export { UNKNOWN_FIT_RATIO, resolveDecisionCalibration, hasMeasuredDecisionCalibration, providerMass, localBudget, calibrationForModelKey, historyLocalBudget, adoptedProtectedToolsPolicy, protectedToolTagNumbers, protectedToolTokenCount, stripWellFormedLeadingTagPrefix, stripPersistedAssistantText, byteSize, stripTagPrefix, peelLeadingMcTagNotation, prependTag, rememberCurrentToolOutputCount, currentReclaimableToolOutputCount, isRecord, TEXT_TAG_IDENTITY_MARKER, PI_FALLBACK_PREFIXES_JSON, contentTagOwnerMessageId, TailHygieneJsonMemo, piJsonHash, estimateImageTokensFromDataUrl, estimateToolAttachmentImageTokens, providerVisiblePart, providerVisibleMessage, TODO_STATUSES, TODO_PRIORITIES, TITLE_DONE_STATUSES, normalizeTodoStateJson, buildSyntheticTodoPart, stripChannel1ReminderSpans, compareMeasuredTailPrefix, formatTailHygienePrefixMismatch, freezeTailHygieneMeasurement, effectiveTailHygiene, CHANNEL1_SENTINEL, CHANNEL1_FLOOR_TOKENS, decideChannel1, evaluateChannel2, buildChannel2Reminder, buildChannel1Reminder, planEmergencyDrop, measureEmergencyTag, queuePendingOp, queuePendingDropForUnchangedTag, getPendingOps, getPendingOpsCount, clearPendingOps, removePendingOp, updateTagByteSize2, getRecentTagOwnerMessageIds2, getActiveTagTokenAggregate2, AGE_RECLAIM_MIN_TOKENS2, getOldestActiveUnprotectedToolTags2, getActiveToolTagsForAgeReclaim2, getTriggerTagTokenUpperBound2, getActiveTagTokenTotalsByMessage2, updateTagInputByteSize2, updateTagTokenCount2, getPersistedToolTagAccounting2, getAllStatusTagTokenTotalsFlat2, getReasoningTokenEstimatesByMessage2, tryGetReasoningTokenEstimatesByMessage2, getMaxTagNumberByOwnerMessage2, scanTagOwnerSummary2, scanTagOwnerDelta2, updateTagInputTokenCount2, tagTokenCountIsNull2, backfillTagTokenCounts2, insertTag2, updateTagStatus2, markTagDropped2, getInertWhitespaceAssistantTagsByNumbers2, updateTagDropMode2, updateCavemanDepth2, updateTagMessageId2, hasPiFallbackMessageTags2, findAdoptableFallbackTags2, adoptFallbackTagMessageId2, foldShrunkPartTags2, hasPiFallbackToolOwnerTags2, findPiFallbackToolOwnerTags2, PiTagIdentityConflictError2, getPiMessageTagCandidates2, findPiTagIdentityConflict2, adoptPiFallbackToolOwnerTag2, adoptPiFallbackMessageTag2, markTagsCompactedByMessageIds2, deleteTagsByMessageId2, getMaxTagNumberBySession2, getTagNumberByMessageId2, getAssignableTagNumberByMessageId2, getMinMessageTagNumberForRawId2, deriveTagLoadFloor2, TAG_SELECT_COLUMNS2, getTagsBySession2, getActiveTagsBySession2, getTagsForPendingOperations2, getTagsByNumbers2, getNewestToolTagNumbers2, getDroppedTagsByNumbers2, getMaxDroppedTagNumber2, getTagById2, getTopNBySize2, getToolTagNumberByOwner2, getNullOwnerToolTag2, adoptNullOwnerToolTag2, getCandidateToolOwners2, pickNearestPriorOwner2 };
3386
+ export { UNKNOWN_FIT_RATIO, resolveDecisionCalibration, hasMeasuredDecisionCalibration, providerMass, localBudget, calibrationForModelKey, historyLocalBudget, adoptedProtectedToolsPolicy, protectedToolTagNumbers, protectedToolTokenCount, stripWellFormedLeadingTagPrefix, stripPersistedAssistantText, byteSize, stripTagPrefix, peelLeadingMcTagNotation, prependTag, rememberCurrentToolOutputCount, currentReclaimableToolOutputCount, isRecord, TEXT_TAG_IDENTITY_MARKER, PI_FALLBACK_PREFIXES_JSON, contentTagOwnerMessageId, TailHygieneJsonMemo, piJsonHash, estimateImageTokensFromDataUrl, estimateToolAttachmentImageTokens, providerVisiblePart, providerVisibleMessage, TODO_STATUSES, TODO_PRIORITIES, TITLE_DONE_STATUSES, normalizeTodoStateJson, buildSyntheticTodoPart, stripChannel1ReminderSpans, compareMeasuredTailPrefix, formatTailHygienePrefixMismatch, freezeTailHygieneMeasurement, effectiveTailHygiene, CHANNEL1_SENTINEL, CHANNEL1_FLOOR_TOKENS, decideChannel1, evaluateChannel2, buildChannel2Reminder, buildChannel1Reminder, planEmergencyDrop, measureEmergencyTag, queuePendingOp, queuePendingDropForUnchangedTag, getPendingOps, getPendingOpsCount, clearPendingOps, removePendingOp, updateTagByteSize2, getRecentTagOwnerMessageIds2, getActiveTagTokenAggregate2, AGE_RECLAIM_MIN_TOKENS2, getOldestActiveUnprotectedToolTags2, getActiveToolTagsForAgeReclaim2, getTriggerTagTokenUpperBound2, getActiveTagTokenTotalsByMessage2, updateTagInputByteSize2, updateTagTokenCount2, getPersistedToolTagAccounting2, getAllStatusTagTokenTotalsFlat2, getReasoningTokenEstimatesByMessage2, tryGetReasoningTokenEstimatesByMessage2, getMaxTagNumberByOwnerMessage2, scanTagOwnerSummary2, scanTagOwnerDelta2, updateTagInputTokenCount2, tagTokenCountIsNull2, backfillTagTokenCounts2, normalizeTagSnapshotRow2, insertTag2, updateTagStatus2, markTagDropped2, getInertWhitespaceAssistantTagsByNumbers2, updateTagDropMode2, updateCavemanDepth2, updateTagMessageId2, hasPiFallbackMessageTags2, findAdoptableFallbackTags2, adoptFallbackTagMessageId2, foldShrunkPartTags2, hasPiFallbackToolOwnerTags2, findPiFallbackToolOwnerTags2, PiTagIdentityConflictError2, getPiMessageTagCandidates2, findPiTagIdentityConflict2, adoptPiFallbackToolOwnerTag2, adoptPiFallbackMessageTag2, markTagsCompactedByMessageIds2, deleteTagsByMessageId2, getMaxTagNumberBySession2, getTagNumberByMessageId2, getAssignableTagNumberByMessageId2, getMinMessageTagNumberForRawId2, deriveTagLoadFloor2, TAG_SELECT_COLUMNS2, getTagsBySession2, getActiveTagsBySession2, getTagsForPendingOperations2, getTagsByNumbers2, getNewestToolTagNumbers2, getDroppedTagsByNumbers2, getMaxDroppedTagNumber2, getTagById2, getTopNBySize2, getToolTagNumberByOwner2, getNullOwnerToolTag2, adoptNullOwnerToolTag2, getCandidateToolOwners2, pickNearestPriorOwner2 };