@cortexkit/opencode-magic-context 0.49.71 → 0.49.72
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 +3 -3
- package/dist/chunk-embedding-write-worker.js +1 -1
- package/dist/{context-npk0e0aj.js → context-830ksymq.js} +18 -18
- package/dist/{embedding-backfill-sk7agn5v.js → embedding-backfill-exnyad7d.js} +2 -2
- package/dist/features/magic-context/memory/embedding-backfill.d.ts.map +1 -1
- package/dist/features/magic-context/overflow-detection.d.ts +2 -2
- package/dist/features/magic-context/project-embedding-registry.d.ts +1 -0
- package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
- package/dist/hooks/magic-context/sentinel.d.ts.map +1 -1
- package/dist/{index-0dbc9rxd.js → index-2m1j98fj.js} +3 -3
- package/dist/{index-fcrp1k8s.js → index-3mx8math.js} +1 -1
- package/dist/{index-d0mb17q4.js → index-64qpnmjb.js} +2 -2
- package/dist/{index-gq1g9a3a.js → index-9swgykdd.js} +4 -3
- package/dist/{index-mxjdj2cz.js → index-bdnak4d0.js} +17 -3
- package/dist/{index-y664y8kq.js → index-cw3j0pwy.js} +1 -1
- package/dist/{index-5hc4kjg0.js → index-etm62gd7.js} +1 -1
- package/dist/{index-51anehwt.js → index-jeckjrh0.js} +13 -13
- package/dist/{index-cdyhpdqx.js → index-q5rcetym.js} +4 -4
- package/dist/index-q9ywd8b2.js +65 -0
- package/dist/{index-gvnt9yka.js → index-sc5segqg.js} +7 -7
- package/dist/{index-n6aye6ny.js → index-ve863q40.js} +98 -2
- package/dist/{index-mejvnav7.js → index-w8sv1v0j.js} +10 -10
- package/dist/{index-mey1nc1v.js → index-xha0yxhy.js} +1 -1
- package/dist/{index-rzxzap49.js → index-y6q5qvdz.js} +5 -5
- package/dist/{index-33bfewqe.js → index-yh7hxjxm.js} +36 -38
- package/dist/{index-fm0bpxc6.js → index-yhz1w3ss.js} +1 -1
- package/dist/{index-n19pqsnh.js → index-zt6d9fag.js} +2 -2
- package/dist/index.js +21 -21
- package/dist/{message-index-bounded-n2j33x8n.js → message-index-bounded-vf70t44t.js} +3 -3
- package/dist/migration-worker.js +1 -1
- package/dist/{project-embedding-registry-c2sfnamh.js → project-embedding-registry-n50fbax6.js} +1 -1
- package/dist/raw-ordinal-warmup-worker.js +4 -4
- package/dist/{read-session-chunk-6kdtfa7k.js → read-session-chunk-9jtq1swq.js} +2 -2
- package/dist/{recomp-orchestrator-t9670x13.js → recomp-orchestrator-sa4f2mkj.js} +10 -10
- package/dist/{render-re3akx9j.js → render-qkjgrg31.js} +6 -6
- package/dist/{search-rppmngr5.js → search-0v2v9yd5.js} +8 -8
- package/dist/{search-archive-0q8rdnrd.js → search-archive-cmfs3myg.js} +4 -4
- package/dist/{storage-tags-rptkad9p.js → storage-tags-d3nqrva7.js} +1 -1
- package/dist/{transform-postprocess-phase-qtd2wr52.js → transform-postprocess-phase-ecrcsc2w.js} +11 -11
- package/dist/v2/auto-search-worker.js +3 -3
- package/dist/v2/chunk-embedding-write-worker.js +1 -1
- package/dist/v2/{context-vehx9ha8.js → context-q846asea.js} +33 -34
- package/dist/v2/{embedding-backfill-j2xj86zn.js → embedding-backfill-jhmn81cz.js} +2 -2
- package/dist/v2/{message-index-bounded-hfnsznj0.js → message-index-bounded-ev9sarf6.js} +3 -3
- package/dist/v2/migration-worker.js +1 -1
- package/dist/v2/{project-embedding-registry-k0hjqt11.js → project-embedding-registry-07nz4qas.js} +1 -1
- package/dist/v2/raw-ordinal-warmup-worker.js +4 -4
- package/dist/v2/{read-session-chunk-qzd376gb.js → read-session-chunk-eb49qfzz.js} +2 -2
- package/dist/v2/{recomp-orchestrator-rrsbcsmc.js → recomp-orchestrator-egbf57qa.js} +9 -9
- package/dist/v2/{render-qwy9ydnb.js → render-47vjswds.js} +6 -6
- package/dist/v2/{search-q3xcyyq8.js → search-03pzsd5w.js} +7 -7
- package/dist/v2/{search-archive-gewpafej.js → search-archive-3tpaqkg4.js} +4 -4
- package/dist/v2/{server-ssdfdrpv.js → server-3jggqcpa.js} +12 -12
- package/dist/v2/{server-xxy28mq5.js → server-4nh02tdw.js} +2 -2
- package/dist/v2/{server-fczyr89c.js → server-ar3awhcy.js} +11 -11
- package/dist/v2/{server-vzrj39bj.js → server-canf6f29.js} +1 -1
- package/dist/v2/{server-vqkqv7ze.js → server-cxkb9725.js} +17 -3
- package/dist/v2/{server-07z334y6.js → server-d0ec5f7b.js} +1 -1
- package/dist/v2/{server-axmk8rr2.js → server-k8mj4ccb.js} +1 -1
- package/dist/v2/{server-d07yxksx.js → server-ndkzagjz.js} +98 -2
- package/dist/v2/server-rd7v8c8y.js +65 -0
- package/dist/v2/{server-nc4qrjde.js → server-rpdbmk63.js} +1 -1
- package/dist/v2/{server-0c7egkzr.js → server-sk08dem3.js} +2 -2
- package/dist/v2/{server-z5255w05.js → server-t091cjj4.js} +4 -3
- package/dist/v2/{server-h8y2948e.js → server-wb00e7b0.js} +3 -3
- package/dist/v2/server.js +2 -2
- package/dist/v2/{storage-tags-msa1qvk8.js → storage-tags-j4he6hwe.js} +1 -1
- package/dist/v2/{v2-archive-reader-nwaw9qph.js → v2-archive-reader-x1yvzqs8.js} +1 -1
- package/dist/v2/{wrapup-orchestrator-xyd3r2t1.js → wrapup-orchestrator-5bccsgy0.js} +9 -9
- package/dist/{v2-archive-reader-dv00gb2a.js → v2-archive-reader-xnnwexnw.js} +1 -1
- package/dist/{wrapup-orchestrator-fzygp85w.js → wrapup-orchestrator-yrpqmwc7.js} +11 -11
- package/package.json +1 -1
- package/dist/index-zxj39ba2.js +0 -155
- package/dist/v2/server-d9aayyxk.js +0 -155
|
@@ -5,12 +5,23 @@ import {
|
|
|
5
5
|
PROMOTABLE_CATEGORIES,
|
|
6
6
|
CATEGORY_DEFAULT_TTL
|
|
7
7
|
} from "./index-fr0wbhdn.js";
|
|
8
|
+
import {
|
|
9
|
+
DEFAULT_LOCAL_EMBEDDING_MODEL
|
|
10
|
+
} from "./index-6nqz8hsz.js";
|
|
8
11
|
import {
|
|
9
12
|
sessionLog2
|
|
10
13
|
} from "./index-ywrz4wy2.js";
|
|
11
14
|
import {
|
|
15
|
+
isSynapseEmbeddingTruncated,
|
|
16
|
+
SynapseEmbeddingProvider
|
|
17
|
+
} from "./index-pxnzyvjc.js";
|
|
18
|
+
import {
|
|
19
|
+
LocalEmbeddingProvider
|
|
20
|
+
} from "./index-zb4h9nrk.js";
|
|
21
|
+
import {
|
|
22
|
+
OpenAICompatibleEmbeddingProvider,
|
|
12
23
|
embedTextForProject2
|
|
13
|
-
} from "./index-
|
|
24
|
+
} from "./index-9swgykdd.js";
|
|
14
25
|
import {
|
|
15
26
|
saveEmbeddingIfHashMatches
|
|
16
27
|
} from "./index-4dhv7mqz.js";
|
|
@@ -361,6 +372,91 @@ function dreamFailureCode(failureClass) {
|
|
|
361
372
|
function renderEmbeddingFailure(failureClass, style = "markdown") {
|
|
362
373
|
return renderUserFacingFailure(EMBEDDING_FAILURE_KEYS[failureClass], style);
|
|
363
374
|
}
|
|
375
|
+
// src/features/magic-context/memory/cosine-similarity.ts
|
|
376
|
+
function cosineSimilarity(a, b) {
|
|
377
|
+
if (a.length !== b.length) {
|
|
378
|
+
return 0;
|
|
379
|
+
}
|
|
380
|
+
let dotProduct = 0;
|
|
381
|
+
let normA = 0;
|
|
382
|
+
let normB = 0;
|
|
383
|
+
for (let index = 0;index < a.length; index++) {
|
|
384
|
+
dotProduct += a[index] * b[index];
|
|
385
|
+
normA += a[index] * a[index];
|
|
386
|
+
normB += b[index] * b[index];
|
|
387
|
+
}
|
|
388
|
+
const denominator = Math.sqrt(normA) * Math.sqrt(normB);
|
|
389
|
+
return denominator === 0 ? 0 : dotProduct / denominator;
|
|
390
|
+
}
|
|
391
|
+
|
|
392
|
+
// src/features/magic-context/memory/embedding.ts
|
|
393
|
+
var DEFAULT_EMBEDDING_CONFIG = {
|
|
394
|
+
provider: "local",
|
|
395
|
+
model: DEFAULT_LOCAL_EMBEDDING_MODEL,
|
|
396
|
+
local_runtime: "auto"
|
|
397
|
+
};
|
|
398
|
+
var embeddingConfig = DEFAULT_EMBEDDING_CONFIG;
|
|
399
|
+
var provider = null;
|
|
400
|
+
function createProvider(config) {
|
|
401
|
+
if (config.provider === "off") {
|
|
402
|
+
return null;
|
|
403
|
+
}
|
|
404
|
+
if (config.provider === "openai-compatible") {
|
|
405
|
+
return new OpenAICompatibleEmbeddingProvider({
|
|
406
|
+
endpoint: config.endpoint,
|
|
407
|
+
model: config.model,
|
|
408
|
+
apiKey: config.api_key,
|
|
409
|
+
inputType: config.input_type,
|
|
410
|
+
queryInputType: config.query_input_type,
|
|
411
|
+
queryInstruction: config.query_instruction,
|
|
412
|
+
documentPrefix: config.document_prefix,
|
|
413
|
+
truncate: config.truncate,
|
|
414
|
+
dimensions: config.dimensions,
|
|
415
|
+
maxInputTokens: config.max_input_tokens
|
|
416
|
+
});
|
|
417
|
+
}
|
|
418
|
+
if (config.provider === "local") {
|
|
419
|
+
return new LocalEmbeddingProvider(config.model, config.max_input_tokens, config.local_dtype, config.local_runtime);
|
|
420
|
+
}
|
|
421
|
+
if (config.provider === "synapse") {
|
|
422
|
+
const synapse = config;
|
|
423
|
+
return new SynapseEmbeddingProvider({
|
|
424
|
+
connectionFile: synapse.synapse_connection_file ?? "",
|
|
425
|
+
projectRoot: "",
|
|
426
|
+
session: "embedding",
|
|
427
|
+
model: synapse.model,
|
|
428
|
+
fingerprint: synapse.synapse_fingerprint,
|
|
429
|
+
tableEpoch: synapse.synapse_table_epoch,
|
|
430
|
+
dims: synapse.synapse_dims,
|
|
431
|
+
recommendedBatch: synapse.synapse_recommended_batch,
|
|
432
|
+
recommendedTokenBudget: synapse.synapse_recommended_token_budget,
|
|
433
|
+
descriptor: synapse.synapse_descriptor,
|
|
434
|
+
provenance: synapse.synapse_provenance
|
|
435
|
+
});
|
|
436
|
+
}
|
|
437
|
+
throw new Error("Unknown embedding provider");
|
|
438
|
+
}
|
|
439
|
+
function getOrCreateProvider() {
|
|
440
|
+
if (provider) {
|
|
441
|
+
return provider;
|
|
442
|
+
}
|
|
443
|
+
provider = createProvider(embeddingConfig);
|
|
444
|
+
return provider;
|
|
445
|
+
}
|
|
446
|
+
function isEmbeddingEnabled() {
|
|
447
|
+
return embeddingConfig.provider !== "off";
|
|
448
|
+
}
|
|
449
|
+
async function embedText(text, signal) {
|
|
450
|
+
const currentProvider = getOrCreateProvider();
|
|
451
|
+
if (!currentProvider) {
|
|
452
|
+
return null;
|
|
453
|
+
}
|
|
454
|
+
if (!await currentProvider.initialize()) {
|
|
455
|
+
return null;
|
|
456
|
+
}
|
|
457
|
+
const vector = await currentProvider.embed(text, signal);
|
|
458
|
+
return vector && !isSynapseEmbeddingTruncated(vector) ? vector : null;
|
|
459
|
+
}
|
|
364
460
|
// src/features/magic-context/memory/promotion.ts
|
|
365
461
|
function isPromotableCategory(category) {
|
|
366
462
|
return PROMOTABLE_CATEGORIES.some((promotableCategory) => promotableCategory === category);
|
|
@@ -791,4 +887,4 @@ async function normalizeVerificationFiles(args) {
|
|
|
791
887
|
gitRoot
|
|
792
888
|
};
|
|
793
889
|
}
|
|
794
|
-
export { USER_FACING_FAILURES, renderUserFacingFailure, userFacingFailureCode, renderCapabilityRefusal, capabilityRefusalCode, renderDreamFailure, dreamFailureCode, renderEmbeddingFailure, promoteSessionFactsDurable, embedPromotedFacts, relaxedFtsQuery, sanitizeFtsQuery, searchMemoriesFTS, searchMemoriesFTSUnion, recordMemoryMapping, recordMemoryVerifications, getUnmappedMemoryIds, clearMemoryVerifications, getMemoryVerifications, resolveGitTopLevel, readGitHead, readGitChangedFilesSince, readGitFileChangeTimesSince, verificationFileExists, normalizeVerificationFiles };
|
|
890
|
+
export { USER_FACING_FAILURES, renderUserFacingFailure, userFacingFailureCode, renderCapabilityRefusal, capabilityRefusalCode, renderDreamFailure, dreamFailureCode, renderEmbeddingFailure, cosineSimilarity, isEmbeddingEnabled, embedText, promoteSessionFactsDurable, embedPromotedFacts, relaxedFtsQuery, sanitizeFtsQuery, searchMemoriesFTS, searchMemoriesFTSUnion, recordMemoryMapping, recordMemoryVerifications, getUnmappedMemoryIds, clearMemoryVerifications, getMemoryVerifications, resolveGitTopLevel, readGitHead, readGitChangedFilesSince, readGitFileChangeTimesSince, verificationFileExists, normalizeVerificationFiles };
|
|
@@ -171,7 +171,7 @@ import {
|
|
|
171
171
|
adoptNullOwnerToolTag2,
|
|
172
172
|
getCandidateToolOwners2,
|
|
173
173
|
pickNearestPriorOwner2
|
|
174
|
-
} from "./index-
|
|
174
|
+
} from "./index-bdnak4d0.js";
|
|
175
175
|
import {
|
|
176
176
|
textMentionsRecentCommit,
|
|
177
177
|
hasMeaningfulUserText2,
|
|
@@ -224,24 +224,27 @@ import {
|
|
|
224
224
|
saveSourceContent,
|
|
225
225
|
replaceSourceContent,
|
|
226
226
|
getSourceContents
|
|
227
|
-
} from "./index-
|
|
227
|
+
} from "./index-cw3j0pwy.js";
|
|
228
228
|
import {
|
|
229
229
|
cleanSearchText,
|
|
230
230
|
matchedSearchSnippet
|
|
231
|
-
} from "./index-
|
|
231
|
+
} from "./index-etm62gd7.js";
|
|
232
232
|
import {
|
|
233
233
|
getProjectEmbeddingSnapshot2,
|
|
234
234
|
embedTextForProject2,
|
|
235
235
|
embedBatchForProject2
|
|
236
|
-
} from "./index-
|
|
236
|
+
} from "./index-9swgykdd.js";
|
|
237
237
|
import {
|
|
238
238
|
isEmbeddingHostBusy2
|
|
239
239
|
} from "./index-qt1qqasc.js";
|
|
240
|
+
import {
|
|
241
|
+
userFacingFailureCode
|
|
242
|
+
} from "./index-ve863q40.js";
|
|
240
243
|
import {
|
|
241
244
|
getMessageIndexEpoch,
|
|
242
245
|
isMessageIndexSearchable,
|
|
243
246
|
createAutoSearchDiagnostics
|
|
244
|
-
} from "./index-
|
|
247
|
+
} from "./index-xha0yxhy.js";
|
|
245
248
|
import {
|
|
246
249
|
openCodeDbExists,
|
|
247
250
|
withReadOnlySessionDb,
|
|
@@ -259,7 +262,7 @@ import {
|
|
|
259
262
|
extractToolCallObservation,
|
|
260
263
|
ToolMutationBatch,
|
|
261
264
|
createToolDropTarget
|
|
262
|
-
} from "./index-
|
|
265
|
+
} from "./index-yhz1w3ss.js";
|
|
263
266
|
import {
|
|
264
267
|
compareOpenCodeMessagesByCanonicalOrder,
|
|
265
268
|
startCompactionMarkerCandidatePreparation,
|
|
@@ -281,10 +284,7 @@ import {
|
|
|
281
284
|
peekNoteNudgeText,
|
|
282
285
|
markNoteNudgeDelivered,
|
|
283
286
|
getActiveCompartmentRun
|
|
284
|
-
} from "./index-
|
|
285
|
-
import {
|
|
286
|
-
userFacingFailureCode
|
|
287
|
-
} from "./index-n6aye6ny.js";
|
|
287
|
+
} from "./index-sc5segqg.js";
|
|
288
288
|
import {
|
|
289
289
|
getErrorMessage
|
|
290
290
|
} from "./index-y8v6yerm.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
releaseCompartmentLeaseBestEffort,
|
|
9
9
|
getCompartments,
|
|
10
10
|
getLastCompartmentEndMessage
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-cw3j0pwy.js";
|
|
12
12
|
import {
|
|
13
13
|
inRootAsyncContext2
|
|
14
14
|
} from "./index-gzy5w8ya.js";
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
releaseWrapupInProgress,
|
|
20
20
|
getHistorianFailureState,
|
|
21
21
|
clearEmergencyRecovery
|
|
22
|
-
} from "./index-
|
|
22
|
+
} from "./index-bdnak4d0.js";
|
|
23
23
|
import {
|
|
24
24
|
prepareRawSessionOrdinals2
|
|
25
|
-
} from "./index-
|
|
25
|
+
} from "./index-yhz1w3ss.js";
|
|
26
26
|
import {
|
|
27
27
|
pushNotification2
|
|
28
28
|
} from "./index-x8a7jmkh.js";
|
|
@@ -34,14 +34,14 @@ import {
|
|
|
34
34
|
getActiveCompartmentRun,
|
|
35
35
|
markActiveCompartmentRunPublished,
|
|
36
36
|
registerActiveCompartmentRun
|
|
37
|
-
} from "./index-
|
|
37
|
+
} from "./index-sc5segqg.js";
|
|
38
38
|
import {
|
|
39
39
|
sendStatusNotification2
|
|
40
40
|
} from "./index-1sq1krqw.js";
|
|
41
41
|
import {
|
|
42
42
|
setRecompStarting2,
|
|
43
43
|
setRecompTerminal2
|
|
44
|
-
} from "./index-
|
|
44
|
+
} from "./index-q5rcetym.js";
|
|
45
45
|
|
|
46
46
|
// src/hooks/magic-context/wrapup-orchestrator.ts
|
|
47
47
|
import * as crypto from "node:crypto";
|
|
@@ -196,7 +196,7 @@ import {
|
|
|
196
196
|
snapRangeToCompartments,
|
|
197
197
|
getActiveCompartmentRun,
|
|
198
198
|
startCompartmentAgent
|
|
199
|
-
} from "./index-
|
|
199
|
+
} from "./index-sc5segqg.js";
|
|
200
200
|
import {
|
|
201
201
|
hasTrustedAbsoluteWall,
|
|
202
202
|
applyProvenInputFloor,
|
|
@@ -355,7 +355,7 @@ import {
|
|
|
355
355
|
getTagsByNumbers2,
|
|
356
356
|
getDroppedTagsByNumbers2,
|
|
357
357
|
getMaxDroppedTagNumber2
|
|
358
|
-
} from "./index-
|
|
358
|
+
} from "./index-bdnak4d0.js";
|
|
359
359
|
import {
|
|
360
360
|
BoundedSessionMap,
|
|
361
361
|
observeTemporalDecisions,
|
|
@@ -427,7 +427,7 @@ import {
|
|
|
427
427
|
readRawSessionMessageById2,
|
|
428
428
|
readSessionChunk2,
|
|
429
429
|
readRawSessionSeedTail2
|
|
430
|
-
} from "./index-
|
|
430
|
+
} from "./index-yhz1w3ss.js";
|
|
431
431
|
import {
|
|
432
432
|
isFailClosedBlockingError,
|
|
433
433
|
shouldBypassFailClosedBlock,
|
|
@@ -453,7 +453,7 @@ import {
|
|
|
453
453
|
runSqliteOptimize,
|
|
454
454
|
openDatabase,
|
|
455
455
|
openCurrentDatabase
|
|
456
|
-
} from "./index-
|
|
456
|
+
} from "./index-3mx8math.js";
|
|
457
457
|
import {
|
|
458
458
|
unescapeXml,
|
|
459
459
|
resolveWorkspaceShareCategories,
|
|
@@ -569,10 +569,10 @@ import {
|
|
|
569
569
|
GLOBAL_USER_PROFILE_PROJECT_PATH,
|
|
570
570
|
getProjectState,
|
|
571
571
|
bumpProjectUserProfileVersion
|
|
572
|
-
} from "./index-
|
|
572
|
+
} from "./index-cw3j0pwy.js";
|
|
573
573
|
import {
|
|
574
574
|
getLastIndexedOrdinal
|
|
575
|
-
} from "./index-
|
|
575
|
+
} from "./index-etm62gd7.js";
|
|
576
576
|
import {
|
|
577
577
|
SESSION_NOTE_CONDITION_ERROR,
|
|
578
578
|
getNoteByIdInScope,
|
|
@@ -631,15 +631,33 @@ import {
|
|
|
631
631
|
embedSessionCompartmentChunks2,
|
|
632
632
|
getEmbeddingCoverageStatus2,
|
|
633
633
|
getAutoEmbeddingSessionCoverage2
|
|
634
|
-
} from "./index-
|
|
634
|
+
} from "./index-9swgykdd.js";
|
|
635
635
|
import {
|
|
636
636
|
saveEmbeddingIfHashMatches,
|
|
637
637
|
invalidateProject2,
|
|
638
638
|
invalidateMemory2
|
|
639
639
|
} from "./index-4dhv7mqz.js";
|
|
640
640
|
import {
|
|
641
|
-
|
|
642
|
-
|
|
641
|
+
renderUserFacingFailure,
|
|
642
|
+
userFacingFailureCode,
|
|
643
|
+
renderCapabilityRefusal,
|
|
644
|
+
capabilityRefusalCode,
|
|
645
|
+
renderDreamFailure,
|
|
646
|
+
dreamFailureCode,
|
|
647
|
+
renderEmbeddingFailure,
|
|
648
|
+
cosineSimilarity,
|
|
649
|
+
recordMemoryMapping,
|
|
650
|
+
recordMemoryVerifications,
|
|
651
|
+
getUnmappedMemoryIds,
|
|
652
|
+
clearMemoryVerifications,
|
|
653
|
+
getMemoryVerifications,
|
|
654
|
+
resolveGitTopLevel,
|
|
655
|
+
readGitHead,
|
|
656
|
+
readGitChangedFilesSince,
|
|
657
|
+
readGitFileChangeTimesSince,
|
|
658
|
+
verificationFileExists,
|
|
659
|
+
normalizeVerificationFiles
|
|
660
|
+
} from "./index-ve863q40.js";
|
|
643
661
|
import {
|
|
644
662
|
computeCueContentHash,
|
|
645
663
|
hasMuralCueColumns,
|
|
@@ -666,26 +684,6 @@ import {
|
|
|
666
684
|
archiveMemory2,
|
|
667
685
|
getMemoryCountsByStatus2
|
|
668
686
|
} from "./index-jjvbk92s.js";
|
|
669
|
-
import {
|
|
670
|
-
renderUserFacingFailure,
|
|
671
|
-
userFacingFailureCode,
|
|
672
|
-
renderCapabilityRefusal,
|
|
673
|
-
capabilityRefusalCode,
|
|
674
|
-
renderDreamFailure,
|
|
675
|
-
dreamFailureCode,
|
|
676
|
-
renderEmbeddingFailure,
|
|
677
|
-
recordMemoryMapping,
|
|
678
|
-
recordMemoryVerifications,
|
|
679
|
-
getUnmappedMemoryIds,
|
|
680
|
-
clearMemoryVerifications,
|
|
681
|
-
getMemoryVerifications,
|
|
682
|
-
resolveGitTopLevel,
|
|
683
|
-
readGitHead,
|
|
684
|
-
readGitChangedFilesSince,
|
|
685
|
-
readGitFileChangeTimesSince,
|
|
686
|
-
verificationFileExists,
|
|
687
|
-
normalizeVerificationFiles
|
|
688
|
-
} from "./index-n6aye6ny.js";
|
|
689
687
|
import {
|
|
690
688
|
renderSingleStoreMigrationRequiredRefusal,
|
|
691
689
|
SingleStoreMigrationRequiredError,
|
|
@@ -706,13 +704,13 @@ import {
|
|
|
706
704
|
resolveMemoriesByIdsForSearch2,
|
|
707
705
|
unifiedSearch2,
|
|
708
706
|
formatSearchResults2
|
|
709
|
-
} from "./index-
|
|
707
|
+
} from "./index-jeckjrh0.js";
|
|
710
708
|
import {
|
|
711
709
|
scheduleReconciliation,
|
|
712
710
|
scheduleIncrementalIndex,
|
|
713
711
|
getMessageIndexQueueHeapStats,
|
|
714
712
|
clearSessionTracking
|
|
715
|
-
} from "./index-
|
|
713
|
+
} from "./index-xha0yxhy.js";
|
|
716
714
|
import {
|
|
717
715
|
flushIgnoredMessages2,
|
|
718
716
|
clearIgnoredMessages2,
|
|
@@ -722,7 +720,7 @@ import {
|
|
|
722
720
|
import {
|
|
723
721
|
setRecompStarting2,
|
|
724
722
|
setRecompTerminal2
|
|
725
|
-
} from "./index-
|
|
723
|
+
} from "./index-q5rcetym.js";
|
|
726
724
|
import {
|
|
727
725
|
makeToolCompositeKey,
|
|
728
726
|
searchMessageHistoryOffThread,
|
|
@@ -807,7 +805,7 @@ import {
|
|
|
807
805
|
abortSessionFailClosed2,
|
|
808
806
|
evaluateEmergencyFailClosed2,
|
|
809
807
|
runPostTransformPhase2
|
|
810
|
-
} from "./index-
|
|
808
|
+
} from "./index-w8sv1v0j.js";
|
|
811
809
|
import {
|
|
812
810
|
ANNOUNCEMENT_VERSION2,
|
|
813
811
|
ANNOUNCEMENT_FEATURES2,
|
|
@@ -822,13 +820,13 @@ import {
|
|
|
822
820
|
renderMessageByOrdinal2,
|
|
823
821
|
renderVerboseRangeForTool2,
|
|
824
822
|
renderItemByTag2
|
|
825
|
-
} from "./index-
|
|
823
|
+
} from "./index-zt6d9fag.js";
|
|
826
824
|
import {
|
|
827
825
|
readV2ArchiveOffThread2
|
|
828
|
-
} from "./index-
|
|
826
|
+
} from "./index-2m1j98fj.js";
|
|
829
827
|
import {
|
|
830
828
|
renderSearchArchiveOffThread2
|
|
831
|
-
} from "./index-
|
|
829
|
+
} from "./index-64qpnmjb.js";
|
|
832
830
|
import {
|
|
833
831
|
COMPACTION_ENABLED_PATH,
|
|
834
832
|
isDreamerRunnable,
|
|
@@ -16540,7 +16538,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
16540
16538
|
const db = readDatabase();
|
|
16541
16539
|
if (!db)
|
|
16542
16540
|
return { ok: false, error: "db unavailable" };
|
|
16543
|
-
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-
|
|
16541
|
+
const { runManagedRecomp } = await importPluginModule(() => import("./recomp-orchestrator-sa4f2mkj.js"));
|
|
16544
16542
|
const { sendIgnoredMessage } = await importPluginModule(() => import("./send-session-notification-ykvt5k2s.js"));
|
|
16545
16543
|
log2(`[rpc] recomp requested for session ${sessionId}`);
|
|
16546
16544
|
if (!args.client && !args.hiddenCompletionExecutor) {
|
|
@@ -16625,7 +16623,7 @@ function registerRpcHandlers(rpcServer, args) {
|
|
|
16625
16623
|
const db = readDatabase();
|
|
16626
16624
|
if (!db)
|
|
16627
16625
|
return { ok: false, error: "db unavailable" };
|
|
16628
|
-
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-
|
|
16626
|
+
const { runManagedWrapup } = await importPluginModule(() => import("./wrapup-orchestrator-yrpqmwc7.js"));
|
|
16629
16627
|
const model = liveSessionState.liveModelBySession.get(sessionId);
|
|
16630
16628
|
const contextLimit = model ? resolveContextLimit(model.providerID, model.modelID, { db, sessionID: sessionId }) : 128000;
|
|
16631
16629
|
const ctx = {
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
} from "./index-5vsk2cpp.js";
|
|
4
4
|
import {
|
|
5
5
|
getTagById2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-bdnak4d0.js";
|
|
7
7
|
import {
|
|
8
8
|
expandToolPart,
|
|
9
9
|
visitRawSessionMessages2,
|
|
10
10
|
readRawSessionMessageById2
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-yhz1w3ss.js";
|
|
12
12
|
|
|
13
13
|
// src/tools/ctx-expand/render.ts
|
|
14
14
|
import { createHash } from "node:crypto";
|
package/dist/index.js
CHANGED
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
recordToolParameters,
|
|
5
5
|
createDroppedInputToolExecuteBeforeHook,
|
|
6
6
|
readRawSessionMessages2
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-yhz1w3ss.js";
|
|
8
8
|
import {
|
|
9
9
|
setHarness2
|
|
10
10
|
} from "./index-pavzsdc6.js";
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
checkCompactionMarkerConsistency,
|
|
59
59
|
clearInjectionCache,
|
|
60
60
|
clearNoteNudgeTriggerOnly
|
|
61
|
-
} from "./index-
|
|
61
|
+
} from "./index-sc5segqg.js";
|
|
62
62
|
import"./index-sd3egckz.js";
|
|
63
63
|
import {
|
|
64
64
|
hasTrustedAbsoluteWall,
|
|
@@ -143,7 +143,7 @@ import {
|
|
|
143
143
|
parameterDescriptionsFor,
|
|
144
144
|
MagicContextRpcServer,
|
|
145
145
|
applyHiddenSubagentTemperature
|
|
146
|
-
} from "./index-
|
|
146
|
+
} from "./index-yh7hxjxm.js";
|
|
147
147
|
import {
|
|
148
148
|
resolveOpenCodeDbPath,
|
|
149
149
|
openCodeDbPathExists,
|
|
@@ -195,7 +195,7 @@ import {
|
|
|
195
195
|
dropServedRecord,
|
|
196
196
|
registerLkgPersistence,
|
|
197
197
|
dropSlot
|
|
198
|
-
} from "./index-
|
|
198
|
+
} from "./index-cw3j0pwy.js";
|
|
199
199
|
import {
|
|
200
200
|
recordSessionProjectIdentity
|
|
201
201
|
} from "./index-jg7sbt3v.js";
|
|
@@ -210,7 +210,7 @@ import {
|
|
|
210
210
|
openDatabaseAsync,
|
|
211
211
|
isDatabasePersisted,
|
|
212
212
|
getDatabasePersistenceError
|
|
213
|
-
} from "./index-
|
|
213
|
+
} from "./index-3mx8math.js";
|
|
214
214
|
import {
|
|
215
215
|
registerExitAbort,
|
|
216
216
|
unregisterExitAbort
|
|
@@ -230,7 +230,7 @@ import"./index-pxnzyvjc.js";
|
|
|
230
230
|
import {
|
|
231
231
|
getDefaultSubcConnectionFile,
|
|
232
232
|
SubcModuleTransport
|
|
233
|
-
} from "./index-
|
|
233
|
+
} from "./index-jeckjrh0.js";
|
|
234
234
|
import"./index-qt1qqasc.js";
|
|
235
235
|
import"./index-e6ncz7a6.js";
|
|
236
236
|
import {
|
|
@@ -280,7 +280,7 @@ import {
|
|
|
280
280
|
isAnthropicFamilyRoute,
|
|
281
281
|
deleteTagsByMessageId2,
|
|
282
282
|
getMaxTagNumberBySession2
|
|
283
|
-
} from "./index-
|
|
283
|
+
} from "./index-bdnak4d0.js";
|
|
284
284
|
import {
|
|
285
285
|
resolveHistorianModel2,
|
|
286
286
|
resolveOpenCodeAgentOverrides2,
|
|
@@ -293,7 +293,7 @@ import {
|
|
|
293
293
|
import"./index-snbpdpa3.js";
|
|
294
294
|
import {
|
|
295
295
|
deleteIndexedMessage
|
|
296
|
-
} from "./index-
|
|
296
|
+
} from "./index-etm62gd7.js";
|
|
297
297
|
import"./index-6athgjba.js";
|
|
298
298
|
import"./index-tebcx987.js";
|
|
299
299
|
import {
|
|
@@ -302,11 +302,11 @@ import {
|
|
|
302
302
|
import"./index-zb4h9nrk.js";
|
|
303
303
|
import {
|
|
304
304
|
getEmbeddingCoverageStatus2
|
|
305
|
-
} from "./index-
|
|
305
|
+
} from "./index-9swgykdd.js";
|
|
306
306
|
import"./index-4dhv7mqz.js";
|
|
307
|
-
import"./index-
|
|
307
|
+
import"./index-ve863q40.js";
|
|
308
|
+
import"./index-q9ywd8b2.js";
|
|
308
309
|
import"./index-jjvbk92s.js";
|
|
309
|
-
import"./index-n6aye6ny.js";
|
|
310
310
|
import"./index-832w615x.js";
|
|
311
311
|
import {
|
|
312
312
|
createTagger,
|
|
@@ -317,13 +317,13 @@ import {
|
|
|
317
317
|
armBindingRecoverySafely,
|
|
318
318
|
collectForeignTextParts,
|
|
319
319
|
resetDegradedCacheCount2
|
|
320
|
-
} from "./index-
|
|
320
|
+
} from "./index-w8sv1v0j.js";
|
|
321
321
|
import {
|
|
322
322
|
scheduleClearAndReindex
|
|
323
|
-
} from "./index-
|
|
323
|
+
} from "./index-xha0yxhy.js";
|
|
324
324
|
import {
|
|
325
325
|
runManagedRecomp2
|
|
326
|
-
} from "./index-
|
|
326
|
+
} from "./index-q5rcetym.js";
|
|
327
327
|
import {
|
|
328
328
|
isValidSemver,
|
|
329
329
|
compareSemverCore
|
|
@@ -331,11 +331,11 @@ import {
|
|
|
331
331
|
import"./index-fmsr7v69.js";
|
|
332
332
|
import {
|
|
333
333
|
runManagedWrapup2
|
|
334
|
-
} from "./index-
|
|
335
|
-
import"./index-
|
|
334
|
+
} from "./index-y6q5qvdz.js";
|
|
335
|
+
import"./index-zt6d9fag.js";
|
|
336
336
|
import"./index-52x68mj4.js";
|
|
337
|
-
import"./index-
|
|
338
|
-
import"./index-
|
|
337
|
+
import"./index-2m1j98fj.js";
|
|
338
|
+
import"./index-64qpnmjb.js";
|
|
339
339
|
import {
|
|
340
340
|
isDreamerRunnable,
|
|
341
341
|
isSmartNoteSurfaceAvailable,
|
|
@@ -8203,7 +8203,7 @@ var require_src2 = __commonJS(function(exports, module) {
|
|
|
8203
8203
|
// package.json
|
|
8204
8204
|
var package_default = {
|
|
8205
8205
|
name: "@cortexkit/opencode-magic-context",
|
|
8206
|
-
version: "0.49.
|
|
8206
|
+
version: "0.49.72",
|
|
8207
8207
|
type: "module",
|
|
8208
8208
|
description: "OpenCode plugin for Magic Context — cross-session memory and context management",
|
|
8209
8209
|
main: "dist/index.js",
|
|
@@ -12082,7 +12082,7 @@ async function setup(context) {
|
|
|
12082
12082
|
if (claimStorageBackupWarningCheck() && isMagicContextStorageOutsideEngram(storageDir)) {
|
|
12083
12083
|
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.`);
|
|
12084
12084
|
}
|
|
12085
|
-
const { registerContext } = await import("./context-
|
|
12085
|
+
const { registerContext } = await import("./context-830ksymq.js");
|
|
12086
12086
|
setHarness2("opencode2");
|
|
12087
12087
|
bindStaleBuildNotice({}, import.meta.url, "opencode2");
|
|
12088
12088
|
const duties = await registerContext(context);
|
|
@@ -12555,7 +12555,7 @@ var server = async (ctx) => {
|
|
|
12555
12555
|
rustReplayParticipant: () => magicContextRuntime.magicContext?.getRustReplayParticipant?.() ?? null,
|
|
12556
12556
|
onStorageBusyRefusal: async (sessionId, message) => {
|
|
12557
12557
|
const { sendStatusNotification } = await importPluginModule(() => import("./send-session-notification-ykvt5k2s.js"));
|
|
12558
|
-
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-
|
|
12558
|
+
const { abortSessionFailClosed } = await importPluginModule(() => import("./transform-postprocess-phase-ecrcsc2w.js"));
|
|
12559
12559
|
await sendStatusNotification(ctx.client, sessionId, message, {
|
|
12560
12560
|
toastDurationMs: 15000
|
|
12561
12561
|
});
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
yieldIndexChunk2
|
|
5
5
|
} from "./index-gzy5w8ya.js";
|
|
6
6
|
import"./index-1zx87sdm.js";
|
|
7
|
-
import"./index-
|
|
7
|
+
import"./index-bdnak4d0.js";
|
|
8
8
|
import"./index-5vsk2cpp.js";
|
|
9
9
|
import"./index-pavzsdc6.js";
|
|
10
10
|
import"./index-ywrz4wy2.js";
|
|
@@ -17,7 +17,7 @@ import"./index-1d042x6w.js";
|
|
|
17
17
|
import"./index-q7q6qp1f.js";
|
|
18
18
|
import"./index-58e3y90n.js";
|
|
19
19
|
import"./index-x40zr813.js";
|
|
20
|
-
import"./index-
|
|
20
|
+
import"./index-yhz1w3ss.js";
|
|
21
21
|
import {
|
|
22
22
|
MESSAGE_INDEX_MAX_FTS_BYTES,
|
|
23
23
|
messageIndexSkipKey,
|
|
@@ -25,7 +25,7 @@ import {
|
|
|
25
25
|
markMessageIndexDirty,
|
|
26
26
|
getIndexableContent,
|
|
27
27
|
indexSingleMessage
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-etm62gd7.js";
|
|
29
29
|
import"./index-s32f8y67.js";
|
|
30
30
|
import"./index-m0pwswv9.js";
|
|
31
31
|
|
package/dist/migration-worker.js
CHANGED
package/dist/{project-embedding-registry-c2sfnamh.js → project-embedding-registry-n50fbax6.js}
RENAMED
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
sweepAllRegisteredProjects2,
|
|
37
37
|
_setTestProviderFactoryForProject2,
|
|
38
38
|
_resetProjectEmbeddingRegistryForTests2
|
|
39
|
-
} from "./index-
|
|
39
|
+
} from "./index-9swgykdd.js";
|
|
40
40
|
import"./index-4dhv7mqz.js";
|
|
41
41
|
import"./index-2amn2s73.js";
|
|
42
42
|
import"./index-qt1qqasc.js";
|
|
@@ -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-xnnwexnw.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-cmfs3myg.js");
|
|
55
55
|
const { readRawSessionMessageIdOrdinalsForRangeFromDb } = await import("./read-session-raw-3sc9231y.js");
|
|
56
56
|
const archive = input.searchArchive;
|
|
57
57
|
let raw;
|
|
@@ -81,7 +81,7 @@ serveWorkerJobs(async (input, port) => {
|
|
|
81
81
|
const { setHarness } = await import("./harness-e4avh192.js");
|
|
82
82
|
setHarness(input.harness ?? "opencode");
|
|
83
83
|
const [{ indexMessageInShortChunks }, { configureContextDatabasePragmas }] = await Promise.all([
|
|
84
|
-
import("./message-index-bounded-
|
|
84
|
+
import("./message-index-bounded-vf70t44t.js"),
|
|
85
85
|
import("./sqlite-context-pragmas-mv9jqwjh.js")
|
|
86
86
|
]);
|
|
87
87
|
configureContextDatabasePragmas(db);
|
|
@@ -95,7 +95,7 @@ serveWorkerJobs(async (input, port) => {
|
|
|
95
95
|
measurements: result.measurements
|
|
96
96
|
};
|
|
97
97
|
} else if (input.tagRatio !== undefined) {
|
|
98
|
-
const { scanTagOwnerSummary, scanTagOwnerDelta } = await import("./storage-tags-
|
|
98
|
+
const { scanTagOwnerSummary, scanTagOwnerDelta } = await import("./storage-tags-d3nqrva7.js");
|
|
99
99
|
const delta = input.tagState ? scanTagOwnerDelta(db, input.sessionId, input.tagState) : null;
|
|
100
100
|
if (delta)
|
|
101
101
|
reply = { kind: "tag-delta", delta };
|
|
@@ -38,8 +38,8 @@ import {
|
|
|
38
38
|
readSessionChunk2,
|
|
39
39
|
getRawSessionMessageIdsThrough2,
|
|
40
40
|
readRawSessionSeedTail2
|
|
41
|
-
} from "./index-
|
|
42
|
-
import"./index-
|
|
41
|
+
} from "./index-yhz1w3ss.js";
|
|
42
|
+
import"./index-bdnak4d0.js";
|
|
43
43
|
import"./index-1zx87sdm.js";
|
|
44
44
|
import"./index-x40zr813.js";
|
|
45
45
|
import"./index-6nqz8hsz.js";
|