@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.
Files changed (55) hide show
  1. package/dist/auto-search-worker.js +5 -5
  2. package/dist/chunk-embedding-write-worker.js +12 -12
  3. package/dist/{compaction-marker-candidates-9yhrstyb.js → compaction-marker-candidates-nxaamfej.js} +2 -2
  4. package/dist/compaction-marker-candidates-worker.js +1 -1
  5. package/dist/{compartment-chunk-embedding-wg7emg3z.js → compartment-chunk-embedding-avkyp2df.js} +7 -7
  6. package/dist/{embedding-backfill-qde2zywg.js → embedding-backfill-3g3cm51d.js} +12 -12
  7. package/dist/embedding-worker-process.js +1 -1
  8. package/dist/embedding-worker.js +4 -4
  9. package/dist/historian-calibration-extension.js +1 -1
  10. package/dist/{index-j0eagxkz.js → index-1ts77n1b.js} +1 -1
  11. package/dist/{index-xssjy4z9.js → index-3s39a1md.js} +1 -1
  12. package/dist/{index-tz8431zx.js → index-418za765.js} +26 -21
  13. package/dist/{index-xx1911hb.js → index-453s1hj6.js} +1 -1
  14. package/dist/{index-8ej7crnf.js → index-5hhhxck7.js} +10 -10
  15. package/dist/{index-qm139qq2.js → index-5rcjs14a.js} +2 -2
  16. package/dist/{index-yjgkjkjs.js → index-71rg8j43.js} +1 -1
  17. package/dist/{index-zxm7ckvc.js → index-79xfn84y.js} +2 -2
  18. package/dist/{index-xgkq843e.js → index-8gvbskcm.js} +4 -4
  19. package/dist/{index-15eq9z3a.js → index-9cqfbdgb.js} +3 -3
  20. package/dist/{index-ndg15t3x.js → index-cxczethe.js} +4 -4
  21. package/dist/{index-erkb5dee.js → index-e9wkbh8y.js} +8 -8
  22. package/dist/{index-prhdb9c5.js → index-f4n7tnsf.js} +2 -2
  23. package/dist/{index-mmwgmz8f.js → index-fz4gexgk.js} +2 -2
  24. package/dist/{index-d40ecdbn.js → index-gavj3e6h.js} +4 -4
  25. package/dist/{index-6d0bby9d.js → index-ghp32f9m.js} +2 -2
  26. package/dist/{index-v858d5d1.js → index-jhmz9tgv.js} +1 -1
  27. package/dist/{index-awpx91y5.js → index-k7a8x7ba.js} +1 -1
  28. package/dist/{index-15rx61th.js → index-m6kszx0e.js} +4 -4
  29. package/dist/{index-7y60kyea.js → index-pefn1gt5.js} +1 -1
  30. package/dist/{index-jnh7a6a3.js → index-qdy49kwk.js} +4 -4
  31. package/dist/{index-yxeg8zaa.js → index-tm11k42a.js} +9 -4
  32. package/dist/{index-hec3bwev.js → index-txcs0vnj.js} +2 -2
  33. package/dist/{index-0133ybm6.js → index-w4sqw9mf.js} +8 -8
  34. package/dist/{index-7mvsg371.js → index-xan5mt5f.js} +5 -5
  35. package/dist/{index-szn2tac8.js → index-xjhq27z9.js} +1 -1
  36. package/dist/{index-mbzqrp0s.js → index-zgsemyph.js} +10 -10
  37. package/dist/index.js +617 -284
  38. package/dist/{logger-hhgpkbx1.js → logger-93cnqyh0.js} +1 -1
  39. package/dist/{message-fts-rowid-map-tec2x7qe.js → message-fts-rowid-map-dtbragnt.js} +4 -4
  40. package/dist/{message-index-bounded-q6dyk780.js → message-index-bounded-behq385r.js} +9 -9
  41. package/dist/{message-time-backfill-krre2qnb.js → message-time-backfill-8zwv9byv.js} +2 -2
  42. package/dist/migration-worker.js +9 -9
  43. package/dist/{project-embedding-registry-qx2zjbgs.js → project-embedding-registry-63wsm3a8.js} +11 -11
  44. package/dist/raw-ordinal-warmup-worker.js +8 -8
  45. package/dist/{read-session-chunk-ksn2r664.js → read-session-chunk-ksh32zfv.js} +7 -7
  46. package/dist/{read-session-raw-75dcxtdy.js → read-session-raw-0tytrjye.js} +2 -2
  47. package/dist/{render-nejsk0az.js → render-2qed2svq.js} +16 -16
  48. package/dist/{safe-notification-target-8s1xg0q9.js → safe-notification-target-fkyrd95h.js} +2 -2
  49. package/dist/{search-archive-4yfsc0xb.js → search-archive-qqj7j1w1.js} +9 -9
  50. package/dist/{search-h61ec8kh.js → search-vmw1xbqx.js} +19 -19
  51. package/dist/{storage-tags-jfewemtk.js → storage-tags-s0m7e39a.js} +5 -5
  52. package/dist/subagent-entry.js +25 -25
  53. package/dist/tag-snapshot-worker-pi.js +11 -11
  54. package/dist/{v2-archive-reader-hveb3ajf.js → v2-archive-reader-cc7sx6dk.js} +1 -1
  55. 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-v858d5d1.js";
