@wardby/cli 0.5.3 → 0.7.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 (763) hide show
  1. package/.env.example +33 -0
  2. package/README.md +25 -14
  3. package/deploy/local/docker-compose.quickstart-coding.yml +13 -0
  4. package/dist/claude-coding-worker/context.d.ts +22 -0
  5. package/dist/claude-coding-worker/context.js +92 -0
  6. package/dist/claude-coding-worker/driver.d.ts +27 -3
  7. package/dist/claude-coding-worker/driver.js +161 -20
  8. package/dist/claude-coding-worker/main.js +34 -6
  9. package/dist/claude-coding-worker/sdk.js +25 -5
  10. package/dist/claude-coding-worker/tool-socket.d.ts +27 -0
  11. package/dist/claude-coding-worker/tool-socket.js +111 -0
  12. package/dist/claude-coding-worker/transcript.d.ts +18 -0
  13. package/dist/claude-coding-worker/transcript.js +77 -0
  14. package/dist/cli-help.d.ts +1 -1
  15. package/dist/cli-help.js +6 -2
  16. package/dist/cli-native-mode.d.ts +9 -0
  17. package/dist/cli-native-mode.js +20 -0
  18. package/dist/cli.d.ts +3 -1
  19. package/dist/cli.js +161 -11
  20. package/dist/coding/claude-context.d.ts +45 -0
  21. package/dist/coding/claude-context.js +434 -0
  22. package/dist/coding/continuation-wording.d.ts +35 -0
  23. package/dist/coding/continuation-wording.js +73 -0
  24. package/dist/coding/linked-issue-note.d.ts +23 -0
  25. package/dist/coding/linked-issue-note.js +47 -0
  26. package/dist/coding/merge-wording.d.ts +28 -0
  27. package/dist/coding/merge-wording.js +78 -0
  28. package/dist/coding/pr-description-note.d.ts +9 -0
  29. package/dist/coding/pr-description-note.js +32 -0
  30. package/dist/coding/profile.d.ts +50 -118
  31. package/dist/coding/profile.js +51 -4
  32. package/dist/coding/protected-path-wording.d.ts +8 -0
  33. package/dist/coding/protected-path-wording.js +1 -1
  34. package/dist/coding/protocol.d.ts +292 -270
  35. package/dist/coding/protocol.js +322 -15
  36. package/dist/coding/redact.d.ts +3 -0
  37. package/dist/coding/redact.js +12 -0
  38. package/dist/coding/registry/allowlist.d.ts +12 -0
  39. package/dist/coding/registry/allowlist.js +14 -1
  40. package/dist/coding/registry/audit-mode.d.ts +153 -0
  41. package/dist/coding/registry/audit-mode.js +304 -0
  42. package/dist/coding/registry/lockfile-shared.d.ts +36 -0
  43. package/dist/coding/registry/lockfile-shared.js +128 -0
  44. package/dist/coding/registry/lockfiles.js +1 -1
  45. package/dist/coding/registry/npm-lockfile-formats.d.ts +11 -0
  46. package/dist/coding/registry/npm-lockfile-formats.js +41 -0
  47. package/dist/coding/registry/npm-lockfile.d.ts +8 -4
  48. package/dist/coding/registry/npm-lockfile.js +4 -6
  49. package/dist/coding/registry/npm.js +78 -8
  50. package/dist/coding/registry/pnpm-lockfile.d.ts +17 -0
  51. package/dist/coding/registry/pnpm-lockfile.js +189 -0
  52. package/dist/coding/registry/pypi-plan.d.ts +50 -0
  53. package/dist/coding/registry/pypi-plan.js +406 -0
  54. package/dist/coding/registry/pypi-requirements.d.ts +58 -0
  55. package/dist/coding/registry/pypi-requirements.js +155 -0
  56. package/dist/coding/registry/pypi.d.ts +3 -27
  57. package/dist/coding/registry/pypi.js +40 -154
  58. package/dist/coding/registry/refusal-hints.d.ts +20 -0
  59. package/dist/coding/registry/refusal-hints.js +61 -0
  60. package/dist/coding/registry/refusal-wording.d.ts +11 -0
  61. package/dist/coding/registry/refusal-wording.js +56 -0
  62. package/dist/coding/registry/report.d.ts +70 -8
  63. package/dist/coding/registry/report.js +112 -5
  64. package/dist/coding/registry/types.d.ts +58 -8
  65. package/dist/coding/registry/yarn-lockfile.d.ts +30 -0
  66. package/dist/coding/registry/yarn-lockfile.js +367 -0
  67. package/dist/coding/services/catalog.d.ts +37 -351
  68. package/dist/coding/transcript/claude-code.d.ts +13 -0
  69. package/dist/coding/transcript/claude-code.js +273 -0
  70. package/dist/coding/transcript/download-protocol.d.ts +30 -0
  71. package/dist/coding/transcript/download-protocol.js +18 -0
  72. package/dist/coding/transcript/format.d.ts +20 -0
  73. package/dist/coding/transcript/format.js +32 -0
  74. package/dist/coding/transcript/recorder.d.ts +51 -0
  75. package/dist/coding/transcript/recorder.js +225 -0
  76. package/dist/coding/transcript/resume/checkout.d.ts +31 -0
  77. package/dist/coding/transcript/resume/checkout.js +203 -0
  78. package/dist/coding/transcript/resume/command.d.ts +17 -0
  79. package/dist/coding/transcript/resume/command.js +176 -0
  80. package/dist/coding/transcript/resume/download.d.ts +20 -0
  81. package/dist/coding/transcript/resume/download.js +153 -0
  82. package/dist/coding/transcript/resume/launch.d.ts +38 -0
  83. package/dist/coding/transcript/resume/launch.js +128 -0
  84. package/dist/coding/transcript/resume/session-file.d.ts +13 -0
  85. package/dist/coding/transcript/resume/session-file.js +79 -0
  86. package/dist/coding/transcript/resume/stand-in.d.ts +11 -0
  87. package/dist/coding/transcript/resume/stand-in.js +49 -0
  88. package/dist/coding-worker/artifact.d.ts +16 -3
  89. package/dist/coding-worker/artifact.js +5 -3
  90. package/dist/coding-worker/debug-trace.d.ts +6 -5
  91. package/dist/coding-worker/debug-trace.js +13 -18
  92. package/dist/coding-worker/dependency-cache.d.mts +229 -0
  93. package/dist/coding-worker/dependency-cache.mjs +2123 -0
  94. package/dist/coding-worker/driver.d.ts +4 -3
  95. package/dist/coding-worker/driver.js +118 -38
  96. package/dist/coding-worker/errors.d.ts +1 -0
  97. package/dist/coding-worker/errors.js +32 -0
  98. package/dist/coding-worker/sdk.d.ts +6 -0
  99. package/dist/coding-worker/sdk.js +1 -0
  100. package/dist/coding-worker/skills.d.ts +23 -0
  101. package/dist/coding-worker/skills.js +117 -0
  102. package/dist/coding-worker/task-note.d.ts +11 -0
  103. package/dist/coding-worker/task-note.js +13 -0
  104. package/dist/coding-worker/types.d.ts +13 -0
  105. package/dist/config/dependency-cache.d.ts +23 -0
  106. package/dist/config/dependency-cache.js +32 -0
  107. package/dist/config/github-allowed-accounts.d.ts +15 -0
  108. package/dist/config/github-allowed-accounts.js +36 -0
  109. package/dist/config/low-power.d.ts +12 -0
  110. package/dist/config/low-power.js +18 -0
  111. package/dist/config/mobile.d.ts +12 -0
  112. package/dist/config/mobile.js +18 -0
  113. package/dist/config/providers.d.ts +65 -3
  114. package/dist/config/providers.js +147 -11
  115. package/dist/config/test-simulators.d.ts +82 -0
  116. package/dist/config/test-simulators.js +305 -0
  117. package/dist/core/async-context.d.ts +2 -0
  118. package/dist/core/async-context.js +12 -0
  119. package/dist/core/budget-events.d.ts +108 -0
  120. package/dist/core/budget-events.js +346 -0
  121. package/dist/core/budget-groups.d.ts +50 -1
  122. package/dist/core/budget-groups.js +236 -27
  123. package/dist/core/budget-stopped-head.d.ts +46 -0
  124. package/dist/core/budget-stopped-head.js +81 -0
  125. package/dist/core/budget-topup.d.ts +51 -0
  126. package/dist/core/budget-topup.js +156 -0
  127. package/dist/core/budget-wording.d.ts +16 -2
  128. package/dist/core/budget-wording.js +40 -2
  129. package/dist/core/coding-queue.d.ts +2 -1
  130. package/dist/core/coding-queue.js +7 -0
  131. package/dist/core/cron.d.ts +19 -1
  132. package/dist/core/cron.js +17 -0
  133. package/dist/core/datastores.js +1 -1
  134. package/dist/core/db.d.ts +16 -6
  135. package/dist/core/db.js +12 -10
  136. package/dist/core/deferred-coding.d.ts +14 -0
  137. package/dist/core/deferred-coding.js +62 -0
  138. package/dist/core/delegation-child.d.ts +25 -0
  139. package/dist/core/delegation-child.js +37 -0
  140. package/dist/core/dispatch.d.ts +53 -0
  141. package/dist/core/dispatch.js +167 -57
  142. package/dist/core/engine-native.js +10 -6
  143. package/dist/core/error-code.d.ts +38 -0
  144. package/dist/core/error-code.js +168 -0
  145. package/dist/core/grants.d.ts +19 -6
  146. package/dist/core/grants.js +55 -6
  147. package/dist/core/host-events.d.ts +67 -5
  148. package/dist/core/host-events.js +571 -37
  149. package/dist/core/host-status.d.ts +85 -3
  150. package/dist/core/host-status.js +298 -20
  151. package/dist/core/issue-bridge.d.ts +50 -6
  152. package/dist/core/issue-bridge.js +151 -20
  153. package/dist/core/issue-events.d.ts +1 -1
  154. package/dist/core/issue-events.js +16 -11
  155. package/dist/core/issue-status.d.ts +1 -1
  156. package/dist/core/issue-status.js +68 -29
  157. package/dist/core/logger.d.ts +5 -0
  158. package/dist/core/logger.js +14 -1
  159. package/dist/core/lost-run-children.d.ts +6 -0
  160. package/dist/core/lost-run-children.js +32 -0
  161. package/dist/core/mark-ready.d.ts +34 -0
  162. package/dist/core/mark-ready.js +152 -0
  163. package/dist/core/markdown-code.d.ts +8 -0
  164. package/dist/core/markdown-code.js +107 -0
  165. package/dist/core/memory-tools.js +7 -0
  166. package/dist/core/merge-order-check.d.ts +130 -0
  167. package/dist/core/merge-order-check.js +343 -0
  168. package/dist/core/notification-dispatcher.d.ts +70 -0
  169. package/dist/core/notification-dispatcher.js +368 -0
  170. package/dist/core/notification-templates.d.ts +19 -0
  171. package/dist/core/notification-templates.js +139 -0
  172. package/dist/core/notifications.d.ts +10 -0
  173. package/dist/core/notifications.js +38 -0
  174. package/dist/core/pg-auth.d.ts +22 -0
  175. package/dist/core/pg-auth.js +152 -0
  176. package/dist/core/power-composition.d.ts +16 -0
  177. package/dist/core/power-composition.js +37 -0
  178. package/dist/core/power-idle.d.ts +14 -0
  179. package/dist/core/power-idle.js +30 -0
  180. package/dist/core/power.d.ts +71 -0
  181. package/dist/core/power.js +202 -0
  182. package/dist/core/pull-request-state-sync.js +2 -2
  183. package/dist/core/reconciler.d.ts +8 -5
  184. package/dist/core/reconciler.js +37 -6
  185. package/dist/core/related-pull-requests.d.ts +59 -7
  186. package/dist/core/related-pull-requests.js +140 -25
  187. package/dist/core/reply-parts.d.ts +21 -0
  188. package/dist/core/reply-parts.js +73 -0
  189. package/dist/core/repo-access.d.ts +15 -0
  190. package/dist/core/repo-access.js +66 -0
  191. package/dist/core/review-fix.d.ts +38 -1
  192. package/dist/core/review-fix.js +209 -7
  193. package/dist/core/review-host-checks.d.ts +1 -1
  194. package/dist/core/review-host-tools.d.ts +23 -0
  195. package/dist/core/review-host-tools.js +156 -14
  196. package/dist/core/review-reads.d.ts +55 -0
  197. package/dist/core/review-reads.js +233 -0
  198. package/dist/core/run-status.d.ts +12 -0
  199. package/dist/core/run-status.js +12 -0
  200. package/dist/core/runner.d.ts +384 -5
  201. package/dist/core/runner.js +1244 -372
  202. package/dist/core/schedule-start.d.ts +12 -0
  203. package/dist/core/schedule-start.js +14 -0
  204. package/dist/core/secret-broker-config.d.ts +39 -0
  205. package/dist/core/secret-broker-config.js +112 -0
  206. package/dist/core/secret-guard.d.ts +46 -0
  207. package/dist/core/secret-guard.js +104 -0
  208. package/dist/core/secret-guarded-stores.d.ts +12 -0
  209. package/dist/core/secret-guarded-stores.js +41 -0
  210. package/dist/core/secret-spans.d.ts +50 -0
  211. package/dist/core/secret-spans.js +94 -0
  212. package/dist/core/secrets.d.ts +39 -4
  213. package/dist/core/secrets.js +148 -40
  214. package/dist/core/stop-run.d.ts +46 -0
  215. package/dist/core/stop-run.js +61 -0
  216. package/dist/core/workflow-event-recorder.d.ts +14 -0
  217. package/dist/core/workflow-event-recorder.js +120 -0
  218. package/dist/core/workflow-events.d.ts +94 -0
  219. package/dist/core/workflow-events.js +48 -0
  220. package/dist/core/workflow-run-events.d.ts +18 -0
  221. package/dist/core/workflow-run-events.js +75 -0
  222. package/dist/core/zod-json-schema.d.ts +4 -0
  223. package/dist/core/zod-json-schema.js +39 -0
  224. package/dist/core/zod3-window.d.ts +35 -0
  225. package/dist/core/zod3-window.js +124 -0
  226. package/dist/generated/prisma/browser.d.ts +92 -3
  227. package/dist/generated/prisma/client.d.ts +92 -3
  228. package/dist/generated/prisma/commonInputTypes.d.ts +364 -54
  229. package/dist/generated/prisma/enums.d.ts +37 -0
  230. package/dist/generated/prisma/enums.js +31 -0
  231. package/dist/generated/prisma/internal/class.d.ts +132 -0
  232. package/dist/generated/prisma/internal/class.js +4 -4
  233. package/dist/generated/prisma/internal/prismaNamespace.d.ts +1332 -142
  234. package/dist/generated/prisma/internal/prismaNamespace.js +227 -5
  235. package/dist/generated/prisma/internal/prismaNamespaceBrowser.d.ts +234 -0
  236. package/dist/generated/prisma/internal/prismaNamespaceBrowser.js +227 -5
  237. package/dist/generated/prisma/models/Agent.d.ts +464 -7
  238. package/dist/generated/prisma/models/AgentRepository.d.ts +42 -1
  239. package/dist/generated/prisma/models/CodingAgentProfile.d.ts +301 -1
  240. package/dist/generated/prisma/models/CodingProxyRequest.d.ts +207 -3
  241. package/dist/generated/prisma/models/CodingProxySession.d.ts +114 -1
  242. package/dist/generated/prisma/models/CodingRun.d.ts +1841 -1
  243. package/dist/generated/prisma/models/DeferredReview.d.ts +78 -1
  244. package/dist/generated/prisma/models/DependencySnapshot.d.ts +1668 -0
  245. package/dist/generated/prisma/models/DependencySnapshot.js +1 -0
  246. package/dist/generated/prisma/models/IssuePullRequest.d.ts +6 -2
  247. package/dist/generated/prisma/models/LocalReview.d.ts +40 -1
  248. package/dist/generated/prisma/models/NativeGatewayCall.d.ts +1713 -0
  249. package/dist/generated/prisma/models/NativeGatewayCall.js +1 -0
  250. package/dist/generated/prisma/models/NativeGatewaySession.d.ts +1551 -0
  251. package/dist/generated/prisma/models/NativeGatewaySession.js +1 -0
  252. package/dist/generated/prisma/models/NativeWarmWorker.d.ts +1296 -0
  253. package/dist/generated/prisma/models/NativeWarmWorker.js +1 -0
  254. package/dist/generated/prisma/models/NotificationChannel.d.ts +1543 -0
  255. package/dist/generated/prisma/models/NotificationChannel.js +1 -0
  256. package/dist/generated/prisma/models/NotificationDelivery.d.ts +1502 -0
  257. package/dist/generated/prisma/models/NotificationDelivery.js +1 -0
  258. package/dist/generated/prisma/models/NotificationThread.d.ts +1090 -0
  259. package/dist/generated/prisma/models/NotificationThread.js +1 -0
  260. package/dist/generated/prisma/models/RegistryAllowance.d.ts +41 -1
  261. package/dist/generated/prisma/models/RegistryApprovedVersion.d.ts +75 -1
  262. package/dist/generated/prisma/models/RegistryAuditRecord.d.ts +1364 -0
  263. package/dist/generated/prisma/models/RegistryAuditRecord.js +1 -0
  264. package/dist/generated/prisma/models/Run.d.ts +1619 -58
  265. package/dist/generated/prisma/models/RunBudgetEvent.d.ts +1211 -0
  266. package/dist/generated/prisma/models/RunBudgetEvent.js +1 -0
  267. package/dist/generated/prisma/models/RunHostCheck.d.ts +36 -1
  268. package/dist/generated/prisma/models/RunTranscript.d.ts +1339 -0
  269. package/dist/generated/prisma/models/RunTranscript.js +1 -0
  270. package/dist/generated/prisma/models/Secret.d.ts +37 -1
  271. package/dist/generated/prisma/models/SecretBrokerChange.d.ts +1101 -0
  272. package/dist/generated/prisma/models/SecretBrokerChange.js +1 -0
  273. package/dist/generated/prisma/models/WorkflowEvent.d.ts +1422 -0
  274. package/dist/generated/prisma/models/WorkflowEvent.js +1 -0
  275. package/dist/generated/prisma/models.d.ts +12 -0
  276. package/dist/help/build.js +4 -2
  277. package/dist/help/catalog.d.ts +1 -1
  278. package/dist/help/catalog.js +31 -6
  279. package/dist/help-index.json +2584 -146
  280. package/dist/import/create.js +49 -3
  281. package/dist/import/neutral-schema.d.ts +50 -277
  282. package/dist/import/neutral-schema.js +7 -4
  283. package/dist/knowledge/check.d.ts +1 -1
  284. package/dist/knowledge/cli.d.ts +11 -1
  285. package/dist/knowledge/cli.js +37 -4
  286. package/dist/knowledge/concept.d.ts +3 -19
  287. package/dist/knowledge/location.d.ts +31 -0
  288. package/dist/knowledge/location.js +78 -0
  289. package/dist/mcp/auth/access.d.ts +11 -2
  290. package/dist/mcp/auth/access.js +15 -1
  291. package/dist/mcp/auth/ownership.d.ts +7 -7
  292. package/dist/mcp/auth/repo-authorization.js +14 -0
  293. package/dist/mcp/auth/resource-server.d.ts +2 -1
  294. package/dist/mcp/auth/resource-server.js +7 -2
  295. package/dist/mcp/auth/self-hosted/browser.d.ts +1 -1
  296. package/dist/mcp/auth/self-hosted/browser.js +19 -6
  297. package/dist/mcp/auth/self-hosted/credentials.d.ts +3 -3
  298. package/dist/mcp/auth/self-hosted/session.d.ts +2 -2
  299. package/dist/mcp/context.d.ts +6 -0
  300. package/dist/mcp/host-events/github-ingress.d.ts +25 -1
  301. package/dist/mcp/host-events/github-ingress.js +70 -1
  302. package/dist/mcp/index.d.ts +19 -0
  303. package/dist/mcp/index.js +117 -20
  304. package/dist/mcp/server.d.ts +13 -0
  305. package/dist/mcp/server.js +33 -14
  306. package/dist/mcp/tools/agents.d.ts +4 -0
  307. package/dist/mcp/tools/agents.js +277 -24
  308. package/dist/mcp/tools/datastore.js +17 -8
  309. package/dist/mcp/tools/grants.js +9 -3
  310. package/dist/mcp/tools/memory.js +11 -1
  311. package/dist/mcp/tools/notification-channels.d.ts +2 -0
  312. package/dist/mcp/tools/notification-channels.js +293 -0
  313. package/dist/mcp/tools/packages.d.ts +2 -0
  314. package/dist/mcp/tools/packages.js +195 -0
  315. package/dist/mcp/tools/power.d.ts +2 -0
  316. package/dist/mcp/tools/power.js +77 -0
  317. package/dist/mcp/tools/repositories.js +18 -5
  318. package/dist/mcp/tools/run-access.d.ts +16 -0
  319. package/dist/mcp/tools/run-access.js +25 -0
  320. package/dist/mcp/tools/run-transcript-download.d.ts +30 -0
  321. package/dist/mcp/tools/run-transcript-download.js +129 -0
  322. package/dist/mcp/tools/run-transcript.d.ts +19 -0
  323. package/dist/mcp/tools/run-transcript.js +70 -0
  324. package/dist/mcp/tools/runs.d.ts +0 -6
  325. package/dist/mcp/tools/runs.js +41 -14
  326. package/dist/mcp/tools/scheduling.js +3 -1
  327. package/dist/mcp/tools/secret-broker-compat.d.ts +12 -0
  328. package/dist/mcp/tools/secret-broker-compat.js +23 -0
  329. package/dist/mcp/tools/secret-elicitation-form.d.ts +22 -2
  330. package/dist/mcp/tools/secret-elicitation-form.js +205 -10
  331. package/dist/mcp/tools/secret-elicitation-server.d.ts +6 -0
  332. package/dist/mcp/tools/secret-elicitation-server.js +10 -54
  333. package/dist/mcp/tools/secret-elicitation.d.ts +38 -3
  334. package/dist/mcp/tools/secret-elicitation.js +110 -12
  335. package/dist/mcp/tools/secrets.js +186 -9
  336. package/dist/mcp/tools/stop-run.d.ts +2 -0
  337. package/dist/mcp/tools/stop-run.js +82 -0
  338. package/dist/mcp/tools/subagents.js +2 -2
  339. package/dist/mcp/tools/tools.d.ts +2 -2
  340. package/dist/mcp/tools/tools.js +47 -11
  341. package/dist/mcp/transport/stdio-link-host.d.ts +20 -0
  342. package/dist/mcp/transport/stdio-link-host.js +67 -0
  343. package/dist/mcp/transport/streamable-http.d.ts +13 -0
  344. package/dist/mcp/transport/streamable-http.js +41 -1
  345. package/dist/native-worker/composition.d.ts +23 -0
  346. package/dist/native-worker/composition.js +77 -0
  347. package/dist/native-worker/docker-isolation.d.ts +65 -0
  348. package/dist/native-worker/docker-isolation.js +183 -0
  349. package/dist/native-worker/docker-launcher.d.ts +110 -0
  350. package/dist/native-worker/docker-launcher.js +297 -0
  351. package/dist/native-worker/gateway-server.d.ts +77 -0
  352. package/dist/native-worker/gateway-server.js +412 -0
  353. package/dist/native-worker/gateway.d.ts +70 -0
  354. package/dist/native-worker/gateway.js +263 -0
  355. package/dist/native-worker/http-server.d.ts +24 -0
  356. package/dist/native-worker/http-server.js +113 -0
  357. package/dist/native-worker/http-transport.d.ts +17 -0
  358. package/dist/native-worker/http-transport.js +88 -0
  359. package/dist/native-worker/kubernetes-isolation.d.ts +90 -0
  360. package/dist/native-worker/kubernetes-isolation.js +218 -0
  361. package/dist/native-worker/kubernetes-launcher.d.ts +106 -0
  362. package/dist/native-worker/kubernetes-launcher.js +375 -0
  363. package/dist/native-worker/launch.d.ts +62 -0
  364. package/dist/native-worker/launch.js +49 -0
  365. package/dist/native-worker/ledger.d.ts +125 -0
  366. package/dist/native-worker/ledger.js +245 -0
  367. package/dist/native-worker/loopback.d.ts +12 -0
  368. package/dist/native-worker/loopback.js +44 -0
  369. package/dist/native-worker/main.d.ts +8 -0
  370. package/dist/native-worker/main.js +85 -0
  371. package/dist/native-worker/protocol.d.ts +296 -0
  372. package/dist/native-worker/protocol.js +246 -0
  373. package/dist/native-worker/sandbox-executor.d.ts +83 -0
  374. package/dist/native-worker/sandbox-executor.js +284 -0
  375. package/dist/native-worker/stderr-redaction.d.ts +77 -0
  376. package/dist/native-worker/stderr-redaction.js +237 -0
  377. package/dist/native-worker/stdio.d.ts +29 -0
  378. package/dist/native-worker/stdio.js +189 -0
  379. package/dist/native-worker/warm-delivery.d.ts +16 -0
  380. package/dist/native-worker/warm-delivery.js +33 -0
  381. package/dist/native-worker/warm-pool-ledger.d.ts +39 -0
  382. package/dist/native-worker/warm-pool-ledger.js +73 -0
  383. package/dist/native-worker/warm-pool.d.ts +107 -0
  384. package/dist/native-worker/warm-pool.js +283 -0
  385. package/dist/native-worker/worker.d.ts +17 -0
  386. package/dist/native-worker/worker.js +141 -0
  387. package/dist/observability/metrics.js +6 -1
  388. package/dist/providers/auth/authorization-server.d.ts +3 -0
  389. package/dist/providers/auth/index.js +2 -0
  390. package/dist/providers/auth/self-hosted.d.ts +14 -2
  391. package/dist/providers/auth/self-hosted.js +54 -4
  392. package/dist/providers/chat/fake.d.ts +46 -0
  393. package/dist/providers/chat/fake.js +39 -0
  394. package/dist/providers/chat/index.d.ts +4 -0
  395. package/dist/providers/chat/index.js +8 -0
  396. package/dist/providers/chat/slack.d.ts +37 -0
  397. package/dist/providers/chat/slack.js +105 -0
  398. package/dist/providers/chat/types.d.ts +42 -0
  399. package/dist/providers/chat/types.js +19 -0
  400. package/dist/providers/coding-proxy/dependency-cache/eviction.d.ts +29 -0
  401. package/dist/providers/coding-proxy/dependency-cache/eviction.js +87 -0
  402. package/dist/providers/coding-proxy/dependency-cache/key.d.ts +33 -0
  403. package/dist/providers/coding-proxy/dependency-cache/key.js +86 -0
  404. package/dist/providers/coding-proxy/dependency-cache/model-request-seal.d.ts +18 -0
  405. package/dist/providers/coding-proxy/dependency-cache/model-request-seal.js +40 -0
  406. package/dist/providers/coding-proxy/dependency-cache/prisma-store.d.ts +25 -0
  407. package/dist/providers/coding-proxy/dependency-cache/prisma-store.js +131 -0
  408. package/dist/providers/coding-proxy/dependency-cache/service.d.ts +70 -0
  409. package/dist/providers/coding-proxy/dependency-cache/service.js +409 -0
  410. package/dist/providers/coding-proxy/dependency-cache/store.d.ts +85 -0
  411. package/dist/providers/coding-proxy/dependency-cache/store.js +95 -0
  412. package/dist/providers/coding-proxy/hold.d.ts +32 -0
  413. package/dist/providers/coding-proxy/hold.js +86 -0
  414. package/dist/providers/coding-proxy/interrupted.d.ts +70 -0
  415. package/dist/providers/coding-proxy/interrupted.js +104 -0
  416. package/dist/providers/coding-proxy/memory-ledger.d.ts +15 -2
  417. package/dist/providers/coding-proxy/memory-ledger.js +84 -8
  418. package/dist/providers/coding-proxy/metering.d.ts +16 -0
  419. package/dist/providers/coding-proxy/metering.js +27 -4
  420. package/dist/providers/coding-proxy/prisma-ledger.d.ts +15 -2
  421. package/dist/providers/coding-proxy/prisma-ledger.js +179 -67
  422. package/dist/providers/coding-proxy/proxy.d.ts +14 -1
  423. package/dist/providers/coding-proxy/proxy.js +166 -14
  424. package/dist/providers/coding-proxy/registry/audit.d.ts +53 -10
  425. package/dist/providers/coding-proxy/registry/audit.js +94 -17
  426. package/dist/providers/coding-proxy/registry/lockfile-parse-worker.d.ts +36 -0
  427. package/dist/providers/coding-proxy/registry/lockfile-parse-worker.js +67 -0
  428. package/dist/providers/coding-proxy/registry/lockfile-parse.d.ts +16 -0
  429. package/dist/providers/coding-proxy/registry/lockfile-parse.js +110 -0
  430. package/dist/providers/coding-proxy/registry/plan.d.ts +9 -0
  431. package/dist/providers/coding-proxy/registry/plan.js +201 -48
  432. package/dist/providers/coding-proxy/registry/prisma-store.d.ts +11 -5
  433. package/dist/providers/coding-proxy/registry/prisma-store.js +120 -17
  434. package/dist/providers/coding-proxy/registry/service.d.ts +97 -16
  435. package/dist/providers/coding-proxy/registry/service.js +579 -112
  436. package/dist/providers/coding-proxy/registry/store.d.ts +84 -9
  437. package/dist/providers/coding-proxy/registry/store.js +54 -1
  438. package/dist/providers/coding-proxy/runtime.d.ts +4 -0
  439. package/dist/providers/coding-proxy/runtime.js +78 -16
  440. package/dist/providers/coding-proxy/server.d.ts +6 -1
  441. package/dist/providers/coding-proxy/server.js +45 -1
  442. package/dist/providers/coding-proxy/types.d.ts +65 -1
  443. package/dist/providers/datastore/types.d.ts +5 -0
  444. package/dist/providers/engine/types.d.ts +36 -2
  445. package/dist/providers/engine/types.js +39 -0
  446. package/dist/providers/executor/composition.d.ts +31 -1
  447. package/dist/providers/executor/composition.js +81 -8
  448. package/dist/providers/executor/container.d.ts +385 -9
  449. package/dist/providers/executor/container.js +1234 -99
  450. package/dist/providers/executor/dbos-status.d.ts +31 -0
  451. package/dist/providers/executor/dbos-status.js +64 -0
  452. package/dist/providers/executor/dbos.d.ts +91 -0
  453. package/dist/providers/executor/dbos.js +319 -26
  454. package/dist/providers/executor/deferred.d.ts +44 -0
  455. package/dist/providers/executor/deferred.js +100 -0
  456. package/dist/providers/executor/in-process.d.ts +9 -1
  457. package/dist/providers/executor/in-process.js +14 -4
  458. package/dist/providers/executor/linked-issue-reader.d.ts +16 -0
  459. package/dist/providers/executor/linked-issue-reader.js +30 -0
  460. package/dist/providers/executor/routing.d.ts +39 -10
  461. package/dist/providers/executor/routing.js +77 -32
  462. package/dist/providers/executor/types.d.ts +25 -0
  463. package/dist/providers/index.d.ts +2 -1
  464. package/dist/providers/issue-tracker/types.d.ts +17 -0
  465. package/dist/providers/issue-tracker/types.js +39 -1
  466. package/dist/providers/jobs/claude-tool-setup.d.ts +4 -0
  467. package/dist/providers/jobs/claude-tool-setup.js +5 -2
  468. package/dist/providers/jobs/docker-isolation.d.ts +8 -0
  469. package/dist/providers/jobs/docker-isolation.js +17 -0
  470. package/dist/providers/jobs/docker.d.ts +1 -0
  471. package/dist/providers/jobs/docker.js +29 -4
  472. package/dist/providers/jobs/fake-kubernetes-api.d.ts +23 -2
  473. package/dist/providers/jobs/fake-kubernetes-api.js +45 -1
  474. package/dist/providers/jobs/kubernetes-api.d.ts +25 -1
  475. package/dist/providers/jobs/kubernetes-api.js +17 -0
  476. package/dist/providers/jobs/kubernetes-client.d.ts +10 -1
  477. package/dist/providers/jobs/kubernetes-client.js +61 -3
  478. package/dist/providers/jobs/kubernetes-dry-run-fixture.d.ts +6 -1
  479. package/dist/providers/jobs/kubernetes-dry-run-fixture.js +6 -3
  480. package/dist/providers/jobs/kubernetes-isolation.d.ts +5 -1
  481. package/dist/providers/jobs/kubernetes-isolation.js +23 -1
  482. package/dist/providers/jobs/kubernetes-platform.d.ts +4 -1
  483. package/dist/providers/jobs/kubernetes-platform.js +38 -1
  484. package/dist/providers/jobs/kubernetes-preflight.d.ts +2 -1
  485. package/dist/providers/jobs/kubernetes-preflight.js +4 -2
  486. package/dist/providers/jobs/kubernetes.d.ts +42 -2
  487. package/dist/providers/jobs/kubernetes.js +178 -19
  488. package/dist/providers/jobs/metadata-probes.d.ts +11 -0
  489. package/dist/providers/jobs/metadata-probes.js +13 -0
  490. package/dist/providers/jobs/types.d.ts +42 -0
  491. package/dist/providers/jobs/types.js +13 -1
  492. package/dist/providers/llm/anthropic.js +5 -1
  493. package/dist/providers/llm/bedrock.d.ts +0 -12
  494. package/dist/providers/llm/bedrock.js +4 -0
  495. package/dist/providers/llm/claude-messages.d.ts +3 -1
  496. package/dist/providers/llm/claude-messages.js +4 -1
  497. package/dist/providers/llm/claude-provider.d.ts +2 -2
  498. package/dist/providers/llm/claude-provider.js +2 -2
  499. package/dist/providers/llm/openai.d.ts +2 -2
  500. package/dist/providers/llm/openai.js +6 -2
  501. package/dist/providers/llm/routing.d.ts +2 -2
  502. package/dist/providers/llm/routing.js +2 -2
  503. package/dist/providers/llm/types.d.ts +12 -2
  504. package/dist/providers/review-host/github-events.d.ts +9 -1
  505. package/dist/providers/review-host/github-events.js +34 -12
  506. package/dist/providers/review-host/github.d.ts +39 -2
  507. package/dist/providers/review-host/github.js +274 -29
  508. package/dist/providers/review-host/local.d.ts +8 -4
  509. package/dist/providers/review-host/local.js +49 -31
  510. package/dist/providers/review-host/patch-pages.d.ts +41 -0
  511. package/dist/providers/review-host/patch-pages.js +176 -0
  512. package/dist/providers/review-host/review-format.d.ts +19 -1
  513. package/dist/providers/review-host/review-format.js +38 -7
  514. package/dist/providers/review-host/types.d.ts +157 -2
  515. package/dist/providers/review-host/types.js +8 -0
  516. package/dist/providers/storage/gcs.d.ts +63 -0
  517. package/dist/providers/storage/gcs.js +69 -0
  518. package/dist/providers/storage/index.d.ts +15 -0
  519. package/dist/providers/storage/index.js +14 -0
  520. package/dist/providers/storage/local.d.ts +24 -0
  521. package/dist/providers/storage/local.js +92 -0
  522. package/dist/providers/storage/meter.d.ts +14 -0
  523. package/dist/providers/storage/meter.js +34 -0
  524. package/dist/providers/storage/s3.d.ts +41 -0
  525. package/dist/providers/storage/s3.js +107 -0
  526. package/dist/providers/storage/types.d.ts +37 -3
  527. package/dist/providers/storage/types.js +21 -4
  528. package/dist/providers/vcs/git.d.ts +33 -2
  529. package/dist/providers/vcs/git.js +324 -22
  530. package/dist/providers/vcs/github-remote.d.ts +26 -3
  531. package/dist/providers/vcs/github-remote.js +124 -14
  532. package/dist/providers/vcs/github.d.ts +246 -12
  533. package/dist/providers/vcs/github.js +521 -61
  534. package/dist/providers/vcs/index.js +8 -1
  535. package/dist/providers/vcs/pr-description.d.ts +127 -0
  536. package/dist/providers/vcs/pr-description.js +270 -0
  537. package/dist/providers/vcs/remote.d.ts +33 -1
  538. package/dist/providers/vcs/routing.d.ts +4 -2
  539. package/dist/providers/vcs/routing.js +6 -0
  540. package/dist/providers/vcs/types.d.ts +80 -3
  541. package/dist/quickstart/coding-seed.d.ts +21 -3
  542. package/dist/quickstart/coding-seed.js +283 -3
  543. package/dist/quickstart/images.d.ts +2 -0
  544. package/dist/quickstart/images.js +7 -1
  545. package/dist/quickstart/reviewer-prompt.d.ts +1 -1
  546. package/dist/quickstart/reviewer-prompt.js +6 -6
  547. package/dist/quickstart-images.json +1 -1
  548. package/dist/sandbox/brokered-fetch.d.ts +23 -0
  549. package/dist/sandbox/brokered-fetch.js +37 -0
  550. package/dist/sandbox/generated/zod.bundle.js +62 -1
  551. package/dist/sandbox/generated/zod3.bundle.js +5 -0
  552. package/dist/sandbox/host-functions.d.ts +35 -0
  553. package/dist/sandbox/host-functions.js +150 -91
  554. package/dist/sandbox/prelude.js +7 -1
  555. package/dist/sandbox/run-in-sandbox.d.ts +19 -0
  556. package/dist/sandbox/run-in-sandbox.js +28 -10
  557. package/dist/sandbox/safe-fetch.d.ts +2 -0
  558. package/dist/sandbox/safe-fetch.js +3 -1
  559. package/dist/sandbox/secret-broker-sigv4.d.ts +2 -0
  560. package/dist/sandbox/secret-broker-sigv4.js +49 -0
  561. package/dist/sandbox/secret-broker.d.ts +34 -0
  562. package/dist/sandbox/secret-broker.js +161 -0
  563. package/dist/sandbox/tool-capabilities.d.ts +10 -30
  564. package/dist/sandbox/user-tool.d.ts +14 -0
  565. package/dist/sandbox/user-tool.js +32 -0
  566. package/dist/sandbox/zod-params.d.ts +37 -5
  567. package/dist/sandbox/zod-params.js +181 -26
  568. package/dist/serve.js +25 -0
  569. package/dist/viewer/api-schema.d.ts +372 -2454
  570. package/dist/viewer/api-schema.js +29 -0
  571. package/dist/viewer/build-schemas.js +10 -3
  572. package/dist/viewer/event-bus.d.ts +6 -0
  573. package/dist/viewer/event-bus.js +16 -7
  574. package/dist/viewer/graph.d.ts +5 -2
  575. package/dist/viewer/graph.js +7 -2
  576. package/dist/viewer/http.d.ts +0 -1
  577. package/dist/viewer/http.js +2 -2
  578. package/dist/viewer/infra.js +25 -2
  579. package/dist/viewer/limits.d.ts +4 -0
  580. package/dist/viewer/limits.js +4 -0
  581. package/dist/viewer/openapi.d.ts +15 -0
  582. package/dist/viewer/openapi.js +170 -0
  583. package/dist/wardby-bin.js +10 -0
  584. package/docs/README.md +7 -0
  585. package/docs/agent-recipes.md +114 -27
  586. package/docs/architecture-runtime.md +16 -1
  587. package/docs/code-review-agents.md +689 -45
  588. package/docs/coding-agent-setup.md +602 -12
  589. package/docs/coding-packages.md +1037 -92
  590. package/docs/coding-services.md +30 -13
  591. package/docs/coding-worker-byo-images.md +218 -6
  592. package/docs/coding-worker-isolation.md +173 -44
  593. package/docs/getting-started-gke.md +332 -129
  594. package/docs/getting-started-identity-provider.md +31 -11
  595. package/docs/getting-started.md +14 -4
  596. package/docs/jira-agents.md +22 -9
  597. package/docs/knowledge/blob-not-found-semantics.md +41 -0
  598. package/docs/knowledge/bounded-file-descriptor.md +52 -0
  599. package/docs/knowledge/delegation-admission-slots.md +52 -0
  600. package/docs/knowledge/http-dispatcher-bootstrap.md +61 -0
  601. package/docs/knowledge/import-rename-target.md +52 -0
  602. package/docs/knowledge/index.md +57 -0
  603. package/docs/knowledge/log.md +9 -0
  604. package/docs/knowledge/mcp-cancelled-task-precedence.md +41 -0
  605. package/docs/knowledge/mcp-http-prompt-discovery.md +41 -0
  606. package/docs/knowledge/mcp-schema-module-boundary.md +41 -0
  607. package/docs/knowledge/nullable-tool-uniqueness.md +52 -0
  608. package/docs/knowledge/overview-cli.md +74 -0
  609. package/docs/knowledge/overview-coding-proxy.md +72 -0
  610. package/docs/knowledge/overview-coding.md +72 -0
  611. package/docs/knowledge/overview-config.md +60 -0
  612. package/docs/knowledge/overview-core.md +72 -0
  613. package/docs/knowledge/overview-deploy.md +83 -0
  614. package/docs/knowledge/overview-mcp.md +61 -0
  615. package/docs/knowledge/overview-prisma.md +72 -0
  616. package/docs/knowledge/overview-providers.md +89 -0
  617. package/docs/knowledge/overview-sandbox.md +83 -0
  618. package/docs/knowledge/overview-surfaces.md +83 -0
  619. package/docs/knowledge/private-datastore-shared-boundary.md +54 -0
  620. package/docs/knowledge/proxy-settlement-projections.md +41 -0
  621. package/docs/knowledge/run-pricing-first-writer.md +43 -0
  622. package/docs/knowledge/schedule-claim-transaction.md +41 -0
  623. package/docs/knowledge/secret-entry-replica-contract.md +52 -0
  624. package/docs/knowledge/terminal-run-first-writer.md +41 -0
  625. package/docs/knowledge/transactional-agent-authorization.md +52 -0
  626. package/docs/knowledge/viewer-notify-write-isolation.md +30 -0
  627. package/docs/knowledge/warm-input-publication.md +30 -0
  628. package/docs/knowledge/workspace-staging-failure.md +54 -0
  629. package/docs/knowledge.md +54 -14
  630. package/docs/native-sandbox.md +731 -0
  631. package/docs/observability.md +4 -0
  632. package/docs/release-verification.md +9 -0
  633. package/docs/security-deployment.md +146 -14
  634. package/docs/slack-notifications.md +268 -0
  635. package/docs/tool-secrets.md +284 -0
  636. package/docs/viewer-api.md +46 -5
  637. package/docs/viewer-api.openapi.yml +1404 -0
  638. package/help/admin-viewer.md +29 -3
  639. package/help/agent-recipes.md +27 -0
  640. package/help/architecture-agent.md +11 -6
  641. package/help/brokered-secrets.md +79 -0
  642. package/help/build-claude-code-image.md +131 -0
  643. package/help/build-worker-image.md +6 -7
  644. package/help/builder-agent.md +19 -6
  645. package/help/code-review-agents.md +243 -10
  646. package/help/coding-packages.md +156 -6
  647. package/help/cost-attribution.md +9 -5
  648. package/help/creating-agents.md +14 -1
  649. package/help/dependency-cache.md +143 -0
  650. package/help/deploy-gke.md +23 -9
  651. package/help/deployment-targets.md +25 -14
  652. package/help/errors/budget-exhausted.md +187 -0
  653. package/help/errors/budget-group-exhausted.md +5 -1
  654. package/help/errors/coding-provider-not-configured.md +2 -2
  655. package/help/errors/coding-stream-quota-exceeded.md +33 -0
  656. package/help/errors/coding-workspace-disk-exceeds-limit.md +39 -0
  657. package/help/errors/continuation-closed.md +9 -12
  658. package/help/errors/database-auth-invalid.md +28 -0
  659. package/help/errors/delegation-conflict.md +24 -0
  660. package/help/errors/file-list-truncated.md +45 -0
  661. package/help/errors/full-read-required.md +49 -0
  662. package/help/errors/github-account-not-allowed.md +29 -0
  663. package/help/errors/graph-incomplete.md +43 -0
  664. package/help/errors/graph-limit.md +43 -0
  665. package/help/errors/low-power-disabled.md +29 -0
  666. package/help/errors/low-power-scale-forbidden.md +35 -0
  667. package/help/errors/low-power-wake-timeout.md +30 -0
  668. package/help/errors/merge-conflict.md +49 -0
  669. package/help/errors/mobile-disabled.md +31 -0
  670. package/help/errors/native-sandbox-capacity.md +22 -0
  671. package/help/errors/native-sandbox-deadline-exceeded.md +19 -0
  672. package/help/errors/native-sandbox-docker-failed.md +20 -0
  673. package/help/errors/native-sandbox-gateway-error.md +20 -0
  674. package/help/errors/native-sandbox-gateway-unavailable.md +21 -0
  675. package/help/errors/native-sandbox-image-not-pinned.md +19 -0
  676. package/help/errors/native-sandbox-isolation-mismatch.md +20 -0
  677. package/help/errors/native-sandbox-launch-abandoned.md +21 -0
  678. package/help/errors/native-sandbox-network-unenforced.md +22 -0
  679. package/help/errors/native-sandbox-requires-catalog.md +31 -0
  680. package/help/errors/native-sandbox-unavailable.md +19 -0
  681. package/help/errors/native-sandbox-warm-delivery-failed.md +21 -0
  682. package/help/errors/native-sandbox-worker-exited.md +21 -0
  683. package/help/errors/native-sandbox-worker-lost.md +20 -0
  684. package/help/errors/native-sandbox-worker-unready.md +22 -0
  685. package/help/errors/package-not-allowed-pending.md +52 -0
  686. package/help/errors/package-not-allowed.md +51 -0
  687. package/help/errors/package-refusals.md +43 -0
  688. package/help/errors/patch-cursor-malformed.md +31 -0
  689. package/help/errors/run-lost.md +39 -0
  690. package/help/errors/run-transcript-download.md +44 -0
  691. package/help/errors/secret-broker-body-invalid.md +26 -0
  692. package/help/errors/secret-broker-changed.md +20 -0
  693. package/help/errors/secret-broker-config-invalid.md +30 -0
  694. package/help/errors/secret-broker-conflict.md +27 -0
  695. package/help/errors/secret-broker-destination-denied.md +28 -0
  696. package/help/errors/secret-broker-value-invalid.md +28 -0
  697. package/help/errors/secret-brokered.md +24 -0
  698. package/help/errors/secret-in-value.md +69 -0
  699. package/help/errors/secret-not-brokered.md +25 -0
  700. package/help/errors/slack-auth-failed.md +48 -0
  701. package/help/errors/slack-channel-unreachable.md +39 -0
  702. package/help/errors/slack-not-configured.md +33 -0
  703. package/help/errors/target-merge.md +40 -0
  704. package/help/fix-merge-conflicts.md +73 -0
  705. package/help/getting-started.md +4 -5
  706. package/help/github-app-setup.md +132 -0
  707. package/help/github.md +40 -1
  708. package/help/identity-and-access.md +7 -1
  709. package/help/jira.md +23 -6
  710. package/help/knowledge.md +16 -7
  711. package/help/local-repositories.md +3 -4
  712. package/help/low-power-mode.md +131 -0
  713. package/help/merge-order-check.md +122 -0
  714. package/help/mobile-app.md +54 -0
  715. package/help/native-capabilities.md +29 -1
  716. package/help/native-sandbox.md +150 -0
  717. package/help/observability.md +8 -0
  718. package/help/operating-agents.md +5 -0
  719. package/help/package-audit-mode.md +91 -0
  720. package/help/related-pull-requests.md +80 -16
  721. package/help/repo-instructions-and-skills.md +91 -0
  722. package/help/resume-runs-locally.md +131 -0
  723. package/help/review-fix-rounds.md +43 -1
  724. package/help/sharing-agents.md +59 -0
  725. package/help/slack-notifications.md +76 -0
  726. package/help/status-comments.md +31 -0
  727. package/help/stop-run.md +58 -0
  728. package/help/troubleshooting/budgets.md +28 -0
  729. package/help/troubleshooting/coding-workers.md +99 -7
  730. package/package.json +27 -13
  731. package/prisma/migrations/20261009000003_native_execution_mode/migration.sql +12 -0
  732. package/prisma/migrations/20261009000004_native_gateway_ledger/migration.sql +65 -0
  733. package/prisma/migrations/20261009000005_native_gateway_call_child_agent/migration.sql +5 -0
  734. package/prisma/migrations/20261009000006_run_deferred_start_stop/migration.sql +14 -0
  735. package/prisma/migrations/20261009000007_native_gateway_network_ready/migration.sql +5 -0
  736. package/prisma/migrations/20261010000001_workflow_notifications/migration.sql +99 -0
  737. package/prisma/migrations/20261011000001_native_gateway_session_status_index/migration.sql +2 -0
  738. package/prisma/migrations/20261012000001_native_warm_worker/migration.sql +32 -0
  739. package/prisma/migrations/20261013000001_coding_run_merge_order/migration.sql +2 -0
  740. package/prisma/migrations/20261013000001_secret_broker/migration.sql +17 -0
  741. package/prisma/migrations/20261013000002_deferred_review_request/migration.sql +4 -0
  742. package/prisma/migrations/20261014000000_repo_skills/migration.sql +15 -0
  743. package/prisma/migrations/20261015000001_coding_run_merge_order_index/migration.sql +2 -0
  744. package/prisma/migrations/20261015000002_no_change_rereview/migration.sql +2 -0
  745. package/prisma/migrations/20261016000000_registry_approved_accepted_advisories/migration.sql +3 -0
  746. package/prisma/migrations/20261016000001_mark_ready_when_passing/migration.sql +3 -0
  747. package/prisma/migrations/20261017000000_debug_trace_max_mb/migration.sql +4 -0
  748. package/prisma/migrations/20261018000000_dependency_cache/migration.sql +53 -0
  749. package/prisma/migrations/20261019000000_claude_max_output_tokens/migration.sql +5 -0
  750. package/prisma/migrations/20261021000000_pr_description_hash/migration.sql +4 -0
  751. package/prisma/migrations/20261022000000_dependency_snapshot_validation_metadata/migration.sql +4 -0
  752. package/prisma/migrations/20261023000000_package_audit_mode/migration.sql +27 -0
  753. package/prisma/migrations/20261024000000_budget_events/migration.sql +26 -0
  754. package/prisma/migrations/20261025000000_cache_aware_holds/migration.sql +9 -0
  755. package/prisma/migrations/20261026000000_budget_overrun/migration.sql +4 -0
  756. package/prisma/migrations/20261027000000_coding_run_request/migration.sql +1 -0
  757. package/prisma/migrations/20261028000000_native_gateway_review_reads/migration.sql +6 -0
  758. package/prisma/migrations/20261029000000_lead_survives_deploy/migration.sql +6 -0
  759. package/prisma/migrations/20261030000000_local_review_covered_sha/migration.sql +2 -0
  760. package/prisma/migrations/20261031000000_coding_run_budget_limit/migration.sql +9 -0
  761. package/prisma/migrations/20261101000000_run_transcripts/migration.sql +22 -0
  762. package/prisma/schema.prisma +631 -146
  763. package/dist/sandbox/generated/zod-to-json-schema.bundle.js +0 -5
