@cortexkit/pi-magic-context 0.41.2 → 0.41.4

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.
Files changed (33) hide show
  1. package/README.md +6 -1
  2. package/dist/historian-calibration-extension.js +0 -2
  3. package/dist/{index-q2vgz0j1.js → index-147qn1yq.js} +4 -1
  4. package/dist/{index-1yh8g550.js → index-22jkk6wg.js} +2 -15
  5. package/dist/index-b3eqj1g6.js +51 -0
  6. package/dist/{index-rgdqj8nj.js → index-e7vx3byk.js} +1 -1
  7. package/dist/{index-ys39wb43.js → index-jc59f2q7.js} +28713 -49673
  8. package/dist/{index-9xexf8s7.js → index-rn7gafjr.js} +1 -9
  9. package/dist/index-v6t0tg85.js +13 -0
  10. package/dist/index.js +3198 -1130
  11. package/dist/{index-dynqfgx1.js → module-asyncify-2EFITU5U-rkqjhjxd.js} +69 -8
  12. package/dist/{prompt-context-3kjq9ejq.js → prompt-context-g3abnc66.js} +0 -2
  13. package/dist/rpc-notifications-jxy30tgz.js +8 -0
  14. package/dist/{safe-notification-target-hjcb423r.js → safe-notification-target-em2xnn1k.js} +1 -3
  15. package/dist/subagent-entry.js +12 -12
  16. package/dist/transformers-node-wasm.js +328 -328
  17. package/dist/transformers-web.js +72 -72
  18. package/dist/{transformers.node-b1wa0hgx.js → transformers.node-dpmf3wpx.js} +74 -74
  19. package/package.json +1 -1
  20. package/dist/emscripten-module-49k43zfy.js +0 -507
  21. package/dist/emscripten-module-ex4v0x4z.js +0 -606
  22. package/dist/emscripten-module-jfs3d1dq.js +0 -1536
  23. package/dist/emscripten-module-ss4g4spn.js +0 -4563
  24. package/dist/ffi-bbm9vkfa.js +0 -92
  25. package/dist/ffi-kb5r0x1j.js +0 -92
  26. package/dist/ffi-qnrt0y78.js +0 -80
  27. package/dist/ffi-yx2hpf4p.js +0 -80
  28. package/dist/index-hw34xmzk.js +0 -104
  29. package/dist/index-ss632za9.js +0 -77
  30. package/dist/index-y63nbvkk.js +0 -251
  31. package/dist/module-ES6BEMUI-1yjdz59c.js +0 -14
  32. package/dist/module-asyncify-2EFITU5U-fdkx4fhy.js +0 -9
  33. package/dist/rpc-notifications-gmhvmfpy.js +0 -17
package/README.md CHANGED
@@ -74,7 +74,7 @@ Verify with:
74
74
  npx @cortexkit/magic-context@latest doctor --harness omp
