@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.
Files changed (278) hide show
  1. package/dist/agent-capabilities.d.ts +102 -30
  2. package/dist/agent-capabilities.d.ts.map +1 -1
  3. package/dist/agent-capabilities.js +49 -18
  4. package/dist/agent-capabilities.js.map +1 -1
  5. package/dist/apply-eligibility.d.ts.map +1 -1
  6. package/dist/apply-eligibility.js +22 -6
  7. package/dist/apply-eligibility.js.map +1 -1
  8. package/dist/attachment.d.ts +117 -52
  9. package/dist/attachment.d.ts.map +1 -1
  10. package/dist/attachment.js +60 -45
  11. package/dist/attachment.js.map +1 -1
  12. package/dist/auth.d.ts +1444 -0
  13. package/dist/auth.d.ts.map +1 -0
  14. package/dist/auth.js +371 -0
  15. package/dist/auth.js.map +1 -0
  16. package/dist/budget.d.ts +147 -18
  17. package/dist/budget.d.ts.map +1 -1
  18. package/dist/budget.js +80 -22
  19. package/dist/budget.js.map +1 -1
  20. package/dist/config.d.ts +829 -135
  21. package/dist/config.d.ts.map +1 -1
  22. package/dist/config.js +195 -41
  23. package/dist/config.js.map +1 -1
  24. package/dist/context.d.ts +6 -6
  25. package/dist/context.d.ts.map +1 -1
  26. package/dist/context.js +31 -7
  27. package/dist/context.js.map +1 -1
  28. package/dist/control-gc.d.ts +185 -0
  29. package/dist/control-gc.d.ts.map +1 -0
  30. package/dist/control-gc.js +81 -0
  31. package/dist/control-gc.js.map +1 -0
  32. package/dist/control-operation-responses.d.ts +1298 -0
  33. package/dist/control-operation-responses.d.ts.map +1 -0
  34. package/dist/control-operation-responses.js +35 -0
  35. package/dist/control-operation-responses.js.map +1 -0
  36. package/dist/control-run-detail.d.ts +556 -247
  37. package/dist/control-run-detail.d.ts.map +1 -1
  38. package/dist/control-run-detail.js +72 -17
  39. package/dist/control-run-detail.js.map +1 -1
  40. package/dist/control-run-retry.d.ts +88 -0
  41. package/dist/control-run-retry.d.ts.map +1 -0
  42. package/dist/control-run-retry.js +40 -0
  43. package/dist/control-run-retry.js.map +1 -0
  44. package/dist/control-run-scope.d.ts +25 -0
  45. package/dist/control-run-scope.d.ts.map +1 -0
  46. package/dist/control-run-scope.js +22 -0
  47. package/dist/control-run-scope.js.map +1 -0
  48. package/dist/control-secret.d.ts +90 -0
  49. package/dist/control-secret.d.ts.map +1 -0
  50. package/dist/control-secret.js +35 -0
  51. package/dist/control-secret.js.map +1 -0
  52. package/dist/control-spec.d.ts +592 -0
  53. package/dist/control-spec.d.ts.map +1 -0
  54. package/dist/control-spec.js +85 -0
  55. package/dist/control-spec.js.map +1 -0
  56. package/dist/control-thread-apply.d.ts +175 -0
  57. package/dist/control-thread-apply.d.ts.map +1 -0
  58. package/dist/control-thread-apply.js +31 -0
  59. package/dist/control-thread-apply.js.map +1 -0
  60. package/dist/control-trust.d.ts +74 -10
  61. package/dist/control-trust.d.ts.map +1 -1
  62. package/dist/control-trust.js +31 -11
  63. package/dist/control-trust.js.map +1 -1
  64. package/dist/control.d.ts +1688 -1334
  65. package/dist/control.d.ts.map +1 -1
  66. package/dist/control.js +592 -333
  67. package/dist/control.js.map +1 -1
  68. package/dist/credential-profile.d.ts +454 -0
  69. package/dist/credential-profile.d.ts.map +1 -0
  70. package/dist/credential-profile.js +140 -0
  71. package/dist/credential-profile.js.map +1 -0
  72. package/dist/decision.d.ts +10 -10
  73. package/dist/decision.d.ts.map +1 -1
  74. package/dist/decision.js +62 -15
  75. package/dist/decision.js.map +1 -1
  76. package/dist/delivery.d.ts +99 -0
  77. package/dist/delivery.d.ts.map +1 -0
  78. package/dist/delivery.js +19 -0
  79. package/dist/delivery.js.map +1 -0
  80. package/dist/events.d.ts +41 -4
  81. package/dist/events.d.ts.map +1 -1
  82. package/dist/events.js +47 -4
  83. package/dist/events.js.map +1 -1
  84. package/dist/gate.d.ts +5 -5
  85. package/dist/gate.d.ts.map +1 -1
  86. package/dist/gate.js +25 -5
  87. package/dist/gate.js.map +1 -1
  88. package/dist/harness.d.ts +775 -237
  89. package/dist/harness.d.ts.map +1 -1
  90. package/dist/harness.js +314 -111
  91. package/dist/harness.js.map +1 -1
  92. package/dist/index.d.ts +19 -0
  93. package/dist/index.d.ts.map +1 -1
  94. package/dist/index.js +19 -0
  95. package/dist/index.js.map +1 -1
  96. package/dist/operation.d.ts +185 -0
  97. package/dist/operation.d.ts.map +1 -0
  98. package/dist/operation.js +50 -0
  99. package/dist/operation.js.map +1 -0
  100. package/dist/orchestrate.d.ts +150 -22
  101. package/dist/orchestrate.d.ts.map +1 -1
  102. package/dist/orchestrate.js +117 -7
  103. package/dist/orchestrate.js.map +1 -1
  104. package/dist/primitives.d.ts.map +1 -1
  105. package/dist/primitives.js +4 -1
  106. package/dist/primitives.js.map +1 -1
  107. package/dist/problem.d.ts +29 -0
  108. package/dist/problem.d.ts.map +1 -0
  109. package/dist/problem.js +17 -0
  110. package/dist/problem.js.map +1 -0
  111. package/dist/project.d.ts +97 -0
  112. package/dist/project.d.ts.map +1 -0
  113. package/dist/project.js +27 -0
  114. package/dist/project.js.map +1 -0
  115. package/dist/quota.d.ts +269 -0
  116. package/dist/quota.d.ts.map +1 -0
  117. package/dist/quota.js +58 -0
  118. package/dist/quota.js.map +1 -0
  119. package/dist/raw.d.ts +195 -0
  120. package/dist/raw.d.ts.map +1 -0
  121. package/dist/raw.js +58 -0
  122. package/dist/raw.js.map +1 -0
  123. package/dist/readiness.d.ts +596 -0
  124. package/dist/readiness.d.ts.map +1 -0
  125. package/dist/readiness.js +87 -0
  126. package/dist/readiness.js.map +1 -0
  127. package/dist/recovery.d.ts +515 -0
  128. package/dist/recovery.d.ts.map +1 -0
  129. package/dist/recovery.js +93 -0
  130. package/dist/recovery.js.map +1 -0
  131. package/dist/request-requirements.d.ts +36 -0
  132. package/dist/request-requirements.d.ts.map +1 -0
  133. package/dist/request-requirements.js +29 -0
  134. package/dist/request-requirements.js.map +1 -0
  135. package/dist/review.d.ts +26 -26
  136. package/dist/review.d.ts.map +1 -1
  137. package/dist/review.js +50 -10
  138. package/dist/review.js.map +1 -1
  139. package/dist/route.d.ts +13 -13
  140. package/dist/route.d.ts.map +1 -1
  141. package/dist/route.js +19 -4
  142. package/dist/route.js.map +1 -1
  143. package/dist/setup.d.ts +9811 -0
  144. package/dist/setup.d.ts.map +1 -0
  145. package/dist/setup.js +475 -0
  146. package/dist/setup.js.map +1 -0
  147. package/dist/spec.d.ts +178 -61
  148. package/dist/spec.d.ts.map +1 -1
  149. package/dist/spec.js +69 -16
  150. package/dist/spec.js.map +1 -1
  151. package/dist/surface-run-controls.d.ts.map +1 -1
  152. package/dist/surface-run-controls.js +25 -21
  153. package/dist/surface-run-controls.js.map +1 -1
  154. package/dist/task.d.ts +1657 -60
  155. package/dist/task.d.ts.map +1 -1
  156. package/dist/task.js +144 -18
  157. package/dist/task.js.map +1 -1
  158. package/dist/telemetry.d.ts +487 -72
  159. package/dist/telemetry.d.ts.map +1 -1
  160. package/dist/telemetry.js +194 -16
  161. package/dist/telemetry.js.map +1 -1
  162. package/dist/thread.d.ts +89 -51
  163. package/dist/thread.d.ts.map +1 -1
  164. package/dist/thread.js +56 -11
  165. package/dist/thread.js.map +1 -1
  166. package/dist/tool-ref.d.ts +45 -0
  167. package/dist/tool-ref.d.ts.map +1 -0
  168. package/dist/tool-ref.js +45 -0
  169. package/dist/tool-ref.js.map +1 -0
  170. package/dist/workproduct.d.ts +3 -3
  171. package/dist/workproduct.d.ts.map +1 -1
  172. package/dist/workproduct.js.map +1 -1
  173. package/dist/workspace.d.ts +3 -3
  174. package/dist/workspace.d.ts.map +1 -1
  175. package/dist/workspace.js +12 -3
  176. package/dist/workspace.js.map +1 -1
  177. package/generated/AgentCapabilityCatalog.schema.json +53 -11
  178. package/generated/BudgetLease.schema.json +55 -6
  179. package/generated/BudgetObservation.schema.json +44 -7
  180. package/generated/ConformanceReport.schema.json +49 -0
  181. package/generated/ControlApplyCheckResponse.schema.json +34 -0
  182. package/generated/ControlArtifactListResponse.schema.json +57 -0
  183. package/generated/ControlAuthReadinessRefreshRequest.schema.json +38 -0
  184. package/generated/ControlAuthReadinessRefreshResponse.schema.json +85 -0
  185. package/generated/ControlCredentialProfileCreateRequest.schema.json +32 -0
  186. package/generated/ControlCredentialProfileCreateResponse.schema.json +142 -0
  187. package/generated/ControlCredentialProfileDeleteResponse.schema.json +107 -0
  188. package/generated/ControlCredentialProfilesResponse.schema.json +155 -0
  189. package/generated/ControlDeliveryResponse.schema.json +136 -0
  190. package/generated/ControlGcReceipt.schema.json +170 -0
  191. package/generated/ControlGcRequest.schema.json +18 -0
  192. package/generated/ControlHandshakeRequest.schema.json +26 -0
  193. package/generated/ControlHandshakeResponse.schema.json +30 -0
  194. package/generated/ControlHarnessListResponse.schema.json +198 -14
  195. package/generated/ControlHarnessModelsResponse.schema.json +19 -0
  196. package/generated/ControlHarnessSettingsPatch.schema.json +9 -12
  197. package/generated/ControlJournalEvent.schema.json +42 -0
  198. package/generated/ControlJournalExportReceipt.schema.json +49 -0
  199. package/generated/ControlJournalInspection.schema.json +149 -0
  200. package/generated/ControlJournalQuarantineReceipt.schema.json +55 -0
  201. package/generated/ControlJournalQuarantineRequest.schema.json +24 -0
  202. package/generated/ControlJournalValidation.schema.json +181 -0
  203. package/generated/ControlOperationCatalog.schema.json +128 -0
  204. package/generated/ControlOperationDescriptor.schema.json +110 -0
  205. package/generated/ControlProblem.schema.json +59 -0
  206. package/generated/ControlProject.schema.json +42 -0
  207. package/generated/ControlProjectListResponse.schema.json +54 -0
  208. package/generated/ControlProjectRegisterRequest.schema.json +19 -0
  209. package/generated/ControlProjectRelinkRequest.schema.json +19 -0
  210. package/generated/ControlQueuedRunInfo.schema.json +4 -2
  211. package/generated/ControlQuotaResponse.schema.json +177 -0
  212. package/generated/ControlResource.schema.json +59 -0
  213. package/generated/ControlRunAgainDraft.schema.json +539 -0
  214. package/generated/ControlRunDetail.schema.json +373 -34
  215. package/generated/ControlRunListResponse.schema.json +968 -0
  216. package/generated/ControlRunRetryResponse.schema.json +54 -0
  217. package/generated/ControlRunStartRequest.schema.json +123 -55
  218. package/generated/ControlRunStartResponse.schema.json +78 -0
  219. package/generated/ControlRunSummary.schema.json +312 -21
  220. package/generated/ControlSecretListResponse.schema.json +8 -14
  221. package/generated/ControlSecretMutationResponse.schema.json +32 -0
  222. package/generated/ControlSecretSetRequest.schema.json +27 -0
  223. package/generated/ControlSettingsSnapshot.schema.json +128 -44
  224. package/generated/ControlSettingsUpdateRequest.schema.json +119 -40
  225. package/generated/ControlSetupJob.schema.json +770 -64
  226. package/generated/ControlSetupJobCreateRequest.schema.json +16 -13
  227. package/generated/ControlSetupJobEvent.schema.json +869 -5
  228. package/generated/ControlSetupJobListFilter.schema.json +35 -0
  229. package/generated/ControlSetupJobListResponse.schema.json +770 -64
  230. package/generated/ControlSetupJobSnapshot.schema.json +878 -0
  231. package/generated/ControlSpecAnswersRequest.schema.json +74 -0
  232. package/generated/ControlSpecQuestionsRequest.schema.json +128 -2
  233. package/generated/ControlSpecSession.schema.json +249 -0
  234. package/generated/ControlSpecSessionListResponse.schema.json +261 -0
  235. package/generated/ControlThread.schema.json +36 -6
  236. package/generated/ControlThreadApplyResponse.schema.json +139 -0
  237. package/generated/ControlThreadCreateRequest.schema.json +6 -2
  238. package/generated/ControlThreadDetail.schema.json +64 -12
  239. package/generated/ControlThreadListResponse.schema.json +36 -6
  240. package/generated/ControlThreadTurnRequest.schema.json +413 -0
  241. package/generated/ControlThreadTurnResponse.schema.json +73 -0
  242. package/generated/ControlThreadUpdateRequest.schema.json +12 -1
  243. package/generated/ControlTrustListResponse.schema.json +6 -0
  244. package/generated/ControlTrustState.schema.json +6 -0
  245. package/generated/ControlTrustUpdateRequest.schema.json +65 -3
  246. package/generated/ControlUploadCreateRequest.schema.json +37 -0
  247. package/generated/ControlUploadFinalizeRequest.schema.json +17 -0
  248. package/generated/ControlUploadStatus.schema.json +40 -0
  249. package/generated/CredentialProfile.schema.json +78 -0
  250. package/generated/CredentialProfileStatus.schema.json +61 -0
  251. package/generated/DecisionRecord.schema.json +6 -3
  252. package/generated/GlobalConfig.schema.json +238 -55
  253. package/generated/HarnessEvent.schema.json +259 -11
  254. package/generated/HarnessManifest.schema.json +96 -14
  255. package/generated/HarnessModel.schema.json +19 -0
  256. package/generated/HarnessStatusDto.schema.json +198 -14
  257. package/generated/OrchestrateContract.schema.json +32 -6
  258. package/generated/OrchestratePlan.schema.json +20 -0
  259. package/generated/OrchestratePlanProgress.schema.json +61 -0
  260. package/generated/PaidBudget.schema.json +42 -0
  261. package/generated/Project.schema.json +45 -0
  262. package/generated/ProjectConfig.schema.json +45 -18
  263. package/generated/RawContextPacket.schema.json +184 -0
  264. package/generated/RawGitPatchEnvelope.schema.json +70 -0
  265. package/generated/RunEvent.schema.json +3 -0
  266. package/generated/RunTelemetry.schema.json +280 -0
  267. package/generated/SecretMetadata.schema.json +4 -7
  268. package/generated/Session.schema.json +14 -0
  269. package/generated/SpecPack.schema.json +118 -7
  270. package/generated/TaskContract.schema.json +224 -30
  271. package/generated/TestCommandInvocation.schema.json +45 -0
  272. package/generated/Thread.schema.json +74 -6
  273. package/generated/ThreadHeadPing.schema.json +40 -0
  274. package/generated/ThreadTurn.schema.json +24 -11
  275. package/generated/TrustConfig.schema.json +77 -0
  276. package/package.json +3 -2
  277. package/generated/ControlSetupJobConfirmRequest.schema.json +0 -18
  278. package/generated/ControlSpecFreezeRequest.schema.json +0 -83
