@cortexkit/pi-magic-context 0.49.32 → 0.49.34
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/{index-drmr22ac.js → index-0mc0vv97.js} +1 -1
- package/dist/{index-d5q1q700.js → index-cj3bkd16.js} +1 -1
- package/dist/{index-wpazxe9x.js → index-e61zxfts.js} +1 -1
- package/dist/{index-87xkw8xm.js → index-eenxm3t3.js} +31 -7
- package/dist/{index-d0n9yjnc.js → index-f4fz95fy.js} +210 -38
- package/dist/{index-e59j3yq5.js → index-g2tfayfc.js} +1 -1
- package/dist/{index-r9y6tbbm.js → index-np9ryr8y.js} +1 -1
- package/dist/index.js +9 -8
- package/dist/{message-index-bounded-n30vk21s.js → message-index-bounded-a6na71rg.js} +2 -2
- package/dist/migration-worker.js +1 -1
- package/dist/raw-ordinal-warmup-worker.js +2 -2
- package/dist/{read-session-chunk-ka6dhc77.js → read-session-chunk-2xcp6f40.js} +1 -1
- package/dist/{search-archive-msy2bczx.js → search-archive-jate39w5.js} +2 -2
- package/dist/{search-qbxrnnjb.js → search-b6hp64hc.js} +3 -3
- package/dist/subagent-entry.js +6 -6
- package/dist/tag-snapshot-worker-pi.js +2 -2
- package/package.json +1 -1
|
@@ -28,7 +28,7 @@ var [
|
|
|
28
28
|
import("./embedding-cache-7rp4gqzr.js"),
|
|
29
29
|
import("./storage-memory-0ndn65fm.js"),
|
|
30
30
|
import("./project-embedding-registry-acqb6be4.js"),
|
|
31
|
-
import("./search-
|
|
31
|
+
import("./search-b6hp64hc.js"),
|
|
32
32
|
import("./compartment-chunk-embedding-8c85ebce.js"),
|
|
33
33
|
import("./embedding-activity-ew6dshfd.js"),
|
|
34
34
|
import("./harness-9872e0ym.js"),
|
|
@@ -2311,7 +2311,11 @@ function parsePersistedCompactionMarkerState(raw, storedTargetEndMessageId) {
|
|
|
2311
2311
|
if (parsed && typeof parsed === "object" && typeof parsed.boundaryMessageId === "string" && typeof parsed.summaryMessageId === "string" && typeof parsed.compactionPartId === "string" && typeof parsed.summaryPartId === "string" && typeof parsed.boundaryOrdinal === "number") {
|
|
2312
2312
|
const targetEndMessageId = typeof storedTargetEndMessageId === "string" && storedTargetEndMessageId.length > 0 ? storedTargetEndMessageId : typeof parsed.targetEndMessageId === "string" && parsed.targetEndMessageId.length > 0 ? parsed.targetEndMessageId : null;
|
|
2313
2313
|
return {
|
|
2314
|
-
|
|
2314
|
+
boundaryMessageId: parsed.boundaryMessageId,
|
|
2315
|
+
summaryMessageId: parsed.summaryMessageId,
|
|
2316
|
+
compactionPartId: parsed.compactionPartId,
|
|
2317
|
+
summaryPartId: parsed.summaryPartId,
|
|
2318
|
+
boundaryOrdinal: parsed.boundaryOrdinal,
|
|
2315
2319
|
targetEndMessageId
|
|
2316
2320
|
};
|
|
2317
2321
|
}
|
|
@@ -2322,12 +2326,32 @@ function getPersistedCompactionMarkerState(db, sessionId) {
|
|
|
2322
2326
|
const row = db.prepare("SELECT compaction_marker_state, compaction_marker_target_end_message_id FROM session_meta WHERE session_id = ?").get(sessionId);
|
|
2323
2327
|
return parsePersistedCompactionMarkerState(row?.compaction_marker_state, row?.compaction_marker_target_end_message_id);
|
|
2324
2328
|
}
|
|
2325
|
-
function
|
|
2326
|
-
db.
|
|
2329
|
+
function getCompactionMarkerPublicationState(db, sessionId) {
|
|
2330
|
+
const row = db.prepare("SELECT compaction_marker_state FROM session_meta WHERE session_id = ?").get(sessionId);
|
|
2331
|
+
const raw = row?.compaction_marker_state ?? "";
|
|
2332
|
+
let pending = null;
|
|
2333
|
+
try {
|
|
2334
|
+
pending = parsePersistedCompactionMarkerState(JSON.stringify(JSON.parse(raw).pending));
|
|
2335
|
+
} catch {}
|
|
2336
|
+
return { raw, pending };
|
|
2337
|
+
}
|
|
2338
|
+
function compareAndSetCompactionMarkerPublicationState(db, sessionId, expectedRaw, state, pending) {
|
|
2339
|
+
return db.transaction(() => {
|
|
2327
2340
|
ensureSessionMetaRow(db, sessionId);
|
|
2328
|
-
|
|
2329
|
-
|
|
2330
|
-
|
|
2341
|
+
let envelope = {};
|
|
2342
|
+
if (pending) {
|
|
2343
|
+
try {
|
|
2344
|
+
const parsed = JSON.parse(expectedRaw);
|
|
2345
|
+
if (parsed && typeof parsed === "object")
|
|
2346
|
+
envelope = parsed;
|
|
2347
|
+
} catch {}
|
|
2348
|
+
}
|
|
2349
|
+
const raw = JSON.stringify(pending ? { ...envelope, pending } : state);
|
|
2350
|
+
const result = db.prepare(`UPDATE session_meta SET compaction_marker_state = ?, compaction_marker_target_end_message_id = ?
|
|
2351
|
+
WHERE session_id = ? AND COALESCE(compaction_marker_state, '') = ?`).run(raw, state?.targetEndMessageId ?? null, sessionId, expectedRaw);
|
|
2352
|
+
if (result.changes !== 1)
|
|
2353
|
+
throw new Error("marker publication state changed concurrently");
|
|
2354
|
+
return raw;
|
|
2331
2355
|
}).immediate();
|
|
2332
2356
|
}
|
|
2333
2357
|
function getDeferredClearedCompactionMarkerState(db, sessionId) {
|
|
@@ -5222,4 +5246,4 @@ function readRawSessionSeedTail2(sessionId, boundaryId, onQuery) {
|
|
|
5222
5246
|
});
|
|
5223
5247
|
}
|
|
5224
5248
|
|
|
5225
|
-
export { detectThinkingBindingMismatch, detectLatestTurnThinkingMismatch, isPrefixBoundThinkingModel, detectOverflow, MAX_EXECUTE_THRESHOLD, escalationBands, MERGED_REASONING_PARTS_PREFIX, decodeMergedReasoningParts, HYGIENE_PROVIDER_UNITS_VERSION, sessionDecisionCalibration, transitionSessionHygieneUnits, rowWindowMass, computeProtectionWindow, readEpochFloorSnapshot, getProtectionWindowForSession, SESSION_META_SELECT_COLUMNS, META_COLUMNS, BOOLEAN_META_KEYS, NULL_BIND_META_KEYS, isSessionMetaRow, getDefaultSessionMeta, ensureSessionMetaRow, toSessionMeta, persistCachedM0, clearCachedM0M1, isRustMarkerAdmissionFenced, ReplayDocumentError, readReplayEnvelope, readReplayDocument, updateReplayDocument, writeReplayDocument, isProviderOverflowFailClosedProven, getEmergencyRecoveryArmedAt, describeProtectedTailDrainBudgetSkip, loadProtectedTailMeta, markProtectedTailPolicyV3Seeded, recordProtectedTailPublicationFloor, recordProtectedTailNoEligibleHead, getWrapupInProgressState, isWrapupInProgress, acquireWrapupInProgress, updateWrapupInProgress, releaseWrapupInProgress, resolveCompactionModeRecord, getCompactionModeRecord, setCompactionModeRecord, EMERGENCY_DRAIN_FAILURE_BACKOFF_MS, getProtectedTailDrainBudgetSkip, reserveProtectedTailDrainTokens, clearEmergencyDrainLatch, recordHistorianDrainFailure, clearHistorianDrainFailure, rollbackProtectedTailDrainReservation, clearPersistedReasoningWatermark, getEmergencyInputSample, setEmergencyDropSample, clearEmergencyDropSample, getLastNudgeUndropped, setLastNudgeUndropped, getChannel1NudgeState, setChannel1NudgeState, markChannel1PostReduceGracePending, captureChannel1PostReduceGraceBaseline, getChannel2NudgeState, getChannel2NudgeClaim, setChannel2NudgeState, casChannel2NudgeState, claimChannel2NudgeState, casChannel2NudgeClaim, getPersistedNoteNudge, setPersistedNoteNudgeTrigger, setPersistedNoteNudgeTriggerMessageId, getNoteNudgeAnchors, getAutoSearchHintDecisions, deliverNoteNudgeAtomic, appendAutoSearchHintDecision, pruneNoteNudgeAnchors, queueAutoSearchHintDecisionRetirement, flushAutoSearchHintDecisionRetirement, getPersistedTodoSyntheticAnchor, setPersistedTodoSyntheticAnchor, clearPersistedTodoSyntheticAnchor, getNoteLastReadAt, setNoteLastReadAt, getHistorianFailureState, incrementHistorianFailure, clearHistorianFailureState, getOverflowState, recordOverflowDetected, clearEmergencyRecovery, clearDetectedContextLimit, getPersistedCompactionMarkerState,
|
|
5249
|
+
export { detectThinkingBindingMismatch, detectLatestTurnThinkingMismatch, isPrefixBoundThinkingModel, detectOverflow, MAX_EXECUTE_THRESHOLD, escalationBands, MERGED_REASONING_PARTS_PREFIX, decodeMergedReasoningParts, HYGIENE_PROVIDER_UNITS_VERSION, sessionDecisionCalibration, transitionSessionHygieneUnits, rowWindowMass, computeProtectionWindow, readEpochFloorSnapshot, getProtectionWindowForSession, SESSION_META_SELECT_COLUMNS, META_COLUMNS, BOOLEAN_META_KEYS, NULL_BIND_META_KEYS, isSessionMetaRow, getDefaultSessionMeta, ensureSessionMetaRow, toSessionMeta, persistCachedM0, clearCachedM0M1, isRustMarkerAdmissionFenced, ReplayDocumentError, readReplayEnvelope, readReplayDocument, updateReplayDocument, writeReplayDocument, isProviderOverflowFailClosedProven, getEmergencyRecoveryArmedAt, describeProtectedTailDrainBudgetSkip, loadProtectedTailMeta, markProtectedTailPolicyV3Seeded, recordProtectedTailPublicationFloor, recordProtectedTailNoEligibleHead, getWrapupInProgressState, isWrapupInProgress, acquireWrapupInProgress, updateWrapupInProgress, releaseWrapupInProgress, resolveCompactionModeRecord, getCompactionModeRecord, setCompactionModeRecord, EMERGENCY_DRAIN_FAILURE_BACKOFF_MS, getProtectedTailDrainBudgetSkip, reserveProtectedTailDrainTokens, clearEmergencyDrainLatch, recordHistorianDrainFailure, clearHistorianDrainFailure, rollbackProtectedTailDrainReservation, clearPersistedReasoningWatermark, getEmergencyInputSample, setEmergencyDropSample, clearEmergencyDropSample, getLastNudgeUndropped, setLastNudgeUndropped, getChannel1NudgeState, setChannel1NudgeState, markChannel1PostReduceGracePending, captureChannel1PostReduceGraceBaseline, getChannel2NudgeState, getChannel2NudgeClaim, setChannel2NudgeState, casChannel2NudgeState, claimChannel2NudgeState, casChannel2NudgeClaim, getPersistedNoteNudge, setPersistedNoteNudgeTrigger, setPersistedNoteNudgeTriggerMessageId, getNoteNudgeAnchors, getAutoSearchHintDecisions, deliverNoteNudgeAtomic, appendAutoSearchHintDecision, pruneNoteNudgeAnchors, queueAutoSearchHintDecisionRetirement, flushAutoSearchHintDecisionRetirement, getPersistedTodoSyntheticAnchor, setPersistedTodoSyntheticAnchor, clearPersistedTodoSyntheticAnchor, getNoteLastReadAt, setNoteLastReadAt, getHistorianFailureState, incrementHistorianFailure, clearHistorianFailureState, getOverflowState, recordOverflowDetected, clearEmergencyRecovery, clearDetectedContextLimit, getPersistedCompactionMarkerState, getCompactionMarkerPublicationState, compareAndSetCompactionMarkerPublicationState, getDeferredClearedCompactionMarkerState, parseStrippedPlaceholderState, serializeStrippedPlaceholderState, getStrippedPlaceholderIds, applyStrippedPlaceholderDelta, THINKING_BINDING_RECOVERY_FROZEN_PREFIX, THINKING_BINDING_STRIP_ORDER_END_MARKER, thinkingBindingRecoveryFrozenId, COMPACTION_OFF_THINKING_FROZEN_PREFIX, getThinkingBindingRecoveryTarget, armThinkingBindingRecovery, clearThinkingBindingRecoveryIf, getMergedReasoningStrippedIds, addMergedReasoningStrippedIds, getProcessedImageStrippedIds, parseProcessedImageMarkers, serializeProcessedImageMarkers, addProcessedImageStrippedIds, getPendingCompactionMarkerState, getCompactionMarkerHealth, loadPostprocessReplaySnapshot, clearPendingCompactionMarkerStateIf, getPendingPiCompactionMarkerState, setPendingPiCompactionMarkerState, clearPendingPiCompactionMarkerStateIf, logPiCompactionMarkerClear, getSessionsWithPendingPiMarker, setSessionWorkMetrics, getSessionWorkMetrics, resolveEpochFloorForPass, withReadOnlySessionDb, expandToolPart, askAnswerLines, retreatPastHostUnservedRows, completedToolArcCrossesBoundary, estimateTrueRawMessageTokens, buildToolArcs, fenceBoundaryForCompletedToolArcs, fenceBoundaryForToolArcs, buildTrueRawTokenIndex, computeRawRangeFingerprint, invalidateTrueRawTokenCache, stripSystemInjection, isFilePart, hasUserAnswerMetadata, DreamTokenBudgetExceeded, TOKEN_BUDGET_FINALIZE_MESSAGE, TOKEN_BUDGET_TOOL_REFUSAL, registerBudgetFinalizeChild, releaseBudgetFinalizeChild, createDreamTokenBudget, droppedInputMarker, createDroppedInputGuard, isEditTool, applyEditMarkerToInput, modelAcceptsEmptyContent, isAnthropicFamilyRoute, variantChangeBustsProviderCache, isInActiveAnthropicTurn, activeAnthropicTurnStart, hasAnthropicReasoning, isMarkerOnlyText, findLatestAssistantReasoningMutationExemptMessage, DEFAULT_KEEP_REASONING_TOKENS, resolveKeepReasoningTokens, reasoningStepCost, reasoningBudgetCutoff, reasoningTextAndOpaque, opaqueThinkingCost, estimatePartImageTokens, SKELETON_REAL_INPUT_MAX_BYTES, toolInputStringBytes, resolveHostServedBoundaryId2, hasRawMessageProvider2, setRawMessageProvider2, setBoundedRawMessageProvider2, withRawMessageProvider2, cleanUserText2, withRawSessionMessageCache2, readRawSessionMessages2, readRawSessionMessagePage2, getRawSessionMessageOrdinalCount2, RAW_MESSAGE_VISIT_PAGE_SIZE2, visitRawSessionMessages2, visitRawSessionMessagesAsync2, readRawSessionMessageRange2, prepareRawSessionOrdinals2, primeTailRawMessageCache2, getCachedAbsoluteMessageCount2, primeInMemoryTailRawMessageCache2, readRawSessionMessageOrdinalPage2, getRawSessionStoredMessageCount2, readRawSessionMessageIdOrdinalsForRange2, readRawSessionMessageIdOrdinals2, readRawSessionMessagePartsById2, readRawSessionBoundaryEndpoints2, hasRawSessionMessageById2, readRawSessionMessageOrdinalById2, resolveHistorianChunkStart2, compareRawSessionMessageOrder2, readRawSessionMessageById2, getRawSessionMessageCount2, RAW_SESSION_TAG_KEY_PAGE_SIZE2, getRawSessionTagKeysThrough2, getLegacyProtectedTailStartOrdinal2, getProtectedTailStartOrdinal2, readSessionChunk2, getRawSessionMessageIdsThrough2, readRawSessionSeedTail2 };
|
|
@@ -49,7 +49,9 @@ import {
|
|
|
49
49
|
writeReplayDocument,
|
|
50
50
|
setNoteLastReadAt,
|
|
51
51
|
getPersistedCompactionMarkerState,
|
|
52
|
-
|
|
52
|
+
getCompactionMarkerPublicationState,
|
|
53
|
+
compareAndSetCompactionMarkerPublicationState,
|
|
54
|
+
getDeferredClearedCompactionMarkerState,
|
|
53
55
|
parseStrippedPlaceholderState,
|
|
54
56
|
serializeStrippedPlaceholderState,
|
|
55
57
|
THINKING_BINDING_RECOVERY_FROZEN_PREFIX,
|
|
@@ -66,7 +68,7 @@ import {
|
|
|
66
68
|
visitRawSessionMessages2,
|
|
67
69
|
readRawSessionMessageById2,
|
|
68
70
|
readSessionChunk2
|
|
69
|
-
} from "./index-
|
|
71
|
+
} from "./index-eenxm3t3.js";
|
|
70
72
|
import {
|
|
71
73
|
isRecord,
|
|
72
74
|
providerVisibleMessage,
|
|
@@ -105,7 +107,7 @@ import {
|
|
|
105
107
|
isPidAlive,
|
|
106
108
|
readProcessStartTime,
|
|
107
109
|
getErrorMessage
|
|
108
|
-
} from "./index-
|
|
110
|
+
} from "./index-np9ryr8y.js";
|
|
109
111
|
import {
|
|
110
112
|
BoundedSessionMap,
|
|
111
113
|
resolveOpenCodeDbPath,
|
|
@@ -142,7 +144,7 @@ import {
|
|
|
142
144
|
} from "./index-xn5yh0pn.js";
|
|
143
145
|
import {
|
|
144
146
|
getLastIndexedOrdinal
|
|
145
|
-
} from "./index-
|
|
147
|
+
} from "./index-e61zxfts.js";
|
|
146
148
|
import {
|
|
147
149
|
V2_MEMORY_CATEGORIES,
|
|
148
150
|
CATEGORY_PRIORITY,
|
|
@@ -179,7 +181,7 @@ import {
|
|
|
179
181
|
resolveMemoriesByIdsForSearch2,
|
|
180
182
|
unifiedSearch2,
|
|
181
183
|
formatSearchResults2
|
|
182
|
-
} from "./index-
|
|
184
|
+
} from "./index-g2tfayfc.js";
|
|
183
185
|
import {
|
|
184
186
|
computeCueContentHash,
|
|
185
187
|
getMuralCueState,
|
|
@@ -210,7 +212,7 @@ import {
|
|
|
210
212
|
} from "./index-6wdwv3a6.js";
|
|
211
213
|
import {
|
|
212
214
|
renderSearchArchive2
|
|
213
|
-
} from "./index-
|
|
215
|
+
} from "./index-cj3bkd16.js";
|
|
214
216
|
import {
|
|
215
217
|
computeNormalizedHash
|
|
216
218
|
} from "./index-9x1f96r8.js";
|
|
@@ -9472,6 +9474,80 @@ function isOpenCodeGapHistorianAbsent(sessionId, endId, nextId) {
|
|
|
9472
9474
|
) LIMIT 1`).get(sessionId, end.timeCreated, end.id, next.timeCreated, next.id);
|
|
9473
9475
|
return !row;
|
|
9474
9476
|
}
|
|
9477
|
+
function planCompactionMarker(args, boundary) {
|
|
9478
|
+
const identity = `${args.sessionId}\x00${args.endMessageId}`;
|
|
9479
|
+
return {
|
|
9480
|
+
boundaryMessageId: boundary.id,
|
|
9481
|
+
summaryMessageId: generateMessageId(boundary.timeCreated + 1, 1n, `${identity}\x00summary-message`),
|
|
9482
|
+
compactionPartId: generatePartId(boundary.timeCreated, 1n, `${identity}\x00compaction-part`),
|
|
9483
|
+
summaryPartId: generatePartId(boundary.timeCreated + 1, 2n, `${identity}\x00summary-part`)
|
|
9484
|
+
};
|
|
9485
|
+
}
|
|
9486
|
+
function isCompactionMarkerIntentAbsent(marker, targetEndMessageId) {
|
|
9487
|
+
if (!targetEndMessageId)
|
|
9488
|
+
return false;
|
|
9489
|
+
const db = getWritableOpenCodeDb();
|
|
9490
|
+
return !db.prepare(`SELECT 1 FROM message WHERE id IN (?, ?)
|
|
9491
|
+
UNION ALL SELECT 1 FROM part WHERE id IN (?, ?) LIMIT 1`).get(targetEndMessageId, marker.summaryMessageId, marker.compactionPartId, marker.summaryPartId);
|
|
9492
|
+
}
|
|
9493
|
+
function withCompactionMarkerPublicationLock(operation) {
|
|
9494
|
+
return runMarkerWriteTransaction(getWritableOpenCodeDb(), "compaction-marker-replace", operation);
|
|
9495
|
+
}
|
|
9496
|
+
function inspectCompactionMarkerPublication(sessionId, recognized, summaryText) {
|
|
9497
|
+
const db = getWritableOpenCodeDb();
|
|
9498
|
+
const basis = readMarkerCandidateBasis2(db, sessionId);
|
|
9499
|
+
if (!basis)
|
|
9500
|
+
return { kind: "deferred" };
|
|
9501
|
+
const pairs = [];
|
|
9502
|
+
for (const id of basis.ids) {
|
|
9503
|
+
const rows = db.prepare(`SELECT m.id AS summaryId, p.message_id AS boundaryId, p.id AS partId
|
|
9504
|
+
FROM message m JOIN part p ON p.message_id = json_extract(m.data, '$.parentID')
|
|
9505
|
+
AND +p.session_id = m.session_id
|
|
9506
|
+
WHERE m.id = ? AND m.session_id = ? AND json_extract(m.data, '$.summary') = 1
|
|
9507
|
+
AND COALESCE(json_extract(m.data, '$.finish'), '') <> ''
|
|
9508
|
+
AND json_extract(p.data, '$.type') = 'compaction'`).all(id, sessionId);
|
|
9509
|
+
pairs.push(...rows);
|
|
9510
|
+
}
|
|
9511
|
+
if (pairs.length > 1)
|
|
9512
|
+
return { kind: "ambiguous" };
|
|
9513
|
+
if (pairs.length === 0) {
|
|
9514
|
+
for (const marker of recognized) {
|
|
9515
|
+
if (db.prepare(`SELECT 1 FROM message WHERE id = ?
|
|
9516
|
+
UNION ALL SELECT 1 FROM part WHERE id IN (?, ?) LIMIT 1`).get(marker.summaryMessageId, marker.compactionPartId, marker.summaryPartId))
|
|
9517
|
+
return { kind: "ambiguous" };
|
|
9518
|
+
}
|
|
9519
|
+
return { kind: "verified", marker: null };
|
|
9520
|
+
}
|
|
9521
|
+
const pair = pairs[0];
|
|
9522
|
+
const marker = recognized.find((item) => item.summaryMessageId === pair.summaryId && item.boundaryMessageId === pair.boundaryId && item.compactionPartId === pair.partId);
|
|
9523
|
+
if (!marker)
|
|
9524
|
+
return { kind: "ambiguous" };
|
|
9525
|
+
for (const other of recognized) {
|
|
9526
|
+
if (other.summaryMessageId === marker.summaryMessageId && other.compactionPartId === marker.compactionPartId && other.summaryPartId === marker.summaryPartId)
|
|
9527
|
+
continue;
|
|
9528
|
+
if (db.prepare(`SELECT 1 FROM message WHERE id = ?
|
|
9529
|
+
UNION ALL SELECT 1 FROM part WHERE id IN (?, ?) LIMIT 1`).get(other.summaryMessageId, other.compactionPartId, other.summaryPartId))
|
|
9530
|
+
return { kind: "ambiguous" };
|
|
9531
|
+
}
|
|
9532
|
+
const row = db.prepare(`SELECT c.data AS compactionData FROM message m
|
|
9533
|
+
JOIN message b ON b.id = ? AND b.session_id = m.session_id
|
|
9534
|
+
JOIN part c ON c.id = ? AND c.message_id = b.id AND c.session_id = m.session_id
|
|
9535
|
+
JOIN part t ON t.id = ? AND t.message_id = m.id AND t.session_id = m.session_id
|
|
9536
|
+
WHERE m.id = ? AND m.session_id = ?
|
|
9537
|
+
AND json_extract(b.data, '$.role') = 'user'
|
|
9538
|
+
AND json_extract(m.data, '$.role') = 'assistant'
|
|
9539
|
+
AND json_extract(m.data, '$.parentID') = b.id
|
|
9540
|
+
AND json_extract(m.data, '$.summary') = 1
|
|
9541
|
+
AND json_extract(m.data, '$.finish') = 'stop'
|
|
9542
|
+
AND json_extract(m.data, '$.error') IS NULL
|
|
9543
|
+
AND json_extract(m.data, '$.providerID') = 'magic-context'
|
|
9544
|
+
AND json_extract(m.data, '$.modelID') = 'magic-context'
|
|
9545
|
+
AND json_extract(t.data, '$.type') = 'text' AND json_extract(t.data, '$.text') = ?
|
|
9546
|
+
AND (SELECT COUNT(*) FROM part p WHERE p.message_id = m.id AND +p.session_id = m.session_id) = 1`).get(marker.boundaryMessageId, marker.compactionPartId, marker.summaryPartId, marker.summaryMessageId, sessionId, summaryText);
|
|
9547
|
+
if (!row || !isMcCanonicalCompactionPartData(JSON.parse(row.compactionData)) || findBoundaryUserMessage(sessionId, marker.boundaryMessageId)?.id !== marker.boundaryMessageId)
|
|
9548
|
+
return { kind: "ambiguous" };
|
|
9549
|
+
return { kind: "verified", marker };
|
|
9550
|
+
}
|
|
9475
9551
|
var LEGACY_MARKER_LINEAGE_SQL = `SELECT m.id
|
|
9476
9552
|
FROM message m
|
|
9477
9553
|
WHERE +m.session_id = ? AND m.id IN (SELECT value FROM json_each(?)) AND m.id <> ?
|
|
@@ -9511,10 +9587,11 @@ function injectCompactionMarkerFromBasis(args, validatedBasis) {
|
|
|
9511
9587
|
return null;
|
|
9512
9588
|
}
|
|
9513
9589
|
const boundaryTime = boundary.timeCreated;
|
|
9514
|
-
const
|
|
9515
|
-
|
|
9516
|
-
|
|
9517
|
-
|
|
9590
|
+
const {
|
|
9591
|
+
summaryMessageId: summaryMsgId,
|
|
9592
|
+
compactionPartId,
|
|
9593
|
+
summaryPartId
|
|
9594
|
+
} = planCompactionMarker(args, boundary);
|
|
9518
9595
|
const summaryMsgData = JSON.stringify({
|
|
9519
9596
|
role: "assistant",
|
|
9520
9597
|
parentID: boundary.id,
|
|
@@ -9627,25 +9704,126 @@ function replaceCompactionMarker(existing, args) {
|
|
|
9627
9704
|
};
|
|
9628
9705
|
}
|
|
9629
9706
|
}
|
|
9707
|
+
function isMcCanonicalCompactionPartData(data) {
|
|
9708
|
+
if (typeof data !== "object" || data === null || Array.isArray(data))
|
|
9709
|
+
return false;
|
|
9710
|
+
const record = data;
|
|
9711
|
+
const keys = Object.keys(record).sort();
|
|
9712
|
+
return keys.length === 2 && keys[0] === "auto" && keys[1] === "type" && record.type === "compaction" && record.auto === true;
|
|
9713
|
+
}
|
|
9714
|
+
|
|
9715
|
+
// ../plugin/src/hooks/magic-context/compaction-marker-publication.ts
|
|
9716
|
+
function samePair(left, right) {
|
|
9717
|
+
return left.boundaryMessageId === right.boundaryMessageId && left.summaryMessageId === right.summaryMessageId && left.compactionPartId === right.compactionPartId && left.summaryPartId === right.summaryPartId;
|
|
9718
|
+
}
|
|
9719
|
+
function publishRecoverableCompactionMarker(db, args, targetIsCurrent) {
|
|
9720
|
+
const { sessionId } = args;
|
|
9721
|
+
let raw = "";
|
|
9722
|
+
let previous = null;
|
|
9723
|
+
let oldSummary = null;
|
|
9724
|
+
let intended;
|
|
9725
|
+
let reason = "publication-failed";
|
|
9726
|
+
let recovered;
|
|
9727
|
+
let cut = "uncertain";
|
|
9728
|
+
let writingState = false;
|
|
9729
|
+
const persist = (state) => {
|
|
9730
|
+
writingState = true;
|
|
9731
|
+
db.transaction(() => {
|
|
9732
|
+
raw = compareAndSetCompactionMarkerPublicationState(db, sessionId, raw, state, null);
|
|
9733
|
+
if (previous && previous.summaryMessageId !== state.summaryMessageId) {
|
|
9734
|
+
const tag = getTagNumberByMessageId2(db, sessionId, `${previous.summaryMessageId}:p0`);
|
|
9735
|
+
if (tag !== null)
|
|
9736
|
+
updateTagStatus2(db, sessionId, tag, "dropped");
|
|
9737
|
+
}
|
|
9738
|
+
}).immediate();
|
|
9739
|
+
writingState = false;
|
|
9740
|
+
previous = state;
|
|
9741
|
+
};
|
|
9742
|
+
try {
|
|
9743
|
+
cut = getCompactionMarkerPublicationState(db, sessionId).pending ? "uncertain" : "definitely-no-cut";
|
|
9744
|
+
const result = withCompactionMarkerPublicationLock(() => {
|
|
9745
|
+
const snapshot = getCompactionMarkerPublicationState(db, sessionId);
|
|
9746
|
+
if (snapshot.pending)
|
|
9747
|
+
cut = "uncertain";
|
|
9748
|
+
raw = snapshot.raw;
|
|
9749
|
+
previous = getPersistedCompactionMarkerState(db, sessionId) ?? getDeferredClearedCompactionMarkerState(db, sessionId);
|
|
9750
|
+
oldSummary = previous?.summaryMessageId ?? null;
|
|
9751
|
+
if (snapshot.pending && (snapshot.pending.boundaryOrdinal > args.endOrdinal || snapshot.pending.boundaryOrdinal === args.endOrdinal && snapshot.pending.targetEndMessageId !== args.endMessageId) && !isCompactionMarkerIntentAbsent(snapshot.pending, snapshot.pending.targetEndMessageId))
|
|
9752
|
+
throw new Error("a newer marker publication intent is pending");
|
|
9753
|
+
const boundary = findBoundaryUserMessage(sessionId, args.endMessageId);
|
|
9754
|
+
if (!targetIsCurrent() || !boundary || boundary.id !== args.resolvedBoundary?.id || boundary.timeCreated !== args.resolvedBoundary.timeCreated)
|
|
9755
|
+
throw new Error("marker publication frontier changed before publication");
|
|
9756
|
+
intended = {
|
|
9757
|
+
...planCompactionMarker(args, boundary),
|
|
9758
|
+
boundaryOrdinal: args.endOrdinal,
|
|
9759
|
+
targetEndMessageId: args.endMessageId
|
|
9760
|
+
};
|
|
9761
|
+
let pending = snapshot.pending;
|
|
9762
|
+
if (pending) {
|
|
9763
|
+
const pendingTarget = pending.targetEndMessageId;
|
|
9764
|
+
const pendingBoundary = pendingTarget ? findBoundaryUserMessage(sessionId, pendingTarget) : null;
|
|
9765
|
+
const compartments = pendingTarget ? getCompartmentsByEndMessageId(db, sessionId, pendingTarget) : [];
|
|
9766
|
+
const validTarget = pending.targetEndMessageId === args.endMessageId && pending.boundaryOrdinal === args.endOrdinal || compartments.length === 1 && compartments[0].endMessage === pending.boundaryOrdinal;
|
|
9767
|
+
if (!validTarget || !pendingBoundary || !pendingTarget || !samePair(pending, planCompactionMarker({ ...args, endMessageId: pendingTarget }, pendingBoundary)))
|
|
9768
|
+
pending = null;
|
|
9769
|
+
}
|
|
9770
|
+
const inspection = inspectCompactionMarkerPublication(sessionId, [intended, ...previous ? [previous] : [], ...pending ? [pending] : []], args.summaryText);
|
|
9771
|
+
if (inspection.kind === "deferred") {
|
|
9772
|
+
reason = "candidate-preparation";
|
|
9773
|
+
return {
|
|
9774
|
+
kind: cut === "uncertain" ? "uncertain" : "deferred",
|
|
9775
|
+
error: new Error("marker candidate preparation pending")
|
|
9776
|
+
};
|
|
9777
|
+
}
|
|
9778
|
+
if (inspection.kind === "ambiguous") {
|
|
9779
|
+
reason = "ambiguous-left-alone";
|
|
9780
|
+
return {
|
|
9781
|
+
kind: cut,
|
|
9782
|
+
error: new Error("unverified or ambiguous host marker pairs; left alone")
|
|
9783
|
+
};
|
|
9784
|
+
}
|
|
9785
|
+
cut = "definitely-no-cut";
|
|
9786
|
+
const host = inspection.marker;
|
|
9787
|
+
if (host && (pending && samePair(host, pending) || samePair(host, intended))) {
|
|
9788
|
+
const adopted = pending && samePair(host, pending) ? pending : intended;
|
|
9789
|
+
recovered = adopted === pending ? "pending-intent-recovered" : "adopted-existing-pair";
|
|
9790
|
+
cut = "uncertain";
|
|
9791
|
+
if (samePair(host, intended))
|
|
9792
|
+
return { kind: "committed", marker: host };
|
|
9793
|
+
persist(adopted);
|
|
9794
|
+
}
|
|
9795
|
+
writingState = true;
|
|
9796
|
+
raw = compareAndSetCompactionMarkerPublicationState(db, sessionId, raw, previous, intended);
|
|
9797
|
+
writingState = false;
|
|
9798
|
+
cut = "uncertain";
|
|
9799
|
+
const replacement = replaceCompactionMarker(host, {
|
|
9800
|
+
...args,
|
|
9801
|
+
resolvedBoundary: boundary
|
|
9802
|
+
});
|
|
9803
|
+
if (recovered && replacement.kind !== "committed")
|
|
9804
|
+
return { kind: "uncertain", error: replacement.error };
|
|
9805
|
+
if (replacement.kind !== "committed")
|
|
9806
|
+
cut = replacement.kind === "uncertain" ? "uncertain" : "definitely-no-cut";
|
|
9807
|
+
return replacement;
|
|
9808
|
+
});
|
|
9809
|
+
if (result.kind === "committed") {
|
|
9810
|
+
if (!intended)
|
|
9811
|
+
throw new Error("committed marker has no publication intent");
|
|
9812
|
+
persist(intended);
|
|
9813
|
+
reason = recovered ?? "published";
|
|
9814
|
+
}
|
|
9815
|
+
return result;
|
|
9816
|
+
} catch (error) {
|
|
9817
|
+
if (writingState)
|
|
9818
|
+
reason = "state-write-failed";
|
|
9819
|
+
return { kind: cut, error: error instanceof Error ? error : new Error(String(error)) };
|
|
9820
|
+
} finally {
|
|
9821
|
+
sessionLog2(sessionId, `compaction-marker publication reason=${reason} oldSummary=${oldSummary ?? "none"} newSummary=${intended?.summaryMessageId ?? "none"} target=${args.endMessageId} at=${Date.now()}`);
|
|
9822
|
+
}
|
|
9823
|
+
}
|
|
9630
9824
|
|
|
9631
9825
|
// ../plugin/src/hooks/magic-context/compaction-marker-manager.ts
|
|
9632
9826
|
var MARKER_SUMMARY_TEXT = "[Compacted by magic-context — session history is managed by the plugin]";
|
|
9633
|
-
function dropMarkerSummaryTag(db, sessionId, summaryMessageId) {
|
|
9634
|
-
const tagNumber = getTagNumberByMessageId2(db, sessionId, `${summaryMessageId}:p0`);
|
|
9635
|
-
if (tagNumber !== null)
|
|
9636
|
-
updateTagStatus2(db, sessionId, tagNumber, "dropped");
|
|
9637
|
-
}
|
|
9638
|
-
function persistMarkerStateAndDropReplacedTag(db, sessionId, state, replacedSummaryMessageId) {
|
|
9639
|
-
let transactionStartedAt = 0;
|
|
9640
|
-
db.transaction(() => {
|
|
9641
|
-
transactionStartedAt = performance.now();
|
|
9642
|
-
setPersistedCompactionMarkerState(db, sessionId, state);
|
|
9643
|
-
if (replacedSummaryMessageId !== null) {
|
|
9644
|
-
dropMarkerSummaryTag(db, sessionId, replacedSummaryMessageId);
|
|
9645
|
-
}
|
|
9646
|
-
}).immediate();
|
|
9647
|
-
logSlowWriteTransaction("marker-drain", transactionStartedAt);
|
|
9648
|
-
}
|
|
9649
9827
|
function getCompartmentEndMessageIdForOrdinal(db, sessionId, endOrdinal) {
|
|
9650
9828
|
const row = db.prepare(`SELECT end_message_id
|
|
9651
9829
|
FROM compartments
|
|
@@ -9701,8 +9879,7 @@ function updateCompactionMarkerAfterPublication(db, sessionId, lastCompartmentEn
|
|
|
9701
9879
|
return false;
|
|
9702
9880
|
}
|
|
9703
9881
|
const existing = getPersistedCompactionMarkerState(db, sessionId);
|
|
9704
|
-
|
|
9705
|
-
if (existing) {
|
|
9882
|
+
if (existing && !getCompactionMarkerPublicationState(db, sessionId).pending) {
|
|
9706
9883
|
if (existingMarkerAlreadyCoversTarget(sessionId, existing, lastCompartmentEnd, targetEndMessageId)) {
|
|
9707
9884
|
return true;
|
|
9708
9885
|
}
|
|
@@ -9715,22 +9892,15 @@ function updateCompactionMarkerAfterPublication(db, sessionId, lastCompartmentEn
|
|
|
9715
9892
|
if (boundaryWouldDiscardUncoveredMessage(db, sessionId, lastCompartmentEnd, boundary.id)) {
|
|
9716
9893
|
return false;
|
|
9717
9894
|
}
|
|
9718
|
-
const replacement =
|
|
9895
|
+
const replacement = publishRecoverableCompactionMarker(db, {
|
|
9719
9896
|
sessionId,
|
|
9720
9897
|
endOrdinal: lastCompartmentEnd,
|
|
9721
9898
|
endMessageId: targetEndMessageId,
|
|
9722
9899
|
summaryText: MARKER_SUMMARY_TEXT,
|
|
9723
9900
|
directory: directory ?? process.cwd(),
|
|
9724
9901
|
resolvedBoundary: boundary
|
|
9725
|
-
});
|
|
9902
|
+
}, () => JSON.stringify(getPersistedCompactionMarkerState(db, sessionId)) === JSON.stringify(existing) && getCompartmentEndMessageIdForOrdinal(db, sessionId, lastCompartmentEnd) === targetEndMessageId);
|
|
9726
9903
|
if (replacement.kind === "committed") {
|
|
9727
|
-
const result = replacement.marker;
|
|
9728
|
-
persistMarkerStateAndDropReplacedTag(db, sessionId, {
|
|
9729
|
-
...result,
|
|
9730
|
-
boundaryOrdinal: lastCompartmentEnd,
|
|
9731
|
-
targetEndMessageId
|
|
9732
|
-
}, removedSummaryMessageId);
|
|
9733
|
-
sessionLog2(sessionId, `compaction-marker: injected at ordinal ${lastCompartmentEnd}, boundary user msg ${result.boundaryMessageId}`);
|
|
9734
9904
|
return true;
|
|
9735
9905
|
}
|
|
9736
9906
|
return false;
|
|
@@ -9745,6 +9915,7 @@ var MURAL_COMPONENT_PREFIX = "|mural-enabled:";
|
|
|
9745
9915
|
var BUDGET_COMPONENT_PREFIX = "|render-budgets:";
|
|
9746
9916
|
var RENDERED_BUDGETS_COMPONENT_PREFIX = "|rendered-budgets:";
|
|
9747
9917
|
var M0_MEMORY_IDS_COMPONENT_PREFIX = "|m0-memory-ids:";
|
|
9918
|
+
var TOOL_DEFINITIONS_COMPONENT_PREFIX = "|request-tool-definitions:";
|
|
9748
9919
|
function encodeCachedM0UpgradeIdentity(upgradeState, compartmentRenderEpoch = COMPARTMENT_RENDER_EPOCH, muralEnabled = null, renderBudgetIdentity = null, memoryRenderEpoch = MEMORY_RENDER_FORMAT_EPOCH, renderedBudgets = null) {
|
|
9749
9920
|
let encoded = upgradeState ?? "";
|
|
9750
9921
|
if (compartmentRenderEpoch !== null) {
|
|
@@ -9790,7 +9961,8 @@ function decodeCachedM0UpgradeIdentity(value) {
|
|
|
9790
9961
|
value.indexOf(MURAL_COMPONENT_PREFIX),
|
|
9791
9962
|
value.indexOf(BUDGET_COMPONENT_PREFIX),
|
|
9792
9963
|
value.indexOf(RENDERED_BUDGETS_COMPONENT_PREFIX),
|
|
9793
|
-
value.indexOf(M0_MEMORY_IDS_COMPONENT_PREFIX)
|
|
9964
|
+
value.indexOf(M0_MEMORY_IDS_COMPONENT_PREFIX),
|
|
9965
|
+
value.indexOf(TOOL_DEFINITIONS_COMPONENT_PREFIX)
|
|
9794
9966
|
].filter((index) => index >= 0);
|
|
9795
9967
|
const identityEnd = componentIndexes.length > 0 ? Math.min(...componentIndexes) : value.length;
|
|
9796
9968
|
const upgradeState = value.slice(0, identityEnd);
|
|
@@ -2005,7 +2005,7 @@ function finishDatabaseOpen(db, dbPath, explicitDbPath, latestSupportedVersion)
|
|
|
2005
2005
|
state.running = startMessageFtsRowidMapBackfill2(db, signal).then(async () => {
|
|
2006
2006
|
if (signal.aborted || !readsOpenCodeStore)
|
|
2007
2007
|
return;
|
|
2008
|
-
const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-
|
|
2008
|
+
const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-2xcp6f40.js"));
|
|
2009
2009
|
const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-e3r8ddh1.js"));
|
|
2010
2010
|
if (signal.aborted)
|
|
2011
2011
|
return;
|
package/dist/index.js
CHANGED
|
@@ -263,7 +263,7 @@ import {
|
|
|
263
263
|
registerTodoStateLifecycle,
|
|
264
264
|
syncCtxMemoryToolEnabled,
|
|
265
265
|
registerMagicContextTools
|
|
266
|
-
} from "./index-
|
|
266
|
+
} from "./index-f4fz95fy.js";
|
|
267
267
|
import"./index-4knyh1kt.js";
|
|
268
268
|
import {
|
|
269
269
|
canonicalModelIdentity,
|
|
@@ -305,7 +305,7 @@ import {
|
|
|
305
305
|
openCurrentDatabase,
|
|
306
306
|
openDatabaseAsync,
|
|
307
307
|
closeDatabase
|
|
308
|
-
} from "./index-
|
|
308
|
+
} from "./index-np9ryr8y.js";
|
|
309
309
|
import {
|
|
310
310
|
sameProjectDirectory,
|
|
311
311
|
pruneMissingProjectIdentities,
|
|
@@ -483,7 +483,7 @@ import {
|
|
|
483
483
|
getRawSessionTagKeysThrough2,
|
|
484
484
|
getLegacyProtectedTailStartOrdinal2,
|
|
485
485
|
readSessionChunk2
|
|
486
|
-
} from "./index-
|
|
486
|
+
} from "./index-eenxm3t3.js";
|
|
487
487
|
import {
|
|
488
488
|
UNKNOWN_FIT_RATIO,
|
|
489
489
|
hasMeasuredDecisionCalibration,
|
|
@@ -673,7 +673,7 @@ import {
|
|
|
673
673
|
clearCompressionDepthRange,
|
|
674
674
|
cleanSearchText,
|
|
675
675
|
matchedSearchSnippet
|
|
676
|
-
} from "./index-
|
|
676
|
+
} from "./index-e61zxfts.js";
|
|
677
677
|
import {
|
|
678
678
|
rememberV1HiddenRun
|
|
679
679
|
} from "./index-6x556c2q.js";
|
|
@@ -744,7 +744,7 @@ import {
|
|
|
744
744
|
scheduleIncrementalIndex,
|
|
745
745
|
scheduleClearAndReindex,
|
|
746
746
|
clearSessionTracking
|
|
747
|
-
} from "./index-
|
|
747
|
+
} from "./index-g2tfayfc.js";
|
|
748
748
|
import {
|
|
749
749
|
setEmbeddingSessionBusy2,
|
|
750
750
|
isEmbeddingHostBusy2
|
|
@@ -808,10 +808,10 @@ import {
|
|
|
808
808
|
drainPiTagSnapshotSession,
|
|
809
809
|
assertPiTagSnapshotReady,
|
|
810
810
|
ensurePiTagSnapshotReady
|
|
811
|
-
} from "./index-
|
|
811
|
+
} from "./index-0mc0vv97.js";
|
|
812
812
|
import"./index-jn44h81p.js";
|
|
813
813
|
import"./index-1cvyaw9a.js";
|
|
814
|
-
import"./index-
|
|
814
|
+
import"./index-cj3bkd16.js";
|
|
815
815
|
import {
|
|
816
816
|
__toESM
|
|
817
817
|
} from "./index-22jkk6wg.js";
|
|
@@ -3560,7 +3560,7 @@ function startHostStallProfilerSwitch() {
|
|
|
3560
3560
|
// package.json
|
|
3561
3561
|
var package_default = {
|
|
3562
3562
|
name: "@cortexkit/pi-magic-context",
|
|
3563
|
-
version: "0.49.
|
|
3563
|
+
version: "0.49.34",
|
|
3564
3564
|
type: "module",
|
|
3565
3565
|
description: "Pi and OMP coding agent extension for Magic Context — cross-session memory and context management",
|
|
3566
3566
|
main: "dist/index.js",
|
|
@@ -24664,6 +24664,7 @@ function hasSmallToolInput(target) {
|
|
|
24664
24664
|
var CACHE_LOSING_FOLD_REASONS = new Set([
|
|
24665
24665
|
"model_change",
|
|
24666
24666
|
"system_hash",
|
|
24667
|
+
"tool_definitions",
|
|
24667
24668
|
"ttl_idle",
|
|
24668
24669
|
"host_compaction"
|
|
24669
24670
|
]);
|
|
@@ -13,7 +13,7 @@ import"./index-399p688g.js";
|
|
|
13
13
|
import"./index-54wmg4rj.js";
|
|
14
14
|
import"./index-6981g1xv.js";
|
|
15
15
|
import"./index-23t8ryqw.js";
|
|
16
|
-
import"./index-
|
|
16
|
+
import"./index-eenxm3t3.js";
|
|
17
17
|
import"./index-6x556c2q.js";
|
|
18
18
|
import {
|
|
19
19
|
MESSAGE_INDEX_MAX_FTS_BYTES,
|
|
@@ -22,7 +22,7 @@ import {
|
|
|
22
22
|
markMessageIndexDirty,
|
|
23
23
|
getIndexableContent,
|
|
24
24
|
indexSingleMessage
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-e61zxfts.js";
|
|
26
26
|
import"./index-bvpar0bg.js";
|
|
27
27
|
import"./index-hqw0rt9k.js";
|
|
28
28
|
|
package/dist/migration-worker.js
CHANGED
|
@@ -51,7 +51,7 @@ async function main() {
|
|
|
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-jate39w5.js");
|
|
55
55
|
const { readRawSessionMessageIdOrdinalsForRangeFromDb } = await import("./read-session-raw-g9b1zdn5.js");
|
|
56
56
|
const archive = input.searchArchive;
|
|
57
57
|
let raw;
|
|
@@ -81,7 +81,7 @@ async function main() {
|
|
|
81
81
|
const { setHarness } = await import("./harness-9872e0ym.js");
|
|
82
82
|
setHarness(input.harness ?? "opencode");
|
|
83
83
|
const [{ indexMessageInShortChunks }, { configureContextDatabasePragmas }] = await Promise.all([
|
|
84
|
-
import("./message-index-bounded-
|
|
84
|
+
import("./message-index-bounded-a6na71rg.js"),
|
|
85
85
|
import("./sqlite-context-pragmas-gcgch6qz.js")
|
|
86
86
|
]);
|
|
87
87
|
configureContextDatabasePragmas(db);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderSearchArchive2
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-cj3bkd16.js";
|
|
4
4
|
import"./index-1cvyaw9a.js";
|
|
5
|
-
import"./index-
|
|
5
|
+
import"./index-eenxm3t3.js";
|
|
6
6
|
import"./index-eqw9t2ty.js";
|
|
7
7
|
import"./index-6x556c2q.js";
|
|
8
8
|
import"./index-ccanzg8p.js";
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
resolveMemoriesByIdsForSearch2,
|
|
6
6
|
unifiedSearch2,
|
|
7
7
|
formatSearchResults2
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-g2tfayfc.js";
|
|
9
9
|
import"./index-1cvyaw9a.js";
|
|
10
|
-
import"./index-
|
|
10
|
+
import"./index-e61zxfts.js";
|
|
11
11
|
import"./index-9xd7qveg.js";
|
|
12
12
|
import"./index-xn5yh0pn.js";
|
|
13
13
|
import"./index-9p40dgkm.js";
|
|
@@ -15,7 +15,7 @@ import"./index-29nw7n1r.js";
|
|
|
15
15
|
import"./index-yhzhdp3m.js";
|
|
16
16
|
import"./index-4zemngt7.js";
|
|
17
17
|
import"./index-0gymvr5j.js";
|
|
18
|
-
import"./index-
|
|
18
|
+
import"./index-eenxm3t3.js";
|
|
19
19
|
import"./index-eqw9t2ty.js";
|
|
20
20
|
import"./index-6x556c2q.js";
|
|
21
21
|
import"./index-wqpjhx1p.js";
|
package/dist/subagent-entry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TOKEN_BUDGET_TOOL_REFUSAL
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-eenxm3t3.js";
|
|
4
4
|
import {
|
|
5
5
|
setHarness2
|
|
6
6
|
} from "./index-0h2mkab2.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
import"./index-2qtx0q6h.js";
|
|
14
14
|
import {
|
|
15
15
|
openDatabase
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-np9ryr8y.js";
|
|
17
17
|
import"./index-fapenpch.js";
|
|
18
18
|
import"./index-399p688g.js";
|
|
19
19
|
import"./index-54wmg4rj.js";
|
|
@@ -30,7 +30,7 @@ import {
|
|
|
30
30
|
ensureProjectRegisteredFromPiDirectory,
|
|
31
31
|
resolvePiHarnessKind,
|
|
32
32
|
registerMagicContextTools
|
|
33
|
-
} from "./index-
|
|
33
|
+
} from "./index-f4fz95fy.js";
|
|
34
34
|
import"./index-ccanzg8p.js";
|
|
35
35
|
import"./index-gwxaz0z5.js";
|
|
36
36
|
import"./index-0gymvr5j.js";
|
|
@@ -40,12 +40,12 @@ import"./index-9p40dgkm.js";
|
|
|
40
40
|
import"./index-4zemngt7.js";
|
|
41
41
|
import"./index-yhzhdp3m.js";
|
|
42
42
|
import"./index-9xd7qveg.js";
|
|
43
|
-
import"./index-
|
|
43
|
+
import"./index-e61zxfts.js";
|
|
44
44
|
import"./index-eqw9t2ty.js";
|
|
45
45
|
import"./index-6x556c2q.js";
|
|
46
|
-
import"./index-
|
|
46
|
+
import"./index-g2tfayfc.js";
|
|
47
47
|
import"./index-1cvyaw9a.js";
|
|
48
|
-
import"./index-
|
|
48
|
+
import"./index-cj3bkd16.js";
|
|
49
49
|
import"./index-29nw7n1r.js";
|
|
50
50
|
import"./index-6wdwv3a6.js";
|
|
51
51
|
import"./index-hqw0rt9k.js";
|
|
@@ -7,7 +7,7 @@ import"./index-fgs78jyd.js";
|
|
|
7
7
|
import {
|
|
8
8
|
LATEST_SUPPORTED_VERSION,
|
|
9
9
|
getPersistedSchemaVersion
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-np9ryr8y.js";
|
|
11
11
|
import"./index-fapenpch.js";
|
|
12
12
|
import"./index-399p688g.js";
|
|
13
13
|
import {
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
projectPiPassTag,
|
|
32
32
|
PI_FALLBACK_ROW_COLUMNS,
|
|
33
33
|
PI_FALLBACK_ROW_PREDICATE
|
|
34
|
-
} from "./index-
|
|
34
|
+
} from "./index-0mc0vv97.js";
|
|
35
35
|
import"./index-hqw0rt9k.js";
|
|
36
36
|
|
|
37
37
|
// src/tag-snapshot-worker-pi.ts
|
package/package.json
CHANGED