@cortexkit/pi-magic-context 0.49.29 → 0.49.31

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,7 +13,7 @@ import"./index-399p688g.js";
13
13
  import"./index-54wmg4rj.js";
14
14
  import"./index-6981g1xv.js";
15
15
  import"./index-23t8ryqw.js";
16
- import"./index-yvb1cz6b.js";
16
+ import"./index-34e3mm36.js";
17
17
  import"./index-6x556c2q.js";
18
18
  import {
19
19
  MESSAGE_INDEX_MAX_FTS_BYTES,
@@ -22,7 +22,7 @@ import {
22
22
  markMessageIndexDirty,
23
23
  getIndexableContent,
24
24
  indexSingleMessage
25
- } from "./index-vppykq05.js";
25
+ } from "./index-yddeb86g.js";
26
26
  import"./index-bvpar0bg.js";
27
27
  import"./index-hqw0rt9k.js";
28
28
 
@@ -18,7 +18,7 @@ import"./index-48twbev2.js";
18
18
  import {
19
19
  setSqlitePragmaConfig,
20
20
  initializeDatabase
21
- } from "./index-9pfffeqj.js";
21
+ } from "./index-xvqcqg0r.js";
22
22
  import"./index-fapenpch.js";
23
23
  import"./index-399p688g.js";
24
24
  import"./index-54wmg4rj.js";
@@ -51,7 +51,7 @@ async function main() {
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-yky3g10b.js");
54
+ const { renderSearchArchive } = await import("./search-archive-5tmg1jyb.js");
55
55
  const { readRawSessionMessageIdOrdinalsForRangeFromDb } = await import("./read-session-raw-g9b1zdn5.js");
56
56
  const archive = input.searchArchive;
57
57
  let raw;
@@ -81,7 +81,7 @@ async function main() {
81
81
  const { setHarness } = await import("./harness-9872e0ym.js");
82
82
  setHarness(input.harness ?? "opencode");
83
83
  const [{ indexMessageInShortChunks }, { configureContextDatabasePragmas }] = await Promise.all([
84
- import("./message-index-bounded-w10cy1s9.js"),
84
+ import("./message-index-bounded-7aw556kv.js"),
85
85
  import("./sqlite-context-pragmas-gcgch6qz.js")
86
86
  ]);
87
87
  configureContextDatabasePragmas(db);
@@ -36,7 +36,7 @@ import {
36
36
  readSessionChunk2,
37
37
  getRawSessionMessageIdsThrough2,
38
38
  readRawSessionSeedTail2
39
- } from "./index-yvb1cz6b.js";
39
+ } from "./index-34e3mm36.js";
40
40
  import"./index-0x1c054v.js";
41
41
  import"./index-6x556c2q.js";
42
42
  import"./index-ccanzg8p.js";
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  renderSearchArchive2
3
- } from "./index-fp40yrsy.js";
3
+ } from "./index-sr1ss4f8.js";
4
4
  import"./index-1cvyaw9a.js";
5
- import"./index-yvb1cz6b.js";
5
+ import"./index-34e3mm36.js";
6
6
  import"./index-0x1c054v.js";
7
7
  import"./index-6x556c2q.js";
8
8
  import"./index-ccanzg8p.js";
@@ -5,9 +5,9 @@ import {
5
5
  resolveMemoriesByIdsForSearch2,
6
6
  unifiedSearch2,
7
7
  formatSearchResults2
8
- } from "./index-wcma874r.js";
8
+ } from "./index-bpd654bz.js";
9
9
  import"./index-1cvyaw9a.js";
10
- import"./index-vppykq05.js";
10
+ import"./index-yddeb86g.js";
11
11
  import"./index-4nny4r40.js";
12
12
  import"./index-0jykn0dw.js";
13
13
  import"./index-9p40dgkm.js";
@@ -15,7 +15,7 @@ import"./index-29nw7n1r.js";
15
15
  import"./index-yhzhdp3m.js";
16
16
  import"./index-4zemngt7.js";
17
17
  import"./index-kmk3xpf9.js";
18
- import"./index-yvb1cz6b.js";
18
+ import"./index-34e3mm36.js";
19
19
  import"./index-0x1c054v.js";
20
20
  import"./index-6x556c2q.js";
21
21
  import"./index-wqpjhx1p.js";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  TOKEN_BUDGET_TOOL_REFUSAL
3
- } from "./index-yvb1cz6b.js";
3
+ } from "./index-34e3mm36.js";
4
4
  import {
5
5
  setHarness2
6
6
  } from "./index-0h2mkab2.js";
@@ -13,7 +13,7 @@ import {
13
13
  import"./index-2qtx0q6h.js";
14
14
  import {
15
15
  openDatabase
16
- } from "./index-9pfffeqj.js";
16
+ } from "./index-xvqcqg0r.js";
17
17
  import"./index-fapenpch.js";
18
18
  import"./index-399p688g.js";
19
19
  import"./index-54wmg4rj.js";
@@ -30,7 +30,7 @@ import {
30
30
  ensureProjectRegisteredFromPiDirectory,
31
31
  resolvePiHarnessKind,
32
32
  registerMagicContextTools
33
- } from "./index-00p6t4nd.js";
33
+ } from "./index-2nryd8ye.js";
34
34
  import"./index-ccanzg8p.js";
35
35
  import"./index-gwxaz0z5.js";
36
36
  import"./index-kmk3xpf9.js";
@@ -40,12 +40,12 @@ import"./index-9p40dgkm.js";
40
40
  import"./index-4zemngt7.js";
41
41
  import"./index-yhzhdp3m.js";
42
42
  import"./index-4nny4r40.js";
43
- import"./index-vppykq05.js";
43
+ import"./index-yddeb86g.js";
44
44
  import"./index-0x1c054v.js";