6
+ } from "./index-jhmz9tgv.js";
7
7
  import {
8
8
  getTagsBySession2,
9
9
  getTagsByNumbers2
10
- } from "./index-xgkq843e.js";
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-yxeg8zaa.js";
6
+ } from "./index-tm11k42a.js";
7
7
  import {
8
8
  ensureColumn,
9
9
  healAllNullColumns,
10
10
  installV95PerfSchema
11
- } from "./index-v858d5d1.js";
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-xx1911hb.js";
23
+ } from "./index-453s1hj6.js";
24
24
  import {
25
25
  logSlowWriteTransaction
26
- } from "./index-j0eagxkz.js";
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-szn2tac8.js";
8
+ } from "./index-xjhq27z9.js";
9
9
  import {
10
10
  logSlowWriteTransaction
11
- } from "./index-j0eagxkz.js";
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";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  sessionLog2
3
- } from "./index-yxeg8zaa.js";
3
+ } from "./index-tm11k42a.js";
4
4
  import {
5
5
  isKnownAutocommit
6
6
  } from "./index-nrzkqte4.js";
@@ -6,7 +6,7 @@ import {
6
6
  } from "./index-2qtx0q6h.js";
7
7
  import {
8
8
  managedAuthorityNoteRow
9
- } from "./index-d40ecdbn.js";
9
+ } from "./index-gavj3e6h.js";
10
10
 
11
11
  // ../plugin/src/features/magic-context/storage-notes.ts
12
12
  var NOTE_TYPES = new Set(["session", "smart"]);
@@ -6,19 +6,19 @@ import {
6
6
  removeNestedBlocks,
7
7
  hasMeaningfulUserText2,
8
8
  extractTexts2
9
- } from "./index-7y60kyea.js";
9
+ } from "./index-pefn1gt5.js";
10
10
  import {
11
11
  cleanUserText2
12
- } from "./index-7mvsg371.js";
12
+ } from "./index-xan5mt5f.js";
13
13
  import {
14
14
  recordMessageFtsRowid2,
15
15
  recordIndexedMessageTime2,
16
16
  messageFtsOrdinalRangeIsMapped2,
17
17
  deleteUnmappedMessageFtsRows2
18
- } from "./index-6d0bby9d.js";
18
+ } from "./index-ghp32f9m.js";
19
19
  import {
20
20
  logSlowWriteTransaction
21
- } from "./index-j0eagxkz.js";
21
+ } from "./index-1ts77n1b.js";
22
22
 
23
23
  // ../plugin/src/features/magic-context/compression-depth-storage.ts
24
24
  var incrementDepthStatements = new WeakMap;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  log2
3
- } from "./index-yxeg8zaa.js";
3
+ } from "./index-tm11k42a.js";
4
4
 
5
5
  // ../plugin/src/hooks/magic-context/read-session-formatting.ts
6
6
  import { existsSync, readFileSync, realpathSync, statSync } from "node:fs";
