@cortexkit/pi-magic-context 0.49.17 → 0.49.19

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.
@@ -13,15 +13,15 @@ import {
13
13
  markMessageIndexDirty2,
14
14
  getIndexableContent2,
15
15
  indexSingleMessage2
16
- } from "./index-8r2t8fv2.js";
17
- import"./index-ej4eak9d.js";
16
+ } from "./index-ym6nh2gk.js";
17
+ import"./index-rhprywn6.js";
18
18
  import"./index-1kcfwk9c.js";
19
19
  import"./index-jrap43gc.js";
20
20
  import"./index-bxmf4dhr.js";
21
21
  import"./index-399p688g.js";
22
22
  import"./index-vktahpdj.js";
23
23
  import"./index-8976mezv.js";
24
- import"./index-5k2mshvq.js";
24
+ import"./index-wveb51es.js";
25
25
  import"./index-6x556c2q.js";
26
26
  import"./index-yygsh681.js";
27
27
  import"./index-d8gc0112.js";
@@ -17,10 +17,10 @@ import {
17
17
  indexMessagesAfterOrdinal2,
18
18
  indexSourcesAfterOrdinal2,
19
19
  sweepOrphanedOpenCodeMessageIndexesCooperatively2
20
- } from "./index-8r2t8fv2.js";
20
+ } from "./index-ym6nh2gk.js";
21
21
  import"./index-xnch62s6.js";
22
- import"./index-5k2mshvq.js";
23
- import"./index-ej4eak9d.js";
22
+ import"./index-wveb51es.js";
23
+ import"./index-rhprywn6.js";
24
24
  import"./index-6x556c2q.js";
25
25
  import"./index-d8gc0112.js";
26
26
  import"./index-bxmf4dhr.js";
@@ -9,7 +9,7 @@ import {
9
9
  import"./index-135e8hvg.js";
10
10
  import {
11
11
  runMigrationsWithRetry
12
- } from "./index-gdjv1nnd.js";
12
+ } from "./index-msqrs4nf.js";
13
13
  import {
14
14
  closeQuietly
15
15
  } from "./index-jrap43gc.js";
@@ -20,7 +20,7 @@ import"./index-fapenpch.js";
20
20
  import {
21
21
  setSqlitePragmaConfig,
22
22
  initializeDatabase
23
- } from "./index-469ttgzv.js";
23
+ } from "./index-sqt2haap.js";
24
24
  import"./index-399p688g.js";
25
25
  import"./index-vktahpdj.js";
26
26
  import"./index-yygsh681.js";
@@ -32,7 +32,7 @@ try {
32
32
  await runMessageFtsRowidMapBackfill(db);
33
33
  reply = { kind: "fts-rowid-backfill" };
34
34
  } else if (input.searchArchive) {
35
- const { renderSearchArchive } = await import("./search-archive-9akqcr90.js");
35
+ const { renderSearchArchive } = await import("./search-archive-4817pqev.js");
36
36
  const { readRawSessionMessageIdOrdinalsForRangeFromDb } = await import("./read-session-raw-9s3xn7fc.js");
37
37
  const archive = input.searchArchive;
38
38
  let raw;
@@ -62,7 +62,7 @@ try {
62
62
  { configureContextDatabasePragmas }
63
63
  ] = await Promise.all([
64
64
  import("./harness-9872e0ym.js"),
65
- import("./message-index-2g23b7fe.js"),
65
+ import("./message-index-rc2x41k4.js"),
66
66
  import("./sqlite-context-pragmas-gcgch6qz.js")
67
67
  ]);
68
68
  setHarness(input.harness ?? "opencode");
@@ -76,7 +76,7 @@ try {
76
76
  const { setHarness } = await import("./harness-9872e0ym.js");
77
77
  setHarness(input.harness ?? "opencode");
78
78
  const [{ indexMessageInShortChunks }, { configureContextDatabasePragmas }] = await Promise.all([
79
- import("./message-index-bounded-d6zj2tn5.js"),
79
+ import("./message-index-bounded-66saeq5j.js"),
80
80
  import("./sqlite-context-pragmas-gcgch6qz.js")
81
81
  ]);
82
82
  configureContextDatabasePragmas(db);
@@ -86,7 +86,7 @@ try {
86
86
  const result = await indexMessageInShortChunks(writer, input.sessionId, message, input, () => !cancellation || Atomics.load(cancellation, 0) === 0);
87
87
  reply = { kind: "indexed", inserted: result.inserted, measurements: result.measurements };
88
88
  } else if (input.tagRatio !== undefined) {
89
- const { scanTagOwnerSummary, scanTagOwnerDelta } = await import("./storage-tags-cx6ccsv1.js");
89
+ const { scanTagOwnerSummary, scanTagOwnerDelta } = await import("./storage-tags-1kets0q8.js");
90
90
  const delta = input.tagState ? scanTagOwnerDelta(db, input.sessionId, input.tagState) : null;
91
91
  if (delta)
92
92
  reply = { kind: "tag-delta", delta };
@@ -35,8 +35,8 @@ import {
35
35
  readSessionChunk2,
36
36
  getRawSessionMessageIdsThrough2,
37
37
  readRawSessionSeedTail2
38
- } from "./index-5k2mshvq.js";
39
- import"./index-ej4eak9d.js";
38
+ } from "./index-wveb51es.js";
39
+ import"./index-rhprywn6.js";
40
40
  import"./index-6x556c2q.js";
41
41
  import"./index-bxmf4dhr.js";
42
42
  import"./index-8976mezv.js";
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  renderSearchArchive2
3
- } from "./index-z7kbck29.js";
3
+ } from "./index-dtp1efvf.js";
4
4
  import"./index-1cvyaw9a.js";