package/dist/harness.d.ts CHANGED
@@ -37,6 +37,7 @@ export type WebPolicySupport = z.infer<typeof WebPolicySupport>;
37
37
  export declare const HarnessCapabilities: z.ZodObject<{
38
38
  plan: z.ZodDefault<z.ZodBoolean>;
39
39
  implement: z.ZodDefault<z.ZodBoolean>;
40
+ implementation_transport: z.ZodDefault<z.ZodEnum<["workspace", "git_patch_envelope"]>>;
40
41
  create_from_scratch: z.ZodDefault<z.ZodBoolean>;
41
42
  review: z.ZodDefault<z.ZodBoolean>;
42
43
  /** Consumed by the Phase-3 FinalVerifier routing (gating pushes `verify`). */
@@ -88,7 +89,18 @@ export declare const HarnessCapabilities: z.ZodObject<{
88
89
  * model. Data-driven like `effort_levels` — no model id is hardcoded in
89
90
  * routing logic.
90
91
  */
91
- known_models: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
92
+ known_models: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
93
+ id: z.ZodString;
94
+ /** Credential routes this model is available on. A bare string
95
+ * entry means ALL routes (backward shape). */
96
+ routes: z.ZodArray<z.ZodEnum<["local_session", "api_key"]>, "many">;
97
+ }, "strict", z.ZodTypeAny, {
98
+ id: string;
99
+ routes: ("api_key" | "local_session")[];
100
+ }, {
101
+ id: string;
102
+ routes: ("api_key" | "local_session")[];
103
+ }>]>, "many">>;
92
104
  /**
93
105
  * Vendor CLI version this `known_models` hint set was last verified against
94
106
  * (freshness note, surfaced with manifest-sourced model lists and checked by
@@ -103,6 +115,7 @@ export declare const HarnessCapabilities: z.ZodObject<{
103
115
  review: boolean;
104
116
  verify: boolean;
105
117
  synthesize: boolean;
118
+ implementation_transport: "workspace" | "git_patch_envelope";
106
119
  read_files: boolean;
107
120
  browser_tool: boolean;
108
121
  web_policy: "none" | "native" | "tools" | "uncontrolled";
@@ -111,7 +124,10 @@ export declare const HarnessCapabilities: z.ZodObject<{
111
124
  interactive: boolean;
112
125
  json_schema_output: boolean;
113
126
  effort_levels: ("low" | "medium" | "high" | "xhigh" | "max")[];
114
- known_models: string[];
127
+ known_models: (string | {
128
+ id: string;
129
+ routes: ("api_key" | "local_session")[];
130
+ })[];
115
131
  known_models_verified_against: string | null;
116
132
  }, {
117
133
  plan?: boolean | undefined;
@@ -121,6 +137,7 @@ export declare const HarnessCapabilities: z.ZodObject<{
121
137
  review?: boolean | undefined;
122
138
  verify?: boolean | undefined;
123
139
  synthesize?: boolean | undefined;
140
+ implementation_transport?: "workspace" | "git_patch_envelope" | undefined;
124
141
  read_files?: boolean | undefined;
125
142
  browser_tool?: boolean | undefined;
126
143
  web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
@@ -129,60 +146,67 @@ export declare const HarnessCapabilities: z.ZodObject<{
129
146
  interactive?: boolean | undefined;
130
147
  json_schema_output?: boolean | undefined;
131
148
  effort_levels?: ("low" | "medium" | "high" | "xhigh" | "max")[] | undefined;
132
- known_models?: string[] | undefined;
149
+ known_models?: (string | {
150
+ id: string;
151
+ routes: ("api_key" | "local_session")[];
152
+ })[] | undefined;
133
153
  known_models_verified_against?: string | null | undefined;
134
154
  }>;
135
155
  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>;
156
+ export type KnownModelEntry = HarnessCapabilities["known_models"][number];
157
+ /** Model ids from a known_models list that are valid on `route`. ONE owner for
158
+ * the route filter (INV-122): a bare string entry is valid on every route;
159
+ * `route: null` (undecidable pre-spawn) returns only the route-UNRESTRICTED
160
+ * ids — fail-closed, a route-scoped model never leaks past an unknown route. */
161
+ export declare function knownModelIdsForRoute(entries: readonly KnownModelEntry[], route: "local_session" | "api_key" | null): string[];
138
162
  export declare const CredentialTransportKind: z.ZodEnum<["config_file", "env_var", "oauth_token_env", "os_keychain", "http_header", "none"]>;
