@cortexkit/pi-magic-context 0.41.2 → 0.41.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/README.md +6 -1
- package/dist/historian-calibration-extension.js +0 -2
- package/dist/{index-q2vgz0j1.js → index-147qn1yq.js} +4 -1
- package/dist/{index-1yh8g550.js → index-22jkk6wg.js} +2 -15
- package/dist/index-b3eqj1g6.js +51 -0
- package/dist/{index-rgdqj8nj.js → index-e7vx3byk.js} +1 -1
- package/dist/{index-9xexf8s7.js → index-rn7gafjr.js} +1 -9
- package/dist/{index-ys39wb43.js → index-s0zw9ddk.js} +12903 -26334
- package/dist/index-v6t0tg85.js +13 -0
- package/dist/index.js +3258 -1642
- package/dist/{index-dynqfgx1.js → module-asyncify-2EFITU5U-rkqjhjxd.js} +69 -8
- package/dist/{prompt-context-3kjq9ejq.js → prompt-context-g3abnc66.js} +0 -2
- package/dist/rpc-notifications-jxy30tgz.js +8 -0
- package/dist/{safe-notification-target-hjcb423r.js → safe-notification-target-em2xnn1k.js} +1 -3
- package/dist/subagent-entry.js +12 -12
- package/dist/transformers-node-wasm.js +328 -328
- package/dist/transformers-web.js +72 -72
- package/dist/{transformers.node-b1wa0hgx.js → transformers.node-dpmf3wpx.js} +74 -74
- package/package.json +1 -1
- package/dist/emscripten-module-49k43zfy.js +0 -507
- package/dist/emscripten-module-ex4v0x4z.js +0 -606
- package/dist/emscripten-module-jfs3d1dq.js +0 -1536
- package/dist/emscripten-module-ss4g4spn.js +0 -4563
- package/dist/ffi-bbm9vkfa.js +0 -92
- package/dist/ffi-kb5r0x1j.js +0 -92
- package/dist/ffi-qnrt0y78.js +0 -80
- package/dist/ffi-yx2hpf4p.js +0 -80
- package/dist/index-hw34xmzk.js +0 -104
- package/dist/index-ss632za9.js +0 -77
- package/dist/index-y63nbvkk.js +0 -251
- package/dist/module-ES6BEMUI-1yjdz59c.js +0 -14
- package/dist/module-asyncify-2EFITU5U-fdkx4fhy.js +0 -9
- 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
|
---
|
|
@@ -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,
|
|
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-
|
|
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) {
|
|
@@ -1,16 +1,8 @@
|
|
|
1
1
|
// ../../node_modules/.bun/@jitl+quickjs-ffi-types@0.32.0/node_modules/@jitl/quickjs-ffi-types/dist/index.mjs
|
|
2
|
-
function assertSync(fn) {
|
|
3
|
-
return function(...args) {
|
|
4
|
-
let result = fn(...args);
|
|
5
|
-
if (result && typeof result == "object" && result instanceof Promise)
|
|
6
|
-
throw new Error("Function unexpectedly returned a Promise");
|
|
7
|
-
return result;
|
|
8
|
-
};
|
|
9
|
-
}
|
|
10
2
|
var EvalFlags = { JS_EVAL_TYPE_GLOBAL: 0, JS_EVAL_TYPE_MODULE: 1, JS_EVAL_TYPE_DIRECT: 2, JS_EVAL_TYPE_INDIRECT: 3, JS_EVAL_TYPE_MASK: 3, JS_EVAL_FLAG_STRICT: 8, JS_EVAL_FLAG_STRIP: 16, JS_EVAL_FLAG_COMPILE_ONLY: 32, JS_EVAL_FLAG_BACKTRACE_BARRIER: 64 };
|
|
11
3
|
var IntrinsicsFlags = { BaseObjects: 1, Date: 2, Eval: 4, StringNormalize: 8, RegExp: 16, RegExpCompiler: 32, JSON: 64, Proxy: 128, MapSet: 256, TypedArrays: 512, Promise: 1024, BigInt: 2048, BigFloat: 4096, BigDecimal: 8192, OperatorOverloading: 16384, BignumExt: 32768 };
|
|
12
4
|
var JSPromiseStateEnum = { Pending: 0, Fulfilled: 1, Rejected: 2 };
|
|
13
5
|
var GetOwnPropertyNamesFlags = { JS_GPN_STRING_MASK: 1, JS_GPN_SYMBOL_MASK: 2, JS_GPN_PRIVATE_MASK: 4, JS_GPN_ENUM_ONLY: 16, JS_GPN_SET_ENUM: 32, QTS_GPN_NUMBER_MASK: 64, QTS_STANDARD_COMPLIANT_NUMBER: 128 };
|
|
14
6
|
var IsEqualOp = { IsStrictlyEqual: 0, IsSameValue: 1, IsSameValueZero: 2 };
|
|
15
7
|
|
|
16
|
-
export {
|
|
8
|
+
export { EvalFlags, IntrinsicsFlags, JSPromiseStateEnum, GetOwnPropertyNamesFlags, IsEqualOp };
|