@cortexkit/pi-magic-context 0.49.57 → 0.49.60
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 +5 -5
- package/dist/chunk-embedding-write-worker.js +12 -12
- package/dist/{compaction-marker-candidates-9yhrstyb.js → compaction-marker-candidates-nxaamfej.js} +2 -2
- package/dist/compaction-marker-candidates-worker.js +1 -1
- package/dist/{compartment-chunk-embedding-wg7emg3z.js → compartment-chunk-embedding-avkyp2df.js} +7 -7
- package/dist/{embedding-backfill-qde2zywg.js → embedding-backfill-3g3cm51d.js} +12 -12
- package/dist/embedding-worker-process.js +1 -1
- package/dist/embedding-worker.js +4 -4
- package/dist/historian-calibration-extension.js +1 -1
- package/dist/{index-j0eagxkz.js → index-1ts77n1b.js} +1 -1
- package/dist/{index-xssjy4z9.js → index-3s39a1md.js} +1 -1
- package/dist/{index-tz8431zx.js → index-418za765.js} +26 -21
- package/dist/{index-xx1911hb.js → index-453s1hj6.js} +1 -1
- package/dist/{index-8ej7crnf.js → index-5hhhxck7.js} +10 -10
- package/dist/{index-qm139qq2.js → index-5rcjs14a.js} +2 -2
- package/dist/{index-yjgkjkjs.js → index-71rg8j43.js} +1 -1
- package/dist/{index-zxm7ckvc.js → index-79xfn84y.js} +2 -2
- package/dist/{index-xgkq843e.js → index-8gvbskcm.js} +4 -4
- package/dist/{index-15eq9z3a.js → index-9cqfbdgb.js} +3 -3
- package/dist/{index-ndg15t3x.js → index-cxczethe.js} +4 -4
- package/dist/{index-erkb5dee.js → index-e9wkbh8y.js} +8 -8
- package/dist/{index-prhdb9c5.js → index-f4n7tnsf.js} +2 -2
- package/dist/{index-mmwgmz8f.js → index-fz4gexgk.js} +2 -2
- package/dist/{index-d40ecdbn.js → index-gavj3e6h.js} +4 -4
- package/dist/{index-6d0bby9d.js → index-ghp32f9m.js} +2 -2
- package/dist/{index-v858d5d1.js → index-jhmz9tgv.js} +1 -1
- package/dist/{index-awpx91y5.js → index-k7a8x7ba.js} +1 -1
- package/dist/{index-15rx61th.js → index-m6kszx0e.js} +4 -4
- package/dist/{index-7y60kyea.js → index-pefn1gt5.js} +1 -1
- package/dist/{index-jnh7a6a3.js → index-qdy49kwk.js} +4 -4
- package/dist/{index-yxeg8zaa.js → index-tm11k42a.js} +9 -4
- package/dist/{index-hec3bwev.js → index-txcs0vnj.js} +2 -2
- package/dist/{index-0133ybm6.js → index-w4sqw9mf.js} +8 -8
- package/dist/{index-7mvsg371.js → index-xan5mt5f.js} +5 -5
- package/dist/{index-szn2tac8.js → index-xjhq27z9.js} +1 -1
- package/dist/{index-mbzqrp0s.js → index-zgsemyph.js} +10 -10
- package/dist/index.js +617 -284
- package/dist/{logger-hhgpkbx1.js → logger-93cnqyh0.js} +1 -1
- package/dist/{message-fts-rowid-map-tec2x7qe.js → message-fts-rowid-map-dtbragnt.js} +4 -4
- package/dist/{message-index-bounded-q6dyk780.js → message-index-bounded-behq385r.js} +9 -9
- package/dist/{message-time-backfill-krre2qnb.js → message-time-backfill-8zwv9byv.js} +2 -2
- package/dist/migration-worker.js +9 -9
- package/dist/{project-embedding-registry-qx2zjbgs.js → project-embedding-registry-63wsm3a8.js} +11 -11
- package/dist/raw-ordinal-warmup-worker.js +8 -8
- package/dist/{read-session-chunk-ksn2r664.js → read-session-chunk-ksh32zfv.js} +7 -7
- package/dist/{read-session-raw-75dcxtdy.js → read-session-raw-0tytrjye.js} +2 -2
- package/dist/{render-nejsk0az.js → render-2qed2svq.js} +16 -16
- package/dist/{safe-notification-target-8s1xg0q9.js → safe-notification-target-fkyrd95h.js} +2 -2
- package/dist/{search-archive-4yfsc0xb.js → search-archive-qqj7j1w1.js} +9 -9
- package/dist/{search-h61ec8kh.js → search-vmw1xbqx.js} +19 -19
- package/dist/{storage-tags-jfewemtk.js → storage-tags-s0m7e39a.js} +5 -5
- package/dist/subagent-entry.js +25 -25
- package/dist/tag-snapshot-worker-pi.js +11 -11
- package/dist/{v2-archive-reader-hveb3ajf.js → v2-archive-reader-cc7sx6dk.js} +1 -1
- package/package.json +2 -2
|
@@ -3,11 +3,11 @@ import {
|
|
|
3
3
|
tagRevisionCountSql,
|
|
4
4
|
tagRevisionKey,
|
|
5
5
|
TAG_INSERT_CONFLICT_ROWS
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-jhmz9tgv.js";
|
|
7
7
|
import {
|
|
8
8
|
getTagsBySession2,
|
|
9
9
|
getTagsByNumbers2
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-8gvbskcm.js";
|
|
11
11
|
import {
|
|
12
12
|
inRootAsyncContext2,
|
|
13
13
|
getSqliteDatabasePath2,
|
|
@@ -3,12 +3,12 @@ import {
|
|
|
3
3
|
} from "./index-135e8hvg.js";
|
|
4
4
|
import {
|
|
5
5
|
log2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-tm11k42a.js";
|
|
7
7
|
import {
|
|
8
8
|
ensureColumn,
|
|
9
9
|
healAllNullColumns,
|
|
10
10
|
installV95PerfSchema
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-jhmz9tgv.js";
|
|
12
12
|
import {
|
|
13
13
|
resolveOpenCodeDbPath,
|
|
14
14
|
openCodeDbPathExists,
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
import {
|
|
21
21
|
normalizeStoredProjectPath,
|
|
22
22
|
storedPathBelongsToIdentity
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-453s1hj6.js";
|
|
24
24
|
import {
|
|
25
25
|
logSlowWriteTransaction
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-1ts77n1b.js";
|
|
27
27
|
|
|
28
28
|
// ../plugin/src/features/magic-context/migrations.ts
|
|
29
29
|
import { isMainThread } from "node:worker_threads";
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
} from "./index-2qtx0q6h.js";
|
|
6
6
|
import {
|
|
7
7
|
runSessionWarmupWorker
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-xjhq27z9.js";
|
|
9
9
|
import {
|
|
10
10
|
logSlowWriteTransaction
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-1ts77n1b.js";
|
|
12
12
|
|
|
13
13
|
// ../plugin/src/features/magic-context/message-fts-rowid-map.ts
|
|
14
14
|
import { createHash } from "node:crypto";
|
|
@@ -6,19 +6,19 @@ import {
|
|
|
6
6
|
removeNestedBlocks,
|
|
7
7
|
hasMeaningfulUserText2,
|
|
8
8
|
extractTexts2
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-pefn1gt5.js";
|
|
10
10
|
import {
|
|
11
11
|
cleanUserText2
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-xan5mt5f.js";
|
|
13
13
|
import {
|
|
14
14
|
recordMessageFtsRowid2,
|
|
15
15
|
recordIndexedMessageTime2,
|
|
16
16
|
messageFtsOrdinalRangeIsMapped2,
|
|
17
17
|
deleteUnmappedMessageFtsRows2
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-ghp32f9m.js";
|
|
19
19
|
import {
|
|
20
20
|
logSlowWriteTransaction
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-1ts77n1b.js";
|
|
22
22
|
|
|
23
23
|
// ../plugin/src/features/magic-context/compression-depth-storage.ts
|
|
24
24
|
var incrementDepthStatements = new WeakMap;
|
|
@@ -3,19 +3,19 @@ import {
|
|
|
3
3
|
} from "./index-vcegxfwg.js";
|
|
4
4
|
import {
|
|
5
5
|
log2
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-tm11k42a.js";
|
|
7
7
|
import {
|
|
8
8
|
isSynapseEmbeddingTruncated,
|
|
9
9
|
SynapseEmbeddingProvider
|
|
10
|
-
} from "./index-
|
|
10
|
+
} from "./index-5rcjs14a.js";
|
|
11
11
|
import {
|
|
12
12
|
LocalEmbeddingProvider
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-txcs0vnj.js";
|
|
14
14
|
import {
|
|
15
15
|
OpenAICompatibleEmbeddingProvider,
|
|
16
16
|
getProjectEmbeddingSnapshot2,
|
|
17
17
|
embedBatchForProject2
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-e9wkbh8y.js";
|
|
19
19
|
import {
|
|
20
20
|
isEmbeddingHostBusy2
|
|
21
21
|
} from "./index-9p40dgkm.js";
|
|
@@ -41,6 +41,14 @@ function getMagicContextLogPath(harness = getHarness2()) {
|
|
|
41
41
|
return envPath;
|
|
42
42
|
return path.join(getMagicContextTempDir(harness), "magic-context.log");
|
|
43
43
|
}
|
|
44
|
+
function getMagicContextHistorianDir(harness = getHarness2()) {
|
|
45
|
+
return path.join(getMagicContextTempDir(harness), "historian");
|
|
46
|
+
}
|
|
47
|
+
function getMagicContextHistorianSessionDir(sessionId, harness = getHarness2()) {
|
|
48
|
+
const safeSessionId = sessionId.replace(/[^a-zA-Z0-9._-]/g, "-");
|
|
49
|
+
const directoryName = /^\.*$/.test(safeSessionId) ? "unknown-session" : safeSessionId;
|
|
50
|
+
return path.join(getMagicContextHistorianDir(harness), directoryName);
|
|
51
|
+
}
|
|
44
52
|
function getProjectMagicContextDir(directory) {
|
|
45
53
|
return path.join(directory, ".cortexkit", "magic-context");
|
|
46
54
|
}
|
|
@@ -70,9 +78,6 @@ function ensureCortexKitArtifactGitignore(directory) {
|
|
|
70
78
|
log2("Failed to ensure project artifact gitignore", { directory, error: String(error) });
|
|
71
79
|
}
|
|
72
80
|
}
|
|
73
|
-
function getProjectMagicContextHistorianDir(directory) {
|
|
74
|
-
return path.join(getProjectMagicContextDir(directory), "historian");
|
|
75
|
-
}
|
|
76
81
|
function getOpenCodeStorageDir() {
|
|
77
82
|
return path.join(getDataDir(), "opencode", "storage");
|
|
78
83
|
}
|
|
@@ -482,4 +487,4 @@ if (!isTestEnv) {
|
|
|
482
487
|
process.on("exit", flush);
|
|
483
488
|
}
|
|
484
489
|
|
|
485
|
-
export { getDataDir,
|
|
490
|
+
export { getDataDir, getMagicContextHistorianSessionDir, ensureCortexKitArtifactGitignore, getMagicContextStorageDir, isMagicContextStorageOutsideEngram, claimStorageBackupWarningCheck, getLegacyOpenCodeMagicContextStorageDir, registerStalePluginBuildHost, classifyStalePluginBuild, importPluginModule, setLogLineForwarder2, writeForwardedLogLine2, log2, sessionLog2, getLoggerDiagnostics2, flushLogger2, getLogFilePath2 };
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./index-vcegxfwg.js";
|
|
4
4
|
import {
|
|
5
5
|
getSynapseLaneIdentity
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-5rcjs14a.js";
|
|
7
7
|
import {
|
|
8
8
|
getHarness2
|
|
9
9
|
} from "./index-0h2mkab2.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getMagicContextStorageDir,
|
|
12
12
|
importPluginModule,
|
|
13
13
|
log2
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-tm11k42a.js";
|
|
15
15
|
import {
|
|
16
16
|
inRootAsyncContext2
|
|
17
17
|
} from "./index-2qtx0q6h.js";
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
importPluginModule,
|
|
9
9
|
writeForwardedLogLine2,
|
|
10
10
|
log2
|
|
11
|
-
} from "./index-
|
|
11
|
+
} from "./index-tm11k42a.js";
|
|
12
12
|
import {
|
|
13
13
|
inRootAsyncContext2,
|
|
14
14
|
registerSlowWriteReporter2,
|
|
@@ -24,7 +24,7 @@ import {
|
|
|
24
24
|
} from "./index-2qtx0q6h.js";
|
|
25
25
|
import {
|
|
26
26
|
scheduleAfterBootQuiet
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-453s1hj6.js";
|
|
28
28
|
import {
|
|
29
29
|
configureContextDatabasePragmas2
|
|
30
30
|
} from "./index-fapenpch.js";
|
|
@@ -36,7 +36,7 @@ import {
|
|
|
36
36
|
} from "./index-wfqysrwq.js";
|
|
37
37
|
import {
|
|
38
38
|
startMessageFtsRowidMapBackfill2
|
|
39
|
-
} from "./index-
|
|
39
|
+
} from "./index-ghp32f9m.js";
|
|
40
40
|
import {
|
|
41
41
|
LKG_SLOT_CHUNKS_DDL,
|
|
42
42
|
SESSION_REPLAY_DECISIONS_DDL,
|
|
@@ -46,14 +46,14 @@ import {
|
|
|
46
46
|
hasPendingMigrations,
|
|
47
47
|
getMainThreadMigrationBodyCount,
|
|
48
48
|
runMigrations
|
|
49
|
-
} from "./index-
|
|
49
|
+
} from "./index-gavj3e6h.js";
|
|
50
50
|
import {
|
|
51
51
|
setDatabase,
|
|
52
52
|
loadToolDefinitionMeasurements,
|
|
53
53
|
ensureColumn,
|
|
54
54
|
installV95PerfSchema,
|
|
55
55
|
installTagIdentityRevisionTrigger
|
|
56
|
-
} from "./index-
|
|
56
|
+
} from "./index-jhmz9tgv.js";
|
|
57
57
|
import {
|
|
58
58
|
resolveOpenCodeDbPath,
|
|
59
59
|
hasV1MessageTables
|
|
@@ -63,7 +63,7 @@ import {
|
|
|
63
63
|
} from "./index-nrzkqte4.js";
|
|
64
64
|
import {
|
|
65
65
|
logSlowWriteTransaction
|
|
66
|
-
} from "./index-
|
|
66
|
+
} from "./index-1ts77n1b.js";
|
|
67
67
|
import {
|
|
68
68
|
shouldEnforcePrivateStoragePermissions,
|
|
69
69
|
ensureStorageDirectorySync,
|
|
@@ -1787,8 +1787,8 @@ function finishDatabaseOpen(db, dbPath, explicitDbPath, latestSupportedVersion)
|
|
|
1787
1787
|
state.running = startMessageFtsRowidMapBackfill2(db, signal).then(async () => {
|
|
1788
1788
|
if (signal.aborted || !readsOpenCodeStore)
|
|
1789
1789
|
return;
|
|
1790
|
-
const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-
|
|
1791
|
-
const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-
|
|
1790
|
+
const { readRawSessionMessagePage, readRawSessionMessages } = await importPluginModule(() => import("./read-session-chunk-ksh32zfv.js"));
|
|
1791
|
+
const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-8zwv9byv.js"));
|
|
1792
1792
|
if (signal.aborted)
|
|
1793
1793
|
return;
|
|
1794
1794
|
await startMessageTimeBackfill(db, Object.assign(readRawSessionMessages, {
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
log2,
|
|
7
7
|
sessionLog2
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-tm11k42a.js";
|
|
9
9
|
import {
|
|
10
10
|
resolveOpenCodeDbPath,
|
|
11
11
|
assertOpenCodeStoreGeneration,
|
|
@@ -33,13 +33,13 @@ import {
|
|
|
33
33
|
hasRawSessionMessageByIdFromDb2,
|
|
34
34
|
readRawSeedTailFromDb2,
|
|
35
35
|
readRawSessionBoundaryEndpointsFromDb2
|
|
36
|
-
} from "./index-
|
|
36
|
+
} from "./index-xjhq27z9.js";
|
|
37
37
|
import {
|
|
38
38
|
isRecord,
|
|
39
39
|
providerVisiblePart,
|
|
40
40
|
getCandidateToolOwners2,
|
|
41
41
|
pickNearestPriorOwner2
|
|
42
|
-
} from "./index-
|
|
42
|
+
} from "./index-8gvbskcm.js";
|
|
43
43
|
import {
|
|
44
44
|
OMO_INTERNAL_INITIATOR_MARKER,
|
|
45
45
|
isSystemDirective,
|
|
@@ -54,10 +54,10 @@ import {
|
|
|
54
54
|
formatBlock,
|
|
55
55
|
compactTextForSummary,
|
|
56
56
|
mergeCommitHashes
|
|
57
|
-
} from "./index-
|
|
57
|
+
} from "./index-pefn1gt5.js";
|
|
58
58
|
import {
|
|
59
59
|
stableStringify
|
|
60
|
-
} from "./index-
|
|
60
|
+
} from "./index-jhmz9tgv.js";
|
|
61
61
|
import {
|
|
62
62
|
renderToolTemplate
|
|
63
63
|
} from "./index-vcegxfwg.js";
|
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
getMagicContextStorageDir,
|
|
10
10
|
log2,
|
|
11
11
|
sessionLog2
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-tm11k42a.js";
|
|
13
13
|
import {
|
|
14
14
|
isPrefixBoundThinkingModel,
|
|
15
15
|
MERGED_REASONING_PARTS_PREFIX,
|
|
@@ -39,10 +39,10 @@ import {
|
|
|
39
39
|
serializeProcessedImageMarkers,
|
|
40
40
|
getPendingPiCompactionMarkerState,
|
|
41
41
|
logPiCompactionMarkerClear
|
|
42
|
-
} from "./index-
|
|
42
|
+
} from "./index-8gvbskcm.js";
|
|
43
43
|
import {
|
|
44
44
|
estimateTokens
|
|
45
|
-
} from "./index-
|
|
45
|
+
} from "./index-pefn1gt5.js";
|
|
46
46
|
import {
|
|
47
47
|
BoundedSessionMap,
|
|
48
48
|
getTableColumnNames,
|
|
@@ -51,7 +51,7 @@ import {
|
|
|
51
51
|
tagRevisionKey,
|
|
52
52
|
tagIdentityRevisionKey,
|
|
53
53
|
deleteTagIdentityRevisions
|
|
54
|
-
} from "./index-
|
|
54
|
+
} from "./index-jhmz9tgv.js";
|
|
55
55
|
import {
|
|
56
56
|
prepareCachedStatement2,
|
|
57
57
|
withSqliteBackgroundWriter2,
|
|
@@ -60,23 +60,23 @@ import {
|
|
|
60
60
|
import {
|
|
61
61
|
isPidAlive,
|
|
62
62
|
readProcessStartTime
|
|
63
|
-
} from "./index-
|
|
63
|
+
} from "./index-w4sqw9mf.js";
|
|
64
64
|
import {
|
|
65
65
|
withReadOnlySessionDb,
|
|
66
66
|
expandToolPart,
|
|
67
67
|
visitRawSessionMessages2,
|
|
68
68
|
readRawSessionMessageById2
|
|
69
|
-
} from "./index-
|
|
69
|
+
} from "./index-xan5mt5f.js";
|
|
70
70
|
import {
|
|
71
71
|
gaDatabasePath2,
|
|
72
72
|
V2StoreReader2
|
|
73
73
|
} from "./index-nvh6d3bz.js";
|
|
74
74
|
import {
|
|
75
75
|
deleteUnmappedMessageFtsRows2
|
|
76
|
-
} from "./index-
|
|
76
|
+
} from "./index-ghp32f9m.js";
|
|
77
77
|
import {
|
|
78
78
|
deleteChunkEmbedBackoffForSession2
|
|
79
|
-
} from "./index-
|
|
79
|
+
} from "./index-cxczethe.js";
|
|
80
80
|
import {
|
|
81
81
|
invalidateAutoEmbedSession,
|
|
82
82
|
drainBackgroundBatches
|
|
@@ -84,10 +84,10 @@ import {
|
|
|
84
84
|
import {
|
|
85
85
|
layoutLkgPrefix,
|
|
86
86
|
assembleLkgPrefix
|
|
87
|
-
} from "./index-
|
|
87
|
+
} from "./index-gavj3e6h.js";
|
|
88
88
|
import {
|
|
89
89
|
logSlowWriteTransaction
|
|
90
|
-
} from "./index-
|
|
90
|
+
} from "./index-1ts77n1b.js";
|
|
91
91
|
import {
|
|
92
92
|
ensurePrivateStorageDirectorySync,
|
|
93
93
|
writeStorageFileSync,
|