139
163
  export type CredentialTransportKind = z.infer<typeof CredentialTransportKind>;
140
164
  export declare const CredentialRelocation: z.ZodEnum<["HOME", "CONFIG_DIR", "ENV", "none"]>;
141
165
  export type CredentialRelocation = z.infer<typeof CredentialRelocation>;
142
166
  export declare const CredentialTransport: z.ZodObject<{
143
- source: z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
167
+ source: z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
144
168
  kind: z.ZodEnum<["config_file", "env_var", "oauth_token_env", "os_keychain", "http_header", "none"]>;
145
169
  relocatable_by: z.ZodDefault<z.ZodArray<z.ZodEnum<["HOME", "CONFIG_DIR", "ENV", "none"]>, "many">>;
146
170
  }, "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";
171
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
172
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
149
173
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
150
174
  }, {
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";
175
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
176
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
153
177
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
154
178
  }>;
155
179
  export type CredentialTransport = z.infer<typeof CredentialTransport>;
156
180
  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"]>>>;
181
+ supported_sources: z.ZodDefault<z.ZodArray<z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>, "many">>;
182
+ preferred_source: z.ZodDefault<z.ZodNullable<z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>>>;
159
183
  credential_transports: z.ZodDefault<z.ZodArray<z.ZodObject<{
160
- source: z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
184
+ source: z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
161
185
  kind: z.ZodEnum<["config_file", "env_var", "oauth_token_env", "os_keychain", "http_header", "none"]>;
162
186
  relocatable_by: z.ZodDefault<z.ZodArray<z.ZodEnum<["HOME", "CONFIG_DIR", "ENV", "none"]>, "many">>;
163
187
  }, "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";
188
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
189
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
166
190
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
167
191
  }, {
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";
192
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
193
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
170
194
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
171
195
  }>, "many">>;
172
196
  }, "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;
197
+ supported_sources: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[];
198
+ preferred_source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
175
199
  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";
200
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
201
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
178
202
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
179
203
  }[];
180
204
  }, {
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;
205
+ supported_sources?: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[] | undefined;
206
+ preferred_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
183
207
  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";
208
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
209
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
186
210
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
187
211
  }[] | undefined;
188
212
  }>>;
@@ -217,35 +241,35 @@ export type AccessControlCapabilities = z.infer<typeof AccessControlCapabilities
217
241
  */
218
242
  export declare const HarnessCapabilityProfile: z.ZodDefault<z.ZodObject<{
219
243
  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"]>>>;
244
+ supported_sources: z.ZodDefault<z.ZodArray<z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>, "many">>;
245
+ preferred_source: z.ZodDefault<z.ZodNullable<z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>>>;
222
246
  credential_transports: z.ZodDefault<z.ZodArray<z.ZodObject<{
223
- source: z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
247
+ source: z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
224
248
  kind: z.ZodEnum<["config_file", "env_var", "oauth_token_env", "os_keychain", "http_header", "none"]>;
225
249
  relocatable_by: z.ZodDefault<z.ZodArray<z.ZodEnum<["HOME", "CONFIG_DIR", "ENV", "none"]>, "many">>;
226
250
  }, "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";
251
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
252
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
229
253
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
230
254
  }, {
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";
255
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
256
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
233
257
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
234
258
  }>, "many">>;
235
259
  }, "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;
260
+ supported_sources: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[];
261
+ preferred_source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
238
262
  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";
263
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
264
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
241
265
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
242
266
  }[];
243
267
  }, {
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;
268
+ supported_sources?: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[] | undefined;
269
+ preferred_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
246
270
  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";
271
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
272
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
249
273
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
250
274
  }[] | undefined;
251
275
  }>>;
@@ -263,16 +287,33 @@ export declare const HarnessCapabilityProfile: z.ZodDefault<z.ZodObject<{
263
287
  }, {
264
288
  supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
265
289
  }>>;
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"]>>;
290
+ /** Every accepted media class has a finite MIME/size/count/transport declaration. */
291
+ attachment_inputs: z.ZodDefault<z.ZodArray<z.ZodObject<{
292
+ kind: z.ZodEnum<["image", "file"]>;
293
+ mime_types: z.ZodArray<z.ZodString, "many">;
294
+ max_bytes: z.ZodNumber;
295
+ max_count: z.ZodNumber;
296
+ transport: z.ZodEnum<["file_path", "base64_stream", "base64_inline", "text_inline"]>;
297
+ }, "strict", z.ZodTypeAny, {
298
+ kind: "file" | "image";
299
+ mime_types: string[];
300
+ max_bytes: number;
301
+ max_count: number;
302
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
303
+ }, {
304
+ kind: "file" | "image";
305
+ mime_types: string[];
306
+ max_bytes: number;
307
+ max_count: number;
308
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
309
+ }>, "many">>;
269
310
  }, "strip", z.ZodTypeAny, {
270
311
  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;
312
+ supported_sources: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[];
313
+ preferred_source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
273
314
  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";
315
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
316
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
276
317
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
277
318
  }[];
278
319
  };
@@ -282,14 +323,20 @@ export declare const HarnessCapabilityProfile: z.ZodDefault<z.ZodObject<{
282
323
  isolation: {
283
324
  supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
284
325
  };
285
- image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
326
+ attachment_inputs: {
327
+ kind: "file" | "image";
328
+ mime_types: string[];
329
+ max_bytes: number;
330
+ max_count: number;
331
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
332
+ }[];
286
333
  }, {
287
334
  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;
335
+ supported_sources?: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[] | undefined;
336
+ preferred_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
290
337
  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";
338
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
339
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
293
340
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
294
341
  }[] | undefined;
295
342
  } | undefined;
@@ -299,7 +346,13 @@ export declare const HarnessCapabilityProfile: z.ZodDefault<z.ZodObject<{
299
346
  isolation?: {
300
347
  supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
301
348
  } | undefined;
302
- image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
349
+ attachment_inputs?: {
350
+ kind: "file" | "image";
351
+ mime_types: string[];
352
+ max_bytes: number;
353
+ max_count: number;
354
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
355
+ }[] | undefined;
303
356
  }>>;
304
357
  export type HarnessCapabilityProfile = z.infer<typeof HarnessCapabilityProfile>;
305
358
  /**
@@ -312,13 +365,18 @@ export declare const HarnessModel: z.ZodObject<{
312
365
  id: z.ZodString;
313
366
  label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
314
367
  context_window: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
368
+ /** Credential routes the model is scoped to per the manifest annotation;
369
+ * null = unannotated (available on every route). */
370
+ routes: z.ZodDefault<z.ZodNullable<z.ZodArray<z.ZodEnum<["local_session", "api_key"]>, "many">>>;
315
371
  }, "strip", z.ZodTypeAny, {
316
372
  id: string;
317
373
  label: string | null;
374
+ routes: ("api_key" | "local_session")[] | null;
318
375
  context_window: number | null;
319
376
  }, {
320
377
  id: string;
321
378
  label?: string | null | undefined;
379
+ routes?: ("api_key" | "local_session")[] | null | undefined;
322
380
  context_window?: number | null | undefined;
323
381
  }>;
324
382
  export type HarnessModel = z.infer<typeof HarnessModel>;
@@ -331,35 +389,35 @@ export declare const HarnessManifest: z.ZodObject<{
331
389
  provider_family: z.ZodDefault<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>>;
332
390
  capability_profile: z.ZodDefault<z.ZodObject<{
333
391
  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"]>>>;
392
+ supported_sources: z.ZodDefault<z.ZodArray<z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>, "many">>;
393
+ preferred_source: z.ZodDefault<z.ZodNullable<z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>>>;
336
394
  credential_transports: z.ZodDefault<z.ZodArray<z.ZodObject<{
337
- source: z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
395
+ source: z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
338
396
  kind: z.ZodEnum<["config_file", "env_var", "oauth_token_env", "os_keychain", "http_header", "none"]>;
339
397
  relocatable_by: z.ZodDefault<z.ZodArray<z.ZodEnum<["HOME", "CONFIG_DIR", "ENV", "none"]>, "many">>;
340
398
  }, "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";
399
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
400
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
343
401
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
344
402
  }, {
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";
403
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
404
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
347
405
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
348
406
  }>, "many">>;
349
407
  }, "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;
408
+ supported_sources: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[];
409
+ preferred_source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
352
410
  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";
411
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
412
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
355
413
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
356
414
  }[];
357
415
  }, {
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;
416
+ supported_sources?: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[] | undefined;
417
+ preferred_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
360
418
  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";
419
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
420
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
363
421
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
364
422
  }[] | undefined;
365
423
  }>>;
@@ -377,16 +435,33 @@ export declare const HarnessManifest: z.ZodObject<{
377
435
  }, {
378
436
  supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
379
437
  }>>;
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"]>>;
438
+ /** Every accepted media class has a finite MIME/size/count/transport declaration. */
439
+ attachment_inputs: z.ZodDefault<z.ZodArray<z.ZodObject<{
440
+ kind: z.ZodEnum<["image", "file"]>;
441
+ mime_types: z.ZodArray<z.ZodString, "many">;
442
+ max_bytes: z.ZodNumber;
443
+ max_count: z.ZodNumber;
444
+ transport: z.ZodEnum<["file_path", "base64_stream", "base64_inline", "text_inline"]>;
445
+ }, "strict", z.ZodTypeAny, {
446
+ kind: "file" | "image";
447
+ mime_types: string[];
448
+ max_bytes: number;
449
+ max_count: number;
450
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
451
+ }, {
452
+ kind: "file" | "image";
453
+ mime_types: string[];
454
+ max_bytes: number;
455
+ max_count: number;
456
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
457
+ }>, "many">>;
383
458
  }, "strip", z.ZodTypeAny, {
384
459
  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;
460
+ supported_sources: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[];
461
+ preferred_source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
387
462
  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";
463
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
464
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
390
465
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
391
466
  }[];
392
467
  };
