@dungle-scrubs/harness-cli-normalizer 0.5.7 → 0.6.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 +25 -8
- package/dist/cli/args.d.ts +9 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +31 -26
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/check.d.ts +14 -0
- package/dist/cli/check.d.ts.map +1 -1
- package/dist/cli/check.js +10 -3
- package/dist/cli/check.js.map +1 -1
- package/dist/cli/config.d.ts +4 -4
- package/dist/cli/config.d.ts.map +1 -1
- package/dist/cli/config.js +6 -6
- package/dist/cli/config.js.map +1 -1
- package/dist/cli/exit-codes.d.ts +0 -1
- package/dist/cli/exit-codes.d.ts.map +1 -1
- package/dist/cli/exit-codes.js +0 -1
- package/dist/cli/exit-codes.js.map +1 -1
- package/dist/cli/help.d.ts +3 -3
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +9 -2
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +3 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/inspect.d.ts.map +1 -1
- package/dist/cli/inspect.js +84 -265
- package/dist/cli/inspect.js.map +1 -1
- package/dist/cli/plan-turn.d.ts +68 -0
- package/dist/cli/plan-turn.d.ts.map +1 -0
- package/dist/cli/plan-turn.js +266 -0
- package/dist/cli/plan-turn.js.map +1 -0
- package/dist/cli/refuse.d.ts.map +1 -1
- package/dist/cli/refuse.js +2 -1
- package/dist/cli/refuse.js.map +1 -1
- package/dist/cli/resolve-harness.d.ts.map +1 -1
- package/dist/cli/resolve-harness.js +2 -3
- package/dist/cli/resolve-harness.js.map +1 -1
- package/dist/cli/run.d.ts.map +1 -1
- package/dist/cli/run.js +33 -367
- package/dist/cli/run.js.map +1 -1
- package/dist/cli/session-json.d.ts +1 -1
- package/dist/cli/session-json.d.ts.map +1 -1
- package/dist/cli/session-json.js +1 -3
- package/dist/cli/session-json.js.map +1 -1
- package/dist/cli/session.d.ts.map +1 -1
- package/dist/cli/session.js +27 -45
- package/dist/cli/session.js.map +1 -1
- package/dist/cli/skills-root.d.ts +1 -1
- package/dist/cli/skills-root.d.ts.map +1 -1
- package/dist/cli/skills-root.js +1 -1
- package/dist/cli/skills-root.js.map +1 -1
- package/dist/execution/decode.d.ts.map +1 -1
- package/dist/execution/decode.js +11 -36
- package/dist/execution/decode.js.map +1 -1
- package/dist/execution/events.d.ts +4 -1
- package/dist/execution/events.d.ts.map +1 -1
- package/dist/execution/events.js.map +1 -1
- package/dist/execution/failure.d.ts +3 -1
- package/dist/execution/failure.d.ts.map +1 -1
- package/dist/execution/failure.js +14 -11
- package/dist/execution/failure.js.map +1 -1
- package/dist/execution/open-session.d.ts +6 -1
- package/dist/execution/open-session.d.ts.map +1 -1
- package/dist/execution/open-session.js +151 -223
- package/dist/execution/open-session.js.map +1 -1
- package/dist/execution/stream-turn.d.ts +9 -14
- package/dist/execution/stream-turn.d.ts.map +1 -1
- package/dist/execution/stream-turn.js +85 -188
- package/dist/execution/stream-turn.js.map +1 -1
- package/dist/execution/supervisor.d.ts +71 -0
- package/dist/execution/supervisor.d.ts.map +1 -0
- package/dist/execution/supervisor.js +127 -0
- package/dist/execution/supervisor.js.map +1 -0
- package/dist/interpretation/argv.d.ts +44 -12
- package/dist/interpretation/argv.d.ts.map +1 -1
- package/dist/interpretation/argv.js +38 -24
- package/dist/interpretation/argv.js.map +1 -1
- package/dist/interpretation/content.d.ts +10 -1
- package/dist/interpretation/content.d.ts.map +1 -1
- package/dist/interpretation/content.js +20 -11
- package/dist/interpretation/content.js.map +1 -1
- package/dist/interpretation/hints.d.ts +1 -1
- package/dist/interpretation/hints.d.ts.map +1 -1
- package/dist/interpretation/hints.js +10 -11
- package/dist/interpretation/hints.js.map +1 -1
- package/dist/interpretation/index.d.ts +0 -1
- package/dist/interpretation/index.d.ts.map +1 -1
- package/dist/interpretation/index.js +0 -1
- package/dist/interpretation/index.js.map +1 -1
- package/dist/interpretation/limits.d.ts +2 -5
- package/dist/interpretation/limits.d.ts.map +1 -1
- package/dist/interpretation/limits.js +8 -62
- package/dist/interpretation/limits.js.map +1 -1
- package/dist/interpretation/question.d.ts +27 -0
- package/dist/interpretation/question.d.ts.map +1 -1
- package/dist/interpretation/question.js +28 -0
- package/dist/interpretation/question.js.map +1 -1
- package/dist/interpretation/refusal.d.ts +10 -5
- package/dist/interpretation/refusal.d.ts.map +1 -1
- package/dist/interpretation/refusal.js +24 -15
- package/dist/interpretation/refusal.js.map +1 -1
- package/dist/interpretation/resolve-options.d.ts +36 -2
- package/dist/interpretation/resolve-options.d.ts.map +1 -1
- package/dist/interpretation/resolve-options.js +38 -21
- package/dist/interpretation/resolve-options.js.map +1 -1
- package/dist/interpretation/session-input.d.ts +44 -1
- package/dist/interpretation/session-input.d.ts.map +1 -1
- package/dist/interpretation/session-input.js +59 -4
- package/dist/interpretation/session-input.js.map +1 -1
- package/dist/interpretation/shape.d.ts +1 -0
- package/dist/interpretation/shape.d.ts.map +1 -1
- package/dist/interpretation/shape.js +10 -0
- package/dist/interpretation/shape.js.map +1 -1
- package/dist/interpretation/skills-selection.d.ts +25 -33
- package/dist/interpretation/skills-selection.d.ts.map +1 -1
- package/dist/interpretation/skills-selection.js +41 -48
- package/dist/interpretation/skills-selection.js.map +1 -1
- package/dist/interpretation/support.d.ts.map +1 -1
- package/dist/interpretation/support.js +23 -8
- package/dist/interpretation/support.js.map +1 -1
- package/dist/interpretation/tool-selection.d.ts +7 -6
- package/dist/interpretation/tool-selection.d.ts.map +1 -1
- package/dist/interpretation/tool-selection.js +54 -116
- package/dist/interpretation/tool-selection.js.map +1 -1
- package/dist/interpretation/tool-vocabulary.d.ts +31 -12
- package/dist/interpretation/tool-vocabulary.d.ts.map +1 -1
- package/dist/interpretation/tool-vocabulary.js +19 -41
- package/dist/interpretation/tool-vocabulary.js.map +1 -1
- package/dist/interpretation/turn-options.d.ts +4 -0
- package/dist/interpretation/turn-options.d.ts.map +1 -1
- package/dist/interpretation/turn-options.js +105 -241
- package/dist/interpretation/turn-options.js.map +1 -1
- package/dist/interpretation/vocabulary.d.ts +8 -6
- package/dist/interpretation/vocabulary.d.ts.map +1 -1
- package/dist/interpretation/vocabulary.js +22 -9
- package/dist/interpretation/vocabulary.js.map +1 -1
- package/dist/knowledge/claude-code.js +3 -3
- package/dist/knowledge/claude-code.js.map +1 -1
- package/dist/knowledge/codex.d.ts.map +1 -1
- package/dist/knowledge/codex.js +31 -7
- package/dist/knowledge/codex.js.map +1 -1
- package/dist/knowledge/descriptor.d.ts +67 -36
- package/dist/knowledge/descriptor.d.ts.map +1 -1
- package/dist/knowledge/descriptor.js +49 -15
- package/dist/knowledge/descriptor.js.map +1 -1
- package/dist/knowledge/matchers.d.ts +12 -0
- package/dist/knowledge/matchers.d.ts.map +1 -1
- package/dist/knowledge/matchers.js +34 -0
- package/dist/knowledge/matchers.js.map +1 -1
- package/dist/knowledge/muse.d.ts.map +1 -1
- package/dist/knowledge/muse.js +7 -5
- package/dist/knowledge/muse.js.map +1 -1
- package/dist/knowledge/overrides.d.ts.map +1 -1
- package/dist/knowledge/overrides.js +9 -20
- package/dist/knowledge/overrides.js.map +1 -1
- package/dist/knowledge/pi.d.ts.map +1 -1
- package/dist/knowledge/pi.js +8 -6
- package/dist/knowledge/pi.js.map +1 -1
- package/dist/knowledge/profile.d.ts +1 -0
- package/dist/knowledge/profile.d.ts.map +1 -1
- package/dist/knowledge/profile.js +1 -0
- package/dist/knowledge/profile.js.map +1 -1
- package/package.json +1 -1
- package/src/cli/args.ts +35 -27
- package/src/cli/check.ts +10 -3
- package/src/cli/config.ts +12 -11
- package/src/cli/exit-codes.ts +0 -2
- package/src/cli/help.ts +9 -2
- package/src/cli/index.ts +3 -1
- package/src/cli/inspect.ts +88 -269
- package/src/cli/plan-turn.ts +346 -0
- package/src/cli/refuse.ts +2 -1
- package/src/cli/resolve-harness.ts +4 -5
- package/src/cli/run.ts +36 -399
- package/src/cli/session-json.ts +1 -6
- package/src/cli/session.ts +36 -45
- package/src/cli/skills-root.ts +1 -4
- package/src/execution/decode.ts +10 -36
- package/src/execution/events.ts +4 -1
- package/src/execution/failure.ts +18 -11
- package/src/execution/open-session.ts +160 -228
- package/src/execution/stream-turn.ts +90 -193
- package/src/execution/supervisor.ts +199 -0
- package/src/interpretation/argv.ts +86 -38
- package/src/interpretation/content.ts +30 -13
- package/src/interpretation/hints.ts +2 -12
- package/src/interpretation/index.ts +0 -1
- package/src/interpretation/limits.ts +14 -75
- package/src/interpretation/question.ts +46 -0
- package/src/interpretation/refusal.ts +28 -18
- package/src/interpretation/resolve-options.ts +85 -32
- package/src/interpretation/session-input.ts +88 -5
- package/src/interpretation/shape.ts +10 -0
- package/src/interpretation/skills-selection.ts +70 -74
- package/src/interpretation/support.ts +19 -6
- package/src/interpretation/tool-selection.ts +67 -122
- package/src/interpretation/tool-vocabulary.ts +48 -53
- package/src/interpretation/turn-options.ts +123 -220
- package/src/interpretation/vocabulary.ts +15 -10
- package/src/knowledge/claude-code.ts +3 -3
- package/src/knowledge/codex.ts +31 -7
- package/src/knowledge/descriptor.ts +105 -49
- package/src/knowledge/matchers.ts +35 -0
- package/src/knowledge/muse.ts +7 -5
- package/src/knowledge/overrides.ts +17 -32
- package/src/knowledge/pi.ts +8 -6
- package/src/knowledge/profile.ts +1 -0
- package/dist/interpretation/dimensions.d.ts +0 -11
- package/dist/interpretation/dimensions.d.ts.map +0 -1
- package/dist/interpretation/dimensions.js +0 -4
- package/dist/interpretation/dimensions.js.map +0 -1
- package/src/interpretation/dimensions.ts +0 -14
|
@@ -1,7 +1,16 @@
|
|
|
1
|
-
/**
|
|
2
|
-
*
|
|
3
|
-
*
|
|
4
|
-
*
|
|
1
|
+
/**
|
|
2
|
+
* Model/effort vocabulary: pure checks of a caller's selector against the
|
|
3
|
+
* descriptor's curated vocabulary, resolving aliases to the harness's own
|
|
4
|
+
* spelling. Rejections name the accepted vocabulary so the refusal is
|
|
5
|
+
* actionable without reading the descriptor. Resolution lives in ONE place
|
|
6
|
+
* (resolveModel) so validation and capability claims cannot drift.
|
|
7
|
+
*/
|
|
8
|
+
import { ACCESS_VALUES } from "../knowledge/descriptor.js";
|
|
9
|
+
/** The one selector grammar for model ids, tool names, and toolMap keys
|
|
10
|
+
* (RFC-02 change 9): pi documents models as provider/id[:thinking], so
|
|
11
|
+
* word characters plus the few real separators - never whitespace, shell
|
|
12
|
+
* metacharacters, or control/format characters, and bounded like session
|
|
13
|
+
* ids. */
|
|
5
14
|
export const CLEAN_SELECTOR = /^[A-Za-z0-9][A-Za-z0-9._:/@-]{0,127}$/;
|
|
6
15
|
/** Alias-resolve a model selector. Object.hasOwn guards the alias lookup -
|
|
7
16
|
* "__proto__" must resolve to itself, not to Object.prototype. */
|
|
@@ -32,14 +41,18 @@ export const validateModel = (h, model) => {
|
|
|
32
41
|
reason: `unknown ${h.bin} model ${JSON.stringify(model)}; accepted: ${h.vocabulary.models.join(", ")} (aliases: ${Object.keys(h.vocabulary.aliases).join(", ")})`,
|
|
33
42
|
};
|
|
34
43
|
};
|
|
35
|
-
/**
|
|
36
|
-
* model's own ladder where the harness constrains per model (codex), else
|
|
37
|
-
* the harness-wide ladder. */
|
|
44
|
+
/** The access preset takes one of the closed ACCESS_VALUES. */
|
|
38
45
|
export const validateAccess = (value) => {
|
|
39
|
-
if (value
|
|
46
|
+
if (ACCESS_VALUES.includes(value))
|
|
40
47
|
return { ok: true, id: value };
|
|
41
|
-
return {
|
|
48
|
+
return {
|
|
49
|
+
ok: false,
|
|
50
|
+
reason: `unknown access ${JSON.stringify(value)}; accepted: ${ACCESS_VALUES.join(", ")}`,
|
|
51
|
+
};
|
|
42
52
|
};
|
|
53
|
+
/** Validate an effort against the ladder that applies to the pick: the
|
|
54
|
+
* model's own ladder where the harness constrains per model (codex), else
|
|
55
|
+
* the harness-wide ladder. */
|
|
43
56
|
export const validateEffort = (h, effort, model) => {
|
|
44
57
|
let ladder = h.vocabulary.efforts;
|
|
45
58
|
if (model !== undefined && h.vocabulary.effortsByModel !== undefined) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vocabulary.js","sourceRoot":"","sources":["../../src/interpretation/vocabulary.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"vocabulary.js","sourceRoot":"","sources":["../../src/interpretation/vocabulary.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAE,aAAa,EAA0B,MAAM,4BAA4B,CAAC;AASnF;;;;UAIU;AACV,MAAM,CAAC,MAAM,cAAc,GAAG,uCAAuC,CAAC;AAOtE;kEACkE;AAClE,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAoB,EAAE,KAAa,EAAiB,EAAE;IACjF,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,MAAM,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,EAAE,OAAO,CAAC;QAC1D,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,OAAO,CAAC,OAAO,CAAC;QAC/B,CAAC,CAAC,SAAS,CAAC;IACd,MAAM,EAAE,GAAG,OAAO,IAAI,OAAO,CAAC;IAC9B,OAAO,EAAE,EAAE,EAAE,OAAO,EAAE,CAAC,CAAC,UAAU,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,CAAC;AAC3D,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAoB,EAAE,KAAa,EAAa,EAAE;IAC9E,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,GAAG,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;IAC/C,IAAI,OAAO;QAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC;IACrC,IAAI,CAAC,CAAC,UAAU,CAAC,UAAU,EAAE,CAAC;Q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;QACrE,MAAM,EAAE,EAAE,EAAE,GAAG,YAAY,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QACtC,MAAM,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC,cAAc,EAAE,EAAE,CAAC;YAC7D,CAAC,CAAC,CAAC,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE,CAAC;YACjC,CAAC,CAAC,SAAS,CAAC;QACd,IAAI,QAAQ,KAAK,SAAS;YAAE,MAAM,GAAG,QAAQ,CAAC;IAChD,CAAC;IACD,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC;QAAE,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,EAAE,EAAE,MAAM,EAAE,CAAC;IAC7D,OAAO;QACL,EAAE,EAAE,KAAK;QACT,MAAM,EAAE,WAAW,CAAC,CAAC,GAAG,WAAW,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,GAAG,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,cAAc,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,EAAE,aAAa,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,EAAE;KAC9J,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -26,7 +26,6 @@ export const claudeCode = deepFreeze({
|
|
|
26
26
|
baseFlags: ["-p"],
|
|
27
27
|
subcommands: [],
|
|
28
28
|
promptStyle: "positional",
|
|
29
|
-
toolsFlag: "--allowedTools",
|
|
30
29
|
// A headless turn launches with the full stream-json output set so the
|
|
31
30
|
// runner can decode identity/limits and stream token deltas; bare -p
|
|
32
31
|
// (granularity none) is a degraded invocation this builder never emits.
|
|
@@ -197,7 +196,9 @@ export const claudeCode = deepFreeze({
|
|
|
197
196
|
},
|
|
198
197
|
},
|
|
199
198
|
},
|
|
200
|
-
|
|
199
|
+
// read renders the read preset through the tool list (grant plus deny
|
|
200
|
+
// complement); write is the harness default and emits nothing.
|
|
201
|
+
access: { kind: "access", renders: { read: "tool-preset", write: null } },
|
|
201
202
|
},
|
|
202
203
|
// Phase 0 fixtures: claude-tool-interplay.md. include is a permission
|
|
203
204
|
// grant (Bash, Edit stay visible under --allowedTools Read); only the
|
|
@@ -210,7 +211,6 @@ export const claudeCode = deepFreeze({
|
|
|
210
211
|
includeFlag: "--allowedTools",
|
|
211
212
|
excludeFlag: "--disallowedTools",
|
|
212
213
|
includeIsStrictAllowlist: false,
|
|
213
|
-
composable: true,
|
|
214
214
|
builtins: [
|
|
215
215
|
{ name: "Bash", defaultEnabled: true, canonical: "shell" },
|
|
216
216
|
{ name: "Edit", defaultEnabled: true, canonical: "edit" },
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-code.js","sourceRoot":"","sources":["../../src/knowledge/claude-code.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,UAAU,EAA0B,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE5E,MAAM,CAAC,MAAM,UAAU,GAAsB,UAAU,CAAC;IACtD,IAAI,EAAE,QAAQ;IACd,GAAG,EAAE,QAAQ;IACb,eAAe,EAAE,SAAS;IAC1B,aAAa,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,2BAA2B,EAAE;IACpE,MAAM,EAAE;QACN,SAAS,EAAE,CAAC,IAAI,CAAC;QACjB,WAAW,EAAE,EAAE;QACf,WAAW,EAAE,YAAY;QACzB,
|
|
1
|
+
{"version":3,"file":"claude-code.js","sourceRoot":"","sources":["../../src/knowledge/claude-code.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,EAAE,UAAU,EAA0B,UAAU,EAAE,MAAM,iBAAiB,CAAC;AACjF,OAAO,EAAE,oBAAoB,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAC;AAE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,KAAK,iBAAiB,EAAc,MAAM,iBAAiB,CAAC;AAGjF,eAAO,MAAM,QAAQ,EAAE,
|
|
1
|
+
{"version":3,"file":"codex.d.ts","sourceRoot":"","sources":["../../src/knowledge/codex.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAc,KAAK,iBAAiB,EAAc,MAAM,iBAAiB,CAAC;AAGjF,eAAO,MAAM,QAAQ,EAAE,iBAyLrB,CAAC"}
|
package/dist/knowledge/codex.js
CHANGED
|
@@ -22,7 +22,6 @@ export const codexCli = deepFreeze({
|
|
|
22
22
|
baseFlags: ["exec", "--json", "--skip-git-repo-check"],
|
|
23
23
|
subcommands: ["exec"],
|
|
24
24
|
promptStyle: "positional",
|
|
25
|
-
toolsFlag: null,
|
|
26
25
|
streamFlags: [],
|
|
27
26
|
// Codex mints its own thread id; there is nothing to assign at launch.
|
|
28
27
|
idFlag: null,
|
|
@@ -61,11 +60,13 @@ export const codexCli = deepFreeze({
|
|
|
61
60
|
autonomy: { flag: "--yolo" },
|
|
62
61
|
vocabulary: {
|
|
63
62
|
modelFlag: "--model",
|
|
64
|
-
models: ["gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5"],
|
|
63
|
+
models: ["gpt-6-astra", "gpt-5.6-sol", "gpt-5.6-terra", "gpt-5.6-luna", "gpt-5.5"],
|
|
65
64
|
aliases: {},
|
|
66
65
|
efforts: ["minimal", "low", "medium", "high", "xhigh", "max"],
|
|
67
66
|
// Codex constrains ladders per model generation (v1 registry).
|
|
68
67
|
effortsByModel: {
|
|
68
|
+
// https://developers.openai.com/api/docs/models/gpt-6-astra (2026-09-06).
|
|
69
|
+
"gpt-6-astra": ["low", "medium", "high", "xhigh", "max"],
|
|
69
70
|
"gpt-5.5": ["minimal", "low", "medium", "high"],
|
|
70
71
|
"gpt-5.6-sol": ["medium", "high", "xhigh", "max"],
|
|
71
72
|
"gpt-5.6-terra": ["medium", "high", "xhigh", "max"],
|
|
@@ -108,6 +109,14 @@ export const codexCli = deepFreeze({
|
|
|
108
109
|
observedOn: { harness: "codex", model: "", version: "0.146.1", date: "2026-08-19" },
|
|
109
110
|
},
|
|
110
111
|
turnOptions: {
|
|
112
|
+
// Codex config reference; accepted as an integer on CLI 0.153.4.
|
|
113
|
+
// Native compaction uses this window; hcn does not count request tokens.
|
|
114
|
+
contextWindow: {
|
|
115
|
+
kind: "integer",
|
|
116
|
+
min: 1,
|
|
117
|
+
max: 272000,
|
|
118
|
+
render: { kind: "config-kv", flag: "-c", key: "model_context_window" },
|
|
119
|
+
},
|
|
111
120
|
effort: {
|
|
112
121
|
kind: "effort",
|
|
113
122
|
render: { kind: "config-kv", flag: "-c", key: "model_reasoning_effort" },
|
|
@@ -137,11 +146,27 @@ export const codexCli = deepFreeze({
|
|
|
137
146
|
// caller asked.
|
|
138
147
|
resumeRender: { kind: "config-kv", flag: "-c", key: "sandbox_mode" },
|
|
139
148
|
},
|
|
149
|
+
// The preset maps onto the sandbox dimension and therefore CLAIMS it:
|
|
150
|
+
// an explicit --sandbox alongside --access refuses, and the profile's
|
|
151
|
+
// sandbox default yields. Data here, not a harness-name branch.
|
|
152
|
+
// On resume the preset rides the same config-kv spelling the sandbox
|
|
153
|
+
// dimension uses (issue #72 evidence above): `codex exec resume`
|
|
154
|
+
// rejects --sandbox, and -c sandbox_mode is enforced there.
|
|
140
155
|
access: {
|
|
141
|
-
kind: "
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
156
|
+
kind: "access",
|
|
157
|
+
claims: "sandbox",
|
|
158
|
+
renders: {
|
|
159
|
+
read: {
|
|
160
|
+
render: { kind: "flag-value", flag: "--sandbox" },
|
|
161
|
+
resumeRender: { kind: "config-kv", flag: "-c", key: "sandbox_mode" },
|
|
162
|
+
value: "read-only",
|
|
163
|
+
},
|
|
164
|
+
write: {
|
|
165
|
+
render: { kind: "flag-value", flag: "--sandbox" },
|
|
166
|
+
resumeRender: { kind: "config-kv", flag: "-c", key: "sandbox_mode" },
|
|
167
|
+
value: "workspace-write",
|
|
168
|
+
},
|
|
169
|
+
},
|
|
145
170
|
},
|
|
146
171
|
},
|
|
147
172
|
// Tools: no built-in name lists; control is feature booleans
|
|
@@ -157,7 +182,6 @@ export const codexCli = deepFreeze({
|
|
|
157
182
|
includeFlag: null,
|
|
158
183
|
excludeFlag: null,
|
|
159
184
|
includeIsStrictAllowlist: false,
|
|
160
|
-
composable: false,
|
|
161
185
|
builtins: [],
|
|
162
186
|
categories: [
|
|
163
187
|
{ key: "shell", disableFlag: null, configKey: "features.shell_tool", canonical: [] },
|
|
@@ -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,sDAAsD;QACtD,qEAAqE;QACrE,wEAAwE;QACxE,6CAA6C;QAC7C,+DAA+D;QAC/D,8CAA8C;QAC9C,SAAS,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,uBAAuB,CAAC;QACtD,WAAW,EAAE,CAAC,MAAM,CAAC;QACrB,WAAW,EAAE,YAAY;QACzB,
|
|
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,o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SAAS,EAAE,qBAAqB,EAAE,SAAS,EAAE,EAAE,EAAE;YACpF,EAAE,GAAG,EAAE,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,uBAAuB,EAAE,SAAS,EAAE,EAAE,EAAE;YACrF,EAAE,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,YAAY,EAAE,SAAS,EAAE,EAAE,EAAE;YACzE,EAAE,GAAG,EAAE,YAAY,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,kBAAkB,EAAE,SAAS,EAAE,EAAE,EAAE;SACvF;QACD,aAAa,EAAE,UAAU;KAC1B;CACF,CAAC,CAAC"}
|
|
@@ -18,8 +18,33 @@ export declare const UUID_SHAPE: RegExp;
|
|
|
18
18
|
export declare const deepFreeze: <T>(value: T) => T;
|
|
19
19
|
export declare const CANONICAL_TOOLS: readonly ["read", "edit", "write", "shell", "grep", "glob", "list", "web-fetch", "web-search", "subagent", "skill"];
|
|
20
20
|
export type CanonicalTool = (typeof CANONICAL_TOOLS)[number];
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
/** Every closed string vocabulary on a descriptor is declared once as a
|
|
22
|
+
* runtime array with its type derived (RFC-02 change 9), so a CLI list, an
|
|
23
|
+
* override validator, or a test reads the array instead of restating it. */
|
|
24
|
+
export declare const STREAMING_GRANULARITIES: readonly ["token", "message", "none"];
|
|
25
|
+
export type StreamingGranularity = (typeof STREAMING_GRANULARITIES)[number];
|
|
26
|
+
export declare const HARNESS_MODES: readonly ["headless-turn", "headless-session", "interactive"];
|
|
27
|
+
export type HarnessMode = (typeof HARNESS_MODES)[number];
|
|
28
|
+
export declare const STDIN_POLICIES: readonly ["inherit", "close-required"];
|
|
29
|
+
export type StdinPolicy = (typeof STDIN_POLICIES)[number];
|
|
30
|
+
export declare const CWD_SLUGS: readonly ["dash-separators", "pi-dash-wrapped", "verbatim"];
|
|
31
|
+
export type CwdSlug = (typeof CWD_SLUGS)[number];
|
|
32
|
+
export declare const RESUME_STYLES: readonly ["flag", "positional"];
|
|
33
|
+
export type ResumeStyle = (typeof RESUME_STYLES)[number];
|
|
34
|
+
export declare const RESUME_ON_MISSING: readonly ["error", "create"];
|
|
35
|
+
export type ResumeOnMissing = (typeof RESUME_ON_MISSING)[number];
|
|
36
|
+
export declare const IDENTITY_AUTHORITIES: readonly ["caller-assigned", "harness-minted"];
|
|
37
|
+
export type IdentityAuthority = (typeof IDENTITY_AUTHORITIES)[number];
|
|
38
|
+
export declare const DENY_SEMANTICS: readonly ["remove-from-set", "policy-gate", "no-lists"];
|
|
39
|
+
export type DenySemantics = (typeof DENY_SEMANTICS)[number];
|
|
40
|
+
export declare const SKILLS_OVERRIDES_VIA: readonly ["settings-skilloverrides", "config-skills-array"];
|
|
41
|
+
export type SkillsOverridesVia = (typeof SKILLS_OVERRIDES_VIA)[number];
|
|
42
|
+
export declare const VERSION_SOURCE_KINDS: readonly ["npm", "installed"];
|
|
43
|
+
export type VersionSourceKind = (typeof VERSION_SOURCE_KINDS)[number];
|
|
44
|
+
/** The access preset's value vocabulary: `read` narrows to the read-only
|
|
45
|
+
* tool subset, `write` is no restriction. */
|
|
46
|
+
export declare const ACCESS_VALUES: readonly ["read", "write"];
|
|
47
|
+
export type AccessValue = (typeof ACCESS_VALUES)[number];
|
|
23
48
|
export declare const SESSION_INPUT_KINDS: readonly ["claude-sdk-user-message", "pi-rpc-prompt"];
|
|
24
49
|
export type SessionInputKind = (typeof SESSION_INPUT_KINDS)[number];
|
|
25
50
|
export interface SessionInputContract {
|
|
@@ -65,7 +90,7 @@ export type UnavailableMatcher = PhraseMatcher;
|
|
|
65
90
|
* key here maps to a field on `TurnOptions`; adding a key without a consumer
|
|
66
91
|
* arm would be dead data that can only drift. Render order is the tuple
|
|
67
92
|
* order, so argv is deterministic regardless of caller field order. */
|
|
68
|
-
export declare const TURN_OPTION_KEYS: readonly ["effort", "sandbox", "provider", "discovery", "write", "shell", "maxSteps", "systemPrompt", "appendSystemPrompt", "access"];
|
|
93
|
+
export declare const TURN_OPTION_KEYS: readonly ["effort", "sandbox", "contextWindow", "provider", "discovery", "write", "shell", "maxSteps", "systemPrompt", "appendSystemPrompt", "access"];
|
|
69
94
|
export type TurnOptionKey = (typeof TURN_OPTION_KEYS)[number];
|
|
70
95
|
/** Discovery facets are closed for the same reason as `TurnOptionKey`: each
|
|
71
96
|
* maps to a field on `DiscoveryOptions` and a concrete flag spelling per
|
|
@@ -102,6 +127,13 @@ export interface SpecBase {
|
|
|
102
127
|
* resume, and building a resume argv with it must refuse. */
|
|
103
128
|
readonly resumeRender?: OptionRender | null;
|
|
104
129
|
}
|
|
130
|
+
/** How one access value renders on one harness (RFC-02 change 3): the
|
|
131
|
+
* marker for "render the read preset through the tool list", null for
|
|
132
|
+
* "emit nothing", or a phase-aware render carrying the harness value it
|
|
133
|
+
* maps to (codex: `read` is `--sandbox read-only`). */
|
|
134
|
+
export type AccessRender = "tool-preset" | null | (SpecBase & {
|
|
135
|
+
readonly value?: string;
|
|
136
|
+
});
|
|
105
137
|
export type TurnOptionSpec =
|
|
106
138
|
/** Closed value vocabulary. `default` renders on LAUNCH ONLY. */
|
|
107
139
|
(SpecBase & {
|
|
@@ -109,17 +141,15 @@ export type TurnOptionSpec =
|
|
|
109
141
|
readonly values: readonly string[];
|
|
110
142
|
readonly default?: string;
|
|
111
143
|
})
|
|
112
|
-
/**
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
readonly
|
|
118
|
-
readonly
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
readonly flags: Readonly<Record<string, readonly string[]>>;
|
|
122
|
-
})
|
|
144
|
+
/** The access preset: one kind on every harness that expresses it, a
|
|
145
|
+
* render per value, and `claims` naming the turn option the preset
|
|
146
|
+
* displaces when set (codex: sandbox) so exclusivity is data, not a
|
|
147
|
+
* harness name. */
|
|
148
|
+
| {
|
|
149
|
+
readonly kind: "access";
|
|
150
|
+
readonly renders: Readonly<Record<AccessValue, AccessRender>>;
|
|
151
|
+
readonly claims?: TurnOptionKey;
|
|
152
|
+
}
|
|
123
153
|
/** Ladder comes from vocabulary.efforts / effortsByModel, not from here. */
|
|
124
154
|
| (SpecBase & {
|
|
125
155
|
readonly kind: "effort";
|
|
@@ -158,15 +188,14 @@ export type TurnOptionSpec =
|
|
|
158
188
|
* Discovery facets use the same rule per facet; this helper works for any
|
|
159
189
|
* `SpecBase` (top-level specs and per-facet specs alike). */
|
|
160
190
|
export declare const resolveRender: (spec: SpecBase, phase: "launch" | "resume") => OptionRender | null;
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
* render
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
*
|
|
167
|
-
*
|
|
168
|
-
|
|
169
|
-
export declare const getOptionRender: (spec: TurnOptionSpec, phase: "launch" | "resume") => OptionRender | null;
|
|
191
|
+
export type Quoting = "toml" | "verbatim";
|
|
192
|
+
/** The argv tokens one resolved render produces for one value - the only
|
|
193
|
+
* place a render kind becomes tokens (RFC-02 change 1). `toml` quoting is
|
|
194
|
+
* `JSON.stringify`, sufficient for the closed vocabularies that ride
|
|
195
|
+
* config-kv; `verbatim` passes prose (prompt text) and bare TOML literals
|
|
196
|
+
* through unchanged. A flag-value or config-kv render with no value is a
|
|
197
|
+
* descriptor error, never an empty token. */
|
|
198
|
+
export declare const tokensFor: (render: OptionRender, value?: string, quoting?: Quoting) => readonly string[];
|
|
170
199
|
export interface HarnessDescriptor {
|
|
171
200
|
readonly name: HarnessName;
|
|
172
201
|
readonly bin: string;
|
|
@@ -186,10 +215,10 @@ export interface HarnessDescriptor {
|
|
|
186
215
|
* have no registry to poll, so the check falls back to the locally
|
|
187
216
|
* installed `<bin> --version` and is skipped where the CLI is absent. */
|
|
188
217
|
readonly versionSource: {
|
|
189
|
-
readonly kind: "npm"
|
|
218
|
+
readonly kind: Extract<VersionSourceKind, "npm">;
|
|
190
219
|
readonly package: string;
|
|
191
220
|
} | {
|
|
192
|
-
readonly kind: "installed"
|
|
221
|
+
readonly kind: Extract<VersionSourceKind, "installed">;
|
|
193
222
|
};
|
|
194
223
|
/** Headless one-turn launch shape. `promptStyle: "positional"` means the
|
|
195
224
|
* prompt travels as a bare argv entry (ordering constraints apply).
|
|
@@ -205,7 +234,6 @@ export interface HarnessDescriptor {
|
|
|
205
234
|
* `workspace-write` into subcommands. */
|
|
206
235
|
readonly subcommands: readonly string[];
|
|
207
236
|
readonly promptStyle: "positional";
|
|
208
|
-
readonly toolsFlag: string | null;
|
|
209
237
|
readonly streamFlags: readonly string[];
|
|
210
238
|
/** The flag that pins a caller-assigned id at LAUNCH (spawn-time
|
|
211
239
|
* assignment; the execution layer consumes it), or null when the
|
|
@@ -219,7 +247,7 @@ export interface HarnessDescriptor {
|
|
|
219
247
|
* anywhere else (the v1 first-UUID-wins scar: a UUID inside quoted prompt
|
|
220
248
|
* text was returned as the session id, and resuming it started a stranger). */
|
|
221
249
|
readonly resume: {
|
|
222
|
-
readonly style:
|
|
250
|
+
readonly style: ResumeStyle;
|
|
223
251
|
readonly flag: string;
|
|
224
252
|
readonly aliases: readonly string[];
|
|
225
253
|
readonly idShape: RegExp;
|
|
@@ -237,7 +265,7 @@ export interface HarnessDescriptor {
|
|
|
237
265
|
* The protocol layer must know this: a consumer resuming a session it
|
|
238
266
|
* believes exists gets a blank session, not an error, on a "create"
|
|
239
267
|
* harness. */
|
|
240
|
-
readonly onMissing:
|
|
268
|
+
readonly onMissing: ResumeOnMissing;
|
|
241
269
|
};
|
|
242
270
|
/** Persistent headless session support: the complete flag list that follows
|
|
243
271
|
* the binary to open one lucid-owned process serving many turns, or null
|
|
@@ -265,8 +293,13 @@ export interface HarnessDescriptor {
|
|
|
265
293
|
readonly resumeFlag: SessionResumeFlag;
|
|
266
294
|
readonly input: SessionInputContract;
|
|
267
295
|
readonly turnEnd: Readonly<Record<string, string>>;
|
|
296
|
+
/** The command the runner writes at spawn to learn the session id, and
|
|
297
|
+
* the dot-path to that id in the response (pi rpc: `get_state`,
|
|
298
|
+
* `data.sessionId`). Encoded and decoded in interpretation
|
|
299
|
+
* (session-input.ts); execution holds no field names (ADR 0005). */
|
|
268
300
|
readonly identityProbe: {
|
|
269
301
|
readonly command: string;
|
|
302
|
+
readonly responseIdField: string;
|
|
270
303
|
} | null;
|
|
271
304
|
} | null;
|
|
272
305
|
/** Streaming is a property of the INVOCATION, not the harness: each pin
|
|
@@ -288,7 +321,7 @@ export interface HarnessDescriptor {
|
|
|
288
321
|
* {type: "system", subtype: "init"}, re-emitted at every turn start with
|
|
289
322
|
* the same value (A-001) - consumers dedupe via decodeIdentity. */
|
|
290
323
|
readonly identity: {
|
|
291
|
-
readonly authority:
|
|
324
|
+
readonly authority: IdentityAuthority;
|
|
292
325
|
/** `idField` is a dot-path (muse nests its id at `stream.id`); an empty
|
|
293
326
|
* `match` means "any record carrying the id path". */
|
|
294
327
|
readonly announce: {
|
|
@@ -329,7 +362,7 @@ export interface HarnessDescriptor {
|
|
|
329
362
|
readonly template: string;
|
|
330
363
|
/** claude: '/', '.' -> '-'; pi: '/' -> '-' wrapped in leading/trailing
|
|
331
364
|
* dashes, dots preserved. */
|
|
332
|
-
readonly cwdSlug:
|
|
365
|
+
readonly cwdSlug: CwdSlug;
|
|
333
366
|
};
|
|
334
367
|
/** How the harness exposes context-window usage; the interpretation layer
|
|
335
368
|
* surfaces it as a `context` HarnessEvent. */
|
|
@@ -344,7 +377,7 @@ export interface HarnessDescriptor {
|
|
|
344
377
|
} | null;
|
|
345
378
|
/** Whether backgrounded headless calls must have stdin closed (pi hangs
|
|
346
379
|
* without `< /dev/null`). */
|
|
347
|
-
readonly stdin:
|
|
380
|
+
readonly stdin: StdinPolicy;
|
|
348
381
|
/** Presence recognition: how an interactive process for a session id shows
|
|
349
382
|
* up in a process listing. `headlessMarkers` mark a process as headless
|
|
350
383
|
* (not interactive presence). Known blind spot, inherent to argv matching:
|
|
@@ -389,8 +422,7 @@ export interface HarnessDescriptor {
|
|
|
389
422
|
* the claude asymmetry: claude's include flag pre-approves without
|
|
390
423
|
* restricting the visible set, so an exact allowlist must render as a
|
|
391
424
|
* disallow-complement there; pi's include IS strict (over built-ins).
|
|
392
|
-
* `
|
|
393
|
-
* include). `builtins`: curated names + default-enabled state - grep/find/
|
|
425
|
+
* `builtins`: curated names + default-enabled state - grep/find/
|
|
394
426
|
* ls ship off on pi, everything ships on elsewhere. `categories`:
|
|
395
427
|
* non-list switches (muse disable flags, codex config booleans).
|
|
396
428
|
* `denySemantics`: whether a deny removes the tool from the model-visible
|
|
@@ -405,13 +437,12 @@ export interface HarnessDescriptor {
|
|
|
405
437
|
* muse: null (structural gap - trust/config scoped only). */
|
|
406
438
|
readonly skills: {
|
|
407
439
|
readonly loadFlag: string | null;
|
|
408
|
-
readonly overridesVia:
|
|
440
|
+
readonly overridesVia: SkillsOverridesVia | null;
|
|
409
441
|
} | null;
|
|
410
442
|
readonly tools: {
|
|
411
443
|
readonly includeFlag: string | null;
|
|
412
444
|
readonly excludeFlag: string | null;
|
|
413
445
|
readonly includeIsStrictAllowlist: boolean;
|
|
414
|
-
readonly composable: boolean;
|
|
415
446
|
readonly builtins: ReadonlyArray<{
|
|
416
447
|
readonly name: string;
|
|
417
448
|
readonly defaultEnabled: boolean;
|
|
@@ -423,7 +454,7 @@ export interface HarnessDescriptor {
|
|
|
423
454
|
readonly configKey: string | null;
|
|
424
455
|
readonly canonical: readonly CanonicalTool[];
|
|
425
456
|
}>;
|
|
426
|
-
readonly denySemantics:
|
|
457
|
+
readonly denySemantics: DenySemantics;
|
|
427
458
|
};
|
|
428
459
|
}
|
|
429
460
|
//# sourceMappingURL=descriptor.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptor.d.ts","sourceRoot":"","sources":["../../src/knowledge/descriptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,eAAO,MAAM,aAAa,YAAI,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM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AI,CAAC;QACpC,QAAQ,CAAC,wBAAwB,EAAE,OAAO,CAAC;QAC3C,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC;YAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;YACtB,QAAQ,CAAC,cAAc,EAAE,OAAO,CAAC;YACjC,QAAQ,CAAC,SAAS,EAAE,aAAa,GAAG,IAAI,CAAC;SAC1C,CAAC,CAAC;QACH,QAAQ,CAAC,UAAU,EAAE,aAAa,CAAC;YACjC,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,OAAO,GAAG,KAAK,GAAG,MAAM,GAAG,YAAY,CAAC;YAChE,QAAQ,CAAC,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;YACpC,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;YAClC,QAAQ,CAAC,SAAS,EAAE,SAAS,aAAa,EAAE,CAAC;SAC9C,CAAC,CAAC;QACH,QAAQ,CAAC,aAAa,EAAE,aAAa,CAAC;KACvC,CAAC;CACH"}
|
|
@@ -35,6 +35,29 @@ export const CANONICAL_TOOLS = deepFreeze([
|
|
|
35
35
|
"subagent",
|
|
36
36
|
"skill",
|
|
37
37
|
]);
|
|
38
|
+
/** Every closed string vocabulary on a descriptor is declared once as a
|
|
39
|
+
* runtime array with its type derived (RFC-02 change 9), so a CLI list, an
|
|
40
|
+
* override validator, or a test reads the array instead of restating it. */
|
|
41
|
+
export const STREAMING_GRANULARITIES = deepFreeze(["token", "message", "none"]);
|
|
42
|
+
export const HARNESS_MODES = deepFreeze([
|
|
43
|
+
"headless-turn",
|
|
44
|
+
"headless-session",
|
|
45
|
+
"interactive",
|
|
46
|
+
]);
|
|
47
|
+
export const STDIN_POLICIES = deepFreeze(["inherit", "close-required"]);
|
|
48
|
+
export const CWD_SLUGS = deepFreeze(["dash-separators", "pi-dash-wrapped", "verbatim"]);
|
|
49
|
+
export const RESUME_STYLES = deepFreeze(["flag", "positional"]);
|
|
50
|
+
export const RESUME_ON_MISSING = deepFreeze(["error", "create"]);
|
|
51
|
+
export const IDENTITY_AUTHORITIES = deepFreeze(["caller-assigned", "harness-minted"]);
|
|
52
|
+
export const DENY_SEMANTICS = deepFreeze(["remove-from-set", "policy-gate", "no-lists"]);
|
|
53
|
+
export const SKILLS_OVERRIDES_VIA = deepFreeze([
|
|
54
|
+
"settings-skilloverrides",
|
|
55
|
+
"config-skills-array",
|
|
56
|
+
]);
|
|
57
|
+
export const VERSION_SOURCE_KINDS = deepFreeze(["npm", "installed"]);
|
|
58
|
+
/** The access preset's value vocabulary: `read` narrows to the read-only
|
|
59
|
+
* tool subset, `write` is no restriction. */
|
|
60
|
+
export const ACCESS_VALUES = deepFreeze(["read", "write"]);
|
|
38
61
|
export const SESSION_INPUT_KINDS = ["claude-sdk-user-message", "pi-rpc-prompt"];
|
|
39
62
|
export const SESSION_RESUME_FLAGS = ["--resume", "--session-id"];
|
|
40
63
|
/** The turn-option vocabulary is closed for the same reason `LimitCode` is:
|
|
@@ -45,6 +68,7 @@ export const SESSION_RESUME_FLAGS = ["--resume", "--session-id"];
|
|
|
45
68
|
export const TURN_OPTION_KEYS = deepFreeze([
|
|
46
69
|
"effort",
|
|
47
70
|
"sandbox",
|
|
71
|
+
"contextWindow",
|
|
48
72
|
"provider",
|
|
49
73
|
"discovery",
|
|
50
74
|
"write",
|
|
@@ -83,20 +107,30 @@ export const resolveRender = (spec, phase) => {
|
|
|
83
107
|
return null;
|
|
84
108
|
return spec.resumeRender ?? spec.render;
|
|
85
109
|
};
|
|
86
|
-
/**
|
|
87
|
-
*
|
|
88
|
-
*
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
*
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
110
|
+
/** The argv tokens one resolved render produces for one value - the only
|
|
111
|
+
* place a render kind becomes tokens (RFC-02 change 1). `toml` quoting is
|
|
112
|
+
* `JSON.stringify`, sufficient for the closed vocabularies that ride
|
|
113
|
+
* config-kv; `verbatim` passes prose (prompt text) and bare TOML literals
|
|
114
|
+
* through unchanged. A flag-value or config-kv render with no value is a
|
|
115
|
+
* descriptor error, never an empty token. */
|
|
116
|
+
export const tokensFor = (render, value, quoting = "toml") => {
|
|
117
|
+
switch (render.kind) {
|
|
118
|
+
case "flag-value":
|
|
119
|
+
if (value === undefined) {
|
|
120
|
+
throw new Error(`render ${render.flag} needs a value and none was given`);
|
|
121
|
+
}
|
|
122
|
+
return [...(render.extraFlags ?? []), render.flag, value];
|
|
123
|
+
case "config-kv":
|
|
124
|
+
if (value === undefined) {
|
|
125
|
+
throw new Error(`render ${render.flag} ${render.key} needs a value and none was given`);
|
|
126
|
+
}
|
|
127
|
+
return [render.flag, `${render.key}=${quoting === "toml" ? JSON.stringify(value) : value}`];
|
|
128
|
+
case "flag-list":
|
|
129
|
+
return [...render.flags];
|
|
130
|
+
default: {
|
|
131
|
+
const exhaustive = render;
|
|
132
|
+
return exhaustive;
|
|
133
|
+
}
|
|
134
|
+
}
|
|
101
135
|
};
|
|
102
136
|
//# sourceMappingURL=descriptor.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"descriptor.js","sourceRoot":"","sources":["../../src/knowledge/descriptor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,CAAU,CAAC;AAGxE;;mCAEmC;AACnC,uEAAuE;AACvE,MAAM,CAAC,MAAM,UAAU,GAAG,iEAAiE,CAAC;AAE5F,MAAM,CAAC,MAAM,UAAU,GAAG,CAAI,KAAQ,EAAK,EAAE;IAC3C,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;QAChD,KAAK,MAAM,KAAK,IAAI,MAAM,CAAC,MAAM,CAAC,KAAK,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CAAmC,CAAC,CAAC;YAC1F,CAAC;YACD,OAAO,CAAC,MAAM,CAAC,IAAI,EAAE,GAAG,MAAM,CAAC,GAAG,IAAI,OAAO,KAAK,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC;QAC9F,KAAK,WAAW;YACd,OAAO,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;QAC3B,SAAS,CAAC;YACR,MAAM,UAAU,GAAU,MAAM,CAAC;YACjC,OAAO,UAAU,CAAC;QACpB,CAAC;IACH,CAAC;AACH,CAAC,CAAC"}
|
|
@@ -5,6 +5,18 @@
|
|
|
5
5
|
* descriptor spreads these after its harness-specific phrasings.
|
|
6
6
|
*/
|
|
7
7
|
import type { AuthMatcher, LimitMatcher, TransportMatcher, UnavailableMatcher } from "./descriptor.js";
|
|
8
|
+
/** Bounds on a matcher, enforced wherever one is compiled - the limits
|
|
9
|
+
* scanner and the override loader alike (RFC-02 change 9). They keep a
|
|
10
|
+
* crafted override file from DoS'ing the compiler or the scanner; the
|
|
11
|
+
* input window, not pattern analysis, is the backtracking bound. */
|
|
12
|
+
export declare const MAX_PATTERN_LENGTH = 200;
|
|
13
|
+
export declare const MAX_MATCHERS_PER_KIND = 64;
|
|
14
|
+
/** The only flags a matcher may carry. `g` and `y` are stateful and
|
|
15
|
+
* would make `test()` order-dependent. */
|
|
16
|
+
export declare const MATCHER_FLAGS = "imsu";
|
|
17
|
+
/** Compile one matcher under the bounds. Throws a plain Error naming the
|
|
18
|
+
* violated bound; loaders wrap it in their own refusal type. */
|
|
19
|
+
export declare const compileMatcher: (pattern: string, flags: string | undefined) => RegExp;
|
|
8
20
|
export declare const SHARED_LIMIT_MATCHERS: ReadonlyArray<LimitMatcher>;
|
|
9
21
|
export declare const SHARED_AUTH_MATCHERS: ReadonlyArray<AuthMatcher>;
|
|
10
22
|
export declare const SHARED_TRANSPORT_MATCHERS: ReadonlyArray<TransportMatcher>;
|