@claudexor/schema 3.1.0 → 3.1.2

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.
Files changed (100) hide show
  1. package/dist/agent-capabilities.d.ts +97 -9
  2. package/dist/agent-capabilities.d.ts.map +1 -1
  3. package/dist/agent-capabilities.js +5 -0
  4. package/dist/agent-capabilities.js.map +1 -1
  5. package/dist/apply-eligibility.d.ts +102 -0
  6. package/dist/apply-eligibility.d.ts.map +1 -1
  7. package/dist/apply-eligibility.js +17 -0
  8. package/dist/apply-eligibility.js.map +1 -1
  9. package/dist/budget.d.ts +13 -13
  10. package/dist/budget.d.ts.map +1 -1
  11. package/dist/budget.js +2 -0
  12. package/dist/budget.js.map +1 -1
  13. package/dist/config.d.ts +70 -38
  14. package/dist/config.d.ts.map +1 -1
  15. package/dist/config.js +12 -1
  16. package/dist/config.js.map +1 -1
  17. package/dist/control-operation-responses.d.ts +160 -56
  18. package/dist/control-operation-responses.d.ts.map +1 -1
  19. package/dist/control-operation-responses.js +25 -0
  20. package/dist/control-operation-responses.js.map +1 -1
  21. package/dist/control-run-detail.d.ts +1413 -205
  22. package/dist/control-run-detail.d.ts.map +1 -1
  23. package/dist/control-run-detail.js +6 -0
  24. package/dist/control-run-detail.js.map +1 -1
  25. package/dist/control-run-retry.d.ts +2 -2
  26. package/dist/control.d.ts +486 -163
  27. package/dist/control.d.ts.map +1 -1
  28. package/dist/control.js +23 -28
  29. package/dist/control.js.map +1 -1
  30. package/dist/decision.d.ts +5 -0
  31. package/dist/decision.d.ts.map +1 -1
  32. package/dist/decision.js +7 -3
  33. package/dist/decision.js.map +1 -1
  34. package/dist/delegation.d.ts +73 -0
  35. package/dist/delegation.d.ts.map +1 -0
  36. package/dist/delegation.js +120 -0
  37. package/dist/delegation.js.map +1 -0
  38. package/dist/effort.d.ts +132 -0
  39. package/dist/effort.d.ts.map +1 -0
  40. package/dist/effort.js +167 -0
  41. package/dist/effort.js.map +1 -0
  42. package/dist/events.d.ts +4 -4
  43. package/dist/events.d.ts.map +1 -1
  44. package/dist/events.js +9 -0
  45. package/dist/events.js.map +1 -1
  46. package/dist/gate.d.ts +2 -2
  47. package/dist/harness.d.ts +113 -40
  48. package/dist/harness.d.ts.map +1 -1
  49. package/dist/harness.js +40 -27
  50. package/dist/harness.js.map +1 -1
  51. package/dist/index.d.ts +2 -0
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +2 -0
  54. package/dist/index.js.map +1 -1
  55. package/dist/operation.d.ts +16 -16
  56. package/dist/readiness.d.ts +86 -7
  57. package/dist/readiness.d.ts.map +1 -1
  58. package/dist/readiness.js +4 -0
  59. package/dist/readiness.js.map +1 -1
  60. package/dist/request-requirements.d.ts +7 -7
  61. package/dist/request-requirements.d.ts.map +1 -1
  62. package/dist/request-requirements.js +2 -1
  63. package/dist/request-requirements.js.map +1 -1
  64. package/dist/task.d.ts +104 -59
  65. package/dist/task.d.ts.map +1 -1
  66. package/dist/task.js +20 -8
  67. package/dist/task.js.map +1 -1
  68. package/dist/telemetry.d.ts +103 -65
  69. package/dist/telemetry.d.ts.map +1 -1
  70. package/dist/telemetry.js +6 -9
  71. package/dist/telemetry.js.map +1 -1
  72. package/dist/workspace.d.ts +1 -1
  73. package/dist/workspace.js +7 -7
  74. package/dist/workspace.js.map +1 -1
  75. package/generated/AgentCapabilityCatalog.schema.json +43 -9
  76. package/generated/ControlHarnessListResponse.schema.json +93 -11
  77. package/generated/ControlHarnessSettingsPatch.schema.json +4 -8
  78. package/generated/ControlRunAgainDraft.schema.json +9 -9
  79. package/generated/ControlRunControlResponse.schema.json +8 -0
  80. package/generated/ControlRunDetail.schema.json +119 -21
  81. package/generated/ControlRunListResponse.schema.json +96 -16
  82. package/generated/ControlRunStartRequest.schema.json +9 -9
  83. package/generated/ControlRunSummary.schema.json +96 -16
  84. package/generated/ControlSettingsSnapshot.schema.json +4 -8
  85. package/generated/ControlSettingsUpdateRequest.schema.json +4 -8
  86. package/generated/ControlThreadDetail.schema.json +64 -0
  87. package/generated/ControlThreadTurnRequest.schema.json +4 -8
  88. package/generated/DecisionRecord.schema.json +10 -1
  89. package/generated/GlobalConfig.schema.json +4 -8
  90. package/generated/HarnessManifest.schema.json +47 -11
  91. package/generated/HarnessStatusDto.schema.json +93 -11
  92. package/generated/McpRunHandleResult.schema.json +72 -1
  93. package/generated/McpRunToolResult.schema.json +69 -0
  94. package/generated/ProjectConfig.schema.json +26 -0
  95. package/generated/RunEvent.schema.json +2 -0
  96. package/generated/RunFailure.schema.json +4 -3
  97. package/generated/RunTelemetry.schema.json +61 -2
  98. package/generated/TaskContract.schema.json +48 -12
  99. package/generated/WorkspaceEnvelope.schema.json +6 -6
  100. package/package.json +2 -2
