@wardby/cli 0.2.1 → 0.4.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 (555) hide show
  1. package/.env.example +53 -4
  2. package/README.md +52 -13
  3. package/dist/claude-coding-worker/driver.d.ts +6 -1
  4. package/dist/claude-coding-worker/driver.js +27 -1
  5. package/dist/claude-coding-worker/main.js +2 -0
  6. package/dist/claude-coding-worker/tool-socket.d.ts +9 -0
  7. package/dist/claude-coding-worker/tool-socket.js +26 -0
  8. package/dist/cli-help.d.ts +1 -1
  9. package/dist/cli-help.js +14 -4
  10. package/dist/cli.d.ts +1 -1
  11. package/dist/cli.js +284 -36
  12. package/dist/coding/base-commit.d.ts +6 -0
  13. package/dist/coding/base-commit.js +12 -0
  14. package/dist/coding/collect-exclude.d.ts +25 -0
  15. package/dist/coding/collect-exclude.js +76 -0
  16. package/dist/coding/profile.d.ts +67 -22
  17. package/dist/coding/profile.js +58 -25
  18. package/dist/coding/protected-path-wording.d.ts +24 -0
  19. package/dist/coding/protected-path-wording.js +55 -0
  20. package/dist/coding/protected-paths.d.ts +31 -0
  21. package/dist/coding/protected-paths.js +48 -0
  22. package/dist/coding/protocol.d.ts +91 -4
  23. package/dist/coding/protocol.js +123 -12
  24. package/dist/coding/provider.d.ts +6 -1
  25. package/dist/coding/provider.js +16 -9
  26. package/dist/coding/registry/adapters.d.ts +2 -0
  27. package/dist/coding/registry/adapters.js +9 -0
  28. package/dist/coding/registry/allowlist.d.ts +9 -0
  29. package/dist/coding/registry/allowlist.js +28 -0
  30. package/dist/coding/registry/json-scan.d.ts +55 -0
  31. package/dist/coding/registry/json-scan.js +191 -0
  32. package/dist/coding/registry/lockfiles.d.ts +6 -0
  33. package/dist/coding/registry/lockfiles.js +89 -0
  34. package/dist/coding/registry/npm-lockfile.d.ts +9 -0
  35. package/dist/coding/registry/npm-lockfile.js +73 -0
  36. package/dist/coding/registry/npm-plan.d.ts +29 -0
  37. package/dist/coding/registry/npm-plan.js +289 -0
  38. package/dist/coding/registry/npm.d.ts +7 -0
  39. package/dist/coding/registry/npm.js +252 -0
  40. package/dist/coding/registry/pypi.d.ts +4 -0
  41. package/dist/coding/registry/pypi.js +210 -0
  42. package/dist/coding/registry/report.d.ts +37 -0
  43. package/dist/coding/registry/report.js +31 -0
  44. package/dist/coding/registry/token.d.ts +4 -0
  45. package/dist/coding/registry/token.js +7 -0
  46. package/dist/coding/registry/types.d.ts +286 -0
  47. package/dist/coding/registry/types.js +19 -0
  48. package/dist/coding/registry/worker-config.d.ts +14 -0
  49. package/dist/coding/registry/worker-config.js +31 -0
  50. package/dist/coding/services/builtins.d.ts +22 -0
  51. package/dist/coding/services/builtins.js +85 -0
  52. package/dist/coding/services/catalog.d.ts +443 -0
  53. package/dist/coding/services/catalog.js +159 -0
  54. package/dist/coding/services/declaration.d.ts +11 -0
  55. package/dist/coding/services/declaration.js +114 -0
  56. package/dist/coding/services/note.d.ts +8 -0
  57. package/dist/coding/services/note.js +15 -0
  58. package/dist/coding/services/resolve.d.ts +25 -0
  59. package/dist/coding/services/resolve.js +50 -0
  60. package/dist/coding/services/wording.d.ts +25 -0
  61. package/dist/coding/services/wording.js +70 -0
  62. package/dist/coding-proxy/main.js +24 -4
  63. package/dist/coding-worker/artifact.d.ts +6 -0
  64. package/dist/coding-worker/debug-trace.d.ts +37 -0
  65. package/dist/coding-worker/debug-trace.js +117 -0
  66. package/dist/coding-worker/driver.d.ts +13 -1
  67. package/dist/coding-worker/driver.js +102 -13
  68. package/dist/coding-worker/errors.js +8 -0
  69. package/dist/coding-worker/main.js +10 -2
  70. package/dist/coding-worker/sdk.d.ts +2 -2
  71. package/dist/coding-worker/sdk.js +7 -2
  72. package/dist/coding-worker/types.d.ts +3 -0
  73. package/dist/config/providers.d.ts +66 -0
  74. package/dist/config/providers.js +137 -0
  75. package/dist/core/attribution.d.ts +101 -0
  76. package/dist/core/attribution.js +208 -0
  77. package/dist/core/budget-groups.d.ts +120 -10
  78. package/dist/core/budget-groups.js +133 -24
  79. package/dist/core/budget-wording.d.ts +22 -0
  80. package/dist/core/budget-wording.js +55 -0
  81. package/dist/core/coding-queue.d.ts +3 -0
  82. package/dist/core/coding-queue.js +6 -2
  83. package/dist/core/coding-service-status.d.ts +11 -0
  84. package/dist/core/coding-service-status.js +17 -0
  85. package/dist/core/cost-report.d.ts +88 -0
  86. package/dist/core/cost-report.js +248 -0
  87. package/dist/core/datastores.js +18 -2
  88. package/dist/core/db.d.ts +5 -1
  89. package/dist/core/db.js +8 -2
  90. package/dist/core/dispatch.d.ts +74 -7
  91. package/dist/core/dispatch.js +382 -47
  92. package/dist/core/engine-native.js +44 -14
  93. package/dist/core/glob.d.ts +10 -0
  94. package/dist/core/glob.js +33 -0
  95. package/dist/core/grants.d.ts +86 -0
  96. package/dist/core/grants.js +126 -0
  97. package/dist/core/host-events.d.ts +72 -0
  98. package/dist/core/host-events.js +597 -0
  99. package/dist/core/host-identity-links.d.ts +54 -0
  100. package/dist/core/host-identity-links.js +189 -0
  101. package/dist/core/host-status.d.ts +78 -0
  102. package/dist/core/host-status.js +228 -0
  103. package/dist/core/in-flight-runs.d.ts +8 -0
  104. package/dist/core/in-flight-runs.js +56 -0
  105. package/dist/core/issue-bridge.d.ts +60 -0
  106. package/dist/core/issue-bridge.js +189 -0
  107. package/dist/core/issue-dedupe.d.ts +70 -0
  108. package/dist/core/issue-dedupe.js +255 -0
  109. package/dist/core/issue-events.d.ts +42 -0
  110. package/dist/core/issue-events.js +155 -0
  111. package/dist/core/issue-status.d.ts +29 -0
  112. package/dist/core/issue-status.js +241 -0
  113. package/dist/core/issue-tracker-tools.d.ts +64 -0
  114. package/dist/core/issue-tracker-tools.js +850 -0
  115. package/dist/core/model-usage.d.ts +10 -0
  116. package/dist/core/model-usage.js +24 -0
  117. package/dist/core/provider-wording.d.ts +12 -0
  118. package/dist/core/provider-wording.js +44 -0
  119. package/dist/core/reconciler.d.ts +42 -2
  120. package/dist/core/reconciler.js +97 -2
  121. package/dist/core/repo-access.d.ts +99 -0
  122. package/dist/core/repo-access.js +136 -0
  123. package/dist/core/review-host-checks.d.ts +11 -0
  124. package/dist/core/review-host-checks.js +41 -0
  125. package/dist/core/review-host-tools.d.ts +47 -0
  126. package/dist/core/review-host-tools.js +354 -0
  127. package/dist/core/run-heartbeat.d.ts +27 -0
  128. package/dist/core/run-heartbeat.js +54 -0
  129. package/dist/core/run-pricing.d.ts +61 -0
  130. package/dist/core/run-pricing.js +56 -0
  131. package/dist/core/runner.d.ts +33 -8
  132. package/dist/core/runner.js +410 -62
  133. package/dist/core/scheduler.d.ts +4 -1
  134. package/dist/core/scheduler.js +3 -2
  135. package/dist/core/secrets.d.ts +11 -2
  136. package/dist/core/secrets.js +25 -6
  137. package/dist/core/self-defects.d.ts +80 -0
  138. package/dist/core/self-defects.js +180 -0
  139. package/dist/core/subagent-memory-tools.d.ts +1 -1
  140. package/dist/core/subagent-memory-tools.js +16 -3
  141. package/dist/core/tool-admin.d.ts +81 -0
  142. package/dist/core/tool-admin.js +129 -0
  143. package/dist/core/tool-names.d.ts +42 -0
  144. package/dist/core/tool-names.js +67 -0
  145. package/dist/core/untrusted-content.d.ts +32 -0
  146. package/dist/core/untrusted-content.js +72 -0
  147. package/dist/core/webhooks.d.ts +17 -2
  148. package/dist/core/webhooks.js +42 -3
  149. package/dist/generated/prisma/browser.d.ts +166 -0
  150. package/dist/generated/prisma/client.d.ts +166 -0
  151. package/dist/generated/prisma/commonInputTypes.d.ts +152 -52
  152. package/dist/generated/prisma/enums.d.ts +13 -0
  153. package/dist/generated/prisma/enums.js +12 -1
  154. package/dist/generated/prisma/internal/class.d.ts +242 -0
  155. package/dist/generated/prisma/internal/class.js +4 -4
  156. package/dist/generated/prisma/internal/prismaNamespace.d.ts +2571 -577
  157. package/dist/generated/prisma/internal/prismaNamespace.js +312 -6
  158. package/dist/generated/prisma/internal/prismaNamespaceBrowser.d.ts +328 -0
  159. package/dist/generated/prisma/internal/prismaNamespaceBrowser.js +312 -6
  160. package/dist/generated/prisma/models/Agent.d.ts +682 -1
  161. package/dist/generated/prisma/models/AgentIssueProject.d.ts +1838 -0
  162. package/dist/generated/prisma/models/AgentIssueProject.js +1 -0
  163. package/dist/generated/prisma/models/AgentRepository.d.ts +1425 -0
  164. package/dist/generated/prisma/models/AgentRepository.js +1 -0
  165. package/dist/generated/prisma/models/AgentTool.d.ts +95 -1
  166. package/dist/generated/prisma/models/AuthUser.d.ts +56 -1
  167. package/dist/generated/prisma/models/CodingAgentProfile.d.ts +258 -7
  168. package/dist/generated/prisma/models/CodingProxySession.d.ts +195 -2
  169. package/dist/generated/prisma/models/CodingRun.d.ts +1405 -95
  170. package/dist/generated/prisma/models/CodingRunServiceStatus.d.ts +1404 -0
  171. package/dist/generated/prisma/models/CodingRunServiceStatus.js +1 -0
  172. package/dist/generated/prisma/models/CodingService.d.ts +1348 -0
  173. package/dist/generated/prisma/models/CodingService.js +1 -0
  174. package/dist/generated/prisma/models/HostEventDelivery.d.ts +946 -0
  175. package/dist/generated/prisma/models/HostEventDelivery.js +1 -0
  176. package/dist/generated/prisma/models/HostIdentity.d.ts +1232 -0
  177. package/dist/generated/prisma/models/HostIdentity.js +1 -0
  178. package/dist/generated/prisma/models/HostIdentityLinkRequest.d.ts +1473 -0
  179. package/dist/generated/prisma/models/HostIdentityLinkRequest.js +1 -0
  180. package/dist/generated/prisma/models/IssueFingerprint.d.ts +1183 -0
  181. package/dist/generated/prisma/models/IssueFingerprint.js +1 -0
  182. package/dist/generated/prisma/models/IssuePullRequest.d.ts +1255 -0
  183. package/dist/generated/prisma/models/IssuePullRequest.js +1 -0
  184. package/dist/generated/prisma/models/ModelCatalogEntry.d.ts +1322 -0
  185. package/dist/generated/prisma/models/ModelCatalogEntry.js +1 -0
  186. package/dist/generated/prisma/models/Principal.d.ts +455 -0
  187. package/dist/generated/prisma/models/RegistryAllowance.d.ts +1148 -0
  188. package/dist/generated/prisma/models/RegistryAllowance.js +1 -0
  189. package/dist/generated/prisma/models/RegistryApprovedVersion.d.ts +1219 -0
  190. package/dist/generated/prisma/models/RegistryApprovedVersion.js +1 -0
  191. package/dist/generated/prisma/models/RegistryFetch.d.ts +1428 -0
  192. package/dist/generated/prisma/models/RegistryFetch.js +1 -0
  193. package/dist/generated/prisma/models/RegistryPlanRefusal.d.ts +1294 -0
  194. package/dist/generated/prisma/models/RegistryPlanRefusal.js +1 -0
  195. package/dist/generated/prisma/models/RegistryVersionFact.d.ts +1085 -0
  196. package/dist/generated/prisma/models/RegistryVersionFact.js +1 -0
  197. package/dist/generated/prisma/models/ResourceGrant.d.ts +1437 -0
  198. package/dist/generated/prisma/models/ResourceGrant.js +1 -0
  199. package/dist/generated/prisma/models/Run.d.ts +1402 -82
  200. package/dist/generated/prisma/models/RunAttribution.d.ts +1259 -0
  201. package/dist/generated/prisma/models/RunAttribution.js +1 -0
  202. package/dist/generated/prisma/models/RunHostCheck.d.ts +1239 -0
  203. package/dist/generated/prisma/models/RunHostCheck.js +1 -0
  204. package/dist/generated/prisma/models/RunHostStatus.d.ts +1315 -0
  205. package/dist/generated/prisma/models/RunHostStatus.js +1 -0
  206. package/dist/generated/prisma/models/RunIssueStatus.d.ts +1199 -0
  207. package/dist/generated/prisma/models/RunIssueStatus.js +1 -0
  208. package/dist/generated/prisma/models/RunModelUsage.d.ts +1316 -0
  209. package/dist/generated/prisma/models/RunModelUsage.js +1 -0
  210. package/dist/generated/prisma/models/Tool.d.ts +15 -3
  211. package/dist/generated/prisma/models/WorkItem.d.ts +1408 -0
  212. package/dist/generated/prisma/models/WorkItem.js +1 -0
  213. package/dist/generated/prisma/models.d.ts +22 -0
  214. package/dist/help/build.d.ts +1 -0
  215. package/dist/help/build.js +9 -0
  216. package/dist/help/catalog.d.ts +24 -0
  217. package/dist/help/catalog.js +160 -0
  218. package/dist/help/cli.d.ts +2 -0
  219. package/dist/help/cli.js +65 -0
  220. package/dist/help/runtime.d.ts +3 -0
  221. package/dist/help/runtime.js +44 -0
  222. package/dist/help/search.d.ts +9 -0
  223. package/dist/help/search.js +104 -0
  224. package/dist/help-index.json +999 -0
  225. package/dist/import/cli-args.js +3 -2
  226. package/dist/import/create.d.ts +5 -0
  227. package/dist/import/create.js +67 -13
  228. package/dist/import/index.js +19 -9
  229. package/dist/import/neutral-schema.d.ts +18 -18
  230. package/dist/knowledge/check.d.ts +13 -0
  231. package/dist/knowledge/check.js +69 -0
  232. package/dist/knowledge/cli.d.ts +14 -0
  233. package/dist/knowledge/cli.js +67 -0
  234. package/dist/knowledge/concept.d.ts +54 -0
  235. package/dist/knowledge/concept.js +78 -0
  236. package/dist/knowledge/note.d.ts +11 -0
  237. package/dist/knowledge/note.js +39 -0
  238. package/dist/knowledge/relevance.d.ts +11 -0
  239. package/dist/knowledge/relevance.js +14 -0
  240. package/dist/knowledge/span-hash.d.ts +3 -0
  241. package/dist/knowledge/span-hash.js +16 -0
  242. package/dist/mcp/auth/access.d.ts +72 -0
  243. package/dist/mcp/auth/access.js +58 -0
  244. package/dist/mcp/auth/grants-cli.d.ts +149 -0
  245. package/dist/mcp/auth/grants-cli.js +518 -0
  246. package/dist/mcp/auth/host-account-cli.d.ts +2 -0
  247. package/dist/mcp/auth/host-account-cli.js +47 -0
  248. package/dist/mcp/auth/ownership.d.ts +25 -51
  249. package/dist/mcp/auth/ownership.js +19 -14
  250. package/dist/mcp/auth/repo-authorization.d.ts +22 -0
  251. package/dist/mcp/auth/repo-authorization.js +51 -0
  252. package/dist/mcp/auth/resource-server.d.ts +33 -2
  253. package/dist/mcp/auth/resource-server.js +99 -3
  254. package/dist/mcp/auth/self-hosted/browser.js +2 -2
  255. package/dist/mcp/auth/self-hosted/cli.js +47 -13
  256. package/dist/mcp/auth/self-hosted/credentials.d.ts +23 -5
  257. package/dist/mcp/auth/self-hosted/credentials.js +62 -4
  258. package/dist/mcp/auth/self-hosted/session.d.ts +7 -6
  259. package/dist/mcp/context.d.ts +30 -1
  260. package/dist/mcp/errors.d.ts +25 -6
  261. package/dist/mcp/errors.js +98 -0
  262. package/dist/mcp/host-events/deliveries.d.ts +9 -0
  263. package/dist/mcp/host-events/deliveries.js +17 -0
  264. package/dist/mcp/host-events/github-ingress.d.ts +38 -0
  265. package/dist/mcp/host-events/github-ingress.js +83 -0
  266. package/dist/mcp/host-events/github-user-callback.d.ts +18 -0
  267. package/dist/mcp/host-events/github-user-callback.js +50 -0
  268. package/dist/mcp/host-events/jira-ingress.d.ts +29 -0
  269. package/dist/mcp/host-events/jira-ingress.js +92 -0
  270. package/dist/mcp/index.d.ts +10 -1
  271. package/dist/mcp/index.js +187 -19
  272. package/dist/mcp/server.js +32 -11
  273. package/dist/mcp/tools/agents.js +519 -50
  274. package/dist/mcp/tools/budget-groups.js +3 -3
  275. package/dist/mcp/tools/cost-report.d.ts +8 -0
  276. package/dist/mcp/tools/cost-report.js +60 -0
  277. package/dist/mcp/tools/datastore.js +22 -15
  278. package/dist/mcp/tools/grants.d.ts +2 -0
  279. package/dist/mcp/tools/grants.js +239 -0
  280. package/dist/mcp/tools/help.d.ts +5 -0
  281. package/dist/mcp/tools/help.js +67 -0
  282. package/dist/mcp/tools/host-accounts.d.ts +2 -0
  283. package/dist/mcp/tools/host-accounts.js +114 -0
  284. package/dist/mcp/tools/issue-projects.d.ts +2 -0
  285. package/dist/mcp/tools/issue-projects.js +238 -0
  286. package/dist/mcp/tools/memory.d.ts +7 -1
  287. package/dist/mcp/tools/memory.js +5 -5
  288. package/dist/mcp/tools/model-catalog.d.ts +22 -0
  289. package/dist/mcp/tools/model-catalog.js +423 -0
  290. package/dist/mcp/tools/repositories.d.ts +2 -0
  291. package/dist/mcp/tools/repositories.js +182 -0
  292. package/dist/mcp/tools/runs.d.ts +6 -0
  293. package/dist/mcp/tools/runs.js +60 -6
  294. package/dist/mcp/tools/scheduling.js +3 -6
  295. package/dist/mcp/tools/secrets.js +18 -6
  296. package/dist/mcp/tools/services.d.ts +2 -0
  297. package/dist/mcp/tools/services.js +222 -0
  298. package/dist/mcp/tools/subagents.js +52 -16
  299. package/dist/mcp/tools/tools.d.ts +41 -0
  300. package/dist/mcp/tools/tools.js +201 -40
  301. package/dist/mcp/tools/trigger.js +65 -7
  302. package/dist/mcp/tools/webhooks.js +15 -4
  303. package/dist/mcp/transport/streamable-http.d.ts +15 -0
  304. package/dist/mcp/transport/streamable-http.js +55 -3
  305. package/dist/mcp/webhooks/ingress.d.ts +2 -1
  306. package/dist/mcp/webhooks/ingress.js +9 -2
  307. package/dist/providers/auth/delegating.d.ts +19 -0
  308. package/dist/providers/auth/delegating.js +71 -0
  309. package/dist/providers/auth/index.d.ts +2 -0
  310. package/dist/providers/auth/index.js +11 -0
  311. package/dist/providers/auth/self-hosted.d.ts +10 -2
  312. package/dist/providers/auth/self-hosted.js +55 -6
  313. package/dist/providers/auth/types.d.ts +6 -0
  314. package/dist/providers/coding-proxy/memory-ledger.d.ts +4 -1
  315. package/dist/providers/coding-proxy/memory-ledger.js +31 -3
  316. package/dist/providers/coding-proxy/metering.d.ts +6 -1
  317. package/dist/providers/coding-proxy/metering.js +41 -4
  318. package/dist/providers/coding-proxy/prisma-ledger.d.ts +17 -0
  319. package/dist/providers/coding-proxy/prisma-ledger.js +106 -8
  320. package/dist/providers/coding-proxy/proxy.d.ts +25 -2
  321. package/dist/providers/coding-proxy/proxy.js +561 -38
  322. package/dist/providers/coding-proxy/registry/audit.d.ts +131 -0
  323. package/dist/providers/coding-proxy/registry/audit.js +380 -0
  324. package/dist/providers/coding-proxy/registry/bounded-fetch.d.ts +16 -0
  325. package/dist/providers/coding-proxy/registry/bounded-fetch.js +77 -0
  326. package/dist/providers/coding-proxy/registry/plan.d.ts +58 -0
  327. package/dist/providers/coding-proxy/registry/plan.js +304 -0
  328. package/dist/providers/coding-proxy/registry/prisma-store.d.ts +34 -0
  329. package/dist/providers/coding-proxy/registry/prisma-store.js +151 -0
  330. package/dist/providers/coding-proxy/registry/service.d.ts +213 -0
  331. package/dist/providers/coding-proxy/registry/service.js +1137 -0
  332. package/dist/providers/coding-proxy/registry/store.d.ts +127 -0
  333. package/dist/providers/coding-proxy/registry/store.js +70 -0
  334. package/dist/providers/coding-proxy/runtime.d.ts +17 -0
  335. package/dist/providers/coding-proxy/runtime.js +63 -0
  336. package/dist/providers/coding-proxy/secure-fetch.js +0 -1
  337. package/dist/providers/coding-proxy/server.d.ts +11 -0
  338. package/dist/providers/coding-proxy/server.js +163 -0
  339. package/dist/providers/coding-proxy/types.d.ts +33 -1
  340. package/dist/providers/coding-proxy/types.js +12 -1
  341. package/dist/providers/engine/types.d.ts +29 -0
  342. package/dist/providers/executor/build.d.ts +2 -2
  343. package/dist/providers/executor/composition.d.ts +3 -0
  344. package/dist/providers/executor/composition.js +28 -1
  345. package/dist/providers/executor/container.d.ts +134 -4
  346. package/dist/providers/executor/container.js +394 -37
  347. package/dist/providers/executor/dbos.d.ts +4 -3
  348. package/dist/providers/executor/dbos.js +7 -5
  349. package/dist/providers/executor/in-process.d.ts +2 -3
  350. package/dist/providers/executor/routing.d.ts +13 -0
  351. package/dist/providers/executor/routing.js +18 -0
  352. package/dist/providers/executor/types.d.ts +34 -0
  353. package/dist/providers/issue-tracker/adf.d.ts +31 -0
  354. package/dist/providers/issue-tracker/adf.js +181 -0
  355. package/dist/providers/issue-tracker/index.d.ts +5 -0
  356. package/dist/providers/issue-tracker/index.js +12 -0
  357. package/dist/providers/issue-tracker/jira-client.d.ts +41 -0
  358. package/dist/providers/issue-tracker/jira-client.js +151 -0
  359. package/dist/providers/issue-tracker/jira-events.d.ts +3 -0
  360. package/dist/providers/issue-tracker/jira-events.js +98 -0
  361. package/dist/providers/issue-tracker/jira.d.ts +116 -0
  362. package/dist/providers/issue-tracker/jira.js +502 -0
  363. package/dist/providers/issue-tracker/types.d.ts +269 -0
  364. package/dist/providers/issue-tracker/types.js +16 -0
  365. package/dist/providers/jobs/claude-tool-setup.d.ts +23 -0
  366. package/dist/providers/jobs/claude-tool-setup.js +50 -0
  367. package/dist/providers/jobs/collect-prune.d.ts +7 -0
  368. package/dist/providers/jobs/collect-prune.js +27 -0
  369. package/dist/providers/jobs/docker-isolation.d.ts +48 -3
  370. package/dist/providers/jobs/docker-isolation.js +213 -22
  371. package/dist/providers/jobs/docker-services.d.ts +35 -0
  372. package/dist/providers/jobs/docker-services.js +191 -0
  373. package/dist/providers/jobs/docker.d.ts +53 -2
  374. package/dist/providers/jobs/docker.js +307 -32
  375. package/dist/providers/jobs/fake-kubernetes-api.d.ts +1 -0
  376. package/dist/providers/jobs/fake-kubernetes-api.js +12 -3
  377. package/dist/providers/jobs/kubernetes-isolation.d.ts +17 -2
  378. package/dist/providers/jobs/kubernetes-isolation.js +238 -57
  379. package/dist/providers/jobs/kubernetes-platform.d.ts +10 -4
  380. package/dist/providers/jobs/kubernetes-platform.js +11 -5
  381. package/dist/providers/jobs/kubernetes-preflight.js +3 -0
  382. package/dist/providers/jobs/kubernetes.d.ts +24 -2
  383. package/dist/providers/jobs/kubernetes.js +153 -22
  384. package/dist/providers/jobs/service-state.d.ts +22 -0
  385. package/dist/providers/jobs/service-state.js +17 -0
  386. package/dist/providers/jobs/types.d.ts +18 -0
  387. package/dist/providers/llm/anthropic.d.ts +3 -3
  388. package/dist/providers/llm/anthropic.js +3 -5
  389. package/dist/providers/llm/bedrock.d.ts +3 -3
  390. package/dist/providers/llm/bedrock.js +3 -8
  391. package/dist/providers/llm/catalog-lookup.d.ts +10 -0
  392. package/dist/providers/llm/catalog-lookup.js +15 -0
  393. package/dist/providers/llm/catalog-shipped.d.ts +18 -0
  394. package/dist/providers/llm/catalog-shipped.js +197 -0
  395. package/dist/providers/llm/catalog-store.d.ts +58 -0
  396. package/dist/providers/llm/catalog-store.js +138 -0
  397. package/dist/providers/llm/catalog-types.d.ts +66 -0
  398. package/dist/providers/llm/catalog-types.js +64 -0
  399. package/dist/providers/llm/catalog.d.ts +61 -0
  400. package/dist/providers/llm/catalog.js +147 -0
  401. package/dist/providers/llm/claude-messages.d.ts +5 -1
  402. package/dist/providers/llm/claude-messages.js +1 -0
  403. package/dist/providers/llm/claude-provider.d.ts +10 -12
  404. package/dist/providers/llm/claude-provider.js +15 -6
  405. package/dist/providers/llm/index.d.ts +9 -6
  406. package/dist/providers/llm/index.js +8 -5
  407. package/dist/providers/llm/openai.d.ts +14 -5
  408. package/dist/providers/llm/openai.js +24 -14
  409. package/dist/providers/llm/pricing-core.d.ts +5 -3
  410. package/dist/providers/llm/registration.js +8 -12
  411. package/dist/providers/llm/routing.d.ts +21 -11
  412. package/dist/providers/llm/routing.js +47 -13
  413. package/dist/providers/llm/types.d.ts +12 -0
  414. package/dist/providers/llm/types.js +8 -1
  415. package/dist/providers/review-host/diff-lines.d.ts +16 -0
  416. package/dist/providers/review-host/diff-lines.js +59 -0
  417. package/dist/providers/review-host/github-events.d.ts +6 -0
  418. package/dist/providers/review-host/github-events.js +226 -0
  419. package/dist/providers/review-host/github-user-auth.d.ts +38 -0
  420. package/dist/providers/review-host/github-user-auth.js +128 -0
  421. package/dist/providers/review-host/github.d.ts +57 -0
  422. package/dist/providers/review-host/github.js +568 -0
  423. package/dist/providers/review-host/index.d.ts +12 -0
  424. package/dist/providers/review-host/index.js +30 -0
  425. package/dist/providers/review-host/review-format.d.ts +19 -0
  426. package/dist/providers/review-host/review-format.js +59 -0
  427. package/dist/providers/review-host/types.d.ts +309 -0
  428. package/dist/providers/review-host/types.js +24 -0
  429. package/dist/providers/vcs/git.d.ts +16 -6
  430. package/dist/providers/vcs/git.js +78 -34
  431. package/dist/providers/vcs/github.d.ts +94 -3
  432. package/dist/providers/vcs/github.js +223 -17
  433. package/dist/providers/vcs/types.d.ts +48 -4
  434. package/dist/quickstart/index.d.ts +2 -0
  435. package/dist/quickstart/index.js +36 -8
  436. package/dist/sandbox/fetch-policy.d.ts +20 -2
  437. package/dist/sandbox/fetch-policy.js +64 -3
  438. package/dist/sandbox/host-functions.d.ts +9 -1
  439. package/dist/sandbox/host-functions.js +12 -5
  440. package/dist/serve.js +8 -2
  441. package/dist/viewer/api-schema.d.ts +2757 -0
  442. package/dist/viewer/api-schema.js +165 -0
  443. package/dist/viewer/build-schemas.d.ts +2 -0
  444. package/dist/viewer/build-schemas.js +18 -0
  445. package/dist/viewer/event-bus.d.ts +38 -0
  446. package/dist/viewer/event-bus.js +232 -0
  447. package/dist/viewer/graph.d.ts +40 -0
  448. package/dist/viewer/graph.js +243 -0
  449. package/dist/viewer/http.d.ts +30 -0
  450. package/dist/viewer/http.js +133 -0
  451. package/dist/viewer/run-detail.d.ts +4 -0
  452. package/dist/viewer/run-detail.js +61 -0
  453. package/dist/wardby-bin.js +11 -0
  454. package/docs/README.md +40 -0
  455. package/docs/agent-recipes.md +383 -0
  456. package/docs/architecture-runtime.md +90 -0
  457. package/docs/assets/brand/wardby-icon-512.png +0 -0
  458. package/docs/assets/brand/wardby-icon.svg +16 -0
  459. package/docs/assets/brand/wardby-mascot-profile-512.png +0 -0
  460. package/docs/assets/brand/wardby-mascot.png +0 -0
  461. package/docs/assets/brand/wardby-mascot.svg +5 -0
  462. package/docs/assets/wardby-workflow.svg +106 -0
  463. package/docs/code-review-agents.md +508 -0
  464. package/docs/coding-agent-setup.md +175 -0
  465. package/docs/coding-packages.md +455 -0
  466. package/docs/coding-services.md +300 -0
  467. package/docs/coding-worker-byo-images.md +98 -0
  468. package/docs/coding-worker-isolation.md +1068 -0
  469. package/docs/getting-started-gke.md +632 -0
  470. package/docs/getting-started-identity-provider.md +319 -0
  471. package/docs/getting-started.md +147 -0
  472. package/docs/jira-agents.md +649 -0
  473. package/docs/knowledge.md +387 -0
  474. package/docs/models.md +221 -0
  475. package/docs/observability.md +53 -0
  476. package/docs/release-verification.md +66 -0
  477. package/docs/security-deployment.md +667 -0
  478. package/docs/viewer-api.md +142 -0
  479. package/help/admin-viewer.md +39 -0
  480. package/help/agent-recipes.md +173 -0
  481. package/help/architecture-agent.md +189 -0
  482. package/help/builder-agent.md +80 -0
  483. package/help/code-review-agents.md +37 -0
  484. package/help/coding-packages.md +31 -0
  485. package/help/coding-services.md +71 -0
  486. package/help/cost-attribution.md +67 -0
  487. package/help/creating-agents.md +90 -0
  488. package/help/deploy-gke.md +45 -0
  489. package/help/deployment-targets.md +39 -0
  490. package/help/errors/budget-group-exhausted.md +25 -0
  491. package/help/errors/docker-isolation-unsupported.md +26 -0
  492. package/help/errors/model-unavailable.md +63 -0
  493. package/help/errors/protected-path.md +45 -0
  494. package/help/errors/repo-access.md +27 -0
  495. package/help/errors/service-declaration-invalid.md +27 -0
  496. package/help/errors/service-declaration-unavailable.md +25 -0
  497. package/help/errors/service-launcher-unsupported.md +30 -0
  498. package/help/errors/service-not-allowed.md +27 -0
  499. package/help/errors/service-unknown.md +23 -0
  500. package/help/errors/service-unready.md +49 -0
  501. package/help/getting-started.md +32 -0
  502. package/help/github.md +48 -0
  503. package/help/identity-and-access.md +44 -0
  504. package/help/jira.md +135 -0
  505. package/help/knowledge.md +47 -0
  506. package/help/mcp.md +30 -0
  507. package/help/models.md +90 -0
  508. package/help/native-capabilities.md +30 -0
  509. package/help/observability.md +41 -0
  510. package/help/operating-agents.md +36 -0
  511. package/help/security.md +27 -0
  512. package/help/troubleshooting/budgets.md +32 -0
  513. package/help/troubleshooting/coding-workers.md +47 -0
  514. package/help/troubleshooting/repository-access.md +27 -0
  515. package/package.json +14 -3
  516. package/prisma/migrations/20260925010000_coding_collect_exclude/migration.sql +8 -0
  517. package/prisma/migrations/20260925015000_allowed_egress_default/migration.sql +8 -0
  518. package/prisma/migrations/20260925020000_coding_package_registry/migration.sql +55 -0
  519. package/prisma/migrations/20260925030000_tool_name_per_owner/migration.sql +11 -0
  520. package/prisma/migrations/20260926010000_run_trigger_host_event/migration.sql +7 -0
  521. package/prisma/migrations/20260926020000_code_review_hosts/migration.sql +53 -0
  522. package/prisma/migrations/20260926030000_auth_user_roles/migration.sql +9 -0
  523. package/prisma/migrations/20260926040000_agent_effort/migration.sql +6 -0
  524. package/prisma/migrations/20260926050000_registry_lockfile_plan/migration.sql +32 -0
  525. package/prisma/migrations/20260926050000_repo_access_authorization/migration.sql +82 -0
  526. package/prisma/migrations/20260926060000_registry_plan_refusal/migration.sql +19 -0
  527. package/prisma/migrations/20260926100000_registry_plan_refusal_published_at/migration.sql +5 -0
  528. package/prisma/migrations/20260926190000_run_host_status/migration.sql +18 -0
  529. package/prisma/migrations/20260926210000_run_host_status_at_dispatch/migration.sql +5 -0
  530. package/prisma/migrations/20260927010000_resource_grants/migration.sql +72 -0
  531. package/prisma/migrations/20260927020000_proxy_session_budget_exhausted/migration.sql +3 -0
  532. package/prisma/migrations/20260927030000_coding_debug_trace/migration.sql +4 -0
  533. package/prisma/migrations/20260927040000_proxy_session_upstream_failure/migration.sql +3 -0
  534. package/prisma/migrations/20260927050000_coding_run_services/migration.sql +74 -0
  535. package/prisma/migrations/20260928000000_coding_run_tool_image/migration.sql +5 -0
  536. package/prisma/migrations/20260930000000_jira_issue_projects/migration.sql +34 -0
  537. package/prisma/migrations/20261001000000_jira_phase2_allowlists/migration.sql +3 -0
  538. package/prisma/migrations/20261001010000_jira_link_types_allowlist/migration.sql +2 -0
  539. package/prisma/migrations/20261002000000_jira_coding_bridge/migration.sql +28 -0
  540. package/prisma/migrations/20261002010000_jira_issue_creation/migration.sql +25 -0
  541. package/prisma/migrations/20261003000000_issue_cost_attribution/migration.sql +56 -0
  542. package/prisma/migrations/20261003010000_coding_run_service_status/migration.sql +23 -0
  543. package/prisma/migrations/20261003020000_viewer_notify/migration.sql +54 -0
  544. package/prisma/migrations/20261003030000_viewer_notify_fixes/migration.sql +47 -0
  545. package/prisma/migrations/20261003040000_viewer_indexes/migration.sql +12 -0
  546. package/prisma/migrations/20261004000000_model_catalog/migration.sql +26 -0
  547. package/prisma/schema.prisma +663 -21
  548. package/dist/mcp/tools/models.d.ts +0 -8
  549. package/dist/mcp/tools/models.js +0 -15
  550. package/dist/providers/llm/pricing-anthropic.d.ts +0 -4
  551. package/dist/providers/llm/pricing-anthropic.js +0 -30
  552. package/dist/providers/llm/pricing-bedrock-claude.d.ts +0 -12
  553. package/dist/providers/llm/pricing-bedrock-claude.js +0 -37
  554. package/dist/providers/llm/pricing.d.ts +0 -30
  555. package/dist/providers/llm/pricing.js +0 -74