@@ -6,76 +6,44 @@
6
6
  * `npm run build:viewer-schemas`, and commit the regenerated files.
7
7
  */
8
8
  import { z } from "zod";
9
- export declare const RunStatusSchema: z.ZodEnum<["pending", "running", "succeeded", "failed", "refused", "lost", "budget_exhausted", "cancelled"]>;
9
+ export declare const RunStatusSchema: z.ZodEnum<{
10
+ pending: "pending";
11
+ failed: "failed";
12
+ budget_exhausted: "budget_exhausted";
13
+ refused: "refused";
14
+ lost: "lost";
15
+ running: "running";
16
+ succeeded: "succeeded";
17
+ cancelled: "cancelled";
18
+ }>;
10
19
  /** What started a run, resolved for display. A sub-agent run's cause is its parent (parentRunId). */
11
- export declare const RunTriggerSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
20
+ export declare const RunTriggerSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
12
21
  kind: z.ZodLiteral<"manual">;
13
- }, "strip", z.ZodTypeAny, {
14
- kind: "manual";
15
- }, {
16
- kind: "manual";
17
- }>, z.ZodObject<{
22
+ }, z.core.$strip>, z.ZodObject<{
18
23
  kind: z.ZodLiteral<"scheduled">;
19
24
  schedule: z.ZodNullable<z.ZodString>;
20
- }, "strip", z.ZodTypeAny, {
21
- kind: "scheduled";
22
- schedule: string | null;
23
- }, {
24
- kind: "scheduled";
25
- schedule: string | null;
26
- }>, z.ZodObject<{
25
+ }, z.core.$strip>, z.ZodObject<{
27
26
  kind: z.ZodLiteral<"webhook">;
28
- }, "strip", z.ZodTypeAny, {
29
- kind: "webhook";
30
- }, {
31
- kind: "webhook";
32
- }>, z.ZodObject<{
27
+ }, z.core.$strip>, z.ZodObject<{
33
28
  kind: z.ZodLiteral<"subagent">;
34
- }, "strip", z.ZodTypeAny, {
35
- kind: "subagent";
36
- }, {
37
- kind: "subagent";
38
- }>, z.ZodObject<{
29
+ }, z.core.$strip>, z.ZodObject<{
39
30
  kind: z.ZodLiteral<"code_host">;
40
31
  provider: z.ZodString;
41
32
  repository: z.ZodString;
42
33
  number: z.ZodNullable<z.ZodNumber>;
43
- event: z.ZodEnum<["review", "mention"]>;
44
- }, "strip", z.ZodTypeAny, {
45
- number: number | null;
46
- repository: string;
47
- provider: string;
48
- event: "mention" | "review";
49
- kind: "code_host";
50
- }, {
51
- number: number | null;
52
- repository: string;
53
- provider: string;
54
- event: "mention" | "review";
55
- kind: "code_host";
56
- }>, z.ZodObject<{
34
+ event: z.ZodEnum<{
35
+ mention: "mention";
36
+ review: "review";
37
+ }>;
38
+ }, z.core.$strip>, z.ZodObject<{
57
39
  kind: z.ZodLiteral<"issue">;
58
40
  provider: z.ZodString;
59
41
  issueKey: z.ZodString;
60
42
  url: z.ZodNullable<z.ZodString>;
61
- }, "strip", z.ZodTypeAny, {
62
- provider: string;
63
- kind: "issue";
64
- url: string | null;
65
- issueKey: string;
66
- }, {
67
- provider: string;
68
- kind: "issue";
69
- url: string | null;
70
- issueKey: string;
71
- }>, z.ZodObject<{
43
+ }, z.core.$strip>, z.ZodObject<{
72
44
  kind: z.ZodLiteral<"host_event">;
73
- }, "strip", z.ZodTypeAny, {
74
- kind: "host_event";
75
- }, {
76
- kind: "host_event";
77
- }>]>;
78
- export declare const OutcomeSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
45
+ }, z.core.$strip>], "kind">;
46
+ export declare const OutcomeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
79
47
  kind: z.ZodLiteral<"pull_request">;
