@cortexkit/opencode-magic-context 0.49.26 → 0.49.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/auto-search-worker.js +4 -4
- package/dist/chunk-embedding-write-worker.js +7 -7
- package/dist/{compartment-chunk-embedding-96ec8a7h.js → compartment-chunk-embedding-qgp0tbf7.js} +3 -3
- package/dist/config/schema/magic-context.d.ts +393 -393
- package/dist/{conflict-warning-hook-dv8fdc2w.js → conflict-warning-hook-tgnw019g.js} +4 -4
- package/dist/{context-pjqa24nd.js → context-t2k97d6v.js} +116 -116
- package/dist/{embedding-backfill-a91rvdf9.js → embedding-backfill-cwnyr4fj.js} +5 -5
- package/dist/features/magic-context/dreamer/verify.d.ts.map +1 -1
- package/dist/features/magic-context/message-index-async.d.ts +1 -4
- package/dist/features/magic-context/message-index-async.d.ts.map +1 -1
- package/dist/features/magic-context/message-index.d.ts +1 -28
- package/dist/features/magic-context/message-index.d.ts.map +1 -1
- package/dist/features/magic-context/session-retention.fixture.d.ts +4 -0
- package/dist/features/magic-context/session-retention.fixture.d.ts.map +1 -0
- package/dist/features/magic-context/storage-session-tables.d.ts +5 -12
- package/dist/features/magic-context/storage-session-tables.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-runner-incremental.d.ts.map +1 -1
- package/dist/hooks/magic-context/compartment-trigger.d.ts.map +1 -1
- package/dist/hooks/magic-context/historian-history-wait.d.ts +10 -0
- package/dist/hooks/magic-context/historian-history-wait.d.ts.map +1 -0
- package/dist/hooks/magic-context/lkg-recovery-fence.d.ts +0 -5
- package/dist/hooks/magic-context/lkg-recovery-fence.d.ts.map +1 -1
- package/dist/hooks/magic-context/raw-ordinal-warmup.d.ts +0 -10
- package/dist/hooks/magic-context/raw-ordinal-warmup.d.ts.map +1 -1
- package/dist/hooks/magic-context/todo-view.d.ts +2 -2
- package/dist/{index-w55zp7kf.js → index-077ht5cq.js} +1 -1
- package/dist/{index-xyx2ge2y.js → index-31y1mznz.js} +4 -4
- package/dist/{index-6g1zq1sk.js → index-4cpc59jv.js} +5 -5
- package/dist/{index-e5b61ty6.js → index-4ypqzvhf.js} +1 -1
- package/dist/index-7gbcg8xv.js +559 -0
- package/dist/{index-9q1g3c5q.js → index-7kkphb6c.js} +1 -1
- package/dist/{index-zn2n24yr.js → index-89k1w6x2.js} +3 -3
- package/dist/{index-sgchhbvy.js → index-a2fz9hpa.js} +1 -1
- package/dist/{index-hjnrp6vy.js → index-dcqk0y27.js} +1508 -85
- package/dist/{index-r3bteyev.js → index-dzfevacx.js} +9 -9
- package/dist/{index-rp78nqvr.js → index-fq2p158w.js} +10 -10
- package/dist/{index-6tmf87w0.js → index-mm93m7y6.js} +1 -1
- package/dist/{index-va2g2q57.js → index-n8qmmd7f.js} +3 -3
- package/dist/{index-whcgcfrv.js → index-np3rgfw4.js} +1 -1
- package/dist/{index-56tfs78r.js → index-qzbpbnqt.js} +485 -512
- package/dist/{index-m8va3mma.js → index-rverk2vz.js} +0 -2
- package/dist/{index-cfaet9cg.js → index-s1n8dd2n.js} +1 -1
- package/dist/{index-mphkpyap.js → index-t3rbb8wr.js} +2 -2
- package/dist/{index-064v90e8.js → index-tvzvjggy.js} +1 -1
- package/dist/{index-j43m40zd.js → index-v0dhhxsq.js} +1 -1
- package/dist/{index-xbbgcwd2.js → index-v15ne3a3.js} +2 -5
- package/dist/{index-x9k3mqrf.js → index-xrnsygfq.js} +1 -1
- package/dist/{index-dn2ke3b9.js → index-yzjhx10y.js} +5 -5
- package/dist/index.js +38 -38
- package/dist/{message-fts-rowid-map-4ksatb6f.js → message-fts-rowid-map-va36knh4.js} +2 -4
- package/dist/{message-index-bounded-whh5wv4a.js → message-index-bounded-7ayzb2ah.js} +22 -25
- package/dist/migration-worker.js +6 -6
- package/dist/plugin/dream-timer.d.ts.map +1 -1
- package/dist/{project-embedding-registry-t9fx6jwh.js → project-embedding-registry-94nncs5g.js} +4 -4
- package/dist/raw-ordinal-warmup-worker.js +7 -30
- package/dist/{read-session-chunk-mqmkgdx0.js → read-session-chunk-jzb6w9w5.js} +6 -6
- package/dist/{read-session-raw-dy2xxafq.js → read-session-raw-b2sd67v4.js} +1 -1
- package/dist/{recomp-orchestrator-qwcz86r1.js → recomp-orchestrator-02sa2ngr.js} +17 -17
- package/dist/{search-archive-8md3twv2.js → search-archive-q1vw7zg4.js} +7 -7
- package/dist/{search-y2t97tbb.js → search-spq6nfyf.js} +14 -15
- package/dist/{send-session-notification-kzazs7fy.js → send-session-notification-afzzqy5b.js} +3 -3
- package/dist/{storage-tags-a77q4v77.js → storage-tags-6hvkk01c.js} +2 -2
- package/dist/{transform-postprocess-phase-ppm1tfa7.js → transform-postprocess-phase-6menyyxc.js} +17 -17
- package/dist/v2/auto-search-worker.js +4 -4
- package/dist/v2/chunk-embedding-write-worker.js +7 -7
- package/dist/v2/{compartment-chunk-embedding-5rmrn09z.js → compartment-chunk-embedding-63dzs31c.js} +3 -3
- package/dist/v2/{context-10pj3bwd.js → context-na0esngr.js} +181 -206
- package/dist/v2/{embedding-backfill-r9mzt2eg.js → embedding-backfill-rh5dgsva.js} +5 -5
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/{message-fts-rowid-map-2s3ta05x.js → message-fts-rowid-map-78awh03v.js} +2 -4
- package/dist/v2/{message-index-bounded-f4269d3a.js → message-index-bounded-n09b74vr.js} +21 -24
- package/dist/v2/migration-worker.js +6 -6
- package/dist/v2/{project-embedding-registry-tgtmart7.js → project-embedding-registry-6pak822h.js} +4 -4
- package/dist/v2/raw-ordinal-warmup-worker.js +7 -30
- package/dist/v2/{read-session-chunk-ym5zvexn.js → read-session-chunk-vpt69tw9.js} +5 -5
- package/dist/v2/{read-session-raw-484g8kf2.js → read-session-raw-5x088amc.js} +1 -1
- package/dist/v2/{recomp-orchestrator-b44s2snm.js → recomp-orchestrator-txsmbnvw.js} +14 -14
- package/dist/v2/{search-archive-pmf2c1kb.js → search-archive-t9bcz4ht.js} +6 -6
- package/dist/v2/{search-75tf953m.js → search-dcy9b6gd.js} +13 -14
- package/dist/v2/{send-session-notification-gd21f5rq.js → send-session-notification-vdsgnf4c.js} +1 -1
- package/dist/v2/{server-7dpnt0ys.js → server-4sn3at8p.js} +1 -1
- package/dist/v2/{server-wj8h2q21.js → server-6avtp9jp.js} +1 -1
- package/dist/v2/{server-wwaw5npa.js → server-6g98c227.js} +1 -1
- package/dist/v2/{server-erk2bvdf.js → server-6vd2n183.js} +0 -2
- package/dist/v2/{server-4frtg2z1.js → server-awr8qa4c.js} +2 -5
- package/dist/v2/{server-7d6m1p2b.js → server-cqjvxyrp.js} +1 -1
- package/dist/v2/{server-317f3x9y.js → server-e3hc93wk.js} +5 -5
- package/dist/v2/{server-9zh78t8y.js → server-jj9qye8y.js} +1468 -73
- package/dist/v2/{server-fa7vtp40.js → server-nxas8v1d.js} +1 -1
- package/dist/v2/{server-vjer2jdn.js → server-txbc3czn.js} +9 -9
- package/dist/v2/{server-rqebawx1.js → server-v77xa5wj.js} +1 -1
- package/dist/v2/{server-jcsw05aa.js → server-xkvxss5g.js} +4 -4
- package/dist/v2/{server-hnmm8yzq.js → server-yqek3s4k.js} +1 -1
- package/dist/v2/server-z2n2xaeh.js +538 -0
- package/dist/v2/{server-nmwhe524.js → server-z3mk9jdc.js} +2 -2
- package/dist/v2/{server-w7x9wgm0.js → server-zmcrvpm3.js} +2 -2
- package/dist/v2/server.js +2 -2
- package/dist/v2/{storage-tags-q71rnr9f.js → storage-tags-18nbaanf.js} +2 -2
- package/dist/v2/store-reader.d.ts +0 -2
- package/dist/v2/store-reader.d.ts.map +1 -1
- package/dist/v2/{wrapup-orchestrator-gwww44st.js → wrapup-orchestrator-gjkszser.js} +14 -14
- package/dist/{wrapup-orchestrator-a9r8r4sk.js → wrapup-orchestrator-n5h5sr1x.js} +18 -18
- package/package.json +1 -1
- package/src/shared/write-transaction-attribution.test.ts +1 -6
- package/dist/index-40ma8m0c.js +0 -2251
- package/dist/message-index-ywx53y30.js +0 -61
- package/dist/v2/message-index-v6g8mgn7.js +0 -60
- package/dist/v2/server-k46ec388.js +0 -2220
|
@@ -82,10 +82,25 @@ import {
|
|
|
82
82
|
getUncoveredCompartmentEndsThrough,
|
|
83
83
|
providerResponseFailed,
|
|
84
84
|
isSuccessfulProviderCompletion,
|
|
85
|
+
LkgRecoveryFenceError,
|
|
86
|
+
lkgServedArrayDigest,
|
|
87
|
+
hasCleanLkgRecoveryFence,
|
|
88
|
+
dirtyLkgRecoveryRevision,
|
|
89
|
+
ownsLkgDirtyFence,
|
|
90
|
+
invalidateCleanLkgRecoveryFence,
|
|
91
|
+
prepareLkgCaptureFence,
|
|
92
|
+
certifyCommittedLkgCapture,
|
|
93
|
+
markLkgRecoveryDirty,
|
|
85
94
|
rememberUnpublishedAutoSearchNoHint,
|
|
86
95
|
getUnpublishedAutoSearchNoHint,
|
|
87
96
|
forgetUnpublishedAutoSearchNoHint,
|
|
88
97
|
registerAutoSearchWork,
|
|
98
|
+
gaDatabasePath,
|
|
99
|
+
RAW_MESSAGE_TYPES,
|
|
100
|
+
V2StoreReaderPool,
|
|
101
|
+
V2StoreReader,
|
|
102
|
+
advanceSessionActivity,
|
|
103
|
+
backfillSessionActivity,
|
|
89
104
|
getOrCreateSessionMeta,
|
|
90
105
|
updateSessionMeta,
|
|
91
106
|
advanceToolReclaimWatermark,
|
|
@@ -263,6 +278,7 @@ import {
|
|
|
263
278
|
producerPromptFailureReason,
|
|
264
279
|
resolveHiddenCompletionExecutor,
|
|
265
280
|
createV1HiddenCompletionExecutor,
|
|
281
|
+
shouldWaitForNewHistorianHistory,
|
|
266
282
|
EMPTY_READ_REPLY,
|
|
267
283
|
noteTouchedAt,
|
|
268
284
|
renderGlance,
|
|
@@ -286,7 +302,7 @@ import {
|
|
|
286
302
|
startCompartmentAgent,
|
|
287
303
|
setRecompStarting2,
|
|
288
304
|
setRecompTerminal2
|
|
289
|
-
} from "./server-
|
|
305
|
+
} from "./server-jj9qye8y.js";
|
|
290
306
|
import {
|
|
291
307
|
resolveHistorianModel2
|
|
292
308
|
} from "./server-5kym00ag.js";
|
|
@@ -311,7 +327,7 @@ import {
|
|
|
311
327
|
openDatabaseAsync,
|
|
312
328
|
isDatabasePersisted,
|
|
313
329
|
getDatabasePersistenceError
|
|
314
|
-
} from "./server-
|
|
330
|
+
} from "./server-e3hc93wk.js";
|
|
315
331
|
import {
|
|
316
332
|
pruneMissingProjectIdentities,
|
|
317
333
|
setHomeProjectPermission,
|
|
@@ -329,39 +345,6 @@ import {
|
|
|
329
345
|
beginBootQuietPeriod,
|
|
330
346
|
scheduleAfterBootQuiet
|
|
331
347
|
} from "./server-qjvk4a9t.js";
|
|
332
|
-
import {
|
|
333
|
-
registerOwnRpcServerInstance,
|
|
334
|
-
rpcPortDir,
|
|
335
|
-
rpcPortFilePath,
|
|
336
|
-
parseRpcPortFile,
|
|
337
|
-
inspectProcessesAsync
|
|
338
|
-
} from "./server-k3t06fxr.js";
|
|
339
|
-
import {
|
|
340
|
-
LkgRecoveryFenceError,
|
|
341
|
-
lkgServedArrayDigest,
|
|
342
|
-
takeLkgRecoveryLockSweepPage,
|
|
343
|
-
hasCleanLkgRecoveryFence,
|
|
344
|
-
dirtyLkgRecoveryRevision,
|
|
345
|
-
ownsLkgDirtyFence,
|
|
346
|
-
invalidateCleanLkgRecoveryFence,
|
|
347
|
-
prepareLkgCaptureFence,
|
|
348
|
-
certifyCommittedLkgCapture,
|
|
349
|
-
markLkgRecoveryDirty,
|
|
350
|
-
gaDatabasePath,
|
|
351
|
-
RAW_MESSAGE_TYPES,
|
|
352
|
-
V2StoreReaderPool,
|
|
353
|
-
V2StoreReader,
|
|
354
|
-
cleanSearchText,
|
|
355
|
-
matchedSearchSnippet,
|
|
356
|
-
advanceSessionActivity,
|
|
357
|
-
backfillSessionActivity,
|
|
358
|
-
getLastIndexedOrdinal2,
|
|
359
|
-
getMessageIndexReconciliationStartOrdinal2,
|
|
360
|
-
isMessageIndexReconciledThrough2,
|
|
361
|
-
clearIndexedMessages2,
|
|
362
|
-
indexMessagesAfterOrdinal2,
|
|
363
|
-
sweepOrphanedOpenCodeMessageIndexesCooperatively2
|
|
364
|
-
} from "./server-k46ec388.js";
|
|
365
348
|
import"./server-51779zs2.js";
|
|
366
349
|
import {
|
|
367
350
|
inRootAsyncContext2,
|
|
@@ -387,15 +370,7 @@ import {
|
|
|
387
370
|
buildInMemoryTailRawMessages2,
|
|
388
371
|
RawOrdinalsNotReady2,
|
|
389
372
|
runSessionWarmupWorker
|
|
390
|
-
} from "./server-
|
|
391
|
-
import {
|
|
392
|
-
resolveOpenCodeDbPath,
|
|
393
|
-
assertOpenCodeStoreGeneration,
|
|
394
|
-
openCodeDbPathExists,
|
|
395
|
-
recordOpenCodeDbReadFailure,
|
|
396
|
-
clearOpenCodeDbReadFailure,
|
|
397
|
-
claimOpenCodeDbDiagnosticOnce
|
|
398
|
-
} from "./server-2ra6pwf3.js";
|
|
373
|
+
} from "./server-6vd2n183.js";
|
|
399
374
|
import {
|
|
400
375
|
resolveModelCalibration,
|
|
401
376
|
calibrateBuckets,
|
|
@@ -490,7 +465,7 @@ import {
|
|
|
490
465
|
adoptNullOwnerToolTag2,
|
|
491
466
|
getCandidateToolOwners2,
|
|
492
467
|
pickNearestPriorOwner2
|
|
493
|
-
} from "./server-
|
|
468
|
+
} from "./server-nxas8v1d.js";
|
|
494
469
|
import {
|
|
495
470
|
textMentionsRecentCommit,
|
|
496
471
|
hasMeaningfulUserText2,
|
|
@@ -509,7 +484,15 @@ import {
|
|
|
509
484
|
freezeTemporalDecisions,
|
|
510
485
|
tagRevisionKey,
|
|
511
486
|
tagIdentityRevisionKey
|
|
512
|
-
} from "./server-
|
|
487
|
+
} from "./server-v77xa5wj.js";
|
|
488
|
+
import {
|
|
489
|
+
resolveOpenCodeDbPath,
|
|
490
|
+
assertOpenCodeStoreGeneration,
|
|
491
|
+
openCodeDbPathExists,
|
|
492
|
+
recordOpenCodeDbReadFailure,
|
|
493
|
+
clearOpenCodeDbReadFailure,
|
|
494
|
+
claimOpenCodeDbDiagnosticOnce
|
|
495
|
+
} from "./server-2ra6pwf3.js";
|
|
513
496
|
import {
|
|
514
497
|
openCodeDbExists,
|
|
515
498
|
withReadOnlySessionDb,
|
|
@@ -716,25 +699,23 @@ import {
|
|
|
716
699
|
readRawSessionMessageById2,
|
|
717
700
|
readSessionChunk2,
|
|
718
701
|
readRawSessionSeedTail2
|
|
719
|
-
} from "./server-
|
|
702
|
+
} from "./server-xkvxss5g.js";
|
|
720
703
|
import {
|
|
721
704
|
BoundedSessionMap,
|
|
722
705
|
recordToolDefinitionSet,
|
|
723
706
|
getCurrentToolSetHash,
|
|
724
707
|
getMeasuredToolDefinitionTokens
|
|
725
|
-
} from "./server-
|
|
726
|
-
import"./server-4frtg2z1.js";
|
|
727
|
-
import {
|
|
728
|
-
SubcClient,
|
|
729
|
-
connectionFileExists,
|
|
730
|
-
SYNAPSE_DEFAULT_MODEL,
|
|
731
|
-
toSynapseLaneDescriptor,
|
|
732
|
-
formatSynapseLaneDescriptor,
|
|
733
|
-
SynapseEmbeddingProvider
|
|
734
|
-
} from "./server-ab1g0wn9.js";
|
|
708
|
+
} from "./server-cqjvxyrp.js";
|
|
735
709
|
import {
|
|
736
|
-
|
|
737
|
-
|
|
710
|
+
cleanSearchText,
|
|
711
|
+
matchedSearchSnippet,
|
|
712
|
+
getLastIndexedOrdinal,
|
|
713
|
+
getMessageIndexReconciliationStartOrdinal,
|
|
714
|
+
isMessageIndexReconciledThrough,
|
|
715
|
+
clearIndexedMessages,
|
|
716
|
+
indexMessagesAfterOrdinal
|
|
717
|
+
} from "./server-z2n2xaeh.js";
|
|
718
|
+
import"./server-awr8qa4c.js";
|
|
738
719
|
import {
|
|
739
720
|
embedPauseBySession,
|
|
740
721
|
embedRunStateBySession,
|
|
@@ -764,7 +745,25 @@ import {
|
|
|
764
745
|
embedSessionCompartmentChunks2,
|
|
765
746
|
getEmbeddingCoverageStatus2,
|
|
766
747
|
getAutoEmbeddingSessionCoverage2
|
|
767
|
-
} from "./server-
|
|
748
|
+
} from "./server-yqek3s4k.js";
|
|
749
|
+
import {
|
|
750
|
+
SubcClient,
|
|
751
|
+
connectionFileExists,
|
|
752
|
+
SYNAPSE_DEFAULT_MODEL,
|
|
753
|
+
toSynapseLaneDescriptor,
|
|
754
|
+
formatSynapseLaneDescriptor,
|
|
755
|
+
SynapseEmbeddingProvider
|
|
756
|
+
} from "./server-ab1g0wn9.js";
|
|
757
|
+
import {
|
|
758
|
+
deleteChunkEmbedBackoffForSession2
|
|
759
|
+
} from "./server-4sn3at8p.js";
|
|
760
|
+
import {
|
|
761
|
+
registerOwnRpcServerInstance,
|
|
762
|
+
rpcPortDir,
|
|
763
|
+
rpcPortFilePath,
|
|
764
|
+
parseRpcPortFile,
|
|
765
|
+
inspectProcessesAsync
|
|
766
|
+
} from "./server-k3t06fxr.js";
|
|
768
767
|
import {
|
|
769
768
|
V2_MEMORY_CATEGORIES,
|
|
770
769
|
CATEGORY_PRIORITY
|
|
@@ -777,7 +776,7 @@ import {
|
|
|
777
776
|
resolveStoredPathWorkspaceIdentity,
|
|
778
777
|
storedPathBelongsToWorkspace,
|
|
779
778
|
computeWorkspaceEpochFingerprint
|
|
780
|
-
} from "./server-
|
|
779
|
+
} from "./server-6g98c227.js";
|
|
781
780
|
import {
|
|
782
781
|
configureContextDatabasePragmas2
|
|
783
782
|
} from "./server-fb3zxn06.js";
|
|
@@ -823,7 +822,7 @@ import {
|
|
|
823
822
|
readGitFileChangeTimesSince,
|
|
824
823
|
verificationFileExists,
|
|
825
824
|
normalizeVerificationFiles
|
|
826
|
-
} from "./server-
|
|
825
|
+
} from "./server-z3mk9jdc.js";
|
|
827
826
|
import {
|
|
828
827
|
deriveTriggerBudget2,
|
|
829
828
|
deriveHistorianChunkTokens2,
|
|
@@ -857,7 +856,7 @@ import {
|
|
|
857
856
|
} from "./server-vr4szghm.js";
|
|
858
857
|
import {
|
|
859
858
|
cosineSimilarity
|
|
860
|
-
} from "./server-
|
|
859
|
+
} from "./server-6avtp9jp.js";
|
|
861
860
|
import {
|
|
862
861
|
computeCueContentHash,
|
|
863
862
|
hasMuralCueColumns,
|
|
@@ -914,14 +913,14 @@ import {
|
|
|
914
913
|
resolveMemoriesByIdsForSearch2,
|
|
915
914
|
unifiedSearch2,
|
|
916
915
|
formatSearchResults2
|
|
917
|
-
} from "./server-
|
|
916
|
+
} from "./server-txbc3czn.js";
|
|
918
917
|
import {
|
|
919
918
|
resolvePromptContext2
|
|
920
919
|
} from "./server-fmsr7v69.js";
|
|
921
920
|
import"./server-kaqs6h31.js";
|
|
922
921
|
import {
|
|
923
922
|
renderSearchArchiveOffThread2
|
|
924
|
-
} from "./server-
|
|
923
|
+
} from "./server-zmcrvpm3.js";
|
|
925
924
|
import {
|
|
926
925
|
compareSemverCore
|
|
927
926
|
} from "./server-84w6rvvf.js";
|
|
@@ -1847,15 +1846,15 @@ async function reconcileSessionIndex(db, sessionId, readMessages) {
|
|
|
1847
1846
|
const revision = readMessages.getRevision?.(sessionId);
|
|
1848
1847
|
const previous = heapHolder.reconciledSnapshots.get(sessionId);
|
|
1849
1848
|
const finalWatermark = previous && revision === previous.revision ? previous.count : revision !== undefined && readMessages.getCountAfterRevision ? previous && revision > previous.revision ? previous.count + readMessages.getCountAfterRevision(sessionId, previous.revision, revision) : readMessages.getCountAfterRevision(sessionId, -1, revision) : readMessages.getCount ? readMessages.getCount(sessionId) : (fallbackSnapshot = fullReader?.(sessionId) ?? []).length;
|
|
1850
|
-
let cursor =
|
|
1849
|
+
let cursor = getMessageIndexReconciliationStartOrdinal(db, sessionId);
|
|
1851
1850
|
let after = cursor === previous?.count ? previous.after : undefined;
|
|
1852
1851
|
while (cursor < finalWatermark) {
|
|
1853
1852
|
const pageEnd = Math.min(finalWatermark, cursor + RECONCILIATION_BATCH_SIZE);
|
|
1854
1853
|
const messages = readMessages.readPage ? readMessages.readPage(sessionId, cursor, RECONCILIATION_BATCH_SIZE, finalWatermark, after) : (fallbackSnapshot ?? []).filter((message) => message.ordinal > cursor && message.ordinal <= pageEnd);
|
|
1855
1854
|
const retainedMessages = fallbackSnapshot ?? messages;
|
|
1856
1855
|
heapHolder.activeReconcilerBuffers.set(sessionId, retainedMessages);
|
|
1857
|
-
withSqliteBackgroundWriter2(() =>
|
|
1858
|
-
const nextCursor =
|
|
1856
|
+
withSqliteBackgroundWriter2(() => indexMessagesAfterOrdinal(db, sessionId, messages, cursor, pageEnd));
|
|
1857
|
+
const nextCursor = getMessageIndexReconciliationStartOrdinal(db, sessionId);
|
|
1859
1858
|
if (nextCursor <= cursor)
|
|
1860
1859
|
break;
|
|
1861
1860
|
cursor = nextCursor;
|
|
@@ -1865,7 +1864,7 @@ async function reconcileSessionIndex(db, sessionId, readMessages) {
|
|
|
1865
1864
|
await yieldToEventLoop();
|
|
1866
1865
|
}
|
|
1867
1866
|
}
|
|
1868
|
-
if (
|
|
1867
|
+
if (isMessageIndexReconciledThrough(db, sessionId, finalWatermark)) {
|
|
1869
1868
|
heapHolder.reconciledSessions.add(sessionId);
|
|
1870
1869
|
if (revision !== undefined) {
|
|
1871
1870
|
if (!after && finalWatermark > 0 && readMessages.readPage) {
|
|
@@ -1919,42 +1918,6 @@ function scheduleReconciliation(db, sessionId, readMessages) {
|
|
|
1919
1918
|
});
|
|
1920
1919
|
});
|
|
1921
1920
|
}
|
|
1922
|
-
async function sweepOrphanedOpenCodeMessageIndexesOffThread(db, openSource, options = {}) {
|
|
1923
|
-
if (getHarness2() === "opencode" || getHarness2() === "opencode2")
|
|
1924
|
-
options = {
|
|
1925
|
-
...options,
|
|
1926
|
-
fenceLockNames: options.fenceLockNames ?? takeLkgRecoveryLockSweepPage()
|
|
1927
|
-
};
|
|
1928
|
-
if (getHarness2() === "opencode2")
|
|
1929
|
-
openSource = () => new Database2(gaDatabasePath(getDataDir(), process.env.OPENCODE_CHANNEL ?? "latest"), {
|
|
1930
|
-
readonly: true,
|
|
1931
|
-
fileMustExist: true
|
|
1932
|
-
});
|
|
1933
|
-
const path = getSqliteDatabasePath2(db);
|
|
1934
|
-
if (!path || getHarness2() !== "opencode" && getHarness2() !== "opencode2")
|
|
1935
|
-
return sweepOrphanedOpenCodeMessageIndexesCooperatively2(db, openSource, options);
|
|
1936
|
-
let source = null;
|
|
1937
|
-
let sourcePath = null;
|
|
1938
|
-
try {
|
|
1939
|
-
source = openSource();
|
|
1940
|
-
if (source)
|
|
1941
|
-
sourcePath = getSqliteDatabasePath2(source);
|
|
1942
|
-
} catch {} finally {
|
|
1943
|
-
if (sourcePath)
|
|
1944
|
-
source?.close();
|
|
1945
|
-
}
|
|
1946
|
-
if (!sourcePath)
|
|
1947
|
-
return sweepOrphanedOpenCodeMessageIndexesCooperatively2(db, () => source, options);
|
|
1948
|
-
const reply = await runSessionWarmupWorker({
|
|
1949
|
-
path,
|
|
1950
|
-
sessionId: "",
|
|
1951
|
-
harness: getHarness2(),
|
|
1952
|
-
orphanSweep: { sourcePath, options }
|
|
1953
|
-
}, {});
|
|
1954
|
-
if (!("orphanSweep" in reply))
|
|
1955
|
-
throw new Error("message history orphan sweep worker failed");
|
|
1956
|
-
return reply.orphanSweep;
|
|
1957
|
-
}
|
|
1958
1921
|
function scheduleClearAndReindex(db, sessionId, readMessages) {
|
|
1959
1922
|
heapHolder.reconciledSessions.delete(sessionId);
|
|
1960
1923
|
heapHolder.reconciledSnapshots.delete(sessionId);
|
|
@@ -1977,7 +1940,7 @@ function scheduleClearAndReindex(db, sessionId, readMessages) {
|
|
|
1977
1940
|
heapHolder.reconciledSessions.delete(sessionId);
|
|
1978
1941
|
heapHolder.reconciledSnapshots.delete(sessionId);
|
|
1979
1942
|
clearCompletedIncrementalKeys(sessionId);
|
|
1980
|
-
|
|
1943
|
+
clearIndexedMessages(db, sessionId);
|
|
1981
1944
|
cleared = true;
|
|
1982
1945
|
}).then(() => cleared ? reconcileSessionIndex(db, sessionId, pending.source) : undefined).catch((error) => {
|
|
1983
1946
|
heapHolder.reconciledSessions.delete(sessionId);
|
|
@@ -6578,6 +6541,13 @@ function checkCompartmentTrigger(db, sessionId, sessionMeta, usage, _previousPer
|
|
|
6578
6541
|
}
|
|
6579
6542
|
return { shouldFire: false };
|
|
6580
6543
|
}
|
|
6544
|
+
if (tailInfo.boundarySnapshot && shouldWaitForNewHistorianHistory(tailInfo.boundarySnapshot, {
|
|
6545
|
+
usagePercentage: usage.percentage,
|
|
6546
|
+
emergency: getOverflowState(db, sessionId).needsEmergencyRecovery
|
|
6547
|
+
})) {
|
|
6548
|
+
sessionLog2(sessionId, "compartment trigger: waiting for new history after no forward progress");
|
|
6549
|
+
return { shouldFire: false };
|
|
6550
|
+
}
|
|
6581
6551
|
const canClearReasoning = reasoningProjection?.canClearReasoning ?? modelAcceptsEmptyContent(reasoningProjection?.providerID);
|
|
6582
6552
|
const projectedPostDropPercentage = estimateProjectedPostDropPercentage(db, sessionId, usage, preloadedActiveTags ?? getActiveTagsBySession2(db, sessionId), keepReasoningTokens, sessionMeta.clearedReasoningThroughTag, canClearReasoning, reasoningProjection?.budgetCutoff, eligiblePendingDropTagIds);
|
|
6583
6553
|
const relativePostDropTarget = executeThresholdPercentage * POST_DROP_TARGET_RATIO;
|
|
@@ -23971,8 +23941,8 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
23971
23941
|
const db = readDatabase();
|
|
23972
23942
|
if (!db)
|
|
23973
23943
|
return { ok: false, error: "db unavailable" };
|
|
23974
|
-
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-
|
|
23975
|
-
const { sendIgnoredMessage } = await importPluginModule(() => import("./send-session-notification-
|
|
23944
|
+
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-txsmbnvw.js"));
|
|
23945
|
+
const { sendIgnoredMessage } = await importPluginModule(() => import("./send-session-notification-vdsgnf4c.js"));
|
|
23976
23946
|
log2(`[rpc] recomp requested for session ${sessionId}`);
|
|
23977
23947
|
if (!args.client && !args.hiddenCompletionExecutor) {
|
|
23978
23948
|
return {
|
|
@@ -24056,7 +24026,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
24056
24026
|
const db = readDatabase();
|
|
24057
24027
|
if (!db)
|
|
24058
24028
|
return { ok: false, error: "db unavailable" };
|
|
24059
|
-
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-
|
|
24029
|
+
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-gjkszser.js"));
|
|
24060
24030
|
const model = liveSessionState.liveModelBySession.get(sessionId);
|
|
24061
24031
|
const contextLimit = model ? resolveContextLimit(model.providerID, model.modelID, { db, sessionID: sessionId }) : 128000;
|
|
24062
24032
|
const ctx = {
|
|
@@ -34213,6 +34183,21 @@ function verifyAssistantText(messages) {
|
|
|
34213
34183
|
const start = text.lastIndexOf("<verify>");
|
|
34214
34184
|
return start >= 0 ? text.slice(start) : text;
|
|
34215
34185
|
}
|
|
34186
|
+
function validateVerifyCompletion(messages, text, expectedIds, responseText = text) {
|
|
34187
|
+
let parsed;
|
|
34188
|
+
try {
|
|
34189
|
+
parsed = validateVerifyManifest(text, expectedIds);
|
|
34190
|
+
} catch (error) {
|
|
34191
|
+
throw providerOutputFailureFromInvalidManifest(messages, responseText) ?? error;
|
|
34192
|
+
}
|
|
34193
|
+
const ids = [...parsed.verified, ...parsed.updated, ...parsed.archived, ...parsed.skipped].map((entry) => entry.id);
|
|
34194
|
+
if (ids.length !== expectedIds.size || ids.some((id) => !expectedIds.has(id))) {
|
|
34195
|
+
const providerFailure = providerOutputFailureFromInvalidManifest(messages, responseText);
|
|
34196
|
+
if (providerFailure)
|
|
34197
|
+
throw providerFailure;
|
|
34198
|
+
}
|
|
34199
|
+
return parsed;
|
|
34200
|
+
}
|
|
34216
34201
|
var IDENTICAL_PROVIDER_FAILURE_BATCH_LIMIT = 2;
|
|
34217
34202
|
var VERIFY_BATCH_FLOOR_MS = 30000;
|
|
34218
34203
|
function computeVerifyBatchSliceMs(remainingMs, _batchesRemaining) {
|
|
@@ -34371,6 +34356,7 @@ async function verifyOneBatch(args, batch, sliceMs, signal) {
|
|
|
34371
34356
|
const timer = setTimeout(() => batchController.abort(new Error(`verify slice timed out after ${sliceMs}ms`)), sliceMs);
|
|
34372
34357
|
const batchSignal = batchController.signal;
|
|
34373
34358
|
const tokenBudget = verifyBatchTokenBudget(batch.length, args.tokenBudget);
|
|
34359
|
+
const expectedIds = new Set(batch.map((memory) => memory.id));
|
|
34374
34360
|
let agentSessionId = null;
|
|
34375
34361
|
let hiddenSessionId = null;
|
|
34376
34362
|
let promptSettled = false;
|
|
@@ -34423,13 +34409,10 @@ async function verifyOneBatch(args, batch, sliceMs, signal) {
|
|
|
34423
34409
|
onBudgetUpdate({ spent: 0, finalizeFired: false, sessionId });
|
|
34424
34410
|
},
|
|
34425
34411
|
parse: (text, completion) => {
|
|
34426
|
-
const providerFailure = providerOutputFailureFromInvalidManifest(completion.messages ?? [], text);
|
|
34427
|
-
if (providerFailure)
|
|
34428
|
-
throw providerFailure;
|
|
34429
34412
|
const manifest = verifyAssistantText(completion.messages ?? []) ?? (text.trim() ? text : null);
|
|
34430
34413
|
if (!manifest)
|
|
34431
34414
|
throw new Error("verify returned no output");
|
|
34432
|
-
return
|
|
34415
|
+
return validateVerifyCompletion(completion.messages ?? [], manifest, expectedIds, text);
|
|
34433
34416
|
}
|
|
34434
34417
|
});
|
|
34435
34418
|
recordInvocation4(args, startedAt, {
|
|
@@ -34491,10 +34474,7 @@ async function verifyOneBatch(args, batch, sliceMs, signal) {
|
|
|
34491
34474
|
const text = verifyAssistantText(messages);
|
|
34492
34475
|
if (!text)
|
|
34493
34476
|
throw new Error("verify returned no output");
|
|
34494
|
-
|
|
34495
|
-
if (providerFailure)
|
|
34496
|
-
throw providerFailure;
|
|
34497
|
-
return validateVerifyManifest(text, new Set(batch.map((memory) => memory.id)));
|
|
34477
|
+
return validateVerifyCompletion(messages, text, expectedIds);
|
|
34498
34478
|
}
|
|
34499
34479
|
});
|
|
34500
34480
|
promptSettled = true;
|
|
@@ -37038,12 +37018,6 @@ async function runMessageHistoryMaintenance(db) {
|
|
|
37038
37018
|
log2(`[message-index] pending Rust session cleanup: cleared=${rustCleanup.cleared} failed=${rustCleanup.failedSessionIds.length}`);
|
|
37039
37019
|
}
|
|
37040
37020
|
}
|
|
37041
|
-
const sweep = await sweepOrphanedOpenCodeMessageIndexesOffThread(db, openOpenCodeDb);
|
|
37042
|
-
if (sweep.reason)
|
|
37043
|
-
log2(`[message-index] orphan sweep parked: ${sweep.reason}`);
|
|
37044
|
-
if (sweep.deleted > 0) {
|
|
37045
|
-
log2(`[message-index] orphan sweep: scanned=${sweep.scanned} deleted=${sweep.deleted} cursor=${sweep.cursor || "<complete>"}`);
|
|
37046
|
-
}
|
|
37047
37021
|
}
|
|
37048
37022
|
function startupJitterMs(directory) {
|
|
37049
37023
|
const existing = startupJitters.get(directory);
|
|
@@ -51949,7 +51923,7 @@ function singleLine(value) {
|
|
|
51949
51923
|
// src/tools/ctx-note/tools.ts
|
|
51950
51924
|
function captureAnchorOrdinal(db, sessionId) {
|
|
51951
51925
|
try {
|
|
51952
|
-
const ordinal =
|
|
51926
|
+
const ordinal = getLastIndexedOrdinal(db, sessionId);
|
|
51953
51927
|
return ordinal > 0 ? ordinal : null;
|
|
51954
51928
|
} catch {
|
|
51955
51929
|
return null;
|
|
@@ -53858,6 +53832,88 @@ async function registerContext(context) {
|
|
|
53858
53832
|
...args.messages.filter((message) => message !== args.incoming)
|
|
53859
53833
|
];
|
|
53860
53834
|
};
|
|
53835
|
+
const initializeTransform = (database) => transform ??= createTransform({
|
|
53836
|
+
...createV2TransformFeatureDeps(config, compactionOff, directory, embeddings.ensureRegistered),
|
|
53837
|
+
cacheTtlConfig: config.cache_ttl,
|
|
53838
|
+
cacheTtlConfigured: config.cacheTtlConfigured,
|
|
53839
|
+
sampleCacheTtlConfig: () => liveConfigReader.poll().effective,
|
|
53840
|
+
db: database,
|
|
53841
|
+
tagger,
|
|
53842
|
+
...createV2ThresholdDeps(config),
|
|
53843
|
+
contextUsageMap: usage,
|
|
53844
|
+
compactionOff,
|
|
53845
|
+
storeGeneration: "v2",
|
|
53846
|
+
normalizeRestoredAssistantText: (text, providerID) => stripCopiedTagNotation(text, providerID === "anthropic"),
|
|
53847
|
+
refreshSourceContents: (sessionID) => nativeFoldReplay?.needsHeadRebuild(sessionID) ?? false,
|
|
53848
|
+
hostCleanupCompactionMarkers: () => ({
|
|
53849
|
+
verified: true,
|
|
53850
|
+
removedLineages: 0,
|
|
53851
|
+
removedRows: 0,
|
|
53852
|
+
retainedLineages: 0
|
|
53853
|
+
}),
|
|
53854
|
+
protectedTokens: config.protected_tokens,
|
|
53855
|
+
protectedTokenTierOverrides: getProtectedTokensTierOverrides(config),
|
|
53856
|
+
liveModelBySession: liveModels,
|
|
53857
|
+
getToolSetHash: (sessionId) => {
|
|
53858
|
+
const model = liveModels.get(sessionId);
|
|
53859
|
+
if (!model)
|
|
53860
|
+
return "";
|
|
53861
|
+
return getCurrentToolSetHash(model.providerID, model.modelID, agents.get(sessionId), sessionId);
|
|
53862
|
+
},
|
|
53863
|
+
channel1StateBySession: channel1,
|
|
53864
|
+
historyRefreshSessions,
|
|
53865
|
+
pendingMaterializationSessions,
|
|
53866
|
+
lastHeuristicsTurnId,
|
|
53867
|
+
commitSeenLastPass,
|
|
53868
|
+
variantBySession: variants,
|
|
53869
|
+
keepReasoningTokens: config.keep_reasoning_tokens,
|
|
53870
|
+
directory,
|
|
53871
|
+
sessionDirectoryBySession: sessionDirectories,
|
|
53872
|
+
projectPath: resolveProjectIdentityForSession(directory, config.allow_home_project),
|
|
53873
|
+
getHistorianChunkTokens: () => sampleHistorian().chunkTokens,
|
|
53874
|
+
getFallbackModelId: (sessionID) => {
|
|
53875
|
+
const model = liveModels.get(sessionID);
|
|
53876
|
+
return model ? `${model.providerID}/${model.modelID}` : undefined;
|
|
53877
|
+
},
|
|
53878
|
+
maybeAutoEmbedSession: createV2AutoEmbedSession({
|
|
53879
|
+
db: database,
|
|
53880
|
+
resolveDirectory: (sessionID) => sessionDirectories.get(sessionID) ?? directory,
|
|
53881
|
+
allowHomeProject: config.allow_home_project,
|
|
53882
|
+
recompProgressBySession: new Map
|
|
53883
|
+
}, embeddings.ensureRegistered),
|
|
53884
|
+
hiddenCompletionExecutor,
|
|
53885
|
+
historianRunnable: !compactionOff && hiddenCompletionExecutor !== undefined && config.historian?.disable !== true,
|
|
53886
|
+
historianModel: historianModels.primary,
|
|
53887
|
+
historianContextLimit: sampleHistorian().contextLimit,
|
|
53888
|
+
fallbackModels: historianModels.fallbacks,
|
|
53889
|
+
resolveHistorianRun: sampleHistorian,
|
|
53890
|
+
historianTimeoutMs: config.historian_timeout_ms,
|
|
53891
|
+
historianMaxOutputTokens: config.historian?.maxTokens,
|
|
53892
|
+
historianTwoPass: config.historian?.two_pass,
|
|
53893
|
+
historianExpandTools: config.historian?.expand_tools,
|
|
53894
|
+
historianRunner: config.historian?.runner,
|
|
53895
|
+
historianHostRunnerEnabled: config.historian?.host_runner?.enabled,
|
|
53896
|
+
compactionMarkerStrategy: rustModeModuleClient ? createV2RustCompactionMarkerStrategy((sessionID, endMessageID) => {
|
|
53897
|
+
const reader = openStoreReader();
|
|
53898
|
+
try {
|
|
53899
|
+
return resolveV2BoundaryUserMessage(reader, sessionID, endMessageID);
|
|
53900
|
+
} finally {
|
|
53901
|
+
reader.close();
|
|
53902
|
+
}
|
|
53903
|
+
}) : v2CompactionMarkerStrategy,
|
|
53904
|
+
transformMode: config.transform_mode,
|
|
53905
|
+
rustModeModuleClient,
|
|
53906
|
+
rustModeProjectRoot: directory,
|
|
53907
|
+
rustMemorySyncRequestedSessions,
|
|
53908
|
+
onRustModeParked: (sessionId, message) => pushNotification2("toast", {
|
|
53909
|
+
message: `Rust Magic Context paused: ${message}`,
|
|
53910
|
+
variant: "warning"
|
|
53911
|
+
}, sessionId),
|
|
53912
|
+
promptSurface: config.prompt_surface,
|
|
53913
|
+
promptSurfaceRuntime,
|
|
53914
|
+
onRustEngineReconnectRefusal: (refusal) => rustRefusalRecovery?.arm(refusal),
|
|
53915
|
+
...createHostSeams(context, readAllForConversion, pagedRead, liveModels)
|
|
53916
|
+
});
|
|
53861
53917
|
const runManagedContext = async (draft) => {
|
|
53862
53918
|
rememberHostMedia(draft.messages);
|
|
53863
53919
|
if (hiddenChildHook.apply(draft))
|
|
@@ -54123,88 +54179,7 @@ async function registerContext(context) {
|
|
|
54123
54179
|
});
|
|
54124
54180
|
await cacheV2SessionDirectory(context.session, draft.sessionID, sessionDirectories);
|
|
54125
54181
|
prepareHistorySession(draft.sessionID);
|
|
54126
|
-
transform
|
|
54127
|
-
...createV2TransformFeatureDeps(config, compactionOff, directory, embeddings.ensureRegistered),
|
|
54128
|
-
cacheTtlConfig: config.cache_ttl,
|
|
54129
|
-
cacheTtlConfigured: config.cacheTtlConfigured,
|
|
54130
|
-
sampleCacheTtlConfig: () => liveConfigReader.poll().effective,
|
|
54131
|
-
db,
|
|
54132
|
-
tagger,
|
|
54133
|
-
...createV2ThresholdDeps(config),
|
|
54134
|
-
contextUsageMap: usage,
|
|
54135
|
-
compactionOff,
|
|
54136
|
-
storeGeneration: "v2",
|
|
54137
|
-
normalizeRestoredAssistantText: (text, providerID) => stripCopiedTagNotation(text, providerID === "anthropic"),
|
|
54138
|
-
refreshSourceContents: (sessionID) => nativeFoldReplay?.needsHeadRebuild(sessionID) ?? false,
|
|
54139
|
-
hostCleanupCompactionMarkers: () => ({
|
|
54140
|
-
verified: true,
|
|
54141
|
-
removedLineages: 0,
|
|
54142
|
-
removedRows: 0,
|
|
54143
|
-
retainedLineages: 0
|
|
54144
|
-
}),
|
|
54145
|
-
protectedTokens: config.protected_tokens,
|
|
54146
|
-
protectedTokenTierOverrides: getProtectedTokensTierOverrides(config),
|
|
54147
|
-
liveModelBySession: liveModels,
|
|
54148
|
-
getToolSetHash: (sessionId) => {
|
|
54149
|
-
const model = liveModels.get(sessionId);
|
|
54150
|
-
if (!model)
|
|
54151
|
-
return "";
|
|
54152
|
-
return getCurrentToolSetHash(model.providerID, model.modelID, agents.get(sessionId), sessionId);
|
|
54153
|
-
},
|
|
54154
|
-
channel1StateBySession: channel1,
|
|
54155
|
-
historyRefreshSessions,
|
|
54156
|
-
pendingMaterializationSessions,
|
|
54157
|
-
lastHeuristicsTurnId,
|
|
54158
|
-
commitSeenLastPass,
|
|
54159
|
-
variantBySession: variants,
|
|
54160
|
-
keepReasoningTokens: config.keep_reasoning_tokens,
|
|
54161
|
-
directory,
|
|
54162
|
-
sessionDirectoryBySession: sessionDirectories,
|
|
54163
|
-
projectPath: resolveProjectIdentityForSession(directory, config.allow_home_project),
|
|
54164
|
-
getHistorianChunkTokens: () => sampleHistorian().chunkTokens,
|
|
54165
|
-
getFallbackModelId: (sessionID) => {
|
|
54166
|
-
const model = liveModels.get(sessionID);
|
|
54167
|
-
return model ? `${model.providerID}/${model.modelID}` : undefined;
|
|
54168
|
-
},
|
|
54169
|
-
maybeAutoEmbedSession: createV2AutoEmbedSession({
|
|
54170
|
-
db,
|
|
54171
|
-
resolveDirectory: (sessionID) => sessionDirectories.get(sessionID) ?? directory,
|
|
54172
|
-
allowHomeProject: config.allow_home_project,
|
|
54173
|
-
recompProgressBySession: new Map
|
|
54174
|
-
}, embeddings.ensureRegistered),
|
|
54175
|
-
hiddenCompletionExecutor,
|
|
54176
|
-
historianRunnable: !compactionOff && hiddenCompletionExecutor !== undefined && config.historian?.disable !== true,
|
|
54177
|
-
historianModel: historianModels.primary,
|
|
54178
|
-
historianContextLimit: sampleHistorian().contextLimit,
|
|
54179
|
-
fallbackModels: historianModels.fallbacks,
|
|
54180
|
-
resolveHistorianRun: sampleHistorian,
|
|
54181
|
-
historianTimeoutMs: config.historian_timeout_ms,
|
|
54182
|
-
historianMaxOutputTokens: config.historian?.maxTokens,
|
|
54183
|
-
historianTwoPass: config.historian?.two_pass,
|
|
54184
|
-
historianExpandTools: config.historian?.expand_tools,
|
|
54185
|
-
historianRunner: config.historian?.runner,
|
|
54186
|
-
historianHostRunnerEnabled: config.historian?.host_runner?.enabled,
|
|
54187
|
-
compactionMarkerStrategy: rustModeModuleClient ? createV2RustCompactionMarkerStrategy((sessionID, endMessageID) => {
|
|
54188
|
-
const reader = openStoreReader();
|
|
54189
|
-
try {
|
|
54190
|
-
return resolveV2BoundaryUserMessage(reader, sessionID, endMessageID);
|
|
54191
|
-
} finally {
|
|
54192
|
-
reader.close();
|
|
54193
|
-
}
|
|
54194
|
-
}) : v2CompactionMarkerStrategy,
|
|
54195
|
-
transformMode: config.transform_mode,
|
|
54196
|
-
rustModeModuleClient,
|
|
54197
|
-
rustModeProjectRoot: directory,
|
|
54198
|
-
rustMemorySyncRequestedSessions,
|
|
54199
|
-
onRustModeParked: (sessionId, message) => pushNotification2("toast", {
|
|
54200
|
-
message: `Rust Magic Context paused: ${message}`,
|
|
54201
|
-
variant: "warning"
|
|
54202
|
-
}, sessionId),
|
|
54203
|
-
promptSurface: config.prompt_surface,
|
|
54204
|
-
promptSurfaceRuntime,
|
|
54205
|
-
onRustEngineReconnectRefusal: (refusal) => rustRefusalRecovery?.arm(refusal),
|
|
54206
|
-
...createHostSeams(context, readAllForConversion, pagedRead, liveModels)
|
|
54207
|
-
});
|
|
54182
|
+
transform = initializeTransform(db);
|
|
54208
54183
|
const admitted = new Set;
|
|
54209
54184
|
let messageTimes;
|
|
54210
54185
|
const reader = openStoreReader();
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ensureMemoryEmbeddings2
|
|
3
|
-
} from "./server-
|
|
4
|
-
import"./server-
|
|
3
|
+
} from "./server-6avtp9jp.js";
|
|
4
|
+
import"./server-yqek3s4k.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-4sn3at8p.js";
|
|
11
11
|
import"./server-ab1g0wn9.js";
|
|
12
12
|
import"./server-qjvk4a9t.js";
|
|
13
|
-
import"./server-
|
|
14
|
-
import"./server-
|
|
13
|
+
import"./server-awr8qa4c.js";
|
|
14
|
+
import"./server-6vd2n183.js";
|
|
15
15
|
import"./server-51779zs2.js";
|
|
16
16
|
import"./server-gyy4k6mf.js";
|
|
17
17
|
import"./server-3mz2qh5a.js";
|
|
@@ -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,aAAa,EAAE,MAAM,qCAAqC,CAAC;AA2B1F,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,6BAA6B,CAAC;AACvE,OAAO,EAGH,KAAK,oBAAoB,EAC5B,MAAM,qCAAqC,CAAC;AAG7C,OAAO,EACH,KAAK,QAAQ,EAKhB,MAAM,qBAAqB,CAAC;AA4B7B,OAAO,EAAkB,KAAK,aAAa,EAAqB,MAAM,iBAAiB,CAAC;AA+CxF,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAa,MAAM,SAAS,CAAC;AA8CpE,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,OAAO,GAAG,OAAO,CAQlE;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAChC,EAAE,EAAE,QAAQ,EACZ,MAAM,EAAE,IAAI,CAAC,aAAa,EAAE,kBAAkB,GAAG,eAAe,CAAC,EACjE,SAAS,EAAE,MAAM,GAClB,qBAAqB,GAAG,SAAS,CAanC;AAED;;;;;;;;;;GAUG;AACH,wBAAsB,uBAAuB,CACzC,OAAO,E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RowidMapBackfill2,
|
|
6
6
|
messageFtsOrdinalRangeIsMapped2,
|
|
7
|
-
getMessageFtsRowidMapBackfillProgress2,
|
|
8
7
|
deleteUnmappedMessageFtsRows2
|
|
9
|
-
} from "./server-
|
|
10
|
-
import"./server-
|
|
8
|
+
} from "./server-awr8qa4c.js";
|
|
9
|
+
import"./server-6vd2n183.js";
|
|
11
10
|
import"./server-51779zs2.js";
|
|
12
11
|
import"./server-gyy4k6mf.js";
|
|
13
12
|
import"./server-gzy5w8ya.js";
|
|
@@ -16,7 +15,6 @@ import"./server-pavzsdc6.js";
|
|
|
16
15
|
import"./server-cpjk5jd2.js";
|
|
17
16
|
export {
|
|
18
17
|
deleteUnmappedMessageFtsRows2 as deleteUnmappedMessageFtsRows,
|
|
19
|
-
getMessageFtsRowidMapBackfillProgress2 as getMessageFtsRowidMapBackfillProgress,
|
|
20
18
|
messageFtsOrdinalRangeIsMapped2 as messageFtsOrdinalRangeIsMapped,
|
|
21
19
|
recordIndexedMessageTime2 as recordIndexedMessageTime,
|
|
22
20
|
recordMessageFtsRowid2 as recordMessageFtsRowid,
|