@@ -3,19 +3,19 @@ import {
3
3
  } from "./index-vcegxfwg.js";
4
4
  import {
5
5
  log2
6
- } from "./index-yxeg8zaa.js";
6
+ } from "./index-tm11k42a.js";
7
7
  import {
8
8
  isSynapseEmbeddingTruncated,
9
9
  SynapseEmbeddingProvider
10
- } from "./index-qm139qq2.js";
10
+ } from "./index-5rcjs14a.js";
11
11
  import {
12
12
  LocalEmbeddingProvider
13
- } from "./index-hec3bwev.js";
13
+ } from "./index-txcs0vnj.js";
14
14
  import {
15
15
  OpenAICompatibleEmbeddingProvider,
16
16
  getProjectEmbeddingSnapshot2,
17
17
  embedBatchForProject2
18
- } from "./index-erkb5dee.js";
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, ensureCortexKitArtifactGitignore, getProjectMagicContextHistorianDir, getMagicContextStorageDir, isMagicContextStorageOutsideEngram, claimStorageBackupWarningCheck, getLegacyOpenCodeMagicContextStorageDir, registerStalePluginBuildHost, classifyStalePluginBuild, importPluginModule, setLogLineForwarder2, writeForwardedLogLine2, log2, sessionLog2, getLoggerDiagnostics2, flushLogger2, getLogFilePath2 };
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-qm139qq2.js";
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-yxeg8zaa.js";
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-yxeg8zaa.js";
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-xx1911hb.js";
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-6d0bby9d.js";
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-d40ecdbn.js";
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-v858d5d1.js";
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-j0eagxkz.js";
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-ksn2r664.js"));
1791
- const { startMessageTimeBackfill } = await importPluginModule(() => import("./message-time-backfill-krre2qnb.js"));
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-yxeg8zaa.js";
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-szn2tac8.js";
36
+ } from "./index-xjhq27z9.js";
37
37
  import {
38
38
  isRecord,
39
39
  providerVisiblePart,
40
40
  getCandidateToolOwners2,
41
41
  pickNearestPriorOwner2
42
- } from "./index-xgkq843e.js";
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-7y60kyea.js";
57
+ } from "./index-pefn1gt5.js";
58
58
  import {
59
59
  stableStringify
60
- } from "./index-v858d5d1.js";
60
+ } from "./index-jhmz9tgv.js";
61
61
  import {
62
62
  renderToolTemplate
63
63
  } from "./index-vcegxfwg.js";
@@ -8,7 +8,7 @@ import {
8
8
  } from "./index-8sqebjzk.js";
9
9
  import {
10
10
  log2
11
- } from "./index-yxeg8zaa.js";
11
+ } from "./index-tm11k42a.js";
12
12
  import {
13
13
  reuseWorker
14
14
  } from "./index-wfqysrwq.js";
@@ -9,7 +9,7 @@ import {
9
9
  getMagicContextStorageDir,
10
10
  log2,
11
11
  sessionLog2
12
- } from "./index-yxeg8zaa.js";
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-xgkq843e.js";
42
+ } from "./index-8gvbskcm.js";
43
43
  import {
44
44
  estimateTokens
45
- } from "./index-7y60kyea.js";
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-v858d5d1.js";
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-0133ybm6.js";
63
+ } from "./index-w4sqw9mf.js";
64
64
  import {
65
65
  withReadOnlySessionDb,
66
66
  expandToolPart,
67
67
  visitRawSessionMessages2,
68
68
  readRawSessionMessageById2
69
- } from "./index-7mvsg371.js";
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-6d0bby9d.js";
76
+ } from "./index-ghp32f9m.js";
77
77
  import {
78
78
  deleteChunkEmbedBackoffForSession2
79
- } from "./index-ndg15t3x.js";
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-d40ecdbn.js";
87
+ } from "./index-gavj3e6h.js";
88
88
  import {
89
89
  logSlowWriteTransaction
90
- } from "./index-j0eagxkz.js";
90
+ } from "./index-1ts77n1b.js";
91
91
  import {
92
92
  ensurePrivateStorageDirectorySync,
93
93
  writeStorageFileSync,