@@ -0,0 +1,31 @@
1
+ ---
2
+ id: coding-packages
3
+ title: Approve packages for coding agents
4
+ summary: Let Codex coding workers install vetted npm and PyPI dependencies through Wardby's registry proxy.
5
+ audience: operator
6
+ tags: [coding-agents, packages, npm, pypi, supply-chain]
7
+ appliesTo: >=0.2.1
8
+ ---
9
+
10
+ # Approve packages for coding agents
11
+
12
+ Coding workers have no direct registry network access. For **Codex** workers,
13
+ Wardby's registry proxy can allow `npm install` and `pip install` from a
14
+ per-agent npm or PyPI allowlist. The proxy records what was fetched and applies
15
+ supply-chain checks, including package graph validation, release-age policy,
16
+ and vulnerability filtering.
17
+
18
+ An empty allowlist keeps registry mode off. Approve only top-level packages;
19
+ Wardby validates and permits the required transitive dependency graph for the
20
+ run. Changing a package allowlist or policy needs `packages:approve` (or
21
+ `agents:admin`) and a Wardby `admin` or `package-approver` role.
22
+
23
+ Registry mode works for Codex and Claude Code runs alike, on the `node`
24
+ toolchain (npm) and the `node-python` toolchain (npm and pip). Claude Code runs
25
+ its shell commands in a separate, credential-free tool-runner container that
26
+ reaches the registry through the run's proxy network. Use a pinned custom
27
+ worker image when an agent needs system packages, another runtime, or
28
+ dependencies that should be baked into the image.
29
+
30
+ Read [`docs/coding-packages.md`](../docs/coding-packages.md) for allowlist
31
+ syntax, package-policy controls, lockfile behavior, and refusal errors.
@@ -0,0 +1,71 @@
1
+ ---
2
+ id: coding-services
3
+ title: Give coding runs the services their tests need
4
+ summary: Let coding runs on the Kubernetes or Docker launcher start fresh PostgreSQL, Redis or MySQL instances declared in the repository's .wardby/services.yaml.
5
+ audience: operator
6
+ tags: [coding-agents, services, postgres, redis, mysql, kubernetes, docker]
7
+ appliesTo: >=0.2.1
8
+ ---
9
+
10
+ # Give coding runs the services their tests need
11
+
12
+ A coding run can have a PostgreSQL, Redis or MySQL instance next to it for the
13
+ length of the run. Three parties agree before a service starts:
14
+
15
+ - **The repository** declares it in `.wardby/services.yaml` on its base branch,
16
+ for example `services: { postgres: "16" }`. Wardby reads the file from the
17
+ run's base branch (the agent's `baseRef`, or a `baseRef` given to
18
+ `trigger_agent` for that run), never from the run's own branch, so a change
19
+ to the declaration takes effect only once it is merged into that base.
20
+ - **The service catalog** says what each name and version is: a digest-pinned
21
+ image, its readiness check, resources, and the variables the agent's shells
22
+ receive (`testEnv`, such as `DATABASE_URL`). `list_services` and
23
+ `get_service` need `agents:read`. `create_service`, `update_service` and
24
+ `delete_service` need `services:manage` and the `admin` or
25
+ `service-manager` role. Built-in entries (`postgres` 15, 16 and 17, `redis`
26
+ 7, `mysql` 8) cannot be changed over MCP.
27
+ - **The agent's owner** lists the catalog names its runs may use in
28
+ `codingProfile.services`. An empty list, the default, allows none.
29
+
30
+ An agent with an empty list never reads the repository's declaration at all —
31
+ wardby only looks at `.wardby/services.yaml` for an agent that allows at least
32
+ one service. Such an agent's runs simply start without services, whatever a
33
+ repository declares, and none of the errors below can apply to them.
34
+
35
+ Services need the Kubernetes job launcher with Kubernetes 1.29 or later (each
36
+ service runs as a native sidecar in the run's pod) or the Docker job launcher
37
+ (each service runs as its own container sharing the run's network namespace);
38
+ both start them for Codex and Claude Code agents. Each run gets its own empty
39
+ instance, reachable on `127.0.0.1`; the run's sandbox and network policy do
40
+ not change, and the instance is deleted with the run. Each service's CPU,
41
+ memory and disk count toward the run: on Kubernetes toward its pod, namespace
42
+ quota and what a managed cluster bills; on Docker toward the host's memory,
43
+ because its data is kept in memory.
44
+
45
+ A bring-your-own worker image
46
+ ([`docs/coding-worker-byo-images.md`](../docs/coding-worker-byo-images.md))
47
+ needs driver v11 or later to run with services.
48
+
49
+ Catalog values are visible to anyone with `agents:read`. Use throwaway test
50
+ credentials only; never put a real secret in `serviceEnv` or `testEnv`.
51
+
52
+ Every run protects `.wardby/**` except `.wardby/services.yaml`, so a coding
53
+ agent may propose a declaration change in its pull request but cannot change
54
+ other `.wardby/` files. An agent's own `protectedPaths` exceptions (entries
55
+ starting with `!`) must be literal file paths and cannot unprotect `.wardby/`.
56
+
57
+ When upgrading a deployment that delegates to an identity provider, define the
58
+ `services:manage` scope in the provider first; see
59
+ [Configure identity and privileged access](identity-and-access.md).
60
+
61
+ If a run is refused or fails over its services, read the page for its code:
62
+
63
+ - [`service_declaration_invalid`](errors/service-declaration-invalid.md)
64
+ - [`service_declaration_unavailable`](errors/service-declaration-unavailable.md)
65
+ - [`service_unknown`](errors/service-unknown.md)
66
+ - [`service_not_allowed`](errors/service-not-allowed.md)
67
+ - [`service_launcher_unsupported`](errors/service-launcher-unsupported.md)
68
+ - [`service_unready`](errors/service-unready.md)
69
+
70
+ Read [`docs/coding-services.md`](../docs/coding-services.md) for the file
71
+ format, catalog fields, built-in variables, custom entries, and capacity.
@@ -0,0 +1,67 @@
1
+ ---
2
+ id: cost-attribution
3
+ title: Attribute agent spend to issues
4
+ summary: See what agent work on a Jira card, epic, or project cost, by model and token kind, with the cost_report MCP tool.
5
+ audience: operator
6
+ tags: [cost, spend, attribution, jira, epic, reporting, cost_report, tokens]
7
+ appliesTo: >=0.2.1
8
+ ---
9
+
10
+ # Attribute agent spend to issues
11
+
12
+ Wardby records which issue each run's cost belongs to, so you can see what agent
13
+ work on a card, an epic, or a whole project cost.
14
+
15
+ A run is attributed to an issue when:
16
+
17
+ - a Jira event on that issue started it;
18
+ - it reviews, or answers an `@wardby` mention on, a pull request Wardby opened
19
+ for the issue;
20
+ - `trigger_agent` named an `issue`, or a webhook call's JSON body named a
21
+ `wardbyIssue`, as `{ "provider": "jira", "key": "PROJ-123" }`, in a project
22
+ the agent is linked to. Keys are matched without regard to case
23
+ (`proj-123` is read as `PROJ-123`). An unlinked project or a malformed key is
24
+ refused; a webhook answers `400 invalid_issue`. A webhook ignores a
25
+ top-level `issue` field, so forwarded GitHub or Jira payloads still run;
26
+ - its parent run is attributed. Sub-agents and coding runs inherit the issue
27
+ and cannot change it.
28
+
29
+ When a run starts, Wardby records the issue's parent (its epic) as it is at that
30
+ moment. Moving an issue to another epic later leaves earlier runs under the
31
+ earlier epic. Reports always show the latest known titles.
32
+
33
+ ## Read the report
34
+
35
+ Call the `cost_report` MCP tool. `groupBy` is `issue` (default), `parent`,
36
+ `scope` (project), `agent`, `model`, or `run`; filter with `scopeKey`,
37
+ `parentKey`, `issueKey`, `agentId`, `provider`, and an ISO `from`/`to` window
38
+ (default: the last 30 days). Drill down by combining them: `groupBy: "parent",
39
+ scopeKey: "PROJ"` lists epics, then `groupBy: "issue", parentKey: "PROJ-10"`
40
+ lists that epic's cards, and `groupBy: "run", issueKey: "PROJ-123"` gives run
41
+ ids for `get_run`.
42
+
43
+ - Amounts are USD. Tokens are reported by kind — fresh input, cached input,
44
+ cache write, output — because each kind is priced differently; they are never
45
+ added into one total.
46
+ - `bySource` splits each row's cost by how its runs were attributed, which
47
+ shows how much was pull-request review (`linked_pr`).
48
+ - `unattributed` is spend in the window with no issue. Only `agentId` narrows
49
+ it; the project, epic, and issue filters cannot.
50
+ - `totals` sum each run's full cost. With `groupBy: "model"`, rows add up to
51
+ less when some runs have no per-model record.
52
+ - You see the same runs as `list_runs`: runs of agents you own, plus runs you
53
+ triggered.
54
+
55
+ The Jira status comment for a run also ends with its spend: the whole run tree,
56
+ the issue's total so far (every attributed run, whichever agent ran it), and the
57
+ cost per model.
58
+
59
+ ## Setup notes
60
+
61
+ If a company-managed Jira site still uses the legacy Epic Link field, set
62
+ `WARDBY_JIRA_EPIC_LINK_FIELD` (for example `customfield_10014`) so runs are
63
+ grouped under their epic. On GKE, re-run the database grants bootstrap after
64
+ upgrading so coding runs record their per-model usage; until then they still
65
+ run and a warning is logged.
66
+
67
+ For the full guide, follow [`docs/jira-agents.md`](../docs/jira-agents.md).
@@ -0,0 +1,90 @@
1
+ ---
2
+ id: creating-agents
3
+ title: Choose a native or coding agent
4
+ summary: Decide whether a task should run as a native Wardby agent or an isolated Codex or Claude Code coding agent.
5
+ audience: developer
6
+ tags: [agents, native-agents, coding-agents, codex, claude-code]
7
+ appliesTo: >=0.2.1
8
+ ---
9
+
10
+ # Choose a native or coding agent
11
+
12
+ Create a **native agent** when Wardby should run a model with explicit,
13
+ attached capabilities to produce a bounded operational result. Create a
14
+ **coding agent** when the task must inspect and change a Git repository, run
15
+ project checks, and optionally open a draft pull request.
16
+
17
+ | Choose | Best for | Execution model | Typical result |
18
+ | ------------ | ------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------ |
19
+ | Native agent | Review, triage, analysis, reporting, workflow coordination, and API-backed tasks | Wardby's managed native run loop with only its attached tools, secrets, datastores, and sub-agents | A structured result, report, decision, or bounded follow-up action |
20
+ | Coding agent | Repository changes, tests, dependency updates, implementation work, and PR revisions | An isolated Codex or Claude Code worker with a trusted proxy and Git finalization | No changes, a bounded result, or one controlled draft pull request |
21
+
22
+ ## Start with a native agent
23
+
24
+ Native agents are the default when a task does not need a full repository
25
+ workspace. Give the agent a narrow purpose, model, per-run budget, and only the
26
+ tools or data it needs. Attach schedules or webhooks when the work should run
27
+ without a person starting it manually.
28
+
29
+ Examples include an architecture reviewer that writes findings to a datastore,
30
+ a release monitor that investigates an alert, or a triage agent that turns
31
+ incoming information into a report for a person to act on.
32
+
33
+ ## Use a coding agent for repository work
34
+
35
+ Coding agents use a `codingProfile` that selects Codex or Claude Code and names
36
+ the authorized repository. They run in isolated workers; Wardby keeps provider
37
+ credentials and the GitHub App private key in trusted components. A coding run
38
+ can change a checkout and run approved checks, but trusted finalization is what
39
+ validates the result, pushes a controlled branch, and opens a draft pull
40
+ request. It never auto-merges.
41
+
42
+ Before creating one, configure immutable worker images, the selected launcher,
43
+ the trusted coding proxy, and a narrowly installed GitHub App. The agent owner
44
+ must have the required repository access, or an administrator must explicitly
45
+ approve the repository.
46
+
47
+ ## Choosing a model
48
+
49
+ Both agent types take a `model` field naming an entry in wardby's model
50
+ catalog. Run `list_models` to see which ids this deployment knows about and
51
+ what each costs; `get_model` shows one entry in full. `create_agent` and
52
+ `update_agent` always refuse a `model` that isn't in the catalog or that an
53
+ admin has disabled. For a native agent, they also refuse a model whose
54
+ provider has no credentials configured for native runs here (such a model
55
+ shows `routable: false` in `list_models`). A coding agent's model isn't checked against
56
+ `routable` at all — a coding run uses the coding proxy's own credentials
57
+ instead, so confirm those are configured for Codex or Claude Code
58
+ separately; a missing one fails the run itself at dispatch, not
59
+ `create_agent`/`update_agent`. See [Models and pricing](models.md) and
60
+ [Model not available](errors/model-unavailable.md).
61
+
62
+ ## Decision checklist
63
+
64
+ Choose a native agent when all of these are true:
65
+
66
+ - The task can be completed with a narrow set of attached tools or data.
67
+ - A repository checkout, shell-based project setup, and code changes are not
68
+ required.
69
+ - The intended output is an analysis, report, decision, or controlled API
70
+ action.
71
+
72
+ Choose a coding agent when any of these are true:
73
+
74
+ - The agent must edit a repository or execute the project's test suite.
75
+ - The reviewable outcome should be a branch or draft pull request.
76
+ - The task needs a coding-agent builder such as Codex or Claude Code inside an
77
+ isolated workspace.
78
+
79
+ Do not use a coding agent merely because a task is complex. Start with the
80
+ least powerful execution model that can safely produce the required outcome.
81
+ A coding agent can also keep a repository's architecture knowledge current; see
82
+ [Set up an architecture agent](help://architecture-agent) and
83
+ [Architecture knowledge bundles](help://knowledge).
84
+
85
+ For an `@mention` builder with a router, see [Agent recipes](help://agent-recipes) and
86
+ [Builder and router prompts](help://builder-agent).
87
+
88
+ Read [Connect GitHub repositories](github.md) and
89
+ [Troubleshoot coding workers](troubleshooting/coding-workers.md) before
90
+ enabling repository-changing work.
@@ -0,0 +1,45 @@
1
+ ---
2
+ id: deploy-gke
3
+ title: Deploy Wardby on GKE Autopilot
4
+ summary: Use the supported Google Cloud path for a private database, isolated coding workers, and HTTPS ingress.
5
+ audience: operator
6
+ tags: [deployment, gke, gcp, kubernetes, production]
7
+ appliesTo: >=0.2.1
8
+ ---
9
+
10
+ # Deploy Wardby on GKE Autopilot
11
+
12
+ The supported Google Cloud deployment creates a GKE Autopilot cluster, private
13
+ Cloud SQL for PostgreSQL, Artifact Registry, HTTPS Gateway, Google Secret
14
+ Manager synchronization, and isolated gVisor-backed **Codex** coding-worker
15
+ pods. It also applies namespace RBAC and default-deny network policies.
16
+
17
+ Use a dedicated billed project, a hostname you control, remote Terraform state,
18
+ and a GitHub App installed only on repositories that agents need. Review
19
+ Terraform's plan and set cloud budgets before applying it: the deployment
20
+ creates billable resources.
21
+
22
+ The deployment process is:
23
+
24
+ 1. Install `gcloud`, Terraform, Docker with `linux/amd64` support, `kubectl`,
25
+ Helm, Node.js 24, and authenticate to the target project.
26
+ 2. Configure `deploy/gke/terraform.tfvars`, apply Terraform, and prepare the
27
+ Gateway's address, certificate map, Cloud Armor policy, and DNS record.
28
+ 3. Put first-time values in an untracked `.env.local`; `deploy/gke/up.sh`
29
+ seeds Secret Manager without overwriting existing production values.
30
+ 4. Run `HOSTNAME=wardby.example.com deploy/gke/up.sh`, then verify DNS,
31
+ certificate issuance, database IAM bootstrap, and service health.
32
+
33
+ When a release changes `deploy/gke/database-grants.sql`, re-run the database
34
+ grants bootstrap **before** deploying that release, so the proxy role can
35
+ already write the tables and columns it adds (such as per-model usage for
36
+ [cost attribution](cost-attribution.md), or a run's live turn count). Until the
37
+ grants are applied, the coding proxy's writes are refused and coding runs fail.
38
+
39
+ Claude Code's two-container executor is currently Docker-only; Kubernetes
40
+ coding workers use the Codex path. Configure an identity provider and GitHub
41
+ App before allowing people to use the public endpoint.
42
+
43
+ Follow the complete, ordered guide at
44
+ [`docs/getting-started-gke.md`](../docs/getting-started-gke.md). It includes
45
+ the precise IAM, DNS, bootstrap, upgrades, and teardown steps.
@@ -0,0 +1,39 @@
1
+ ---
2
+ id: deployment-targets
3
+ title: Choose a deployment target
4
+ summary: Pick the supported Wardby deployment path and understand its operational boundary.
5
+ audience: operator
6
+ tags: [deployment, docker, gke, aws, production]
7
+ appliesTo: >=0.2.1
8
+ ---
9
+
10
+ # Choose a deployment target
11
+
12
+ Wardby has one local path and two production-ready deployment shapes:
13
+
14
+ - **Local development:** `wardby quickstart` runs the control plane locally
15
+ with its portable PostgreSQL container. It is the best place to evaluate,
16
+ develop agents, and connect a local Codex or Claude Code client.
17
+ - **Production container baseline:** run the published production image with
18
+ PostgreSQL, HTTPS ingress, durable storage, backups, and an operator-owned
19
+ identity provider. The Compose and Caddy configuration is a reference
20
+ baseline, not a managed platform.
21
+ - **Google Kubernetes Engine Autopilot:** the supported Google Cloud path. It
22
+ provisions GKE, private-IP Cloud SQL, Artifact Registry, isolated Codex
23
+ workers, HTTPS Gateway, and GCP-native secret and network controls. See
24
+ [Deploy on GKE](deploy-gke.md).
25
+
26
+ AWS is supported as a portable runtime target and has a Bedrock Claude adapter,
27
+ but Wardby does not ship a native AWS deployment module. Other cloud providers
28
+ can run the production container image with equivalent database, ingress,
29
+ identity, secret, isolation, and observability controls; that infrastructure is
30
+ operator-owned.
31
+
32
+ The older `deploy/gcp` Cloud Run module is deprecated. Do not choose it for a
33
+ new installation.
34
+
35
+ Before going live, complete the deployment security checklist and make a
36
+ backup, upgrades, alerting, and incident-response plan. Read
37
+ [`docs/getting-started.md`](../docs/getting-started.md) for the local and
38
+ container setup, and [`docs/security-deployment.md`](../docs/security-deployment.md)
39
+ for the production controls.
@@ -0,0 +1,25 @@
1
+ ---
2
+ id: errors/budget-group-exhausted
3
+ title: Budget group exhausted
4
+ summary: Wardby refused the run because the shared budget group has no remaining capacity for the period.
5
+ audience: operator
6
+ tags: [error, budget, refusal]
7
+ appliesTo: >=0.2.1
8
+ ---
9
+
10
+ # Budget group exhausted
11
+
12
+ An error such as `budget_group_exhausted:week` means the agent's budget group
13
+ has no capacity left for that period after accounting for actual spending and
14
+ active reservations. Wardby refuses the run before model work or a coding
15
+ worker begins.
16
+
17
+ 1. Inspect the budget group's `spentUsd` and `reservedUsd` values.
18
+ 2. Inspect active and recent runs that use the group.
19
+ 3. Wait for the period to reset, cancel unneeded active work, or deliberately
20
+ adjust the agent or group budget.
21
+ 4. Trigger a new run after capacity is available; a refused run is not resumed
22
+ automatically.
23
+
24
+ Do not raise a limit merely to clear a refusal without confirming the intended
25
+ owner, schedule, and overlapping work. See [Budget troubleshooting](../troubleshooting/budgets.md).
@@ -0,0 +1,26 @@
1
+ ---
2
+ id: errors/docker-isolation-unsupported
3
+ title: Coding-worker isolation unavailable
4
+ summary: Wardby refused to launch a coding worker because it could not verify the required isolation controls.
5
+ audience: operator
6
+ tags: [error, coding-agents, docker, isolation]
7
+ appliesTo: >=0.2.1
8
+ ---
9
+
10
+ # Coding-worker isolation unavailable
11
+
12
+ `docker_isolation_unsupported` means a required worker-isolation guarantee was
13
+ missing, unexpected, or could not be inspected. Wardby fails closed rather than
14
+ running a worker with a weaker profile.
15
+
16
+ 1. Run `wardby coding preflight` and correct the reported launcher, image,
17
+ proxy-network, or host-support issue.
18
+ 2. Confirm worker images are immutable image IDs or digests, not mutable tags.
19
+ 3. Confirm the trusted proxy and worker use the intended isolated network and
20
+ that no unapproved host mount, Docker socket, environment, or network path
21
+ is present.
22
+ 4. Re-run preflight before triggering another coding run.
23
+
24
+ If the deployment target does not support the selected coding provider, choose
25
+ a supported launcher/provider combination instead of disabling the controls.
26
+ See [Coding-worker troubleshooting](../troubleshooting/coding-workers.md).
@@ -0,0 +1,63 @@
1
+ ---
2
+ id: errors/model-unavailable
3
+ title: Model not available
4
+ summary: Wardby refused to start or configure a run because its model is not usable in this deployment right now.
5
+ audience: all
6
+ tags: [error, models, pricing, model_unavailable, refusal]
7
+ appliesTo: ">=0.4.0"
8
+ ---
9
+
10
+ # Model not available
11
+
12
+ `model_unavailable` means the model an agent names cannot be routed to in
13
+ this deployment right now. Wardby checks this before a run starts spending —
14
+ and whenever `create_agent` or `update_agent` sets or changes an agent's
15
+ model — never mid-run. A native agent's error carries one of three reasons;
16
+ a coding agent's only ever carries the first two, since a coding run uses the
17
+ coding proxy's own credentials rather than looking up a provider adapter:
18
+
19
+ - **`not_in_catalog`** — the model id is not in the catalog at all: not
20
+ shipped with this release, and no admin has added it. Run `list_models` to
21
+ see the exact ids this deployment knows about, and pick one of those, or
22
+ ask someone with `models:admin` to add it with `set_model`.
23
+ - **`disabled`** — the model is in the catalog, but an admin has disabled it
24
+ with `disable_model`. Pick a different model, or ask someone with
25
+ `models:admin` to bring it back with `reset_model` (reverts to the shipped
26
+ entry, if any) or `set_model` (re-adds it with current values).
27
+ - **`provider_not_configured`** (native agents only) — the model's provider
28
+ (`openai`, `anthropic`, or `bedrock-claude`) has no credentials configured
29
+ for native runs in this deployment, even though the model itself is in the
30
+ catalog. An operator needs to configure that provider's credentials before
31
+ any native agent can use a model under it; see
32
+ [Getting started](../getting-started.md).
33
+
34
+ Whatever the reason, the run is not lost: it ends with status `failed`, zero spend, and
35
+ the `model_unavailable` message as its error, so `list_runs` and `get_run`
36
+ show why. A coding agent's run fails at dispatch, before any worker starts,
37
+ and a scheduled agent moves on to its next window instead of retrying the
38
+ same one. A coding agent whose model now belongs to a different provider than
39
+ its coding provider drives (for example a Claude model on a Codex agent)
40
+ fails the same way, with `Model "<id>" is not supported by coding provider
41
+ "<provider>"` as its error.
42
+
43
+ A coding agent's model is checked against the catalog only
44
+ (`not_in_catalog`/`disabled`), never `provider_not_configured`: coding runs
45
+ never look up a provider adapter at all, so a model can pass this check and
46
+ still fail later for reasons `model_unavailable` never reports.
47
+
48
+ One such failure has a specific name: dispatching a Claude Code run throws
49
+ `coding_provider_not_configured:claude-code` when this deployment's
50
+ `CODING_CLAUDE_WORKER_IMAGE` or `CODING_CLAUDE_TOOL_RUNNER_IMAGE` isn't set —
51
+ it means the Claude Code worker or tool-runner image itself isn't configured,
52
+ not a missing credential, and there is no equivalent error or string for
53
+ Codex. See [Local coding-agent setup](../../docs/coding-agent-setup.md).
54
+
55
+ A missing or invalid API key behind a coding run's model-provider credential
56
+ (`CODING_OPENAI_CREDENTIAL_REF` for Codex, `CODING_ANTHROPIC_CREDENTIAL_REF`
57
+ for Claude Code) is a different problem with no dedicated error code
58
+ documented here: the run starts, then fails when it actually calls the
59
+ model — not as `model_unavailable`, and not at dispatch. Check the coding
60
+ proxy's own logs for that run.
61
+
62
+ See [Models and pricing](../models.md) for how the catalog works and who can
63
+ change it.
@@ -0,0 +1,45 @@
1
+ ---
2
+ id: errors/protected-path
3
+ title: Run changed a protected path
4
+ summary: A coding run's changes touched a path this agent may not edit, so none of its changes were kept.
5
+ audience: operator
6
+ tags: [error, coding-agents, vcs]
7
+ appliesTo: >=0.2.1
8
+ ---
9
+
10
+ # Run changed a protected path
11
+
12
+ A run that failed with category `protected_path` finished its work, but the
13
+ changes it collected included a file its agent is not allowed to edit. Wardby
14
+ discards the run's changes entirely rather than dropping just that file:
15
+ nothing from the run reaches a pull request.
16
+
17
+ Wardby protects two kinds of paths on every coding run:
18
+
19
+ - **The agent's own `protectedPaths`**, a list of glob patterns set on the
20
+ agent (`codingProfile.protectedPaths`, via `create_agent`/`update_agent`).
21
+ An entry may start with `!` to carve out one literal file as an exception
22
+ to the agent's own patterns; a whole tree can never be carved out this way.
23
+ - **The `.wardby/` baseline**, which every coding run gets regardless of the
24
+ agent's own settings. It protects everything under `.wardby/` except the one
25
+ literal file `.wardby/services.yaml`, which any coding agent may propose a
26
+ change to (see [Coding services](../coding-services.md)) — the baseline
27
+ cannot be widened to cover that file, and no exception can narrow it further
28
+ than that.
29
+
30
+ What to do:
31
+
32
+ 1. Ask again without changing the named file. If the change is small, doing it
33
+ yourself and letting the agent build on top is often fastest.
34
+ 2. If the agent genuinely needs to change that file, its owner (or an admin)
35
+ can widen `codingProfile.protectedPaths` with `update_agent` — for example
36
+ adding a `!`-prefixed exception for one file. This can never remove the
37
+ `.wardby/` baseline itself.
38
+ 3. Otherwise, the repository owner makes the change directly and the agent
39
+ works around it on the next run.
40
+
41
+ When this run is a sub-run another agent dispatched (for example a router
42
+ handing work to a coding agent), the parent sees a failed sub-run on its own
43
+ status comment: "A sub-run could not open its changes: it changed a file its
44
+ agent may not edit, so none of its changes were kept." That line never names
45
+ the file; check the sub-run's own PR comment or `get_run` for it.
@@ -0,0 +1,27 @@
1
+ ---
2
+ id: errors/repo-access
3
+ title: Repository access refused
4
+ summary: Wardby refused repository work because it could not confirm the managed agent owner's required GitHub access.
5
+ audience: operator
6
+ tags: [error, github, authorization, refusal]
7
+ appliesTo: >=0.2.1
8
+ ---
9
+
10
+ # Repository access refused
11
+
12
+ `repo_access` means Wardby cannot authorize the agent owner's current access to
13
+ the selected repository. Nothing is cloned or pushed for a refusal at run
14
+ preparation. The check also happens immediately before a coding run pushes, so
15
+ access lost during a run prevents publication.
16
+
17
+ 1. Confirm the agent has an owner and the intended repository is attached.
18
+ 2. Confirm that owner has linked their GitHub account to Wardby.
19
+ 3. Confirm the GitHub App is installed on the repository and the owner has the
20
+ required permission: write for coding work, read for a read-only link.
21
+ 4. If no individual owner can hold the access, ask a Wardby administrator to
22
+ record an explicit repository approval.
23
+ 5. Trigger a fresh run after the correction.
24
+
25
+ `repo_access_unavailable` is different: GitHub could not be queried reliably.
26
+ Resolve the availability condition and retry later rather than treating it as
27
+ an authorization success. See [Repository-access troubleshooting](../troubleshooting/repository-access.md).
@@ -0,0 +1,27 @@
1
+ ---
2
+ id: errors/service-declaration-invalid
3
+ title: Service declaration invalid
4
+ summary: Wardby refused the coding run because the repository's .wardby/services.yaml on the base branch is not a valid declaration.
5
+ audience: operator
6
+ tags: [error, coding-agents, services, refusal]
7
+ appliesTo: >=0.2.1
8
+ ---
9
+
10
+ # Service declaration invalid
11
+
12
+ `service_declaration_invalid` means the repository's `.wardby/services.yaml`,
13
+ read from the run's base branch, could not be used. The run's `error` names the
14
+ line and reason. Wardby refuses the run before a coding worker starts.
15
+
16
+ 1. Check the file on the base branch. Its only key is `services`, mapping
17
+ catalog names (lowercase letters, digits and hyphens) to quoted version
18
+ strings, for example `postgres: "16"`.
19
+ 2. Keep it to at most five services and under 8 KiB. Images, ports, commands
20
+ and environment belong in the catalog, not in the repository.
21
+ 3. Merge the fix to the base branch; a fix on the run's own branch has no
22
+ effect.
23
+ 4. Trigger a new run; a refused run is not resumed automatically.
24
+
25
+ The same code is used when the declared services' instructions would push the
26
+ coding task over its size limit; declare fewer services in that case. See
27
+ [Coding services](../coding-services.md).
@@ -0,0 +1,25 @@
1
+ ---
2
+ id: errors/service-declaration-unavailable
3
+ title: Service declaration unavailable
4
+ summary: Wardby refused the coding run because it could not read .wardby/services.yaml from the base branch.
5
+ audience: operator
6
+ tags: [error, coding-agents, services, github, refusal]
7
+ appliesTo: >=0.2.1
8
+ ---
9
+
10
+ # Service declaration unavailable
11
+
12
+ `service_declaration_unavailable` means Wardby could not read
13
+ `.wardby/services.yaml` from the run's base branch through the GitHub App, so
14
+ it could not tell which services the run needs. A missing file is not this
15
+ error (no file means no services); this is a failed read. Wardby refuses the
16
+ run rather than start it without services the repository may require.
17
+
18
+ 1. Trigger the run again; the cause is often a transient GitHub error.
19
+ 2. If it repeats, confirm the GitHub App installation still covers the
20
+ repository and has contents read access, and that the agent's base branch
21
+ exists.
22
+ 3. Check the control-plane logs around the refusal for the GitHub response.
23
+
24
+ See [Repository access troubleshooting](../troubleshooting/repository-access.md)
25
+ and [Coding services](../coding-services.md).
@@ -0,0 +1,30 @@
1
+ ---
2
+ id: errors/service-launcher-unsupported
3
+ title: Services are not available to this run
4
+ summary: Wardby refused the coding run because the repository declares services and this deployment cannot start them.
5
+ audience: operator
6
+ tags: [error, coding-agents, services, kubernetes, docker, refusal]
7
+ appliesTo: >=0.2.1
8
+ ---
9
+
10
+ # Services are not available to this run
11
+
12
+ `service_launcher_unsupported` means the repository declares services, but this
13
+ deployment cannot start them. Services need a job launcher that starts them:
14
+
15
+ - `JOB_LAUNCHER=kubernetes` and `JOB_LAUNCHER=docker` start them for Codex and
16
+ Claude Code agents;
17
+ - a deployment with `JOB_LAUNCHER=local` cannot start them at all.
18
+
19
+ 1. Run the coding agent on a deployment that uses the Kubernetes or Docker job
20
+ launcher, or
21
+ 2. remove `.wardby/services.yaml` from the base branch if the repository's
22
+ tests do not need the services.
23
+
24
+ This error only applies to an agent that already allows at least one service
25
+ (`codingProfile.services` is non-empty): wardby reads a repository's
26
+ declaration only for such an agent, and refuses rather than silently starting
27
+ the run without the services it names. An agent that allows no services never
28
+ reads the declaration at all, so its runs are unaffected and start normally on
29
+ any launcher. See [Coding-worker troubleshooting](../troubleshooting/coding-workers.md)
30
+ and [Coding services](../coding-services.md).
@@ -0,0 +1,27 @@
1
+ ---
2
+ id: errors/service-not-allowed
3
+ title: Service not allowed for this agent
4
+ summary: Wardby refused the coding run because the repository declares a service the agent's codingProfile.services does not allow.
5
+ audience: operator
6
+ tags: [error, coding-agents, services, refusal]
7
+ appliesTo: >=0.2.1
8
+ ---
9
+
10
+ # Service not allowed for this agent
11
+
12
+ `service_not_allowed` means the repository declares a service that exists in
13
+ the catalog, but the agent's `codingProfile.services` does not list its name.
14
+ Wardby refuses the run before a coding worker starts.
15
+
16
+ 1. Confirm the repository should have the service; the declaration is on the
17
+ base branch in `.wardby/services.yaml`.
18
+ 2. If it should, the agent's owner (or an admin) adds the name, for example
19
+ `postgres`, to `codingProfile.services` with `update_agent`. Allowing a name
20
+ allows every version the catalog has for it.
21
+ 3. Trigger a new run.
22
+
23
+ Each allowed service reserves CPU, memory and disk for the whole run, so allow
24
+ only what the agent's repositories need. This error implies the agent already
25
+ allows at least one service — an agent whose `codingProfile.services` is empty
26
+ never reads the declaration at all, so it never reaches this check. See
27
+ [Coding services](../coding-services.md).