@wardby/cli 0.6.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/deploy/local/docker-compose.quickstart-coding.yml +13 -0
- package/dist/claude-coding-worker/driver.d.ts +21 -3
- package/dist/claude-coding-worker/driver.js +125 -17
- package/dist/claude-coding-worker/main.js +34 -6
- package/dist/claude-coding-worker/sdk.js +12 -1
- package/dist/claude-coding-worker/tool-socket.d.ts +27 -0
- package/dist/claude-coding-worker/tool-socket.js +111 -0
- package/dist/claude-coding-worker/transcript.d.ts +18 -0
- package/dist/claude-coding-worker/transcript.js +77 -0
- package/dist/cli-help.d.ts +1 -1
- package/dist/cli-help.js +1 -0
- package/dist/cli.js +24 -10
- package/dist/coding/continuation-wording.d.ts +35 -0
- package/dist/coding/continuation-wording.js +73 -0
- package/dist/coding/linked-issue-note.d.ts +23 -0
- package/dist/coding/linked-issue-note.js +47 -0
- package/dist/coding/merge-wording.d.ts +28 -0
- package/dist/coding/merge-wording.js +78 -0
- package/dist/coding/pr-description-note.d.ts +9 -0
- package/dist/coding/pr-description-note.js +32 -0
- package/dist/coding/profile.d.ts +46 -126
- package/dist/coding/profile.js +45 -4
- package/dist/coding/protected-path-wording.d.ts +8 -0
- package/dist/coding/protected-path-wording.js +1 -1
- package/dist/coding/protocol.d.ts +264 -346
- package/dist/coding/protocol.js +235 -12
- package/dist/coding/redact.d.ts +3 -0
- package/dist/coding/redact.js +12 -0
- package/dist/coding/registry/allowlist.d.ts +12 -0
- package/dist/coding/registry/allowlist.js +14 -1
- package/dist/coding/registry/audit-mode.d.ts +153 -0
- package/dist/coding/registry/audit-mode.js +304 -0
- package/dist/coding/registry/lockfile-shared.d.ts +36 -0
- package/dist/coding/registry/lockfile-shared.js +128 -0
- package/dist/coding/registry/lockfiles.js +1 -1
- package/dist/coding/registry/npm-lockfile-formats.d.ts +11 -0
- package/dist/coding/registry/npm-lockfile-formats.js +41 -0
- package/dist/coding/registry/npm-lockfile.d.ts +8 -4
- package/dist/coding/registry/npm-lockfile.js +4 -6
- package/dist/coding/registry/npm.js +78 -8
- package/dist/coding/registry/pnpm-lockfile.d.ts +17 -0
- package/dist/coding/registry/pnpm-lockfile.js +189 -0
- package/dist/coding/registry/pypi-plan.d.ts +50 -0
- package/dist/coding/registry/pypi-plan.js +406 -0
- package/dist/coding/registry/pypi-requirements.d.ts +58 -0
- package/dist/coding/registry/pypi-requirements.js +155 -0
- package/dist/coding/registry/pypi.d.ts +3 -27
- package/dist/coding/registry/pypi.js +40 -154
- package/dist/coding/registry/refusal-hints.d.ts +20 -0
- package/dist/coding/registry/refusal-hints.js +61 -0
- package/dist/coding/registry/refusal-wording.d.ts +11 -0
- package/dist/coding/registry/refusal-wording.js +56 -0
- package/dist/coding/registry/report.d.ts +70 -8
- package/dist/coding/registry/report.js +112 -5
- package/dist/coding/registry/types.d.ts +58 -8
- package/dist/coding/registry/yarn-lockfile.d.ts +30 -0
- package/dist/coding/registry/yarn-lockfile.js +367 -0
- package/dist/coding/services/catalog.d.ts +37 -351
- package/dist/coding/transcript/claude-code.d.ts +13 -0
- package/dist/coding/transcript/claude-code.js +273 -0
- package/dist/coding/transcript/download-protocol.d.ts +30 -0
- package/dist/coding/transcript/download-protocol.js +18 -0
- package/dist/coding/transcript/format.d.ts +20 -0
- package/dist/coding/transcript/format.js +32 -0
- package/dist/coding/transcript/recorder.d.ts +51 -0
- package/dist/coding/transcript/recorder.js +225 -0
- package/dist/coding/transcript/resume/checkout.d.ts +31 -0
- package/dist/coding/transcript/resume/checkout.js +203 -0
- package/dist/coding/transcript/resume/command.d.ts +17 -0
- package/dist/coding/transcript/resume/command.js +176 -0
- package/dist/coding/transcript/resume/download.d.ts +20 -0
- package/dist/coding/transcript/resume/download.js +153 -0
- package/dist/coding/transcript/resume/launch.d.ts +38 -0
- package/dist/coding/transcript/resume/launch.js +128 -0
- package/dist/coding/transcript/resume/session-file.d.ts +13 -0
- package/dist/coding/transcript/resume/session-file.js +79 -0
- package/dist/coding/transcript/resume/stand-in.d.ts +11 -0
- package/dist/coding/transcript/resume/stand-in.js +49 -0
- package/dist/coding-worker/artifact.d.ts +8 -3
- package/dist/coding-worker/artifact.js +3 -1
- package/dist/coding-worker/debug-trace.d.ts +6 -5
- package/dist/coding-worker/debug-trace.js +13 -18
- package/dist/coding-worker/dependency-cache.d.mts +229 -0
- package/dist/coding-worker/dependency-cache.mjs +2123 -0
- package/dist/coding-worker/driver.d.ts +4 -3
- package/dist/coding-worker/driver.js +116 -38
- package/dist/coding-worker/errors.d.ts +1 -0
- package/dist/coding-worker/errors.js +32 -0
- package/dist/coding-worker/task-note.d.ts +11 -0
- package/dist/coding-worker/task-note.js +13 -0
- package/dist/coding-worker/types.d.ts +11 -0
- package/dist/config/dependency-cache.d.ts +23 -0
- package/dist/config/dependency-cache.js +32 -0
- package/dist/config/providers.d.ts +12 -3
- package/dist/config/providers.js +55 -5
- package/dist/config/test-simulators.d.ts +82 -0
- package/dist/config/test-simulators.js +305 -0
- package/dist/core/async-context.d.ts +2 -0
- package/dist/core/async-context.js +12 -0
- package/dist/core/budget-events.d.ts +108 -0
- package/dist/core/budget-events.js +346 -0
- package/dist/core/budget-groups.d.ts +50 -1
- package/dist/core/budget-groups.js +236 -27
- package/dist/core/budget-stopped-head.d.ts +46 -0
- package/dist/core/budget-stopped-head.js +81 -0
- package/dist/core/budget-topup.d.ts +51 -0
- package/dist/core/budget-topup.js +156 -0
- package/dist/core/budget-wording.d.ts +16 -2
- package/dist/core/budget-wording.js +40 -2
- package/dist/core/coding-queue.d.ts +2 -1
- package/dist/core/coding-queue.js +7 -0
- package/dist/core/cron.d.ts +19 -1
- package/dist/core/cron.js +17 -0
- package/dist/core/datastores.js +1 -1
- package/dist/core/deferred-coding.d.ts +14 -0
- package/dist/core/deferred-coding.js +62 -0
- package/dist/core/delegation-child.d.ts +25 -0
- package/dist/core/delegation-child.js +37 -0
- package/dist/core/dispatch.d.ts +42 -0
- package/dist/core/dispatch.js +131 -56
- package/dist/core/engine-native.js +1 -1
- package/dist/core/error-code.d.ts +38 -0
- package/dist/core/error-code.js +168 -0
- package/dist/core/grants.d.ts +19 -6
- package/dist/core/grants.js +55 -6
- package/dist/core/host-events.d.ts +18 -2
- package/dist/core/host-events.js +284 -24
- package/dist/core/host-status.d.ts +85 -3
- package/dist/core/host-status.js +298 -20
- package/dist/core/issue-bridge.d.ts +50 -6
- package/dist/core/issue-bridge.js +124 -33
- package/dist/core/issue-events.d.ts +1 -1
- package/dist/core/issue-events.js +4 -10
- package/dist/core/issue-status.d.ts +1 -1
- package/dist/core/issue-status.js +54 -26
- package/dist/core/logger.d.ts +5 -0
- package/dist/core/logger.js +14 -1
- package/dist/core/lost-run-children.d.ts +6 -0
- package/dist/core/lost-run-children.js +32 -0
- package/dist/core/mark-ready.d.ts +34 -0
- package/dist/core/mark-ready.js +152 -0
- package/dist/core/markdown-code.d.ts +8 -0
- package/dist/core/markdown-code.js +107 -0
- package/dist/core/memory-tools.js +7 -0
- package/dist/core/merge-order-check.d.ts +2 -1
- package/dist/core/merge-order-check.js +8 -1
- package/dist/core/notification-templates.d.ts +1 -7
- package/dist/core/notification-templates.js +36 -2
- package/dist/core/pull-request-state-sync.js +2 -2
- package/dist/core/reconciler.d.ts +4 -3
- package/dist/core/reconciler.js +8 -1
- package/dist/core/related-pull-requests.d.ts +11 -3
- package/dist/core/related-pull-requests.js +27 -14
- package/dist/core/reply-parts.d.ts +21 -0
- package/dist/core/reply-parts.js +73 -0
- package/dist/core/review-fix.d.ts +1 -1
- package/dist/core/review-fix.js +2 -1
- package/dist/core/review-host-checks.d.ts +1 -1
- package/dist/core/review-host-tools.d.ts +3 -0
- package/dist/core/review-host-tools.js +99 -13
- package/dist/core/review-reads.d.ts +55 -0
- package/dist/core/review-reads.js +233 -0
- package/dist/core/run-status.d.ts +12 -0
- package/dist/core/run-status.js +12 -0
- package/dist/core/runner.d.ts +80 -34
- package/dist/core/runner.js +439 -144
- package/dist/core/schedule-start.d.ts +12 -0
- package/dist/core/schedule-start.js +14 -0
- package/dist/core/secret-broker-config.d.ts +10 -74
- package/dist/core/secret-guard.d.ts +46 -0
- package/dist/core/secret-guard.js +104 -0
- package/dist/core/secret-guarded-stores.d.ts +12 -0
- package/dist/core/secret-guarded-stores.js +41 -0
- package/dist/core/secret-spans.d.ts +50 -0
- package/dist/core/secret-spans.js +94 -0
- package/dist/core/stop-run.d.ts +46 -0
- package/dist/core/stop-run.js +61 -0
- package/dist/core/workflow-events.d.ts +14 -2
- package/dist/core/workflow-events.js +4 -0
- package/dist/core/workflow-run-events.d.ts +5 -3
- package/dist/core/workflow-run-events.js +43 -8
- package/dist/core/zod-json-schema.d.ts +4 -0
- package/dist/core/zod-json-schema.js +39 -0
- package/dist/core/zod3-window.d.ts +35 -0
- package/dist/core/zod3-window.js +124 -0
- package/dist/generated/prisma/browser.d.ts +34 -3
- package/dist/generated/prisma/client.d.ts +34 -3
- package/dist/generated/prisma/commonInputTypes.d.ts +220 -60
- package/dist/generated/prisma/enums.d.ts +10 -0
- package/dist/generated/prisma/enums.js +8 -0
- package/dist/generated/prisma/internal/class.d.ts +44 -0
- package/dist/generated/prisma/internal/class.js +4 -4
- package/dist/generated/prisma/internal/prismaNamespace.d.ts +428 -9
- package/dist/generated/prisma/internal/prismaNamespace.js +92 -1
- package/dist/generated/prisma/internal/prismaNamespaceBrowser.d.ts +95 -0
- package/dist/generated/prisma/internal/prismaNamespaceBrowser.js +92 -1
- package/dist/generated/prisma/models/Agent.d.ts +106 -8
- package/dist/generated/prisma/models/AgentRepository.d.ts +42 -1
- package/dist/generated/prisma/models/CodingAgentProfile.d.ts +229 -1
- package/dist/generated/prisma/models/CodingProxyRequest.d.ts +207 -3
- package/dist/generated/prisma/models/CodingProxySession.d.ts +114 -1
- package/dist/generated/prisma/models/CodingRun.d.ts +1637 -1
- package/dist/generated/prisma/models/DependencySnapshot.d.ts +1668 -0
- package/dist/generated/prisma/models/DependencySnapshot.js +1 -0
- package/dist/generated/prisma/models/IssuePullRequest.d.ts +6 -2
- package/dist/generated/prisma/models/LocalReview.d.ts +40 -1
- package/dist/generated/prisma/models/NativeGatewayCall.d.ts +39 -1
- package/dist/generated/prisma/models/NativeGatewaySession.d.ts +35 -1
- package/dist/generated/prisma/models/RegistryAllowance.d.ts +41 -1
- package/dist/generated/prisma/models/RegistryApprovedVersion.d.ts +75 -1
- package/dist/generated/prisma/models/RegistryAuditRecord.d.ts +1364 -0
- package/dist/generated/prisma/models/RegistryAuditRecord.js +1 -0
- package/dist/generated/prisma/models/Run.d.ts +738 -2
- package/dist/generated/prisma/models/RunBudgetEvent.d.ts +1211 -0
- package/dist/generated/prisma/models/RunBudgetEvent.js +1 -0
- package/dist/generated/prisma/models/RunTranscript.d.ts +1339 -0
- package/dist/generated/prisma/models/RunTranscript.js +1 -0
- package/dist/generated/prisma/models.d.ts +4 -0
- package/dist/help-index.json +1320 -69
- package/dist/import/create.js +32 -3
- package/dist/import/neutral-schema.d.ts +50 -281
- package/dist/import/neutral-schema.js +5 -4
- package/dist/knowledge/check.d.ts +1 -1
- package/dist/knowledge/cli.d.ts +11 -1
- package/dist/knowledge/cli.js +37 -4
- package/dist/knowledge/concept.d.ts +3 -19
- package/dist/knowledge/location.d.ts +31 -0
- package/dist/knowledge/location.js +78 -0
- package/dist/mcp/auth/access.d.ts +10 -2
- package/dist/mcp/auth/access.js +15 -1
- package/dist/mcp/auth/ownership.d.ts +7 -7
- package/dist/mcp/auth/self-hosted/credentials.d.ts +3 -3
- package/dist/mcp/auth/self-hosted/session.d.ts +2 -2
- package/dist/mcp/host-events/github-ingress.d.ts +2 -0
- package/dist/mcp/host-events/github-ingress.js +2 -1
- package/dist/mcp/index.d.ts +6 -0
- package/dist/mcp/index.js +58 -10
- package/dist/mcp/server.d.ts +13 -0
- package/dist/mcp/server.js +33 -14
- package/dist/mcp/tools/agents.d.ts +4 -0
- package/dist/mcp/tools/agents.js +198 -16
- package/dist/mcp/tools/datastore.js +17 -8
- package/dist/mcp/tools/grants.js +9 -3
- package/dist/mcp/tools/memory.js +11 -1
- package/dist/mcp/tools/notification-channels.js +2 -2
- package/dist/mcp/tools/packages.d.ts +2 -0
- package/dist/mcp/tools/packages.js +195 -0
- package/dist/mcp/tools/repositories.js +18 -5
- package/dist/mcp/tools/run-access.d.ts +16 -0
- package/dist/mcp/tools/run-access.js +25 -0
- package/dist/mcp/tools/run-transcript-download.d.ts +30 -0
- package/dist/mcp/tools/run-transcript-download.js +129 -0
- package/dist/mcp/tools/run-transcript.d.ts +19 -0
- package/dist/mcp/tools/run-transcript.js +70 -0
- package/dist/mcp/tools/runs.js +34 -12
- package/dist/mcp/tools/scheduling.js +3 -1
- package/dist/mcp/tools/secret-elicitation-form.js +5 -0
- package/dist/mcp/tools/secret-elicitation-server.d.ts +6 -0
- package/dist/mcp/tools/secret-elicitation-server.js +10 -61
- package/dist/mcp/tools/secrets.js +2 -2
- package/dist/mcp/tools/stop-run.d.ts +2 -0
- package/dist/mcp/tools/stop-run.js +82 -0
- package/dist/mcp/tools/subagents.js +2 -2
- package/dist/mcp/tools/tools.d.ts +1 -1
- package/dist/mcp/tools/tools.js +25 -9
- package/dist/mcp/transport/stdio-link-host.d.ts +20 -0
- package/dist/mcp/transport/stdio-link-host.js +67 -0
- package/dist/mcp/transport/streamable-http.d.ts +13 -0
- package/dist/mcp/transport/streamable-http.js +41 -1
- package/dist/native-worker/docker-launcher.d.ts +38 -2
- package/dist/native-worker/docker-launcher.js +65 -5
- package/dist/native-worker/gateway-server.d.ts +41 -3
- package/dist/native-worker/gateway-server.js +124 -27
- package/dist/native-worker/gateway.d.ts +27 -1
- package/dist/native-worker/gateway.js +70 -4
- package/dist/native-worker/http-server.d.ts +3 -1
- package/dist/native-worker/http-server.js +11 -7
- package/dist/native-worker/http-transport.js +1 -1
- package/dist/native-worker/kubernetes-launcher.d.ts +7 -3
- package/dist/native-worker/kubernetes-launcher.js +43 -3
- package/dist/native-worker/launch.d.ts +18 -1
- package/dist/native-worker/launch.js +6 -1
- package/dist/native-worker/ledger.d.ts +18 -2
- package/dist/native-worker/ledger.js +57 -4
- package/dist/native-worker/loopback.js +3 -8
- package/dist/native-worker/main.d.ts +2 -1
- package/dist/native-worker/main.js +14 -3
- package/dist/native-worker/protocol.d.ts +129 -577
- package/dist/native-worker/protocol.js +47 -1
- package/dist/native-worker/sandbox-executor.d.ts +17 -2
- package/dist/native-worker/sandbox-executor.js +78 -4
- package/dist/native-worker/stderr-redaction.d.ts +77 -0
- package/dist/native-worker/stderr-redaction.js +237 -0
- package/dist/native-worker/stdio.d.ts +1 -1
- package/dist/native-worker/stdio.js +6 -5
- package/dist/native-worker/warm-pool.d.ts +2 -2
- package/dist/native-worker/warm-pool.js +4 -4
- package/dist/native-worker/worker.js +28 -2
- package/dist/observability/metrics.js +6 -1
- package/dist/providers/auth/self-hosted.d.ts +1 -1
- package/dist/providers/coding-proxy/dependency-cache/eviction.d.ts +29 -0
- package/dist/providers/coding-proxy/dependency-cache/eviction.js +87 -0
- package/dist/providers/coding-proxy/dependency-cache/key.d.ts +33 -0
- package/dist/providers/coding-proxy/dependency-cache/key.js +86 -0
- package/dist/providers/coding-proxy/dependency-cache/model-request-seal.d.ts +18 -0
- package/dist/providers/coding-proxy/dependency-cache/model-request-seal.js +40 -0
- package/dist/providers/coding-proxy/dependency-cache/prisma-store.d.ts +25 -0
- package/dist/providers/coding-proxy/dependency-cache/prisma-store.js +131 -0
- package/dist/providers/coding-proxy/dependency-cache/service.d.ts +70 -0
- package/dist/providers/coding-proxy/dependency-cache/service.js +409 -0
- package/dist/providers/coding-proxy/dependency-cache/store.d.ts +85 -0
- package/dist/providers/coding-proxy/dependency-cache/store.js +95 -0
- package/dist/providers/coding-proxy/hold.d.ts +32 -0
- package/dist/providers/coding-proxy/hold.js +86 -0
- package/dist/providers/coding-proxy/interrupted.d.ts +70 -0
- package/dist/providers/coding-proxy/interrupted.js +104 -0
- package/dist/providers/coding-proxy/memory-ledger.d.ts +15 -2
- package/dist/providers/coding-proxy/memory-ledger.js +84 -8
- package/dist/providers/coding-proxy/metering.d.ts +16 -0
- package/dist/providers/coding-proxy/metering.js +27 -4
- package/dist/providers/coding-proxy/prisma-ledger.d.ts +15 -2
- package/dist/providers/coding-proxy/prisma-ledger.js +179 -67
- package/dist/providers/coding-proxy/proxy.d.ts +14 -1
- package/dist/providers/coding-proxy/proxy.js +166 -14
- package/dist/providers/coding-proxy/registry/audit.d.ts +53 -10
- package/dist/providers/coding-proxy/registry/audit.js +94 -17
- package/dist/providers/coding-proxy/registry/lockfile-parse-worker.d.ts +36 -0
- package/dist/providers/coding-proxy/registry/lockfile-parse-worker.js +67 -0
- package/dist/providers/coding-proxy/registry/lockfile-parse.d.ts +16 -0
- package/dist/providers/coding-proxy/registry/lockfile-parse.js +110 -0
- package/dist/providers/coding-proxy/registry/plan.d.ts +9 -0
- package/dist/providers/coding-proxy/registry/plan.js +201 -48
- package/dist/providers/coding-proxy/registry/prisma-store.d.ts +11 -5
- package/dist/providers/coding-proxy/registry/prisma-store.js +120 -17
- package/dist/providers/coding-proxy/registry/service.d.ts +97 -16
- package/dist/providers/coding-proxy/registry/service.js +579 -112
- package/dist/providers/coding-proxy/registry/store.d.ts +84 -9
- package/dist/providers/coding-proxy/registry/store.js +54 -1
- package/dist/providers/coding-proxy/runtime.d.ts +4 -0
- package/dist/providers/coding-proxy/runtime.js +78 -16
- package/dist/providers/coding-proxy/server.d.ts +6 -1
- package/dist/providers/coding-proxy/server.js +45 -1
- package/dist/providers/coding-proxy/types.d.ts +65 -1
- package/dist/providers/datastore/types.d.ts +5 -0
- package/dist/providers/engine/types.d.ts +17 -2
- package/dist/providers/engine/types.js +17 -0
- package/dist/providers/executor/composition.d.ts +10 -3
- package/dist/providers/executor/composition.js +47 -7
- package/dist/providers/executor/container.d.ts +361 -8
- package/dist/providers/executor/container.js +1136 -91
- package/dist/providers/executor/dbos-status.d.ts +31 -0
- package/dist/providers/executor/dbos-status.js +64 -0
- package/dist/providers/executor/dbos.d.ts +50 -1
- package/dist/providers/executor/dbos.js +207 -20
- package/dist/providers/executor/deferred.d.ts +12 -24
- package/dist/providers/executor/deferred.js +10 -29
- package/dist/providers/executor/in-process.d.ts +9 -1
- package/dist/providers/executor/in-process.js +14 -4
- package/dist/providers/executor/linked-issue-reader.d.ts +16 -0
- package/dist/providers/executor/linked-issue-reader.js +30 -0
- package/dist/providers/executor/routing.d.ts +2 -0
- package/dist/providers/executor/routing.js +4 -0
- package/dist/providers/executor/types.d.ts +13 -0
- package/dist/providers/index.d.ts +2 -1
- package/dist/providers/issue-tracker/types.d.ts +17 -0
- package/dist/providers/issue-tracker/types.js +39 -1
- package/dist/providers/jobs/claude-tool-setup.d.ts +4 -0
- package/dist/providers/jobs/claude-tool-setup.js +5 -2
- package/dist/providers/jobs/docker-isolation.d.ts +8 -0
- package/dist/providers/jobs/docker-isolation.js +17 -0
- package/dist/providers/jobs/docker.d.ts +1 -0
- package/dist/providers/jobs/docker.js +27 -2
- package/dist/providers/jobs/fake-kubernetes-api.d.ts +2 -0
- package/dist/providers/jobs/fake-kubernetes-api.js +3 -0
- package/dist/providers/jobs/kubernetes-api.d.ts +8 -0
- package/dist/providers/jobs/kubernetes-api.js +10 -0
- package/dist/providers/jobs/kubernetes-client.js +10 -1
- package/dist/providers/jobs/kubernetes-isolation.d.ts +2 -0
- package/dist/providers/jobs/kubernetes-isolation.js +17 -1
- package/dist/providers/jobs/kubernetes.d.ts +6 -1
- package/dist/providers/jobs/kubernetes.js +105 -16
- package/dist/providers/jobs/types.d.ts +33 -0
- package/dist/providers/jobs/types.js +13 -1
- package/dist/providers/llm/anthropic.js +5 -1
- package/dist/providers/llm/bedrock.d.ts +0 -12
- package/dist/providers/llm/bedrock.js +4 -0
- package/dist/providers/llm/claude-messages.d.ts +3 -1
- package/dist/providers/llm/claude-messages.js +4 -1
- package/dist/providers/llm/claude-provider.d.ts +2 -2
- package/dist/providers/llm/claude-provider.js +2 -2
- package/dist/providers/llm/openai.d.ts +2 -2
- package/dist/providers/llm/openai.js +6 -2
- package/dist/providers/llm/routing.d.ts +2 -2
- package/dist/providers/llm/routing.js +2 -2
- package/dist/providers/llm/types.d.ts +12 -2
- package/dist/providers/review-host/github-events.d.ts +9 -1
- package/dist/providers/review-host/github-events.js +34 -12
- package/dist/providers/review-host/github.d.ts +29 -2
- package/dist/providers/review-host/github.js +224 -29
- package/dist/providers/review-host/local.d.ts +8 -4
- package/dist/providers/review-host/local.js +49 -31
- package/dist/providers/review-host/patch-pages.d.ts +41 -0
- package/dist/providers/review-host/patch-pages.js +176 -0
- package/dist/providers/review-host/review-format.d.ts +19 -1
- package/dist/providers/review-host/review-format.js +38 -7
- package/dist/providers/review-host/types.d.ts +134 -2
- package/dist/providers/review-host/types.js +8 -0
- package/dist/providers/storage/gcs.d.ts +63 -0
- package/dist/providers/storage/gcs.js +69 -0
- package/dist/providers/storage/index.d.ts +15 -0
- package/dist/providers/storage/index.js +14 -0
- package/dist/providers/storage/local.d.ts +24 -0
- package/dist/providers/storage/local.js +92 -0
- package/dist/providers/storage/meter.d.ts +14 -0
- package/dist/providers/storage/meter.js +34 -0
- package/dist/providers/storage/s3.d.ts +41 -0
- package/dist/providers/storage/s3.js +107 -0
- package/dist/providers/storage/types.d.ts +37 -3
- package/dist/providers/storage/types.js +21 -4
- package/dist/providers/vcs/git.d.ts +33 -2
- package/dist/providers/vcs/git.js +324 -22
- package/dist/providers/vcs/github-remote.d.ts +26 -3
- package/dist/providers/vcs/github-remote.js +124 -14
- package/dist/providers/vcs/github.d.ts +214 -6
- package/dist/providers/vcs/github.js +447 -45
- package/dist/providers/vcs/index.js +8 -1
- package/dist/providers/vcs/pr-description.d.ts +127 -0
- package/dist/providers/vcs/pr-description.js +270 -0
- package/dist/providers/vcs/remote.d.ts +33 -1
- package/dist/providers/vcs/routing.d.ts +4 -2
- package/dist/providers/vcs/routing.js +6 -0
- package/dist/providers/vcs/types.d.ts +80 -3
- package/dist/quickstart/coding-seed.d.ts +14 -3
- package/dist/quickstart/coding-seed.js +213 -4
- package/dist/quickstart/reviewer-prompt.d.ts +1 -1
- package/dist/quickstart/reviewer-prompt.js +6 -6
- package/dist/quickstart-images.json +1 -1
- package/dist/sandbox/generated/zod.bundle.js +62 -1
- package/dist/sandbox/generated/zod3.bundle.js +5 -0
- package/dist/sandbox/host-functions.d.ts +1 -0
- package/dist/sandbox/host-functions.js +6 -11
- package/dist/sandbox/secret-broker.js +3 -4
- package/dist/sandbox/tool-capabilities.d.ts +10 -30
- package/dist/sandbox/zod-params.d.ts +37 -5
- package/dist/sandbox/zod-params.js +181 -26
- package/dist/serve.js +8 -1
- package/dist/viewer/api-schema.d.ts +349 -2627
- package/dist/viewer/api-schema.js +7 -0
- package/dist/viewer/build-schemas.js +6 -2
- package/dist/viewer/openapi.js +2 -4
- package/dist/wardby-bin.js +10 -0
- package/docs/agent-recipes.md +58 -20
- package/docs/code-review-agents.md +551 -41
- package/docs/coding-agent-setup.md +489 -7
- package/docs/coding-packages.md +1033 -90
- package/docs/coding-services.md +27 -12
- package/docs/coding-worker-byo-images.md +20 -0
- package/docs/coding-worker-isolation.md +105 -30
- package/docs/getting-started-gke.md +124 -137
- package/docs/getting-started-identity-provider.md +10 -1
- package/docs/getting-started.md +9 -0
- package/docs/jira-agents.md +17 -8
- package/docs/knowledge/blob-not-found-semantics.md +41 -0
- package/docs/knowledge/bounded-file-descriptor.md +52 -0
- package/docs/knowledge/delegation-admission-slots.md +52 -0
- package/docs/knowledge/http-dispatcher-bootstrap.md +61 -0
- package/docs/knowledge/import-rename-target.md +52 -0
- package/docs/knowledge/index.md +57 -0
- package/docs/knowledge/log.md +9 -0
- package/docs/knowledge/mcp-cancelled-task-precedence.md +41 -0
- package/docs/knowledge/mcp-http-prompt-discovery.md +41 -0
- package/docs/knowledge/mcp-schema-module-boundary.md +41 -0
- package/docs/knowledge/nullable-tool-uniqueness.md +52 -0
- package/docs/knowledge/overview-cli.md +74 -0
- package/docs/knowledge/overview-coding-proxy.md +72 -0
- package/docs/knowledge/overview-coding.md +72 -0
- package/docs/knowledge/overview-config.md +60 -0
- package/docs/knowledge/overview-core.md +72 -0
- package/docs/knowledge/overview-deploy.md +83 -0
- package/docs/knowledge/overview-mcp.md +61 -0
- package/docs/knowledge/overview-prisma.md +72 -0
- package/docs/knowledge/overview-providers.md +89 -0
- package/docs/knowledge/overview-sandbox.md +83 -0
- package/docs/knowledge/overview-surfaces.md +83 -0
- package/docs/knowledge/private-datastore-shared-boundary.md +54 -0
- package/docs/knowledge/proxy-settlement-projections.md +41 -0
- package/docs/knowledge/run-pricing-first-writer.md +43 -0
- package/docs/knowledge/schedule-claim-transaction.md +41 -0
- package/docs/knowledge/secret-entry-replica-contract.md +52 -0
- package/docs/knowledge/terminal-run-first-writer.md +41 -0
- package/docs/knowledge/transactional-agent-authorization.md +52 -0
- package/docs/knowledge/viewer-notify-write-isolation.md +30 -0
- package/docs/knowledge/warm-input-publication.md +30 -0
- package/docs/knowledge/workspace-staging-failure.md +54 -0
- package/docs/knowledge.md +54 -14
- package/docs/native-sandbox.md +119 -23
- package/docs/observability.md +4 -0
- package/docs/security-deployment.md +33 -2
- package/docs/slack-notifications.md +35 -19
- package/docs/tool-secrets.md +42 -10
- package/docs/viewer-api.openapi.yml +1 -1
- package/help/admin-viewer.md +24 -2
- package/help/architecture-agent.md +11 -6
- package/help/build-worker-image.md +3 -1
- package/help/builder-agent.md +19 -6
- package/help/code-review-agents.md +177 -6
- package/help/coding-packages.md +156 -6
- package/help/cost-attribution.md +9 -5
- package/help/creating-agents.md +14 -1
- package/help/dependency-cache.md +143 -0
- package/help/deploy-gke.md +15 -8
- package/help/errors/budget-exhausted.md +187 -0
- package/help/errors/budget-group-exhausted.md +5 -1
- package/help/errors/coding-stream-quota-exceeded.md +33 -0
- package/help/errors/coding-workspace-disk-exceeds-limit.md +39 -0
- package/help/errors/continuation-closed.md +9 -12
- package/help/errors/delegation-conflict.md +24 -0
- package/help/errors/file-list-truncated.md +45 -0
- package/help/errors/full-read-required.md +49 -0
- package/help/errors/github-account-not-allowed.md +4 -0
- package/help/errors/graph-incomplete.md +43 -0
- package/help/errors/graph-limit.md +43 -0
- package/help/errors/merge-conflict.md +49 -0
- package/help/errors/native-sandbox-gateway-error.md +20 -0
- package/help/errors/native-sandbox-launch-abandoned.md +21 -0
- package/help/errors/native-sandbox-worker-exited.md +3 -2
- package/help/errors/package-not-allowed-pending.md +52 -0
- package/help/errors/package-not-allowed.md +51 -0
- package/help/errors/package-refusals.md +43 -0
- package/help/errors/patch-cursor-malformed.md +31 -0
- package/help/errors/run-lost.md +39 -0
- package/help/errors/run-transcript-download.md +44 -0
- package/help/errors/secret-in-value.md +69 -0
- package/help/errors/target-merge.md +40 -0
- package/help/fix-merge-conflicts.md +73 -0
- package/help/github-app-setup.md +132 -0
- package/help/github.md +22 -0
- package/help/identity-and-access.md +2 -0
- package/help/jira.md +23 -6
- package/help/knowledge.md +16 -7
- package/help/local-repositories.md +1 -1
- package/help/low-power-mode.md +7 -1
- package/help/merge-order-check.md +5 -0
- package/help/native-capabilities.md +29 -1
- package/help/native-sandbox.md +15 -1
- package/help/operating-agents.md +5 -0
- package/help/package-audit-mode.md +91 -0
- package/help/related-pull-requests.md +10 -7
- package/help/resume-runs-locally.md +131 -0
- package/help/review-fix-rounds.md +33 -1
- package/help/sharing-agents.md +59 -0
- package/help/slack-notifications.md +19 -5
- package/help/status-comments.md +31 -0
- package/help/stop-run.md +58 -0
- package/help/troubleshooting/budgets.md +28 -0
- package/help/troubleshooting/coding-workers.md +78 -7
- package/package.json +17 -10
- package/prisma/migrations/20261016000000_registry_approved_accepted_advisories/migration.sql +3 -0
- package/prisma/migrations/20261016000001_mark_ready_when_passing/migration.sql +3 -0
- package/prisma/migrations/20261017000000_debug_trace_max_mb/migration.sql +4 -0
- package/prisma/migrations/20261018000000_dependency_cache/migration.sql +53 -0
- package/prisma/migrations/20261019000000_claude_max_output_tokens/migration.sql +5 -0
- package/prisma/migrations/20261021000000_pr_description_hash/migration.sql +4 -0
- package/prisma/migrations/20261022000000_dependency_snapshot_validation_metadata/migration.sql +4 -0
- package/prisma/migrations/20261023000000_package_audit_mode/migration.sql +27 -0
- package/prisma/migrations/20261024000000_budget_events/migration.sql +26 -0
- package/prisma/migrations/20261025000000_cache_aware_holds/migration.sql +9 -0
- package/prisma/migrations/20261026000000_budget_overrun/migration.sql +4 -0
- package/prisma/migrations/20261027000000_coding_run_request/migration.sql +1 -0
- package/prisma/migrations/20261028000000_native_gateway_review_reads/migration.sql +6 -0
- package/prisma/migrations/20261029000000_lead_survives_deploy/migration.sql +6 -0
- package/prisma/migrations/20261030000000_local_review_covered_sha/migration.sql +2 -0
- package/prisma/migrations/20261031000000_coding_run_budget_limit/migration.sql +9 -0
- package/prisma/migrations/20261101000000_run_transcripts/migration.sql +22 -0
- package/prisma/schema.prisma +311 -97
- package/dist/sandbox/generated/zod-to-json-schema.bundle.js +0 -5
|
@@ -31,6 +31,15 @@ Once an agent is linked to a repository with the `pull_request` trigger:
|
|
|
31
31
|
runs. When the cause is budget, the check says so ("Review could not run:
|
|
32
32
|
out of budget") and names the budget that was used up; use **Re-run** after
|
|
33
33
|
raising the budget or once it resets.
|
|
34
|
+
- A pull request that is still a **draft**, whose latest commit was pushed by a
|
|
35
|
+
coding run that stopped at its budget, is not reviewed automatically: the
|
|
36
|
+
check completes as `neutral` with the title "Skipped: stopped at its
|
|
37
|
+
budget". This is deliberate and is not the dispatch failure above: a draft
|
|
38
|
+
is not merged, and the review would only repeat findings the continuation
|
|
39
|
+
addresses. Marking the pull request ready for review or pushing a new
|
|
40
|
+
commit starts a normal review, and so does re-running the check or a
|
|
41
|
+
review mention. See
|
|
42
|
+
[Stopped for budget](coding-agent-setup.md#stopped-for-budget-the-work-so-far-is-kept).
|
|
34
43
|
- On a later review, the agent sees its own unresolved inline threads and
|
|
35
44
|
can **resolve the ones the new head fixes**, so fixed findings collapse on
|
|
36
45
|
the PR page. Only threads that agent started are resolved; people's
|
|
@@ -61,9 +70,30 @@ thread) right after the reaction. When the run ends, the App edits that
|
|
|
61
70
|
comment with the outcome:
|
|
62
71
|
|
|
63
72
|
- the pull requests the run's coding sub-runs opened or pushed to;
|
|
73
|
+
- ⛔ **Blocked by the package registry: no changes were made.** when coding
|
|
74
|
+
sub-runs recorded package refusals and no pull request or pushed changes
|
|
75
|
+
resulted. The comment lists up to ten distinct refusals, with reasons,
|
|
76
|
+
registry codes and fixes; use `get_run` for the full list. An approver updates
|
|
77
|
+
`codingProfile.packageAllowlist` or `codingProfile.packagePolicy` with
|
|
78
|
+
`update_agent` (needs `packages:approve` or `agents:admin`), then the
|
|
79
|
+
requester mentions `@wardby` again. See [Package policy](coding-packages.md)
|
|
80
|
+
and [Status comments help](../help/status-comments.md). Jira status comments
|
|
81
|
+
and Slack notifications use the same blocked guidance;
|
|
82
|
+
- a ⚠️ dependency install warning listing refusals when changes were pushed,
|
|
83
|
+
while keeping the pull request link. Without refusals, the usual ✅ / ❌
|
|
84
|
+
wording remains;
|
|
64
85
|
- the agent's final reply, quoted, when no pull request came out (for
|
|
65
86
|
example, a question back to the requester). `@`-mentions in the reply are
|
|
66
87
|
defused so nobody is pinged;
|
|
88
|
+
- when that reply is longer than about 2,000 characters, the comment says
|
|
89
|
+
"✅ Finished without opening a pull request. The full reply follows in the
|
|
90
|
+
next comment(s)." (in a review thread: "...follows in this pull request's
|
|
91
|
+
conversation."), and the reply follows in up to four numbered comments
|
|
92
|
+
("Reply, part i of n") of about 60,000 characters each, split at headings,
|
|
93
|
+
paragraphs or lines. Anything beyond four parts is cut with a note that the
|
|
94
|
+
full text is on the run (`get_run`, `finalText`); each part is posted once,
|
|
95
|
+
and if one cannot be posted the rest are skipped. Runs that opened a pull
|
|
96
|
+
request or had a failed sub-run keep the quoted excerpt;
|
|
67
97
|
- a failure when a coding sub-run it started did not succeed, even though
|
|
68
98
|
the mention agent itself finished (with the agent's reply quoted);
|
|
69
99
|
- that the request was **interrupted** and should be repeated, when the run
|
|
@@ -90,10 +120,78 @@ repository can trigger a run. wardby asks GitHub for the author's real
|
|
|
90
120
|
permission on the repository (by their numeric user id) before either path
|
|
91
121
|
runs; `read` and `triage` are not enough, because a mention drives an agent
|
|
92
122
|
that holds its owner's tools, secrets, and write access. GitHub's
|
|
93
|
-
`author_association`
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
123
|
+
`author_association` is only a first filter: it drops first-time authors
|
|
124
|
+
(`FIRST_TIME_CONTRIBUTOR`, `FIRST_TIMER`) and mannequins, and lets every
|
|
125
|
+
other association through to the permission check. That includes
|
|
126
|
+
`CONTRIBUTOR` and `NONE`, which GitHub reports for an organization member
|
|
127
|
+
whose membership is private. Mentions by bots, and mentions from anyone
|
|
128
|
+
without access to the repository, are ignored silently (no run, no reaction).
|
|
129
|
+
The server logs an info line for each one, naming the event, repository and
|
|
130
|
+
association, never the text.
|
|
131
|
+
|
|
132
|
+
Someone who holds a role on the repository but lacks write access can see it
|
|
133
|
+
but cannot start a run. Their mention gets a 😕 reaction and a one-line reply
|
|
134
|
+
saying a mention needs write access, so they know to ask someone who has it.
|
|
135
|
+
No run starts. That applies to anyone with `triage` access, and to anyone with
|
|
136
|
+
`read` access on a private repository, or whose `author_association` is
|
|
137
|
+
`OWNER`, `MEMBER` or `COLLABORATOR`. GitHub reports `read` for every account
|
|
138
|
+
on a public repository, so a stranger there (association `NONE`,
|
|
139
|
+
`CONTRIBUTOR` or unknown) is refused silently and learns nothing about the App.
|
|
140
|
+
|
|
141
|
+
A mention inside Markdown code is not a request. Text in an inline code span
|
|
142
|
+
(`` `@<app-slug>` ``), a fenced code block, or an indented code block is
|
|
143
|
+
skipped, so you can document the App's commands in an issue, pull request or
|
|
144
|
+
comment without starting a run. This applies to `@<app-slug> review` too.
|
|
145
|
+
|
|
146
|
+
When someone with write access mentions the App and nothing starts, the App
|
|
147
|
+
replies on the issue or pull request (in the review thread, if the mention was
|
|
148
|
+
in one) instead of leaving the mention unanswered. It says which of these applies, with no 👀
|
|
149
|
+
reaction:
|
|
150
|
+
|
|
151
|
+
- **No agent answers mentions on the repository** — no agent is linked with
|
|
152
|
+
the `mention` trigger. Link one (see [Linking an
|
|
153
|
+
agent](#linking-an-agent-to-a-repository)).
|
|
154
|
+
- **No reviewer is linked** — `@<app-slug> review` was used, but no agent is
|
|
155
|
+
linked with the `pull_request` trigger and a `checkName`.
|
|
156
|
+
- **The linked agent can no longer use the repository** — the agent owner's
|
|
157
|
+
GitHub account lost access, or its authorization lapsed. The owner
|
|
158
|
+
re-authorizes or re-links the agent.
|
|
159
|
+
- **The pull request is closed or comes from a fork** — wardby reviews only
|
|
160
|
+
open pull requests from branches of the repository.
|
|
161
|
+
|
|
162
|
+
The reply never names the App, so it cannot be read as a mention of itself.
|
|
163
|
+
|
|
164
|
+
The reply is a comment that anyone who can see the repository reads, so on a
|
|
165
|
+
public repository it shows what is (or isn't) linked there. To keep that to
|
|
166
|
+
yourself, set `WARDBY_MENTION_EXPLANATIONS=false` on the server: a mention that
|
|
167
|
+
starts nothing then gets no reply at all. The default is `true`.
|
|
168
|
+
|
|
169
|
+
If a mention from someone with write access gets no reaction or reply, check
|
|
170
|
+
the server log for `mention ignored` or `mention declined`. Older versions dropped `CONTRIBUTOR` and
|
|
171
|
+
`NONE` authors before the permission check. On those versions, make the
|
|
172
|
+
organization membership public or post the mention as a comment.
|
|
173
|
+
|
|
174
|
+
### Follow-ups on an issue
|
|
175
|
+
|
|
176
|
+
If a mention lands on a GitHub **issue** that already has an open pull request
|
|
177
|
+
wardby opened, the run message includes that pull request and the exact run id
|
|
178
|
+
to pass as `continuePriorRun`, so the agent pushes to the same branch instead
|
|
179
|
+
of opening a second pull request. This is the same behaviour, and the same
|
|
180
|
+
sentence, as [follow-ups on a Jira issue](jira-agents.md): GitHub and Jira
|
|
181
|
+
issues record the pull requests opened for them alike. The message lists up to
|
|
182
|
+
ten open pull requests recorded for the issue, each with its own run id. A
|
|
183
|
+
stopped-for-budget draft is continued this way too (see
|
|
184
|
+
[Stopped for budget](coding-agent-setup.md#stopped-for-budget-the-work-so-far-is-kept)).
|
|
185
|
+
A pull request opened from a mention on a GitHub issue starts its description
|
|
186
|
+
with `From issue #N` for that issue when the issue is in the same repository,
|
|
187
|
+
the same place a Jira issue's pull request has its `Resolves Jira issue …`
|
|
188
|
+
line; follow-ups keep the line. The line only links the issue: whether merging
|
|
189
|
+
closes it is up to the agent. Have the delivery or builder prompt end the
|
|
190
|
+
summary with `Resolves #N` to close the issue on merge, or `Refs #N` to leave
|
|
191
|
+
it open (for a plan, or one ticket of an epic). A follow-up keeps whichever
|
|
192
|
+
line the previous description had. The help article
|
|
193
|
+
[Run GitHub code-review agents](../help/code-review-agents.md#follow-ups-on-an-issue)
|
|
194
|
+
says the same in short.
|
|
97
195
|
|
|
98
196
|
### What the mention agent receives
|
|
99
197
|
|
|
@@ -188,6 +286,52 @@ PR description:
|
|
|
188
286
|
agent can reach only the tools and access you would give that outsider's
|
|
189
287
|
text.
|
|
190
288
|
|
|
289
|
+
## Follow-ups bring the pull request up to date
|
|
290
|
+
|
|
291
|
+
Every follow-up run on a pull request a wardby coding run opened (a mention on
|
|
292
|
+
the pull request, a delegated `continuePriorRun`, a review fix round) first
|
|
293
|
+
merges the branch the pull request **currently** targets into its branch:
|
|
294
|
+
|
|
295
|
+
- **The target is read from GitHub when the run starts**, so a pull request
|
|
296
|
+
retargeted since it opened (a stacked pull request whose parent merged, a
|
|
297
|
+
release branch) merges its new base. Retargeting does not make wardby treat
|
|
298
|
+
the pull request as closed.
|
|
299
|
+
- **The merge happens before the agent starts**, in trusted wardby code. The
|
|
300
|
+
target branch is fetched from the same repository with the App's access;
|
|
301
|
+
a fork is never fetched. A branch that already contains its target is left
|
|
302
|
+
exactly as it was, and the run behaves as it always has.
|
|
303
|
+
- **Conflicts are the agent's to resolve.** The conflicted files keep standard
|
|
304
|
+
conflict markers, and the agent's task lists them, says which side is the
|
|
305
|
+
pull request and which is the target, and asks it to resolve every conflict
|
|
306
|
+
keeping both sides' intent, fix the tests the combination broke, and run the
|
|
307
|
+
repository's checks. A conflicted file that still holds markers when the run
|
|
308
|
+
ends stops the push: the run fails with category `merge_conflict`
|
|
309
|
+
([help](../help/errors/merge-conflict.md)) and nothing is pushed. A
|
|
310
|
+
conflicted file with no markers (a binary file, or one deleted on one side
|
|
311
|
+
and changed on the other) holds one side's version, or the changed version,
|
|
312
|
+
and the agent is asked to check it.
|
|
313
|
+
- **The push is one merge commit authored by Wardby**, whose parents are the
|
|
314
|
+
head the run started from and the target. It is pushed even when the agent
|
|
315
|
+
changed nothing else, so "please update this PR" or "please fix the merge
|
|
316
|
+
conflicts" in a mention is enough. The run's status comment says what was
|
|
317
|
+
merged ("Merged `main` @ `1a2b3c4` into this branch; resolved conflicts in 2
|
|
318
|
+
files.").
|
|
319
|
+
- **Checks apply to the agent's own changes**, measured against the automatic
|
|
320
|
+
merge: the target branch's changes, including to protected paths, merge as
|
|
321
|
+
they are, while an agent edit to a protected path (resolving a conflict in
|
|
322
|
+
one, or reverting the target's change to one) is refused as usual, so a
|
|
323
|
+
conflict in a protected path has to be resolved by hand. The
|
|
324
|
+
changed-file and diff-size limits count only the agent's changes, so merging
|
|
325
|
+
a busy target branch does not exhaust them.
|
|
326
|
+
- **The push stays a fast-forward** of the head the run started from: a push
|
|
327
|
+
by anyone else in the meantime fails the run, with nothing pushed, as before.
|
|
328
|
+
- A target branch that cannot be fetched or shares no history with the pull
|
|
329
|
+
request fails the run before the agent starts, with category `target_merge`
|
|
330
|
+
([help](../help/errors/target-merge.md)).
|
|
331
|
+
|
|
332
|
+
The clone is shallow, so wardby deepens its history step by step until the
|
|
333
|
+
branch and its target share a commit, up to about 5,000 commits back.
|
|
334
|
+
|
|
191
335
|
## Automatic review fix rounds
|
|
192
336
|
|
|
193
337
|
Linking an agent with the `review_fix` trigger (`access: "write"`, at most
|
|
@@ -196,6 +340,10 @@ without waiting for a human to ask. `reviewFixMaxRounds` (an integer from 1
|
|
|
196
340
|
to 10, default 2) caps how many rounds a single pull request gets before
|
|
197
341
|
wardby stops; re-linking without it resets the cap back to the default.
|
|
198
342
|
|
|
343
|
+
No round follows a review that was skipped because the draft stopped at its
|
|
344
|
+
budget (neutral, "Skipped: stopped at its budget"); a round needs a
|
|
345
|
+
`CHANGES_REQUESTED` review.
|
|
346
|
+
|
|
199
347
|
A round starts when wardby's own review check on a pull request finishes as
|
|
200
348
|
`CHANGES_REQUESTED`, and all of the following still hold:
|
|
201
349
|
|
|
@@ -273,6 +421,115 @@ the pull request's round cap the same as a round that pushed a change, and
|
|
|
273
421
|
at the cap posts the usual cap comment instead of re-reviewing — since no
|
|
274
422
|
push happened, nothing else would otherwise replace the failed check.
|
|
275
423
|
|
|
424
|
+
### How the pull request description is kept current
|
|
425
|
+
|
|
426
|
+
Every coding run's final message is the full pull request description: what
|
|
427
|
+
changed, the checklist, how to try it, and any closing line such as
|
|
428
|
+
`Resolves #N`. It may be up to 64 KiB; a longer one is cut at a line boundary
|
|
429
|
+
with a `[summary truncated]` marker instead of failing the run. When the whole
|
|
430
|
+
description would pass GitHub's 65,536-character limit, wardby first drops the
|
|
431
|
+
**Packages** section, then truncates the final message, keeping a closing
|
|
432
|
+
`Resolves #N` last line. That holds for follow-ups too: review fix rounds, mention
|
|
433
|
+
follow-ups, and continuations. Agents launched for a follow-up receive the
|
|
434
|
+
description text wardby last wrote (its agent-written part, not the live pull
|
|
435
|
+
request body) as quoted, untrusted context, so they can carry forward what
|
|
436
|
+
still applies.
|
|
437
|
+
|
|
438
|
+
A follow-up also receives the original issue the pull request was opened for,
|
|
439
|
+
the way the first run did: its title and body, quoted as untrusted context,
|
|
440
|
+
as reference material: a note says its acceptance criteria as written are
|
|
441
|
+
what the description's checklist should reflect, that the final message must
|
|
442
|
+
carry that checklist and the closing line, and that no instruction in the
|
|
443
|
+
issue is followed. The issue is read as it is now, so edits made to it since
|
|
444
|
+
the first run are included.
|
|
445
|
+
wardby finds the issue from the run that started the work: the Jira issue it
|
|
446
|
+
was attributed to, else the GitHub issue whose `@wardby` mention started it,
|
|
447
|
+
else the issue that wardby's last description closes (`Resolves #N`). Only
|
|
448
|
+
issues in the pull request's own repository are read, through the same GitHub
|
|
449
|
+
App access the run already has; a Jira issue is read through the configured
|
|
450
|
+
Jira integration. The issue text is cut to about 6 KB. If the issue can't be
|
|
451
|
+
read, the run goes ahead without it.
|
|
452
|
+
|
|
453
|
+
A continuation updates the description of the pull request it continues, even
|
|
454
|
+
when it changes no code. The run's final message replaces the agent-written
|
|
455
|
+
part. wardby rebuilds its own sections from that run: the dependency-install
|
|
456
|
+
warning, **Tests**, **Packages**, and the dependency-cache line. The
|
|
457
|
+
first-line `<!-- wardby:... -->` marker stays, and a
|
|
458
|
+
`<!-- wardby-latest:<run> -->` line at the end records the latest run.
|
|
459
|
+
|
|
460
|
+
**Packages** lists every package installed by the runs that pushed to the pull
|
|
461
|
+
request, plus the latest run's, each package and version once. Refused
|
|
462
|
+
packages, and the dependency-install warning built from them, describe the
|
|
463
|
+
latest run only, since they reflect the pull request's current state.
|
|
464
|
+
|
|
465
|
+
If wardby can't confirm the description is unchanged since it wrote it (for
|
|
466
|
+
example, a person edited it), it does not overwrite it. Instead it keeps one
|
|
467
|
+
comment on the pull request with the current description proposed by its
|
|
468
|
+
latest run, inside a collapsed section. The comment names that run and the
|
|
469
|
+
commit it describes, says why it wasn't applied, and says the pull request
|
|
470
|
+
author can copy it into the description. Later runs edit the same comment
|
|
471
|
+
rather than adding new ones; if duplicates exist (for example, two runs
|
|
472
|
+
posting at once), wardby edits the newest and rewrites the others to point at
|
|
473
|
+
it. wardby only edits comments its own GitHub App wrote, never a person's or
|
|
474
|
+
another App's. On a run that pushes a commit, the comment is written before
|
|
475
|
+
the push, so it is already there when the push starts a review.
|
|
476
|
+
|
|
477
|
+
If the author copies the proposal into the description unchanged, the next
|
|
478
|
+
run sees that the description matches wardby's latest proposal, takes the
|
|
479
|
+
description back, writes it directly from then on, and updates the comment to
|
|
480
|
+
say no proposal is pending. The same happens when a later run can write the
|
|
481
|
+
description directly for any other reason.
|
|
482
|
+
|
|
483
|
+
The comment's first line records the head commit the proposal describes. A
|
|
484
|
+
review reads it when the reviewer reads the pull request (`repo_pr_read`'s
|
|
485
|
+
`descriptionProposal`), not when the review starts, and only uses it when it
|
|
486
|
+
was written for the head being reviewed. Then a description requirement
|
|
487
|
+
(closing line, acceptance checklist, how to try it, test results) is met if
|
|
488
|
+
either the live description or the proposal meets it. If the latest proposal
|
|
489
|
+
is for another commit, the reviewer is told no proposal for this head exists
|
|
490
|
+
yet and reviews the live description. The proposal reaches the reviewer as
|
|
491
|
+
untrusted data, cut to 16 KB.
|
|
492
|
+
|
|
493
|
+
Pull requests opened by an earlier wardby version have no record of what
|
|
494
|
+
wardby wrote. For those, wardby rebuilds the description its first run would
|
|
495
|
+
have written, from that run's stored final message, tests, packages,
|
|
496
|
+
dependency-cache line and issue link, and compares it with the live
|
|
497
|
+
description (ignoring the **Related pull requests** section, line endings and
|
|
498
|
+
blank lines). If they match, nobody edited it: wardby replaces it and records
|
|
499
|
+
it from then on. If anything differs, including any text a person added, or
|
|
500
|
+
the stored records can't rebuild it, the description counts as edited and gets
|
|
501
|
+
the comment.
|
|
502
|
+
|
|
503
|
+
If the final message is empty, very short (fewer than 80 non-whitespace
|
|
504
|
+
characters), or drops a
|
|
505
|
+
closing keyword (such as `Resolves #N`) that the previous description had,
|
|
506
|
+
wardby keeps the previous agent text and refreshes only its own sections.
|
|
507
|
+
|
|
508
|
+
A description update does not start a separate review: it stays one review per
|
|
509
|
+
pushed commit.
|
|
510
|
+
|
|
511
|
+
`get_run` shows the result as `prDescriptionOutcome`:
|
|
512
|
+
|
|
513
|
+
- `written`: the first description of a new pull request.
|
|
514
|
+
- `replaced`: a continuation replaced the agent-written part.
|
|
515
|
+
- `refreshed:<reason>`: the final message was invalid, so the previous agent
|
|
516
|
+
text was kept and only wardby's sections were refreshed. The reason is
|
|
517
|
+
`empty`, `too_short` (fewer than 80 non-whitespace characters), or
|
|
518
|
+
`missing_closing_keyword`.
|
|
519
|
+
- `unchanged`: nothing needed to change.
|
|
520
|
+
- `edited_by_hand`: wardby couldn't confirm the description is its own: a
|
|
521
|
+
person edited it, it no longer starts with wardby's marker, or (for pull
|
|
522
|
+
requests opened by an earlier version) it doesn't match the description
|
|
523
|
+
rebuilt from wardby's records. wardby posts or updates the proposal comment
|
|
524
|
+
when it can.
|
|
525
|
+
- `skipped:<reason>`: the description was not updated. The reason is
|
|
526
|
+
`not_open` (the pull request is not open or was not found), `too_long` (the
|
|
527
|
+
description is still over 65,536 characters after dropping **Packages** and
|
|
528
|
+
truncating the final message), or
|
|
529
|
+
`error` (any failure, including a failed update request, a failed load of
|
|
530
|
+
wardby's last-written text, a failed hash record or access re-check, or the
|
|
531
|
+
60-second timeout; the update may still have landed).
|
|
532
|
+
|
|
276
533
|
If a repository already forwards wardby's reviews to a webhook through a
|
|
277
534
|
hand-written CI workflow to fix them automatically, replace that workflow
|
|
278
535
|
with `review_fix`: link the trigger, then delete the workflow and its
|
|
@@ -394,26 +651,29 @@ with:
|
|
|
394
651
|
endpoint answers 404 until this is set.
|
|
395
652
|
- **Subscribe to events**: Pull request, Issue comment, Pull request review
|
|
396
653
|
comment, Check run, Check suite (re-runs a review that was waiting for CI
|
|
397
|
-
once CI finishes,
|
|
398
|
-
finishes
|
|
399
|
-
|
|
654
|
+
once CI finishes, starts a `waitForCi` reviewer's held review once CI
|
|
655
|
+
finishes, and lets [`markReadyWhenPassing`](#mark-ready-when-passing) mark a
|
|
656
|
+
draft ready once CI goes green; without it, those drafts stay drafts),
|
|
657
|
+
Issues (needed for mentions in a newly opened or edited issue; without it
|
|
658
|
+
only comment mentions are seen), and Push (needed
|
|
400
659
|
for the `push` trigger, which starts merge-watcher agents; it is its own
|
|
401
660
|
checkbox, separate from the others, and must be ticked explicitly).
|
|
402
661
|
- **Repository permissions**:
|
|
403
662
|
|
|
404
|
-
| Permission | Access
|
|
405
|
-
| --------------- |
|
|
406
|
-
| Contents | Read
|
|
407
|
-
| Pull requests | Read and write
|
|
408
|
-
| Checks | Read and write
|
|
409
|
-
| Issues | Read and write
|
|
410
|
-
| Commit statuses | Read (optional)
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
663
|
+
| Permission | Access |
|
|
664
|
+
| --------------- | -------------------------------------------------- |
|
|
665
|
+
| Contents | Read and write (Read for an App that only reviews) |
|
|
666
|
+
| Pull requests | Read and write |
|
|
667
|
+
| Checks | Read and write |
|
|
668
|
+
| Issues | Read and write |
|
|
669
|
+
| Commit statuses | Read (optional) |
|
|
670
|
+
|
|
671
|
+
**Contents: Read and write** is required for coding agents, which push a
|
|
672
|
+
branch for each pull request they open. An App used only for review agents
|
|
673
|
+
can have **Read**, except that review agents then can't resolve their own
|
|
674
|
+
fixed threads: GitHub gates resolving a review thread on **Contents: Read
|
|
675
|
+
and write**, although it changes no repository content. wardby asks for it
|
|
676
|
+
only for the resolve call itself.
|
|
417
677
|
|
|
418
678
|
**Issues: Read and write** is also what lets wardby add and remove the
|
|
419
679
|
`wardby-autofix-*` labels used by [automatic review fix
|
|
@@ -540,9 +800,9 @@ linking stays disabled there.
|
|
|
540
800
|
First link your GitHub account (`link_host_account`, above). Then use the
|
|
541
801
|
`link_repository` tool (agents:write) on a native agent you own. Calling it
|
|
542
802
|
again for an already-linked repository replaces that link's `access`,
|
|
543
|
-
`triggers`, `checkName`, `reviewFixMaxRounds`,
|
|
544
|
-
fields are cleared, not kept — and checks
|
|
545
|
-
the full desired state. Two common shapes:
|
|
803
|
+
`triggers`, `checkName`, `reviewFixMaxRounds`, `waitForCi`, and
|
|
804
|
+
`markReadyWhenPassing` — omitted fields are cleared, not kept — and checks
|
|
805
|
+
your access again, so always send the full desired state. Two common shapes:
|
|
546
806
|
|
|
547
807
|
**A reviewer**, which starts a check on every PR push:
|
|
548
808
|
|
|
@@ -670,6 +930,12 @@ yet.
|
|
|
670
930
|
again: the request that opened it has already finished. A push that
|
|
671
931
|
continues the pull request inside the same, still-running request is held
|
|
672
932
|
like the first one.
|
|
933
|
+
- From Wardby 0.7.0, a push to a pull request that is still a **draft** is
|
|
934
|
+
held while the coding run that pushed it may still be pushing (its result
|
|
935
|
+
is not recorded yet), so a run that stopped at its budget is never
|
|
936
|
+
reviewed mid-way. When that coding run was delegated by a lead that is
|
|
937
|
+
still running, as for a follow-up request, the review is held until that
|
|
938
|
+
lead finishes, the same as for the first request.
|
|
673
939
|
- As with the CI fallback below, a hold here does not depend on the
|
|
674
940
|
instance that started it still running when the lead run finishes:
|
|
675
941
|
Wardby's reconciliation sweep reconsiders every review held for at least
|
|
@@ -757,13 +1023,203 @@ Turning `waitForCi` off (re-linking without it, or with it set to `false`)
|
|
|
757
1023
|
only changes how future pushes are handled; it never retroactively starts or
|
|
758
1024
|
drops a review already being held.
|
|
759
1025
|
|
|
1026
|
+
### Large pull requests
|
|
1027
|
+
|
|
1028
|
+
From Wardby 0.7.0, `repo_pr_read` returns a large pull request's diff in pages.
|
|
1029
|
+
All changed files share one character budget per call (`maxPatchChars`,
|
|
1030
|
+
default 60,000, at most 200,000). Source, test and configuration files get it
|
|
1031
|
+
first. Everything else follows: the repository root's `docs/`, `doc/` and
|
|
1032
|
+
`help/` folders; lockfiles; anything under a `generated/`, `__generated__/`,
|
|
1033
|
+
`dist/`, `vendor/`, `fixtures/`, `__fixtures__/`, `__snapshots__/` or
|
|
1034
|
+
`testdata/` folder at any depth; minified `.min.js` and `.min.css` files; and
|
|
1035
|
+
documents and images (`.md`, `.mdx`, `.rst`, `.adoc`, `.txt`, `.snap`, `.svg`,
|
|
1036
|
+
`.png`, `.jpg`, `.jpeg`, `.gif`, `.webp`, `.ico`, `.pdf`, `.lock`).
|
|
1037
|
+
`requirements*.txt` and `CMakeLists.txt` count as code. A page that includes source, test or config files stops before the first doc, help, lockfile or generated file, so those come on later pages and a reviewer can skip them. Patches are split on line boundaries, and a file that does not fit on
|
|
1038
|
+
the page after other content moves to the next page. Each file has a
|
|
1039
|
+
`patchStatus`: `complete`, `partial`, `later_page`, `earlier_page`,
|
|
1040
|
+
`unavailable` (the host has no patch, for example a very large file; read it
|
|
1041
|
+
with `repo_read_file`) or `empty`. A `partial` file also reports
|
|
1042
|
+
`patchOffset`, where its part starts, and `patchContinues`, which is `true`
|
|
1043
|
+
when the next page carries more of the same file.
|
|
1044
|
+
|
|
1045
|
+
When `patchesComplete` is `false`, the result lists `truncatedFiles`, gives
|
|
1046
|
+
`nextPatchCursor`, and estimates the files still to come in
|
|
1047
|
+
`remainingPatchFiles`. Call `repo_pr_read` again with the same arguments plus
|
|
1048
|
+
`patchCursor` to get the next page. Because code is filled first, a reviewer
|
|
1049
|
+
only has to page while a source, test or config file is still in
|
|
1050
|
+
`truncatedFiles`: the pages after that hold documentation, lockfiles and
|
|
1051
|
+
generated files, which the `unread_files` refusal never requires, so the
|
|
1052
|
+
reviewer can skim or skip them and spend less of its budget. A file the host found `unavailable` stays
|
|
1053
|
+
reported as such on later pages, and `patchesComplete` stays `false`. A cursor
|
|
1054
|
+
only works for the head and compare it was issued for: after a new push,
|
|
1055
|
+
`patch_cursor_stale` says to call again without it, and a damaged or oversized
|
|
1056
|
+
cursor returns `patch_cursor_malformed` (see
|
|
1057
|
+
[Patch cursor is malformed](../help/errors/patch-cursor-malformed.md)).
|
|
1058
|
+
|
|
1059
|
+
`repo_publish_review` refuses `APPROVE` with
|
|
1060
|
+
`unread_files` while a source, test or config file of that head that
|
|
1061
|
+
`repo_pr_read` listed in the run is neither fully delivered nor read with
|
|
1062
|
+
`repo_read_file` at the head (one read of the path at the head counts).
|
|
1063
|
+
Every file any `repo_pr_read` of the head listed in the run stays gated: a
|
|
1064
|
+
later read with `sinceSha` lists fewer files but never takes any off.
|
|
1065
|
+
Removed files, documentation, lockfiles, generated files and fixtures are not
|
|
1066
|
+
gated, `CHANGES_REQUESTED` and `COMMENT` are always allowed, and the refusal
|
|
1067
|
+
changes nothing, so the agent can read the files and publish again. A file read in parts counts only
|
|
1068
|
+
when its parts join up from the start of its patch to its last part. The guard
|
|
1069
|
+
is per run attempt: a head is gated only when the attempt itself read its first
|
|
1070
|
+
page (a `repo_pr_read` without `patchCursor`), so an attempt resumed after a
|
|
1071
|
+
restart is not refused for pages an earlier attempt read. A reviewer that
|
|
1072
|
+
cannot read everything should publish `CHANGES_REQUESTED` and list the files it
|
|
1073
|
+
did not review. Not `COMMENT`: it completes the check as neutral, which GitHub
|
|
1074
|
+
branch protection treats as passing, so an unfinished review would let the pull
|
|
1075
|
+
request merge.
|
|
1076
|
+
|
|
1077
|
+
The `unread_files` refusal applies in both execution modes. In `sandbox` mode
|
|
1078
|
+
(see [Native agent sandbox](native-sandbox.md)) the gateway saves what the run
|
|
1079
|
+
has read on its session after each `repo_pr_read` and `repo_read_file` call, so
|
|
1080
|
+
`repo_publish_review` checks the same reads as in `control-plane` mode.
|
|
1081
|
+
Reviewer prompts written before 0.7.0 still work, because the refusal tells
|
|
1082
|
+
the agent what to do; update them with the paging step from the shipped
|
|
1083
|
+
reviewer prompt.
|
|
1084
|
+
|
|
1085
|
+
The file list itself has an upper bound: `repo_pr_read` lists at most 1,000
|
|
1086
|
+
changed files of a pull request, on GitHub and on a local repository alike,
|
|
1087
|
+
and on GitHub a `sinceSha` compare lists at most 300 (GitHub's own compare
|
|
1088
|
+
limit). When the pull request has more changed files than that, the result
|
|
1089
|
+
has `fileListComplete: false` and the files past the cut are not shown. Once
|
|
1090
|
+
a `repo_pr_read` of a head in the run is cut, `repo_publish_review` refuses
|
|
1091
|
+
`APPROVE` of that head with `file_list_truncated`, even when every listed file
|
|
1092
|
+
was read: an approval would cover files the agent never saw.
|
|
1093
|
+
`CHANGES_REQUESTED` and `COMMENT` still publish. Only a complete read of the
|
|
1094
|
+
whole pull request (without `sinceSha`) in the same run lifts the refusal, so
|
|
1095
|
+
an agent that passed `sinceSha` can call `repo_pr_read` again without it; a
|
|
1096
|
+
complete `sinceSha` read does not. A later run cannot approve the head through a
|
|
1097
|
+
`sinceSha` delta either, because a review whose list was cut never becomes a
|
|
1098
|
+
covered head (below). Otherwise `repo_publish_review` refuses the agent's
|
|
1099
|
+
`APPROVE` of that pull request: split it, or have a person review it. See
|
|
1100
|
+
[`file_list_truncated`](../help/errors/file-list-truncated.md).
|
|
1101
|
+
|
|
1102
|
+
`sinceSha` accepts any earlier commit of the branch, so a read with it only
|
|
1103
|
+
narrows the review to the changes since that commit. `repo_pr_read` therefore
|
|
1104
|
+
also returns `lastCoveredSha`: the latest head this agent reviewed after
|
|
1105
|
+
reading every file, whatever the verdict. A review counts as covering its head
|
|
1106
|
+
when, in that run, no file list of the head was left cut, every source, test
|
|
1107
|
+
and config file it listed was read, and the run either read the whole pull
|
|
1108
|
+
request (no `sinceSha`) or compared only from the `lastCoveredSha` its reads
|
|
1109
|
+
returned. A review that does not cover its head keeps the earlier covered head.
|
|
1110
|
+
On GitHub the covered head is kept in the agent's summary comment marker (a
|
|
1111
|
+
summary comment written by a version before 0.7.0 has none, so the next review
|
|
1112
|
+
reads the whole pull request); on a local repository it is kept with each
|
|
1113
|
+
review. Only a marker at the very start of the App's own summary comment
|
|
1114
|
+
counts. In text an agent or a run supplies and the App posts (`repo_comment`,
|
|
1115
|
+
the summary, body and inline comments of `repo_publish_review`, and a mention
|
|
1116
|
+
run's status and reply), wardby escapes `<!--` as `<!--` wherever it comes
|
|
1117
|
+
right before a wardby marker name, so such text shows as plain text and can
|
|
1118
|
+
never form a wardby marker. Any other HTML comment, such as one in a code
|
|
1119
|
+
block or a one-click suggestion, is posted as written. Text is escaped before
|
|
1120
|
+
its length limit is checked, and wardby adds its own markers after that. The coding-run status comment and the description comment are
|
|
1121
|
+
written by wardby and start with wardby's own marker. So an agent cannot be
|
|
1122
|
+
talked into vouching for a head it never read.
|
|
1123
|
+
|
|
1124
|
+
`repo_publish_review` refuses `APPROVE` with `full_read_required` while the
|
|
1125
|
+
run has no `repo_pr_read` of the head without `sinceSha` and one of its reads
|
|
1126
|
+
compared from a commit other than the `lastCoveredSha` that read returned. A
|
|
1127
|
+
commit named in the pull request's own text, or `lastReviewedSha` when it
|
|
1128
|
+
differs from `lastCoveredSha`, is not a safe base. The agent reads the whole
|
|
1129
|
+
pull request (no `sinceSha`) or passes `lastCoveredSha`; the shipped reviewer
|
|
1130
|
+
prompt does this. See
|
|
1131
|
+
[`full_read_required`](../help/errors/full-read-required.md).
|
|
1132
|
+
|
|
1133
|
+
Reviewer prompts written before 0.7.0 pass `lastReviewedSha` as `sinceSha`.
|
|
1134
|
+
They still work, because the refusal tells the agent to read the whole pull
|
|
1135
|
+
request, but update their re-review step from the shipped reviewer prompt to
|
|
1136
|
+
avoid the extra read. Owners of agents whose prompt is stored with the agent
|
|
1137
|
+
update it with `update_agent`.
|
|
1138
|
+
|
|
1139
|
+
### Mark ready when passing (`markReadyWhenPassing`)
|
|
1140
|
+
|
|
1141
|
+
With Wardby 0.7.0 or later, `markReadyWhenPassing` (boolean, default
|
|
1142
|
+
`false`, only on a write link — 400 on a read link) has wardby mark its own
|
|
1143
|
+
draft pull requests ready for review once they pass, instead of leaving
|
|
1144
|
+
that to a person. Set it with `link_repository` on the write link of the
|
|
1145
|
+
agent that the repository event triggers: a builder that opens the pull
|
|
1146
|
+
request itself, or — for a lead that delegates to a coding builder sub-agent
|
|
1147
|
+
— the lead's link. The coding builder needs no repository link of its own
|
|
1148
|
+
(coding agents can't have one). The setting counts for a pull request
|
|
1149
|
+
opened by that agent's own coding run or by a coding run anywhere below it
|
|
1150
|
+
in its run tree (up to 10 delegation levels); an opted-in agent that is not the
|
|
1151
|
+
opener or one of its ancestors in the run tree never counts. Re-linking that
|
|
1152
|
+
repository without it clears it, like every other link setting (see
|
|
1153
|
+
above); `list_repositories` shows its current value.
|
|
1154
|
+
|
|
1155
|
+
Wardby marks a pull request ready for review once all of these hold, read
|
|
1156
|
+
fresh from GitHub on its current head:
|
|
1157
|
+
|
|
1158
|
+
- the pull request is open and a draft;
|
|
1159
|
+
- Wardby's own GitHub App opened it, and its head is not in a fork;
|
|
1160
|
+
- the agent whose coding run opened it, or an agent that delegated to it
|
|
1161
|
+
(directly or through other sub-agents), has `markReadyWhenPassing` set
|
|
1162
|
+
on an authorized write link to this repository;
|
|
1163
|
+
- at least one authorized reviewer link with the `pull_request` trigger
|
|
1164
|
+
exists on the repository, and every one of those reviewers' own checks on
|
|
1165
|
+
the head completed with conclusion `success`;
|
|
1166
|
+
- CI is green: every check run and commit status on the head that is not
|
|
1167
|
+
one of Wardby's own checks has completed with `success`, `neutral`, or
|
|
1168
|
+
`skipped`, with at least one `success` — or the repository reports no CI
|
|
1169
|
+
at all. All-neutral or all-skipped CI counts as inconclusive and waits. A
|
|
1170
|
+
pull request with more checks and statuses than Wardby reads (about 50) is
|
|
1171
|
+
truncated and never marked ready automatically. CI still pending, failing,
|
|
1172
|
+
truncated, or unreadable leaves the pull request in draft; see the
|
|
1173
|
+
re-evaluation triggers below for when Wardby checks again.
|
|
1174
|
+
- the `wardby merge order` check (see [The wardby merge order
|
|
1175
|
+
check](../help/merge-order-check.md)) is `success`, or is not posted on
|
|
1176
|
+
this pull request at all.
|
|
1177
|
+
|
|
1178
|
+
A commit status only counts toward CI being green if the App can read it:
|
|
1179
|
+
grant **Commit statuses: Read** (see [Registering the GitHub
|
|
1180
|
+
App](#registering-the-github-app) above) if your CI reports commit statuses
|
|
1181
|
+
rather than check runs; without it, wardby judges CI from check runs alone.
|
|
1182
|
+
|
|
1183
|
+
Wardby marks a given pull request ready at most once. If a person moves it
|
|
1184
|
+
back to draft afterward, wardby leaves it there — it never re-marks a pull
|
|
1185
|
+
request once it has done so.
|
|
1186
|
+
|
|
1187
|
+
Wardby re-checks whether a pull request is ready to mark on any of these
|
|
1188
|
+
events:
|
|
1189
|
+
|
|
1190
|
+
- a reviewer run finishing;
|
|
1191
|
+
- a CI check suite completing on its head;
|
|
1192
|
+
- its `wardby merge order` check turning `success` — for example, right
|
|
1193
|
+
after an earlier step in its set merges;
|
|
1194
|
+
- and, as a fallback for any of the above missed, wardby's own merge-order
|
|
1195
|
+
reconciliation sweep, for a pull request that is part of a merge-ordered
|
|
1196
|
+
set (see [The reconciliation sweep](../help/merge-order-check.md#the-reconciliation-sweep)).
|
|
1197
|
+
|
|
1198
|
+
CI that reports only commit statuses (no check suite) is not re-checked when
|
|
1199
|
+
it finishes — GitHub does not raise a check-suite event for a status-only
|
|
1200
|
+
commit. Such a pull request is marked ready the next time one of the events
|
|
1201
|
+
above fires, or stays in draft until then.
|
|
1202
|
+
|
|
1203
|
+
With a merge-ordered set of delegated pull requests (see [Fanning out to
|
|
1204
|
+
several builders](agent-recipes.md#fanning-out-to-several-builders)), a
|
|
1205
|
+
later step only becomes ready for review once the steps it depends on have
|
|
1206
|
+
merged — it stays a draft until the `wardby merge order` check on it reports
|
|
1207
|
+
`success`.
|
|
1208
|
+
|
|
1209
|
+
`markReadyWhenPassing` never approves, merges, or converts a pull request
|
|
1210
|
+
back to draft — a person's own approval stays the gate wherever branch
|
|
1211
|
+
protection requires one. It needs the App's **Pull requests: Read and
|
|
1212
|
+
write** permission, which an App that opens pull requests already has (see
|
|
1213
|
+
[Registering the GitHub App](#registering-the-github-app) above).
|
|
1214
|
+
|
|
760
1215
|
## The `repo_*` tools
|
|
761
1216
|
|
|
762
1217
|
A linked agent gets these built-in tools automatically — they are not
|
|
763
1218
|
attached like ordinary tools, and never expose a token, check id, or
|
|
764
1219
|
internal marker to the model:
|
|
765
1220
|
|
|
766
|
-
- `repo_pr_read` — a pull request's metadata, per-file diff patches
|
|
1221
|
+
- `repo_pr_read` — a pull request's metadata, per-file diff patches (paged; see
|
|
1222
|
+
[Large pull requests](#large-pull-requests)), the
|
|
767
1223
|
agent's own unresolved inline threads (`openThreads`), and `ci`: the head
|
|
768
1224
|
commit's check runs and commit statuses, excluding every check the wardby
|
|
769
1225
|
App itself reported (review checks, `wardby/continuation`), with `state`
|
|
@@ -787,6 +1243,13 @@ internal marker to the model:
|
|
|
787
1243
|
live state. The list of pull requests is current; the PR body's **Related
|
|
788
1244
|
pull requests** section can be stale (see
|
|
789
1245
|
[Related pull requests across repositories](../help/related-pull-requests.md)).
|
|
1246
|
+
On a Wardby pull request whose description Wardby couldn't confirm as its
|
|
1247
|
+
own text, it also returns `descriptionProposal`: `state: "current"` with
|
|
1248
|
+
`forHead`, `runId`, `text` (Wardby's latest proposed description for this
|
|
1249
|
+
head, cut to 16 KB, `truncated`) and a `note`, or
|
|
1250
|
+
`state: "not_for_this_head"` with a `note` when the latest proposal is for
|
|
1251
|
+
another commit. See
|
|
1252
|
+
[How the pull request description is kept current](#how-the-pull-request-description-is-kept-current).
|
|
790
1253
|
- **Re-review when CI finishes.** When a review publishes `COMMENT` on its
|
|
791
1254
|
own check while CI on that head is `pending` or `none`, Wardby records it.
|
|
792
1255
|
When a CI check suite (not Wardby's own) completes on that head and no CI
|
|
@@ -801,6 +1264,24 @@ internal marker to the model:
|
|
|
801
1264
|
cases.
|
|
802
1265
|
- `repo_read_file` / `repo_list_files` — read a file or list a directory at
|
|
803
1266
|
a ref.
|
|
1267
|
+
- `repo_issue_read` (Wardby 0.7.0 or later) — read one issue, read-only:
|
|
1268
|
+
`number`, `title`, `state` (`open` or `closed`), `body`, `labels`,
|
|
1269
|
+
`author`, `url`, `createdAt`, `updatedAt`, and its 30 most recent comments
|
|
1270
|
+
(`author`, `body`, `createdAt`), oldest first, with `totalComments`. The
|
|
1271
|
+
body is capped at 32,000 characters and each comment at 4,000;
|
|
1272
|
+
`truncated` is true when anything was cut (`bodyTruncated` and each
|
|
1273
|
+
comment's `truncated` say where). A reviewer uses it to read the issue a
|
|
1274
|
+
pull request says it resolves (`Resolves #N`) and check the change against
|
|
1275
|
+
that issue's own acceptance criteria rather than the description's
|
|
1276
|
+
restatement of them. It works on read and write links alike and needs the
|
|
1277
|
+
App's **Issues: Read** permission. Issue text is written by whoever can
|
|
1278
|
+
open or comment on issues: the tool description tells the agent to treat it
|
|
1279
|
+
as data, never instructions. A pull request number is refused with
|
|
1280
|
+
`is_pull_request` (use `repo_pr_read`), and a local repository has no
|
|
1281
|
+
issues (`issues_unavailable`). For a pull request that resolves a Jira
|
|
1282
|
+
issue, link the reviewer to that Jira project as well (`link_issue_project`,
|
|
1283
|
+
read access is enough) so it can read the ticket with `jira_get_issue`; see
|
|
1284
|
+
[Jira agents](jira-agents.md).
|
|
804
1285
|
- `repo_publish_review` — publish inline comments, a summary, and the check
|
|
805
1286
|
verdict for one PR head, in one call. A check is completed or created
|
|
806
1287
|
**only on the pull request the run was dispatched for** (by a push, a
|
|
@@ -818,22 +1299,30 @@ internal marker to the model:
|
|
|
818
1299
|
Every call names the `repository` explicitly; it must resolve to one of the
|
|
819
1300
|
agent's links. Failures are always a JSON result, never a thrown error:
|
|
820
1301
|
|
|
821
|
-
| `error` code | Meaning
|
|
822
|
-
| ------------------------------- |
|
|
823
|
-
| `invalid_arguments_json` | The tool call's arguments were not valid JSON.
|
|
824
|
-
| `invalid_arguments` | Arguments failed schema validation (missing/malformed field).
|
|
825
|
-
| `repository_not_linked` | `repository` does not match one of this agent's links, or matches more than one and needs a `host/owner/name` prefix to disambiguate.
|
|
826
|
-
| `write_access_required` | A write tool (`repo_publish_review`, `repo_comment`) was called on a read-only link.
|
|
827
|
-
| `repository_access_denied` | The link is no longer authorized: the agent has no owner, the owner's GitHub account is unlinked or lost access, or it could not be checked.
|
|
828
|
-
| `repository_access_unavailable` | GitHub could not be reached (or rate-limited wardby) while re-checking access, even after one retry; the call was refused for safety. Try again later.
|
|
829
|
-
| `host_not_configured` | No host provider is configured for this link on this deployment.
|
|
830
|
-
| `unknown_tool` | Not a recognized `repo_*` tool name.
|
|
831
|
-
| `
|
|
832
|
-
| `
|
|
833
|
-
| `
|
|
834
|
-
| `
|
|
835
|
-
| `
|
|
836
|
-
| `
|
|
1302
|
+
| `error` code | Meaning |
|
|
1303
|
+
| ------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
1304
|
+
| `invalid_arguments_json` | The tool call's arguments were not valid JSON. |
|
|
1305
|
+
| `invalid_arguments` | Arguments failed schema validation (missing/malformed field). |
|
|
1306
|
+
| `repository_not_linked` | `repository` does not match one of this agent's links, or matches more than one and needs a `host/owner/name` prefix to disambiguate. |
|
|
1307
|
+
| `write_access_required` | A write tool (`repo_publish_review`, `repo_comment`) was called on a read-only link. |
|
|
1308
|
+
| `repository_access_denied` | The link is no longer authorized: the agent has no owner, the owner's GitHub account is unlinked or lost access, or it could not be checked. |
|
|
1309
|
+
| `repository_access_unavailable` | GitHub could not be reached (or rate-limited wardby) while re-checking access, even after one retry; the call was refused for safety. Try again later. |
|
|
1310
|
+
| `host_not_configured` | No host provider is configured for this link on this deployment. |
|
|
1311
|
+
| `unknown_tool` | Not a recognized `repo_*` tool name. |
|
|
1312
|
+
| `issue_not_found` | `repo_issue_read`: no issue with that number in the repository (or the repository has issues turned off). |
|
|
1313
|
+
| `is_pull_request` | `repo_issue_read`: the number is a pull request; read it with `repo_pr_read`. |
|
|
1314
|
+
| `issues_unavailable` | `repo_issue_read` on a local repository, which has no issues. |
|
|
1315
|
+
| `host_not_installed` | The GitHub App is not installed on this repository. |
|
|
1316
|
+
| `host_permission_missing` | The App installation is missing a required permission. |
|
|
1317
|
+
| `host_invalid_response` | The host returned something the client could not parse. |
|
|
1318
|
+
| `host_api_error` | The request to GitHub failed (body-free: `github_api_error:<status>[:<request-id>]`). |
|
|
1319
|
+
| `ci_failing` | `repo_publish_review` called with verdict `APPROVE`, on a `waitForCi` link's own check, while CI on the head is failing. See [Review after CI](#review-after-ci-waitforci) above. |
|
|
1320
|
+
| `ci_pending` | Same, but CI on the head is still running. |
|
|
1321
|
+
| `patch_cursor_stale` | `repo_pr_read` with a `patchCursor` issued for another head or compare (the pull request moved on). Call again without `patchCursor`. |
|
|
1322
|
+
| `patch_cursor_malformed` | `repo_pr_read` with a `patchCursor` it never issued (damaged, edited or over-long). Pass `nextPatchCursor` exactly as returned. |
|
|
1323
|
+
| `unread_files` | `repo_publish_review` with `APPROVE` while a source, test or config file of the head was listed by `repo_pr_read` but never fully read (all pages via `patchCursor`, or `repo_read_file` at `headSha`). Read the files, or publish `CHANGES_REQUESTED` naming the files not reviewed. |
|
|
1324
|
+
| `full_read_required` | `repo_publish_review` with `APPROVE` when the run read the head only with a `sinceSha` other than the `lastCoveredSha` that read returned. Call `repo_pr_read` without `sinceSha` (or with `lastCoveredSha`), or publish `CHANGES_REQUESTED`. See [Large pull requests](#large-pull-requests). |
|
|
1325
|
+
| `file_list_truncated` | `repo_publish_review` with `APPROVE` after a `repo_pr_read` of the head in the run had `fileListComplete: false` (more changed files than the host lists) and no complete read without `sinceSha` followed. Call `repo_pr_read` without `sinceSha` if it was passed; otherwise publish `CHANGES_REQUESTED` or `COMMENT`. See [Large pull requests](#large-pull-requests). |
|
|
837
1326
|
|
|
838
1327
|
`repo_publish_review` also returns
|
|
839
1328
|
`{ "published": false, "reason": "stale_head", ... }` instead of an error when
|
|
@@ -861,6 +1350,23 @@ step.
|
|
|
861
1350
|
Check names and the description are repository content: treat them as data,
|
|
862
1351
|
as for every `repo_*` result.
|
|
863
1352
|
|
|
1353
|
+
### Reviewer step: package audit mode
|
|
1354
|
+
|
|
1355
|
+
From Wardby 0.7.0, a pull request whose coding run had
|
|
1356
|
+
[package audit mode](coding-packages.md#package-audit-mode) on opens with a
|
|
1357
|
+
`[!CAUTION]` banner. **Packages outside the allowlist** names what the
|
|
1358
|
+
registry installed that the agent's allowlist doesn't cover, and in `full`
|
|
1359
|
+
mode **Served despite advisories** lists versions with high or critical
|
|
1360
|
+
advisories. Wardby writes both from the registry's records, not from the
|
|
1361
|
+
agent. Add this to a reviewer's system prompt:
|
|
1362
|
+
|
|
1363
|
+
Reviewer step (package audit mode). If the description has a "Package
|
|
1364
|
+
audit mode" caution banner, check every package under "Packages outside
|
|
1365
|
+
the allowlist" (is it the package the change needs, spelled as its
|
|
1366
|
+
upstream publishes it, and is it used?) and every row under "Served
|
|
1367
|
+
despite advisories" (is the vulnerable code reachable?). Name any you
|
|
1368
|
+
can't justify in your review.
|
|
1369
|
+
|
|
864
1370
|
## Branch protection
|
|
865
1371
|
|
|
866
1372
|
To require a passing review before merge, add the link's `checkName` (e.g.
|
|
@@ -883,7 +1389,11 @@ of any reviewer link, tracking whether the pull requests it depends on have
|
|
|
883
1389
|
merged yet. Require it the same way — add `wardby merge order` as a
|
|
884
1390
|
required status check, with its expected source set to the wardby GitHub
|
|
885
1391
|
App — to block a merge until they have. See
|
|
886
|
-
[The wardby merge order check](../help/merge-order-check.md).
|
|
1392
|
+
[The wardby merge order check](../help/merge-order-check.md). With Wardby
|
|
1393
|
+
0.7.0 or later, a builder opted into [Mark ready when passing
|
|
1394
|
+
(`markReadyWhenPassing`)](#mark-ready-when-passing-markreadywhenpassing)
|
|
1395
|
+
relies on this same check: a later step in the set is only marked ready for
|
|
1396
|
+
review once it reports `success`.
|
|
887
1397
|
|
|
888
1398
|
## Accepted gap: a run that fails outside its normal finish path leaves its check open
|
|
889
1399
|
|