45
45
  import"./index-6x556c2q.js";
46
- import"./index-wcma874r.js";
46
+ import"./index-bpd654bz.js";
47
47
  import"./index-1cvyaw9a.js";
48
- import"./index-fp40yrsy.js";
48
+ import"./index-sr1ss4f8.js";
49
49
  import"./index-29nw7n1r.js";
50
50
  import"./index-6wdwv3a6.js";
51
51
  import"./index-hqw0rt9k.js";
@@ -7,7 +7,7 @@ import"./index-fgs78jyd.js";
7
7
  import {
8
8
  LATEST_SUPPORTED_VERSION,
9
9
  getPersistedSchemaVersion
10
- } from "./index-9pfffeqj.js";
10
+ } from "./index-xvqcqg0r.js";
11
11
  import"./index-fapenpch.js";
12
12
  import"./index-399p688g.js";
13
13
  import {
@@ -28,9 +28,10 @@ import {
28
28
  } from "./index-0x1c054v.js";
29
29
  import {
30
30
  encodePiHydrationOperation,
31
+ projectPiPassTag,
31
32
  PI_FALLBACK_ROW_COLUMNS,
32
33
  PI_FALLBACK_ROW_PREDICATE
33
- } from "./index-f1pcnedq.js";
34
+ } from "./index-v40sm8q6.js";
34
35
  import"./index-hqw0rt9k.js";
35
36
 
36
37
  // src/tag-snapshot-worker-pi.ts
@@ -123,7 +124,8 @@ async function stream(kind) {
123
124
  const fallback = kind === "fallback" ? `AND ${PI_FALLBACK_ROW_PREDICATE}` : "";
124
125
  const query = `SELECT ${columns} FROM tags WHERE session_id = ? ${fallback}`;
125
126
  const firstPage = connection.prepare(`${query} ORDER BY tag_number ASC, id ASC LIMIT 256`);
126
- const nextPage = connection.prepare(`${query} AND ((? IS NULL AND tag_number IS NOT NULL) OR tag_number > ? OR (tag_number IS ? AND id > ?)) ORDER BY tag_number ASC, id ASC LIMIT 256`);
127
+ const nextPage = connection.prepare(`${query} AND (tag_number, id) > (?, ?) ORDER BY tag_number ASC, id ASC LIMIT 256`);
128
+ const nextNullPage = connection.prepare(`${query} AND ((tag_number IS NULL AND id > ?) OR tag_number IS NOT NULL) ORDER BY tag_number ASC, id ASC LIMIT 256`);
127
129
  let buffer = new Uint8Array(65536);
128
130
  for (;; ) {
129
131
  if (request.test?.pageDelayMs)
@@ -138,7 +140,7 @@ async function stream(kind) {
138
140
  generation = stamp;
139
141
  } else if (stamp.revision !== generation.revision || stamp.durable !== generation.durable)
140
142
  throw new StaleGeneration("session tags changed between pages");
141
- rows = cursor ? nextPage.all(request.sessionId, cursor.tag_number, cursor.tag_number, cursor.tag_number, cursor.id) : firstPage.all(request.sessionId);
143
+ rows = cursor ? cursor.tag_number === null ? nextNullPage.all(request.sessionId, cursor.id) : nextPage.all(request.sessionId, cursor.tag_number, cursor.id) : firstPage.all(request.sessionId);
142
144
  connection.exec("COMMIT");
143
145
  } catch (error) {
144
146
  connection.exec("ROLLBACK");
@@ -168,7 +170,8 @@ async function stream(kind) {
168
170
  };
169
171
  for (const raw of rows) {
170
172
  cursor = { tag_number: raw.tag_number, id: raw.id };
171
- const row = kind === "tags" ? normalizeTagSnapshotRow2(raw) : raw;
173
+ const normalized = kind === "tags" ? normalizeTagSnapshotRow2(raw) : raw;
174
+ const row = kind === "tags" && normalized && request.projection === "pass" ? projectPiPassTag(normalized) : normalized;
172
175
  if (!row)
173
176
  continue;
174
177
  for (const operation of operations(row)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/pi-magic-context",
3
- "version": "0.49.29",
3
+ "version": "0.49.31",
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",
@@ -66,12 +66,14 @@
66
66
  "@types/node": "^22.20.0",
67
67
  "omp-coding-agent-1812": "npm:@oh-my-pi/pi-coding-agent@18.12.3",
68
68
  "omp-coding-agent-18126": "npm:@oh-my-pi/pi-coding-agent@18.12.6",
69
+ "omp-coding-agent-18132": "npm:@oh-my-pi/pi-coding-agent@18.13.2",
69
70
  "omp-pi-ai-171": "npm:@oh-my-pi/pi-ai@17.1.7",
70
71
  "omp-pi-ai-1889": "npm:@oh-my-pi/pi-ai@18.8.9",
71
72
  "omp-pi-ai-1811": "npm:@oh-my-pi/pi-ai@18.11.3",
72
73
  "omp-pi-ai-1812": "npm:@oh-my-pi/pi-ai@18.12.3",
73
74
  "omp-pi-ai-18126": "npm:@oh-my-pi/pi-ai@18.12.6",
74
75
  "omp-pi-ai-1813": "npm:@oh-my-pi/pi-ai@18.13.0",
76
+ "omp-pi-ai-18132": "npm:@oh-my-pi/pi-ai@18.13.2",
75
77
  "pi-agent-core-087": "npm:@earendil-works/pi-agent-core@0.87.1",
76
78
  "pi-ai-086": "npm:@earendil-works/pi-ai@0.86.0",
77
79
  "pi-ai-087": "npm:@earendil-works/pi-ai@0.87.1",