5
- import"./index-5k2mshvq.js";
6
- import"./index-ej4eak9d.js";
5
+ import"./index-wveb51es.js";
6
+ import"./index-rhprywn6.js";
7
7
  import"./index-6x556c2q.js";
8
8
  import"./index-bxmf4dhr.js";
9
9
  import"./index-8976mezv.js";
@@ -5,9 +5,9 @@ import {
5
5
  resolveMemoriesByIdsForSearch2,
6
6
  unifiedSearch2,
7
7
  formatSearchResults2
8
- } from "./index-9j809q6f.js";
8
+ } from "./index-58mj0dzc.js";
9
9
  import"./index-1cvyaw9a.js";
10
- import"./index-8r2t8fv2.js";
10
+ import"./index-ym6nh2gk.js";
11
11
  import"./index-z2rkv0mb.js";
12
12
  import"./index-vmcgew7x.js";
13
13
  import"./index-9p40dgkm.js";
@@ -15,13 +15,13 @@ import"./index-e1rza8gp.js";
15
15
  import"./index-yhzhdp3m.js";
16
16
  import"./index-svgkv4g2.js";
17
17
  import"./index-xnch62s6.js";
18
- import"./index-5k2mshvq.js";
19
- import"./index-ej4eak9d.js";
18
+ import"./index-wveb51es.js";
19
+ import"./index-rhprywn6.js";
20
20
  import"./index-6x556c2q.js";
21
21
  import"./index-2mmy81qt.js";
22
22
  import"./index-d8gc0112.js";
23
23
  import"./index-bxmf4dhr.js";
24
- import"./index-gdjv1nnd.js";
24
+ import"./index-msqrs4nf.js";
25
25
  import"./index-apgwdby5.js";
26
26
  import"./index-g7p75667.js";
27
27
  import"./index-yygsh681.js";
@@ -60,7 +60,7 @@ import {
60
60
  adoptNullOwnerToolTag2,
61
61
  getCandidateToolOwners2,
62
62
  pickNearestPriorOwner2
63
- } from "./index-ej4eak9d.js";
63
+ } from "./index-rhprywn6.js";
64
64
  import"./index-jrap43gc.js";
65
65
  import"./index-1kcfwk9c.js";
66
66
  import"./index-rrwv9y2k.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TOKEN_BUDGET_TOOL_REFUSAL
3
- } from "./index-5k2mshvq.js";
3
+ } from "./index-wveb51es.js";
4
4
  import {
5
5
  setHarness2
6
6
  } from "./index-0h2mkab2.js";
@@ -15,11 +15,11 @@ import"./index-apgwdby5.js";
15
15
  import"./index-fapenpch.js";
16
16
  import {
17
17
  openDatabase
18
- } from "./index-469ttgzv.js";
18
+ } from "./index-sqt2haap.js";
19
19
  import"./index-399p688g.js";
20
20
  import"./index-vktahpdj.js";
21
21
  import"./index-yygsh681.js";
