@wardby/cli 0.6.0 → 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 (576) hide show
  1. package/deploy/local/docker-compose.quickstart-coding.yml +13 -0
  2. package/dist/claude-coding-worker/driver.d.ts +21 -3
  3. package/dist/claude-coding-worker/driver.js +125 -17
  4. package/dist/claude-coding-worker/main.js +34 -6
  5. package/dist/claude-coding-worker/sdk.js +12 -1
  6. package/dist/claude-coding-worker/tool-socket.d.ts +27 -0
  7. package/dist/claude-coding-worker/tool-socket.js +111 -0
  8. package/dist/claude-coding-worker/transcript.d.ts +18 -0
  9. package/dist/claude-coding-worker/transcript.js +77 -0
  10. package/dist/cli-help.d.ts +1 -1
  11. package/dist/cli-help.js +1 -0
  12. package/dist/cli.js +24 -10
  13. package/dist/coding/continuation-wording.d.ts +35 -0
  14. package/dist/coding/continuation-wording.js +73 -0
  15. package/dist/coding/linked-issue-note.d.ts +23 -0
  16. package/dist/coding/linked-issue-note.js +47 -0
  17. package/dist/coding/merge-wording.d.ts +28 -0
  18. package/dist/coding/merge-wording.js +78 -0
  19. package/dist/coding/pr-description-note.d.ts +9 -0
  20. package/dist/coding/pr-description-note.js +32 -0
  21. package/dist/coding/profile.d.ts +46 -126
  22. package/dist/coding/profile.js +45 -4
  23. package/dist/coding/protected-path-wording.d.ts +8 -0
  24. package/dist/coding/protected-path-wording.js +1 -1
  25. package/dist/coding/protocol.d.ts +264 -346
  26. package/dist/coding/protocol.js +235 -12
  27. package/dist/coding/redact.d.ts +3 -0
  28. package/dist/coding/redact.js +12 -0
  29. package/dist/coding/registry/allowlist.d.ts +12 -0
  30. package/dist/coding/registry/allowlist.js +14 -1
  31. package/dist/coding/registry/audit-mode.d.ts +153 -0
  32. package/dist/coding/registry/audit-mode.js +304 -0
  33. package/dist/coding/registry/lockfile-shared.d.ts +36 -0
  34. package/dist/coding/registry/lockfile-shared.js +128 -0
  35. package/dist/coding/registry/lockfiles.js +1 -1
  36. package/dist/coding/registry/npm-lockfile-formats.d.ts +11 -0
  37. package/dist/coding/registry/npm-lockfile-formats.js +41 -0
  38. package/dist/coding/registry/npm-lockfile.d.ts +8 -4
  39. package/dist/coding/registry/npm-lockfile.js +4 -6
  40. package/dist/coding/registry/npm.js +78 -8
  41. package/dist/coding/registry/pnpm-lockfile.d.ts +17 -0
  42. package/dist/coding/registry/pnpm-lockfile.js +189 -0
  43. package/dist/coding/registry/pypi-plan.d.ts +50 -0
  44. package/dist/coding/registry/pypi-plan.js +406 -0
  45. package/dist/coding/registry/pypi-requirements.d.ts +58 -0
  46. package/dist/coding/registry/pypi-requirements.js +155 -0
  47. package/dist/coding/registry/pypi.d.ts +3 -27
  48. package/dist/coding/registry/pypi.js +40 -154
  49. package/dist/coding/registry/refusal-hints.d.ts +20 -0
  50. package/dist/coding/registry/refusal-hints.js +61 -0
  51. package/dist/coding/registry/refusal-wording.d.ts +11 -0
  52. package/dist/coding/registry/refusal-wording.js +56 -0
  53. package/dist/coding/registry/report.d.ts +70 -8
  54. package/dist/coding/registry/report.js +112 -5
  55. package/dist/coding/registry/types.d.ts +58 -8
  56. package/dist/coding/registry/yarn-lockfile.d.ts +30 -0
  57. package/dist/coding/registry/yarn-lockfile.js +367 -0
  58. package/dist/coding/services/catalog.d.ts +37 -351
  59. package/dist/coding/transcript/claude-code.d.ts +13 -0
  60. package/dist/coding/transcript/claude-code.js +273 -0
  61. package/dist/coding/transcript/download-protocol.d.ts +30 -0
  62. package/dist/coding/transcript/download-protocol.js +18 -0
  63. package/dist/coding/transcript/format.d.ts +20 -0
  64. package/dist/coding/transcript/format.js +32 -0
  65. package/dist/coding/transcript/recorder.d.ts +51 -0
  66. package/dist/coding/transcript/recorder.js +225 -0
  67. package/dist/coding/transcript/resume/checkout.d.ts +31 -0
  68. package/dist/coding/transcript/resume/checkout.js +203 -0
  69. package/dist/coding/transcript/resume/command.d.ts +17 -0
  70. package/dist/coding/transcript/resume/command.js +176 -0
  71. package/dist/coding/transcript/resume/download.d.ts +20 -0
  72. package/dist/coding/transcript/resume/download.js +153 -0
  73. package/dist/coding/transcript/resume/launch.d.ts +38 -0
  74. package/dist/coding/transcript/resume/launch.js +128 -0
  75. package/dist/coding/transcript/resume/session-file.d.ts +13 -0
  76. package/dist/coding/transcript/resume/session-file.js +79 -0
  77. package/dist/coding/transcript/resume/stand-in.d.ts +11 -0
  78. package/dist/coding/transcript/resume/stand-in.js +49 -0
  79. package/dist/coding-worker/artifact.d.ts +8 -3
  80. package/dist/coding-worker/artifact.js +3 -1
  81. package/dist/coding-worker/debug-trace.d.ts +6 -5
  82. package/dist/coding-worker/debug-trace.js +13 -18
  83. package/dist/coding-worker/dependency-cache.d.mts +229 -0
  84. package/dist/coding-worker/dependency-cache.mjs +2123 -0
  85. package/dist/coding-worker/driver.d.ts +4 -3
  86. package/dist/coding-worker/driver.js +116 -38
  87. package/dist/coding-worker/errors.d.ts +1 -0
  88. package/dist/coding-worker/errors.js +32 -0
  89. package/dist/coding-worker/task-note.d.ts +11 -0
  90. package/dist/coding-worker/task-note.js +13 -0
  91. package/dist/coding-worker/types.d.ts +11 -0
  92. package/dist/config/dependency-cache.d.ts +23 -0
  93. package/dist/config/dependency-cache.js +32 -0
  94. package/dist/config/providers.d.ts +12 -3
  95. package/dist/config/providers.js +55 -5
  96. package/dist/config/test-simulators.d.ts +82 -0
  97. package/dist/config/test-simulators.js +305 -0
  98. package/dist/core/async-context.d.ts +2 -0
  99. package/dist/core/async-context.js +12 -0
  100. package/dist/core/budget-events.d.ts +108 -0
  101. package/dist/core/budget-events.js +346 -0
  102. package/dist/core/budget-groups.d.ts +50 -1
  103. package/dist/core/budget-groups.js +236 -27
  104. package/dist/core/budget-stopped-head.d.ts +46 -0
  105. package/dist/core/budget-stopped-head.js +81 -0
  106. package/dist/core/budget-topup.d.ts +51 -0
  107. package/dist/core/budget-topup.js +156 -0
  108. package/dist/core/budget-wording.d.ts +16 -2
  109. package/dist/core/budget-wording.js +40 -2
  110. package/dist/core/coding-queue.d.ts +2 -1
  111. package/dist/core/coding-queue.js +7 -0
  112. package/dist/core/cron.d.ts +19 -1
  113. package/dist/core/cron.js +17 -0
  114. package/dist/core/datastores.js +1 -1
  115. package/dist/core/deferred-coding.d.ts +14 -0
  116. package/dist/core/deferred-coding.js +62 -0
  117. package/dist/core/delegation-child.d.ts +25 -0
  118. package/dist/core/delegation-child.js +37 -0
  119. package/dist/core/dispatch.d.ts +42 -0
  120. package/dist/core/dispatch.js +131 -56
  121. package/dist/core/engine-native.js +1 -1
  122. package/dist/core/error-code.d.ts +38 -0
  123. package/dist/core/error-code.js +168 -0
  124. package/dist/core/grants.d.ts +19 -6
  125. package/dist/core/grants.js +55 -6
  126. package/dist/core/host-events.d.ts +18 -2
  127. package/dist/core/host-events.js +284 -24
  128. package/dist/core/host-status.d.ts +85 -3
  129. package/dist/core/host-status.js +298 -20
  130. package/dist/core/issue-bridge.d.ts +50 -6
  131. package/dist/core/issue-bridge.js +124 -33
  132. package/dist/core/issue-events.d.ts +1 -1
  133. package/dist/core/issue-events.js +4 -10
  134. package/dist/core/issue-status.d.ts +1 -1
  135. package/dist/core/issue-status.js +54 -26
  136. package/dist/core/logger.d.ts +5 -0
  137. package/dist/core/logger.js +14 -1
  138. package/dist/core/lost-run-children.d.ts +6 -0
  139. package/dist/core/lost-run-children.js +32 -0
  140. package/dist/core/mark-ready.d.ts +34 -0
  141. package/dist/core/mark-ready.js +152 -0
  142. package/dist/core/markdown-code.d.ts +8 -0
  143. package/dist/core/markdown-code.js +107 -0
  144. package/dist/core/memory-tools.js +7 -0
  145. package/dist/core/merge-order-check.d.ts +2 -1
  146. package/dist/core/merge-order-check.js +8 -1
  147. package/dist/core/notification-templates.d.ts +1 -7
  148. package/dist/core/notification-templates.js +36 -2
  149. package/dist/core/pull-request-state-sync.js +2 -2
  150. package/dist/core/reconciler.d.ts +4 -3
  151. package/dist/core/reconciler.js +8 -1
  152. package/dist/core/related-pull-requests.d.ts +11 -3
  153. package/dist/core/related-pull-requests.js +27 -14
  154. package/dist/core/reply-parts.d.ts +21 -0
  155. package/dist/core/reply-parts.js +73 -0
  156. package/dist/core/review-fix.d.ts +1 -1
  157. package/dist/core/review-fix.js +2 -1
  158. package/dist/core/review-host-checks.d.ts +1 -1
  159. package/dist/core/review-host-tools.d.ts +3 -0
  160. package/dist/core/review-host-tools.js +99 -13
  161. package/dist/core/review-reads.d.ts +55 -0
  162. package/dist/core/review-reads.js +233 -0
  163. package/dist/core/run-status.d.ts +12 -0
  164. package/dist/core/run-status.js +12 -0
  165. package/dist/core/runner.d.ts +80 -34
  166. package/dist/core/runner.js +439 -144
  167. package/dist/core/schedule-start.d.ts +12 -0
  168. package/dist/core/schedule-start.js +14 -0
  169. package/dist/core/secret-broker-config.d.ts +10 -74
  170. package/dist/core/secret-guard.d.ts +46 -0
  171. package/dist/core/secret-guard.js +104 -0
  172. package/dist/core/secret-guarded-stores.d.ts +12 -0
  173. package/dist/core/secret-guarded-stores.js +41 -0
  174. package/dist/core/secret-spans.d.ts +50 -0
  175. package/dist/core/secret-spans.js +94 -0
  176. package/dist/core/stop-run.d.ts +46 -0
  177. package/dist/core/stop-run.js +61 -0
  178. package/dist/core/workflow-events.d.ts +14 -2
  179. package/dist/core/workflow-events.js +4 -0
  180. package/dist/core/workflow-run-events.d.ts +5 -3
  181. package/dist/core/workflow-run-events.js +43 -8
  182. package/dist/core/zod-json-schema.d.ts +4 -0
  183. package/dist/core/zod-json-schema.js +39 -0
  184. package/dist/core/zod3-window.d.ts +35 -0
  185. package/dist/core/zod3-window.js +124 -0
  186. package/dist/generated/prisma/browser.d.ts +34 -3
  187. package/dist/generated/prisma/client.d.ts +34 -3
  188. package/dist/generated/prisma/commonInputTypes.d.ts +220 -60
  189. package/dist/generated/prisma/enums.d.ts +10 -0
  190. package/dist/generated/prisma/enums.js +8 -0
  191. package/dist/generated/prisma/internal/class.d.ts +44 -0
  192. package/dist/generated/prisma/internal/class.js +4 -4
  193. package/dist/generated/prisma/internal/prismaNamespace.d.ts +428 -9
  194. package/dist/generated/prisma/internal/prismaNamespace.js +92 -1
  195. package/dist/generated/prisma/internal/prismaNamespaceBrowser.d.ts +95 -0
  196. package/dist/generated/prisma/internal/prismaNamespaceBrowser.js +92 -1
  197. package/dist/generated/prisma/models/Agent.d.ts +106 -8
  198. package/dist/generated/prisma/models/AgentRepository.d.ts +42 -1
  199. package/dist/generated/prisma/models/CodingAgentProfile.d.ts +229 -1
  200. package/dist/generated/prisma/models/CodingProxyRequest.d.ts +207 -3
  201. package/dist/generated/prisma/models/CodingProxySession.d.ts +114 -1
  202. package/dist/generated/prisma/models/CodingRun.d.ts +1637 -1
  203. package/dist/generated/prisma/models/DependencySnapshot.d.ts +1668 -0
  204. package/dist/generated/prisma/models/DependencySnapshot.js +1 -0
  205. package/dist/generated/prisma/models/IssuePullRequest.d.ts +6 -2
  206. package/dist/generated/prisma/models/LocalReview.d.ts +40 -1
  207. package/dist/generated/prisma/models/NativeGatewayCall.d.ts +39 -1
  208. package/dist/generated/prisma/models/NativeGatewaySession.d.ts +35 -1
  209. package/dist/generated/prisma/models/RegistryAllowance.d.ts +41 -1
  210. package/dist/generated/prisma/models/RegistryApprovedVersion.d.ts +75 -1
  211. package/dist/generated/prisma/models/RegistryAuditRecord.d.ts +1364 -0
  212. package/dist/generated/prisma/models/RegistryAuditRecord.js +1 -0
  213. package/dist/generated/prisma/models/Run.d.ts +738 -2
  214. package/dist/generated/prisma/models/RunBudgetEvent.d.ts +1211 -0
  215. package/dist/generated/prisma/models/RunBudgetEvent.js +1 -0
  216. package/dist/generated/prisma/models/RunTranscript.d.ts +1339 -0
  217. package/dist/generated/prisma/models/RunTranscript.js +1 -0
  218. package/dist/generated/prisma/models.d.ts +4 -0
  219. package/dist/help-index.json +1320 -69
  220. package/dist/import/create.js +32 -3
  221. package/dist/import/neutral-schema.d.ts +50 -281
  222. package/dist/import/neutral-schema.js +5 -4
  223. package/dist/knowledge/check.d.ts +1 -1
  224. package/dist/knowledge/cli.d.ts +11 -1
  225. package/dist/knowledge/cli.js +37 -4
  226. package/dist/knowledge/concept.d.ts +3 -19
  227. package/dist/knowledge/location.d.ts +31 -0
  228. package/dist/knowledge/location.js +78 -0
  229. package/dist/mcp/auth/access.d.ts +10 -2
  230. package/dist/mcp/auth/access.js +15 -1
  231. package/dist/mcp/auth/ownership.d.ts +7 -7
  232. package/dist/mcp/auth/self-hosted/credentials.d.ts +3 -3
  233. package/dist/mcp/auth/self-hosted/session.d.ts +2 -2
  234. package/dist/mcp/host-events/github-ingress.d.ts +2 -0
  235. package/dist/mcp/host-events/github-ingress.js +2 -1
  236. package/dist/mcp/index.d.ts +6 -0
  237. package/dist/mcp/index.js +58 -10
  238. package/dist/mcp/server.d.ts +13 -0
  239. package/dist/mcp/server.js +33 -14
  240. package/dist/mcp/tools/agents.d.ts +4 -0
  241. package/dist/mcp/tools/agents.js +198 -16
  242. package/dist/mcp/tools/datastore.js +17 -8
  243. package/dist/mcp/tools/grants.js +9 -3
  244. package/dist/mcp/tools/memory.js +11 -1
  245. package/dist/mcp/tools/notification-channels.js +2 -2
  246. package/dist/mcp/tools/packages.d.ts +2 -0
  247. package/dist/mcp/tools/packages.js +195 -0
  248. package/dist/mcp/tools/repositories.js +18 -5
  249. package/dist/mcp/tools/run-access.d.ts +16 -0
  250. package/dist/mcp/tools/run-access.js +25 -0
  251. package/dist/mcp/tools/run-transcript-download.d.ts +30 -0
  252. package/dist/mcp/tools/run-transcript-download.js +129 -0
  253. package/dist/mcp/tools/run-transcript.d.ts +19 -0
  254. package/dist/mcp/tools/run-transcript.js +70 -0
  255. package/dist/mcp/tools/runs.js +34 -12
  256. package/dist/mcp/tools/scheduling.js +3 -1
  257. package/dist/mcp/tools/secret-elicitation-form.js +5 -0
  258. package/dist/mcp/tools/secret-elicitation-server.d.ts +6 -0
  259. package/dist/mcp/tools/secret-elicitation-server.js +10 -61
  260. package/dist/mcp/tools/secrets.js +2 -2
  261. package/dist/mcp/tools/stop-run.d.ts +2 -0
  262. package/dist/mcp/tools/stop-run.js +82 -0
  263. package/dist/mcp/tools/subagents.js +2 -2
  264. package/dist/mcp/tools/tools.d.ts +1 -1
  265. package/dist/mcp/tools/tools.js +25 -9
  266. package/dist/mcp/transport/stdio-link-host.d.ts +20 -0
  267. package/dist/mcp/transport/stdio-link-host.js +67 -0
  268. package/dist/mcp/transport/streamable-http.d.ts +13 -0
  269. package/dist/mcp/transport/streamable-http.js +41 -1
  270. package/dist/native-worker/docker-launcher.d.ts +38 -2
  271. package/dist/native-worker/docker-launcher.js +65 -5
  272. package/dist/native-worker/gateway-server.d.ts +41 -3
  273. package/dist/native-worker/gateway-server.js +124 -27
  274. package/dist/native-worker/gateway.d.ts +27 -1
  275. package/dist/native-worker/gateway.js +70 -4
  276. package/dist/native-worker/http-server.d.ts +3 -1
  277. package/dist/native-worker/http-server.js +11 -7
  278. package/dist/native-worker/http-transport.js +1 -1
  279. package/dist/native-worker/kubernetes-launcher.d.ts +7 -3
  280. package/dist/native-worker/kubernetes-launcher.js +43 -3
  281. package/dist/native-worker/launch.d.ts +18 -1
  282. package/dist/native-worker/launch.js +6 -1
  283. package/dist/native-worker/ledger.d.ts +18 -2
  284. package/dist/native-worker/ledger.js +57 -4
  285. package/dist/native-worker/loopback.js +3 -8
  286. package/dist/native-worker/main.d.ts +2 -1
  287. package/dist/native-worker/main.js +14 -3
  288. package/dist/native-worker/protocol.d.ts +129 -577
  289. package/dist/native-worker/protocol.js +47 -1
  290. package/dist/native-worker/sandbox-executor.d.ts +17 -2
  291. package/dist/native-worker/sandbox-executor.js +78 -4
  292. package/dist/native-worker/stderr-redaction.d.ts +77 -0
  293. package/dist/native-worker/stderr-redaction.js +237 -0
  294. package/dist/native-worker/stdio.d.ts +1 -1
  295. package/dist/native-worker/stdio.js +6 -5
  296. package/dist/native-worker/warm-pool.d.ts +2 -2
  297. package/dist/native-worker/warm-pool.js +4 -4
  298. package/dist/native-worker/worker.js +28 -2
  299. package/dist/observability/metrics.js +6 -1
  300. package/dist/providers/auth/self-hosted.d.ts +1 -1
  301. package/dist/providers/coding-proxy/dependency-cache/eviction.d.ts +29 -0
  302. package/dist/providers/coding-proxy/dependency-cache/eviction.js +87 -0
  303. package/dist/providers/coding-proxy/dependency-cache/key.d.ts +33 -0
  304. package/dist/providers/coding-proxy/dependency-cache/key.js +86 -0
  305. package/dist/providers/coding-proxy/dependency-cache/model-request-seal.d.ts +18 -0
  306. package/dist/providers/coding-proxy/dependency-cache/model-request-seal.js +40 -0
  307. package/dist/providers/coding-proxy/dependency-cache/prisma-store.d.ts +25 -0
  308. package/dist/providers/coding-proxy/dependency-cache/prisma-store.js +131 -0
  309. package/dist/providers/coding-proxy/dependency-cache/service.d.ts +70 -0
  310. package/dist/providers/coding-proxy/dependency-cache/service.js +409 -0
  311. package/dist/providers/coding-proxy/dependency-cache/store.d.ts +85 -0
  312. package/dist/providers/coding-proxy/dependency-cache/store.js +95 -0
  313. package/dist/providers/coding-proxy/hold.d.ts +32 -0
  314. package/dist/providers/coding-proxy/hold.js +86 -0
  315. package/dist/providers/coding-proxy/interrupted.d.ts +70 -0
  316. package/dist/providers/coding-proxy/interrupted.js +104 -0
  317. package/dist/providers/coding-proxy/memory-ledger.d.ts +15 -2
  318. package/dist/providers/coding-proxy/memory-ledger.js +84 -8
  319. package/dist/providers/coding-proxy/metering.d.ts +16 -0
  320. package/dist/providers/coding-proxy/metering.js +27 -4
  321. package/dist/providers/coding-proxy/prisma-ledger.d.ts +15 -2
  322. package/dist/providers/coding-proxy/prisma-ledger.js +179 -67
  323. package/dist/providers/coding-proxy/proxy.d.ts +14 -1
  324. package/dist/providers/coding-proxy/proxy.js +166 -14
  325. package/dist/providers/coding-proxy/registry/audit.d.ts +53 -10
  326. package/dist/providers/coding-proxy/registry/audit.js +94 -17
  327. package/dist/providers/coding-proxy/registry/lockfile-parse-worker.d.ts +36 -0
  328. package/dist/providers/coding-proxy/registry/lockfile-parse-worker.js +67 -0
  329. package/dist/providers/coding-proxy/registry/lockfile-parse.d.ts +16 -0
  330. package/dist/providers/coding-proxy/registry/lockfile-parse.js +110 -0
  331. package/dist/providers/coding-proxy/registry/plan.d.ts +9 -0
  332. package/dist/providers/coding-proxy/registry/plan.js +201 -48
  333. package/dist/providers/coding-proxy/registry/prisma-store.d.ts +11 -5
  334. package/dist/providers/coding-proxy/registry/prisma-store.js +120 -17
  335. package/dist/providers/coding-proxy/registry/service.d.ts +97 -16
  336. package/dist/providers/coding-proxy/registry/service.js +579 -112
  337. package/dist/providers/coding-proxy/registry/store.d.ts +84 -9
  338. package/dist/providers/coding-proxy/registry/store.js +54 -1
  339. package/dist/providers/coding-proxy/runtime.d.ts +4 -0
  340. package/dist/providers/coding-proxy/runtime.js +78 -16
  341. package/dist/providers/coding-proxy/server.d.ts +6 -1
  342. package/dist/providers/coding-proxy/server.js +45 -1
  343. package/dist/providers/coding-proxy/types.d.ts +65 -1
  344. package/dist/providers/datastore/types.d.ts +5 -0
  345. package/dist/providers/engine/types.d.ts +17 -2
  346. package/dist/providers/engine/types.js +17 -0
  347. package/dist/providers/executor/composition.d.ts +10 -3
  348. package/dist/providers/executor/composition.js +47 -7
  349. package/dist/providers/executor/container.d.ts +361 -8
  350. package/dist/providers/executor/container.js +1136 -91
  351. package/dist/providers/executor/dbos-status.d.ts +31 -0
  352. package/dist/providers/executor/dbos-status.js +64 -0
  353. package/dist/providers/executor/dbos.d.ts +50 -1
  354. package/dist/providers/executor/dbos.js +207 -20
  355. package/dist/providers/executor/deferred.d.ts +12 -24
  356. package/dist/providers/executor/deferred.js +10 -29
  357. package/dist/providers/executor/in-process.d.ts +9 -1
  358. package/dist/providers/executor/in-process.js +14 -4
  359. package/dist/providers/executor/linked-issue-reader.d.ts +16 -0
  360. package/dist/providers/executor/linked-issue-reader.js +30 -0
  361. package/dist/providers/executor/routing.d.ts +2 -0
  362. package/dist/providers/executor/routing.js +4 -0
  363. package/dist/providers/executor/types.d.ts +13 -0
  364. package/dist/providers/index.d.ts +2 -1
  365. package/dist/providers/issue-tracker/types.d.ts +17 -0
  366. package/dist/providers/issue-tracker/types.js +39 -1
  367. package/dist/providers/jobs/claude-tool-setup.d.ts +4 -0
  368. package/dist/providers/jobs/claude-tool-setup.js +5 -2
  369. package/dist/providers/jobs/docker-isolation.d.ts +8 -0
  370. package/dist/providers/jobs/docker-isolation.js +17 -0
  371. package/dist/providers/jobs/docker.d.ts +1 -0
  372. package/dist/providers/jobs/docker.js +27 -2
  373. package/dist/providers/jobs/fake-kubernetes-api.d.ts +2 -0
  374. package/dist/providers/jobs/fake-kubernetes-api.js +3 -0
  375. package/dist/providers/jobs/kubernetes-api.d.ts +8 -0
  376. package/dist/providers/jobs/kubernetes-api.js +10 -0
  377. package/dist/providers/jobs/kubernetes-client.js +10 -1
  378. package/dist/providers/jobs/kubernetes-isolation.d.ts +2 -0
  379. package/dist/providers/jobs/kubernetes-isolation.js +17 -1
  380. package/dist/providers/jobs/kubernetes.d.ts +6 -1
  381. package/dist/providers/jobs/kubernetes.js +105 -16
  382. package/dist/providers/jobs/types.d.ts +33 -0
  383. package/dist/providers/jobs/types.js +13 -1
  384. package/dist/providers/llm/anthropic.js +5 -1
  385. package/dist/providers/llm/bedrock.d.ts +0 -12
  386. package/dist/providers/llm/bedrock.js +4 -0
  387. package/dist/providers/llm/claude-messages.d.ts +3 -1
  388. package/dist/providers/llm/claude-messages.js +4 -1
  389. package/dist/providers/llm/claude-provider.d.ts +2 -2
  390. package/dist/providers/llm/claude-provider.js +2 -2
  391. package/dist/providers/llm/openai.d.ts +2 -2
  392. package/dist/providers/llm/openai.js +6 -2
  393. package/dist/providers/llm/routing.d.ts +2 -2
  394. package/dist/providers/llm/routing.js +2 -2
  395. package/dist/providers/llm/types.d.ts +12 -2
  396. package/dist/providers/review-host/github-events.d.ts +9 -1
  397. package/dist/providers/review-host/github-events.js +34 -12
  398. package/dist/providers/review-host/github.d.ts +29 -2
  399. package/dist/providers/review-host/github.js +224 -29
  400. package/dist/providers/review-host/local.d.ts +8 -4
  401. package/dist/providers/review-host/local.js +49 -31
  402. package/dist/providers/review-host/patch-pages.d.ts +41 -0
  403. package/dist/providers/review-host/patch-pages.js +176 -0
  404. package/dist/providers/review-host/review-format.d.ts +19 -1
  405. package/dist/providers/review-host/review-format.js +38 -7
  406. package/dist/providers/review-host/types.d.ts +134 -2
  407. package/dist/providers/review-host/types.js +8 -0
  408. package/dist/providers/storage/gcs.d.ts +63 -0
  409. package/dist/providers/storage/gcs.js +69 -0
  410. package/dist/providers/storage/index.d.ts +15 -0
  411. package/dist/providers/storage/index.js +14 -0
  412. package/dist/providers/storage/local.d.ts +24 -0
  413. package/dist/providers/storage/local.js +92 -0
  414. package/dist/providers/storage/meter.d.ts +14 -0
  415. package/dist/providers/storage/meter.js +34 -0
  416. package/dist/providers/storage/s3.d.ts +41 -0
  417. package/dist/providers/storage/s3.js +107 -0
  418. package/dist/providers/storage/types.d.ts +37 -3
  419. package/dist/providers/storage/types.js +21 -4
  420. package/dist/providers/vcs/git.d.ts +33 -2
  421. package/dist/providers/vcs/git.js +324 -22
  422. package/dist/providers/vcs/github-remote.d.ts +26 -3
  423. package/dist/providers/vcs/github-remote.js +124 -14
  424. package/dist/providers/vcs/github.d.ts +214 -6
  425. package/dist/providers/vcs/github.js +447 -45
  426. package/dist/providers/vcs/index.js +8 -1
  427. package/dist/providers/vcs/pr-description.d.ts +127 -0
  428. package/dist/providers/vcs/pr-description.js +270 -0
  429. package/dist/providers/vcs/remote.d.ts +33 -1
  430. package/dist/providers/vcs/routing.d.ts +4 -2
  431. package/dist/providers/vcs/routing.js +6 -0
  432. package/dist/providers/vcs/types.d.ts +80 -3
  433. package/dist/quickstart/coding-seed.d.ts +14 -3
  434. package/dist/quickstart/coding-seed.js +213 -4
  435. package/dist/quickstart/reviewer-prompt.d.ts +1 -1
  436. package/dist/quickstart/reviewer-prompt.js +6 -6
  437. package/dist/quickstart-images.json +1 -1
  438. package/dist/sandbox/generated/zod.bundle.js +62 -1
  439. package/dist/sandbox/generated/zod3.bundle.js +5 -0
  440. package/dist/sandbox/host-functions.d.ts +1 -0
  441. package/dist/sandbox/host-functions.js +6 -11
  442. package/dist/sandbox/secret-broker.js +3 -4
  443. package/dist/sandbox/tool-capabilities.d.ts +10 -30
  444. package/dist/sandbox/zod-params.d.ts +37 -5
  445. package/dist/sandbox/zod-params.js +181 -26
  446. package/dist/serve.js +8 -1
  447. package/dist/viewer/api-schema.d.ts +349 -2627
  448. package/dist/viewer/api-schema.js +7 -0
  449. package/dist/viewer/build-schemas.js +6 -2
  450. package/dist/viewer/openapi.js +2 -4
  451. package/dist/wardby-bin.js +10 -0
  452. package/docs/agent-recipes.md +58 -20
  453. package/docs/code-review-agents.md +551 -41
  454. package/docs/coding-agent-setup.md +489 -7
  455. package/docs/coding-packages.md +1033 -90
  456. package/docs/coding-services.md +27 -12
  457. package/docs/coding-worker-byo-images.md +20 -0
  458. package/docs/coding-worker-isolation.md +105 -30
  459. package/docs/getting-started-gke.md +124 -137
  460. package/docs/getting-started-identity-provider.md +10 -1
  461. package/docs/getting-started.md +9 -0
  462. package/docs/jira-agents.md +17 -8
  463. package/docs/knowledge/blob-not-found-semantics.md +41 -0
  464. package/docs/knowledge/bounded-file-descriptor.md +52 -0
  465. package/docs/knowledge/delegation-admission-slots.md +52 -0
  466. package/docs/knowledge/http-dispatcher-bootstrap.md +61 -0
  467. package/docs/knowledge/import-rename-target.md +52 -0
  468. package/docs/knowledge/index.md +57 -0
  469. package/docs/knowledge/log.md +9 -0
  470. package/docs/knowledge/mcp-cancelled-task-precedence.md +41 -0
  471. package/docs/knowledge/mcp-http-prompt-discovery.md +41 -0
  472. package/docs/knowledge/mcp-schema-module-boundary.md +41 -0
  473. package/docs/knowledge/nullable-tool-uniqueness.md +52 -0
  474. package/docs/knowledge/overview-cli.md +74 -0
  475. package/docs/knowledge/overview-coding-proxy.md +72 -0
  476. package/docs/knowledge/overview-coding.md +72 -0
  477. package/docs/knowledge/overview-config.md +60 -0
  478. package/docs/knowledge/overview-core.md +72 -0
  479. package/docs/knowledge/overview-deploy.md +83 -0
  480. package/docs/knowledge/overview-mcp.md +61 -0
  481. package/docs/knowledge/overview-prisma.md +72 -0
  482. package/docs/knowledge/overview-providers.md +89 -0
  483. package/docs/knowledge/overview-sandbox.md +83 -0
  484. package/docs/knowledge/overview-surfaces.md +83 -0
  485. package/docs/knowledge/private-datastore-shared-boundary.md +54 -0
  486. package/docs/knowledge/proxy-settlement-projections.md +41 -0
  487. package/docs/knowledge/run-pricing-first-writer.md +43 -0
  488. package/docs/knowledge/schedule-claim-transaction.md +41 -0
  489. package/docs/knowledge/secret-entry-replica-contract.md +52 -0
  490. package/docs/knowledge/terminal-run-first-writer.md +41 -0
  491. package/docs/knowledge/transactional-agent-authorization.md +52 -0
  492. package/docs/knowledge/viewer-notify-write-isolation.md +30 -0
  493. package/docs/knowledge/warm-input-publication.md +30 -0
  494. package/docs/knowledge/workspace-staging-failure.md +54 -0
  495. package/docs/knowledge.md +54 -14
  496. package/docs/native-sandbox.md +119 -23
  497. package/docs/observability.md +4 -0
  498. package/docs/security-deployment.md +33 -2
  499. package/docs/slack-notifications.md +35 -19
  500. package/docs/tool-secrets.md +42 -10
  501. package/docs/viewer-api.openapi.yml +1 -1
  502. package/help/admin-viewer.md +24 -2
  503. package/help/architecture-agent.md +11 -6
  504. package/help/build-worker-image.md +3 -1
  505. package/help/builder-agent.md +19 -6
  506. package/help/code-review-agents.md +177 -6
  507. package/help/coding-packages.md +156 -6
  508. package/help/cost-attribution.md +9 -5
  509. package/help/creating-agents.md +14 -1
  510. package/help/dependency-cache.md +143 -0
  511. package/help/deploy-gke.md +15 -8
  512. package/help/errors/budget-exhausted.md +187 -0
  513. package/help/errors/budget-group-exhausted.md +5 -1
  514. package/help/errors/coding-stream-quota-exceeded.md +33 -0
  515. package/help/errors/coding-workspace-disk-exceeds-limit.md +39 -0
  516. package/help/errors/continuation-closed.md +9 -12
  517. package/help/errors/delegation-conflict.md +24 -0
  518. package/help/errors/file-list-truncated.md +45 -0
  519. package/help/errors/full-read-required.md +49 -0
  520. package/help/errors/github-account-not-allowed.md +4 -0
  521. package/help/errors/graph-incomplete.md +43 -0
  522. package/help/errors/graph-limit.md +43 -0
  523. package/help/errors/merge-conflict.md +49 -0
  524. package/help/errors/native-sandbox-gateway-error.md +20 -0
  525. package/help/errors/native-sandbox-launch-abandoned.md +21 -0
  526. package/help/errors/native-sandbox-worker-exited.md +3 -2
  527. package/help/errors/package-not-allowed-pending.md +52 -0
  528. package/help/errors/package-not-allowed.md +51 -0
  529. package/help/errors/package-refusals.md +43 -0
  530. package/help/errors/patch-cursor-malformed.md +31 -0
  531. package/help/errors/run-lost.md +39 -0
  532. package/help/errors/run-transcript-download.md +44 -0
  533. package/help/errors/secret-in-value.md +69 -0
  534. package/help/errors/target-merge.md +40 -0
  535. package/help/fix-merge-conflicts.md +73 -0
  536. package/help/github-app-setup.md +132 -0
  537. package/help/github.md +22 -0
  538. package/help/identity-and-access.md +2 -0
  539. package/help/jira.md +23 -6
  540. package/help/knowledge.md +16 -7
  541. package/help/local-repositories.md +1 -1
  542. package/help/low-power-mode.md +7 -1
  543. package/help/merge-order-check.md +5 -0
  544. package/help/native-capabilities.md +29 -1
  545. package/help/native-sandbox.md +15 -1
  546. package/help/operating-agents.md +5 -0
  547. package/help/package-audit-mode.md +91 -0
  548. package/help/related-pull-requests.md +10 -7
  549. package/help/resume-runs-locally.md +131 -0
  550. package/help/review-fix-rounds.md +33 -1
  551. package/help/sharing-agents.md +59 -0
  552. package/help/slack-notifications.md +19 -5
  553. package/help/status-comments.md +31 -0
  554. package/help/stop-run.md +58 -0
  555. package/help/troubleshooting/budgets.md +28 -0
  556. package/help/troubleshooting/coding-workers.md +78 -7
  557. package/package.json +17 -10
  558. package/prisma/migrations/20261016000000_registry_approved_accepted_advisories/migration.sql +3 -0
  559. package/prisma/migrations/20261016000001_mark_ready_when_passing/migration.sql +3 -0
  560. package/prisma/migrations/20261017000000_debug_trace_max_mb/migration.sql +4 -0
  561. package/prisma/migrations/20261018000000_dependency_cache/migration.sql +53 -0
  562. package/prisma/migrations/20261019000000_claude_max_output_tokens/migration.sql +5 -0
  563. package/prisma/migrations/20261021000000_pr_description_hash/migration.sql +4 -0
  564. package/prisma/migrations/20261022000000_dependency_snapshot_validation_metadata/migration.sql +4 -0
  565. package/prisma/migrations/20261023000000_package_audit_mode/migration.sql +27 -0
  566. package/prisma/migrations/20261024000000_budget_events/migration.sql +26 -0
  567. package/prisma/migrations/20261025000000_cache_aware_holds/migration.sql +9 -0
  568. package/prisma/migrations/20261026000000_budget_overrun/migration.sql +4 -0
  569. package/prisma/migrations/20261027000000_coding_run_request/migration.sql +1 -0
  570. package/prisma/migrations/20261028000000_native_gateway_review_reads/migration.sql +6 -0
  571. package/prisma/migrations/20261029000000_lead_survives_deploy/migration.sql +6 -0
  572. package/prisma/migrations/20261030000000_local_review_covered_sha/migration.sql +2 -0
  573. package/prisma/migrations/20261031000000_coding_run_budget_limit/migration.sql +9 -0
  574. package/prisma/migrations/20261101000000_run_transcripts/migration.sql +22 -0
  575. package/prisma/schema.prisma +311 -97
  576. package/dist/sandbox/generated/zod-to-json-schema.bundle.js +0 -5
