@claudexor/schema 3.0.4 → 3.1.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/dist/agent-capabilities.d.ts +45 -8
- package/dist/agent-capabilities.d.ts.map +1 -1
- package/dist/agent-capabilities.js +14 -0
- package/dist/agent-capabilities.js.map +1 -1
- package/dist/apply-eligibility.d.ts +384 -18
- package/dist/apply-eligibility.d.ts.map +1 -1
- package/dist/apply-eligibility.js +20 -1
- package/dist/apply-eligibility.js.map +1 -1
- package/dist/budget.d.ts +84 -9
- package/dist/budget.d.ts.map +1 -1
- package/dist/budget.js +46 -0
- package/dist/budget.js.map +1 -1
- package/dist/config.d.ts +97 -65
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +12 -1
- package/dist/config.js.map +1 -1
- package/dist/control-operation-responses.d.ts +311 -89
- package/dist/control-operation-responses.d.ts.map +1 -1
- package/dist/control-operation-responses.js +33 -3
- package/dist/control-operation-responses.js.map +1 -1
- package/dist/control-run-detail.d.ts +613 -163
- package/dist/control-run-detail.d.ts.map +1 -1
- package/dist/control-run-detail.js +28 -2
- package/dist/control-run-detail.js.map +1 -1
- package/dist/control-run-retry.d.ts +1 -1
- package/dist/control-run-scope.d.ts +1 -1
- package/dist/control-thread-apply.d.ts +10 -0
- package/dist/control-thread-apply.d.ts.map +1 -1
- package/dist/control.d.ts +791 -232
- package/dist/control.d.ts.map +1 -1
- package/dist/control.js +76 -2
- package/dist/control.js.map +1 -1
- package/dist/decision.d.ts +205 -9
- package/dist/decision.d.ts.map +1 -1
- package/dist/decision.js +69 -1
- package/dist/decision.js.map +1 -1
- package/dist/deep-scan.d.ts +27 -0
- package/dist/deep-scan.d.ts.map +1 -0
- package/dist/deep-scan.js +27 -0
- package/dist/deep-scan.js.map +1 -0
- package/dist/delivery.d.ts +13 -0
- package/dist/delivery.d.ts.map +1 -1
- package/dist/delivery.js +15 -0
- package/dist/delivery.js.map +1 -1
- package/dist/effort.d.ts +132 -0
- package/dist/effort.d.ts.map +1 -0
- package/dist/effort.js +167 -0
- package/dist/effort.js.map +1 -0
- package/dist/events.d.ts +59 -4
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +91 -0
- package/dist/events.js.map +1 -1
- package/dist/gate.d.ts +2 -2
- package/dist/harness.d.ts +209 -28
- package/dist/harness.d.ts.map +1 -1
- package/dist/harness.js +107 -14
- package/dist/harness.js.map +1 -1
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -0
- package/dist/index.js.map +1 -1
- package/dist/operation.d.ts +193 -10
- package/dist/operation.d.ts.map +1 -1
- package/dist/operation.js +45 -0
- package/dist/operation.js.map +1 -1
- package/dist/output-schema-dialect.d.ts +22 -0
- package/dist/output-schema-dialect.d.ts.map +1 -0
- package/dist/output-schema-dialect.js +37 -0
- package/dist/output-schema-dialect.js.map +1 -0
- package/dist/output-schema.d.ts +26 -2
- package/dist/output-schema.d.ts.map +1 -1
- package/dist/output-schema.js +313 -16
- package/dist/output-schema.js.map +1 -1
- package/dist/plan.d.ts +2 -2
- package/dist/problem.d.ts +3 -3
- package/dist/project.d.ts +47 -12
- package/dist/project.d.ts.map +1 -1
- package/dist/project.js +32 -0
- package/dist/project.js.map +1 -1
- package/dist/readiness.d.ts +62 -7
- package/dist/readiness.d.ts.map +1 -1
- package/dist/recovery.d.ts +14 -14
- package/dist/review.d.ts +7 -7
- package/dist/route.d.ts +2 -2
- package/dist/setup.d.ts +288 -94
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +90 -6
- package/dist/setup.js.map +1 -1
- package/dist/status-projection.d.ts +79 -4
- package/dist/status-projection.d.ts.map +1 -1
- package/dist/status-projection.js +161 -4
- package/dist/status-projection.js.map +1 -1
- package/dist/task.d.ts +70 -53
- package/dist/task.d.ts.map +1 -1
- package/dist/task.js +18 -8
- package/dist/task.js.map +1 -1
- package/dist/telemetry.d.ts +795 -32
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +177 -4
- package/dist/telemetry.js.map +1 -1
- package/dist/tool-ref.d.ts +14 -0
- package/dist/tool-ref.d.ts.map +1 -1
- package/dist/tool-ref.js +15 -0
- package/dist/tool-ref.js.map +1 -1
- package/dist/work-report.d.ts +131 -0
- package/dist/work-report.d.ts.map +1 -0
- package/dist/work-report.js +124 -0
- package/dist/work-report.js.map +1 -0
- package/dist/workspace.d.ts +2 -2
- package/generated/AgentCapabilityCatalog.schema.json +39 -8
- package/generated/ControlApplyCheckResponse.schema.json +5 -0
- package/generated/ControlDeliveryResponse.schema.json +14 -0
- package/generated/ControlHarnessListResponse.schema.json +64 -9
- package/generated/ControlHarnessSettingsPatch.schema.json +4 -8
- package/generated/ControlOperationCatalog.schema.json +74 -0
- package/generated/ControlOperationDescriptor.schema.json +74 -0
- package/generated/ControlOperationParameter.schema.json +75 -0
- package/generated/ControlProjectRemoveReceipt.schema.json +58 -0
- package/generated/ControlRunAgainDraft.schema.json +14 -7
- package/generated/ControlRunDetail.schema.json +406 -16
- package/generated/ControlRunListResponse.schema.json +232 -10
- package/generated/ControlRunStartRequest.schema.json +14 -7
- package/generated/ControlRunSummary.schema.json +218 -9
- package/generated/ControlSettingsSnapshot.schema.json +4 -8
- package/generated/ControlSettingsUpdateRequest.schema.json +4 -8
- package/generated/ControlSetupJobCreateRequest.schema.json +2 -1
- package/generated/ControlSetupJobEvent.schema.json +28 -0
- package/generated/ControlSetupJobSnapshot.schema.json +28 -0
- package/generated/ControlThreadApplyResponse.schema.json +14 -0
- package/generated/ControlThreadDetail.schema.json +94 -1
- package/generated/ControlThreadTurnRequest.schema.json +14 -7
- package/generated/DecisionRecord.schema.json +178 -2
- package/generated/GlobalConfig.schema.json +4 -8
- package/generated/HarnessEvent.schema.json +79 -1
- package/generated/HarnessManifest.schema.json +64 -9
- package/generated/HarnessStatusDto.schema.json +64 -9
- package/generated/McpRunHandleResult.schema.json +286 -1
- package/generated/McpRunToolResult.schema.json +171 -1
- package/generated/ProjectConfig.schema.json +26 -0
- package/generated/RoutePoolDegradedPayload.schema.json +79 -0
- package/generated/RunEvent.schema.json +8 -1
- package/generated/RunFailure.schema.json +23 -1
- package/generated/RunTelemetry.schema.json +376 -1
- package/generated/StructuredOutputConformance.schema.json +83 -0
- package/generated/TaskContract.schema.json +13 -1
- package/package.json +2 -2
package/dist/effort.d.ts
ADDED
|
@@ -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;;;;;;;;;;;;;;;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EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;gBACnE,aAAa;gBACb,UAAU,EAAE,KAAK;aAClB,CAAC;QACJ,CAAC;QACD,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QAClB,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,KAAK,MAAM,IAAI,IAAI,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,EAAE,EAAE,CAAC;YAC9C,QAAQ,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;QACpD,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", "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", "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", "output.ready", "gate.started", "gate.completed", "review.started", "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"]>;
|
|
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.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
|
|
@@ -96,6 +96,61 @@ export declare const RoutePrimaryDivergedPayload: z.ZodObject<{
|
|
|
96
96
|
reason?: "quota_exhausted" | "money_exhausted" | "subscription_exhausted" | "rate_limited" | "harness_error" | "stall" | "web_evidence_unsatisfied" | "fallback_model" | "not_portable" | "auth_unavailable" | "readiness_preferred" | "manual" | undefined;
|
|
97
97
|
}>;
|
|
98
98
|
export type RoutePrimaryDivergedPayload = z.infer<typeof RoutePrimaryDivergedPayload>;
|
|
99
|
+
/** The routing stage at which an auto-pool lane was dropped. Typed so a
|
|
100
|
+
* disclosed omission preserves the ACTUAL cause (an access refusal is not an
|
|
101
|
+
* auth failure) instead of collapsing every drop to one reason (QA-043). */
|
|
102
|
+
export declare const RouteDropStage: z.ZodEnum<["discovery", "settings", "credential", "doctor", "capability", "access", "web", "attachment"]>;
|
|
103
|
+
export type RouteDropStage = z.infer<typeof RouteDropStage>;
|
|
104
|
+
/**
|
|
105
|
+
* Typed payload for `route.pool.degraded`. Emitted once at route resolution
|
|
106
|
+
* when an AUTO pool lost lanes and/or clamped width below the requested `n`.
|
|
107
|
+
* It is the canonical requested-vs-effective route receipt: the resolver never
|
|
108
|
+
* duplicates a surviving harness to refill a dropped lane's slot (the QA-043
|
|
109
|
+
* self-race), so the shrink is disclosed here rather than hidden as an
|
|
110
|
+
* identical extra candidate. Explicit pools throw at the drop and never reach
|
|
111
|
+
* this event, so a degraded auto pool is always attributable to real
|
|
112
|
+
* unavailability, not a silent substitution.
|
|
113
|
+
*/
|
|
114
|
+
export declare const RoutePoolDegradedPayload: z.ZodObject<{
|
|
115
|
+
requested_harnesses: z.ZodArray<z.ZodString, "many">;
|
|
116
|
+
effective_harnesses: z.ZodArray<z.ZodString, "many">;
|
|
117
|
+
requested_n: z.ZodNumber;
|
|
118
|
+
effective_n: z.ZodNumber;
|
|
119
|
+
dropped_lanes: z.ZodArray<z.ZodObject<{
|
|
120
|
+
harness_id: z.ZodString;
|
|
121
|
+
stage: z.ZodEnum<["discovery", "settings", "credential", "doctor", "capability", "access", "web", "attachment"]>;
|
|
122
|
+
detail: z.ZodString;
|
|
123
|
+
}, "strip", z.ZodTypeAny, {
|
|
124
|
+
detail: string;
|
|
125
|
+
harness_id: string;
|
|
126
|
+
stage: "web" | "access" | "credential" | "capability" | "settings" | "discovery" | "doctor" | "attachment";
|
|
127
|
+
}, {
|
|
128
|
+
detail: string;
|
|
129
|
+
harness_id: string;
|
|
130
|
+
stage: "web" | "access" | "credential" | "capability" | "settings" | "discovery" | "doctor" | "attachment";
|
|
131
|
+
}>, "many">;
|
|
132
|
+
}, "strip", z.ZodTypeAny, {
|
|
133
|
+
requested_harnesses: string[];
|
|
134
|
+
effective_harnesses: string[];
|
|
135
|
+
requested_n: number;
|
|
136
|
+
effective_n: number;
|
|
137
|
+
dropped_lanes: {
|
|
138
|
+
detail: string;
|
|
139
|
+
harness_id: string;
|
|
140
|
+
stage: "web" | "access" | "credential" | "capability" | "settings" | "discovery" | "doctor" | "attachment";
|
|
141
|
+
}[];
|
|
142
|
+
}, {
|
|
143
|
+
requested_harnesses: string[];
|
|
144
|
+
effective_harnesses: string[];
|
|
145
|
+
requested_n: number;
|
|
146
|
+
effective_n: number;
|
|
147
|
+
dropped_lanes: {
|
|
148
|
+
detail: string;
|
|
149
|
+
harness_id: string;
|
|
150
|
+
stage: "web" | "access" | "credential" | "capability" | "settings" | "discovery" | "doctor" | "attachment";
|
|
151
|
+
}[];
|
|
152
|
+
}>;
|
|
153
|
+
export type RoutePoolDegradedPayload = z.infer<typeof RoutePoolDegradedPayload>;
|
|
99
154
|
/** Append-only event record (one JSONL line). */
|
|
100
155
|
export declare const RunEvent: z.ZodObject<{
|
|
101
156
|
/**
|
|
@@ -110,10 +165,10 @@ export declare const RunEvent: z.ZodObject<{
|
|
|
110
165
|
/** Thread this run is a turn of, when any. Lets the global event multiplex
|
|
111
166
|
* route live progress to a chat surface without a reverse job lookup. */
|
|
112
167
|
thread_id: z.ZodOptional<z.ZodString>;
|
|
113
|
-
type: z.ZodEnum<["run.created", "task.contract.created", "context.pack.created", "project.git.initialized", "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", "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", "output.ready", "gate.started", "gate.completed", "review.started", "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"]>;
|
|
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.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"]>;
|
|
114
169
|
payload: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
115
170
|
}, "strip", z.ZodTypeAny, {
|
|
116
|
-
type: "run.created" | "task.contract.created" | "context.pack.created" | "project.git.initialized" | "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" | "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" | "output.ready" | "gate.started" | "gate.completed" | "review.started" | "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";
|
|
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.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";
|
|
117
172
|
ts: string;
|
|
118
173
|
payload: Record<string, unknown>;
|
|
119
174
|
run_id: string;
|
|
@@ -121,7 +176,7 @@ export declare const RunEvent: z.ZodObject<{
|
|
|
121
176
|
thread_id?: string | undefined;
|
|
122
177
|
seq?: number | undefined;
|
|
123
178
|
}, {
|
|
124
|
-
type: "run.created" | "task.contract.created" | "context.pack.created" | "project.git.initialized" | "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" | "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" | "output.ready" | "gate.started" | "gate.completed" | "review.started" | "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";
|
|
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.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";
|
|
125
180
|
ts: string;
|
|
126
181
|
run_id: string;
|
|
127
182
|
task_id: string;
|
package/dist/events.d.ts.map
CHANGED
|
@@ -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,
|
|
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,q7CAwHtB,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,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
|
@@ -37,6 +37,13 @@ export const RunEventType = z
|
|
|
37
37
|
"task.contract.created",
|
|
38
38
|
"context.pack.created",
|
|
39
39
|
"project.git.initialized",
|
|
40
|
+
/** D-14 (INV-113): a thin `CLAUDE.md` bridge (`@AGENTS.md` import + ownership
|
|
41
|
+
* marker) was created at the PROJECT root because it had `AGENTS.md` and no
|
|
42
|
+
* `CLAUDE.md`, so a Claude Code route reads the same instructions codex/cursor
|
|
43
|
+
* read natively. The ONE live-tree write this feature adds; exclusive-create +
|
|
44
|
+
* no-follow, never overwriting a hand-written file, emitted only on an actual
|
|
45
|
+
* create. Payload: {project_root, path, source}. */
|
|
46
|
+
"project.claude_bridge.created",
|
|
40
47
|
"budget.lease.created",
|
|
41
48
|
"budget.observation",
|
|
42
49
|
"budget.cash",
|
|
@@ -63,6 +70,14 @@ export const RunEventType = z
|
|
|
63
70
|
* (no attempt was ever made on the primary to fall back FROM); never silent.
|
|
64
71
|
* Payload: RoutePrimaryDivergedPayload {requested, effective, reason, detail}. */
|
|
65
72
|
"route.primary.diverged",
|
|
73
|
+
/** QA-043: an AUTO pool dropped one or more incompatible lanes and/or its
|
|
74
|
+
* effective width fell below the requested `n`. The route resolver NEVER
|
|
75
|
+
* backfills a dropped lane's slot by duplicating a surviving harness (the
|
|
76
|
+
* self-race class), so a shrunk pool is disclosed here — requested vs
|
|
77
|
+
* effective harnesses/width plus every dropped lane and its typed stage.
|
|
78
|
+
* Explicit pools fail loudly at the drop instead of reaching this event.
|
|
79
|
+
* Payload: RoutePoolDegradedPayload. */
|
|
80
|
+
"route.pool.degraded",
|
|
66
81
|
/** A thread turn was continued across the conversation (INV-137); payload
|
|
67
82
|
* carries the ContinuityDisclosure stats (kind, packet_turns, summarized,
|
|
68
83
|
* lane_switched_from). Replaces the old static session.rebound phrase. */
|
|
@@ -81,10 +96,30 @@ export const RunEventType = z
|
|
|
81
96
|
"council.member.failed",
|
|
82
97
|
"council.merged",
|
|
83
98
|
"budget.quota_pressure",
|
|
99
|
+
/** QA-024: a --delegate attempt injected the Claudexor delegation belt but
|
|
100
|
+
* the harness reported its MCP server `failed` to start and no belt tool ran
|
|
101
|
+
* — the requested capability never became operational (the harness may have
|
|
102
|
+
* degraded to its own native subagent). Never silent: this surfaces the
|
|
103
|
+
* failed belt so the terminal outcome and UI can disclose it. Payload:
|
|
104
|
+
* {attempt_id, harness_id, server_name, reason}. */
|
|
105
|
+
"delegation.belt.unavailable",
|
|
84
106
|
"output.ready",
|
|
85
107
|
"gate.started",
|
|
86
108
|
"gate.completed",
|
|
109
|
+
/** Reviewer-panel preflight disclosure (INV-105): a requested reviewer
|
|
110
|
+
* knob the resolved panel could not honor was DROPPED instead of refused
|
|
111
|
+
* (the auto panel's per-family `reviewerEfforts` map, which also rides
|
|
112
|
+
* stored replay surfaces). Payload: {ignored_settings: string[]} — the
|
|
113
|
+
* same disclosure channel harness.started uses (QA-070). */
|
|
114
|
+
"review.preflight",
|
|
87
115
|
"review.started",
|
|
116
|
+
/** QA-025: the paid reviewer panel was intentionally NOT run — every working
|
|
117
|
+
* candidate had an empty diff, or no reviewers were configured. Emitted
|
|
118
|
+
* INSTEAD of review.started so the audit trail never claims a review began
|
|
119
|
+
* that was skipped. Payload:
|
|
120
|
+
* {reason: "no_changes"|"no_reviewers", reviewable_candidates,
|
|
121
|
+
* configured_reviewers, configured_provider_families}. */
|
|
122
|
+
"review.skipped",
|
|
88
123
|
"reviewer.started",
|
|
89
124
|
"reviewer.first_event",
|
|
90
125
|
"reviewer.auth_switched",
|
|
@@ -104,6 +139,15 @@ export const RunEventType = z
|
|
|
104
139
|
"run.blocked",
|
|
105
140
|
"run.completed",
|
|
106
141
|
"run.failed",
|
|
142
|
+
/** D-16d: a one-shot automatic continuation was launched after a terminal
|
|
143
|
+
* context exhaustion (eligible cause, no completed WorkReport). Payload:
|
|
144
|
+
* {from_attempt, cause, continuation_count, packet_turns}. */
|
|
145
|
+
"run.continuation",
|
|
146
|
+
/** D-16d: an eligible one-shot continuation was REFUSED because its budget
|
|
147
|
+
* lease was denied — emitted INSTEAD of run.continuation so a denied lease
|
|
148
|
+
* never leaves a disclosure claiming a continuation launched. No attempt ran
|
|
149
|
+
* and the one-shot is not consumed. Payload: {from_attempt, cause, reason}. */
|
|
150
|
+
"run.continuation.denied",
|
|
107
151
|
])
|
|
108
152
|
.describe("Type of an append-only run event, covering run lifecycle, contract/context creation, budget, routing fallbacks, harness activity, interactions, gates, review, arbitration, work products, and control verbs.");
|
|
109
153
|
/**
|
|
@@ -156,6 +200,53 @@ export const RoutePrimaryDivergedPayload = z
|
|
|
156
200
|
.describe("Redacted human reason the primary was dropped (e.g. cooldown, unavailable)."),
|
|
157
201
|
})
|
|
158
202
|
.describe("Typed payload for route.primary.diverged, validated before being stamped onto the RunEvent payload so a pre-attempt primary divergence is always evidence-backed.");
|
|
203
|
+
/** The routing stage at which an auto-pool lane was dropped. Typed so a
|
|
204
|
+
* disclosed omission preserves the ACTUAL cause (an access refusal is not an
|
|
205
|
+
* auth failure) instead of collapsing every drop to one reason (QA-043). */
|
|
206
|
+
export const RouteDropStage = z
|
|
207
|
+
.enum([
|
|
208
|
+
"discovery",
|
|
209
|
+
"settings",
|
|
210
|
+
"credential",
|
|
211
|
+
"doctor",
|
|
212
|
+
"capability",
|
|
213
|
+
"access",
|
|
214
|
+
"web",
|
|
215
|
+
"attachment",
|
|
216
|
+
])
|
|
217
|
+
.describe("The routing stage at which an auto-pool lane was dropped.");
|
|
218
|
+
/**
|
|
219
|
+
* Typed payload for `route.pool.degraded`. Emitted once at route resolution
|
|
220
|
+
* when an AUTO pool lost lanes and/or clamped width below the requested `n`.
|
|
221
|
+
* It is the canonical requested-vs-effective route receipt: the resolver never
|
|
222
|
+
* duplicates a surviving harness to refill a dropped lane's slot (the QA-043
|
|
223
|
+
* self-race), so the shrink is disclosed here rather than hidden as an
|
|
224
|
+
* identical extra candidate. Explicit pools throw at the drop and never reach
|
|
225
|
+
* this event, so a degraded auto pool is always attributable to real
|
|
226
|
+
* unavailability, not a silent substitution.
|
|
227
|
+
*/
|
|
228
|
+
export const RoutePoolDegradedPayload = z
|
|
229
|
+
.object({
|
|
230
|
+
requested_harnesses: z
|
|
231
|
+
.array(z.string())
|
|
232
|
+
.describe("The pool the resolver considered (explicit ids or auto-derived)."),
|
|
233
|
+
effective_harnesses: z
|
|
234
|
+
.array(z.string())
|
|
235
|
+
.describe("Distinct harnesses that actually route, in attempt order."),
|
|
236
|
+
requested_n: z.number().int().describe("The requested candidate width for this run."),
|
|
237
|
+
effective_n: z
|
|
238
|
+
.number()
|
|
239
|
+
.int()
|
|
240
|
+
.describe("Distinct candidates that will run; never inflated by duplication."),
|
|
241
|
+
dropped_lanes: z
|
|
242
|
+
.array(z.object({
|
|
243
|
+
harness_id: z.string().describe("The dropped lane's harness id."),
|
|
244
|
+
stage: RouteDropStage,
|
|
245
|
+
detail: z.string().describe("Redacted human reason the lane was dropped."),
|
|
246
|
+
}))
|
|
247
|
+
.describe("Every lane excluded from the auto pool, with its typed stage and reason."),
|
|
248
|
+
})
|
|
249
|
+
.describe("Typed payload for route.pool.degraded: the requested-vs-effective route receipt for an auto pool that dropped lanes or clamped width, validated before being stamped onto the RunEvent payload.");
|
|
159
250
|
/** Append-only event record (one JSONL line). */
|
|
160
251
|
export const RunEvent = z
|
|
161
252
|
.object({
|
package/dist/events.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,cAAc,EAAE,EAAE,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAEvC,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAAC;KACjC,MAAM,CAAC;IACN,aAAa,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3B,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,wCAAwC,CAAC;IAC5E,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC5B,IAAI,EAAE,CAAC,CAA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,CAAC;SACb,KAAK,CACJ,CAAC,CAAC,MAAM,CAAC;QACP,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,gCAAgC,CAAC;QACjE,KAAK,EAAE,cAAc;QACrB,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,6CAA6C,CAAC;KAC3E,CAAC,CACH;SACA,QAAQ,CAAC,0EAA0E,CAAC;CACxF,CAAC;KACD,QAAQ,CACP,iMAAiM,CAClM,CAAC;AAGJ,iDAAiD;AACjD,MAAM,CAAC,MAAM,QAAQ,GAAG,CAAC;KACtB,MAAM,CAAC;IACN;;;;OAIG;IACH,GAAG,EAAE,CAAC;SACH,MAAM,EAAE;SACR,GAAG,EAAE;SACL,QAAQ,EAAE;SACV,QAAQ,EAAE;SACV,QAAQ,CACP,qIAAqI,CACtI;IACH,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,kBAAkB,CAAC;IAC3C,MAAM,EAAE,EAAE,CAAC,QAAQ,CAAC,2BAA2B,CAAC;IAChD,OAAO,EAAE,EAAE,CAAC,QAAQ,CAAC,0BAA0B,CAAC;IAChD;6EACyE;IACzE,SAAS,EAAE,EAAE,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,yCAAyC,CAAC;IAC5E,IAAI,EAAE,YAAY;IAClB,OAAO,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,8BAA8B,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;
|