@cortexkit/pi-magic-context 0.49.30 → 0.49.32
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 +4 -4
- package/dist/chunk-embedding-write-worker.js +4 -4
- package/dist/{compartment-chunk-embedding-pkk5beqp.js → compartment-chunk-embedding-8c85ebce.js} +1 -1
- package/dist/{embedding-backfill-v83xh6e8.js → embedding-backfill-rwfmyvze.js} +3 -3
- package/dist/{index-kmk3xpf9.js → index-0gymvr5j.js} +47 -7
- package/dist/{index-n2ayqhbx.js → index-87xkw8xm.js} +7 -5
- package/dist/{index-4nny4r40.js → index-9xd7qveg.js} +1 -1
- package/dist/{index-g026ztby.js → index-c474g0gj.js} +4 -18
- package/dist/{index-gxjppvsh.js → index-d0n9yjnc.js} +35 -13
- package/dist/{index-5qh6z3sn.js → index-d5q1q700.js} +1 -1
- package/dist/{index-2pnhk4gc.js → index-drmr22ac.js} +115 -39
- package/dist/{index-0cq3g9y5.js → index-e59j3yq5.js} +414 -11
- package/dist/{index-0x1c054v.js → index-eqw9t2ty.js} +1 -1
- package/dist/index-nrzkqte4.js +18 -0
- package/dist/{index-0s14xaca.js → index-pb3ea2tq.js} +1 -1
- package/dist/{index-y5x5wt5t.js → index-r9y6tbbm.js} +6 -4
- package/dist/{index-74bc8ts8.js → index-wpazxe9x.js} +64 -3
- package/dist/{index-0jykn0dw.js → index-xn5yh0pn.js} +65 -2
- package/dist/index.js +722 -447
- package/dist/{message-index-bounded-vkqx693v.js → message-index-bounded-n30vk21s.js} +4 -4
- package/dist/migration-worker.js +6 -5
- package/dist/{project-embedding-registry-wwbhm9rf.js → project-embedding-registry-acqb6be4.js} +2 -2
- package/dist/raw-ordinal-warmup-worker.js +3 -3
- package/dist/{read-session-chunk-73kd0ans.js → read-session-chunk-ka6dhc77.js} +3 -3
- package/dist/{search-archive-ck531w6h.js → search-archive-msy2bczx.js} +4 -4
- package/dist/{search-tgv2rdac.js → search-qbxrnnjb.js} +9 -9
- package/dist/{storage-tags-9qaasrky.js → storage-tags-6409qq18.js} +2 -2
- package/dist/subagent-entry.js +12 -12
- package/dist/tag-snapshot-worker-pi.js +11 -8
- package/package.json +3 -1
|
@@ -3,17 +3,17 @@ import {
|
|
|
3
3
|
withIndexChunk2,
|
|
4
4
|
yieldIndexChunk2
|
|
5
5
|
} from "./index-2qtx0q6h.js";
|
|
6
|
-
import"./index-
|
|
6
|
+
import"./index-eqw9t2ty.js";
|
|
7
7
|
import"./index-my0dn413.js";
|
|
8
8
|
import"./index-0h2mkab2.js";
|
|
9
9
|
import"./index-fgs78jyd.js";
|
|
10
|
-
import"./index-
|
|
10
|
+
import"./index-c474g0gj.js";
|
|
11
11
|
import"./index-ccanzg8p.js";
|
|
12
12
|
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-
|
|
16
|
+
import"./index-87xkw8xm.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-
|
|
25
|
+
} from "./index-wpazxe9x.js";
|
|
26
26
|
import"./index-bvpar0bg.js";
|
|
27
27
|
import"./index-hqw0rt9k.js";
|
|
28
28
|
|
package/dist/migration-worker.js
CHANGED
|
@@ -9,22 +9,23 @@ import {
|
|
|
9
9
|
import"./index-135e8hvg.js";
|
|
10
10
|
import {
|
|
11
11
|
runMigrationsWithRetry
|
|
12
|
-
} from "./index-
|
|
13
|
-
import
|
|
14
|
-
closeQuietly
|
|
15
|
-
} from "./index-g026ztby.js";
|
|
12
|
+
} from "./index-pb3ea2tq.js";
|
|
13
|
+
import"./index-c474g0gj.js";
|
|
16
14
|
import"./index-23t8ryqw.js";
|
|
17
15
|
import"./index-48twbev2.js";
|
|
18
16
|
import {
|
|
19
17
|
setSqlitePragmaConfig,
|
|
20
18
|
initializeDatabase
|
|
21
|
-
} from "./index-
|
|
19
|
+
} from "./index-r9y6tbbm.js";
|
|
22
20
|
import"./index-fapenpch.js";
|
|
23
21
|
import"./index-399p688g.js";
|
|
24
22
|
import"./index-54wmg4rj.js";
|
|
25
23
|
import"./index-6981g1xv.js";
|
|
26
24
|
import"./index-bvpar0bg.js";
|
|
27
25
|
import"./index-my0dn413.js";
|
|
26
|
+
import {
|
|
27
|
+
closeQuietly
|
|
28
|
+
} from "./index-nrzkqte4.js";
|
|
28
29
|
import"./index-hqw0rt9k.js";
|
|
29
30
|
|
|
30
31
|
// ../plugin/src/features/magic-context/migration-worker.ts
|
package/dist/{project-embedding-registry-wwbhm9rf.js → project-embedding-registry-acqb6be4.js}
RENAMED
|
@@ -33,11 +33,11 @@ import {
|
|
|
33
33
|
sweepAllRegisteredProjects2,
|
|
34
34
|
_setTestProviderFactoryForProject2,
|
|
35
35
|
_resetProjectEmbeddingRegistryForTests2
|
|
36
|
-
} from "./index-
|
|
36
|
+
} from "./index-xn5yh0pn.js";
|
|
37
37
|
import"./index-9p40dgkm.js";
|
|
38
38
|
import"./index-yhzhdp3m.js";
|
|
39
39
|
import"./index-4zemngt7.js";
|
|
40
|
-
import"./index-
|
|
40
|
+
import"./index-0gymvr5j.js";
|
|
41
41
|
import"./index-wqpjhx1p.js";
|
|
42
42
|
import"./index-gwxaz0z5.js";
|
|
43
43
|
import"./index-ccanzg8p.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-
|
|
54
|
+
const { renderSearchArchive } = await import("./search-archive-msy2bczx.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-
|
|
84
|
+
import("./message-index-bounded-n30vk21s.js"),
|
|
85
85
|
import("./sqlite-context-pragmas-gcgch6qz.js")
|
|
86
86
|
]);
|
|
87
87
|
configureContextDatabasePragmas(db);
|
|
@@ -95,7 +95,7 @@ async function main() {
|
|
|
95
95
|
measurements: result.measurements
|
|
96
96
|
};
|
|
97
97
|
} else if (input.tagRatio !== undefined) {
|
|
98
|
-
const { scanTagOwnerSummary, scanTagOwnerDelta } = await import("./storage-tags-
|
|
98
|
+
const { scanTagOwnerSummary, scanTagOwnerDelta } = await import("./storage-tags-6409qq18.js");
|
|
99
99
|
const delta = input.tagState ? scanTagOwnerDelta(db, input.sessionId, input.tagState) : null;
|
|
100
100
|
if (delta)
|
|
101
101
|
reply = { kind: "tag-delta", delta };
|
|
@@ -36,12 +36,12 @@ import {
|
|
|
36
36
|
readSessionChunk2,
|
|
37
37
|
getRawSessionMessageIdsThrough2,
|
|
38
38
|
readRawSessionSeedTail2
|
|
39
|
-
} from "./index-
|
|
40
|
-
import"./index-
|
|
39
|
+
} from "./index-87xkw8xm.js";
|
|
40
|
+
import"./index-eqw9t2ty.js";
|
|
41
41
|
import"./index-6x556c2q.js";
|
|
42
42
|
import"./index-ccanzg8p.js";
|
|
43
43
|
import"./index-23t8ryqw.js";
|
|
44
|
-
import"./index-
|
|
44
|
+
import"./index-c474g0gj.js";
|
|
45
45
|
import"./index-6981g1xv.js";
|
|
46
46
|
import"./index-399p688g.js";
|
|
47
47
|
import"./index-hqw0rt9k.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
renderSearchArchive2
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-d5q1q700.js";
|
|
4
4
|
import"./index-1cvyaw9a.js";
|
|
5
|
-
import"./index-
|
|
6
|
-
import"./index-
|
|
5
|
+
import"./index-87xkw8xm.js";
|
|
6
|
+
import"./index-eqw9t2ty.js";
|
|
7
7
|
import"./index-6x556c2q.js";
|
|
8
8
|
import"./index-ccanzg8p.js";
|
|
9
9
|
import"./index-23t8ryqw.js";
|
|
10
|
-
import"./index-
|
|
10
|
+
import"./index-c474g0gj.js";
|
|
11
11
|
import"./index-6981g1xv.js";
|
|
12
12
|
import"./index-399p688g.js";
|
|
13
13
|
import"./index-hqw0rt9k.js";
|
|
@@ -5,28 +5,28 @@ import {
|
|
|
5
5
|
resolveMemoriesByIdsForSearch2,
|
|
6
6
|
unifiedSearch2,
|
|
7
7
|
formatSearchResults2
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-e59j3yq5.js";
|
|
9
9
|
import"./index-1cvyaw9a.js";
|
|
10
|
-
import"./index-
|
|
11
|
-
import"./index-
|
|
12
|
-
import"./index-
|
|
10
|
+
import"./index-wpazxe9x.js";
|
|
11
|
+
import"./index-9xd7qveg.js";
|
|
12
|
+
import"./index-xn5yh0pn.js";
|
|
13
13
|
import"./index-9p40dgkm.js";
|
|
14
14
|
import"./index-29nw7n1r.js";
|
|
15
15
|
import"./index-yhzhdp3m.js";
|
|
16
16
|
import"./index-4zemngt7.js";
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
19
|
-
import"./index-
|
|
17
|
+
import"./index-0gymvr5j.js";
|
|
18
|
+
import"./index-87xkw8xm.js";
|
|
19
|
+
import"./index-eqw9t2ty.js";
|
|
20
20
|
import"./index-6x556c2q.js";
|
|
21
21
|
import"./index-wqpjhx1p.js";
|
|
22
22
|
import"./index-gwxaz0z5.js";
|
|
23
23
|
import"./index-ccanzg8p.js";
|
|
24
|
-
import"./index-
|
|
24
|
+
import"./index-pb3ea2tq.js";
|
|
25
25
|
import"./index-48twbev2.js";
|
|
26
26
|
import"./index-bvpar0bg.js";
|
|
27
27
|
import"./index-135e8hvg.js";
|
|
28
28
|
import"./index-23t8ryqw.js";
|
|
29
|
-
import"./index-
|
|
29
|
+
import"./index-c474g0gj.js";
|
|
30
30
|
import"./index-6981g1xv.js";
|
|
31
31
|
import"./index-399p688g.js";
|
|
32
32
|
import"./index-hqw0rt9k.js";
|
|
@@ -61,8 +61,8 @@ import {
|
|
|
61
61
|
adoptNullOwnerToolTag2,
|
|
62
62
|
getCandidateToolOwners2,
|
|
63
63
|
pickNearestPriorOwner2
|
|
64
|
-
} from "./index-
|
|
65
|
-
import"./index-
|
|
64
|
+
} from "./index-eqw9t2ty.js";
|
|
65
|
+
import"./index-c474g0gj.js";
|
|
66
66
|
import"./index-my0dn413.js";
|
|
67
67
|
import"./index-2qtx0q6h.js";
|
|
68
68
|
import"./index-fgs78jyd.js";
|
package/dist/subagent-entry.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
TOKEN_BUDGET_TOOL_REFUSAL
|
|
3
|
-
} from "./index-
|
|
3
|
+
} from "./index-87xkw8xm.js";
|
|
4
4
|
import {
|
|
5
5
|
setHarness2
|
|
6
6
|
} from "./index-0h2mkab2.js";
|
|
@@ -13,14 +13,14 @@ import {
|
|
|
13
13
|
import"./index-2qtx0q6h.js";
|
|
14
14
|
import {
|
|
15
15
|
openDatabase
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-r9y6tbbm.js";
|
|
17
17
|
import"./index-fapenpch.js";
|
|
18
18
|
import"./index-399p688g.js";
|
|
19
19
|
import"./index-54wmg4rj.js";
|
|
20
20
|
import"./index-6981g1xv.js";
|
|
21
21
|
import"./index-bvpar0bg.js";
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
22
|
+
import"./index-pb3ea2tq.js";
|
|
23
|
+
import"./index-c474g0gj.js";
|
|
24
24
|
import"./index-135e8hvg.js";
|
|
25
25
|
import"./index-23t8ryqw.js";
|
|
26
26
|
import"./index-my0dn413.js";
|
|
@@ -30,22 +30,22 @@ import {
|
|
|
30
30
|
ensureProjectRegisteredFromPiDirectory,
|
|
31
31
|
resolvePiHarnessKind,
|
|
32
32
|
registerMagicContextTools
|
|
33
|
-
} from "./index-
|
|
33
|
+
} from "./index-d0n9yjnc.js";
|
|
34
34
|
import"./index-ccanzg8p.js";
|
|
35
35
|
import"./index-gwxaz0z5.js";
|
|
36
|
-
import"./index-
|
|
36
|
+
import"./index-0gymvr5j.js";
|
|
37
37
|
import"./index-wqpjhx1p.js";
|
|
38
|
-
import"./index-
|
|
38
|
+
import"./index-xn5yh0pn.js";
|
|
39
39
|
import"./index-9p40dgkm.js";
|
|
40
40
|
import"./index-4zemngt7.js";
|
|
41
41
|
import"./index-yhzhdp3m.js";
|
|
42
|
-
import"./index-
|
|
43
|
-
import"./index-
|
|
44
|
-
import"./index-
|
|
42
|
+
import"./index-9xd7qveg.js";
|
|
43
|
+
import"./index-wpazxe9x.js";
|
|
44
|
+
import"./index-eqw9t2ty.js";
|
|
45
45
|
import"./index-6x556c2q.js";
|
|
46
|
-
import"./index-
|
|
46
|
+
import"./index-e59j3yq5.js";
|
|
47
47
|
import"./index-1cvyaw9a.js";
|
|
48
|
-
import"./index-
|
|
48
|
+
import"./index-d5q1q700.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-
|
|
10
|
+
} from "./index-r9y6tbbm.js";
|
|
11
11
|
import"./index-fapenpch.js";
|
|
12
12
|
import"./index-399p688g.js";
|
|
13
13
|
import {
|
|
@@ -15,22 +15,23 @@ import {
|
|
|
15
15
|
} from "./index-54wmg4rj.js";
|
|
16
16
|
import"./index-6981g1xv.js";
|
|
17
17
|
import"./index-bvpar0bg.js";
|
|
18
|
-
import"./index-
|
|
18
|
+
import"./index-pb3ea2tq.js";
|
|
19
19
|
import {
|
|
20
20
|
tagRevisionKey
|
|
21
|
-
} from "./index-
|
|
21
|
+
} from "./index-c474g0gj.js";
|
|
22
22
|
import"./index-135e8hvg.js";
|
|
23
23
|
import"./index-23t8ryqw.js";
|
|
24
24
|
import"./index-my0dn413.js";
|
|
25
25
|
import {
|
|
26
26
|
normalizeTagSnapshotRow2,
|
|
27
27
|
TAG_SELECT_COLUMNS2
|
|
28
|
-
} from "./index-
|
|
28
|
+
} from "./index-eqw9t2ty.js";
|
|
29
29
|
import {
|
|
30
30
|
encodePiHydrationOperation,
|
|
31
|
+
projectPiPassTag,
|
|
31
32
|
PI_FALLBACK_ROW_COLUMNS,
|
|
32
33
|
PI_FALLBACK_ROW_PREDICATE
|
|
33
|
-
} from "./index-
|
|
34
|
+
} from "./index-drmr22ac.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 (
|
|
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 ?
|
|
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
|
|
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.
|
|
3
|
+
"version": "0.49.32",
|
|
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",
|