80
48
  provider: z.ZodString;
81
49
  repository: z.ZodString;
@@ -83,183 +51,92 @@ export declare const OutcomeSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject
83
51
  url: z.ZodString;
84
52
  state: z.ZodNullable<z.ZodString>;
85
53
  at: z.ZodNullable<z.ZodString>;
86
- }, "strip", z.ZodTypeAny, {
87
- number: number;
88
- at: string | null;
89
- repository: string;
90
- provider: string;
91
- kind: "pull_request";
92
- url: string;
93
- state: string | null;
94
- }, {
95
- number: number;
96
- at: string | null;
97
- repository: string;
98
- provider: string;
99
- kind: "pull_request";
100
- url: string;
101
- state: string | null;
102
- }>, z.ZodObject<{
54
+ }, z.core.$strip>, z.ZodObject<{
103
55
  kind: z.ZodLiteral<"code_host_comment">;
104
56
  provider: z.ZodString;
105
57
  repository: z.ZodString;
106
58
  number: z.ZodNumber;
107
59
  at: z.ZodNullable<z.ZodString>;
108
- }, "strip", z.ZodTypeAny, {
109
- number: number;
110
- at: string | null;
111
- repository: string;
112
- provider: string;
113
- kind: "code_host_comment";
114
- }, {
115
- number: number;
116
- at: string | null;
117
- repository: string;
118
- provider: string;
119
- kind: "code_host_comment";
120
- }>, z.ZodObject<{
60
+ }, z.core.$strip>, z.ZodObject<{
121
61
  kind: z.ZodLiteral<"issue_comment">;
122
62
  provider: z.ZodString;
123
63
  issueKey: z.ZodString;
124
64
  url: z.ZodNullable<z.ZodString>;
125
65
  at: z.ZodNullable<z.ZodString>;
126
- }, "strip", z.ZodTypeAny, {
127
- at: string | null;
128
- provider: string;
129
- kind: "issue_comment";
130
- url: string | null;
131
- issueKey: string;
132
- }, {
133
- at: string | null;
134
- provider: string;
135
- kind: "issue_comment";
136
- url: string | null;
137
- issueKey: string;
138
- }>, z.ZodObject<{
66
+ }, z.core.$strip>, z.ZodObject<{
139
67
  kind: z.ZodLiteral<"check">;
140
68
  provider: z.ZodString;
141
69
  repository: z.ZodString;
142
70
  number: z.ZodNullable<z.ZodNumber>;
143
71
  completed: z.ZodBoolean;
144
72
  at: z.ZodNullable<z.ZodString>;
145
- }, "strip", z.ZodTypeAny, {
146
- number: number | null;
147
- at: string | null;
148
- repository: string;
149
- provider: string;
150
- completed: boolean;
151
- kind: "check";
152
- }, {
153
- number: number | null;
154
- at: string | null;
155
- repository: string;
156
- provider: string;
157
- completed: boolean;
158
- kind: "check";
159
- }>]>;
73
+ }, z.core.$strip>], "kind">;
160
74
  export declare const ServiceStatusSchema: z.ZodObject<{
161
75
  name: z.ZodString;
162
- state: z.ZodEnum<["pending", "probing", "ready", "failed"]>;
76
+ state: z.ZodEnum<{
77
+ pending: "pending";
78
+ ready: "ready";
79
+ failed: "failed";
80
+ probing: "probing";
81
+ }>;
163
82
  attempts: z.ZodNullable<z.ZodNumber>;
164
83
  reason: z.ZodNullable<z.ZodString>;
165
84
  readyAt: z.ZodNullable<z.ZodString>;
166
85
  failedAt: z.ZodNullable<z.ZodString>;
167
86
  createdAt: z.ZodString;
168
- }, "strip", z.ZodTypeAny, {
169
- name: string;
170
- createdAt: string;
171
- state: "failed" | "pending" | "probing" | "ready";
172
- reason: string | null;
173
- attempts: number | null;
174
- readyAt: string | null;
175
- failedAt: string | null;
176
- }, {
177
- name: string;
178
- createdAt: string;
179
- state: "failed" | "pending" | "probing" | "ready";
180
- reason: string | null;
181
- attempts: number | null;
182
- readyAt: string | null;
183
- failedAt: string | null;
184
- }>;
87
+ }, z.core.$strip>;
185
88
  export declare const GraphRunSchema: z.ZodObject<{
186
89
  id: z.ZodString;
187
90
  parentRunId: z.ZodNullable<z.ZodString>;
188
91
  agentId: z.ZodString;
189
92
  agentName: z.ZodString;
190
- agentKind: z.ZodEnum<["native", "coding"]>;
191
- /** The coding run's model, else the agent's. */
93
+ agentKind: z.ZodEnum<{
94
+ native: "native";
95
+ coding: "coding";
96
+ }>;
192
97
  model: z.ZodString;
193
- /** The coding worker (e.g. `codex`, `claude-code`); null for native runs. */
194
98
  codingProvider: z.ZodNullable<z.ZodString>;
195
- status: z.ZodEnum<["pending", "running", "succeeded", "failed", "refused", "lost", "budget_exhausted", "cancelled"]>;
196
- trigger: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
99
+ nativeExecutionMode: z.ZodNullable<z.ZodEnum<{
100
+ sandbox: "sandbox";
101
+ "control-plane": "control-plane";
102
+ }>>;
103
+ warmWorkerName: z.ZodNullable<z.ZodString>;
104
+ status: z.ZodEnum<{
105
+ pending: "pending";
106
+ failed: "failed";
107
+ budget_exhausted: "budget_exhausted";
108
+ refused: "refused";
109
+ lost: "lost";
110
+ running: "running";
111
+ succeeded: "succeeded";
112
+ cancelled: "cancelled";
113
+ }>;
114
+ trigger: z.ZodDiscriminatedUnion<[z.ZodObject<{
197
115
  kind: z.ZodLiteral<"manual">;
198
- }, "strip", z.ZodTypeAny, {
199
- kind: "manual";
200
- }, {
201
- kind: "manual";
202
- }>, z.ZodObject<{
116
+ }, z.core.$strip>, z.ZodObject<{
203
117
  kind: z.ZodLiteral<"scheduled">;
204
118
  schedule: z.ZodNullable<z.ZodString>;
205
- }, "strip", z.ZodTypeAny, {
206
- kind: "scheduled";
207
- schedule: string | null;
208
- }, {
209
- kind: "scheduled";
210
- schedule: string | null;
211
- }>, z.ZodObject<{
119
+ }, z.core.$strip>, z.ZodObject<{
212
120
  kind: z.ZodLiteral<"webhook">;
213
- }, "strip", z.ZodTypeAny, {
214
- kind: "webhook";
215
- }, {
216
- kind: "webhook";
217
- }>, z.ZodObject<{
121
+ }, z.core.$strip>, z.ZodObject<{
218
122
  kind: z.ZodLiteral<"subagent">;
219
- }, "strip", z.ZodTypeAny, {
220
- kind: "subagent";
221
- }, {
222
- kind: "subagent";
223
- }>, z.ZodObject<{
123
+ }, z.core.$strip>, z.ZodObject<{
224
124
  kind: z.ZodLiteral<"code_host">;
225
125
  provider: z.ZodString;
226
126
  repository: z.ZodString;
227
127
  number: z.ZodNullable<z.ZodNumber>;
228
- event: z.ZodEnum<["review", "mention"]>;
229
- }, "strip", z.ZodTypeAny, {
230
- number: number | null;
231
- repository: string;
232
- provider: string;
233
- event: "mention" | "review";
234
- kind: "code_host";
235
- }, {
236
- number: number | null;
237
- repository: string;
238
- provider: string;
239
- event: "mention" | "review";
240
- kind: "code_host";
241
- }>, z.ZodObject<{
128
+ event: z.ZodEnum<{
129
+ mention: "mention";
130
+ review: "review";
131
+ }>;
132
+ }, z.core.$strip>, z.ZodObject<{
242
133
  kind: z.ZodLiteral<"issue">;
243
134
  provider: z.ZodString;
244
135
  issueKey: z.ZodString;
245
136
  url: z.ZodNullable<z.ZodString>;
246
- }, "strip", z.ZodTypeAny, {
247
- provider: string;
248
- kind: "issue";
249
- url: string | null;
250
- issueKey: string;
251
- }, {
252
- provider: string;
253
- kind: "issue";
254
- url: string | null;
255
- issueKey: string;
256
- }>, z.ZodObject<{
137
+ }, z.core.$strip>, z.ZodObject<{
257
138
  kind: z.ZodLiteral<"host_event">;
258
- }, "strip", z.ZodTypeAny, {
259
- kind: "host_event";
260
- }, {
261
- kind: "host_event";
262
- }>]>;
139
+ }, z.core.$strip>], "kind">;
263
140
  turns: z.ZodNumber;