@@ -0,0 +1,120 @@
1
+ import { z } from "zod";
2
+ import { Id } from "./primitives.js";
3
+ export const MAX_DELEGATED_CHILDREN = 8;
4
+ export const DelegatedChildRunIds = z
5
+ .array(Id)
6
+ .max(MAX_DELEGATED_CHILDREN)
7
+ .default([])
8
+ .describe("At most eight server-owned direct Delegate child ids for whole-thread workspace aggregation.");
9
+ /** Install + harness truth used to decide whether Delegate can be offered. */
10
+ export const DelegationCapability = z
11
+ .object({
12
+ available: z
13
+ .boolean()
14
+ .describe("Whether this harness can receive the packaged delegation belt."),
15
+ reason: z
16
+ .enum(["ready", "runtime_unavailable", "manifest_unsupported"])
17
+ .describe("Stable reason for the current delegation capability verdict."),
18
+ remediation: z
19
+ .string()
20
+ .nullable()
21
+ .default(null)
22
+ .describe("Concrete update/repair guidance when unavailable; null when ready."),
23
+ requiresFullAccess: z
24
+ .boolean()
25
+ .default(false)
26
+ .describe("Whether this harness can reach the belt only under a full-access profile."),
27
+ })
28
+ .strict()
29
+ .superRefine((value, ctx) => {
30
+ if (value.available && (value.reason !== "ready" || value.remediation !== null)) {
31
+ ctx.addIssue({
32
+ code: z.ZodIssueCode.custom,
33
+ message: "available Delegate capability requires reason=ready and remediation=null",
34
+ });
35
+ }
36
+ if (!value.available && (value.reason === "ready" || !value.remediation)) {
37
+ ctx.addIssue({
38
+ code: z.ZodIssueCode.custom,
39
+ message: "unavailable Delegate capability requires an unavailable reason and remediation",
40
+ });
41
+ }
42
+ })
43
+ .describe("Engine-owned Delegate capability projection for one harness and installed runtime.");
44
+ /** Why a requested Delegate strategy did or did not become effective. */
45
+ export const RunDelegationReason = z.enum([
46
+ "pending",
47
+ "not_requested",
48
+ "injected_unused",
49
+ "used",
50
+ "runtime_unavailable",
51
+ "manifest_unsupported",
52
+ "access_profile_incompatible",
53
+ "partially_degraded",
54
+ "startup_failed",
55
+ ]);
56
+ export function delegationRemediationForReason(reason) {
57
+ switch (reason) {
58
+ case "runtime_unavailable":
59
+ return "Update or repair the Claudexor runtime, then retry Delegate.";
60
+ case "manifest_unsupported":
61
+ return "Choose a harness with Delegate support, or continue as ordinary Agent.";
62
+ case "access_profile_incompatible":
63
+ return "Use full access for this harness, or choose a harness that can run Delegate in the current access profile.";
64
+ case "startup_failed":
65
+ return "Repair the required delegation belt startup failure, then retry the run.";
66
+ case "partially_degraded":
67
+ return "One selected lane continued as ordinary Agent; inspect its Delegate requirement receipt or choose only Delegate-capable lanes.";
68
+ default:
69
+ return null;
70
+ }
71
+ }
72
+ /**
73
+ * One run-level Delegate receipt. `effective` means the engine actually
74
+ * injected the descriptor; it is not a guess that an adapter reported ready.
75
+ * `used` requires typed belt-tool evidence and can never be inferred from prose.
76
+ */
77
+ export const RunDelegationInfo = z
78
+ .object({
79
+ requested: z.boolean().default(false),
80
+ effective: z.boolean().default(false),
81
+ used: z.boolean().default(false),
82
+ reason: RunDelegationReason.default("not_requested"),
83
+ remediation: z.string().min(1).nullable().default(null),
84
+ })
85
+ .strict()
86
+ .superRefine((value, ctx) => {
87
+ const expectedRemediation = delegationRemediationForReason(value.reason);
88
+ const valid = (!value.requested && !value.effective && !value.used && value.reason === "not_requested") ||
89
+ (value.requested &&
90
+ !value.effective &&
91
+ !value.used &&
92
+ [
93
+ "pending",
94
+ "runtime_unavailable",
95
+ "manifest_unsupported",
96
+ "access_profile_incompatible",
97
+ ].includes(value.reason)) ||
98
+ (value.requested &&
99
+ value.effective &&
100
+ !value.used &&
101
+ ["injected_unused", "partially_degraded", "startup_failed"].includes(value.reason)) ||
102
+ (value.requested &&
103
+ value.effective &&
104
+ value.used &&
105
+ ["used", "partially_degraded", "startup_failed"].includes(value.reason));
106
+ if (!valid) {
107
+ ctx.addIssue({
108
+ code: z.ZodIssueCode.custom,
109
+ message: "Delegate requested/effective/used fields contradict reason",
110
+ });
111
+ }
112
+ if (value.remediation !== expectedRemediation) {
113
+ ctx.addIssue({
114
+ code: z.ZodIssueCode.custom,
115
+ message: "Delegate remediation must match the stable reason",
116
+ });
117
+ }
118
+ })
119
+ .describe("Engine-owned Delegate requested/effective/used receipt; surfaces project it without parsing model output.");
120
+ //# sourceMappingURL=delegation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"delegation.js","sourceRoot":"","sources":["../src/delegation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AAErC,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC;AAExC,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,KAAK,CAAC,EAAE,CAAC;KACT,GAAG,CAAC,sBAAsB,CAAC;KAC3B,OAAO,CAAC,EAAE,CAAC;KACX,QAAQ,CACP,8FAA8F,CAC/F,CAAC;AAEJ,8EAA8E;AAC9E,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC;KAClC,MAAM,CAAC;IACN,SAAS,EAAE,CAAC;SACT,OAAO,EAAE;SACT,QAAQ,CAAC,gEAAgE,CAAC;IAC7E,MAAM,EAAE,CAAC;SACN,IAAI,CAAC,CAAC,OAAO,EAAE,qBAAqB,EAAE,sBAAsB,CAAC,CAAC;SAC9D,QAAQ,CAAC,8DAA8D,CAAC;IAC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,CAAC,SAAS;YACd,KAAK,CAAC,SAAS;YACf,CAAC,KAAK,CAAC,IAAI;YACX,CAAC,iBAAiB,EAAE,oBAAoB,EAAE,gBAAgB,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QACrF,CAAC,KAAK,CAAC,SAAS;YACd,KAAK,CAAC,SAAS;YACf,KAAK,CAAC,IAAI;YACV,CAAC,MAAM,EAAE,oBAAoB,EAAE,gBAAgB,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC;IAC7E,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,MAAM;YAC3B,OAAO,EAAE,4DAA4D;SACtE,CAAC,CAAC;IACL,CAAC;IACD,IAAI,KAAK,CAAC,WAAW,KAAK,mBAAmB,EAAE,CAAC;QAC9C,GAAG,CAAC,QAAQ,CAAC;YACX,IAAI,EAAE,CAAC,CAAC,YAAY,CAAC,MAAM;YAC3B,OAAO,EAAE,mDAAmD;SAC7D,CAAC,CAAC;IACL,CAAC;AACH,CAAC,CAAC;KACD,QAAQ,CACP,2GAA2G,CAC5G,CAAC"}
@@ -0,0 +1,132 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Reasoning-effort vocabulary: the open wire type and the ONE owner of every
4
+ * derived lookup (per-model narrowing, ladder merging, untyped-surface schema,
5
+ * help text). Split out of harness.ts because effort is its own contract with
6
+ * its own consumers — adapters, the CLI, the MCP tool schema and the macOS
7
+ * picker all resolve through here rather than copying a level list.
8
+ *
9
+ * There is deliberately NO static rank table here. Vendors already return
10
+ * their effort levels ORDERED weakest→strongest (codex `model/list` →
11
+ * `supportedReasoningEfforts` is an ordered array per model; `claude --help`
12
+ * prints the `--effort` values in order), and that order is part of the parsed
13
+ * vendor response. Ordering authority is therefore the vendor's own advertised
14
+ * sequence: a model's ladder is its own ordered list, a harness's ladder is
15
+ * the positional merge of its models' lists (`mergeEffortLadders`), and a
16
+ * level's rank is its position in that merged list. A second, hand-maintained
17
+ * copy of that knowledge can only ever disagree with the first.
18
+ */
19
+ /** Longest effort slug accepted on the wire. */
20
+ export declare const EFFORT_HINT_MAX_LENGTH = 32;
21
+ /** Lowercase slug shape: `low`, `xhigh`, `ultra`, `super-max`, `turbo_2`. */
22
+ export declare const EFFORT_HINT_PATTERN: RegExp;
23
+ /**
24
+ * OPEN cross-harness reasoning-effort vocabulary — deliberately a bounded slug,
25
+ * not an enum, mirroring the vendor contract (codex's own generated schema types
26
+ * `ReasoningEffort` as "a non-empty reasoning effort value advertised by the
27
+ * model"). Adapters advertise the subset they actually accept per (harness,
28
+ * model); the shared normalizer passes an advertised level through verbatim,
29
+ * clamps an unadvertised-but-mergeable one onto the nearest advertised level
30
+ * inside the vendor's own order, and REFUSES a level the merged ladder has
31
+ * never seen — so a vendor level newer than this repo works with no code
32
+ * change, and a typo is never silently downgraded.
33
+ */
34
+ export declare const EffortHint: z.ZodString;
35
+ export type EffortHint = z.infer<typeof EffortHint>;
36
+ /** What one model advertises: its ordered effort vocabulary and vendor default. */
37
+ export declare const ModelEffortCapability: z.ZodObject<{
38
+ levels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
39
+ default: z.ZodDefault<z.ZodNullable<z.ZodString>>;
40
+ }, "strict", z.ZodTypeAny, {
41
+ levels: string[];
42
+ default: string | null;
43
+ }, {
44
+ levels?: string[] | undefined;
45
+ default?: string | null | undefined;
46
+ }>;
47
+ export type ModelEffortCapability = z.infer<typeof ModelEffortCapability>;
48
+ /**
49
+ * How every surface describes the effort vocabulary in help and refusal text.
50
+ * ONE owner (INV-122) so no CLI string hand-copies a level list — and it
51
+ * deliberately names NO levels of its own: the real answer is per (harness,
52
+ * model), lives in the manifest, and is ordered by the vendor. Surfaces that
53
+ * know the resolved harness/model name the actual advertised set instead.
54
+ */
55
+ export declare const EFFORT_HINT_HELP: string;
56
+ /**
57
+ * JSON-Schema fragment for an effort value on UNTYPED surfaces (the MCP tool
58
+ * schema). ONE owner (INV-121/122): the bounds come from the same constants the
59
+ * zod SSOT enforces, so no surface hand-copies a level list — and, critically,
60
+ * the surface stays as OPEN as the vendor contract. Pinning an enum here would
61
+ * reject a level a model genuinely advertises, which is the bug this design
62
+ * exists to prevent.
63
+ *
64
+ * The guidance is `EFFORT_HINT_HELP`, the SAME string the CLI renders, so an MCP
65
+ * client and a `--effort` refusal describe the vocabulary identically.
66
+ */
67
+ export declare function effortJsonSchema(description: string): Record<string, unknown>;
68
+ /**
69
+ * The effort vocabulary advertised for one (harness, model) pair. ONE owner for
70
+ * the per-model narrowing (INV-122): the model's own advertised list when the
71
+ * probe recorded one, else the harness-wide merged ladder. Every surface that
72
+ * needs to know "what efforts may this run use" resolves through here.
73
+ */
74
+ export declare function effortLevelsForModel(capabilities: {
75
+ effort_levels: readonly EffortHint[];
76
+ model_effort_levels: Record<string, ModelEffortCapability>;
77
+ }, model: string | null | undefined): readonly EffortHint[];
78
+ /** Result of merging several vendor-ordered effort ladders into one. */
79
+ export interface MergedEffortLadder {
80
+ /**
81
+ * The merged RANK order, weakest→strongest, honoring every input list's own
82
+ * order when they are mutually consistent. It carries ONLY levels some input
83
+ * list actually ordered against a neighbor; a level no list constrains lives
84
+ * in `unconstrained` instead. When the inputs are NOT consistent
85
+ * (`consistent` false), this is a first-seen deduplication — usable as a
86
+ * display set, never as a rank authority.
87
+ */
88
+ order: EffortHint[];
89
+ /**
90
+ * Levels that appear in some input list but share NO ordering constraint
91
+ * with any other level (each came only from single-level lists). Their
92
+ * position is UNKNOWN, not maximal: the old behavior let a plain topological
93
+ * tail place `medium` ABOVE `high` in a merge of ["low","high"] and
94
+ * ["medium"], silently making the unconstrained level the strongest rank.
95
+ * They stay advertised (membership, pickers), but clamping to or from them
96
+ * refuses with disclosure — exactly like the inconsistent case — because any
97
+ * rank for them would be invented.
98
+ */
99
+ unconstrained: EffortHint[];
100
+ /**
101
+ * False when two input lists genuinely contradict each other's relative
102
+ * order (`a` before `b` in one, `b` before `a` in another). Cross-model
103
+ * clamping is then IMPOSSIBLE for the affected harness — there is no honest
104
+ * rank to clamp along — and consumers must refuse with disclosure rather
105
+ * than invent an order (see `resolveEffort`'s ladder argument).
106
+ */
107
+ consistent: boolean;
108
+ }
109
+ /**
110
+ * Positional merge of vendor-ordered effort ladders — the ONE owner of
111
+ * cross-model effort ordering (INV-122). Each input list is treated as a chain
112
+ * of ordering constraints exactly as the vendor advertised it; the merge is a
113
+ * stable topological sort (ties break on first appearance across the inputs),
114
+ * so a set of lists that are prefixes/subsets of one another merge into the
115
+ * longest ladder, and a brand-new vendor level lands at its vendor-advertised
116
+ * position with no code change here.
117
+ *
118
+ * A level that carries NO ordering constraint at all (it only ever appears in
119
+ * single-level lists) has an UNKNOWN position, not a maximal one: a plain
120
+ * topological tail would park it after everything else and accidentally crown
121
+ * it the strongest rank (merging ["low","high"] with ["medium"] used to yield
122
+ * medium ABOVE high). Such levels are returned separately as `unconstrained`
123
+ * — advertised but unrankable — so no consumer can clamp along a position the
124
+ * vendor never stated. (Disconnected multi-level chains remain approximated
125
+ * by first-seen tie-breaking, as before.)
126
+ *
127
+ * The Swift side orders its pickers by merging the manifest's already-ordered
128
+ * `effort_levels`/`model_effort_levels` arrays the same way (`EffortLadder`,
129
+ * display ordering only — Swift never clamps, so it keeps the flat merge).
130
+ */
131
+ export declare function mergeEffortLadders(lists: ReadonlyArray<readonly EffortHint[]>): MergedEffortLadder;
132
+ //# sourceMappingURL=effort.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"effort.d.ts","sourceRoot":"","sources":["../src/effort.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;GAgBG;AAEH,gDAAgD;AAChD,eAAO,MAAM,sBAAsB,KAAK,CAAC;AACzC,6EAA6E;AAC7E,eAAO,MAAM,mBAAmB,QAAkC,CAAC;AAEnE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,UAAU,aAUpB,CAAC;AACJ,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,UAAU,CAAC,CAAC;AAEpD,mFAAmF;AACnF,eAAO,MAAM,qBAAqB;;;;;;;;;EAamC,CAAC;AACtE,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAE1E;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,QAEiD,CAAC;AAE/E;;;;;;;;;;GAUG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAQ7E;AAED;;;;;GAKG;AACH,wBAAgB,oBAAoB,CAClC,YAAY,EAAE;IACZ,aAAa,EAAE,SAAS,UAAU,EAAE,CAAC;IACrC,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;CAC5D,EACD,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAC/B,SAAS,UAAU,EAAE,CAIvB;AAED,wEAAwE;AACxE,MAAM,WAAW,kBAAkB;IACjC;;;;;;;OAOG;IACH,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB;;;;;;;;;OASG;IACH,aAAa,EAAE,UAAU,EAAE,CAAC;IAC5B;;;;;;OAMG;IACH,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,aAAa,CAAC,SAAS,UAAU,EAAE,CAAC,GAC1C,kBAAkB,CAkDpB"}
package/dist/effort.js ADDED
@@ -0,0 +1,167 @@
1
+ import { z } from "zod";
2
+ /**
3
+ * Reasoning-effort vocabulary: the open wire type and the ONE owner of every
4
+ * derived lookup (per-model narrowing, ladder merging, untyped-surface schema,
5
+ * help text). Split out of harness.ts because effort is its own contract with
6
+ * its own consumers — adapters, the CLI, the MCP tool schema and the macOS
7
+ * picker all resolve through here rather than copying a level list.
8
+ *
9
+ * There is deliberately NO static rank table here. Vendors already return
10
+ * their effort levels ORDERED weakest→strongest (codex `model/list` →
11
+ * `supportedReasoningEfforts` is an ordered array per model; `claude --help`
12
+ * prints the `--effort` values in order), and that order is part of the parsed
13
+ * vendor response. Ordering authority is therefore the vendor's own advertised
14
+ * sequence: a model's ladder is its own ordered list, a harness's ladder is
15
+ * the positional merge of its models' lists (`mergeEffortLadders`), and a
16
+ * level's rank is its position in that merged list. A second, hand-maintained
17
+ * copy of that knowledge can only ever disagree with the first.
18
+ */
19
+ /** Longest effort slug accepted on the wire. */
20
+ export const EFFORT_HINT_MAX_LENGTH = 32;
21
+ /** Lowercase slug shape: `low`, `xhigh`, `ultra`, `super-max`, `turbo_2`. */
22
+ export const EFFORT_HINT_PATTERN = /^[a-z0-9]+(?:[_-][a-z0-9]+)*$/;
23
+ /**
24
+ * OPEN cross-harness reasoning-effort vocabulary — deliberately a bounded slug,
25
+ * not an enum, mirroring the vendor contract (codex's own generated schema types
26
+ * `ReasoningEffort` as "a non-empty reasoning effort value advertised by the
27
+ * model"). Adapters advertise the subset they actually accept per (harness,
28
+ * model); the shared normalizer passes an advertised level through verbatim,
29
+ * clamps an unadvertised-but-mergeable one onto the nearest advertised level
30
+ * inside the vendor's own order, and REFUSES a level the merged ladder has
31
+ * never seen — so a vendor level newer than this repo works with no code
32
+ * change, and a typo is never silently downgraded.
33
+ */
34
+ export const EffortHint = z
35
+ .string()
36
+ .min(1)
37
+ .max(EFFORT_HINT_MAX_LENGTH)
38
+ .regex(EFFORT_HINT_PATTERN, "effort must be a lowercase slug (letters, digits, single - or _ separators)")
39
+ .describe("Cross-harness reasoning-effort level as a lowercase slug (open vocabulary, mirroring the vendor contract); adapters advertise the levels they accept per model, ordered weakest to strongest by the vendor itself, and a shared normalizer passes advertised levels through, clamps inside the vendor order, and refuses levels the advertised ladder has never seen.");
40
+ /** What one model advertises: its ordered effort vocabulary and vendor default. */
41
+ export const ModelEffortCapability = z
42
+ .object({
43
+ levels: z
44
+ .array(EffortHint)
45
+ .default([])
46
+ .describe("Ordered (weakest to strongest) reasoning-effort levels this model advertises, in the vendor's own order."),
47
+ default: EffortHint.nullable()
48
+ .default(null)
49
+ .describe("The effort level the vendor uses for this model when none is requested."),
50
+ })
51
+ .strict()
52
+ .describe("Reasoning-effort vocabulary a single model advertises.");
53
+ /**
54
+ * How every surface describes the effort vocabulary in help and refusal text.
55
+ * ONE owner (INV-122) so no CLI string hand-copies a level list — and it
56
+ * deliberately names NO levels of its own: the real answer is per (harness,
57
+ * model), lives in the manifest, and is ordered by the vendor. Surfaces that
58
+ * know the resolved harness/model name the actual advertised set instead.
59
+ */
60
+ export const EFFORT_HINT_HELP = "reasoning-effort level the resolved harness/model advertises " +
61
+ "(a lowercase slug; each vendor lists its own levels, weakest to strongest)";
62
+ /**
63
+ * JSON-Schema fragment for an effort value on UNTYPED surfaces (the MCP tool
64
+ * schema). ONE owner (INV-121/122): the bounds come from the same constants the
65
+ * zod SSOT enforces, so no surface hand-copies a level list — and, critically,
66
+ * the surface stays as OPEN as the vendor contract. Pinning an enum here would
67
+ * reject a level a model genuinely advertises, which is the bug this design
68
+ * exists to prevent.
69
+ *
70
+ * The guidance is `EFFORT_HINT_HELP`, the SAME string the CLI renders, so an MCP
71
+ * client and a `--effort` refusal describe the vocabulary identically.
72
+ */
73
+ export function effortJsonSchema(description) {
74
+ return {
75
+ type: "string",
76
+ minLength: 1,
77
+ maxLength: EFFORT_HINT_MAX_LENGTH,
78
+ pattern: EFFORT_HINT_PATTERN.source,
79
+ description: `${description} Expects a ${EFFORT_HINT_HELP}; an advertised level is passed through as-is.`,
80
+ };
81
+ }
82
+ /**
83
+ * The effort vocabulary advertised for one (harness, model) pair. ONE owner for
84
+ * the per-model narrowing (INV-122): the model's own advertised list when the
85
+ * probe recorded one, else the harness-wide merged ladder. Every surface that
86
+ * needs to know "what efforts may this run use" resolves through here.
87
+ */
88
+ export function effortLevelsForModel(capabilities, model) {
89
+ const id = typeof model === "string" ? model.trim() : "";
90
+ const advertised = id ? capabilities.model_effort_levels[id]?.levels : undefined;
91
+ return advertised && advertised.length > 0 ? advertised : capabilities.effort_levels;
92
+ }
93
+ /**
94
+ * Positional merge of vendor-ordered effort ladders — the ONE owner of
95
+ * cross-model effort ordering (INV-122). Each input list is treated as a chain
96
+ * of ordering constraints exactly as the vendor advertised it; the merge is a
97
+ * stable topological sort (ties break on first appearance across the inputs),
98
+ * so a set of lists that are prefixes/subsets of one another merge into the
99
+ * longest ladder, and a brand-new vendor level lands at its vendor-advertised
100
+ * position with no code change here.
101
+ *
102
+ * A level that carries NO ordering constraint at all (it only ever appears in
103
+ * single-level lists) has an UNKNOWN position, not a maximal one: a plain
104
+ * topological tail would park it after everything else and accidentally crown
105
+ * it the strongest rank (merging ["low","high"] with ["medium"] used to yield
106
+ * medium ABOVE high). Such levels are returned separately as `unconstrained`
107
+ * — advertised but unrankable — so no consumer can clamp along a position the
108
+ * vendor never stated. (Disconnected multi-level chains remain approximated
109
+ * by first-seen tie-breaking, as before.)
110
+ *
111
+ * The Swift side orders its pickers by merging the manifest's already-ordered
112
+ * `effort_levels`/`model_effort_levels` arrays the same way (`EffortLadder`,
113
+ * display ordering only — Swift never clamps, so it keeps the flat merge).
114
+ */
115
+ export function mergeEffortLadders(lists) {
116
+ const firstSeen = [];
117
+ const successors = new Map();
118
+ const indegree = new Map();
119
+ const constrained = new Set();
120
+ for (const list of lists) {
121
+ for (const level of list) {
122
+ if (!indegree.has(level)) {
123
+ indegree.set(level, 0);
124
+ successors.set(level, new Set());
125
+ firstSeen.push(level);
126
+ }
127
+ }
128
+ for (let i = 1; i < list.length; i += 1) {
129
+ const before = list[i - 1];
130
+ const after = list[i];
131
+ if (before === after)
132
+ continue;
133
+ constrained.add(before);
134
+ constrained.add(after);
135
+ const outs = successors.get(before);
136
+ if (!outs.has(after)) {
137
+ outs.add(after);
138
+ indegree.set(after, (indegree.get(after) ?? 0) + 1);
139
+ }
140
+ }
141
+ }
142
+ // Every edge connects two constrained levels, so excluding the unconstrained
143
+ // ones from the sort cannot change any indegree.
144
+ const ranked = firstSeen.filter((level) => constrained.has(level));
145
+ const unconstrained = firstSeen.filter((level) => !constrained.has(level));
146
+ const order = [];
147
+ const emitted = new Set();
148
+ while (emitted.size < ranked.length) {
149
+ const next = ranked.find((level) => !emitted.has(level) && indegree.get(level) === 0);
150
+ if (next === undefined) {
151
+ // A cycle: the vendors' own orders contradict each other. Do not invent
152
+ // an order — fall back to first-seen for display and say so.
153
+ return {
154
+ order: [...order, ...ranked.filter((level) => !emitted.has(level))],
155
+ unconstrained,
156
+ consistent: false,
157
+ };
158
+ }
159
+ emitted.add(next);
160
+ order.push(next);
161
+ for (const succ of successors.get(next) ?? []) {
162
+ indegree.set(succ, (indegree.get(succ) ?? 1) - 1);
163
+ }
164
+ }
165
+ return { order, unconstrained, consistent: true };
166
+ }
167
+ //# sourceMappingURL=effort.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"effort.js","sourceRoot":"","sources":["../src/effort.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;;;;;;;;;;;;;;;GAgBG;AAEH,gDAAgD;AAChD,MAAM,CAAC,MAAM,sBAAsB,GAAG,EAAE,CAAC;AACzC,6EAA6E;AAC7E,MAAM,CAAC,MAAM,mBAAmB,GAAG,+BAA+B,CAAC;AAEnE;;;;;;;;;;GAUG;AACH,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC;KACxB,MAAM,EAAE;KACR,GAAG,CAAC,CAAC,CAAC;KACN,GAAG,CAAC,sBAAsB,CAAC;KAC3B,KAAK,CACJ,mBAAmB,EACnB,6EAA6E,CAC9E;KACA,QAAQ,CACP,uWAAuW,CACxW,CAAC;AAGJ,mFAAmF;AACnF,MAAM,CAAC,MAAM,qBAAqB,GAAG,CAAC;KACnC,MAAM,CAA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,CAAC;IACH,CAAC;IACD,OAAO,EAAE,KAAK,EAAE,aAAa,EAAE,UAAU,EAAE,IAAI,EAAE,CAAC;AACpD,CAAC"}
package/dist/events.d.ts CHANGED
@@ -36,7 +36,7 @@ export declare const ThreadHeadPing: z.ZodObject<{
36
36
  revision: number;
37
37
  }>;
