@claudexor/schema 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (175) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +16 -0
  3. package/dist/agent-capabilities.d.ts +366 -0
  4. package/dist/agent-capabilities.d.ts.map +1 -0
  5. package/dist/agent-capabilities.js +125 -0
  6. package/dist/agent-capabilities.js.map +1 -0
  7. package/dist/apply-eligibility.d.ts +76 -0
  8. package/dist/apply-eligibility.d.ts.map +1 -0
  9. package/dist/apply-eligibility.js +37 -0
  10. package/dist/apply-eligibility.js.map +1 -0
  11. package/dist/attachment.d.ts +69 -0
  12. package/dist/attachment.d.ts.map +1 -0
  13. package/dist/attachment.js +54 -0
  14. package/dist/attachment.js.map +1 -0
  15. package/dist/budget.d.ts +75 -0
  16. package/dist/budget.d.ts.map +1 -0
  17. package/dist/budget.js +54 -0
  18. package/dist/budget.js.map +1 -0
  19. package/dist/config.d.ts +743 -0
  20. package/dist/config.d.ts.map +1 -0
  21. package/dist/config.js +194 -0
  22. package/dist/config.js.map +1 -0
  23. package/dist/context.d.ts +222 -0
  24. package/dist/context.d.ts.map +1 -0
  25. package/dist/context.js +70 -0
  26. package/dist/context.js.map +1 -0
  27. package/dist/control-run-detail.d.ts +1686 -0
  28. package/dist/control-run-detail.d.ts.map +1 -0
  29. package/dist/control-run-detail.js +107 -0
  30. package/dist/control-run-detail.js.map +1 -0
  31. package/dist/control-trust.d.ts +79 -0
  32. package/dist/control-trust.d.ts.map +1 -0
  33. package/dist/control-trust.js +39 -0
  34. package/dist/control-trust.js.map +1 -0
  35. package/dist/control.d.ts +4226 -0
  36. package/dist/control.d.ts.map +1 -0
  37. package/dist/control.js +1022 -0
  38. package/dist/control.js.map +1 -0
  39. package/dist/decision.d.ts +208 -0
  40. package/dist/decision.d.ts.map +1 -0
  41. package/dist/decision.js +98 -0
  42. package/dist/decision.js.map +1 -0
  43. package/dist/events.d.ts +70 -0
  44. package/dist/events.d.ts.map +1 -0
  45. package/dist/events.js +105 -0
  46. package/dist/events.js.map +1 -0
  47. package/dist/gate.d.ts +37 -0
  48. package/dist/gate.d.ts.map +1 -0
  49. package/dist/gate.js +20 -0
  50. package/dist/gate.js.map +1 -0
  51. package/dist/harness.d.ts +1418 -0
  52. package/dist/harness.d.ts.map +1 -0
  53. package/dist/harness.js +552 -0
  54. package/dist/harness.js.map +1 -0
  55. package/dist/index.d.ts +32 -0
  56. package/dist/index.d.ts.map +1 -0
  57. package/dist/index.js +32 -0
  58. package/dist/index.js.map +1 -0
  59. package/dist/orchestrate.d.ts +428 -0
  60. package/dist/orchestrate.d.ts.map +1 -0
  61. package/dist/orchestrate.js +246 -0
  62. package/dist/orchestrate.js.map +1 -0
  63. package/dist/primitives.d.ts +71 -0
  64. package/dist/primitives.d.ts.map +1 -0
  65. package/dist/primitives.js +114 -0
  66. package/dist/primitives.js.map +1 -0
  67. package/dist/review.d.ts +220 -0
  68. package/dist/review.d.ts.map +1 -0
  69. package/dist/review.js +91 -0
  70. package/dist/review.js.map +1 -0
  71. package/dist/route.d.ts +67 -0
  72. package/dist/route.d.ts.map +1 -0
  73. package/dist/route.js +33 -0
  74. package/dist/route.js.map +1 -0
  75. package/dist/spec.d.ts +561 -0
  76. package/dist/spec.d.ts.map +1 -0
  77. package/dist/spec.js +133 -0
  78. package/dist/spec.js.map +1 -0
  79. package/dist/surface-run-controls.d.ts +14 -0
  80. package/dist/surface-run-controls.d.ts.map +1 -0
  81. package/dist/surface-run-controls.js +142 -0
  82. package/dist/surface-run-controls.js.map +1 -0
  83. package/dist/task.d.ts +565 -0
  84. package/dist/task.d.ts.map +1 -0
  85. package/dist/task.js +186 -0
  86. package/dist/task.js.map +1 -0
  87. package/dist/telemetry.d.ts +660 -0
  88. package/dist/telemetry.d.ts.map +1 -0
  89. package/dist/telemetry.js +140 -0
  90. package/dist/telemetry.js.map +1 -0
  91. package/dist/thread.d.ts +348 -0
  92. package/dist/thread.d.ts.map +1 -0
  93. package/dist/thread.js +194 -0
  94. package/dist/thread.js.map +1 -0
  95. package/dist/workproduct.d.ts +31 -0
  96. package/dist/workproduct.d.ts.map +1 -0
  97. package/dist/workproduct.js +25 -0
  98. package/dist/workproduct.js.map +1 -0
  99. package/dist/workspace.d.ts +53 -0
  100. package/dist/workspace.d.ts.map +1 -0
  101. package/dist/workspace.js +30 -0
  102. package/dist/workspace.js.map +1 -0
  103. package/generated/AgentCapabilityCatalog.schema.json +389 -0
  104. package/generated/ApplyEligibility.schema.json +44 -0
  105. package/generated/BudgetLease.schema.json +95 -0
  106. package/generated/BudgetObservation.schema.json +76 -0
  107. package/generated/ConformanceReport.schema.json +107 -0
  108. package/generated/ContextPack.schema.json +186 -0
  109. package/generated/ControlApplyCheckRequest.schema.json +54 -0
  110. package/generated/ControlApplyRequest.schema.json +74 -0
  111. package/generated/ControlHarnessListResponse.schema.json +498 -0
  112. package/generated/ControlHarnessModelsResponse.schema.json +78 -0
  113. package/generated/ControlHarnessSettingsPatch.schema.json +130 -0
  114. package/generated/ControlInteractionAnswerRequest.schema.json +48 -0
  115. package/generated/ControlInteractionAnswerResponse.schema.json +35 -0
  116. package/generated/ControlPendingInteraction.schema.json +129 -0
  117. package/generated/ControlQueuedRunInfo.schema.json +44 -0
  118. package/generated/ControlRunControlRequest.schema.json +61 -0
  119. package/generated/ControlRunControlResponse.schema.json +40 -0
  120. package/generated/ControlRunDecisionRequest.schema.json +98 -0
  121. package/generated/ControlRunDecisionResponse.schema.json +40 -0
  122. package/generated/ControlRunDetail.schema.json +1925 -0
  123. package/generated/ControlRunStartInfo.schema.json +33 -0
  124. package/generated/ControlRunStartRequest.schema.json +429 -0
  125. package/generated/ControlRunSummary.schema.json +666 -0
  126. package/generated/ControlSecretListResponse.schema.json +57 -0
  127. package/generated/ControlSettingsSnapshot.schema.json +281 -0
  128. package/generated/ControlSettingsUpdateRequest.schema.json +212 -0
  129. package/generated/ControlSetupJob.schema.json +148 -0
  130. package/generated/ControlSetupJobConfirmRequest.schema.json +18 -0
  131. package/generated/ControlSetupJobCreateRequest.schema.json +38 -0
  132. package/generated/ControlSetupJobEvent.schema.json +58 -0
  133. package/generated/ControlSetupJobListResponse.schema.json +162 -0
  134. package/generated/ControlSpecFreezeRequest.schema.json +83 -0
  135. package/generated/ControlSpecQuestionsRequest.schema.json +80 -0
  136. package/generated/ControlThread.schema.json +129 -0
  137. package/generated/ControlThreadApplyRequest.schema.json +32 -0
  138. package/generated/ControlThreadApplyResponse.schema.json +47 -0
  139. package/generated/ControlThreadCreateRequest.schema.json +107 -0
  140. package/generated/ControlThreadDetail.schema.json +515 -0
  141. package/generated/ControlThreadListResponse.schema.json +141 -0
  142. package/generated/ControlThreadUpdateRequest.schema.json +46 -0
  143. package/generated/ControlTrustListResponse.schema.json +59 -0
  144. package/generated/ControlTrustState.schema.json +45 -0
  145. package/generated/ControlTrustUpdateRequest.schema.json +26 -0
  146. package/generated/DecisionRecord.schema.json +232 -0
  147. package/generated/GateResult.schema.json +81 -0
  148. package/generated/GlobalConfig.schema.json +313 -0
  149. package/generated/HarnessEvent.schema.json +360 -0
  150. package/generated/HarnessManifest.schema.json +350 -0
  151. package/generated/HarnessModel.schema.json +41 -0
  152. package/generated/HarnessStatusDto.schema.json +486 -0
  153. package/generated/McpRunToolResult.schema.json +91 -0
  154. package/generated/OrchestrateContract.schema.json +93 -0
  155. package/generated/OrchestratePlan.schema.json +244 -0
  156. package/generated/OrchestratePlanProgress.schema.json +103 -0
  157. package/generated/ProjectConfig.schema.json +95 -0
  158. package/generated/ReviewFinding.schema.json +226 -0
  159. package/generated/RouteFallbackPayload.schema.json +79 -0
  160. package/generated/RouteProof.schema.json +111 -0
  161. package/generated/RunControl.schema.json +51 -0
  162. package/generated/RunEvent.schema.json +103 -0
  163. package/generated/RunFailure.schema.json +98 -0
  164. package/generated/RunTelemetry.schema.json +433 -0
  165. package/generated/SecretMetadata.schema.json +34 -0
  166. package/generated/Session.schema.json +80 -0
  167. package/generated/SessionReboundLineage.schema.json +73 -0
  168. package/generated/SpecPack.schema.json +372 -0
  169. package/generated/TaskContract.schema.json +501 -0
  170. package/generated/Thread.schema.json +176 -0
  171. package/generated/ThreadTurn.schema.json +172 -0
  172. package/generated/TrustConfig.schema.json +44 -0
  173. package/generated/WorkProduct.schema.json +60 -0
  174. package/generated/WorkspaceEnvelope.schema.json +94 -0
  175. package/package.json +43 -0