264
141
  tokensIn: z.ZodNumber;
265
142
  tokensOut: z.ZodNumber;
@@ -268,7 +145,7 @@ export declare const GraphRunSchema: z.ZodObject<{
268
145
  startedAt: z.ZodString;
269
146
  finishedAt: z.ZodNullable<z.ZodString>;
270
147
  heartbeatAt: z.ZodNullable<z.ZodString>;
271
- outcomes: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
148
+ outcomes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
272
149
  kind: z.ZodLiteral<"pull_request">;
273
150
  provider: z.ZodString;
274
151
  repository: z.ZodString;
@@ -276,296 +153,51 @@ export declare const GraphRunSchema: z.ZodObject<{
276
153
  url: z.ZodString;
277
154
  state: z.ZodNullable<z.ZodString>;
278
155
  at: z.ZodNullable<z.ZodString>;
279
- }, "strip", z.ZodTypeAny, {
280
- number: number;
281
- at: string | null;
282
- repository: string;
283
- provider: string;
284
- kind: "pull_request";
285
- url: string;
286
- state: string | null;
287
- }, {
288
- number: number;
289
- at: string | null;
290
- repository: string;
291
- provider: string;
292
- kind: "pull_request";
293
- url: string;
294
- state: string | null;
295
- }>, z.ZodObject<{
156
+ }, z.core.$strip>, z.ZodObject<{
296
157
  kind: z.ZodLiteral<"code_host_comment">;
297
158
  provider: z.ZodString;
298
159
  repository: z.ZodString;
299
160
  number: z.ZodNumber;
300
161
  at: z.ZodNullable<z.ZodString>;
301
- }, "strip", z.ZodTypeAny, {
302
- number: number;
303
- at: string | null;
304
- repository: string;
305
- provider: string;
306
- kind: "code_host_comment";
307
- }, {
308
- number: number;
309
- at: string | null;
310
- repository: string;
311
- provider: string;
312
- kind: "code_host_comment";
313
- }>, z.ZodObject<{
162
+ }, z.core.$strip>, z.ZodObject<{
314
163
  kind: z.ZodLiteral<"issue_comment">;
315
164
  provider: z.ZodString;
316
165
  issueKey: z.ZodString;
317
166
  url: z.ZodNullable<z.ZodString>;
318
167
  at: z.ZodNullable<z.ZodString>;
319
- }, "strip", z.ZodTypeAny, {
320
- at: string | null;
321
- provider: string;
322
- kind: "issue_comment";
323
- url: string | null;
324
- issueKey: string;
325
- }, {
326
- at: string | null;
327
- provider: string;
328
- kind: "issue_comment";
329
- url: string | null;
330
- issueKey: string;
331
- }>, z.ZodObject<{
168
+ }, z.core.$strip>, z.ZodObject<{
332
169
  kind: z.ZodLiteral<"check">;
333
170
  provider: z.ZodString;
334
171
  repository: z.ZodString;
335
172
  number: z.ZodNullable<z.ZodNumber>;
336
173
  completed: z.ZodBoolean;
337
174
  at: z.ZodNullable<z.ZodString>;
338
- }, "strip", z.ZodTypeAny, {
339
- number: number | null;
340
- at: string | null;
341
- repository: string;
342
- provider: string;
343
- completed: boolean;
344
- kind: "check";
345
- }, {
346
- number: number | null;
347
- at: string | null;
348
- repository: string;
349
- provider: string;
350
- completed: boolean;
351
- kind: "check";
352
- }>]>, "many">;
353
- /** The services a coding run was started with, recorded or not; empty for native runs. */
175
+ }, z.core.$strip>], "kind">>;
354
176
  declaredServices: z.ZodArray<z.ZodObject<{
355
177
  name: z.ZodString;
356
178
  version: z.ZodString;
357
- }, "strip", z.ZodTypeAny, {
358
- name: string;
359
- version: string;
360
- }, {
361
- name: string;
362
- version: string;
363
- }>, "many">;
364
- /** Recorded readiness of the run's services (none before status tracking existed). */
179
+ }, z.core.$strip>>;
365
180
  services: z.ZodArray<z.ZodObject<{
366
181
  name: z.ZodString;
367
- state: z.ZodEnum<["pending", "probing", "ready", "failed"]>;
182
+ state: z.ZodEnum<{
183
+ pending: "pending";
184
+ ready: "ready";
185
+ failed: "failed";
186
+ probing: "probing";
187
+ }>;
368
188
  attempts: z.ZodNullable<z.ZodNumber>;
369
189
  reason: z.ZodNullable<z.ZodString>;
370
190
  readyAt: z.ZodNullable<z.ZodString>;
371
191
  failedAt: z.ZodNullable<z.ZodString>;
372
192
  createdAt: z.ZodString;
373
- }, "strip", z.ZodTypeAny, {
374
- name: string;
375
- createdAt: string;
376
- state: "failed" | "pending" | "probing" | "ready";
377
- reason: string | null;
378
- attempts: number | null;
379
- readyAt: string | null;
380
- failedAt: string | null;
381
- }, {
382
- name: string;
383
- createdAt: string;
384
- state: "failed" | "pending" | "probing" | "ready";
385
- reason: string | null;
386
- attempts: number | null;
387
- readyAt: string | null;
388
- failedAt: string | null;
389
- }>, "many">;
390
- }, "strip", z.ZodTypeAny, {
391
- status: "failed" | "budget_exhausted" | "lost" | "pending" | "running" | "succeeded" | "refused" | "cancelled";
392
- tokensIn: number;
393
- tokensOut: number;
394
- costUsd: number;
395
- model: string;
396
- budgetUsd: number;
397
- services: {
398
- name: string;
399
- createdAt: string;
400
- state: "failed" | "pending" | "probing" | "ready";
401
- reason: string | null;
402
- attempts: number | null;
403
- readyAt: string | null;
404
- failedAt: string | null;
405
- }[];
406
- id: string;
407
- agentId: string;
408
- trigger: {
409
- kind: "manual";
410
- } | {
411
- kind: "scheduled";
412
- schedule: string | null;
413
- } | {
414
- kind: "webhook";
415
- } | {
416
- kind: "subagent";
417
- } | {
418
- number: number | null;
419
- repository: string;
420
- provider: string;
421
- event: "mention" | "review";
422
- kind: "code_host";
423
- } | {
424
- provider: string;
425
- kind: "issue";
426
- url: string | null;
427
- issueKey: string;
428
- } | {
429
- kind: "host_event";
430
- };
431
- startedAt: string;
432
- finishedAt: string | null;
433
- heartbeatAt: string | null;
434
- turns: number;
435
- parentRunId: string | null;
436
- agentKind: "native" | "coding";
437
- agentName: string;
438
- codingProvider: string | null;
439
- outcomes: ({
440
- number: number;
441
- at: string | null;
442
- repository: string;
443
- provider: string;
444
- kind: "pull_request";
445
- url: string;
446
- state: string | null;
447
- } | {
448
- number: number;
449
- at: string | null;
450
- repository: string;
451
- provider: string;
452
- kind: "code_host_comment";
453
- } | {
454
- at: string | null;
455
- provider: string;
456
- kind: "issue_comment";
457
- url: string | null;
458
- issueKey: string;
459
- } | {
460
- number: number | null;
461
- at: string | null;
462
- repository: string;
463
- provider: string;
464
- completed: boolean;
465
- kind: "check";
466
- })[];
467
- declaredServices: {
468
- name: string;
469
- version: string;
470
- }[];
471
- }, {
472
- status: "failed" | "budget_exhausted" | "lost" | "pending" | "running" | "succeeded" | "refused" | "cancelled";
473
- tokensIn: number;
474
- tokensOut: number;
475
- costUsd: number;
476
- model: string;
477
- budgetUsd: number;
478
- services: {
479
- name: string;
480
- createdAt: string;
481
- state: "failed" | "pending" | "probing" | "ready";
482
- reason: string | null;
483
- attempts: number | null;
484
- readyAt: string | null;
485
- failedAt: string | null;
486
- }[];
487
- id: string;
488
- agentId: string;
489
- trigger: {
490
- kind: "manual";
491
- } | {
492
- kind: "scheduled";
493
- schedule: string | null;
494
- } | {
495
- kind: "webhook";
496
- } | {
497
- kind: "subagent";
498
- } | {
499
- number: number | null;
500
- repository: string;
501
- provider: string;
502
- event: "mention" | "review";
503
- kind: "code_host";
504
- } | {
505
- provider: string;
506
- kind: "issue";
507
- url: string | null;
508
- issueKey: string;
509
- } | {
510
- kind: "host_event";
511
- };
512
- startedAt: string;
513
- finishedAt: string | null;
514
- heartbeatAt: string | null;
515
- turns: number;
516
- parentRunId: string | null;
517
- agentKind: "native" | "coding";
518
- agentName: string;
519
- codingProvider: string | null;
520
- outcomes: ({
521
- number: number;
522
- at: string | null;
523
- repository: string;
524
- provider: string;
525
- kind: "pull_request";
526
- url: string;
527
- state: string | null;
528
- } | {
529
- number: number;
530
- at: string | null;
531
- repository: string;
532
- provider: string;
533
- kind: "code_host_comment";
534
- } | {
535
- at: string | null;
536
- provider: string;
537
- kind: "issue_comment";
538
- url: string | null;
539
- issueKey: string;
540
- } | {
541
- number: number | null;
542
- at: string | null;
543
- repository: string;
544
- provider: string;
545
- completed: boolean;
546
- kind: "check";
547
- })[];
548
- declaredServices: {
549
- name: string;
550
- version: string;
551
- }[];
552
- }>;
193
+ }, z.core.$strip>>;
194
+ }, z.core.$strip>;
553
195
  export declare const BudgetGroupSpendSchema: z.ZodObject<{
554
196
  id: z.ZodString;
555
197
  name: z.ZodString;
556
198
  dailyBudgetUsd: z.ZodNullable<z.ZodNumber>;
557
199
  spentTodayUsd: z.ZodNumber;
558
- }, "strip", z.ZodTypeAny, {
559
- name: string;
560
- id: string;
561
- dailyBudgetUsd: number | null;
562
- spentTodayUsd: number;
563
- }, {
564
- name: string;
565
- id: string;
566
- dailyBudgetUsd: number | null;
567
- spentTodayUsd: number;
568
- }>;
200
+ }, z.core.$strip>;
569
201
  export declare const GraphSnapshotSchema: z.ZodObject<{
570
202
  generatedAt: z.ZodString;
571
203
  since: z.ZodString;
@@ -576,79 +208,53 @@ export declare const GraphSnapshotSchema: z.ZodObject<{
576
208
  parentRunId: z.ZodNullable<z.ZodString>;
577
209
  agentId: z.ZodString;
578
210
  agentName: z.ZodString;
579
- agentKind: z.ZodEnum<["native", "coding"]>;
580
- /** The coding run's model, else the agent's. */
211
+ agentKind: z.ZodEnum<{
212
+ native: "native";
213
+ coding: "coding";
214
+ }>;
581
215
  model: z.ZodString;
582
- /** The coding worker (e.g. `codex`, `claude-code`); null for native runs. */
583
216
  codingProvider: z.ZodNullable<z.ZodString>;
584
- status: z.ZodEnum<["pending", "running", "succeeded", "failed", "refused", "lost", "budget_exhausted", "cancelled"]>;
585
- trigger: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
217
+ nativeExecutionMode: z.ZodNullable<z.ZodEnum<{
218
+ sandbox: "sandbox";
219
+ "control-plane": "control-plane";
220
+ }>>;
221
+ warmWorkerName: z.ZodNullable<z.ZodString>;
222
+ status: z.ZodEnum<{
223
+ pending: "pending";
224
+ failed: "failed";
225
+ budget_exhausted: "budget_exhausted";
226
+ refused: "refused";
227
+ lost: "lost";
228
+ running: "running";
229
+ succeeded: "succeeded";
230
+ cancelled: "cancelled";
231
+ }>;
232
+ trigger: z.ZodDiscriminatedUnion<[z.ZodObject<{
586
233
  kind: z.ZodLiteral<"manual">;
587
- }, "strip", z.ZodTypeAny, {
588
- kind: "manual";
589
- }, {
590
- kind: "manual";
591
- }>, z.ZodObject<{
234
+ }, z.core.$strip>, z.ZodObject<{
592
235
  kind: z.ZodLiteral<"scheduled">;
593
236
  schedule: z.ZodNullable<z.ZodString>;
594
- }, "strip", z.ZodTypeAny, {
595
- kind: "scheduled";
596
- schedule: string | null;
597
- }, {
598
- kind: "scheduled";
599
- schedule: string | null;
600
- }>, z.ZodObject<{
237
+ }, z.core.$strip>, z.ZodObject<{
601
238
  kind: z.ZodLiteral<"webhook">;
602
- }, "strip", z.ZodTypeAny, {
603
- kind: "webhook";
604
- }, {
605
- kind: "webhook";
606
- }>, z.ZodObject<{
239
+ }, z.core.$strip>, z.ZodObject<{
607
240
  kind: z.ZodLiteral<"subagent">;
608
- }, "strip", z.ZodTypeAny, {
609
- kind: "subagent";
610
- }, {
611
- kind: "subagent";
612
- }>, z.ZodObject<{
241
+ }, z.core.$strip>, z.ZodObject<{
613
242
  kind: z.ZodLiteral<"code_host">;
614
243
  provider: z.ZodString;
615
244
  repository: z.ZodString;
616
245
  number: z.ZodNullable<z.ZodNumber>;
617
- event: z.ZodEnum<["review", "mention"]>;
618
- }, "strip", z.ZodTypeAny, {
619
- number: number | null;
620
- repository: string;
621
- provider: string;
622
- event: "mention" | "review";
623
- kind: "code_host";
624
- }, {
625
- number: number | null;
626
- repository: string;
627
- provider: string;
628
- event: "mention" | "review";
629
- kind: "code_host";
630
- }>, z.ZodObject<{
246
+ event: z.ZodEnum<{
247
+ mention: "mention";
248
+ review: "review";
249
+ }>;
250
+ }, z.core.$strip>, z.ZodObject<{
631
251
  kind: z.ZodLiteral<"issue">;
632
252
  provider: z.ZodString;
633
253
  issueKey: z.ZodString;
634
254
  url: z.ZodNullable<z.ZodString>;
635
- }, "strip", z.ZodTypeAny, {
636
- provider: string;
637
- kind: "issue";
638
- url: string | null;
639
- issueKey: string;
640
- }, {
641
- provider: string;
642
- kind: "issue";
643
- url: string | null;
644
- issueKey: string;
645
- }>, z.ZodObject<{
255
+ }, z.core.$strip>, z.ZodObject<{
646
256
  kind: z.ZodLiteral<"host_event">;
647
- }, "strip", z.ZodTypeAny, {
648
- kind: "host_event";
649
- }, {
650
- kind: "host_event";
651
- }>]>;
257
+ }, z.core.$strip>], "kind">;
652
258
  turns: z.ZodNumber;
653
259
  tokensIn: z.ZodNumber;
654
260
  tokensOut: z.ZodNumber;
