@claudexor/schema 1.0.0 → 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (248) hide show
  1. package/dist/agent-capabilities.d.ts +88 -16
  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 +113 -48
  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 +1423 -0
  13. package/dist/auth.d.ts.map +1 -0
  14. package/dist/auth.js +317 -0
  15. package/dist/auth.js.map +1 -0
  16. package/dist/budget.d.ts +133 -16
  17. package/dist/budget.d.ts.map +1 -1
  18. package/dist/budget.js +65 -22
  19. package/dist/budget.js.map +1 -1
  20. package/dist/config.d.ts +449 -115
  21. package/dist/config.d.ts.map +1 -1
  22. package/dist/config.js +114 -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-operation-responses.d.ts +1172 -0
  29. package/dist/control-operation-responses.d.ts.map +1 -0
  30. package/dist/control-operation-responses.js +35 -0
  31. package/dist/control-operation-responses.js.map +1 -0
  32. package/dist/control-run-detail.d.ts +443 -242
  33. package/dist/control-run-detail.d.ts.map +1 -1
  34. package/dist/control-run-detail.js +72 -17
  35. package/dist/control-run-detail.js.map +1 -1
  36. package/dist/control-run-retry.d.ts +88 -0
  37. package/dist/control-run-retry.d.ts.map +1 -0
  38. package/dist/control-run-retry.js +40 -0
  39. package/dist/control-run-retry.js.map +1 -0
  40. package/dist/control-run-scope.d.ts +25 -0
  41. package/dist/control-run-scope.d.ts.map +1 -0
  42. package/dist/control-run-scope.js +22 -0
  43. package/dist/control-run-scope.js.map +1 -0
  44. package/dist/control-secret.d.ts +90 -0
  45. package/dist/control-secret.d.ts.map +1 -0
  46. package/dist/control-secret.js +35 -0
  47. package/dist/control-secret.js.map +1 -0
  48. package/dist/control-spec.d.ts +592 -0
  49. package/dist/control-spec.d.ts.map +1 -0
  50. package/dist/control-spec.js +85 -0
  51. package/dist/control-spec.js.map +1 -0
  52. package/dist/control-thread-apply.d.ts +175 -0
  53. package/dist/control-thread-apply.d.ts.map +1 -0
  54. package/dist/control-thread-apply.js +31 -0
  55. package/dist/control-thread-apply.js.map +1 -0
  56. package/dist/control-trust.d.ts +74 -10
  57. package/dist/control-trust.d.ts.map +1 -1
  58. package/dist/control-trust.js +31 -11
  59. package/dist/control-trust.js.map +1 -1
  60. package/dist/control.d.ts +1391 -878
  61. package/dist/control.d.ts.map +1 -1
  62. package/dist/control.js +468 -310
  63. package/dist/control.js.map +1 -1
  64. package/dist/decision.d.ts +10 -10
  65. package/dist/decision.d.ts.map +1 -1
  66. package/dist/decision.js +62 -15
  67. package/dist/decision.js.map +1 -1
  68. package/dist/delivery.d.ts +99 -0
  69. package/dist/delivery.d.ts.map +1 -0
  70. package/dist/delivery.js +19 -0
  71. package/dist/delivery.js.map +1 -0
  72. package/dist/events.d.ts +25 -2
  73. package/dist/events.d.ts.map +1 -1
  74. package/dist/events.js +25 -4
  75. package/dist/events.js.map +1 -1
  76. package/dist/gate.d.ts +2 -2
  77. package/dist/gate.d.ts.map +1 -1
  78. package/dist/gate.js +25 -5
  79. package/dist/gate.js.map +1 -1
  80. package/dist/harness.d.ts +558 -175
  81. package/dist/harness.d.ts.map +1 -1
  82. package/dist/harness.js +207 -82
  83. package/dist/harness.js.map +1 -1
  84. package/dist/index.d.ts +15 -0
  85. package/dist/index.d.ts.map +1 -1
  86. package/dist/index.js +15 -0
  87. package/dist/index.js.map +1 -1
  88. package/dist/operation.d.ts +185 -0
  89. package/dist/operation.d.ts.map +1 -0
  90. package/dist/operation.js +50 -0
  91. package/dist/operation.js.map +1 -0
  92. package/dist/orchestrate.d.ts +127 -22
  93. package/dist/orchestrate.d.ts.map +1 -1
  94. package/dist/orchestrate.js +61 -7
  95. package/dist/orchestrate.js.map +1 -1
  96. package/dist/primitives.d.ts.map +1 -1
  97. package/dist/primitives.js +4 -1
  98. package/dist/primitives.js.map +1 -1
  99. package/dist/problem.d.ts +29 -0
  100. package/dist/problem.d.ts.map +1 -0
  101. package/dist/problem.js +17 -0
  102. package/dist/problem.js.map +1 -0
  103. package/dist/project.d.ts +97 -0
  104. package/dist/project.d.ts.map +1 -0
  105. package/dist/project.js +27 -0
  106. package/dist/project.js.map +1 -0
  107. package/dist/quota.d.ts +251 -0
  108. package/dist/quota.d.ts.map +1 -0
  109. package/dist/quota.js +46 -0
  110. package/dist/quota.js.map +1 -0
  111. package/dist/raw.d.ts +195 -0
  112. package/dist/raw.d.ts.map +1 -0
  113. package/dist/raw.js +58 -0
  114. package/dist/raw.js.map +1 -0
  115. package/dist/recovery.d.ts +515 -0
  116. package/dist/recovery.d.ts.map +1 -0
  117. package/dist/recovery.js +93 -0
  118. package/dist/recovery.js.map +1 -0
  119. package/dist/request-requirements.d.ts +36 -0
  120. package/dist/request-requirements.d.ts.map +1 -0
  121. package/dist/request-requirements.js +26 -0
  122. package/dist/request-requirements.js.map +1 -0
  123. package/dist/review.d.ts +26 -26
  124. package/dist/review.d.ts.map +1 -1
  125. package/dist/review.js +50 -10
  126. package/dist/review.js.map +1 -1
  127. package/dist/route.d.ts +10 -10
  128. package/dist/route.d.ts.map +1 -1
  129. package/dist/route.js +19 -4
  130. package/dist/route.js.map +1 -1
  131. package/dist/setup.d.ts +9766 -0
  132. package/dist/setup.d.ts.map +1 -0
  133. package/dist/setup.js +450 -0
  134. package/dist/setup.js.map +1 -0
  135. package/dist/spec.d.ts +174 -57
  136. package/dist/spec.d.ts.map +1 -1
  137. package/dist/spec.js +69 -16
  138. package/dist/spec.js.map +1 -1
  139. package/dist/surface-run-controls.d.ts.map +1 -1
  140. package/dist/surface-run-controls.js +25 -21
  141. package/dist/surface-run-controls.js.map +1 -1
  142. package/dist/task.d.ts +1560 -58
  143. package/dist/task.d.ts.map +1 -1
  144. package/dist/task.js +97 -18
  145. package/dist/task.js.map +1 -1
  146. package/dist/telemetry.d.ts +233 -60
  147. package/dist/telemetry.d.ts.map +1 -1
  148. package/dist/telemetry.js +97 -15
  149. package/dist/telemetry.js.map +1 -1
  150. package/dist/thread.d.ts +68 -41
  151. package/dist/thread.d.ts.map +1 -1
  152. package/dist/thread.js +45 -11
  153. package/dist/thread.js.map +1 -1
  154. package/dist/workproduct.d.ts +3 -3
  155. package/dist/workproduct.d.ts.map +1 -1
  156. package/dist/workproduct.js.map +1 -1
  157. package/dist/workspace.d.ts +1 -1
  158. package/dist/workspace.d.ts.map +1 -1
  159. package/dist/workspace.js +12 -3
  160. package/dist/workspace.js.map +1 -1
  161. package/generated/AgentCapabilityCatalog.schema.json +53 -11
  162. package/generated/BudgetLease.schema.json +55 -6
  163. package/generated/BudgetObservation.schema.json +28 -7
  164. package/generated/ConformanceReport.schema.json +49 -0
  165. package/generated/ControlApplyCheckResponse.schema.json +34 -0
  166. package/generated/ControlArtifactListResponse.schema.json +57 -0
  167. package/generated/ControlAuthReadinessRefreshRequest.schema.json +38 -0
  168. package/generated/ControlAuthReadinessRefreshResponse.schema.json +85 -0
  169. package/generated/ControlDeliveryResponse.schema.json +136 -0
  170. package/generated/ControlHandshakeRequest.schema.json +26 -0
  171. package/generated/ControlHandshakeResponse.schema.json +30 -0
  172. package/generated/ControlHarnessListResponse.schema.json +103 -12
  173. package/generated/ControlHarnessSettingsPatch.schema.json +0 -12
  174. package/generated/ControlJournalEvent.schema.json +42 -0
  175. package/generated/ControlJournalExportReceipt.schema.json +49 -0
  176. package/generated/ControlJournalInspection.schema.json +149 -0
  177. package/generated/ControlJournalQuarantineReceipt.schema.json +55 -0
  178. package/generated/ControlJournalQuarantineRequest.schema.json +24 -0
  179. package/generated/ControlJournalValidation.schema.json +181 -0
  180. package/generated/ControlOperationCatalog.schema.json +128 -0
  181. package/generated/ControlOperationDescriptor.schema.json +110 -0
  182. package/generated/ControlProblem.schema.json +59 -0
  183. package/generated/ControlProject.schema.json +42 -0
  184. package/generated/ControlProjectListResponse.schema.json +54 -0
  185. package/generated/ControlProjectRegisterRequest.schema.json +19 -0
  186. package/generated/ControlProjectRelinkRequest.schema.json +19 -0
  187. package/generated/ControlQueuedRunInfo.schema.json +4 -2
  188. package/generated/ControlQuotaResponse.schema.json +176 -0
  189. package/generated/ControlResource.schema.json +59 -0
  190. package/generated/ControlRunAgainDraft.schema.json +499 -0
  191. package/generated/ControlRunDetail.schema.json +197 -30
  192. package/generated/ControlRunListResponse.schema.json +797 -0
  193. package/generated/ControlRunRetryResponse.schema.json +54 -0
  194. package/generated/ControlRunStartRequest.schema.json +83 -55
  195. package/generated/ControlRunStartResponse.schema.json +78 -0
  196. package/generated/ControlRunSummary.schema.json +140 -20
  197. package/generated/ControlSecretListResponse.schema.json +8 -14
  198. package/generated/ControlSecretMutationResponse.schema.json +32 -0
  199. package/generated/ControlSecretSetRequest.schema.json +27 -0
  200. package/generated/ControlSettingsSnapshot.schema.json +118 -44
  201. package/generated/ControlSettingsUpdateRequest.schema.json +110 -40
  202. package/generated/ControlSetupJob.schema.json +763 -65
  203. package/generated/ControlSetupJobCreateRequest.schema.json +11 -13
  204. package/generated/ControlSetupJobEvent.schema.json +861 -5
  205. package/generated/ControlSetupJobListFilter.schema.json +35 -0
  206. package/generated/ControlSetupJobListResponse.schema.json +763 -65
  207. package/generated/ControlSetupJobSnapshot.schema.json +870 -0
  208. package/generated/ControlSpecAnswersRequest.schema.json +74 -0
  209. package/generated/ControlSpecQuestionsRequest.schema.json +128 -2
  210. package/generated/ControlSpecSession.schema.json +249 -0
  211. package/generated/ControlSpecSessionListResponse.schema.json +261 -0
  212. package/generated/ControlThread.schema.json +20 -2
  213. package/generated/ControlThreadApplyResponse.schema.json +139 -0
  214. package/generated/ControlThreadDetail.schema.json +32 -4
  215. package/generated/ControlThreadListResponse.schema.json +20 -2
  216. package/generated/ControlThreadTurnRequest.schema.json +373 -0
  217. package/generated/ControlThreadTurnResponse.schema.json +73 -0
  218. package/generated/ControlThreadUpdateRequest.schema.json +1 -1
  219. package/generated/ControlTrustListResponse.schema.json +6 -0
  220. package/generated/ControlTrustState.schema.json +6 -0
  221. package/generated/ControlTrustUpdateRequest.schema.json +65 -3
  222. package/generated/ControlUploadCreateRequest.schema.json +37 -0
  223. package/generated/ControlUploadFinalizeRequest.schema.json +17 -0
  224. package/generated/ControlUploadStatus.schema.json +40 -0
  225. package/generated/DecisionRecord.schema.json +6 -3
  226. package/generated/GlobalConfig.schema.json +105 -58
  227. package/generated/HarnessEvent.schema.json +201 -10
  228. package/generated/HarnessManifest.schema.json +63 -12
  229. package/generated/HarnessStatusDto.schema.json +103 -12
  230. package/generated/OrchestrateContract.schema.json +32 -6
  231. package/generated/OrchestratePlan.schema.json +20 -0
  232. package/generated/OrchestratePlanProgress.schema.json +61 -0
  233. package/generated/PaidBudget.schema.json +42 -0
  234. package/generated/Project.schema.json +45 -0
  235. package/generated/ProjectConfig.schema.json +45 -18
  236. package/generated/RawContextPacket.schema.json +184 -0
  237. package/generated/RawGitPatchEnvelope.schema.json +70 -0
  238. package/generated/RunTelemetry.schema.json +80 -0
  239. package/generated/SecretMetadata.schema.json +4 -7
  240. package/generated/SpecPack.schema.json +118 -7
  241. package/generated/TaskContract.schema.json +159 -26
  242. package/generated/TestCommandInvocation.schema.json +45 -0
  243. package/generated/Thread.schema.json +62 -6
  244. package/generated/ThreadTurn.schema.json +24 -11
  245. package/generated/TrustConfig.schema.json +77 -0
  246. package/package.json +1 -1
  247. package/generated/ControlSetupJobConfirmRequest.schema.json +0 -18
  248. 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`). */
@@ -103,6 +104,7 @@ export declare const HarnessCapabilities: z.ZodObject<{
103
104
  review: boolean;
104
105
  verify: boolean;
105
106
  synthesize: boolean;
107
+ implementation_transport: "workspace" | "git_patch_envelope";
106
108
  read_files: boolean;
107
109
  browser_tool: boolean;
108
110
  web_policy: "none" | "native" | "tools" | "uncontrolled";
@@ -121,6 +123,7 @@ export declare const HarnessCapabilities: z.ZodObject<{
121
123
  review?: boolean | undefined;
122
124
  verify?: boolean | undefined;
123
125
  synthesize?: boolean | undefined;
126
+ implementation_transport?: "workspace" | "git_patch_envelope" | undefined;
124
127
  read_files?: boolean | undefined;
125
128
  browser_tool?: boolean | undefined;
126
129
  web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
@@ -133,56 +136,54 @@ export declare const HarnessCapabilities: z.ZodObject<{
133
136
  known_models_verified_against?: string | null | undefined;
134
137
  }>;
135
138
  export type HarnessCapabilities = z.infer<typeof HarnessCapabilities>;
136
- export declare const AuthSourceKind: z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
137
- export type AuthSourceKind = z.infer<typeof AuthSourceKind>;
138
139
  export declare const CredentialTransportKind: z.ZodEnum<["config_file", "env_var", "oauth_token_env", "os_keychain", "http_header", "none"]>;
139
140
  export type CredentialTransportKind = z.infer<typeof CredentialTransportKind>;
140
141
  export declare const CredentialRelocation: z.ZodEnum<["HOME", "CONFIG_DIR", "ENV", "none"]>;
141
142
  export type CredentialRelocation = z.infer<typeof CredentialRelocation>;
142
143
  export declare const CredentialTransport: z.ZodObject<{
143
- source: z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
144
+ source: z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
144
145
  kind: z.ZodEnum<["config_file", "env_var", "oauth_token_env", "os_keychain", "http_header", "none"]>;
145
146
  relocatable_by: z.ZodDefault<z.ZodArray<z.ZodEnum<["HOME", "CONFIG_DIR", "ENV", "none"]>, "many">>;
146
147
  }, "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";
148
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
149
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
149
150
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
150
151
  }, {
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";
152
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
153
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
153
154
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
154
155
  }>;
155
156
  export type CredentialTransport = z.infer<typeof CredentialTransport>;
156
157
  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"]>>>;
158
+ supported_sources: z.ZodDefault<z.ZodArray<z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>, "many">>;
159
+ preferred_source: z.ZodDefault<z.ZodNullable<z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>>>;
159
160
  credential_transports: z.ZodDefault<z.ZodArray<z.ZodObject<{
160
- source: z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
161
+ source: z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
161
162
  kind: z.ZodEnum<["config_file", "env_var", "oauth_token_env", "os_keychain", "http_header", "none"]>;
162
163
  relocatable_by: z.ZodDefault<z.ZodArray<z.ZodEnum<["HOME", "CONFIG_DIR", "ENV", "none"]>, "many">>;
163
164
  }, "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";
165
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
166
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
166
167
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
167
168
  }, {
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";
169
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
170
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
170
171
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
171
172
  }>, "many">>;
172
173
  }, "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;
174
+ supported_sources: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[];
175
+ preferred_source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
175
176
  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";
177
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
178
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
178
179
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
179
180
  }[];
180
181
  }, {
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;
182
+ supported_sources?: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[] | undefined;
183
+ preferred_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
183
184
  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";
185
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
186
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
186
187
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
187
188
  }[] | undefined;
188
189
  }>>;
@@ -217,35 +218,35 @@ export type AccessControlCapabilities = z.infer<typeof AccessControlCapabilities
217
218
  */
218
219
  export declare const HarnessCapabilityProfile: z.ZodDefault<z.ZodObject<{
219
220
  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"]>>>;
221
+ supported_sources: z.ZodDefault<z.ZodArray<z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>, "many">>;
222
+ preferred_source: z.ZodDefault<z.ZodNullable<z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>>>;
222
223
  credential_transports: z.ZodDefault<z.ZodArray<z.ZodObject<{
223
- source: z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
224
+ source: z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
224
225
  kind: z.ZodEnum<["config_file", "env_var", "oauth_token_env", "os_keychain", "http_header", "none"]>;
225
226
  relocatable_by: z.ZodDefault<z.ZodArray<z.ZodEnum<["HOME", "CONFIG_DIR", "ENV", "none"]>, "many">>;
226
227
  }, "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";
228
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
229
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
229
230
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
230
231
  }, {
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";
232
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
233
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
233
234
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
234
235
  }>, "many">>;
235
236
  }, "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;
237
+ supported_sources: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[];
238
+ preferred_source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
238
239
  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";
240
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
241
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
241
242
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
242
243
  }[];
243
244
  }, {
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;
245
+ supported_sources?: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[] | undefined;
246
+ preferred_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
246
247
  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";
248
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
249
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
249
250
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
250
251
  }[] | undefined;
251
252
  }>>;
@@ -263,16 +264,33 @@ export declare const HarnessCapabilityProfile: z.ZodDefault<z.ZodObject<{
263
264
  }, {
264
265
  supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
265
266
  }>>;
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"]>>;
267
+ /** Every accepted media class has a finite MIME/size/count/transport declaration. */
268
+ attachment_inputs: z.ZodDefault<z.ZodArray<z.ZodObject<{
269
+ kind: z.ZodEnum<["image", "file"]>;
270
+ mime_types: z.ZodArray<z.ZodString, "many">;
271
+ max_bytes: z.ZodNumber;
272
+ max_count: z.ZodNumber;
273
+ transport: z.ZodEnum<["file_path", "base64_stream", "base64_inline", "text_inline"]>;
274
+ }, "strict", z.ZodTypeAny, {
275
+ kind: "image" | "file";
276
+ mime_types: string[];
277
+ max_bytes: number;
278
+ max_count: number;
279
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
280
+ }, {
281
+ kind: "image" | "file";
282
+ mime_types: string[];
283
+ max_bytes: number;
284
+ max_count: number;
285
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
286
+ }>, "many">>;
269
287
  }, "strip", z.ZodTypeAny, {
270
288
  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;
289
+ supported_sources: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[];
290
+ preferred_source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
273
291
  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";
292
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
293
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
276
294
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
277
295
  }[];
278
296
  };
@@ -282,14 +300,20 @@ export declare const HarnessCapabilityProfile: z.ZodDefault<z.ZodObject<{
282
300
  isolation: {
283
301
  supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
284
302
  };
285
- image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
303
+ attachment_inputs: {
304
+ kind: "image" | "file";
305
+ mime_types: string[];
306
+ max_bytes: number;
307
+ max_count: number;
308
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
309
+ }[];
286
310
  }, {
287
311
  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;
312
+ supported_sources?: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[] | undefined;
313
+ preferred_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
290
314
  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";
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";
293
317
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
294
318
  }[] | undefined;
295
319
  } | undefined;
@@ -299,7 +323,13 @@ export declare const HarnessCapabilityProfile: z.ZodDefault<z.ZodObject<{
299
323
  isolation?: {
300
324
  supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
301
325
  } | undefined;
302
- image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
326
+ attachment_inputs?: {
327
+ kind: "image" | "file";
328
+ mime_types: string[];
329
+ max_bytes: number;
330
+ max_count: number;
331
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
332
+ }[] | undefined;
303
333
  }>>;
304
334
  export type HarnessCapabilityProfile = z.infer<typeof HarnessCapabilityProfile>;
305
335
  /**
@@ -331,35 +361,35 @@ export declare const HarnessManifest: z.ZodObject<{
331
361
  provider_family: z.ZodDefault<z.ZodEnum<["openai", "anthropic", "google", "cursor", "opencode", "xai", "local", "unknown"]>>;
332
362
  capability_profile: z.ZodDefault<z.ZodObject<{
333
363
  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"]>>>;
364
+ supported_sources: z.ZodDefault<z.ZodArray<z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>, "many">>;
365
+ preferred_source: z.ZodDefault<z.ZodNullable<z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>>>;
336
366
  credential_transports: z.ZodDefault<z.ZodArray<z.ZodObject<{
337
- source: z.ZodEnum<["native_session", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
367
+ source: z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
338
368
  kind: z.ZodEnum<["config_file", "env_var", "oauth_token_env", "os_keychain", "http_header", "none"]>;
339
369
  relocatable_by: z.ZodDefault<z.ZodArray<z.ZodEnum<["HOME", "CONFIG_DIR", "ENV", "none"]>, "many">>;
340
370
  }, "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";
371
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
372
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
343
373
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
344
374
  }, {
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";
375
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
376
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
347
377
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
348
378
  }>, "many">>;
349
379
  }, "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;
380
+ supported_sources: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[];
381
+ preferred_source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
352
382
  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";
383
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
384
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
355
385
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
356
386
  }[];
357
387
  }, {
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;
388
+ supported_sources?: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[] | undefined;
389
+ preferred_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
360
390
  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";
391
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
392
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
363
393
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
364
394
  }[] | undefined;
365
395
  }>>;
@@ -377,16 +407,33 @@ export declare const HarnessManifest: z.ZodObject<{
377
407
  }, {
378
408
  supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
379
409
  }>>;
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"]>>;
410
+ /** Every accepted media class has a finite MIME/size/count/transport declaration. */
411
+ attachment_inputs: z.ZodDefault<z.ZodArray<z.ZodObject<{
412
+ kind: z.ZodEnum<["image", "file"]>;
413
+ mime_types: z.ZodArray<z.ZodString, "many">;
414
+ max_bytes: z.ZodNumber;
415
+ max_count: z.ZodNumber;
416
+ transport: z.ZodEnum<["file_path", "base64_stream", "base64_inline", "text_inline"]>;
417
+ }, "strict", z.ZodTypeAny, {
418
+ kind: "image" | "file";
419
+ mime_types: string[];
420
+ max_bytes: number;
421
+ max_count: number;
422
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
423
+ }, {
424
+ kind: "image" | "file";
425
+ mime_types: string[];
426
+ max_bytes: number;
427
+ max_count: number;
428
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
429
+ }>, "many">>;
383
430
  }, "strip", z.ZodTypeAny, {
384
431
  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;
432
+ supported_sources: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[];
433
+ preferred_source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
387
434
  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";
435
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
436
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
390
437
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
391
438
  }[];
392
439
  };
@@ -396,14 +443,20 @@ export declare const HarnessManifest: z.ZodObject<{
396
443
  isolation: {
397
444
  supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
398
445
  };
399
- image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
446
+ attachment_inputs: {
447
+ kind: "image" | "file";
448
+ mime_types: string[];
449
+ max_bytes: number;
450
+ max_count: number;
451
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
452
+ }[];
400
453
  }, {
401
454
  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;
455
+ supported_sources?: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[] | undefined;
456
+ preferred_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
404
457
  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";
458
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
459
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
407
460
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
408
461
  }[] | undefined;
409
462
  } | undefined;
@@ -413,12 +466,19 @@ export declare const HarnessManifest: z.ZodObject<{
413
466
  isolation?: {
414
467
  supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
415
468
  } | undefined;
416
- image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
469
+ attachment_inputs?: {
470
+ kind: "image" | "file";
471
+ mime_types: string[];
472
+ max_bytes: number;
473
+ max_count: number;
474
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
475
+ }[] | undefined;
417
476
  }>>;
418
477
  /** Compatibility convenience fields. New routing/UI should prefer capability_profile. */
419
478
  capabilities: z.ZodObject<{
420
479
  plan: z.ZodDefault<z.ZodBoolean>;
421
480
  implement: z.ZodDefault<z.ZodBoolean>;
481
+ implementation_transport: z.ZodDefault<z.ZodEnum<["workspace", "git_patch_envelope"]>>;
422
482
  create_from_scratch: z.ZodDefault<z.ZodBoolean>;
423
483
  review: z.ZodDefault<z.ZodBoolean>;
424
484
  /** Consumed by the Phase-3 FinalVerifier routing (gating pushes `verify`). */
@@ -485,6 +545,7 @@ export declare const HarnessManifest: z.ZodObject<{
485
545
  review: boolean;
486
546
  verify: boolean;
487
547
  synthesize: boolean;
548
+ implementation_transport: "workspace" | "git_patch_envelope";
488
549
  read_files: boolean;
489
550
  browser_tool: boolean;
490
551
  web_policy: "none" | "native" | "tools" | "uncontrolled";
@@ -503,6 +564,7 @@ export declare const HarnessManifest: z.ZodObject<{
503
564
  review?: boolean | undefined;
504
565
  verify?: boolean | undefined;
505
566
  synthesize?: boolean | undefined;
567
+ implementation_transport?: "workspace" | "git_patch_envelope" | undefined;
506
568
  read_files?: boolean | undefined;
507
569
  browser_tool?: boolean | undefined;
508
570
  web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
@@ -517,17 +579,17 @@ export declare const HarnessManifest: z.ZodObject<{
517
579
  auth_modes: z.ZodDefault<z.ZodArray<z.ZodEnum<["local_session", "api_key", "none"]>, "many">>;
518
580
  access_profiles_supported: z.ZodDefault<z.ZodArray<z.ZodEnum<["readonly", "workspace_write", "full", "external_sandbox_full", "inherit_native"]>, "many">>;
519
581
  }, "strip", z.ZodTypeAny, {
520
- id: string;
521
582
  kind: "local_cli" | "remote_api" | "fake";
583
+ id: string;
522
584
  display_name: string;
523
585
  provider_family: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown";
524
586
  capability_profile: {
525
587
  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;
588
+ supported_sources: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[];
589
+ preferred_source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null;
528
590
  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";
591
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
592
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
531
593
  relocatable_by: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[];
532
594
  }[];
533
595
  };
@@ -537,7 +599,13 @@ export declare const HarnessManifest: z.ZodObject<{
537
599
  isolation: {
538
600
  supported_containment: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[];
539
601
  };
540
- image_input: "file_path" | "base64_stream" | "base64_inline" | "none";
602
+ attachment_inputs: {
603
+ kind: "image" | "file";
604
+ mime_types: string[];
605
+ max_bytes: number;
606
+ max_count: number;
607
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
608
+ }[];
541
609
  };
542
610
  capabilities: {
543
611
  plan: boolean;
@@ -547,6 +615,7 @@ export declare const HarnessManifest: z.ZodObject<{
547
615
  review: boolean;
548
616
  verify: boolean;
549
617
  synthesize: boolean;
618
+ implementation_transport: "workspace" | "git_patch_envelope";
550
619
  read_files: boolean;
551
620
  browser_tool: boolean;
552
621
  web_policy: "none" | "native" | "tools" | "uncontrolled";
@@ -563,8 +632,8 @@ export declare const HarnessManifest: z.ZodObject<{
563
632
  version?: string | undefined;
564
633
  adapter_version?: string | undefined;
565
634
  }, {
566
- id: string;
567
635
  kind: "local_cli" | "remote_api" | "fake";
636
+ id: string;
568
637
  display_name: string;
569
638
  capabilities: {
570
639
  plan?: boolean | undefined;
@@ -574,6 +643,7 @@ export declare const HarnessManifest: z.ZodObject<{
574
643
  review?: boolean | undefined;
575
644
  verify?: boolean | undefined;
576
645
  synthesize?: boolean | undefined;
646
+ implementation_transport?: "workspace" | "git_patch_envelope" | undefined;
577
647
  read_files?: boolean | undefined;
578
648
  browser_tool?: boolean | undefined;
579
649
  web_policy?: "none" | "native" | "tools" | "uncontrolled" | undefined;
@@ -590,11 +660,11 @@ export declare const HarnessManifest: z.ZodObject<{
590
660
  provider_family?: "openai" | "anthropic" | "google" | "cursor" | "opencode" | "xai" | "local" | "unknown" | undefined;
591
661
  capability_profile?: {
592
662
  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;
663
+ supported_sources?: ("native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none")[] | undefined;
664
+ preferred_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | null | undefined;
595
665
  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";
666
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
667
+ kind: "oauth_token_env" | "none" | "config_file" | "env_var" | "os_keychain" | "http_header";
598
668
  relocatable_by?: ("none" | "HOME" | "CONFIG_DIR" | "ENV")[] | undefined;
599
669
  }[] | undefined;
600
670
  } | undefined;
@@ -604,7 +674,13 @@ export declare const HarnessManifest: z.ZodObject<{
604
674
  isolation?: {
605
675
  supported_containment?: ("env_or_file_injection" | "scoped_home_keychain_bridge" | "host_user_context" | "process_sandbox" | "container")[] | undefined;
606
676
  } | undefined;
607
- image_input?: "file_path" | "base64_stream" | "base64_inline" | "none" | undefined;
677
+ attachment_inputs?: {
678
+ kind: "image" | "file";
679
+ mime_types: string[];
680
+ max_bytes: number;
681
+ max_count: number;
682
+ transport: "file_path" | "base64_stream" | "base64_inline" | "text_inline";
683
+ }[] | undefined;
608
684
  } | undefined;
609
685
  auth_modes?: ("api_key" | "none" | "local_session")[] | undefined;
610
686
  access_profiles_supported?: ("readonly" | "workspace_write" | "full" | "external_sandbox_full" | "inherit_native")[] | undefined;
@@ -652,8 +728,24 @@ export declare const ConformanceReport: z.ZodObject<{
652
728
  enabled_intents: z.ZodDefault<z.ZodArray<z.ZodEnum<["plan", "spec", "implement", "create_from_scratch", "repair", "review", "verify", "synthesize", "explain", "audit", "orchestrate"]>, "many">>;
653
729
  disabled_intents: z.ZodDefault<z.ZodArray<z.ZodEnum<["plan", "spec", "implement", "create_from_scratch", "repair", "review", "verify", "synthesize", "explain", "audit", "orchestrate"]>, "many">>;
654
730
  reasons: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
731
+ auth_sources: z.ZodDefault<z.ZodArray<z.ZodObject<{
732
+ source: z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>;
733
+ availability: z.ZodEnum<["available", "unavailable", "unknown"]>;
734
+ verification: z.ZodEnum<["passed", "failed", "not_run"]>;
735
+ detail: z.ZodOptional<z.ZodString>;
736
+ }, "strict", z.ZodTypeAny, {
737
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
738
+ availability: "unknown" | "available" | "unavailable";
739
+ verification: "passed" | "failed" | "not_run";
740
+ detail?: string | undefined;
741
+ }, {
742
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
743
+ availability: "unknown" | "available" | "unavailable";
744
+ verification: "passed" | "failed" | "not_run";
745
+ detail?: string | undefined;
746
+ }>, "many">>;
655
747
  }, "strip", z.ZodTypeAny, {
656
- status: "ok" | "degraded" | "unavailable";
748
+ status: "unavailable" | "ok" | "degraded";
657
749
  harness_id: string;
658
750
  checks: {
659
751
  status: "pass" | "fail" | "skip";
@@ -664,8 +756,14 @@ export declare const ConformanceReport: z.ZodObject<{
664
756
  enabled_intents: ("plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain")[];
665
757
  disabled_intents: ("plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain")[];
666
758
  reasons: string[];
759
+ auth_sources: {
760
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
761
+ availability: "unknown" | "available" | "unavailable";
762
+ verification: "passed" | "failed" | "not_run";
763
+ detail?: string | undefined;
764
+ }[];
667
765
  }, {
668
- status: "ok" | "degraded" | "unavailable";
766
+ status: "unavailable" | "ok" | "degraded";
669
767
  harness_id: string;
670
768
  checks?: {
671
769
  status: "pass" | "fail" | "skip";
@@ -676,27 +774,16 @@ export declare const ConformanceReport: z.ZodObject<{
676
774
  enabled_intents?: ("plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain")[] | undefined;
677
775
  disabled_intents?: ("plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain")[] | undefined;
678
776
  reasons?: string[] | undefined;
777
+ auth_sources?: {
778
+ source: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none";
779
+ availability: "unknown" | "available" | "unavailable";
780
+ verification: "passed" | "failed" | "not_run";
781
+ detail?: string | undefined;
782
+ }[] | undefined;
679
783
  }>;
680
784
  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
785
  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
786
  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
787
  headless: z.ZodDefault<z.ZodBoolean>;
701
788
  }, "strip", z.ZodTypeAny, {
702
789
  output_dir: string | null;
@@ -729,7 +816,6 @@ export declare const HarnessRunSpec: z.ZodObject<{
729
816
  }>>;
730
817
  model_hint: z.ZodDefault<z.ZodNullable<z.ZodString>>;
731
818
  effort_hint: z.ZodDefault<z.ZodNullable<z.ZodEnum<["low", "medium", "high", "xhigh", "max"]>>>;
732
- max_usd: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
733
819
  max_turns: z.ZodDefault<z.ZodNullable<z.ZodNumber>>;
734
820
  /**
735
821
  * Which auth route the attempt should use. `auto` = subscription-first with
@@ -747,30 +833,36 @@ export declare const HarnessRunSpec: z.ZodObject<{
747
833
  * (agent env isolation). Threaded from routing.env_inheritance at spawn.
748
834
  */
749
835
  env_inheritance: z.ZodDefault<z.ZodEnum<["mirror_native", "clean"]>>;
836
+ evidence_policy: z.ZodDefault<z.ZodEnum<["stream_only", "allow_vendor_session_artifacts"]>>;
750
837
  env: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodString>>;
751
838
  /**
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.
839
+ * Immutable user/agent resources forwarded only after the selected adapter's
840
+ * finite `capability_profile.attachment_inputs` declaration admits them.
755
841
  */
756
842
  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>;
843
+ resource_id: z.ZodString;
844
+ kind: z.ZodEnum<["image", "file"]>;
845
+ mime: z.ZodString;
846
+ name: z.ZodString;
847
+ sha256: z.ZodString;
848
+ size_bytes: z.ZodNumber;
761
849
  path: z.ZodString;
762
- }, "strip", z.ZodTypeAny, {
850
+ }, "strict", z.ZodTypeAny, {
763
851
  path: string;
764
- id: string;
852
+ resource_id: string;
765
853
  kind: "image" | "file";
766
854
  mime: string;
767
855
  name: string;
856
+ sha256: string;
857
+ size_bytes: number;
768
858
  }, {
769
859
  path: string;
770
- id: string;
771
- kind?: "image" | "file" | undefined;
772
- mime?: string | undefined;
773
- name?: string | undefined;
860
+ resource_id: string;
861
+ kind: "image" | "file";
862
+ mime: string;
863
+ name: string;
864
+ sha256: string;
865
+ size_bytes: number;
774
866
  }>, "many">>;
775
867
  /**
776
868
  * Agent-driven browser wiring. Null = no browser tool this run (the common
@@ -778,18 +870,7 @@ export declare const HarnessRunSpec: z.ZodObject<{
778
870
  * `browser_tool`, and web policy is not `off`.
779
871
  */
780
872
  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
873
  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
874
  headless: z.ZodDefault<z.ZodBoolean>;
794
875
  }, "strip", z.ZodTypeAny, {
795
876
  output_dir: string | null;
@@ -805,6 +886,125 @@ export declare const HarnessRunSpec: z.ZodObject<{
805
886
  * declares `json_schema_output`; consumers add the native CLI flag.
806
887
  */
807
888
  output_schema: z.ZodOptional<z.ZodUnknown>;
889
+ raw_context_packet: z.ZodOptional<z.ZodNullable<z.ZodObject<{
890
+ schema_version: z.ZodLiteral<1>;
891
+ packet_hash: z.ZodString;
892
+ base_commit_sha: z.ZodString;
893
+ base_tree_sha: z.ZodString;
894
+ readable_files: z.ZodArray<z.ZodObject<{
895
+ path: z.ZodString;
896
+ mode: z.ZodString;
897
+ blob_oid: z.ZodString;
898
+ content_hash: z.ZodString;
899
+ content: z.ZodString;
900
+ }, "strip", z.ZodTypeAny, {
901
+ path: string;
902
+ mode: string;
903
+ blob_oid: string;
904
+ content_hash: string;
905
+ content: string;
906
+ }, {
907
+ path: string;
908
+ mode: string;
909
+ blob_oid: string;
910
+ content_hash: string;
911
+ content: string;
912
+ }>, "many">;
913
+ editable_paths: z.ZodArray<z.ZodString, "many">;
914
+ creatable_roots: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
915
+ file_manifest: z.ZodArray<z.ZodObject<{
916
+ path: z.ZodString;
917
+ disposition: z.ZodEnum<["full", "included", "manifest_only", "excluded", "sensitive", "binary", "vendored", "oversized", "read_error", "omitted"]>;
918
+ hash: z.ZodOptional<z.ZodString>;
919
+ bytes: z.ZodOptional<z.ZodNumber>;
920
+ reason: z.ZodOptional<z.ZodString>;
921
+ }, "strip", z.ZodTypeAny, {
922
+ path: string;
923
+ disposition: "full" | "included" | "manifest_only" | "excluded" | "sensitive" | "binary" | "vendored" | "oversized" | "read_error" | "omitted";
924
+ hash?: string | undefined;
925
+ bytes?: number | undefined;
926
+ reason?: string | undefined;
927
+ }, {
928
+ path: string;
929
+ disposition: "full" | "included" | "manifest_only" | "excluded" | "sensitive" | "binary" | "vendored" | "oversized" | "read_error" | "omitted";
930
+ hash?: string | undefined;
931
+ bytes?: number | undefined;
932
+ reason?: string | undefined;
933
+ }>, "many">;
934
+ omissions: z.ZodArray<z.ZodObject<{
935
+ path: z.ZodString;
936
+ reason: z.ZodString;
937
+ replacement: z.ZodDefault<z.ZodEnum<["summary", "map", "index", "none"]>>;
938
+ hash: z.ZodOptional<z.ZodString>;
939
+ }, "strip", z.ZodTypeAny, {
940
+ path: string;
941
+ reason: string;
942
+ replacement: "map" | "none" | "summary" | "index";
943
+ hash?: string | undefined;
944
+ }, {
945
+ path: string;
946
+ reason: string;
947
+ hash?: string | undefined;
948
+ replacement?: "map" | "none" | "summary" | "index" | undefined;
949
+ }>, "many">;
950
+ evidence_refs: z.ZodArray<z.ZodString, "many">;
951
+ }, "strip", z.ZodTypeAny, {
952
+ schema_version: 1;
953
+ packet_hash: string;
954
+ base_commit_sha: string;
955
+ base_tree_sha: string;
956
+ readable_files: {
957
+ path: string;
958
+ mode: string;
959
+ blob_oid: string;
960
+ content_hash: string;
961
+ content: string;
962
+ }[];
963
+ editable_paths: string[];
964
+ creatable_roots: string[];
965
+ file_manifest: {
966
+ path: string;
967
+ disposition: "full" | "included" | "manifest_only" | "excluded" | "sensitive" | "binary" | "vendored" | "oversized" | "read_error" | "omitted";
968
+ hash?: string | undefined;
969
+ bytes?: number | undefined;
970
+ reason?: string | undefined;
971
+ }[];
972
+ omissions: {
973
+ path: string;
974
+ reason: string;
975
+ replacement: "map" | "none" | "summary" | "index";
976
+ hash?: string | undefined;
977
+ }[];
978
+ evidence_refs: string[];
979
+ }, {
980
+ schema_version: 1;
981
+ packet_hash: string;
982
+ base_commit_sha: string;
983
+ base_tree_sha: string;
984
+ readable_files: {
985
+ path: string;
986
+ mode: string;
987
+ blob_oid: string;
988
+ content_hash: string;
989
+ content: string;
990
+ }[];
991
+ editable_paths: string[];
992
+ file_manifest: {
993
+ path: string;
994
+ disposition: "full" | "included" | "manifest_only" | "excluded" | "sensitive" | "binary" | "vendored" | "oversized" | "read_error" | "omitted";
995
+ hash?: string | undefined;
996
+ bytes?: number | undefined;
997
+ reason?: string | undefined;
998
+ }[];
999
+ omissions: {
1000
+ path: string;
1001
+ reason: string;
1002
+ hash?: string | undefined;
1003
+ replacement?: "map" | "none" | "summary" | "index" | undefined;
1004
+ }[];
1005
+ evidence_refs: string[];
1006
+ creatable_roots?: string[] | undefined;
1007
+ }>>>;
808
1008
  extra: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
809
1009
  }, "strip", z.ZodTypeAny, {
810
1010
  max_turns: number | null;
@@ -821,17 +1021,19 @@ export declare const HarnessRunSpec: z.ZodObject<{
821
1021
  };
822
1022
  model_hint: string | null;
823
1023
  effort_hint: "low" | "medium" | "high" | "xhigh" | "max" | null;
824
- max_usd: number | null;
825
1024
  auth_preference: "auto" | "subscription" | "api_key";
826
1025
  resume_session_id: string | null;
827
1026
  env_inheritance: "mirror_native" | "clean";
1027
+ evidence_policy: "stream_only" | "allow_vendor_session_artifacts";
828
1028
  env: Record<string, string>;
829
1029
  attachments: {
830
1030
  path: string;
831
- id: string;
1031
+ resource_id: string;
832
1032
  kind: "image" | "file";
833
1033
  mime: string;
834
1034
  name: string;
1035
+ sha256: string;
1036
+ size_bytes: number;
835
1037
  }[];
836
1038
  browser: {
837
1039
  output_dir: string | null;
@@ -839,6 +1041,35 @@ export declare const HarnessRunSpec: z.ZodObject<{
839
1041
  } | null;
840
1042
  extra: Record<string, unknown>;
841
1043
  output_schema?: unknown;
1044
+ raw_context_packet?: {
1045
+ schema_version: 1;
1046
+ packet_hash: string;
1047
+ base_commit_sha: string;
1048
+ base_tree_sha: string;
1049
+ readable_files: {
1050
+ path: string;
1051
+ mode: string;
1052
+ blob_oid: string;
1053
+ content_hash: string;
1054
+ content: string;
1055
+ }[];
1056
+ editable_paths: string[];
1057
+ creatable_roots: string[];
1058
+ file_manifest: {
1059
+ path: string;
1060
+ disposition: "full" | "included" | "manifest_only" | "excluded" | "sensitive" | "binary" | "vendored" | "oversized" | "read_error" | "omitted";
1061
+ hash?: string | undefined;
1062
+ bytes?: number | undefined;
1063
+ reason?: string | undefined;
1064
+ }[];
1065
+ omissions: {
1066
+ path: string;
1067
+ reason: string;
1068
+ replacement: "map" | "none" | "summary" | "index";
1069
+ hash?: string | undefined;
1070
+ }[];
1071
+ evidence_refs: string[];
1072
+ } | null | undefined;
842
1073
  }, {
843
1074
  session_id: string;
844
1075
  intent: "plan" | "audit" | "orchestrate" | "spec" | "implement" | "create_from_scratch" | "repair" | "review" | "verify" | "synthesize" | "explain";
@@ -854,23 +1085,54 @@ export declare const HarnessRunSpec: z.ZodObject<{
854
1085
  } | undefined;
855
1086
  model_hint?: string | null | undefined;
856
1087
  effort_hint?: "low" | "medium" | "high" | "xhigh" | "max" | null | undefined;
857
- max_usd?: number | null | undefined;
858
1088
  auth_preference?: "auto" | "subscription" | "api_key" | undefined;
859
1089
  resume_session_id?: string | null | undefined;
860
1090
  env_inheritance?: "mirror_native" | "clean" | undefined;
1091
+ evidence_policy?: "stream_only" | "allow_vendor_session_artifacts" | undefined;
861
1092
  env?: Record<string, string> | undefined;
862
1093
  attachments?: {
863
1094
  path: string;
864
- id: string;
865
- kind?: "image" | "file" | undefined;
866
- mime?: string | undefined;
867
- name?: string | undefined;
1095
+ resource_id: string;
1096
+ kind: "image" | "file";
1097
+ mime: string;
1098
+ name: string;
1099
+ sha256: string;
1100
+ size_bytes: number;
868
1101
  }[] | undefined;
869
1102
  browser?: {
870
1103
  output_dir?: string | null | undefined;
871
1104
  headless?: boolean | undefined;
872
1105
  } | null | undefined;
873
1106
  output_schema?: unknown;
1107
+ raw_context_packet?: {
1108
+ schema_version: 1;
1109
+ packet_hash: string;
1110
+ base_commit_sha: string;
1111
+ base_tree_sha: string;
1112
+ readable_files: {
1113
+ path: string;
1114
+ mode: string;
1115
+ blob_oid: string;
1116
+ content_hash: string;
1117
+ content: string;
1118
+ }[];
1119
+ editable_paths: string[];
1120
+ file_manifest: {
1121
+ path: string;
1122
+ disposition: "full" | "included" | "manifest_only" | "excluded" | "sensitive" | "binary" | "vendored" | "oversized" | "read_error" | "omitted";
1123
+ hash?: string | undefined;
1124
+ bytes?: number | undefined;
1125
+ reason?: string | undefined;
1126
+ }[];
1127
+ omissions: {
1128
+ path: string;
1129
+ reason: string;
1130
+ hash?: string | undefined;
1131
+ replacement?: "map" | "none" | "summary" | "index" | undefined;
1132
+ }[];
1133
+ evidence_refs: string[];
1134
+ creatable_roots?: string[] | undefined;
1135
+ } | null | undefined;
874
1136
  extra?: Record<string, unknown> | undefined;
875
1137
  }>;
876
1138
  export type HarnessRunSpec = z.infer<typeof HarnessRunSpec>;
@@ -900,7 +1162,7 @@ export declare const ToolRef: z.ZodObject<{
900
1162
  }, "strip", z.ZodTypeAny, {
901
1163
  kind: "file" | "web" | "command" | "mcp" | "search" | "other";
902
1164
  name: string;
903
- status?: "ok" | "error" | "cancelled" | "denied" | undefined;
1165
+ status?: "cancelled" | "ok" | "error" | "denied" | undefined;
904
1166
  use_id?: string | undefined;
905
1167
  target?: string | undefined;
906
1168
  error_summary?: string | undefined;
@@ -908,7 +1170,7 @@ export declare const ToolRef: z.ZodObject<{
908
1170
  exit_code?: number | undefined;
909
1171
  }, {
910
1172
  name: string;
911
- status?: "ok" | "error" | "cancelled" | "denied" | undefined;
1173
+ status?: "cancelled" | "ok" | "error" | "denied" | undefined;
912
1174
  kind?: "file" | "web" | "command" | "mcp" | "search" | "other" | undefined;
913
1175
  use_id?: string | undefined;
914
1176
  target?: string | undefined;
@@ -1086,7 +1348,7 @@ export declare const InteractionAnswerSet: z.ZodObject<{
1086
1348
  export type InteractionAnswerSet = z.infer<typeof InteractionAnswerSet>;
1087
1349
  /** Normalized event emitted by every adapter (the SSOT of adapter output). */
1088
1350
  export declare const HarnessEvent: z.ZodObject<{
1089
- type: z.ZodEnum<["started", "thinking", "message", "tool_call", "tool_result", "interaction_requested", "file_change", "usage", "error", "completed"]>;
1351
+ type: z.ZodEnum<["started", "thinking", "message", "tool_call", "tool_result", "interaction_requested", "file_change", "patch_produced", "usage", "error", "completed"]>;
1090
1352
  session_id: z.ZodString;
1091
1353
  ts: z.ZodString;
1092
1354
  text: z.ZodOptional<z.ZodString>;
@@ -1106,7 +1368,7 @@ export declare const HarnessEvent: z.ZodObject<{
1106
1368
  }, "strip", z.ZodTypeAny, {
1107
1369
  kind: "file" | "web" | "command" | "mcp" | "search" | "other";
1108
1370
  name: string;
1109
- status?: "ok" | "error" | "cancelled" | "denied" | undefined;
1371
+ status?: "cancelled" | "ok" | "error" | "denied" | undefined;
1110
1372
  use_id?: string | undefined;
1111
1373
  target?: string | undefined;
1112
1374
  error_summary?: string | undefined;
@@ -1114,7 +1376,7 @@ export declare const HarnessEvent: z.ZodObject<{
1114
1376
  exit_code?: number | undefined;
1115
1377
  }, {
1116
1378
  name: string;
1117
- status?: "ok" | "error" | "cancelled" | "denied" | undefined;
1379
+ status?: "cancelled" | "ok" | "error" | "denied" | undefined;
1118
1380
  kind?: "file" | "web" | "command" | "mcp" | "search" | "other" | undefined;
1119
1381
  use_id?: string | undefined;
1120
1382
  target?: string | undefined;
@@ -1189,6 +1451,44 @@ export declare const HarnessEvent: z.ZodObject<{
1189
1451
  }[] | undefined;
1190
1452
  source_tool?: string | null | undefined;
1191
1453
  }>>;
1454
+ patch_envelope: z.ZodOptional<z.ZodObject<{
1455
+ schema_version: z.ZodLiteral<1>;
1456
+ context_packet_hash: z.ZodString;
1457
+ base_tree_sha: z.ZodString;
1458
+ patch: z.ZodString;
1459
+ patch_hash: z.ZodString;
1460
+ touched_paths: z.ZodArray<z.ZodObject<{
1461
+ path: z.ZodString;
1462
+ expected_blob_oid: z.ZodNullable<z.ZodString>;
1463
+ }, "strip", z.ZodTypeAny, {
1464
+ path: string;
1465
+ expected_blob_oid: string | null;
1466
+ }, {
1467
+ path: string;
1468
+ expected_blob_oid: string | null;
1469
+ }>, "many">;
1470
+ }, "strip", z.ZodTypeAny, {
1471
+ schema_version: 1;
1472
+ base_tree_sha: string;
1473
+ context_packet_hash: string;
1474
+ patch: string;
1475
+ patch_hash: string;
1476
+ touched_paths: {
1477
+ path: string;
1478
+ expected_blob_oid: string | null;
1479
+ }[];
1480
+ }, {
1481
+ schema_version: 1;
1482
+ base_tree_sha: string;
1483
+ context_packet_hash: string;
1484
+ patch: string;
1485
+ patch_hash: string;
1486
+ touched_paths: {
1487
+ path: string;
1488
+ expected_blob_oid: string | null;
1489
+ }[];
1490
+ }>>;
1491
+ 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
1492
  usage: z.ZodOptional<z.ZodObject<{
1193
1493
  input_tokens: z.ZodOptional<z.ZodNumber>;
1194
1494
  output_tokens: z.ZodOptional<z.ZodNumber>;
@@ -1197,38 +1497,72 @@ export declare const HarnessEvent: z.ZodObject<{
1197
1497
  /** True when cost_usd is derived from token pricing (not natively reported). */
1198
1498
  estimated: z.ZodOptional<z.ZodBoolean>;
1199
1499
  }, "strip", z.ZodTypeAny, {
1500
+ estimated?: boolean | undefined;
1200
1501
  input_tokens?: number | undefined;
1201
1502
  output_tokens?: number | undefined;
1202
1503
  cached_input_tokens?: number | undefined;
1203
1504
  cost_usd?: number | undefined;
1204
- estimated?: boolean | undefined;
1205
1505
  }, {
1506
+ estimated?: boolean | undefined;
1206
1507
  input_tokens?: number | undefined;
1207
1508
  output_tokens?: number | undefined;
1208
1509
  cached_input_tokens?: number | undefined;
1209
1510
  cost_usd?: number | undefined;
1210
- estimated?: boolean | undefined;
1211
1511
  }>>;
1212
1512
  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
- */
1513
+ credential_route: z.ZodOptional<z.ZodEnum<["vendor_native", "managed_api_key", "local"]>>;
1514
+ credential_source: z.ZodOptional<z.ZodEnum<["native_session", "oauth_token_env", "api_key_env", "api_key_flag", "provider_auth_file", "none"]>>;
1515
+ /** Vendor-owned quota windows. All reported windows remain independent. */
1221
1516
  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;
1517
+ source: z.ZodEnum<["codex_app_server", "codex_rollout", "claude_statusline", "claude_api_retry"]>;
1518
+ plan_label: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1519
+ subject_id: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1520
+ constraints: z.ZodArray<z.ZodObject<{
1521
+ id: z.ZodString;
1522
+ label: z.ZodString;
1523
+ used_ratio: z.ZodNullable<z.ZodNumber>;
1524
+ window_seconds: z.ZodNullable<z.ZodNumber>;
1525
+ resets_at: z.ZodNullable<z.ZodString>;
1526
+ cooldown_until: z.ZodDefault<z.ZodNullable<z.ZodString>>;
1527
+ }, "strict", z.ZodTypeAny, {
1528
+ id: string;
1529
+ label: string;
1530
+ used_ratio: number | null;
1531
+ window_seconds: number | null;
1532
+ resets_at: string | null;
1533
+ cooldown_until: string | null;
1534
+ }, {
1535
+ id: string;
1536
+ label: string;
1537
+ used_ratio: number | null;
1538
+ window_seconds: number | null;
1539
+ resets_at: string | null;
1540
+ cooldown_until?: string | null | undefined;
1541
+ }>, "many">;
1542
+ }, "strict", z.ZodTypeAny, {
1543
+ source: "codex_app_server" | "codex_rollout" | "claude_statusline" | "claude_api_retry";
1544
+ plan_label: string | null;
1545
+ subject_id: string | null;
1546
+ constraints: {
1547
+ id: string;
1548
+ label: string;
1549
+ used_ratio: number | null;
1550
+ window_seconds: number | null;
1551
+ resets_at: string | null;
1552
+ cooldown_until: string | null;
1553
+ }[];
1229
1554
  }, {
1230
- used_percent: number;
1231
- resets_at?: string | null | undefined;
1555
+ source: "codex_app_server" | "codex_rollout" | "claude_statusline" | "claude_api_retry";
1556
+ constraints: {
1557
+ id: string;
1558
+ label: string;
1559
+ used_ratio: number | null;
1560
+ window_seconds: number | null;
1561
+ resets_at: string | null;
1562
+ cooldown_until?: string | null | undefined;
1563
+ }[];
1564
+ plan_label?: string | null | undefined;
1565
+ subject_id?: string | null | undefined;
1232
1566
  }>>;
1233
1567
  /**
1234
1568
  * Typed live plan/todo progress: adapters map their native plan tools
@@ -1296,24 +1630,27 @@ export declare const HarnessEvent: z.ZodObject<{
1296
1630
  retry_delay_ms?: number | null | undefined;
1297
1631
  }>>;
1298
1632
  error: z.ZodOptional<z.ZodString>;
1633
+ aborted: z.ZodOptional<z.ZodBoolean>;
1299
1634
  payload: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1300
1635
  }, "strip", z.ZodTypeAny, {
1301
- type: "message" | "error" | "started" | "thinking" | "tool_call" | "tool_result" | "interaction_requested" | "file_change" | "usage" | "completed";
1636
+ type: "message" | "completed" | "error" | "started" | "thinking" | "tool_call" | "tool_result" | "interaction_requested" | "file_change" | "patch_produced" | "usage";
1302
1637
  session_id: string;
1303
1638
  ts: string;
1639
+ aborted?: boolean | undefined;
1640
+ credential_route?: "local" | "vendor_native" | "managed_api_key" | undefined;
1304
1641
  error?: string | undefined;
1305
1642
  usage?: {
1643
+ estimated?: boolean | undefined;
1306
1644
  input_tokens?: number | undefined;
1307
1645
  output_tokens?: number | undefined;
1308
1646
  cached_input_tokens?: number | undefined;
1309
1647
  cost_usd?: number | undefined;
1310
- estimated?: boolean | undefined;
1311
1648
  } | undefined;
1312
1649
  text?: string | undefined;
1313
1650
  tool?: {
1314
1651
  kind: "file" | "web" | "command" | "mcp" | "search" | "other";
1315
1652
  name: string;
1316
- status?: "ok" | "error" | "cancelled" | "denied" | undefined;
1653
+ status?: "cancelled" | "ok" | "error" | "denied" | undefined;
1317
1654
  use_id?: string | undefined;
1318
1655
  target?: string | undefined;
1319
1656
  error_summary?: string | undefined;
@@ -1334,10 +1671,32 @@ export declare const HarnessEvent: z.ZodObject<{
1334
1671
  }[];
1335
1672
  source_tool: string | null;
1336
1673
  } | undefined;
1674
+ patch_envelope?: {
1675
+ schema_version: 1;
1676
+ base_tree_sha: string;
1677
+ context_packet_hash: string;
1678
+ patch: string;
1679
+ patch_hash: string;
1680
+ touched_paths: {
1681
+ path: string;
1682
+ expected_blob_oid: string | null;
1683
+ }[];
1684
+ } | undefined;
1685
+ 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
1686
  observed_model?: string | undefined;
1687
+ credential_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | undefined;
1338
1688
  quota?: {
1339
- used_percent: number;
1340
- resets_at: string | null;
1689
+ source: "codex_app_server" | "codex_rollout" | "claude_statusline" | "claude_api_retry";
1690
+ plan_label: string | null;
1691
+ subject_id: string | null;
1692
+ constraints: {
1693
+ id: string;
1694
+ label: string;
1695
+ used_ratio: number | null;
1696
+ window_seconds: number | null;
1697
+ resets_at: string | null;
1698
+ cooldown_until: string | null;
1699
+ }[];
1341
1700
  } | undefined;
1342
1701
  plan_progress?: {
1343
1702
  items: {
@@ -1356,21 +1715,23 @@ export declare const HarnessEvent: z.ZodObject<{
1356
1715
  } | undefined;
1357
1716
  payload?: Record<string, unknown> | undefined;
1358
1717
  }, {
1359
- type: "message" | "error" | "started" | "thinking" | "tool_call" | "tool_result" | "interaction_requested" | "file_change" | "usage" | "completed";
1718
+ type: "message" | "completed" | "error" | "started" | "thinking" | "tool_call" | "tool_result" | "interaction_requested" | "file_change" | "patch_produced" | "usage";
1360
1719
  session_id: string;
1361
1720
  ts: string;
1721
+ aborted?: boolean | undefined;
1722
+ credential_route?: "local" | "vendor_native" | "managed_api_key" | undefined;
1362
1723
  error?: string | undefined;
1363
1724
  usage?: {
1725
+ estimated?: boolean | undefined;
1364
1726
  input_tokens?: number | undefined;
1365
1727
  output_tokens?: number | undefined;
1366
1728
  cached_input_tokens?: number | undefined;
1367
1729
  cost_usd?: number | undefined;
1368
- estimated?: boolean | undefined;
1369
1730
  } | undefined;
1370
1731
  text?: string | undefined;
1371
1732
  tool?: {
1372
1733
  name: string;
1373
- status?: "ok" | "error" | "cancelled" | "denied" | undefined;
1734
+ status?: "cancelled" | "ok" | "error" | "denied" | undefined;
1374
1735
  kind?: "file" | "web" | "command" | "mcp" | "search" | "other" | undefined;
1375
1736
  use_id?: string | undefined;
1376
1737
  target?: string | undefined;
@@ -1392,10 +1753,32 @@ export declare const HarnessEvent: z.ZodObject<{
1392
1753
  }[] | undefined;
1393
1754
  source_tool?: string | null | undefined;
1394
1755
  } | undefined;
1756
+ patch_envelope?: {
1757
+ schema_version: 1;
1758
+ base_tree_sha: string;
1759
+ context_packet_hash: string;
1760
+ patch: string;
1761
+ patch_hash: string;
1762
+ touched_paths: {
1763
+ path: string;
1764
+ expected_blob_oid: string | null;
1765
+ }[];
1766
+ } | undefined;
1767
+ 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
1768
  observed_model?: string | undefined;
1769
+ credential_source?: "native_session" | "oauth_token_env" | "api_key_env" | "api_key_flag" | "provider_auth_file" | "none" | undefined;
1396
1770
  quota?: {
1397
- used_percent: number;
1398
- resets_at?: string | null | undefined;
1771
+ source: "codex_app_server" | "codex_rollout" | "claude_statusline" | "claude_api_retry";
1772
+ constraints: {
1773
+ id: string;
1774
+ label: string;
1775
+ used_ratio: number | null;
1776
+ window_seconds: number | null;
1777
+ resets_at: string | null;
1778
+ cooldown_until?: string | null | undefined;
1779
+ }[];
1780
+ plan_label?: string | null | undefined;
1781
+ subject_id?: string | null | undefined;
1399
1782
  } | undefined;
1400
1783
  plan_progress?: {
1401
1784
  items?: {