@cortexkit/pi-magic-context 0.43.1 → 0.44.0

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.
@@ -1,7 +1,7 @@
1
- import"./index-bfd52y8p.js";
1
+ import"./index-tfzybajk.js";
2
2
  import {
3
3
  logSlowWriteTransaction
4
- } from "./index-17102c1m.js";
4
+ } from "./index-mmkdxa5j.js";
5
5
 
6
6
  // ../plugin/src/features/magic-context/message-time-backfill.ts
7
7
  var MESSAGE_TIME_BACKFILL_BATCH_SIZE = 500;
@@ -78,7 +78,7 @@ function backfillMessageTimesBatch(db, reader, batchSize = MESSAGE_TIME_BACKFILL
78
78
  db.prepare(`UPDATE message_time_backfill_state
79
79
  SET cursor_session_id = ?, cursor_ordinal = ?, completed = ?, updated_at = ?
80
80
  WHERE id = ?`).run(cursorSessionId, cursorOrdinal, completed ? 1 : 0, Date.now(), BACKFILL_STATE_ID);
81
- })();
81
+ }).immediate();
82
82
  logSlowWriteTransaction("message_time_backfill", transactionStartedAt);
83
83
  return {
84
84
  processed: rows.length,
@@ -16,14 +16,17 @@ import {
16
16
  primeInMemoryTailRawMessageCache2,
17
17
  readRawSessionMessageIdOrdinalsForRange2,
18
18
  hasRawSessionMessageById2,
19
+ readRawSessionMessageOrdinalById2,
20
+ compareRawSessionMessageOrder2,
19
21
  getRawSessionMessageCount2,
20
22
  getRawSessionTagKeysThrough2,
21
23
  getLegacyProtectedTailStartOrdinal2,
22
24
  readSessionChunk2
23
- } from "./index-822b3fcs.js";
24
- import"./index-bfd52y8p.js";
25
+ } from "./index-2kj55q4e.js";
26
+ import"./index-tfzybajk.js";
25
27
  export {
26
28
  cleanUserText2 as cleanUserText,
29
+ compareRawSessionMessageOrder2 as compareRawSessionMessageOrder,
27
30
  extractTexts2 as extractTexts,
28
31
  getCachedAbsoluteMessageCount2 as getCachedAbsoluteMessageCount,
29
32
  getLegacyProtectedTailStartOrdinal2 as getLegacyProtectedTailStartOrdinal,
@@ -36,6 +39,7 @@ export {
36
39
  primeInMemoryTailRawMessageCache2 as primeInMemoryTailRawMessageCache,
37
40
  primeTailRawMessageCache2 as primeTailRawMessageCache,
38
41
  readRawSessionMessageIdOrdinalsForRange2 as readRawSessionMessageIdOrdinalsForRange,
42
+ readRawSessionMessageOrdinalById2 as readRawSessionMessageOrdinalById,
39
43
  readRawSessionMessagePage2 as readRawSessionMessagePage,
40
44
  readRawSessionMessageRange2 as readRawSessionMessageRange,
41
45
  readRawSessionMessages2 as readRawSessionMessages,
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  isDefaultSessionTitle2,
3
3
  waitForSafeNotificationTarget2
4
- } from "./index-5v60m046.js";
5
- import"./index-bfd52y8p.js";
4
+ } from "./index-jscq7067.js";
5
+ import"./index-tfzybajk.js";
6
6
  export {
7
7
  isDefaultSessionTitle2 as isDefaultSessionTitle,
8
8
  waitForSafeNotificationTarget2 as waitForSafeNotificationTarget
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  setHarness,
3
3
  log
4
- } from "./index-bfd52y8p.js";
4
+ } from "./index-tfzybajk.js";
5
5
  import {
6
6
  setStoragePrivatePermissionEnforcement,
7
7
  resolveProjectIdentityForSession,
@@ -10,9 +10,9 @@ import {
10
10
  ensureProjectRegisteredFromPiDirectory,
11
11
  resolvePiHarnessKind,
12
12
  registerMagicContextTools
13
- } from "./index-kyrajahw.js";
14
- import"./index-822b3fcs.js";
15
- import"./index-17102c1m.js";
13
+ } from "./index-8ytss1hp.js";
14
+ import"./index-2kj55q4e.js";
15
+ import"./index-mmkdxa5j.js";
16
16
 
17
17
  // src/subagent-entry.ts
18
18
  var SUBAGENT_DREAMER_ACTIONS_FLAG = "magic-context-dreamer-actions";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cortexkit/pi-magic-context",
3
- "version": "0.43.1",
3
+ "version": "0.44.0",
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",
@@ -27,6 +27,7 @@
27
27
  "dist",
28
28
  "README.md"
29
29
  ],
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.",
30
31
  "scripts": {
31
32
  "build": "bun ../../scripts/check-bun.mjs && tsc -p ../retina-local-fs/tsconfig.build.json && rm -f dist/index.js dist/subagent-entry.js dist/historian-calibration-extension.js dist/transformers-web.js dist/transformers-node-wasm.js dist/*-*.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 --outdir dist --target node --format esm --splitting --external @earendil-works/pi-coding-agent --external @earendil-works/pi-tui --external onnxruntime-node --external onnxruntime-web --external sharp --external node:sqlite",
32
33
  "build:e2e-argv": "bun build src/subagent-runner.ts --outfile ../../tests/docker/.generated/subagent-runner-e2e.mjs --target node --format esm --external node:sqlite",
@@ -41,7 +42,7 @@
41
42
  "prepublishOnly": "bun run build"
42
43
  },
43
44
  "dependencies": {
44
- "@cortexkit/subc-client": "0.4.1",
45
+ "@cortexkit/subc-client": "0.11.1",
45
46
  "@jitl/quickjs-singlefile-cjs-release-asyncify": "0.32.0",
46
47
  "ai-tokenizer": "^1.0.6",
47
48
  "comment-json": "^5.0.0",
@@ -63,6 +64,7 @@
63
64
  "@types/better-sqlite3": "^7.6.13",
64
65
  "@types/bun": "^1.3.10",
65
66
  "@types/node": "^22.20.0",
67
+ "pi-agent-core-087": "npm:@earendil-works/pi-agent-core@0.87.1",
66
68
  "pi-ai-086": "npm:@earendil-works/pi-ai@0.86.0",
67
69
  "pi-coding-agent-086": "npm:@earendil-works/pi-coding-agent@0.86.0",
68
70
  "pi-coding-agent-087": "npm:@earendil-works/pi-coding-agent@0.87.1",