@cortexkit/opencode-magic-context 0.49.79 → 0.49.80
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 +2 -2
- package/dist/{context-gb3gjahp.js → context-7rkrv5q8.js} +155 -61
- package/dist/{derive-budgets-def8genf.js → derive-budgets-2z6xxm7e.js} +1 -1
- package/dist/{embedding-backfill-rrmzvg7n.js → embedding-backfill-0tvprmrn.js} +1 -1
- package/dist/features/magic-context/memory/embedding-backfill.d.ts +4 -0
- package/dist/features/magic-context/memory/embedding-backfill.d.ts.map +1 -1
- package/dist/features/magic-context/search.d.ts.map +1 -1
- package/dist/{index-16h5fhem.js → index-177yv84k.js} +4 -6
- package/dist/{index-jfs6k0xk.js → index-9554nr2q.js} +6 -6
- package/dist/{index-sy5wbbw6.js → index-exvsw656.js} +2 -2
- package/dist/{index-tvkzkk4s.js → index-ezgeq2z7.js} +2 -2
- package/dist/{index-f619wjj9.js → index-hpmx99e9.js} +2 -2
- package/dist/{index-hgdkwp21.js → index-jhhkb4jv.js} +1 -1
- package/dist/{index-v8x07j6c.js → index-m4q6ptgz.js} +2 -2
- package/dist/{index-8ykmp4jv.js → index-mgvj4vkb.js} +2 -2
- package/dist/{index-ngwmx6nt.js → index-tky3j43e.js} +47 -5
- package/dist/{index-enpatj5k.js → index-v0epndb8.js} +7 -7
- package/dist/{index-2dadxknq.js → index-xjpemea9.js} +13 -17
- package/dist/{index-m0tbtzqh.js → index-zpd4pxnp.js} +10 -5
- package/dist/index.js +14 -14
- package/dist/raw-ordinal-warmup-worker.js +2 -2
- package/dist/{recomp-orchestrator-jf60eef6.js → recomp-orchestrator-n7h0a0tn.js} +5 -5
- package/dist/{search-archive-a60k0x2n.js → search-archive-p3jhx9wc.js} +2 -2
- package/dist/{search-mpde08f1.js → search-z56487n8.js} +3 -3
- package/dist/shared/models-dev-cache.d.ts +2 -0
- package/dist/shared/models-dev-cache.d.ts.map +1 -1
- package/dist/{store-j5rvve3v.js → store-8trkpmtx.js} +3 -1
- package/dist/{transform-postprocess-phase-m1be339w.js → transform-postprocess-phase-f0wssyce.js} +5 -5
- package/dist/v2/auto-search-worker.js +2 -2
- package/dist/v2/chunk-embedding-write-worker.js +2 -2
- package/dist/v2/{context-fzp6ynz4.js → context-r1swhysg.js} +156 -70
- package/dist/v2/{derive-budgets-z93fdnp7.js → derive-budgets-2eam671q.js} +2 -2
- package/dist/v2/{embedding-backfill-g9scycm5.js → embedding-backfill-qnaswpmb.js} +1 -1
- package/dist/v2/fold/native-replay.d.ts.map +1 -1
- package/dist/v2/fold/owner.d.ts +2 -4
- package/dist/v2/fold/owner.d.ts.map +1 -1
- package/dist/v2/fold/partial-boundary.d.ts +25 -0
- package/dist/v2/fold/partial-boundary.d.ts.map +1 -0
- package/dist/v2/hooks/context.d.ts.map +1 -1
- package/dist/v2/migration-worker.js +2 -2
- package/dist/v2/raw-ordinal-warmup-worker.js +2 -2
- package/dist/v2/{recomp-orchestrator-4r63zen2.js → recomp-orchestrator-4w2w4kd4.js} +8 -8
- package/dist/v2/{render-7tr9d67f.js → render-hwqk0d8t.js} +2 -2
- package/dist/v2/{search-archive-2ck9sbsc.js → search-archive-mdxzvgpm.js} +2 -2
- package/dist/v2/{search-y01mww69.js → search-eftsvbg7.js} +3 -3
- package/dist/v2/{server-kmaxv4g3.js → server-25qtxt4d.js} +6 -6
- package/dist/v2/{server-wc0bb04b.js → server-34pvhvxt.js} +8 -8
- package/dist/v2/{server-468mya5v.js → server-39bcszk4.js} +47 -1
- package/dist/v2/{server-r9xsgnez.js → server-76v5y7zm.js} +1 -1
- package/dist/v2/{server-9sf3qp02.js → server-bj779zmp.js} +1 -1
- package/dist/v2/{server-1svqwm7m.js → server-fqnty3nk.js} +6 -6
- package/dist/v2/{server-qpnjsg1v.js → server-ma9jwnas.js} +3 -3
- package/dist/v2/{server-2adwe0be.js → server-nqdzv8b7.js} +47 -5
- package/dist/v2/{server-tkznm2j9.js → server-pxdpwycq.js} +10 -5
- package/dist/v2/{server-aewxmvnf.js → server-rp52f40v.js} +1 -1
- package/dist/v2/{server-10af6m7d.js → server-x8ksqcw7.js} +4 -6
- package/dist/v2/{server-d7dbk2h6.js → server-zw1e3wq5.js} +1 -1
- package/dist/v2/server.js +4 -4
- package/dist/v2/{store-1fax2zhj.js → store-m3zny7q2.js} +4 -2
- package/dist/v2/{v2-archive-reader-jatkdt2s.js → v2-archive-reader-p89x05hj.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-z91sebhb.js → wrapup-orchestrator-0f4nwpbv.js} +8 -8
- package/dist/{v2-archive-reader-sw01917z.js → v2-archive-reader-vzmzb245.js} +1 -1
- package/dist/{wrapup-orchestrator-1k48hzxg.js → wrapup-orchestrator-5k9hgb3t.js} +6 -6
- package/package.json +1 -1
- package/src/shared/models-dev-cache.test.ts +67 -1
- package/src/shared/models-dev-cache.ts +71 -4
|
@@ -498,19 +498,19 @@ function promoteSessionFactsDurable(db, sessionId, projectPath, facts) {
|
|
|
498
498
|
}
|
|
499
499
|
async function embedPromotedFacts(db, sessionId, projectPath, refs) {
|
|
500
500
|
for (const ref of refs) {
|
|
501
|
-
await embedAndStoreMemory(db, sessionId, projectPath, ref.memoryId
|
|
501
|
+
await embedAndStoreMemory(db, sessionId, projectPath, ref.memoryId);
|
|
502
502
|
}
|
|
503
503
|
}
|
|
504
|
-
async function embedAndStoreMemory(db, sessionId, projectPath, memoryId
|
|
504
|
+
async function embedAndStoreMemory(db, sessionId, projectPath, memoryId) {
|
|
505
505
|
try {
|
|
506
|
-
const
|
|
507
|
-
if (!
|
|
506
|
+
const memory = getMemoryById2(db, memoryId);
|
|
507
|
+
if (!memory?.normalizedHash) {
|
|
508
508
|
return;
|
|
509
509
|
}
|
|
510
|
-
const result = await embedTextForProject2(projectPath, content);
|
|
510
|
+
const result = await embedTextForProject2(projectPath, memory.content);
|
|
511
511
|
if (result) {
|
|
512
512
|
db.transaction(() => {
|
|
513
|
-
saveEmbeddingIfHashMatches(db, memoryId, result.vector, result.modelId,
|
|
513
|
+
saveEmbeddingIfHashMatches(db, memoryId, result.vector, result.modelId, memory.normalizedHash);
|
|
514
514
|
}).immediate();
|
|
515
515
|
}
|
|
516
516
|
} catch (error) {
|
|
@@ -70,7 +70,7 @@ import {
|
|
|
70
70
|
deriveTriggerBudget2,
|
|
71
71
|
resolveHistorianProducerLimits2,
|
|
72
72
|
producerSourceLocalBudget2
|
|
73
|
-
} from "./index-
|
|
73
|
+
} from "./index-tky3j43e.js";
|
|
74
74
|
import {
|
|
75
75
|
withContentLanguageDirective,
|
|
76
76
|
buildPrimaryLanguageDirective,
|
|
@@ -293,7 +293,7 @@ import {
|
|
|
293
293
|
userFacingFailureCode,
|
|
294
294
|
promoteSessionFactsDurable,
|
|
295
295
|
embedPromotedFacts
|
|
296
|
-
} from "./index-
|
|
296
|
+
} from "./index-9554nr2q.js";
|
|
297
297
|
import {
|
|
298
298
|
isMarkerCandidateBasisCurrent2,
|
|
299
299
|
invalidateMarkerCandidateBasis2,
|
|
@@ -35,14 +35,14 @@ import {
|
|
|
35
35
|
getActiveCompartmentRun,
|
|
36
36
|
markActiveCompartmentRunPublished,
|
|
37
37
|
registerActiveCompartmentRun
|
|
38
|
-
} from "./index-
|
|
38
|
+
} from "./index-exvsw656.js";
|
|
39
39
|
import {
|
|
40
40
|
sendStatusNotification2
|
|
41
41
|
} from "./index-1sq1krqw.js";
|
|
42
42
|
import {
|
|
43
43
|
setRecompStarting2,
|
|
44
44
|
setRecompTerminal2
|
|
45
|
-
} from "./index-
|
|
45
|
+
} from "./index-hpmx99e9.js";
|
|
46
46
|
|
|
47
47
|
// src/hooks/magic-context/wrapup-orchestrator.ts
|
|
48
48
|
import * as crypto from "node:crypto";
|
|
@@ -10,11 +10,11 @@ import {
|
|
|
10
10
|
} from "./index-xsdaz3mq.js";
|
|
11
11
|
import {
|
|
12
12
|
executeContextRecomp
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-exvsw656.js";
|
|
14
14
|
import {
|
|
15
15
|
renderUserFacingFailure,
|
|
16
16
|
userFacingFailureCode
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-9554nr2q.js";
|
|
18
18
|
|
|
19
19
|
// src/hooks/magic-context/recomp-orchestrator.ts
|
|
20
20
|
function resolveLiveModelKey(liveSessionState, sessionId) {
|
|
@@ -138,10 +138,10 @@ async function serveV2ArchiveReads2(port, openConnections) {
|
|
|
138
138
|
] = await Promise.all([
|
|
139
139
|
import("./sqlite-zdgm52sv.js"),
|
|
140
140
|
import("./store-reader-3eh1s1m8.js"),
|
|
141
|
-
import("./store-
|
|
141
|
+
import("./store-8trkpmtx.js"),
|
|
142
142
|
import("./read-session-chunk-s3qac56g.js"),
|
|
143
143
|
import("./render-bjxgkrk6.js"),
|
|
144
|
-
import("./search-archive-
|
|
144
|
+
import("./search-archive-p3jhx9wc.js"),
|
|
145
145
|
import("./expand-attachments-h33jbgyz.js")
|
|
146
146
|
]);
|
|
147
147
|
const pool = new V2StoreReaderPool;
|
|
@@ -240,7 +240,7 @@ import {
|
|
|
240
240
|
} from "./index-qt1qqasc.js";
|
|
241
241
|
import {
|
|
242
242
|
userFacingFailureCode
|
|
243
|
-
} from "./index-
|
|
243
|
+
} from "./index-9554nr2q.js";
|
|
244
244
|
import {
|
|
245
245
|
getMessageIndexEpoch,
|
|
246
246
|
isMessageIndexSearchable,
|
|
@@ -285,7 +285,7 @@ import {
|
|
|
285
285
|
peekNoteNudgeText,
|
|
286
286
|
markNoteNudgeDelivered,
|
|
287
287
|
getActiveCompartmentRun
|
|
288
|
-
} from "./index-
|
|
288
|
+
} from "./index-exvsw656.js";
|
|
289
289
|
import {
|
|
290
290
|
getErrorMessage
|
|
291
291
|
} from "./index-y8v6yerm.js";
|
|
@@ -233,6 +233,8 @@ var outputReserveConfig;
|
|
|
233
233
|
var reserveClampLogSeen = new Set;
|
|
234
234
|
var apiCache = null;
|
|
235
235
|
var apiLoadedAt = 0;
|
|
236
|
+
var v2DraftModelLimits = new Map;
|
|
237
|
+
var v2DraftModelLimitLogged = new Set;
|
|
236
238
|
var persistSeedLoaded = false;
|
|
237
239
|
function persistFilePath() {
|
|
238
240
|
return join(getMagicContextStorageDir(), `model-context-limits-${getHarness2()}.json`);
|
|
@@ -416,6 +418,7 @@ async function refreshModelLimitsOnce(client) {
|
|
|
416
418
|
}
|
|
417
419
|
const previousSize = apiCache?.size ?? null;
|
|
418
420
|
apiCache = map;
|
|
421
|
+
v2DraftModelLimits.clear();
|
|
419
422
|
apiLoadedAt = Date.now();
|
|
420
423
|
persistApiCache();
|
|
421
424
|
if (previousSize === null) {
|
|
@@ -429,9 +432,49 @@ async function refreshModelLimitsOnce(client) {
|
|
|
429
432
|
return false;
|
|
430
433
|
}
|
|
431
434
|
}
|
|
432
|
-
function
|
|
435
|
+
function useV2DraftModelLimits(providerID, modelID, limit) {
|
|
433
436
|
loadPersistedApiCacheOnce();
|
|
434
|
-
const
|
|
437
|
+
const key = `${providerID}/${modelID}`;
|
|
438
|
+
const cached = lookupMetadataWithTagFallback(apiCache, providerID, modelID);
|
|
439
|
+
const valid = (value) => isFinitePositive2(value) && value <= MAX_SANE_LIMIT ? value : undefined;
|
|
440
|
+
const draft = {
|
|
441
|
+
context: valid(limit?.context),
|
|
442
|
+
input: valid(limit?.input),
|
|
443
|
+
output: valid(limit?.output)
|
|
444
|
+
};
|
|
445
|
+
const geometry = (raw) => deriveWindowGeometry(providerID, modelID, raw, {
|
|
446
|
+
outputReserveOverride: resolveOutputReserve(providerID, modelID),
|
|
447
|
+
harness: "opencode"
|
|
448
|
+
})?.usableSoft;
|
|
449
|
+
const draftWindow = geometry(draft);
|
|
450
|
+
const merged = {
|
|
451
|
+
context: cached?.contextLimit ?? draft.context ?? cached?.limit,
|
|
452
|
+
input: cached?.inputLimit ?? draft.input,
|
|
453
|
+
output: cached?.outputLimit ?? draft.output
|
|
454
|
+
};
|
|
455
|
+
const window = geometry(merged);
|
|
456
|
+
if (window === undefined || window <= 0 || draftWindow !== undefined && window > draftWindow)
|
|
457
|
+
return false;
|
|
458
|
+
if (merged.context !== (cached?.contextLimit ?? cached?.limit) || merged.input !== cached?.inputLimit || merged.output !== cached?.outputLimit) {
|
|
459
|
+
v2DraftModelLimits.set(key, {
|
|
460
|
+
contextLimit: merged.context,
|
|
461
|
+
inputLimit: merged.input,
|
|
462
|
+
outputLimit: merged.output
|
|
463
|
+
});
|
|
464
|
+
} else
|
|
465
|
+
v2DraftModelLimits.delete(key);
|
|
466
|
+
if (!v2DraftModelLimitLogged.has(key)) {
|
|
467
|
+
v2DraftModelLimitLogged.add(key);
|
|
468
|
+
sessionLog2("global", `v2 model catalog lookup failed for ${key}; using selected model limits`);
|
|
469
|
+
}
|
|
470
|
+
return true;
|
|
471
|
+
}
|
|
472
|
+
function windowMetadata(providerID, modelID) {
|
|
473
|
+
loadPersistedApiCacheOnce();
|
|
474
|
+
return (getHarness2() === "opencode2" ? v2DraftModelLimits.get(`${providerID}/${modelID}`) : undefined) ?? lookupMetadataWithTagFallback(apiCache, providerID, modelID);
|
|
475
|
+
}
|
|
476
|
+
function getSdkWindowGeometry(providerID, modelID, detectedContextLimit, options) {
|
|
477
|
+
const metadata = windowMetadata(providerID, modelID);
|
|
435
478
|
if (!metadata)
|
|
436
479
|
return;
|
|
437
480
|
const rawContext = metadata.contextLimit ?? metadata.limit;
|
|
@@ -460,8 +503,7 @@ function getSdkContextLimit(providerID, modelID, detectedContextLimit, options)
|
|
|
460
503
|
detectedLimitProvenance: options?.detectedLimitProvenance
|
|
461
504
|
})?.usableSoft;
|
|
462
505
|
}
|
|
463
|
-
|
|
464
|
-
const metadata = lookupMetadataWithTagFallback(apiCache, providerID, modelID);
|
|
506
|
+
const metadata = windowMetadata(providerID, modelID);
|
|
465
507
|
if (!metadata)
|
|
466
508
|
return;
|
|
467
509
|
const rawContext = metadata.contextLimit ?? metadata.limit;
|
|
@@ -589,4 +631,4 @@ function producerSourceLocalBudget2(providerTokens, modelKey) {
|
|
|
589
631
|
return ratio === 1 ? providerTokens : localBudget(providerTokens, ratio);
|
|
590
632
|
}
|
|
591
633
|
|
|
592
|
-
export { catalogOutputReserve, hasTrustedAbsoluteWall, applyProvenInputFloor, formatWindowDerivationLine, isSaneLimit, setOutputReserveConfig, resolveLimit, refreshModelLimitsFromApi, refreshModelLimitsAfterAuthOnce, getSdkWindowGeometry, getSdkContextLimit, modelSupportsVision, getSdkOutputLimit, getModelsDevCacheState, deriveTriggerBudget2, deriveHistorianChunkTokens2, resolveKnownHistorianContextLimit2, resolveHistorianProducerLimits2, resolveHistorianContextLimit2, producerSourceLocalBudget2 };
|
|
634
|
+
export { catalogOutputReserve, hasTrustedAbsoluteWall, applyProvenInputFloor, formatWindowDerivationLine, isSaneLimit, setOutputReserveConfig, resolveLimit, refreshModelLimitsFromApi, refreshModelLimitsAfterAuthOnce, useV2DraftModelLimits, getSdkWindowGeometry, getSdkContextLimit, modelSupportsVision, getSdkOutputLimit, getModelsDevCacheState, deriveTriggerBudget2, deriveHistorianChunkTokens2, resolveKnownHistorianContextLimit2, resolveHistorianProducerLimits2, resolveHistorianContextLimit2, producerSourceLocalBudget2 };
|
|
@@ -427,7 +427,7 @@ function rawMessages(rows, history = rows) {
|
|
|
427
427
|
return ordinals.get(row.id) ?? 0;
|
|
428
428
|
});
|
|
429
429
|
}
|
|
430
|
-
function
|
|
430
|
+
function rawMessagePage2(rows, afterOrdinal) {
|
|
431
431
|
return projectRawMessages(rows, (_row, index) => afterOrdinal + index + 1);
|
|
432
432
|
}
|
|
433
433
|
var SERVED_BOUNDARY_PAGE = 50;
|
|
@@ -458,7 +458,7 @@ function resolveV2BoundaryUserMessage2(reader, sessionID, endMessageID) {
|
|
|
458
458
|
const rows = reader.rawRowsThrough(sessionID, through, SERVED_BOUNDARY_PAGE);
|
|
459
459
|
const user = rows.find((row) => row.type !== "assistant");
|
|
460
460
|
if (user)
|
|
461
|
-
return
|
|
461
|
+
return rawMessagePage2([user], 0)[0] ?? null;
|
|
462
462
|
const oldest = rows.at(-1);
|
|
463
463
|
if (rows.length < SERVED_BOUNDARY_PAGE || !oldest)
|
|
464
464
|
return null;
|
|
@@ -481,7 +481,7 @@ function* readV2RawMessagePagesForConversion2(openReader, sessionID, pageRows =
|
|
|
481
481
|
let ordinal = 0;
|
|
482
482
|
for (;; ) {
|
|
483
483
|
const page = reader.page(sessionID, { after, limit: pageRows });
|
|
484
|
-
const messages =
|
|
484
|
+
const messages = rawMessagePage2(page.rows, ordinal);
|
|
485
485
|
ordinal += messages.length;
|
|
486
486
|
if (messages.length > 0)
|
|
487
487
|
yield messages;
|
|
@@ -516,7 +516,7 @@ function createV2RawMessageReader2(openReader, storePath, releaseReader = (reade
|
|
|
516
516
|
readPage: (sessionID, afterOrdinal, limit, finalWatermark, after) => {
|
|
517
517
|
const reader = openReader();
|
|
518
518
|
try {
|
|
519
|
-
return
|
|
519
|
+
return rawMessagePage2(reader.messagePage(sessionID, afterOrdinal, limit, finalWatermark, after), afterOrdinal);
|
|
520
520
|
} finally {
|
|
521
521
|
releaseReader(reader);
|
|
522
522
|
}
|
|
@@ -528,7 +528,7 @@ function createV2RawMessageReader2(openReader, storePath, releaseReader = (reade
|
|
|
528
528
|
const row = reader.messageById(sessionID, messageID);
|
|
529
529
|
if (ordinal === null || row === null)
|
|
530
530
|
return null;
|
|
531
|
-
return
|
|
531
|
+
return rawMessagePage2([row], ordinal - 1)[0] ?? null;
|
|
532
532
|
} finally {
|
|
533
533
|
releaseReader(reader);
|
|
534
534
|
}
|
|
@@ -537,7 +537,7 @@ function createV2RawMessageReader2(openReader, storePath, releaseReader = (reade
|
|
|
537
537
|
const reader = openReader();
|
|
538
538
|
try {
|
|
539
539
|
const row = reader.messageById(sessionID, messageID);
|
|
540
|
-
return row ?
|
|
540
|
+
return row ? rawMessagePage2([row], 0)[0] ?? null : null;
|
|
541
541
|
} finally {
|
|
542
542
|
releaseReader(reader);
|
|
543
543
|
}
|
|
@@ -637,4 +637,4 @@ function createV2RawMessageProvider2(reader, sessionID) {
|
|
|
637
637
|
};
|
|
638
638
|
}
|
|
639
639
|
|
|
640
|
-
export { STORAGE_NOTICE_PREFIX, formatStorageRefusalNotice, formatStorageRecoveryNotice, hasStorageNoticeShape, dropStorageNotices, rememberHostMedia, hostMediaAsset, hostMediaFromEncoded, HOST_RESTORE_MEDIA, restoreRow, isToolError, toolErrorText, toolStateContent, servedBoundaryRow2, resolveV2BoundaryUserMessage2, readAllV2RawMessagesForConversion2, readV2RawMessagePagesForConversion2, createV2RawMessageReader2, createV2RawMessageProvider2 };
|
|
640
|
+
export { STORAGE_NOTICE_PREFIX, formatStorageRefusalNotice, formatStorageRecoveryNotice, hasStorageNoticeShape, dropStorageNotices, rememberHostMedia, hostMediaAsset, hostMediaFromEncoded, HOST_RESTORE_MEDIA, restoreRow, isToolError, toolErrorText, toolStateContent, rawMessagePage2, servedBoundaryRow2, resolveV2BoundaryUserMessage2, readAllV2RawMessagesForConversion2, readV2RawMessagePagesForConversion2, createV2RawMessageReader2, createV2RawMessageProvider2 };
|
|
@@ -196,7 +196,7 @@ import {
|
|
|
196
196
|
snapRangeToCompartments,
|
|
197
197
|
getActiveCompartmentRun,
|
|
198
198
|
startCompartmentAgent
|
|
199
|
-
} from "./index-
|
|
199
|
+
} from "./index-exvsw656.js";
|
|
200
200
|
import {
|
|
201
201
|
hasTrustedAbsoluteWall,
|
|
202
202
|
applyProvenInputFloor,
|
|
@@ -208,7 +208,7 @@ import {
|
|
|
208
208
|
deriveTriggerBudget2,
|
|
209
209
|
resolveKnownHistorianContextLimit2,
|
|
210
210
|
resolveHistorianProducerLimits2
|
|
211
|
-
} from "./index-
|
|
211
|
+
} from "./index-tky3j43e.js";
|
|
212
212
|
import {
|
|
213
213
|
resolveModelCalibration,
|
|
214
214
|
calibrateBuckets,
|
|
@@ -657,7 +657,7 @@ import {
|
|
|
657
657
|
readGitFileChangeTimesSince,
|
|
658
658
|
verificationFileExists,
|
|
659
659
|
normalizeVerificationFiles
|
|
660
|
-
} from "./index-
|
|
660
|
+
} from "./index-9554nr2q.js";
|
|
661
661
|
import {
|
|
662
662
|
computeCueContentHash,
|
|
663
663
|
hasMuralCueColumns,
|
|
@@ -704,7 +704,7 @@ import {
|
|
|
704
704
|
resolveMemoriesByIdsForSearch2,
|
|
705
705
|
unifiedSearch2,
|
|
706
706
|
formatSearchResults2
|
|
707
|
-
} from "./index-
|
|
707
|
+
} from "./index-zpd4pxnp.js";
|
|
708
708
|
import {
|
|
709
709
|
scheduleReconciliation,
|
|
710
710
|
scheduleIncrementalIndex,
|
|
@@ -720,7 +720,7 @@ import {
|
|
|
720
720
|
import {
|
|
721
721
|
setRecompStarting2,
|
|
722
722
|
setRecompTerminal2
|
|
723
|
-
} from "./index-
|
|
723
|
+
} from "./index-hpmx99e9.js";
|
|
724
724
|
import {
|
|
725
725
|
makeToolCompositeKey,
|
|
726
726
|
searchMessageHistoryOffThread,
|
|
@@ -805,7 +805,7 @@ import {
|
|
|
805
805
|
abortSessionFailClosed2,
|
|
806
806
|
evaluateEmergencyFailClosed2,
|
|
807
807
|
runPostTransformPhase2
|
|
808
|
-
} from "./index-
|
|
808
|
+
} from "./index-mgvj4vkb.js";
|
|
809
809
|
import {
|
|
810
810
|
ANNOUNCEMENT_VERSION2,
|
|
811
811
|
ANNOUNCEMENT_FEATURES2,
|
|
@@ -823,10 +823,10 @@ import {
|
|
|
823
823
|
} from "./index-twmeey4h.js";
|
|
824
824
|
import {
|
|
825
825
|
readV2ArchiveOffThread2
|
|
826
|
-
} from "./index-
|
|
826
|
+
} from "./index-m4q6ptgz.js";
|
|
827
827
|
import {
|
|
828
828
|
renderSearchArchiveOffThread2
|
|
829
|
-
} from "./index-
|
|
829
|
+
} from "./index-jhhkb4jv.js";
|
|
830
830
|
import {
|
|
831
831
|
COMPACTION_ENABLED_PATH,
|
|
832
832
|
isDreamerRunnable,
|
|
@@ -11231,11 +11231,7 @@ async function runAgenticTask(config, ctx, helpers) {
|
|
|
11231
11231
|
if (task === "maintain-docs" && hasCurrentDocsProposal(docsDir)) {
|
|
11232
11232
|
const reason = "pending proposal matches current docs";
|
|
11233
11233
|
helpers.recordRun("completed", null, { progress: reason });
|
|
11234
|
-
return {
|
|
11235
|
-
status: "completed",
|
|
11236
|
-
detail: reason,
|
|
11237
|
-
...changes ? { schedulePatch: { taskStateJson: JSON.stringify({ head: changes.head }) } } : {}
|
|
11238
|
-
};
|
|
11234
|
+
return { status: "completed", detail: reason };
|
|
11239
11235
|
}
|
|
11240
11236
|
const curateChunks = curateMemories ? chunkCurateMemories(curateMemories, Math.max(4000, Math.floor(resolveRetrospectiveUsableInputTokens(config, deps) * 2))) : [];
|
|
11241
11237
|
const batches = task === "curate" ? curateChunks : [{ memories: [], crossChunkCandidates: [] }];
|
|
@@ -16567,7 +16563,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
16567
16563
|
return { count: buildCompartmentCount(db, sessionId, moduleStatus) };
|
|
16568
16564
|
});
|
|
16569
16565
|
const buildManagedCtx = async (db) => {
|
|
16570
|
-
const { deriveHistorianChunkTokens, resolveHistorianContextLimit } = await importPluginModule(() => import("./derive-budgets-
|
|
16566
|
+
const { deriveHistorianChunkTokens, resolveHistorianContextLimit } = await importPluginModule(() => import("./derive-budgets-2z6xxm7e.js"));
|
|
16571
16567
|
const { resolveHistorianModel } = await importPluginModule(() => import("./model-resolution-280gmqvd.js"));
|
|
16572
16568
|
const { userObservationCollectionEnabled, userObservationsRequested } = await importPluginModule(() => import("./task-config-t6bpyka7.js"));
|
|
16573
16569
|
const DEFAULT_HISTORIAN_TIMEOUT_MS = 10 * 60 * 1000;
|
|
@@ -16619,7 +16615,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
16619
16615
|
const db = readDatabase();
|
|
16620
16616
|
if (!db)
|
|
16621
16617
|
return { ok: false, error: "db unavailable" };
|
|
16622
|
-
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-
|
|
16618
|
+
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-n7h0a0tn.js"));
|
|
16623
16619
|
const { sendIgnoredMessage } = await importPluginModule(() => import("./send-session-notification-ykvt5k2s.js"));
|
|
16624
16620
|
log2(`[rpc] recomp requested for session ${sessionId}`);
|
|
16625
16621
|
if (!args.client && !args.hiddenCompletionExecutor) {
|
|
@@ -16704,7 +16700,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
16704
16700
|
const db = readDatabase();
|
|
16705
16701
|
if (!db)
|
|
16706
16702
|
return { ok: false, error: "db unavailable" };
|
|
16707
|
-
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-
|
|
16703
|
+
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-5k9hgb3t.js"));
|
|
16708
16704
|
const model = await args.readSelectedSessionModel?.(sessionId) ?? liveSessionState.liveModelBySession.get(sessionId);
|
|
16709
16705
|
const window = resolveOpenCodeWrapupWindow(db, sessionId, model);
|
|
16710
16706
|
if (!window)
|
|
@@ -30791,4 +30787,4 @@ function applyHiddenSubagentTemperature(input, output, log) {
|
|
|
30791
30787
|
output.temperature = temperature;
|
|
30792
30788
|
}
|
|
30793
30789
|
|
|
30794
|
-
export { logConfigDependencyNotesOnce, openOpenCodeDb, DREAMER_SYSTEM_PROMPT, runSessionProjectBackfill, SMART_NOTE_COMPILER_SYSTEM_PROMPT, createLiveSessionState, RETROSPECTIVE_MAX_USER_MESSAGE_CHARS, RETROSPECTIVE_MESSAGE_TRUNCATION_MARKER, OpenCodeRetrospectiveRawProvider, createDreamTaskExecutor, runManualDream, runDueTasksForProject, startDreamScheduleTimer, createDreamTimerModuleClient, ensureProjectRegisteredFromOpenCodeDirectory, recordOpenCodeProvenInputFloor, resolveOpenCodeProvenInputFloor, resolveContextWindowGeometry, resolveContextLimit, WRAPUP_WINDOW_UNAVAILABLE, resolveOpenCodeWrapupWindow, resolveExecuteThresholdDetail, resolveModelKey, resolveSessionId, parseCacheTtl, createScheduler, computeHardCacheExpired, describeStorageUnavailability, resolveSessionCacheTtl, runEmbedHistoryDrain, pauseEmbedHistoryDrain, formatEmbedStatusText, getSessionProperties, getSessionCreatedInfo, getMessageUpdatedAssistantInfo, getMessageUpdatedInfo, getSessionErrorInfo, getMessageRemovedInfo, summarizeManualDream, createMagicContextCommandHandler, getLiveNotificationParams, createChatMessageHook, createEventHook, createCommandExecuteBeforeHook, createToolExecuteAfterHook, recordHiddenVariantWarning, buildStatusDetail, isDebugRpcEnabled, registerRpcHandlers, maybeAutoEmbedSessionBackfill, clearTransformDecisionSession, scheduleOpenCodeTransformDecisionWrite, stageOpenCodeV2TransformDecision, bindOpenCodeV2TransformDecision, maybeDeliverChannel2, createM0RenderOptions, lkgReplayLimit, measureLkgReplay, STORAGE_BUSY_MESSAGE, StorageBusyRefusalError, bindSystemDateRequestIdentity, bindSystemDateOutput, registerSystemDateRefresh, rustWrapupHistorianFields, isClearlyOverWindow, UnmanagedOverWindowError, UnresolvedHistoryBoundaryError, clearMessageTokensCache, createTransform, createSubcModuleClient, createModuleToolBackends, createRustRefusalRecovery, createSystemPromptHashHandler, tryMessagesTransformLkgReplay, createMessagesTransformHandler, primaryOnlyToolIds, subagentToolRefusal, guardSubagentTools, hideSubagentTools, removePrimaryOnlyTools, storedSubagentMode, createCtxExpandTools, CTX_MEMORY_LIST_TOOL_NAME, CTX_MEMORY_ACTIONS, createCtxMemoryTools, createCtxMemoryListTools, CTX_NOTE_DESCRIPTION, withoutSmartNoteText, createCtxNoteTools, createCtxReduceTools, createCtxSearchTools, parameterDescriptionsFor, applyJsonSchemaParameterDescriptions, MagicContextRpcServer, subagentTemperature, applyHiddenSubagentTemperature };
|
|
30790
|
+
export { logConfigDependencyNotesOnce, openOpenCodeDb, DREAMER_SYSTEM_PROMPT, runSessionProjectBackfill, SMART_NOTE_COMPILER_SYSTEM_PROMPT, createLiveSessionState, RETROSPECTIVE_MAX_USER_MESSAGE_CHARS, RETROSPECTIVE_MESSAGE_TRUNCATION_MARKER, OpenCodeRetrospectiveRawProvider, createDreamTaskExecutor, runManualDream, runDueTasksForProject, startDreamScheduleTimer, createDreamTimerModuleClient, ensureProjectRegisteredFromOpenCodeDirectory, recordOpenCodeProvenInputFloor, resolveOpenCodeProvenInputFloor, resolveContextWindowGeometry, resolveContextLimit, WRAPUP_WINDOW_UNAVAILABLE, resolveOpenCodeWrapupWindow, resolveExecuteThresholdDetail, resolveModelKey, resolveSessionId, parseCacheTtl, createScheduler, computeHardCacheExpired, describeStorageUnavailability, resolveSessionCacheTtl, runEmbedHistoryDrain, pauseEmbedHistoryDrain, formatEmbedStatusText, getSessionProperties, getSessionCreatedInfo, getMessageUpdatedAssistantInfo, getMessageUpdatedInfo, getSessionErrorInfo, getMessageRemovedInfo, summarizeManualDream, createMagicContextCommandHandler, getLiveNotificationParams, createChatMessageHook, createEventHook, createCommandExecuteBeforeHook, createToolExecuteAfterHook, recordHiddenVariantWarning, buildStatusDetail, isDebugRpcEnabled, registerRpcHandlers, maybeAutoEmbedSessionBackfill, clearTransformDecisionSession, scheduleOpenCodeTransformDecisionWrite, stageOpenCodeV2TransformDecision, bindOpenCodeV2TransformDecision, maybeDeliverChannel2, createM0RenderOptions, lkgReplayLimit, measureLkgReplay, moduleRawBlockMappings, STORAGE_BUSY_MESSAGE, StorageBusyRefusalError, bindSystemDateRequestIdentity, bindSystemDateOutput, registerSystemDateRefresh, rustWrapupHistorianFields, isClearlyOverWindow, UnmanagedOverWindowError, UnresolvedHistoryBoundaryError, clearMessageTokensCache, createTransform, createSubcModuleClient, createModuleToolBackends, createRustRefusalRecovery, createSystemPromptHashHandler, tryMessagesTransformLkgReplay, createMessagesTransformHandler, primaryOnlyToolIds, subagentToolRefusal, guardSubagentTools, hideSubagentTools, removePrimaryOnlyTools, storedSubagentMode, createCtxExpandTools, CTX_MEMORY_LIST_TOOL_NAME, CTX_MEMORY_ACTIONS, createCtxMemoryTools, createCtxMemoryListTools, CTX_NOTE_DESCRIPTION, withoutSmartNoteText, createCtxNoteTools, createCtxReduceTools, createCtxSearchTools, parameterDescriptionsFor, applyJsonSchemaParameterDescriptions, MagicContextRpcServer, subagentTemperature, applyHiddenSubagentTemperature };
|
|
@@ -54,7 +54,7 @@ import {
|
|
|
54
54
|
sanitizeFtsQuery,
|
|
55
55
|
searchMemoriesFTS,
|
|
56
56
|
searchMemoriesFTSUnion
|
|
57
|
-
} from "./index-
|
|
57
|
+
} from "./index-9554nr2q.js";
|
|
58
58
|
import {
|
|
59
59
|
ModuleMemoryAuthorityError2,
|
|
60
60
|
getMemoriesByProject2,
|
|
@@ -74,7 +74,7 @@ import {
|
|
|
74
74
|
} from "./index-m6rkq3t4.js";
|
|
75
75
|
import {
|
|
76
76
|
ensureMemoryEmbeddings2
|
|
77
|
-
} from "./index-
|
|
77
|
+
} from "./index-177yv84k.js";
|
|
78
78
|
import {
|
|
79
79
|
MESSAGE_FTS_SESSION_FILTER_SQL,
|
|
80
80
|
withMessageFtsSessionFilter
|
|
@@ -2140,17 +2140,19 @@ async function getSemanticScores(args) {
|
|
|
2140
2140
|
if (!args.queryEmbedding || args.memories.length === 0 || !args.queryModelId || args.queryModelId === "off") {
|
|
2141
2141
|
return semanticScores;
|
|
2142
2142
|
}
|
|
2143
|
+
const expectedEmbedding = { modelId: args.queryModelId, generation: args.queryGeneration };
|
|
2143
2144
|
if (!args.workspace?.isWorkspaced) {
|
|
2144
2145
|
const cachedEmbeddings = getProjectEmbeddings2(args.db, args.projectPath, args.queryModelId);
|
|
2145
2146
|
const embeddings = args.backfillMemoryEmbeddings === false ? cachedEmbeddings : await ensureMemoryEmbeddings2({
|
|
2146
2147
|
db: args.db,
|
|
2147
2148
|
projectIdentity: args.projectPath,
|
|
2148
2149
|
memories: args.memories,
|
|
2149
|
-
existingEmbeddings: cachedEmbeddings
|
|
2150
|
+
existingEmbeddings: cachedEmbeddings,
|
|
2151
|
+
expectedEmbedding
|
|
2150
2152
|
});
|
|
2151
2153
|
for (const memory of args.memories) {
|
|
2152
2154
|
const memoryEmbedding = embeddings.get(memory.id);
|
|
2153
|
-
if (!memoryEmbedding) {
|
|
2155
|
+
if (!memoryEmbedding || memoryEmbedding.modelId !== args.queryModelId) {
|
|
2154
2156
|
continue;
|
|
2155
2157
|
}
|
|
2156
2158
|
semanticScores.set(memory.id, normalizeCosineScore(cosineSimilarity(args.queryEmbedding, memoryEmbedding.embedding)));
|
|
@@ -2174,7 +2176,8 @@ async function getSemanticScores(args) {
|
|
|
2174
2176
|
db: args.db,
|
|
2175
2177
|
projectIdentity: args.projectPath,
|
|
2176
2178
|
memories: ownMemories,
|
|
2177
|
-
existingEmbeddings: ownEmbeddings
|
|
2179
|
+
existingEmbeddings: ownEmbeddings,
|
|
2180
|
+
expectedEmbedding
|
|
2178
2181
|
});
|
|
2179
2182
|
}
|
|
2180
2183
|
for (const identity of workspace.identities) {
|
|
@@ -2302,6 +2305,7 @@ async function searchMemories(args) {
|
|
|
2302
2305
|
backfillMemoryEmbeddings: args.backfillMemoryEmbeddings,
|
|
2303
2306
|
queryEmbedding: args.queryEmbedding,
|
|
2304
2307
|
queryModelId: args.queryModelId,
|
|
2308
|
+
queryGeneration: args.queryGeneration,
|
|
2305
2309
|
workspace: args.workspace
|
|
2306
2310
|
});
|
|
2307
2311
|
const sourceNameByMemoryId = sourceNamesForSearchMemories({
|
|
@@ -3204,6 +3208,7 @@ async function unifiedSearch2(db, sessionId, projectPath, query, options = {}) {
|
|
|
3204
3208
|
memoryEnabled: true,
|
|
3205
3209
|
queryEmbedding,
|
|
3206
3210
|
queryModelId: embeddingModelId && embeddingModelId !== "off" ? embeddingModelId : null,
|
|
3211
|
+
queryGeneration: queryContract?.generation ?? embeddingSnapshot?.generation,
|
|
3207
3212
|
workspace,
|
|
3208
3213
|
visibleMemoryIds: options.visibleMemoryIds,
|
|
3209
3214
|
backfillMemoryEmbeddings: options.backfillMemoryEmbeddings,
|
package/dist/index.js
CHANGED
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
checkCompactionMarkerConsistency,
|
|
59
59
|
clearInjectionCache,
|
|
60
60
|
clearNoteNudgeTriggerOnly
|
|
61
|
-
} from "./index-
|
|
61
|
+
} from "./index-exvsw656.js";
|
|
62
62
|
import"./index-sd3egckz.js";
|
|
63
63
|
import {
|
|
64
64
|
hasTrustedAbsoluteWall,
|
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
deriveHistorianChunkTokens2,
|
|
69
69
|
resolveKnownHistorianContextLimit2,
|
|
70
70
|
resolveHistorianContextLimit2
|
|
71
|
-
} from "./index-
|
|
71
|
+
} from "./index-tky3j43e.js";
|
|
72
72
|
import {
|
|
73
73
|
buildDreamTaskRuntimeConfigs2,
|
|
74
74
|
userMemoryCollectionEnabled2,
|
|
@@ -145,7 +145,7 @@ import {
|
|
|
145
145
|
parameterDescriptionsFor,
|
|
146
146
|
MagicContextRpcServer,
|
|
147
147
|
applyHiddenSubagentTemperature
|
|
148
|
-
} from "./index-
|
|
148
|
+
} from "./index-xjpemea9.js";
|
|
149
149
|
import {
|
|
150
150
|
resolveOpenCodeDbPath,
|
|
151
151
|
openCodeDbPathExists,
|
|
@@ -232,7 +232,7 @@ import"./index-pxnzyvjc.js";
|
|
|
232
232
|
import {
|
|
233
233
|
getDefaultSubcConnectionFile,
|
|
234
234
|
SubcModuleTransport
|
|
235
|
-
} from "./index-
|
|
235
|
+
} from "./index-zpd4pxnp.js";
|
|
236
236
|
import"./index-qt1qqasc.js";
|
|
237
237
|
import"./index-e6ncz7a6.js";
|
|
238
238
|
import {
|
|
@@ -306,8 +306,8 @@ import {
|
|
|
306
306
|
getEmbeddingCoverageStatus2
|
|
307
307
|
} from "./index-yfn52pb6.js";
|
|
308
308
|
import"./index-4dhv7mqz.js";
|
|
309
|
-
import"./index-
|
|
310
|
-
import"./index-
|
|
309
|
+
import"./index-9554nr2q.js";
|
|
310
|
+
import"./index-177yv84k.js";
|
|
311
311
|
import"./index-jjvbk92s.js";
|
|
312
312
|
import"./index-832w615x.js";
|
|
313
313
|
import {
|
|
@@ -319,13 +319,13 @@ import {
|
|
|
319
319
|
armBindingRecoverySafely,
|
|
320
320
|
collectForeignTextParts,
|
|
321
321
|
resetDegradedCacheCount2
|
|
322
|
-
} from "./index-
|
|
322
|
+
} from "./index-mgvj4vkb.js";
|
|
323
323
|
import {
|
|
324
324
|
scheduleClearAndReindex
|
|
325
325
|
} from "./index-m6rkq3t4.js";
|
|
326
326
|
import {
|
|
327
327
|
runManagedRecomp2
|
|
328
|
-
} from "./index-
|
|
328
|
+
} from "./index-hpmx99e9.js";
|
|
329
329
|
import {
|
|
330
330
|
isValidSemver,
|
|
331
331
|
compareSemverCore
|
|
@@ -333,11 +333,11 @@ import {
|
|
|
333
333
|
import"./index-fmsr7v69.js";
|
|
334
334
|
import {
|
|
335
335
|
runManagedWrapup2
|
|
336
|
-
} from "./index-
|
|
336
|
+
} from "./index-ezgeq2z7.js";
|
|
337
337
|
import"./index-twmeey4h.js";
|
|
338
338
|
import"./index-52x68mj4.js";
|
|
339
|
-
import"./index-
|
|
340
|
-
import"./index-
|
|
339
|
+
import"./index-m4q6ptgz.js";
|
|
340
|
+
import"./index-jhhkb4jv.js";
|
|
341
341
|
import {
|
|
342
342
|
isDreamerRunnable,
|
|
343
343
|
isSmartNoteSurfaceAvailable,
|
|
@@ -8205,7 +8205,7 @@ var require_src2 = __commonJS(function(exports, module) {
|
|
|
8205
8205
|
// package.json
|
|
8206
8206
|
var package_default = {
|
|
8207
8207
|
name: "@cortexkit/opencode-magic-context",
|
|
8208
|
-
version: "0.49.
|
|
8208
|
+
version: "0.49.80",
|
|
8209
8209
|
type: "module",
|
|
8210
8210
|
description: "OpenCode plugin for Magic Context — cross-session memory and context management",
|
|
8211
8211
|
main: "dist/index.js",
|
|
@@ -12085,7 +12085,7 @@ async function setup(context) {
|
|
|
12085
12085
|
if (claimStorageBackupWarningCheck() && isMagicContextStorageOutsideEngram(storageDir)) {
|
|
12086
12086
|
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.`);
|
|
12087
12087
|
}
|
|
12088
|
-
const { registerContext } = await import("./context-
|
|
12088
|
+
const { registerContext } = await import("./context-7rkrv5q8.js");
|
|
12089
12089
|
setHarness2("opencode2");
|
|
12090
12090
|
bindStaleBuildNotice({}, import.meta.url, "opencode2");
|
|
12091
12091
|
const duties = await registerContext(context);
|
|
@@ -12558,7 +12558,7 @@ var server = async (ctx) => {
|
|
|
12558
12558
|
rustReplayParticipant: () => magicContextRuntime.magicContext?.getRustReplayParticipant?.() ?? null,
|
|
12559
12559
|
onStorageBusyRefusal: async (sessionId, message) => {
|
|
12560
12560
|
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-ykvt5k2s.js"));
|
|
12561
|
-
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-
|
|
12561
|
+
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-f0wssyce.js"));
|
|
12562
12562
|
await sendStatusNotification(ctx.client, sessionId, message, {
|
|
12563
12563
|
toastDurationMs: 15000
|
|
12564
12564
|
});
|
|
@@ -19,7 +19,7 @@ serveWorkerJobs(async (input, port) => {
|
|
|
19
19
|
await main();
|
|
20
20
|
async function main() {
|
|
21
21
|
if (input.v2ArchiveReader) {
|
|
22
|
-
const { serveV2ArchiveReads } = await import("./v2-archive-reader-
|
|
22
|
+
const { serveV2ArchiveReads } = await import("./v2-archive-reader-vzmzb245.js");
|
|
23
23
|
await serveV2ArchiveReads(port, openConnections);
|
|
24
24
|
return;
|
|
25
25
|
}
|
|
@@ -51,7 +51,7 @@ serveWorkerJobs(async (input, port) => {
|
|
|
51
51
|
await runMessageFtsRowidMapBackfill(db);
|
|
52
52
|
reply = { kind: "fts-rowid-backfill" };
|
|
53
53
|
} else if (input.searchArchive) {
|
|
54
|
-
const { renderSearchArchive } = await import("./search-archive-
|
|
54
|
+
const { renderSearchArchive } = await import("./search-archive-p3jhx9wc.js");
|
|
55
55
|
const { readRawSessionMessageIdOrdinalsForRangeFromDb } = await import("./read-session-raw-3sc9231y.js");
|
|
56
56
|
const archive = input.searchArchive;
|
|
57
57
|
let raw;
|
|
@@ -7,12 +7,12 @@ import {
|
|
|
7
7
|
setRecompTerminal2,
|
|
8
8
|
buildRecompDeps2,
|
|
9
9
|
runManagedRecomp2
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
10
|
+
} from "./index-hpmx99e9.js";
|
|
11
|
+
import"./index-exvsw656.js";
|
|
12
12
|
import"./index-832w615x.js";
|
|
13
13
|
import"./index-sd3egckz.js";
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
14
|
+
import"./index-9554nr2q.js";
|
|
15
|
+
import"./index-177yv84k.js";
|
|
16
16
|
import"./index-jjvbk92s.js";
|
|
17
17
|
import"./index-yfn52pb6.js";
|
|
18
18
|
import"./index-4dhv7mqz.js";
|
|
@@ -21,7 +21,7 @@ import"./index-tebcx987.js";
|
|
|
21
21
|
import"./index-zzvd4a9z.js";
|
|
22
22
|
import"./index-2amn2s73.js";
|
|
23
23
|
import"./index-6athgjba.js";
|
|
24
|
-
import"./index-
|
|
24
|
+
import"./index-tky3j43e.js";
|
|
25
25
|
import"./index-1sq1krqw.js";
|
|
26
26
|
import"./index-qt1qqasc.js";
|
|
27
27
|
import"./index-2q0t43fy.js";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderSearchArchive2,
|
|
3
3
|
renderSearchArchiveOffThread2
|
|
4
|
-
} from "./index-
|
|
5
|
-
import"./index-
|
|
4
|
+
} from "./index-jhhkb4jv.js";
|
|
5
|
+
import"./index-m4q6ptgz.js";
|
|
6
6
|
import"./index-52x68mj4.js";
|
|
7
7
|
import"./index-2q0t43fy.js";
|
|
8
8
|
import"./index-y208s7zx.js";
|
|
@@ -5,11 +5,11 @@ import {
|
|
|
5
5
|
resolveMemoriesByIdsForSearch2,
|
|
6
6
|
unifiedSearch2,
|
|
7
7
|
formatSearchResults2
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-zpd4pxnp.js";
|
|
9
9
|
import"./index-m6rkq3t4.js";
|
|
10
10
|
import"./index-52x68mj4.js";
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
11
|
+
import"./index-9554nr2q.js";
|
|
12
|
+
import"./index-177yv84k.js";
|
|
13
13
|
import"./index-jjvbk92s.js";
|
|
14
14
|
import"./index-yfn52pb6.js";
|
|
15
15
|
import"./index-4dhv7mqz.js";
|
|
@@ -108,6 +108,8 @@ export declare function refreshModelLimitsFromApi(client: OpencodeClientLike, op
|
|
|
108
108
|
export declare function refreshModelLimitsAfterAuthOnce(client: OpencodeClientLike): Promise<void>;
|
|
109
109
|
/** Test-only: reset the after-auth re-warm latch between cases. */
|
|
110
110
|
export declare function resetAuthRewarmLatchForTest(): void;
|
|
111
|
+
/** Supply window metadata for the selected OpenCode 2 model during a catalog failure. */
|
|
112
|
+
export declare function useV2DraftModelLimits(providerID: string, modelID: string, limit: ModelLimit | undefined): boolean;
|
|
111
113
|
/**
|
|
112
114
|
* Resolve a model's prompt limit from OpenCode's SDK (`config.providers()`),
|
|
113
115
|
* the single source of truth: it already merges models.dev + compiled-in
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"models-dev-cache.d.ts","sourceRoot":"","sources":["../../src/shared/models-dev-cache.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAIH,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,4BAA4B,CAAC;AAMzE,OAAO,EAAwB,KAAK,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAEpF,UAAU,kBAAkB;IACxB,MAAM,EAAE;QACJ,SAAS,EAAE,MAAM,OAAO,CAAC;YAAE,IAAI,CAAC,EAAE;gBAAE,SAAS,CAAC,EAAE,OAAO,CAAA;aAAE,CAAA;SAAE,CAAC,CAAC;KAChE,CAAC;CACL;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