@@ -657,7 +263,7 @@ export declare const GraphSnapshotSchema: z.ZodObject<{
657
263
  startedAt: z.ZodString;
658
264
  finishedAt: z.ZodNullable<z.ZodString>;
659
265
  heartbeatAt: z.ZodNullable<z.ZodString>;
660
- outcomes: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
266
+ outcomes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
661
267
  kind: z.ZodLiteral<"pull_request">;
662
268
  provider: z.ZodString;
663
269
  repository: z.ZodString;
@@ -665,280 +271,45 @@ export declare const GraphSnapshotSchema: z.ZodObject<{
665
271
  url: z.ZodString;
666
272
  state: z.ZodNullable<z.ZodString>;
667
273
  at: z.ZodNullable<z.ZodString>;
668
- }, "strip", z.ZodTypeAny, {
669
- number: number;
670
- at: string | null;
671
- repository: string;
672
- provider: string;
673
- kind: "pull_request";
674
- url: string;
675
- state: string | null;
676
- }, {
677
- number: number;
678
- at: string | null;
679
- repository: string;
680
- provider: string;
681
- kind: "pull_request";
682
- url: string;
683
- state: string | null;
684
- }>, z.ZodObject<{
274
+ }, z.core.$strip>, z.ZodObject<{
685
275
  kind: z.ZodLiteral<"code_host_comment">;
686
276
  provider: z.ZodString;
687
277
  repository: z.ZodString;
688
278
  number: z.ZodNumber;
689
279
  at: z.ZodNullable<z.ZodString>;
690
- }, "strip", z.ZodTypeAny, {
691
- number: number;
692
- at: string | null;
693
- repository: string;
694
- provider: string;
695
- kind: "code_host_comment";
696
- }, {
697
- number: number;
698
- at: string | null;
699
- repository: string;
700
- provider: string;
701
- kind: "code_host_comment";
702
- }>, z.ZodObject<{
280
+ }, z.core.$strip>, z.ZodObject<{
703
281
  kind: z.ZodLiteral<"issue_comment">;
704
282
  provider: z.ZodString;
705
283
  issueKey: z.ZodString;
706
284
  url: z.ZodNullable<z.ZodString>;
707
285
  at: z.ZodNullable<z.ZodString>;
708
- }, "strip", z.ZodTypeAny, {
709
- at: string | null;
710
- provider: string;
711
- kind: "issue_comment";
712
- url: string | null;
713
- issueKey: string;
714
- }, {
715
- at: string | null;
716
- provider: string;
717
- kind: "issue_comment";
718
- url: string | null;
719
- issueKey: string;
720
- }>, z.ZodObject<{
286
+ }, z.core.$strip>, z.ZodObject<{
721
287
  kind: z.ZodLiteral<"check">;
722
288
  provider: z.ZodString;
723
289
  repository: z.ZodString;
724
290
  number: z.ZodNullable<z.ZodNumber>;
725
291
  completed: z.ZodBoolean;
726
292
  at: z.ZodNullable<z.ZodString>;
727
- }, "strip", z.ZodTypeAny, {
728
- number: number | null;
729
- at: string | null;
730
- repository: string;
731
- provider: string;
732
- completed: boolean;
733
- kind: "check";
734
- }, {
735
- number: number | null;
736
- at: string | null;
737
- repository: string;
738
- provider: string;
739
- completed: boolean;
740
- kind: "check";
741
- }>]>, "many">;
742
- /** The services a coding run was started with, recorded or not; empty for native runs. */
293
+ }, z.core.$strip>], "kind">>;
743
294
  declaredServices: z.ZodArray<z.ZodObject<{
744
295
  name: z.ZodString;
745
296
  version: z.ZodString;
746
- }, "strip", z.ZodTypeAny, {
747
- name: string;
748
- version: string;
749
- }, {
750
- name: string;
751
- version: string;
752
- }>, "many">;
753
- /** Recorded readiness of the run's services (none before status tracking existed). */
297
+ }, z.core.$strip>>;
754
298
  services: z.ZodArray<z.ZodObject<{
755
299
  name: z.ZodString;
756
- state: z.ZodEnum<["pending", "probing", "ready", "failed"]>;
300
+ state: z.ZodEnum<{
301
+ pending: "pending";
302
+ ready: "ready";
303
+ failed: "failed";
304
+ probing: "probing";
305
+ }>;
757
306
  attempts: z.ZodNullable<z.ZodNumber>;
758
307
  reason: z.ZodNullable<z.ZodString>;
759
308
  readyAt: z.ZodNullable<z.ZodString>;
760
309
  failedAt: z.ZodNullable<z.ZodString>;
761
310
  createdAt: z.ZodString;
762
- }, "strip", z.ZodTypeAny, {
763
- name: string;
764
- createdAt: string;
765
- state: "failed" | "pending" | "probing" | "ready";
766
- reason: string | null;
767
- attempts: number | null;
768
- readyAt: string | null;
769
- failedAt: string | null;
770
- }, {
771
- name: string;
772
- createdAt: string;
773
- state: "failed" | "pending" | "probing" | "ready";
774
- reason: string | null;
775
- attempts: number | null;
776
- readyAt: string | null;
777
- failedAt: string | null;
778
- }>, "many">;
779
- }, "strip", z.ZodTypeAny, {
780
- status: "failed" | "budget_exhausted" | "lost" | "pending" | "running" | "succeeded" | "refused" | "cancelled";
781
- tokensIn: number;
782
- tokensOut: number;
783
- costUsd: number;
784
- model: string;
785
- budgetUsd: number;
786
- services: {
787
- name: string;
788
- createdAt: string;
789
- state: "failed" | "pending" | "probing" | "ready";
790
- reason: string | null;
791
- attempts: number | null;
792
- readyAt: string | null;
793
- failedAt: string | null;
794
- }[];
795
- id: string;
796
- agentId: string;
797
- trigger: {
798
- kind: "manual";
799
- } | {
800
- kind: "scheduled";
801
- schedule: string | null;
802
- } | {
803
- kind: "webhook";
804
- } | {
805
- kind: "subagent";
806
- } | {
807
- number: number | null;
808
- repository: string;
809
- provider: string;
810
- event: "mention" | "review";
811
- kind: "code_host";
812
- } | {
813
- provider: string;
814
- kind: "issue";
815
- url: string | null;
816
- issueKey: string;
817
- } | {
818
- kind: "host_event";
819
- };
820
- startedAt: string;
821
- finishedAt: string | null;
822
- heartbeatAt: string | null;
823
- turns: number;
824
- parentRunId: string | null;
825
- agentKind: "native" | "coding";
826
- agentName: string;
827
- codingProvider: string | null;
828
- outcomes: ({
829
- number: number;
830
- at: string | null;
831
- repository: string;
832
- provider: string;
833
- kind: "pull_request";
834
- url: string;
835
- state: string | null;
836
- } | {
837
- number: number;
838
- at: string | null;
839
- repository: string;
840
- provider: string;
841
- kind: "code_host_comment";
842
- } | {
843
- at: string | null;
844
- provider: string;
845
- kind: "issue_comment";
846
- url: string | null;
847
- issueKey: string;
848
- } | {
849
- number: number | null;
850
- at: string | null;
851
- repository: string;
852
- provider: string;
853
- completed: boolean;
854
- kind: "check";
855
- })[];
856
- declaredServices: {
857
- name: string;
858
- version: string;
859
- }[];
860
- }, {
861
- status: "failed" | "budget_exhausted" | "lost" | "pending" | "running" | "succeeded" | "refused" | "cancelled";
862
- tokensIn: number;
863
- tokensOut: number;
864
- costUsd: number;
865
- model: string;
866
- budgetUsd: number;
867
- services: {
868
- name: string;
869
- createdAt: string;
870
- state: "failed" | "pending" | "probing" | "ready";
871
- reason: string | null;
872
- attempts: number | null;
873
- readyAt: string | null;
874
- failedAt: string | null;
875
- }[];
876
- id: string;
877
- agentId: string;
878
- trigger: {
879
- kind: "manual";
880
- } | {
881
- kind: "scheduled";
882
- schedule: string | null;
883
- } | {
884
- kind: "webhook";
885
- } | {
886
- kind: "subagent";
887
- } | {
888
- number: number | null;
889
- repository: string;
890
- provider: string;
891
- event: "mention" | "review";
892
- kind: "code_host";
893
- } | {
894
- provider: string;
895
- kind: "issue";
896
- url: string | null;
897
- issueKey: string;
898
- } | {
899
- kind: "host_event";
900
- };
901
- startedAt: string;
902
- finishedAt: string | null;
903
- heartbeatAt: string | null;
904
- turns: number;
905
- parentRunId: string | null;
906
- agentKind: "native" | "coding";
907
- agentName: string;
908
- codingProvider: string | null;
909
- outcomes: ({
910
- number: number;
911
- at: string | null;
912
- repository: string;
913
- provider: string;
914
- kind: "pull_request";
915
- url: string;
916
- state: string | null;
917
- } | {
918
- number: number;
919
- at: string | null;
920
- repository: string;
921
- provider: string;
922
- kind: "code_host_comment";
923
- } | {
924
- at: string | null;
925
- provider: string;
926
- kind: "issue_comment";
927
- url: string | null;
928
- issueKey: string;
929
- } | {
930
- number: number | null;
931
- at: string | null;
932
- repository: string;
933
- provider: string;
934
- completed: boolean;
935
- kind: "check";
936
- })[];
937
- declaredServices: {
938
- name: string;
939
- version: string;
940
- }[];
941
- }>, "many">;
311
+ }, z.core.$strip>>;
312
+ }, z.core.$strip>>;
942
313
  spend: z.ZodObject<{
943
314
  todayUsd: z.ZodNumber;
944
315
  groups: z.ZodArray<z.ZodObject<{
@@ -946,305 +317,61 @@ export declare const GraphSnapshotSchema: z.ZodObject<{
946
317
  name: z.ZodString;
947
318
  dailyBudgetUsd: z.ZodNullable<z.ZodNumber>;
948
319
  spentTodayUsd: z.ZodNumber;
949
- }, "strip", z.ZodTypeAny, {
950
- name: string;
951
- id: string;
952
- dailyBudgetUsd: number | null;
953
- spentTodayUsd: number;
954
- }, {
955
- name: string;
956
- id: string;
957
- dailyBudgetUsd: number | null;
958
- spentTodayUsd: number;
959
- }>, "many">;
960
- }, "strip", z.ZodTypeAny, {
961
- todayUsd: number;
962
- groups: {
963
- name: string;
964
- id: string;
965
- dailyBudgetUsd: number | null;
966
- spentTodayUsd: number;
967
- }[];
968
- }, {
969
- todayUsd: number;
970
- groups: {
971
- name: string;
972
- id: string;
973
- dailyBudgetUsd: number | null;
974
- spentTodayUsd: number;
975
- }[];
976
- }>;
977
- }, "strip", z.ZodTypeAny, {
978
- runs: {
979
- status: "failed" | "budget_exhausted" | "lost" | "pending" | "running" | "succeeded" | "refused" | "cancelled";
980
- tokensIn: number;
981
- tokensOut: number;
982
- costUsd: number;
983
- model: string;
984
- budgetUsd: number;
985
- services: {
986
- name: string;
987
- createdAt: string;
988
- state: "failed" | "pending" | "probing" | "ready";
989
- reason: string | null;
990
- attempts: number | null;
991
- readyAt: string | null;
992
- failedAt: string | null;
993
- }[];
994
- id: string;
995
- agentId: string;
996
- trigger: {
997
- kind: "manual";
998
- } | {
999
- kind: "scheduled";
1000
- schedule: string | null;
1001
- } | {
1002
- kind: "webhook";
1003
- } | {
1004
- kind: "subagent";
1005
- } | {
1006
- number: number | null;
1007
- repository: string;
1008
- provider: string;
1009
- event: "mention" | "review";
1010
- kind: "code_host";
1011
- } | {
1012
- provider: string;
1013
- kind: "issue";
1014
- url: string | null;
1015
- issueKey: string;
1016
- } | {
1017
- kind: "host_event";
1018
- };
1019
- startedAt: string;
1020
- finishedAt: string | null;
1021
- heartbeatAt: string | null;
1022
- turns: number;
1023
- parentRunId: string | null;
1024
- agentKind: "native" | "coding";
1025
- agentName: string;
1026
- codingProvider: string | null;
1027
- outcomes: ({
1028
- number: number;
1029
- at: string | null;
1030
- repository: string;
1031
- provider: string;
1032
- kind: "pull_request";
1033
- url: string;
1034
- state: string | null;
1035
- } | {
1036
- number: number;
1037
- at: string | null;
1038
- repository: string;
1039
- provider: string;
1040
- kind: "code_host_comment";
1041
- } | {
1042
- at: string | null;
1043
- provider: string;
1044
- kind: "issue_comment";
1045
- url: string | null;
1046
- issueKey: string;
1047
- } | {
1048
- number: number | null;
1049
- at: string | null;
1050
- repository: string;
1051
- provider: string;
1052
- completed: boolean;
1053
- kind: "check";
1054
- })[];
1055
- declaredServices: {
1056
- name: string;
1057
- version: string;
1058
- }[];
1059
- }[];
1060
- truncated: boolean;
1061
- limit: number;
1062
- generatedAt: string;
1063
- since: string;
1064
- spend: {
1065
- todayUsd: number;
1066
- groups: {
1067
- name: string;
1068
- id: string;
1069
- dailyBudgetUsd: number | null;
1070
- spentTodayUsd: number;
1071
- }[];
1072
- };
1073
- }, {
1074
- runs: {
1075
- status: "failed" | "budget_exhausted" | "lost" | "pending" | "running" | "succeeded" | "refused" | "cancelled";
1076
- tokensIn: number;
1077
- tokensOut: number;
1078
- costUsd: number;
1079
- model: string;
1080
- budgetUsd: number;
1081
- services: {
1082
- name: string;
1083
- createdAt: string;
1084
- state: "failed" | "pending" | "probing" | "ready";
1085
- reason: string | null;
1086
- attempts: number | null;
1087
- readyAt: string | null;
1088
- failedAt: string | null;
1089
- }[];
1090
- id: string;
1091
- agentId: string;
1092
- trigger: {
1093
- kind: "manual";
1094
- } | {
1095
- kind: "scheduled";
1096
- schedule: string | null;
1097
- } | {
1098
- kind: "webhook";
1099
- } | {
1100
- kind: "subagent";
1101
- } | {
1102
- number: number | null;
1103
- repository: string;
1104
- provider: string;
1105
- event: "mention" | "review";
1106
- kind: "code_host";
1107
- } | {
1108
- provider: string;
1109
- kind: "issue";
1110
- url: string | null;
1111
- issueKey: string;
1112
- } | {
1113
- kind: "host_event";
1114
- };
1115
- startedAt: string;
1116
- finishedAt: string | null;
1117
- heartbeatAt: string | null;
1118
- turns: number;
1119
- parentRunId: string | null;
1120
- agentKind: "native" | "coding";
1121
- agentName: string;
1122
- codingProvider: string | null;
1123
- outcomes: ({
1124
- number: number;
1125
- at: string | null;
1126
- repository: string;
1127
- provider: string;
1128
- kind: "pull_request";
1129
- url: string;
1130
- state: string | null;
1131
- } | {
1132
- number: number;
1133
- at: string | null;
1134
- repository: string;
1135
- provider: string;
1136
- kind: "code_host_comment";
1137
- } | {
1138
- at: string | null;
1139
- provider: string;
1140
- kind: "issue_comment";
1141
- url: string | null;
1142
- issueKey: string;
1143
- } | {
1144
- number: number | null;
1145
- at: string | null;
1146
- repository: string;
1147
- provider: string;
1148
- completed: boolean;
1149
- kind: "check";
1150
- })[];
1151
- declaredServices: {
1152
- name: string;
1153
- version: string;
1154
- }[];
1155
- }[];
1156
- truncated: boolean;
1157
- limit: number;
1158
- generatedAt: string;
1159
- since: string;
1160
- spend: {
1161
- todayUsd: number;
1162
- groups: {
1163
- name: string;
1164
- id: string;
1165
- dailyBudgetUsd: number | null;
1166
- spentTodayUsd: number;
1167
- }[];
1168
- };
1169
- }>;
320
+ }, z.core.$strip>>;
321
+ }, z.core.$strip>;
322
+ }, z.core.$strip>;
1170
323
  export declare const RunDetailSchema: z.ZodObject<{
1171
324
  id: z.ZodString;
1172
325
  parentRunId: z.ZodNullable<z.ZodString>;
1173
326
  agentId: z.ZodString;
1174
327
  agentName: z.ZodString;
1175
- agentKind: z.ZodEnum<["native", "coding"]>;
1176
- /** The coding run's model, else the agent's. */
328
+ agentKind: z.ZodEnum<{
329
+ native: "native";
330
+ coding: "coding";
331
+ }>;
1177
332
  model: z.ZodString;
1178
- /** The coding worker (e.g. `codex`, `claude-code`); null for native runs. */
1179
333
  codingProvider: z.ZodNullable<z.ZodString>;
1180
- status: z.ZodEnum<["pending", "running", "succeeded", "failed", "refused", "lost", "budget_exhausted", "cancelled"]>;
1181
- trigger: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
334
+ nativeExecutionMode: z.ZodNullable<z.ZodEnum<{
335
+ sandbox: "sandbox";
336
+ "control-plane": "control-plane";
337
+ }>>;
338
+ warmWorkerName: z.ZodNullable<z.ZodString>;
339
+ status: z.ZodEnum<{
340
+ pending: "pending";
341
+ failed: "failed";
342
+ budget_exhausted: "budget_exhausted";
343
+ refused: "refused";
344
+ lost: "lost";
345
+ running: "running";
346
+ succeeded: "succeeded";
347
+ cancelled: "cancelled";
348
+ }>;
349
+ trigger: z.ZodDiscriminatedUnion<[z.ZodObject<{
1182
350
  kind: z.ZodLiteral<"manual">;
1183
- }, "strip", z.ZodTypeAny, {
1184
- kind: "manual";
1185
- }, {
1186
- kind: "manual";
1187
- }>, z.ZodObject<{
351
+ }, z.core.$strip>, z.ZodObject<{
1188
352
  kind: z.ZodLiteral<"scheduled">;
1189
353
  schedule: z.ZodNullable<z.ZodString>;
1190
- }, "strip", z.ZodTypeAny, {
1191
- kind: "scheduled";
1192
- schedule: string | null;
1193
- }, {
1194
- kind: "scheduled";
1195
- schedule: string | null;
1196
- }>, z.ZodObject<{
354
+ }, z.core.$strip>, z.ZodObject<{
1197
355
  kind: z.ZodLiteral<"webhook">;
1198
- }, "strip", z.ZodTypeAny, {
1199
- kind: "webhook";
1200
- }, {
1201
- kind: "webhook";
1202
- }>, z.ZodObject<{
356
+ }, z.core.$strip>, z.ZodObject<{
1203
357
  kind: z.ZodLiteral<"subagent">;
1204
- }, "strip", z.ZodTypeAny, {
1205
- kind: "subagent";
1206
- }, {
1207
- kind: "subagent";
1208
- }>, z.ZodObject<{
358
+ }, z.core.$strip>, z.ZodObject<{
1209
359
  kind: z.ZodLiteral<"code_host">;
1210
360
  provider: z.ZodString;
1211
361
  repository: z.ZodString;
1212
362
  number: z.ZodNullable<z.ZodNumber>;
1213
- event: z.ZodEnum<["review", "mention"]>;
1214
- }, "strip", z.ZodTypeAny, {
1215
- number: number | null;
1216
- repository: string;
1217
- provider: string;
1218
- event: "mention" | "review";
1219
- kind: "code_host";
1220
- }, {
1221
- number: number | null;
1222
- repository: string;
1223
- provider: string;
1224
- event: "mention" | "review";
1225
- kind: "code_host";
1226
- }>, z.ZodObject<{
363
+ event: z.ZodEnum<{
364
+ mention: "mention";
365
+ review: "review";
366
+ }>;
367
+ }, z.core.$strip>, z.ZodObject<{
1227
368
  kind: z.ZodLiteral<"issue">;
1228
369
  provider: z.ZodString;
1229
370
  issueKey: z.ZodString;
1230
371
  url: z.ZodNullable<z.ZodString>;
1231
- }, "strip", z.ZodTypeAny, {
1232
- provider: string;
1233
- kind: "issue";
1234
- url: string | null;
1235
- issueKey: string;
1236
- }, {
1237
- provider: string;
1238
- kind: "issue";
1239
- url: string | null;
1240
- issueKey: string;
1241
- }>, z.ZodObject<{
372
+ }, z.core.$strip>, z.ZodObject<{
1242
373
  kind: z.ZodLiteral<"host_event">;
1243
- }, "strip", z.ZodTypeAny, {
1244
- kind: "host_event";
1245
- }, {
1246
- kind: "host_event";
1247
- }>]>;
374
+ }, z.core.$strip>], "kind">;
1248
375
  turns: z.ZodNumber;
1249
376
  tokensIn: z.ZodNumber;
1250
377
  tokensOut: z.ZodNumber;
@@ -1253,7 +380,7 @@ export declare const RunDetailSchema: z.ZodObject<{
1253
380
  startedAt: z.ZodString;
1254
381
  finishedAt: z.ZodNullable<z.ZodString>;
1255
382
  heartbeatAt: z.ZodNullable<z.ZodString>;
1256
- outcomes: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
383
+ outcomes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1257
384
  kind: z.ZodLiteral<"pull_request">;
1258
385
  provider: z.ZodString;
1259
386
  repository: z.ZodString;
@@ -1261,121 +388,47 @@ export declare const RunDetailSchema: z.ZodObject<{
1261
388
  url: z.ZodString;
1262
389
  state: z.ZodNullable<z.ZodString>;
1263
390
  at: z.ZodNullable<z.ZodString>;
1264
- }, "strip", z.ZodTypeAny, {
1265
- number: number;
1266
- at: string | null;
1267
- repository: string;
1268
- provider: string;
1269
- kind: "pull_request";
1270
- url: string;
1271
- state: string | null;
1272
- }, {
1273
- number: number;
1274
- at: string | null;
1275
- repository: string;
1276
- provider: string;
1277
- kind: "pull_request";
1278
- url: string;
1279
- state: string | null;
1280
- }>, z.ZodObject<{
391
+ }, z.core.$strip>, z.ZodObject<{
1281
392
  kind: z.ZodLiteral<"code_host_comment">;
1282
393
  provider: z.ZodString;
1283
394
  repository: z.ZodString;
1284
395
  number: z.ZodNumber;
1285
396
  at: z.ZodNullable<z.ZodString>;
1286
- }, "strip", z.ZodTypeAny, {
1287
- number: number;
1288
- at: string | null;
1289
- repository: string;
1290
- provider: string;
1291
- kind: "code_host_comment";
1292
- }, {
1293
- number: number;
1294
- at: string | null;
1295
- repository: string;
1296
- provider: string;
1297
- kind: "code_host_comment";
1298
- }>, z.ZodObject<{
397
+ }, z.core.$strip>, z.ZodObject<{
1299
398
  kind: z.ZodLiteral<"issue_comment">;
1300
399
  provider: z.ZodString;
1301
400
  issueKey: z.ZodString;
1302
401
  url: z.ZodNullable<z.ZodString>;
1303
402
  at: z.ZodNullable<z.ZodString>;
1304
- }, "strip", z.ZodTypeAny, {
1305
- at: string | null;
1306
- provider: string;
1307
- kind: "issue_comment";
1308
- url: string | null;
1309
- issueKey: string;
1310
- }, {
1311
- at: string | null;
1312
- provider: string;
1313
- kind: "issue_comment";
1314
- url: string | null;
1315
- issueKey: string;
1316
- }>, z.ZodObject<{
403
+ }, z.core.$strip>, z.ZodObject<{
1317
404
  kind: z.ZodLiteral<"check">;
1318
405
  provider: z.ZodString;
1319
406
  repository: z.ZodString;
1320
407
  number: z.ZodNullable<z.ZodNumber>;
1321
408
  completed: z.ZodBoolean;
1322
409
  at: z.ZodNullable<z.ZodString>;
1323
- }, "strip", z.ZodTypeAny, {
1324
- number: number | null;
1325
- at: string | null;
1326
- repository: string;
1327
- provider: string;
1328
- completed: boolean;
1329
- kind: "check";
1330
- }, {
1331
- number: number | null;
1332
- at: string | null;
1333
- repository: string;
1334
- provider: string;
1335
- completed: boolean;
1336
- kind: "check";
1337
- }>]>, "many">;
1338
- /** The services a coding run was started with, recorded or not; empty for native runs. */
410
+ }, z.core.$strip>], "kind">>;
1339
411
  declaredServices: z.ZodArray<z.ZodObject<{
1340
412
  name: z.ZodString;
1341
413
  version: z.ZodString;
1342
- }, "strip", z.ZodTypeAny, {
1343
- name: string;
1344
- version: string;
1345
- }, {
1346
- name: string;
1347
- version: string;
1348
- }>, "many">;
1349
- /** Recorded readiness of the run's services (none before status tracking existed). */
414
+ }, z.core.$strip>>;
1350
415
  services: z.ZodArray<z.ZodObject<{
1351
416
  name: z.ZodString;
1352
- state: z.ZodEnum<["pending", "probing", "ready", "failed"]>;
417
+ state: z.ZodEnum<{
418
+ pending: "pending";
419
+ ready: "ready";
420
+ failed: "failed";
421
+ probing: "probing";
422
+ }>;
1353
423
  attempts: z.ZodNullable<z.ZodNumber>;
1354
424
  reason: z.ZodNullable<z.ZodString>;
1355
425
  readyAt: z.ZodNullable<z.ZodString>;
1356
426
  failedAt: z.ZodNullable<z.ZodString>;
1357
427
  createdAt: z.ZodString;
1358
- }, "strip", z.ZodTypeAny, {
1359
- name: string;
1360
- createdAt: string;
1361
- state: "failed" | "pending" | "probing" | "ready";
1362
- reason: string | null;
1363
- attempts: number | null;
1364
- readyAt: string | null;
1365
- failedAt: string | null;
1366
- }, {
1367
- name: string;
1368
- createdAt: string;
1369
- state: "failed" | "pending" | "probing" | "ready";
1370
- reason: string | null;
1371
- attempts: number | null;
1372
- readyAt: string | null;
1373
- failedAt: string | null;
1374
- }>, "many">;
1375
- } & {
428
+ }, z.core.$strip>>;
1376
429
  error: z.ZodNullable<z.ZodString>;