@@ -0,0 +1,1418 @@
1
+ import { z } from "zod";
2
+ /** Quality of a usage/quota signal a harness can emit. */
3
+ export declare const SignalQuality: z.ZodEnum<["exact", "native", "observed", "manual", "unknown"]>;
4
+ 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
+ export declare const HarnessKind: z.ZodEnum<["local_cli", "remote_api", "fake"]>;
14
+ export type HarnessKind = z.infer<typeof HarnessKind>;
15
+ /**
16
+ * How a harness can honor the external web policy:
17
+ * - `native`: web modes are a native config surface (codex web_search).
18
+ * - `tools`: web runs through permissioned tools the adapter can allow/deny (claude).
19
+ * - `uncontrolled`: the harness CAN reach the web but exposes no enforceable
20
+ * switch — incompatible with `off` (cannot be enforced) AND with
21
+ * `cached`/`live` (cannot produce required evidence). cursor/opencode today.
22
+ * - `none`: the harness has NO web access at all — trivially satisfies `off`,
23
+ * incompatible with web-required policies. raw-api/fake.
24
+ */
25
+ export declare const WebPolicySupport: z.ZodEnum<["native", "tools", "uncontrolled", "none"]>;
26
+ export type WebPolicySupport = z.infer<typeof WebPolicySupport>;
27
+ /**
28
+ * Declared capabilities the ENGINE actually consumes (intent gating, routing,
29
+ * knob support, disclosure). Every field here has a reader; declared-but-
30
+ * never-read booleans (historically: spec/repair/shell/edit_files/
31
+ * apply_patch/structured_events/structured_output/resume/cancel/mcp/plugins/
32
+ * worktree_native) were deleted — a capability with no consumer is the same
33
+ * bug class as a staged field. Re-add one only WITH its consumer in the same
34
+ * change (as `json_schema_output` was, together with the structured-output
35
+ * gate that reads it).
36
+ */
37
+ export declare const HarnessCapabilities: z.ZodObject<{
38
+ plan: z.ZodDefault<z.ZodBoolean>;
39
+ implement: z.ZodDefault<z.ZodBoolean>;
40
+ create_from_scratch: z.ZodDefault<z.ZodBoolean>;
41
+ review: z.ZodDefault<z.ZodBoolean>;
42
+ /** Consumed by the Phase-3 FinalVerifier routing (gating pushes `verify`). */
43
+ verify: z.ZodDefault<z.ZodBoolean>;
44
+ synthesize: z.ZodDefault<z.ZodBoolean>;
45
+ read_files: z.ZodDefault<z.ZodBoolean>;
46
+ /**
47
+ * The adapter can inject a browser-automation MCP server (Playwright MCP) that
48
+ * this harness drives as `browser_*` tools (navigate / screenshot / snapshot).
49
+ * Gated on web policy: never injected under `external_context_policy:off`.
50
+ */
51
+ browser_tool: z.ZodDefault<z.ZodBoolean>;
52
+ web_policy: z.ZodDefault<z.ZodEnum<["native", "tools", "uncontrolled", "none"]>>;
53
+ /** Honors HarnessRunSpec.max_turns (e.g. claude --max-turns). */
54
+ max_turns: z.ZodDefault<z.ZodBoolean>;
55
+ /** Honors tool_permission_policy allow/deny lists (e.g. claude --allowedTools). */
56
+ tool_lists: z.ZodDefault<z.ZodBoolean>;
57
+ /**
58
+ * The adapter can surface interactive user questions (interaction_requested
59
+ * events) and deliver typed answers back into the live session. Claude's
60
+ * bidirectional stream-json control protocol today; honest false elsewhere.
61
+ */
62
+ interactive: z.ZodDefault<z.ZodBoolean>;
63
+ /**
64
+ * The harness can play the autonomous `orchestrate` planner intent: plan
65
+ * multi-harness work over the typed tool belt. NOT a privileged role — routed
66
+ * like reviewers via doctor + capability + quota headroom.
67
+ */
68
+ orchestrate: z.ZodDefault<z.ZodBoolean>;
69
+ /**
70
+ * The harness can constrain its FINAL message to a caller-supplied JSON
71
+ * Schema (codex `--output-schema <file>`, claude `--json-schema <json>`).
72
+ * Consumer: the engine passes HarnessRunSpec.output_schema only to routes
73
+ * declaring this; everything else keeps fenced-JSON parsing.
74
+ */
75
+ json_schema_output: z.ZodDefault<z.ZodBoolean>;
76
+ /**
77
+ * Ordered (weakest→strongest) reasoning-effort levels this harness actually
78
+ * accepts. Empty = effort is not a tunable surface. The shared effort
79
+ * normalizer clamps any requested EffortHint onto the nearest member.
80
+ */
81
+ effort_levels: z.ZodDefault<z.ZodArray<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>, "many">>;
82
+ /**
83
+ * Known model ids/aliases this harness accepts — the manifest-declared model
84
+ * truth source used when the adapter has no live `models()` inventory.
85
+ * STRICT: an explicit model outside the active truth source is refused
86
+ * at settings-write, run preflight, and reviewer resolution; a harness with
87
+ * NO truth source (no `models()` and an empty list) refuses every explicit
88
+ * model. Data-driven like `effort_levels` — no model id is hardcoded in
89
+ * routing logic.
90
+ */
91
+ known_models: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
92
+ /**
93
+ * Vendor CLI version this `known_models` hint set was last verified against
94
+ * (freshness note, surfaced with manifest-sourced model lists and checked by
95
+ * the model-hints-freshness gate). Null = never verified / not applicable.
96
+ */
97
+ known_models_verified_against: z.ZodDefault<z.ZodNullable<z.ZodString>>;
98
+ }, "strip", z.ZodTypeAny, {
99
+ plan: boolean;
100
+ orchestrate: boolean;
101
+ implement: boolean;
102
+ create_from_scratch: boolean;
103
+ review: boolean;
104
+ verify: boolean;
105
+ synthesize: boolean;
106
+ read_files: boolean;
107
+ browser_tool: boolean;
108
+ web_policy: "none" | "native" | "tools" | "uncontrolled";
109
+ max_turns: boolean;
110
+ tool_lists: boolean;
111
+ interactive: boolean;
112
+ json_schema_output: boolean;
113
+ effort_levels: ("low" | "medium" | "high" | "xhigh" | "max")[];
114
+ known_models: string[];
115
+ known_models_verified_against: string | null;
116
+ }, {
117
+ plan?: boolean | undefined;
118
+ orchestrate?: boolean | undefined;
119
+ implement?: boolean | undefined;
120
+ create_from_scratch?: boolean | undefined;
121
+ review?: boolean | undefined;
122
+ verify?: boolean | undefined;
123
+ synthesize?: boolean | undefined;
124
+ read_files?: boolean | undefined;
125
+ browser_tool?: boolean | undefined;
126
+ web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
127
+ max_turns?: boolean | undefined;
128
+ tool_lists?: boolean | undefined;
129
+ interactive?: boolean | undefined;
130
+ json_schema_output?: boolean | undefined;
131
+ effort_levels?: ("low" | "medium" | "high" | "xhigh" | "max")[] | undefined;
132
+ known_models?: string[] | undefined;
133
+ known_models_verified_against?: string | null | undefined;
134
+ }>;
135
+ export type HarnessCapabilities = z.infer<typeof HarnessCapabilities>;
136
+ export declare const AuthSourceKind: z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
137
+ export type AuthSourceKind = z.infer<typeof AuthSourceKind>;
138
+ export declare const CredentialTransportKind: z.ZodEnum<["config_file", "env_var", "oauth_token_env", "os_keychain", "http_header", "none"]>;
139
+ export type CredentialTransportKind = z.infer<typeof CredentialTransportKind>;
140
+ export declare const CredentialRelocation: z.ZodEnum<["HOME", "CONFIG_DIR", "ENV", "none"]>;
141
+ export type CredentialRelocation = z.infer<typeof CredentialRelocation>;
142
+ export declare const CredentialTransport: z.ZodObject<{
143
+ source: z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
144
+ kind: z.ZodEnum<["config_file", "env_var", "oauth_token_env", "os_keychain", "http_header", "none"]>;
145
+ relocatable_by: z.ZodDefault<z.ZodArray<z.ZodEnum<["HOME", "CONFIG_DIR", "ENV", "none"]>, "many">>;
146
+ }, "strip", z.ZodTypeAny, {
147
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
148
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
149
+ relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
150
+ }, {
151
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
152
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
153
+ relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
154
+ }>;
155
+ export type CredentialTransport = z.infer<typeof CredentialTransport>;
156
+ export declare const AuthCapabilities: z.ZodDefault<z.ZodObject<{
157
+ supported_sources: z.ZodDefault<z.ZodArray<z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>, "many">>;
158
+ preferred_source: z.ZodDefault<z.ZodNullable<z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>>>;
159
+ credential_transports: z.ZodDefault<z.ZodArray<z.ZodObject<{
160
+ source: z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
161
+ kind: z.ZodEnum<["config_file", "env_var", "oauth_token_env", "os_keychain", "http_header", "none"]>;
162
+ relocatable_by: z.ZodDefault<z.ZodArray<z.ZodEnum<["HOME", "CONFIG_DIR", "ENV", "none"]>, "many">>;
163
+ }, "strip", z.ZodTypeAny, {
164
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
165
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
166
+ relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
167
+ }, {
168
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
169
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
170
+ relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
171
+ }>, "many">>;
172
+ }, "strip", z.ZodTypeAny, {
173
+ supported_sources: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[];
174
+ preferred_source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null;
175
+ credential_transports: {
176
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
177
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
178
+ relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
179
+ }[];
180
+ }, {
181
+ supported_sources?: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[] | undefined;
182
+ preferred_source?: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null | undefined;
183
+ credential_transports?: {
184
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
185
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
186
+ relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
187
+ }[] | undefined;
188
+ }>>;
189
+ export type AuthCapabilities = z.infer<typeof AuthCapabilities>;
190
+ export declare const ContainmentKind: z.ZodEnum<["env_or_file_injection", "scoped_home_keychain_bridge", "host_user_context", "process_sandbox", "container"]>;
191
+ export type ContainmentKind = z.infer<typeof ContainmentKind>;
192
+ export declare const IsolationCapabilities: z.ZodDefault<z.ZodObject<{
193
+ supported_containment: z.ZodDefault<z.ZodArray<z.ZodEnum<["env_or_file_injection", "scoped_home_keychain_bridge", "host_user_context", "process_sandbox", "container"]>, "many">>;
194
+ }, "strip", z.ZodTypeAny, {
195
+ supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
196
+ }, {
197
+ supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
198
+ }>>;
199
+ export type IsolationCapabilities = z.infer<typeof IsolationCapabilities>;
200
+ export declare const ReadonlyMechanism: z.ZodEnum<["fs_sandbox", "permission_deny", "tool_allowlist", "none"]>;
201
+ export type ReadonlyMechanism = z.infer<typeof ReadonlyMechanism>;
202
+ export declare const AccessControlCapabilities: z.ZodDefault<z.ZodObject<{
203
+ readonly_mechanism: z.ZodDefault<z.ZodEnum<["fs_sandbox", "permission_deny", "tool_allowlist", "none"]>>;
204
+ }, "strip", z.ZodTypeAny, {
205
+ readonly_mechanism: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist";
206
+ }, {
207
+ readonly_mechanism?: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist" | undefined;
208
+ }>>;
209
+ export type AccessControlCapabilities = z.infer<typeof AccessControlCapabilities>;
210
+ /**
211
+ * Structured per-harness facts the engine consumes: auth routing (scoped-home
212
+ * keychain bridging), isolation containment, honest readonly mechanism, and
213
+ * vision input. The v0.15 triage deleted the never-consumed subtrees
214
+ * (execution_surfaces, session, output, probe/env metadata, access booleans):
215
+ * a declared capability with no consumer is a staged field. Re-add a branch
216
+ * only WITH its consumer in the same change.
217
+ */
218
+ export declare const HarnessCapabilityProfile: z.ZodDefault<z.ZodObject<{
219
+ auth: z.ZodDefault<z.ZodObject<{
220
+ supported_sources: z.ZodDefault<z.ZodArray<z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>, "many">>;
221
+ preferred_source: z.ZodDefault<z.ZodNullable<z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>>>;
222
+ credential_transports: z.ZodDefault<z.ZodArray<z.ZodObject<{
223
+ source: z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
224
+ kind: z.ZodEnum<["config_file", "env_var", "oauth_token_env", "os_keychain", "http_header", "none"]>;
225
+ relocatable_by: z.ZodDefault<z.ZodArray<z.ZodEnum<["HOME", "CONFIG_DIR", "ENV", "none"]>, "many">>;
226
+ }, "strip", z.ZodTypeAny, {
227
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
228
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
229
+ relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
230
+ }, {
231
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
232
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
233
+ relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
234
+ }>, "many">>;
235
+ }, "strip", z.ZodTypeAny, {
236
+ supported_sources: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[];
237
+ preferred_source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null;
238
+ credential_transports: {
239
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
240
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
241
+ relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
242
+ }[];
243
+ }, {
244
+ supported_sources?: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[] | undefined;
245
+ preferred_source?: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null | undefined;
246
+ credential_transports?: {
247
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
248
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
249
+ relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
250
+ }[] | undefined;
251
+ }>>;
252
+ access_control: z.ZodDefault<z.ZodObject<{
253
+ readonly_mechanism: z.ZodDefault<z.ZodEnum<["fs_sandbox", "permission_deny", "tool_allowlist", "none"]>>;
254
+ }, "strip", z.ZodTypeAny, {
255
+ readonly_mechanism: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist";
256
+ }, {
257
+ readonly_mechanism?: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist" | undefined;
258
+ }>>;
259
+ isolation: z.ZodDefault<z.ZodObject<{
260
+ supported_containment: z.ZodDefault<z.ZodArray<z.ZodEnum<["env_or_file_injection", "scoped_home_keychain_bridge", "host_user_context", "process_sandbox", "container"]>, "many">>;
261
+ }, "strip", z.ZodTypeAny, {
262
+ supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
263
+ }, {
264
+ supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
265
+ }>>;
266
+ /** How the harness accepts image input (drives honest attach gating + the
267
+ * per-adapter serializer). `none` = no vision input on this route. */
268
+ image_input: z.ZodDefault<z.ZodEnum<["file_path", "base64_stream", "base64_inline", "none"]>>;
269
+ }, "strip", z.ZodTypeAny, {
270
+ auth: {
271
+ supported_sources: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[];
272
+ preferred_source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null;
273
+ credential_transports: {
274
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
275
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
276
+ relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
277
+ }[];
278
+ };
279
+ access_control: {
280
+ readonly_mechanism: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist";
281
+ };
282
+ isolation: {
283
+ supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
284
+ };
285
+ image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
286
+ }, {
287
+ auth?: {
288
+ supported_sources?: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[] | undefined;
289
+ preferred_source?: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null | undefined;
290
+ credential_transports?: {
291
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
292
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
293
+ relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
294
+ }[] | undefined;
295
+ } | undefined;
296
+ access_control?: {
297
+ readonly_mechanism?: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist" | undefined;
298
+ } | undefined;
299
+ isolation?: {
300
+ supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
301
+ } | undefined;
302
+ image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
303
+ }>>;
304
+ export type HarnessCapabilityProfile = z.infer<typeof HarnessCapabilityProfile>;
305
+ /**
306
+ * One enumerable model offered by a harness. Deliberately small: only the
307
+ * fields a real enumeration source (an OpenAI-compatible `GET /v1/models`)
308
+ * can honestly populate. `label`/`context_window` are nullable because the
309
+ * raw `{data:[{id}]}` list rarely carries them.
310
+ */
311
+ export declare const HarnessModel: z.ZodObject<{
312
+ id: z.ZodString;
313
+ label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
314
+ context_window: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
315
+ }, "strip", z.ZodTypeAny, {
316
+ id: string;
317
+ label: string | null;
318
+ context_window: number | null;
319
+ }, {
320
+ id: string;
321
+ label?: string | null | undefined;
322
+ context_window?: number | null | undefined;
323
+ }>;
324
+ export type HarnessModel = z.infer<typeof HarnessModel>;
325
+ export declare const HarnessManifest: z.ZodObject<{
326
+ id: z.ZodString;
327
+ display_name: z.ZodString;
328
+ kind: z.ZodEnum<["local_cli", "remote_api", "fake"]>;
329
+ version: z.ZodOptional<z.ZodString>;
330
+ adapter_version: z.ZodOptional<z.ZodString>;
331
+ provider_family: z.ZodDefault<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>>;
332
+ capability_profile: z.ZodDefault<z.ZodObject<{
333
+ auth: z.ZodDefault<z.ZodObject<{
334
+ supported_sources: z.ZodDefault<z.ZodArray<z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>, "many">>;
335
+ preferred_source: z.ZodDefault<z.ZodNullable<z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>>>;
336
+ credential_transports: z.ZodDefault<z.ZodArray<z.ZodObject<{
337
+ source: z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
338
+ kind: z.ZodEnum<["config_file", "env_var", "oauth_token_env", "os_keychain", "http_header", "none"]>;
339
+ relocatable_by: z.ZodDefault<z.ZodArray<z.ZodEnum<["HOME", "CONFIG_DIR", "ENV", "none"]>, "many">>;
340
+ }, "strip", z.ZodTypeAny, {
341
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
342
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
343
+ relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
344
+ }, {
345
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
346
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
347
+ relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
348
+ }>, "many">>;
349
+ }, "strip", z.ZodTypeAny, {
350
+ supported_sources: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[];
351
+ preferred_source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null;
352
+ credential_transports: {
353
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
354
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
355
+ relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
356
+ }[];
357
+ }, {
358
+ supported_sources?: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[] | undefined;
359
+ preferred_source?: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null | undefined;
360
+ credential_transports?: {
361
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
362
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
363
+ relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
364
+ }[] | undefined;
365
+ }>>;
366
+ access_control: z.ZodDefault<z.ZodObject<{
367
+ readonly_mechanism: z.ZodDefault<z.ZodEnum<["fs_sandbox", "permission_deny", "tool_allowlist", "none"]>>;
368
+ }, "strip", z.ZodTypeAny, {
369
+ readonly_mechanism: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist";
370
+ }, {
371
+ readonly_mechanism?: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist" | undefined;
372
+ }>>;
373
+ isolation: z.ZodDefault<z.ZodObject<{
374
+ supported_containment: z.ZodDefault<z.ZodArray<z.ZodEnum<["env_or_file_injection", "scoped_home_keychain_bridge", "host_user_context", "process_sandbox", "container"]>, "many">>;
375
+ }, "strip", z.ZodTypeAny, {
376
+ supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
377
+ }, {
378
+ supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
379
+ }>>;
380
+ /** How the harness accepts image input (drives honest attach gating + the
381
+ * per-adapter serializer). `none` = no vision input on this route. */
382
+ image_input: z.ZodDefault<z.ZodEnum<["file_path", "base64_stream", "base64_inline", "none"]>>;
383
+ }, "strip", z.ZodTypeAny, {
384
+ auth: {
385
+ supported_sources: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[];
386
+ preferred_source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null;
387
+ credential_transports: {
388
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
389
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
390
+ relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
391
+ }[];
392
+ };
393
+ access_control: {
394
+ readonly_mechanism: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist";
395
+ };
396
+ isolation: {
397
+ supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
398
+ };
399
+ image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
400
+ }, {
401
+ auth?: {
402
+ supported_sources?: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[] | undefined;
403
+ preferred_source?: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null | undefined;
404
+ credential_transports?: {
405
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
406
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
407
+ relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
408
+ }[] | undefined;
409
+ } | undefined;
410
+ access_control?: {
411
+ readonly_mechanism?: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist" | undefined;
412
+ } | undefined;
413
+ isolation?: {
414
+ supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
415
+ } | undefined;
416
+ image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
417
+ }>>;
418
+ /** Compatibility convenience fields. New routing/UI should prefer capability_profile. */
419
+ capabilities: z.ZodObject<{
420
+ plan: z.ZodDefault<z.ZodBoolean>;
421
+ implement: z.ZodDefault<z.ZodBoolean>;
422
+ create_from_scratch: z.ZodDefault<z.ZodBoolean>;
423
+ review: z.ZodDefault<z.ZodBoolean>;
424
+ /** Consumed by the Phase-3 FinalVerifier routing (gating pushes `verify`). */
425
+ verify: z.ZodDefault<z.ZodBoolean>;
426
+ synthesize: z.ZodDefault<z.ZodBoolean>;
427
+ read_files: z.ZodDefault<z.ZodBoolean>;
428
+ /**
429
+ * The adapter can inject a browser-automation MCP server (Playwright MCP) that
430
+ * this harness drives as `browser_*` tools (navigate / screenshot / snapshot).
431
+ * Gated on web policy: never injected under `external_context_policy:off`.
432
+ */
433
+ browser_tool: z.ZodDefault<z.ZodBoolean>;
434
+ web_policy: z.ZodDefault<z.ZodEnum<["native", "tools", "uncontrolled", "none"]>>;
435
+ /** Honors HarnessRunSpec.max_turns (e.g. claude --max-turns). */
436
+ max_turns: z.ZodDefault<z.ZodBoolean>;
437
+ /** Honors tool_permission_policy allow/deny lists (e.g. claude --allowedTools). */
438
+ tool_lists: z.ZodDefault<z.ZodBoolean>;
439
+ /**
440
+ * The adapter can surface interactive user questions (interaction_requested
441
+ * events) and deliver typed answers back into the live session. Claude's
442
+ * bidirectional stream-json control protocol today; honest false elsewhere.
443
+ */
444
+ interactive: z.ZodDefault<z.ZodBoolean>;
445
+ /**
446
+ * The harness can play the autonomous `orchestrate` planner intent: plan
447
+ * multi-harness work over the typed tool belt. NOT a privileged role — routed
448
+ * like reviewers via doctor + capability + quota headroom.
449
+ */
450
+ orchestrate: z.ZodDefault<z.ZodBoolean>;
451
+ /**
452
+ * The harness can constrain its FINAL message to a caller-supplied JSON
453
+ * Schema (codex `--output-schema <file>`, claude `--json-schema <json>`).
454
+ * Consumer: the engine passes HarnessRunSpec.output_schema only to routes
455
+ * declaring this; everything else keeps fenced-JSON parsing.
456
+ */
457
+ json_schema_output: z.ZodDefault<z.ZodBoolean>;
458
+ /**
459
+ * Ordered (weakest→strongest) reasoning-effort levels this harness actually
460
+ * accepts. Empty = effort is not a tunable surface. The shared effort
461
+ * normalizer clamps any requested EffortHint onto the nearest member.
462
+ */
463
+ effort_levels: z.ZodDefault<z.ZodArray<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>, "many">>;
464
+ /**
465
+ * Known model ids/aliases this harness accepts — the manifest-declared model
466
+ * truth source used when the adapter has no live `models()` inventory.
467
+ * STRICT: an explicit model outside the active truth source is refused
468
+ * at settings-write, run preflight, and reviewer resolution; a harness with
469
+ * NO truth source (no `models()` and an empty list) refuses every explicit
470
+ * model. Data-driven like `effort_levels` — no model id is hardcoded in
471
+ * routing logic.
472
+ */
473
+ known_models: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
474
+ /**
475
+ * Vendor CLI version this `known_models` hint set was last verified against
476
+ * (freshness note, surfaced with manifest-sourced model lists and checked by
477
+ * the model-hints-freshness gate). Null = never verified / not applicable.
478
+ */
479
+ known_models_verified_against: z.ZodDefault<z.ZodNullable<z.ZodString>>;
480
+ }, "strip", z.ZodTypeAny, {
481
+ plan: boolean;
482
+ orchestrate: boolean;
483
+ implement: boolean;
484
+ create_from_scratch: boolean;
485
+ review: boolean;
486
+ verify: boolean;
487
+ synthesize: boolean;
488
+ read_files: boolean;
489
+ browser_tool: boolean;
490
+ web_policy: "none" | "native" | "tools" | "uncontrolled";
491
+ max_turns: boolean;
492
+ tool_lists: boolean;
493
+ interactive: boolean;
494
+ json_schema_output: boolean;
495
+ effort_levels: ("low" | "medium" | "high" | "xhigh" | "max")[];
496
+ known_models: string[];
497
+ known_models_verified_against: string | null;
498
+ }, {
499
+ plan?: boolean | undefined;
500
+ orchestrate?: boolean | undefined;
501
+ implement?: boolean | undefined;
502
+ create_from_scratch?: boolean | undefined;
503
+ review?: boolean | undefined;
504
+ verify?: boolean | undefined;
505
+ synthesize?: boolean | undefined;
506
+ read_files?: boolean | undefined;
507
+ browser_tool?: boolean | undefined;
508
+ web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
509
+ max_turns?: boolean | undefined;
510
+ tool_lists?: boolean | undefined;
511
+ interactive?: boolean | undefined;
512
+ json_schema_output?: boolean | undefined;
513
+ effort_levels?: ("low" | "medium" | "high" | "xhigh" | "max")[] | undefined;
514
+ known_models?: string[] | undefined;
515
+ known_models_verified_against?: string | null | undefined;
516
+ }>;
517
+ auth_modes: z.ZodDefault<z.ZodArray<z.ZodEnum<["local_session", "api_key", "none"]>, "many">>;
518
+ access_profiles_supported: z.ZodDefault<z.ZodArray<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>, "many">>;
519
+ }, "strip", z.ZodTypeAny, {
520
+ id: string;
521
+ kind: "local_cli" | "remote_api" | "fake";
522
+ display_name: string;
523
+ provider_family: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown";
524
+ capability_profile: {
525
+ auth: {
526
+ supported_sources: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[];
527
+ preferred_source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null;
528
+ credential_transports: {
529
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
530
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
531
+ relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
532
+ }[];
533
+ };
534
+ access_control: {
535
+ readonly_mechanism: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist";
536
+ };
537
+ isolation: {
538
+ supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
539
+ };
540
+ image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
541
+ };
542
+ capabilities: {
543
+ plan: boolean;
544
+ orchestrate: boolean;
545
+ implement: boolean;
546
+ create_from_scratch: boolean;
547
+ review: boolean;
548
+ verify: boolean;
549
+ synthesize: boolean;
550
+ read_files: boolean;
551
+ browser_tool: boolean;
552
+ web_policy: "none" | "native" | "tools" | "uncontrolled";
553
+ max_turns: boolean;
554
+ tool_lists: boolean;
555
+ interactive: boolean;
556
+ json_schema_output: boolean;
557
+ effort_levels: ("low" | "medium" | "high" | "xhigh" | "max")[];
558
+ known_models: string[];
559
+ known_models_verified_against: string | null;
560
+ };
561
+ auth_modes: ("api_key" | "none" | "local_session")[];
562
+ access_profiles_supported: ("readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native")[];
563
+ version?: string | undefined;
564
+ adapter_version?: string | undefined;
565
+ }, {
566
+ id: string;
567
+ kind: "local_cli" | "remote_api" | "fake";
568
+ display_name: string;
569
+ capabilities: {
570
+ plan?: boolean | undefined;
571
+ orchestrate?: boolean | undefined;
572
+ implement?: boolean | undefined;
573
+ create_from_scratch?: boolean | undefined;
574
+ review?: boolean | undefined;
575
+ verify?: boolean | undefined;
576
+ synthesize?: boolean | undefined;
577
+ read_files?: boolean | undefined;
578
+ browser_tool?: boolean | undefined;
579
+ web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
580
+ max_turns?: boolean | undefined;
581
+ tool_lists?: boolean | undefined;
582
+ interactive?: boolean | undefined;
583
+ json_schema_output?: boolean | undefined;
584
+ effort_levels?: ("low" | "medium" | "high" | "xhigh" | "max")[] | undefined;
585
+ known_models?: string[] | undefined;
586
+ known_models_verified_against?: string | null | undefined;
587
+ };
588
+ version?: string | undefined;
589
+ adapter_version?: string | undefined;
590
+ provider_family?: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown" | undefined;
591
+ capability_profile?: {
592
+ auth?: {
593
+ supported_sources?: ("none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file")[] | undefined;
594
+ preferred_source?: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file" | null | undefined;
595
+ credential_transports?: {
596
+ kind: "none" | "config_file" | "env_var" | "oauth_token_env" | "os_keychain" | "http_header";
597
+ source: "none" | "native_session" | "api_key_env" | "api_key_flag" | "provider_auth_file";
598
+ relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
599
+ }[] | undefined;
600
+ } | undefined;
601
+ access_control?: {
602
+ readonly_mechanism?: "none" | "fs_sandbox" | "permission_deny" | "tool_allowlist" | undefined;
603
+ } | undefined;
604
+ isolation?: {
605
+ supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
606
+ } | undefined;
607
+ image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
608
+ } | undefined;
609
+ auth_modes?: ("api_key" | "none" | "local_session")[] | undefined;
610
+ access_profiles_supported?: ("readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native")[] | undefined;
611
+ }>;
612
+ export type HarnessManifest = z.infer<typeof HarnessManifest>;
613
+ /** Result of a conformance probe for one capability check. */
614
+ export declare const ConformanceCheck: z.ZodObject<{
615
+ id: z.ZodString;
616
+ status: z.ZodEnum<["pass", "fail", "skip"]>;
617
+ detail: z.ZodOptional<z.ZodString>;
618
+ duration_ms: z.ZodOptional<z.ZodNumber>;
619
+ }, "strip", z.ZodTypeAny, {
620
+ status: "pass" | "fail" | "skip";
621
+ id: string;
622
+ detail?: string | undefined;
623
+ duration_ms?: number | undefined;
624
+ }, {
625
+ status: "pass" | "fail" | "skip";
626
+ id: string;
627
+ detail?: string | undefined;
628
+ duration_ms?: number | undefined;
629
+ }>;
630
+ export type ConformanceCheck = z.infer<typeof ConformanceCheck>;
631
+ export declare const AdapterStatus: z.ZodEnum<["ok", "degraded", "unavailable"]>;
632
+ export type AdapterStatus = z.infer<typeof AdapterStatus>;
633
+ export declare const ConformanceReport: z.ZodObject<{
634
+ harness_id: z.ZodString;
635
+ status: z.ZodEnum<["ok", "degraded", "unavailable"]>;
636
+ checks: z.ZodDefault<z.ZodArray<z.ZodObject<{
637
+ id: z.ZodString;
638
+ status: z.ZodEnum<["pass", "fail", "skip"]>;
639
+ detail: z.ZodOptional<z.ZodString>;
640
+ duration_ms: z.ZodOptional<z.ZodNumber>;
641
+ }, "strip", z.ZodTypeAny, {
642
+ status: "pass" | "fail" | "skip";
643
+ id: string;
644
+ detail?: string | undefined;
645
+ duration_ms?: number | undefined;
646
+ }, {
647
+ status: "pass" | "fail" | "skip";
648
+ id: string;
649
+ detail?: string | undefined;
650
+ duration_ms?: number | undefined;
651
+ }>, "many">>;
652
+ enabled_intents: z.ZodDefault<z.ZodArray<z.ZodEnum<["plan", "spec", "implement", "create_from_scratch", "repair", "review", "verify", "synthesize", "explain", "audit", "orchestrate"]>, "many">>;
653
+ disabled_intents: z.ZodDefault<z.ZodArray<z.ZodEnum<["plan", "spec", "implement", "create_from_scratch", "repair", "review", "verify", "synthesize", "explain", "audit", "orchestrate"]>, "many">>;
654
+ reasons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
655
+ }, "strip", z.ZodTypeAny, {
656
+ status: "ok" | "degraded" | "unavailable";
657
+ harness_id: string;
658
+ checks: {
659
+ status: "pass" | "fail" | "skip";
660
+ id: string;
661
+ detail?: string | undefined;
662
+ duration_ms?: number | undefined;
663
+ }[];
664
+ enabled_intents: ("plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain")[];
665
+ disabled_intents: ("plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain")[];
666
+ reasons: string[];
667
+ }, {
668
+ status: "ok" | "degraded" | "unavailable";
669
+ harness_id: string;
670
+ checks?: {
671
+ status: "pass" | "fail" | "skip";
672
+ id: string;
673
+ detail?: string | undefined;
674
+ duration_ms?: number | undefined;
675
+ }[] | undefined;
676
+ enabled_intents?: ("plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain")[] | undefined;
677
+ disabled_intents?: ("plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain")[] | undefined;
678
+ reasons?: string[] | undefined;
679
+ }>;
680
+ export type ConformanceReport = z.infer<typeof ConformanceReport>;
681
+ /**
682
+ * Per-run browser-tool wiring. Present (non-null) on a HarnessRunSpec ONLY when
683
+ * the orchestrator has decided this run gets the agent-driven browser: the run
684
+ * opted in, the harness has the `browser_tool` capability, AND web policy is not
685
+ * `off`. The adapter injects Playwright MCP accordingly.
686
+ */
687
+ export declare const BrowserToolSpec: z.ZodObject<{
688
+ /**
689
+ * `--output-dir` for the browser MCP. Captures the per-navigation accessibility
690
+ * SNAPSHOTS (Playwright MCP writes screenshot image files to the agent's cwd,
691
+ * not here) into the run artifact tree as a browsing record the Canvas gallery
692
+ * lists. The live view is the headed window itself. Null = MCP's own temp dir.
693
+ */
694
+ output_dir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
695
+ /**
696
+ * Run the browser headless (no visible window). Default false — a headed
697
+ * Chromium so the user can watch the agent browse directly (the chosen mirror:
698
+ * a real visible window, not an embedded screencast).
699
+ */
700
+ headless: z.ZodDefault<z.ZodBoolean>;
701
+ }, "strip", z.ZodTypeAny, {
702
+ output_dir: string | null;
703
+ headless: boolean;
704
+ }, {
705
+ output_dir?: string | null | undefined;
706
+ headless?: boolean | undefined;
707
+ }>;
708
+ export type BrowserToolSpec = z.infer<typeof BrowserToolSpec>;
709
+ /** Spec passed to a harness adapter's run(). */
710
+ export declare const HarnessRunSpec: z.ZodObject<{
711
+ session_id: z.ZodString;
712
+ intent: z.ZodEnum<["plan", "spec", "implement", "create_from_scratch", "repair", "review", "verify", "synthesize", "explain", "audit", "orchestrate"]>;
713
+ prompt: z.ZodString;
714
+ cwd: z.ZodString;
715
+ access: z.ZodDefault<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>>;
716
+ external_context_policy: z.ZodDefault<z.ZodEnum<["off", "auto", "cached", "live"]>>;
717
+ tool_permission_policy: z.ZodDefault<z.ZodObject<{
718
+ web: z.ZodDefault<z.ZodEnum<["off", "auto", "cached", "live"]>>;
719
+ allow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
720
+ deny: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
721
+ }, "strip", z.ZodTypeAny, {
722
+ web: "off" | "auto" | "cached" | "live";
723
+ allow: string[];
724
+ deny: string[];
725
+ }, {
726
+ web?: "off" | "auto" | "cached" | "live" | undefined;
727
+ allow?: string[] | undefined;
728
+ deny?: string[] | undefined;
729
+ }>>;
730
+ model_hint: z.ZodDefault<z.ZodNullable<z.ZodString>>;
731
+ effort_hint: z.ZodDefault<z.ZodNullable<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>>;
732
+ max_usd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
733
+ max_turns: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
734
+ /**
735
+ * Which auth route the attempt should use. `auto` = subscription-first with
736
+ * api_key fallback; adapters seed native session vs inject the key accordingly.
737
+ */
738
+ auth_preference: z.ZodDefault<z.ZodEnum<["subscription", "api_key", "auto"]>>;
739
+ /**
740
+ * Native CLI session id to resume into (codex `exec resume`, claude `--resume`,
741
+ * cursor `agent --resume`, opencode `run --session`). Null starts a fresh session.
742
+ */
743
+ resume_session_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
744
+ /**
745
+ * How the child harness env is composed. `mirror_native` inherits the parent
746
+ * env (minus provider-secret scrub); `clean` spawns from a minimal allowlist
747
+ * (agent env isolation). Threaded from routing.env_inheritance at spawn.
748
+ */
749
+ env_inheritance: z.ZodDefault<z.ZodEnum<["mirror_native", "clean"]>>;
750
+ env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
751
+ /**
752
+ * User/agent attachments (images, files) forwarded to the harness in its
753
+ * native shape per `capability_profile.image_input`. Empty for non-vision
754
+ * harnesses — the orchestrator drops + discloses rather than silently ignore.
755
+ */
756
+ attachments: z.ZodDefault<z.ZodArray<z.ZodObject<{
757
+ id: z.ZodString;
758
+ kind: z.ZodDefault<z.ZodEnum<["image", "file"]>>;
759
+ mime: z.ZodDefault<z.ZodString>;
760
+ name: z.ZodDefault<z.ZodString>;
761
+ path: z.ZodString;
762
+ }, "strip", z.ZodTypeAny, {
763
+ path: string;
764
+ id: string;
765
+ kind: "image" | "file";
766
+ mime: string;
767
+ name: string;
768
+ }, {
769
+ path: string;
770
+ id: string;
771
+ kind?: "image" | "file" | undefined;
772
+ mime?: string | undefined;
773
+ name?: string | undefined;
774
+ }>, "many">>;
775
+ /**
776
+ * Agent-driven browser wiring. Null = no browser tool this run (the common
777
+ * case). Set by the orchestrator only when the run opted in, the harness has
778
+ * `browser_tool`, and web policy is not `off`.
779
+ */
780
+ browser: z.ZodDefault<z.ZodNullable<z.ZodObject<{
781
+ /**
782
+ * `--output-dir` for the browser MCP. Captures the per-navigation accessibility
783
+ * SNAPSHOTS (Playwright MCP writes screenshot image files to the agent's cwd,
784
+ * not here) into the run artifact tree as a browsing record the Canvas gallery
785
+ * lists. The live view is the headed window itself. Null = MCP's own temp dir.
786
+ */
787
+ output_dir: z.ZodDefault<z.ZodNullable<z.ZodString>>;
788
+ /**
789
+ * Run the browser headless (no visible window). Default false — a headed
790
+ * Chromium so the user can watch the agent browse directly (the chosen mirror:
791
+ * a real visible window, not an embedded screencast).
792
+ */
793
+ headless: z.ZodDefault<z.ZodBoolean>;
794
+ }, "strip", z.ZodTypeAny, {
795
+ output_dir: string | null;
796
+ headless: boolean;
797
+ }, {
798
+ output_dir?: string | null | undefined;
799
+ headless?: boolean | undefined;
800
+ }>>>;
801
+ /**
802
+ * JSON Schema constraining the harness's FINAL message. Producers:
803
+ * the orchestrate planner (OrchestratePlan schema) and spec-questions
804
+ * grounding (InterviewQuestion block). Passed only to routes whose manifest
805
+ * declares `json_schema_output`; consumers add the native CLI flag.
806
+ */
807
+ output_schema: z.ZodOptional<z.ZodUnknown>;
808
+ extra: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
809
+ }, "strip", z.ZodTypeAny, {
810
+ max_turns: number | null;
811
+ session_id: string;
812
+ intent: "plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain";
813
+ prompt: string;
814
+ cwd: string;
815
+ access: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native";
816
+ external_context_policy: "off" | "auto" | "cached" | "live";
817
+ tool_permission_policy: {
818
+ web: "off" | "auto" | "cached" | "live";
819
+ allow: string[];
820
+ deny: string[];
821
+ };
822
+ model_hint: string | null;
823
+ effort_hint: "low" | "medium" | "high" | "xhigh" | "max" | null;
824
+ max_usd: number | null;
825
+ auth_preference: "auto" | "subscription" | "api_key";
826
+ resume_session_id: string | null;
827
+ env_inheritance: "mirror_native" | "clean";
828
+ env: Record<string, string>;
829
+ attachments: {
830
+ path: string;
831
+ id: string;
832
+ kind: "image" | "file";
833
+ mime: string;
834
+ name: string;
835
+ }[];
836
+ browser: {
837
+ output_dir: string | null;
838
+ headless: boolean;
839
+ } | null;
840
+ extra: Record<string, unknown>;
841
+ output_schema?: unknown;
842
+ }, {
843
+ session_id: string;
844
+ intent: "plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain";
845
+ prompt: string;
846
+ cwd: string;
847
+ max_turns?: number | null | undefined;
848
+ access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
849
+ external_context_policy?: "off" | "auto" | "cached" | "live" | undefined;
850
+ tool_permission_policy?: {
851
+ web?: "off" | "auto" | "cached" | "live" | undefined;
852
+ allow?: string[] | undefined;
853
+ deny?: string[] | undefined;
854
+ } | undefined;
855
+ model_hint?: string | null | undefined;
856
+ effort_hint?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
857
+ max_usd?: number | null | undefined;
858
+ auth_preference?: "auto" | "subscription" | "api_key" | undefined;
859
+ resume_session_id?: string | null | undefined;
860
+ env_inheritance?: "mirror_native" | "clean" | undefined;
861
+ env?: Record<string, string> | undefined;
862
+ attachments?: {
863
+ path: string;
864
+ id: string;
865
+ kind?: "image" | "file" | undefined;
866
+ mime?: string | undefined;
867
+ name?: string | undefined;
868
+ }[] | undefined;
869
+ browser?: {
870
+ output_dir?: string | null | undefined;
871
+ headless?: boolean | undefined;
872
+ } | null | undefined;
873
+ output_schema?: unknown;
874
+ extra?: Record<string, unknown> | undefined;
875
+ }>;
876
+ export type HarnessRunSpec = z.infer<typeof HarnessRunSpec>;
877
+ /**
878
+ * Coarse tool classification used for typed governance (no tool-name string
879
+ * matching outside adapters). Adapters map native tool names to a kind.
880
+ */
881
+ export declare const ToolKind: z.ZodEnum<["web", "file", "command", "mcp", "search", "other"]>;
882
+ export type ToolKind = z.infer<typeof ToolKind>;
883
+ /**
884
+ * Typed tool reference attached to `tool_call` / `tool_result` events.
885
+ * `status` is REQUIRED on `tool_result` events (adapter conformance enforces it);
886
+ * a missing status on a result is treated as a dropped/diagnostic event, never as ok.
887
+ */
888
+ export declare const ToolRef: z.ZodObject<{
889
+ name: z.ZodString;
890
+ kind: z.ZodDefault<z.ZodEnum<["web", "file", "command", "mcp", "search", "other"]>>;
891
+ use_id: z.ZodOptional<z.ZodString>;
892
+ /** Redacted, bounded human-readable target (query/url/path/command). */
893
+ target: z.ZodOptional<z.ZodString>;
894
+ status: z.ZodOptional<z.ZodEnum<["ok", "error", "cancelled", "denied"]>>;
895
+ /** Redacted, bounded error detail for status=error results. */
896
+ error_summary: z.ZodOptional<z.ZodString>;
897
+ /** Redacted, bounded content detail for results (success or failure). */
898
+ content_summary: z.ZodOptional<z.ZodString>;
899
+ exit_code: z.ZodOptional<z.ZodNumber>;
900
+ }, "strip", z.ZodTypeAny, {
901
+ kind: "file" | "web" | "command" | "mcp" | "search" | "other";
902
+ name: string;
903
+ status?: "ok" | "error" | "cancelled" | "denied" | undefined;
904
+ use_id?: string | undefined;
905
+ target?: string | undefined;
906
+ error_summary?: string | undefined;
907
+ content_summary?: string | undefined;
908
+ exit_code?: number | undefined;
909
+ }, {
910
+ name: string;
911
+ status?: "ok" | "error" | "cancelled" | "denied" | undefined;
912
+ kind?: "file" | "web" | "command" | "mcp" | "search" | "other" | undefined;
913
+ use_id?: string | undefined;
914
+ target?: string | undefined;
915
+ error_summary?: string | undefined;
916
+ content_summary?: string | undefined;
917
+ exit_code?: number | undefined;
918
+ }>;
919
+ export type ToolRef = z.infer<typeof ToolRef>;
920
+ /**
921
+ * One multiple-choice option of an interactive question (AskUserQuestion-style).
922
+ */
923
+ export declare const InteractionOption: z.ZodObject<{
924
+ label: z.ZodString;
925
+ description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
926
+ }, "strip", z.ZodTypeAny, {
927
+ label: string;
928
+ description: string | null;
929
+ }, {
930
+ label: string;
931
+ description?: string | null | undefined;
932
+ }>;
933
+ export type InteractionOption = z.infer<typeof InteractionOption>;
934
+ export declare const InteractionQuestion: z.ZodObject<{
935
+ id: z.ZodString;
936
+ question: z.ZodString;
937
+ /** Short chip/header text some harnesses attach to a question. */
938
+ header: z.ZodDefault<z.ZodNullable<z.ZodString>>;
939
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
940
+ label: z.ZodString;
941
+ description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
942
+ }, "strip", z.ZodTypeAny, {
943
+ label: string;
944
+ description: string | null;
945
+ }, {
946
+ label: string;
947
+ description?: string | null | undefined;
948
+ }>, "many">>;
949
+ multi_select: z.ZodDefault<z.ZodBoolean>;
950
+ }, "strip", z.ZodTypeAny, {
951
+ options: {
952
+ label: string;
953
+ description: string | null;
954
+ }[];
955
+ id: string;
956
+ question: string;
957
+ header: string | null;
958
+ multi_select: boolean;
959
+ }, {
960
+ id: string;
961
+ question: string;
962
+ options?: {
963
+ label: string;
964
+ description?: string | null | undefined;
965
+ }[] | undefined;
966
+ header?: string | null | undefined;
967
+ multi_select?: boolean | undefined;
968
+ }>;
969
+ export type InteractionQuestion = z.infer<typeof InteractionQuestion>;
970
+ /**
971
+ * A live request for user input raised by an interactive harness session.
972
+ * Carried on `interaction_requested` HarnessEvents and projected into
973
+ * `interaction.requested` RunEvents.
974
+ */
975
+ export declare const InteractionRequest: z.ZodObject<{
976
+ interaction_id: z.ZodString;
977
+ questions: z.ZodDefault<z.ZodArray<z.ZodObject<{
978
+ id: z.ZodString;
979
+ question: z.ZodString;
980
+ /** Short chip/header text some harnesses attach to a question. */
981
+ header: z.ZodDefault<z.ZodNullable<z.ZodString>>;
982
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
983
+ label: z.ZodString;
984
+ description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
985
+ }, "strip", z.ZodTypeAny, {
986
+ label: string;
987
+ description: string | null;
988
+ }, {
989
+ label: string;
990
+ description?: string | null | undefined;
991
+ }>, "many">>;
992
+ multi_select: z.ZodDefault<z.ZodBoolean>;
993
+ }, "strip", z.ZodTypeAny, {
994
+ options: {
995
+ label: string;
996
+ description: string | null;
997
+ }[];
998
+ id: string;
999
+ question: string;
1000
+ header: string | null;
1001
+ multi_select: boolean;
1002
+ }, {
1003
+ id: string;
1004
+ question: string;
1005
+ options?: {
1006
+ label: string;
1007
+ description?: string | null | undefined;
1008
+ }[] | undefined;
1009
+ header?: string | null | undefined;
1010
+ multi_select?: boolean | undefined;
1011
+ }>, "many">>;
1012
+ /** Native tool that raised the request (e.g. "AskUserQuestion"). */
1013
+ source_tool: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1014
+ }, "strip", z.ZodTypeAny, {
1015
+ interaction_id: string;
1016
+ questions: {
1017
+ options: {
1018
+ label: string;
1019
+ description: string | null;
1020
+ }[];
1021
+ id: string;
1022
+ question: string;
1023
+ header: string | null;
1024
+ multi_select: boolean;
1025
+ }[];
1026
+ source_tool: string | null;
1027
+ }, {
1028
+ interaction_id: string;
1029
+ questions?: {
1030
+ id: string;
1031
+ question: string;
1032
+ options?: {
1033
+ label: string;
1034
+ description?: string | null | undefined;
1035
+ }[] | undefined;
1036
+ header?: string | null | undefined;
1037
+ multi_select?: boolean | undefined;
1038
+ }[] | undefined;
1039
+ source_tool?: string | null | undefined;
1040
+ }>;
1041
+ export type InteractionRequest = z.infer<typeof InteractionRequest>;
1042
+ export declare const InteractionAnswer: z.ZodObject<{
1043
+ question_id: z.ZodString;
1044
+ selected_labels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1045
+ free_text: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1046
+ }, "strip", z.ZodTypeAny, {
1047
+ question_id: string;
1048
+ selected_labels: string[];
1049
+ free_text: string | null;
1050
+ }, {
1051
+ question_id: string;
1052
+ selected_labels?: string[] | undefined;
1053
+ free_text?: string | null | undefined;
1054
+ }>;
1055
+ export type InteractionAnswer = z.infer<typeof InteractionAnswer>;
1056
+ export declare const InteractionAnswerSet: z.ZodObject<{
1057
+ interaction_id: z.ZodString;
1058
+ answers: z.ZodDefault<z.ZodArray<z.ZodObject<{
1059
+ question_id: z.ZodString;
1060
+ selected_labels: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1061
+ free_text: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1062
+ }, "strip", z.ZodTypeAny, {
1063
+ question_id: string;
1064
+ selected_labels: string[];
1065
+ free_text: string | null;
1066
+ }, {
1067
+ question_id: string;
1068
+ selected_labels?: string[] | undefined;
1069
+ free_text?: string | null | undefined;
1070
+ }>, "many">>;
1071
+ }, "strip", z.ZodTypeAny, {
1072
+ interaction_id: string;
1073
+ answers: {
1074
+ question_id: string;
1075
+ selected_labels: string[];
1076
+ free_text: string | null;
1077
+ }[];
1078
+ }, {
1079
+ interaction_id: string;
1080
+ answers?: {
1081
+ question_id: string;
1082
+ selected_labels?: string[] | undefined;
1083
+ free_text?: string | null | undefined;
1084
+ }[] | undefined;
1085
+ }>;
1086
+ export type InteractionAnswerSet = z.infer<typeof InteractionAnswerSet>;
1087
+ /** Normalized event emitted by every adapter (the SSOT of adapter output). */
1088
+ export declare const HarnessEvent: z.ZodObject<{
1089
+ type: z.ZodEnum<["started", "thinking", "message", "tool_call", "tool_result", "interaction_requested", "file_change", "usage", "error", "completed"]>;
1090
+ session_id: z.ZodString;
1091
+ ts: z.ZodString;
1092
+ text: z.ZodOptional<z.ZodString>;
1093
+ /** Typed tool info; set on `tool_call` and `tool_result` events. */
1094
+ tool: z.ZodOptional<z.ZodObject<{
1095
+ name: z.ZodString;
1096
+ kind: z.ZodDefault<z.ZodEnum<["web", "file", "command", "mcp", "search", "other"]>>;
1097
+ use_id: z.ZodOptional<z.ZodString>;
1098
+ /** Redacted, bounded human-readable target (query/url/path/command). */
1099
+ target: z.ZodOptional<z.ZodString>;
1100
+ status: z.ZodOptional<z.ZodEnum<["ok", "error", "cancelled", "denied"]>>;
1101
+ /** Redacted, bounded error detail for status=error results. */
1102
+ error_summary: z.ZodOptional<z.ZodString>;
1103
+ /** Redacted, bounded content detail for results (success or failure). */
1104
+ content_summary: z.ZodOptional<z.ZodString>;
1105
+ exit_code: z.ZodOptional<z.ZodNumber>;
1106
+ }, "strip", z.ZodTypeAny, {
1107
+ kind: "file" | "web" | "command" | "mcp" | "search" | "other";
1108
+ name: string;
1109
+ status?: "ok" | "error" | "cancelled" | "denied" | undefined;
1110
+ use_id?: string | undefined;
1111
+ target?: string | undefined;
1112
+ error_summary?: string | undefined;
1113
+ content_summary?: string | undefined;
1114
+ exit_code?: number | undefined;
1115
+ }, {
1116
+ name: string;
1117
+ status?: "ok" | "error" | "cancelled" | "denied" | undefined;
1118
+ kind?: "file" | "web" | "command" | "mcp" | "search" | "other" | undefined;
1119
+ use_id?: string | undefined;
1120
+ target?: string | undefined;
1121
+ error_summary?: string | undefined;
1122
+ content_summary?: string | undefined;
1123
+ exit_code?: number | undefined;
1124
+ }>>;
1125
+ /** Set on `interaction_requested` events. */
1126
+ interaction: z.ZodOptional<z.ZodObject<{
1127
+ interaction_id: z.ZodString;
1128
+ questions: z.ZodDefault<z.ZodArray<z.ZodObject<{
1129
+ id: z.ZodString;
1130
+ question: z.ZodString;
1131
+ /** Short chip/header text some harnesses attach to a question. */
1132
+ header: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1133
+ options: z.ZodDefault<z.ZodArray<z.ZodObject<{
1134
+ label: z.ZodString;
1135
+ description: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1136
+ }, "strip", z.ZodTypeAny, {
1137
+ label: string;
1138
+ description: string | null;
1139
+ }, {
1140
+ label: string;
1141
+ description?: string | null | undefined;
1142
+ }>, "many">>;
1143
+ multi_select: z.ZodDefault<z.ZodBoolean>;
1144
+ }, "strip", z.ZodTypeAny, {
1145
+ options: {
1146
+ label: string;
1147
+ description: string | null;
1148
+ }[];
1149
+ id: string;
1150
+ question: string;
1151
+ header: string | null;
1152
+ multi_select: boolean;
1153
+ }, {
1154
+ id: string;
1155
+ question: string;
1156
+ options?: {
1157
+ label: string;
1158
+ description?: string | null | undefined;
1159
+ }[] | undefined;
1160
+ header?: string | null | undefined;
1161
+ multi_select?: boolean | undefined;
1162
+ }>, "many">>;
1163
+ /** Native tool that raised the request (e.g. "AskUserQuestion"). */
1164
+ source_tool: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1165
+ }, "strip", z.ZodTypeAny, {
1166
+ interaction_id: string;
1167
+ questions: {
1168
+ options: {
1169
+ label: string;
1170
+ description: string | null;
1171
+ }[];
1172
+ id: string;
1173
+ question: string;
1174
+ header: string | null;
1175
+ multi_select: boolean;
1176
+ }[];
1177
+ source_tool: string | null;
1178
+ }, {
1179
+ interaction_id: string;
1180
+ questions?: {
1181
+ id: string;
1182
+ question: string;
1183
+ options?: {
1184
+ label: string;
1185
+ description?: string | null | undefined;
1186
+ }[] | undefined;
1187
+ header?: string | null | undefined;
1188
+ multi_select?: boolean | undefined;
1189
+ }[] | undefined;
1190
+ source_tool?: string | null | undefined;
1191
+ }>>;
1192
+ usage: z.ZodOptional<z.ZodObject<{
1193
+ input_tokens: z.ZodOptional<z.ZodNumber>;
1194
+ output_tokens: z.ZodOptional<z.ZodNumber>;
1195
+ cached_input_tokens: z.ZodOptional<z.ZodNumber>;
1196
+ cost_usd: z.ZodOptional<z.ZodNumber>;
1197
+ /** True when cost_usd is derived from token pricing (not natively reported). */
1198
+ estimated: z.ZodOptional<z.ZodBoolean>;
1199
+ }, "strip", z.ZodTypeAny, {
1200
+ input_tokens?: number | undefined;
1201
+ output_tokens?: number | undefined;
1202
+ cached_input_tokens?: number | undefined;
1203
+ cost_usd?: number | undefined;
1204
+ estimated?: boolean | undefined;
1205
+ }, {
1206
+ input_tokens?: number | undefined;
1207
+ output_tokens?: number | undefined;
1208
+ cached_input_tokens?: number | undefined;
1209
+ cost_usd?: number | undefined;
1210
+ estimated?: boolean | undefined;
1211
+ }>>;
1212
+ observed_model: z.ZodOptional<z.ZodString>;
1213
+ /**
1214
+ * Typed quota/usage-window signal: the harness CLI's OWN record of how
1215
+ * much of its subscription/rate window is consumed. Producers read native
1216
+ * machine-readable surfaces only (codex rollout `token_count.rate_limits`);
1217
+ * a harness with no native surface emits nothing (fail-honest, never
1218
+ * scraped from prose). The budget layer maps this to a `used_percent`
1219
+ * observation; `headroom()` and pool ordering consume it.
1220
+ */
1221
+ quota: z.ZodOptional<z.ZodObject<{
1222
+ /** 0-100: consumed share of the binding rate window. */
1223
+ used_percent: z.ZodNumber;
1224
+ /** Native reset moment for the window, when the CLI reports one. */
1225
+ resets_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1226
+ }, "strip", z.ZodTypeAny, {
1227
+ used_percent: number;
1228
+ resets_at: string | null;
1229
+ }, {
1230
+ used_percent: number;
1231
+ resets_at?: string | null | undefined;
1232
+ }>>;
1233
+ /**
1234
+ * Typed live plan/todo progress: adapters map their native plan tools
1235
+ * (codex `todo_list` items, claude `TodoWrite` todos) into this shape in
1236
+ * the parse layer; the orchestrator forwards the LAST-WINS list as a
1237
+ * `plan.progress` run event and the UI renders live checklists. Never
1238
+ * parsed from prose.
1239
+ */
1240
+ plan_progress: z.ZodOptional<z.ZodObject<{
1241
+ items: z.ZodDefault<z.ZodArray<z.ZodObject<{
1242
+ id: z.ZodString;
1243
+ title: z.ZodString;
1244
+ status: z.ZodEnum<["pending", "in_progress", "completed"]>;
1245
+ }, "strip", z.ZodTypeAny, {
1246
+ status: "pending" | "completed" | "in_progress";
1247
+ id: string;
1248
+ title: string;
1249
+ }, {
1250
+ status: "pending" | "completed" | "in_progress";
1251
+ id: string;
1252
+ title: string;
1253
+ }>, "many">>;
1254
+ }, "strip", z.ZodTypeAny, {
1255
+ items: {
1256
+ status: "pending" | "completed" | "in_progress";
1257
+ id: string;
1258
+ title: string;
1259
+ }[];
1260
+ }, {
1261
+ items?: {
1262
+ status: "pending" | "completed" | "in_progress";
1263
+ id: string;
1264
+ title: string;
1265
+ }[] | undefined;
1266
+ }>>;
1267
+ /**
1268
+ * Typed rate-limit / quota signal. Adapters set this in their parse layer when
1269
+ * the native CLI reports a 429 / quota / overload (adapter knowledge is allowed);
1270
+ * the budget layer projects it WITHOUT regex over model/CLI prose. Replaces the
1271
+ * old string-matching governance in budget/observe.ts.
1272
+ */
1273
+ rate_limit: z.ZodOptional<z.ZodObject<{
1274
+ resets_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1275
+ retry_delay_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1276
+ }, "strip", z.ZodTypeAny, {
1277
+ resets_at: string | null;
1278
+ retry_delay_ms: number | null;
1279
+ }, {
1280
+ resets_at?: string | null | undefined;
1281
+ retry_delay_ms?: number | null | undefined;
1282
+ }>>;
1283
+ /**
1284
+ * Typed transient-failure signal. Adapters set this from native CLI/API error
1285
+ * shapes in their parse layer; the orchestrator consumes it for bounded retry
1286
+ * policy without governing on free-form harness prose.
1287
+ */
1288
+ transient: z.ZodOptional<z.ZodObject<{
1289
+ kind: z.ZodDefault<z.ZodEnum<["network", "stream_disconnect", "service_unavailable", "timeout", "unknown"]>>;
1290
+ retry_delay_ms: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
1291
+ }, "strip", z.ZodTypeAny, {
1292
+ kind: "unknown" | "network" | "stream_disconnect" | "service_unavailable" | "timeout";
1293
+ retry_delay_ms: number | null;
1294
+ }, {
1295
+ kind?: "unknown" | "network" | "stream_disconnect" | "service_unavailable" | "timeout" | undefined;
1296
+ retry_delay_ms?: number | null | undefined;
1297
+ }>>;
1298
+ error: z.ZodOptional<z.ZodString>;
1299
+ payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1300
+ }, "strip", z.ZodTypeAny, {
1301
+ type: "message" | "error" | "started" | "thinking" | "tool_call" | "tool_result" | "interaction_requested" | "file_change" | "usage" | "completed";
1302
+ session_id: string;
1303
+ ts: string;
1304
+ error?: string | undefined;
1305
+ usage?: {
1306
+ input_tokens?: number | undefined;
1307
+ output_tokens?: number | undefined;
1308
+ cached_input_tokens?: number | undefined;
1309
+ cost_usd?: number | undefined;
1310
+ estimated?: boolean | undefined;
1311
+ } | undefined;
1312
+ text?: string | undefined;
1313
+ tool?: {
1314
+ kind: "file" | "web" | "command" | "mcp" | "search" | "other";
1315
+ name: string;
1316
+ status?: "ok" | "error" | "cancelled" | "denied" | undefined;
1317
+ use_id?: string | undefined;
1318
+ target?: string | undefined;
1319
+ error_summary?: string | undefined;
1320
+ content_summary?: string | undefined;
1321
+ exit_code?: number | undefined;
1322
+ } | undefined;
1323
+ interaction?: {
1324
+ interaction_id: string;
1325
+ questions: {
1326
+ options: {
1327
+ label: string;
1328
+ description: string | null;
1329
+ }[];
1330
+ id: string;
1331
+ question: string;
1332
+ header: string | null;
1333
+ multi_select: boolean;
1334
+ }[];
1335
+ source_tool: string | null;
1336
+ } | undefined;
1337
+ observed_model?: string | undefined;
1338
+ quota?: {
1339
+ used_percent: number;
1340
+ resets_at: string | null;
1341
+ } | undefined;
1342
+ plan_progress?: {
1343
+ items: {
1344
+ status: "pending" | "completed" | "in_progress";
1345
+ id: string;
1346
+ title: string;
1347
+ }[];
1348
+ } | undefined;
1349
+ rate_limit?: {
1350
+ resets_at: string | null;
1351
+ retry_delay_ms: number | null;
1352
+ } | undefined;
1353
+ transient?: {
1354
+ kind: "unknown" | "network" | "stream_disconnect" | "service_unavailable" | "timeout";
1355
+ retry_delay_ms: number | null;
1356
+ } | undefined;
1357
+ payload?: Record<string, unknown> | undefined;
1358
+ }, {
1359
+ type: "message" | "error" | "started" | "thinking" | "tool_call" | "tool_result" | "interaction_requested" | "file_change" | "usage" | "completed";
1360
+ session_id: string;
1361
+ ts: string;
1362
+ error?: string | undefined;
1363
+ usage?: {
1364
+ input_tokens?: number | undefined;
1365
+ output_tokens?: number | undefined;
1366
+ cached_input_tokens?: number | undefined;
1367
+ cost_usd?: number | undefined;
1368
+ estimated?: boolean | undefined;
1369
+ } | undefined;
1370
+ text?: string | undefined;
1371
+ tool?: {
1372
+ name: string;
1373
+ status?: "ok" | "error" | "cancelled" | "denied" | undefined;
1374
+ kind?: "file" | "web" | "command" | "mcp" | "search" | "other" | undefined;
1375
+ use_id?: string | undefined;
1376
+ target?: string | undefined;
1377
+ error_summary?: string | undefined;
1378
+ content_summary?: string | undefined;
1379
+ exit_code?: number | undefined;
1380
+ } | undefined;
1381
+ interaction?: {
1382
+ interaction_id: string;
1383
+ questions?: {
1384
+ id: string;
1385
+ question: string;
1386
+ options?: {
1387
+ label: string;
1388
+ description?: string | null | undefined;
1389
+ }[] | undefined;
1390
+ header?: string | null | undefined;
1391
+ multi_select?: boolean | undefined;
1392
+ }[] | undefined;
1393
+ source_tool?: string | null | undefined;
1394
+ } | undefined;
1395
+ observed_model?: string | undefined;
1396
+ quota?: {
1397
+ used_percent: number;
1398
+ resets_at?: string | null | undefined;
1399
+ } | undefined;
1400
+ plan_progress?: {
1401
+ items?: {
1402
+ status: "pending" | "completed" | "in_progress";
1403
+ id: string;
1404
+ title: string;
1405
+ }[] | undefined;
1406
+ } | undefined;
1407
+ rate_limit?: {
1408
+ resets_at?: string | null | undefined;
1409
+ retry_delay_ms?: number | null | undefined;
1410
+ } | undefined;
1411
+ transient?: {
1412
+ kind?: "unknown" | "network" | "stream_disconnect" | "service_unavailable" | "timeout" | undefined;
1413
+ retry_delay_ms?: number | null | undefined;
1414
+ } | undefined;
1415
+ payload?: Record<string, unknown> | undefined;
1416
+ }>;
1417
+ export type HarnessEvent = z.infer<typeof HarnessEvent>;
1418
+ //# sourceMappingURL=harness.d.ts.map