@cortexkit/pi-magic-context 0.44.3 → 0.45.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.
- package/dist/embedding-worker.js +47 -0
- package/dist/emscripten-module-0g8f45e6.js +602 -0
- package/dist/emscripten-module-0pekdjxz.js +1532 -0
- package/dist/emscripten-module-e67xwsp3.js +503 -0
- package/dist/emscripten-module-pj1vyb44.js +4559 -0
- package/dist/ffi-3cx1cxpk.js +78 -0
- package/dist/ffi-7bqqe4cd.js +91 -0
- package/dist/ffi-7e6gryj5.js +91 -0
- package/dist/ffi-bpvkebwr.js +78 -0
- package/dist/historian-calibration-extension.js +7 -4
- package/dist/{index-atb1ecv9.js → index-2bw9k8nx.js} +7930 -23026
- package/dist/index-2pbbk3en.js +410 -0
- package/dist/index-4d3cba70.js +10 -0
- package/dist/{index-59dmj4zs.js → index-7n8gb6j3.js} +165 -3
- package/dist/{index-97e5fzy3.js → index-7s5yk3za.js} +1 -1
- package/dist/index-901ekbga.js +244 -0
- package/dist/index-e16q5sd7.js +240 -0
- package/dist/index-g0xfx1c2.js +275 -0
- package/dist/{module-asyncify-2EFITU5U-rkqjhjxd.js → index-g20jdh0p.js} +114 -105
- package/dist/index-j0mbc5vj.js +359 -0
- package/dist/index-k0yd1ph9.js +7774 -0
- package/dist/{index-5fw91enm.js → index-n3g5mwa8.js} +1 -1
- package/dist/index-q1yc6bs0.js +104 -0
- package/dist/index-ttf0cqq8.js +8938 -0
- package/dist/{index-tckvezry.js → index-vxjgsr9m.js} +797 -914
- package/dist/{index-n8kg008j.js → index-w76x3af7.js} +28 -18
- package/dist/index.js +4060 -1695
- package/dist/{message-time-backfill-5yrp95cx.js → message-time-backfill-g83dkh8m.js} +19 -4
- package/dist/migration-worker.js +51 -0
- package/dist/module-ES6BEMUI-3cet1pyp.js +12 -0
- package/dist/module-asyncify-2EFITU5U-c2razzd9.js +6 -0
- package/dist/{read-session-chunk-z2weg25w.js → read-session-chunk-kmt7a6zj.js} +32 -5
- package/dist/rpc-notifications-gm1mdpwh.js +16 -0
- package/dist/{safe-notification-target-y3hg2m7p.js → safe-notification-target-6cn3z99t.js} +2 -2
- package/dist/subagent-entry.js +15 -6
- package/package.json +4 -4
- package/dist/index-b3eqj1g6.js +0 -51
- package/dist/index-rn7gafjr.js +0 -8
- package/dist/index-v6t0tg85.js +0 -13
- package/dist/rpc-notifications-jxy30tgz.js +0 -8
|
@@ -1,17 +1,9 @@
|
|
|
1
1
|
// src/subagent-telemetry.ts
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
3
|
|
|
4
|
-
// ../plugin/src/agents/permissions.ts
|
|
5
|
-
function applyDisallowedTools(defaults, disallowed) {
|
|
6
|
-
if (disallowed.includes("*"))
|
|
7
|
-
return [];
|
|
8
|
-
return defaults.filter((t) => !disallowed.includes(t));
|
|
9
|
-
}
|
|
10
|
-
|
|
11
4
|
// ../plugin/src/agents/hidden-agent-registrations.ts
|
|
12
5
|
var HIDDEN_AGENT_DESCRIPTION = "Internal Magic Context maintenance agent. Not for general tasks — do not select for user work.";
|
|
13
6
|
function buildHiddenAgentRegistrations(args) {
|
|
14
|
-
const historianAllowedTools = applyDisallowedTools(["read", "aft_outline", "aft_zoom", "aft_search"], args.historianDisallowed);
|
|
15
7
|
return [
|
|
16
8
|
{
|
|
17
9
|
id: "dreamer",
|
|
@@ -115,9 +107,10 @@ function buildHiddenAgentRegistrations(args) {
|
|
|
115
107
|
hidden: true,
|
|
116
108
|
description: HIDDEN_AGENT_DESCRIPTION,
|
|
117
109
|
prompt: args.historianPrompt,
|
|
118
|
-
allowedTools:
|
|
119
|
-
maxSteps:
|
|
120
|
-
overrides: args.historianOverrides
|
|
110
|
+
allowedTools: [],
|
|
111
|
+
maxSteps: 4,
|
|
112
|
+
overrides: args.historianOverrides,
|
|
113
|
+
lockPermissions: true
|
|
121
114
|
},
|
|
122
115
|
{
|
|
123
116
|
id: "historian-recomp",
|
|
@@ -125,9 +118,10 @@ function buildHiddenAgentRegistrations(args) {
|
|
|
125
118
|
hidden: true,
|
|
126
119
|
description: HIDDEN_AGENT_DESCRIPTION,
|
|
127
120
|
prompt: args.historianRecompPrompt ?? args.historianPrompt,
|
|
128
|
-
allowedTools:
|
|
129
|
-
maxSteps:
|
|
130
|
-
overrides: args.historianOverrides
|
|
121
|
+
allowedTools: [],
|
|
122
|
+
maxSteps: 4,
|
|
123
|
+
overrides: args.historianOverrides,
|
|
124
|
+
lockPermissions: true
|
|
131
125
|
},
|
|
132
126
|
{
|
|
133
127
|
id: "historian-editor",
|
|
@@ -135,9 +129,10 @@ function buildHiddenAgentRegistrations(args) {
|
|
|
135
129
|
hidden: true,
|
|
136
130
|
description: HIDDEN_AGENT_DESCRIPTION,
|
|
137
131
|
prompt: args.historianEditorPrompt,
|
|
138
|
-
allowedTools:
|
|
139
|
-
maxSteps:
|
|
140
|
-
overrides: args.historianOverrides
|
|
132
|
+
allowedTools: [],
|
|
133
|
+
maxSteps: 4,
|
|
134
|
+
overrides: args.historianOverrides,
|
|
135
|
+
lockPermissions: true
|
|
141
136
|
}
|
|
142
137
|
];
|
|
143
138
|
}
|
|
@@ -242,4 +237,19 @@ class SubagentTelemetry {
|
|
|
242
237
|
}
|
|
243
238
|
}
|
|
244
239
|
|
|
245
|
-
|
|
240
|
+
// src/host-system-prompt.ts
|
|
241
|
+
function readHostSystemPrompt(ctx) {
|
|
242
|
+
if (typeof ctx.getSystemPrompt !== "function")
|
|
243
|
+
return;
|
|
244
|
+
const raw = ctx.getSystemPrompt();
|
|
245
|
+
if (typeof raw === "string")
|
|
246
|
+
return raw;
|
|
247
|
+
if (Array.isArray(raw) && raw.every((part) => typeof part === "string")) {
|
|
248
|
+
return raw.join(`
|
|
249
|
+
|
|
250
|
+
`);
|
|
251
|
+
}
|
|
252
|
+
return;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
export { buildHiddenAgentRegistrations, subagentStepCap, promptFingerprint, SubagentTelemetry, readHostSystemPrompt };
|