@cortexkit/pi-magic-context 0.49.84 → 0.49.85

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 (32) hide show
  1. package/dist/auto-search-worker.js +3 -3
  2. package/dist/chunk-embedding-write-worker.js +5 -4
  3. package/dist/{embedding-backfill-yh10bmx5.js → embedding-backfill-7a01ns95.js} +6 -5
  4. package/dist/embedding-worker.js +14 -27
  5. package/dist/{index-e0zdn1p3.js → index-53fgdt6n.js} +1 -1
  6. package/dist/{index-47g3pgzk.js → index-7v0z62ek.js} +6 -6
  7. package/dist/{index-xz5b9t4g.js → index-7yz95h83.js} +38 -736
  8. package/dist/index-8x8wtn3t.js +1083 -0
  9. package/dist/{index-hna2sxy8.js → index-94z1xzmr.js} +3 -3
  10. package/dist/{index-0apatd37.js → index-bjr11ay6.js} +24 -26
  11. package/dist/{index-gdy08gn6.js → index-ex9te7tc.js} +1 -1
  12. package/dist/{index-qxwed9sk.js → index-fd57gfnn.js} +4 -4
  13. package/dist/{index-nmmge3j6.js → index-gbc29ysq.js} +1 -1
  14. package/dist/{index-txcs0vnj.js → index-rqdjb6j3.js} +461 -273
  15. package/dist/{index-k8xz22jc.js → index-sqp84q6s.js} +1 -1
  16. package/dist/{index-a7kcxjc4.js → index-ty0tvxhm.js} +25 -18
  17. package/dist/{index-3g1wy4z9.js → index-wy6h2wn2.js} +22 -10
  18. package/dist/index.js +61 -57
  19. package/dist/migration-worker.js +5 -4
  20. package/dist/{project-embedding-registry-3sss39rx.js → project-embedding-registry-agkd7egh.js} +7 -4
  21. package/dist/raw-ordinal-warmup-worker.js +2 -2
  22. package/dist/{render-05gdzxc2.js → render-rphfegr8.js} +7 -6
  23. package/dist/{search-archive-32pv4687.js → search-archive-7p43e77j.js} +1 -1
  24. package/dist/{search-dh4ryftv.js → search-pwafh0v5.js} +9 -8
  25. package/dist/{store-mmd2tmm1.js → store-ekaexkvc.js} +1 -1
  26. package/dist/{store-reader-ypd6m0ke.js → store-reader-vwphd51b.js} +1 -1
  27. package/dist/subagent-entry.js +17 -17
  28. package/dist/tag-snapshot-worker-pi.js +5 -4
  29. package/dist/{v2-archive-reader-1ny52akc.js → v2-archive-reader-qc4c9wrp.js} +1 -1
  30. package/package.json +1 -1
  31. package/dist/index-81nthk8j.js +0 -193
  32. /package/dist/{index-2zre7sck.js → index-ddfjg278.js} +0 -0