1377
430
  finalText: z.ZodNullable<z.ZodString>;
1378
- childRunIds: z.ZodArray<z.ZodString, "many">;
431
+ childRunIds: z.ZodArray<z.ZodString>;
1379
432
  coding: z.ZodNullable<z.ZodObject<{
1380
433
  provider: z.ZodString;
1381
434
  repository: z.ZodString;
@@ -1387,307 +440,51 @@ export declare const RunDetailSchema: z.ZodObject<{
1387
440
  name: z.ZodString;
1388
441
  version: z.ZodString;
1389
442
  image: z.ZodString;
1390
- envNames: z.ZodArray<z.ZodString, "many">;
1391
- }, "strip", z.ZodTypeAny, {
1392
- name: string;
1393
- version: string;
1394
- image: string;
1395
- envNames: string[];
1396
- }, {
1397
- name: string;
1398
- version: string;
1399
- image: string;
1400
- envNames: string[];
1401
- }>, "many">;
1402
- }, "strip", z.ZodTypeAny, {
1403
- repository: string;
1404
- baseRef: string;
1405
- headRef: string;
1406
- services: {
1407
- name: string;
1408
- version: string;
1409
- image: string;
1410
- envNames: string[];
1411
- }[];
1412
- provider: string;
1413
- failureCategory: string | null;
1414
- queuedAt: string | null;
1415
- }, {
1416
- repository: string;
1417
- baseRef: string;
1418
- headRef: string;
1419
- services: {
1420
- name: string;
1421
- version: string;
1422
- image: string;
1423
- envNames: string[];
1424
- }[];
1425
- provider: string;
1426
- failureCategory: string | null;
1427
- queuedAt: string | null;
1428
- }>>;
1429
- }, "strip", z.ZodTypeAny, {
1430
- error: string | null;
1431
- status: "failed" | "budget_exhausted" | "lost" | "pending" | "running" | "succeeded" | "refused" | "cancelled";
1432
- tokensIn: number;
1433
- tokensOut: number;
1434
- costUsd: number;
1435
- model: string;
1436
- budgetUsd: number;
1437
- services: {
1438
- name: string;
1439
- createdAt: string;
1440
- state: "failed" | "pending" | "probing" | "ready";
1441
- reason: string | null;
1442
- attempts: number | null;
1443
- readyAt: string | null;
1444
- failedAt: string | null;
1445
- }[];
1446
- id: string;
1447
- agentId: string;
1448
- trigger: {
1449
- kind: "manual";
1450
- } | {
1451
- kind: "scheduled";
1452
- schedule: string | null;
1453
- } | {
1454
- kind: "webhook";
1455
- } | {
1456
- kind: "subagent";
1457
- } | {
1458
- number: number | null;
1459
- repository: string;
1460
- provider: string;
1461
- event: "mention" | "review";
1462
- kind: "code_host";
1463
- } | {
1464
- provider: string;
1465
- kind: "issue";
1466
- url: string | null;
1467
- issueKey: string;
1468
- } | {
1469
- kind: "host_event";
1470
- };
1471
- startedAt: string;
1472
- finishedAt: string | null;
1473
- heartbeatAt: string | null;
1474
- finalText: string | null;
1475
- turns: number;
1476
- parentRunId: string | null;
1477
- coding: {
1478
- repository: string;
1479
- baseRef: string;
1480
- headRef: string;
1481
- services: {
1482
- name: string;
1483
- version: string;
1484
- image: string;
1485
- envNames: string[];
1486
- }[];
1487
- provider: string;
1488
- failureCategory: string | null;
1489
- queuedAt: string | null;
1490
- } | null;
1491
- agentKind: "native" | "coding";
1492
- agentName: string;
1493
- codingProvider: string | null;
1494
- outcomes: ({
1495
- number: number;
1496
- at: string | null;
1497
- repository: string;
1498
- provider: string;
1499
- kind: "pull_request";
1500
- url: string;
1501
- state: string | null;
1502
- } | {
1503
- number: number;
1504
- at: string | null;
1505
- repository: string;
1506
- provider: string;
1507
- kind: "code_host_comment";
1508
- } | {
1509
- at: string | null;
1510
- provider: string;
1511
- kind: "issue_comment";
1512
- url: string | null;
1513
- issueKey: string;
1514
- } | {
1515
- number: number | null;
1516
- at: string | null;
1517
- repository: string;
1518
- provider: string;
1519
- completed: boolean;
1520
- kind: "check";
1521
- })[];
1522
- declaredServices: {
1523
- name: string;
1524
- version: string;
1525
- }[];
1526
- childRunIds: string[];
1527
- }, {
1528
- error: string | null;
1529
- status: "failed" | "budget_exhausted" | "lost" | "pending" | "running" | "succeeded" | "refused" | "cancelled";
1530
- tokensIn: number;
1531
- tokensOut: number;
1532
- costUsd: number;
1533
- model: string;
1534
- budgetUsd: number;
1535
- services: {
1536
- name: string;
1537
- createdAt: string;
1538
- state: "failed" | "pending" | "probing" | "ready";
1539
- reason: string | null;
1540
- attempts: number | null;
1541
- readyAt: string | null;
1542
- failedAt: string | null;
1543
- }[];
1544
- id: string;
1545
- agentId: string;
1546
- trigger: {
1547
- kind: "manual";
1548
- } | {
1549
- kind: "scheduled";
1550
- schedule: string | null;
1551
- } | {
1552
- kind: "webhook";
1553
- } | {
1554
- kind: "subagent";
1555
- } | {
1556
- number: number | null;
1557
- repository: string;
1558
- provider: string;
1559
- event: "mention" | "review";
1560
- kind: "code_host";
1561
- } | {
1562
- provider: string;
1563
- kind: "issue";
1564
- url: string | null;
1565
- issueKey: string;
1566
- } | {
1567
- kind: "host_event";
1568
- };
1569
- startedAt: string;
1570
- finishedAt: string | null;
1571
- heartbeatAt: string | null;
1572
- finalText: string | null;
1573
- turns: number;
1574
- parentRunId: string | null;
1575
- coding: {
1576
- repository: string;
1577
- baseRef: string;
1578
- headRef: string;
1579
- services: {
1580
- name: string;
1581
- version: string;
1582
- image: string;
1583
- envNames: string[];
1584
- }[];
1585
- provider: string;
1586
- failureCategory: string | null;
1587
- queuedAt: string | null;
1588
- } | null;
1589
- agentKind: "native" | "coding";
1590
- agentName: string;
1591
- codingProvider: string | null;
1592
- outcomes: ({
1593
- number: number;
1594
- at: string | null;
1595
- repository: string;
1596
- provider: string;
1597
- kind: "pull_request";
1598
- url: string;
1599
- state: string | null;
1600
- } | {
1601
- number: number;
1602
- at: string | null;
1603
- repository: string;
1604
- provider: string;
1605
- kind: "code_host_comment";
1606
- } | {
1607
- at: string | null;
1608
- provider: string;
1609
- kind: "issue_comment";
1610
- url: string | null;
1611
- issueKey: string;
1612
- } | {
1613
- number: number | null;
1614
- at: string | null;
1615
- repository: string;
1616
- provider: string;
1617
- completed: boolean;
1618
- kind: "check";
1619
- })[];
1620
- declaredServices: {
1621
- name: string;
1622
- version: string;
1623
- }[];
1624
- childRunIds: string[];
1625
- }>;
1626
- export declare const ViewerEventSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
443
+ envNames: z.ZodArray<z.ZodString>;
444
+ }, z.core.$strip>>;
445
+ }, z.core.$strip>>;
446
+ }, z.core.$strip>;
447
+ export declare const ViewerEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
1627
448
  kind: z.ZodLiteral<"run">;
1628
449
  runId: z.ZodString;
1629
450
  parentRunId: z.ZodNullable<z.ZodString>;
1630
451
  agentId: z.ZodString;
1631
- status: z.ZodEnum<["pending", "running", "succeeded", "failed", "refused", "lost", "budget_exhausted", "cancelled"]>;
452
+ status: z.ZodEnum<{
453
+ pending: "pending";
454
+ failed: "failed";
455
+ budget_exhausted: "budget_exhausted";
456
+ refused: "refused";
457
+ lost: "lost";
458
+ running: "running";
459
+ succeeded: "succeeded";
460
+ cancelled: "cancelled";
461
+ }>;
1632
462
  turns: z.ZodNumber;
1633
463
  tokensIn: z.ZodNumber;
1634
464
  tokensOut: z.ZodNumber;
1635
465
  costUsd: z.ZodNumber;
1636
466
  finishedAt: z.ZodNullable<z.ZodString>;
1637
- }, "strip", z.ZodTypeAny, {
1638
- status: "failed" | "budget_exhausted" | "lost" | "pending" | "running" | "succeeded" | "refused" | "cancelled";
1639
- tokensIn: number;
1640
- tokensOut: number;
1641
- costUsd: number;
1642
- runId: string;
1643
- kind: "run";
1644
- agentId: string;
1645
- finishedAt: string | null;
1646
- turns: number;
1647
- parentRunId: string | null;
1648
- }, {
1649
- status: "failed" | "budget_exhausted" | "lost" | "pending" | "running" | "succeeded" | "refused" | "cancelled";
1650
- tokensIn: number;
1651
- tokensOut: number;
1652
- costUsd: number;
1653
- runId: string;
1654
- kind: "run";
1655
- agentId: string;
1656
- finishedAt: string | null;
1657
- turns: number;
1658
- parentRunId: string | null;
1659
- }>, z.ZodObject<{
467
+ }, z.core.$strip>, z.ZodObject<{
1660
468
  kind: z.ZodLiteral<"service">;
1661
469
  runId: z.ZodString;
1662
470
  name: z.ZodString;
1663
- state: z.ZodEnum<["pending", "probing", "ready", "failed"]>;
471
+ state: z.ZodEnum<{
472
+ pending: "pending";
473
+ ready: "ready";
474
+ failed: "failed";
475
+ probing: "probing";
476
+ }>;
1664
477
  attempts: z.ZodNullable<z.ZodNumber>;
1665
- }, "strip", z.ZodTypeAny, {
1666
- name: string;
1667
- runId: string;
1668
- kind: "service";
1669
- state: "failed" | "pending" | "probing" | "ready";
1670
- attempts: number | null;
1671
- }, {
1672
- name: string;
1673
- runId: string;
1674
- kind: "service";
1675
- state: "failed" | "pending" | "probing" | "ready";
1676
- attempts: number | null;
1677
- }>, z.ZodObject<{
478
+ }, z.core.$strip>, z.ZodObject<{
1678
479
  kind: z.ZodLiteral<"outcome">;
1679
480
  runId: z.ZodString;
1680
- /** Which table changed (the viewer NOTIFY trigger names them). */
1681
- source: z.ZodEnum<["pull_request", "host_status", "issue_status", "host_check"]>;
1682
- }, "strip", z.ZodTypeAny, {
1683
- runId: string;
1684
- kind: "outcome";
1685
- source: "pull_request" | "host_status" | "issue_status" | "host_check";
1686
- }, {
1687
- runId: string;
1688
- kind: "outcome";
1689
- source: "pull_request" | "host_status" | "issue_status" | "host_check";
1690
- }>]>;
481
+ source: z.ZodEnum<{
482
+ pull_request: "pull_request";
483
+ host_status: "host_status";
484
+ issue_status: "issue_status";
485
+ host_check: "host_check";
486
+ }>;
487
+ }, z.core.$strip>], "kind">;
1691
488
  export type RunTriggerInfo = z.infer<typeof RunTriggerSchema>;
1692
489
  export type Outcome = z.infer<typeof OutcomeSchema>;
1693
490
  export type ServiceStatus = z.infer<typeof ServiceStatusSchema>;
@@ -1697,7 +494,11 @@ export type RunDetail = z.infer<typeof RunDetailSchema>;
1697
494
  export type ViewerEvent = z.infer<typeof ViewerEventSchema>;
1698
495
  /** How this deployment runs coding jobs, for the desktop viewer's Infrastructure view (GET /admin/api/infra). */
1699
496
  export declare const InfraInfoSchema: z.ZodObject<{
1700
- launcher: z.ZodEnum<["local", "docker", "kubernetes"]>;
497
+ launcher: z.ZodEnum<{
498
+ local: "local";
499
+ docker: "docker";
500
+ kubernetes: "kubernetes";
501
+ }>;
1701
502
  kubernetes: z.ZodNullable<z.ZodObject<{
1702
503
  namespace: z.ZodString;
1703
504
  platform: z.ZodString;
@@ -1707,50 +508,23 @@ export declare const InfraInfoSchema: z.ZodObject<{
1707
508
  runLabelHashChars: z.ZodNumber;
1708
509
  componentLabel: z.ZodRecord<z.ZodString, z.ZodString>;
1709
510
  managedByLabel: z.ZodRecord<z.ZodString, z.ZodString>;
1710
- }, "strip", z.ZodTypeAny, {
1711
- namespace: string;
1712
- platform: string;
1713
- proxyService: string;
1714
- runtimeClass: string | null;
1715
- runLabel: string;
1716
- runLabelHashChars: number;
1717
- componentLabel: Record<string, string>;
1718
- managedByLabel: Record<string, string>;
1719
- }, {
1720
- namespace: string;
1721
- platform: string;
1722
- proxyService: string;
1723
- runtimeClass: string | null;
1724
- runLabel: string;
1725
- runLabelHashChars: number;
1726
- componentLabel: Record<string, string>;
1727
- managedByLabel: Record<string, string>;
1728
- }>>;
1729
- }, "strip", z.ZodTypeAny, {
1730
- kubernetes: {
1731
- namespace: string;
1732
- platform: string;
1733
- proxyService: string;
1734
- runtimeClass: string | null;
1735
- runLabel: string;
1736
- runLabelHashChars: number;
1737
- componentLabel: Record<string, string>;
1738
- managedByLabel: Record<string, string>;
1739
- } | null;
1740
- launcher: "local" | "docker" | "kubernetes";
1741
- }, {
1742
- kubernetes: {
1743
- namespace: string;
1744
- platform: string;
1745
- proxyService: string;
1746
- runtimeClass: string | null;
1747
- runLabel: string;
1748
- runLabelHashChars: number;
1749
- componentLabel: Record<string, string>;
1750
- managedByLabel: Record<string, string>;
1751
- } | null;
1752
- launcher: "local" | "docker" | "kubernetes";
1753
- }>;
511
+ }, z.core.$strip>>;
512
+ native: z.ZodNullable<z.ZodObject<{
513
+ launcher: z.ZodEnum<{
514
+ docker: "docker";
515
+ kubernetes: "kubernetes";
516
+ }>;
517
+ warmPoolSize: z.ZodNumber;
518
+ kubernetes: z.ZodNullable<z.ZodObject<{
519
+ namespace: z.ZodString;
520
+ runtimeClass: z.ZodNullable<z.ZodString>;
521
+ runLabel: z.ZodString;
522
+ componentLabel: z.ZodRecord<z.ZodString, z.ZodString>;
523
+ warmPoolLabel: z.ZodRecord<z.ZodString, z.ZodString>;
524
+ warmWorkerLabel: z.ZodString;
525
+ }, z.core.$strip>>;
526
+ }, z.core.$strip>>;
527
+ }, z.core.$strip>;
1754
528
  export type InfraInfo = z.infer<typeof InfraInfoSchema>;
