@claudexor/schema 1.0.1 → 2.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 +102 -30
- package/dist/agent-capabilities.d.ts.map +1 -1
- package/dist/agent-capabilities.js +49 -18
- package/dist/agent-capabilities.js.map +1 -1
- package/dist/apply-eligibility.d.ts.map +1 -1
- package/dist/apply-eligibility.js +22 -6
- package/dist/apply-eligibility.js.map +1 -1
- package/dist/attachment.d.ts +117 -52
- package/dist/attachment.d.ts.map +1 -1
- package/dist/attachment.js +60 -45
- package/dist/attachment.js.map +1 -1
- package/dist/auth.d.ts +1444 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +371 -0
- package/dist/auth.js.map +1 -0
- package/dist/budget.d.ts +147 -18
- package/dist/budget.d.ts.map +1 -1
- package/dist/budget.js +80 -22
- package/dist/budget.js.map +1 -1
- package/dist/config.d.ts +829 -135
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +195 -41
- package/dist/config.js.map +1 -1
- package/dist/context.d.ts +6 -6
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +31 -7
- package/dist/context.js.map +1 -1
- package/dist/control-gc.d.ts +185 -0
- package/dist/control-gc.d.ts.map +1 -0
- package/dist/control-gc.js +81 -0
- package/dist/control-gc.js.map +1 -0
- package/dist/control-operation-responses.d.ts +1298 -0
- package/dist/control-operation-responses.d.ts.map +1 -0
- package/dist/control-operation-responses.js +35 -0
- package/dist/control-operation-responses.js.map +1 -0
- package/dist/control-run-detail.d.ts +556 -247
- package/dist/control-run-detail.d.ts.map +1 -1
- package/dist/control-run-detail.js +72 -17
- package/dist/control-run-detail.js.map +1 -1
- package/dist/control-run-retry.d.ts +88 -0
- package/dist/control-run-retry.d.ts.map +1 -0
- package/dist/control-run-retry.js +40 -0
- package/dist/control-run-retry.js.map +1 -0
- package/dist/control-run-scope.d.ts +25 -0
- package/dist/control-run-scope.d.ts.map +1 -0
- package/dist/control-run-scope.js +22 -0
- package/dist/control-run-scope.js.map +1 -0
- package/dist/control-secret.d.ts +90 -0
- package/dist/control-secret.d.ts.map +1 -0
- package/dist/control-secret.js +35 -0
- package/dist/control-secret.js.map +1 -0
- package/dist/control-spec.d.ts +592 -0
- package/dist/control-spec.d.ts.map +1 -0
- package/dist/control-spec.js +85 -0
- package/dist/control-spec.js.map +1 -0
- package/dist/control-thread-apply.d.ts +175 -0
- package/dist/control-thread-apply.d.ts.map +1 -0
- package/dist/control-thread-apply.js +31 -0
- package/dist/control-thread-apply.js.map +1 -0
- package/dist/control-trust.d.ts +74 -10
- package/dist/control-trust.d.ts.map +1 -1
- package/dist/control-trust.js +31 -11
- package/dist/control-trust.js.map +1 -1
- package/dist/control.d.ts +1688 -1334
- package/dist/control.d.ts.map +1 -1
- package/dist/control.js +592 -333
- package/dist/control.js.map +1 -1
- package/dist/credential-profile.d.ts +454 -0
- package/dist/credential-profile.d.ts.map +1 -0
- package/dist/credential-profile.js +140 -0
- package/dist/credential-profile.js.map +1 -0
- package/dist/decision.d.ts +10 -10
- package/dist/decision.d.ts.map +1 -1
- package/dist/decision.js +62 -15
- package/dist/decision.js.map +1 -1
- package/dist/delivery.d.ts +99 -0
- package/dist/delivery.d.ts.map +1 -0
- package/dist/delivery.js +19 -0
- package/dist/delivery.js.map +1 -0
- package/dist/events.d.ts +41 -4
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +47 -4
- package/dist/events.js.map +1 -1
- package/dist/gate.d.ts +5 -5
- package/dist/gate.d.ts.map +1 -1
- package/dist/gate.js +25 -5
- package/dist/gate.js.map +1 -1
- package/dist/harness.d.ts +775 -237
- package/dist/harness.d.ts.map +1 -1
- package/dist/harness.js +314 -111
- package/dist/harness.js.map +1 -1
- package/dist/index.d.ts +19 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +19 -0
- package/dist/index.js.map +1 -1
- package/dist/operation.d.ts +185 -0
- package/dist/operation.d.ts.map +1 -0
- package/dist/operation.js +50 -0
- package/dist/operation.js.map +1 -0
- package/dist/orchestrate.d.ts +150 -22
- package/dist/orchestrate.d.ts.map +1 -1
- package/dist/orchestrate.js +117 -7
- package/dist/orchestrate.js.map +1 -1
- package/dist/primitives.d.ts.map +1 -1
- package/dist/primitives.js +4 -1
- package/dist/primitives.js.map +1 -1
- package/dist/problem.d.ts +29 -0
- package/dist/problem.d.ts.map +1 -0
- package/dist/problem.js +17 -0
- package/dist/problem.js.map +1 -0
- package/dist/project.d.ts +97 -0
- package/dist/project.d.ts.map +1 -0
- package/dist/project.js +27 -0
- package/dist/project.js.map +1 -0
- package/dist/quota.d.ts +269 -0
- package/dist/quota.d.ts.map +1 -0
- package/dist/quota.js +58 -0
- package/dist/quota.js.map +1 -0
- package/dist/raw.d.ts +195 -0
- package/dist/raw.d.ts.map +1 -0
- package/dist/raw.js +58 -0
- package/dist/raw.js.map +1 -0
- package/dist/readiness.d.ts +596 -0
- package/dist/readiness.d.ts.map +1 -0
- package/dist/readiness.js +87 -0
- package/dist/readiness.js.map +1 -0
- package/dist/recovery.d.ts +515 -0
- package/dist/recovery.d.ts.map +1 -0
- package/dist/recovery.js +93 -0
- package/dist/recovery.js.map +1 -0
- package/dist/request-requirements.d.ts +36 -0
- package/dist/request-requirements.d.ts.map +1 -0
- package/dist/request-requirements.js +29 -0
- package/dist/request-requirements.js.map +1 -0
- package/dist/review.d.ts +26 -26
- package/dist/review.d.ts.map +1 -1
- package/dist/review.js +50 -10
- package/dist/review.js.map +1 -1
- package/dist/route.d.ts +13 -13
- package/dist/route.d.ts.map +1 -1
- package/dist/route.js +19 -4
- package/dist/route.js.map +1 -1
- package/dist/setup.d.ts +9811 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/setup.js +475 -0
- package/dist/setup.js.map +1 -0
- package/dist/spec.d.ts +178 -61
- package/dist/spec.d.ts.map +1 -1
- package/dist/spec.js +69 -16
- package/dist/spec.js.map +1 -1
- package/dist/surface-run-controls.d.ts.map +1 -1
- package/dist/surface-run-controls.js +25 -21
- package/dist/surface-run-controls.js.map +1 -1
- package/dist/task.d.ts +1657 -60
- package/dist/task.d.ts.map +1 -1
- package/dist/task.js +144 -18
- package/dist/task.js.map +1 -1
- package/dist/telemetry.d.ts +487 -72
- package/dist/telemetry.d.ts.map +1 -1
- package/dist/telemetry.js +194 -16
- package/dist/telemetry.js.map +1 -1
- package/dist/thread.d.ts +89 -51
- package/dist/thread.d.ts.map +1 -1
- package/dist/thread.js +56 -11
- package/dist/thread.js.map +1 -1
- package/dist/tool-ref.d.ts +45 -0
- package/dist/tool-ref.d.ts.map +1 -0
- package/dist/tool-ref.js +45 -0
- package/dist/tool-ref.js.map +1 -0
- package/dist/workproduct.d.ts +3 -3
- package/dist/workproduct.d.ts.map +1 -1
- package/dist/workproduct.js.map +1 -1
- package/dist/workspace.d.ts +3 -3
- package/dist/workspace.d.ts.map +1 -1
- package/dist/workspace.js +12 -3
- package/dist/workspace.js.map +1 -1
- package/generated/AgentCapabilityCatalog.schema.json +53 -11
- package/generated/BudgetLease.schema.json +55 -6
- package/generated/BudgetObservation.schema.json +44 -7
- package/generated/ConformanceReport.schema.json +49 -0
- package/generated/ControlApplyCheckResponse.schema.json +34 -0
- package/generated/ControlArtifactListResponse.schema.json +57 -0
- package/generated/ControlAuthReadinessRefreshRequest.schema.json +38 -0
- package/generated/ControlAuthReadinessRefreshResponse.schema.json +85 -0
- package/generated/ControlCredentialProfileCreateRequest.schema.json +32 -0
- package/generated/ControlCredentialProfileCreateResponse.schema.json +142 -0
- package/generated/ControlCredentialProfileDeleteResponse.schema.json +107 -0
- package/generated/ControlCredentialProfilesResponse.schema.json +155 -0
- package/generated/ControlDeliveryResponse.schema.json +136 -0
- package/generated/ControlGcReceipt.schema.json +170 -0
- package/generated/ControlGcRequest.schema.json +18 -0
- package/generated/ControlHandshakeRequest.schema.json +26 -0
- package/generated/ControlHandshakeResponse.schema.json +30 -0
- package/generated/ControlHarnessListResponse.schema.json +198 -14
- package/generated/ControlHarnessModelsResponse.schema.json +19 -0
- package/generated/ControlHarnessSettingsPatch.schema.json +9 -12
- package/generated/ControlJournalEvent.schema.json +42 -0
- package/generated/ControlJournalExportReceipt.schema.json +49 -0
- package/generated/ControlJournalInspection.schema.json +149 -0
- package/generated/ControlJournalQuarantineReceipt.schema.json +55 -0
- package/generated/ControlJournalQuarantineRequest.schema.json +24 -0
- package/generated/ControlJournalValidation.schema.json +181 -0
- package/generated/ControlOperationCatalog.schema.json +128 -0
- package/generated/ControlOperationDescriptor.schema.json +110 -0
- package/generated/ControlProblem.schema.json +59 -0
- package/generated/ControlProject.schema.json +42 -0
- package/generated/ControlProjectListResponse.schema.json +54 -0
- package/generated/ControlProjectRegisterRequest.schema.json +19 -0
- package/generated/ControlProjectRelinkRequest.schema.json +19 -0
- package/generated/ControlQueuedRunInfo.schema.json +4 -2
- package/generated/ControlQuotaResponse.schema.json +177 -0
- package/generated/ControlResource.schema.json +59 -0
- package/generated/ControlRunAgainDraft.schema.json +539 -0
- package/generated/ControlRunDetail.schema.json +373 -34
- package/generated/ControlRunListResponse.schema.json +968 -0
- package/generated/ControlRunRetryResponse.schema.json +54 -0
- package/generated/ControlRunStartRequest.schema.json +123 -55
- package/generated/ControlRunStartResponse.schema.json +78 -0
- package/generated/ControlRunSummary.schema.json +312 -21
- package/generated/ControlSecretListResponse.schema.json +8 -14
- package/generated/ControlSecretMutationResponse.schema.json +32 -0
- package/generated/ControlSecretSetRequest.schema.json +27 -0
- package/generated/ControlSettingsSnapshot.schema.json +128 -44
- package/generated/ControlSettingsUpdateRequest.schema.json +119 -40
- package/generated/ControlSetupJob.schema.json +770 -64
- package/generated/ControlSetupJobCreateRequest.schema.json +16 -13
- package/generated/ControlSetupJobEvent.schema.json +869 -5
- package/generated/ControlSetupJobListFilter.schema.json +35 -0
- package/generated/ControlSetupJobListResponse.schema.json +770 -64
- package/generated/ControlSetupJobSnapshot.schema.json +878 -0
- package/generated/ControlSpecAnswersRequest.schema.json +74 -0
- package/generated/ControlSpecQuestionsRequest.schema.json +128 -2
- package/generated/ControlSpecSession.schema.json +249 -0
- package/generated/ControlSpecSessionListResponse.schema.json +261 -0
- package/generated/ControlThread.schema.json +36 -6
- package/generated/ControlThreadApplyResponse.schema.json +139 -0
- package/generated/ControlThreadCreateRequest.schema.json +6 -2
- package/generated/ControlThreadDetail.schema.json +64 -12
- package/generated/ControlThreadListResponse.schema.json +36 -6
- package/generated/ControlThreadTurnRequest.schema.json +413 -0
- package/generated/ControlThreadTurnResponse.schema.json +73 -0
- package/generated/ControlThreadUpdateRequest.schema.json +12 -1
- package/generated/ControlTrustListResponse.schema.json +6 -0
- package/generated/ControlTrustState.schema.json +6 -0
- package/generated/ControlTrustUpdateRequest.schema.json +65 -3
- package/generated/ControlUploadCreateRequest.schema.json +37 -0
- package/generated/ControlUploadFinalizeRequest.schema.json +17 -0
- package/generated/ControlUploadStatus.schema.json +40 -0
- package/generated/CredentialProfile.schema.json +78 -0
- package/generated/CredentialProfileStatus.schema.json +61 -0
- package/generated/DecisionRecord.schema.json +6 -3
- package/generated/GlobalConfig.schema.json +238 -55
- package/generated/HarnessEvent.schema.json +259 -11
- package/generated/HarnessManifest.schema.json +96 -14
- package/generated/HarnessModel.schema.json +19 -0
- package/generated/HarnessStatusDto.schema.json +198 -14
- package/generated/OrchestrateContract.schema.json +32 -6
- package/generated/OrchestratePlan.schema.json +20 -0
- package/generated/OrchestratePlanProgress.schema.json +61 -0
- package/generated/PaidBudget.schema.json +42 -0
- package/generated/Project.schema.json +45 -0
- package/generated/ProjectConfig.schema.json +45 -18
- package/generated/RawContextPacket.schema.json +184 -0
- package/generated/RawGitPatchEnvelope.schema.json +70 -0
- package/generated/RunEvent.schema.json +3 -0
- package/generated/RunTelemetry.schema.json +280 -0
- package/generated/SecretMetadata.schema.json +4 -7
- package/generated/Session.schema.json +14 -0
- package/generated/SpecPack.schema.json +118 -7
- package/generated/TaskContract.schema.json +224 -30
- package/generated/TestCommandInvocation.schema.json +45 -0
- package/generated/Thread.schema.json +74 -6
- package/generated/ThreadHeadPing.schema.json +40 -0
- package/generated/ThreadTurn.schema.json +24 -11
- package/generated/TrustConfig.schema.json +77 -0
- package/package.json +3 -2
- package/generated/ControlSetupJobConfirmRequest.schema.json +0 -18
- package/generated/ControlSpecFreezeRequest.schema.json +0 -83
package/dist/harness.js
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
2
|
+
import { AuthSourceKind, AuthSourceReadiness, CredentialRoute } from "./auth.js";
|
|
3
|
+
import { CredentialProfile } from "./credential-profile.js";
|
|
4
|
+
import { ToolRef } from "./tool-ref.js";
|
|
5
|
+
import { AccessProfile, AuthPreference, ExternalContextPolicy, Id, Intent, ProviderFamily, } from "./primitives.js";
|
|
6
|
+
import { Attachment, AttachmentInputClass } from "./attachment.js";
|
|
7
|
+
import { ImplementationTransport, RawContextPacket, RawGitPatchEnvelope, RawPatchRefusalCode, } from "./raw.js";
|
|
8
|
+
import { QuotaConstraint, QuotaSource } from "./quota.js";
|
|
4
9
|
/** Quality of a usage/quota signal a harness can emit. */
|
|
5
10
|
export const SignalQuality = z
|
|
6
11
|
.enum(["exact", "native", "observed", "manual", "unknown"])
|
|
@@ -46,12 +51,28 @@ export const WebPolicySupport = z
|
|
|
46
51
|
export const HarnessCapabilities = z
|
|
47
52
|
.object({
|
|
48
53
|
plan: z.boolean().default(false).describe("The harness can produce plans (plan intent)."),
|
|
49
|
-
implement: z
|
|
50
|
-
|
|
51
|
-
|
|
54
|
+
implement: z
|
|
55
|
+
.boolean()
|
|
56
|
+
.default(false)
|
|
57
|
+
.describe("The harness can implement code changes (implement intent)."),
|
|
58
|
+
implementation_transport: ImplementationTransport.default("workspace").describe("Typed producer/consumer transport used when implement=true."),
|
|
59
|
+
create_from_scratch: z
|
|
60
|
+
.boolean()
|
|
61
|
+
.default(false)
|
|
62
|
+
.describe("The harness can scaffold new projects (create_from_scratch intent)."),
|
|
63
|
+
review: z
|
|
64
|
+
.boolean()
|
|
65
|
+
.default(false)
|
|
66
|
+
.describe("The harness can act as a reviewer (review intent)."),
|
|
52
67
|
/** Consumed by the Phase-3 FinalVerifier routing (gating pushes `verify`). */
|
|
53
|
-
verify: z
|
|
54
|
-
|
|
68
|
+
verify: z
|
|
69
|
+
.boolean()
|
|
70
|
+
.default(false)
|
|
71
|
+
.describe("The harness can act as the FinalVerifier (verify intent)."),
|
|
72
|
+
synthesize: z
|
|
73
|
+
.boolean()
|
|
74
|
+
.default(false)
|
|
75
|
+
.describe("The harness can synthesize across candidate outputs (synthesize intent)."),
|
|
55
76
|
read_files: z.boolean().default(false).describe("The harness can read project files."),
|
|
56
77
|
/**
|
|
57
78
|
* The adapter can inject a browser-automation MCP server (Playwright MCP) that
|
|
@@ -64,9 +85,15 @@ export const HarnessCapabilities = z
|
|
|
64
85
|
.describe("The adapter can inject a browser-automation MCP server (Playwright MCP) the harness drives as browser_* tools; never injected when web policy is off."),
|
|
65
86
|
web_policy: WebPolicySupport.default("none"),
|
|
66
87
|
/** Honors HarnessRunSpec.max_turns (e.g. claude --max-turns). */
|
|
67
|
-
max_turns: z
|
|
88
|
+
max_turns: z
|
|
89
|
+
.boolean()
|
|
90
|
+
.default(false)
|
|
91
|
+
.describe("Honors HarnessRunSpec.max_turns (e.g. a native --max-turns flag)."),
|
|
68
92
|
/** Honors tool_permission_policy allow/deny lists (e.g. claude --allowedTools). */
|
|
69
|
-
tool_lists: z
|
|
93
|
+
tool_lists: z
|
|
94
|
+
.boolean()
|
|
95
|
+
.default(false)
|
|
96
|
+
.describe("Honors tool_permission_policy allow/deny lists (e.g. a native --allowedTools flag)."),
|
|
70
97
|
/**
|
|
71
98
|
* The adapter can surface interactive user questions (interaction_requested
|
|
72
99
|
* events) and deliver typed answers back into the live session. Claude's
|
|
@@ -114,9 +141,22 @@ export const HarnessCapabilities = z
|
|
|
114
141
|
* routing logic.
|
|
115
142
|
*/
|
|
116
143
|
known_models: z
|
|
117
|
-
.array(z.
|
|
144
|
+
.array(z.union([
|
|
145
|
+
z.string(),
|
|
146
|
+
z
|
|
147
|
+
.object({
|
|
148
|
+
id: z.string().min(1).describe("Model id/alias."),
|
|
149
|
+
/** Credential routes this model is available on. A bare string
|
|
150
|
+
* entry means ALL routes (backward shape). */
|
|
151
|
+
routes: z
|
|
152
|
+
.array(z.enum(["local_session", "api_key"]))
|
|
153
|
+
.min(1)
|
|
154
|
+
.describe("Credential routes this model is available on."),
|
|
155
|
+
})
|
|
156
|
+
.strict(),
|
|
157
|
+
]))
|
|
118
158
|
.default([])
|
|
119
|
-
.describe("Manifest-declared model ids/aliases this harness accepts, used as the model truth source when the adapter has no live inventory; explicit models outside the truth source are refused."),
|
|
159
|
+
.describe("Manifest-declared model ids/aliases this harness accepts (bare string = every credential route; object form scopes a model to specific routes), used as the model truth source when the adapter has no live inventory; explicit models outside the truth source are refused."),
|
|
120
160
|
/**
|
|
121
161
|
* Vendor CLI version this `known_models` hint set was last verified against
|
|
122
162
|
* (freshness note, surfaced with manifest-sourced model lists and checked by
|
|
@@ -129,9 +169,15 @@ export const HarnessCapabilities = z
|
|
|
129
169
|
.describe("Vendor CLI version the known_models hints were last verified against; null = never verified / not applicable."),
|
|
130
170
|
})
|
|
131
171
|
.describe("Declared harness capabilities the engine actually consumes for intent gating, routing, knob support, and disclosure.");
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
172
|
+
/** Model ids from a known_models list that are valid on `route`. ONE owner for
|
|
173
|
+
* the route filter (INV-122): a bare string entry is valid on every route;
|
|
174
|
+
* `route: null` (undecidable pre-spawn) returns only the route-UNRESTRICTED
|
|
175
|
+
* ids — fail-closed, a route-scoped model never leaks past an unknown route. */
|
|
176
|
+
export function knownModelIdsForRoute(entries, route) {
|
|
177
|
+
return entries
|
|
178
|
+
.filter((entry) => typeof entry === "string" ? true : route !== null && entry.routes.includes(route))
|
|
179
|
+
.map((entry) => (typeof entry === "string" ? entry : entry.id));
|
|
180
|
+
}
|
|
135
181
|
export const CredentialTransportKind = z
|
|
136
182
|
.enum(["config_file", "env_var", "oauth_token_env", "os_keychain", "http_header", "none"])
|
|
137
183
|
.describe("Mechanism that carries a credential to the harness process (config file, env var, OAuth token env, OS keychain, HTTP header, or none).");
|
|
@@ -142,19 +188,36 @@ export const CredentialTransport = z
|
|
|
142
188
|
.object({
|
|
143
189
|
source: AuthSourceKind,
|
|
144
190
|
kind: CredentialTransportKind,
|
|
145
|
-
relocatable_by: z
|
|
191
|
+
relocatable_by: z
|
|
192
|
+
.array(CredentialRelocation)
|
|
193
|
+
.default([])
|
|
194
|
+
.describe("Relocation levers that can move this transport into a scoped environment."),
|
|
146
195
|
})
|
|
147
196
|
.describe("How a credential from one auth source physically reaches the harness process.");
|
|
148
197
|
export const AuthCapabilities = z
|
|
149
198
|
.object({
|
|
150
|
-
supported_sources: z
|
|
151
|
-
|
|
152
|
-
|
|
199
|
+
supported_sources: z
|
|
200
|
+
.array(AuthSourceKind)
|
|
201
|
+
.default([])
|
|
202
|
+
.describe("Auth sources this harness supports."),
|
|
203
|
+
preferred_source: AuthSourceKind.nullable()
|
|
204
|
+
.default(null)
|
|
205
|
+
.describe("Auth source the adapter prefers; null when it has no preference."),
|
|
206
|
+
credential_transports: z
|
|
207
|
+
.array(CredentialTransport)
|
|
208
|
+
.default([])
|
|
209
|
+
.describe("Declared credential transports per auth source."),
|
|
153
210
|
})
|
|
154
211
|
.default({})
|
|
155
212
|
.describe("Declared auth routing facts for a harness.");
|
|
156
213
|
export const ContainmentKind = z
|
|
157
|
-
.enum([
|
|
214
|
+
.enum([
|
|
215
|
+
"env_or_file_injection",
|
|
216
|
+
"scoped_home_keychain_bridge",
|
|
217
|
+
"host_user_context",
|
|
218
|
+
"process_sandbox",
|
|
219
|
+
"container",
|
|
220
|
+
])
|
|
158
221
|
.describe("Isolation containment level an adapter supports for run environments, from env/file injection through scoped-HOME keychain bridging to process sandboxes and containers.");
|
|
159
222
|
export const IsolationCapabilities = z
|
|
160
223
|
.object({
|
|
@@ -187,12 +250,11 @@ export const HarnessCapabilityProfile = z
|
|
|
187
250
|
auth: AuthCapabilities,
|
|
188
251
|
access_control: AccessControlCapabilities,
|
|
189
252
|
isolation: IsolationCapabilities,
|
|
190
|
-
/**
|
|
191
|
-
|
|
192
|
-
image_input: ImageInputMode.default("none"),
|
|
253
|
+
/** Every accepted media class has a finite MIME/size/count/transport declaration. */
|
|
254
|
+
attachment_inputs: z.array(AttachmentInputClass).default([]),
|
|
193
255
|
})
|
|
194
256
|
.default({})
|
|
195
|
-
.describe("Structured per-harness facts the engine consumes: auth routing, isolation containment, readonly mechanism, and
|
|
257
|
+
.describe("Structured per-harness facts the engine consumes: auth routing, isolation containment, readonly mechanism, and finite attachment inputs.");
|
|
196
258
|
/**
|
|
197
259
|
* One enumerable model offered by a harness. Deliberately small: only the
|
|
198
260
|
* fields a real enumeration source (an OpenAI-compatible `GET /v1/models`)
|
|
@@ -202,7 +264,11 @@ export const HarnessCapabilityProfile = z
|
|
|
202
264
|
export const HarnessModel = z
|
|
203
265
|
.object({
|
|
204
266
|
id: z.string().describe("Model id as the vendor enumerates it."),
|
|
205
|
-
label: z
|
|
267
|
+
label: z
|
|
268
|
+
.string()
|
|
269
|
+
.nullable()
|
|
270
|
+
.default(null)
|
|
271
|
+
.describe("Human-readable model label; null when the enumeration source has none."),
|
|
206
272
|
context_window: z
|
|
207
273
|
.number()
|
|
208
274
|
.int()
|
|
@@ -210,6 +276,13 @@ export const HarnessModel = z
|
|
|
210
276
|
.nullable()
|
|
211
277
|
.default(null)
|
|
212
278
|
.describe("Context window in tokens; null when the enumeration source does not report it."),
|
|
279
|
+
/** Credential routes the model is scoped to per the manifest annotation;
|
|
280
|
+
* null = unannotated (available on every route). */
|
|
281
|
+
routes: z
|
|
282
|
+
.array(z.enum(["local_session", "api_key"]))
|
|
283
|
+
.nullable()
|
|
284
|
+
.default(null)
|
|
285
|
+
.describe("Credential routes the model is scoped to; null = every route."),
|
|
213
286
|
})
|
|
214
287
|
.describe("One enumerable model offered by a harness, limited to fields a real enumeration source can honestly populate.");
|
|
215
288
|
export const HarnessManifest = z
|
|
@@ -227,7 +300,10 @@ export const HarnessManifest = z
|
|
|
227
300
|
.array(z.enum(["local_session", "api_key", "none"]))
|
|
228
301
|
.default([])
|
|
229
302
|
.describe("Auth modes the harness supports (availability only, not readiness)."),
|
|
230
|
-
access_profiles_supported: z
|
|
303
|
+
access_profiles_supported: z
|
|
304
|
+
.array(AccessProfile)
|
|
305
|
+
.default([])
|
|
306
|
+
.describe("Access profiles the adapter can enforce."),
|
|
231
307
|
})
|
|
232
308
|
.describe("Static manifest an adapter declares for its harness: identity, kind, capabilities, auth modes, and access profiles.");
|
|
233
309
|
/** Result of a conformance probe for one capability check. */
|
|
@@ -236,7 +312,12 @@ export const ConformanceCheck = z
|
|
|
236
312
|
id: z.string().describe("Check id."),
|
|
237
313
|
status: z.enum(["pass", "fail", "skip"]).describe("Outcome of the check: pass, fail, or skip."),
|
|
238
314
|
detail: z.string().optional().describe("Human-readable detail for the outcome."),
|
|
239
|
-
duration_ms: z
|
|
315
|
+
duration_ms: z
|
|
316
|
+
.number()
|
|
317
|
+
.int()
|
|
318
|
+
.nonnegative()
|
|
319
|
+
.optional()
|
|
320
|
+
.describe("How long the check took, in milliseconds."),
|
|
240
321
|
})
|
|
241
322
|
.describe("Result of a conformance probe for one capability check.");
|
|
242
323
|
export const AdapterStatus = z
|
|
@@ -247,35 +328,28 @@ export const ConformanceReport = z
|
|
|
247
328
|
harness_id: Id.describe("Harness the report is about."),
|
|
248
329
|
status: AdapterStatus,
|
|
249
330
|
checks: z.array(ConformanceCheck).default([]).describe("Individual probe results."),
|
|
250
|
-
enabled_intents: z
|
|
331
|
+
enabled_intents: z
|
|
332
|
+
.array(Intent)
|
|
333
|
+
.default([])
|
|
334
|
+
.describe("Intents the gateway will route to this harness."),
|
|
251
335
|
disabled_intents: z.array(Intent).default([]).describe("Intents the doctor disabled."),
|
|
252
|
-
reasons: z
|
|
336
|
+
reasons: z
|
|
337
|
+
.array(z.string())
|
|
338
|
+
.default([])
|
|
339
|
+
.describe("Human-readable reasons for degraded/unavailable status or disabled intents."),
|
|
340
|
+
auth_sources: z
|
|
341
|
+
.array(AuthSourceReadiness)
|
|
342
|
+
.default([])
|
|
343
|
+
.describe("Doctor-backed readiness by authentication source; an empty array means the adapter did not report source readiness."),
|
|
253
344
|
})
|
|
254
345
|
.describe("Doctor/conformance report for one harness: status, probe results, and the intents enabled or disabled by it.");
|
|
255
|
-
/**
|
|
256
|
-
* Per-run browser-tool wiring. Present (non-null) on a HarnessRunSpec ONLY when
|
|
257
|
-
* the orchestrator has decided this run gets the agent-driven browser: the run
|
|
258
|
-
* opted in, the harness has the `browser_tool` capability, AND web policy is not
|
|
259
|
-
* `off`. The adapter injects Playwright MCP accordingly.
|
|
260
|
-
*/
|
|
261
346
|
export const BrowserToolSpec = z
|
|
262
347
|
.object({
|
|
263
|
-
/**
|
|
264
|
-
* `--output-dir` for the browser MCP. Captures the per-navigation accessibility
|
|
265
|
-
* SNAPSHOTS (Playwright MCP writes screenshot image files to the agent's cwd,
|
|
266
|
-
* not here) into the run artifact tree as a browsing record the Canvas gallery
|
|
267
|
-
* lists. The live view is the headed window itself. Null = MCP's own temp dir.
|
|
268
|
-
*/
|
|
269
348
|
output_dir: z
|
|
270
349
|
.string()
|
|
271
350
|
.nullable()
|
|
272
351
|
.default(null)
|
|
273
352
|
.describe("Output directory for the browser MCP's per-navigation accessibility snapshots, kept in the run artifact tree; null = the MCP's own temp dir."),
|
|
274
|
-
/**
|
|
275
|
-
* Run the browser headless (no visible window). Default false — a headed
|
|
276
|
-
* Chromium so the user can watch the agent browse directly (the chosen mirror:
|
|
277
|
-
* a real visible window, not an embedded screencast).
|
|
278
|
-
*/
|
|
279
353
|
headless: z
|
|
280
354
|
.boolean()
|
|
281
355
|
.default(false)
|
|
@@ -288,6 +362,17 @@ export const HarnessRunSpec = z
|
|
|
288
362
|
session_id: Id.describe("Session id this run belongs to."),
|
|
289
363
|
intent: Intent,
|
|
290
364
|
prompt: z.string().describe("Prompt text delivered to the harness."),
|
|
365
|
+
/**
|
|
366
|
+
* Optional caller-supplied system-level instructions layered on top of the
|
|
367
|
+
* prompt for TASK-PRODUCING lanes (primary, candidate, planner, explorer,
|
|
368
|
+
* orchestrate-planner) — never reviewers, synthesis, or the auth smoke.
|
|
369
|
+
* Adapters deliver it natively (claude `--append-system-prompt`, codex
|
|
370
|
+
* `developer_instructions`) or as a delimited prompt prefix.
|
|
371
|
+
*/
|
|
372
|
+
instructions: z
|
|
373
|
+
.string()
|
|
374
|
+
.optional()
|
|
375
|
+
.describe("Caller-supplied system-level instructions for task-producing lanes; delivered natively (append-system-prompt / developer_instructions) or as a delimited prompt prefix."),
|
|
291
376
|
cwd: z.string().describe("Working directory the harness process runs in."),
|
|
292
377
|
access: AccessProfile.default("workspace_write"),
|
|
293
378
|
external_context_policy: ExternalContextPolicy.default("auto"),
|
|
@@ -299,15 +384,36 @@ export const HarnessRunSpec = z
|
|
|
299
384
|
})
|
|
300
385
|
.default({ web: "auto", allow: [], deny: [] })
|
|
301
386
|
.describe("Tool allow/deny policy for harnesses that support tool lists."),
|
|
302
|
-
model_hint: z
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
387
|
+
model_hint: z
|
|
388
|
+
.string()
|
|
389
|
+
.nullable()
|
|
390
|
+
.default(null)
|
|
391
|
+
.describe("Requested model id; null = the harness's default."),
|
|
392
|
+
effort_hint: EffortHint.nullable()
|
|
393
|
+
.default(null)
|
|
394
|
+
.describe("Requested reasoning effort; null = the harness's default."),
|
|
395
|
+
max_turns: z
|
|
396
|
+
.number()
|
|
397
|
+
.int()
|
|
398
|
+
.nullable()
|
|
399
|
+
.default(null)
|
|
400
|
+
.describe("Maximum agent turns, for harnesses that honor it; null = no limit."),
|
|
306
401
|
/**
|
|
307
402
|
* Which auth route the attempt should use. `auto` = subscription-first with
|
|
308
403
|
* api_key fallback; adapters seed native session vs inject the key accordingly.
|
|
309
404
|
*/
|
|
310
405
|
auth_preference: AuthPreference.default("auto"),
|
|
406
|
+
/**
|
|
407
|
+
* The RESOLVED credential profile for this attempt (INV-135), stamped by
|
|
408
|
+
* the orchestrator (the one resolve owner) from the durable registry —
|
|
409
|
+
* adapters consume the typed transport and never read config. Null = the
|
|
410
|
+
* engine-default credential ladder. An explicit profile is STRICT: the
|
|
411
|
+
* adapter uses exactly its transport or refuses with a typed error, never
|
|
412
|
+
* a silent fallback to default credentials.
|
|
413
|
+
*/
|
|
414
|
+
credential_profile: CredentialProfile.nullable()
|
|
415
|
+
.default(null)
|
|
416
|
+
.describe("Resolved credential profile for this attempt; null = engine-default credentials. Explicit profiles are strict: exact transport or typed refusal."),
|
|
311
417
|
/**
|
|
312
418
|
* Native CLI session id to resume into (codex `exec resume`, claude `--resume`,
|
|
313
419
|
* cursor `agent --resume`, opencode `run --session`). Null starts a fresh session.
|
|
@@ -326,16 +432,33 @@ export const HarnessRunSpec = z
|
|
|
326
432
|
.enum(["mirror_native", "clean"])
|
|
327
433
|
.default("mirror_native")
|
|
328
434
|
.describe("How the child harness env is composed: mirror_native inherits the parent env (minus provider-secret scrub); clean spawns from a minimal allowlist."),
|
|
329
|
-
|
|
435
|
+
evidence_policy: z
|
|
436
|
+
.enum(["stream_only", "allow_vendor_session_artifacts"])
|
|
437
|
+
.default("allow_vendor_session_artifacts")
|
|
438
|
+
.describe("Whether route evidence may read vendor session artifacts; auth capability smokes require stream_only."),
|
|
439
|
+
/**
|
|
440
|
+
* Opt-in live text deltas (F2.5 W-C4): adapters that support partial
|
|
441
|
+
* output add their native flag (claude --include-partial-messages,
|
|
442
|
+
* cursor --stream-partial-output; codex exec has no deltas). Set ONLY on
|
|
443
|
+
* single-candidate chat lanes — racing lanes stay delta-free (noise × N).
|
|
444
|
+
* Delta messages carry payload.delta=true and never enter answers.
|
|
445
|
+
*/
|
|
446
|
+
stream_deltas: z
|
|
447
|
+
.boolean()
|
|
448
|
+
.default(false)
|
|
449
|
+
.describe("Opt-in live text deltas on supporting adapters; single-candidate chat lanes only."),
|
|
450
|
+
env: z
|
|
451
|
+
.record(z.string(), z.string())
|
|
452
|
+
.default({})
|
|
453
|
+
.describe("Extra environment variables injected into the harness process."),
|
|
330
454
|
/**
|
|
331
|
-
*
|
|
332
|
-
*
|
|
333
|
-
* harnesses — the orchestrator drops + discloses rather than silently ignore.
|
|
455
|
+
* Immutable user/agent resources forwarded only after the selected adapter's
|
|
456
|
+
* finite `capability_profile.attachment_inputs` declaration admits them.
|
|
334
457
|
*/
|
|
335
458
|
attachments: z
|
|
336
459
|
.array(Attachment)
|
|
337
460
|
.default([])
|
|
338
|
-
.describe("
|
|
461
|
+
.describe("Digest-bound resources forwarded to the harness in its declared native attachment transport."),
|
|
339
462
|
/**
|
|
340
463
|
* Agent-driven browser wiring. Null = no browser tool this run (the common
|
|
341
464
|
* case). Set by the orchestrator only when the run opted in, the harness has
|
|
@@ -354,46 +477,26 @@ export const HarnessRunSpec = z
|
|
|
354
477
|
.unknown()
|
|
355
478
|
.optional()
|
|
356
479
|
.describe("JSON Schema constraining the harness's final message; passed only to routes declaring json_schema_output."),
|
|
357
|
-
|
|
358
|
-
})
|
|
359
|
-
.describe("Spec passed to a harness adapter's run(): prompt, working directory, access, policies, routing hints, and wiring.");
|
|
360
|
-
/**
|
|
361
|
-
* Coarse tool classification used for typed governance (no tool-name string
|
|
362
|
-
* matching outside adapters). Adapters map native tool names to a kind.
|
|
363
|
-
*/
|
|
364
|
-
export const ToolKind = z
|
|
365
|
-
.enum(["web", "file", "command", "mcp", "search", "other"])
|
|
366
|
-
.describe("Coarse tool classification used for typed governance; adapters map native tool names to a kind.");
|
|
367
|
-
/**
|
|
368
|
-
* Typed tool reference attached to `tool_call` / `tool_result` events.
|
|
369
|
-
* `status` is REQUIRED on `tool_result` events (adapter conformance enforces it);
|
|
370
|
-
* a missing status on a result is treated as a dropped/diagnostic event, never as ok.
|
|
371
|
-
*/
|
|
372
|
-
export const ToolRef = z
|
|
373
|
-
.object({
|
|
374
|
-
name: z.string().describe("Native tool name as the harness reports it."),
|
|
375
|
-
kind: ToolKind.default("other"),
|
|
376
|
-
use_id: z.string().optional().describe("Correlates a tool_result with its tool_call."),
|
|
377
|
-
/** Redacted, bounded human-readable target (query/url/path/command). */
|
|
378
|
-
target: z.string().optional().describe("Redacted, bounded human-readable target (query/url/path/command)."),
|
|
379
|
-
status: z
|
|
380
|
-
.enum(["ok", "error", "cancelled", "denied"])
|
|
480
|
+
raw_context_packet: RawContextPacket.nullable()
|
|
381
481
|
.optional()
|
|
382
|
-
.describe("
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
exit_code: z.number().int().optional().describe("Process exit code for command tools, when known."),
|
|
482
|
+
.describe("Hash-bound context packet supplied only to git-patch-envelope producers."),
|
|
483
|
+
extra: z
|
|
484
|
+
.record(z.string(), z.unknown())
|
|
485
|
+
.default({})
|
|
486
|
+
.describe("Adapter-specific extras (no cross-adapter meaning)."),
|
|
388
487
|
})
|
|
389
|
-
.describe("
|
|
488
|
+
.describe("Spec passed to a harness adapter's run(): prompt, working directory, access, policies, routing hints, and wiring.");
|
|
390
489
|
/**
|
|
391
490
|
* One multiple-choice option of an interactive question (AskUserQuestion-style).
|
|
392
491
|
*/
|
|
393
492
|
export const InteractionOption = z
|
|
394
493
|
.object({
|
|
395
494
|
label: z.string().describe("Option label shown to the user."),
|
|
396
|
-
description: z
|
|
495
|
+
description: z
|
|
496
|
+
.string()
|
|
497
|
+
.nullable()
|
|
498
|
+
.default(null)
|
|
499
|
+
.describe("Optional longer explanation of the option."),
|
|
397
500
|
})
|
|
398
501
|
.describe("One multiple-choice option of an interactive question.");
|
|
399
502
|
export const InteractionQuestion = z
|
|
@@ -401,8 +504,15 @@ export const InteractionQuestion = z
|
|
|
401
504
|
id: Id.describe("Question id."),
|
|
402
505
|
question: z.string().describe("The question text."),
|
|
403
506
|
/** Short chip/header text some harnesses attach to a question. */
|
|
404
|
-
header: z
|
|
405
|
-
|
|
507
|
+
header: z
|
|
508
|
+
.string()
|
|
509
|
+
.nullable()
|
|
510
|
+
.default(null)
|
|
511
|
+
.describe("Short chip/header text some harnesses attach to a question."),
|
|
512
|
+
options: z
|
|
513
|
+
.array(InteractionOption)
|
|
514
|
+
.default([])
|
|
515
|
+
.describe("Selectable options; empty for free-text-only questions."),
|
|
406
516
|
multi_select: z.boolean().default(false).describe("Whether multiple options may be selected."),
|
|
407
517
|
})
|
|
408
518
|
.describe("One question of an interactive user-input request.");
|
|
@@ -414,16 +524,27 @@ export const InteractionQuestion = z
|
|
|
414
524
|
export const InteractionRequest = z
|
|
415
525
|
.object({
|
|
416
526
|
interaction_id: Id.describe("Interaction id used to correlate the answer set."),
|
|
417
|
-
questions: z
|
|
527
|
+
questions: z
|
|
528
|
+
.array(InteractionQuestion)
|
|
529
|
+
.default([])
|
|
530
|
+
.describe("Questions the harness wants answered."),
|
|
418
531
|
/** Native tool that raised the request (e.g. "AskUserQuestion"). */
|
|
419
|
-
source_tool: z
|
|
532
|
+
source_tool: z
|
|
533
|
+
.string()
|
|
534
|
+
.nullable()
|
|
535
|
+
.default(null)
|
|
536
|
+
.describe('Native tool that raised the request (e.g. "AskUserQuestion").'),
|
|
420
537
|
})
|
|
421
538
|
.describe("A live request for user input raised by an interactive harness session.");
|
|
422
539
|
export const InteractionAnswer = z
|
|
423
540
|
.object({
|
|
424
541
|
question_id: Id.describe("Id of the question being answered."),
|
|
425
542
|
selected_labels: z.array(z.string()).default([]).describe("Labels of the selected options."),
|
|
426
|
-
free_text: z
|
|
543
|
+
free_text: z
|
|
544
|
+
.string()
|
|
545
|
+
.nullable()
|
|
546
|
+
.default(null)
|
|
547
|
+
.describe("Free-text answer; null when only options were selected."),
|
|
427
548
|
})
|
|
428
549
|
.describe("The user's answer to one interactive question.");
|
|
429
550
|
export const InteractionAnswerSet = z
|
|
@@ -444,47 +565,74 @@ export const HarnessEvent = z
|
|
|
444
565
|
"tool_result",
|
|
445
566
|
"interaction_requested",
|
|
446
567
|
"file_change",
|
|
568
|
+
"patch_produced",
|
|
447
569
|
"usage",
|
|
448
570
|
"error",
|
|
571
|
+
"status",
|
|
449
572
|
"completed",
|
|
450
573
|
])
|
|
451
|
-
.describe("Normalized event type covering session lifecycle, output, tool use, interaction, file changes, usage, and errors."),
|
|
574
|
+
.describe("Normalized event type covering session lifecycle, output, tool use, interaction, file changes, usage, transient status, and errors."),
|
|
452
575
|
session_id: Id.describe("Session the event belongs to."),
|
|
453
576
|
ts: z.string().describe("Event timestamp."),
|
|
454
577
|
text: z.string().optional().describe("Text content for thinking/message/error events."),
|
|
578
|
+
/**
|
|
579
|
+
* True on the harness's TYPED final answer message — claude/cursor's
|
|
580
|
+
* terminal `result` event, codex's last agent message finalized at
|
|
581
|
+
* `turn.completed`. Narration (mid-run) messages never set it; consumers
|
|
582
|
+
* take a final message VERBATIM as the answer instead of joining prose.
|
|
583
|
+
*/
|
|
584
|
+
final: z
|
|
585
|
+
.boolean()
|
|
586
|
+
.optional()
|
|
587
|
+
.describe("True on the harness's typed final-answer message (vendor terminal result); mid-run narration never sets it."),
|
|
455
588
|
/** Typed tool info; set on `tool_call` and `tool_result` events. */
|
|
456
589
|
tool: ToolRef.optional().describe("Typed tool info; set on tool_call and tool_result events."),
|
|
457
590
|
/** Set on `interaction_requested` events. */
|
|
458
591
|
interaction: InteractionRequest.optional().describe("Set on interaction_requested events."),
|
|
592
|
+
patch_envelope: RawGitPatchEnvelope.optional().describe("Typed hash-bound patch produced by a git-patch-envelope harness."),
|
|
593
|
+
refusal_code: RawPatchRefusalCode.optional().describe("Typed refusal code for a rejected raw patch contract."),
|
|
459
594
|
usage: z
|
|
460
595
|
.object({
|
|
461
596
|
input_tokens: z.number().int().nonnegative().optional().describe("Input tokens consumed."),
|
|
462
|
-
output_tokens: z
|
|
463
|
-
|
|
597
|
+
output_tokens: z
|
|
598
|
+
.number()
|
|
599
|
+
.int()
|
|
600
|
+
.nonnegative()
|
|
601
|
+
.optional()
|
|
602
|
+
.describe("Output tokens produced."),
|
|
603
|
+
cached_input_tokens: z
|
|
604
|
+
.number()
|
|
605
|
+
.int()
|
|
606
|
+
.nonnegative()
|
|
607
|
+
.optional()
|
|
608
|
+
.describe("Input tokens served from cache."),
|
|
464
609
|
cost_usd: z.number().nonnegative().optional().describe("Cost in USD."),
|
|
465
610
|
/** True when cost_usd is derived from token pricing (not natively reported). */
|
|
466
|
-
estimated: z
|
|
611
|
+
estimated: z
|
|
612
|
+
.boolean()
|
|
613
|
+
.optional()
|
|
614
|
+
.describe("True when cost_usd is derived from token pricing (not natively reported)."),
|
|
467
615
|
})
|
|
468
616
|
.optional()
|
|
469
617
|
.describe("Token/cost usage reported by the harness."),
|
|
470
618
|
observed_model: z.string().optional().describe("Model the harness actually reported using."),
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
*
|
|
475
|
-
*
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
*/
|
|
619
|
+
credential_route: CredentialRoute.optional().describe("Concrete credential route selected before spawn; first-class route evidence, never inferred from free-form payload text."),
|
|
620
|
+
credential_source: AuthSourceKind.optional().describe("Concrete credential source selected before spawn; exact native subscription requires native_session, never an OAuth token or API key."),
|
|
621
|
+
/** Credential profile the attempt runs under (INV-135); stamped by the
|
|
622
|
+
* adapter alongside credential_route so quota/api_retry records stay
|
|
623
|
+
* independently attributable to the profile. Absent = engine default. */
|
|
624
|
+
credential_profile_id: Id.optional().describe("Credential profile the attempt runs under; absent = engine-default credentials (INV-135 attribution)."),
|
|
625
|
+
/** Vendor-owned quota windows. All reported windows remain independent. */
|
|
479
626
|
quota: z
|
|
480
627
|
.object({
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
628
|
+
source: QuotaSource,
|
|
629
|
+
plan_label: z.string().nullable().default(null),
|
|
630
|
+
subject_id: z.string().nullable().default(null),
|
|
631
|
+
constraints: z.array(QuotaConstraint),
|
|
485
632
|
})
|
|
633
|
+
.strict()
|
|
486
634
|
.optional()
|
|
487
|
-
.describe("
|
|
635
|
+
.describe("All quota windows from a vendor-owned machine-readable source; never scraped from prose or collapsed into a fake aggregate."),
|
|
488
636
|
/**
|
|
489
637
|
* Typed live plan/todo progress: adapters map their native plan tools
|
|
490
638
|
* (codex `todo_list` items, claude `TodoWrite` todos) into this shape in
|
|
@@ -498,7 +646,9 @@ export const HarnessEvent = z
|
|
|
498
646
|
.array(z.object({
|
|
499
647
|
id: z.string().describe("Plan item id."),
|
|
500
648
|
title: z.string().describe("Plan item title."),
|
|
501
|
-
status: z
|
|
649
|
+
status: z
|
|
650
|
+
.enum(["pending", "in_progress", "completed"])
|
|
651
|
+
.describe("Progress state of the item."),
|
|
502
652
|
}))
|
|
503
653
|
.default([])
|
|
504
654
|
.describe("Last-wins list of plan/todo items."),
|
|
@@ -513,7 +663,11 @@ export const HarnessEvent = z
|
|
|
513
663
|
*/
|
|
514
664
|
rate_limit: z
|
|
515
665
|
.object({
|
|
516
|
-
resets_at: z
|
|
666
|
+
resets_at: z
|
|
667
|
+
.string()
|
|
668
|
+
.nullable()
|
|
669
|
+
.default(null)
|
|
670
|
+
.describe("When the rate window resets, when reported."),
|
|
517
671
|
retry_delay_ms: z
|
|
518
672
|
.number()
|
|
519
673
|
.int()
|
|
@@ -524,6 +678,48 @@ export const HarnessEvent = z
|
|
|
524
678
|
})
|
|
525
679
|
.optional()
|
|
526
680
|
.describe("Typed rate-limit/quota signal set by the adapter when the native CLI reports a 429/quota/overload."),
|
|
681
|
+
/**
|
|
682
|
+
* Typed transient-status detail; set on `status` events. Today's only kind
|
|
683
|
+
* is claude's native `api_retry` (the CLI is retrying an API call by
|
|
684
|
+
* itself): the adapter maps the official fields through instead of
|
|
685
|
+
* fabricating a thinking block, so retries land in the activity feed —
|
|
686
|
+
* never in the reasoning disclosure. `error_category` passes the vendor's
|
|
687
|
+
* own label (e.g. rate_limit, overloaded) verbatim as disclosed evidence.
|
|
688
|
+
*/
|
|
689
|
+
status: z
|
|
690
|
+
.object({
|
|
691
|
+
kind: z.enum(["api_retry"]).describe("Kind of transient status."),
|
|
692
|
+
attempt: z.number().int().nonnegative().optional().describe("Retry attempt number."),
|
|
693
|
+
max_retries: z
|
|
694
|
+
.number()
|
|
695
|
+
.int()
|
|
696
|
+
.nonnegative()
|
|
697
|
+
.optional()
|
|
698
|
+
.describe("Vendor's configured retry ceiling."),
|
|
699
|
+
retry_delay_ms: z
|
|
700
|
+
.number()
|
|
701
|
+
.int()
|
|
702
|
+
.nonnegative()
|
|
703
|
+
.optional()
|
|
704
|
+
.describe("Delay before the retry, when reported."),
|
|
705
|
+
error_category: z
|
|
706
|
+
.enum([
|
|
707
|
+
"authentication_failed",
|
|
708
|
+
"oauth_org_not_allowed",
|
|
709
|
+
"billing_error",
|
|
710
|
+
"rate_limit",
|
|
711
|
+
"overloaded",
|
|
712
|
+
"invalid_request",
|
|
713
|
+
"model_not_found",
|
|
714
|
+
"server_error",
|
|
715
|
+
"max_output_tokens",
|
|
716
|
+
"unknown",
|
|
717
|
+
])
|
|
718
|
+
.optional()
|
|
719
|
+
.describe("Vendor's error category mapped onto the documented enum; unrecognized values collapse to 'unknown' (never free-form prose)."),
|
|
720
|
+
})
|
|
721
|
+
.optional()
|
|
722
|
+
.describe("Typed transient-status detail set by the adapter on status events."),
|
|
527
723
|
/**
|
|
528
724
|
* Typed transient-failure signal. Adapters set this from native CLI/API error
|
|
529
725
|
* shapes in their parse layer; the orchestrator consumes it for bounded retry
|
|
@@ -546,7 +742,14 @@ export const HarnessEvent = z
|
|
|
546
742
|
.optional()
|
|
547
743
|
.describe("Typed transient-failure signal set by the adapter from native CLI/API error shapes, consumed for bounded retry policy."),
|
|
548
744
|
error: z.string().optional().describe("Error text for error events."),
|
|
549
|
-
|
|
745
|
+
aborted: z
|
|
746
|
+
.boolean()
|
|
747
|
+
.optional()
|
|
748
|
+
.describe("Typed terminal cancellation marker, set on completed events when the run was aborted."),
|
|
749
|
+
payload: z
|
|
750
|
+
.record(z.string(), z.unknown())
|
|
751
|
+
.optional()
|
|
752
|
+
.describe("Raw adapter-specific payload for diagnostics."),
|
|
550
753
|
})
|
|
551
754
|
.describe("Normalized event emitted by every adapter (the SSOT of adapter output).");
|
|
552
755
|
//# sourceMappingURL=harness.js.map
|