@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.
- package/dist/auto-search-worker.js +6 -2
- package/dist/chunk-embedding-write-worker.js +2 -2
- package/dist/{index-9j809q6f.js → index-58mj0dzc.js} +2 -2
- package/dist/{index-z7kbck29.js → index-dtp1efvf.js} +1 -1
- package/dist/{index-es03azap.js → index-ek9zvs4f.js} +18 -11
- package/dist/{index-gdjv1nnd.js → index-msqrs4nf.js} +1 -2
- package/dist/{index-dvbjsh98.js → index-rc1dez8m.js} +2 -2
- package/dist/{index-ej4eak9d.js → index-rhprywn6.js} +2 -2
- package/dist/{index-469ttgzv.js → index-sqt2haap.js} +2 -2
- package/dist/{index-5k2mshvq.js → index-wveb51es.js} +7 -2
- package/dist/{index-8r2t8fv2.js → index-ym6nh2gk.js} +10 -1
- package/dist/index.js +740 -153
- package/dist/{message-index-bounded-d6zj2tn5.js → message-index-bounded-66saeq5j.js} +3 -3
- package/dist/{message-index-2g23b7fe.js → message-index-rc2x41k4.js} +3 -3
- package/dist/migration-worker.js +2 -2
- package/dist/raw-ordinal-warmup-worker.js +4 -4
- package/dist/{read-session-chunk-2ky7mbqp.js → read-session-chunk-h5bzj91r.js} +2 -2
- package/dist/{search-archive-9akqcr90.js → search-archive-4817pqev.js} +3 -3
- package/dist/{search-zjyc65g1.js → search-wh7b9zht.js} +5 -5
- package/dist/{storage-tags-cx6ccsv1.js → storage-tags-1kets0q8.js} +1 -1
- package/dist/subagent-entry.js +8 -8
- package/dist/tag-snapshot-worker-pi.js +49 -46
- package/package.json +6 -1
|
@@ -13,15 +13,15 @@ import {
|
|
|
13
13
|
markMessageIndexDirty2,
|
|
14
14
|
getIndexableContent2,
|
|
15
15
|
indexSingleMessage2
|
|
16
|
-
} from "./index-
|
|
17
|
-
import"./index-
|
|
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-
|
|
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-
|
|
20
|
+
} from "./index-ym6nh2gk.js";
|
|
21
21
|
import"./index-xnch62s6.js";
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
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";
|
package/dist/migration-worker.js
CHANGED
|
@@ -9,7 +9,7 @@ import {
|
|
|
9
9
|
import"./index-135e8hvg.js";
|
|
10
10
|
import {
|
|
11
11
|
runMigrationsWithRetry
|
|
12
|
-
} from "./index-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
39
|
-
import"./index-
|
|
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-
|
|
3
|
+
} from "./index-dtp1efvf.js";
|
|
4
4
|
import"./index-1cvyaw9a.js";
|
|
5
|
-
import"./index-
|
|
6
|
-
import"./index-
|
|
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-
|
|
8
|
+
} from "./index-58mj0dzc.js";
|
|
9
9
|
import"./index-1cvyaw9a.js";
|
|
10
|
-
import"./index-
|
|
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-
|
|
19
|
-
import"./index-
|
|
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-
|
|
24
|
+
import"./index-msqrs4nf.js";
|
|
25
25
|
import"./index-apgwdby5.js";
|
|
26
26
|
import"./index-g7p75667.js";
|
|
27
27
|
import"./index-yygsh681.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-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-
|
|
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-
|
|
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-
|
|
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-
|
|
44
|
-
import"./index-
|
|
43
|
+
import"./index-ym6nh2gk.js";
|
|
44
|
+
import"./index-rhprywn6.js";
|
|
45
45
|
import"./index-6x556c2q.js";
|
|
46
|
-
import"./index-
|
|
46
|
+
import"./index-58mj0dzc.js";
|
|
47
47
|
import"./index-1cvyaw9a.js";
|
|
48
|
-
import"./index-
|
|
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-
|
|
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-
|
|
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-
|
|
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-
|
|
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
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
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
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
} catch (error) {
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
} finally {
|
|
230
|
-
|
|
231
|
-
|
|
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.
|
|
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",
|