1755
529
  export declare const VIEWER_SCHEMAS: {
1756
530
  readonly "graph-snapshot": z.ZodObject<{
@@ -1763,79 +537,53 @@ export declare const VIEWER_SCHEMAS: {
1763
537
  parentRunId: z.ZodNullable<z.ZodString>;
1764
538
  agentId: z.ZodString;
1765
539
  agentName: z.ZodString;
1766
- agentKind: z.ZodEnum<["native", "coding"]>;
1767
- /** The coding run's model, else the agent's. */
540
+ agentKind: z.ZodEnum<{
541
+ native: "native";
542
+ coding: "coding";
543
+ }>;
1768
544
  model: z.ZodString;
1769
- /** The coding worker (e.g. `codex`, `claude-code`); null for native runs. */
1770
545
  codingProvider: z.ZodNullable<z.ZodString>;
1771
- status: z.ZodEnum<["pending", "running", "succeeded", "failed", "refused", "lost", "budget_exhausted", "cancelled"]>;
1772
- trigger: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
546
+ nativeExecutionMode: z.ZodNullable<z.ZodEnum<{
547
+ sandbox: "sandbox";
548
+ "control-plane": "control-plane";
549
+ }>>;
550
+ warmWorkerName: z.ZodNullable<z.ZodString>;
551
+ status: z.ZodEnum<{
552
+ pending: "pending";
553
+ failed: "failed";
554
+ budget_exhausted: "budget_exhausted";
555
+ refused: "refused";
556
+ lost: "lost";
557
+ running: "running";
558
+ succeeded: "succeeded";
559
+ cancelled: "cancelled";
560
+ }>;
561
+ trigger: z.ZodDiscriminatedUnion<[z.ZodObject<{
1773
562
  kind: z.ZodLiteral<"manual">;
1774
- }, "strip", z.ZodTypeAny, {
1775
- kind: "manual";
1776
- }, {
1777
- kind: "manual";
1778
- }>, z.ZodObject<{
563
+ }, z.core.$strip>, z.ZodObject<{
1779
564
  kind: z.ZodLiteral<"scheduled">;
1780
565
  schedule: z.ZodNullable<z.ZodString>;
1781
- }, "strip", z.ZodTypeAny, {
1782
- kind: "scheduled";
1783
- schedule: string | null;
1784
- }, {
1785
- kind: "scheduled";
1786
- schedule: string | null;
1787
- }>, z.ZodObject<{
566
+ }, z.core.$strip>, z.ZodObject<{
1788
567
  kind: z.ZodLiteral<"webhook">;
1789
- }, "strip", z.ZodTypeAny, {
1790
- kind: "webhook";
1791
- }, {
1792
- kind: "webhook";
1793
- }>, z.ZodObject<{
568
+ }, z.core.$strip>, z.ZodObject<{
1794
569
  kind: z.ZodLiteral<"subagent">;
1795
- }, "strip", z.ZodTypeAny, {
1796
- kind: "subagent";
1797
- }, {
1798
- kind: "subagent";
1799
- }>, z.ZodObject<{
570
+ }, z.core.$strip>, z.ZodObject<{
1800
571
  kind: z.ZodLiteral<"code_host">;
1801
572
  provider: z.ZodString;
1802
573
  repository: z.ZodString;
1803
574
  number: z.ZodNullable<z.ZodNumber>;
1804
- event: z.ZodEnum<["review", "mention"]>;
1805
- }, "strip", z.ZodTypeAny, {
1806
- number: number | null;
1807
- repository: string;
1808
- provider: string;
1809
- event: "mention" | "review";
1810
- kind: "code_host";
1811
- }, {
1812
- number: number | null;
1813
- repository: string;
1814
- provider: string;
1815
- event: "mention" | "review";
1816
- kind: "code_host";
1817
- }>, z.ZodObject<{
575
+ event: z.ZodEnum<{
576
+ mention: "mention";
577
+ review: "review";
578
+ }>;
579
+ }, z.core.$strip>, z.ZodObject<{
1818
580
  kind: z.ZodLiteral<"issue">;
1819
581
  provider: z.ZodString;
1820
582
  issueKey: z.ZodString;
1821
583
  url: z.ZodNullable<z.ZodString>;
1822
- }, "strip", z.ZodTypeAny, {
1823
- provider: string;
1824
- kind: "issue";
1825
- url: string | null;
1826
- issueKey: string;
1827
- }, {
1828
- provider: string;
1829
- kind: "issue";
1830
- url: string | null;
1831
- issueKey: string;
1832
- }>, z.ZodObject<{
584
+ }, z.core.$strip>, z.ZodObject<{
1833
585
  kind: z.ZodLiteral<"host_event">;
1834
- }, "strip", z.ZodTypeAny, {
1835
- kind: "host_event";
1836
- }, {
1837
- kind: "host_event";
1838
- }>]>;
586
+ }, z.core.$strip>], "kind">;
1839
587
  turns: z.ZodNumber;
1840
588
  tokensIn: z.ZodNumber;
1841
589
  tokensOut: z.ZodNumber;
@@ -1844,7 +592,7 @@ export declare const VIEWER_SCHEMAS: {
1844
592
  startedAt: z.ZodString;
1845
593
  finishedAt: z.ZodNullable<z.ZodString>;
1846
594
  heartbeatAt: z.ZodNullable<z.ZodString>;
1847
- outcomes: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
595
+ outcomes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1848
596
  kind: z.ZodLiteral<"pull_request">;
1849
597
  provider: z.ZodString;
1850
598
  repository: z.ZodString;
@@ -1852,280 +600,45 @@ export declare const VIEWER_SCHEMAS: {
1852
600
  url: z.ZodString;
1853
601
  state: z.ZodNullable<z.ZodString>;
1854
602
  at: z.ZodNullable<z.ZodString>;
1855
- }, "strip", z.ZodTypeAny, {
1856
- number: number;
1857
- at: string | null;
1858
- repository: string;
1859
- provider: string;
1860
- kind: "pull_request";
1861
- url: string;
1862
- state: string | null;
1863
- }, {
1864
- number: number;
1865
- at: string | null;
1866
- repository: string;
1867
- provider: string;
1868
- kind: "pull_request";
1869
- url: string;
1870
- state: string | null;
1871
- }>, z.ZodObject<{
603
+ }, z.core.$strip>, z.ZodObject<{
1872
604
  kind: z.ZodLiteral<"code_host_comment">;
1873
605
  provider: z.ZodString;
1874
606
  repository: z.ZodString;
1875
607
  number: z.ZodNumber;
1876
608
  at: z.ZodNullable<z.ZodString>;
1877
- }, "strip", z.ZodTypeAny, {
1878
- number: number;
1879
- at: string | null;
1880
- repository: string;
1881
- provider: string;
1882
- kind: "code_host_comment";
1883
- }, {
1884
- number: number;
1885
- at: string | null;
1886
- repository: string;
1887
- provider: string;
1888
- kind: "code_host_comment";
1889
- }>, z.ZodObject<{
609
+ }, z.core.$strip>, z.ZodObject<{
1890
610
  kind: z.ZodLiteral<"issue_comment">;
1891
611
  provider: z.ZodString;
1892
612
  issueKey: z.ZodString;
1893
613
  url: z.ZodNullable<z.ZodString>;
1894
614
  at: z.ZodNullable<z.ZodString>;
1895
- }, "strip", z.ZodTypeAny, {
1896
- at: string | null;
1897
- provider: string;
1898
- kind: "issue_comment";
1899
- url: string | null;
1900
- issueKey: string;
1901
- }, {
1902
- at: string | null;
1903
- provider: string;
1904
- kind: "issue_comment";
1905
- url: string | null;
1906
- issueKey: string;
1907
- }>, z.ZodObject<{
615
+ }, z.core.$strip>, z.ZodObject<{
1908
616
  kind: z.ZodLiteral<"check">;
1909
617
  provider: z.ZodString;
1910
618
  repository: z.ZodString;
1911
619
  number: z.ZodNullable<z.ZodNumber>;
1912
620
  completed: z.ZodBoolean;
1913
621
  at: z.ZodNullable<z.ZodString>;
1914
- }, "strip", z.ZodTypeAny, {
1915
- number: number | null;
1916
- at: string | null;
1917
- repository: string;
1918
- provider: string;
1919
- completed: boolean;
1920
- kind: "check";
1921
- }, {
1922
- number: number | null;
1923
- at: string | null;
1924
- repository: string;
1925
- provider: string;
1926
- completed: boolean;
1927
- kind: "check";
1928
- }>]>, "many">;
1929
- /** The services a coding run was started with, recorded or not; empty for native runs. */
622
+ }, z.core.$strip>], "kind">>;
1930
623
  declaredServices: z.ZodArray<z.ZodObject<{
1931
624
  name: z.ZodString;
1932
625
  version: z.ZodString;
1933
- }, "strip", z.ZodTypeAny, {
1934
- name: string;
1935
- version: string;
1936
- }, {
1937
- name: string;
1938
- version: string;
1939
- }>, "many">;
1940
- /** Recorded readiness of the run's services (none before status tracking existed). */
626
+ }, z.core.$strip>>;
1941
627
  services: z.ZodArray<z.ZodObject<{
1942
628
  name: z.ZodString;
1943
- state: z.ZodEnum<["pending", "probing", "ready", "failed"]>;
629
+ state: z.ZodEnum<{
630
+ pending: "pending";
631
+ ready: "ready";
632
+ failed: "failed";
633
+ probing: "probing";
634
+ }>;
1944
635
  attempts: z.ZodNullable<z.ZodNumber>;
1945
636
  reason: z.ZodNullable<z.ZodString>;
1946
637
  readyAt: z.ZodNullable<z.ZodString>;
1947
638
  failedAt: z.ZodNullable<z.ZodString>;
1948
639
  createdAt: z.ZodString;
1949
- }, "strip", z.ZodTypeAny, {
1950
- name: string;
1951
- createdAt: string;
1952
- state: "failed" | "pending" | "probing" | "ready";
1953
- reason: string | null;
1954
- attempts: number | null;
1955
- readyAt: string | null;
1956
- failedAt: string | null;
1957
- }, {
1958
- name: string;
1959
- createdAt: string;
1960
- state: "failed" | "pending" | "probing" | "ready";
1961
- reason: string | null;
1962
- attempts: number | null;
1963
- readyAt: string | null;
1964
- failedAt: string | null;
1965
- }>, "many">;
1966
- }, "strip", z.ZodTypeAny, {
1967
- status: "failed" | "budget_exhausted" | "lost" | "pending" | "running" | "succeeded" | "refused" | "cancelled";
1968
- tokensIn: number;
1969
- tokensOut: number;
1970
- costUsd: number;
1971
- model: string;
1972
- budgetUsd: number;
1973
- services: {
1974
- name: string;
1975
- createdAt: string;
1976
- state: "failed" | "pending" | "probing" | "ready";
1977
- reason: string | null;
1978
- attempts: number | null;
1979
- readyAt: string | null;
1980
- failedAt: string | null;
1981
- }[];
1982
- id: string;
1983
- agentId: string;
1984
- trigger: {
1985
- kind: "manual";
1986
- } | {
1987
- kind: "scheduled";
1988
- schedule: string | null;
1989
- } | {
1990
- kind: "webhook";
1991
- } | {
1992
- kind: "subagent";
1993
- } | {
1994
- number: number | null;
1995
- repository: string;
1996
- provider: string;
1997
- event: "mention" | "review";
1998
- kind: "code_host";
1999
- } | {
2000
- provider: string;
2001
- kind: "issue";
2002
- url: string | null;
2003
- issueKey: string;
2004
- } | {
2005
- kind: "host_event";
2006
- };
2007
- startedAt: string;
2008
- finishedAt: string | null;
2009
- heartbeatAt: string | null;
2010
- turns: number;
2011
- parentRunId: string | null;
2012
- agentKind: "native" | "coding";
2013
- agentName: string;
2014
- codingProvider: string | null;
2015
- outcomes: ({
2016
- number: number;
2017
- at: string | null;
2018
- repository: string;
2019
- provider: string;
2020
- kind: "pull_request";
2021
- url: string;
2022
- state: string | null;
2023
- } | {
2024
- number: number;
2025
- at: string | null;
2026
- repository: string;
2027
- provider: string;
2028
- kind: "code_host_comment";
2029
- } | {
2030
- at: string | null;
2031
- provider: string;
2032
- kind: "issue_comment";
2033
- url: string | null;
2034
- issueKey: string;
2035
- } | {
2036
- number: number | null;
2037
- at: string | null;
2038
- repository: string;
2039
- provider: string;
2040
- completed: boolean;
2041
- kind: "check";
2042
- })[];
2043
- declaredServices: {
2044
- name: string;
2045
- version: string;
2046
- }[];
2047
- }, {
2048
- status: "failed" | "budget_exhausted" | "lost" | "pending" | "running" | "succeeded" | "refused" | "cancelled";
2049
- tokensIn: number;
2050
- tokensOut: number;
2051
- costUsd: number;
2052
- model: string;
2053
- budgetUsd: number;
2054
- services: {
2055
- name: string;
2056
- createdAt: string;
2057
- state: "failed" | "pending" | "probing" | "ready";
2058
- reason: string | null;
2059
- attempts: number | null;
2060
- readyAt: string | null;
2061
- failedAt: string | null;
2062
- }[];
2063
- id: string;
2064
- agentId: string;
2065
- trigger: {
2066
- kind: "manual";
2067
- } | {
2068
- kind: "scheduled";
2069
- schedule: string | null;
2070
- } | {
2071
- kind: "webhook";
2072
- } | {
2073
- kind: "subagent";
2074
- } | {
2075
- number: number | null;
2076
- repository: string;
2077
- provider: string;
2078
- event: "mention" | "review";
2079
- kind: "code_host";
2080
- } | {
2081
- provider: string;
2082
- kind: "issue";
2083
- url: string | null;
2084
- issueKey: string;
2085
- } | {
2086
- kind: "host_event";
2087
- };
2088
- startedAt: string;
2089
- finishedAt: string | null;
2090
- heartbeatAt: string | null;
2091
- turns: number;
2092
- parentRunId: string | null;
2093
- agentKind: "native" | "coding";
2094
- agentName: string;
2095
- codingProvider: string | null;
2096
- outcomes: ({
2097
- number: number;
2098
- at: string | null;
2099
- repository: string;
2100
- provider: string;
2101
- kind: "pull_request";
2102
- url: string;
2103
- state: string | null;
2104
- } | {
2105
- number: number;
2106
- at: string | null;
2107
- repository: string;
2108
- provider: string;
2109
- kind: "code_host_comment";
2110
- } | {
2111
- at: string | null;
2112
- provider: string;
2113
- kind: "issue_comment";
2114
- url: string | null;
2115
- issueKey: string;
2116
- } | {
2117
- number: number | null;
2118
- at: string | null;
2119
- repository: string;
2120
- provider: string;
2121
- completed: boolean;
2122
- kind: "check";
2123
- })[];
2124
- declaredServices: {
2125
- name: string;
2126
- version: string;
2127
- }[];
2128
- }>, "many">;
640
+ }, z.core.$strip>>;
641
+ }, z.core.$strip>>;
2129
642
  spend: z.ZodObject<{
2130
643
  todayUsd: z.ZodNumber;
2131
644
  groups: z.ZodArray<z.ZodObject<{
@@ -2133,305 +646,61 @@ export declare const VIEWER_SCHEMAS: {
2133
646
  name: z.ZodString;
2134
647
  dailyBudgetUsd: z.ZodNullable<z.ZodNumber>;
2135
648
  spentTodayUsd: z.ZodNumber;
2136
- }, "strip", z.ZodTypeAny, {
2137
- name: string;
2138
- id: string;
2139
- dailyBudgetUsd: number | null;
2140
- spentTodayUsd: number;
2141
- }, {
2142
- name: string;
2143
- id: string;
2144
- dailyBudgetUsd: number | null;
2145
- spentTodayUsd: number;
2146
- }>, "many">;
2147
- }, "strip", z.ZodTypeAny, {
2148
- todayUsd: number;
2149
- groups: {
2150
- name: string;
2151
- id: string;
2152
- dailyBudgetUsd: number | null;
2153
- spentTodayUsd: number;
2154
- }[];
2155
- }, {
2156
- todayUsd: number;
2157
- groups: {
2158
- name: string;
2159
- id: string;
2160
- dailyBudgetUsd: number | null;
2161
- spentTodayUsd: number;
2162
- }[];
2163
- }>;
2164
- }, "strip", z.ZodTypeAny, {
2165
- runs: {
2166
- status: "failed" | "budget_exhausted" | "lost" | "pending" | "running" | "succeeded" | "refused" | "cancelled";
2167
- tokensIn: number;
2168
- tokensOut: number;
2169
- costUsd: number;
2170
- model: string;
2171
- budgetUsd: number;
2172
- services: {
2173
- name: string;
2174
- createdAt: string;
2175
- state: "failed" | "pending" | "probing" | "ready";
2176
- reason: string | null;
2177
- attempts: number | null;
2178
- readyAt: string | null;
2179
- failedAt: string | null;
2180
- }[];
2181
- id: string;
2182
- agentId: string;
2183
- trigger: {
2184
- kind: "manual";
2185
- } | {
2186
- kind: "scheduled";
2187
- schedule: string | null;
2188
- } | {
2189
- kind: "webhook";
2190
- } | {
2191
- kind: "subagent";
2192
- } | {
2193
- number: number | null;
2194
- repository: string;
2195
- provider: string;
2196
- event: "mention" | "review";
2197
- kind: "code_host";
2198
- } | {
2199
- provider: string;
2200
- kind: "issue";
2201
- url: string | null;
2202
- issueKey: string;
2203
- } | {
2204
- kind: "host_event";
2205
- };
2206
- startedAt: string;
2207
- finishedAt: string | null;
2208
- heartbeatAt: string | null;
2209
- turns: number;
2210
- parentRunId: string | null;
2211
- agentKind: "native" | "coding";
2212
- agentName: string;
2213
- codingProvider: string | null;
2214
- outcomes: ({
2215
- number: number;
2216
- at: string | null;
2217
- repository: string;
2218
- provider: string;
2219
- kind: "pull_request";
2220
- url: string;
2221
- state: string | null;
2222
- } | {
2223
- number: number;
2224
- at: string | null;
2225
- repository: string;
2226
- provider: string;
2227
- kind: "code_host_comment";
2228
- } | {
2229
- at: string | null;
2230
- provider: string;
2231
- kind: "issue_comment";
2232
- url: string | null;
2233
- issueKey: string;
2234
- } | {
2235
- number: number | null;
2236
- at: string | null;
2237
- repository: string;
2238
- provider: string;
2239
- completed: boolean;
2240
- kind: "check";
2241
- })[];
2242
- declaredServices: {
2243
- name: string;
2244
- version: string;
2245
- }[];
2246
- }[];
2247
- truncated: boolean;
2248
- limit: number;
2249
- generatedAt: string;
2250
- since: string;
2251
- spend: {
2252
- todayUsd: number;
2253
- groups: {
2254
- name: string;
2255
- id: string;
2256
- dailyBudgetUsd: number | null;
2257
- spentTodayUsd: number;
2258
- }[];
2259
- };
2260
- }, {
2261
- runs: {
2262
- status: "failed" | "budget_exhausted" | "lost" | "pending" | "running" | "succeeded" | "refused" | "cancelled";
2263
- tokensIn: number;
2264
- tokensOut: number;
2265
- costUsd: number;
2266
- model: string;
2267
- budgetUsd: number;
2268
- services: {
2269
- name: string;
2270
- createdAt: string;
2271
- state: "failed" | "pending" | "probing" | "ready";
2272
- reason: string | null;
2273
- attempts: number | null;
2274
- readyAt: string | null;
2275
- failedAt: string | null;
2276
- }[];
2277
- id: string;
2278
- agentId: string;
2279
- trigger: {
2280
- kind: "manual";
2281
- } | {
2282
- kind: "scheduled";
2283
- schedule: string | null;
2284
- } | {
2285
- kind: "webhook";
2286
- } | {
2287
- kind: "subagent";
2288
- } | {
2289
- number: number | null;
2290
- repository: string;
2291
- provider: string;
2292
- event: "mention" | "review";
2293
- kind: "code_host";
2294
- } | {
2295
- provider: string;
2296
- kind: "issue";
2297
- url: string | null;
2298
- issueKey: string;
2299
- } | {
2300
- kind: "host_event";
2301
- };
2302
- startedAt: string;
2303
- finishedAt: string | null;
2304
- heartbeatAt: string | null;
2305
- turns: number;
2306
- parentRunId: string | null;
2307
- agentKind: "native" | "coding";
2308
- agentName: string;
2309
- codingProvider: string | null;
2310
- outcomes: ({
2311
- number: number;
2312
- at: string | null;
2313
- repository: string;
2314
- provider: string;
2315
- kind: "pull_request";
2316
- url: string;
2317
- state: string | null;
2318
- } | {
2319
- number: number;
2320
- at: string | null;
2321
- repository: string;
2322
- provider: string;
2323
- kind: "code_host_comment";
2324
- } | {
2325
- at: string | null;
2326
- provider: string;
2327
- kind: "issue_comment";
2328
- url: string | null;
2329
- issueKey: string;
2330
- } | {
2331
- number: number | null;
2332
- at: string | null;
2333
- repository: string;
2334
- provider: string;
2335
- completed: boolean;
2336
- kind: "check";
2337
- })[];
2338
- declaredServices: {
2339
- name: string;
2340
- version: string;
2341
- }[];
2342
- }[];
2343
- truncated: boolean;
2344
- limit: number;
2345
- generatedAt: string;
2346
- since: string;
2347
- spend: {
2348
- todayUsd: number;
2349
- groups: {
2350
- name: string;
2351
- id: string;
2352
- dailyBudgetUsd: number | null;
2353
- spentTodayUsd: number;
2354
- }[];
2355
- };
2356
- }>;
649
+ }, z.core.$strip>>;
650
+ }, z.core.$strip>;
651
+ }, z.core.$strip>;
2357
652
  readonly "run-detail": z.ZodObject<{
2358
653
  id: z.ZodString;
2359
654
  parentRunId: z.ZodNullable<z.ZodString>;
2360
655
  agentId: z.ZodString;
2361
656
  agentName: z.ZodString;
2362
- agentKind: z.ZodEnum<["native", "coding"]>;
2363
- /** The coding run's model, else the agent's. */
657
+ agentKind: z.ZodEnum<{
658
+ native: "native";
659
+ coding: "coding";
660
+ }>;
2364
661
  model: z.ZodString;
2365
- /** The coding worker (e.g. `codex`, `claude-code`); null for native runs. */
2366
662
  codingProvider: z.ZodNullable<z.ZodString>;
2367
- status: z.ZodEnum<["pending", "running", "succeeded", "failed", "refused", "lost", "budget_exhausted", "cancelled"]>;
2368
- trigger: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
663
+ nativeExecutionMode: z.ZodNullable<z.ZodEnum<{
664
+ sandbox: "sandbox";
665
+ "control-plane": "control-plane";
666
+ }>>;
667
+ warmWorkerName: z.ZodNullable<z.ZodString>;
668
+ status: z.ZodEnum<{
669
+ pending: "pending";
670
+ failed: "failed";
671
+ budget_exhausted: "budget_exhausted";
672
+ refused: "refused";
673
+ lost: "lost";
674
+ running: "running";
675
+ succeeded: "succeeded";
676
+ cancelled: "cancelled";
677
+ }>;
678
+ trigger: z.ZodDiscriminatedUnion<[z.ZodObject<{
2369
679
  kind: z.ZodLiteral<"manual">;
2370
- }, "strip", z.ZodTypeAny, {
2371
- kind: "manual";
2372
- }, {
2373
- kind: "manual";
2374
- }>, z.ZodObject<{
680
+ }, z.core.$strip>, z.ZodObject<{
2375
681
  kind: z.ZodLiteral<"scheduled">;
2376
682
  schedule: z.ZodNullable<z.ZodString>;
2377
- }, "strip", z.ZodTypeAny, {
2378
- kind: "scheduled";
2379
- schedule: string | null;
2380
- }, {
2381
- kind: "scheduled";
2382
- schedule: string | null;
2383
- }>, z.ZodObject<{
683
+ }, z.core.$strip>, z.ZodObject<{
2384
684
  kind: z.ZodLiteral<"webhook">;
2385
- }, "strip", z.ZodTypeAny, {
2386
- kind: "webhook";
2387
- }, {
2388
- kind: "webhook";
2389
- }>, z.ZodObject<{
685
+ }, z.core.$strip>, z.ZodObject<{
2390
686
  kind: z.ZodLiteral<"subagent">;
2391
- }, "strip", z.ZodTypeAny, {
2392
- kind: "subagent";
2393
- }, {
2394
- kind: "subagent";
2395
- }>, z.ZodObject<{
687
+ }, z.core.$strip>, z.ZodObject<{
2396
688
  kind: z.ZodLiteral<"code_host">;
2397
689
  provider: z.ZodString;
2398
690
  repository: z.ZodString;
2399
691
  number: z.ZodNullable<z.ZodNumber>;
2400
- event: z.ZodEnum<["review", "mention"]>;
2401
- }, "strip", z.ZodTypeAny, {
2402
- number: number | null;
2403
- repository: string;
2404
- provider: string;
2405
- event: "mention" | "review";
2406
- kind: "code_host";
2407
- }, {
2408
- number: number | null;
2409
- repository: string;
2410
- provider: string;
2411
- event: "mention" | "review";
2412
- kind: "code_host";
2413
- }>, z.ZodObject<{
692
+ event: z.ZodEnum<{
693
+ mention: "mention";
694
+ review: "review";
695
+ }>;
696
+ }, z.core.$strip>, z.ZodObject<{
2414
697
  kind: z.ZodLiteral<"issue">;
2415
698
  provider: z.ZodString;
2416
699
  issueKey: z.ZodString;
2417
700
  url: z.ZodNullable<z.ZodString>;
2418
- }, "strip", z.ZodTypeAny, {
2419
- provider: string;
2420
- kind: "issue";
2421
- url: string | null;
2422
- issueKey: string;
2423
- }, {
2424
- provider: string;
2425
- kind: "issue";
2426
- url: string | null;
2427
- issueKey: string;
2428
- }>, z.ZodObject<{
701
+ }, z.core.$strip>, z.ZodObject<{
2429
702
  kind: z.ZodLiteral<"host_event">;
2430
- }, "strip", z.ZodTypeAny, {
2431
- kind: "host_event";
2432
- }, {
2433
- kind: "host_event";
2434
- }>]>;
703
+ }, z.core.$strip>], "kind">;
2435
704
  turns: z.ZodNumber;