@@ -27,11 +27,11 @@ serveWorkerJobs(async (initial, port) => {
27
27
  { Database, registerSqliteDiagnosticSink },
28
28
  { log }
29
29
  ] = await Promise.all([
30
- import("./embedding-backfill-yh10bmx5.js"),
30
+ import("./embedding-backfill-7a01ns95.js"),
31
31
  import("./embedding-cache-7rp4gqzr.js"),
32
32
  import("./storage-memory-0ndn65fm.js"),
33
- import("./project-embedding-registry-3sss39rx.js"),
34
- import("./search-dh4ryftv.js"),
33
+ import("./project-embedding-registry-agkd7egh.js"),
34
+ import("./search-pwafh0v5.js"),
35
35
  import("./compartment-chunk-embedding-avkyp2df.js"),
36
36
  import("./embedding-activity-ew6dshfd.js"),
37
37
  import("./harness-9872e0ym.js"),
@@ -30,14 +30,15 @@ import {
30
30
  acquireGitSweepLease,
31
31
  renewGitSweepLease,
32
32
  releaseGitSweepLease
33
- } from "./index-gdy08gn6.js";
34
- import"./index-hna2sxy8.js";
33
+ } from "./index-ex9te7tc.js";
34
+ import"./index-8x8wtn3t.js";
35
+ import"./index-94z1xzmr.js";
35
36
  import {
36
37
  LATEST_SUPPORTED_VERSION,
37
38
  enforceSchemaFence
38
- } from "./index-xz5b9t4g.js";
39
+ } from "./index-7yz95h83.js";
39
40
  import"./index-3bb24eb6.js";
40
- import"./index-e0zdn1p3.js";
41
+ import"./index-53fgdt6n.js";
41
42
  import"./index-jhmz9tgv.js";
42
43
  import"./index-135e8hvg.js";
43
44
  import"./index-n0zjvs3h.js";
@@ -1,21 +1,22 @@
1
1
  import {
2
2
  ensureMemoryEmbeddings2
3
- } from "./index-k8xz22jc.js";
4
- import"./index-3g1wy4z9.js";
3
+ } from "./index-sqp84q6s.js";
4
+ import"./index-wy6h2wn2.js";
5
5
  import"./index-9p40dgkm.js";
6
6
  import"./index-hgd00nas.js";
7
7
  import"./index-yhzhdp3m.js";
8
- import"./index-gdy08gn6.js";
8
+ import"./index-ex9te7tc.js";
9
9
  import"./index-cxczethe.js";
10
- import"./index-txcs0vnj.js";
10
+ import"./index-rqdjb6j3.js";
11
11
  import"./index-5rcjs14a.js";
12
12
  import"./index-vcegxfwg.js";
13
- import"./index-hna2sxy8.js";
13
+ import"./index-94z1xzmr.js";
14
14
  import"./index-ghp32f9m.js";
15
15
  import"./index-xjhq27z9.js";
16
16
  import"./index-wfqysrwq.js";
17
17
  import"./index-8sqebjzk.js";
18
18
  import"./index-1ts77n1b.js";
19
+ import"./index-8x8wtn3t.js";
19
20
  import"./index-pefn1gt5.js";
20
21
  import"./index-2qtx0q6h.js";
21
22
  import"./index-tm11k42a.js";
@@ -2,21 +2,23 @@ import {
2
2
  setHarness2
3
3
  } from "./index-0h2mkab2.js";
4
4
  import {
5
- log2
5
+ log2,
6
+ flushLogger2
6
7
  } from "./index-tm11k42a.js";
7
8
  import"./index-dnp1jjar.js";
9
+ import {
10
+ setStoragePrivatePermissionEnforcement
11
+ } from "./index-8x8wtn3t.js";
8
12
  import"./index-vcegxfwg.js";
9
13
  import"./index-5rcjs14a.js";
10
14
  import"./index-pefn1gt5.js";
11
15
  import"./index-2qtx0q6h.js";
12
16
  import {
17
+ serveEmbeddingWorker,
13
18
  resolveLocalEmbeddingWorkerRuntime,
14
19
  getLocalEmbeddingNativeMemoryStats,
15
20
  LocalEmbeddingProvider
16
- } from "./index-txcs0vnj.js";
17
- import {
18
- setStoragePrivatePermissionEnforcement
19
- } from "./index-81nthk8j.js";
21
+ } from "./index-rqdjb6j3.js";
20
22
 
21
23
  // ../plugin/src/features/magic-context/memory/embedding-worker.ts
22
24
  import { parentPort, workerData } from "node:worker_threads";
@@ -26,27 +28,12 @@ var unsafeNative = workerData.runtimePreference === "native" && resolveLocalEmbe
26
28
  if (unsafeNative)
27
29
  log2("[magic-context] native embedding worker teardown is unsafe on this Bun version; using WASM. Upgrade the host to Bun >=1.4.0 for native inference.");