@@ -0,0 +1,131 @@
1
+ ---
2
+ id: resume-runs-locally
3
+ title: Resume Claude Code runs locally (sessionResume, get_run_transcript, wardby resume)
4
+ summary: Keep each Claude Code run's redacted conversation with sessionResume, then continue it on your machine with get_run_transcript and npx @wardby/cli@latest resume.
5
+ audience: operator
6
+ tags: [sessionResume, wardby resume, get_run_transcript, transcript, blob-store, WARDBY_SESSION_TRANSCRIPTS]
7
+ appliesTo: ">=0.7.0"
8
+ ---
9
+
10
+ # Resume Claude Code runs locally
11
+
12
+ `sessionResume` makes a Claude Code agent keep a redacted copy of each run's
13
+ conversation, so the session can be continued locally in Claude Code with
14
+ `get_run_transcript` and `npx @wardby/cli@latest resume`. It is off by default and is not
15
+ available for Codex agents. It needs Claude Code worker images from Wardby
16
+ 0.7.0 or later.
17
+
18
+ ## Turn it on
19
+
20
+ ```json
21
+ { "id": "<coding agent id>", "codingProfile": { "sessionResume": true } }
22
+ ```
23
+
24
+ Use `update_agent` or `create_agent`. The server needs a blob store
25
+ (`BLOB_STORE`, with `BLOB_STORE_LOCAL_DIR`, `BLOB_STORE_GCS_BUCKET`, or
26
+ `BLOB_STORE_S3_BUCKET` and `BLOB_STORE_S3_REGION`, plus the optional
27
+ `BLOB_STORE_S3_ENDPOINT` for an S3-compatible store) set on the **server
28
+ process** that launches coding runs, not only on the coding proxy. Without a
29
+ blob store nothing is stored, and `update_agent` warns you.
30
+
31
+ ## What is stored
32
+
33
+ - The conversation as Claude Code recorded it: user and assistant messages,
34
+ tool calls and their results, compaction summaries, files and skills the
35
+ agent loaded, and a session title (`wardby run <id>: <task>` when Claude
36
+ Code made none).
37
+ - Removed: thinking blocks, the system prompt, the worker's environment, date
38
+ and budget reminders, account and organisation details, and billing
39
+ records.
40
+ - Redacted: the values of the agent's attached secrets, plus the run's
41
+ capability and registry token by their token shape. If the agent's secrets
42
+ cannot be loaded, nothing is stored.
43
+ - Stored for runs that finish, stop at their budget, or fail. Not stored for
44
+ runs stopped with `stop_run` or ended by their timeout.
45
+ - Stored gzip-compressed under the `run-transcripts/` prefix. When the run's
46
+ context was compacted, only what a resume loads is kept: the last
47
+ compaction's summary, the messages it kept, and everything after it.
48
+ - At most `RUN_TRANSCRIPT_MAX_BYTES` per run, measured before compression
49
+ (default 10 MiB, at most 64 MiB). Each run records a status (`stored`,
50
+ `too_large`, `not_captured` or `failed`) with a reason code.
51
+
52
+ ## Who can read it
53
+
54
+ Transcripts are stored from the first run with `sessionResume` on. Anyone
55
+ who can read a run (its triggerer and the agent's owner, as for `get_run`)
56
+ can download its transcript, which includes
57
+ what the agent saw in the repository and in command output. Redaction removes secret
58
+ values, not other sensitive text. Turn this on only for agents whose runs you
59
+ are comfortable sharing with everyone who can read them.
60
+
61
+ ## Continue a run on your machine
62
+
63
+ 1. Ask your MCP client to call `get_run_transcript` with the run id (same
64
+ access as `get_run`). For a stored transcript it returns a download link
65
+ that works for 10 minutes and the command to run; otherwise the status
66
+ (`none`, `too_large`, `not_captured`, `failed`, `expired`, `unavailable`,
67
+ `unsupported`) and what it means.
68
+ 2. Run the command in a terminal, `npx @wardby/cli@latest resume -`, and paste the link
69
+ when it asks. (A link given as an argument stays in shell history and the
70
+ process list.) For a GitHub repository, run it inside a clone of that
71
+ repository. A `local:` repository is used only when the link comes from
72
+ this machine (a stdio MCP server); otherwise pass `--here` or `--dir`.
73
+
74
+ It verifies the download's SHA-256, writes the session to
75
+ `~/.wardby/sessions/<run id>/<session id>.jsonl` (mode 0600, never into
76
+ Claude Code's own config directory), adds a detached git worktree of the
77
+ run's branch next to the repository (the base commit, with a warning, when
78
+ the branch is gone), and starts `claude --resume` there. A stand-in
79
+ `wardby_tools` server shows the run's `run_command` calls but runs nothing,
80
+ and a note tells the model `/workspace` is now the worktree.
81
+
82
+ Options: `--dir <path>` (worktree location), `--here` (no checkout),
83
+ `--force` (replace a different imported session file), `--print` (print the
84
+ `claude` command instead of starting it). The command passes
85
+ `--system-prompt-snapshot off` so the move note applies; remove it for a
86
+ Claude Code older than 2.1.257 when the version could not be read. Under
87
+ `npx`, the MCP config points into the npx cache: run `wardby resume` again if
88
+ the cache was cleaned.
89
+
90
+ The link is a credential until it expires: do not share it. Over stdio it
91
+ points at a local port the MCP server opens, so keep your MCP client
92
+ connected until the download finishes. The token is in the link's query
93
+ string: keep `/run-transcripts/download` out of load-balancer and ingress
94
+ access logs. Refusals:
95
+ [Run transcript download refused](errors/run-transcript-download.md).
96
+
97
+ ## Retention
98
+
99
+ `RUN_TRANSCRIPT_RETENTION_DAYS` is a whole number from 1 to 3650 (default 30).
100
+ Expired transcripts are pruned when new ones are stored. On GCS or S3 also add
101
+ a bucket lifecycle rule on the `run-transcripts/` prefix.
102
+
103
+ ## Set it up per deployment
104
+
105
+ Give transcripts a bucket of their own, not the dependency cache bucket, that
106
+ only the control plane can use.
107
+
108
+ - GKE: `session_transcripts_enabled` and `session_transcripts_bucket_name` in
109
+ Terraform (optionally `session_transcripts_retention_days`), then
110
+ `WARDBY_SESSION_TRANSCRIPTS=true deploy/gke/up.sh`. Terraform adds the
111
+ lifecycle rule; `up.sh` passes the same retention to the control plane.
112
+ - AWS: the same Terraform variables, then give the control plane `BLOB_STORE=s3`,
113
+ the `session_transcripts_bucket` output as `BLOB_STORE_S3_BUCKET`,
114
+ `BLOB_STORE_S3_REGION`, and the `session_transcripts_retention_days` output as
115
+ `RUN_TRANSCRIPT_RETENTION_DAYS`.
116
+ - kind harness and Docker quickstart: the server runs on your host. Set
117
+ `BLOB_STORE=local` and `BLOB_STORE_LOCAL_DIR` in its environment (for the
118
+ quickstart, in `.wardby/.env`).
119
+
120
+ ## Startup and custom images
121
+
122
+ With `JOB_LAUNCHER` set to `docker` or `kubernetes`, a half-set `BLOB_STORE`
123
+ or an invalid `RUN_TRANSCRIPT_RETENTION_DAYS` or `RUN_TRANSCRIPT_MAX_BYTES` stops
124
+ the server at startup,
125
+ naming the variable. An agent with its own `workerImageRef` image must rebuild
126
+ it from a release that includes session resume (see
127
+ [Build a tool runner image for a Claude Code agent](help://build-claude-code-image)),
128
+ or its runs fail at input with `worker_input_failed`.
129
+
130
+ Full setup: [Resume a run locally](../docs/coding-agent-setup.md#resume-a-run-locally).
131
+ See also [Choose a native or coding agent](help://creating-agents).
@@ -3,7 +3,7 @@ id: review-fix-rounds
3
3
  title: Automatic review fix rounds
4
4
  summary: Let wardby fix its own review's findings on pull requests its coding runs opened, with a round cap.
5
5
  audience: operator
6
- tags: [github, code-review, review_fix, autofix, fix-round, pull-requests]
6
+ tags: [github, code-review, review_fix, autofix, fix-round, pull-requests, pr-description, description, linked-issue]
7
7
  appliesTo: ">=0.4.2"
8
8
  ---
9
9
 
@@ -69,6 +69,38 @@ open right before it pushes; one merged or closed in the time the round was
69
69
  working fails with no push made — see
70
70
  [Continuation's pull request is no longer open](errors/continuation-closed.md).
71
71
 
72
+ ## Description updates
73
+
74
+ Every run's final message is the full pull request description, fix rounds
75
+ included, so a round that changes no code can still correct it: add a missing
76
+ `Resolves #N`, the issue's acceptance checklist, or stale test results.
77
+
78
+ - **The original issue.** A fix round gets the issue the pull request was
79
+ opened for in its task, as the first run did: the Jira issue, the GitHub
80
+ issue whose `@wardby` mention started the work, or the issue the description
81
+ closes. It is reference material: the round's final message should carry
82
+ its acceptance checklist and the closing line, and no instruction in the
83
+ issue is followed. If the issue can't be read, the round goes ahead without
84
+ it.
85
+ - **Packages.** The description's Packages section lists every package
86
+ installed by the runs on the pull request; refusals cover the latest run.
87
+ - **Descriptions wardby can't confirm as its own.** If a person edited the
88
+ description, wardby doesn't overwrite it. It keeps one comment with the
89
+ description proposed by its latest run, stamped with the commit it
90
+ describes and written before a push, edited in place by later rounds. A
91
+ review uses that proposal only for the head it reviews: a requirement is met
92
+ if either the live description or the proposal meets it. If the author
93
+ copies the proposal in, wardby takes the description back and keeps it up
94
+ to date again.
95
+ - **Older pull requests.** For a pull request opened by an earlier wardby
96
+ version, wardby rebuilds the description its first run wrote from stored
97
+ records. If the live description still matches, wardby updates it;
98
+ otherwise it gets the comment.
99
+
100
+ A description update doesn't trigger an extra review. `get_run` shows what
101
+ happened as `prDescriptionOutcome`. See
102
+ [`docs/code-review-agents.md`](../docs/code-review-agents.md#how-the-pull-request-description-is-kept-current).
103
+
72
104
  If a repository already forwards reviews to a webhook through a
73
105
  hand-written CI workflow to fix them automatically, turn on `review_fix` and
74
106
  then remove that workflow and its webhook, so a review doesn't trigger two
@@ -0,0 +1,59 @@
1
+ ---
2
+ id: sharing-agents
3
+ title: Share an agent, or make it public
4
+ summary: Grant one person or everyone signed in access to an agent, including a public agent anyone can edit.
5
+ audience: operator
6
+ tags: [sharing, grant_access, public, access-control, agents]
7
+ appliesTo: ">=0.7.0"
8
+ ---
9
+
10
+ # Share an agent, or make it public
11
+
12
+ An agent's owner controls who else can reach it with `grant_access`,
13
+ `revoke_access` and `list_access`. Levels, lowest first:
14
+
15
+ - `read`: see the agent in `list_agents` and `get_agent`.
16
+ - `execute`: also run it (`trigger_agent`).
17
+ - `write`: also change it (`update_agent`, schedule, webhooks, tools).
18
+
19
+ The grantee is one person, `{"subject": "..."}` or `{"principalId": "..."}`,
20
+ who must have signed in once, or `"everyone"`: any principal signed in to the
21
+ MCP server.
22
+
23
+ ## Public agents
24
+
25
+ Grant `everyone` at `read` or `execute` for an agent anyone can see or run.
26
+ Grant `everyone` at `write` for an agent anyone can also edit.
27
+
28
+ Everyone-`write` is refused while the agent holds any of its owner's bindings:
29
+ secrets, datastores, repositories, sub-agents, tool capabilities, or a coding
30
+ repository, so a coding agent can't be public-write. Otherwise anyone could
31
+ rewrite its prompt and use them. Detach them first, or grant `execute` instead.
32
+ The reverse holds too: `attach_secret`, `attach_datastore`, `link_repository`,
33
+ `attach_subagent`, `attach_tool` with capabilities, and `update_agent` making
34
+ it a coding agent are refused on an agent everyone can write. Revoke or lower
35
+ the everyone grant first.
36
+
37
+ ### Cap what a public-write agent can spend
38
+
39
+ Runs of a shared agent are charged to its owner. With `write`, anyone signed in
40
+ can change the agent's model, per-run budget, turns and schedule, and create
41
+ webhooks that trigger it. Before granting everyone `write`, put the agent in a
42
+ budget group (`create_budget_group`, then `update_agent` with `budgetGroupId`).
43
+ Only the owner can change
44
+ budget-group membership, so the group's limit caps total spend whatever anyone
45
+ else changes.
46
+
47
+ ### After you revoke or lower the grant
48
+
49
+ - **Webhooks:** a webhook fires only while its creator can still run the
50
+ agent. Revoking the everyone grant stops webhooks other people created;
51
+ lowering it to `execute` keeps them firing. Use `list_webhooks` and
52
+ `delete_webhook` to remove them; the owner can delete any webhook on the
53
+ agent.
54
+ - **Schedule:** a schedule someone else set stays on the agent. Check it with
55
+ `get_agent` and remove it with `disable_schedule`.
56
+ - **Prompt and settings:** edits stay. Check the prompt, model and budget with
57
+ `get_agent`.
58
+
59
+ See [Identity and access](identity-and-access.md) for sign-in and scopes.
@@ -28,11 +28,25 @@ per card. This is outbound only: nothing in Slack starts or affects a run.
28
28
 
29
29
  ## Events
30
30
 
31
- `issue_picked_up`, `run_failed` (top-level runs only), `pr_opened`,
32
- `review_posted` (approve / changes requested / comment), `review_fix` (round
33
- started, or stopped at the cap), and `pr_closed` (merged or closed, with any
34
- Jira status move). `events` on a link narrows which of these post; omitted
35
- means all six. `includeCost` appends the run's spend line.
31
+ `issue_picked_up`, `run_failed` and `run_blocked` (top-level runs only),
32
+ `pr_opened`, `review_posted` (approve / changes requested / comment),
33
+ `review_fix` (round started, or stopped at the cap), `pr_closed` (merged or
34
+ closed, with any Jira status move), and `packages_audited` (from Wardby 0.7.0,
35
+ top-level runs only: what its coding runs installed under package audit mode,
36
+ described in the `package-audit-mode` help article; it doesn't change the
37
+ thread's status). `events` on a link narrows which of these post; omitted
38
+ means all eight. `includeCost` appends the run's spend line.
39
+
40
+ A pull request opened from a GitHub issue mention posts `pr_opened` and
41
+ `pr_closed` too, the same as one opened for a Jira issue. Its thread is the
42
+ issue's, one per GitHub issue, not one per pull request; once the pull request
43
+ is recorded for the issue, its `review_posted` and `review_fix` events reply
44
+ there as well. The run events of a run a GitHub issue mention started keep a
45
+ thread of their own.
46
+
47
+ A `run_blocked` event uses the same ⛔ package registry wording and fixes as
48
+ [Run status comments](status-comments.md). See [Package refusal errors](errors/package-refusals.md)
49
+ for allowlist, release-age, advisory, and malware guidance.
36
50
 
37
51
  wardby never posts code, diffs, review text, or run output to Slack.
38
52
 
@@ -0,0 +1,31 @@
1
+ ---
2
+ id: status-comments
3
+ title: Run status comments
4
+ summary: Read GitHub and Jira run outcomes, package registry blocked statuses, and Slack notifications.
5
+ audience: operator
6
+ tags: [status, comments, github, jira, slack, blocked, packages, mentions]
7
+ appliesTo: >=0.2.1
8
+ ---
9
+
10
+ # Run status comments
11
+
12
+ Mentioning the GitHub App starts a run and posts a working status comment.
13
+ The comment is updated when the run finishes, with pull request links, an
14
+ answer, or a failure. This includes a run that a deploy moved to a new
15
+ control-plane process. Jira requests also report their outcome in a status
16
+ comment.
17
+
18
+ When coding sub-runs record package refusals and no pull request or pushed
19
+ changes result, the comment shows ⛔ **Blocked by the package registry: no
20
+ changes were made.** It lists refused packages, registry codes, and fixes.
21
+ Slack notifications use the same blocked wording. Lists are limited to ten
22
+ distinct entries with a count of remaining refusals; use `get_run` for all.
23
+ When changes were pushed despite refusals, the pull request link stays and
24
+ there is a ⚠️ dependency install warning. Without refusals, the usual ✅
25
+ success or ❌ failure wording remains.
26
+
27
+ An approver can update the coding agent's package allowlist or policy with
28
+ `update_agent` (requires `packages:approve` or `agents:admin`), then mention
29
+ `@wardby` again. See [Package refusal errors](errors/package-refusals.md) for
30
+ code-specific fixes and [Approve packages for coding agents](coding-packages.md)
31
+ for policy details. Malware checks cannot be bypassed.
@@ -0,0 +1,58 @@
1
+ ---
2
+ id: stop-run
3
+ title: Stop or cancel a run
4
+ summary: Use stop_run to stop a pending, queued, or running run and its in-flight sub-agent runs; it ends as cancelled.
5
+ audience: operator
6
+ tags: [runs, stop run, cancel run, stop_run, cancelled, schedules, coding-agents, native-agents, sandbox]
7
+ appliesTo: ">=0.7.0"
8
+ ---
9
+
10
+ # Stop or cancel a run
11
+
12
+ Call the MCP tool `stop_run` with the run's id to stop a run that has not
13
+ finished. Add an optional `reason`; it is recorded on the run.
14
+
15
+ ```text
16
+ stop_run {"runId": "<run id>", "reason": "unwanted scheduled run"}
17
+ ```
18
+
19
+ Find the id with `list_runs` (filter with `"status": "pending"` or
20
+ `"running"`). To stop a schedule from creating more runs, disable it with
21
+ `disable_schedule` as well; `stop_run` stops one run, not the schedule.
22
+
23
+ ## What happens
24
+
25
+ The run ends as `cancelled`, with `Stopped by <your id> with stop_run: <reason>`
26
+ in its `stopRequestReason` (and, for a native run, in its `error`).
27
+
28
+ | The run is | `stop_run` |
29
+ | ------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
30
+ | Pending, or a coding run queued for a slot | Ends it now. It never starts. |
31
+ | A running native run in the control plane | Ends it now; the run stops at its next step (the model turn or tool call already under way finishes first). |
32
+ | A running native run in the sandbox | Ends it now and ends its gateway session, so the worker's next call is refused and it exits. A worker still running after a short grace (5 seconds) is killed and removed; a warm pool worker is never reused. |
33
+ | A running coding run | Ends it, cancels its model proxy session, and stops and removes its worker. It opens or updates no pull request afterwards. |
34
+ | Already finished (any other status) | Changes nothing and returns its status. Calling `stop_run` again is safe. |
35
+
36
+ Sub-agent runs the stopped run delegated, and that are still pending or running,
37
+ are stopped too (their ids are in `stoppedChildRunIds`).
38
+
39
+ Spend already recorded stays counted against the budget. A stopped run is not a
40
+ failure: Slack notifications say it was cancelled, and no defect is filed.
41
+
42
+ If the result still shows `pending` or `running`, the stop has been recorded
43
+ but has not landed yet; check again with `get_run`.
44
+
45
+ ## Who can stop a run
46
+
47
+ You need the `runs:trigger` scope and `execute` access to the run's agent, the
48
+ same as `trigger_agent`. The agent's owner can stop any of its runs, including
49
+ scheduled ones; anyone else can stop only runs they triggered. A run you cannot
50
+ see returns `Run "<id>" not found.`, exactly like a missing one; a run you
51
+ triggered but whose agent you can no longer execute returns a 403.
52
+
53
+ ## Related
54
+
55
+ - [Operate managed agents](operating-agents.md)
56
+ - [Run native agents in a sandbox](native-sandbox.md)
57
+ - [Slack notifications](slack-notifications.md)
58
+ - [Run lost](errors/run-lost.md), for runs a deploy interrupted
@@ -41,3 +41,31 @@ with `already_dispatched` and a message naming how many delegations were
41
41
  made and how many are waiting for budget.
42
42
 
43
43
  For a shared-group refusal, read [Budget group exhausted](../errors/budget-group-exhausted.md).
44
+
45
+ To see exactly which limit stopped a run and with what numbers, read
46
+ `budgetEvents` in `get_run`; see the help article `errors/budget-exhausted`.
47
+ A lead and the sub-agents it starts in the same budget group hold the lead's
48
+ budget once (or its live sub-agent runs' unspent holds, if the lead's overrun
49
+ let them be topped up past it), and `get_budget_group` reports `heldRuns` for
50
+ each period.
51
+
52
+ A coding run's per-request holds price the cached part of the input at the
53
+ cache-read rate after the first reply of a conversation; see the help article
54
+ `errors/budget-exhausted`.
55
+
56
+ ## Allowing a small overrun
57
+
58
+ If coding runs stop just short of finishing, set `allowedOverrunPercent` (0 to
59
+ 100, default 0) on the coding agent so a run may spend that percent beyond
60
+ `budgetUsd`. Set it on a lead agent that delegates to raise its run tree's
61
+ ceiling for coding sub-agents; native runs' own model calls are not affected.
62
+
63
+ The overrun is not reserved. A run reserves its base budget, and is topped up
64
+ toward its limit while it works, only from room its budget group and run tree
65
+ have at that moment. Budget group and run-tree caps stay hard: in a full group
66
+ the run stops at what it was granted, and its budget sentence says so ("Only
67
+ $0.40 of its 10% allowed overrun was available because the "team" group had no
68
+ more left of its daily cap."). `get_run` shows `budgetBaseUsd`, the limit in `budgetLimitUsd`, and what
69
+ has been granted so far in `budgetReservedUsd`. A run still stopped for budget
70
+ keeps its work as a draft pull request you can continue. See
71
+ `errors/budget-exhausted`.
@@ -3,7 +3,7 @@ id: troubleshooting/coding-workers
3
3
  title: Troubleshoot coding workers
4
4
  summary: Investigate coding-worker setup, isolation preflight, and safe failure handling.
5
5
  audience: operator
6
- tags: [coding-agents, docker, kubernetes, isolation, services]
6
+ tags: [coding-agents, quota, coding_queue_timeout, docker, kubernetes, isolation, services, debug-trace, debugTraceMinutes, debugTraceMaxMb, maxOutputTokens, output-tokens, claude-code, codex, memory, CODING_MEMORY_MB, CODING_CPUS, out-of-memory]
7
7
  appliesTo: >=0.2.1
8
8
  ---
9
9
 
@@ -54,14 +54,85 @@ raise `codingProfile.maxTurns` (up to 1000) with `update_agent` for the first,
54
54
  or narrow the task for the second. Codex runs have no turn limit. See
55
55
  [Coding run reached its turn limit](../errors/coding-turn-limit.md).
56
56
 
57
+ ## Claude Code replies that exceed the output token maximum
58
+
59
+ A Claude Code run caps each model reply at 32000 output tokens by default,
60
+ thinking included. When a reply needs more, Claude Code ends with an error
61
+ that the response exceeded the output token maximum and the run fails as a
62
+ stream failure. Raise `codingProfile.maxOutputTokens` (1024 to 128000; `null`
63
+ restores the default) with `update_agent`, for example
64
+ `{ "id": "<agent id>", "codingProfile": { "maxOutputTokens": 64000 } }`. The
65
+ coding proxy reserves `maxOutputTokens` × the model's output price against the
66
+ run's budget for every model request, so a higher value needs a larger
67
+ `budgetUsd`; a request whose reservation does not fit ends the run as
68
+ `budget_exhausted` (see the help article `errors/budget-exhausted`), so a small
69
+ budget runs out sooner. Codex agents refuse the
70
+ setting. The default and the setting need a Claude Code worker image from
71
+ Wardby 0.7.0 or later: an older pinned image still caps replies at 4096 tokens
72
+ and rejects a run whose agent sets `maxOutputTokens`.
73
+
74
+ ## Runs refused because the provider is out of credit
75
+
76
+ A diagnostic of `job_coding_stream_quota_exceeded` means the model provider
77
+ behind the coding proxy refused the run because its account is out of credit or
78
+ over a spend limit, not that the run's own budget ran out. Every run on that
79
+ account fails the same way until the limit is raised; see the help article
80
+ `errors/coding-stream-quota-exceeded`.
81
+
82
+ ## Runs that die while running checks (out of memory)
83
+
84
+ A run that fails with `coding_failure_executor` while it runs a linter, a type
85
+ check or a test suite has often run out of memory. Each coding pod gets
86
+ `CODING_MEMORY_MB` (2048 MiB by default) and `CODING_CPUS` (1 by default). In a
87
+ Codex run the agent and its commands share that pod. In a Claude Code run the
88
+ commands run in a tool-runner container limited to at most 512 MiB and 0.25 CPU.
89
+
90
+ 1. Turn on a debug trace (below) and run it again. A Node.js crash shows as
91
+ `Aborted` with exit code 134 in a command's output.
92
+ 2. Raise `CODING_MEMORY_MB` and `CODING_CPUS` on the control plane. On GKE, deploy
93
+ with `CODING_MEMORY_MB=6144 CODING_CPUS=2 deploy/gke/up.sh` (see the GKE deploy
94
+ guide). This applies to every coding run.
95
+ 3. For a Claude Code agent with heavy checks, run it on Codex instead, since raising
96
+ the pod's memory doesn't raise the tool runner's limit.
97
+
98
+ ## Debug trace
99
+
100
+ When a run's fixed error code or a slow run doesn't say enough, an admin can
101
+ trace the agent's runs for a while:
102
+ `update_agent { "id": "<agent id>", "codingProfile": { "debugTraceMinutes": 30 } }`.
103
+ Each run dispatched in that window writes its whole agent stream, redacted, to
104
+ its worker container's log under a `debugTrace` key. That covers Codex events,
105
+ or, for Claude Code (Wardby 0.7.0 or later), every Agent SDK message:
106
+ each command the agent ran with its output, the final usage and duration, plus
107
+ stream failures in full. For Claude Code, the time between a command's
108
+ `tool_use` and its `tool_result` line is how long that command took. A run's
109
+ trace stops at 2 MiB by default; set `codingProfile.debugTraceMaxMb` (1 to 64,
110
+ admin only) for more. The trace can hold prompts and repository content, so
111
+ keep it on briefly. See
112
+ [the debug trace section](../../docs/coding-worker-isolation.md#debug-trace)
113
+ for where the log lives and what is redacted.
114
+
57
115
  ## Runs that wait for cluster capacity
58
116
 
59
- On Kubernetes with `KUBERNETES_RESOURCE_QUOTA` set, a run whose pod would not
60
- fit the namespace quota stays `pending` with `codingQueuedAt` set, like a run
61
- over `CODING_MAX_CONCURRENT`, and starts once other runs finish. A run still
62
- waiting after `CODING_QUEUE_TIMEOUT_SEC` fails with `coding_queue_timeout`:
63
- raise the quota, lower the run pods' size, or lower `CODING_MAX_CONCURRENT` so
64
- fewer runs compete.
117
+ On Kubernetes, a run whose pod would not fit the namespace quota waits instead
118
+ of failing. With `KUBERNETES_RESOURCE_QUOTA` set, it is held before it starts;
119
+ without it, or if the quota fills up meanwhile, the cluster refuses the pod and
120
+ the run returns to the queue. Either way it stays `pending` with
121
+ `codingQueuedAt` set, like a run over `CODING_MAX_CONCURRENT`, and is retried
122
+ (a refused run no sooner than about a minute later). A refused run shows
123
+ `running` briefly, then `pending` again.
124
+
125
+ A run still waiting after `CODING_QUEUE_TIMEOUT_SEC` fails with
126
+ `coding_queue_timeout`. That can mean either the concurrency limit or the
127
+ namespace quota. To tell which, look for the control-plane log line
128
+ `coding run waiting for capacity: the cluster refused its pod` (quota), and run
129
+ `kubectl describe resourcequota -n <namespace>` to compare used against hard
130
+ limits. If the quota is full, raise it, lower the run pods' size, or lower
131
+ `CODING_MAX_CONCURRENT` so fewer runs compete; size the quota for
132
+ `CODING_MAX_CONCURRENT` times the run pod's requests. If the log line
133
+ `kubernetes_resource_quota_unconfigured` appears, set `KUBERNETES_RESOURCE_QUOTA`
134
+ to the named quota and grant the launcher `get` on it. See
135
+ [the queue section](../../docs/coding-worker-isolation.md#control-plane-configuration).
65
136
 
66
137
  A lead agent with `parallelDelegations` starts several coding runs together;
67
138
  expect some of them to queue when the lead fans out wider than the free slots.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wardby/cli",
3
- "version": "0.6.0",
3
+ "version": "0.7.0",
4
4
  "description": "Self-hosted control plane for budget-guarded AI agents.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/wardby/wardby#readme",
@@ -58,7 +58,7 @@
58
58
  "build:help": "tsx src/help/build.ts",
59
59
  "sync:reviewer-prompt": "tsx src/quickstart/sync-reviewer-prompt.ts",
60
60
  "build:viewer-schemas": "tsx src/viewer/build-schemas.ts",
61
- "build": "npm run build:vendor && PRISMA_HIDE_UPDATE_MESSAGE=1 prisma generate && tsc -p tsconfig.build.json && npm run build:help",
61
+ "build": "npm run build:vendor && PRISMA_HIDE_UPDATE_MESSAGE=1 prisma generate && tsc -p tsconfig.build.json && node scripts/copy-build-modules.mjs && npm run build:help",
62
62
  "prepare": "npm run build:vendor && PRISMA_HIDE_UPDATE_MESSAGE=1 prisma generate",
63
63
  "prepack": "npm run build",
64
64
  "cli": "tsx --conditions=wardby-source src/wardby-bin.ts",
@@ -67,6 +67,7 @@
67
67
  "test": "npm run build:vendor && vitest run",
68
68
  "test:package": "node scripts/npm-package-acceptance.mjs",
69
69
  "test:contract": "vitest run --config vitest.contract.config.ts",
70
+ "test:release": "npm run build:vendor && vitest run --config vitest.release.config.ts",
70
71
  "test:kubernetes": "WARDBY_KUBERNETES_TEST=1 vitest run src/providers/jobs/kubernetes.integration.test.ts",
71
72
  "test:native-docker": "WARDBY_NATIVE_DOCKER_TEST=1 vitest run src/native-worker/docker.acceptance.test.ts",
72
73
  "test:native-kind": "WARDBY_NATIVE_KIND_TEST=1 vitest run src/native-worker/kubernetes.acceptance.test.ts",
@@ -100,12 +101,16 @@
100
101
  "@anthropic-ai/bedrock-sdk": "^0.33.4",
101
102
  "@anthropic-ai/sdk": "^0.124.0",
102
103
  "@aws-crypto/sha256-js": "4.0.0",
104
+ "@aws-sdk/client-s3": "3.1140.0",
105
+ "@aws-sdk/lib-storage": "3.1140.0",
103
106
  "@aws-sdk/rds-signer": "3.1140.0",
107
+ "@aws-sdk/s3-request-presigner": "3.1140.0",
104
108
  "@dbos-inc/dbos-sdk": "4.27.6",
109
+ "@google-cloud/storage": "8.2.0",
105
110
  "@kubernetes/client-node": "^2.0.0",
106
- "@modelcontextprotocol/client": "^2.3.1",
107
- "@modelcontextprotocol/node": "^2.0.0",
108
- "@modelcontextprotocol/server": "^2.0.0",
111
+ "@modelcontextprotocol/client": "^2.4.0",
112
+ "@modelcontextprotocol/node": "^2.1.2",
113
+ "@modelcontextprotocol/server": "^2.4.0",
109
114
  "@prisma/adapter-pg": "7.10.0",
110
115
  "@prisma/client": "7.10.0",
111
116
  "@prometheus-io/client": "^0.16.1",
@@ -124,11 +129,11 @@
124
129
  "pino": "^9.14.0",
125
130
  "quickjs-emscripten": "^0.32.0",
126
131
  "semver": "^7.8.5",
132
+ "smol-toml": "1.9.0",
127
133
  "tar-stream": "^3.2.1",
128
- "undici": "^8.7.0",
134
+ "undici": "^8.12.3",
129
135
  "yaml": "^2.9.1",
130
- "zod": "^3.25.76",
131
- "zod-to-json-schema": "^3.25.2"
136
+ "zod": "^4.6.7"
132
137
  },
133
138
  "devDependencies": {
134
139
  "@eslint/js": "^10.0.1",
@@ -148,10 +153,12 @@
148
153
  "tsx": "^4.19.0",
149
154
  "typescript": "^5.6.0",
150
155
  "typescript-eslint": "^8.69.0",
151
- "vitest": "^4.1.11"
156
+ "vitest": "^4.1.12",
157
+ "zod-to-json-schema": "^3.25.2"
152
158
  },
153
159
  "overrides": {
154
160
  "deepmerge-ts": "8.0.2",
155
- "mysql2": "3.24.4"
161
+ "mysql2": "3.24.4",
162
+ "uuid": "11.1.1"
156
163
  }
157
164
  }
@@ -0,0 +1,3 @@
1
+ -- Additive: the blocking advisories a run's packagePolicy.acceptedAdvisories
2
+ -- waived for a version its lockfile plan approved (empty when none).
3
+ ALTER TABLE "RegistryApprovedVersion" ADD COLUMN "acceptedAdvisories" TEXT[] DEFAULT ARRAY[]::TEXT[];
@@ -0,0 +1,3 @@
1
+ -- Additive: opt-in to mark Wardby's draft pull requests ready once they pass, claimed once per pull request.
2
+ ALTER TABLE "AgentRepository" ADD COLUMN "markReadyWhenPassing" BOOLEAN NOT NULL DEFAULT false;
3
+ ALTER TABLE "CodingRun" ADD COLUMN "markedReadyAt" TIMESTAMP(3);
@@ -0,0 +1,4 @@
1
+ -- Configurable per-run debug-trace cap: the profile carries the admin-set cap
2
+ -- (MiB), and each traced run records at dispatch the cap it used.
3
+ ALTER TABLE "CodingAgentProfile" ADD COLUMN "debugTraceMaxMb" INTEGER;
4
+ ALTER TABLE "CodingRun" ADD COLUMN "debugTraceMaxMb" INTEGER;
@@ -0,0 +1,53 @@
1
+ -- Additive: the run dependency cache. An agent flag snapshotted onto each
2
+ -- coding run, the run's reported cache result, the proxy session's approved
3
+ -- lock hashes and seal, and the snapshot metadata the coding proxy keeps.
4
+ -- A snapshot outlives the run that created it: createdByRunId is cleared, not
5
+ -- cascaded, when that run is deleted.
6
+
7
+ -- AlterTable
8
+ ALTER TABLE "CodingAgentProfile" ADD COLUMN "dependencyCache" BOOLEAN NOT NULL DEFAULT false;
9
+
10
+ -- AlterTable
11
+ ALTER TABLE "CodingRun" ADD COLUMN "dependencyCache" BOOLEAN NOT NULL DEFAULT false,
12
+ ADD COLUMN "dependencyCacheResult" JSONB;
13
+
14
+ -- AlterTable
15
+ ALTER TABLE "CodingProxySession" ADD COLUMN "dependencyCacheLockHashes" TEXT[] DEFAULT ARRAY[]::TEXT[],
16
+ ADD COLUMN "dependencyCacheSealedAt" TIMESTAMP(3);
17
+
18
+ -- CreateTable
19
+ CREATE TABLE "DependencySnapshot" (
20
+ "id" TEXT NOT NULL,
21
+ "ecosystem" TEXT NOT NULL,
22
+ "repository" TEXT NOT NULL,
23
+ "projectPath" TEXT NOT NULL DEFAULT '.',
24
+ "lockHash" TEXT NOT NULL,
25
+ "workerImage" TEXT NOT NULL,
26
+ "policyHash" TEXT NOT NULL,
27
+ "blobKey" TEXT NOT NULL,
28
+ "sha256" TEXT NOT NULL,
29
+ "sizeBytes" BIGINT NOT NULL,
30
+ "createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
31
+ "lastUsedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
32
+ "createdByRunId" TEXT,
33
+
34
+ CONSTRAINT "DependencySnapshot_pkey" PRIMARY KEY ("id")
35
+ );
36
+
37
+ -- CreateIndex
38
+ CREATE UNIQUE INDEX "DependencySnapshot_blobKey_key" ON "DependencySnapshot"("blobKey");
39
+
40
+ -- CreateIndex
41
+ CREATE UNIQUE INDEX "DependencySnapshot_ecosystem_repository_projectPath_lockHas_key" ON "DependencySnapshot"("ecosystem", "repository", "projectPath", "lockHash", "workerImage", "policyHash");
42
+
43
+ -- CreateIndex
44
+ CREATE INDEX "DependencySnapshot_ecosystem_repository_projectPath_workerI_idx" ON "DependencySnapshot"("ecosystem", "repository", "projectPath", "workerImage", "policyHash", "createdAt");
45
+
46
+ -- CreateIndex
47
+ CREATE INDEX "DependencySnapshot_lastUsedAt_idx" ON "DependencySnapshot"("lastUsedAt");
48
+
49
+ -- CreateIndex
50
+ CREATE INDEX "DependencySnapshot_createdByRunId_projectPath_idx" ON "DependencySnapshot"("createdByRunId", "projectPath");
51
+
52
+ -- AddForeignKey
53
+ ALTER TABLE "DependencySnapshot" ADD CONSTRAINT "DependencySnapshot_createdByRunId_fkey" FOREIGN KEY ("createdByRunId") REFERENCES "CodingRun"("runId") ON DELETE SET NULL ON UPDATE CASCADE;
@@ -0,0 +1,5 @@
1
+ -- Claude Code output tokens per model reply: the profile carries the agent's
2
+ -- setting, and each run records at dispatch the value it used. Null = the
3
+ -- worker default.
4
+ ALTER TABLE "CodingAgentProfile" ADD COLUMN "maxOutputTokens" INTEGER;
5
+ ALTER TABLE "CodingRun" ADD COLUMN "maxOutputTokens" INTEGER;