38
38
  export type ThreadHeadPing = z.infer<typeof ThreadHeadPing>;
39
- export declare const RunEventType: z.ZodEnum<["run.created", "task.contract.created", "context.pack.created", "project.git.initialized", "project.claude_bridge.created", "budget.lease.created", "budget.observation", "budget.cash", "policy.web.upgraded", "harness.started", "harness.event", "harness.completed", "route.fallback.started", "route.fallback.completed", "route.fallback.exhausted", "route.transient.detected", "route.transient.retry_scheduled", "route.profile.headroom_exceeded", "route.profile.rotated", "route.profile.rotation_exhausted", "route.transient.exhausted", "route.fallback.auth_switched", "route.primary.diverged", "route.pool.degraded", "session.continuity", "interaction.requested", "interaction.answered", "interaction.timeout", "interaction.answer_discarded", "plan.progress", "plan.questions", "plan.brief.materialized", "council.started", "council.draft", "council.member.failed", "council.merged", "budget.quota_pressure", "delegation.belt.unavailable", "output.ready", "gate.started", "gate.completed", "review.started", "review.skipped", "reviewer.started", "reviewer.first_event", "reviewer.auth_switched", "reviewer.completed", "reviewer.timed_out", "reviewer.failed", "finding.revalidated", "synthesis.started", "arbitration.completed", "work_product.emitted", "work_product.adopted", "control.requested", "control.applied", "control.rejected", "run.blocked", "run.completed", "run.failed", "run.continuation", "run.continuation.denied"]>;
39
+ export declare const RunEventType: z.ZodEnum<["run.created", "task.contract.created", "context.pack.created", "project.git.initialized", "project.claude_bridge.created", "budget.lease.created", "budget.observation", "budget.cash", "policy.web.upgraded", "harness.started", "harness.event", "harness.completed", "route.fallback.started", "route.fallback.completed", "route.fallback.exhausted", "route.transient.detected", "route.transient.retry_scheduled", "route.profile.headroom_exceeded", "route.profile.rotated", "route.profile.rotation_exhausted", "route.transient.exhausted", "route.fallback.auth_switched", "route.primary.diverged", "route.pool.degraded", "session.continuity", "interaction.requested", "interaction.answered", "interaction.timeout", "interaction.answer_discarded", "plan.progress", "plan.questions", "plan.brief.materialized", "council.started", "council.draft", "council.member.failed", "council.merged", "budget.quota_pressure", "delegation.belt.unavailable", "delegation.belt.degraded", "output.ready", "gate.started", "gate.completed", "review.preflight", "review.started", "review.skipped", "reviewer.started", "reviewer.first_event", "reviewer.auth_switched", "reviewer.completed", "reviewer.timed_out", "reviewer.failed", "finding.revalidated", "synthesis.started", "arbitration.completed", "work_product.emitted", "work_product.adopted", "control.requested", "control.applied", "control.rejected", "run.blocked", "run.completed", "run.failed", "run.continuation", "run.continuation.denied"]>;
40
40
  export type RunEventType = z.infer<typeof RunEventType>;
