@cortexkit/opencode-magic-context 0.39.0 → 0.40.1
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 +20 -0
- package/dist/agents/permissions.d.ts +5 -3
- package/dist/agents/permissions.d.ts.map +1 -1
- package/dist/config/index.d.ts.map +1 -1
- package/dist/config/profiles.d.ts +22 -0
- package/dist/config/profiles.d.ts.map +1 -0
- package/dist/config/project-security.d.ts +3 -0
- package/dist/config/project-security.d.ts.map +1 -1
- package/dist/config/schema/magic-context.d.ts +400 -0
- package/dist/config/schema/magic-context.d.ts.map +1 -1
- package/dist/features/magic-context/fail-closed-block.d.ts +11 -1
- package/dist/features/magic-context/fail-closed-block.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-failure.d.ts +11 -0
- package/dist/features/magic-context/memory/embedding-failure.d.ts.map +1 -0
- package/dist/features/magic-context/memory/embedding-local.d.ts +19 -0
- package/dist/features/magic-context/memory/embedding-local.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-openai.d.ts +5 -0
- package/dist/features/magic-context/memory/embedding-openai.d.ts.map +1 -1
- package/dist/features/magic-context/memory/embedding-provider.d.ts +3 -0
- package/dist/features/magic-context/memory/embedding-provider.d.ts.map +1 -1
- package/dist/features/magic-context/project-embedding-registry.d.ts +2 -0
- package/dist/features/magic-context/project-embedding-registry.d.ts.map +1 -1
- package/dist/features/magic-context/storage-db.d.ts +1 -1
- package/dist/features/magic-context/storage-db.d.ts.map +1 -1
- package/dist/features/magic-context/transform-decision-log.d.ts.map +1 -1
- package/dist/hooks/magic-context/format-embed-failure.d.ts +3 -0
- package/dist/hooks/magic-context/format-embed-failure.d.ts.map +1 -0
- package/dist/hooks/magic-context/inject-compartments.d.ts +4 -3
- package/dist/hooks/magic-context/inject-compartments.d.ts.map +1 -1
- package/dist/hooks/magic-context/module-wire.d.ts.map +1 -1
- package/dist/hooks/magic-context/strip-content.d.ts +6 -0
- package/dist/hooks/magic-context/strip-content.d.ts.map +1 -1
- package/dist/hooks/magic-context/temporal-awareness.d.ts +1 -1
- package/dist/hooks/magic-context/temporal-awareness.d.ts.map +1 -1
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts +1 -0
- package/dist/hooks/magic-context/transform-postprocess-phase.d.ts.map +1 -1
- package/dist/{index-k2ts0wk1.js → index-x64cmpej.js} +507 -89
- package/dist/index.js +128 -166
- package/dist/plugin/hooks/create-session-hooks.d.ts +2 -0
- package/dist/plugin/hooks/create-session-hooks.d.ts.map +1 -1
- package/dist/plugin/rpc-handlers.d.ts.map +1 -1
- package/dist/{recomp-orchestrator-2pncxee7.js → recomp-orchestrator-dtgww0f0.js} +1 -1
- package/dist/shared/rpc-types.d.ts +2 -0
- package/dist/shared/rpc-types.d.ts.map +1 -1
- package/dist/shared/rpc-utils.d.ts +12 -1
- package/dist/shared/rpc-utils.d.ts.map +1 -1
- package/dist/shared/status-detail-text.d.ts.map +1 -1
- package/dist/tui/data/context-db.d.ts.map +1 -1
- package/dist/tui-compiled/data/context-db.d.ts.map +1 -1
- package/package.json +2 -1
- package/src/agents/permissions.ts +14 -4
- package/src/config/index.test.ts +361 -2
- package/src/config/index.ts +29 -10
- package/src/config/profiles.ts +106 -0
- package/src/config/project-security.hostile-matrix.test.ts +9 -0
- package/src/config/project-security.test.ts +17 -0
- package/src/config/project-security.ts +10 -0
- package/src/config/schema/magic-context.test.ts +128 -0
- package/src/config/schema/magic-context.ts +89 -0
- package/src/shared/rpc-types.ts +2 -0
- package/src/shared/rpc-utils.test.ts +32 -0
- package/src/shared/rpc-utils.ts +38 -13
- package/src/shared/status-detail-text.test.ts +2 -0
- package/src/shared/status-detail-text.ts +1 -0
- package/src/tui/data/context-db.ts +1 -0
- package/src/tui-compiled/data/context-db.ts +1 -0
package/README.md
CHANGED
|
@@ -333,6 +333,26 @@ Settings live in `magic-context.jsonc`. Most settings have sensible defaults, bu
|
|
|
333
333
|
|
|
334
334
|
Upgrading from an earlier version? Your existing config is moved here automatically on first run (a `.MOVED_READPLEASE` breadcrumb is left at the old path).
|
|
335
335
|
|
|
336
|
+
### Work and personal repository model profiles
|
|
337
|
+
|
|
338
|
+
If your personal repositories use one hidden-agent model set and work repositories use another, define the profiles in user config and let each work repository select its name:
|
|
339
|
+
|
|
340
|
+
```jsonc
|
|
341
|
+
// ~/.config/cortexkit/magic-context.jsonc
|
|
342
|
+
{
|
|
343
|
+
"profile": "personal",
|
|
344
|
+
"profiles": {
|
|
345
|
+
"personal": { "historian": { "opencode": { "model": "anthropic/claude-sonnet-4-6" } } },
|
|
346
|
+
"work": { "historian": { "opencode": { "model": "openai/gpt-5.2-codex" } } }
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
|
|
350
|
+
// <work-repo>/.cortexkit/magic-context.jsonc
|
|
351
|
+
{ "profile": "work" }
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
This is the work-repositories-versus-personal-repositories setup requested by kagbodji. Profiles overlay only hidden-agent model selection, preserve base settings that they do not mention, and are defined only in user config. A project can select a known user profile but cannot supply its contents. See [CONFIGURATION.md](./CONFIGURATION.md#per-repository-model-profiles) for the full OpenCode/Pi example, fallback behavior, and trust boundary.
|
|
355
|
+
|
|
336
356
|
---
|
|
337
357
|
|
|
338
358
|
## Storage
|
|
@@ -86,9 +86,11 @@ export declare function buildAllowOnlyPermission(allowedTools: readonly string[]
|
|
|
86
86
|
* Add final `permission.task` denies for Magic Context's internal workers.
|
|
87
87
|
*
|
|
88
88
|
* OpenCode accepts either a whole-permission action or a pattern map for
|
|
89
|
-
* `permission.task`; its evaluator uses the last matching rule.
|
|
90
|
-
* whole-permission form, retain
|
|
91
|
-
* exact agent-id denies
|
|
89
|
+
* `permission.task`; its visibility evaluator uses the last matching rule.
|
|
90
|
+
* Normalize the whole-permission form, retain unrelated user rules, then append
|
|
91
|
+
* our exact agent-id denies. When the ambient task policy has a wildcard deny,
|
|
92
|
+
* re-emit that wildcard after the named denies so the Task tool is hidden rather
|
|
93
|
+
* than shown as a callable-but-refused tool.
|
|
92
94
|
*/
|
|
93
95
|
export declare function denyTaskRoutingToAgents(permission: unknown, internalAgentIds: readonly string[]): Record<string, unknown>;
|
|
94
96
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/agents/permissions.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsEG;AAEH;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CACpC,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EAC3C,UAAU,CAAC,EAAE,MAAM,GACpB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAoBlC;AAYD
|
|
1
|
+
{"version":3,"file":"permissions.d.ts","sourceRoot":"","sources":["../../src/agents/permissions.ts"],"names":[],"mappings":"AAEA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAsEG;AAEH;;;;;;;;;;;GAWG;AACH,wBAAgB,wBAAwB,CACpC,YAAY,EAAE,SAAS,MAAM,EAAE,GAAG,SAAS,EAC3C,UAAU,CAAC,EAAE,MAAM,GACpB,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,CAoBlC;AAYD;;;;;;;;;GASG;AACH,wBAAgB,uBAAuB,CACnC,UAAU,EAAE,OAAO,EACnB,gBAAgB,EAAE,SAAS,MAAM,EAAE,GACpC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAgCzB;AAgBD;;;;;;GAMG;AACH,wBAAgB,6BAA6B,CACzC,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACrD,gBAAgB,EAAE,SAAS,MAAM,EAAE,GACpC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAczC;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,uBAAuB,4DAA6D,CAAC;AAElG;;;;GAIG;AACH,wBAAgB,oBAAoB,CAChC,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,UAAU,EAAE,SAAS,MAAM,EAAE,GAC9B,SAAS,MAAM,EAAE,CAGnB;AAQD;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,mCAAmC,yBAA0B,CAAC;AAE3E;;;;;GAKG;AACH,eAAO,MAAM,yCAAyC,0FAQ5C,CAAC;AAEX;;;;GAIG;AACH,eAAO,MAAM,iCAAiC,aAAc,CAAC;AAE7D,eAAO,MAAM,sBAAsB,oDAAqD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/config/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAoBpE,OAAO,EAAE,KAAK,kBAAkB,EAA4B,MAAM,wBAAwB,CAAC;AAI3F,MAAM,WAAW,wBAAyB,SAAQ,kBAAkB;IAChE,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CACZ,MAAM,EACN;QACI,QAAQ,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE,OAAO,CAAC;KACrB,CACJ,CAAC;CACL;AAsCD,MAAM,MAAM,WAAW,GACjB,IAAI,GACJ,0BAA0B,GAC1B,uBAAuB,GACvB,0BAA0B,GAC1B,iBAAiB,GACjB,sBAAsB,CAAC;AAE7B,MAAM,WAAW,kBAAkB;IAC/B,MAAM,EAAE,wBAAwB,GAAG;QAAE,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;KAAE,CAAC;IACjE,6EAA6E;IAC7E,yBAAyB,EAAE,mBAAmB,CAAC;IAC/C,WAAW,EAAE,WAAW,CAAC;IACzB,OAAO,EAAE;QACL,UAAU,EAAE,WAAW,CAAC;QACxB,aAAa,EAAE,WAAW,CAAC;KAC9B,CAAC;IACF,oBAAoB,EAAE,KAAK,CAAC;QAAE,OAAO,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC9F,qBAAqB,EAAE,MAAM,EAAE,CAAC;CACnC;AA+UD,wBAAgB,gBAAgB,CAC5B,SAAS,EAAE,MAAM,GAClB,wBAAwB,GAAG;IAAE,cAAc,CAAC,EAAE,MAAM,EAAE,CAAA;CAAE,CAY1D;AAwDD,wBAAgB,wBAAwB,CAAC,SAAS,EAAE,MAAM,GAAG,kBAAkB,CA0K9E"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export interface ProfileResolution {
|
|
2
|
+
/** User config minus the profile declarations and selector. */
|
|
3
|
+
userBase: Record<string, unknown>;
|
|
4
|
+
/** Project config minus the profile declarations and selector. */
|
|
5
|
+
projectBase: Record<string, unknown>;
|
|
6
|
+
/** The validated user-owned overlay for the active profile, if any. */
|
|
7
|
+
overlay: Record<string, unknown>;
|
|
8
|
+
/** The selected profile name, absent when no valid profile is active. */
|
|
9
|
+
activeProfile?: string;
|
|
10
|
+
warnings: string[];
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Resolve the user-owned profile overlay without retaining any process-global
|
|
14
|
+
* selection state. Callers merge `userBase`, `overlay`, then `projectBase` for
|
|
15
|
+
* every project load, so a Pi /cd or OpenCode multi-root session cannot borrow
|
|
16
|
+
* another repository's selected profile.
|
|
17
|
+
*/
|
|
18
|
+
export declare function resolveConfigProfile(args: {
|
|
19
|
+
userRaw: Record<string, unknown>;
|
|
20
|
+
projectRaw: Record<string, unknown>;
|
|
21
|
+
}): ProfileResolution;
|
|
22
|
+
//# sourceMappingURL=profiles.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profiles.d.ts","sourceRoot":"","sources":["../../src/config/profiles.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,iBAAiB;IAC9B,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAClC,kEAAkE;IAClE,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACrC,uEAAuE;IACvE,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,yEAAyE;IACzE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,EAAE,MAAM,EAAE,CAAC;CACtB;AAsBD;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAAC,IAAI,EAAE;IACvC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACjC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACvC,GAAG,iBAAiB,CA8DpB"}
|
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
* over the user config. Returns warnings describing what was ignored.
|
|
4
4
|
*
|
|
5
5
|
* Closes:
|
|
6
|
+
* - `profiles` — profile definitions choose hidden-agent models and must stay
|
|
7
|
+
* in trusted user config; a repository may select a named profile but cannot
|
|
8
|
+
* supply its contents.
|
|
6
9
|
* - `auto_update` — a repo must not suppress plugin self-updates (which can
|
|
7
10
|
* carry security fixes).
|
|
8
11
|
* - `fail_closed_blocking` — a repo must not un-block (or force-block) the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-security.d.ts","sourceRoot":"","sources":["../../src/config/project-security.ts"],"names":[],"mappings":"AA6PA
|
|
1
|
+
{"version":3,"file":"project-security.d.ts","sourceRoot":"","sources":["../../src/config/project-security.ts"],"names":[],"mappings":"AA6PA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,wBAAgB,8BAA8B,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,EAAE,CAkP5F;AAED;;;;;GAKG;AACH,wBAAgB,kCAAkC,CAAC,IAAI,EAAE;IACrD,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC,iBAAiB,EAAE;QACf,4BAA4B,CAAC,EAAE,OAAO,CAAC;QACvC,wBAAwB,CAAC,EAAE,OAAO,CAAC;KACtC,CAAC;CACL,GAAG,MAAM,EAAE,CA+IX;AA2BD,wBAAgB,mCAAmC,CAC/C,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACnC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAClC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAClC,MAAM,EAAE,CAsCV"}
|
|
@@ -285,6 +285,232 @@ export declare const DreamerPiHarnessBlockSchema: z.ZodObject<{
|
|
|
285
285
|
}, z.core.$strict>>>;
|
|
286
286
|
}, z.core.$strict>;
|
|
287
287
|
export type DreamerPiHarnessBlock = z.infer<typeof DreamerPiHarnessBlockSchema>;
|
|
288
|
+
export declare const ConfigProfileSchema: z.ZodObject<{
|
|
289
|
+
historian: z.ZodOptional<z.ZodObject<{
|
|
290
|
+
opencode: z.ZodOptional<z.ZodObject<{
|
|
291
|
+
model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
292
|
+
model: z.ZodString;
|
|
293
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
294
|
+
}, z.core.$strict>]>>;
|
|
295
|
+
fallback_models: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
296
|
+
model: z.ZodString;
|
|
297
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
298
|
+
}, z.core.$strict>]>>>;
|
|
299
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
300
|
+
}, z.core.$strict>>;
|
|
301
|
+
pi: z.ZodOptional<z.ZodObject<{
|
|
302
|
+
model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
303
|
+
model: z.ZodString;
|
|
304
|
+
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
305
|
+
off: "off";
|
|
306
|
+
minimal: "minimal";
|
|
307
|
+
low: "low";
|
|
308
|
+
medium: "medium";
|
|
309
|
+
high: "high";
|
|
310
|
+
xhigh: "xhigh";
|
|
311
|
+
max: "max";
|
|
312
|
+
}>>;
|
|
313
|
+
}, z.core.$strict>]>>;
|
|
314
|
+
fallback_models: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
315
|
+
model: z.ZodString;
|
|
316
|
+
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
317
|
+
off: "off";
|
|
318
|
+
minimal: "minimal";
|
|
319
|
+
low: "low";
|
|
320
|
+
medium: "medium";
|
|
321
|
+
high: "high";
|
|
322
|
+
xhigh: "xhigh";
|
|
323
|
+
max: "max";
|
|
324
|
+
}>>;
|
|
325
|
+
}, z.core.$strict>]>>>;
|
|
326
|
+
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
327
|
+
off: "off";
|
|
328
|
+
minimal: "minimal";
|
|
329
|
+
low: "low";
|
|
330
|
+
medium: "medium";
|
|
331
|
+
high: "high";
|
|
332
|
+
xhigh: "xhigh";
|
|
333
|
+
max: "max";
|
|
334
|
+
}>>;
|
|
335
|
+
}, z.core.$strict>>;
|
|
336
|
+
}, z.core.$strict>>;
|
|
337
|
+
dreamer: z.ZodOptional<z.ZodObject<{
|
|
338
|
+
opencode: z.ZodOptional<z.ZodObject<{
|
|
339
|
+
model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
340
|
+
model: z.ZodString;
|
|
341
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
342
|
+
}, z.core.$strict>]>>;
|
|
343
|
+
fallback_models: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
344
|
+
model: z.ZodString;
|
|
345
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
346
|
+
}, z.core.$strict>]>>>;
|
|
347
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
348
|
+
}, z.core.$strict>>;
|
|
349
|
+
pi: z.ZodOptional<z.ZodObject<{
|
|
350
|
+
model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
351
|
+
model: z.ZodString;
|
|
352
|
+
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
353
|
+
off: "off";
|
|
354
|
+
minimal: "minimal";
|
|
355
|
+
low: "low";
|
|
356
|
+
medium: "medium";
|
|
357
|
+
high: "high";
|
|
358
|
+
xhigh: "xhigh";
|
|
359
|
+
max: "max";
|
|
360
|
+
}>>;
|
|
361
|
+
}, z.core.$strict>]>>;
|
|
362
|
+
fallback_models: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
363
|
+
model: z.ZodString;
|
|
364
|
+
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
365
|
+
off: "off";
|
|
366
|
+
minimal: "minimal";
|
|
367
|
+
low: "low";
|
|
368
|
+
medium: "medium";
|
|
369
|
+
high: "high";
|
|
370
|
+
xhigh: "xhigh";
|
|
371
|
+
max: "max";
|
|
372
|
+
}>>;
|
|
373
|
+
}, z.core.$strict>]>>>;
|
|
374
|
+
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
375
|
+
off: "off";
|
|
376
|
+
minimal: "minimal";
|
|
377
|
+
low: "low";
|
|
378
|
+
medium: "medium";
|
|
379
|
+
high: "high";
|
|
380
|
+
xhigh: "xhigh";
|
|
381
|
+
max: "max";
|
|
382
|
+
}>>;
|
|
383
|
+
}, z.core.$strict>>;
|
|
384
|
+
}, z.core.$strict>>;
|
|
385
|
+
sidekick: z.ZodOptional<z.ZodObject<{
|
|
386
|
+
model: z.ZodOptional<z.ZodString>;
|
|
387
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
388
|
+
fallback_models: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
389
|
+
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
390
|
+
off: "off";
|
|
391
|
+
minimal: "minimal";
|
|
392
|
+
low: "low";
|
|
393
|
+
medium: "medium";
|
|
394
|
+
high: "high";
|
|
395
|
+
xhigh: "xhigh";
|
|
396
|
+
max: "max";
|
|
397
|
+
}>>;
|
|
398
|
+
}, z.core.$strict>>;
|
|
399
|
+
}, z.core.$strict>;
|
|
400
|
+
export type ConfigProfile = z.infer<typeof ConfigProfileSchema>;
|
|
401
|
+
export declare const ConfigProfilesSchema: z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
402
|
+
historian: z.ZodOptional<z.ZodObject<{
|
|
403
|
+
opencode: z.ZodOptional<z.ZodObject<{
|
|
404
|
+
model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
405
|
+
model: z.ZodString;
|
|
406
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
407
|
+
}, z.core.$strict>]>>;
|
|
408
|
+
fallback_models: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
409
|
+
model: z.ZodString;
|
|
410
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
411
|
+
}, z.core.$strict>]>>>;
|
|
412
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
413
|
+
}, z.core.$strict>>;
|
|
414
|
+
pi: z.ZodOptional<z.ZodObject<{
|
|
415
|
+
model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
416
|
+
model: z.ZodString;
|
|
417
|
+
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
418
|
+
off: "off";
|
|
419
|
+
minimal: "minimal";
|
|
420
|
+
low: "low";
|
|
421
|
+
medium: "medium";
|
|
422
|
+
high: "high";
|
|
423
|
+
xhigh: "xhigh";
|
|
424
|
+
max: "max";
|
|
425
|
+
}>>;
|
|
426
|
+
}, z.core.$strict>]>>;
|
|
427
|
+
fallback_models: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
428
|
+
model: z.ZodString;
|
|
429
|
+
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
430
|
+
off: "off";
|
|
431
|
+
minimal: "minimal";
|
|
432
|
+
low: "low";
|
|
433
|
+
medium: "medium";
|
|
434
|
+
high: "high";
|
|
435
|
+
xhigh: "xhigh";
|
|
436
|
+
max: "max";
|
|
437
|
+
}>>;
|
|
438
|
+
}, z.core.$strict>]>>>;
|
|
439
|
+
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
440
|
+
off: "off";
|
|
441
|
+
minimal: "minimal";
|
|
442
|
+
low: "low";
|
|
443
|
+
medium: "medium";
|
|
444
|
+
high: "high";
|
|
445
|
+
xhigh: "xhigh";
|
|
446
|
+
max: "max";
|
|
447
|
+
}>>;
|
|
448
|
+
}, z.core.$strict>>;
|
|
449
|
+
}, z.core.$strict>>;
|
|
450
|
+
dreamer: z.ZodOptional<z.ZodObject<{
|
|
451
|
+
opencode: z.ZodOptional<z.ZodObject<{
|
|
452
|
+
model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
453
|
+
model: z.ZodString;
|
|
454
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
455
|
+
}, z.core.$strict>]>>;
|
|
456
|
+
fallback_models: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
457
|
+
model: z.ZodString;
|
|
458
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
459
|
+
}, z.core.$strict>]>>>;
|
|
460
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
461
|
+
}, z.core.$strict>>;
|
|
462
|
+
pi: z.ZodOptional<z.ZodObject<{
|
|
463
|
+
model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
464
|
+
model: z.ZodString;
|
|
465
|
+
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
466
|
+
off: "off";
|
|
467
|
+
minimal: "minimal";
|
|
468
|
+
low: "low";
|
|
469
|
+
medium: "medium";
|
|
470
|
+
high: "high";
|
|
471
|
+
xhigh: "xhigh";
|
|
472
|
+
max: "max";
|
|
473
|
+
}>>;
|
|
474
|
+
}, z.core.$strict>]>>;
|
|
475
|
+
fallback_models: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
476
|
+
model: z.ZodString;
|
|
477
|
+
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
478
|
+
off: "off";
|
|
479
|
+
minimal: "minimal";
|
|
480
|
+
low: "low";
|
|
481
|
+
medium: "medium";
|
|
482
|
+
high: "high";
|
|
483
|
+
xhigh: "xhigh";
|
|
484
|
+
max: "max";
|
|
485
|
+
}>>;
|
|
486
|
+
}, z.core.$strict>]>>>;
|
|
487
|
+
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
488
|
+
off: "off";
|
|
489
|
+
minimal: "minimal";
|
|
490
|
+
low: "low";
|
|
491
|
+
medium: "medium";
|
|
492
|
+
high: "high";
|
|
493
|
+
xhigh: "xhigh";
|
|
494
|
+
max: "max";
|
|
495
|
+
}>>;
|
|
496
|
+
}, z.core.$strict>>;
|
|
497
|
+
}, z.core.$strict>>;
|
|
498
|
+
sidekick: z.ZodOptional<z.ZodObject<{
|
|
499
|
+
model: z.ZodOptional<z.ZodString>;
|
|
500
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
501
|
+
fallback_models: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
502
|
+
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
503
|
+
off: "off";
|
|
504
|
+
minimal: "minimal";
|
|
505
|
+
low: "low";
|
|
506
|
+
medium: "medium";
|
|
507
|
+
high: "high";
|
|
508
|
+
xhigh: "xhigh";
|
|
509
|
+
max: "max";
|
|
510
|
+
}>>;
|
|
511
|
+
}, z.core.$strict>>;
|
|
512
|
+
}, z.core.$strict>>;
|
|
513
|
+
export type ConfigProfiles = z.infer<typeof ConfigProfilesSchema>;
|
|
288
514
|
export declare const DreamTaskConfigSchema: z.ZodObject<{
|
|
289
515
|
schedule: z.ZodDefault<z.ZodString>;
|
|
290
516
|
promotion_threshold: z.ZodOptional<z.ZodNumber>;
|
|
@@ -787,6 +1013,10 @@ export interface MagicContextConfig {
|
|
|
787
1013
|
auto_update?: boolean;
|
|
788
1014
|
/** Output language for generated Magic Context prose. USER config only. */
|
|
789
1015
|
language?: string;
|
|
1016
|
+
/** Active user-owned model profile after user/project resolution. */
|
|
1017
|
+
profile?: string;
|
|
1018
|
+
/** Named user-owned model profiles. Declarations are consumed during resolution. */
|
|
1019
|
+
profiles?: ConfigProfiles;
|
|
790
1020
|
historian?: HistorianConfig;
|
|
791
1021
|
dreamer?: DreamerConfig;
|
|
792
1022
|
smart_notes: {
|
|
@@ -976,6 +1206,119 @@ export declare const MagicContextConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
976
1206
|
}>>;
|
|
977
1207
|
auto_update: z.ZodOptional<z.ZodBoolean>;
|
|
978
1208
|
language: z.ZodOptional<z.ZodString>;
|
|
1209
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
1210
|
+
profiles: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
1211
|
+
historian: z.ZodOptional<z.ZodObject<{
|
|
1212
|
+
opencode: z.ZodOptional<z.ZodObject<{
|
|
1213
|
+
model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1214
|
+
model: z.ZodString;
|
|
1215
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
1216
|
+
}, z.core.$strict>]>>;
|
|
1217
|
+
fallback_models: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1218
|
+
model: z.ZodString;
|
|
1219
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
1220
|
+
}, z.core.$strict>]>>>;
|
|
1221
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
1222
|
+
}, z.core.$strict>>;
|
|
1223
|
+
pi: z.ZodOptional<z.ZodObject<{
|
|
1224
|
+
model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1225
|
+
model: z.ZodString;
|
|
1226
|
+
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
1227
|
+
off: "off";
|
|
1228
|
+
minimal: "minimal";
|
|
1229
|
+
low: "low";
|
|
1230
|
+
medium: "medium";
|
|
1231
|
+
high: "high";
|
|
1232
|
+
xhigh: "xhigh";
|
|
1233
|
+
max: "max";
|
|
1234
|
+
}>>;
|
|
1235
|
+
}, z.core.$strict>]>>;
|
|
1236
|
+
fallback_models: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1237
|
+
model: z.ZodString;
|
|
1238
|
+
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
1239
|
+
off: "off";
|
|
1240
|
+
minimal: "minimal";
|
|
1241
|
+
low: "low";
|
|
1242
|
+
medium: "medium";
|
|
1243
|
+
high: "high";
|
|
1244
|
+
xhigh: "xhigh";
|
|
1245
|
+
max: "max";
|
|
1246
|
+
}>>;
|
|
1247
|
+
}, z.core.$strict>]>>>;
|
|
1248
|
+
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
1249
|
+
off: "off";
|
|
1250
|
+
minimal: "minimal";
|
|
1251
|
+
low: "low";
|
|
1252
|
+
medium: "medium";
|
|
1253
|
+
high: "high";
|
|
1254
|
+
xhigh: "xhigh";
|
|
1255
|
+
max: "max";
|
|
1256
|
+
}>>;
|
|
1257
|
+
}, z.core.$strict>>;
|
|
1258
|
+
}, z.core.$strict>>;
|
|
1259
|
+
dreamer: z.ZodOptional<z.ZodObject<{
|
|
1260
|
+
opencode: z.ZodOptional<z.ZodObject<{
|
|
1261
|
+
model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1262
|
+
model: z.ZodString;
|
|
1263
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
1264
|
+
}, z.core.$strict>]>>;
|
|
1265
|
+
fallback_models: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1266
|
+
model: z.ZodString;
|
|
1267
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
1268
|
+
}, z.core.$strict>]>>>;
|
|
1269
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
1270
|
+
}, z.core.$strict>>;
|
|
1271
|
+
pi: z.ZodOptional<z.ZodObject<{
|
|
1272
|
+
model: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1273
|
+
model: z.ZodString;
|
|
1274
|
+
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
1275
|
+
off: "off";
|
|
1276
|
+
minimal: "minimal";
|
|
1277
|
+
low: "low";
|
|
1278
|
+
medium: "medium";
|
|
1279
|
+
high: "high";
|
|
1280
|
+
xhigh: "xhigh";
|
|
1281
|
+
max: "max";
|
|
1282
|
+
}>>;
|
|
1283
|
+
}, z.core.$strict>]>>;
|
|
1284
|
+
fallback_models: z.ZodOptional<z.ZodArray<z.ZodUnion<readonly [z.ZodString, z.ZodObject<{
|
|
1285
|
+
model: z.ZodString;
|
|
1286
|
+
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
1287
|
+
off: "off";
|
|
1288
|
+
minimal: "minimal";
|
|
1289
|
+
low: "low";
|
|
1290
|
+
medium: "medium";
|
|
1291
|
+
high: "high";
|
|
1292
|
+
xhigh: "xhigh";
|
|
1293
|
+
max: "max";
|
|
1294
|
+
}>>;
|
|
1295
|
+
}, z.core.$strict>]>>>;
|
|
1296
|
+
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
1297
|
+
off: "off";
|
|
1298
|
+
minimal: "minimal";
|
|
1299
|
+
low: "low";
|
|
1300
|
+
medium: "medium";
|
|
1301
|
+
high: "high";
|
|
1302
|
+
xhigh: "xhigh";
|
|
1303
|
+
max: "max";
|
|
1304
|
+
}>>;
|
|
1305
|
+
}, z.core.$strict>>;
|
|
1306
|
+
}, z.core.$strict>>;
|
|
1307
|
+
sidekick: z.ZodOptional<z.ZodObject<{
|
|
1308
|
+
model: z.ZodOptional<z.ZodString>;
|
|
1309
|
+
variant: z.ZodOptional<z.ZodString>;
|
|
1310
|
+
fallback_models: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>>;
|
|
1311
|
+
thinking_level: z.ZodOptional<z.ZodEnum<{
|
|
1312
|
+
off: "off";
|
|
1313
|
+
minimal: "minimal";
|
|
1314
|
+
low: "low";
|
|
1315
|
+
medium: "medium";
|
|
1316
|
+
high: "high";
|
|
1317
|
+
xhigh: "xhigh";
|
|
1318
|
+
max: "max";
|
|
1319
|
+
}>>;
|
|
1320
|
+
}, z.core.$strict>>;
|
|
1321
|
+
}, z.core.$strict>>>;
|
|
979
1322
|
historian: z.ZodOptional<z.ZodObject<{
|
|
980
1323
|
mode: z.ZodOptional<z.ZodEnum<{
|
|
981
1324
|
primary: "primary";
|
|
@@ -1589,6 +1932,63 @@ export declare const MagicContextConfigSchema: z.ZodPipe<z.ZodObject<{
|
|
|
1589
1932
|
};
|
|
1590
1933
|
auto_update?: boolean | undefined;
|
|
1591
1934
|
language?: string | undefined;
|
|
1935
|
+
profile?: string | undefined;
|
|
1936
|
+
profiles?: Record<string, {
|
|
1937
|
+
historian?: {
|
|
1938
|
+
opencode?: {
|
|
1939
|
+
model?: string | {
|
|
1940
|
+
model: string;
|
|
1941
|
+
variant?: string | undefined;
|
|
1942
|
+
} | undefined;
|
|
1943
|
+
fallback_models?: (string | {
|
|
1944
|
+
model: string;
|
|
1945
|
+
variant?: string | undefined;
|
|
1946
|
+
})[] | undefined;
|
|
1947
|
+
variant?: string | undefined;
|
|
1948
|
+
} | undefined;
|
|
1949
|
+
pi?: {
|
|
1950
|
+
model?: string | {
|
|
1951
|
+
model: string;
|
|
1952
|
+
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined;
|
|
1953
|
+
} | undefined;
|
|
1954
|
+
fallback_models?: (string | {
|
|
1955
|
+
model: string;
|
|
1956
|
+
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined;
|
|
1957
|
+
})[] | undefined;
|
|
1958
|
+
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined;
|
|
1959
|
+
} | undefined;
|
|
1960
|
+
} | undefined;
|
|
1961
|
+
dreamer?: {
|
|
1962
|
+
opencode?: {
|
|
1963
|
+
model?: string | {
|
|
1964
|
+
model: string;
|
|
1965
|
+
variant?: string | undefined;
|
|
1966
|
+
} | undefined;
|
|
1967
|
+
fallback_models?: (string | {
|
|
1968
|
+
model: string;
|
|
1969
|
+
variant?: string | undefined;
|
|
1970
|
+
})[] | undefined;
|
|
1971
|
+
variant?: string | undefined;
|
|
1972
|
+
} | undefined;
|
|
1973
|
+
pi?: {
|
|
1974
|
+
model?: string | {
|
|
1975
|
+
model: string;
|
|
1976
|
+
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined;
|
|
1977
|
+
} | undefined;
|
|
1978
|
+
fallback_models?: (string | {
|
|
1979
|
+
model: string;
|
|
1980
|
+
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined;
|
|
1981
|
+
})[] | undefined;
|
|
1982
|
+
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined;
|
|
1983
|
+
} | undefined;
|
|
1984
|
+
} | undefined;
|
|
1985
|
+
sidekick?: {
|
|
1986
|
+
model?: string | undefined;
|
|
1987
|
+
variant?: string | undefined;
|
|
1988
|
+
fallback_models?: string | string[] | undefined;
|
|
1989
|
+
thinking_level?: "off" | "minimal" | "low" | "medium" | "high" | "xhigh" | "max" | undefined;
|
|
1990
|
+
} | undefined;
|
|
1991
|
+
}> | undefined;
|
|
1592
1992
|
historian?: {
|
|
1593
1993
|
two_pass: boolean;
|
|
1594
1994
|
disallowed_tools: ("*" | "read" | "aft_outline" | "aft_zoom" | "aft_search")[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"magic-context.d.ts","sourceRoot":"","sources":["../../../src/config/schema/magic-context.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,OAAO,KAAK,EACR,mBAAmB,EAEtB,MAAM,oDAAoD,CAAC;AAI5D,eAAO,MAAM,oCAAoC,KAAK,CAAC;AAIvD,eAAO,MAAM,6BAA6B,0OACiM,CAAC;AAC5O,eAAO,MAAM,4BAA4B,SAAU,CAAC;AACpD,eAAO,MAAM,iCAAiC,OAAO,CAAC;AAEtD,eAAO,MAAM,6BAA6B,4BAA4B,CAAC;AAMvE,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,mBAAmB,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhE;;;iEAGiE;AACjE,eAAO,MAAM,qBAAqB;;;;;;;;GAEnB,CAAC;AAChB,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,C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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqc/B,CAAC"}
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Transient SQLite contention (BUSY/LOCKED) is intentionally NOT handled here —
|
|
11
11
|
* those stay fail-open pass-through in the outer transform wrappers.
|
|
12
12
|
*/
|
|
13
|
-
import type { ProcessKind } from "../../shared/rpc-utils";
|
|
13
|
+
import type { ProcessKind, ProcessProbeEvidence } from "../../shared/rpc-utils";
|
|
14
14
|
export declare const FAIL_CLOSED_DOCTOR_COMMAND = "npx @cortexkit/magic-context@latest doctor";
|
|
15
15
|
/** How often a blocked transform pass re-attempts storage open (1 = every pass). */
|
|
16
16
|
export declare const FAIL_CLOSED_REPROBE_EVERY_N = 5;
|
|
@@ -21,7 +21,17 @@ export interface FailClosedBlockingProcess {
|
|
|
21
21
|
/** Legacy callers may still provide the old display label. */
|
|
22
22
|
harness?: string;
|
|
23
23
|
pid: number;
|
|
24
|
+
/** Epoch milliseconds from the process identity probe, when available. */
|
|
25
|
+
startTime?: number | null;
|
|
26
|
+
/** Raw command line from the process probe, when available. */
|
|
27
|
+
commandLine?: string | null;
|
|
24
28
|
}
|
|
29
|
+
/**
|
|
30
|
+
* Preserve the old enumerable blocker shape while carrying fresh probe details
|
|
31
|
+
* to the diagnostic formatter. This keeps legacy reason snapshots stable while
|
|
32
|
+
* still making the evidence available through normal property access.
|
|
33
|
+
*/
|
|
34
|
+
export declare function attachFailClosedBlockingProcessEvidence(process: FailClosedBlockingProcess, evidence: ProcessProbeEvidence): FailClosedBlockingProcess;
|
|
25
35
|
export type FailClosedReason = {
|
|
26
36
|
kind: "migration_guard";
|
|
27
37
|
persistedVersion: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fail-closed-block.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/fail-closed-block.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;
|
|
1
|
+
{"version":3,"file":"fail-closed-block.d.ts","sourceRoot":"","sources":["../../../src/features/magic-context/fail-closed-block.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,KAAK,EAAE,WAAW,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAEhF,eAAO,MAAM,0BAA0B,+CAA+C,CAAC;AAEvF,oFAAoF;AACpF,eAAO,MAAM,2BAA2B,IAAI,CAAC;AAE7C,MAAM,MAAM,qBAAqB,GAAG,WAAW,CAAC;AAEhD,MAAM,WAAW,yBAAyB;IACtC,gEAAgE;IAChE,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B,8DAA8D;IAC9D,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,CAAC;IACZ,0EAA0E;IAC1E,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,+D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"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type EmbeddingFailureClass = "substitution_rejected" | "http_error" | "transport_error" | "invalid_envelope" | "empty_result";
|
|
2
|
+
/** A classified remote-provider failure that can be surfaced to a caller safely. */
|
|
3
|
+
export interface EmbeddingFailure {
|
|
4
|
+
class: EmbeddingFailureClass;
|
|
5
|
+
/** Stable, user-facing diagnostic with only redacted response evidence. */
|
|
6
|
+
reason: string;
|
|
7
|
+
/** Whether the same configuration may plausibly succeed on another attempt. */
|
|
8
|
+
retryable: boolean;
|
|
9
|
+
}
|
|
10
|
+
export declare function dominantEmbeddingFailure(failures: readonly EmbeddingFailure[]): EmbeddingFailure | undefined;
|
|
11
|
+
//# sourceMappingURL=embedding-failure.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"embedding-failure.d.ts","sourceRoot":"","sources":["../../../../src/features/magic-context/memory/embedding-failure.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,qBAAqB,GAC3B,uBAAuB,GACvB,YAAY,GACZ,iBAAiB,GACjB,kBAAkB,GAClB,cAAc,CAAC;AAErB,oFAAoF;AACpF,MAAM,WAAW,gBAAgB;IAC7B,KAAK,EAAE,qBAAqB,CAAC;IAC7B,2EAA2E;IAC3E,MAAM,EAAE,MAAM,CAAC;IACf,+EAA+E;IAC/E,SAAS,EAAE,OAAO,CAAC;CACtB;AAED,wBAAgB,wBAAwB,CACpC,QAAQ,EAAE,SAAS,gBAAgB,EAAE,GACtC,gBAAgB,GAAG,SAAS,CAc9B"}
|