@@ -396,14 +471,20 @@ export declare const HarnessManifest: z.ZodObject<{
396
471
  isolation: {
397
472
  supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
398
473
  };
399
- image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
474
+ attachment_inputs: {
475
+ kind: "file" | "image";
476
+ mime_types: string[];
477
+ max_bytes: number;
478
+ max_count: number;
479
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
480
+ }[];
400
481
  }, {
401
482
  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;
483
+ supported_sources?: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[] | undefined;
484
+ preferred_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
404
485
  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";
486
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
487
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
407
488
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
408
489
  }[] | undefined;
409
490
  } | undefined;
@@ -413,12 +494,19 @@ export declare const HarnessManifest: z.ZodObject<{
413
494
  isolation?: {
414
495
  supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
415
496
  } | undefined;
416
- image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
497
+ attachment_inputs?: {
498
+ kind: "file" | "image";
499
+ mime_types: string[];
500
+ max_bytes: number;
501
+ max_count: number;
502
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
503
+ }[] | undefined;
417
504
  }>>;
418
505
  /** Compatibility convenience fields. New routing/UI should prefer capability_profile. */
419
506
  capabilities: z.ZodObject<{
420
507
  plan: z.ZodDefault<z.ZodBoolean>;
421
508
  implement: z.ZodDefault<z.ZodBoolean>;
509
+ implementation_transport: z.ZodDefault<z.ZodEnum<["workspace", "git_patch_envelope"]>>;
422
510
  create_from_scratch: z.ZodDefault<z.ZodBoolean>;
423
511
  review: z.ZodDefault<z.ZodBoolean>;
424
512
  /** Consumed by the Phase-3 FinalVerifier routing (gating pushes `verify`). */
@@ -470,7 +558,18 @@ export declare const HarnessManifest: z.ZodObject<{
470
558
  * model. Data-driven like `effort_levels` — no model id is hardcoded in
471
559
  * routing logic.
472
560
  */
473
- known_models: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
561
+ known_models: z.ZodDefault<z.ZodArray<z.ZodUnion<[z.ZodString, z.ZodObject<{
562
+ id: z.ZodString;
563
+ /** Credential routes this model is available on. A bare string
564
+ * entry means ALL routes (backward shape). */
565
+ routes: z.ZodArray<z.ZodEnum<["local_session", "api_key"]>, "many">;
566
+ }, "strict", z.ZodTypeAny, {
567
+ id: string;
568
+ routes: ("api_key" | "local_session")[];
569
+ }, {
570
+ id: string;
571
+ routes: ("api_key" | "local_session")[];
572
+ }>]>, "many">>;
474
573
  /**
475
574
  * Vendor CLI version this `known_models` hint set was last verified against
476
575
  * (freshness note, surfaced with manifest-sourced model lists and checked by
@@ -485,6 +584,7 @@ export declare const HarnessManifest: z.ZodObject<{
485
584
  review: boolean;
486
585
  verify: boolean;
487
586
  synthesize: boolean;
587
+ implementation_transport: "workspace" | "git_patch_envelope";
488
588
  read_files: boolean;
489
589
  browser_tool: boolean;
490
590
  web_policy: "none" | "native" | "tools" | "uncontrolled";
@@ -493,7 +593,10 @@ export declare const HarnessManifest: z.ZodObject<{
493
593
  interactive: boolean;
494
594
  json_schema_output: boolean;
495
595
  effort_levels: ("low" | "medium" | "high" | "xhigh" | "max")[];
496
- known_models: string[];
596
+ known_models: (string | {
597
+ id: string;
598
+ routes: ("api_key" | "local_session")[];
599
+ })[];
497
600
  known_models_verified_against: string | null;
498
601
  }, {
499
602
  plan?: boolean | undefined;
@@ -503,6 +606,7 @@ export declare const HarnessManifest: z.ZodObject<{
503
606
  review?: boolean | undefined;
504
607
  verify?: boolean | undefined;
505
608
  synthesize?: boolean | undefined;
609
+ implementation_transport?: "workspace" | "git_patch_envelope" | undefined;
506
610
  read_files?: boolean | undefined;
507
611
  browser_tool?: boolean | undefined;
508
612
  web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
@@ -511,23 +615,26 @@ export declare const HarnessManifest: z.ZodObject<{
511
615
  interactive?: boolean | undefined;
512
616
  json_schema_output?: boolean | undefined;
513
617
  effort_levels?: ("low" | "medium" | "high" | "xhigh" | "max")[] | undefined;
514
- known_models?: string[] | undefined;
618
+ known_models?: (string | {
619
+ id: string;
620
+ routes: ("api_key" | "local_session")[];
621
+ })[] | undefined;
515
622
  known_models_verified_against?: string | null | undefined;
516
623
  }>;
517
624
  auth_modes: z.ZodDefault<z.ZodArray<z.ZodEnum<["local_session", "api_key", "none"]>, "many">>;
518
625
  access_profiles_supported: z.ZodDefault<z.ZodArray<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>, "many">>;
519
626
  }, "strip", z.ZodTypeAny, {
520
- id: string;
521
- kind: "local_cli" | "remote_api" | "fake";
522
627
  display_name: string;
628
+ kind: "local_cli" | "remote_api" | "fake";
629
+ id: string;
523
630
  provider_family: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown";
524
631
  capability_profile: {
525
632
  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;
633
+ supported_sources: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[];
634
+ preferred_source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
528
635
  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";
636
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
637
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
531
638
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
532
639
  }[];
533
640
  };
@@ -537,7 +644,13 @@ export declare const HarnessManifest: z.ZodObject<{
537
644
  isolation: {
538
645
  supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
539
646
  };
540
- image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
647
+ attachment_inputs: {
648
+ kind: "file" | "image";
649
+ mime_types: string[];
650
+ max_bytes: number;
651
+ max_count: number;
652
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
653
+ }[];
541
654
  };
542
655
  capabilities: {
543
656
  plan: boolean;
@@ -547,6 +660,7 @@ export declare const HarnessManifest: z.ZodObject<{
547
660
  review: boolean;
548
661
  verify: boolean;
549
662
  synthesize: boolean;
663
+ implementation_transport: "workspace" | "git_patch_envelope";
550
664
  read_files: boolean;
551
665
  browser_tool: boolean;
552
666
  web_policy: "none" | "native" | "tools" | "uncontrolled";
@@ -555,7 +669,10 @@ export declare const HarnessManifest: z.ZodObject<{
555
669
  interactive: boolean;
556
670
  json_schema_output: boolean;
557
671
  effort_levels: ("low" | "medium" | "high" | "xhigh" | "max")[];
558
- known_models: string[];
672
+ known_models: (string | {
673
+ id: string;
674
+ routes: ("api_key" | "local_session")[];
675
+ })[];
559
676
  known_models_verified_against: string | null;
560
677
  };
561
678
  auth_modes: ("api_key" | "none" | "local_session")[];
@@ -563,9 +680,9 @@ export declare const HarnessManifest: z.ZodObject<{
563
680
  version?: string | undefined;
564
681
  adapter_version?: string | undefined;
565
682
  }, {
566
- id: string;
567
- kind: "local_cli" | "remote_api" | "fake";
568
683
  display_name: string;
684
+ kind: "local_cli" | "remote_api" | "fake";
685
+ id: string;
569
686
  capabilities: {
570
687
  plan?: boolean | undefined;
571
688
  orchestrate?: boolean | undefined;
@@ -574,6 +691,7 @@ export declare const HarnessManifest: z.ZodObject<{
574
691
  review?: boolean | undefined;
575
692
  verify?: boolean | undefined;
576
693
  synthesize?: boolean | undefined;
694
+ implementation_transport?: "workspace" | "git_patch_envelope" | undefined;
577
695
  read_files?: boolean | undefined;
578
696
  browser_tool?: boolean | undefined;
579
697
  web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
@@ -582,7 +700,10 @@ export declare const HarnessManifest: z.ZodObject<{
582
700
  interactive?: boolean | undefined;
583
701
  json_schema_output?: boolean | undefined;
584
702
  effort_levels?: ("low" | "medium" | "high" | "xhigh" | "max")[] | undefined;
585
- known_models?: string[] | undefined;
703
+ known_models?: (string | {
704
+ id: string;
705
+ routes: ("api_key" | "local_session")[];
706
+ })[] | undefined;
586
707
  known_models_verified_against?: string | null | undefined;
587
708
  };
588
709
  version?: string | undefined;
@@ -590,11 +711,11 @@ export declare const HarnessManifest: z.ZodObject<{
590
711
  provider_family?: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown" | undefined;
591
712
  capability_profile?: {
592
713
  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;
714
+ supported_sources?: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[] | undefined;
715
+ preferred_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
595
716
  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";
717
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
718
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
598
719
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
599
720
  }[] | undefined;
600
721
  } | undefined;
@@ -604,7 +725,13 @@ export declare const HarnessManifest: z.ZodObject<{
604
725
  isolation?: {
605
726
  supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
606
727
  } | undefined;
607
- image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
728
+ attachment_inputs?: {
729
+ kind: "file" | "image";
730
+ mime_types: string[];
731
+ max_bytes: number;
732
+ max_count: number;
733
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
734
+ }[] | undefined;
608
735
  } | undefined;
609
736
  auth_modes?: ("api_key" | "none" | "local_session")[] | undefined;
610
737
  access_profiles_supported?: ("readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native")[] | undefined;
@@ -652,8 +779,24 @@ export declare const ConformanceReport: z.ZodObject<{
652
779
  enabled_intents: z.ZodDefault<z.ZodArray<z.ZodEnum<["plan", "spec", "implement", "create_from_scratch", "repair", "review", "verify", "synthesize", "explain", "audit", "orchestrate"]>, "many">>;
653
780
  disabled_intents: z.ZodDefault<z.ZodArray<z.ZodEnum<["plan", "spec", "implement", "create_from_scratch", "repair", "review", "verify", "synthesize", "explain", "audit", "orchestrate"]>, "many">>;
654
781
  reasons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
782
+ auth_sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
783
+ source: z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
784
+ availability: z.ZodEnum<["available", "unavailable", "unknown"]>;
785
+ verification: z.ZodEnum<["passed", "failed", "not_run"]>;
786
+ detail: z.ZodOptional<z.ZodString>;
787
+ }, "strict", z.ZodTypeAny, {
788
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
789
+ availability: "unknown" | "available" | "unavailable";
790
+ verification: "passed" | "failed" | "not_run";
791
+ detail?: string | undefined;
792
+ }, {
793
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
794
+ availability: "unknown" | "available" | "unavailable";
795
+ verification: "passed" | "failed" | "not_run";
796
+ detail?: string | undefined;
797
+ }>, "many">>;
655
798
  }, "strip", z.ZodTypeAny, {
656
- status: "ok" | "degraded" | "unavailable";
799
+ status: "unavailable" | "ok" | "degraded";
657
800
  harness_id: string;
658
801
  checks: {
659
802
  status: "pass" | "fail" | "skip";
@@ -664,8 +807,14 @@ export declare const ConformanceReport: z.ZodObject<{
664
807
  enabled_intents: ("plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain")[];
665
808
  disabled_intents: ("plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain")[];
666
809
  reasons: string[];
810
+ auth_sources: {
811
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
812
+ availability: "unknown" | "available" | "unavailable";
813
+ verification: "passed" | "failed" | "not_run";
814
+ detail?: string | undefined;
815
+ }[];
667
816
  }, {
668
- status: "ok" | "degraded" | "unavailable";
817
+ status: "unavailable" | "ok" | "degraded";
669
818
  harness_id: string;
670
819
  checks?: {
671
820
  status: "pass" | "fail" | "skip";
@@ -676,27 +825,16 @@ export declare const ConformanceReport: z.ZodObject<{
676
825
  enabled_intents?: ("plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain")[] | undefined;
677
826
  disabled_intents?: ("plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain")[] | undefined;
678
827
  reasons?: string[] | undefined;
828
+ auth_sources?: {
829
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
830
+ availability: "unknown" | "available" | "unavailable";
831
+ verification: "passed" | "failed" | "not_run";
832
+ detail?: string | undefined;
833
+ }[] | undefined;
679
834
  }>;
680
835
  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
836
  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
837
  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
838
  headless: z.ZodDefault<z.ZodBoolean>;
701
839
  }, "strip", z.ZodTypeAny, {
702
840
  output_dir: string | null;
@@ -711,6 +849,14 @@ export declare const HarnessRunSpec: z.ZodObject<{
711
849
  session_id: z.ZodString;
712
850
  intent: z.ZodEnum<["plan", "spec", "implement", "create_from_scratch", "repair", "review", "verify", "synthesize", "explain", "audit", "orchestrate"]>;
713
851
  prompt: z.ZodString;
852
+ /**
853
+ * Optional caller-supplied system-level instructions layered on top of the
854
+ * prompt for TASK-PRODUCING lanes (primary, candidate, planner, explorer,
855
+ * orchestrate-planner) — never reviewers, synthesis, or the auth smoke.
856
+ * Adapters deliver it natively (claude `--append-system-prompt`, codex
857
+ * `developer_instructions`) or as a delimited prompt prefix.
858
+ */
859
+ instructions: z.ZodOptional<z.ZodString>;
714
860
  cwd: z.ZodString;
715
861
  access: z.ZodDefault<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>>;
716
862
  external_context_policy: z.ZodDefault<z.ZodEnum<["off", "auto", "cached", "live"]>>;
@@ -729,13 +875,66 @@ export declare const HarnessRunSpec: z.ZodObject<{
729
875
  }>>;
730
876
  model_hint: z.ZodDefault<z.ZodNullable<z.ZodString>>;
731
877
  effort_hint: z.ZodDefault<z.ZodNullable<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>>;
732
- max_usd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
733
878
  max_turns: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
734
879
  /**
735
880
  * Which auth route the attempt should use. `auto` = subscription-first with
736
881
  * api_key fallback; adapters seed native session vs inject the key accordingly.
737
882
  */
738
883
  auth_preference: z.ZodDefault<z.ZodEnum<["subscription", "api_key", "auto"]>>;
884
+ /**
885
+ * The RESOLVED credential profile for this attempt (INV-135), stamped by
886
+ * the orchestrator (the one resolve owner) from the durable registry —
887
+ * adapters consume the typed transport and never read config. Null = the
888
+ * engine-default credential ladder. An explicit profile is STRICT: the
889
+ * adapter uses exactly its transport or refuses with a typed error, never
890
+ * a silent fallback to default credentials.
891
+ */
892
+ credential_profile: z.ZodDefault<z.ZodNullable<z.ZodEffects<z.ZodObject<{
893
+ profile_id: z.ZodString;
894
+ harness_id: z.ZodString;
895
+ display_name: z.ZodString;
896
+ credential_kind: z.ZodEnum<["config_dir_login", "oauth_token", "api_key"]>;
897
+ isolation_locator: z.ZodDefault<z.ZodNullable<z.ZodString>>;
898
+ secret_ref: z.ZodDefault<z.ZodNullable<z.ZodString>>;
899
+ enabled: z.ZodDefault<z.ZodBoolean>;
900
+ created_at: z.ZodDefault<z.ZodNullable<z.ZodString>>;
901
+ }, "strict", z.ZodTypeAny, {
902
+ profile_id: string;
903
+ harness_id: string;
904
+ display_name: string;
905
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
906
+ isolation_locator: string | null;
907
+ secret_ref: string | null;
908
+ enabled: boolean;
909
+ created_at: string | null;
910
+ }, {
911
+ profile_id: string;
912
+ harness_id: string;
913
+ display_name: string;
914
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
915
+ isolation_locator?: string | null | undefined;
916
+ secret_ref?: string | null | undefined;
917
+ enabled?: boolean | undefined;
918
+ created_at?: string | null | undefined;
919
+ }>, {
920
+ profile_id: string;
921
+ harness_id: string;
922
+ display_name: string;
923
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
924
+ isolation_locator: string | null;
925
+ secret_ref: string | null;
926
+ enabled: boolean;
927
+ created_at: string | null;
928
+ }, {
929
+ profile_id: string;
930
+ harness_id: string;
931
+ display_name: string;
932
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
933
+ isolation_locator?: string | null | undefined;
934
+ secret_ref?: string | null | undefined;
935
+ enabled?: boolean | undefined;
936
+ created_at?: string | null | undefined;
937
+ }>>>;
739
938
  /**
740
939
  * Native CLI session id to resume into (codex `exec resume`, claude `--resume`,
741
940
  * cursor `agent --resume`, opencode `run --session`). Null starts a fresh session.
@@ -747,30 +946,44 @@ export declare const HarnessRunSpec: z.ZodObject<{
747
946
  * (agent env isolation). Threaded from routing.env_inheritance at spawn.
748
947
  */
749
948
  env_inheritance: z.ZodDefault<z.ZodEnum<["mirror_native", "clean"]>>;
949
+ evidence_policy: z.ZodDefault<z.ZodEnum<["stream_only", "allow_vendor_session_artifacts"]>>;
950
+ /**
951
+ * Opt-in live text deltas (F2.5 W-C4): adapters that support partial
952
+ * output add their native flag (claude --include-partial-messages,
953
+ * cursor --stream-partial-output; codex exec has no deltas). Set ONLY on
954
+ * single-candidate chat lanes — racing lanes stay delta-free (noise × N).
955
+ * Delta messages carry payload.delta=true and never enter answers.
956
+ */
957
+ stream_deltas: z.ZodDefault<z.ZodBoolean>;
750
958
  env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
751
959
  /**
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.
960
+ * Immutable user/agent resources forwarded only after the selected adapter's
961
+ * finite `capability_profile.attachment_inputs` declaration admits them.
755
962
  */
756
963
  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>;
964
+ resource_id: z.ZodString;
965
+ kind: z.ZodEnum<["image", "file"]>;
966
+ mime: z.ZodString;
967
+ name: z.ZodString;
968
+ sha256: z.ZodString;
969
+ size_bytes: z.ZodNumber;
761
970
  path: z.ZodString;
762
- }, "strip", z.ZodTypeAny, {
971
+ }, "strict", z.ZodTypeAny, {
763
972
  path: string;
764
- id: string;
765
- kind: "image" | "file";
766
- mime: string;
767
973
  name: string;
974
+ kind: "file" | "image";
975
+ resource_id: string;
976
+ mime: string;
977
+ sha256: string;
978
+ size_bytes: number;
768
979
  }, {
769
980
  path: string;
770
- id: string;
771
- kind?: "image" | "file" | undefined;
772
- mime?: string | undefined;
773
- name?: string | undefined;
981
+ name: string;
982
+ kind: "file" | "image";
983
+ resource_id: string;
984
+ mime: string;
985
+ sha256: string;
986
+ size_bytes: number;
774
987
  }>, "many">>;
775
988
  /**
776
989
  * Agent-driven browser wiring. Null = no browser tool this run (the common
@@ -778,18 +991,7 @@ export declare const HarnessRunSpec: z.ZodObject<{
778
991
  * `browser_tool`, and web policy is not `off`.
779
992
  */
780
993
  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
994
  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
995
  headless: z.ZodDefault<z.ZodBoolean>;
794
996
  }, "strip", z.ZodTypeAny, {
795
997
  output_dir: string | null;
@@ -805,6 +1007,125 @@ export declare const HarnessRunSpec: z.ZodObject<{
805
1007
  * declares `json_schema_output`; consumers add the native CLI flag.
806
1008
  */
807
1009
  output_schema: z.ZodOptional<z.ZodUnknown>;
1010
+ raw_context_packet: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1011
+ schema_version: z.ZodLiteral<1>;
1012
+ packet_hash: z.ZodString;
1013
+ base_commit_sha: z.ZodString;
1014
+ base_tree_sha: z.ZodString;
1015
+ readable_files: z.ZodArray<z.ZodObject<{
1016
+ path: z.ZodString;
1017
+ mode: z.ZodString;
1018
+ blob_oid: z.ZodString;
1019
+ content_hash: z.ZodString;
1020
+ content: z.ZodString;
1021
+ }, "strip", z.ZodTypeAny, {
1022
+ path: string;
1023
+ mode: string;
1024
+ blob_oid: string;
1025
+ content_hash: string;
1026
+ content: string;
1027
+ }, {
1028
+ path: string;
1029
+ mode: string;
1030
+ blob_oid: string;
1031
+ content_hash: string;
1032
+ content: string;
1033
+ }>, "many">;
1034
+ editable_paths: z.ZodArray<z.ZodString, "many">;
1035
+ creatable_roots: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
1036
+ file_manifest: z.ZodArray<z.ZodObject<{
1037
+ path: z.ZodString;
1038
+ disposition: z.ZodEnum<["full", "included", "manifest_only", "excluded", "sensitive", "binary", "vendored", "oversized", "read_error", "omitted"]>;
1039
+ hash: z.ZodOptional<z.ZodString>;
1040
+ bytes: z.ZodOptional<z.ZodNumber>;
1041
+ reason: z.ZodOptional<z.ZodString>;
1042
+ }, "strip", z.ZodTypeAny, {
1043
+ path: string;
1044
+ disposition: "full" | "included" | "manifest_only" | "excluded" | "sensitive" | "binary" | "vendored" | "oversized" | "read_error" | "omitted";
1045
+ hash?: string | undefined;
1046
+ bytes?: number | undefined;
1047
+ reason?: string | undefined;
1048
+ }, {
1049
+ path: string;
1050
+ disposition: "full" | "included" | "manifest_only" | "excluded" | "sensitive" | "binary" | "vendored" | "oversized" | "read_error" | "omitted";
1051
+ hash?: string | undefined;
1052
+ bytes?: number | undefined;
1053
+ reason?: string | undefined;
1054
+ }>, "many">;
1055
+ omissions: z.ZodArray<z.ZodObject<{
1056
+ path: z.ZodString;
1057
+ reason: z.ZodString;
1058
+ replacement: z.ZodDefault<z.ZodEnum<["summary", "map", "index", "none"]>>;
1059
+ hash: z.ZodOptional<z.ZodString>;
1060
+ }, "strip", z.ZodTypeAny, {
1061
+ path: string;
1062
+ reason: string;
1063
+ replacement: "map" | "none" | "summary" | "index";
1064
+ hash?: string | undefined;
1065
+ }, {
1066
+ path: string;
1067
+ reason: string;
1068
+ hash?: string | undefined;
1069
+ replacement?: "map" | "none" | "summary" | "index" | undefined;
1070
+ }>, "many">;
1071
+ evidence_refs: z.ZodArray<z.ZodString, "many">;
1072
+ }, "strip", z.ZodTypeAny, {
1073
+ schema_version: 1;
1074
+ packet_hash: string;
1075
+ base_commit_sha: string;
1076
+ base_tree_sha: string;
1077
+ readable_files: {
1078
+ path: string;
1079
+ mode: string;
1080
+ blob_oid: string;
1081
+ content_hash: string;
1082
+ content: string;
1083
+ }[];
1084
+ editable_paths: string[];
1085
+ creatable_roots: string[];
1086
+ file_manifest: {
1087
+ path: string;
1088
+ disposition: "full" | "included" | "manifest_only" | "excluded" | "sensitive" | "binary" | "vendored" | "oversized" | "read_error" | "omitted";
1089
+ hash?: string | undefined;
1090
+ bytes?: number | undefined;
1091
+ reason?: string | undefined;
1092
+ }[];
1093
+ omissions: {
1094
+ path: string;
1095
+ reason: string;
1096
+ replacement: "map" | "none" | "summary" | "index";
1097
+ hash?: string | undefined;
1098
+ }[];
1099
+ evidence_refs: string[];
1100
+ }, {
1101
+ schema_version: 1;
1102
+ packet_hash: string;
1103
+ base_commit_sha: string;
1104
+ base_tree_sha: string;
1105
+ readable_files: {
1106
+ path: string;
1107
+ mode: string;
1108
+ blob_oid: string;
1109
+ content_hash: string;
1110
+ content: string;
1111
+ }[];
1112
+ editable_paths: string[];
1113
+ file_manifest: {
1114
+ path: string;
1115
+ disposition: "full" | "included" | "manifest_only" | "excluded" | "sensitive" | "binary" | "vendored" | "oversized" | "read_error" | "omitted";
1116
+ hash?: string | undefined;
1117
+ bytes?: number | undefined;
1118
+ reason?: string | undefined;
1119
+ }[];
1120
+ omissions: {
1121
+ path: string;
1122
+ reason: string;
1123
+ hash?: string | undefined;
1124
+ replacement?: "map" | "none" | "summary" | "index" | undefined;
1125
+ }[];
1126
+ evidence_refs: string[];
1127
+ creatable_roots?: string[] | undefined;
1128
+ }>>>;
808
1129
  extra: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
809
1130
  }, "strip", z.ZodTypeAny, {
810
1131
  max_turns: number | null;
@@ -821,29 +1142,73 @@ export declare const HarnessRunSpec: z.ZodObject<{
821
1142
  };
822
1143
  model_hint: string | null;
823
1144
  effort_hint: "low" | "medium" | "high" | "xhigh" | "max" | null;
824
- max_usd: number | null;
825
1145
  auth_preference: "auto" | "subscription" | "api_key";
1146
+ credential_profile: {
1147
+ profile_id: string;
1148
+ harness_id: string;
1149
+ display_name: string;
1150
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
1151
+ isolation_locator: string | null;
1152
+ secret_ref: string | null;
1153
+ enabled: boolean;
1154
+ created_at: string | null;
1155
+ } | null;
826
1156
  resume_session_id: string | null;
827
1157
  env_inheritance: "mirror_native" | "clean";
1158
+ evidence_policy: "stream_only" | "allow_vendor_session_artifacts";
1159
+ stream_deltas: boolean;
828
1160
  env: Record<string, string>;
829
1161
  attachments: {
830
1162
  path: string;
831
- id: string;
832
- kind: "image" | "file";
833
- mime: string;
834
1163
  name: string;
1164
+ kind: "file" | "image";
1165
+ resource_id: string;
1166
+ mime: string;
1167
+ sha256: string;
1168
+ size_bytes: number;
835
1169
  }[];
836
1170
  browser: {
837
1171
  output_dir: string | null;
838
1172
  headless: boolean;
839
1173
  } | null;
840
1174
  extra: Record<string, unknown>;
1175
+ instructions?: string | undefined;
841
1176
  output_schema?: unknown;
1177
+ raw_context_packet?: {
1178
+ schema_version: 1;
1179
+ packet_hash: string;
1180
+ base_commit_sha: string;
1181
+ base_tree_sha: string;
1182
+ readable_files: {
1183
+ path: string;
1184
+ mode: string;
1185
+ blob_oid: string;
1186
+ content_hash: string;
1187
+ content: string;
1188
+ }[];
1189
+ editable_paths: string[];
1190
+ creatable_roots: string[];
1191
+ file_manifest: {
1192
+ path: string;
1193
+ disposition: "full" | "included" | "manifest_only" | "excluded" | "sensitive" | "binary" | "vendored" | "oversized" | "read_error" | "omitted";
1194
+ hash?: string | undefined;
1195
+ bytes?: number | undefined;
1196
+ reason?: string | undefined;
1197
+ }[];
1198
+ omissions: {
1199
+ path: string;
1200
+ reason: string;
1201
+ replacement: "map" | "none" | "summary" | "index";
1202
+ hash?: string | undefined;
1203
+ }[];
1204
+ evidence_refs: string[];
1205
+ } | null | undefined;
842
1206
  }, {
843
1207
  session_id: string;
844
1208
  intent: "plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain";
845
1209
  prompt: string;
846
1210
  cwd: string;
1211
+ instructions?: string | undefined;
847
1212
  max_turns?: number | null | undefined;
848
1213
  access?: "readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native" | undefined;
849
1214
  external_context_policy?: "off" | "auto" | "cached" | "live" | undefined;
@@ -854,69 +1219,68 @@ export declare const HarnessRunSpec: z.ZodObject<{
854
1219
  } | undefined;
855
1220
  model_hint?: string | null | undefined;
856
1221
  effort_hint?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
857
- max_usd?: number | null | undefined;
858
1222
  auth_preference?: "auto" | "subscription" | "api_key" | undefined;
1223
+ credential_profile?: {
1224
+ profile_id: string;
1225
+ harness_id: string;
1226
+ display_name: string;
1227
+ credential_kind: "api_key" | "config_dir_login" | "oauth_token";
1228
+ isolation_locator?: string | null | undefined;
1229
+ secret_ref?: string | null | undefined;
1230
+ enabled?: boolean | undefined;
1231
+ created_at?: string | null | undefined;
1232
+ } | null | undefined;
859
1233
  resume_session_id?: string | null | undefined;
860
1234
  env_inheritance?: "mirror_native" | "clean" | undefined;
1235
+ evidence_policy?: "stream_only" | "allow_vendor_session_artifacts" | undefined;
1236
+ stream_deltas?: boolean | undefined;
861
1237
  env?: Record<string, string> | undefined;
862
1238
  attachments?: {
863
1239
  path: string;
864
- id: string;
865
- kind?: "image" | "file" | undefined;
866
- mime?: string | undefined;
867
- name?: string | undefined;
1240
+ name: string;
1241
+ kind: "file" | "image";
1242
+ resource_id: string;
1243
+ mime: string;
1244
+ sha256: string;
1245
+ size_bytes: number;
868
1246
  }[] | undefined;
869
1247
  browser?: {
870
1248
  output_dir?: string | null | undefined;
871
1249
  headless?: boolean | undefined;
872
1250
  } | null | undefined;
873
1251
  output_schema?: unknown;
1252
+ raw_context_packet?: {
1253
+ schema_version: 1;
1254
+ packet_hash: string;
1255
+ base_commit_sha: string;
1256
+ base_tree_sha: string;
1257
+ readable_files: {
1258
+ path: string;
1259
+ mode: string;
1260
+ blob_oid: string;
1261
+ content_hash: string;
1262
+ content: string;
1263
+ }[];
1264
+ editable_paths: string[];
1265
+ file_manifest: {
1266
+ path: string;
1267
+ disposition: "full" | "included" | "manifest_only" | "excluded" | "sensitive" | "binary" | "vendored" | "oversized" | "read_error" | "omitted";
1268
+ hash?: string | undefined;
1269
+ bytes?: number | undefined;
1270
+ reason?: string | undefined;
1271
+ }[];
1272
+ omissions: {
1273
+ path: string;
1274
+ reason: string;
1275
+ hash?: string | undefined;
1276
+ replacement?: "map" | "none" | "summary" | "index" | undefined;
1277
+ }[];
1278
+ evidence_refs: string[];
1279
+ creatable_roots?: string[] | undefined;
1280
+ } | null | undefined;
874
1281
  extra?: Record<string, unknown> | undefined;
875
1282
  }>;