75
75
  ```
76
76
 
77
- OMP's legacy Pi loader maps `@earendil-works/*` imports to its bundled `@oh-my-pi/*` runtime. Magic Context also re-invokes the current host executable for historian, dreamer, and sidekick children, so OMP children remain OMP processes.
77
+ OMP's legacy Pi loader maps `@earendil-works/*` imports to its bundled `@oh-my-pi/*` runtime. Magic Context identifies OMP from `@oh-my-pi/pi-utils`'s in-process `APP_NAME` through the running host's module graph, not from an executable basename, so compiled and symlinked launches behave the same. It also re-invokes the current host executable for historian, dreamer, and sidekick children, so OMP children remain OMP processes.
78
78
 
79
79
  ---
80
80
 
@@ -96,6 +96,9 @@ Session discovery follows the active host. Relative `pi.subagent_extensions` are
96
96
  "historian": {
97
97
  "pi": {
98
98
  "model": "anthropic/claude-haiku-4-5"
99
+ },
100
+ "omp": {
101
+ "model": { "model": "opencode/claude-haiku-4-5", "thinking_level": "auto" }
99
102
  }
100
103
  },
101
104
  "embedding": {
@@ -104,6 +107,8 @@ Session discovery follows the active host. Relative `pi.subagent_extensions` are
104
107
  }
105
108
  ```
106
109
 
110
+ OMP uses `historian.omp ?? historian.pi` and `dreamer.omp ?? dreamer.pi`; leaving the OMP blocks absent preserves existing Pi-compatible configuration. OMP supports `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`, `inherit`, and `auto` thinking levels.
111
+
107
112
  For the full configuration reference (including dreamer, sidekick, auto-search, and experimental features), see [CONFIGURATION.md](https://github.com/cortexkit/magic-context/blob/master/CONFIGURATION.md) in the main repository — OpenCode, Pi, and OMP share the same schema.
108
113
 
109
114
  ---
@@ -1,5 +1,3 @@
1
- import"./index-1yh8g550.js";
2
-
3
1
  // src/historian-calibration-extension.ts
4
2
  var HISTORIAN_TEMPERATURE_ENV = "MAGIC_CONTEXT_HISTORIAN_TEMPERATURE";
5
3
  var HISTORIAN_MAX_OUTPUT_TOKENS_ENV = "MAGIC_CONTEXT_HISTORIAN_MAX_OUTPUT_TOKENS";
@@ -456,8 +456,11 @@ ${data.stack}` : ""}`)}` : ` ${JSON.stringify(sanitizeConfigValue(data))}`;
456
456
  function sessionLog(sessionId, message, data) {
457
457
  log(`[magic-context][${sessionId}] ${message}`, data);
458
458
  }
459
+ function flushLogger() {
460
+ flush();
461
+ }
459
462
  if (!isTestEnv) {
460
463
  process.on("exit", flush);
461
464
  }
462
465
 
463
- export { sanitizeDiagnosticText, hasShareabilitySensitiveText, setHarness, getHarness, getDataDir, ensureCortexKitArtifactGitignore, getProjectMagicContextHistorianDir, getMagicContextStorageResolution, getMagicContextStorageDir, getLegacyOpenCodeMagicContextStorageDir, log, sessionLog };
466
+ export { sanitizeDiagnosticText, hasShareabilitySensitiveText, setHarness, getHarness, getDataDir, ensureCortexKitArtifactGitignore, getProjectMagicContextHistorianDir, getMagicContextStorageResolution, getMagicContextStorageDir, getLegacyOpenCodeMagicContextStorageDir, log, sessionLog, flushLogger };
@@ -18,7 +18,7 @@ var __toESM = (mod, isNodeMode, target) => {
18
18
  return cached;
19
19
  }
20
20
  target = mod != null ? __create(__getProtoOf(mod)) : {};
21
- const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
21
+ const to = isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
22
  if (mod && typeof mod === "object" || typeof mod === "function") {
23
23
  for (let key of __getOwnPropNames(mod))
24
24
  if (!__hasOwnProp.call(to, key))
@@ -32,19 +32,6 @@ var __toESM = (mod, isNodeMode, target) => {
32
32
  return to;
33
33
  };
34
34
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
35
- var __returnValue = (v) => v;
36
- function __exportSetter(name, newValue) {
37
- this[name] = __returnValue.bind(null, newValue);
38
- }
39
- var __export = (target, all) => {
40
- for (var name in all)
41
- __defProp(target, name, {
42
- get: all[name],
43
- enumerable: true,
44
- configurable: true,
45
- set: __exportSetter.bind(all, name)
46
- });
47
- };
48
35
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
49
36
 
50
- export { __toESM, __commonJS, __export, __require };
37
+ export { __toESM, __commonJS, __require };
@@ -0,0 +1,51 @@
1
+ // ../plugin/src/shared/rpc-notifications.ts
2
+ var queue = [];
3
+ var nextNotificationId = 1;
4
+ var sinks = new Set;
5
+ function notificationMatchesSink(notification, sink) {
6
+ if (notification.sessionId === undefined)
7
+ return true;
8
+ if (sink.sessionId !== undefined)
9
+ return notification.sessionId === sink.sessionId;
10
+ return sink.protocol !== 2;
11
+ }
12
+ function pushNotification2(type, payload, sessionId) {
13
+ const notification = { id: nextNotificationId++, type, payload, sessionId };
14
+ queue.push(notification);
15
+ for (const sink of sinks) {
16
+ if (!notificationMatchesSink(notification, sink))
17
+ continue;
18
+ try {
19
+ sink.send(notification);
20
+ } catch {}
21
+ }
22
+ if (queue.length > 100) {
23
+ const reservedIds = new Set;
24
+ const reservedScopes = new Set;
25
+ for (let i = queue.length - 1;i >= 0 && reservedScopes.size < 25; i -= 1) {
26
+ const candidate = queue[i];
27
+ const scope = candidate.sessionId ?? "\x00global";
28
+ if (reservedScopes.has(scope))
29
+ continue;
30
+ reservedScopes.add(scope);
31
+ reservedIds.add(candidate.id);
32
+ }
33
+ const evictionIndex = queue.findIndex((candidate) => !reservedIds.has(candidate.id));
34
+ queue.splice(evictionIndex >= 0 ? evictionIndex : 0, 1);
35
+ }
36
+ }
37
+ function isTuiConnected2(sessionId) {
38
+ if (sinks.size === 0)
39
+ return false;
40
+ if (sessionId === undefined)
41
+ return true;
42
+ for (const sink of sinks) {
43
+ if (sink.sessionId === sessionId)
44
+ return true;
45
+ if (sink.sessionId === undefined && sink.protocol !== 2)
46
+ return true;
47
+ }
48
+ return false;
49
+ }
50
+
51
+ export { pushNotification2, isTuiConnected2 };
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  __commonJS,
3
3
  __require
4
- } from "./index-1yh8g550.js";
4
+ } from "./index-22jkk6wg.js";
5
5
 
6
6
  // ../../node_modules/.bun/@jitl+quickjs-ffi-types@0.32.0/node_modules/@jitl/quickjs-ffi-types/dist/index.js
7
7
  var require_dist = __commonJS(function(exports, module) {