@wardby/cli 0.4.1 → 0.5.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 (221) hide show
  1. package/.env.example +8 -1
  2. package/README.md +3 -1
  3. package/deploy/local/docker-compose.quickstart-coding.yml +27 -0
  4. package/dist/claude-coding-worker/driver.d.ts +2 -0
  5. package/dist/claude-coding-worker/driver.js +19 -3
  6. package/dist/claude-coding-worker/sdk.js +1 -1
  7. package/dist/cli.js +41 -22
  8. package/dist/coding/continuation-wording.d.ts +10 -0
  9. package/dist/coding/continuation-wording.js +13 -0
  10. package/dist/coding/docker-preflight.d.ts +12 -0
  11. package/dist/coding/docker-preflight.js +40 -0
  12. package/dist/coding/local-git.d.ts +22 -0
  13. package/dist/coding/local-git.js +102 -0
  14. package/dist/coding/local-repo-status.d.ts +7 -0
  15. package/dist/coding/local-repo-status.js +56 -0
  16. package/dist/coding/local-repo.d.ts +17 -0
  17. package/dist/coding/local-repo.js +65 -0
  18. package/dist/coding/observability.d.ts +1 -1
  19. package/dist/coding/observability.js +1 -0
  20. package/dist/coding/profile.d.ts +6 -0
  21. package/dist/coding/profile.js +13 -4
  22. package/dist/coding/protocol.d.ts +32 -7
  23. package/dist/coding/protocol.js +66 -4
  24. package/dist/coding-worker/artifact.d.ts +1 -0
  25. package/dist/coding-worker/errors.js +2 -0
  26. package/dist/config/providers.d.ts +13 -0
  27. package/dist/config/providers.js +21 -9
  28. package/dist/core/attribution.d.ts +13 -0
  29. package/dist/core/attribution.js +30 -0
  30. package/dist/core/budget-groups.d.ts +3 -1
  31. package/dist/core/budget-groups.js +53 -5
  32. package/dist/core/ci-context.d.ts +8 -0
  33. package/dist/core/ci-context.js +59 -0
  34. package/dist/core/delegation-siblings.d.ts +22 -0
  35. package/dist/core/delegation-siblings.js +40 -0
  36. package/dist/core/dispatch.d.ts +28 -4
  37. package/dist/core/dispatch.js +57 -15
  38. package/dist/core/engine-native.d.ts +16 -0
  39. package/dist/core/engine-native.js +49 -2
  40. package/dist/core/host-events.d.ts +25 -2
  41. package/dist/core/host-events.js +361 -19
  42. package/dist/core/host-status.d.ts +8 -3
  43. package/dist/core/host-status.js +38 -7
  44. package/dist/core/issue-events.d.ts +2 -6
  45. package/dist/core/issue-events.js +13 -19
  46. package/dist/core/pull-request-state-sync.d.ts +17 -0
  47. package/dist/core/pull-request-state-sync.js +53 -0
  48. package/dist/core/reconciler.d.ts +10 -1
  49. package/dist/core/reconciler.js +15 -2
  50. package/dist/core/related-pull-requests.d.ts +95 -0
  51. package/dist/core/related-pull-requests.js +338 -0
  52. package/dist/core/repo-access.d.ts +5 -1
  53. package/dist/core/repo-access.js +17 -1
  54. package/dist/core/review-fix-ledger.d.ts +20 -0
  55. package/dist/core/review-fix-ledger.js +41 -0
  56. package/dist/core/review-fix.d.ts +60 -0
  57. package/dist/core/review-fix.js +155 -0
  58. package/dist/core/review-host-tools.d.ts +13 -2
  59. package/dist/core/review-host-tools.js +72 -11
  60. package/dist/core/runner.d.ts +2 -2
  61. package/dist/core/runner.js +379 -184
  62. package/dist/core/serial-gate.d.ts +11 -0
  63. package/dist/core/serial-gate.js +19 -0
  64. package/dist/core/timing.d.ts +7 -0
  65. package/dist/core/timing.js +7 -0
  66. package/dist/generated/prisma/browser.d.ts +23 -0
  67. package/dist/generated/prisma/client.d.ts +23 -0
  68. package/dist/generated/prisma/commonInputTypes.d.ts +22 -0
  69. package/dist/generated/prisma/internal/class.d.ts +33 -0
  70. package/dist/generated/prisma/internal/class.js +4 -4
  71. package/dist/generated/prisma/internal/prismaNamespace.d.ts +274 -1
  72. package/dist/generated/prisma/internal/prismaNamespace.js +47 -2
  73. package/dist/generated/prisma/internal/prismaNamespaceBrowser.d.ts +48 -0
  74. package/dist/generated/prisma/internal/prismaNamespaceBrowser.js +47 -2
  75. package/dist/generated/prisma/models/Agent.d.ts +422 -1
  76. package/dist/generated/prisma/models/AgentRepository.d.ts +120 -2
  77. package/dist/generated/prisma/models/CodingAgentProfile.d.ts +42 -1
  78. package/dist/generated/prisma/models/CodingRun.d.ts +205 -1
  79. package/dist/generated/prisma/models/DeferredReview.d.ts +1336 -0
  80. package/dist/generated/prisma/models/DeferredReview.js +1 -0
  81. package/dist/generated/prisma/models/LocalPullRequest.d.ts +1384 -0
  82. package/dist/generated/prisma/models/LocalPullRequest.js +1 -0
  83. package/dist/generated/prisma/models/LocalReview.d.ts +1315 -0
  84. package/dist/generated/prisma/models/LocalReview.js +1 -0
  85. package/dist/generated/prisma/models/Run.d.ts +223 -0
  86. package/dist/generated/prisma/models/RunHostCheck.d.ts +148 -1
  87. package/dist/generated/prisma/models.d.ts +3 -0
  88. package/dist/help-index.json +476 -37
  89. package/dist/import/neutral-schema.d.ts +2 -2
  90. package/dist/mcp/auth/access.d.ts +3 -1
  91. package/dist/mcp/auth/host-account-cli.js +2 -2
  92. package/dist/mcp/auth/repo-authorization.d.ts +6 -7
  93. package/dist/mcp/auth/repo-authorization.js +21 -0
  94. package/dist/mcp/index.js +4 -1
  95. package/dist/mcp/tools/agents.js +46 -4
  96. package/dist/mcp/tools/host-accounts.js +2 -2
  97. package/dist/mcp/tools/repositories.js +71 -12
  98. package/dist/mcp/tools/runs.js +23 -0
  99. package/dist/mcp/tools/trigger.js +153 -24
  100. package/dist/providers/engine/types.d.ts +11 -0
  101. package/dist/providers/executor/composition.js +12 -7
  102. package/dist/providers/executor/container.d.ts +40 -3
  103. package/dist/providers/executor/container.js +140 -9
  104. package/dist/providers/executor/types.d.ts +1 -1
  105. package/dist/providers/jobs/fake-kubernetes-api.d.ts +3 -2
  106. package/dist/providers/jobs/fake-kubernetes-api.js +3 -0
  107. package/dist/providers/jobs/kubernetes-api.d.ts +3 -1
  108. package/dist/providers/jobs/kubernetes-client.d.ts +2 -1
  109. package/dist/providers/jobs/kubernetes-client.js +3 -0
  110. package/dist/providers/jobs/kubernetes-isolation.d.ts +7 -0
  111. package/dist/providers/jobs/kubernetes-isolation.js +8 -3
  112. package/dist/providers/jobs/kubernetes-preflight.d.ts +8 -0
  113. package/dist/providers/jobs/kubernetes-preflight.js +7 -0
  114. package/dist/providers/jobs/kubernetes-quota.d.ts +31 -0
  115. package/dist/providers/jobs/kubernetes-quota.js +110 -0
  116. package/dist/providers/jobs/kubernetes.d.ts +9 -0
  117. package/dist/providers/jobs/kubernetes.js +50 -0
  118. package/dist/providers/jobs/types.d.ts +7 -0
  119. package/dist/providers/review-host/ci.d.ts +7 -0
  120. package/dist/providers/review-host/ci.js +20 -0
  121. package/dist/providers/review-host/github-events.d.ts +7 -0
  122. package/dist/providers/review-host/github-events.js +31 -7
  123. package/dist/providers/review-host/github.d.ts +19 -2
  124. package/dist/providers/review-host/github.js +145 -2
  125. package/dist/providers/review-host/index.d.ts +8 -2
  126. package/dist/providers/review-host/index.js +14 -3
  127. package/dist/providers/review-host/local.d.ts +72 -0
  128. package/dist/providers/review-host/local.js +434 -0
  129. package/dist/providers/review-host/types.d.ts +65 -3
  130. package/dist/providers/review-host/types.js +5 -3
  131. package/dist/providers/vcs/git.d.ts +10 -20
  132. package/dist/providers/vcs/git.js +71 -127
  133. package/dist/providers/vcs/github-remote.d.ts +67 -0
  134. package/dist/providers/vcs/github-remote.js +201 -0
  135. package/dist/providers/vcs/github.d.ts +81 -0
  136. package/dist/providers/vcs/github.js +203 -6
  137. package/dist/providers/vcs/index.d.ts +16 -1
  138. package/dist/providers/vcs/index.js +43 -15
  139. package/dist/providers/vcs/local-remote.d.ts +44 -0
  140. package/dist/providers/vcs/local-remote.js +108 -0
  141. package/dist/providers/vcs/remote.d.ts +58 -0
  142. package/dist/providers/vcs/remote.js +1 -0
  143. package/dist/providers/vcs/routing.d.ts +33 -0
  144. package/dist/providers/vcs/routing.js +52 -0
  145. package/dist/providers/vcs/types.d.ts +12 -1
  146. package/dist/quickstart/coding-db.d.ts +11 -0
  147. package/dist/quickstart/coding-db.js +75 -0
  148. package/dist/quickstart/coding-doctor.d.ts +13 -0
  149. package/dist/quickstart/coding-doctor.js +88 -0
  150. package/dist/quickstart/coding-images.d.ts +15 -0
  151. package/dist/quickstart/coding-images.js +79 -0
  152. package/dist/quickstart/coding-seed.d.ts +63 -0
  153. package/dist/quickstart/coding-seed.js +85 -0
  154. package/dist/quickstart/coding.d.ts +66 -0
  155. package/dist/quickstart/coding.js +430 -0
  156. package/dist/quickstart/images.d.ts +19 -0
  157. package/dist/quickstart/images.js +63 -0
  158. package/dist/quickstart/index.js +61 -12
  159. package/dist/quickstart/starter-services.d.ts +45 -0
  160. package/dist/quickstart/starter-services.js +186 -0
  161. package/dist/quickstart-images.json +1 -0
  162. package/dist/serve.js +14 -1
  163. package/dist/viewer/api-schema.d.ts +176 -0
  164. package/dist/viewer/api-schema.js +27 -2
  165. package/dist/viewer/graph.d.ts +7 -2
  166. package/dist/viewer/graph.js +25 -11
  167. package/dist/viewer/http.d.ts +7 -1
  168. package/dist/viewer/http.js +8 -3
  169. package/dist/viewer/infra.d.ts +2 -0
  170. package/dist/viewer/infra.js +23 -0
  171. package/dist/viewer/run-detail.d.ts +2 -1
  172. package/dist/viewer/run-detail.js +2 -2
  173. package/docs/agent-recipes.md +123 -2
  174. package/docs/code-review-agents.md +293 -38
  175. package/docs/coding-agent-setup.md +141 -2
  176. package/docs/coding-packages.md +21 -0
  177. package/docs/coding-services.md +3 -0
  178. package/docs/coding-worker-isolation.md +56 -20
  179. package/docs/getting-started-gke.md +24 -0
  180. package/docs/getting-started.md +82 -8
  181. package/docs/jira-agents.md +26 -5
  182. package/docs/security-deployment.md +9 -0
  183. package/docs/viewer-api.md +21 -2
  184. package/help/admin-viewer.md +11 -1
  185. package/help/agent-recipes.md +25 -1
  186. package/help/builder-agent.md +4 -0
  187. package/help/code-review-agents.md +82 -2
  188. package/help/coding-packages.md +12 -1
  189. package/help/coding-services.md +4 -0
  190. package/help/cost-attribution.md +3 -1
  191. package/help/creating-agents.md +3 -0
  192. package/help/deploy-gke.md +2 -1
  193. package/help/errors/coding-provider-not-configured.md +60 -0
  194. package/help/errors/coding-turn-limit.md +25 -0
  195. package/help/errors/continuation-closed.md +75 -0
  196. package/help/errors/local-branch-conflict.md +37 -0
  197. package/help/errors/local-path-invalid.md +30 -0
  198. package/help/errors/local-ref-invalid.md +36 -0
  199. package/help/errors/local-ref-not-found.md +41 -0
  200. package/help/errors/local-repo-not-allowed.md +46 -0
  201. package/help/errors/local-repo-not-found.md +39 -0
  202. package/help/errors/model-unavailable.md +7 -6
  203. package/help/errors/vcs-github-not-configured.md +34 -0
  204. package/help/getting-started.md +4 -0
  205. package/help/github.md +22 -5
  206. package/help/jira.md +9 -2
  207. package/help/local-repositories.md +182 -0
  208. package/help/related-pull-requests.md +89 -0
  209. package/help/review-fix-rounds.md +69 -0
  210. package/help/troubleshooting/budgets.md +11 -0
  211. package/help/troubleshooting/coding-workers.md +22 -0
  212. package/help/troubleshooting/repository-access.md +5 -0
  213. package/package.json +3 -2
  214. package/prisma/migrations/20261004100000_delegations_and_coding_turns/migration.sql +12 -0
  215. package/prisma/migrations/20261005000000_review_fix_rounds/migration.sql +5 -0
  216. package/prisma/migrations/20261006000000_parallel_delegations/migration.sql +6 -0
  217. package/prisma/migrations/20261007000000_ci_rereview/migration.sql +4 -0
  218. package/prisma/migrations/20261008000000_review_after_ci/migration.sql +33 -0
  219. package/prisma/migrations/20261009000001_coding_run_local_branch/migration.sql +7 -0
  220. package/prisma/migrations/20261009000002_local_review/migration.sql +50 -0
  221. package/prisma/schema.prisma +98 -1