2436
705
  tokensIn: z.ZodNumber;
2437
706
  tokensOut: z.ZodNumber;
@@ -2440,7 +709,7 @@ export declare const VIEWER_SCHEMAS: {
2440
709
  startedAt: z.ZodString;
2441
710
  finishedAt: z.ZodNullable<z.ZodString>;
2442
711
  heartbeatAt: z.ZodNullable<z.ZodString>;
2443
- outcomes: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
712
+ outcomes: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2444
713
  kind: z.ZodLiteral<"pull_request">;
2445
714
  provider: z.ZodString;
2446
715
  repository: z.ZodString;
@@ -2448,121 +717,47 @@ export declare const VIEWER_SCHEMAS: {
2448
717
  url: z.ZodString;
2449
718
  state: z.ZodNullable<z.ZodString>;
2450
719
  at: z.ZodNullable<z.ZodString>;
2451
- }, "strip", z.ZodTypeAny, {
2452
- number: number;
2453
- at: string | null;
2454
- repository: string;
2455
- provider: string;
2456
- kind: "pull_request";
2457
- url: string;
2458
- state: string | null;
2459
- }, {
2460
- number: number;
2461
- at: string | null;
2462
- repository: string;
2463
- provider: string;
2464
- kind: "pull_request";
2465
- url: string;
2466
- state: string | null;
2467
- }>, z.ZodObject<{
720
+ }, z.core.$strip>, z.ZodObject<{
2468
721
  kind: z.ZodLiteral<"code_host_comment">;
2469
722
  provider: z.ZodString;
2470
723
  repository: z.ZodString;
2471
724
  number: z.ZodNumber;
2472
725
  at: z.ZodNullable<z.ZodString>;
2473
- }, "strip", z.ZodTypeAny, {
2474
- number: number;
2475
- at: string | null;
2476
- repository: string;
2477
- provider: string;
2478
- kind: "code_host_comment";
2479
- }, {
2480
- number: number;
2481
- at: string | null;
2482
- repository: string;
2483
- provider: string;
2484
- kind: "code_host_comment";
2485
- }>, z.ZodObject<{
726
+ }, z.core.$strip>, z.ZodObject<{
2486
727
  kind: z.ZodLiteral<"issue_comment">;
2487
728
  provider: z.ZodString;
2488
729
  issueKey: z.ZodString;
2489
730
  url: z.ZodNullable<z.ZodString>;
2490
731
  at: z.ZodNullable<z.ZodString>;
2491
- }, "strip", z.ZodTypeAny, {
2492
- at: string | null;
2493
- provider: string;
2494
- kind: "issue_comment";
2495
- url: string | null;
2496
- issueKey: string;
2497
- }, {
2498
- at: string | null;
2499
- provider: string;
2500
- kind: "issue_comment";
2501
- url: string | null;
2502
- issueKey: string;
2503
- }>, z.ZodObject<{
732
+ }, z.core.$strip>, z.ZodObject<{
2504
733
  kind: z.ZodLiteral<"check">;
2505
734
  provider: z.ZodString;
2506
735
  repository: z.ZodString;
2507
736
  number: z.ZodNullable<z.ZodNumber>;
2508
737
  completed: z.ZodBoolean;
2509
738
  at: z.ZodNullable<z.ZodString>;
2510
- }, "strip", z.ZodTypeAny, {
2511
- number: number | null;
2512
- at: string | null;
2513
- repository: string;
2514
- provider: string;
2515
- completed: boolean;
2516
- kind: "check";
2517
- }, {
2518
- number: number | null;
2519
- at: string | null;
2520
- repository: string;
2521
- provider: string;
2522
- completed: boolean;
2523
- kind: "check";
2524
- }>]>, "many">;
2525
- /** The services a coding run was started with, recorded or not; empty for native runs. */
739
+ }, z.core.$strip>], "kind">>;
2526
740
  declaredServices: z.ZodArray<z.ZodObject<{
2527
741
  name: z.ZodString;
2528
742
  version: z.ZodString;
2529
- }, "strip", z.ZodTypeAny, {
2530
- name: string;
2531
- version: string;
2532
- }, {
2533
- name: string;
2534
- version: string;
2535
- }>, "many">;
2536
- /** Recorded readiness of the run's services (none before status tracking existed). */
743
+ }, z.core.$strip>>;
2537
744
  services: z.ZodArray<z.ZodObject<{
2538
745
  name: z.ZodString;
2539
- state: z.ZodEnum<["pending", "probing", "ready", "failed"]>;
746
+ state: z.ZodEnum<{
747
+ pending: "pending";
748
+ ready: "ready";
749
+ failed: "failed";
750
+ probing: "probing";
751
+ }>;
2540
752
  attempts: z.ZodNullable<z.ZodNumber>;
2541
753
  reason: z.ZodNullable<z.ZodString>;
2542
754
  readyAt: z.ZodNullable<z.ZodString>;
2543
755
  failedAt: z.ZodNullable<z.ZodString>;
2544
756
  createdAt: z.ZodString;
2545
- }, "strip", z.ZodTypeAny, {
2546
- name: string;
2547
- createdAt: string;
2548
- state: "failed" | "pending" | "probing" | "ready";
2549
- reason: string | null;
2550
- attempts: number | null;
2551
- readyAt: string | null;
2552
- failedAt: string | null;
2553
- }, {
2554
- name: string;
2555
- createdAt: string;
2556
- state: "failed" | "pending" | "probing" | "ready";
2557
- reason: string | null;
2558
- attempts: number | null;
2559
- readyAt: string | null;
2560
- failedAt: string | null;
2561
- }>, "many">;
2562
- } & {
757
+ }, z.core.$strip>>;
2563
758
  error: z.ZodNullable<z.ZodString>;
2564
759
  finalText: z.ZodNullable<z.ZodString>;
2565
- childRunIds: z.ZodArray<z.ZodString, "many">;
760
+ childRunIds: z.ZodArray<z.ZodString>;
2566
761
  coding: z.ZodNullable<z.ZodObject<{
2567
762
  provider: z.ZodString;
2568
763
  repository: z.ZodString;
@@ -2574,309 +769,57 @@ export declare const VIEWER_SCHEMAS: {
2574
769
  name: z.ZodString;
2575
770
  version: z.ZodString;
2576
771
  image: z.ZodString;
2577
- envNames: z.ZodArray<z.ZodString, "many">;
2578
- }, "strip", z.ZodTypeAny, {
2579
- name: string;
2580
- version: string;
2581
- image: string;
2582
- envNames: string[];
2583
- }, {
2584
- name: string;
2585
- version: string;
2586
- image: string;
2587
- envNames: string[];
2588
- }>, "many">;
2589
- }, "strip", z.ZodTypeAny, {
2590
- repository: string;
2591
- baseRef: string;
2592
- headRef: string;
2593
- services: {
2594
- name: string;
2595
- version: string;
2596
- image: string;
2597
- envNames: string[];
2598
- }[];
2599
- provider: string;
2600
- failureCategory: string | null;
2601
- queuedAt: string | null;
2602
- }, {
2603
- repository: string;
2604
- baseRef: string;
2605
- headRef: string;
2606
- services: {
2607
- name: string;
2608
- version: string;
2609
- image: string;
2610
- envNames: string[];
2611
- }[];
2612
- provider: string;
2613
- failureCategory: string | null;
2614
- queuedAt: string | null;
2615
- }>>;
2616
- }, "strip", z.ZodTypeAny, {
2617
- error: string | null;
2618
- status: "failed" | "budget_exhausted" | "lost" | "pending" | "running" | "succeeded" | "refused" | "cancelled";
2619
- tokensIn: number;
2620
- tokensOut: number;
2621
- costUsd: number;
2622
- model: string;
2623
- budgetUsd: number;
2624
- services: {
2625
- name: string;
2626
- createdAt: string;
2627
- state: "failed" | "pending" | "probing" | "ready";
2628
- reason: string | null;
2629
- attempts: number | null;
2630
- readyAt: string | null;
2631
- failedAt: string | null;
2632
- }[];
2633
- id: string;
2634
- agentId: string;
2635
- trigger: {
2636
- kind: "manual";
2637
- } | {
2638
- kind: "scheduled";
2639
- schedule: string | null;
2640
- } | {
2641
- kind: "webhook";
2642
- } | {
2643
- kind: "subagent";
2644
- } | {
2645
- number: number | null;
2646
- repository: string;
2647
- provider: string;
2648
- event: "mention" | "review";
2649
- kind: "code_host";
2650
- } | {
2651
- provider: string;
2652
- kind: "issue";
2653
- url: string | null;
2654
- issueKey: string;
2655
- } | {
2656
- kind: "host_event";
2657
- };
2658
- startedAt: string;
2659
- finishedAt: string | null;
2660
- heartbeatAt: string | null;
2661
- finalText: string | null;
2662
- turns: number;
2663
- parentRunId: string | null;
2664
- coding: {
2665
- repository: string;
2666
- baseRef: string;
2667
- headRef: string;
2668
- services: {
2669
- name: string;
2670
- version: string;
2671
- image: string;
2672
- envNames: string[];
2673
- }[];
2674
- provider: string;
2675
- failureCategory: string | null;
2676
- queuedAt: string | null;
2677
- } | null;
2678
- agentKind: "native" | "coding";
2679
- agentName: string;
2680
- codingProvider: string | null;
2681
- outcomes: ({
2682
- number: number;
2683
- at: string | null;
2684
- repository: string;
2685
- provider: string;
2686
- kind: "pull_request";
2687
- url: string;
2688
- state: string | null;
2689
- } | {
2690
- number: number;
2691
- at: string | null;
2692
- repository: string;
2693
- provider: string;
2694
- kind: "code_host_comment";
2695
- } | {
2696
- at: string | null;
2697
- provider: string;
2698
- kind: "issue_comment";
2699
- url: string | null;
2700
- issueKey: string;
2701
- } | {
2702
- number: number | null;
2703
- at: string | null;
2704
- repository: string;
2705
- provider: string;
2706
- completed: boolean;
2707
- kind: "check";
2708
- })[];
2709
- declaredServices: {
2710
- name: string;
2711
- version: string;
2712
- }[];
2713
- childRunIds: string[];
2714
- }, {
2715
- error: string | null;
2716
- status: "failed" | "budget_exhausted" | "lost" | "pending" | "running" | "succeeded" | "refused" | "cancelled";
2717
- tokensIn: number;
2718
- tokensOut: number;
2719
- costUsd: number;
2720
- model: string;
2721
- budgetUsd: number;
2722
- services: {
2723
- name: string;
2724
- createdAt: string;
2725
- state: "failed" | "pending" | "probing" | "ready";
2726
- reason: string | null;
2727
- attempts: number | null;
2728
- readyAt: string | null;
2729
- failedAt: string | null;
2730
- }[];
2731
- id: string;
2732
- agentId: string;
2733
- trigger: {
2734
- kind: "manual";
2735
- } | {
2736
- kind: "scheduled";
2737
- schedule: string | null;
2738
- } | {
2739
- kind: "webhook";
2740
- } | {
2741
- kind: "subagent";
2742
- } | {
2743
- number: number | null;
2744
- repository: string;
2745
- provider: string;
2746
- event: "mention" | "review";
2747
- kind: "code_host";
2748
- } | {
2749
- provider: string;
2750
- kind: "issue";
2751
- url: string | null;
2752
- issueKey: string;
2753
- } | {
2754
- kind: "host_event";
2755
- };
2756
- startedAt: string;
2757
- finishedAt: string | null;
2758
- heartbeatAt: string | null;
2759
- finalText: string | null;
2760
- turns: number;
2761
- parentRunId: string | null;
2762
- coding: {
2763
- repository: string;
2764
- baseRef: string;
2765
- headRef: string;
2766
- services: {
2767
- name: string;
2768
- version: string;
2769
- image: string;
2770
- envNames: string[];
2771
- }[];
2772
- provider: string;
2773
- failureCategory: string | null;
2774
- queuedAt: string | null;
2775
- } | null;
2776
- agentKind: "native" | "coding";
2777
- agentName: string;
2778
- codingProvider: string | null;
2779
- outcomes: ({
2780
- number: number;
2781
- at: string | null;
2782
- repository: string;
2783
- provider: string;
2784
- kind: "pull_request";
2785
- url: string;
2786
- state: string | null;
2787
- } | {
2788
- number: number;
2789
- at: string | null;
2790
- repository: string;
2791
- provider: string;
2792
- kind: "code_host_comment";
2793
- } | {
2794
- at: string | null;
2795
- provider: string;
2796
- kind: "issue_comment";
2797
- url: string | null;
2798
- issueKey: string;
2799
- } | {
2800
- number: number | null;
2801
- at: string | null;
2802
- repository: string;
2803
- provider: string;
2804
- completed: boolean;
2805
- kind: "check";
2806
- })[];
2807
- declaredServices: {
2808
- name: string;
2809
- version: string;
2810
- }[];
2811
- childRunIds: string[];
2812
- }>;
2813
- readonly "viewer-event": z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
772
+ envNames: z.ZodArray<z.ZodString>;
773
+ }, z.core.$strip>>;
774
+ }, z.core.$strip>>;
775
+ }, z.core.$strip>;
776
+ readonly "viewer-event": z.ZodDiscriminatedUnion<[z.ZodObject<{
2814
777
  kind: z.ZodLiteral<"run">;
2815
778
  runId: z.ZodString;
2816
779
  parentRunId: z.ZodNullable<z.ZodString>;
2817
780
  agentId: z.ZodString;
2818
- status: z.ZodEnum<["pending", "running", "succeeded", "failed", "refused", "lost", "budget_exhausted", "cancelled"]>;
781
+ status: z.ZodEnum<{
782
+ pending: "pending";
783
+ failed: "failed";
784
+ budget_exhausted: "budget_exhausted";
785
+ refused: "refused";
786
+ lost: "lost";
787
+ running: "running";
788
+ succeeded: "succeeded";
789
+ cancelled: "cancelled";
790
+ }>;
2819
791
  turns: z.ZodNumber;
2820
792
  tokensIn: z.ZodNumber;
2821
793
  tokensOut: z.ZodNumber;
2822
794
  costUsd: z.ZodNumber;
2823
795
  finishedAt: z.ZodNullable<z.ZodString>;
2824
- }, "strip", z.ZodTypeAny, {
2825
- status: "failed" | "budget_exhausted" | "lost" | "pending" | "running" | "succeeded" | "refused" | "cancelled";
2826
- tokensIn: number;
2827
- tokensOut: number;
2828
- costUsd: number;
2829
- runId: string;
2830
- kind: "run";
2831
- agentId: string;
2832
- finishedAt: string | null;
2833
- turns: number;
2834
- parentRunId: string | null;
2835
- }, {
2836
- status: "failed" | "budget_exhausted" | "lost" | "pending" | "running" | "succeeded" | "refused" | "cancelled";
2837
- tokensIn: number;
2838
- tokensOut: number;
2839
- costUsd: number;
2840
- runId: string;
2841
- kind: "run";
2842
- agentId: string;
2843
- finishedAt: string | null;
2844
- turns: number;
2845
- parentRunId: string | null;
2846
- }>, z.ZodObject<{
796
+ }, z.core.$strip>, z.ZodObject<{
2847
797
  kind: z.ZodLiteral<"service">;
2848
798
  runId: z.ZodString;
2849
799
  name: z.ZodString;
2850
- state: z.ZodEnum<["pending", "probing", "ready", "failed"]>;
800
+ state: z.ZodEnum<{
801
+ pending: "pending";
802
+ ready: "ready";
803
+ failed: "failed";
804
+ probing: "probing";
805
+ }>;
2851
806
  attempts: z.ZodNullable<z.ZodNumber>;
2852
- }, "strip", z.ZodTypeAny, {
2853
- name: string;
2854
- runId: string;
2855
- kind: "service";
2856
- state: "failed" | "pending" | "probing" | "ready";
2857
- attempts: number | null;
2858
- }, {
2859
- name: string;
2860
- runId: string;
2861
- kind: "service";
2862
- state: "failed" | "pending" | "probing" | "ready";
2863
- attempts: number | null;
2864
- }>, z.ZodObject<{
807
+ }, z.core.$strip>, z.ZodObject<{
2865
808
  kind: z.ZodLiteral<"outcome">;
2866
809
  runId: z.ZodString;
2867
- /** Which table changed (the viewer NOTIFY trigger names them). */
2868
- source: z.ZodEnum<["pull_request", "host_status", "issue_status", "host_check"]>;
2869
- }, "strip", z.ZodTypeAny, {
2870
- runId: string;
2871
- kind: "outcome";
2872
- source: "pull_request" | "host_status" | "issue_status" | "host_check";
2873
- }, {
2874
- runId: string;
2875
- kind: "outcome";
2876
- source: "pull_request" | "host_status" | "issue_status" | "host_check";
2877
- }>]>;
810
+ source: z.ZodEnum<{
811
+ pull_request: "pull_request";
812
+ host_status: "host_status";
813
+ issue_status: "issue_status";
814
+ host_check: "host_check";
815
+ }>;
816
+ }, z.core.$strip>], "kind">;
2878
817
  readonly "infra-info": z.ZodObject<{
2879
- launcher: z.ZodEnum<["local", "docker", "kubernetes"]>;
818
+ launcher: z.ZodEnum<{
819
+ local: "local";
820
+ docker: "docker";
821
+ kubernetes: "kubernetes";
822
+ }>;
2880
823
  kubernetes: z.ZodNullable<z.ZodObject<{
2881
824
  namespace: z.ZodString;
2882
825
  platform: z.ZodString;
@@ -2886,48 +829,23 @@ export declare const VIEWER_SCHEMAS: {
2886
829
  runLabelHashChars: z.ZodNumber;
2887
830
  componentLabel: z.ZodRecord<z.ZodString, z.ZodString>;
2888
831
  managedByLabel: z.ZodRecord<z.ZodString, z.ZodString>;
2889
- }, "strip", z.ZodTypeAny, {
2890
- namespace: string;
2891
- platform: string;
2892
- proxyService: string;
2893
- runtimeClass: string | null;
2894
- runLabel: string;
2895
- runLabelHashChars: number;
2896
- componentLabel: Record<string, string>;
2897
- managedByLabel: Record<string, string>;
2898
- }, {
2899
- namespace: string;
2900
- platform: string;
2901
- proxyService: string;
2902
- runtimeClass: string | null;
2903
- runLabel: string;
2904
- runLabelHashChars: number;
2905
- componentLabel: Record<string, string>;
2906
- managedByLabel: Record<string, string>;
2907
- }>>;
2908
- }, "strip", z.ZodTypeAny, {
2909
- kubernetes: {
2910
- namespace: string;
2911
- platform: string;
2912
- proxyService: string;
2913
- runtimeClass: string | null;
2914
- runLabel: string;
2915
- runLabelHashChars: number;
2916
- componentLabel: Record<string, string>;
2917
- managedByLabel: Record<string, string>;
2918
- } | null;
2919
- launcher: "local" | "docker" | "kubernetes";
2920
- }, {
2921
- kubernetes: {
2922
- namespace: string;
2923
- platform: string;
2924
- proxyService: string;
2925
- runtimeClass: string | null;
2926
- runLabel: string;
2927
- runLabelHashChars: number;
2928
- componentLabel: Record<string, string>;
2929
- managedByLabel: Record<string, string>;
2930
- } | null;
2931
- launcher: "local" | "docker" | "kubernetes";
2932
- }>;
832
+ }, z.core.$strip>>;
833
+ native: z.ZodNullable<z.ZodObject<{
834
+ launcher: z.ZodEnum<{
835
+ docker: "docker";
836
+ kubernetes: "kubernetes";
837
+ }>;
838
+ warmPoolSize: z.ZodNumber;
839
+ kubernetes: z.ZodNullable<z.ZodObject<{
840
+ namespace: z.ZodString;
841
+ runtimeClass: z.ZodNullable<z.ZodString>;
842
+ runLabel: z.ZodString;
843
+ componentLabel: z.ZodRecord<z.ZodString, z.ZodString>;
844
+ warmPoolLabel: z.ZodRecord<z.ZodString, z.ZodString>;
845
+ warmWorkerLabel: z.ZodString;
846
+ }, z.core.$strip>>;
847
+ }, z.core.$strip>>;
848
+ }, z.core.$strip>;
2933
849
  };
850
+ /** A viewer schema's JSON Schema (draft-07 keywords, no `$schema`), as the published files spell it. */
851
+ export declare function viewerJsonSchema(schema: z.ZodType): Record<string, unknown>;