22
- import"./index-gdjv1nnd.js";
22
+ import"./index-msqrs4nf.js";
23
23
  import"./index-jrap43gc.js";
24
24
  import"./index-135e8hvg.js";
25
25
  import"./index-8976mezv.js";
@@ -30,7 +30,7 @@ import {
30
30
  ensureProjectRegisteredFromPiDirectory,
31
31
  resolvePiHarnessKind,
32
32
  registerMagicContextTools
33
- } from "./index-es03azap.js";
33
+ } from "./index-ek9zvs4f.js";
34
34
  import"./index-bxmf4dhr.js";
35
35
  import"./index-d8gc0112.js";
36
36
  import"./index-xnch62s6.js";
@@ -40,12 +40,12 @@ import"./index-9p40dgkm.js";
40
40
  import"./index-svgkv4g2.js";
41
41
  import"./index-yhzhdp3m.js";
42
42
  import"./index-z2rkv0mb.js";
43
- import"./index-8r2t8fv2.js";
44
- import"./index-ej4eak9d.js";
43
+ import"./index-ym6nh2gk.js";
44
+ import"./index-rhprywn6.js";
45
45
  import"./index-6x556c2q.js";
46
- import"./index-9j809q6f.js";
46
+ import"./index-58mj0dzc.js";
47
47
  import"./index-1cvyaw9a.js";
48
- import"./index-z7kbck29.js";
48
+ import"./index-dtp1efvf.js";
49
49
  import"./index-e1rza8gp.js";
50
50
  import"./index-qpq6w67c.js";
51
51
  import"./index-d4dt19md.js";
@@ -9,11 +9,11 @@ import"./index-fapenpch.js";
9
9
  import {
10
10
  LATEST_SUPPORTED_VERSION,
11
11
  getPersistedSchemaVersion
12
- } from "./index-469ttgzv.js";
12
+ } from "./index-sqt2haap.js";
13
13
  import"./index-399p688g.js";
14
14
  import"./index-vktahpdj.js";
15
15
  import"./index-yygsh681.js";
16
- import"./index-gdjv1nnd.js";
16
+ import"./index-msqrs4nf.js";
17
17
  import {
18
18
  tagRevisionKey
19
19
  } from "./index-jrap43gc.js";
@@ -23,12 +23,12 @@ import"./index-1kcfwk9c.js";
23
23
  import {
24
24
  normalizeTagSnapshotRow2,
25
25
  TAG_SELECT_COLUMNS2
26
- } from "./index-ej4eak9d.js";
26
+ } from "./index-rhprywn6.js";
27
27
  import {
28
28
  encodePiHydrationOperation,
29
29
  PI_FALLBACK_ROW_COLUMNS,
30
30
  PI_FALLBACK_ROW_PREDICATE
31
- } from "./index-dvbjsh98.js";
31
+ } from "./index-rc1dez8m.js";
32
32
  import"./index-d4dt19md.js";
33
33
 
34
34
  // src/tag-snapshot-worker-pi.ts
@@ -186,47 +186,50 @@ async function stream(kind) {
186
186
  }
187
187
  await send({ ...envelope(), type: "end", stream: kind, rows: rowsSent });
188
188
  }
