@cortexkit/opencode-magic-context 0.49.23 → 0.49.25
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 +5 -5
- 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-keb00be8.js} +30 -24
- 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/features/magic-context/tool-definition-tokens.d.ts +113 -57
- package/dist/features/magic-context/tool-definition-tokens.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/final-wire-token-estimate.d.ts +12 -4
- package/dist/hooks/magic-context/final-wire-token-estimate.d.ts.map +1 -1
- package/dist/hooks/magic-context/hook.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-measured-request.d.ts.map +1 -1
- package/dist/hooks/magic-context/lkg-replay-fit.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/hooks/magic-context/rust-mode-transform.d.ts.map +1 -1
- package/dist/hooks/magic-context/signed-thinking-fit-snapshot.d.ts +42 -0
- package/dist/hooks/magic-context/signed-thinking-fit-snapshot.d.ts.map +1 -0
- package/dist/hooks/magic-context/transform.d.ts.map +1 -1
- package/dist/{index-y76rhsnr.js → index-0s8454t2.js} +50 -31
- package/dist/{index-1gtfne2c.js → index-2haxh8h3.js} +1 -1
- package/dist/{index-m32esgmj.js → index-3d5wnkq7.js} +1 -1
- package/dist/{index-jfem3dgz.js → index-7tdtpqrg.js} +5 -1
- package/dist/{index-mnnkgq0q.js → index-awcftgmx.js} +7 -49
- package/dist/{index-1kbznkft.js → index-axjgxeww.js} +10 -8
- package/dist/{index-j32jj2t8.js → index-bhyksfyy.js} +3 -3
- package/dist/{index-ksq50rg0.js → index-c9zrgcnt.js} +1 -1
- package/dist/index-cfaet9cg.js +405 -0
- package/dist/{index-jmq8kfe7.js → index-ebsvmc5s.js} +4 -4
- package/dist/{index-66eby7hx.js → index-jcr6pe7z.js} +1 -1
- package/dist/{index-syaazvy2.js → index-n18sch77.js} +5 -5
- package/dist/{index-a9zvn5fe.js → index-q7ywt6xt.js} +3 -3
- package/dist/{index-x6cbrv9h.js → index-szf8r0ba.js} +1 -1
- package/dist/{index-rxqr723x.js → index-t6j3qxnd.js} +1 -1
- package/dist/{index-11gzxvf4.js → index-y6xpzjzr.js} +98 -48
- package/dist/{index-mnhcdfxg.js → index-yrrsp47d.js} +91 -17
- package/dist/{index-zy67whjr.js → index-z05n7702.js} +1 -1
- package/dist/{index-3svaejkh.js → index-z928hmnp.js} +1 -1
- package/dist/{index-ffzhwfzy.js → index-zzrzjnx5.js} +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +43 -38
- package/dist/{message-fts-rowid-map-e79b7b6x.js → message-fts-rowid-map-9e1getgs.js} +2 -2
- package/dist/{message-index-4q8ek2fc.js → message-index-3g966xn7.js} +7 -7
- package/dist/{message-index-bounded-rydsg9r5.js → message-index-bounded-vaeqhp9w.js} +7 -7
- package/dist/migration-worker.js +4 -4
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- 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-z5gnc0zb.js} +4 -4
- package/dist/{read-session-raw-aw6jgvwg.js → read-session-raw-s4amywnh.js} +3 -1
- package/dist/{recomp-orchestrator-hbm53jj5.js → recomp-orchestrator-qwqeskhq.js} +14 -14
- package/dist/{search-hea079d7.js → search-84zfqeky.js} +11 -11
- package/dist/{search-archive-weh164mh.js → search-archive-mfabzyn2.js} +5 -5
- 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-hr1ntmjj.js} +14 -14
- package/dist/v2/auto-search-worker.js +4 -4
- package/dist/v2/chunk-embedding-write-worker.js +5 -5
- package/dist/v2/{compartment-chunk-embedding-8jjmcgeg.js → compartment-chunk-embedding-tk6g4q80.js} +3 -3
- package/dist/v2/{context-ea3x7smm.js → context-y7wfvdve.js} +106 -50
- package/dist/v2/{embedding-backfill-5e74ae0m.js → embedding-backfill-w5qp7t28.js} +5 -5
- package/dist/v2/hooks/context.d.ts +4 -0
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/{message-fts-rowid-map-n8fdg2ja.js → message-fts-rowid-map-pqk3a55v.js} +2 -2
- package/dist/v2/{message-index-bounded-8rcd7qq9.js → message-index-bounded-te303atj.js} +6 -6
- package/dist/v2/{message-index-qz9wdp82.js → message-index-fz6b4jeh.js} +6 -6
- package/dist/v2/migration-worker.js +4 -4
- 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-knvkq1hf.js} +3 -3
- package/dist/v2/{read-session-raw-b70cpwzj.js → read-session-raw-ppjxnqk4.js} +3 -1
- package/dist/v2/{recomp-orchestrator-b12zaptj.js → recomp-orchestrator-e8a4jpvr.js} +11 -11
- package/dist/v2/{search-archive-x64rtz1z.js → search-archive-vrwgxv6z.js} +4 -4
- package/dist/v2/{search-hza9x72a.js → search-hav4dggf.js} +10 -10
- package/dist/v2/{send-session-notification-8eqe259v.js → send-session-notification-f8scq6ae.js} +1 -1
- package/dist/v2/{server-m4bfaevz.js → server-5brp2rfn.js} +90 -16
- package/dist/v2/{server-ppcd1qxh.js → server-6a8pxpxg.js} +7 -49
- package/dist/v2/server-7d6m1p2b.js +361 -0
- package/dist/v2/{server-zg5y109h.js → server-7weh65vd.js} +45 -27
- package/dist/v2/{server-qteg2kt9.js → server-8j2e7t31.js} +1 -1
- package/dist/v2/{server-d48x3m4x.js → server-9xbbaekh.js} +1 -1
- package/dist/v2/{server-j8h7bsca.js → server-e75vag9d.js} +3 -3
- package/dist/v2/{server-132h8twc.js → server-m6yyn961.js} +2 -2
- 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-4kjmrjn4.js → server-swvhxhxz.js} +5 -1
- package/dist/v2/{server-33nqbqkw.js → server-tfawsj08.js} +5 -5
- package/dist/v2/{server-dtp8hcjh.js → server-wxrdher8.js} +1 -1
- package/dist/v2/server.js +5 -5
- package/dist/v2/{wrapup-orchestrator-3ssd5yy1.js → wrapup-orchestrator-ycs8y6n4.js} +11 -11
- package/dist/{wrapup-orchestrator-5vpcd1zx.js → wrapup-orchestrator-f642w8n3.js} +15 -15
- 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/dist/index-j76ah6d7.js +0 -120
- package/dist/v2/server-d1dzgvwd.js +0 -120
- package/src/config/latch-permanence-guard.test.ts +0 -258
|
@@ -286,7 +286,7 @@ import {
|
|
|
286
286
|
startCompartmentAgent,
|
|
287
287
|
setRecompStarting2,
|
|
288
288
|
setRecompTerminal2
|
|
289
|
-
} from "./server-
|
|
289
|
+
} from "./server-7weh65vd.js";
|
|
290
290
|
import {
|
|
291
291
|
resolveHistorianModel2
|
|
292
292
|
} from "./server-5kym00ag.js";
|
|
@@ -311,7 +311,7 @@ import {
|
|
|
311
311
|
openDatabaseAsync,
|
|
312
312
|
isDatabasePersisted,
|
|
313
313
|
getDatabasePersistenceError
|
|
314
|
-
} from "./server-
|
|
314
|
+
} from "./server-e75vag9d.js";
|
|
315
315
|
import {
|
|
316
316
|
pruneMissingProjectIdentities,
|
|
317
317
|
setHomeProjectPermission,
|
|
@@ -337,7 +337,6 @@ import {
|
|
|
337
337
|
inspectProcessesAsync
|
|
338
338
|
} from "./server-k3t06fxr.js";
|
|
339
339
|
import {
|
|
340
|
-
BoundedSessionMap,
|
|
341
340
|
LkgRecoveryFenceError,
|
|
342
341
|
lkgServedArrayDigest,
|
|
343
342
|
takeLkgRecoveryLockSweepPage,
|
|
@@ -362,7 +361,7 @@ import {
|
|
|
362
361
|
clearIndexedMessages2,
|
|
363
362
|
indexMessagesAfterOrdinal2,
|
|
364
363
|
sweepOrphanedOpenCodeMessageIndexesCooperatively2
|
|
365
|
-
} from "./server-
|
|
364
|
+
} from "./server-6a8pxpxg.js";
|
|
366
365
|
import"./server-51779zs2.js";
|
|
367
366
|
import {
|
|
368
367
|
inRootAsyncContext2,
|
|
@@ -382,12 +381,13 @@ import {
|
|
|
382
381
|
createWorkerShutdown
|
|
383
382
|
} from "./server-cpjk5jd2.js";
|
|
384
383
|
import {
|
|
384
|
+
areRustHistorianSyntheticParts2,
|
|
385
385
|
isRawCompactionSummaryInfo2,
|
|
386
386
|
extractInMemoryMessageViews2,
|
|
387
387
|
buildInMemoryTailRawMessages2,
|
|
388
388
|
RawOrdinalsNotReady2,
|
|
389
389
|
runSessionWarmupWorker
|
|
390
|
-
} from "./server-
|
|
390
|
+
} from "./server-swvhxhxz.js";
|
|
391
391
|
import {
|
|
392
392
|
resolveOpenCodeDbPath,
|
|
393
393
|
assertOpenCodeStoreGeneration,
|
|
@@ -520,6 +520,7 @@ import {
|
|
|
520
520
|
} from "./server-3vhxy2k5.js";
|
|
521
521
|
import {
|
|
522
522
|
expandToolPart,
|
|
523
|
+
askAnswerLines,
|
|
523
524
|
markHostUnservedRow,
|
|
524
525
|
markCoveredInstructionRow,
|
|
525
526
|
isCoveredInstructionRow,
|
|
@@ -715,13 +716,14 @@ import {
|
|
|
715
716
|
readRawSessionMessageById2,
|
|
716
717
|
readSessionChunk2,
|
|
717
718
|
readRawSessionSeedTail2
|
|
718
|
-
} from "./server-
|
|
719
|
+
} from "./server-5brp2rfn.js";
|
|
719
720
|
import {
|
|
721
|
+
BoundedSessionMap,
|
|
722
|
+
recordToolDefinitionSet,
|
|
720
723
|
getCurrentToolSetHash,
|
|
721
|
-
recordToolDefinition,
|
|
722
724
|
getMeasuredToolDefinitionTokens
|
|
723
|
-
} from "./server-
|
|
724
|
-
import"./server-
|
|
725
|
+
} from "./server-7d6m1p2b.js";
|
|
726
|
+
import"./server-wxrdher8.js";
|
|
725
727
|
import {
|
|
726
728
|
SubcClient,
|
|
727
729
|
connectionFileExists,
|
|
@@ -732,7 +734,7 @@ import {
|
|
|
732
734
|
} from "./server-ab1g0wn9.js";
|
|
733
735
|
import {
|
|
734
736
|
deleteChunkEmbedBackoffForSession2
|
|
735
|
-
} from "./server-
|
|
737
|
+
} from "./server-pw21ypwb.js";
|
|
736
738
|
import {
|
|
737
739
|
embedPauseBySession,
|
|
738
740
|
embedRunStateBySession,
|
|
@@ -762,7 +764,7 @@ import {
|
|
|
762
764
|
embedSessionCompartmentChunks2,
|
|
763
765
|
getEmbeddingCoverageStatus2,
|
|
764
766
|
getAutoEmbeddingSessionCoverage2
|
|
765
|
-
} from "./server-
|
|
767
|
+
} from "./server-q5z0gag0.js";
|
|
766
768
|
import {
|
|
767
769
|
V2_MEMORY_CATEGORIES,
|
|
768
770
|
CATEGORY_PRIORITY
|
|
@@ -821,7 +823,7 @@ import {
|
|
|
821
823
|
readGitFileChangeTimesSince,
|
|
822
824
|
verificationFileExists,
|
|
823
825
|
normalizeVerificationFiles
|
|
824
|
-
} from "./server-
|
|
826
|
+
} from "./server-9xbbaekh.js";
|
|
825
827
|
import {
|
|
826
828
|
deriveTriggerBudget2,
|
|
827
829
|
deriveHistorianChunkTokens2,
|
|
@@ -855,7 +857,7 @@ import {
|
|
|
855
857
|
} from "./server-vr4szghm.js";
|
|
856
858
|
import {
|
|
857
859
|
cosineSimilarity
|
|
858
|
-
} from "./server-
|
|
860
|
+
} from "./server-8j2e7t31.js";
|
|
859
861
|
import {
|
|
860
862
|
computeCueContentHash,
|
|
861
863
|
hasMuralCueColumns,
|
|
@@ -912,14 +914,14 @@ import {
|
|
|
912
914
|
resolveMemoriesByIdsForSearch2,
|
|
913
915
|
unifiedSearch2,
|
|
914
916
|
formatSearchResults2
|
|
915
|
-
} from "./server-
|
|
917
|
+
} from "./server-tfawsj08.js";
|
|
916
918
|
import {
|
|
917
919
|
resolvePromptContext2
|
|
918
920
|
} from "./server-fmsr7v69.js";
|
|
919
921
|
import"./server-kaqs6h31.js";
|
|
920
922
|
import {
|
|
921
923
|
renderSearchArchiveOffThread2
|
|
922
|
-
} from "./server-
|
|
924
|
+
} from "./server-m6yyn961.js";
|
|
923
925
|
import {
|
|
924
926
|
compareSemverCore
|
|
925
927
|
} from "./server-84w6rvvf.js";
|
|
@@ -7446,7 +7448,8 @@ function measureLkgReplayRequest(args) {
|
|
|
7446
7448
|
systemPromptTokens: args.systemPromptTokens,
|
|
7447
7449
|
providerID: args.model?.providerID,
|
|
7448
7450
|
modelID: args.model?.modelID,
|
|
7449
|
-
agentName: args.agentName
|
|
7451
|
+
agentName: args.agentName,
|
|
7452
|
+
sessionId: args.sessionId
|
|
7450
7453
|
})
|
|
7451
7454
|
});
|
|
7452
7455
|
}
|
|
@@ -13937,8 +13940,7 @@ function encodeOpenCodeMessagesToCk(messages) {
|
|
|
13937
13940
|
const createdAtMs = typeof time.created === "number" ? time.created : typeof info.time_created === "number" ? info.time_created : typeof info.timeCreated === "number" ? info.timeCreated : undefined;
|
|
13938
13941
|
const completedAtMs = typeof time.completed === "number" ? time.completed : typeof info.time_completed === "number" ? info.time_completed : typeof info.timeCompleted === "number" ? info.timeCompleted : undefined;
|
|
13939
13942
|
const parts = Array.isArray(raw.parts) ? raw.parts : [];
|
|
13940
|
-
const
|
|
13941
|
-
const synthetic = syntheticParts.length > 0 && syntheticParts.every((part) => part !== null && typeof part === "object" && (part.synthetic === true || part.syntheticTodoMarker === true));
|
|
13943
|
+
const synthetic = areRustHistorianSyntheticParts2(parts);
|
|
13942
13944
|
const content = [];
|
|
13943
13945
|
const recoveryToolTitles = {};
|
|
13944
13946
|
const userAnswerBlocks = [];
|
|
@@ -16919,7 +16921,8 @@ function createRustModeTransform(deps, options) {
|
|
|
16919
16921
|
systemPromptTokens: sessionMeta.systemPromptTokens,
|
|
16920
16922
|
providerID: model?.providerID,
|
|
16921
16923
|
modelID: model?.modelID,
|
|
16922
|
-
agentName: deps.getNotificationParams?.(sessionId)?.agent
|
|
16924
|
+
agentName: deps.getNotificationParams?.(sessionId)?.agent,
|
|
16925
|
+
sessionId
|
|
16923
16926
|
})
|
|
16924
16927
|
});
|
|
16925
16928
|
if (measure.fit !== "under") {
|
|
@@ -17490,7 +17493,8 @@ function createRustModeTransform(deps, options) {
|
|
|
17490
17493
|
systemPromptTokens: sessionMeta.systemPromptTokens,
|
|
17491
17494
|
providerID: model?.providerID,
|
|
17492
17495
|
modelID: model?.modelID,
|
|
17493
|
-
agentName: deps.getNotificationParams?.(sessionId)?.agent
|
|
17496
|
+
agentName: deps.getNotificationParams?.(sessionId)?.agent,
|
|
17497
|
+
sessionId
|
|
17494
17498
|
}) : undefined;
|
|
17495
17499
|
const renderIdentityFields = {
|
|
17496
17500
|
modelKey: modelKey ?? null,
|
|
@@ -18022,6 +18026,7 @@ function createRustModeTransform(deps, options) {
|
|
|
18022
18026
|
providerID: model?.providerID,
|
|
18023
18027
|
modelID: model?.modelID,
|
|
18024
18028
|
agentName: deps.getNotificationParams?.(sessionId)?.agent,
|
|
18029
|
+
sessionId,
|
|
18025
18030
|
systemPromptHash: sessionMeta.systemPromptHash
|
|
18026
18031
|
}, resolvedWindowGeometry?.usableHard ?? resolvedContextLimit);
|
|
18027
18032
|
const refusal = outgoingContextRefusal(servedFinalWireEstimate, resolvedWindowGeometry?.usableHard ?? resolvedContextLimit, protectedToolTokenCount(getActiveTagsBySession2(deps.db, sessionId), deps.protectedTools, resolveDecisionCalibration(model?.providerID, model?.modelID))) ?? (signedThinkingReset ? signedTurnContextRefusal(servedFinalWireEstimate, resolvedWindowGeometry?.usableHard ?? resolvedContextLimit) : undefined);
|
|
@@ -18257,6 +18262,7 @@ function createRustModeTransform(deps, options) {
|
|
|
18257
18262
|
providerID: model?.providerID,
|
|
18258
18263
|
modelID: model?.modelID,
|
|
18259
18264
|
agentName: deps.getNotificationParams?.(sessionId)?.agent,
|
|
18265
|
+
sessionId,
|
|
18260
18266
|
systemPromptHash: sessionMeta.systemPromptHash
|
|
18261
18267
|
});
|
|
18262
18268
|
captureOpencodeReasoningBudgetStatus(sessionId, output.messages, resolveKeepReasoningTokens(deps.keepReasoningTokens, modelKey ?? undefined), isPrefixBoundThinkingModel(model?.providerID, model?.modelID));
|
|
@@ -18520,6 +18526,27 @@ function createRustModeTransform(deps, options) {
|
|
|
18520
18526
|
return adapter;
|
|
18521
18527
|
}
|
|
18522
18528
|
|
|
18529
|
+
// src/hooks/magic-context/signed-thinking-fit-snapshot.ts
|
|
18530
|
+
function takeSignedThinkingFitSnapshot(args) {
|
|
18531
|
+
let snapshot = null;
|
|
18532
|
+
if (args.held && !args.compactionOff) {
|
|
18533
|
+
try {
|
|
18534
|
+
snapshot = cloneKeepingCoveredInstructionMarks(args.entryOrder);
|
|
18535
|
+
} catch (error) {
|
|
18536
|
+
sessionLog2(args.sessionId, `signed thinking fit: could not copy the pass input (${error instanceof Error ? error.message : String(error)}); an over-window held request will be refused rather than retried`);
|
|
18537
|
+
}
|
|
18538
|
+
}
|
|
18539
|
+
snapshotObserver?.({
|
|
18540
|
+
sessionId: args.sessionId,
|
|
18541
|
+
held: args.held,
|
|
18542
|
+
activeAnthropicThinkingTurn: args.activeAnthropicThinkingTurn,
|
|
18543
|
+
compactionOff: args.compactionOff,
|
|
18544
|
+
snapshot
|
|
18545
|
+
});
|
|
18546
|
+
return snapshot;
|
|
18547
|
+
}
|
|
18548
|
+
var snapshotObserver;
|
|
18549
|
+
|
|
18523
18550
|
// src/hooks/magic-context/signed-thinking-hold.ts
|
|
18524
18551
|
var HEAVY_REASONING_TOKENS = 1500;
|
|
18525
18552
|
var HEAVY_REASONING_WINDOW_STEPS = 15;
|
|
@@ -19131,7 +19158,7 @@ function createTransform(deps) {
|
|
|
19131
19158
|
const startTime = performance.now();
|
|
19132
19159
|
const historianRun = deps.resolveHistorianRun?.();
|
|
19133
19160
|
const messages = output.messages;
|
|
19134
|
-
const
|
|
19161
|
+
const entryOrderForThinkingFit = messages.slice();
|
|
19135
19162
|
const coveredHostInstructions = takeCoveredInstructionRows(messages);
|
|
19136
19163
|
const passOutcome = createPassOutcome();
|
|
19137
19164
|
const tSessionId = performance.now();
|
|
@@ -19485,7 +19512,8 @@ function createTransform(deps) {
|
|
|
19485
19512
|
systemPromptTokens: sessionMeta.systemPromptTokens,
|
|
19486
19513
|
providerID: modelForBudget?.providerID,
|
|
19487
19514
|
modelID: modelForBudget?.modelID,
|
|
19488
|
-
agentName: runNotificationParams(sessionId)?.agent
|
|
19515
|
+
agentName: runNotificationParams(sessionId)?.agent,
|
|
19516
|
+
sessionId
|
|
19489
19517
|
});
|
|
19490
19518
|
const incomingTokens = incoming.messageTokens.conversation + incoming.messageTokens.toolCall;
|
|
19491
19519
|
if (unmanagedOverWindowCarried || isClearlyOverWindow(incomingTokens, resolvedContextLimit)) {
|
|
@@ -19531,6 +19559,13 @@ function createTransform(deps) {
|
|
|
19531
19559
|
}) : null;
|
|
19532
19560
|
activeThinkingPrefixHold = signedThinkingPrefixBound && (compactionOff || signedThinkingHold?.held === true);
|
|
19533
19561
|
freezeM0M1 ||= activeThinkingPrefixHold;
|
|
19562
|
+
const originalForThinkingFit = takeSignedThinkingFitSnapshot({
|
|
19563
|
+
sessionId,
|
|
19564
|
+
entryOrder: entryOrderForThinkingFit,
|
|
19565
|
+
held: activeThinkingPrefixHold,
|
|
19566
|
+
activeAnthropicThinkingTurn: activeThinkingTurn,
|
|
19567
|
+
compactionOff
|
|
19568
|
+
});
|
|
19534
19569
|
const prefixHoldLogKey = signedThinkingHold ? `${currentTurnId}:${signedThinkingHold.reason}:${signedThinkingHold.heavyStepsBack ?? "none"}` : freezeM0M1 ? `${currentTurnId}:directory` : null;
|
|
19535
19570
|
if (prefixHoldLogKey !== null && prefixHoldLogTurnIds.get(sessionId) !== prefixHoldLogKey) {
|
|
19536
19571
|
prefixHoldLogTurnIds.set(sessionId, prefixHoldLogKey);
|
|
@@ -20022,7 +20057,8 @@ Historian previously failed ${historianFailureState.failureCount} time(s), so Ma
|
|
|
20022
20057
|
systemPromptTokens: sessionMeta.systemPromptTokens,
|
|
20023
20058
|
providerID: modelForBudget?.providerID,
|
|
20024
20059
|
modelID: modelForBudget?.modelID,
|
|
20025
|
-
agentName: notificationParams.agent
|
|
20060
|
+
agentName: notificationParams.agent,
|
|
20061
|
+
sessionId
|
|
20026
20062
|
});
|
|
20027
20063
|
} catch (error) {
|
|
20028
20064
|
sessionLog2(sessionId, `transform: wire-estimate pressure fallback unavailable: ${getErrorMessage(error)}`);
|
|
@@ -20190,6 +20226,7 @@ Historian previously failed ${historianFailureState.failureCount} time(s), so Ma
|
|
|
20190
20226
|
providerID: modelForBudget?.providerID,
|
|
20191
20227
|
modelID: modelForBudget?.modelID,
|
|
20192
20228
|
agentName: notificationParams.agent,
|
|
20229
|
+
sessionId,
|
|
20193
20230
|
systemPromptHash: sessionMeta.systemPromptHash
|
|
20194
20231
|
}, boundaryContextLimit);
|
|
20195
20232
|
} catch {
|
|
@@ -20204,13 +20241,15 @@ Historian previously failed ${historianFailureState.failureCount} time(s), so Ma
|
|
|
20204
20241
|
providerID: modelForBudget?.providerID,
|
|
20205
20242
|
modelID: modelForBudget?.modelID,
|
|
20206
20243
|
agentName: notificationParams.agent,
|
|
20244
|
+
sessionId,
|
|
20207
20245
|
systemPromptHash: sessionMeta.systemPromptHash
|
|
20208
20246
|
}, boundaryContextLimit) : undefined);
|
|
20209
20247
|
if (finalWireEstimate) {
|
|
20210
20248
|
sessionLog2(sessionId, `transform: final-wire telemetry estimate=${finalWireEstimate.tokens} trusted=${finalWireEstimate.trusted} conversation=${finalWireEstimate.messageTokens.conversation} tools=${finalWireEstimate.messageTokens.toolCall} system=${finalWireEstimate.systemTokens} toolDefinitions=${finalWireEstimate.toolDefinitionTokens ?? "unknown"} tail=${finalWireTail}`);
|
|
20211
20249
|
}
|
|
20212
20250
|
if ((finalWireEstimate?.refusalGrade || finalWireEstimate?.refusalBasis === "byte-bound" && finalWireEstimate.refusalTokens !== undefined) && boundaryContextLimit > 0 && (finalWireEstimate.refusalTokens ?? finalWireEstimate.tokens) > boundaryContextLimit) {
|
|
20213
|
-
|
|
20251
|
+
const signedFitRetryWanted = !thinkingFitRetries.has(sessionId) && activeThinkingPrefixHold && hasActiveAnthropicThinkingTurn(messages, resolvedProviderID, modelForBudget?.modelID);
|
|
20252
|
+
if (signedFitRetryWanted && originalForThinkingFit) {
|
|
20214
20253
|
thinkingFitRetries.add(sessionId);
|
|
20215
20254
|
requestPendingMaterialization(deps.pendingMaterializationSessions, sessionId, "fit_retry");
|
|
20216
20255
|
messages.splice(0, messages.length, ...originalForThinkingFit);
|
|
@@ -20221,7 +20260,10 @@ Historian previously failed ${historianFailureState.failureCount} time(s), so Ma
|
|
|
20221
20260
|
}
|
|
20222
20261
|
return;
|
|
20223
20262
|
}
|
|
20224
|
-
if (
|
|
20263
|
+
if (signedFitRetryWanted) {
|
|
20264
|
+
sessionLog2(sessionId, "signed thinking fit: the held request is over the window and no copy of the pass input exists to retry from; refusing it");
|
|
20265
|
+
}
|
|
20266
|
+
if (signedFitRetryWanted || thinkingFitRetries.has(sessionId) || postTransformResult.thinkingReleasedForFit || signedFitPreviouslyRefused) {
|
|
20225
20267
|
if (!signedFitPreviouslyRefused && !addMergedReasoningStrippedIds(db, sessionId, [SIGNED_FIT_REFUSED_MARKER]))
|
|
20226
20268
|
throw contextRefusalError("Cannot persist the signed-fit refusal");
|
|
20227
20269
|
throw contextRefusalError("The request remains over the model window after stripping signed thinking and reclaiming context");
|
|
@@ -20233,7 +20275,8 @@ Historian previously failed ${historianFailureState.failureCount} time(s), so Ma
|
|
|
20233
20275
|
systemPromptTokens: sessionMeta.systemPromptTokens,
|
|
20234
20276
|
providerID: modelForBudget?.providerID,
|
|
20235
20277
|
modelID: modelForBudget?.modelID,
|
|
20236
|
-
agentName: notificationParams.agent
|
|
20278
|
+
agentName: notificationParams.agent,
|
|
20279
|
+
sessionId
|
|
20237
20280
|
});
|
|
20238
20281
|
if (untrimmed.tokens > boundaryContextLimit) {
|
|
20239
20282
|
sessionLog2(sessionId, `history boundary unresolved: prefix trim refused and the untrimmed request estimate ${untrimmed.tokens} (trusted=${untrimmed.trusted}) exceeds the context limit ${boundaryContextLimit}; not sending it`);
|
|
@@ -20246,7 +20289,8 @@ Historian previously failed ${historianFailureState.failureCount} time(s), so Ma
|
|
|
20246
20289
|
systemPromptTokens: sessionMeta.systemPromptTokens,
|
|
20247
20290
|
providerID: modelForBudget?.providerID,
|
|
20248
20291
|
modelID: modelForBudget?.modelID,
|
|
20249
|
-
agentName: notificationParams.agent
|
|
20292
|
+
agentName: notificationParams.agent,
|
|
20293
|
+
sessionId
|
|
20250
20294
|
});
|
|
20251
20295
|
const servedTokens = served.toolDefinitionsMeasured ? served.rawTokens ?? served.tokens : Math.max(0, sessionMeta.systemPromptTokens) + served.messageTokens.conversation + served.messageTokens.toolCall;
|
|
20252
20296
|
if (!Number.isFinite(servedTokens) || servedTokens > unmanagedOverWindowPass.limit) {
|
|
@@ -20324,7 +20368,8 @@ Historian previously failed ${historianFailureState.failureCount} time(s), so Ma
|
|
|
20324
20368
|
systemPromptTokens: sessionMeta.systemPromptTokens,
|
|
20325
20369
|
providerID: modelForBudget?.providerID,
|
|
20326
20370
|
modelID: modelForBudget?.modelID,
|
|
20327
|
-
agentName: notificationParams.agent
|
|
20371
|
+
agentName: notificationParams.agent,
|
|
20372
|
+
sessionId
|
|
20328
20373
|
});
|
|
20329
20374
|
} catch (error) {
|
|
20330
20375
|
sessionLog2(sessionId, "degraded pass size guard could not estimate:", error);
|
|
@@ -20540,6 +20585,7 @@ Historian previously failed ${historianFailureState.failureCount} time(s), so Ma
|
|
|
20540
20585
|
providerID: modelForBudget?.providerID,
|
|
20541
20586
|
modelID: modelForBudget?.modelID,
|
|
20542
20587
|
agentName: notificationParams.agent,
|
|
20588
|
+
sessionId,
|
|
20543
20589
|
systemPromptHash: sessionMeta.systemPromptHash
|
|
20544
20590
|
});
|
|
20545
20591
|
};
|
|
@@ -23065,7 +23111,7 @@ function buildSidebarSnapshot(db, sessionId, directory, liveSessionState, inject
|
|
|
23065
23111
|
if (model) {
|
|
23066
23112
|
activeProviderID = model.providerID;
|
|
23067
23113
|
activeModelID = model.modelID;
|
|
23068
|
-
measuredToolDefTokens = getMeasuredToolDefinitionTokens(model.providerID, model.modelID, agent) ?? 0;
|
|
23114
|
+
measuredToolDefTokens = getMeasuredToolDefinitionTokens(model.providerID, model.modelID, agent, sessionId) ?? 0;
|
|
23069
23115
|
}
|
|
23070
23116
|
}
|
|
23071
23117
|
const contextLimit = typeof moduleContextLimit === "number" && moduleContextLimit > 0 ? moduleContextLimit : activeProviderID && activeModelID ? resolveContextLimit(activeProviderID, activeModelID, {
|
|
@@ -23779,8 +23825,8 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
23779
23825
|
const db = readDatabase();
|
|
23780
23826
|
if (!db)
|
|
23781
23827
|
return { ok: false, error: "db unavailable" };
|
|
23782
|
-
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-
|
|
23783
|
-
const { sendIgnoredMessage } = await importPluginModule(() => import("./send-session-notification-
|
|
23828
|
+
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-e8a4jpvr.js"));
|
|
23829
|
+
const { sendIgnoredMessage } = await importPluginModule(() => import("./send-session-notification-f8scq6ae.js"));
|
|
23784
23830
|
log2(`[rpc] recomp requested for session ${sessionId}`);
|
|
23785
23831
|
if (!args.client && !args.hiddenCompletionExecutor) {
|
|
23786
23832
|
return {
|
|
@@ -23864,7 +23910,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
23864
23910
|
const db = readDatabase();
|
|
23865
23911
|
if (!db)
|
|
23866
23912
|
return { ok: false, error: "db unavailable" };
|
|
23867
|
-
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-
|
|
23913
|
+
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-ycs8y6n4.js"));
|
|
23868
23914
|
const model = liveSessionState.liveModelBySession.get(sessionId);
|
|
23869
23915
|
const contextLimit = model ? resolveContextLimit(model.providerID, model.modelID, { db, sessionID: sessionId }) : 128000;
|
|
23870
23916
|
const ctx = {
|
|
@@ -24608,18 +24654,18 @@ var FULL_PARAMETER_DESCRIPTIONS = {
|
|
|
24608
24654
|
message: "Message ordinal from a <session-history> heading or a ctx_search hit, not a tag number. Returns that one message in full. Use alone."
|
|
24609
24655
|
},
|
|
24610
24656
|
ctx_note: {
|
|
24611
|
-
action: "write | read | update | dismiss.
|
|
24657
|
+
action: "write | read | update | dismiss.",
|
|
24612
24658
|
content: "Note text for write/update: first line is the title (under 80 chars), then the detail.",
|
|
24613
24659
|
surface_condition: "Makes this a smart note: a condition an outside checker can verify on its own, periodically — repository state, releases, web pages, anything it can look up — never something only this conversation knows. The note is parked until the condition holds.",
|
|
24614
24660
|
filter: "Read filter: all, active, pending (unsurfaced smart notes), ready, dismissed. Omitted, it shows active session notes plus every current smart note (pending included); active shows only notes whose stored status is active.",
|
|
24615
24661
|
limit: "Rows per read (default 25).",
|
|
24616
24662
|
offset: "Skip this many newest rows (default 0).",
|
|
24617
|
-
note_ids: "Note ids: one for update, 1–50 for dismiss or
|
|
24663
|
+
note_ids: "Note ids: one for update, 1–50 for dismiss, or 1–50 to read those notes in full. Write and a plain read take an empty list."
|
|
24618
24664
|
},
|
|
24619
24665
|
ctx_memory: {
|
|
24620
24666
|
action: "write | update | archive | merge | get",
|
|
24621
24667
|
content: "The memory text — one standalone fact (write, update, merge).",
|
|
24622
|
-
category: "Kind of fact (required for write; on update/merge
|
|
24668
|
+
category: "Kind of fact (required for write; on update/merge, pass the memory's current category to keep it).",
|
|
24623
24669
|
ids: "Memory ids from <project-memory>: one for update, one or more for archive, two or more for merge, 1–20 for get.",
|
|
24624
24670
|
reason: "Why it is being archived (optional)."
|
|
24625
24671
|
},
|
|
@@ -24643,18 +24689,18 @@ var LIGHT_PARAMETER_DESCRIPTIONS = {
|
|
|
24643
24689
|
message: "Message ordinal from a <session-history> heading or a ctx_search hit, not a tag number. Returns that one message in full. Use alone."
|
|
24644
24690
|
},
|
|
24645
24691
|
ctx_note: {
|
|
24646
|
-
action: "write | read | update | dismiss
|
|
24692
|
+
action: "write | read | update | dismiss.",
|
|
24647
24693
|
content: "Note text: first line title (<80 chars), then detail.",
|
|
24648
24694
|
surface_condition: "A condition an outside checker can verify on its own, periodically (repository, releases, web — anything it can look up); never something only this conversation knows.",
|
|
24649
24695
|
filter: "Read filter: all, active, pending, ready, dismissed. Omitted: active notes plus every current smart note (pending included); active: only active-status notes.",
|
|
24650
24696
|
limit: "Rows per read (default 25).",
|
|
24651
24697
|
offset: "Skip newest rows (default 0).",
|
|
24652
|
-
note_ids: "One id for update, 1–50 for dismiss or read
|
|
24698
|
+
note_ids: "One id for update, 1–50 for dismiss, or 1–50 to read those notes in full. Write and a plain read take an empty list."
|
|
24653
24699
|
},
|
|
24654
24700
|
ctx_memory: {
|
|
24655
24701
|
action: "write | update | archive | merge | get",
|
|
24656
24702
|
content: "One standalone fact (write, update, merge).",
|
|
24657
|
-
category: "Kind of fact (required for write;
|
|
24703
|
+
category: "Kind of fact (required for write; on update/merge pass the current category to keep it).",
|
|
24658
24704
|
ids: "Ids from <project-memory>: one for update, 1+ for archive, 2+ for merge, 1–20 for get.",
|
|
24659
24705
|
reason: "Why it is archived (optional)."
|
|
24660
24706
|
},
|
|
@@ -32610,7 +32656,10 @@ function orientationRenderer(capTokens) {
|
|
|
32610
32656
|
sawMessage = true;
|
|
32611
32657
|
const out = [];
|
|
32612
32658
|
if (msg.role === "user" && hasMeaningfulUserText2(msg.parts)) {
|
|
32613
|
-
const
|
|
32659
|
+
const rawTexts = extractTexts2(msg.parts);
|
|
32660
|
+
const parts = rawTexts.map((t) => cleanUserText2(t)).map(normalizeText).filter((t) => t.length > 0);
|
|
32661
|
+
parts.push(...rawTexts.flatMap((t) => askAnswerLines(t)).map(normalizeText));
|
|
32662
|
+
const text = parts.filter((t) => t.length > 0).join(" / ");
|
|
32614
32663
|
if (text)
|
|
32615
32664
|
out.push(`U: ${text}`);
|
|
32616
32665
|
}
|
|
@@ -50841,10 +50890,10 @@ function updateMemoryContentInCurrentTransaction(db, memory, content, normalized
|
|
|
50841
50890
|
invalidateMemory2(memory.projectPath, memory.id);
|
|
50842
50891
|
}
|
|
50843
50892
|
var ctxMemoryArgsShape = {
|
|
50844
|
-
action: tool.schema.enum([...CTX_MEMORY_ACTIONS]).
|
|
50845
|
-
content: tool.schema.string().
|
|
50846
|
-
category: tool.schema.enum([...V2_MEMORY_CATEGORIES]).
|
|
50847
|
-
ids: tool.schema.array(tool.schema.number()).
|
|
50893
|
+
action: tool.schema.enum([...CTX_MEMORY_ACTIONS]).describe("write | update | archive | merge | get"),
|
|
50894
|
+
content: tool.schema.string().describe("The memory text — one standalone fact (write, update, merge)."),
|
|
50895
|
+
category: tool.schema.enum([...V2_MEMORY_CATEGORIES]).describe("Kind of fact (required for write; on update/merge, pass the memory's current category to keep it)."),
|
|
50896
|
+
ids: tool.schema.array(tool.schema.number()).describe("Memory ids from <project-memory>: one for update, one or more for archive, two or more for merge, 1–20 for get."),
|
|
50848
50897
|
reason: tool.schema.string().optional().describe("Why it is being archived (optional).")
|
|
50849
50898
|
};
|
|
50850
50899
|
var ctxMemoryListArgsShape = {
|
|
@@ -51799,13 +51848,13 @@ function writeTray(db, sessionId) {
|
|
|
51799
51848
|
return { activeCount: active.length, oldestTouchedAt: oldest };
|
|
51800
51849
|
}
|
|
51801
51850
|
var ctxNoteArgsShape = {
|
|
51802
|
-
action: tool.schema.enum(["write", "read", "dismiss", "update"]).
|
|
51803
|
-
content: tool.schema.string().
|
|
51851
|
+
action: tool.schema.enum(["write", "read", "dismiss", "update"]).describe("write | read | update | dismiss."),
|
|
51852
|
+
content: tool.schema.string().describe("Note text for write/update: first line is the title (under 80 chars), then the detail."),
|
|
51804
51853
|
surface_condition: tool.schema.string().optional().describe("Makes this a smart note: a condition an outside checker can verify on its own, periodically — repository state, releases, web pages, anything it can look up — never something only this conversation knows. The note is parked until the condition holds."),
|
|
51805
51854
|
filter: tool.schema.enum(["all", "active", "pending", "ready", "dismissed"]).optional().describe("Read filter: all, active, pending (unsurfaced smart notes), ready, dismissed. Omitted, it shows active session notes plus every current smart note (pending included); active shows only notes whose stored status is active."),
|
|
51806
51855
|
limit: tool.schema.number().optional().describe("Rows per read (default 25)."),
|
|
51807
51856
|
offset: tool.schema.number().optional().describe("Skip this many newest rows (default 0)."),
|
|
51808
|
-
note_ids: tool.schema.array(tool.schema.number().int().min(1)).
|
|
51857
|
+
note_ids: tool.schema.array(tool.schema.number().int().min(1)).max(50).describe("Note ids: one for update, 1–50 for dismiss, or 1–50 to read those notes in full. Write and a plain read take an empty list.")
|
|
51809
51858
|
};
|
|
51810
51859
|
var ctxNoteArgsSchema = tool.schema.object(ctxNoteArgsShape).passthrough();
|
|
51811
51860
|
function formatDismissResults(results) {
|
|
@@ -51853,7 +51902,8 @@ function createCtxNoteTool(deps) {
|
|
|
51853
51902
|
}
|
|
51854
51903
|
const sessionId = toolContext.sessionID;
|
|
51855
51904
|
const action = args.action ?? (args.content?.trim() ? "write" : "read");
|
|
51856
|
-
const
|
|
51905
|
+
const targetedReadIds = action === "read" && Array.isArray(args.note_ids) && args.note_ids.length === 0 ? undefined : args.note_ids;
|
|
51906
|
+
const noteIds = action === "dismiss" || action === "update" || action === "read" && targetedReadIds !== undefined ? parseNoteIds(action, targetedReadIds) : undefined;
|
|
51857
51907
|
if (typeof noteIds === "string")
|
|
51858
51908
|
return noteIds;
|
|
51859
51909
|
const wakePlaneActive = action === "write" && Boolean(args.surface_condition?.trim()) && await wakePlaneStatus() === "present";
|
|
@@ -52898,12 +52948,18 @@ function applyV2PromptSurfaceTools(draft, runtime, config, smartNotesEnabled = t
|
|
|
52898
52948
|
function recordV2ToolDefinitions(draft) {
|
|
52899
52949
|
if (!draft.tools)
|
|
52900
52950
|
return;
|
|
52951
|
+
const tools = [];
|
|
52901
52952
|
for (const [id, tool] of Object.entries(draft.tools)) {
|
|
52902
52953
|
if (!tool)
|
|
52903
52954
|
continue;
|
|
52904
52955
|
recordToolParameters(id, tool.input);
|
|
52905
|
-
|
|
52956
|
+
tools.push({
|
|
52957
|
+
id,
|
|
52958
|
+
description: typeof tool.description === "string" ? tool.description : "",
|
|
52959
|
+
parameters: tool.input
|
|
52960
|
+
});
|
|
52906
52961
|
}
|
|
52962
|
+
recordToolDefinitionSet(draft.model.providerID, draft.model.id, draft.agent, tools, draft.sessionID);
|
|
52907
52963
|
}
|
|
52908
52964
|
async function applyV2SystemPrompt(systemPrompt, draft) {
|
|
52909
52965
|
resolveCtxReduceAvailabilityFromMessages(draft.sessionID, draft.messages.map((message) => ({
|
|
@@ -53556,7 +53612,7 @@ async function registerContext(context) {
|
|
|
53556
53612
|
projectDirectory: directory,
|
|
53557
53613
|
hardSignals: {
|
|
53558
53614
|
systemHash: state.systemPromptHash ?? "",
|
|
53559
|
-
toolSetHash: getCurrentToolSetHash(draft.model.providerID, draft.model.id, draft.agent),
|
|
53615
|
+
toolSetHash: getCurrentToolSetHash(draft.model.providerID, draft.model.id, draft.agent, draft.sessionID),
|
|
53560
53616
|
modelKey: `${draft.model.providerID}/${draft.model.id}`,
|
|
53561
53617
|
cacheExpired: false,
|
|
53562
53618
|
lastResponseTime: state.lastResponseTime
|
|
@@ -53944,7 +54000,7 @@ async function registerContext(context) {
|
|
|
53944
54000
|
const model = liveModels.get(sessionId);
|
|
53945
54001
|
if (!model)
|
|
53946
54002
|
return "";
|
|
53947
|
-
return getCurrentToolSetHash(model.providerID, model.modelID, agents.get(sessionId));
|
|
54003
|
+
return getCurrentToolSetHash(model.providerID, model.modelID, agents.get(sessionId), sessionId);
|
|
53948
54004
|
},
|
|
53949
54005
|
channel1StateBySession: channel1,
|
|
53950
54006
|
historyRefreshSessions,
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureMemoryEmbeddings2
|
|
3
|
-
} from "./server-
|
|
4
|
-
import"./server-
|
|
3
|
+
} from "./server-8j2e7t31.js";
|
|
4
|
+
import"./server-q5z0gag0.js";
|
|
5
5
|
import"./server-4dhv7mqz.js";
|
|
6
6
|
import"./server-qt1qqasc.js";
|
|
7
7
|
import"./server-vr4szghm.js";
|
|
8
8
|
import"./server-24g8r2d0.js";
|
|
9
9
|
import"./server-bsgd4dk1.js";
|
|
10
|
-
import"./server-
|
|
10
|
+
import"./server-pw21ypwb.js";
|
|
11
11
|
import"./server-ab1g0wn9.js";
|
|
12
12
|
import"./server-qjvk4a9t.js";
|
|
13
|
-
import"./server-
|
|
14
|
-
import"./server-
|
|
13
|
+
import"./server-wxrdher8.js";
|
|
14
|
+
import"./server-swvhxhxz.js";
|
|
15
15
|
import"./server-51779zs2.js";
|
|
16
16
|
import"./server-gyy4k6mf.js";
|
|
17
17
|
import"./server-3mz2qh5a.js";
|
|
@@ -72,6 +72,10 @@ export declare function applyV2PromptSurfaceTools(draft: SessionContext, runtime
|
|
|
72
72
|
* the wire, and it is keyed by the same {provider, model, agent} triple the status and sidebar
|
|
73
73
|
* handlers look the measurement up by.
|
|
74
74
|
*
|
|
75
|
+
* The draft is the request's exact tool set, so it replaces the route's measured set and becomes
|
|
76
|
+
* this session's figure: a tool an earlier request carried, or another session's request carried,
|
|
77
|
+
* does not count toward this request's size.
|
|
78
|
+
*
|
|
75
79
|
* Measuring changes no served byte: the resulting tool-set hash is an attribution marker that the
|
|
76
80
|
* m[0] materialization decision records but never folds on.
|
|
77
81
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"context.d.ts","sourceRoot":"","sources":["../../../src/v2/hooks/context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAqExD,OAAO,EACH,KAAK,qBAAqB,EAE7B,MAAM,mDAAmD,CAAC;AA8B3D,OAAO,EAAE,6BAA6B,EAAE,MAAM,8CAA8C,CAAC;AAC7F,OAAO,EAAmB,KAAK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WAAW,GAAG,OAAO,GAAG,UAAU,GAAG,QAAQ,GAAG,OAAO,CAAC,GACrF,OAAO,CAAC,IAAI,CAAC,CAwCf;AAuBD,wBAAsB,eAAe,CAAC,OAAO,EAAE,SAAS;;eAgrEvD"}
|
|
@@ -6,8 +6,8 @@ import {
|
|
|
6
6
|
messageFtsOrdinalRangeIsMapped2,
|
|
7
7
|
getMessageFtsRowidMapBackfillProgress2,
|
|
8
8
|
deleteUnmappedMessageFtsRows2
|
|
9
|
-
} from "./server-
|
|
10
|
-
import"./server-
|
|
9
|
+
} from "./server-wxrdher8.js";
|
|
10
|
+
import"./server-swvhxhxz.js";
|
|
11
11
|
import"./server-51779zs2.js";
|
|
12
12
|
import"./server-gyy4k6mf.js";
|
|
13
13
|
import"./server-gzy5w8ya.js";
|
|
@@ -13,7 +13,7 @@ import {
|
|
|
13
13
|
markMessageIndexDirty2,
|
|
14
14
|
getIndexableContent2,
|
|
15
15
|
indexSingleMessage2
|
|
16
|
-
} from "./server-
|
|
16
|
+
} from "./server-6a8pxpxg.js";
|
|
17
17
|
import"./server-1zx87sdm.js";
|
|
18
18
|
import"./server-fa7vtp40.js";
|
|
19
19
|
import"./server-3mz2qh5a.js";
|
|
@@ -21,14 +21,14 @@ import"./server-rqebawx1.js";
|
|
|
21
21
|
import"./server-24g8r2d0.js";
|
|
22
22
|
import"./server-51779zs2.js";
|
|
23
23
|
import"./server-cpjk5jd2.js";
|
|
24
|
-
import"./server-
|
|
24
|
+
import"./server-swvhxhxz.js";
|
|
25
25
|
import"./server-2ra6pwf3.js";
|
|
26
26
|
import"./server-3vhxy2k5.js";
|
|
27
|
-
import"./server-
|
|
28
|
-
import"./server-
|
|
29
|
-
import"./server-
|
|
27
|
+
import"./server-5brp2rfn.js";
|
|
28
|
+
import"./server-7d6m1p2b.js";
|
|
29
|
+
import"./server-wxrdher8.js";
|
|
30
30
|
import"./server-ab1g0wn9.js";
|
|
31
|
-
import"./server-
|
|
31
|
+
import"./server-pw21ypwb.js";
|
|
32
32
|
import"./server-gyy4k6mf.js";
|
|
33
33
|
|
|
34
34
|
// src/features/magic-context/message-index-bounded.ts
|
|
@@ -17,20 +17,20 @@ import {
|
|
|
17
17
|
indexMessagesAfterOrdinal2,
|
|
18
18
|
indexSourcesAfterOrdinal2,
|
|
19
19
|
sweepOrphanedOpenCodeMessageIndexesCooperatively2
|
|
20
|
-
} from "./server-
|
|
21
|
-
import"./server-
|
|
20
|
+
} from "./server-6a8pxpxg.js";
|
|
21
|
+
import"./server-5brp2rfn.js";
|
|
22
22
|
import"./server-fa7vtp40.js";
|
|
23
23
|
import"./server-1zx87sdm.js";
|
|
24
24
|
import"./server-3vhxy2k5.js";
|
|
25
25
|
import"./server-24g8r2d0.js";
|
|
26
|
-
import"./server-
|
|
26
|
+
import"./server-pw21ypwb.js";
|
|
27
27
|
import"./server-ab1g0wn9.js";
|
|
28
|
-
import"./server-
|
|
28
|
+
import"./server-wxrdher8.js";
|
|
29
29
|
import"./server-k3t06fxr.js";
|
|
30
|
-
import"./server-
|
|
30
|
+
import"./server-7d6m1p2b.js";
|
|
31
31
|
import"./server-rqebawx1.js";
|
|
32
32
|
import"./server-2ra6pwf3.js";
|
|
33
|
-
import"./server-
|
|
33
|
+
import"./server-swvhxhxz.js";
|
|
34
34
|
import"./server-51779zs2.js";
|
|
35
35
|
import"./server-gyy4k6mf.js";
|
|
36
36
|
import"./server-3mz2qh5a.js";
|
|
@@ -18,13 +18,13 @@ import"./server-fb3zxn06.js";
|
|
|
18
18
|
import {
|
|
19
19
|
setSqlitePragmaConfig,
|
|
20
20
|
initializeDatabase
|
|
21
|
-
} from "./server-
|
|
21
|
+
} from "./server-e75vag9d.js";
|
|
22
22
|
import"./server-51779zs2.js";
|
|
23
23
|
import"./server-cpjk5jd2.js";
|
|
24
|
-
import"./server-
|
|
25
|
-
import"./server-
|
|
24
|
+
import"./server-swvhxhxz.js";
|
|
25
|
+
import"./server-wxrdher8.js";
|
|
26
26
|
import"./server-3mz2qh5a.js";
|
|
27
|
-
import"./server-
|
|
27
|
+
import"./server-7d6m1p2b.js";
|
|
28
28
|
import {
|
|
29
29
|
closeQuietly
|
|
30
30
|
} from "./server-8ajstryz.js";
|
package/dist/v2/{project-embedding-registry-v38q4xd5.js → project-embedding-registry-e7zftfvj.js}
RENAMED
|
@@ -35,17 +35,17 @@ import {
|
|
|
35
35
|
sweepAllRegisteredProjects2,
|
|
36
36
|
_setTestProviderFactoryForProject2,
|
|
37
37
|
_resetProjectEmbeddingRegistryForTests2
|
|
38
|
-
} from "./server-
|
|
38
|
+
} from "./server-q5z0gag0.js";
|
|
39
39
|
import"./server-4dhv7mqz.js";
|
|
40
40
|
import"./server-qt1qqasc.js";
|
|
41
41
|
import"./server-vr4szghm.js";
|
|
42
42
|
import"./server-24g8r2d0.js";
|
|
43
43
|
import"./server-bsgd4dk1.js";
|
|
44
|
-
import"./server-
|
|
44
|
+
import"./server-pw21ypwb.js";
|
|
45
45
|
import"./server-ab1g0wn9.js";
|
|
46
46
|
import"./server-qjvk4a9t.js";
|
|
47
|
-
import"./server-
|
|
48
|
-
import"./server-
|
|
47
|
+
import"./server-wxrdher8.js";
|
|
48
|
+
import"./server-swvhxhxz.js";
|
|
49
49
|
import"./server-51779zs2.js";
|
|
50
50
|
import"./server-gyy4k6mf.js";
|
|
51
51
|
import"./server-3mz2qh5a.js";
|