@wardby/cli 0.6.0 → 0.8.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/.env.example +5 -5
- package/README.md +6 -1
- package/deploy/local/docker-compose.quickstart-coding.yml +19 -0
- package/dist/claude-coding-worker/driver.d.ts +33 -3
- package/dist/claude-coding-worker/driver.js +151 -21
- package/dist/claude-coding-worker/main.js +38 -6
- package/dist/claude-coding-worker/sdk.js +29 -2
- 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/claude-plugin/command.d.ts +61 -0
- package/dist/claude-plugin/command.js +376 -0
- package/dist/cli-help.d.ts +1 -1
- package/dist/cli-help.js +3 -1
- package/dist/cli.js +71 -13
- package/dist/coding/code-host.d.ts +16 -0
- package/dist/coding/code-host.js +60 -0
- 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/mcp-token.d.ts +12 -0
- package/dist/coding/mcp-token.js +26 -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 +237 -12
- package/dist/coding/redact.d.ts +3 -0
- package/dist/coding/redact.js +17 -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 +52 -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 +9 -6
- package/dist/coding-worker/debug-trace.js +16 -19
- 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 +124 -39
- package/dist/coding-worker/errors.d.ts +1 -0
- package/dist/coding-worker/errors.js +32 -0
- package/dist/coding-worker/main.js +5 -1
- package/dist/coding-worker/mcp-config.d.ts +27 -0
- package/dist/coding-worker/mcp-config.js +32 -0
- package/dist/coding-worker/sdk.d.ts +36 -0
- package/dist/coding-worker/sdk.js +28 -1
- 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 +15 -0
- package/dist/config/dependency-cache.d.ts +23 -0
- package/dist/config/dependency-cache.js +32 -0
- package/dist/config/mcp-call-limit.d.ts +8 -0
- package/dist/config/mcp-call-limit.js +18 -0
- package/dist/config/mcp-servers.d.ts +8 -0
- package/dist/config/mcp-servers.js +12 -0
- package/dist/config/providers.d.ts +12 -3
- package/dist/config/providers.js +55 -5
- package/dist/config/test-simulators.d.ts +92 -0
- package/dist/config/test-simulators.js +333 -0
- package/dist/config/tool-timeout.d.ts +1 -0
- package/dist/config/tool-timeout.js +18 -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-mcp.d.ts +36 -0
- package/dist/core/coding-mcp.js +253 -0
- package/dist/core/coding-queue.d.ts +2 -1
- package/dist/core/coding-queue.js +7 -0
- package/dist/core/coding-repository.d.ts +46 -0
- package/dist/core/coding-repository.js +92 -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/delegation-slots.d.ts +27 -0
- package/dist/core/delegation-slots.js +44 -0
- package/dist/core/dispatch.d.ts +48 -2
- package/dist/core/dispatch.js +166 -66
- package/dist/core/engine-native.js +1 -1
- package/dist/core/error-code.d.ts +38 -0
- package/dist/core/error-code.js +169 -0
- package/dist/core/grants.d.ts +46 -8
- package/dist/core/grants.js +99 -8
- package/dist/core/host-events.d.ts +18 -2
- package/dist/core/host-events.js +291 -27
- package/dist/core/host-status.d.ts +85 -3
- package/dist/core/host-status.js +300 -22
- 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 +58 -29
- 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/mcp-client/client.d.ts +47 -0
- package/dist/core/mcp-client/client.js +141 -0
- package/dist/core/mcp-client/jsonrpc.d.ts +15 -0
- package/dist/core/mcp-client/jsonrpc.js +54 -0
- package/dist/core/mcp-client/results.d.ts +13 -0
- package/dist/core/mcp-client/results.js +42 -0
- package/dist/core/mcp-servers.d.ts +90 -0
- package/dist/core/mcp-servers.js +230 -0
- package/dist/core/mcp-tools.d.ts +108 -0
- package/dist/core/mcp-tools.js +287 -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 +44 -18
- package/dist/core/notification-dispatcher.js +2 -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 +49 -20
- 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 +4 -3
- 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 +102 -14
- 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 +145 -49
- package/dist/core/runner.js +719 -216
- 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 +12 -74
- package/dist/core/secret-broker-config.js +1 -1
- package/dist/core/secret-guard.d.ts +49 -0
- package/dist/core/secret-guard.js +119 -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/secrets.d.ts +11 -1
- package/dist/core/secrets.js +27 -1
- package/dist/core/serializable-retry.d.ts +18 -0
- package/dist/core/serializable-retry.js +43 -0
- package/dist/core/stop-run.d.ts +46 -0
- package/dist/core/stop-run.js +61 -0
- package/dist/core/tool-admin.d.ts +5 -1
- package/dist/core/tool-admin.js +7 -2
- package/dist/core/tool-names.d.ts +13 -0
- package/dist/core/tool-names.js +20 -0
- package/dist/core/webhooks.d.ts +4 -0
- package/dist/core/webhooks.js +68 -49
- 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 +45 -9
- 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 +65 -3
- package/dist/generated/prisma/client.d.ts +65 -3
- package/dist/generated/prisma/commonInputTypes.d.ts +266 -106
- 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 +110 -0
- package/dist/generated/prisma/internal/class.js +4 -4
- package/dist/generated/prisma/internal/prismaNamespace.d.ts +957 -9
- package/dist/generated/prisma/internal/prismaNamespace.js +166 -2
- package/dist/generated/prisma/internal/prismaNamespaceBrowser.d.ts +174 -0
- package/dist/generated/prisma/internal/prismaNamespaceBrowser.js +166 -2
- package/dist/generated/prisma/models/Agent.d.ts +377 -8
- package/dist/generated/prisma/models/AgentMcpServer.d.ts +1412 -0
- package/dist/generated/prisma/models/AgentMcpServer.js +1 -0
- package/dist/generated/prisma/models/AgentRepository.d.ts +81 -1
- package/dist/generated/prisma/models/AuthUser.d.ts +1 -1
- package/dist/generated/prisma/models/CodingAgentProfile.d.ts +228 -7
- package/dist/generated/prisma/models/CodingProxyRequest.d.ts +207 -3
- package/dist/generated/prisma/models/CodingProxySession.d.ts +232 -2
- package/dist/generated/prisma/models/CodingRun.d.ts +1712 -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/HostProvider.d.ts +2176 -0
- package/dist/generated/prisma/models/HostProvider.js +1 -0
- package/dist/generated/prisma/models/HostProviderCredential.d.ts +1285 -0
- package/dist/generated/prisma/models/HostProviderCredential.js +1 -0
- package/dist/generated/prisma/models/HostProviderOperation.d.ts +1470 -0
- package/dist/generated/prisma/models/HostProviderOperation.js +1 -0
- package/dist/generated/prisma/models/HostProviderTrustedAccount.d.ts +1145 -0
- package/dist/generated/prisma/models/HostProviderTrustedAccount.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/McpServer.d.ts +1500 -0
- package/dist/generated/prisma/models/McpServer.js +1 -0
- package/dist/generated/prisma/models/NativeGatewayCall.d.ts +77 -1
- package/dist/generated/prisma/models/NativeGatewaySession.d.ts +35 -1
- package/dist/generated/prisma/models/Principal.d.ts +167 -0
- 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/ResourceGrant.d.ts +1 -1
- 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/Secret.d.ts +387 -0
- package/dist/generated/prisma/models/Tool.d.ts +223 -1
- package/dist/generated/prisma/models.d.ts +10 -0
- package/dist/help/search.js +12 -3
- package/dist/help-index.json +2033 -110
- package/dist/import/create.js +48 -4
- package/dist/import/neutral-schema.d.ts +51 -281
- package/dist/import/neutral-schema.js +7 -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/grants-cli.d.ts +6 -4
- package/dist/mcp/auth/grants-cli.js +42 -3
- package/dist/mcp/auth/ownership.d.ts +7 -7
- package/dist/mcp/auth/resource-server.d.ts +3 -1
- package/dist/mcp/auth/resource-server.js +17 -2
- 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/context.d.ts +3 -0
- 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 +69 -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 +295 -28
- package/dist/mcp/tools/datastore.js +17 -8
- package/dist/mcp/tools/grants.js +73 -29
- package/dist/mcp/tools/host-providers.d.ts +2 -0
- package/dist/mcp/tools/host-providers.js +215 -0
- package/dist/mcp/tools/mcp-servers.d.ts +26 -0
- package/dist/mcp/tools/mcp-servers.js +481 -0
- 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 +65 -12
- 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 +209 -27
- 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/secret-elicitation.d.ts +2 -0
- package/dist/mcp/tools/secret-elicitation.js +25 -2
- package/dist/mcp/tools/secrets.js +40 -6
- 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 +7 -5
- package/dist/mcp/tools/tools.js +64 -16
- package/dist/mcp/tools/trigger.js +28 -6
- package/dist/mcp/transport/http-limits.d.ts +2 -0
- package/dist/mcp/transport/http-limits.js +6 -2
- 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/mcp/webhooks/ingress.js +10 -0
- 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 +55 -3
- package/dist/native-worker/gateway-server.js +152 -34
- package/dist/native-worker/gateway.d.ts +29 -1
- package/dist/native-worker/gateway.js +74 -4
- package/dist/native-worker/http-server.d.ts +7 -1
- package/dist/native-worker/http-server.js +62 -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 +24 -4
- package/dist/native-worker/ledger.js +62 -8
- 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 +130 -577
- package/dist/native-worker/protocol.js +51 -2
- 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/capability-hash.d.ts +2 -0
- package/dist/providers/coding-proxy/capability-hash.js +5 -0
- 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/mcp-route.d.ts +34 -0
- package/dist/providers/coding-proxy/mcp-route.js +166 -0
- package/dist/providers/coding-proxy/memory-ledger.d.ts +17 -2
- package/dist/providers/coding-proxy/memory-ledger.js +99 -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 +16 -2
- package/dist/providers/coding-proxy/prisma-ledger.js +209 -69
- package/dist/providers/coding-proxy/proxy.d.ts +21 -2
- package/dist/providers/coding-proxy/proxy.js +300 -48
- 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 +10 -0
- package/dist/providers/coding-proxy/runtime.js +109 -16
- package/dist/providers/coding-proxy/server.d.ts +9 -1
- package/dist/providers/coding-proxy/server.js +55 -1
- package/dist/providers/coding-proxy/types.d.ts +78 -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 +52 -7
- package/dist/providers/executor/container.d.ts +394 -9
- package/dist/providers/executor/container.js +1210 -96
- 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/host-tools/invoke.d.ts +37 -0
- package/dist/providers/host-tools/invoke.js +117 -0
- package/dist/providers/host-tools/operations.d.ts +65 -0
- package/dist/providers/host-tools/operations.js +149 -0
- package/dist/providers/host-tools/registry.d.ts +79 -0
- package/dist/providers/host-tools/registry.js +362 -0
- package/dist/providers/host-tools/request-guard.d.ts +17 -0
- package/dist/providers/host-tools/request-guard.js +99 -0
- package/dist/providers/host-tools/self-test.d.ts +64 -0
- package/dist/providers/host-tools/self-test.js +142 -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 +10 -2
- package/dist/providers/jobs/docker-isolation.js +47 -8
- package/dist/providers/jobs/docker.d.ts +9 -0
- package/dist/providers/jobs/docker.js +60 -11
- 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 +5 -1
- package/dist/providers/jobs/kubernetes-isolation.js +32 -3
- package/dist/providers/jobs/kubernetes.d.ts +11 -1
- package/dist/providers/jobs/kubernetes.js +111 -17
- package/dist/providers/jobs/types.d.ts +39 -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 +140 -6
- package/dist/providers/review-host/types.js +9 -1
- 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 +39 -4
- package/dist/providers/vcs/git.js +339 -26
- 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 +183 -44
- package/dist/providers/vcs/github.js +455 -56
- package/dist/providers/vcs/index.d.ts +1 -1
- package/dist/providers/vcs/index.js +9 -2
- 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 +37 -1
- package/dist/providers/vcs/remote.js +7 -1
- package/dist/providers/vcs/routing.d.ts +16 -8
- package/dist/providers/vcs/routing.js +27 -6
- package/dist/providers/vcs/types.d.ts +150 -5
- package/dist/quickstart/coding-seed.d.ts +14 -3
- package/dist/quickstart/coding-seed.js +213 -4
- package/dist/quickstart/index.d.ts +5 -0
- package/dist/quickstart/index.js +21 -0
- 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/eval-core.d.ts +12 -2
- package/dist/sandbox/eval-core.js +20 -4
- 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 +5 -0
- package/dist/sandbox/host-functions.js +13 -13
- package/dist/sandbox/limits.d.ts +4 -1
- package/dist/sandbox/limits.js +4 -1
- package/dist/sandbox/run-in-sandbox.d.ts +6 -0
- package/dist/sandbox/run-in-sandbox.js +14 -2
- package/dist/sandbox/safe-fetch.d.ts +2 -0
- package/dist/sandbox/safe-fetch.js +1 -1
- package/dist/sandbox/secret-broker.d.ts +1 -0
- package/dist/sandbox/secret-broker.js +4 -5
- package/dist/sandbox/tool-capabilities.d.ts +10 -30
- package/dist/sandbox/tool-timeout.d.ts +32 -0
- package/dist/sandbox/tool-timeout.js +52 -0
- package/dist/sandbox/user-tool.d.ts +8 -1
- package/dist/sandbox/user-tool.js +9 -3
- 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/graph.js +2 -1
- package/dist/viewer/openapi.js +2 -4
- package/dist/wardby-bin.js +15 -0
- package/docs/README.md +11 -1
- package/docs/agent-recipes.md +95 -24
- package/docs/architecture-runtime.md +1 -1
- package/docs/claude-code-plugin.md +164 -0
- package/docs/code-review-agents.md +557 -41
- package/docs/coding-agent-setup.md +566 -8
- package/docs/coding-packages.md +1033 -90
- package/docs/coding-services.md +27 -12
- package/docs/coding-worker-byo-images.md +24 -2
- package/docs/coding-worker-isolation.md +183 -37
- package/docs/debugging-agent-runs.md +242 -0
- package/docs/getting-started-gke.md +129 -141
- package/docs/getting-started-identity-provider.md +53 -38
- package/docs/getting-started.md +17 -0
- package/docs/host-providers.md +294 -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/mcp-servers.md +254 -0
- package/docs/native-sandbox.md +143 -31
- package/docs/observability.md +4 -0
- package/docs/security-deployment.md +139 -29
- package/docs/slack-notifications.md +35 -19
- package/docs/tool-secrets.md +45 -10
- package/docs/viewer-api.md +6 -0
- package/docs/viewer-api.openapi.yml +1 -1
- package/help/admin-viewer.md +28 -2
- package/help/agent-recipes.md +33 -2
- package/help/architecture-agent.md +11 -6
- package/help/brokered-secrets.md +3 -0
- package/help/build-claude-code-image.md +1 -1
- package/help/build-worker-image.md +3 -1
- package/help/builder-agent.md +19 -6
- package/help/claude-code-run-pane.md +40 -0
- 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-mcp-pins-unavailable.md +35 -0
- 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/database-auth-invalid.md +1 -1
- 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/host-provider-error.md +40 -0
- package/help/errors/host-tool-failed.md +36 -0
- package/help/errors/mcp-call-limit.md +22 -0
- package/help/errors/mcp-call-timeout.md +22 -0
- package/help/errors/mcp-server-auth-failed.md +22 -0
- package/help/errors/mcp-server-credentials-unavailable.md +45 -0
- package/help/errors/mcp-server-error.md +28 -0
- package/help/errors/mcp-server-unreachable.md +22 -0
- package/help/errors/mcp-servers-off.md +21 -0
- package/help/errors/mcp-tool-not-allowed.md +26 -0
- package/help/errors/mcp-tool-removed.md +22 -0
- package/help/errors/mcp-unavailable.md +25 -0
- package/help/errors/merge-conflict.md +49 -0
- package/help/errors/native-sandbox-capacity.md +1 -1
- package/help/errors/native-sandbox-deadline-exceeded.md +1 -1
- package/help/errors/native-sandbox-docker-failed.md +1 -1
- package/help/errors/native-sandbox-gateway-error.md +20 -0
- package/help/errors/native-sandbox-gateway-unavailable.md +1 -1
- package/help/errors/native-sandbox-image-not-pinned.md +1 -1
- package/help/errors/native-sandbox-isolation-mismatch.md +1 -1
- package/help/errors/native-sandbox-launch-abandoned.md +21 -0
- package/help/errors/native-sandbox-network-unenforced.md +1 -1
- package/help/errors/native-sandbox-requires-catalog.md +1 -1
- package/help/errors/native-sandbox-unavailable.md +1 -1
- package/help/errors/native-sandbox-warm-delivery-failed.md +1 -1
- package/help/errors/native-sandbox-worker-exited.md +4 -3
- package/help/errors/native-sandbox-worker-lost.md +1 -1
- package/help/errors/native-sandbox-worker-unready.md +1 -1
- 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/repository-not-listed.md +36 -0
- package/help/errors/repository-required.md +36 -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/errors/tool-timeout.md +38 -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/host-providers.md +40 -0
- package/help/identity-and-access.md +6 -1
- 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/mcp-servers.md +73 -0
- package/help/mcp.md +7 -2
- package/help/merge-order-check.md +5 -0
- package/help/native-capabilities.md +55 -1
- package/help/native-sandbox.md +16 -2
- package/help/operating-agents.md +21 -0
- package/help/package-audit-mode.md +91 -0
- package/help/related-pull-requests.md +17 -10
- package/help/repo-instructions-and-skills.md +3 -1
- package/help/resume-runs-locally.md +134 -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 +86 -7
- package/help/troubleshooting/debugging-agent-runs.md +29 -0
- package/package.json +18 -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/migrations/20261102000000_host_providers/migration.sql +56 -0
- package/prisma/migrations/20261104000000_coding_agent_repository_list/migration.sql +5 -0
- package/prisma/migrations/20261106000000_tool_timeout/migration.sql +4 -0
- package/prisma/migrations/20261107000000_mcp_servers/migration.sql +33 -0
- package/prisma/migrations/20261108000000_coding_mcp/migration.sql +5 -0
- package/prisma/migrations/20261109000000_task_run_index/migration.sql +3 -0
- package/prisma/schema.prisma +468 -109
- package/scripts/git-askpass.sh +1 -1
- package/dist/sandbox/generated/zod-to-json-schema.bundle.js +0 -5
|
@@ -15,6 +15,8 @@ registry) but never holds the run capability.
|
|
|
15
15
|
for each enabled coding provider: `OPENAI_API_KEY` and/or
|
|
16
16
|
`ANTHROPIC_API_KEY`.
|
|
17
17
|
- The local database has the current Prisma migrations applied.
|
|
18
|
+
- git 2.38 or newer on any machine that runs the wardby server outside the
|
|
19
|
+
shipped image (follow-up runs merge the pull request's target branch with it).
|
|
18
20
|
- A GitHub App is installed on only the repository to be exercised. (Not needed
|
|
19
21
|
for a repository on this machine; see
|
|
20
22
|
[Local repositories](#local-repositories).) Grant it
|
|
@@ -61,9 +63,87 @@ A continuation (`continuePriorRun`) checks separately that the pull request
|
|
|
61
63
|
it is asked to continue is still open on GitHub; one already merged or closed
|
|
62
64
|
fails with category `continuation_closed` and nothing pushed — see
|
|
63
65
|
[Continuation's pull request is no longer open](../help/errors/continuation-closed.md).
|
|
66
|
+
Before its agent starts, a continuation also merges the branch the pull
|
|
67
|
+
request currently targets, and the agent resolves any conflicts — see
|
|
68
|
+
[Follow-ups bring the pull request up to date](code-review-agents.md#follow-ups-bring-the-pull-request-up-to-date).
|
|
64
69
|
Over stdio, the local operator holds every role, so `repositoryAdminOverride`
|
|
65
70
|
is the way to approve a repository there.
|
|
66
71
|
|
|
72
|
+
## A coding agent's repositories
|
|
73
|
+
|
|
74
|
+
A coding agent works in one repository per run, chosen from its list:
|
|
75
|
+
|
|
76
|
+
- `codingProfile.repository` is the **default** repository.
|
|
77
|
+
- `link_repository` adds more. A link on a coding agent takes
|
|
78
|
+
`access: "write"`, no triggers, no `checkName` and an optional `baseRef`
|
|
79
|
+
(the base branch for runs in that repository; default: the profile's
|
|
80
|
+
`baseRef`). The repository must be on GitHub or a `local:` path. Linking the
|
|
81
|
+
default repository again is refused.
|
|
82
|
+
- `unlink_repository` removes one.
|
|
83
|
+
|
|
84
|
+
```json
|
|
85
|
+
{ "agentId": "<agent id>", "repository": "your-org/other-repo", "access": "write", "baseRef": "main" }
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Only the agent's owner (or an admin approving explicitly with `adminOverride`)
|
|
89
|
+
can add a repository, and the same authorization applies as for the default;
|
|
90
|
+
see [Repository authorization](#repository-authorization).
|
|
91
|
+
|
|
92
|
+
The repository is chosen when the run starts and never changes during it:
|
|
93
|
+
|
|
94
|
+
- `trigger_agent` takes an optional `repository`. Leave it out and the run uses
|
|
95
|
+
the default repository. Name one that is not on the list and the call is
|
|
96
|
+
refused with `repository_not_listed`. Only the agent's owner can pass
|
|
97
|
+
`repository`, unless `codingProfile.allowWebhookTaskOverride` is on; anyone
|
|
98
|
+
else is refused with a 403.
|
|
99
|
+
- A webhook body can carry `wardbyRepository` the same way (not `repository`,
|
|
100
|
+
which forwarded payloads already use). A refused value is a 400
|
|
101
|
+
`{ "error": "invalid_repository" }`. A webhook can carry `wardbyRepository`
|
|
102
|
+
only when `codingProfile.allowWebhookTaskOverride` is on, whoever created
|
|
103
|
+
the webhook. With the flag off a well-formed value is refused with 403
|
|
104
|
+
`{ "error": "disabled" }`, before it is compared with the list; a malformed
|
|
105
|
+
one (not a string, empty, or over 300 characters) is a 400 either way.
|
|
106
|
+
- A lead's `delegate_to_<name>` call takes `repository`. When the sub-agent has
|
|
107
|
+
more than its default repository the call must name one, unless
|
|
108
|
+
`continuePriorRun` is given: a follow-up works in the repository of the run
|
|
109
|
+
it continues. Without a choice the call is refused with
|
|
110
|
+
`repository_required`.
|
|
111
|
+
|
|
112
|
+
Everything else about the agent is shared across its repositories: toolchain,
|
|
113
|
+
worker image, services, system prompt, budget, protected paths and the package
|
|
114
|
+
allowlist. If two repositories need different ones, use two agents.
|
|
115
|
+
|
|
116
|
+
Being on the list lets a run work in a repository; it starts nothing there.
|
|
117
|
+
Reviews, mention follow-ups, fix rounds and mark-ready route by repository and
|
|
118
|
+
trigger, so a pull request opened in a linked repository gets none of them by
|
|
119
|
+
itself. For follow-ups, link the lead and the reviewer on each listed GitHub
|
|
120
|
+
repository with the triggers they need.
|
|
121
|
+
|
|
122
|
+
An agent with no repository links works only in its default repository.
|
|
123
|
+
Changing an agent's `kind` is refused while it has write links without
|
|
124
|
+
triggers; unlink them first.
|
|
125
|
+
|
|
126
|
+
Every write link without triggers on a coding agent is on its list, whenever it
|
|
127
|
+
was made. An agent converted from native to coding can hold such links from its
|
|
128
|
+
native configuration: run `list_repositories` on converted agents and unlink any
|
|
129
|
+
repository their runs should not work in.
|
|
130
|
+
|
|
131
|
+
For the refusals, see [Repository required](../help/errors/repository-required.md)
|
|
132
|
+
and [Repository not on the agent's list](../help/errors/repository-not-listed.md).
|
|
133
|
+
|
|
134
|
+
## See what a run was asked to do
|
|
135
|
+
|
|
136
|
+
`get_run` returns a coding run's `request`: the task it received from
|
|
137
|
+
`trigger_agent`, a webhook or a lead, or the agent's default task. It leaves out
|
|
138
|
+
the agent's standing instructions. On a delegated run, this shows what the lead
|
|
139
|
+
told the coding agent, so you can tell a vague task from a run that missed a
|
|
140
|
+
clear one.
|
|
141
|
+
|
|
142
|
+
The value is masked when it's read: the values of the agent's attached secrets
|
|
143
|
+
and token-shaped values are replaced. If the agent's secrets can't be read,
|
|
144
|
+
`get_run` returns `requestUnavailable: true` instead of the text. Runs from
|
|
145
|
+
before this field have no `request`.
|
|
146
|
+
|
|
67
147
|
## Local repositories
|
|
68
148
|
|
|
69
149
|
A coding agent (or a review agent) can work on a git repository on the same
|
|
@@ -101,7 +181,7 @@ JOB_LAUNCHER=docker
|
|
|
101
181
|
directly, so the control plane must not run in a container, a pod or on
|
|
102
182
|
another machine. A trusted folder the server cannot see is ignored, so its
|
|
103
183
|
repositories fail with `local_repo_not_allowed`, and `doctor` reports the
|
|
104
|
-
folder as missing. The machine needs git 2.
|
|
184
|
+
folder as missing. The machine needs git 2.38 or newer.
|
|
105
185
|
- **Worker images.** Use worker images from the same release as the control
|
|
106
186
|
plane. An older worker image rejects `local:` repositories (the run fails with
|
|
107
187
|
`worker_input_failed`), including a Codex agent's bring-your-own
|
|
@@ -128,7 +208,8 @@ JOB_LAUNCHER=docker
|
|
|
128
208
|
To build on an earlier result, trigger with `baseRef: "wardby/run-<run id>"`. A
|
|
129
209
|
continuation of a run (a lead agent revising its earlier work) fast-forwards the
|
|
130
210
|
same branch; if the branch has moved, or is checked out, the run fails with
|
|
131
|
-
`local_branch_conflict` and nothing is pushed.
|
|
211
|
+
`local_branch_conflict` and nothing is pushed. A local repository has no pull
|
|
212
|
+
requests, so a continuation there does not merge any other branch first.
|
|
132
213
|
|
|
133
214
|
Result branches accumulate, and wardby does not delete them. Clean up with
|
|
134
215
|
`git branch -D wardby/run-<run id>`.
|
|
@@ -307,7 +388,8 @@ agents.
|
|
|
307
388
|
- **`false`.** Bare mode is off. Claude Code loads `CLAUDE.md` and skills
|
|
308
389
|
itself, through its native Skill tool, instead of reading them from the
|
|
309
390
|
system prompt. Repository settings, hooks, MCP configuration, agents, and
|
|
310
|
-
commands are still never loaded in either mode
|
|
391
|
+
commands are still never loaded in either mode (the only MCP tools a coding
|
|
392
|
+
run has are those of [attached MCP servers](mcp-servers.md#coding-agents)); native loading also locks
|
|
311
393
|
Claude Code's own hooks to wardby's managed set.
|
|
312
394
|
|
|
313
395
|
If the worker can't write the native-mode context to disk for a run, that
|
|
@@ -374,17 +456,61 @@ the agent's commands); Claude Code itself always runs on
|
|
|
374
456
|
|
|
375
457
|
A coding run's budget is reserved when it is dispatched: the agent's own
|
|
376
458
|
`budgetUsd`, tightened to whatever its budget group has left for each
|
|
377
|
-
configured period and, for a sub-agent, whatever its run tree has left.
|
|
378
|
-
|
|
459
|
+
configured period and, for a sub-agent, whatever its run tree has left. Each
|
|
460
|
+
model request holds part of the reservation before it is sent, and a request
|
|
461
|
+
that would not fit is refused. A reply can still cost more than its hold, up to
|
|
462
|
+
that request's worst case, so a run can end a little over its reservation;
|
|
463
|
+
finished work is still delivered. When a group or run tree
|
|
379
464
|
has nothing left, the run is recorded as `refused` with the error
|
|
380
465
|
`budget_group_exhausted:<day|week|month>` or `run_tree_exhausted`, and no
|
|
381
466
|
container starts (`trigger_agent` returns that status and error directly).
|
|
382
467
|
|
|
468
|
+
### Allowing a small overrun
|
|
469
|
+
|
|
470
|
+
A coding agent's `allowedOverrunPercent` (an integer from 0 to 100, default 0,
|
|
471
|
+
set with `create_agent` or `update_agent`, and shown by `get_agent`) lets a run
|
|
472
|
+
spend a little beyond `budgetUsd` instead of stopping at it. It takes the same
|
|
473
|
+
permission as changing `budgetUsd`. On a coding agent it raises the limit of
|
|
474
|
+
each of its runs; on a lead agent that delegates, it raises its run tree's
|
|
475
|
+
ceiling for coding sub-agents. Native runs' own model calls are not affected.
|
|
476
|
+
|
|
477
|
+
The overrun is permission to spend more, not a reservation. At dispatch a
|
|
478
|
+
coding run reserves only its base budget: the smallest of the agent's
|
|
479
|
+
`budgetUsd`, what its budget group has left and what its run tree has left.
|
|
480
|
+
Its limit is `budgetUsd` raised by the percent, and nothing is held for it up
|
|
481
|
+
front. While the run works, wardby tops up what it may spend, in steps of 10%
|
|
482
|
+
of its base (or the largest model request it has made, if that is more), each
|
|
483
|
+
time it gets within its headroom of what it has been granted: two of its
|
|
484
|
+
largest requests, or 20% of its base if that is more. A run whose base is
|
|
485
|
+
smaller than its first request cannot use its overrun, since that request is
|
|
486
|
+
refused before any top-up. A step is granted
|
|
487
|
+
only out of room its budget group and run tree have left at that moment, and
|
|
488
|
+
never past the limit. The coding proxy enforces what has been granted so far,
|
|
489
|
+
and the Claude Code worker's own budget stop is set to the limit. `get_run`
|
|
490
|
+
shows `budgetBaseUsd`, `budgetLimitUsd` (the limit) and `budgetReservedUsd`
|
|
491
|
+
(what has been granted so far, which the group and run tree hold).
|
|
492
|
+
|
|
493
|
+
Budget group caps and run-tree ceilings stay hard. A top-up takes whatever room
|
|
494
|
+
is left, so if the group or run tree fills up while a run needs more, the run
|
|
495
|
+
stops at what it has been granted, with its work kept as below, and its budget
|
|
496
|
+
sentence says why, for example "Only $0.40 of its 10% allowed overrun was
|
|
497
|
+
available because the "team" group had no more left of its daily cap." (or
|
|
498
|
+
"Its 10% allowed overrun wasn't available because the "team" group had nothing
|
|
499
|
+
left of its daily cap." when it got none). `get_run` then lists an `overrun_unavailable` event. A run that
|
|
500
|
+
was refused a top-up does not ask again, even if the group frees up later. The
|
|
501
|
+
overrun a run actually got can therefore be lower than the agent's setting, or
|
|
502
|
+
none. For a delegated run tree, the raised ceiling uses the lead (root) agent's
|
|
503
|
+
percent, so set it on the lead agent to let its coding sub-agents go beyond
|
|
504
|
+
the lead's `budgetUsd`. Runs dispatched before this behaviour have no
|
|
505
|
+
`budgetLimitUsd`: their reservation already includes the overrun, and they
|
|
506
|
+
finish as before.
|
|
507
|
+
|
|
383
508
|
Every live run still pending or running holds its unspent reservation
|
|
384
509
|
(reservation minus cost so far) against its group; a native run holds its
|
|
385
510
|
agent's per-run `budgetUsd`. So overlapping scheduled, webhook and manual runs
|
|
386
511
|
share one cap rather than each seeing the full remainder, and
|
|
387
|
-
`get_budget_group` reports those holds as `reservedUsd` next to `spentUsd
|
|
512
|
+
`get_budget_group` reports those holds as `reservedUsd` next to `spentUsd`, and
|
|
513
|
+
each `spend[]` entry's `heldRuns` counts the runs holding budget in that period.
|
|
388
514
|
Native runs are served first come, first served: a native run only counts the
|
|
389
515
|
holds of runs that started before it, so members dispatched on the same tick
|
|
390
516
|
don't starve each other.
|
|
@@ -408,8 +534,176 @@ all beat every 10 seconds. A coding run also holds until its
|
|
|
408
534
|
`CODING_QUEUE_TIMEOUT_SEC` + its `timeoutSec` + 60 seconds have passed since
|
|
409
535
|
dispatch, because it does not beat while it waits in the coding queue. Its
|
|
410
536
|
recorded cost always counts. `wardby run` records the run as `cancelled` on
|
|
411
|
-
Ctrl-C or SIGTERM
|
|
412
|
-
|
|
537
|
+
Ctrl-C or SIGTERM, and the MCP tool `stop_run` records any pending, queued,
|
|
538
|
+
or running run as `cancelled` (see [Stop or cancel a run](../help/stop-run.md)),
|
|
539
|
+
which ends its hold at once. If a row is still stuck in `running` for another
|
|
540
|
+
reason, only its real cost counts once its hold lapses.
|
|
541
|
+
|
|
542
|
+
### How a request's hold is estimated
|
|
543
|
+
|
|
544
|
+
Before each model request the proxy holds an amount against the run's budget.
|
|
545
|
+
A request whose hold does not fit in what is left is refused. The hold is not
|
|
546
|
+
a charge: the run pays the reply's real cost.
|
|
547
|
+
|
|
548
|
+
The first request of a conversation, and every fallback below, holds the worst
|
|
549
|
+
case: the whole request body as new input written to the cache (one token per
|
|
550
|
+
byte) plus `maxOutputTokens` at the output rate.
|
|
551
|
+
|
|
552
|
+
After a reply in the same conversation that read from or wrote to the prompt
|
|
553
|
+
cache at least half of its prompt (on OpenAI models only cache reads count),
|
|
554
|
+
the next request holds that cached part at the cache-read rate,
|
|
555
|
+
and the rest (including whatever the body has grown by) at the input and
|
|
556
|
+
cache-write rates, plus the output allowance. It never holds more than the
|
|
557
|
+
worst case. A conversation is the main agent or one of its sub-agents.
|
|
558
|
+
|
|
559
|
+
The hold falls back to the worst case when:
|
|
560
|
+
|
|
561
|
+
- there is no previous reply in the conversation;
|
|
562
|
+
- the model changed;
|
|
563
|
+
- the previous reply was interrupted (settled at an estimate) or did not
|
|
564
|
+
complete;
|
|
565
|
+
- less than half of the previous reply's prompt was read from or written to
|
|
566
|
+
the cache;
|
|
567
|
+
- the request body got smaller; or
|
|
568
|
+
- the previous request in the conversation was sent more than 5 minutes
|
|
569
|
+
earlier, the lifetime of the prompt cache.
|
|
570
|
+
|
|
571
|
+
If the cache misses, a reply can cost more than its hold. It is still settled
|
|
572
|
+
when it costs no more than the worst case, so a run can exceed its budget by at
|
|
573
|
+
most the difference between a request's worst case and its hold, for each
|
|
574
|
+
request in flight. A reply that
|
|
575
|
+
costs more than the worst case cancels the run's model access
|
|
576
|
+
(`reservation_invariant_violated`).
|
|
577
|
+
|
|
578
|
+
When a request is refused, `budgetEvents` in `get_run` shows the basis of the
|
|
579
|
+
refused hold (`refusedHoldBasis`: `cached` or `full`) and the worst case for
|
|
580
|
+
that request (`refusedHoldCeilingUsd`); see
|
|
581
|
+
[Why a run stopped](#why-a-run-stopped).
|
|
582
|
+
|
|
583
|
+
### Interrupted replies
|
|
584
|
+
|
|
585
|
+
When a model reply breaks off before its final usage arrives (a dropped
|
|
586
|
+
connection, a worker that is stopped mid-reply), the proxy settles the request
|
|
587
|
+
at an estimate instead of leaving its whole hold in place. The estimate is the
|
|
588
|
+
input usage the proxy already read; failing that, the input of the previous
|
|
589
|
+
completed reply in the same conversation (the main conversation and each
|
|
590
|
+
sub-agent are tracked apart) on the same model, plus the request body's growth
|
|
591
|
+
since then. That reply is used only if it started within the 5-minute prompt
|
|
592
|
+
cache window before the request and the body has not shrunk since (as after a
|
|
593
|
+
compaction). Failing that, the whole request body counts as new input. New input
|
|
594
|
+
is counted at one token per 3 bytes, a deliberately high count, and priced at
|
|
595
|
+
the higher of the model's input and cache-write rates. It adds the output
|
|
596
|
+
relayed so far (text, tool-call input, and thinking or reasoning text), counted
|
|
597
|
+
high. With nothing relayed, the run's median completed reply on that model is
|
|
598
|
+
used, or no output if there is none yet. A streaming request that failed before
|
|
599
|
+
the provider's response started adds no output, because nothing was generated.
|
|
600
|
+
A provider's placeholder output count at the start of a reply is used only as a
|
|
601
|
+
minimum. The estimate is never more than the request's worst
|
|
602
|
+
case. An estimated request is flagged `costEstimated`, counts in the
|
|
603
|
+
run's cost at the estimate, and is recorded as `uncertain` in the proxy's
|
|
604
|
+
request ledger. If the estimate cannot be computed or recorded, the request
|
|
605
|
+
keeps its full hold. A run can therefore exceed
|
|
606
|
+
its budget by at most the difference between an estimate and the real cost of
|
|
607
|
+
the interrupted request.
|
|
608
|
+
|
|
609
|
+
### Delegated runs in a budget group
|
|
610
|
+
|
|
611
|
+
A lead and the sub-agents it starts in the same budget group hold the lead's
|
|
612
|
+
budget once, at the lead: the lead's reservation minus what the whole run tree
|
|
613
|
+
has spent. Each sub-agent reserves its own base out of what the lead's budget
|
|
614
|
+
has left. When the lead has an `allowedOverrunPercent`, its coding sub-agents
|
|
615
|
+
can be topped up past the lead's budget, up to its raised ceiling; the lead
|
|
616
|
+
then holds at least the unspent holds of every live sub-agent run in its tree
|
|
617
|
+
(top-ups included), so the overrun still fits inside the group's cap. This is decided per period: a sub-agent run holds nothing in a
|
|
618
|
+
period only when its lead started in that same period. So a delegating lead
|
|
619
|
+
does not count against its group several times over.
|
|
620
|
+
|
|
621
|
+
### Why a run stopped
|
|
622
|
+
|
|
623
|
+
`get_run` returns `budgetEvents` for a run that was refused for budget,
|
|
624
|
+
including a run whose model request was refused but that still finished,
|
|
625
|
+
failed for another reason, or was stopped. The event is recorded when the run
|
|
626
|
+
ends. Each event has `kind` (`refused`, or `overrun_unavailable` for a top-up
|
|
627
|
+
the group or run tree had no room for), `limit`, `at` and `details`. `limit` says which
|
|
628
|
+
cap bound the run: `run` (the agent's own `budgetUsd`), `run-tree` (what the
|
|
629
|
+
lead had left), or `day`, `week` or `month` (the budget group's cap for that
|
|
630
|
+
period). For a refused model request, `details` holds the budget, the amount
|
|
631
|
+
spent, the holds of requests in flight, the refused hold, the model and the
|
|
632
|
+
turn, plus the basis of the refused hold (`refusedHoldBasis`) and its worst case
|
|
633
|
+
(`refusedHoldCeilingUsd`). For a refusal at dispatch it holds the cap, the amount spent, the amount
|
|
634
|
+
held and the number of holding runs (`heldRuns`). Both also name the agent's
|
|
635
|
+
budget group (`groupName`) when it has one, and the lead agent
|
|
636
|
+
(`leadAgentName`) for a `run-tree` limit; a refused model request also gives
|
|
637
|
+
the agent's own `budgetUsd` (`agentBudgetUsd`). An `overrun_unavailable` event
|
|
638
|
+
holds the full cap or tree's numbers (`capUsd`, `spentUsd`, `heldUsd`,
|
|
639
|
+
`leftUsd`), the run's `baseBudgetUsd`, `grantedUsd` and `limitUsd`, and the
|
|
640
|
+
name of the group whose cap was full (`groupName`), which can be the lead's.
|
|
641
|
+
|
|
642
|
+
The run's error carries the same facts in one sentence after the code, for
|
|
643
|
+
example `coding_budget_exhausted: <sentence>`. A lead's sub-agent result
|
|
644
|
+
carries the sentence in a `budget` field. Pull request and issue comments and
|
|
645
|
+
check summaries show the amounts and the budget group's name only. See
|
|
646
|
+
[Run stopped out of budget](../help/errors/budget-exhausted.md).
|
|
647
|
+
|
|
648
|
+
Budget sentences name both parts when the run had an overrun, for example
|
|
649
|
+
"this run's $1.00 budget and its 10% allowed overrun ($1.10 in all)", or
|
|
650
|
+
"$1.00 budget and $0.05 of its 10% allowed overrun ($1.05 in all)" when only
|
|
651
|
+
part of it was available.
|
|
652
|
+
|
|
653
|
+
#### Finished work is delivered
|
|
654
|
+
|
|
655
|
+
A worker that finishes is pushed, and its pull request opened, even if its
|
|
656
|
+
cost ended over the limit (one reply can cost more than the hold placed for
|
|
657
|
+
it). The run's status is `succeeded`, and its status comment states the
|
|
658
|
+
overrun, for example "Spent $1.04, $0.04 (4%) over its $1.00 budget, within
|
|
659
|
+
its allowed overrun." (without the "within" part when it went past the limit).
|
|
660
|
+
|
|
661
|
+
#### Stopped for budget: the work so far is kept
|
|
662
|
+
|
|
663
|
+
When a run is stopped for budget and its worker ended cleanly, its changes so
|
|
664
|
+
far are pushed as the usual draft pull request, or added to the pull request it
|
|
665
|
+
was continuing. A new pull request's description starts "Stopped at its budget
|
|
666
|
+
before finishing; the changes so far are in this draft." A continuation leaves
|
|
667
|
+
the existing description as it is; its status comment says the run stopped.
|
|
668
|
+
The run's status stays
|
|
669
|
+
`budget_exhausted` and its `budgetEvents` are kept. The status comment points
|
|
670
|
+
at the pull request and says that mentioning the agent on it, or on the issue
|
|
671
|
+
the run came from, continues the work with a fresh budget: a comment
|
|
672
|
+
mentioning the App on GitHub, or the service account on a Jira issue.
|
|
673
|
+
|
|
674
|
+
- A new pull request's description and the run's summary then carry a
|
|
675
|
+
`### Task` section: the request that started the run, quoted, with mentions
|
|
676
|
+
defused and wrapper tags neutralised, and cut at 4 KiB with a
|
|
677
|
+
`[task truncated]` marker. The agent's standing instructions are never
|
|
678
|
+
included. The worker's own summary follows it, unless it is only the fixed
|
|
679
|
+
budget sentence. A continuation reads the task from there, so it knows what
|
|
680
|
+
the draft was for. The request text is shown in the draft, so anyone who can
|
|
681
|
+
read the pull request can read it.
|
|
682
|
+
- While the draft's latest commit is the one the stopped run pushed, the
|
|
683
|
+
automatic review is skipped: its check completes as neutral, titled
|
|
684
|
+
"Skipped: stopped at its budget", and no [fix round](code-review-agents.md#automatic-review-fix-rounds)
|
|
685
|
+
follows. A review that would start while that run is still finishing waits
|
|
686
|
+
for its result. Marking the pull request ready for review, or pushing a new
|
|
687
|
+
commit, gets a normal review; so does an explicit request (re-running the
|
|
688
|
+
check, or a comment mentioning the App asking for a review). The skip
|
|
689
|
+
applies to drafts only, because a neutral check counts as passing for branch
|
|
690
|
+
protection.
|
|
691
|
+
- The status comment says the draft can be continued from the pull request, or
|
|
692
|
+
from the issue it came from. See
|
|
693
|
+
[Follow-ups on an issue](code-review-agents.md#follow-ups-on-an-issue).
|
|
694
|
+
- Such a pull request is not marked ready automatically. Marking ready looks at
|
|
695
|
+
the last run that pushed to the pull request, so a later continuation that
|
|
696
|
+
finishes makes it eligible again; a continuation that ends with no changes
|
|
697
|
+
does not.
|
|
698
|
+
- The usual push checks still apply (protected paths, diff limits, access). If
|
|
699
|
+
one refuses, or there are no changes, the run ends as `budget_exhausted`
|
|
700
|
+
with nothing pushed.
|
|
701
|
+
- Unfinished work is never pushed onto a pull request that is no longer a
|
|
702
|
+
draft (marked ready for review by wardby or a person). A continuation of
|
|
703
|
+
such a pull request that stops for budget ends as `budget_exhausted` with
|
|
704
|
+
nothing pushed. The draft state is read from the host; when the host cannot
|
|
705
|
+
be asked, a pull request wardby marked ready counts as not a draft.
|
|
706
|
+
- Nothing is kept from a worker that crashed, timed out or was stopped.
|
|
413
707
|
|
|
414
708
|
## Turn limit (Claude Code)
|
|
415
709
|
|
|
@@ -429,6 +723,270 @@ failure. The run's `budgetUsd` and `timeoutSec` still apply and are usually the
|
|
|
429
723
|
better limits. Codex runs have no turn limit, so `maxTurns` does not affect
|
|
430
724
|
them.
|
|
431
725
|
|
|
726
|
+
## Output tokens per reply (Claude Code)
|
|
727
|
+
|
|
728
|
+
A Claude Code run caps each model reply at 32000 output tokens by default.
|
|
729
|
+
Thinking counts toward that cap, so a model with adaptive or extended thinking
|
|
730
|
+
can reach it on a long reply; Claude Code then ends with an error that the
|
|
731
|
+
response exceeded the output token maximum, and the run fails as a stream
|
|
732
|
+
failure. Raise the cap per agent:
|
|
733
|
+
|
|
734
|
+
```json
|
|
735
|
+
{ "id": "<coding agent id>", "codingProfile": { "maxOutputTokens": 64000 } }
|
|
736
|
+
```
|
|
737
|
+
|
|
738
|
+
`maxOutputTokens` is 1024 to 128000; `null` restores the default. Pick a value
|
|
739
|
+
the agent's model supports. It is fixed on each run when the run is
|
|
740
|
+
dispatched. The coding proxy reserves `maxOutputTokens` × the model's output
|
|
741
|
+
price (plus the request's input, see
|
|
742
|
+
[How a request's hold is estimated](#how-a-requests-hold-is-estimated)) against the run's budget for every
|
|
743
|
+
model request, so a higher cap needs a larger `budgetUsd`: at a $25/MTok output
|
|
744
|
+
price, 32000 tokens reserve $0.80 per request and 128000 reserve $3.20. A
|
|
745
|
+
request whose reservation does not fit in what is left of the budget is
|
|
746
|
+
refused and the run ends as `budget_exhausted` (see
|
|
747
|
+
[Why a run stopped](#why-a-run-stopped)), so a higher value makes a run
|
|
748
|
+
with a small budget end sooner. Only Claude Code agents take
|
|
749
|
+
`maxOutputTokens`; `create_agent` and `update_agent` refuse it on a Codex
|
|
750
|
+
agent, and changing an agent's provider to `codex` needs it set to `null` in
|
|
751
|
+
the same `update_agent` call (or before).
|
|
752
|
+
|
|
753
|
+
The 32000 default and `maxOutputTokens` need a Claude Code worker image from a
|
|
754
|
+
release that supports them (Wardby 0.7.0 or later). An older pinned image still
|
|
755
|
+
caps each reply at 4096 tokens, and rejects the input of a run whose agent sets
|
|
756
|
+
`maxOutputTokens` as invalid.
|
|
757
|
+
|
|
758
|
+
## Resume a run locally
|
|
759
|
+
|
|
760
|
+
A Claude Code agent can keep a copy of each run's conversation so a developer
|
|
761
|
+
can later continue that session in their own Claude Code. Keeping it is off by
|
|
762
|
+
default. Turn it on per agent:
|
|
763
|
+
|
|
764
|
+
```json
|
|
765
|
+
{ "id": "<coding agent id>", "codingProfile": { "sessionResume": true } }
|
|
766
|
+
```
|
|
767
|
+
|
|
768
|
+
`sessionResume` applies to Claude Code agents only; `create_agent` and
|
|
769
|
+
`update_agent` refuse it on a Codex agent. Wardby keeps each run's session,
|
|
770
|
+
and `get_run_transcript` plus `npx @wardby/cli@latest resume` continue it on a
|
|
771
|
+
developer's machine (see [Continue a run on your machine](#continue-a-run-on-your-machine)).
|
|
772
|
+
This section covers what is stored, how to set it up, and how to resume.
|
|
773
|
+
|
|
774
|
+
Session resume needs Claude Code worker images from a release that supports
|
|
775
|
+
it (Wardby 0.7.0 or later). An older pinned image rejects the input of a run
|
|
776
|
+
whose agent sets `sessionResume` as invalid (`worker_input_failed`).
|
|
777
|
+
|
|
778
|
+
**What is kept.** The conversation as Claude Code recorded it: the user and
|
|
779
|
+
assistant messages, tool calls and their results, compaction summaries (so a
|
|
780
|
+
long run resumes from its last summary, as it would have in the worker), the
|
|
781
|
+
files and skills the agent loaded, and a session title. When Claude Code made
|
|
782
|
+
no title, the title is `wardby run <id>: ` and the first line of the task.
|
|
783
|
+
Records are kept whole. Removed: thinking blocks (they are tied to the account
|
|
784
|
+
and conversation that produced them and would not replay), the system prompt,
|
|
785
|
+
the worker's environment, date and budget reminders, account and
|
|
786
|
+
organisation details, billing records, and any record kind the pinned Claude
|
|
787
|
+
Code version is not known to write. The content is then redacted against the
|
|
788
|
+
values of the secrets attached to the agent, and the run's capability and
|
|
789
|
+
registry token are redacted by their token shape. If the agent's secrets
|
|
790
|
+
cannot be loaded, nothing is stored.
|
|
791
|
+
|
|
792
|
+
**Which runs.** Claude Code runs that finish, stop at their budget, or fail.
|
|
793
|
+
A run stopped with `stop_run` or ended by its timeout is not captured, because
|
|
794
|
+
its worker is removed before the transcript can be collected.
|
|
795
|
+
|
|
796
|
+
**Who can read it.** Transcripts are stored from the first run
|
|
797
|
+
with `sessionResume` on. Anyone who can read a run (its triggerer and the
|
|
798
|
+
agent's owner, as for `get_run`) can download its transcript, and so everything the agent saw and wrote, including file
|
|
799
|
+
contents and command output from the repository. Redaction covers secret
|
|
800
|
+
values, not other sensitive text. Enable `sessionResume` only for agents whose
|
|
801
|
+
runs you are comfortable sharing with everyone who can read them.
|
|
802
|
+
|
|
803
|
+
**Where it is stored.** In the server's blob store, as a gzip-compressed
|
|
804
|
+
object under the `run-transcripts/` prefix. When a run's context was
|
|
805
|
+
compacted, only what a resume loads is kept: the last compaction's summary,
|
|
806
|
+
the messages that compaction kept, and everything after it. Earlier history
|
|
807
|
+
is never loaded on resume, so it is not stored.
|
|
808
|
+
|
|
809
|
+
**Size limits.** `RUN_TRANSCRIPT_MAX_BYTES` caps the stored transcript,
|
|
810
|
+
measured before compression (default 10 MiB, at most 64 MiB). A larger
|
|
811
|
+
transcript is not stored. While the run works, its worker keeps the raw
|
|
812
|
+
session in its own in-memory scratch of up to 80 MiB, which counts toward the
|
|
813
|
+
run's memory, and reads at most 64 MiB of it when the run ends. Each run
|
|
814
|
+
records a status of `stored`, `too_large`, `not_captured` or `failed`, with a
|
|
815
|
+
short reason code and no content.
|
|
816
|
+
|
|
817
|
+
The blob store settings must be present on the **server process** (the
|
|
818
|
+
control plane that launches coding runs), not only on the coding proxy. The
|
|
819
|
+
server also needs its secret cipher, which it has in a normal setup.
|
|
820
|
+
|
|
821
|
+
| Variable | Default | Purpose |
|
|
822
|
+
| ---------------------------------------------- | ------- | --------------------------------------------------------------------------------- |
|
|
823
|
+
| `BLOB_STORE` | | `local`, `gcs` or `s3`. Without it no transcript is stored. |
|
|
824
|
+
| `BLOB_STORE_LOCAL_DIR` | | Directory for `BLOB_STORE=local`. |
|
|
825
|
+
| `BLOB_STORE_GCS_BUCKET` | | Bucket for `BLOB_STORE=gcs`. |
|
|
826
|
+
| `BLOB_STORE_S3_BUCKET`, `BLOB_STORE_S3_REGION` | | Bucket and region for `BLOB_STORE=s3`. |
|
|
827
|
+
| `BLOB_STORE_S3_ENDPOINT` | | Optional: an S3-compatible endpoint for `BLOB_STORE=s3`. |
|
|
828
|
+
| `RUN_TRANSCRIPT_RETENTION_DAYS` | `30` | Days to keep a transcript, a whole number from 1 to 3650. |
|
|
829
|
+
| `RUN_TRANSCRIPT_MAX_BYTES` | 10 MiB | Largest transcript stored, in bytes before compression, from 1048576 to 67108864. |
|
|
830
|
+
|
|
831
|
+
**Retention.** Expired transcripts are pruned whenever a new one is stored.
|
|
832
|
+
For GCS and S3, also add a bucket lifecycle rule that deletes objects under
|
|
833
|
+
the `run-transcripts/` prefix after the same number of days, so objects are
|
|
834
|
+
removed even when no new run is stored. The reference GKE and AWS modules
|
|
835
|
+
create that rule for you (below).
|
|
836
|
+
|
|
837
|
+
**Set it up per deployment.** Use a bucket of its own for transcripts, not the
|
|
838
|
+
dependency cache bucket, and give access to the control plane only: a
|
|
839
|
+
transcript holds everything the run saw, and the coding proxy and workers have
|
|
840
|
+
no need for it.
|
|
841
|
+
|
|
842
|
+
- **GKE**: set `session_transcripts_enabled = true` and a unique
|
|
843
|
+
`session_transcripts_bucket_name` (optionally
|
|
844
|
+
`session_transcripts_retention_days`, default 30) in `terraform.tfvars`, and
|
|
845
|
+
deploy with `WARDBY_SESSION_TRANSCRIPTS=true deploy/gke/up.sh`. Terraform
|
|
846
|
+
creates the bucket and its lifecycle rule and grants the control plane's
|
|
847
|
+
service account alone; `up.sh` gives the control plane `BLOB_STORE=gcs`, the
|
|
848
|
+
bucket and the matching `RUN_TRANSCRIPT_RETENTION_DAYS`. See
|
|
849
|
+
[`deploy/gke/README.md`](../deploy/gke/README.md#session-transcripts).
|
|
850
|
+
- **AWS (EKS)**: set the Terraform variables of the same names, then give the
|
|
851
|
+
control plane container `BLOB_STORE=s3`, `BLOB_STORE_S3_BUCKET` (the
|
|
852
|
+
`session_transcripts_bucket` output), `BLOB_STORE_S3_REGION` and
|
|
853
|
+
`RUN_TRANSCRIPT_RETENTION_DAYS` (the `session_transcripts_retention_days`
|
|
854
|
+
output). See
|
|
855
|
+
[`deploy/aws/README.md`](../deploy/aws/README.md#session-transcripts).
|
|
856
|
+
- **kind harness**: the control plane runs on your host, so set
|
|
857
|
+
`BLOB_STORE=local` and `BLOB_STORE_LOCAL_DIR` (a directory on your host) in
|
|
858
|
+
the environment you start it with. Nothing changes in the cluster.
|
|
859
|
+
- **Docker quickstart**: the server runs on your host. Add `BLOB_STORE=local`
|
|
860
|
+
and `BLOB_STORE_LOCAL_DIR` (an absolute directory on your host) to
|
|
861
|
+
`.wardby/.env` and restart. The coding proxy container keeps its own
|
|
862
|
+
dependency cache store and is not affected. A local directory has no
|
|
863
|
+
lifecycle rule, so expired transcripts are removed only when new ones are
|
|
864
|
+
stored.
|
|
865
|
+
|
|
866
|
+
**Startup checks.** With `JOB_LAUNCHER` set to `docker` or `kubernetes`, a
|
|
867
|
+
half-set `BLOB_STORE` (the kind set but its bucket or directory missing), or an
|
|
868
|
+
invalid `RUN_TRANSCRIPT_RETENTION_DAYS` or `RUN_TRANSCRIPT_MAX_BYTES`, stops the server at startup with a
|
|
869
|
+
message naming the variable.
|
|
870
|
+
|
|
871
|
+
**Custom worker images.** An agent that sets `workerImageRef` must rebuild its
|
|
872
|
+
image from a release that includes session resume. Until then its runs fail at
|
|
873
|
+
input (`worker_input_failed`). `update_agent` warns about this when you turn
|
|
874
|
+
`sessionResume` on, and also warns when the server has no blob store.
|
|
875
|
+
|
|
876
|
+
### Continue a run on your machine
|
|
877
|
+
|
|
878
|
+
Ask your MCP client to call `get_run_transcript` with the run's id. It takes
|
|
879
|
+
the same access as `get_run` (the run's triggerer or the agent's owner) and
|
|
880
|
+
returns:
|
|
881
|
+
|
|
882
|
+
- `status`: `stored` when the transcript can be resumed. Otherwise the status
|
|
883
|
+
(`none`, `too_large`, `not_captured`, `failed`, `expired`, `unavailable` or
|
|
884
|
+
`unsupported`), its `reason`, and what it means; no link.
|
|
885
|
+
- `sessionId`, `repository`, `branch` (the branch the run pushed, or its head
|
|
886
|
+
branch), `baseSha`, `sizeBytes` and `expiresAt` (when the transcript is
|
|
887
|
+
deleted).
|
|
888
|
+
- `download.url` and `download.expiresAt`: a signed download link that works
|
|
889
|
+
for 10 minutes.
|
|
890
|
+
- `command`: `npx @wardby/cli@latest resume -`. It asks for the link; paste
|
|
891
|
+
`download.url`.
|
|
892
|
+
|
|
893
|
+
The transcript itself never enters your MCP client's conversation, only the
|
|
894
|
+
link. Run the command in a terminal. You can also pass the link as an
|
|
895
|
+
argument (`npx @wardby/cli@latest resume '<link>'`) or pipe it in, but an argument stays
|
|
896
|
+
in your shell history and in the process list while Claude Code runs, so
|
|
897
|
+
pasting it at the prompt is the safer default.
|
|
898
|
+
|
|
899
|
+
- For a GitHub repository, run it inside a clone of that repository. It
|
|
900
|
+
fetches the run's branch from the remote that points at the repository and
|
|
901
|
+
adds a detached git worktree next to the clone, named
|
|
902
|
+
`<clone>-run-<last 8 characters of the run id>`.
|
|
903
|
+
- For a `local:` repository, run it anywhere on the server's machine. The
|
|
904
|
+
worktree is added from that repository, next to it. A `local:` path names
|
|
905
|
+
a folder on the server's machine, so it is used only when the link comes
|
|
906
|
+
from this machine (`127.0.0.1`, `localhost` or `[::1]`, as with a stdio MCP
|
|
907
|
+
server). For a link from any other server the command stops with
|
|
908
|
+
`local_repository_refused` unless you pass `--here`, or `--dir <path>` to
|
|
909
|
+
check the run out from that folder anyway.
|
|
910
|
+
- A detached worktree works even while the branch is checked out somewhere
|
|
911
|
+
else. When the branch no longer exists (for example a failed run that
|
|
912
|
+
pushed nothing), the run's base commit is checked out instead, with a
|
|
913
|
+
warning that the run's changes are not in it.
|
|
914
|
+
|
|
915
|
+
```text
|
|
916
|
+
npx @wardby/cli@latest resume - [--dir <path> | --here] [--force] [--print]
|
|
917
|
+
```
|
|
918
|
+
|
|
919
|
+
| Option | Effect |
|
|
920
|
+
| -------------- | ---------------------------------------------------------------------------------- |
|
|
921
|
+
| `--dir <path>` | Put the worktree at `<path>` instead of the default. |
|
|
922
|
+
| `--here` | Skip the checkout and continue in the current directory as it is. |
|
|
923
|
+
| `--force` | Replace a different session file already imported for this run. |
|
|
924
|
+
| `--print` | Print the `claude` command instead of starting it (also when `claude` is missing). |
|
|
925
|
+
|
|
926
|
+
The command downloads the transcript and checks its SHA-256 against the
|
|
927
|
+
server's before writing anything. It writes two files, both readable only by
|
|
928
|
+
you, under `~/.wardby/sessions/<run id>/`: the session as
|
|
929
|
+
`<session id>.jsonl`, and `mcp-config.json`. It never writes to Claude Code's
|
|
930
|
+
own configuration directory. It then starts Claude Code in the worktree:
|
|
931
|
+
|
|
932
|
+
```text
|
|
933
|
+
claude --resume ~/.wardby/sessions/<run id>/<session id>.jsonl \
|
|
934
|
+
--mcp-config ~/.wardby/sessions/<run id>/mcp-config.json \
|
|
935
|
+
--system-prompt-snapshot off --append-system-prompt '<move note>'
|
|
936
|
+
```
|
|
937
|
+
|
|
938
|
+
- **The move note** tells the model the session moved from the worker:
|
|
939
|
+
`/workspace` (where the run's commands ran) is now the worktree, and the
|
|
940
|
+
worker's tool is gone. `--system-prompt-snapshot off` makes Claude Code
|
|
941
|
+
apply the note to a resumed conversation. It needs Claude Code 2.1.257 or
|
|
942
|
+
later; for an older version that `claude --version` reports, it is left
|
|
943
|
+
out. When the version cannot be read (for example `claude` is not on
|
|
944
|
+
`PATH`), the printed command includes it and says so: remove it if your
|
|
945
|
+
Claude Code is older than 2.1.257.
|
|
946
|
+
- **The stand-in tool server.** Every command in a run went through the
|
|
947
|
+
worker's `run_command` tool (`wardby_tools`). The MCP config starts a
|
|
948
|
+
stand-in with the same name and input schema from the same wardby install,
|
|
949
|
+
so the resumed session shows the run's calls and their output. Under `npx`,
|
|
950
|
+
`mcp-config.json` points into the npx cache; if that cache has been
|
|
951
|
+
cleaned, run `wardby resume` again to rewrite it. The stand-in
|
|
952
|
+
runs nothing: any call answers that the session moved and to use the local
|
|
953
|
+
Bash, Read and Edit tools in the worktree.
|
|
954
|
+
- **Importing again.** An identical session file is reused. A file that has
|
|
955
|
+
grown because you continued the session locally is kept, so running the
|
|
956
|
+
command again picks up where you left off. Any other different file is
|
|
957
|
+
refused unless you pass `--force`. An existing worktree of the same
|
|
958
|
+
repository at the target path is reused as it is, with a warning when it
|
|
959
|
+
is at a different commit from the run's.
|
|
960
|
+
- **Removing an import.** Delete `~/.wardby/sessions/<run id>/` and remove
|
|
961
|
+
the worktree with `git worktree remove <path>`. The command prints both.
|
|
962
|
+
- Only Claude Code runs can be resumed; for other runs the tool returns
|
|
963
|
+
`unsupported`.
|
|
964
|
+
|
|
965
|
+
**The link is a credential.** Anyone who has it can download the transcript
|
|
966
|
+
until it expires, without signing in. Do not paste it into chats, issues or
|
|
967
|
+
logs. It works only for the run and person it was made for, and only while
|
|
968
|
+
that person can still read the run. Over the HTTP transport it points at the
|
|
969
|
+
server's own address (`MCP_CANONICAL_URI`'s origin). Over stdio it points at a
|
|
970
|
+
local port the MCP server opens on `127.0.0.1` while links are in use, so
|
|
971
|
+
your MCP client must stay connected until the download finishes. On a
|
|
972
|
+
multi-instance HTTP deployment a link made on one instance works on every
|
|
973
|
+
other: each instance derives the key that signs links from `SECRET_APP_KEY`,
|
|
974
|
+
which they already share (set `REQUEST_STATE_KEY`, 32 bytes of hex, the same
|
|
975
|
+
on every instance, to use a key of your own instead). A link made by a stdio
|
|
976
|
+
server is never accepted by the HTTP route. `wardby resume` sends the link only over HTTPS, or over plain
|
|
977
|
+
HTTP to this machine.
|
|
978
|
+
|
|
979
|
+
The token is in the link's query string (as with the secret-entry form's
|
|
980
|
+
links). Exclude `/run-transcripts/download` (and `/elicit/secret`) from
|
|
981
|
+
load-balancer, ingress and proxy access logs, or log those paths without
|
|
982
|
+
their query string.
|
|
983
|
+
|
|
984
|
+
The download responds with the gzip-compressed transcript and the headers
|
|
985
|
+
`x-wardby-sha256`, `x-wardby-session-id` and `x-wardby-transcript-meta` (the
|
|
986
|
+
run's repository and refs, as base64url JSON). A refused download returns
|
|
987
|
+
JSON `{ "error": "<code>" }`; `wardby resume` explains each code (see the
|
|
988
|
+
`errors/run-transcript-download` help article).
|
|
989
|
+
|
|
432
990
|
## Stop the setup
|
|
433
991
|
|
|
434
992
|
```sh
|