41
41
  /**
42
42
  * Typed payload for `route.fallback.*` events. The orchestrator validates this
@@ -165,10 +165,10 @@ export declare const RunEvent: z.ZodObject<{
165
165
  /** Thread this run is a turn of, when any. Lets the global event multiplex
166
166
  * route live progress to a chat surface without a reverse job lookup. */
167
167
  thread_id: z.ZodOptional<z.ZodString>;
168
- type: z.ZodEnum<["run.created", "task.contract.created", "context.pack.created", "project.git.initialized", "project.claude_bridge.created", "budget.lease.created", "budget.observation", "budget.cash", "policy.web.upgraded", "harness.started", "harness.event", "harness.completed", "route.fallback.started", "route.fallback.completed", "route.fallback.exhausted", "route.transient.detected", "route.transient.retry_scheduled", "route.profile.headroom_exceeded", "route.profile.rotated", "route.profile.rotation_exhausted", "route.transient.exhausted", "route.fallback.auth_switched", "route.primary.diverged", "route.pool.degraded", "session.continuity", "interaction.requested", "interaction.answered", "interaction.timeout", "interaction.answer_discarded", "plan.progress", "plan.questions", "plan.brief.materialized", "council.started", "council.draft", "council.member.failed", "council.merged", "budget.quota_pressure", "delegation.belt.unavailable", "output.ready", "gate.started", "gate.completed", "review.started", "review.skipped", "reviewer.started", "reviewer.first_event", "reviewer.auth_switched", "reviewer.completed", "reviewer.timed_out", "reviewer.failed", "finding.revalidated", "synthesis.started", "arbitration.completed", "work_product.emitted", "work_product.adopted", "control.requested", "control.applied", "control.rejected", "run.blocked", "run.completed", "run.failed", "run.continuation", "run.continuation.denied"]>;
168
+ type: z.ZodEnum<["run.created", "task.contract.created", "context.pack.created", "project.git.initialized", "project.claude_bridge.created", "budget.lease.created", "budget.observation", "budget.cash", "policy.web.upgraded", "harness.started", "harness.event", "harness.completed", "route.fallback.started", "route.fallback.completed", "route.fallback.exhausted", "route.transient.detected", "route.transient.retry_scheduled", "route.profile.headroom_exceeded", "route.profile.rotated", "route.profile.rotation_exhausted", "route.transient.exhausted", "route.fallback.auth_switched", "route.primary.diverged", "route.pool.degraded", "session.continuity", "interaction.requested", "interaction.answered", "interaction.timeout", "interaction.answer_discarded", "plan.progress", "plan.questions", "plan.brief.materialized", "council.started", "council.draft", "council.member.failed", "council.merged", "budget.quota_pressure", "delegation.belt.unavailable", "delegation.belt.degraded", "output.ready", "gate.started", "gate.completed", "review.preflight", "review.started", "review.skipped", "reviewer.started", "reviewer.first_event", "reviewer.auth_switched", "reviewer.completed", "reviewer.timed_out", "reviewer.failed", "finding.revalidated", "synthesis.started", "arbitration.completed", "work_product.emitted", "work_product.adopted", "control.requested", "control.applied", "control.rejected", "run.blocked", "run.completed", "run.failed", "run.continuation", "run.continuation.denied"]>;
169
169
  payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
