@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/harness.d.ts
CHANGED
|
@@ -1,15 +1,8 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
export { EffortHint } from "./effort.js";
|
|
2
3
|
/** Quality of a usage/quota signal a harness can emit. */
|
|
3
4
|
export declare const SignalQuality: z.ZodEnum<["exact", "native", "observed", "manual", "unknown"]>;
|
|
4
5
|
export type SignalQuality = z.infer<typeof SignalQuality>;
|
|
5
|
-
/**
|
|
6
|
-
* Open cross-harness reasoning-effort vocabulary. Adapters declare the SUBSET
|
|
7
|
-
* they actually support via `HarnessCapabilities.effort_levels`; a shared
|
|
8
|
-
* normalizer maps any requested level onto the nearest supported one. New levels
|
|
9
|
-
* (e.g. a future `ultra`) extend this union without touching adapter logic.
|
|
10
|
-
*/
|
|
11
|
-
export declare const EffortHint: z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>;
|
|
12
|
-
export type EffortHint = z.infer<typeof EffortHint>;
|
|
13
6
|
export declare const HarnessKind: z.ZodEnum<["local_cli", "remote_api", "fake"]>;
|
|
14
7
|
export type HarnessKind = z.infer<typeof HarnessKind>;
|
|
15
8
|
/**
|
|
@@ -69,11 +62,60 @@ export declare const HarnessCapabilities: z.ZodObject<{
|
|
|
69
62
|
*/
|
|
70
63
|
json_schema_output: z.ZodDefault<z.ZodBoolean>;
|
|
71
64
|
/**
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
65
|
+
* How the harness can carry the D-16 WorkReport envelope (a compiled
|
|
66
|
+
* wrapper over any caller output schema). Consumer: the orchestrator spec
|
|
67
|
+
* build compiles the envelope only for `constrained`/`validated` routes,
|
|
68
|
+
* and the attempt finalizer demands a report only from them.
|
|
69
|
+
* - `constrained`: a native schema-constrained transport carries it
|
|
70
|
+
* (codex --output-schema, claude StructuredOutput tool).
|
|
71
|
+
* - `validated`: no native flag; the whole final answer is validated JSON
|
|
72
|
+
* (cursor's instructed fenced envelope on the existing parse path).
|
|
73
|
+
* - `unsupported`: the route cannot carry a WorkReport; the work_state axis
|
|
74
|
+
* stays `unverified` (a disclosed absence, never a failure).
|
|
75
|
+
*/
|
|
76
|
+
work_report_transport: z.ZodDefault<z.ZodEnum<["constrained", "validated", "unsupported"]>>;
|
|
77
|
+
/**
|
|
78
|
+
* Where a schema-constrained structured answer surfaces relative to the
|
|
79
|
+
* final message. Consumer: the orchestrator's no-caller-schema envelope
|
|
80
|
+
* shape (D-16). `side_tool` (claude --json-schema materializes a
|
|
81
|
+
* StructuredOutput tool; the prose message stays markdown) lets a
|
|
82
|
+
* WorkReport-only envelope ride the tool while the markdown remains the
|
|
83
|
+
* deliverable. `final_message` (codex --output-schema, cursor fenced JSON)
|
|
84
|
+
* consumes the final message, so a no-caller WorkReport envelope must wrap
|
|
85
|
+
* the markdown deliverable as `output: string`.
|
|
86
|
+
*/
|
|
87
|
+
structured_output_channel: z.ZodDefault<z.ZodEnum<["side_tool", "final_message"]>>;
|
|
88
|
+
/**
|
|
89
|
+
* Ordered (weakest→strongest) reasoning-effort levels this harness accepts,
|
|
90
|
+
* as the harness-wide UNION over its models. Empty = effort is not a tunable
|
|
91
|
+
* surface. This stays the coarse fallback every existing reader keeps using;
|
|
92
|
+
* `model_effort_levels` below narrows it for a specific model.
|
|
93
|
+
*/
|
|
94
|
+
effort_levels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
95
|
+
/**
|
|
96
|
+
* Per-model advertised effort vocabulary, discovered live where the vendor
|
|
97
|
+
* exposes it. Effort ceilings are a property of the MODEL, not the harness:
|
|
98
|
+
* codex advertises `ultra` on gpt-5.6-sol and stops at `xhigh` on gpt-5.4.
|
|
99
|
+
* A model absent here falls back to `effort_levels` (see
|
|
100
|
+
* `effortLevelsForModel`, the ONE owner of that lookup).
|
|
75
101
|
*/
|
|
76
|
-
|
|
102
|
+
model_effort_levels: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
103
|
+
levels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
104
|
+
default: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
105
|
+
}, "strict", z.ZodTypeAny, {
|
|
106
|
+
levels: string[];
|
|
107
|
+
default: string | null;
|
|
108
|
+
}, {
|
|
109
|
+
levels?: string[] | undefined;
|
|
110
|
+
default?: string | null | undefined;
|
|
111
|
+
}>>>;
|
|
112
|
+
/**
|
|
113
|
+
* Vendor CLI version the effort ladders were last verified against. Set from
|
|
114
|
+
* the LIVE probe when one succeeded, and from the recorded static snapshot's
|
|
115
|
+
* stamp when the probe fell back — so the freshness gate can tell the two
|
|
116
|
+
* apart. Null = never verified / not applicable.
|
|
117
|
+
*/
|
|
118
|
+
effort_levels_verified_against: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
77
119
|
/**
|
|
78
120
|
* Known model ids/aliases this harness accepts — the manifest-declared model
|
|
79
121
|
* truth source used when the adapter has no live `models()` inventory.
|
|
@@ -116,7 +158,14 @@ export declare const HarnessCapabilities: z.ZodObject<{
|
|
|
116
158
|
tool_lists: boolean;
|
|
117
159
|
interactive: boolean;
|
|
118
160
|
json_schema_output: boolean;
|
|
119
|
-
|
|
161
|
+
work_report_transport: "constrained" | "validated" | "unsupported";
|
|
162
|
+
structured_output_channel: "side_tool" | "final_message";
|
|
163
|
+
effort_levels: string[];
|
|
164
|
+
model_effort_levels: Record<string, {
|
|
165
|
+
levels: string[];
|
|
166
|
+
default: string | null;
|
|
167
|
+
}>;
|
|
168
|
+
effort_levels_verified_against: string | null;
|
|
120
169
|
known_models: (string | {
|
|
121
170
|
id: string;
|
|
122
171
|
routes: ("api_key" | "local_session")[];
|
|
@@ -137,7 +186,14 @@ export declare const HarnessCapabilities: z.ZodObject<{
|
|
|
137
186
|
tool_lists?: boolean | undefined;
|
|
138
187
|
interactive?: boolean | undefined;
|
|
139
188
|
json_schema_output?: boolean | undefined;
|
|
140
|
-
|
|
189
|
+
work_report_transport?: "constrained" | "validated" | "unsupported" | undefined;
|
|
190
|
+
structured_output_channel?: "side_tool" | "final_message" | undefined;
|
|
191
|
+
effort_levels?: string[] | undefined;
|
|
192
|
+
model_effort_levels?: Record<string, {
|
|
193
|
+
levels?: string[] | undefined;
|
|
194
|
+
default?: string | null | undefined;
|
|
195
|
+
}> | undefined;
|
|
196
|
+
effort_levels_verified_against?: string | null | undefined;
|
|
141
197
|
known_models?: (string | {
|
|
142
198
|
id: string;
|
|
143
199
|
routes: ("api_key" | "local_session")[];
|
|
@@ -574,11 +630,60 @@ export declare const HarnessManifest: z.ZodObject<{
|
|
|
574
630
|
*/
|
|
575
631
|
json_schema_output: z.ZodDefault<z.ZodBoolean>;
|
|
576
632
|
/**
|
|
577
|
-
*
|
|
578
|
-
*
|
|
579
|
-
*
|
|
633
|
+
* How the harness can carry the D-16 WorkReport envelope (a compiled
|
|
634
|
+
* wrapper over any caller output schema). Consumer: the orchestrator spec
|
|
635
|
+
* build compiles the envelope only for `constrained`/`validated` routes,
|
|
636
|
+
* and the attempt finalizer demands a report only from them.
|
|
637
|
+
* - `constrained`: a native schema-constrained transport carries it
|
|
638
|
+
* (codex --output-schema, claude StructuredOutput tool).
|
|
639
|
+
* - `validated`: no native flag; the whole final answer is validated JSON
|
|
640
|
+
* (cursor's instructed fenced envelope on the existing parse path).
|
|
641
|
+
* - `unsupported`: the route cannot carry a WorkReport; the work_state axis
|
|
642
|
+
* stays `unverified` (a disclosed absence, never a failure).
|
|
643
|
+
*/
|
|
644
|
+
work_report_transport: z.ZodDefault<z.ZodEnum<["constrained", "validated", "unsupported"]>>;
|
|
645
|
+
/**
|
|
646
|
+
* Where a schema-constrained structured answer surfaces relative to the
|
|
647
|
+
* final message. Consumer: the orchestrator's no-caller-schema envelope
|
|
648
|
+
* shape (D-16). `side_tool` (claude --json-schema materializes a
|
|
649
|
+
* StructuredOutput tool; the prose message stays markdown) lets a
|
|
650
|
+
* WorkReport-only envelope ride the tool while the markdown remains the
|
|
651
|
+
* deliverable. `final_message` (codex --output-schema, cursor fenced JSON)
|
|
652
|
+
* consumes the final message, so a no-caller WorkReport envelope must wrap
|
|
653
|
+
* the markdown deliverable as `output: string`.
|
|
580
654
|
*/
|
|
581
|
-
|
|
655
|
+
structured_output_channel: z.ZodDefault<z.ZodEnum<["side_tool", "final_message"]>>;
|
|
656
|
+
/**
|
|
657
|
+
* Ordered (weakest→strongest) reasoning-effort levels this harness accepts,
|
|
658
|
+
* as the harness-wide UNION over its models. Empty = effort is not a tunable
|
|
659
|
+
* surface. This stays the coarse fallback every existing reader keeps using;
|
|
660
|
+
* `model_effort_levels` below narrows it for a specific model.
|
|
661
|
+
*/
|
|
662
|
+
effort_levels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
663
|
+
/**
|
|
664
|
+
* Per-model advertised effort vocabulary, discovered live where the vendor
|
|
665
|
+
* exposes it. Effort ceilings are a property of the MODEL, not the harness:
|
|
666
|
+
* codex advertises `ultra` on gpt-5.6-sol and stops at `xhigh` on gpt-5.4.
|
|
667
|
+
* A model absent here falls back to `effort_levels` (see
|
|
668
|
+
* `effortLevelsForModel`, the ONE owner of that lookup).
|
|
669
|
+
*/
|
|
670
|
+
model_effort_levels: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodObject<{
|
|
671
|
+
levels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
672
|
+
default: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
673
|
+
}, "strict", z.ZodTypeAny, {
|
|
674
|
+
levels: string[];
|
|
675
|
+
default: string | null;
|
|
676
|
+
}, {
|
|
677
|
+
levels?: string[] | undefined;
|
|
678
|
+
default?: string | null | undefined;
|
|
679
|
+
}>>>;
|
|
680
|
+
/**
|
|
681
|
+
* Vendor CLI version the effort ladders were last verified against. Set from
|
|
682
|
+
* the LIVE probe when one succeeded, and from the recorded static snapshot's
|
|
683
|
+
* stamp when the probe fell back — so the freshness gate can tell the two
|
|
684
|
+
* apart. Null = never verified / not applicable.
|
|
685
|
+
*/
|
|
686
|
+
effort_levels_verified_against: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
582
687
|
/**
|
|
583
688
|
* Known model ids/aliases this harness accepts — the manifest-declared model
|
|
584
689
|
* truth source used when the adapter has no live `models()` inventory.
|
|
@@ -621,7 +726,14 @@ export declare const HarnessManifest: z.ZodObject<{
|
|
|
621
726
|
tool_lists: boolean;
|
|
622
727
|
interactive: boolean;
|
|
623
728
|
json_schema_output: boolean;
|
|
624
|
-
|
|
729
|
+
work_report_transport: "constrained" | "validated" | "unsupported";
|
|
730
|
+
structured_output_channel: "side_tool" | "final_message";
|
|
731
|
+
effort_levels: string[];
|
|
732
|
+
model_effort_levels: Record<string, {
|
|
733
|
+
levels: string[];
|
|
734
|
+
default: string | null;
|
|
735
|
+
}>;
|
|
736
|
+
effort_levels_verified_against: string | null;
|
|
625
737
|
known_models: (string | {
|
|
626
738
|
id: string;
|
|
627
739
|
routes: ("api_key" | "local_session")[];
|
|
@@ -642,7 +754,14 @@ export declare const HarnessManifest: z.ZodObject<{
|
|
|
642
754
|
tool_lists?: boolean | undefined;
|
|
643
755
|
interactive?: boolean | undefined;
|
|
644
756
|
json_schema_output?: boolean | undefined;
|
|
645
|
-
|
|
757
|
+
work_report_transport?: "constrained" | "validated" | "unsupported" | undefined;
|
|
758
|
+
structured_output_channel?: "side_tool" | "final_message" | undefined;
|
|
759
|
+
effort_levels?: string[] | undefined;
|
|
760
|
+
model_effort_levels?: Record<string, {
|
|
761
|
+
levels?: string[] | undefined;
|
|
762
|
+
default?: string | null | undefined;
|
|
763
|
+
}> | undefined;
|
|
764
|
+
effort_levels_verified_against?: string | null | undefined;
|
|
646
765
|
known_models?: (string | {
|
|
647
766
|
id: string;
|
|
648
767
|
routes: ("api_key" | "local_session")[];
|
|
@@ -697,7 +816,14 @@ export declare const HarnessManifest: z.ZodObject<{
|
|
|
697
816
|
tool_lists: boolean;
|
|
698
817
|
interactive: boolean;
|
|
699
818
|
json_schema_output: boolean;
|
|
700
|
-
|
|
819
|
+
work_report_transport: "constrained" | "validated" | "unsupported";
|
|
820
|
+
structured_output_channel: "side_tool" | "final_message";
|
|
821
|
+
effort_levels: string[];
|
|
822
|
+
model_effort_levels: Record<string, {
|
|
823
|
+
levels: string[];
|
|
824
|
+
default: string | null;
|
|
825
|
+
}>;
|
|
826
|
+
effort_levels_verified_against: string | null;
|
|
701
827
|
known_models: (string | {
|
|
702
828
|
id: string;
|
|
703
829
|
routes: ("api_key" | "local_session")[];
|
|
@@ -727,7 +853,14 @@ export declare const HarnessManifest: z.ZodObject<{
|
|
|
727
853
|
tool_lists?: boolean | undefined;
|
|
728
854
|
interactive?: boolean | undefined;
|
|
729
855
|
json_schema_output?: boolean | undefined;
|
|
730
|
-
|
|
856
|
+
work_report_transport?: "constrained" | "validated" | "unsupported" | undefined;
|
|
857
|
+
structured_output_channel?: "side_tool" | "final_message" | undefined;
|
|
858
|
+
effort_levels?: string[] | undefined;
|
|
859
|
+
model_effort_levels?: Record<string, {
|
|
860
|
+
levels?: string[] | undefined;
|
|
861
|
+
default?: string | null | undefined;
|
|
862
|
+
}> | undefined;
|
|
863
|
+
effort_levels_verified_against?: string | null | undefined;
|
|
731
864
|
known_models?: (string | {
|
|
732
865
|
id: string;
|
|
733
866
|
routes: ("api_key" | "local_session")[];
|
|
@@ -930,7 +1063,7 @@ export declare const HarnessRunSpec: z.ZodObject<{
|
|
|
930
1063
|
deny?: string[] | undefined;
|
|
931
1064
|
}>>;
|
|
932
1065
|
model_hint: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
933
|
-
effort_hint: z.ZodDefault<z.ZodNullable<z.
|
|
1066
|
+
effort_hint: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
934
1067
|
max_turns: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
935
1068
|
/**
|
|
936
1069
|
* Which auth route the attempt should use. `auto` = subscription-first with
|
|
@@ -1220,7 +1353,7 @@ export declare const HarnessRunSpec: z.ZodObject<{
|
|
|
1220
1353
|
deny: string[];
|
|
1221
1354
|
};
|
|
1222
1355
|
model_hint: string | null;
|
|
1223
|
-
effort_hint:
|
|
1356
|
+
effort_hint: string | null;
|
|
1224
1357
|
auth_preference: "auto" | "subscription" | "api_key";
|
|
1225
1358
|
credential_profile: {
|
|
1226
1359
|
profile_id: string;
|
|
@@ -1303,7 +1436,7 @@ export declare const HarnessRunSpec: z.ZodObject<{
|
|
|
1303
1436
|
deny?: string[] | undefined;
|
|
1304
1437
|
} | undefined;
|
|
1305
1438
|
model_hint?: string | null | undefined;
|
|
1306
|
-
effort_hint?:
|
|
1439
|
+
effort_hint?: string | null | undefined;
|
|
1307
1440
|
auth_preference?: "auto" | "subscription" | "api_key" | undefined;
|
|
1308
1441
|
credential_profile?: {
|
|
1309
1442
|
profile_id: string;
|
|
@@ -1540,7 +1673,7 @@ export declare const InteractionAnswerSet: z.ZodObject<{
|
|
|
1540
1673
|
export type InteractionAnswerSet = z.infer<typeof InteractionAnswerSet>;
|
|
1541
1674
|
/** Normalized event emitted by every adapter (the SSOT of adapter output). */
|
|
1542
1675
|
export declare const HarnessEvent: z.ZodObject<{
|
|
1543
|
-
type: z.ZodEnum<["started", "thinking", "message", "tool_call", "tool_result", "interaction_requested", "file_change", "patch_produced", "usage", "error", "status", "completed"]>;
|
|
1676
|
+
type: z.ZodEnum<["started", "thinking", "message", "tool_call", "tool_result", "interaction_requested", "file_change", "patch_produced", "usage", "error", "status", "context", "completed"]>;
|
|
1544
1677
|
session_id: z.ZodString;
|
|
1545
1678
|
ts: z.ZodString;
|
|
1546
1679
|
text: z.ZodOptional<z.ZodString>;
|
|
@@ -1561,6 +1694,7 @@ export declare const HarnessEvent: z.ZodObject<{
|
|
|
1561
1694
|
error_summary: z.ZodOptional<z.ZodString>;
|
|
1562
1695
|
content_summary: z.ZodOptional<z.ZodString>;
|
|
1563
1696
|
exit_code: z.ZodOptional<z.ZodNumber>;
|
|
1697
|
+
web_retrieval: z.ZodOptional<z.ZodEnum<["verified", "dispatched", "failed"]>>;
|
|
1564
1698
|
}, "strip", z.ZodTypeAny, {
|
|
1565
1699
|
kind: "web" | "file" | "command" | "mcp" | "search" | "other";
|
|
1566
1700
|
name: string;
|
|
@@ -1570,6 +1704,7 @@ export declare const HarnessEvent: z.ZodObject<{
|
|
|
1570
1704
|
error_summary?: string | undefined;
|
|
1571
1705
|
content_summary?: string | undefined;
|
|
1572
1706
|
exit_code?: number | undefined;
|
|
1707
|
+
web_retrieval?: "failed" | "verified" | "dispatched" | undefined;
|
|
1573
1708
|
}, {
|
|
1574
1709
|
name: string;
|
|
1575
1710
|
status?: "cancelled" | "ok" | "error" | "denied" | undefined;
|
|
@@ -1579,6 +1714,7 @@ export declare const HarnessEvent: z.ZodObject<{
|
|
|
1579
1714
|
error_summary?: string | undefined;
|
|
1580
1715
|
content_summary?: string | undefined;
|
|
1581
1716
|
exit_code?: number | undefined;
|
|
1717
|
+
web_retrieval?: "failed" | "verified" | "dispatched" | undefined;
|
|
1582
1718
|
}>>;
|
|
1583
1719
|
/** Set on `interaction_requested` events. */
|
|
1584
1720
|
interaction: z.ZodOptional<z.ZodObject<{
|
|
@@ -1856,11 +1992,40 @@ export declare const HarnessEvent: z.ZodObject<{
|
|
|
1856
1992
|
kind?: "unknown" | "network" | "stream_disconnect" | "service_unavailable" | "timeout" | undefined;
|
|
1857
1993
|
retry_delay_ms?: number | null | undefined;
|
|
1858
1994
|
}>>;
|
|
1995
|
+
/**
|
|
1996
|
+
* Typed CONTEXT-management signal (D-16), a sibling of `transient`/
|
|
1997
|
+
* `rate_limit` and DELIBERATELY separate from the transient-retry taxonomy:
|
|
1998
|
+
* adapters set it in their parse layer from native compaction / context-
|
|
1999
|
+
* exhaustion frames (claude `compact_boundary` system frames + result
|
|
2000
|
+
* `terminal_reason`, codex only when a recorded fixture proves a typed
|
|
2001
|
+
* marker). Context signals NEVER enter the transient_retry loop; a terminal
|
|
2002
|
+
* `capacity_exhausted` with no completed WorkReport is what the finalizer
|
|
2003
|
+
* maps to `interrupted / context_capacity_exhausted`.
|
|
2004
|
+
*/
|
|
2005
|
+
context: z.ZodOptional<z.ZodObject<{
|
|
2006
|
+
kind: z.ZodEnum<["compaction_started", "compaction_completed", "capacity_exhausted"]>;
|
|
2007
|
+
cause: z.ZodDefault<z.ZodEnum<["prompt_too_long", "repeated_refill", "blocking_limit", "window_exceeded", "unknown"]>>;
|
|
2008
|
+
native_code: z.ZodDefault<z.ZodNullable<z.ZodString>>;
|
|
2009
|
+
trigger: z.ZodDefault<z.ZodNullable<z.ZodEnum<["manual", "auto"]>>>;
|
|
2010
|
+
pre_tokens: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
|
|
2011
|
+
}, "strip", z.ZodTypeAny, {
|
|
2012
|
+
kind: "compaction_started" | "compaction_completed" | "capacity_exhausted";
|
|
2013
|
+
cause: "unknown" | "prompt_too_long" | "repeated_refill" | "blocking_limit" | "window_exceeded";
|
|
2014
|
+
native_code: string | null;
|
|
2015
|
+
trigger: "auto" | "manual" | null;
|
|
2016
|
+
pre_tokens: number | null;
|
|
2017
|
+
}, {
|
|
2018
|
+
kind: "compaction_started" | "compaction_completed" | "capacity_exhausted";
|
|
2019
|
+
cause?: "unknown" | "prompt_too_long" | "repeated_refill" | "blocking_limit" | "window_exceeded" | undefined;
|
|
2020
|
+
native_code?: string | null | undefined;
|
|
2021
|
+
trigger?: "auto" | "manual" | null | undefined;
|
|
2022
|
+
pre_tokens?: number | null | undefined;
|
|
2023
|
+
}>>;
|
|
1859
2024
|
error: z.ZodOptional<z.ZodString>;
|
|
1860
2025
|
aborted: z.ZodOptional<z.ZodBoolean>;
|
|
1861
2026
|
payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
1862
2027
|
}, "strip", z.ZodTypeAny, {
|
|
1863
|
-
type: "message" | "status" | "completed" | "error" | "started" | "thinking" | "tool_call" | "tool_result" | "interaction_requested" | "file_change" | "patch_produced" | "usage";
|
|
2028
|
+
type: "message" | "status" | "completed" | "error" | "started" | "thinking" | "tool_call" | "tool_result" | "interaction_requested" | "file_change" | "patch_produced" | "usage" | "context";
|
|
1864
2029
|
session_id: string;
|
|
1865
2030
|
ts: string;
|
|
1866
2031
|
aborted?: boolean | undefined;
|
|
@@ -1880,6 +2045,13 @@ export declare const HarnessEvent: z.ZodObject<{
|
|
|
1880
2045
|
cached_input_tokens?: number | undefined;
|
|
1881
2046
|
cost_usd?: number | undefined;
|
|
1882
2047
|
} | undefined;
|
|
2048
|
+
context?: {
|
|
2049
|
+
kind: "compaction_started" | "compaction_completed" | "capacity_exhausted";
|
|
2050
|
+
cause: "unknown" | "prompt_too_long" | "repeated_refill" | "blocking_limit" | "window_exceeded";
|
|
2051
|
+
native_code: string | null;
|
|
2052
|
+
trigger: "auto" | "manual" | null;
|
|
2053
|
+
pre_tokens: number | null;
|
|
2054
|
+
} | undefined;
|
|
1883
2055
|
text?: string | undefined;
|
|
1884
2056
|
final?: boolean | undefined;
|
|
1885
2057
|
tool?: {
|
|
@@ -1891,6 +2063,7 @@ export declare const HarnessEvent: z.ZodObject<{
|
|
|
1891
2063
|
error_summary?: string | undefined;
|
|
1892
2064
|
content_summary?: string | undefined;
|
|
1893
2065
|
exit_code?: number | undefined;
|
|
2066
|
+
web_retrieval?: "failed" | "verified" | "dispatched" | undefined;
|
|
1894
2067
|
} | undefined;
|
|
1895
2068
|
interaction?: {
|
|
1896
2069
|
interaction_id: string;
|
|
@@ -1951,7 +2124,7 @@ export declare const HarnessEvent: z.ZodObject<{
|
|
|
1951
2124
|
} | undefined;
|
|
1952
2125
|
payload?: Record<string, unknown> | undefined;
|
|
1953
2126
|
}, {
|
|
1954
|
-
type: "message" | "status" | "completed" | "error" | "started" | "thinking" | "tool_call" | "tool_result" | "interaction_requested" | "file_change" | "patch_produced" | "usage";
|
|
2127
|
+
type: "message" | "status" | "completed" | "error" | "started" | "thinking" | "tool_call" | "tool_result" | "interaction_requested" | "file_change" | "patch_produced" | "usage" | "context";
|
|
1955
2128
|
session_id: string;
|
|
1956
2129
|
ts: string;
|
|
1957
2130
|
aborted?: boolean | undefined;
|
|
@@ -1971,6 +2144,13 @@ export declare const HarnessEvent: z.ZodObject<{
|
|
|
1971
2144
|
cached_input_tokens?: number | undefined;
|
|
1972
2145
|
cost_usd?: number | undefined;
|
|
1973
2146
|
} | undefined;
|
|
2147
|
+
context?: {
|
|
2148
|
+
kind: "compaction_started" | "compaction_completed" | "capacity_exhausted";
|
|
2149
|
+
cause?: "unknown" | "prompt_too_long" | "repeated_refill" | "blocking_limit" | "window_exceeded" | undefined;
|
|
2150
|
+
native_code?: string | null | undefined;
|
|
2151
|
+
trigger?: "auto" | "manual" | null | undefined;
|
|
2152
|
+
pre_tokens?: number | null | undefined;
|
|
2153
|
+
} | undefined;
|
|
1974
2154
|
text?: string | undefined;
|
|
1975
2155
|
final?: boolean | undefined;
|
|
1976
2156
|
tool?: {
|
|
@@ -1982,6 +2162,7 @@ export declare const HarnessEvent: z.ZodObject<{
|
|
|
1982
2162
|
error_summary?: string | undefined;
|
|
1983
2163
|
content_summary?: string | undefined;
|
|
1984
2164
|
exit_code?: number | undefined;
|
|
2165
|
+
web_retrieval?: "failed" | "verified" | "dispatched" | undefined;
|
|
1985
2166
|
} | undefined;
|
|
1986
2167
|
interaction?: {
|
|
1987
2168
|
interaction_id: string;
|
package/dist/harness.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harness.d.ts","sourceRoot":"","sources":["../src/harness.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"harness.d.ts","sourceRoot":"","sources":["../src/har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;;;;;;;;;;;;;;;;;;;;;;;;;IAEpE,6CAA6C;;;;;;YAjG7C,kEAAkE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA2BlE,oEAAoE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QA8FhE,gFAAgF;;;;;;;;;;;;;;;;;;IAepF;;6EAEyE;;IAIzE,2EAA2E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAa3E;;;;;;OAMG;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAoBH;;;;;OAKG;;;;;;;;;;;IAoBH;;;;;;;OAOG;;;;;;;;;;;;;;;;;;;;IAqCH;;;;OAIG;;;;;;;;;;;IAmBH;;;;;;;;;OASG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA0D+E,CAAC;AACvF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC"}
|
package/dist/harness.js
CHANGED
|
@@ -6,19 +6,13 @@ import { AccessProfile, AuthPreference, ExternalContextPolicy, Id, Intent, Provi
|
|
|
6
6
|
import { Attachment, AttachmentInputClass } from "./attachment.js";
|
|
7
7
|
import { ImplementationTransport, RawContextPacket, RawGitPatchEnvelope, RawPatchRefusalCode, } from "./raw.js";
|
|
8
8
|
import { QuotaConstraint, QuotaSource } from "./quota.js";
|
|
9
|
+
import { EffortHint, ModelEffortCapability } from "./effort.js";
|
|
10
|
+
// Re-exported so sibling contract modules keep one import path for the type.
|
|
11
|
+
export { EffortHint } from "./effort.js";
|
|
9
12
|
/** Quality of a usage/quota signal a harness can emit. */
|
|
10
13
|
export const SignalQuality = z
|
|
11
14
|
.enum(["exact", "native", "observed", "manual", "unknown"])
|
|
12
15
|
.describe("Quality of a usage/quota signal a harness can emit, from exact vendor accounting through native CLI reporting, engine observation, manual entry, to unknown.");
|
|
13
|
-
/**
|
|
14
|
-
* Open cross-harness reasoning-effort vocabulary. Adapters declare the SUBSET
|
|
15
|
-
* they actually support via `HarnessCapabilities.effort_levels`; a shared
|
|
16
|
-
* normalizer maps any requested level onto the nearest supported one. New levels
|
|
17
|
-
* (e.g. a future `ultra`) extend this union without touching adapter logic.
|
|
18
|
-
*/
|
|
19
|
-
export const EffortHint = z
|
|
20
|
-
.enum(["low", "medium", "high", "xhigh", "max"])
|
|
21
|
-
.describe("Cross-harness reasoning-effort level, weakest to strongest; adapters declare the subset they support and a shared normalizer clamps requests onto the nearest supported level.");
|
|
22
16
|
// Staged-field rule: only kinds a shipped adapter declares. New adapter
|
|
23
17
|
// categories (local servers, SDK embeddings, external bridges) add their
|
|
24
18
|
// kind together with the adapter that produces it.
|
|
@@ -114,14 +108,67 @@ export const HarnessCapabilities = z
|
|
|
114
108
|
.default(false)
|
|
115
109
|
.describe("The harness can constrain its final message to a caller-supplied JSON Schema (native structured-output flag)."),
|
|
116
110
|
/**
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
111
|
+
* How the harness can carry the D-16 WorkReport envelope (a compiled
|
|
112
|
+
* wrapper over any caller output schema). Consumer: the orchestrator spec
|
|
113
|
+
* build compiles the envelope only for `constrained`/`validated` routes,
|
|
114
|
+
* and the attempt finalizer demands a report only from them.
|
|
115
|
+
* - `constrained`: a native schema-constrained transport carries it
|
|
116
|
+
* (codex --output-schema, claude StructuredOutput tool).
|
|
117
|
+
* - `validated`: no native flag; the whole final answer is validated JSON
|
|
118
|
+
* (cursor's instructed fenced envelope on the existing parse path).
|
|
119
|
+
* - `unsupported`: the route cannot carry a WorkReport; the work_state axis
|
|
120
|
+
* stays `unverified` (a disclosed absence, never a failure).
|
|
121
|
+
*/
|
|
122
|
+
work_report_transport: z
|
|
123
|
+
.enum(["constrained", "validated", "unsupported"])
|
|
124
|
+
.default("unsupported")
|
|
125
|
+
.describe("How the harness carries the D-16 WorkReport envelope: constrained (native schema transport), validated (whole-answer JSON), or unsupported (work_state stays unverified)."),
|
|
126
|
+
/**
|
|
127
|
+
* Where a schema-constrained structured answer surfaces relative to the
|
|
128
|
+
* final message. Consumer: the orchestrator's no-caller-schema envelope
|
|
129
|
+
* shape (D-16). `side_tool` (claude --json-schema materializes a
|
|
130
|
+
* StructuredOutput tool; the prose message stays markdown) lets a
|
|
131
|
+
* WorkReport-only envelope ride the tool while the markdown remains the
|
|
132
|
+
* deliverable. `final_message` (codex --output-schema, cursor fenced JSON)
|
|
133
|
+
* consumes the final message, so a no-caller WorkReport envelope must wrap
|
|
134
|
+
* the markdown deliverable as `output: string`.
|
|
135
|
+
*/
|
|
136
|
+
structured_output_channel: z
|
|
137
|
+
.enum(["side_tool", "final_message"])
|
|
138
|
+
.default("final_message")
|
|
139
|
+
.describe("Where a schema-constrained answer surfaces: side_tool (rides a tool; final message stays markdown) or final_message (constrains the final message itself)."),
|
|
140
|
+
/**
|
|
141
|
+
* Ordered (weakest→strongest) reasoning-effort levels this harness accepts,
|
|
142
|
+
* as the harness-wide UNION over its models. Empty = effort is not a tunable
|
|
143
|
+
* surface. This stays the coarse fallback every existing reader keeps using;
|
|
144
|
+
* `model_effort_levels` below narrows it for a specific model.
|
|
120
145
|
*/
|
|
121
146
|
effort_levels: z
|
|
122
147
|
.array(EffortHint)
|
|
123
148
|
.default([])
|
|
124
|
-
.describe("Ordered (weakest to strongest) reasoning-effort levels this harness
|
|
149
|
+
.describe("Ordered (weakest to strongest) reasoning-effort levels this harness accepts across all its models; empty means effort is not a tunable surface."),
|
|
150
|
+
/**
|
|
151
|
+
* Per-model advertised effort vocabulary, discovered live where the vendor
|
|
152
|
+
* exposes it. Effort ceilings are a property of the MODEL, not the harness:
|
|
153
|
+
* codex advertises `ultra` on gpt-5.6-sol and stops at `xhigh` on gpt-5.4.
|
|
154
|
+
* A model absent here falls back to `effort_levels` (see
|
|
155
|
+
* `effortLevelsForModel`, the ONE owner of that lookup).
|
|
156
|
+
*/
|
|
157
|
+
model_effort_levels: z
|
|
158
|
+
.record(z.string(), ModelEffortCapability)
|
|
159
|
+
.default({})
|
|
160
|
+
.describe("Per-model advertised reasoning-effort vocabulary keyed by model id; a model absent here falls back to the harness-wide effort_levels union."),
|
|
161
|
+
/**
|
|
162
|
+
* Vendor CLI version the effort ladders were last verified against. Set from
|
|
163
|
+
* the LIVE probe when one succeeded, and from the recorded static snapshot's
|
|
164
|
+
* stamp when the probe fell back — so the freshness gate can tell the two
|
|
165
|
+
* apart. Null = never verified / not applicable.
|
|
166
|
+
*/
|
|
167
|
+
effort_levels_verified_against: z
|
|
168
|
+
.string()
|
|
169
|
+
.nullable()
|
|
170
|
+
.default(null)
|
|
171
|
+
.describe("Vendor CLI version the effort ladders were last verified against; null = never verified / not applicable."),
|
|
125
172
|
/**
|
|
126
173
|
* Known model ids/aliases this harness accepts — the manifest-declared model
|
|
127
174
|
* truth source used when the adapter has no live `models()` inventory.
|
|
@@ -618,9 +665,10 @@ export const HarnessEvent = z
|
|
|
618
665
|
"usage",
|
|
619
666
|
"error",
|
|
620
667
|
"status",
|
|
668
|
+
"context",
|
|
621
669
|
"completed",
|
|
622
670
|
])
|
|
623
|
-
.describe("Normalized event type covering session lifecycle, output, tool use, interaction, file changes, usage, transient status, and errors."),
|
|
671
|
+
.describe("Normalized event type covering session lifecycle, output, tool use, interaction, file changes, usage, transient status, context-management signals, and errors."),
|
|
624
672
|
session_id: Id.describe("Session the event belongs to."),
|
|
625
673
|
ts: z.string().describe("Event timestamp."),
|
|
626
674
|
text: z.string().optional().describe("Text content for thinking/message/error events."),
|
|
@@ -790,6 +838,51 @@ export const HarnessEvent = z
|
|
|
790
838
|
})
|
|
791
839
|
.optional()
|
|
792
840
|
.describe("Typed transient-failure signal set by the adapter from native CLI/API error shapes, consumed for bounded retry policy."),
|
|
841
|
+
/**
|
|
842
|
+
* Typed CONTEXT-management signal (D-16), a sibling of `transient`/
|
|
843
|
+
* `rate_limit` and DELIBERATELY separate from the transient-retry taxonomy:
|
|
844
|
+
* adapters set it in their parse layer from native compaction / context-
|
|
845
|
+
* exhaustion frames (claude `compact_boundary` system frames + result
|
|
846
|
+
* `terminal_reason`, codex only when a recorded fixture proves a typed
|
|
847
|
+
* marker). Context signals NEVER enter the transient_retry loop; a terminal
|
|
848
|
+
* `capacity_exhausted` with no completed WorkReport is what the finalizer
|
|
849
|
+
* maps to `interrupted / context_capacity_exhausted`.
|
|
850
|
+
*/
|
|
851
|
+
context: z
|
|
852
|
+
.object({
|
|
853
|
+
kind: z
|
|
854
|
+
.enum(["compaction_started", "compaction_completed", "capacity_exhausted"])
|
|
855
|
+
.describe("Kind of context signal: a compaction boundary starting/completing, or terminal capacity exhaustion."),
|
|
856
|
+
cause: z
|
|
857
|
+
.enum([
|
|
858
|
+
"prompt_too_long",
|
|
859
|
+
"repeated_refill",
|
|
860
|
+
"blocking_limit",
|
|
861
|
+
"window_exceeded",
|
|
862
|
+
"unknown",
|
|
863
|
+
])
|
|
864
|
+
.default("unknown")
|
|
865
|
+
.describe("Why the context signal fired, mapped onto a typed cause (never prose)."),
|
|
866
|
+
native_code: z
|
|
867
|
+
.string()
|
|
868
|
+
.nullable()
|
|
869
|
+
.default(null)
|
|
870
|
+
.describe("The vendor's own terminal/context code passed verbatim as evidence; null when none."),
|
|
871
|
+
trigger: z
|
|
872
|
+
.enum(["manual", "auto"])
|
|
873
|
+
.nullable()
|
|
874
|
+
.default(null)
|
|
875
|
+
.describe("Whether the compaction was manually or automatically triggered; null when unreported."),
|
|
876
|
+
pre_tokens: z
|
|
877
|
+
.number()
|
|
878
|
+
.int()
|
|
879
|
+
.nonnegative()
|
|
880
|
+
.nullable()
|
|
881
|
+
.default(null)
|
|
882
|
+
.describe("Token count before the compaction/exhaustion, when the vendor reports it; null otherwise."),
|
|
883
|
+
})
|
|
884
|
+
.optional()
|
|
885
|
+
.describe("Typed context-management signal (compaction boundary / capacity exhaustion) set by the adapter; orthogonal to the transient-retry taxonomy."),
|
|
793
886
|
error: z.string().optional().describe("Error text for error events."),
|
|
794
887
|
aborted: z
|
|
795
888
|
.boolean()
|