@cortexkit/pi-magic-context 0.49.2 → 0.49.3
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 +3 -3
- package/dist/compaction-marker-candidates-cd17s4ys.js +18 -0
- package/dist/compaction-marker-candidates-worker.js +24 -0
- package/dist/{embedding-backfill-scywarbn.js → embedding-backfill-r7n7dj50.js} +4 -4
- package/dist/{index-vakawmbc.js → index-2apf1afe.js} +5 -20
- package/dist/index-399p688g.js +19 -0
- package/dist/{index-0rasmwm8.js → index-57njcjax.js} +6 -6
- package/dist/{index-fqb1bddn.js → index-590pwxvr.js} +14 -3
- package/dist/{index-kjd1fj55.js → index-9n88gmpf.js} +45 -7
- package/dist/{index-b2anqqad.js → index-9ygacw4e.js} +101 -31
- package/dist/{index-p5zesr4e.js → index-a1jmtv6r.js} +3 -3
- package/dist/{index-28vnkyy7.js → index-bv2r9rpa.js} +57 -30
- package/dist/{index-r874cgmv.js → index-g1csz24n.js} +1 -1
- package/dist/index-g3600tpw.js +212 -0
- package/dist/{index-g7hndmqm.js → index-g7984a4r.js} +4 -2
- package/dist/{index-rd53pk0h.js → index-mzn6t38b.js} +1 -1
- package/dist/{index-rdtgp48t.js → index-xvm5cdyn.js} +1 -1
- package/dist/index.js +13572 -12370
- package/dist/message-index-2damq13v.js +56 -0
- package/dist/{message-index-bounded-110sb4fm.js → message-index-bounded-0qa5eacp.js} +16 -15
- package/dist/migration-worker.js +3 -3
- package/dist/{project-embedding-registry-64t0mw8y.js → project-embedding-registry-fzc4eb29.js} +3 -3
- package/dist/raw-ordinal-warmup-worker.js +22 -5
- package/dist/{read-session-chunk-rvmc25n5.js → read-session-chunk-q05ztqg5.js} +4 -3
- package/dist/{read-session-raw-npx3920c.js → read-session-raw-527m0yxx.js} +2 -1
- package/dist/{search-7z3w8pmz.js → search-5m0jjf29.js} +11 -10
- package/dist/{storage-tags-kjnsqbdb.js → storage-tags-1b2w0wst.js} +1 -1
- package/dist/subagent-entry.js +13 -11
- package/package.json +2 -2
- /package/dist/{index-2pp04pmg.js → index-69vas84q.js} +0 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import {
|
|
2
|
+
MESSAGE_INDEX_MAX_FTS_BYTES2,
|
|
3
|
+
messageIndexSkipKey2,
|
|
4
|
+
toMessageIndexSource2,
|
|
5
|
+
getMessageIndexSourceIdentity2,
|
|
6
|
+
isMessageIndexSourceCurrent2,
|
|
7
|
+
getLastIndexedOrdinal2,
|
|
8
|
+
getIndexedMessageCorpusSize2,
|
|
9
|
+
markMessageIndexDirty2,
|
|
10
|
+
getMessageIndexReconciliationStartOrdinal2,
|
|
11
|
+
isMessageIndexReconciledThrough2,
|
|
12
|
+
deleteIndexedMessage2,
|
|
13
|
+
clearIndexedMessagesInTransaction2,
|
|
14
|
+
clearIndexedMessages2,
|
|
15
|
+
getIndexableContent2,
|
|
16
|
+
indexSingleMessage2,
|
|
17
|
+
indexMessagesAfterOrdinal2,
|
|
18
|
+
indexSourcesAfterOrdinal2,
|
|
19
|
+
sweepOrphanedOpenCodeMessageIndexes2
|
|
20
|
+
} from "./index-9ygacw4e.js";
|
|
21
|
+
import"./index-27jh224p.js";
|
|
22
|
+
import"./index-590pwxvr.js";
|
|
23
|
+
import"./index-9n88gmpf.js";
|
|
24
|
+
import"./index-2apf1afe.js";
|
|
25
|
+
import"./index-399p688g.js";
|
|
26
|
+
import"./index-21v1kfs7.js";
|
|
27
|
+
import"./index-cyrnv16r.js";
|
|
28
|
+
import"./index-0j0zqb4t.js";
|
|
29
|
+
import"./index-4gfq5t09.js";
|
|
30
|
+
import"./index-8976mezv.js";
|
|
31
|
+
import"./index-mcgehvgw.js";
|
|
32
|
+
import"./index-0vrkp1jq.js";
|
|
33
|
+
import"./index-3cgbv47m.js";
|
|
34
|
+
import"./index-r56xgha8.js";
|
|
35
|
+
import"./index-x3dcnxh0.js";
|
|
36
|
+
import"./index-0h2mkab2.js";
|
|
37
|
+
export {
|
|
38
|
+
MESSAGE_INDEX_MAX_FTS_BYTES2 as MESSAGE_INDEX_MAX_FTS_BYTES,
|
|
39
|
+
clearIndexedMessages2 as clearIndexedMessages,
|
|
40
|
+
clearIndexedMessagesInTransaction2 as clearIndexedMessagesInTransaction,
|
|
41
|
+
deleteIndexedMessage2 as deleteIndexedMessage,
|
|
42
|
+
getIndexableContent2 as getIndexableContent,
|
|
43
|
+
getIndexedMessageCorpusSize2 as getIndexedMessageCorpusSize,
|
|
44
|
+
getLastIndexedOrdinal2 as getLastIndexedOrdinal,
|
|
45
|
+
getMessageIndexReconciliationStartOrdinal2 as getMessageIndexReconciliationStartOrdinal,
|
|
46
|
+
getMessageIndexSourceIdentity2 as getMessageIndexSourceIdentity,
|
|
47
|
+
indexMessagesAfterOrdinal2 as indexMessagesAfterOrdinal,
|
|
48
|
+
indexSingleMessage2 as indexSingleMessage,
|
|
49
|
+
indexSourcesAfterOrdinal2 as indexSourcesAfterOrdinal,
|
|
50
|
+
isMessageIndexReconciledThrough2 as isMessageIndexReconciledThrough,
|
|
51
|
+
isMessageIndexSourceCurrent2 as isMessageIndexSourceCurrent,
|
|
52
|
+
markMessageIndexDirty2 as markMessageIndexDirty,
|
|
53
|
+
messageIndexSkipKey2 as messageIndexSkipKey,
|
|
54
|
+
sweepOrphanedOpenCodeMessageIndexes2 as sweepOrphanedOpenCodeMessageIndexes,
|
|
55
|
+
toMessageIndexSource2 as toMessageIndexSource
|
|
56
|
+
};
|
|
@@ -3,23 +3,24 @@ import {
|
|
|
3
3
|
withIndexChunk2,
|
|
4
4
|
yieldIndexChunk2
|
|
5
5
|
} from "./index-3cgbv47m.js";
|
|
6
|
-
import"./index-
|
|
6
|
+
import"./index-9n88gmpf.js";
|
|
7
7
|
import"./index-r56xgha8.js";
|
|
8
8
|
import"./index-0h2mkab2.js";
|
|
9
9
|
import"./index-x3dcnxh0.js";
|
|
10
10
|
import"./index-mcgehvgw.js";
|
|
11
11
|
import"./index-cyrnv16r.js";
|
|
12
|
-
import"./index-
|
|
12
|
+
import"./index-399p688g.js";
|
|
13
|
+
import"./index-2apf1afe.js";
|
|
13
14
|
import"./index-8976mezv.js";
|
|
14
|
-
import"./index-
|
|
15
|
+
import"./index-590pwxvr.js";
|
|
15
16
|
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from "./index-
|
|
17
|
+
MESSAGE_INDEX_MAX_FTS_BYTES2,
|
|
18
|
+
messageIndexSkipKey2,
|
|
19
|
+
getLastIndexedOrdinal2,
|
|
20
|
+
markMessageIndexDirty2,
|
|
21
|
+
getIndexableContent2,
|
|
22
|
+
indexSingleMessage2
|
|
23
|
+
} from "./index-9ygacw4e.js";
|
|
23
24
|
import"./index-4gfq5t09.js";
|
|
24
25
|
import"./index-0j0zqb4t.js";
|
|
25
26
|
import"./index-21v1kfs7.js";
|
|
@@ -74,13 +75,13 @@ async function indexMessageInShortChunks(db, sessionId, message, coordination, i
|
|
|
74
75
|
try {
|
|
75
76
|
if (!isCurrent())
|
|
76
77
|
return { inserted: false, measurements };
|
|
77
|
-
const content =
|
|
78
|
+
const content = getIndexableContent2(message.role, message.parts);
|
|
78
79
|
measurements.sourceBytes = Buffer.byteLength(content);
|
|
79
80
|
const hash = createHash("sha256");
|
|
80
|
-
const oversized = measurements.sourceBytes >
|
|
81
|
+
const oversized = measurements.sourceBytes > MESSAGE_INDEX_MAX_FTS_BYTES2;
|
|
81
82
|
measurements.skipped = oversized;
|
|
82
83
|
if (oversized) {
|
|
83
|
-
await transaction(() =>
|
|
84
|
+
await transaction(() => markMessageIndexDirty2(db, sessionId, Math.min(message.ordinal, getLastIndexedOrdinal2(db, sessionId) + 1)));
|
|
84
85
|
const encoded = Buffer.from(content);
|
|
85
86
|
const progress = db.prepare("INSERT INTO schema_migrations_meta(key,value) VALUES (?,?) ON CONFLICT(key) DO UPDATE SET value=excluded.value");
|
|
86
87
|
for (let offset = 0;offset < encoded.length; offset += IDENTITY_CHUNK_BYTES) {
|
|
@@ -88,7 +89,7 @@ async function indexMessageInShortChunks(db, sessionId, message, coordination, i
|
|
|
88
89
|
return { inserted: false, measurements };
|
|
89
90
|
const end = Math.min(encoded.length, offset + IDENTITY_CHUNK_BYTES);
|
|
90
91
|
hash.update(encoded.subarray(offset, end));
|
|
91
|
-
await transaction(() => progress.run(
|
|
92
|
+
await transaction(() => progress.run(messageIndexSkipKey2(sessionId, message.id), JSON.stringify({
|
|
92
93
|
reason: "oversized",
|
|
93
94
|
bytes: measurements.sourceBytes,
|
|
94
95
|
processedBytes: end,
|
|
@@ -110,7 +111,7 @@ async function indexMessageInShortChunks(db, sessionId, message, coordination, i
|
|
|
110
111
|
content: oversized ? "" : content,
|
|
111
112
|
...oversized ? { ftsSkippedBytes: measurements.sourceBytes } : {}
|
|
112
113
|
};
|
|
113
|
-
const inserted = await withIndexChunk2(coordination, () => withSqliteBackgroundWriter2(() =>
|
|
114
|
+
const inserted = await withIndexChunk2(coordination, () => withSqliteBackgroundWriter2(() => indexSingleMessage2(db, sessionId, message, isCurrent, source)));
|
|
114
115
|
return { inserted, measurements };
|
|
115
116
|
} finally {
|
|
116
117
|
db.exec = execute;
|
package/dist/migration-worker.js
CHANGED
|
@@ -9,18 +9,18 @@ import {
|
|
|
9
9
|
import"./index-135e8hvg.js";
|
|
10
10
|
import {
|
|
11
11
|
runMigrationsWithRetry
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-mzn6t38b.js";
|
|
13
13
|
import {
|
|
14
14
|
closeQuietly
|
|
15
15
|
} from "./index-mcgehvgw.js";
|
|
16
16
|
import"./index-8976mezv.js";
|
|
17
|
-
import"./index-
|
|
17
|
+
import"./index-g7984a4r.js";
|
|
18
18
|
import"./index-0j0zqb4t.js";
|
|
19
19
|
import"./index-fapenpch.js";
|
|
20
20
|
import {
|
|
21
21
|
setSqlitePragmaConfig,
|
|
22
22
|
initializeDatabase
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-a1jmtv6r.js";
|
|
24
24
|
import"./index-4gfq5t09.js";
|
|
25
25
|
import"./index-r56xgha8.js";
|
|
26
26
|
import"./index-0vrkp1jq.js";
|
package/dist/{project-embedding-registry-64t0mw8y.js → project-embedding-registry-fzc4eb29.js}
RENAMED
|
@@ -33,14 +33,14 @@ import {
|
|
|
33
33
|
sweepAllRegisteredProjects2,
|
|
34
34
|
_setTestProviderFactoryForProject2,
|
|
35
35
|
_resetProjectEmbeddingRegistryForTests2
|
|
36
|
-
} from "./index-
|
|
36
|
+
} from "./index-g1csz24n.js";
|
|
37
|
+
import"./index-9p40dgkm.js";
|
|
37
38
|
import"./index-27jh224p.js";
|
|
38
39
|
import"./index-yhzhdp3m.js";
|
|
39
|
-
import"./index-9p40dgkm.js";
|
|
40
40
|
import"./index-gc2749rx.js";
|
|
41
41
|
import"./index-21v1kfs7.js";
|
|
42
42
|
import"./index-cyrnv16r.js";
|
|
43
|
-
import"./index-
|
|
43
|
+
import"./index-g7984a4r.js";
|
|
44
44
|
import"./index-4gfq5t09.js";
|
|
45
45
|
import"./index-0vrkp1jq.js";
|
|
46
46
|
import"./index-3cgbv47m.js";
|
|
@@ -7,14 +7,31 @@ var input = workerData;
|
|
|
7
7
|
port.postMessage({ kind: "accepted" });
|
|
8
8
|
var [{ Database }, { scanRawSessionSummaryRows }] = await Promise.all([
|
|
9
9
|
import("./sqlite-3yye76ht.js"),
|
|
10
|
-
import("./read-session-raw-
|
|
10
|
+
import("./read-session-raw-527m0yxx.js")
|
|
11
11
|
]);
|
|
12
12
|
var db;
|
|
13
13
|
var reply;
|
|
14
14
|
try {
|
|
15
|
-
db = input.indexMessage ? new Database(input.path) : new Database(input.path, { readonly: true });
|
|
15
|
+
db = input.indexMessage || input.orphanSweep ? new Database(input.path) : new Database(input.path, { readonly: true });
|
|
16
16
|
db.exec("PRAGMA busy_timeout = 250");
|
|
17
|
-
if (input.
|
|
17
|
+
if (input.orphanSweep) {
|
|
18
|
+
const [
|
|
19
|
+
{ setHarness },
|
|
20
|
+
{ sweepOrphanedOpenCodeMessageIndexes },
|
|
21
|
+
{ configureContextDatabasePragmas }
|
|
22
|
+
] = await Promise.all([
|
|
23
|
+
import("./harness-9872e0ym.js"),
|
|
24
|
+
import("./message-index-2damq13v.js"),
|
|
25
|
+
import("./sqlite-context-pragmas-gcgch6qz.js")
|
|
26
|
+
]);
|
|
27
|
+
setHarness(input.harness ?? "opencode");
|
|
28
|
+
configureContextDatabasePragmas(db);
|
|
29
|
+
const sourcePath = input.orphanSweep.sourcePath;
|
|
30
|
+
reply = {
|
|
31
|
+
kind: "orphan-sweep",
|
|
32
|
+
result: sweepOrphanedOpenCodeMessageIndexes(db, () => sourcePath ? new Database(sourcePath, { readonly: true }) : null, input.orphanSweep.options)
|
|
33
|
+
};
|
|
34
|
+
} else if (input.indexMessage) {
|
|
18
35
|
const { setHarness } = await import("./harness-9872e0ym.js");
|
|
19
36
|
setHarness(input.harness ?? "opencode");
|
|
20
37
|
const [
|
|
@@ -22,7 +39,7 @@ try {
|
|
|
22
39
|
{ configureContextDatabasePragmas },
|
|
23
40
|
{ registerSqliteDiagnosticSink }
|
|
24
41
|
] = await Promise.all([
|
|
25
|
-
import("./message-index-bounded-
|
|
42
|
+
import("./message-index-bounded-0qa5eacp.js"),
|
|
26
43
|
import("./sqlite-context-pragmas-gcgch6qz.js"),
|
|
27
44
|
import("./sqlite-3yye76ht.js")
|
|
28
45
|
]);
|
|
@@ -35,7 +52,7 @@ try {
|
|
|
35
52
|
const result = await indexMessageInShortChunks(writer, input.sessionId, message, input, () => !cancellation || Atomics.load(cancellation, 0) === 0);
|
|
36
53
|
reply = { kind: "indexed", inserted: result.inserted, measurements: result.measurements };
|
|
37
54
|
} else if (input.tagRatio !== undefined) {
|
|
38
|
-
const { scanTagOwnerSummary, scanTagOwnerDelta } = await import("./storage-tags-
|
|
55
|
+
const { scanTagOwnerSummary, scanTagOwnerDelta } = await import("./storage-tags-1b2w0wst.js");
|
|
39
56
|
const delta = input.tagState ? scanTagOwnerDelta(db, input.sessionId, input.tagState) : null;
|
|
40
57
|
if (delta)
|
|
41
58
|
reply = { kind: "tag-delta", delta };
|
|
@@ -34,9 +34,10 @@ import {
|
|
|
34
34
|
readSessionChunk2,
|
|
35
35
|
getRawSessionMessageIdsThrough2,
|
|
36
36
|
readRawSessionSeedTail2
|
|
37
|
-
} from "./index-
|
|
38
|
-
import"./index-
|
|
39
|
-
import"./index-
|
|
37
|
+
} from "./index-590pwxvr.js";
|
|
38
|
+
import"./index-9n88gmpf.js";
|
|
39
|
+
import"./index-2apf1afe.js";
|
|
40
|
+
import"./index-399p688g.js";
|
|
40
41
|
import"./index-cyrnv16r.js";
|
|
41
42
|
import"./index-8976mezv.js";
|
|
42
43
|
import"./index-mcgehvgw.js";
|
|
@@ -24,7 +24,8 @@ import {
|
|
|
24
24
|
hasRawSessionMessageByIdFromDb2,
|
|
25
25
|
readRawSeedTailFromDb2,
|
|
26
26
|
readRawSessionBoundaryEndpointsFromDb2
|
|
27
|
-
} from "./index-
|
|
27
|
+
} from "./index-2apf1afe.js";
|
|
28
|
+
import"./index-399p688g.js";
|
|
28
29
|
import"./index-3cgbv47m.js";
|
|
29
30
|
import"./index-x3dcnxh0.js";
|
|
30
31
|
import"./index-0h2mkab2.js";
|
|
@@ -5,24 +5,25 @@ import {
|
|
|
5
5
|
resolveMemoriesByIdsForSearch2,
|
|
6
6
|
unifiedSearch2,
|
|
7
7
|
formatSearchResults2
|
|
8
|
-
} from "./index-
|
|
9
|
-
import"./index-
|
|
10
|
-
import"./index-
|
|
8
|
+
} from "./index-57njcjax.js";
|
|
9
|
+
import"./index-9ygacw4e.js";
|
|
10
|
+
import"./index-xvm5cdyn.js";
|
|
11
11
|
import"./index-xjqheg7a.js";
|
|
12
|
-
import"./index-
|
|
12
|
+
import"./index-g1csz24n.js";
|
|
13
|
+
import"./index-9p40dgkm.js";
|
|
13
14
|
import"./index-27jh224p.js";
|
|
14
15
|
import"./index-yhzhdp3m.js";
|
|
15
|
-
import"./index-
|
|
16
|
-
import"./index-
|
|
17
|
-
import"./index-
|
|
18
|
-
import"./index-
|
|
16
|
+
import"./index-590pwxvr.js";
|
|
17
|
+
import"./index-9n88gmpf.js";
|
|
18
|
+
import"./index-2apf1afe.js";
|
|
19
|
+
import"./index-399p688g.js";
|
|
19
20
|
import"./index-gc2749rx.js";
|
|
20
21
|
import"./index-21v1kfs7.js";
|
|
21
22
|
import"./index-cyrnv16r.js";
|
|
22
|
-
import"./index-
|
|
23
|
+
import"./index-mzn6t38b.js";
|
|
23
24
|
import"./index-0j0zqb4t.js";
|
|
24
25
|
import"./index-135e8hvg.js";
|
|
25
|
-
import"./index-
|
|
26
|
+
import"./index-g7984a4r.js";
|
|
26
27
|
import"./index-4gfq5t09.js";
|
|
27
28
|
import"./index-8976mezv.js";
|
|
28
29
|
import"./index-mcgehvgw.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-590pwxvr.js";
|
|
4
4
|
import {
|
|
5
5
|
setHarness2
|
|
6
6
|
} from "./index-0h2mkab2.js";
|
|
@@ -9,15 +9,15 @@ import {
|
|
|
9
9
|
} from "./index-x3dcnxh0.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveProjectIdentityForSession
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-g7984a4r.js";
|
|
13
13
|
import"./index-0j0zqb4t.js";
|
|
14
14
|
import"./index-3cgbv47m.js";
|
|
15
15
|
import"./index-fapenpch.js";
|
|
16
16
|
import {
|
|
17
17
|
openDatabase
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-a1jmtv6r.js";
|
|
19
19
|
import"./index-4gfq5t09.js";
|
|
20
|
-
import"./index-
|
|
20
|
+
import"./index-mzn6t38b.js";
|
|
21
21
|
import"./index-mcgehvgw.js";
|
|
22
22
|
import"./index-135e8hvg.js";
|
|
23
23
|
import"./index-8976mezv.js";
|
|
@@ -27,20 +27,22 @@ import {
|
|
|
27
27
|
ensureProjectRegisteredFromPiDirectory,
|
|
28
28
|
resolvePiHarnessKind,
|
|
29
29
|
registerMagicContextTools
|
|
30
|
-
} from "./index-
|
|
30
|
+
} from "./index-bv2r9rpa.js";
|
|
31
31
|
import"./index-cyrnv16r.js";
|
|
32
32
|
import"./index-21v1kfs7.js";
|
|
33
33
|
import"./index-27jh224p.js";
|
|
34
34
|
import"./index-gc2749rx.js";
|
|
35
|
-
import"./index-
|
|
35
|
+
import"./index-g1csz24n.js";
|
|
36
36
|
import"./index-9p40dgkm.js";
|
|
37
37
|
import"./index-yhzhdp3m.js";
|
|
38
|
-
import"./index-
|
|
39
|
-
import"./index-
|
|
40
|
-
import"./index-
|
|
41
|
-
import"./index-
|
|
42
|
-
import"./index-
|
|
38
|
+
import"./index-xvm5cdyn.js";
|
|
39
|
+
import"./index-9ygacw4e.js";
|
|
40
|
+
import"./index-9n88gmpf.js";
|
|
41
|
+
import"./index-399p688g.js";
|
|
42
|
+
import"./index-2apf1afe.js";
|
|
43
|
+
import"./index-57njcjax.js";
|
|
43
44
|
import"./index-xjqheg7a.js";
|
|
45
|
+
import"./index-g3600tpw.js";
|
|
44
46
|
import"./index-0vrkp1jq.js";
|
|
45
47
|
import {
|
|
46
48
|
setStoragePrivatePermissionEnforcement
|
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.3",
|
|
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",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
],
|
|
30
30
|
"//": "The build intentionally bundles typebox (no --external typebox) and keeps it a regular dependency. OMP's extension loader rewrites every bare `typebox` import to its own omptype-based shim, whose schemas are callable objects rather than JSON Schema; they fail structuredClone during tool registration, so an external typebox import stops Magic Context loading on OMP. src/typebox-bundling.test.ts guards this.",
|
|
31
31
|
"scripts": {
|
|
32
|
-
"build": "bun ../../scripts/check-bun.mjs && tsc -p ../retina-local-fs/tsconfig.build.json && bun ../../scripts/clean-dist-chunks.mjs dist index.js subagent-entry.js historian-calibration-extension.js embedding-worker-process.js raw-ordinal-warmup-worker.js transformers-web.js transformers-node-wasm.js && bun build ../plugin/src/features/magic-context/memory/transformers-web-entry.ts --outfile dist/transformers-web.js --target browser --format esm --external onnxruntime-web && bun ../plugin/scripts/build-transformers-node-wasm.ts dist && bun build src/index.ts src/subagent-entry.ts src/historian-calibration-extension.ts ../plugin/src/features/magic-context/memory/embedding-worker.ts ../plugin/src/features/magic-context/memory/embedding-worker-process.ts ../plugin/src/features/magic-context/migration-worker.ts ../plugin/src/hooks/magic-context/auto-search-worker.ts ../plugin/src/hooks/magic-context/raw-ordinal-warmup-worker.ts --outdir dist --entry-naming '[name].[ext]' --target node --format esm --splitting --external @earendil-works/pi-coding-agent --external @oh-my-pi/pi-coding-agent --external @earendil-works/pi-tui --external onnxruntime-node --external onnxruntime-web --external sharp --external bun:ffi --external node:sqlite",
|
|
32
|
+
"build": "bun ../../scripts/check-bun.mjs && tsc -p ../retina-local-fs/tsconfig.build.json && bun ../../scripts/clean-dist-chunks.mjs dist index.js subagent-entry.js historian-calibration-extension.js embedding-worker-process.js raw-ordinal-warmup-worker.js transformers-web.js transformers-node-wasm.js && bun build ../plugin/src/features/magic-context/memory/transformers-web-entry.ts --outfile dist/transformers-web.js --target browser --format esm --external onnxruntime-web && bun ../plugin/scripts/build-transformers-node-wasm.ts dist && bun build src/index.ts src/subagent-entry.ts src/historian-calibration-extension.ts ../plugin/src/features/magic-context/memory/embedding-worker.ts ../plugin/src/features/magic-context/memory/embedding-worker-process.ts ../plugin/src/features/magic-context/migration-worker.ts ../plugin/src/hooks/magic-context/auto-search-worker.ts ../plugin/src/hooks/magic-context/raw-ordinal-warmup-worker.ts ../plugin/src/features/magic-context/compaction-marker-candidates-worker.ts --outdir dist --entry-naming '[name].[ext]' --target node --format esm --splitting --external @earendil-works/pi-coding-agent --external @oh-my-pi/pi-coding-agent --external @earendil-works/pi-tui --external onnxruntime-node --external onnxruntime-web --external sharp --external bun:ffi --external node:sqlite",
|
|
33
33
|
"build:e2e-argv": "bun ../../scripts/clean-dist-chunks.mjs ../../tests/docker/.generated subagent-runner-e2e.mjs && bun build src/subagent-runner.ts --outdir ../../tests/docker/.generated --entry-naming 'subagent-runner-e2e.mjs' --splitting --target node --format esm --external node:sqlite && node --input-type=module -e 'const { __test } = await import(\"../../tests/docker/.generated/subagent-runner-e2e.mjs\"); if (typeof __test.buildArgs !== \"function\" || typeof __test.resolvePiInvocation !== \"function\") throw new Error(\"argv renderer exports missing\"); console.log(\"Node argv renderer: 2 exports loaded\")'",
|
|
34
34
|
"typecheck": "tsc -p ../retina-local-fs/tsconfig.build.json && tsc --noEmit",
|
|
35
35
|
"test": "bun ../../scripts/check-bun.mjs && bun install --frozen-lockfile && BUN_JSC_useOMGJIT=0 bun test --parallel=4 --timeout 30000",
|
|
File without changes
|