189
- try {
190
- if (request.test?.openDelayMs)
191
- await delay(request.test.openDelayMs);
192
- db = new Database2(request.path, { readonly: true });
193
- opened = true;
194
- db.exec("PRAGMA query_only = ON; PRAGMA busy_timeout = 50; PRAGMA cache_size = -1024");
195
- generationStatement = db.prepare(`SELECT
189
+ var run = async () => {
190
+ try {
191
+ if (request.test?.openDelayMs)
192
+ await delay(request.test.openDelayMs);
193
+ db = new Database2(request.path, { readonly: true });
194
+ opened = true;
195
+ db.exec("PRAGMA query_only = ON; PRAGMA busy_timeout = 50; PRAGMA cache_size = -1024");
196
+ generationStatement = db.prepare(`SELECT
196
197
  COALESCE((SELECT value FROM schema_migrations_meta WHERE key = ?), '0') AS revision,
197
198
  COALESCE((SELECT tags_version FROM session_meta WHERE session_id = ?), 0) AS durable`);
198
- const version = getPersistedSchemaVersion(db);
199
- persistedVersion = version;
200
- if (version > LATEST_SUPPORTED_VERSION)
201
- throw new UnsupportedSchema(`shared database schema v${version} is newer than this build supports (v${LATEST_SUPPORTED_VERSION}); update and restart this host`);
202
- await stream("tags");
203
- await stream("fallback");
204
- if (request.test?.crash === "before-end")
205
- throw new Error("injected worker crash before completion");
206
- const final = sample(db);
207
- if (final.revision !== generation.revision || final.durable !== generation.durable)
208
- throw new StaleGeneration("session tags changed after final page");
209
- db.close();
210
- db = undefined;
211
- port.postMessage({
212
- ...envelope(),
213
- type: "done",
214
- maxReadTransactionMs,
215
- packetCount,
216
- packetBytes
217
- });
218
- if (request.test?.crash === "after-end")
219
- process.exitCode = 1;
220
- } catch (error) {
221
- port.postMessage({
222
- ...envelope(),
223
- type: "failed",
224
- code: error instanceof StaleGeneration ? "stale" : error instanceof UnsupportedSchema ? "schema" : opened ? "failed" : "open",
225
- persistedVersion,
226
- supportedVersion: LATEST_SUPPORTED_VERSION,
227
- reason: error instanceof Error ? error.message : String(error)
228
- });
229
- } finally {
230
- db?.close();
231
- port.close();
232
- }
199
+ const version = getPersistedSchemaVersion(db);
200
+ persistedVersion = version;
201
+ if (version > LATEST_SUPPORTED_VERSION)
202
+ throw new UnsupportedSchema(`shared database schema v${version} is newer than this build supports (v${LATEST_SUPPORTED_VERSION}); update and restart this host`);
203
+ await stream("tags");
204
+ await stream("fallback");
205
+ if (request.test?.crash === "before-end")
206
+ throw new Error("injected worker crash before completion");
207
+ const final = sample(db);
208
+ if (final.revision !== generation.revision || final.durable !== generation.durable)
209
+ throw new StaleGeneration("session tags changed after final page");
210
+ db.close();
211
+ db = undefined;
212
+ port.postMessage({
213
+ ...envelope(),
214
+ type: "done",
215
+ maxReadTransactionMs,
216
+ packetCount,
217
+ packetBytes
218
+ });
219
+ if (request.test?.crash === "after-end")
220
+ process.exitCode = 1;
221
+ } catch (error) {
222
+ port.postMessage({
223
+ ...envelope(),
224
+ type: "failed",
225
+ code: error instanceof StaleGeneration ? "stale" : error instanceof UnsupportedSchema ? "schema" : opened ? "failed" : "open",
226
+ persistedVersion,
227
+ supportedVersion: LATEST_SUPPORTED_VERSION,
228
+ reason: error instanceof Error ? error.message : String(error)
229
+ });
230
+ } finally {
231
+ db?.close();
232
+ port.close();
233
+ }
234
+ };
235
+ run();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/pi-magic-context",
3
- "version": "0.49.17",
3
+ "version": "0.49.19",
4
4
  "type": "module",
5
5
  "description": "Pi and OMP coding agent extension for Magic Context — cross-session memory and context management",
6
6
  "main": "dist/index.js",
@@ -65,8 +65,13 @@
65
65
  "@types/bun": "^1.3.10",
66
66
  "@types/node": "^22.20.0",
67
67
  "omp-coding-agent-1812": "npm:@oh-my-pi/pi-coding-agent@18.12.3",
68
+ "omp-pi-ai-1889": "npm:@oh-my-pi/pi-ai@18.8.9",
69
+ "omp-pi-ai-1811": "npm:@oh-my-pi/pi-ai@18.11.3",
70
+ "omp-pi-ai-1812": "npm:@oh-my-pi/pi-ai@18.12.3",
68
71
  "pi-agent-core-087": "npm:@earendil-works/pi-agent-core@0.87.1",
69
72
  "pi-ai-086": "npm:@earendil-works/pi-ai@0.86.0",
73
+ "pi-ai-087": "npm:@earendil-works/pi-ai@0.87.1",
74
+ "pi-ai-130": "npm:@earendil-works/pi-ai@1.3.0",
70
75
  "pi-coding-agent-086": "npm:@earendil-works/pi-coding-agent@0.86.0",
71
76
  "pi-coding-agent-087": "npm:@earendil-works/pi-coding-agent@0.87.1",
72
77
  "pi-coding-agent-130": "npm:@earendil-works/pi-coding-agent@1.3.0",