170
170
  }, "strip", z.ZodTypeAny, {
171
- type: "run.created" | "task.contract.created" | "context.pack.created" | "project.git.initialized" | "project.claude_bridge.created" | "budget.lease.created" | "budget.observation" | "budget.cash" | "policy.web.upgraded" | "harness.started" | "harness.event" | "harness.completed" | "route.fallback.started" | "route.fallback.completed" | "route.fallback.exhausted" | "route.transient.detected" | "route.transient.retry_scheduled" | "route.profile.headroom_exceeded" | "route.profile.rotated" | "route.profile.rotation_exhausted" | "route.transient.exhausted" | "route.fallback.auth_switched" | "route.primary.diverged" | "route.pool.degraded" | "session.continuity" | "interaction.requested" | "interaction.answered" | "interaction.timeout" | "interaction.answer_discarded" | "plan.progress" | "plan.questions" | "plan.brief.materialized" | "council.started" | "council.draft" | "council.member.failed" | "council.merged" | "budget.quota_pressure" | "delegation.belt.unavailable" | "output.ready" | "gate.started" | "gate.completed" | "review.started" | "review.skipped" | "reviewer.started" | "reviewer.first_event" | "reviewer.auth_switched" | "reviewer.completed" | "reviewer.timed_out" | "reviewer.failed" | "finding.revalidated" | "synthesis.started" | "arbitration.completed" | "work_product.emitted" | "work_product.adopted" | "control.requested" | "control.applied" | "control.rejected" | "run.blocked" | "run.completed" | "run.failed" | "run.continuation" | "run.continuation.denied";
171
+ type: "run.created" | "task.contract.created" | "context.pack.created" | "project.git.initialized" | "project.claude_bridge.created" | "budget.lease.created" | "budget.observation" | "budget.cash" | "policy.web.upgraded" | "harness.started" | "harness.event" | "harness.completed" | "route.fallback.started" | "route.fallback.completed" | "route.fallback.exhausted" | "route.transient.detected" | "route.transient.retry_scheduled" | "route.profile.headroom_exceeded" | "route.profile.rotated" | "route.profile.rotation_exhausted" | "route.transient.exhausted" | "route.fallback.auth_switched" | "route.primary.diverged" | "route.pool.degraded" | "session.continuity" | "interaction.requested" | "interaction.answered" | "interaction.timeout" | "interaction.answer_discarded" | "plan.progress" | "plan.questions" | "plan.brief.materialized" | "council.started" | "council.draft" | "council.member.failed" | "council.merged" | "budget.quota_pressure" | "delegation.belt.unavailable" | "delegation.belt.degraded" | "output.ready" | "gate.started" | "gate.completed" | "review.preflight" | "review.started" | "review.skipped" | "reviewer.started" | "reviewer.first_event" | "reviewer.auth_switched" | "reviewer.completed" | "reviewer.timed_out" | "reviewer.failed" | "finding.revalidated" | "synthesis.started" | "arbitration.completed" | "work_product.emitted" | "work_product.adopted" | "control.requested" | "control.applied" | "control.rejected" | "run.blocked" | "run.completed" | "run.failed" | "run.continuation" | "run.continuation.denied";
172
172
  ts: string;
173
173
  payload: Record<string, unknown>;
174
174
  run_id: string;
@@ -176,7 +176,7 @@ export declare const RunEvent: z.ZodObject<{
176
176
  thread_id?: string | undefined;
177
177
  seq?: number | undefined;
178
178
  }, {
179
- type: "run.created" | "task.contract.created" | "context.pack.created" | "project.git.initialized" | "project.claude_bridge.created" | "budget.lease.created" | "budget.observation" | "budget.cash" | "policy.web.upgraded" | "harness.started" | "harness.event" | "harness.completed" | "route.fallback.started" | "route.fallback.completed" | "route.fallback.exhausted" | "route.transient.detected" | "route.transient.retry_scheduled" | "route.profile.headroom_exceeded" | "route.profile.rotated" | "route.profile.rotation_exhausted" | "route.transient.exhausted" | "route.fallback.auth_switched" | "route.primary.diverged" | "route.pool.degraded" | "session.continuity" | "interaction.requested" | "interaction.answered" | "interaction.timeout" | "interaction.answer_discarded" | "plan.progress" | "plan.questions" | "plan.brief.materialized" | "council.started" | "council.draft" | "council.member.failed" | "council.merged" | "budget.quota_pressure" | "delegation.belt.unavailable" | "output.ready" | "gate.started" | "gate.completed" | "review.started" | "review.skipped" | "reviewer.started" | "reviewer.first_event" | "reviewer.auth_switched" | "reviewer.completed" | "reviewer.timed_out" | "reviewer.failed" | "finding.revalidated" | "synthesis.started" | "arbitration.completed" | "work_product.emitted" | "work_product.adopted" | "control.requested" | "control.applied" | "control.rejected" | "run.blocked" | "run.completed" | "run.failed" | "run.continuation" | "run.continuation.denied";
179
+ type: "run.created" | "task.contract.created" | "context.pack.created" | "project.git.initialized" | "project.claude_bridge.created" | "budget.lease.created" | "budget.observation" | "budget.cash" | "policy.web.upgraded" | "harness.started" | "harness.event" | "harness.completed" | "route.fallback.started" | "route.fallback.completed" | "route.fallback.exhausted" | "route.transient.detected" | "route.transient.retry_scheduled" | "route.profile.headroom_exceeded" | "route.profile.rotated" | "route.profile.rotation_exhausted" | "route.transient.exhausted" | "route.fallback.auth_switched" | "route.primary.diverged" | "route.pool.degraded" | "session.continuity" | "interaction.requested" | "interaction.answered" | "interaction.timeout" | "interaction.answer_discarded" | "plan.progress" | "plan.questions" | "plan.brief.materialized" | "council.started" | "council.draft" | "council.member.failed" | "council.merged" | "budget.quota_pressure" | "delegation.belt.unavailable" | "delegation.belt.degraded" | "output.ready" | "gate.started" | "gate.completed" | "review.preflight" | "review.started" | "review.skipped" | "reviewer.started" | "reviewer.first_event" | "reviewer.auth_switched" | "reviewer.completed" | "reviewer.timed_out" | "reviewer.failed" | "finding.revalidated" | "synthesis.started" | "arbitration.completed" | "work_product.emitted" | "work_product.adopted" | "control.requested" | "control.applied" | "control.rejected" | "run.blocked" | "run.completed" | "run.failed" | "run.continuation" | "run.continuation.denied";
180
180
  ts: string;
181
181
  run_id: string;
182
182
  task_id: string;
@@ -1 +1 @@
1
- {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;EAU4C,CAAC;AAC7E,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAEtE,eAAO,MAAM,cAAc;;;;;;;;;;;;EAoBxB,CAAC;AACJ,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D,eAAO,MAAM,YAAY,i6CAkHtB,CAAC;AACJ,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAExD;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;EAoB9B,CAAC;AACJ,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE;;;;;;;;GAQG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;EAiBrC,CAAC;AACJ,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEtF;;4EAE4E;AAC5E,eAAO,MAAM,cAAc,2GAW6C,CAAC;AACzE,MA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A2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEtF;;4EAE4E;AAC5E,eAAO,MAAM,cAAc,2GAW6C,CAAC;AACzE,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAE5D;;;;;;;;;GASG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAyBlC,CAAC;AACJ,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAEhF,iDAAiD;AACjD,eAAO,MAAM,QAAQ;IAEjB;;;;OAIG;;;;;IAYH;6EACyE;;;;;;;;;;;;;;;;;;;;EAKO,CAAC;AACrF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,QAAQ,CAAC,CAAC"}
package/dist/events.js CHANGED
@@ -103,9 +103,18 @@ export const RunEventType = z
103
103
  * failed belt so the terminal outcome and UI can disclose it. Payload:
104
104
  * {attempt_id, harness_id, server_name, reason}. */
105
105
  "delegation.belt.unavailable",
106
+ /** Delegate was requested but known unavailable before harness startup, so
107
+ * the run continued as an ordinary Agent with a durable warning. */
108
+ "delegation.belt.degraded",
106
109
  "output.ready",
107
110
  "gate.started",
108
111
  "gate.completed",
112
+ /** Reviewer-panel preflight disclosure (INV-105): a requested reviewer
113
+ * knob the resolved panel could not honor was DROPPED instead of refused
114
+ * (the auto panel's per-family `reviewerEfforts` map, which also rides
115
+ * stored replay surfaces). Payload: {ignored_settings: string[]} — the
116
+ * same disclosure channel harness.started uses (QA-070). */
117
+ "review.preflight",
109
118
  "review.started",
110
119
  /** QA-025: the paid reviewer panel was intentionally NOT run — every working
111
120
  * candidate had an empty diff, or no reviewers were configured. Emitted
@@ -1 +1 @@
1
- {"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,E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8B,CAAC;CAChG,CAAC;KACD,QAAQ,CAAC,uEAAuE,CAAC,CAAC"}
package/dist/gate.d.ts CHANGED
@@ -17,8 +17,8 @@ export declare const GateResult: z.ZodObject<{
17
17
  command: string;
18
18
  exit_code: number | null;
19
19
  id: string;
20
- duration_ms: number;
21
20
  required: boolean;
21
+ duration_ms: number;
22
22
  stdout_tail: string | null;
23
23
  stderr_tail: string | null;
24
24
  output_truncated: boolean;
@@ -27,8 +27,8 @@ export declare const GateResult: z.ZodObject<{
27
27
  command: string;
28
28
  exit_code: number | null;
29
29
  id: string;
30
- duration_ms?: number | undefined;
31
30
  required?: boolean | undefined;
31
+ duration_ms?: number | undefined;
32
32
  stdout_tail?: string | null | undefined;
33
33
  stderr_tail?: string | null | undefined;
34
34
  output_truncated?: boolean | undefined;