@dungle-scrubs/harness-cli-normalizer 0.1.2 → 0.3.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/README.md +144 -7
- package/dist/cli/args.d.ts +74 -0
- package/dist/cli/args.d.ts.map +1 -0
- package/dist/cli/args.js +339 -0
- package/dist/cli/args.js.map +1 -0
- package/dist/cli/check.d.ts +2 -0
- package/dist/cli/check.d.ts.map +1 -0
- package/dist/cli/check.js +110 -0
- package/dist/cli/check.js.map +1 -0
- package/dist/cli/exit-codes.d.ts +7 -0
- package/dist/cli/exit-codes.d.ts.map +1 -0
- package/dist/cli/exit-codes.js +11 -0
- package/dist/cli/exit-codes.js.map +1 -0
- package/dist/cli/help.d.ts +7 -0
- package/dist/cli/help.d.ts.map +1 -0
- package/dist/cli/help.js +110 -0
- package/dist/cli/help.js.map +1 -0
- package/dist/cli/index.d.ts +4 -0
- package/dist/cli/index.d.ts.map +1 -0
- package/dist/cli/index.js +170 -0
- package/dist/cli/index.js.map +1 -0
- package/dist/cli/inspect.d.ts +3 -0
- package/dist/cli/inspect.d.ts.map +1 -0
- package/dist/cli/inspect.js +170 -0
- package/dist/cli/inspect.js.map +1 -0
- package/dist/cli/ls.d.ts +2 -0
- package/dist/cli/ls.d.ts.map +1 -0
- package/dist/cli/ls.js +10 -0
- package/dist/cli/ls.js.map +1 -0
- package/dist/cli/render.d.ts +8 -0
- package/dist/cli/render.d.ts.map +1 -0
- package/dist/cli/render.js +55 -0
- package/dist/cli/render.js.map +1 -0
- package/dist/cli/resolve-harness.d.ts +4 -0
- package/dist/cli/resolve-harness.d.ts.map +1 -0
- package/dist/cli/resolve-harness.js +31 -0
- package/dist/cli/resolve-harness.js.map +1 -0
- package/dist/cli/run.d.ts +2 -0
- package/dist/cli/run.d.ts.map +1 -0
- package/dist/cli/run.js +280 -0
- package/dist/cli/run.js.map +1 -0
- package/dist/cli/session.d.ts +2 -0
- package/dist/cli/session.d.ts.map +1 -0
- package/dist/cli/session.js +128 -0
- package/dist/cli/session.js.map +1 -0
- package/dist/cli/version.d.ts +2 -0
- package/dist/cli/version.d.ts.map +1 -0
- package/dist/cli/version.js +34 -0
- package/dist/cli/version.js.map +1 -0
- package/dist/cli.js +2 -0
- package/dist/execution/decode.d.ts.map +1 -1
- package/dist/execution/decode.js +32 -0
- package/dist/execution/decode.js.map +1 -1
- package/dist/execution/deps.d.ts +7 -1
- package/dist/execution/deps.d.ts.map +1 -1
- package/dist/execution/events.d.ts +6 -2
- package/dist/execution/events.d.ts.map +1 -1
- package/dist/execution/events.js.map +1 -1
- package/dist/execution/failure.d.ts +45 -0
- package/dist/execution/failure.d.ts.map +1 -0
- package/dist/execution/failure.js +121 -0
- package/dist/execution/failure.js.map +1 -0
- package/dist/execution/node-deps.d.ts.map +1 -1
- package/dist/execution/node-deps.js +19 -0
- package/dist/execution/node-deps.js.map +1 -1
- package/dist/execution/stream-turn.d.ts +2 -0
- package/dist/execution/stream-turn.d.ts.map +1 -1
- package/dist/execution/stream-turn.js +181 -16
- package/dist/execution/stream-turn.js.map +1 -1
- package/dist/interpretation/argv.d.ts +16 -4
- package/dist/interpretation/argv.d.ts.map +1 -1
- package/dist/interpretation/argv.js +68 -19
- package/dist/interpretation/argv.js.map +1 -1
- package/dist/interpretation/dimensions.d.ts +0 -2
- package/dist/interpretation/dimensions.d.ts.map +1 -1
- package/dist/interpretation/dimensions.js +0 -2
- package/dist/interpretation/dimensions.js.map +1 -1
- package/dist/interpretation/limits.d.ts +10 -1
- package/dist/interpretation/limits.d.ts.map +1 -1
- package/dist/interpretation/limits.js +84 -5
- package/dist/interpretation/limits.js.map +1 -1
- package/dist/interpretation/refusal.d.ts +31 -0
- package/dist/interpretation/refusal.d.ts.map +1 -0
- package/dist/interpretation/refusal.js +87 -0
- package/dist/interpretation/refusal.js.map +1 -0
- package/dist/interpretation/turn-options.d.ts +18 -0
- package/dist/interpretation/turn-options.d.ts.map +1 -0
- package/dist/interpretation/turn-options.js +417 -0
- package/dist/interpretation/turn-options.js.map +1 -0
- package/dist/interpretation/vocabulary.d.ts +5 -0
- package/dist/interpretation/vocabulary.d.ts.map +1 -1
- package/dist/interpretation/vocabulary.js +1 -1
- package/dist/interpretation/vocabulary.js.map +1 -1
- package/dist/knowledge/claude-code.d.ts +13 -1
- package/dist/knowledge/claude-code.d.ts.map +1 -1
- package/dist/knowledge/claude-code.js +35 -13
- package/dist/knowledge/claude-code.js.map +1 -1
- package/dist/knowledge/codex.d.ts.map +1 -1
- package/dist/knowledge/codex.js +25 -14
- package/dist/knowledge/codex.js.map +1 -1
- package/dist/knowledge/descriptor.d.ts +118 -14
- package/dist/knowledge/descriptor.d.ts.map +1 -1
- package/dist/knowledge/descriptor.js +58 -0
- package/dist/knowledge/descriptor.js.map +1 -1
- package/dist/knowledge/matchers.d.ts +3 -3
- package/dist/knowledge/matchers.d.ts.map +1 -1
- package/dist/knowledge/matchers.js +19 -6
- package/dist/knowledge/matchers.js.map +1 -1
- package/dist/knowledge/muse.d.ts +2 -2
- package/dist/knowledge/muse.d.ts.map +1 -1
- package/dist/knowledge/muse.js +22 -6
- package/dist/knowledge/muse.js.map +1 -1
- package/dist/knowledge/overrides.d.ts +7 -0
- package/dist/knowledge/overrides.d.ts.map +1 -1
- package/dist/knowledge/overrides.js +76 -0
- package/dist/knowledge/overrides.js.map +1 -1
- package/dist/knowledge/pi.d.ts.map +1 -1
- package/dist/knowledge/pi.js +25 -3
- package/dist/knowledge/pi.js.map +1 -1
- package/package.json +5 -2
- package/src/cli/args.ts +381 -0
- package/src/cli/check.ts +136 -0
- package/src/cli/exit-codes.ts +13 -0
- package/src/cli/help.ts +114 -0
- package/src/cli/index.ts +177 -0
- package/src/cli/inspect.ts +174 -0
- package/src/cli/ls.ts +14 -0
- package/src/cli/render.ts +62 -0
- package/src/cli/resolve-harness.ts +33 -0
- package/src/cli/run.ts +280 -0
- package/src/cli/session.ts +137 -0
- package/src/cli/version.ts +32 -0
- package/src/execution/decode.ts +32 -0
- package/src/execution/deps.ts +7 -1
- package/src/execution/events.ts +9 -2
- package/src/execution/failure.ts +159 -0
- package/src/execution/node-deps.ts +17 -0
- package/src/execution/stream-turn.ts +189 -17
- package/src/interpretation/argv.ts +85 -27
- package/src/interpretation/dimensions.ts +0 -6
- package/src/interpretation/limits.ts +97 -6
- package/src/interpretation/refusal.ts +116 -0
- package/src/interpretation/turn-options.ts +424 -0
- package/src/interpretation/vocabulary.ts +1 -1
- package/src/knowledge/claude-code.ts +35 -13
- package/src/knowledge/codex.ts +25 -14
- package/src/knowledge/descriptor.ts +138 -12
- package/src/knowledge/matchers.ts +22 -9
- package/src/knowledge/muse.ts +22 -6
- package/src/knowledge/overrides.ts +97 -0
- package/src/knowledge/pi.ts +25 -3
package/dist/knowledge/codex.js
CHANGED
|
@@ -13,13 +13,13 @@ export const codexCli = deepFreeze({
|
|
|
13
13
|
versionSource: { kind: "npm", package: "@openai/codex" },
|
|
14
14
|
launch: {
|
|
15
15
|
// exec --json emits structured item events; without --json, identity
|
|
16
|
-
// discovery is blind (v1: requiredArgument "--json").
|
|
17
|
-
// is v1's proven spawn shape - codex's built-in default is read-only,
|
|
18
|
-
// under which a non-autonomy turn cannot write files.
|
|
16
|
+
// discovery is blind (v1: requiredArgument "--json").
|
|
19
17
|
// --skip-git-repo-check: codex exec refuses to run outside a trusted
|
|
20
18
|
// git dir without it (verified 0.147.0). cwd targeting is the spawner's
|
|
21
19
|
// job (spawn opts.cwd), not descriptor data.
|
|
22
|
-
|
|
20
|
+
// Sandbox is now per-call via turnOptions.sandbox with default
|
|
21
|
+
// workspace-write, not a hardcoded base flag.
|
|
22
|
+
baseFlags: ["exec", "--json", "--skip-git-repo-check"],
|
|
23
23
|
subcommands: ["exec"],
|
|
24
24
|
promptStyle: "positional",
|
|
25
25
|
toolsFlag: null,
|
|
@@ -53,24 +53,24 @@ export const codexCli = deepFreeze({
|
|
|
53
53
|
announce: { match: { type: "thread.started" }, idField: "thread_id" },
|
|
54
54
|
},
|
|
55
55
|
limitMatchers: [...SHARED_LIMIT_MATCHERS],
|
|
56
|
-
authMatchers: [
|
|
56
|
+
authMatchers: [
|
|
57
|
+
{ pattern: "run codex login", flags: "i", kind: "not-logged-in" },
|
|
58
|
+
...SHARED_AUTH_MATCHERS,
|
|
59
|
+
],
|
|
57
60
|
// Accepted by codex 0.147.0 as a hidden alias (not in --help).
|
|
58
61
|
autonomy: { flag: "--yolo" },
|
|
59
62
|
vocabulary: {
|
|
60
63
|
modelFlag: "--model",
|
|
61
64
|
models: ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5"],
|
|
62
65
|
aliases: {},
|
|
63
|
-
efforts: ["minimal", "low", "medium", "high", "xhigh", "max"
|
|
66
|
+
efforts: ["minimal", "low", "medium", "high", "xhigh", "max"],
|
|
64
67
|
// Codex constrains ladders per model generation (v1 registry).
|
|
65
68
|
effortsByModel: {
|
|
66
69
|
"gpt-5.5": ["minimal", "low", "medium", "high"],
|
|
67
|
-
"gpt-5.6-sol": ["medium", "high", "xhigh", "max"
|
|
68
|
-
"gpt-5.6-terra": ["medium", "high", "xhigh", "max"
|
|
69
|
-
"gpt-5.6-luna": ["medium", "high", "xhigh", "max"
|
|
70
|
+
"gpt-5.6-sol": ["medium", "high", "xhigh", "max"],
|
|
71
|
+
"gpt-5.6-terra": ["medium", "high", "xhigh", "max"],
|
|
72
|
+
"gpt-5.6-luna": ["medium", "high", "xhigh", "max"],
|
|
70
73
|
},
|
|
71
|
-
// Reasoning effort is a config key (-c model_reasoning_effort=...), not
|
|
72
|
-
// a plain flag; argv-level insertion has no spelling to use.
|
|
73
|
-
effortFlag: null,
|
|
74
74
|
extensible: false,
|
|
75
75
|
},
|
|
76
76
|
store: {
|
|
@@ -83,12 +83,10 @@ export const codexCli = deepFreeze({
|
|
|
83
83
|
contextHook: null,
|
|
84
84
|
// Valid only in the `exec resume` context: `codex exec resume --last`.
|
|
85
85
|
resumeLast: { flag: "--last" },
|
|
86
|
-
provider: null,
|
|
87
86
|
// codex exec appends piped stdin as a <stdin> block and can block on an
|
|
88
87
|
// open stdin - close it (verified 0.147.0: "Reading additional input
|
|
89
88
|
// from stdin...").
|
|
90
89
|
stdin: "close-required",
|
|
91
|
-
discoveryDisableFlags: [],
|
|
92
90
|
presence: {
|
|
93
91
|
headlessMarkers: ["exec"],
|
|
94
92
|
},
|
|
@@ -102,5 +100,18 @@ export const codexCli = deepFreeze({
|
|
|
102
100
|
},
|
|
103
101
|
session: false,
|
|
104
102
|
},
|
|
103
|
+
turnOptions: {
|
|
104
|
+
effort: {
|
|
105
|
+
kind: "effort",
|
|
106
|
+
render: { kind: "config-kv", flag: "-c", key: "model_reasoning_effort" },
|
|
107
|
+
},
|
|
108
|
+
sandbox: {
|
|
109
|
+
kind: "enum",
|
|
110
|
+
values: ["read-only", "workspace-write", "danger-full-access"],
|
|
111
|
+
default: "workspace-write",
|
|
112
|
+
render: { kind: "flag-value", flag: "--sandbox" },
|
|
113
|
+
resumeRender: null,
|
|
114
|
+
},
|
|
115
|
+
},
|
|
105
116
|
});
|
|
106
117
|
//# sourceMappingURL=codex.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codex.js","sourceRoot":"","sources":["../../src/knowledge/codex.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,UAAU,EAA0B,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE5E,MAAM,CAAC,MAAM,QAAQ,GAAsB,UAAU,CAAC;IACpD,IAAI,EAAE,OAAO;IACb,GAAG,EAAE,OAAO;IACZ,eAAe,EAAE,SAAS;IAC1B,aAAa,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,eAAe,EAAE;IACxD,MAAM,EAAE;QACN,qEAAqE;QACrE,
|
|
1
|
+
{"version":3,"file":"codex.js","sourceRoot":"","sources":["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AQ,EAAE;QACR,eAAe,EAAE,CAAC,MAAM,CAAC;KAC1B;IACD,YAAY,EAAE;QACZ,MAAM,EAAE,IAAI;QACZ,MAAM,EAAE,IAAI;QACZ,eAAe,EAAE;YACf,eAAe,EAAE,SAAS;YAC1B,kBAAkB,EAAE,MAAM;YAC1B,WAAW,EAAE,MAAM;SACpB;QACD,OAAO,EAAE,KAAK;KACf;IACD,WAAW,EAAE;QACX,MAAM,EAAE;YACN,IAAI,EAAE,QAAQ;YACd,MAAM,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,GAAG,EAAE,wBAAwB,EAAE;SACzE;QACD,OAAO,EAAE;YACP,IAAI,EAAE,MAAM;YACZ,MAAM,EAAE,CAAC,WAAW,EAAE,iBAAiB,EAAE,oBAAoB,CAAC;YAC9D,OAAO,EAAE,iBAAiB;YAC1B,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,WAAW,EAAE;YACjD,YAAY,EAAE,IAAI;SACnB;KACF;CACF,CAAC,CAAC"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Descriptor types: the shape of what is KNOWN about a harness CLI, as pure
|
|
3
3
|
* data. Interpretation functions consume these; nothing here executes.
|
|
4
|
+
*
|
|
5
|
+
* Turn option keys and discovery facets use a closed vocabulary for the same
|
|
6
|
+
* reason `LimitCode` does: a descriptor must not invent an option a consumer
|
|
7
|
+
* has no field for. Every `TurnOptionKey` maps to a field on `TurnOptions`
|
|
8
|
+
* and every `DiscoveryFacet` maps to a field on `DiscoveryOptions`; adding
|
|
9
|
+
* a key without a consumer arm would be dead data that can only drift.
|
|
4
10
|
*/
|
|
5
11
|
export declare const HARNESS_NAMES: readonly ["claude", "codex", "pi", "muse"];
|
|
6
12
|
export type HarnessName = (typeof HARNESS_NAMES)[number];
|
|
@@ -20,11 +26,114 @@ export interface SessionInputContract {
|
|
|
20
26
|
/** Consumers branch on these (session-limit: wait for reset; weekly-limit:
|
|
21
27
|
* route elsewhere), so the vocabulary is closed - a descriptor cannot invent
|
|
22
28
|
* a code a consumer has no arm for. */
|
|
23
|
-
export type LimitCode = "usage-limit" | "session-limit" | "weekly-limit" | "credits" | "quota";
|
|
29
|
+
export type LimitCode = "usage-limit" | "session-limit" | "weekly-limit" | "credits" | "quota" | "rate-limit";
|
|
24
30
|
/** Auth walls are separate from usage limits because the remedy is entirely
|
|
25
31
|
* different (re-auth vs wait), and a detached process misreading one as the
|
|
26
32
|
* other sends the human to fix the wrong thing. */
|
|
27
33
|
export type AuthFailureKind = "not-logged-in" | "expired" | "invalid-key";
|
|
34
|
+
/** Serializable wall matcher: pattern and flags are data, not a RegExp
|
|
35
|
+
* literal, so an override file can extend them. `compileMatchers` turns
|
|
36
|
+
* these into RegExps with bounds (pattern length, count, allowed flags)
|
|
37
|
+
* and a WeakMap cache so the same array instance reuses compiled RegExps.
|
|
38
|
+
* The input window (first 4096 chars of a line), not pattern analysis, is
|
|
39
|
+
* the backtracking bound. */
|
|
40
|
+
export interface LimitMatcher {
|
|
41
|
+
readonly pattern: string;
|
|
42
|
+
readonly flags?: string;
|
|
43
|
+
readonly code: LimitCode;
|
|
44
|
+
}
|
|
45
|
+
export interface AuthMatcher {
|
|
46
|
+
readonly pattern: string;
|
|
47
|
+
readonly flags?: string;
|
|
48
|
+
readonly kind: AuthFailureKind;
|
|
49
|
+
}
|
|
50
|
+
/** The turn-option vocabulary is closed for the same reason `LimitCode` is:
|
|
51
|
+
* a descriptor must not invent an option a consumer has no field for. Every
|
|
52
|
+
* key here maps to a field on `TurnOptions`; adding a key without a consumer
|
|
53
|
+
* arm would be dead data that can only drift. Render order is the tuple
|
|
54
|
+
* order, so argv is deterministic regardless of caller field order. */
|
|
55
|
+
export declare const TURN_OPTION_KEYS: readonly ["effort", "sandbox", "provider", "discovery", "write", "shell", "maxSteps"];
|
|
56
|
+
export type TurnOptionKey = (typeof TURN_OPTION_KEYS)[number];
|
|
57
|
+
/** Discovery facets are closed for the same reason as `TurnOptionKey`: each
|
|
58
|
+
* maps to a field on `DiscoveryOptions` and a concrete flag spelling per
|
|
59
|
+
* harness. A harness that cannot express a facet simply omits it from its
|
|
60
|
+
* `turnOptions.discovery.facets` table; a call passing that facet must
|
|
61
|
+
* refuse. */
|
|
62
|
+
export declare const DISCOVERY_FACETS: readonly ["tools", "instructionFiles", "extensions", "skills"];
|
|
63
|
+
export type DiscoveryFacet = (typeof DISCOVERY_FACETS)[number];
|
|
64
|
+
export type OptionRender =
|
|
65
|
+
/** `--flag <value>` */
|
|
66
|
+
{
|
|
67
|
+
readonly kind: "flag-value";
|
|
68
|
+
readonly flag: string;
|
|
69
|
+
}
|
|
70
|
+
/** `-c key=value` - codex's config-override grammar. Permitted only for
|
|
71
|
+
* closed-vocabulary specs, so no value can need escaping. */
|
|
72
|
+
| {
|
|
73
|
+
readonly kind: "config-kv";
|
|
74
|
+
readonly flag: string;
|
|
75
|
+
readonly key: string;
|
|
76
|
+
}
|
|
77
|
+
/** A fixed multi-token flag set emitted verbatim, value-less. */
|
|
78
|
+
| {
|
|
79
|
+
readonly kind: "flag-list";
|
|
80
|
+
readonly flags: readonly string[];
|
|
81
|
+
};
|
|
82
|
+
export interface SpecBase {
|
|
83
|
+
readonly render: OptionRender;
|
|
84
|
+
/** The spelling the RESUME grammar accepts. Omitted means "same as
|
|
85
|
+
* `render`"; an explicit `null` declares the option unexpressible on
|
|
86
|
+
* resume, and building a resume argv with it must refuse. */
|
|
87
|
+
readonly resumeRender?: OptionRender | null;
|
|
88
|
+
}
|
|
89
|
+
export type TurnOptionSpec =
|
|
90
|
+
/** Closed value vocabulary. `default` renders on LAUNCH ONLY. */
|
|
91
|
+
(SpecBase & {
|
|
92
|
+
readonly kind: "enum";
|
|
93
|
+
readonly values: readonly string[];
|
|
94
|
+
readonly default?: string;
|
|
95
|
+
})
|
|
96
|
+
/** Ladder comes from vocabulary.efforts / effortsByModel, not from here. */
|
|
97
|
+
| (SpecBase & {
|
|
98
|
+
readonly kind: "effort";
|
|
99
|
+
})
|
|
100
|
+
/** Open selector, CLEAN_SELECTOR-validated. */
|
|
101
|
+
| (SpecBase & {
|
|
102
|
+
readonly kind: "selector";
|
|
103
|
+
})
|
|
104
|
+
/** `polarity: "disables"` emits the render when the caller asks for FALSE. */
|
|
105
|
+
| (SpecBase & {
|
|
106
|
+
readonly kind: "toggle";
|
|
107
|
+
readonly polarity: "enables" | "disables";
|
|
108
|
+
}) | (SpecBase & {
|
|
109
|
+
readonly kind: "integer";
|
|
110
|
+
readonly min: number;
|
|
111
|
+
readonly max: number;
|
|
112
|
+
})
|
|
113
|
+
/** Per-facet toggles; a facet absent from the table cannot be expressed. */
|
|
114
|
+
| {
|
|
115
|
+
readonly kind: "discovery";
|
|
116
|
+
readonly facets: Readonly<Partial<Record<DiscoveryFacet, SpecBase & {
|
|
117
|
+
readonly polarity: "enables" | "disables";
|
|
118
|
+
}>>>;
|
|
119
|
+
};
|
|
120
|
+
/** Resolve the effective render for a spec at a given phase.
|
|
121
|
+
* - `launch` always uses `render`.
|
|
122
|
+
* - `resume` with `resumeRender: null` is unexpressible (returns null).
|
|
123
|
+
* - `resume` with `resumeRender` omitted resolves to the same render as `render`.
|
|
124
|
+
* - `resume` with an explicit `resumeRender` uses that spelling.
|
|
125
|
+
* Discovery facets use the same rule per facet; this helper works for any
|
|
126
|
+
* `SpecBase` (top-level specs and per-facet specs alike). */
|
|
127
|
+
export declare const resolveRender: (spec: SpecBase, phase: "launch" | "resume") => OptionRender | null;
|
|
128
|
+
/** Alias for `resolveRender` with the resume-only null semantics made
|
|
129
|
+
* explicit in the name; useful for tests asserting the "omitted => same as
|
|
130
|
+
* render, null => unexpressible" contract. */
|
|
131
|
+
export declare const resolveResumeRender: (spec: SpecBase) => OptionRender | null;
|
|
132
|
+
/** Like `resolveRender` but for a `TurnOptionSpec` that may be a `discovery`
|
|
133
|
+
* table. Returns null for an unexpressible resume, the spec's render for
|
|
134
|
+
* non-discovery specs, and for discovery returns the spec itself (facets are
|
|
135
|
+
* resolved per-facet via `resolveRender`). */
|
|
136
|
+
export declare const getOptionRender: (spec: TurnOptionSpec, phase: "launch" | "resume") => OptionRender | null;
|
|
28
137
|
export interface HarnessDescriptor {
|
|
29
138
|
readonly name: HarnessName;
|
|
30
139
|
readonly bin: string;
|
|
@@ -134,9 +243,9 @@ export interface HarnessDescriptor {
|
|
|
134
243
|
};
|
|
135
244
|
/** "Stopped on a limit" vs crash vs clean exit: the harness's own wall
|
|
136
245
|
* phrasings. First match wins per line. */
|
|
137
|
-
readonly limitMatchers: ReadonlyArray<
|
|
246
|
+
readonly limitMatchers: ReadonlyArray<LimitMatcher>;
|
|
138
247
|
/** Auth-wall phrasings, same scan discipline as limitMatchers. */
|
|
139
|
-
readonly authMatchers: ReadonlyArray<
|
|
248
|
+
readonly authMatchers: ReadonlyArray<AuthMatcher>;
|
|
140
249
|
/** The "run unattended without stops" flag, or null when the harness has
|
|
141
250
|
* no such mode. */
|
|
142
251
|
readonly autonomy: {
|
|
@@ -144,9 +253,7 @@ export interface HarnessDescriptor {
|
|
|
144
253
|
} | null;
|
|
145
254
|
/** The harness's own model-id spellings, alias map, and effort ladder.
|
|
146
255
|
* Curated baseline - pi's registry is runtime-extensible, so validation
|
|
147
|
-
* against this vocabulary is a default, not a final word (D-008).
|
|
148
|
-
* `effortFlag` is null where effort is not a launch-time flag (claude:
|
|
149
|
-
* effort is an in-session command, not argv). */
|
|
256
|
+
* against this vocabulary is a default, not a final word (D-008). */
|
|
150
257
|
readonly vocabulary: {
|
|
151
258
|
readonly modelFlag: string;
|
|
152
259
|
readonly models: readonly string[];
|
|
@@ -156,7 +263,6 @@ export interface HarnessDescriptor {
|
|
|
156
263
|
* gpt-5.5 tops out at high; gpt-5.6-* starts at medium). Falls back to
|
|
157
264
|
* the harness-wide `efforts`. */
|
|
158
265
|
readonly effortsByModel?: Readonly<Record<string, readonly string[]>>;
|
|
159
|
-
readonly effortFlag: string | null;
|
|
160
266
|
/** D-008: an extensible vocabulary (pi) accepts clean unknown model
|
|
161
267
|
* selectors at argv time; capability claims for them degrade to
|
|
162
268
|
* unknown until runtime verification. */
|
|
@@ -181,16 +287,9 @@ export interface HarnessDescriptor {
|
|
|
181
287
|
readonly resumeLast: {
|
|
182
288
|
readonly flag: string;
|
|
183
289
|
} | null;
|
|
184
|
-
/** Provider/model-route flag where present (pi --provider). */
|
|
185
|
-
readonly provider: {
|
|
186
|
-
readonly flag: string;
|
|
187
|
-
} | null;
|
|
188
290
|
/** Whether backgrounded headless calls must have stdin closed (pi hangs
|
|
189
291
|
* without `< /dev/null`). */
|
|
190
292
|
readonly stdin: "inherit" | "close-required";
|
|
191
|
-
/** Flags that disable instruction-file/skill/MCP auto-discovery, in the
|
|
192
|
-
* spelling the harness accepts. */
|
|
193
|
-
readonly discoveryDisableFlags: readonly string[];
|
|
194
293
|
/** Presence recognition: how an interactive process for a session id shows
|
|
195
294
|
* up in a process listing. `headlessMarkers` mark a process as headless
|
|
196
295
|
* (not interactive presence). Known blind spot, inherent to argv matching:
|
|
@@ -207,5 +306,10 @@ export interface HarnessDescriptor {
|
|
|
207
306
|
readonly streamingByMode: Readonly<Record<HarnessMode, StreamingGranularity>>;
|
|
208
307
|
readonly session: boolean;
|
|
209
308
|
};
|
|
309
|
+
/** Per-call turn options this harness can express, keyed by the closed
|
|
310
|
+
* `TurnOptionKey` vocabulary. Absent keys are unexpressible on this
|
|
311
|
+
* harness; a call passing them must refuse. Discovery is a table of
|
|
312
|
+
* per-facet specs rather than a single flag. */
|
|
313
|
+
readonly turnOptions: Readonly<Partial<Record<TurnOptionKey, TurnOptionSpec>>>;
|
|
210
314
|
}
|
|
211
315
|
//# sourceMappingURL=descriptor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptor.d.ts","sourceRoot":"","sources":["../../src/knowledge/descriptor.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"descriptor.d.ts","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aAAa,EAAE,cAAc,CAAC,CAAC,CAAC,CAAC;CAChF"}
|
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Descriptor types: the shape of what is KNOWN about a harness CLI, as pure
|
|
3
3
|
* data. Interpretation functions consume these; nothing here executes.
|
|
4
|
+
*
|
|
5
|
+
* Turn option keys and discovery facets use a closed vocabulary for the same
|
|
6
|
+
* reason `LimitCode` does: a descriptor must not invent an option a consumer
|
|
7
|
+
* has no field for. Every `TurnOptionKey` maps to a field on `TurnOptions`
|
|
8
|
+
* and every `DiscoveryFacet` maps to a field on `DiscoveryOptions`; adding
|
|
9
|
+
* a key without a consumer arm would be dead data that can only drift.
|
|
4
10
|
*/
|
|
5
11
|
export const HARNESS_NAMES = ["claude", "codex", "pi", "muse"];
|
|
6
12
|
/** Descriptors are process-wide defaults shared by reference into merged
|
|
@@ -17,4 +23,56 @@ export const deepFreeze = (value) => {
|
|
|
17
23
|
return value;
|
|
18
24
|
};
|
|
19
25
|
export const SESSION_INPUT_KINDS = ["claude-sdk-user-message"];
|
|
26
|
+
/** The turn-option vocabulary is closed for the same reason `LimitCode` is:
|
|
27
|
+
* a descriptor must not invent an option a consumer has no field for. Every
|
|
28
|
+
* key here maps to a field on `TurnOptions`; adding a key without a consumer
|
|
29
|
+
* arm would be dead data that can only drift. Render order is the tuple
|
|
30
|
+
* order, so argv is deterministic regardless of caller field order. */
|
|
31
|
+
export const TURN_OPTION_KEYS = deepFreeze([
|
|
32
|
+
"effort",
|
|
33
|
+
"sandbox",
|
|
34
|
+
"provider",
|
|
35
|
+
"discovery",
|
|
36
|
+
"write",
|
|
37
|
+
"shell",
|
|
38
|
+
"maxSteps",
|
|
39
|
+
]);
|
|
40
|
+
/** Discovery facets are closed for the same reason as `TurnOptionKey`: each
|
|
41
|
+
* maps to a field on `DiscoveryOptions` and a concrete flag spelling per
|
|
42
|
+
* harness. A harness that cannot express a facet simply omits it from its
|
|
43
|
+
* `turnOptions.discovery.facets` table; a call passing that facet must
|
|
44
|
+
* refuse. */
|
|
45
|
+
export const DISCOVERY_FACETS = deepFreeze([
|
|
46
|
+
"tools",
|
|
47
|
+
"instructionFiles",
|
|
48
|
+
"extensions",
|
|
49
|
+
"skills",
|
|
50
|
+
]);
|
|
51
|
+
/** Resolve the effective render for a spec at a given phase.
|
|
52
|
+
* - `launch` always uses `render`.
|
|
53
|
+
* - `resume` with `resumeRender: null` is unexpressible (returns null).
|
|
54
|
+
* - `resume` with `resumeRender` omitted resolves to the same render as `render`.
|
|
55
|
+
* - `resume` with an explicit `resumeRender` uses that spelling.
|
|
56
|
+
* Discovery facets use the same rule per facet; this helper works for any
|
|
57
|
+
* `SpecBase` (top-level specs and per-facet specs alike). */
|
|
58
|
+
export const resolveRender = (spec, phase) => {
|
|
59
|
+
if (phase === "launch")
|
|
60
|
+
return spec.render;
|
|
61
|
+
if (spec.resumeRender === null)
|
|
62
|
+
return null;
|
|
63
|
+
return spec.resumeRender ?? spec.render;
|
|
64
|
+
};
|
|
65
|
+
/** Alias for `resolveRender` with the resume-only null semantics made
|
|
66
|
+
* explicit in the name; useful for tests asserting the "omitted => same as
|
|
67
|
+
* render, null => unexpressible" contract. */
|
|
68
|
+
export const resolveResumeRender = (spec) => resolveRender(spec, "resume");
|
|
69
|
+
/** Like `resolveRender` but for a `TurnOptionSpec` that may be a `discovery`
|
|
70
|
+
* table. Returns null for an unexpressible resume, the spec's render for
|
|
71
|
+
* non-discovery specs, and for discovery returns the spec itself (facets are
|
|
72
|
+
* resolved per-facet via `resolveRender`). */
|
|
73
|
+
export const getOptionRender = (spec, phase) => {
|
|
74
|
+
if (spec.kind === "discovery")
|
|
75
|
+
return null;
|
|
76
|
+
return resolveRender(spec, phase);
|
|
77
|
+
};
|
|
20
78
|
//# sourceMappingURL=descriptor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptor.js","sourceRoot":"","sources":["../../src/knowledge/descriptor.ts"],"names":[],"mappings":"AAAA
|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O,IAAI,CAAC,YAAY,IAAI,IAAI,CAAC,MAAM,CAAC;AAC1C,CAAC,CAAC;AAEF;;8CAE8C;AAC9C,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC,IAAc,EAAuB,EAAE,CACzE,aAAa,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;AAEhC;;;8CAG8C;AAC9C,MAAM,CAAC,MAAM,eAAe,GAAG,CAC7B,IAAoB,EACpB,KAA0B,EACL,EAAE;IACvB,IAAI,IAAI,CAAC,IAAI,KAAK,WAAW;QAAE,OAAO,IAAI,CAAC;IAC3C,OAAO,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,CAAC;AACpC,CAAC,CAAC"}
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* or a provider 401 must classify no matter which CLI printed it. Each
|
|
5
5
|
* descriptor spreads these after its harness-specific phrasings.
|
|
6
6
|
*/
|
|
7
|
-
import type {
|
|
8
|
-
export declare const SHARED_LIMIT_MATCHERS: ReadonlyArray<
|
|
9
|
-
export declare const SHARED_AUTH_MATCHERS: ReadonlyArray<
|
|
7
|
+
import type { AuthMatcher, LimitMatcher } from "./descriptor.js";
|
|
8
|
+
export declare const SHARED_LIMIT_MATCHERS: ReadonlyArray<LimitMatcher>;
|
|
9
|
+
export declare const SHARED_AUTH_MATCHERS: ReadonlyArray<AuthMatcher>;
|
|
10
10
|
//# sourceMappingURL=matchers.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchers.d.ts","sourceRoot":"","sources":["../../src/knowledge/matchers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"matchers.d.ts","sourceRoot":"","sources":["../../src/knowledge/matchers.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAEjE,eAAO,MAAM,qBAAqB,EAAE,aAAa,CAAC,YAAY,CAkB7D,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,aAAa,CAAC,WAAW,CAG3D,CAAC"}
|
|
@@ -1,11 +1,24 @@
|
|
|
1
1
|
export const SHARED_LIMIT_MATCHERS = [
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
2
|
+
{ pattern: "you'?ve hit your usage limit", flags: "i", code: "usage-limit" },
|
|
3
|
+
{ pattern: "usage limit (?:reached|exceeded)", flags: "i", code: "usage-limit" },
|
|
4
|
+
{
|
|
5
|
+
pattern: "purchase more credits|insufficient credits|out of credits",
|
|
6
|
+
flags: "i",
|
|
7
|
+
code: "credits",
|
|
8
|
+
},
|
|
9
|
+
{
|
|
10
|
+
pattern: "resource_exhausted|quota exceeded|exceeded your current quota",
|
|
11
|
+
flags: "i",
|
|
12
|
+
code: "quota",
|
|
13
|
+
},
|
|
14
|
+
// Rate-limit patterns are last so a line with both a usage wall and a 429 keeps usage-limit (first-match-wins, documented cost)
|
|
15
|
+
{ pattern: "429", flags: "i", code: "rate-limit" },
|
|
16
|
+
{ pattern: "Too Many Requests", flags: "i", code: "rate-limit" },
|
|
17
|
+
{ pattern: "rate limit(?:ed|ing)?", flags: "i", code: "rate-limit" },
|
|
18
|
+
{ pattern: "Retry-After", flags: "i", code: "rate-limit" },
|
|
6
19
|
];
|
|
7
20
|
export const SHARED_AUTH_MATCHERS = [
|
|
8
|
-
|
|
9
|
-
|
|
21
|
+
{ pattern: "401 unauthorized", flags: "i", kind: "expired" },
|
|
22
|
+
{ pattern: "invalid api key", flags: "i", kind: "invalid-key" },
|
|
10
23
|
];
|
|
11
24
|
//# sourceMappingURL=matchers.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchers.js","sourceRoot":"","sources":["../../src/knowledge/matchers.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,qBAAqB,
|
|
1
|
+
{"version":3,"file":"matchers.js","sourceRoot":"","sources":["../../src/knowledge/matchers.ts"],"names":[],"mappings":"AAQA,MAAM,CAAC,MAAM,qBAAqB,GAAgC;IAChE,EAAE,OAAO,EAAE,8BAA8B,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,aAAa,EAAE;IAC5E,EAAE,OAAO,EAAE,kCAAkC,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,aAAa,EAAE;IAChF;QACE,OAAO,EAAE,2DAA2D;QACpE,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,SAAS;KAChB;IACD;QACE,OAAO,EAAE,+DAA+D;QACxE,KAAK,EAAE,GAAG;QACV,IAAI,EAAE,OAAO;KACd;IACD,gIAAgI;IAChI,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE;IAClD,EAAE,OAAO,EAAE,mBAAmB,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE;IAChE,EAAE,OAAO,EAAE,uBAAuB,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE;IACpE,EAAE,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,YAAY,EAAE;CAC3D,CAAC;AAEF,MAAM,CAAC,MAAM,oBAAoB,GAA+B;IAC9D,EAAE,OAAO,EAAE,kBAAkB,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE;IAC5D,EAAE,OAAO,EAAE,iBAAiB,EAAE,KAAK,EAAE,GAAG,EAAE,IAAI,EAAE,aAAa,EAAE;CAChE,CAAC"}
|
package/dist/knowledge/muse.d.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* (D-003). The v1 scars this encodes: headless re-entry is `muse exec
|
|
5
5
|
* --session-id <id>` (the positional `muse resume <id>` is the INTERACTIVE
|
|
6
6
|
* picker - recognized when pasted, never built), and `muse exec` exits 0
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* on task failure but 1 on step exhaustion (verified 0.1.0 - see spike
|
|
8
|
+
* report A-003 for `budget` vs `task` split).
|
|
9
9
|
*/
|
|
10
10
|
import { type HarnessDescriptor } from "./descriptor.js";
|
|
11
11
|
export declare const museCode: HarnessDescriptor;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"muse.d.ts","sourceRoot":"","sources":["../../src/knowledge/muse.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAc,KAAK,iBAAiB,EAAc,MAAM,iBAAiB,CAAC;AAGjF,eAAO,MAAM,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"muse.d.ts","sourceRoot":"","sources":["../../src/knowledge/muse.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAc,KAAK,iBAAiB,EAAc,MAAM,iBAAiB,CAAC;AAGjF,eAAO,MAAM,QAAQ,EAAE,iBAiGrB,CAAC"}
|
package/dist/knowledge/muse.js
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* (D-003). The v1 scars this encodes: headless re-entry is `muse exec
|
|
5
5
|
* --session-id <id>` (the positional `muse resume <id>` is the INTERACTIVE
|
|
6
6
|
* picker - recognized when pasted, never built), and `muse exec` exits 0
|
|
7
|
-
*
|
|
8
|
-
*
|
|
7
|
+
* on task failure but 1 on step exhaustion (verified 0.1.0 - see spike
|
|
8
|
+
* report A-003 for `budget` vs `task` split).
|
|
9
9
|
*/
|
|
10
10
|
import { deepFreeze, UUID_SHAPE } from "./descriptor.js";
|
|
11
11
|
import { SHARED_AUTH_MATCHERS, SHARED_LIMIT_MATCHERS } from "./matchers.js";
|
|
@@ -58,8 +58,7 @@ export const museCode = deepFreeze({
|
|
|
58
58
|
modelFlag: "--model",
|
|
59
59
|
models: ["muse-spark-1.2-contributor", "muse-spark-1.2", "muse-spark-1.1"],
|
|
60
60
|
aliases: {},
|
|
61
|
-
efforts: ["none", "minimal", "low", "medium", "high", "xhigh"
|
|
62
|
-
effortFlag: "--reasoning-effort",
|
|
61
|
+
efforts: ["none", "minimal", "low", "medium", "high", "xhigh"],
|
|
63
62
|
extensible: false,
|
|
64
63
|
},
|
|
65
64
|
store: {
|
|
@@ -72,9 +71,7 @@ export const museCode = deepFreeze({
|
|
|
72
71
|
contextHook: null,
|
|
73
72
|
// `muse resume --last` exists (muse resume --help).
|
|
74
73
|
resumeLast: { flag: "--last" },
|
|
75
|
-
provider: null,
|
|
76
74
|
stdin: "inherit",
|
|
77
|
-
discoveryDisableFlags: [],
|
|
78
75
|
presence: {
|
|
79
76
|
headlessMarkers: ["exec"],
|
|
80
77
|
},
|
|
@@ -90,5 +87,24 @@ export const museCode = deepFreeze({
|
|
|
90
87
|
},
|
|
91
88
|
session: false,
|
|
92
89
|
},
|
|
90
|
+
turnOptions: {
|
|
91
|
+
effort: { kind: "effort", render: { kind: "flag-value", flag: "--reasoning-effort" } },
|
|
92
|
+
write: {
|
|
93
|
+
kind: "toggle",
|
|
94
|
+
polarity: "disables",
|
|
95
|
+
render: { kind: "flag-list", flags: ["--disable-write"] },
|
|
96
|
+
},
|
|
97
|
+
shell: {
|
|
98
|
+
kind: "toggle",
|
|
99
|
+
polarity: "disables",
|
|
100
|
+
render: { kind: "flag-list", flags: ["--disable-shell"] },
|
|
101
|
+
},
|
|
102
|
+
maxSteps: {
|
|
103
|
+
kind: "integer",
|
|
104
|
+
min: 1,
|
|
105
|
+
max: 10000,
|
|
106
|
+
render: { kind: "flag-value", flag: "--max-model-steps" },
|
|
107
|
+
},
|
|
108
|
+
},
|
|
93
109
|
});
|
|
94
110
|
//# sourceMappingURL=muse.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"muse.js","sourceRoot":"","sources":["../../src/knowledge/muse.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,UAAU,EAA0B,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACjF,OA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AE,QAAQ,EAAE,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,oBAAoB,EAAE,EAAE;QACtF,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,UAAU;YACpB,MAAM,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,iBAAiB,CAAC,EAAE;SAC1D;QACD,KAAK,EAAE;YACL,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,UAAU;YACpB,MAAM,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,CAAC,iBAAiB,CAAC,EAAE;SAC1D;QACD,QAAQ,EAAE;YACR,IAAI,EAAE,SAAS;YACf,GAAG,EAAE,CAAC;YACN,GAAG,EAAE,KAAK;YACV,MAAM,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,mBAAmB,EAAE;SAC1D;KACF;CACF,CAAC,CAAC"}
|
|
@@ -1,6 +1,13 @@
|
|
|
1
1
|
import { type HarnessDescriptor, type HarnessName } from "./descriptor.js";
|
|
2
2
|
export type DescriptorSet = Partial<Record<HarnessName, HarnessDescriptor>>;
|
|
3
3
|
export declare const defaultDescriptors: () => DescriptorSet;
|
|
4
|
+
/** Tracks which descriptors were produced by an override file and what their
|
|
5
|
+
* matcher counts are, so the execution layer can emit `matcherOverrides` on
|
|
6
|
+
* the spawn boundary event without re-deriving it. */
|
|
7
|
+
export declare const matcherOverridesOf: WeakMap<HarnessDescriptor, {
|
|
8
|
+
limit: number;
|
|
9
|
+
auth: number;
|
|
10
|
+
}>;
|
|
4
11
|
export declare class OverrideRefusalError extends Error {
|
|
5
12
|
readonly path: string;
|
|
6
13
|
readonly harness?: string | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"overrides.d.ts","sourceRoot":"","sources":["../../src/knowledge/overrides.ts"],"names":[],"mappings":"AAgBA,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAEjB,MAAM,iBAAiB,CAAC;AAIzB,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAE5E,eAAO,MAAM,kBAAkB,QAAO,aAKpC,CAAC;AAEH,qBAAa,oBAAqB,SAAQ,KAAK;IAE3C,QAAQ,CAAC,IAAI,EAAE,MAAM;IAErB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM;IAH3B,YACW,IAAI,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,EACL,OAAO,CAAC,EAAE,MAAM,YAAA,EAM1B;CACF;
|
|
1
|
+
{"version":3,"file":"overrides.d.ts","sourceRoot":"","sources":["../../src/knowledge/overrides.ts"],"names":[],"mappings":"AAgBA,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,WAAW,EAEjB,MAAM,iBAAiB,CAAC;AAIzB,MAAM,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC;AAE5E,eAAO,MAAM,kBAAkB,QAAO,aAKpC,CAAC;AAEH;;sDAEsD;AACtD,eAAO,MAAM,kBAAkB;WAA2C,MAAM;UAAQ,MAAM;EAAK,CAAC;AAEpG,qBAAa,oBAAqB,SAAQ,KAAK;IAE3C,QAAQ,CAAC,IAAI,EAAE,MAAM;IAErB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM;IAH3B,YACW,IAAI,EAAE,MAAM,EACrB,MAAM,EAAE,MAAM,EACL,OAAO,CAAC,EAAE,MAAM,YAAA,EAM1B;CACF;AAiLD,sEAAsE;AACtE,eAAO,MAAM,cAAc,aAAc,MAAM,QAAQ,MAAM,KAAG,aAkD/D,CAAC"}
|