28
30
  var provider = new LocalEmbeddingProvider(workerData.model, workerData.maxInputTokens, workerData.dtype, unsafeNative ? "wasm" : workerData.runtimePreference);
29
- var queue = Promise.resolve();
30
- parentPort?.on("message", (request) => {
31
- queue = queue.then(async () => {
32
- try {
33
- const loaded = await provider.initialize();
34
- let vectors;
35
- if (loaded && request.texts) {
36
- vectors = [];
37
- for (let offset = 0;offset < request.texts.length; offset += 2) {
38
- vectors.push(...await provider.embedBatch(request.texts.slice(offset, offset + 2)));
39
- }
40
- }
41
- parentPort?.postMessage({
42
- id: request.id,
43
- loaded,
44
- vectors,
45
- failure: provider.getLastFailureReason(),
46
- stats: getLocalEmbeddingNativeMemoryStats()
47
- }, vectors?.flatMap((vector) => vector ? [vector.buffer] : []) ?? []);
48
- } catch (error) {
49
- parentPort?.postMessage({ id: request.id, loaded: false, error: String(error) });
31
+ if (parentPort)
32
+ serveEmbeddingWorker(parentPort, provider, {
33
+ batchSize: 2,
34
+ stats: getLocalEmbeddingNativeMemoryStats,
35
+ exit: () => {
36
+ flushLogger2();
37
+ process.exit(0);
50
38
  }
51
39
  });
52
- });
@@ -20,7 +20,7 @@ import {
20
20
  import {
21
21
  normalizeStoredProjectPath,
22
22
  storedPathBelongsToIdentity
23
- } from "./index-hna2sxy8.js";
23
+ } from "./index-94z1xzmr.js";
24
24
  import {
25
25
  logSlowWriteTransaction
26
26
  } from "./index-1ts77n1b.js";
@@ -38,7 +38,7 @@ import {
38
38
  } from "./index-cxczethe.js";
39
39
  import {
40
40
  LocalEmbeddingProvider
41
- } from "./index-txcs0vnj.js";
41
+ } from "./index-rqdjb6j3.js";
42
42
  import {
43
43
  OpenAICompatibleEmbeddingProvider,
44
44
  saveCommitEmbedding,
@@ -56,20 +56,20 @@ import {
56
56
  getProjectEmbeddingSnapshot2,
57
57
  embedTextForProject2,
58
58
  embedItemsForProject2
59
- } from "./index-3g1wy4z9.js";
59
+ } from "./index-wy6h2wn2.js";
60
60
  import {
61
61
  recordEmbeddingMeasurement
62
62
  } from "./index-hgd00nas.js";
63
63
  import {
64
64
  scheduleAfterBootQuiet
65
- } from "./index-hna2sxy8.js";
65
+ } from "./index-94z1xzmr.js";
66
66
  import {
67
67
  saveEmbeddingIfHashMatches,
68
68
  getProjectEmbeddings2
69
69
  } from "./index-yhzhdp3m.js";
70
70
  import {
71
71
  ensureMemoryEmbeddings2
72
- } from "./index-k8xz22jc.js";
72
+ } from "./index-sqp84q6s.js";
73
73
  import {
74
74
  getMemorySelectColumns2,
75
75
  isMemoryRow2,
@@ -108,11 +108,11 @@ import {
108
108
  expandWorkspaceIdentitySetWithAliases,
109
109
  resolveStoredPathWorkspaceIdentity,
110
110
  sourceNameForMemory
111
- } from "./index-e0zdn1p3.js";
111
+ } from "./index-53fgdt6n.js";
112
112
  import {
113
113
  getNotes,
114
114
  getActivePrimers
115
- } from "./index-nmmge3j6.js";
115
+ } from "./index-gbc29ysq.js";
116
116
  import {
117
117
  computeNormalizedHash
118
118
  } from "./index-9x1f96r8.js";