876
1283
  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
1284
  /**
921
1285
  * One multiple-choice option of an interactive question (AskUserQuestion-style).
922
1286
  */
@@ -1086,27 +1450,31 @@ export declare const InteractionAnswerSet: z.ZodObject<{
1086
1450
  export type InteractionAnswerSet = z.infer<typeof InteractionAnswerSet>;
1087
1451
  /** Normalized event emitted by every adapter (the SSOT of adapter output). */
1088
1452
  export declare const HarnessEvent: z.ZodObject<{
1089
- type: z.ZodEnum<["started", "thinking", "message", "tool_call", "tool_result", "interaction_requested", "file_change", "usage", "error", "completed"]>;
1453
+ type: z.ZodEnum<["started", "thinking", "message", "tool_call", "tool_result", "interaction_requested", "file_change", "patch_produced", "usage", "error", "status", "completed"]>;
1090
1454
  session_id: z.ZodString;
1091
1455
  ts: z.ZodString;
1092
1456
  text: z.ZodOptional<z.ZodString>;
1457
+ /**
1458
+ * True on the harness's TYPED final answer message — claude/cursor's
1459
+ * terminal `result` event, codex's last agent message finalized at
1460
+ * `turn.completed`. Narration (mid-run) messages never set it; consumers
1461
+ * take a final message VERBATIM as the answer instead of joining prose.
1462
+ */
1463
+ final: z.ZodOptional<z.ZodBoolean>;
1093
1464
  /** Typed tool info; set on `tool_call` and `tool_result` events. */
1094
1465
  tool: z.ZodOptional<z.ZodObject<{
1095
1466
  name: z.ZodString;
1096
1467
  kind: z.ZodDefault<z.ZodEnum<["web", "file", "command", "mcp", "search", "other"]>>;
1097
1468
  use_id: z.ZodOptional<z.ZodString>;
1098
- /** Redacted, bounded human-readable target (query/url/path/command). */
1099
1469
  target: z.ZodOptional<z.ZodString>;
1100
1470
  status: z.ZodOptional<z.ZodEnum<["ok", "error", "cancelled", "denied"]>>;
1101
- /** Redacted, bounded error detail for status=error results. */
1102
1471
  error_summary: z.ZodOptional<z.ZodString>;
1103
- /** Redacted, bounded content detail for results (success or failure). */
1104
1472
  content_summary: z.ZodOptional<z.ZodString>;
1105
1473
  exit_code: z.ZodOptional<z.ZodNumber>;
1106
1474
  }, "strip", z.ZodTypeAny, {
1107
- kind: "file" | "web" | "command" | "mcp" | "search" | "other";
1108
1475
  name: string;
1109
- status?: "ok" | "error" | "cancelled" | "denied" | undefined;
1476
+ kind: "web" | "file" | "command" | "mcp" | "search" | "other";
1477
+ status?: "cancelled" | "ok" | "error" | "denied" | undefined;
1110
1478
  use_id?: string | undefined;
1111
1479
  target?: string | undefined;
1112
1480
  error_summary?: string | undefined;
@@ -1114,8 +1482,8 @@ export declare const HarnessEvent: z.ZodObject<{
1114
1482
  exit_code?: number | undefined;
1115
1483
  }, {
1116
1484
  name: string;
1117
- status?: "ok" | "error" | "cancelled" | "denied" | undefined;
1118
- kind?: "file" | "web" | "command" | "mcp" | "search" | "other" | undefined;
1485
+ status?: "cancelled" | "ok" | "error" | "denied" | undefined;
1486
+ kind?: "web" | "file" | "command" | "mcp" | "search" | "other" | undefined;
1119
1487
  use_id?: string | undefined;
1120
1488
  target?: string | undefined;
1121
1489
  error_summary?: string | undefined;
@@ -1189,6 +1557,44 @@ export declare const HarnessEvent: z.ZodObject<{
1189
1557
  }[] | undefined;
1190
1558
  source_tool?: string | null | undefined;
1191
1559
  }>>;
1560
+ patch_envelope: z.ZodOptional<z.ZodObject<{
1561
+ schema_version: z.ZodLiteral<1>;
1562
+ context_packet_hash: z.ZodString;
1563
+ base_tree_sha: z.ZodString;
1564
+ patch: z.ZodString;
1565
+ patch_hash: z.ZodString;
1566
+ touched_paths: z.ZodArray<z.ZodObject<{
1567
+ path: z.ZodString;
1568
+ expected_blob_oid: z.ZodNullable<z.ZodString>;
1569
+ }, "strip", z.ZodTypeAny, {
1570
+ path: string;
1571
+ expected_blob_oid: string | null;
1572
+ }, {
1573
+ path: string;
1574
+ expected_blob_oid: string | null;
1575
+ }>, "many">;
1576
+ }, "strip", z.ZodTypeAny, {
1577
+ schema_version: 1;
1578
+ base_tree_sha: string;
1579
+ context_packet_hash: string;
1580
+ patch: string;
1581
+ patch_hash: string;
1582
+ touched_paths: {
1583
+ path: string;
1584
+ expected_blob_oid: string | null;
1585
+ }[];
1586
+ }, {
1587
+ schema_version: 1;
1588
+ base_tree_sha: string;
1589
+ context_packet_hash: string;
1590
+ patch: string;
1591
+ patch_hash: string;
1592
+ touched_paths: {
1593
+ path: string;
1594
+ expected_blob_oid: string | null;
1595
+ }[];
1596
+ }>>;
1597
+ refusal_code: z.ZodOptional<z.ZodEnum<["raw_patch_requires_isolation", "raw_patch_missing_evidence", "raw_patch_digest_mismatch", "raw_patch_base_mismatch", "raw_patch_path_traversal", "raw_patch_outside_scope", "raw_patch_stale_preimage", "raw_patch_binary_unsupported", "raw_patch_sensitive_content", "raw_patch_truncated", "raw_patch_apply_failed"]>>;
1192
1598
  usage: z.ZodOptional<z.ZodObject<{
1193
1599
  input_tokens: z.ZodOptional<z.ZodNumber>;
1194
1600
  output_tokens: z.ZodOptional<z.ZodNumber>;
@@ -1197,38 +1603,76 @@ export declare const HarnessEvent: z.ZodObject<{
1197
1603
  /** True when cost_usd is derived from token pricing (not natively reported). */
1198
1604
  estimated: z.ZodOptional<z.ZodBoolean>;
1199
1605
  }, "strip", z.ZodTypeAny, {
1606
+ estimated?: boolean | undefined;
1200
1607
  input_tokens?: number | undefined;
1201
1608
  output_tokens?: number | undefined;
1202
1609
  cached_input_tokens?: number | undefined;
1203
1610
  cost_usd?: number | undefined;
1204
- estimated?: boolean | undefined;
1205
1611
  }, {
1612
+ estimated?: boolean | undefined;
1206
1613
  input_tokens?: number | undefined;
1207
1614
  output_tokens?: number | undefined;
1208
1615
  cached_input_tokens?: number | undefined;
1209
1616
  cost_usd?: number | undefined;
1210
- estimated?: boolean | undefined;
1211
1617
  }>>;
1212
1618
  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
- */
1619
+ credential_route: z.ZodOptional<z.ZodEnum<["vendor_native", "managed_api_key", "local"]>>;
1620
+ credential_source: z.ZodOptional<z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>>;
1621
+ /** Credential profile the attempt runs under (INV-135); stamped by the
1622
+ * adapter alongside credential_route so quota/api_retry records stay
1623
+ * independently attributable to the profile. Absent = engine default. */
1624
+ credential_profile_id: z.ZodOptional<z.ZodString>;
1625
+ /** Vendor-owned quota windows. All reported windows remain independent. */
1221
1626
  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;
1627
+ source: z.ZodEnum<["codex_app_server", "codex_rollout", "claude_statusline", "claude_api_retry", "claude_oauth_usage"]>;
1628
+ plan_label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1629
+ subject_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1630
+ constraints: z.ZodArray<z.ZodObject<{
1631
+ id: z.ZodString;
1632
+ label: z.ZodString;
1633
+ used_ratio: z.ZodNullable<z.ZodNumber>;
1634
+ window_seconds: z.ZodNullable<z.ZodNumber>;
1635
+ resets_at: z.ZodNullable<z.ZodString>;
1636
+ cooldown_until: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1637
+ }, "strict", z.ZodTypeAny, {
1638
+ id: string;
1639
+ label: string;
1640
+ used_ratio: number | null;
1641
+ window_seconds: number | null;
1642
+ resets_at: string | null;
1643
+ cooldown_until: string | null;
1644
+ }, {
1645
+ id: string;
1646
+ label: string;
1647
+ used_ratio: number | null;
1648
+ window_seconds: number | null;
1649
+ resets_at: string | null;
1650
+ cooldown_until?: string | null | undefined;
1651
+ }>, "many">;
1652
+ }, "strict", z.ZodTypeAny, {
1653
+ source: "codex_app_server" | "codex_rollout" | "claude_statusline" | "claude_api_retry" | "claude_oauth_usage";
1654
+ plan_label: string | null;
1655
+ subject_id: string | null;
1656
+ constraints: {
1657
+ id: string;
1658
+ label: string;
1659
+ used_ratio: number | null;
1660
+ window_seconds: number | null;
1661
+ resets_at: string | null;
1662
+ cooldown_until: string | null;
1663
+ }[];
1229
1664
  }, {
1230
- used_percent: number;
1231
- resets_at?: string | null | undefined;
1665
+ source: "codex_app_server" | "codex_rollout" | "claude_statusline" | "claude_api_retry" | "claude_oauth_usage";
1666
+ constraints: {
1667
+ id: string;
1668
+ label: string;
1669
+ used_ratio: number | null;
1670
+ window_seconds: number | null;
1671
+ resets_at: string | null;
1672
+ cooldown_until?: string | null | undefined;
1673
+ }[];
1674
+ plan_label?: string | null | undefined;
1675
+ subject_id?: string | null | undefined;
1232
1676
  }>>;
1233
1677
  /**
1234
1678
  * Typed live plan/todo progress: adapters map their native plan tools
@@ -1280,6 +1724,33 @@ export declare const HarnessEvent: z.ZodObject<{
1280
1724
  resets_at?: string | null | undefined;
1281
1725
  retry_delay_ms?: number | null | undefined;
1282
1726
  }>>;
1727
+ /**
1728
+ * Typed transient-status detail; set on `status` events. Today's only kind
1729
+ * is claude's native `api_retry` (the CLI is retrying an API call by
1730
+ * itself): the adapter maps the official fields through instead of
1731
+ * fabricating a thinking block, so retries land in the activity feed —
1732
+ * never in the reasoning disclosure. `error_category` passes the vendor's
1733
+ * own label (e.g. rate_limit, overloaded) verbatim as disclosed evidence.
1734
+ */
1735
+ status: z.ZodOptional<z.ZodObject<{
1736
+ kind: z.ZodEnum<["api_retry"]>;
1737
+ attempt: z.ZodOptional<z.ZodNumber>;
1738
+ max_retries: z.ZodOptional<z.ZodNumber>;
1739
+ retry_delay_ms: z.ZodOptional<z.ZodNumber>;
1740
+ error_category: z.ZodOptional<z.ZodEnum<["authentication_failed", "oauth_org_not_allowed", "billing_error", "rate_limit", "overloaded", "invalid_request", "model_not_found", "server_error", "max_output_tokens", "unknown"]>>;
1741
+ }, "strip", z.ZodTypeAny, {
1742
+ kind: "api_retry";
1743
+ retry_delay_ms?: number | undefined;
1744
+ attempt?: number | undefined;
1745
+ max_retries?: number | undefined;
1746
+ error_category?: "unknown" | "rate_limit" | "authentication_failed" | "oauth_org_not_allowed" | "billing_error" | "overloaded" | "invalid_request" | "model_not_found" | "server_error" | "max_output_tokens" | undefined;
1747
+ }, {
1748
+ kind: "api_retry";
1749
+ retry_delay_ms?: number | undefined;
1750
+ attempt?: number | undefined;
1751
+ max_retries?: number | undefined;
1752
+ error_category?: "unknown" | "rate_limit" | "authentication_failed" | "oauth_org_not_allowed" | "billing_error" | "overloaded" | "invalid_request" | "model_not_found" | "server_error" | "max_output_tokens" | undefined;
1753
+ }>>;
1283
1754
  /**
1284
1755
  * Typed transient-failure signal. Adapters set this from native CLI/API error
1285
1756
  * shapes in their parse layer; the orchestrator consumes it for bounded retry
@@ -1296,24 +1767,35 @@ export declare const HarnessEvent: z.ZodObject<{
1296
1767
  retry_delay_ms?: number | null | undefined;
1297
1768
  }>>;
1298
1769
  error: z.ZodOptional<z.ZodString>;
1770
+ aborted: z.ZodOptional<z.ZodBoolean>;
1299
1771
  payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1300
1772
  }, "strip", z.ZodTypeAny, {
1301
- type: "message" | "error" | "started" | "thinking" | "tool_call" | "tool_result" | "interaction_requested" | "file_change" | "usage" | "completed";
1773
+ type: "message" | "status" | "completed" | "error" | "started" | "thinking" | "tool_call" | "tool_result" | "interaction_requested" | "file_change" | "patch_produced" | "usage";
1302
1774
  session_id: string;
1303
1775
  ts: string;
1776
+ aborted?: boolean | undefined;
1777
+ status?: {
1778
+ kind: "api_retry";
1779
+ retry_delay_ms?: number | undefined;
1780
+ attempt?: number | undefined;
1781
+ max_retries?: number | undefined;
1782
+ error_category?: "unknown" | "rate_limit" | "authentication_failed" | "oauth_org_not_allowed" | "billing_error" | "overloaded" | "invalid_request" | "model_not_found" | "server_error" | "max_output_tokens" | undefined;
1783
+ } | undefined;
1304
1784
  error?: string | undefined;
1785
+ credential_route?: "local" | "vendor_native" | "managed_api_key" | undefined;
1305
1786
  usage?: {
1787
+ estimated?: boolean | undefined;
1306
1788
  input_tokens?: number | undefined;
1307
1789
  output_tokens?: number | undefined;
1308
1790
  cached_input_tokens?: number | undefined;
1309
1791
  cost_usd?: number | undefined;
1310
- estimated?: boolean | undefined;
1311
1792
  } | undefined;
1312
1793
  text?: string | undefined;
1794
+ final?: boolean | undefined;
1313
1795
  tool?: {
1314
- kind: "file" | "web" | "command" | "mcp" | "search" | "other";
1315
1796
  name: string;
1316
- status?: "ok" | "error" | "cancelled" | "denied" | undefined;
1797
+ kind: "web" | "file" | "command" | "mcp" | "search" | "other";
1798
+ status?: "cancelled" | "ok" | "error" | "denied" | undefined;
1317
1799
  use_id?: string | undefined;
1318
1800
  target?: string | undefined;
1319
1801
  error_summary?: string | undefined;
@@ -1334,10 +1816,33 @@ export declare const HarnessEvent: z.ZodObject<{
1334
1816
  }[];
1335
1817
  source_tool: string | null;
1336
1818
  } | undefined;
1819
+ patch_envelope?: {
1820
+ schema_version: 1;
1821
+ base_tree_sha: string;
1822
+ context_packet_hash: string;
1823
+ patch: string;
1824
+ patch_hash: string;
1825
+ touched_paths: {
1826
+ path: string;
1827
+ expected_blob_oid: string | null;
1828
+ }[];
1829
+ } | undefined;
1830
+ refusal_code?: "raw_patch_requires_isolation" | "raw_patch_missing_evidence" | "raw_patch_digest_mismatch" | "raw_patch_base_mismatch" | "raw_patch_path_traversal" | "raw_patch_outside_scope" | "raw_patch_stale_preimage" | "raw_patch_binary_unsupported" | "raw_patch_sensitive_content" | "raw_patch_truncated" | "raw_patch_apply_failed" | undefined;
1337
1831
  observed_model?: string | undefined;
1832
+ credential_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | undefined;
1833
+ credential_profile_id?: string | undefined;
1338
1834
  quota?: {
1339
- used_percent: number;
1340
- resets_at: string | null;
1835
+ source: "codex_app_server" | "codex_rollout" | "claude_statusline" | "claude_api_retry" | "claude_oauth_usage";
1836
+ plan_label: string | null;
1837
+ subject_id: string | null;
1838
+ constraints: {
1839
+ id: string;
1840
+ label: string;
1841
+ used_ratio: number | null;
1842
+ window_seconds: number | null;
1843
+ resets_at: string | null;
1844
+ cooldown_until: string | null;
1845
+ }[];
1341
1846
  } | undefined;
1342
1847
  plan_progress?: {
1343
1848
  items: {
@@ -1356,22 +1861,32 @@ export declare const HarnessEvent: z.ZodObject<{
1356
1861
  } | undefined;
1357
1862
  payload?: Record<string, unknown> | undefined;
1358
1863
  }, {
1359
- type: "message" | "error" | "started" | "thinking" | "tool_call" | "tool_result" | "interaction_requested" | "file_change" | "usage" | "completed";
1864
+ type: "message" | "status" | "completed" | "error" | "started" | "thinking" | "tool_call" | "tool_result" | "interaction_requested" | "file_change" | "patch_produced" | "usage";
1360
1865
  session_id: string;
1361
1866
  ts: string;
1867
+ aborted?: boolean | undefined;
1868
+ status?: {
1869
+ kind: "api_retry";
1870
+ retry_delay_ms?: number | undefined;
1871
+ attempt?: number | undefined;
1872
+ max_retries?: number | undefined;
1873
+ error_category?: "unknown" | "rate_limit" | "authentication_failed" | "oauth_org_not_allowed" | "billing_error" | "overloaded" | "invalid_request" | "model_not_found" | "server_error" | "max_output_tokens" | undefined;
1874
+ } | undefined;
1362
1875
  error?: string | undefined;
1876
+ credential_route?: "local" | "vendor_native" | "managed_api_key" | undefined;
1363
1877
  usage?: {
1878
+ estimated?: boolean | undefined;
1364
1879
  input_tokens?: number | undefined;
1365
1880
  output_tokens?: number | undefined;
1366
1881
  cached_input_tokens?: number | undefined;
1367
1882
  cost_usd?: number | undefined;
1368
- estimated?: boolean | undefined;
1369
1883
  } | undefined;
1370
1884
  text?: string | undefined;
1885
+ final?: boolean | undefined;
1371
1886
  tool?: {
1372
1887
  name: string;
1373
- status?: "ok" | "error" | "cancelled" | "denied" | undefined;
1374
- kind?: "file" | "web" | "command" | "mcp" | "search" | "other" | undefined;
1888
+ status?: "cancelled" | "ok" | "error" | "denied" | undefined;
1889
+ kind?: "web" | "file" | "command" | "mcp" | "search" | "other" | undefined;
1375
1890
  use_id?: string | undefined;
1376
1891
  target?: string | undefined;
1377
1892
  error_summary?: string | undefined;
@@ -1392,10 +1907,33 @@ export declare const HarnessEvent: z.ZodObject<{
1392
1907
  }[] | undefined;
1393
1908
  source_tool?: string | null | undefined;
1394
1909
  } | undefined;
1910
+ patch_envelope?: {
1911
+ schema_version: 1;
1912
+ base_tree_sha: string;
1913
+ context_packet_hash: string;
1914
+ patch: string;
1915
+ patch_hash: string;
1916
+ touched_paths: {
1917
+ path: string;
1918
+ expected_blob_oid: string | null;
1919
+ }[];
1920
+ } | undefined;
1921
+ refusal_code?: "raw_patch_requires_isolation" | "raw_patch_missing_evidence" | "raw_patch_digest_mismatch" | "raw_patch_base_mismatch" | "raw_patch_path_traversal" | "raw_patch_outside_scope" | "raw_patch_stale_preimage" | "raw_patch_binary_unsupported" | "raw_patch_sensitive_content" | "raw_patch_truncated" | "raw_patch_apply_failed" | undefined;
1395
1922
  observed_model?: string | undefined;
1923
+ credential_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | undefined;
1924
+ credential_profile_id?: string | undefined;
1396
1925
  quota?: {
1397
- used_percent: number;
1398
- resets_at?: string | null | undefined;
1926
+ source: "codex_app_server" | "codex_rollout" | "claude_statusline" | "claude_api_retry" | "claude_oauth_usage";
1927
+ constraints: {
1928
+ id: string;
1929
+ label: string;
1930
+ used_ratio: number | null;
1931
+ window_seconds: number | null;
1932
+ resets_at: string | null;
1933
+ cooldown_until?: string | null | undefined;
1934
+ }[];
1935
+ plan_label?: string | null | undefined;
1936
+ subject_id?: string | null | undefined;
1399
1937
  } | undefined;
1400
1938
  plan_progress?: {
1401
1939
  items?: {