@cortexkit/opencode-magic-context 0.49.22 → 0.49.24
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/README.md +0 -26
- package/dist/agents/permissions.d.ts +8 -3
- package/dist/agents/permissions.d.ts.map +1 -1
- package/dist/auto-search-worker.js +4 -4
- package/dist/chunk-embedding-write-worker.js +4 -4
- package/dist/{compartment-chunk-embedding-he60aaa2.js → compartment-chunk-embedding-eypvn607.js} +3 -3
- package/dist/{conflict-warning-hook-2r32hyx6.js → conflict-warning-hook-a27bhggg.js} +4 -4
- package/dist/{context-j7hp43a0.js → context-tvrjhnmj.js} +17 -17
- package/dist/{embedding-backfill-dtke6tck.js → embedding-backfill-vddgmem3.js} +5 -5
- package/dist/features/magic-context/dreamer/primer-seed.d.ts.map +1 -1
- package/dist/hooks/magic-context/ask-answer-notice.d.ts +25 -0
- package/dist/hooks/magic-context/ask-answer-notice.d.ts.map +1 -0
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts +1 -1
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-wire.d.ts.map +1 -1
- package/dist/hooks/magic-context/protected-tail-boundary.d.ts +8 -0
- package/dist/hooks/magic-context/protected-tail-boundary.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-chunk.d.ts.map +1 -1
- package/dist/hooks/magic-context/read-session-raw.d.ts +10 -0
- package/dist/hooks/magic-context/read-session-raw.d.ts.map +1 -1
- package/dist/{index-syaazvy2.js → index-21bkd3m6.js} +5 -5
- package/dist/{index-1gtfne2c.js → index-2haxh8h3.js} +1 -1
- package/dist/{index-m32esgmj.js → index-3d5wnkq7.js} +1 -1
- package/dist/{index-j32jj2t8.js → index-57jf5ztp.js} +3 -3
- package/dist/{index-11gzxvf4.js → index-6g7tyb6e.js} +39 -34
- package/dist/{index-jmq8kfe7.js → index-7516anfj.js} +4 -4
- package/dist/{index-jfem3dgz.js → index-7tdtpqrg.js} +5 -1
- package/dist/{index-1kbznkft.js → index-8e9qsnrw.js} +7 -7
- package/dist/{index-ksq50rg0.js → index-c9zrgcnt.js} +1 -1
- package/dist/{index-y76rhsnr.js → index-dds7cxhz.js} +44 -25
- package/dist/{index-66eby7hx.js → index-jcr6pe7z.js} +1 -1
- package/dist/{index-ffzhwfzy.js → index-jd0y50w3.js} +3 -3
- package/dist/{index-a9zvn5fe.js → index-jrjr58ez.js} +2 -2
- package/dist/{index-mnnkgq0q.js → index-p6evxfcc.js} +3 -3
- package/dist/{index-x6cbrv9h.js → index-szf8r0ba.js} +1 -1
- package/dist/{index-mnhcdfxg.js → index-t1zk694n.js} +78 -6
- package/dist/{index-rxqr723x.js → index-t6j3qxnd.js} +1 -1
- package/dist/{index-zy67whjr.js → index-z05n7702.js} +1 -1
- package/dist/{index-3svaejkh.js → index-z928hmnp.js} +1 -1
- package/dist/index.js +31 -31
- package/dist/{message-fts-rowid-map-e79b7b6x.js → message-fts-rowid-map-9e1getgs.js} +2 -2
- package/dist/{message-index-4q8ek2fc.js → message-index-1sgzev6c.js} +6 -6
- package/dist/{message-index-bounded-rydsg9r5.js → message-index-bounded-k8pgrxad.js} +6 -6
- package/dist/migration-worker.js +3 -3
- package/dist/{project-embedding-registry-hn529988.js → project-embedding-registry-rstzmb60.js} +4 -4
- package/dist/raw-ordinal-warmup-worker.js +6 -6
- package/dist/{read-session-chunk-t039f0m5.js → read-session-chunk-q9z6s48t.js} +3 -3
- package/dist/{read-session-raw-aw6jgvwg.js → read-session-raw-s4amywnh.js} +3 -1
- package/dist/{recomp-orchestrator-hbm53jj5.js → recomp-orchestrator-hr8ddk8z.js} +13 -13
- package/dist/{search-hea079d7.js → search-3zjjmc60.js} +10 -10
- package/dist/{search-archive-weh164mh.js → search-archive-c00etw7k.js} +4 -4
- package/dist/{send-session-notification-gqzkz7da.js → send-session-notification-ygj4mja0.js} +3 -3
- package/dist/shared/slow-test.d.ts +7 -0
- package/dist/shared/slow-test.d.ts.map +1 -0
- package/dist/tools/ctx-memory/tools.d.ts.map +1 -1
- package/dist/tools/ctx-note/tools.d.ts.map +1 -1
- package/dist/tools/parameter-descriptions.d.ts +6 -6
- package/dist/tools/parameter-descriptions.d.ts.map +1 -1
- package/dist/{transform-postprocess-phase-0b04tm1p.js → transform-postprocess-phase-rredw6bz.js} +13 -13
- package/dist/v2/auto-search-worker.js +4 -4
- package/dist/v2/chunk-embedding-write-worker.js +4 -4
- package/dist/v2/{compartment-chunk-embedding-8jjmcgeg.js → compartment-chunk-embedding-tk6g4q80.js} +3 -3
- package/dist/v2/{context-ea3x7smm.js → context-zbydzq4g.js} +37 -32
- package/dist/v2/{embedding-backfill-5e74ae0m.js → embedding-backfill-w5qp7t28.js} +5 -5
- package/dist/v2/{message-fts-rowid-map-n8fdg2ja.js → message-fts-rowid-map-pqk3a55v.js} +2 -2
- package/dist/v2/{message-index-qz9wdp82.js → message-index-5gnnn64b.js} +5 -5
- package/dist/v2/{message-index-bounded-8rcd7qq9.js → message-index-bounded-a9xa8wsq.js} +5 -5
- package/dist/v2/migration-worker.js +3 -3
- package/dist/v2/{project-embedding-registry-v38q4xd5.js → project-embedding-registry-e7zftfvj.js} +4 -4
- package/dist/v2/raw-ordinal-warmup-worker.js +6 -6
- package/dist/v2/{read-session-chunk-wazfyxcg.js → read-session-chunk-qqvda7zv.js} +2 -2
- package/dist/v2/{read-session-raw-b70cpwzj.js → read-session-raw-ppjxnqk4.js} +3 -1
- package/dist/v2/{recomp-orchestrator-b12zaptj.js → recomp-orchestrator-nmt9y25j.js} +10 -10
- package/dist/v2/{search-hza9x72a.js → search-6dawx2gt.js} +9 -9
- package/dist/v2/{search-archive-x64rtz1z.js → search-archive-dhqj1w31.js} +3 -3
- package/dist/v2/{send-session-notification-8eqe259v.js → send-session-notification-f8scq6ae.js} +1 -1
- package/dist/v2/{server-132h8twc.js → server-16dpnz56.js} +2 -2
- package/dist/v2/{server-qteg2kt9.js → server-8j2e7t31.js} +1 -1
- package/dist/v2/{server-33nqbqkw.js → server-9e55n4wx.js} +5 -5
- package/dist/v2/{server-d48x3m4x.js → server-9xbbaekh.js} +1 -1
- package/dist/v2/{server-m4bfaevz.js → server-gwmshgx9.js} +77 -5
- package/dist/v2/{server-ppcd1qxh.js → server-mefps930.js} +3 -3
- package/dist/v2/{server-62g58aaz.js → server-pw21ypwb.js} +1 -1
- package/dist/v2/{server-ad18djzs.js → server-q5z0gag0.js} +1 -1
- package/dist/v2/{server-zg5y109h.js → server-r209n2fk.js} +39 -21
- package/dist/v2/{server-4kjmrjn4.js → server-swvhxhxz.js} +5 -1
- package/dist/v2/{server-dtp8hcjh.js → server-wxrdher8.js} +1 -1
- package/dist/v2/{server-j8h7bsca.js → server-y9ncq4ck.js} +2 -2
- package/dist/v2/server.js +5 -5
- package/dist/v2/{wrapup-orchestrator-3ssd5yy1.js → wrapup-orchestrator-9z81xj66.js} +10 -10
- package/dist/{wrapup-orchestrator-5vpcd1zx.js → wrapup-orchestrator-dbnb530w.js} +14 -14
- package/package.json +4 -4
- package/src/agents/permissions.ts +22 -6
- package/src/agents/smart-notes-dreamer-gate.golden.json +241 -241
- package/src/agents/smart-notes-on.golden.json +4 -4
- package/src/config/compaction-accessor-guard.test.ts +0 -5
- package/src/config/removed-config-keys.test.ts +12 -26
- package/src/shared/announcement.test.ts +55 -59
- package/src/shared/prompt-surface-a1-golden.md +6 -7
- package/src/shared/slow-test.ts +24 -0
- package/src/shared/stable-json-linear.test.ts +18 -10
- package/src/config/latch-permanence-guard.test.ts +0 -258
|
@@ -70,13 +70,13 @@ import {
|
|
|
70
70
|
readRawSeedTailFromDb2,
|
|
71
71
|
readRawSessionBoundaryEndpointsFromDb2,
|
|
72
72
|
prewarmRawSessionOrdinalsForDb
|
|
73
|
-
} from "./index-
|
|
73
|
+
} from "./index-7tdtpqrg.js";
|
|
74
74
|
import {
|
|
75
75
|
openCodeDbExists,
|
|
76
76
|
withReadOnlySessionDb,
|
|
77
77
|
getRawSessionMessageCountFromDb,
|
|
78
78
|
getMessageTimesFromOpenCodeDb
|
|
79
|
-
} from "./index-
|
|
79
|
+
} from "./index-c9zrgcnt.js";
|
|
80
80
|
import {
|
|
81
81
|
getToolDefinitionMeasurementSignature,
|
|
82
82
|
getLargestMeasuredToolDefinitionTokens,
|
|
@@ -492,6 +492,70 @@ function expandToolPart(part, overrides, legacyPreview = false) {
|
|
|
492
492
|
return renderToolTemplate(template, input, state?.output ?? state?.error, legacyPreview);
|
|
493
493
|
}
|
|
494
494
|
|
|
495
|
+
// src/hooks/magic-context/ask-answer-notice.ts
|
|
496
|
+
var ANSWER_HEADER_PREFIX = /^Inbox [^\n]* notice from user via user_answer \(user_answer\)/;
|
|
497
|
+
var ANSWER_TRAILER = /\n([\s\S]*?)\nThis ask is now closed; no dismiss is needed\. Continue accordingly\.$/;
|
|
498
|
+
var ANSWER_ANSWER_LINE = /^The user answered your parked question (\S+)\.\nQuestion: ([^\n]+)\nAnswer: /;
|
|
499
|
+
var ANSWER_QUESTION_LINE = /^Question: ([^\n]+)\nAnswer: /;
|
|
500
|
+
var reminderEnvelopePattern = /<system-reminder>([\s\S]*?)<\/system-reminder>/gi;
|
|
501
|
+
function reminderBodies(text) {
|
|
502
|
+
reminderEnvelopePattern.lastIndex = 0;
|
|
503
|
+
const bodies = [];
|
|
504
|
+
for (const match of text.matchAll(reminderEnvelopePattern)) {
|
|
505
|
+
const body = match[1];
|
|
506
|
+
if (body !== undefined)
|
|
507
|
+
bodies.push(body);
|
|
508
|
+
}
|
|
509
|
+
return bodies;
|
|
510
|
+
}
|
|
511
|
+
function parseAnswerBody(body) {
|
|
512
|
+
const lines = body.replace(/\r\n/g, `
|
|
513
|
+
`).replace(/^\n+|\n+$/g, "");
|
|
514
|
+
if (!ANSWER_HEADER_PREFIX.test(lines))
|
|
515
|
+
return null;
|
|
516
|
+
if (lines.includes("The user dismissed this question"))
|
|
517
|
+
return null;
|
|
518
|
+
const framed = ANSWER_TRAILER.exec(lines);
|
|
519
|
+
if (framed === null)
|
|
520
|
+
return null;
|
|
521
|
+
const content = framed[1] ?? "";
|
|
522
|
+
const narrated = ANSWER_ANSWER_LINE.exec(content);
|
|
523
|
+
if (narrated !== null) {
|
|
524
|
+
const question = narrated[2] ?? "";
|
|
525
|
+
const answer = content.slice(narrated[0].length);
|
|
526
|
+
return closedAnswer(question, answer);
|
|
527
|
+
}
|
|
528
|
+
const bare = ANSWER_QUESTION_LINE.exec(content);
|
|
529
|
+
if (bare !== null) {
|
|
530
|
+
const question = bare[1] ?? "";
|
|
531
|
+
const answer = content.slice(bare[0].length);
|
|
532
|
+
return closedAnswer(question, answer);
|
|
533
|
+
}
|
|
534
|
+
return null;
|
|
535
|
+
}
|
|
536
|
+
function closedAnswer(question, answer) {
|
|
537
|
+
if (question.trim().length === 0)
|
|
538
|
+
return null;
|
|
539
|
+
if (answer.trim().length === 0)
|
|
540
|
+
return null;
|
|
541
|
+
return { question, answer };
|
|
542
|
+
}
|
|
543
|
+
function extractAskAnswerNotices(text) {
|
|
544
|
+
const notices = [];
|
|
545
|
+
for (const body of reminderBodies(text)) {
|
|
546
|
+
const notice = parseAnswerBody(body);
|
|
547
|
+
if (notice !== null)
|
|
548
|
+
notices.push(notice);
|
|
549
|
+
}
|
|
550
|
+
return notices;
|
|
551
|
+
}
|
|
552
|
+
function formatAskAnswerNotice(notice) {
|
|
553
|
+
return `U (answered "${notice.question}"): ${notice.answer}`;
|
|
554
|
+
}
|
|
555
|
+
function askAnswerLines(text) {
|
|
556
|
+
return extractAskAnswerNotices(text).map(formatAskAnswerNotice);
|
|
557
|
+
}
|
|
558
|
+
|
|
495
559
|
// src/hooks/magic-context/host-served-rows.ts
|
|
496
560
|
var HOST_UNSERVED_ROW = "hostUnservedRow";
|
|
497
561
|
function markHostUnservedRow(target) {
|
|
@@ -6604,6 +6668,9 @@ function withRawMessageProvider2(sessionId, provider, fn) {
|
|
|
6604
6668
|
function cleanUserText2(text) {
|
|
6605
6669
|
return stripOutsideSteeringWrappers(text, (segment) => removeSystemReminders(segment).replace(OMO_INTERNAL_INITIATOR_MARKER, "")).trim();
|
|
6606
6670
|
}
|
|
6671
|
+
function answerLineParts(rawText) {
|
|
6672
|
+
return askAnswerLines(rawText).map(normalizeText).filter((value) => value.length > 0);
|
|
6673
|
+
}
|
|
6607
6674
|
function hasMeaningfulChunkUserText(parts) {
|
|
6608
6675
|
for (const part of parts) {
|
|
6609
6676
|
if (part === null || typeof part !== "object")
|
|
@@ -6620,7 +6687,7 @@ function hasMeaningfulChunkUserText(parts) {
|
|
|
6620
6687
|
continue;
|
|
6621
6688
|
return true;
|
|
6622
6689
|
}
|
|
6623
|
-
return
|
|
6690
|
+
return parts.some((part) => part !== null && typeof part === "object" && part.type === "text" && typeof part.text === "string" && part.ignored !== true && askAnswerLines(part.text).length > 0);
|
|
6624
6691
|
}
|
|
6625
6692
|
function withRawSessionMessageCache2(fn) {
|
|
6626
6693
|
const outerCache = activeRawMessageCache;
|
|
@@ -7374,8 +7441,10 @@ function readSessionChunk2(sessionId, tokenBudget, offset = 1, eligibleEndOrdina
|
|
|
7374
7441
|
}
|
|
7375
7442
|
const role = compactRole(msg.role);
|
|
7376
7443
|
const textParts = extractTexts2(msg.parts).map((t) => msg.role === "user" ? cleanUserText2(t) : t).map(normalizeText).filter((value) => value.length > 0);
|
|
7444
|
+
const answerParts = msg.role === "user" ? extractTexts2(msg.parts).flatMap((text) => answerLineParts(text)) : [];
|
|
7445
|
+
const userParts = answerParts.length > 0 ? [...textParts, ...answerParts] : textParts;
|
|
7377
7446
|
const allParts = options.expand === false ? [
|
|
7378
|
-
...
|
|
7447
|
+
...userParts,
|
|
7379
7448
|
...textParts.length === 0 ? extractToolCallSummaries(msg.parts) : []
|
|
7380
7449
|
] : msg.parts.flatMap((part) => {
|
|
7381
7450
|
if (expandedResults.has(part))
|
|
@@ -7384,6 +7453,9 @@ function readSessionChunk2(sessionId, tokenBudget, offset = 1, eligibleEndOrdina
|
|
|
7384
7453
|
if (expansion !== null)
|
|
7385
7454
|
return [`TC: ${expansion}`];
|
|
7386
7455
|
const texts = extractTexts2([part]).map((t) => msg.role === "user" ? cleanUserText2(t) : t).map(normalizeText).filter(Boolean);
|
|
7456
|
+
if (msg.role === "user") {
|
|
7457
|
+
texts.push(...extractTexts2([part]).flatMap((text) => answerLineParts(text)));
|
|
7458
|
+
}
|
|
7387
7459
|
return texts.length ? texts : textParts.length === 0 ? extractToolCallSummaries([part]) : [];
|
|
7388
7460
|
});
|
|
7389
7461
|
const compacted = compactTextForSummary(allParts.join(" / "), msg.role);
|
|
@@ -7392,7 +7464,7 @@ function readSessionChunk2(sessionId, tokenBudget, offset = 1, eligibleEndOrdina
|
|
|
7392
7464
|
recordFilteredNoise(meta);
|
|
7393
7465
|
continue;
|
|
7394
7466
|
}
|
|
7395
|
-
const msgHasNarrative =
|
|
7467
|
+
const msgHasNarrative = userParts.length > 0;
|
|
7396
7468
|
if (currentBlock && currentBlock.role === role) {
|
|
7397
7469
|
currentBlock.endOrdinal = msg.ordinal;
|
|
7398
7470
|
currentBlock.parts.push(text);
|
|
@@ -7494,4 +7566,4 @@ function readRawSessionSeedTail2(sessionId, boundaryId, onQuery) {
|
|
|
7494
7566
|
});
|
|
7495
7567
|
}
|
|
7496
7568
|
|
|
7497
|
-
export { isToolFreeHiddenAgent, TOOL_USE_DISABLED, ZEN_READ_AGENT_SUFFIX, needsBlockedRead, withBlockedReadInstruction, rememberV1HiddenRun, shapeV1HiddenMessage, expandToolPart, markHostUnservedRow, retreatPastHostUnservedRows, snapTerminalCompartmentToServedRow, isHostRenderedSystemMessage, markCoveredInstructionRow, isCoveredInstructionRow, takeCoveredInstructionRows, cloneKeepingCoveredInstructionMarks, completedToolArcCrossesBoundary, estimateTrueRawMessageTokens, buildToolArcs, fenceBoundaryForCompletedToolArcs, fenceBoundaryForToolArcs, buildTrueRawTokenIndex, computeRawRangeFingerprint, invalidateTrueRawTokenCache, stripSystemInjection, isTextPart, isToolPartWithOutput, isFilePart, toolPartHasUserAnswer, DreamTokenBudgetExceeded, TOKEN_BUDGET_FINALIZE_MESSAGE, registerBudgetFinalizeChild, releaseBudgetFinalizeChild, createDreamTokenBudget, recordToolParameters, createDroppedInputGuard, assertExecutableToolInput, createDroppedInputToolExecuteBeforeHook, isEditTool, MERGED_REASONING_PARTS_PREFIX, decodeMergedReasoningParts, MAX_EXECUTE_THRESHOLD, escalationBands, HYGIENE_PROVIDER_UNITS_VERSION, sessionDecisionCalibration, transitionSessionHygieneUnits, readEpochFloorSnapshot, getProtectionWindowForSession, SESSION_META_SELECT_COLUMNS, META_COLUMNS, BOOLEAN_META_KEYS, NULL_BIND_META_KEYS, isSessionMetaRow, getDefaultSessionMeta, ensureSessionMetaRow, toSessionMeta, persistCachedM0, clearCachedM0M1, clearCachedM0, withReplayEnvelopeSnapshot, invalidateReplayEnvelopeSnapshot, isRustMarkerAdmissionFenced, setRustMarkerAdmissionFence, ReplayDocumentError, readReplayEnvelope, readReplayDocument, updateReplayDocument, writeReplayDocument, isEmergencyRecoveryArmed, isProviderOverflowReconfirmed, isProviderOverflowFailClosedProven, getEmergencyRecoveryArmedAt, describeProtectedTailDrainBudgetSkip, loadPersistedUsage, loadProtectedTailMeta, markProtectedTailPolicyV3Seeded, recordProtectedTailPublicationFloor, recordProtectedTailNoEligibleHead, resetProtectedTailNoEligibleHead, getWrapupInProgressState, isWrapupInProgress, acquireWrapupInProgress, updateWrapupInProgress, releaseWrapupInProgress, resolveCompactionModeRecord, getCompactionModeRecord, setCompactionModeRecord, getProtectedTailDrainBudgetSkip, reserveProtectedTailDrainTokens, clearEmergencyDrainLatch, recordHistorianDrainFailure, clearHistorianDrainFailure, rollbackProtectedTailDrainReservation, 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, 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, clearThinkingBindingRecoveryIf, getMergedReasoningStrippedIds, addMergedReasoningStrippedIds, getTrailingBlankDecisions, addTrailingBlankDecisions, demoteTrailingBlankKeepDecisions, getStaleReduceStrippedIds, addStaleReduceStrippedIds, getProcessedImageStrippedIds, parseProcessedImageMarkers, serializeProcessedImageMarkers, getProcessedImageMarkers, addProcessedImageStrippedIds, getPendingCompactionMarkerState, getCompactionMarkerHealth, loadPostprocessReplaySnapshot, setPendingCompactionMarkerState, replacePendingCompactionMarkerStateIf, clearPendingCompactionMarkerStateIf, getPendingPiCompactionMarkerState, clearPendingPiCompactionMarkerStateIf, logPiCompactionMarkerClear, getSessionsWithPendingMarker, setSessionWorkMetrics, 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, estimateMessageTokens, wireContentBytes, createFinalWireUsageTracker, estimateFinalWireInputTokens, estimateAppendedWireTokens, SKELETON_REAL_INPUT_MAX_BYTES, partHasCompletedResult, extractToolCallObservation, ToolMutationBatch, createToolDropTarget, 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, compareRawSessionMessageOrder2, readRawSessionMessageById2, getRawSessionMessageCount2, RAW_SESSION_TAG_KEY_PAGE_SIZE2, getRawSessionTagKeysThrough2, getLegacyProtectedTailStartOrdinal2, getProtectedTailStartOrdinal2, readSessionChunk2, getRawSessionMessageIdsThrough2, readRawSessionSeedTail2 };
|
|
7569
|
+
export { isToolFreeHiddenAgent, TOOL_USE_DISABLED, ZEN_READ_AGENT_SUFFIX, needsBlockedRead, withBlockedReadInstruction, rememberV1HiddenRun, shapeV1HiddenMessage, expandToolPart, askAnswerLines, markHostUnservedRow, retreatPastHostUnservedRows, snapTerminalCompartmentToServedRow, isHostRenderedSystemMessage, markCoveredInstructionRow, isCoveredInstructionRow, takeCoveredInstructionRows, cloneKeepingCoveredInstructionMarks, completedToolArcCrossesBoundary, estimateTrueRawMessageTokens, buildToolArcs, fenceBoundaryForCompletedToolArcs, fenceBoundaryForToolArcs, buildTrueRawTokenIndex, computeRawRangeFingerprint, invalidateTrueRawTokenCache, stripSystemInjection, isTextPart, isToolPartWithOutput, isFilePart, toolPartHasUserAnswer, DreamTokenBudgetExceeded, TOKEN_BUDGET_FINALIZE_MESSAGE, registerBudgetFinalizeChild, releaseBudgetFinalizeChild, createDreamTokenBudget, recordToolParameters, createDroppedInputGuard, assertExecutableToolInput, createDroppedInputToolExecuteBeforeHook, isEditTool, MERGED_REASONING_PARTS_PREFIX, decodeMergedReasoningParts, MAX_EXECUTE_THRESHOLD, escalationBands, HYGIENE_PROVIDER_UNITS_VERSION, sessionDecisionCalibration, transitionSessionHygieneUnits, readEpochFloorSnapshot, getProtectionWindowForSession, SESSION_META_SELECT_COLUMNS, META_COLUMNS, BOOLEAN_META_KEYS, NULL_BIND_META_KEYS, isSessionMetaRow, getDefaultSessionMeta, ensureSessionMetaRow, toSessionMeta, persistCachedM0, clearCachedM0M1, clearCachedM0, withReplayEnvelopeSnapshot, invalidateReplayEnvelopeSnapshot, isRustMarkerAdmissionFenced, setRustMarkerAdmissionFence, ReplayDocumentError, readReplayEnvelope, readReplayDocument, updateReplayDocument, writeReplayDocument, isEmergencyRecoveryArmed, isProviderOverflowReconfirmed, isProviderOverflowFailClosedProven, getEmergencyRecoveryArmedAt, describeProtectedTailDrainBudgetSkip, loadPersistedUsage, loadProtectedTailMeta, markProtectedTailPolicyV3Seeded, recordProtectedTailPublicationFloor, recordProtectedTailNoEligibleHead, resetProtectedTailNoEligibleHead, getWrapupInProgressState, isWrapupInProgress, acquireWrapupInProgress, updateWrapupInProgress, releaseWrapupInProgress, resolveCompactionModeRecord, getCompactionModeRecord, setCompactionModeRecord, getProtectedTailDrainBudgetSkip, reserveProtectedTailDrainTokens, clearEmergencyDrainLatch, recordHistorianDrainFailure, clearHistorianDrainFailure, rollbackProtectedTailDrainReservation, 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, 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, clearThinkingBindingRecoveryIf, getMergedReasoningStrippedIds, addMergedReasoningStrippedIds, getTrailingBlankDecisions, addTrailingBlankDecisions, demoteTrailingBlankKeepDecisions, getStaleReduceStrippedIds, addStaleReduceStrippedIds, getProcessedImageStrippedIds, parseProcessedImageMarkers, serializeProcessedImageMarkers, getProcessedImageMarkers, addProcessedImageStrippedIds, getPendingCompactionMarkerState, getCompactionMarkerHealth, loadPostprocessReplaySnapshot, setPendingCompactionMarkerState, replacePendingCompactionMarkerStateIf, clearPendingCompactionMarkerStateIf, getPendingPiCompactionMarkerState, clearPendingPiCompactionMarkerStateIf, logPiCompactionMarkerClear, getSessionsWithPendingMarker, setSessionWorkMetrics, 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, estimateMessageTokens, wireContentBytes, createFinalWireUsageTracker, estimateFinalWireInputTokens, estimateAppendedWireTokens, SKELETON_REAL_INPUT_MAX_BYTES, partHasCompletedResult, extractToolCallObservation, ToolMutationBatch, createToolDropTarget, 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, compareRawSessionMessageOrder2, readRawSessionMessageById2, getRawSessionMessageCount2, RAW_SESSION_TAG_KEY_PAGE_SIZE2, getRawSessionTagKeysThrough2, getLegacyProtectedTailStartOrdinal2, getProtectedTailStartOrdinal2, readSessionChunk2, getRawSessionMessageIdsThrough2, readRawSessionSeedTail2 };
|
|
@@ -41,7 +41,7 @@ import {
|
|
|
41
41
|
countSessionCompartmentEmbedCoverage2,
|
|
42
42
|
countSessionCompartmentEmbedCoveragePolite2,
|
|
43
43
|
countUnembeddedSessionCompartmentsPolite2
|
|
44
|
-
} from "./index-
|
|
44
|
+
} from "./index-3d5wnkq7.js";
|
|
45
45
|
import {
|
|
46
46
|
DEFAULT_LOCAL_EMBEDDING_MODEL
|
|
47
47
|
} from "./index-nxrsns5x.js";
|
package/dist/index.js
CHANGED
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
detectOverflow,
|
|
29
29
|
isAnthropicFamilyRoute,
|
|
30
30
|
readRawSessionMessages2
|
|
31
|
-
} from "./index-
|
|
31
|
+
} from "./index-t1zk694n.js";
|
|
32
32
|
import {
|
|
33
33
|
setHarness2
|
|
34
34
|
} from "./index-pavzsdc6.js";
|
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
checkCompactionMarkerConsistency,
|
|
98
98
|
clearInjectionCache,
|
|
99
99
|
clearNoteNudgeTriggerOnly
|
|
100
|
-
} from "./index-
|
|
100
|
+
} from "./index-dds7cxhz.js";
|
|
101
101
|
import"./index-sd3egckz.js";
|
|
102
102
|
import {
|
|
103
103
|
hasTrustedAbsoluteWall,
|
|
@@ -185,7 +185,7 @@ import {
|
|
|
185
185
|
parameterDescriptionsFor,
|
|
186
186
|
MagicContextRpcServer,
|
|
187
187
|
applyHiddenSubagentTemperature
|
|
188
|
-
} from "./index-
|
|
188
|
+
} from "./index-6g7tyb6e.js";
|
|
189
189
|
import {
|
|
190
190
|
resolveOpenCodeDbPath,
|
|
191
191
|
openCodeDbPathExists,
|
|
@@ -209,7 +209,7 @@ import {
|
|
|
209
209
|
openDatabaseAsync,
|
|
210
210
|
isDatabasePersisted,
|
|
211
211
|
getDatabasePersistenceError
|
|
212
|
-
} from "./index-
|
|
212
|
+
} from "./index-jrjr58ez.js";
|
|
213
213
|
import {
|
|
214
214
|
setHomeProjectPermission,
|
|
215
215
|
ProjectIdentityError,
|
|
@@ -229,7 +229,7 @@ import {
|
|
|
229
229
|
observeSessionActivity,
|
|
230
230
|
backfillSessionActivity,
|
|
231
231
|
deleteIndexedMessage2
|
|
232
|
-
} from "./index-
|
|
232
|
+
} from "./index-p6evxfcc.js";
|
|
233
233
|
import {
|
|
234
234
|
recordSessionProjectIdentity
|
|
235
235
|
} from "./index-kfyb3k6n.js";
|
|
@@ -242,8 +242,8 @@ import {
|
|
|
242
242
|
import"./index-cpjk5jd2.js";
|
|
243
243
|
import {
|
|
244
244
|
forgetRawSessionOrdinalWatermark2
|
|
245
|
-
} from "./index-
|
|
246
|
-
import"./index-
|
|
245
|
+
} from "./index-7tdtpqrg.js";
|
|
246
|
+
import"./index-szf8r0ba.js";
|
|
247
247
|
import"./index-9q1g3c5q.js";
|
|
248
248
|
import"./index-fr0wbhdn.js";
|
|
249
249
|
import {
|
|
@@ -257,18 +257,18 @@ import"./index-wfybj1dw.js";
|
|
|
257
257
|
import {
|
|
258
258
|
getDefaultSubcConnectionFile,
|
|
259
259
|
SubcModuleTransport
|
|
260
|
-
} from "./index-
|
|
260
|
+
} from "./index-21bkd3m6.js";
|
|
261
261
|
import"./index-qt1qqasc.js";
|
|
262
262
|
import"./index-rrv26qjz.js";
|
|
263
263
|
import {
|
|
264
264
|
observeOpenCodeTurnEvent,
|
|
265
265
|
clearTrackedOpenCodeSession,
|
|
266
266
|
findLastAssistantModelFromOpenCodeDb
|
|
267
|
-
} from "./index-
|
|
267
|
+
} from "./index-c9zrgcnt.js";
|
|
268
268
|
import {
|
|
269
269
|
sendCommandResult2,
|
|
270
270
|
sendStatusNotification2
|
|
271
|
-
} from "./index-
|
|
271
|
+
} from "./index-jcr6pe7z.js";
|
|
272
272
|
import {
|
|
273
273
|
detectConflicts,
|
|
274
274
|
resolveCompactionForBoot
|
|
@@ -276,7 +276,7 @@ import {
|
|
|
276
276
|
import {
|
|
277
277
|
sendConflictWarning2,
|
|
278
278
|
cleanupConflictWarnings2
|
|
279
|
-
} from "./index-
|
|
279
|
+
} from "./index-2haxh8h3.js";
|
|
280
280
|
import"./index-1zx87sdm.js";
|
|
281
281
|
import {
|
|
282
282
|
stripPersistedAssistantText,
|
|
@@ -292,15 +292,15 @@ import {
|
|
|
292
292
|
getEmbedDrainUiStatus,
|
|
293
293
|
clearEmbedSessionState,
|
|
294
294
|
getEmbeddingCoverageStatus2
|
|
295
|
-
} from "./index-
|
|
296
|
-
import"./index-
|
|
297
|
-
import"./index-
|
|
295
|
+
} from "./index-z05n7702.js";
|
|
296
|
+
import"./index-3d5wnkq7.js";
|
|
297
|
+
import"./index-z928hmnp.js";
|
|
298
298
|
import {
|
|
299
299
|
pushNotification2
|
|
300
300
|
} from "./index-x8a7jmkh.js";
|
|
301
301
|
import"./index-51rdvtkz.js";
|
|
302
302
|
import"./index-4dhv7mqz.js";
|
|
303
|
-
import"./index-
|
|
303
|
+
import"./index-t6j3qxnd.js";
|
|
304
304
|
import"./index-jjvbk92s.js";
|
|
305
305
|
import"./index-qgh1qwjj.js";
|
|
306
306
|
import {
|
|
@@ -309,10 +309,10 @@ import {
|
|
|
309
309
|
setCtxReduceRegisteredGlobally,
|
|
310
310
|
clearToolPermissionDenied,
|
|
311
311
|
resetDegradedCacheCount2
|
|
312
|
-
} from "./index-
|
|
312
|
+
} from "./index-8e9qsnrw.js";
|
|
313
313
|
import {
|
|
314
314
|
runManagedRecomp2
|
|
315
|
-
} from "./index-
|
|
315
|
+
} from "./index-jd0y50w3.js";
|
|
316
316
|
import {
|
|
317
317
|
isValidSemver,
|
|
318
318
|
compareSemverCore
|
|
@@ -320,9 +320,9 @@ import {
|
|
|
320
320
|
import"./index-fmsr7v69.js";
|
|
321
321
|
import {
|
|
322
322
|
runManagedWrapup2
|
|
323
|
-
} from "./index-
|
|
323
|
+
} from "./index-7516anfj.js";
|
|
324
324
|
import"./index-kaqs6h31.js";
|
|
325
|
-
import"./index-
|
|
325
|
+
import"./index-57jf5ztp.js";
|
|
326
326
|
import {
|
|
327
327
|
isDreamerRunnable,
|
|
328
328
|
isSmartNoteSurfaceAvailable,
|
|
@@ -8190,7 +8190,7 @@ var require_src2 = __commonJS(function(exports, module) {
|
|
|
8190
8190
|
// package.json
|
|
8191
8191
|
var package_default = {
|
|
8192
8192
|
name: "@cortexkit/opencode-magic-context",
|
|
8193
|
-
version: "0.49.
|
|
8193
|
+
version: "0.49.24",
|
|
8194
8194
|
type: "module",
|
|
8195
8195
|
description: "OpenCode plugin for Magic Context — cross-session memory and context management",
|
|
8196
8196
|
main: "dist/index.js",
|
|
@@ -8233,8 +8233,8 @@ var package_default = {
|
|
|
8233
8233
|
"check:tui-compiled": 'git diff --exit-code -- src/tui-compiled && test -z "$(git status --porcelain -- src/tui-compiled)"',
|
|
8234
8234
|
"check:transformers-node-wasm": "bun scripts/verify-transformers-node-wasm.ts",
|
|
8235
8235
|
typecheck: "tsc -p ../retina-local-fs/tsconfig.build.json && tsc --noEmit && tsc -p tsconfig.scripts.json",
|
|
8236
|
-
test: "bun ../../scripts/check-bun.mjs && bun install --frozen-lockfile &&
|
|
8237
|
-
"test:active-session-backfill": "MC_REVIEW_ASSERT_LIVENESS=1 BUN_JSC_useOMGJIT=0 bun test src/hooks/magic-context/auto-embed-session.test.ts --test-name-pattern '
|
|
8236
|
+
test: "bun ../../scripts/check-bun.mjs && bun install --frozen-lockfile && MC_SLOW_TESTS=0 MC_REVIEW_ASSERT_LIVENESS=1 BUN_JSC_useOMGJIT=0 bun test --parallel=4 --timeout 30000 --test-name-pattern '^(?!.*\\[slow\\] )'",
|
|
8237
|
+
"test:active-session-backfill": "MC_REVIEW_ASSERT_LIVENESS=1 BUN_JSC_useOMGJIT=0 bun test src/hooks/magic-context/auto-embed-session.test.ts --test-name-pattern 're-embeds old chunks' --timeout 120000",
|
|
8238
8238
|
"test:serial": "bun install --frozen-lockfile && MC_REVIEW_ASSERT_LIVENESS=1 BUN_JSC_useOMGJIT=0 bun test --timeout 30000",
|
|
8239
8239
|
"test:parallel:probe": "bun scripts/verify-parallel-db-isolation.ts",
|
|
8240
8240
|
lint: "bun ../../scripts/check-bun.mjs && biome check .",
|
|
@@ -8245,7 +8245,7 @@ var package_default = {
|
|
|
8245
8245
|
prepublishOnly: "bun run build && bun run check:tui-compiled"
|
|
8246
8246
|
},
|
|
8247
8247
|
"//check:tui-compiled": "Check drift on output already generated by build or build:tui; this check never regenerates files. CI and prepublishOnly build first.",
|
|
8248
|
-
"//test": "
|
|
8248
|
+
"//test": "Unit shards run small behavioral fixtures. The nightly/check-branch slow-unit lane runs full scale and latency gates in fresh processes once per mode, not once per shard. JSC's optimizing WebAssembly tier stays disabled in tests; production host options are unchanged.",
|
|
8249
8249
|
dependencies: {
|
|
8250
8250
|
"@cortexkit/subc-client": "0.11.1",
|
|
8251
8251
|
"@jitl/quickjs-singlefile-cjs-release-asyncify": "0.32.0",
|
|
@@ -12043,7 +12043,7 @@ async function setup(context) {
|
|
|
12043
12043
|
if (claimStorageBackupWarningCheck() && isMagicContextStorageOutsideEngram(storageDir)) {
|
|
12044
12044
|
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.`);
|
|
12045
12045
|
}
|
|
12046
|
-
const { registerContext } = await import("./context-
|
|
12046
|
+
const { registerContext } = await import("./context-tvrjhnmj.js");
|
|
12047
12047
|
setHarness2("opencode2");
|
|
12048
12048
|
bindStaleBuildNotice({}, import.meta.url, "opencode2");
|
|
12049
12049
|
const duties = await registerContext(context);
|
|
@@ -12122,7 +12122,7 @@ var server = async (ctx) => {
|
|
|
12122
12122
|
if (hasBannerEntries)
|
|
12123
12123
|
setTimeout(async () => {
|
|
12124
12124
|
try {
|
|
12125
|
-
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-
|
|
12125
|
+
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-ygj4mja0.js"));
|
|
12126
12126
|
const clientWithSessions = ctx.client;
|
|
12127
12127
|
const sessions = await Promise.resolve(clientWithSessions.session?.list?.()).catch(() => null);
|
|
12128
12128
|
const sessionList = Array.isArray(sessions) ? sessions : sessions?.data;
|
|
@@ -12140,7 +12140,7 @@ var server = async (ctx) => {
|
|
|
12140
12140
|
log2(`[magic-context] opencode_db_missing path=${openCodeDbResolution.path} source=${openCodeDbResolution.source}`);
|
|
12141
12141
|
setTimeout(async () => {
|
|
12142
12142
|
try {
|
|
12143
|
-
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-
|
|
12143
|
+
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-ygj4mja0.js"));
|
|
12144
12144
|
const clientWithSessions = ctx.client;
|
|
12145
12145
|
const sessions = await Promise.resolve(clientWithSessions.session?.list?.()).catch(() => null);
|
|
12146
12146
|
const sessionList = Array.isArray(sessions) ? sessions : sessions?.data;
|
|
@@ -12417,12 +12417,12 @@ var server = async (ctx) => {
|
|
|
12417
12417
|
{
|
|
12418
12418
|
const fence = getSchemaFenceRejection();
|
|
12419
12419
|
if (fence) {
|
|
12420
|
-
importPluginModule(() => import("./conflict-warning-hook-
|
|
12420
|
+
importPluginModule(() => import("./conflict-warning-hook-a27bhggg.js")).then(({ sendSchemaFenceWarning }) => sendSchemaFenceWarning(ctx.client, ctx.directory, fence)).catch((error) => log2("[magic-context] schema-fence warning unavailable:", error));
|
|
12421
12421
|
}
|
|
12422
12422
|
}
|
|
12423
12423
|
const serverUrl = ctx.serverUrl;
|
|
12424
12424
|
const serverUrlStr = serverUrl instanceof URL ? serverUrl.toString().replace(/\/$/, "") : typeof serverUrl === "string" ? serverUrl.replace(/\/$/, "") : undefined;
|
|
12425
|
-
importPluginModule(() => import("./send-session-notification-
|
|
12425
|
+
importPluginModule(() => import("./send-session-notification-ygj4mja0.js")).then(({ setNotificationServerUrl }) => {
|
|
12426
12426
|
setNotificationServerUrl(serverUrlStr);
|
|
12427
12427
|
}).catch((error) => log2("[magic-context] notification transport unavailable:", error));
|
|
12428
12428
|
if (conflictResult?.hasConflict) {
|
|
@@ -12445,7 +12445,7 @@ var server = async (ctx) => {
|
|
|
12445
12445
|
}) => {
|
|
12446
12446
|
if (!shouldShowAnnouncement())
|
|
12447
12447
|
return;
|
|
12448
|
-
return importPluginModule(() => import("./conflict-warning-hook-
|
|
12448
|
+
return importPluginModule(() => import("./conflict-warning-hook-a27bhggg.js")).then(({ sendStartupAnnouncement }) => sendStartupAnnouncement(ctx.client, ctx.directory, ANNOUNCEMENT_VERSION, ANNOUNCEMENT_FEATURES, ANNOUNCEMENT_FOOTER, markAnnouncementSeen));
|
|
12449
12449
|
}).catch(() => {});
|
|
12450
12450
|
}, 8000);
|
|
12451
12451
|
}
|
|
@@ -12519,8 +12519,8 @@ var server = async (ctx) => {
|
|
|
12519
12519
|
tryReopenStorage,
|
|
12520
12520
|
rustReplayParticipant: () => magicContextRuntime.magicContext?.getRustReplayParticipant?.() ?? null,
|
|
12521
12521
|
onStorageBusyRefusal: async (sessionId, message) => {
|
|
12522
|
-
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-
|
|
12523
|
-
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-
|
|
12522
|
+
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-ygj4mja0.js"));
|
|
12523
|
+
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-rredw6bz.js"));
|
|
12524
12524
|
await sendStatusNotification(ctx.client, sessionId, message, {
|
|
12525
12525
|
toastDurationMs: 15000
|
|
12526
12526
|
});
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
messageFtsOrdinalRangeIsMapped2,
|
|
7
7
|
getMessageFtsRowidMapBackfillProgress2,
|
|
8
8
|
deleteUnmappedMessageFtsRows2
|
|
9
|
-
} from "./index-
|
|
10
|
-
import"./index-
|
|
9
|
+
} from "./index-szf8r0ba.js";
|
|
10
|
+
import"./index-7tdtpqrg.js";
|
|
11
11
|
import"./index-v0p37hm2.js";
|
|
12
12
|
import"./index-t5pck3ss.js";
|
|
13
13
|
import"./index-gzy5w8ya.js";
|
|
@@ -17,20 +17,20 @@ import {
|
|
|
17
17
|
indexMessagesAfterOrdinal2,
|
|
18
18
|
indexSourcesAfterOrdinal2,
|
|
19
19
|
sweepOrphanedOpenCodeMessageIndexesCooperatively2
|
|
20
|
-
} from "./index-
|
|
21
|
-
import"./index-
|
|
20
|
+
} from "./index-p6evxfcc.js";
|
|
21
|
+
import"./index-t1zk694n.js";
|
|
22
22
|
import"./index-whcgcfrv.js";
|
|
23
23
|
import"./index-1zx87sdm.js";
|
|
24
|
-
import"./index-
|
|
24
|
+
import"./index-c9zrgcnt.js";
|
|
25
25
|
import"./index-nxrsns5x.js";
|
|
26
|
-
import"./index-
|
|
26
|
+
import"./index-3d5wnkq7.js";
|
|
27
27
|
import"./index-wfybj1dw.js";
|
|
28
|
-
import"./index-
|
|
28
|
+
import"./index-szf8r0ba.js";
|
|
29
29
|
import"./index-c7phnbvk.js";
|
|
30
30
|
import"./index-j76ah6d7.js";
|
|
31
31
|
import"./index-x9k3mqrf.js";
|
|
32
32
|
import"./index-58e3y90n.js";
|
|
33
|
-
import"./index-
|
|
33
|
+
import"./index-7tdtpqrg.js";
|
|
34
34
|
import"./index-v0p37hm2.js";
|
|
35
35
|
import"./index-t5pck3ss.js";
|
|
36
36
|
import"./index-b88dwwrh.js";
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
markMessageIndexDirty2,
|
|
15
15
|
getIndexableContent2,
|
|
16
16
|
indexSingleMessage2
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-p6evxfcc.js";
|
|
18
18
|
import"./index-1zx87sdm.js";
|
|
19
19
|
import"./index-whcgcfrv.js";
|
|
20
20
|
import"./index-b88dwwrh.js";
|
|
@@ -22,14 +22,14 @@ import"./index-x9k3mqrf.js";
|
|
|
22
22
|
import"./index-nxrsns5x.js";
|
|
23
23
|
import"./index-v0p37hm2.js";
|
|
24
24
|
import"./index-cpjk5jd2.js";
|
|
25
|
-
import"./index-
|
|
25
|
+
import"./index-7tdtpqrg.js";
|
|
26
26
|
import"./index-58e3y90n.js";
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
27
|
+
import"./index-c9zrgcnt.js";
|
|
28
|
+
import"./index-t1zk694n.js";
|
|
29
29
|
import"./index-j76ah6d7.js";
|
|
30
|
-
import"./index-
|
|
30
|
+
import"./index-szf8r0ba.js";
|
|
31
31
|
import"./index-wfybj1dw.js";
|
|
32
|
-
import"./index-
|
|
32
|
+
import"./index-3d5wnkq7.js";
|
|
33
33
|
import"./index-t5pck3ss.js";
|
|
34
34
|
|
|
35
35
|
// src/features/magic-context/message-index-bounded.ts
|
package/dist/migration-worker.js
CHANGED
|
@@ -19,11 +19,11 @@ import"./index-fb3zxn06.js";
|
|
|
19
19
|
import {
|
|
20
20
|
setSqlitePragmaConfig,
|
|
21
21
|
initializeDatabase
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-jrjr58ez.js";
|
|
23
23
|
import"./index-v0p37hm2.js";
|
|
24
24
|
import"./index-cpjk5jd2.js";
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
25
|
+
import"./index-7tdtpqrg.js";
|
|
26
|
+
import"./index-szf8r0ba.js";
|
|
27
27
|
import"./index-b88dwwrh.js";
|
|
28
28
|
import"./index-j76ah6d7.js";
|
|
29
29
|
import {
|
package/dist/{project-embedding-registry-hn529988.js → project-embedding-registry-rstzmb60.js}
RENAMED
|
@@ -35,17 +35,17 @@ import {
|
|
|
35
35
|
sweepAllRegisteredProjects2,
|
|
36
36
|
_setTestProviderFactoryForProject2,
|
|
37
37
|
_resetProjectEmbeddingRegistryForTests2
|
|
38
|
-
} from "./index-
|
|
38
|
+
} from "./index-z05n7702.js";
|
|
39
39
|
import"./index-4dhv7mqz.js";
|
|
40
40
|
import"./index-qt1qqasc.js";
|
|
41
41
|
import"./index-51rdvtkz.js";
|
|
42
42
|
import"./index-nxrsns5x.js";
|
|
43
43
|
import"./index-kfyb3k6n.js";
|
|
44
|
-
import"./index-
|
|
44
|
+
import"./index-3d5wnkq7.js";
|
|
45
45
|
import"./index-wfybj1dw.js";
|
|
46
46
|
import"./index-kq5w68dp.js";
|
|
47
|
-
import"./index-
|
|
48
|
-
import"./index-
|
|
47
|
+
import"./index-szf8r0ba.js";
|
|
48
|
+
import"./index-7tdtpqrg.js";
|
|
49
49
|
import"./index-v0p37hm2.js";
|
|
50
50
|
import"./index-t5pck3ss.js";
|
|
51
51
|
import"./index-b88dwwrh.js";
|
|
@@ -30,7 +30,7 @@ async function main() {
|
|
|
30
30
|
{ log }
|
|
31
31
|
] = await Promise.all([
|
|
32
32
|
import("./sqlite-zdgm52sv.js"),
|
|
33
|
-
import("./read-session-raw-
|
|
33
|
+
import("./read-session-raw-s4amywnh.js"),
|
|
34
34
|
import("./harness-e4avh192.js"),
|
|
35
35
|
import("./logger-94kew5wm.js")
|
|
36
36
|
]);
|
|
@@ -46,13 +46,13 @@ async function main() {
|
|
|
46
46
|
openConnections.add(db);
|
|
47
47
|
db.exec("PRAGMA busy_timeout = 250");
|
|
48
48
|
if (input.ftsRowidBackfill) {
|
|
49
|
-
const { runMessageFtsRowidMapBackfill } = await import("./message-fts-rowid-map-
|
|
49
|
+
const { runMessageFtsRowidMapBackfill } = await import("./message-fts-rowid-map-9e1getgs.js");
|
|
50
50
|
db.exec("PRAGMA busy_timeout = 0");
|
|
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-
|
|
55
|
-
const { readRawSessionMessageIdOrdinalsForRangeFromDb } = await import("./read-session-raw-
|
|
54
|
+
const { renderSearchArchive } = await import("./search-archive-c00etw7k.js");
|
|
55
|
+
const { readRawSessionMessageIdOrdinalsForRangeFromDb } = await import("./read-session-raw-s4amywnh.js");
|
|
56
56
|
const archive = input.searchArchive;
|
|
57
57
|
let raw;
|
|
58
58
|
try {
|
|
@@ -84,7 +84,7 @@ async function main() {
|
|
|
84
84
|
{ configureContextDatabasePragmas }
|
|
85
85
|
] = await Promise.all([
|
|
86
86
|
import("./harness-e4avh192.js"),
|
|
87
|
-
import("./message-index-
|
|
87
|
+
import("./message-index-1sgzev6c.js"),
|
|
88
88
|
import("./sqlite-context-pragmas-mv9jqwjh.js")
|
|
89
89
|
]);
|
|
90
90
|
setHarness(input.harness ?? "opencode");
|
|
@@ -104,7 +104,7 @@ async function main() {
|
|
|
104
104
|
const { setHarness } = await import("./harness-e4avh192.js");
|
|
105
105
|
setHarness(input.harness ?? "opencode");
|
|
106
106
|
const [{ indexMessageInShortChunks }, { configureContextDatabasePragmas }] = await Promise.all([
|
|
107
|
-
import("./message-index-bounded-
|
|
107
|
+
import("./message-index-bounded-k8pgrxad.js"),
|
|
108
108
|
import("./sqlite-context-pragmas-mv9jqwjh.js")
|
|
109
109
|
]);
|
|
110
110
|
configureContextDatabasePragmas(db);
|
|
@@ -35,15 +35,15 @@ import {
|
|
|
35
35
|
readSessionChunk2,
|
|
36
36
|
getRawSessionMessageIdsThrough2,
|
|
37
37
|
readRawSessionSeedTail2
|
|
38
|
-
} from "./index-
|
|
38
|
+
} from "./index-t1zk694n.js";
|
|
39
39
|
import"./index-whcgcfrv.js";
|
|
40
40
|
import"./index-1zx87sdm.js";
|
|
41
|
-
import"./index-
|
|
41
|
+
import"./index-c9zrgcnt.js";
|
|
42
42
|
import"./index-nxrsns5x.js";
|
|
43
43
|
import"./index-j76ah6d7.js";
|
|
44
44
|
import"./index-x9k3mqrf.js";
|
|
45
45
|
import"./index-58e3y90n.js";
|
|
46
|
-
import"./index-
|
|
46
|
+
import"./index-7tdtpqrg.js";
|
|
47
47
|
import"./index-v0p37hm2.js";
|
|
48
48
|
import"./index-t5pck3ss.js";
|
|
49
49
|
import {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import {
|
|
2
|
+
areRustHistorianSyntheticParts2,
|
|
2
3
|
isStrictGapHealingMessage2,
|
|
3
4
|
isRawCompactionSummaryInfo2,
|
|
4
5
|
readRawSessionMessagesFromDb2,
|
|
@@ -27,7 +28,7 @@ import {
|
|
|
27
28
|
hasRawSessionMessageByIdFromDb2,
|
|
28
29
|
readRawSeedTailFromDb2,
|
|
29
30
|
readRawSessionBoundaryEndpointsFromDb2
|
|
30
|
-
} from "./index-
|
|
31
|
+
} from "./index-7tdtpqrg.js";
|
|
31
32
|
import"./index-v0p37hm2.js";
|
|
32
33
|
import"./index-gzy5w8ya.js";
|
|
33
34
|
import"./index-h7tgn49j.js";
|
|
@@ -36,6 +37,7 @@ import"./index-pavzsdc6.js";
|
|
|
36
37
|
import"./index-cpjk5jd2.js";
|
|
37
38
|
export {
|
|
38
39
|
RawOrdinalsNotReady2 as RawOrdinalsNotReady,
|
|
40
|
+
areRustHistorianSyntheticParts2 as areRustHistorianSyntheticParts,
|
|
39
41
|
buildInMemoryTailRawMessages2 as buildInMemoryTailRawMessages,
|
|
40
42
|
countRawSessionMessageOrdinalsFromDb2 as countRawSessionMessageOrdinalsFromDb,
|
|
41
43
|
countStoredRawSessionMessagesFromDb2 as countStoredRawSessionMessagesFromDb,
|