@@ -16,7 +16,9 @@ A run is attributed to an issue when:
16
16
 
17
17
  - a Jira event on that issue started it;
18
18
  - it reviews, or answers an `@wardby` mention on, a pull request Wardby opened
19
- for the issue;
19
+ for the issue — including a review that starts while the agent that asked
20
+ for the pull request is still running, before the pull request is linked to
21
+ the issue (Wardby then uses the issue of the coding run that opened it);
20
22
  - `trigger_agent` named an `issue`, or a webhook call's JSON body named a
21
23
  `wardbyIssue`, as `{ "provider": "jira", "key": "PROJ-123" }`, in a project
22
24
  the agent is linked to. Keys are matched without regard to case
@@ -85,6 +85,9 @@ A coding agent can also keep a repository's architecture knowledge current; see
85
85
  For an `@mention` builder with a router, see [Agent recipes](help://agent-recipes) and
86
86
  [Builder and router prompts](help://builder-agent).
87
87
 
88
+ A coding or review agent can also use a git folder on the wardby host instead of a
89
+ GitHub repository; see [Use local git repositories](local-repositories.md).
90
+
88
91
  Read [Connect GitHub repositories](github.md) and
89
92
  [Troubleshoot coding workers](troubleshooting/coding-workers.md) before
90
93
  enabling repository-changing work.
@@ -3,7 +3,7 @@ id: deploy-gke
3
3
  title: Deploy Wardby on GKE Autopilot
4
4
  summary: Use the supported Google Cloud path for a private database, isolated coding workers, and HTTPS ingress.
5
5
  audience: operator
6
- tags: [deployment, gke, gcp, kubernetes, production]
6
+ tags: [deployment, gke, gcp, kubernetes, production, secrets, jira]
7
7
  appliesTo: >=0.2.1
8
8
  ---
9
9
 
@@ -27,6 +27,7 @@ The deployment process is:
27
27
  Gateway's address, certificate map, Cloud Armor policy, and DNS record.
28
28
  3. Put first-time values in an untracked `.env.local`; `deploy/gke/up.sh`
29
29
  seeds Secret Manager without overwriting existing production values.
30
+ Jira settings are optional there, all or none; see [Jira](jira.md).
30
31
  4. Run `HOSTNAME=wardby.example.com deploy/gke/up.sh`, then verify DNS,
31
32
  certificate issuance, database IAM bootstrap, and service health.
32
33
 
@@ -0,0 +1,60 @@
1
+ ---
2
+ id: errors/coding-provider-not-configured
3
+ title: Coding provider not configured
4
+ summary: A coding run was refused because this server has no worker images for the agent's coding provider (Codex or Claude Code).
5
+ audience: operator
6
+ tags: [error, coding-agents, configuration, coding_provider_not_configured, CODING_WORKER_IMAGE, codex, claude-code]
7
+ appliesTo: ">=0.5.0"
8
+ ---
9
+
10
+ # Coding provider not configured
11
+
12
+ `coding_provider_not_configured:<provider>` means a coding agent's provider has
13
+ no worker images on this wardby server. Each provider's images are optional, so
14
+ a server can run Codex agents only, Claude Code agents only, or both. Starting
15
+ the run (a trigger, schedule, or webhook) fails at dispatch with this error,
16
+ before any worker starts and before anything is spent. A run records its worker
17
+ image at dispatch, so removing an image later doesn't affect most runs already
18
+ dispatched. The exceptions fail at launch with category
19
+ `preflight`: a Claude Code run when `CODING_CLAUDE_TOOL_RUNNER_IMAGE` has since
20
+ been unset, and a Codex run with no recorded worker image (one dispatched before
21
+ runs recorded it) when `CODING_WORKER_IMAGE` has since been unset.
22
+
23
+ - **`coding_provider_not_configured:codex`**: `CODING_WORKER_IMAGE` (the Codex
24
+ worker) isn't set, and the agent names no worker image of its own
25
+ (`codingProfile.workerImageRef`). An agent that sets `workerImageRef`, or uses
26
+ a toolchain with its own image (such as `CODING_WORKER_IMAGE_NODE_PYTHON_3_12`),
27
+ still runs without `CODING_WORKER_IMAGE`.
28
+ - **`coding_provider_not_configured:claude-code`**: `CODING_CLAUDE_WORKER_IMAGE`
29
+ or `CODING_CLAUDE_TOOL_RUNNER_IMAGE` isn't set. Claude Code needs both, and
30
+ even an agent's own `workerImageRef` doesn't replace the tool runner.
31
+
32
+ This error is about images, not API keys. A missing or invalid model API key
33
+ fails later, when the run calls the model.
34
+
35
+ ## What to do
36
+
37
+ Choose one:
38
+
39
+ 1. **Configure the provider.** Set its images on the wardby server and restart
40
+ it:
41
+ - Codex: `CODING_WORKER_IMAGE`.
42
+ - Claude Code: `CODING_CLAUDE_WORKER_IMAGE` and
43
+ `CODING_CLAUDE_TOOL_RUNNER_IMAGE`.
44
+
45
+ Each image must be immutable: a local `sha256:` image ID or a
46
+ `repo@sha256:` digest for Docker, and a registry digest for Kubernetes. With
47
+ the quickstart, re-run it and choose the provider you want; it pulls or builds
48
+ only that provider's images and keeps the ones already set. Then run
49
+ `wardby coding preflight`. See
50
+ [Local coding-agent setup](../../docs/coding-agent-setup.md).
51
+
52
+ 2. **Switch the agent to a configured provider.** Use `update_agent` to change
53
+ its `codingProfile.provider` and pick a model for that provider.
54
+
55
+ The server refuses to start with a coding launcher (`JOB_LAUNCHER=docker` or
56
+ `kubernetes`) when neither provider has images. That startup error names both
57
+ options.
58
+
59
+ Related: [Local git repositories](../local-repositories.md),
60
+ [Model not available](model-unavailable.md).
@@ -0,0 +1,25 @@
1
+ ---
2
+ id: errors/coding-turn-limit
3
+ title: Coding run reached its turn limit
4
+ summary: A Claude Code coding run stopped because it used every agent turn its codingProfile.maxTurns allows (200 by default), before it finished the task.
5
+ audience: operator
6
+ tags: [error, coding-agents, claude-code, turns, maxTurns]
7
+ appliesTo: ">=0.4.2"
8
+ ---
9
+
10
+ # Coding run reached its turn limit
11
+
12
+ `coding_turn_limit` (failure category `turn_limit`) means a Claude Code run used
13
+ all of its agent turns before it finished. Every file read, command and edit is
14
+ a turn. The limit is the agent's `codingProfile.maxTurns`, or 200 when it is
15
+ unset. Codex runs have no turn limit.
16
+
17
+ 1. Read the run's summary, and its debug trace if one was on
18
+ (`codingProfile.debugTraceMinutes`), to see whether the task was large or the
19
+ agent was repeating itself.
20
+ 2. For a large task, raise the limit (1 to 1000) with `update_agent`:
21
+ `{ "id": "<agent id>", "codingProfile": { "maxTurns": 400 } }`.
22
+ 3. For a loop, narrow the task or fix what it was retrying, then run it again.
23
+
24
+ The run's `budgetUsd` and `timeoutSec` still apply. See
25
+ [Troubleshoot coding workers](../troubleshooting/coding-workers.md).
@@ -0,0 +1,75 @@
1
+ ---
2
+ id: errors/continuation-closed
3
+ title: Continuation's pull request is no longer open
4
+ summary: A run asked to continue a pull request that was already merged or closed, so nothing was pushed.
5
+ audience: operator
6
+ tags: [error, coding-agents, vcs, pull-requests, continuation, continuePriorRun]
7
+ appliesTo: ">=0.4.2"
8
+ ---
9
+
10
+ # Continuation's pull request is no longer open
11
+
12
+ A coding run started with `continuePriorRun` (a mention follow-up, a Jira
13
+ issue-event task, or a review fix round) reuses the branch and pull request
14
+ the named run originally opened. Before cloning, and again right before it
15
+ pushes, wardby asks GitHub whether that pull request is still open. A run
16
+ that stopped with category `continuation_closed` got a definite answer that
17
+ it is not: the pull request was merged or closed, or GitHub no longer lists
18
+ an open pull request carrying that run's marker for the branch. Nothing from
19
+ the run was pushed either way, so the pull request (and anyone who merged or
20
+ closed it) is unaffected.
21
+
22
+ Two things besides an actual merge or close can also make the check come back
23
+ "no longer found," since it looks for an **open** pull request with that
24
+ exact base branch and the run's hidden marker still in its description:
25
+
26
+ - the pull request's base branch was retargeted to something other than the
27
+ one the run recorded;
28
+ - the hidden `<!-- wardby:<run-id> -->` marker was removed or edited out of
29
+ the pull request's description (wardby relies on it to find its own PR;
30
+ nothing else identifies it).
31
+
32
+ When the pull request was merged or closed **before the run started**, the
33
+ check before cloning catches it: the run's status is `refused`, and nothing
34
+ was spent beyond setup. When it was merged or closed **while the run was
35
+ working**, the check right before the push catches it instead: that run ends
36
+ `failed`, having already done its work, and that work is not pushed. Either
37
+ way the category (`get_run`'s `codingRun.failureCategory`) is
38
+ `continuation_closed`.
39
+
40
+ This is a safety check, not a flaky one: a transient GitHub failure while
41
+ checking (a timeout, a rate limit, a 5xx) is retried once, after a short
42
+ wait, and if it still fails, wardby proceeds as though the pull request were
43
+ still open rather than stopping the run on an unconfirmed answer — it only
44
+ ever refuses on a definite "merged", "closed", or "no longer found" answer.
45
+
46
+ ## What the requester sees
47
+
48
+ **(a) A parent agent that delegated the continuation** (a router that called
49
+ `continuePriorRun`, a Jira or mention follow-up) gets this back as its
50
+ sub-run's `refusal`, never the raw error code:
51
+
52
+ > The pull request this run was asked to continue is no longer open (merged
53
+ > or closed), so nothing was pushed. If the change is still needed, delegate
54
+ > again without continuePriorRun: it becomes a new pull request from the
55
+ > default branch.
56
+
57
+ **(b) A person watching the request** — the @-mention's status comment, or
58
+ the Jira issue comment for an issue-event task — sees a line about the
59
+ sub-run instead, without the error code:
60
+
61
+ > A sub-run was asked to continue a pull request that is no longer open
62
+ > (merged or closed); nothing was pushed.
63
+
64
+ ## What to do
65
+
66
+ If the change is still needed, ask again without `continuePriorRun` (or
67
+ without naming the closed pull request). The new run opens a fresh pull
68
+ request from the repository's default branch. If the check is wrongly
69
+ finding nothing when the pull request is in fact open, check that its base
70
+ branch still matches what wardby recorded and that the `<!-- wardby:... -->`
71
+ marker is still in its description, unedited.
72
+
73
+ Related: [Run GitHub code-review agents](../code-review-agents.md),
74
+ [Automatic review fix rounds](../review-fix-rounds.md),
75
+ [Related pull requests across repositories](../related-pull-requests.md).
@@ -0,0 +1,37 @@
1
+ ---
2
+ id: errors/local-branch-conflict
3
+ title: Run's branch was modified or is checked out
4
+ summary: The branch wardby/run-<id> moved since the run started, or it is checked out in the local repository, so wardby did not push to it.
5
+ audience: operator
6
+ tags: [error, local-repositories, coding-agents, vcs]
7
+ appliesTo: ">=0.5.0"
8
+ ---
9
+
10
+ # Run's branch was modified or is checked out
11
+
12
+ `local_branch_conflict` means wardby would not push a run's commit into the
13
+ local repository because the target branch `wardby/run-<run id>` is not in the
14
+ state the run expects. Either:
15
+
16
+ - the branch moved after the run cloned it, for example you or another run
17
+ committed to it, so the push would not be a fast-forward; or
18
+ - the branch is checked out in the repository, and wardby never changes the
19
+ branch you have checked out.
20
+
21
+ The run fails and nothing is pushed. Your repository, working tree and checked-out
22
+ branch are unchanged.
23
+
24
+ ## What to do
25
+
26
+ 1. Check what is checked out: `git -C /path/to/repo branch --show-current`. If
27
+ it is a `wardby/run-*` branch, switch to another one, such as `main`.
28
+ 2. If the branch moved, decide which work to keep. To build on the moved branch,
29
+ start a new run with `baseRef: wardby/run-<run id>` so it starts from the
30
+ branch's current tip.
31
+ 3. Start the run again.
32
+
33
+ To avoid this, treat `wardby/run-*` branches as wardby's while a run is active:
34
+ do not commit to them or check them out. To inspect a result, use
35
+ `git show wardby/run-<run id>` or create your own branch from it.
36
+
37
+ Related: [Local git repositories](../local-repositories.md).
@@ -0,0 +1,30 @@
1
+ ---
2
+ id: errors/local-path-invalid
3
+ title: Invalid file path in local repository read
4
+ summary: A file path given to a repository read was absolute or contained empty, dot or dot-dot segments.
5
+ audience: operator
6
+ tags: [error, local-repositories, coding-agents, vcs]
7
+ appliesTo: ">=0.5.0"
8
+ ---
9
+
10
+ # Invalid file path in local repository read
11
+
12
+ `local_path_invalid` means a read of a file in a local repository (for example
13
+ `repo_read_file` in a review, or wardby reading `.wardby/services.yaml`) used a
14
+ path wardby will not pass to git. Paths must be relative to the repository root.
15
+ A path is rejected when it:
16
+
17
+ - starts with `/`;
18
+ - contains an empty segment (`src//main.ts`), a `.` segment or a `..` segment; or
19
+ - is empty or contains a NUL.
20
+
21
+ Wardby reads files from the committed tree at a ref, so only regular files are
22
+ readable. A symlink, directory or submodule at that path is not.
23
+
24
+ ## What to do
25
+
26
+ Use a clean repository-relative path, such as `src/main.ts` or `docs/README.md`,
27
+ not `/home/you/repo/src/main.ts`, `./src/main.ts` or `src/../src/main.ts`. Use
28
+ `repo_list_files` to see what exists at the ref.
29
+
30
+ Related: [Local git repositories](../local-repositories.md).
@@ -0,0 +1,36 @@
1
+ ---
2
+ id: errors/local-ref-invalid
3
+ title: Invalid git branch or ref name
4
+ summary: A branch or ref name was rejected because it does not follow git's naming rules.
5
+ audience: operator
6
+ tags: [error, local-repositories, coding-agents, vcs]
7
+ appliesTo: ">=0.5.0"
8
+ ---
9
+
10
+ # Invalid git branch or ref name
11
+
12
+ `local_ref_invalid` means wardby refused a branch or ref name before passing it
13
+ to git. A name is rejected when it:
14
+
15
+ - is empty, starts with `-`, or contains `@{`, a NUL, a space or other
16
+ non-printable or non-ASCII character;
17
+ - is too long; or
18
+ - is not accepted by `git check-ref-format --branch` (for example it contains
19
+ `..`, a trailing `.lock`, or characters such as `~`, `^`, `:` or `\`).
20
+
21
+ It can also appear when a review is requested without `base` while the
22
+ repository's HEAD is detached, because there is no checked-out branch to use.
23
+
24
+ ## What to do
25
+
26
+ Use a plain branch name that git accepts. You can check one with:
27
+
28
+ ```
29
+ git check-ref-format --branch my-branch-name
30
+ ```
31
+
32
+ Valid examples: `feature/add-login`, `fix-123`, `release-1.0`. Invalid examples:
33
+ `-feature`, `feature branch`, `feature..fix`. For the detached HEAD case, pass
34
+ `review.base` explicitly or check out a branch.
35
+
36
+ Related: [Local git repositories](../local-repositories.md).
@@ -0,0 +1,41 @@
1
+ ---
2
+ id: errors/local-ref-not-found
3
+ title: Git branch or ref does not exist in the local repository
4
+ summary: A branch or base ref the run asked for was not found in the repository history.
5
+ audience: operator
6
+ tags: [error, local-repositories, coding-agents, vcs]
7
+ appliesTo: ">=0.5.0"
8
+ ---
9
+
10
+ # Git branch or ref does not exist in the local repository
11
+
12
+ `local_ref_not_found` means a branch, base or other ref named in a request does
13
+ not resolve to a commit in the local repository. It comes from:
14
+
15
+ - a coding run whose `baseRef` (on the agent's profile or in `trigger_agent`)
16
+ is not a branch of the repository;
17
+ - a continuation or a `baseRef: wardby/run-<run id>` whose result branch was
18
+ deleted, for example with `git branch -D`; or
19
+ - a review (`trigger_agent` with `review`) whose `branch` or `base` is not a
20
+ branch of the repository, or a file read at a ref that does not exist.
21
+
22
+ Only committed history counts. Uncommitted changes are not part of any branch.
23
+
24
+ ## What to do
25
+
26
+ 1. List the branches the repository really has:
27
+ ```
28
+ git -C /path/to/repo branch --all
29
+ ```
30
+ 2. Fix the name, or commit your work to a branch first:
31
+ ```
32
+ git switch -c my-branch
33
+ git commit -am "Work in progress"
34
+ ```
35
+ 3. If a result branch was deleted and you still have its commit, recreate it
36
+ with `git branch wardby/run-<run id> <commit>`. Otherwise start from another
37
+ branch.
38
+ 4. For a review, check both `branch` and `base`; `base` defaults to the branch
39
+ checked out in the repository.
40
+
41
+ Related: [Local git repositories](../local-repositories.md).
@@ -0,0 +1,46 @@
1
+ ---
2
+ id: errors/local-repo-not-allowed
3
+ title: Local repository is not in a trusted folder
4
+ summary: The repository path is outside every folder listed in LOCAL_REPO_ROOTS, so the run was refused.
5
+ audience: operator
6
+ tags: [error, local-repositories, coding-agents, vcs]
7
+ appliesTo: ">=0.5.0"
8
+ ---
9
+
10
+ # Local repository is not in a trusted folder
11
+
12
+ `local_repo_not_allowed` means wardby refused a local repository (a repository
13
+ written `local:/absolute/path`) because its real path, after resolving symlinks,
14
+ is not at or below any folder listed in the `LOCAL_REPO_ROOTS` environment
15
+ variable. If `LOCAL_REPO_ROOTS` is unset, no local repository is allowed.
16
+
17
+ A trusted folder that does not exist where the wardby server runs is ignored.
18
+ This is the usual cause when the server runs in a container, a pod or on
19
+ another machine: it cannot see the folder, so every repository under it is
20
+ refused with this error. `doctor` lists each trusted folder and reports a
21
+ missing one.
22
+
23
+ Wardby checks the folders when you create or update an agent, link a
24
+ repository, trigger a run, and again while a run uses the repository, so a
25
+ narrowed list also refuses agents that were saved earlier.
26
+
27
+ ## What to do
28
+
29
+ 1. Add the repository's folder (or a parent folder) to `LOCAL_REPO_ROOTS` on the
30
+ wardby server. Separate folders with the platform's path delimiter: `:` on
31
+ macOS and Linux, `;` on Windows. For example:
32
+ ```
33
+ LOCAL_REPO_ROOTS=/home/you/projects:/srv/repos
34
+ ```
35
+ 2. Restart the wardby server so it reads the new value.
36
+ 3. If you set up wardby with `quickstart`, run it again with
37
+ `--coding --trust /path/to/folder` (repeat `--trust` for more folders). It
38
+ keeps the folders already trusted and writes the new list to `.wardby/.env`.
39
+
40
+ 4. Run the wardby server directly on the machine that holds the folders, not
41
+ in a container.
42
+
43
+ If the repository path goes through a symlink, the symlink's target must be
44
+ inside a trusted folder; the link's own location does not count.
45
+
46
+ Related: [Local git repositories](../local-repositories.md), [Get started](../getting-started.md).
@@ -0,0 +1,39 @@
1
+ ---
2
+ id: errors/local-repo-not-found
3
+ title: Local repository path not found or not a git repository
4
+ summary: The repository path does not exist, is not the top level of a git work tree, or is not readable by the wardby server.
5
+ audience: operator
6
+ tags: [error, local-repositories, coding-agents, vcs]
7
+ appliesTo: ">=0.5.0"
8
+ ---
9
+
10
+ # Local repository path not found or not a git repository
11
+
12
+ `local_repo_not_found` means wardby could not use a local repository (written
13
+ `local:/absolute/path`) even though the path is inside a trusted folder. One of
14
+ these is true:
15
+
16
+ - the path does not exist (it was moved or deleted);
17
+ - the path is not the top level of a git work tree (it is a subfolder of a
18
+ repository, a bare repository, or not a repository at all); or
19
+ - the wardby server's user cannot read the folder.
20
+
21
+ Local repositories need the wardby server to run on the same machine as the
22
+ folders, outside a container. A server in a container, a pod or on another
23
+ machine usually cannot see the trusted folder at all; it ignores that folder,
24
+ so the repository fails with
25
+ [`local_repo_not_allowed`](local-repo-not-allowed.md) instead.
26
+
27
+ ## What to do
28
+
29
+ 1. Check the path from the machine that runs the wardby server:
30
+ ```
31
+ git -C /path/to/repo rev-parse --show-toplevel
32
+ ```
33
+ The output must be the path you gave wardby (after symlinks). If it is a
34
+ parent folder, use that folder instead.
35
+ 2. Make sure the server's user can read the folder.
36
+ 3. Make sure the path you gave is the folder that holds `.git`, not a
37
+ subfolder.
38
+
39
+ Related: [Local git repositories](../local-repositories.md).
@@ -45,12 +45,13 @@ A coding agent's model is checked against the catalog only
45
45
  never look up a provider adapter at all, so a model can pass this check and
46
46
  still fail later for reasons `model_unavailable` never reports.
47
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).
48
+ One such failure has a specific name: dispatching a coding run throws
49
+ `coding_provider_not_configured:codex` or
50
+ `coding_provider_not_configured:claude-code` when this deployment has no
51
+ worker images for that provider (`CODING_WORKER_IMAGE` for Codex;
52
+ `CODING_CLAUDE_WORKER_IMAGE` and `CODING_CLAUDE_TOOL_RUNNER_IMAGE` for Claude
53
+ Code). It means the images themselves aren't configured, not a missing
54
+ credential. See [Coding provider not configured](coding-provider-not-configured.md).
54
55
 
55
56
  A missing or invalid API key behind a coding run's model-provider credential
56
57
  (`CODING_OPENAI_CREDENTIAL_REF` for Codex, `CODING_ANTHROPIC_CREDENTIAL_REF`
@@ -0,0 +1,34 @@
1
+ ---
2
+ id: errors/vcs-github-not-configured
3
+ title: GitHub is not configured for coding agents
4
+ summary: A coding run used a GitHub repository, but the wardby server has no GitHub App credentials (GITHUB_APP_ID and GITHUB_APP_PRIVATE_KEY).
5
+ audience: operator
6
+ tags: [error, coding-agents, github, vcs, configuration, GITHUB_APP_ID, GITHUB_APP_PRIVATE_KEY]
7
+ appliesTo: ">=0.5.0"
8
+ ---
9
+
10
+ # GitHub is not configured for coding agents
11
+
12
+ `vcs_github_not_configured` means a coding run's repository is a GitHub
13
+ repository, but the wardby server was started without GitHub App credentials,
14
+ so it cannot clone the repository or push the result. The run's failure
15
+ category is `preflight`. Nothing is pushed.
16
+
17
+ The server starts without the credentials so that it can serve local git
18
+ repositories (`local:/absolute/path`) on its own. When neither GitHub App
19
+ credentials nor `LOCAL_REPO_ROOTS` are set, the server logs a warning at
20
+ startup that names both options.
21
+
22
+ ## What to do
23
+
24
+ Choose one:
25
+
26
+ 1. **Use GitHub.** Install a GitHub App on the repository, then set
27
+ `GITHUB_APP_ID` and `GITHUB_APP_PRIVATE_KEY` on the wardby server and restart
28
+ it. See [Connect GitHub repositories](../github.md).
29
+ 2. **Use a local repository.** If the code is in a git folder on the machine
30
+ that runs the wardby server, set `LOCAL_REPO_ROOTS` and point the agent's
31
+ `codingProfile.repository` at `local:/absolute/path`. See
32
+ [Local git repositories](../local-repositories.md).
33
+
34
+ Related: [Get started](../getting-started.md).
@@ -19,6 +19,10 @@ The quickstart creates local state under `.wardby/`, starts the local services,
19
19
  applies the required database migrations, and can register Wardby with Codex or
20
20
  Claude Code. Run `wardby doctor` afterwards to verify the local installation.
21
21
 
22
+ To try a coding agent and a review agent without a GitHub App, answer yes to the
23
+ quickstart's coding step (or pass `--coding --trust <dir>`, a repository or a folder of repositories); it points them at a
24
+ git folder on your machine. See [Use local git repositories](local-repositories.md).
25
+
22
26
  Use [Operate agents](operating-agents.md) to create and supervise managed work.
23
27
  Read [Choose a native or coding agent](creating-agents.md) before creating your
24
28
  first agent.
package/help/github.md CHANGED
@@ -23,6 +23,13 @@ Workers do not receive the GitHub App private key. A trusted component validates
23
23
  the changes, pushes a controlled branch, and opens at most one draft pull
24
24
  request. Wardby does not auto-merge coding-agent output.
25
25
 
26
+ Set the App's credentials as `GITHUB_APP_ID` and `GITHUB_APP_PRIVATE_KEY` on
27
+ the wardby server. Without them, a coding run on a GitHub repository fails with
28
+ [`vcs_github_not_configured`](errors/vcs-github-not-configured.md).
29
+
30
+ No GitHub App is needed for a git repository on the wardby host. See
31
+ [Use local git repositories](local-repositories.md).
32
+
26
33
  Read [`docs/coding-agent-setup.md`](../docs/coding-agent-setup.md) for coding
27
34
  agent setup and [`docs/code-review-agents.md`](../docs/code-review-agents.md)
28
35
  for pull-request review agents and webhook configuration.
@@ -35,14 +42,24 @@ Link a native agent to a repository with `link_repository`. Each trigger needs
35
42
  its GitHub App event ticked in the App's event settings; every event is a
36
43
  separate checkbox.
37
44
 
38
- | Trigger | Starts a run when | App event to subscribe |
39
- | -------------- | ------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
40
- | `pull_request` | A pull request is opened or pushed to; a re-run of the review check | Pull request, Check run (re-runs of the review check) |
41
- | `mention` | Someone with write access `@`-mentions the App | Issue comment, Issues, Pull request review comment (mentions in inline review threads) |
42
- | `push` | A commit lands on the repository's default branch | Push |
45
+ | Trigger | Starts a run when | App event to subscribe |
46
+ | ------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
47
+ | `pull_request` | A pull request is opened or pushed to; a re-run of the review check; CI finishing after a review that waited for it | Pull request, Check run (re-runs of the review check), Check suite (CI finishing) |
48
+ | `pull_request` with `waitForCi` | Same, but the review of a pushed head is held until that head's own CI finishes (or 15 minutes pass), and an approve verdict is refused while CI is failing or still running | Same events as `pull_request` |
49
+ | `mention` | Someone with write access `@`-mentions the App | Issue comment, Issues, Pull request review comment (mentions in inline review threads) |
50
+ | `push` | A commit lands on the repository's default branch | Push |
51
+ | `review_fix` | Wardby's own review check requests changes on a PR it opened | Same events as `pull_request` (it reacts to that check's own verdict, no extra event) |
43
52
 
44
53
  The `push` trigger starts a merge-watcher agent; only default-branch pushes
45
54
  count (tags, other branches, and deletions are ignored). See
46
55
  [Keep the knowledge bundle current on merge](help://architecture-agent).
47
56
 
57
+ The `review_fix` trigger lets Wardby fix its own review's findings
58
+ automatically, up to a round cap, on pull requests its own coding runs
59
+ opened. See [Automatic review fix rounds](review-fix-rounds.md).
60
+
61
+ `waitForCi` holds a reviewer's review until that pull request's own CI
62
+ finishes, and gates its ability to approve on CI passing. See
63
+ [Review after CI (`waitForCi`)](code-review-agents.md#review-after-ci-waitforci).
64
+
48
65
  For Jira Cloud instead of GitHub, see [Run Jira agents](jira.md).
package/help/jira.md CHANGED
@@ -41,7 +41,10 @@ the `Jira acting as` startup line to confirm the account.
41
41
  `WARDBY_JIRA_WEBHOOK_SECRET`, then restart. The startup log line
42
42
  `Jira acting as` shows which account Wardby uses; confirm it is the service
43
43
  account. Optionally set `WARDBY_JIRA_API_TOKEN_EXPIRES_AT` to get a warning
44
- 14 days before expiry.
44
+ 14 days before expiry. On the GKE reference deployment, put all five in
45
+ `.env.local` (all or none) and run `deploy/gke/up.sh`: it seeds them into
46
+ Secret Manager and syncs the optional `wardby-jira-env` Secret for the
47
+ control plane. See [Deploy on GKE](deploy-gke.md).
45
48
  6. A Wardby administrator links the agent with `link_issue_project`, for
46
49
  example `projectKey: "PROJ"`, `access: "write"`,
47
50
  `triggers: ["transitioned", "mention"]`,
@@ -116,7 +119,11 @@ precise task, and for follow-ups pass the run id from the run message as
116
119
  issue gets a web link to it (needs Link issues); Jira's development panel
117
120
  shows it only if the Jira and GitHub integration is installed. Merge and close
118
121
  comments and the merged status move need the GitHub App to deliver
119
- `pull_request` events. See the full guide for the recipe.
122
+ `pull_request` events. When one issue leads to pull requests in several
123
+ repositories, each lists the others, and a later event on the issue tells the
124
+ agent how to continue each open one; see
125
+ [Related pull requests across repositories](related-pull-requests.md). See
126
+ the full guide for the recipe.
120
127
 
121
128
  ## Trust rules
122
129