@wardby/cli 0.5.3 → 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/.env.example +33 -0
- package/README.md +25 -14
- package/deploy/local/docker-compose.quickstart-coding.yml +13 -0
- package/dist/claude-coding-worker/context.d.ts +22 -0
- package/dist/claude-coding-worker/context.js +92 -0
- package/dist/claude-coding-worker/driver.d.ts +27 -3
- package/dist/claude-coding-worker/driver.js +161 -20
- package/dist/claude-coding-worker/main.js +34 -6
- package/dist/claude-coding-worker/sdk.js +25 -5
- 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 +6 -2
- package/dist/cli-native-mode.d.ts +9 -0
- package/dist/cli-native-mode.js +20 -0
- package/dist/cli.d.ts +3 -1
- package/dist/cli.js +161 -11
- package/dist/coding/claude-context.d.ts +45 -0
- package/dist/coding/claude-context.js +434 -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/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 +50 -118
- package/dist/coding/profile.js +51 -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 +292 -270
- package/dist/coding/protocol.js +322 -15
- 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 +16 -3
- package/dist/coding-worker/artifact.js +5 -3
- 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 +118 -38
- package/dist/coding-worker/errors.d.ts +1 -0
- package/dist/coding-worker/errors.js +32 -0
- package/dist/coding-worker/sdk.d.ts +6 -0
- package/dist/coding-worker/sdk.js +1 -0
- package/dist/coding-worker/skills.d.ts +23 -0
- package/dist/coding-worker/skills.js +117 -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 +13 -0
- package/dist/config/dependency-cache.d.ts +23 -0
- package/dist/config/dependency-cache.js +32 -0
- package/dist/config/github-allowed-accounts.d.ts +15 -0
- package/dist/config/github-allowed-accounts.js +36 -0
- package/dist/config/low-power.d.ts +12 -0
- package/dist/config/low-power.js +18 -0
- package/dist/config/mobile.d.ts +12 -0
- package/dist/config/mobile.js +18 -0
- package/dist/config/providers.d.ts +65 -3
- package/dist/config/providers.js +147 -11
- 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/db.d.ts +16 -6
- package/dist/core/db.js +12 -10
- 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 +53 -0
- package/dist/core/dispatch.js +167 -57
- package/dist/core/engine-native.js +10 -6
- 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 +67 -5
- package/dist/core/host-events.js +571 -37
- 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 +151 -20
- package/dist/core/issue-events.d.ts +1 -1
- package/dist/core/issue-events.js +16 -11
- package/dist/core/issue-status.d.ts +1 -1
- package/dist/core/issue-status.js +68 -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/memory-tools.js +7 -0
- package/dist/core/merge-order-check.d.ts +130 -0
- package/dist/core/merge-order-check.js +343 -0
- package/dist/core/notification-dispatcher.d.ts +70 -0
- package/dist/core/notification-dispatcher.js +368 -0
- package/dist/core/notification-templates.d.ts +19 -0
- package/dist/core/notification-templates.js +139 -0
- package/dist/core/notifications.d.ts +10 -0
- package/dist/core/notifications.js +38 -0
- package/dist/core/pg-auth.d.ts +22 -0
- package/dist/core/pg-auth.js +152 -0
- package/dist/core/power-composition.d.ts +16 -0
- package/dist/core/power-composition.js +37 -0
- package/dist/core/power-idle.d.ts +14 -0
- package/dist/core/power-idle.js +30 -0
- package/dist/core/power.d.ts +71 -0
- package/dist/core/power.js +202 -0
- package/dist/core/pull-request-state-sync.js +2 -2
- package/dist/core/reconciler.d.ts +8 -5
- package/dist/core/reconciler.js +37 -6
- package/dist/core/related-pull-requests.d.ts +59 -7
- package/dist/core/related-pull-requests.js +140 -25
- package/dist/core/reply-parts.d.ts +21 -0
- package/dist/core/reply-parts.js +73 -0
- package/dist/core/repo-access.d.ts +15 -0
- package/dist/core/repo-access.js +66 -0
- package/dist/core/review-fix.d.ts +38 -1
- package/dist/core/review-fix.js +209 -7
- package/dist/core/review-host-checks.d.ts +1 -1
- package/dist/core/review-host-tools.d.ts +23 -0
- package/dist/core/review-host-tools.js +156 -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 +384 -5
- package/dist/core/runner.js +1244 -372
- 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 +39 -0
- package/dist/core/secret-broker-config.js +112 -0
- 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/secrets.d.ts +39 -4
- package/dist/core/secrets.js +148 -40
- package/dist/core/stop-run.d.ts +46 -0
- package/dist/core/stop-run.js +61 -0
- package/dist/core/workflow-event-recorder.d.ts +14 -0
- package/dist/core/workflow-event-recorder.js +120 -0
- package/dist/core/workflow-events.d.ts +94 -0
- package/dist/core/workflow-events.js +48 -0
- package/dist/core/workflow-run-events.d.ts +18 -0
- package/dist/core/workflow-run-events.js +75 -0
- 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 +92 -3
- package/dist/generated/prisma/client.d.ts +92 -3
- package/dist/generated/prisma/commonInputTypes.d.ts +364 -54
- package/dist/generated/prisma/enums.d.ts +37 -0
- package/dist/generated/prisma/enums.js +31 -0
- package/dist/generated/prisma/internal/class.d.ts +132 -0
- package/dist/generated/prisma/internal/class.js +4 -4
- package/dist/generated/prisma/internal/prismaNamespace.d.ts +1332 -142
- package/dist/generated/prisma/internal/prismaNamespace.js +227 -5
- package/dist/generated/prisma/internal/prismaNamespaceBrowser.d.ts +234 -0
- package/dist/generated/prisma/internal/prismaNamespaceBrowser.js +227 -5
- package/dist/generated/prisma/models/Agent.d.ts +464 -7
- package/dist/generated/prisma/models/AgentRepository.d.ts +42 -1
- package/dist/generated/prisma/models/CodingAgentProfile.d.ts +301 -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 +1841 -1
- package/dist/generated/prisma/models/DeferredReview.d.ts +78 -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 +1713 -0
- package/dist/generated/prisma/models/NativeGatewayCall.js +1 -0
- package/dist/generated/prisma/models/NativeGatewaySession.d.ts +1551 -0
- package/dist/generated/prisma/models/NativeGatewaySession.js +1 -0
- package/dist/generated/prisma/models/NativeWarmWorker.d.ts +1296 -0
- package/dist/generated/prisma/models/NativeWarmWorker.js +1 -0
- package/dist/generated/prisma/models/NotificationChannel.d.ts +1543 -0
- package/dist/generated/prisma/models/NotificationChannel.js +1 -0
- package/dist/generated/prisma/models/NotificationDelivery.d.ts +1502 -0
- package/dist/generated/prisma/models/NotificationDelivery.js +1 -0
- package/dist/generated/prisma/models/NotificationThread.d.ts +1090 -0
- package/dist/generated/prisma/models/NotificationThread.js +1 -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/Run.d.ts +1619 -58
- package/dist/generated/prisma/models/RunBudgetEvent.d.ts +1211 -0
- package/dist/generated/prisma/models/RunBudgetEvent.js +1 -0
- package/dist/generated/prisma/models/RunHostCheck.d.ts +36 -1
- 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 +37 -1
- package/dist/generated/prisma/models/SecretBrokerChange.d.ts +1101 -0
- package/dist/generated/prisma/models/SecretBrokerChange.js +1 -0
- package/dist/generated/prisma/models/WorkflowEvent.d.ts +1422 -0
- package/dist/generated/prisma/models/WorkflowEvent.js +1 -0
- package/dist/generated/prisma/models.d.ts +12 -0
- package/dist/help/build.js +4 -2
- package/dist/help/catalog.d.ts +1 -1
- package/dist/help/catalog.js +31 -6
- package/dist/help-index.json +2584 -146
- package/dist/import/create.js +49 -3
- package/dist/import/neutral-schema.d.ts +50 -277
- 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 +11 -2
- package/dist/mcp/auth/access.js +15 -1
- package/dist/mcp/auth/ownership.d.ts +7 -7
- package/dist/mcp/auth/repo-authorization.js +14 -0
- package/dist/mcp/auth/resource-server.d.ts +2 -1
- package/dist/mcp/auth/resource-server.js +7 -2
- package/dist/mcp/auth/self-hosted/browser.d.ts +1 -1
- package/dist/mcp/auth/self-hosted/browser.js +19 -6
- 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 +6 -0
- package/dist/mcp/host-events/github-ingress.d.ts +25 -1
- package/dist/mcp/host-events/github-ingress.js +70 -1
- package/dist/mcp/index.d.ts +19 -0
- package/dist/mcp/index.js +117 -20
- 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 +277 -24
- 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.d.ts +2 -0
- package/dist/mcp/tools/notification-channels.js +293 -0
- package/dist/mcp/tools/packages.d.ts +2 -0
- package/dist/mcp/tools/packages.js +195 -0
- package/dist/mcp/tools/power.d.ts +2 -0
- package/dist/mcp/tools/power.js +77 -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.d.ts +0 -6
- package/dist/mcp/tools/runs.js +41 -14
- package/dist/mcp/tools/scheduling.js +3 -1
- package/dist/mcp/tools/secret-broker-compat.d.ts +12 -0
- package/dist/mcp/tools/secret-broker-compat.js +23 -0
- package/dist/mcp/tools/secret-elicitation-form.d.ts +22 -2
- package/dist/mcp/tools/secret-elicitation-form.js +205 -10
- package/dist/mcp/tools/secret-elicitation-server.d.ts +6 -0
- package/dist/mcp/tools/secret-elicitation-server.js +10 -54
- package/dist/mcp/tools/secret-elicitation.d.ts +38 -3
- package/dist/mcp/tools/secret-elicitation.js +110 -12
- package/dist/mcp/tools/secrets.js +186 -9
- 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 +2 -2
- package/dist/mcp/tools/tools.js +47 -11
- 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/composition.d.ts +23 -0
- package/dist/native-worker/composition.js +77 -0
- package/dist/native-worker/docker-isolation.d.ts +65 -0
- package/dist/native-worker/docker-isolation.js +183 -0
- package/dist/native-worker/docker-launcher.d.ts +110 -0
- package/dist/native-worker/docker-launcher.js +297 -0
- package/dist/native-worker/gateway-server.d.ts +77 -0
- package/dist/native-worker/gateway-server.js +412 -0
- package/dist/native-worker/gateway.d.ts +70 -0
- package/dist/native-worker/gateway.js +263 -0
- package/dist/native-worker/http-server.d.ts +24 -0
- package/dist/native-worker/http-server.js +113 -0
- package/dist/native-worker/http-transport.d.ts +17 -0
- package/dist/native-worker/http-transport.js +88 -0
- package/dist/native-worker/kubernetes-isolation.d.ts +90 -0
- package/dist/native-worker/kubernetes-isolation.js +218 -0
- package/dist/native-worker/kubernetes-launcher.d.ts +106 -0
- package/dist/native-worker/kubernetes-launcher.js +375 -0
- package/dist/native-worker/launch.d.ts +62 -0
- package/dist/native-worker/launch.js +49 -0
- package/dist/native-worker/ledger.d.ts +125 -0
- package/dist/native-worker/ledger.js +245 -0
- package/dist/native-worker/loopback.d.ts +12 -0
- package/dist/native-worker/loopback.js +44 -0
- package/dist/native-worker/main.d.ts +8 -0
- package/dist/native-worker/main.js +85 -0
- package/dist/native-worker/protocol.d.ts +296 -0
- package/dist/native-worker/protocol.js +246 -0
- package/dist/native-worker/sandbox-executor.d.ts +83 -0
- package/dist/native-worker/sandbox-executor.js +284 -0
- 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 +29 -0
- package/dist/native-worker/stdio.js +189 -0
- package/dist/native-worker/warm-delivery.d.ts +16 -0
- package/dist/native-worker/warm-delivery.js +33 -0
- package/dist/native-worker/warm-pool-ledger.d.ts +39 -0
- package/dist/native-worker/warm-pool-ledger.js +73 -0
- package/dist/native-worker/warm-pool.d.ts +107 -0
- package/dist/native-worker/warm-pool.js +283 -0
- package/dist/native-worker/worker.d.ts +17 -0
- package/dist/native-worker/worker.js +141 -0
- package/dist/observability/metrics.js +6 -1
- package/dist/providers/auth/authorization-server.d.ts +3 -0
- package/dist/providers/auth/index.js +2 -0
- package/dist/providers/auth/self-hosted.d.ts +14 -2
- package/dist/providers/auth/self-hosted.js +54 -4
- package/dist/providers/chat/fake.d.ts +46 -0
- package/dist/providers/chat/fake.js +39 -0
- package/dist/providers/chat/index.d.ts +4 -0
- package/dist/providers/chat/index.js +8 -0
- package/dist/providers/chat/slack.d.ts +37 -0
- package/dist/providers/chat/slack.js +105 -0
- package/dist/providers/chat/types.d.ts +42 -0
- package/dist/providers/chat/types.js +19 -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/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 +36 -2
- package/dist/providers/engine/types.js +39 -0
- package/dist/providers/executor/composition.d.ts +31 -1
- package/dist/providers/executor/composition.js +81 -8
- package/dist/providers/executor/container.d.ts +385 -9
- package/dist/providers/executor/container.js +1234 -99
- 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 +91 -0
- package/dist/providers/executor/dbos.js +319 -26
- package/dist/providers/executor/deferred.d.ts +44 -0
- package/dist/providers/executor/deferred.js +100 -0
- 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 +39 -10
- package/dist/providers/executor/routing.js +77 -32
- package/dist/providers/executor/types.d.ts +25 -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 +29 -4
- package/dist/providers/jobs/fake-kubernetes-api.d.ts +23 -2
- package/dist/providers/jobs/fake-kubernetes-api.js +45 -1
- package/dist/providers/jobs/kubernetes-api.d.ts +25 -1
- package/dist/providers/jobs/kubernetes-api.js +17 -0
- package/dist/providers/jobs/kubernetes-client.d.ts +10 -1
- package/dist/providers/jobs/kubernetes-client.js +61 -3
- package/dist/providers/jobs/kubernetes-dry-run-fixture.d.ts +6 -1
- package/dist/providers/jobs/kubernetes-dry-run-fixture.js +6 -3
- package/dist/providers/jobs/kubernetes-isolation.d.ts +5 -1
- package/dist/providers/jobs/kubernetes-isolation.js +23 -1
- package/dist/providers/jobs/kubernetes-platform.d.ts +4 -1
- package/dist/providers/jobs/kubernetes-platform.js +38 -1
- package/dist/providers/jobs/kubernetes-preflight.d.ts +2 -1
- package/dist/providers/jobs/kubernetes-preflight.js +4 -2
- package/dist/providers/jobs/kubernetes.d.ts +42 -2
- package/dist/providers/jobs/kubernetes.js +178 -19
- package/dist/providers/jobs/metadata-probes.d.ts +11 -0
- package/dist/providers/jobs/metadata-probes.js +13 -0
- package/dist/providers/jobs/types.d.ts +42 -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 +39 -2
- package/dist/providers/review-host/github.js +274 -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 +157 -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 +246 -12
- package/dist/providers/vcs/github.js +521 -61
- 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 +21 -3
- package/dist/quickstart/coding-seed.js +283 -3
- package/dist/quickstart/images.d.ts +2 -0
- package/dist/quickstart/images.js +7 -1
- 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/brokered-fetch.d.ts +23 -0
- package/dist/sandbox/brokered-fetch.js +37 -0
- 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 +35 -0
- package/dist/sandbox/host-functions.js +150 -91
- package/dist/sandbox/prelude.js +7 -1
- package/dist/sandbox/run-in-sandbox.d.ts +19 -0
- package/dist/sandbox/run-in-sandbox.js +28 -10
- package/dist/sandbox/safe-fetch.d.ts +2 -0
- package/dist/sandbox/safe-fetch.js +3 -1
- package/dist/sandbox/secret-broker-sigv4.d.ts +2 -0
- package/dist/sandbox/secret-broker-sigv4.js +49 -0
- package/dist/sandbox/secret-broker.d.ts +34 -0
- package/dist/sandbox/secret-broker.js +161 -0
- package/dist/sandbox/tool-capabilities.d.ts +10 -30
- package/dist/sandbox/user-tool.d.ts +14 -0
- package/dist/sandbox/user-tool.js +32 -0
- package/dist/sandbox/zod-params.d.ts +37 -5
- package/dist/sandbox/zod-params.js +181 -26
- package/dist/serve.js +25 -0
- package/dist/viewer/api-schema.d.ts +372 -2454
- package/dist/viewer/api-schema.js +29 -0
- package/dist/viewer/build-schemas.js +10 -3
- package/dist/viewer/event-bus.d.ts +6 -0
- package/dist/viewer/event-bus.js +16 -7
- package/dist/viewer/graph.d.ts +5 -2
- package/dist/viewer/graph.js +7 -2
- package/dist/viewer/http.d.ts +0 -1
- package/dist/viewer/http.js +2 -2
- package/dist/viewer/infra.js +25 -2
- package/dist/viewer/limits.d.ts +4 -0
- package/dist/viewer/limits.js +4 -0
- package/dist/viewer/openapi.d.ts +15 -0
- package/dist/viewer/openapi.js +170 -0
- package/dist/wardby-bin.js +10 -0
- package/docs/README.md +7 -0
- package/docs/agent-recipes.md +114 -27
- package/docs/architecture-runtime.md +16 -1
- package/docs/code-review-agents.md +689 -45
- package/docs/coding-agent-setup.md +602 -12
- package/docs/coding-packages.md +1037 -92
- package/docs/coding-services.md +30 -13
- package/docs/coding-worker-byo-images.md +218 -6
- package/docs/coding-worker-isolation.md +173 -44
- package/docs/getting-started-gke.md +332 -129
- package/docs/getting-started-identity-provider.md +31 -11
- package/docs/getting-started.md +14 -4
- package/docs/jira-agents.md +22 -9
- 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 +731 -0
- package/docs/observability.md +4 -0
- package/docs/release-verification.md +9 -0
- package/docs/security-deployment.md +146 -14
- package/docs/slack-notifications.md +268 -0
- package/docs/tool-secrets.md +284 -0
- package/docs/viewer-api.md +46 -5
- package/docs/viewer-api.openapi.yml +1404 -0
- package/help/admin-viewer.md +29 -3
- package/help/agent-recipes.md +27 -0
- package/help/architecture-agent.md +11 -6
- package/help/brokered-secrets.md +79 -0
- package/help/build-claude-code-image.md +131 -0
- package/help/build-worker-image.md +6 -7
- package/help/builder-agent.md +19 -6
- package/help/code-review-agents.md +243 -10
- 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 +23 -9
- package/help/deployment-targets.md +25 -14
- package/help/errors/budget-exhausted.md +187 -0
- package/help/errors/budget-group-exhausted.md +5 -1
- package/help/errors/coding-provider-not-configured.md +2 -2
- 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 +28 -0
- 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 +29 -0
- package/help/errors/graph-incomplete.md +43 -0
- package/help/errors/graph-limit.md +43 -0
- package/help/errors/low-power-disabled.md +29 -0
- package/help/errors/low-power-scale-forbidden.md +35 -0
- package/help/errors/low-power-wake-timeout.md +30 -0
- package/help/errors/merge-conflict.md +49 -0
- package/help/errors/mobile-disabled.md +31 -0
- package/help/errors/native-sandbox-capacity.md +22 -0
- package/help/errors/native-sandbox-deadline-exceeded.md +19 -0
- package/help/errors/native-sandbox-docker-failed.md +20 -0
- package/help/errors/native-sandbox-gateway-error.md +20 -0
- package/help/errors/native-sandbox-gateway-unavailable.md +21 -0
- package/help/errors/native-sandbox-image-not-pinned.md +19 -0
- package/help/errors/native-sandbox-isolation-mismatch.md +20 -0
- package/help/errors/native-sandbox-launch-abandoned.md +21 -0
- package/help/errors/native-sandbox-network-unenforced.md +22 -0
- package/help/errors/native-sandbox-requires-catalog.md +31 -0
- package/help/errors/native-sandbox-unavailable.md +19 -0
- package/help/errors/native-sandbox-warm-delivery-failed.md +21 -0
- package/help/errors/native-sandbox-worker-exited.md +21 -0
- package/help/errors/native-sandbox-worker-lost.md +20 -0
- package/help/errors/native-sandbox-worker-unready.md +22 -0
- 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-broker-body-invalid.md +26 -0
- package/help/errors/secret-broker-changed.md +20 -0
- package/help/errors/secret-broker-config-invalid.md +30 -0
- package/help/errors/secret-broker-conflict.md +27 -0
- package/help/errors/secret-broker-destination-denied.md +28 -0
- package/help/errors/secret-broker-value-invalid.md +28 -0
- package/help/errors/secret-brokered.md +24 -0
- package/help/errors/secret-in-value.md +69 -0
- package/help/errors/secret-not-brokered.md +25 -0
- package/help/errors/slack-auth-failed.md +48 -0
- package/help/errors/slack-channel-unreachable.md +39 -0
- package/help/errors/slack-not-configured.md +33 -0
- package/help/errors/target-merge.md +40 -0
- package/help/fix-merge-conflicts.md +73 -0
- package/help/getting-started.md +4 -5
- package/help/github-app-setup.md +132 -0
- package/help/github.md +40 -1
- package/help/identity-and-access.md +7 -1
- package/help/jira.md +23 -6
- package/help/knowledge.md +16 -7
- package/help/local-repositories.md +3 -4
- package/help/low-power-mode.md +131 -0
- package/help/merge-order-check.md +122 -0
- package/help/mobile-app.md +54 -0
- package/help/native-capabilities.md +29 -1
- package/help/native-sandbox.md +150 -0
- package/help/observability.md +8 -0
- package/help/operating-agents.md +5 -0
- package/help/package-audit-mode.md +91 -0
- package/help/related-pull-requests.md +80 -16
- package/help/repo-instructions-and-skills.md +91 -0
- package/help/resume-runs-locally.md +131 -0
- package/help/review-fix-rounds.md +43 -1
- package/help/sharing-agents.md +59 -0
- package/help/slack-notifications.md +76 -0
- 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 +99 -7
- package/package.json +27 -13
- package/prisma/migrations/20261009000003_native_execution_mode/migration.sql +12 -0
- package/prisma/migrations/20261009000004_native_gateway_ledger/migration.sql +65 -0
- package/prisma/migrations/20261009000005_native_gateway_call_child_agent/migration.sql +5 -0
- package/prisma/migrations/20261009000006_run_deferred_start_stop/migration.sql +14 -0
- package/prisma/migrations/20261009000007_native_gateway_network_ready/migration.sql +5 -0
- package/prisma/migrations/20261010000001_workflow_notifications/migration.sql +99 -0
- package/prisma/migrations/20261011000001_native_gateway_session_status_index/migration.sql +2 -0
- package/prisma/migrations/20261012000001_native_warm_worker/migration.sql +32 -0
- package/prisma/migrations/20261013000001_coding_run_merge_order/migration.sql +2 -0
- package/prisma/migrations/20261013000001_secret_broker/migration.sql +17 -0
- package/prisma/migrations/20261013000002_deferred_review_request/migration.sql +4 -0
- package/prisma/migrations/20261014000000_repo_skills/migration.sql +15 -0
- package/prisma/migrations/20261015000001_coding_run_merge_order_index/migration.sql +2 -0
- package/prisma/migrations/20261015000002_no_change_rereview/migration.sql +2 -0
- 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 +631 -146
- package/dist/sandbox/generated/zod-to-json-schema.bundle.js +0 -5
|
@@ -3,6 +3,9 @@
|
|
|
3
3
|
This is the supported Google Cloud deployment path for Wardby. It creates a
|
|
4
4
|
GKE Autopilot cluster, Artifact Registry, private-IP Cloud SQL for PostgreSQL,
|
|
5
5
|
isolated coding workers, an HTTPS Gateway, and the Wardby control plane.
|
|
6
|
+
Before accepting production work, complete the
|
|
7
|
+
[release verification](release-verification.md) and
|
|
8
|
+
[security deployment](security-deployment.md) checks.
|
|
6
9
|
|
|
7
10
|
The older `deploy/gcp` Cloud Run module is deprecated. New deployments should
|
|
8
11
|
use `deploy/gke` and the `gke-autopilot` Kubernetes overlay described here.
|
|
@@ -14,7 +17,10 @@ use `deploy/gke` and the `gke-autopilot` Kubernetes overlay described here.
|
|
|
14
17
|
## Architecture
|
|
15
18
|
|
|
16
19
|
- The Wardby control plane and coding proxy run in GKE Autopilot.
|
|
17
|
-
- Each Codex coding run uses an ephemeral gVisor-backed pod
|
|
20
|
+
- Each Codex or Claude Code coding run uses an ephemeral gVisor-backed pod;
|
|
21
|
+
Claude Code adds a tool-runner sidecar in that pod.
|
|
22
|
+
- Native agents set to sandbox mode run in single-use gVisor pods behind the
|
|
23
|
+
native gateway (see "Native sandbox" below).
|
|
18
24
|
- Cloud SQL PostgreSQL has no public IP and is reached through private services
|
|
19
25
|
access on the cluster's VPC.
|
|
20
26
|
- Runtime, migration, and worker images are stored in Artifact Registry and
|
|
@@ -44,6 +50,7 @@ Install and authenticate:
|
|
|
44
50
|
- `kubectl`
|
|
45
51
|
- Helm 3 or later (installs External Secrets Operator)
|
|
46
52
|
- Node.js 24 and npm
|
|
53
|
+
- `curl`, `openssl` and `base64` (the database grants step uses them)
|
|
47
54
|
|
|
48
55
|
You also need:
|
|
49
56
|
|
|
@@ -176,6 +183,41 @@ seeded: add it to the control plane's `env` in
|
|
|
176
183
|
`deploy/kind-coding/manifests/overlays/gke-autopilot/control-plane.yaml` if you
|
|
177
184
|
need it.
|
|
178
185
|
|
|
186
|
+
To post [workflow notifications to Slack](slack-notifications.md), also add the
|
|
187
|
+
Slack app's bot token. This requires Wardby 0.6.0 or later. It is optional:
|
|
188
|
+
|
|
189
|
+
```dotenv
|
|
190
|
+
WARDBY_SLACK_BOT_TOKEN="xoxb-..."
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
When it is in Secret Manager, `up.sh` syncs it into a separate Secret,
|
|
194
|
+
`wardby-slack-env`, that only the control plane reads; when it is not, it
|
|
195
|
+
leaves that Secret out and Slack stays off. `WARDBY_SLACK_CUSTOMIZE` and
|
|
196
|
+
`WARDBY_SLACK_API_BASE_URL` are not secrets and are not seeded: add them to the
|
|
197
|
+
control plane's `env` in the same `control-plane.yaml` if you need them. If you
|
|
198
|
+
later remove the bot token, remove these two entries too: the control plane
|
|
199
|
+
refuses to start with either one set and no token.
|
|
200
|
+
|
|
201
|
+
`WARDBY_GITHUB_ALLOWED_ACCOUNTS` (optional, not a secret) adds GitHub accounts
|
|
202
|
+
the App serves besides its owner. Pass it to `up.sh` on every run, for example
|
|
203
|
+
`WARDBY_GITHUB_ALLOWED_ACCOUNTS=acme-labs WARDBY_HOSTNAME=app.example.com deploy/gke/up.sh`;
|
|
204
|
+
a run without it serves only the App's owner. `up.sh` gives the same value to
|
|
205
|
+
the control plane and to the native sandbox gateway, which runs sandboxed
|
|
206
|
+
agents' repository tools. See
|
|
207
|
+
[Which accounts the App serves](code-review-agents.md#which-accounts-the-app-serves-wardby_github_allowed_accounts).
|
|
208
|
+
|
|
209
|
+
`WARDBY_MOBILE_ENABLED=true` (optional, not a secret) lets the Wardby mobile app
|
|
210
|
+
sign in to the self-hosted OAuth server. Pass it to `up.sh` on every run, the
|
|
211
|
+
same way as `WARDBY_GITHUB_ALLOWED_ACCOUNTS`; a run without it turns mobile
|
|
212
|
+
sign-in off. It works for normal and low-power deploys. White-label builds that
|
|
213
|
+
use their own redirect URI add `WARDBY_MOBILE_REDIRECT_URI` to the control
|
|
214
|
+
plane's `env` themselves. See the help article `mobile-app`.
|
|
215
|
+
|
|
216
|
+
`WARDBY_MENTION_EXPLANATIONS=false` (optional, not a secret) stops the GitHub
|
|
217
|
+
App replying to say why a mention started nothing; pass it to `up.sh` on every
|
|
218
|
+
run, the same way. See
|
|
219
|
+
[What a linked review agent does](code-review-agents.md#what-a-linked-review-agent-does).
|
|
220
|
+
|
|
179
221
|
Generate `SECRET_APP_KEY` with:
|
|
180
222
|
|
|
181
223
|
```sh
|
|
@@ -189,6 +231,13 @@ on. A value already in Secret Manager is never overwritten, so after the first
|
|
|
189
231
|
deployment Secret Manager is the source of truth. You can then remove the
|
|
190
232
|
production values from `.env.local`.
|
|
191
233
|
|
|
234
|
+
External Secrets Operator runs as three small pods in the `external-secrets`
|
|
235
|
+
namespace. `deploy/gke/eso-values.yaml` requests 100m CPU and 256 MiB of
|
|
236
|
+
memory for each (memory limited to the same), because Autopilot bills a pod
|
|
237
|
+
that requests nothing at 500m CPU and 2 GiB. If one is ever restarted for
|
|
238
|
+
exceeding its memory limit, raise the limit and request together in that file
|
|
239
|
+
and re-run `up.sh`; the Secrets it already synced are unaffected.
|
|
240
|
+
|
|
192
241
|
Redeploying onto a cluster that already runs Wardby carries its existing
|
|
193
242
|
`SECRET_APP_KEY` and login signing keys over, so stored credentials still
|
|
194
243
|
decrypt and nobody has to sign in again.
|
|
@@ -249,9 +298,20 @@ The deployment script is idempotent. It converges Terraform, builds and pushes
|
|
|
249
298
|
renders the GKE overlay, and waits for the proxy and control plane:
|
|
250
299
|
|
|
251
300
|
```sh
|
|
252
|
-
|
|
301
|
+
WARDBY_HOSTNAME=wardby.example.com deploy/gke/up.sh
|
|
253
302
|
```
|
|
254
303
|
|
|
304
|
+
Set `WARDBY_HOSTNAME`, not `HOSTNAME`: shells set `HOSTNAME` to the machine's own
|
|
305
|
+
name, so the script no longer reads it. It refuses a hostname with no dot, or a
|
|
306
|
+
local name such as `*.lan`, `*.local`, or `*.internal`. If you deployed with an
|
|
307
|
+
earlier version using `HOSTNAME=...`, pass the same value as `WARDBY_HOSTNAME`.
|
|
308
|
+
|
|
309
|
+
If the cluster is already published on a different hostname, the script stops
|
|
310
|
+
before building anything: moving the hostname breaks DNS, every client's
|
|
311
|
+
configured endpoint, and every issued token. In a terminal it asks you to type
|
|
312
|
+
the new hostname; elsewhere, set `WARDBY_HOSTNAME_CHANGE` to the new hostname to
|
|
313
|
+
confirm the move.
|
|
314
|
+
|
|
255
315
|
Point the hostname's public A record at the reserved address:
|
|
256
316
|
|
|
257
317
|
```sh
|
|
@@ -263,10 +323,9 @@ Allow DNS and the managed certificate to converge before treating an HTTPS
|
|
|
263
323
|
failure as an application failure.
|
|
264
324
|
|
|
265
325
|
On a brand-new project, run `terraform apply` and then
|
|
266
|
-
`bootstrap-database-iam.sh` before `up.sh`: the bootstrap has to
|
|
267
|
-
migrator before any migration can run. See "Database login" below
|
|
268
|
-
|
|
269
|
-
bootstrap run has granted the coding proxy too.
|
|
326
|
+
`bootstrap-database-iam.sh` once before the first `up.sh`: the bootstrap has to
|
|
327
|
+
grant the migrator before any migration can run. See "Database login" below
|
|
328
|
+
for the exact order.
|
|
270
329
|
|
|
271
330
|
### Database login
|
|
272
331
|
|
|
@@ -275,19 +334,19 @@ through the Cloud SQL Auth Proxy, via Workload Identity from one Kubernetes
|
|
|
275
334
|
service account. What each may do inside the database comes from a `NOLOGIN`
|
|
276
335
|
group role in `deploy/gke/database-grants.sql`:
|
|
277
336
|
|
|
278
|
-
| Workload
|
|
279
|
-
|
|
|
280
|
-
| Control plane
|
|
281
|
-
| Coding proxy
|
|
282
|
-
|
|
|
337
|
+
| Workload | Google service account | Kubernetes service account | May do |
|
|
338
|
+
| -------------- | ------------------------ | -------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
339
|
+
| Control plane | `<name_prefix>-app` | `wardby-control-plane` | `wardby_app`: read/write every table, including the durable executor's in schema `dbos`; never change a schema |
|
|
340
|
+
| Coding proxy | `<name_prefix>-proxy` | `wardby-coding-proxy` | `wardby_proxy`: its budget ledger (`CodingProxySession`/`CodingProxyRequest`/`RunModelUsage`: read, insert, update), the package registry's tables (`RegistryAllowance`, `RegistryFetch`, `RegistryAuditRecord`, `RegistryVersionFact`, `RegistryApprovedVersion`, `RegistryPlanRefusal`: read and insert only), the dependency cache's `DependencySnapshot` (read, insert, update, delete), update `tokensIn`, `tokensOut`, `costUsd` and `turns` on `Run` and read only its `id`, and read only the `runId`, `packageAllowlist`, `packagePolicy`, `repository`, `workerImage`, `toolImage`, `dependencyCache` and `packageAuditMode` columns of `CodingRun` |
|
|
341
|
+
| Native gateway | `<name_prefix>-gateway` | `wardby-native-gateway` | Member of `wardby_app`: the same data access as the control plane, under its own login (see [Native sandbox](#native-sandbox)) |
|
|
342
|
+
| Migrations | `<name_prefix>-migrator` | `wardby-migrator` | Acts as the table owner (`SET ROLE`), so `prisma migrate deploy` and `dbos schema` can alter and create tables |
|
|
283
343
|
|
|
284
344
|
`deploy/gke/bootstrap-database-iam.sh` applies the grants as the built-in
|
|
285
|
-
owner, from a short-lived Job inside the cluster.
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
grants
|
|
290
|
-
The grants run in one transaction, so a statement the database refuses leaves
|
|
345
|
+
owner, from a short-lived Job inside the cluster. `up.sh` runs it on every
|
|
346
|
+
deploy, after the migrations and before the rollout (see
|
|
347
|
+
[Upgrading an existing deployment](#upgrading-an-existing-deployment)); you
|
|
348
|
+
run it by hand only on a brand-new project, below, or with `--check`. The
|
|
349
|
+
grants run in one transaction, so a statement the database refuses leaves
|
|
291
350
|
nothing applied.
|
|
292
351
|
|
|
293
352
|
The built-in owner is not a Terraform resource: `bootstrap-database-iam.sh`
|
|
@@ -299,110 +358,25 @@ ever stored, printed, or passed as a process argument.
|
|
|
299
358
|
A brand-new project runs, in this order:
|
|
300
359
|
|
|
301
360
|
1. `terraform -chdir=deploy/gke apply` — creates the cluster, the instance
|
|
302
|
-
and the
|
|
361
|
+
and the four IAM database users. Run it yourself rather than through
|
|
303
362
|
`up.sh`, which would go on to the migrations before the migrator has its
|
|
304
363
|
grants.
|
|
305
|
-
2. `deploy/gke/bootstrap-database-iam.sh`
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
3. `deploy/gke/up.sh` — applies the migrations
|
|
310
|
-
|
|
311
|
-
exist in step 2.
|
|
312
|
-
4. `deploy/gke/bootstrap-database-iam.sh` again — now that the tables exist,
|
|
313
|
-
also applies the coding proxy's ledger grants.
|
|
314
|
-
5. `deploy/gke/up.sh` — rolls out again and passes every check.
|
|
315
|
-
|
|
316
|
-
Two bootstrap runs, not one: a grant on a named table can't apply before the
|
|
317
|
-
migration that creates that table has run.
|
|
318
|
-
|
|
319
|
-
The same applies to every later release that adds a table the coding proxy
|
|
320
|
-
uses: run `bootstrap-database-iam.sh` again after its migration. `up.sh`
|
|
321
|
-
checks this for you. After the rollout it asks the database, as the proxy's
|
|
322
|
-
own role, for every privilege `database-grants.sql` gives `wardby_proxy`
|
|
323
|
-
(`deploy/gke/proxy-grant-checks.mjs`), and stops with the list of missing
|
|
324
|
-
grants instead of letting the proxy fail registry requests with "permission
|
|
325
|
-
denied".
|
|
326
|
-
|
|
327
|
-
After upgrading an existing deployment to a release with cost attribution,
|
|
328
|
-
re-run `bootstrap-database-iam.sh` so the coding proxy can record per-model
|
|
329
|
-
usage for coding runs (used by the `cost_report` tool's `model` grouping).
|
|
330
|
-
Until then coding runs still work, but their per-model breakdown isn't
|
|
331
|
-
recorded.
|
|
364
|
+
2. `deploy/gke/bootstrap-database-iam.sh` — fetches the cluster's kubectl
|
|
365
|
+
credentials if you don't have them yet, creates the owner, and applies the
|
|
366
|
+
migrator's (and the app's) grants. Grants on tables that don't exist yet
|
|
367
|
+
are skipped: expected.
|
|
368
|
+
3. `deploy/gke/up.sh` — applies the migrations, then the grants again (now
|
|
369
|
+
that every table exists), then rolls out and passes every check.
|
|
332
370
|
|
|
333
371
|
`bootstrap-database-iam.sh --check` runs the grants inside a transaction that
|
|
334
372
|
is then rolled back, and reports success or the exact statement the database
|
|
335
|
-
refused, without changing
|
|
336
|
-
deployment.
|
|
373
|
+
refused, without changing any grant. Use it to see why a grants step failed.
|
|
337
374
|
|
|
338
375
|
`connector_enforcement` (the Cloud SQL instance setting) defaults to
|
|
339
376
|
`REQUIRED`: it refuses any connection that does not come through the Auth
|
|
340
377
|
Proxy or a Cloud SQL connector, and with port 5432 to the instance closed in
|
|
341
378
|
every NetworkPolicy, there's no route left for a plain Postgres connection to
|
|
342
|
-
even attempt. Leave it at the default
|
|
343
|
-
login moves off it on an earlier revision of this module, below.
|
|
344
|
-
|
|
345
|
-
### Moving an older deployment
|
|
346
|
-
|
|
347
|
-
A deployment still on password login — from before this module retired it —
|
|
348
|
-
can't adopt this revision directly: this revision no longer syncs the
|
|
349
|
-
password `DATABASE_URL`, closes port 5432 and refuses non-Auth-Proxy
|
|
350
|
-
connections, which would cut off pods still logging in with the password.
|
|
351
|
-
It moves over in stages, because real pods are already serving traffic
|
|
352
|
-
throughout.
|
|
353
|
-
|
|
354
|
-
**1–2. Cut the running pods to IAM login, on the revision before this one.**
|
|
355
|
-
Check out the revision of this module that added IAM login, before the
|
|
356
|
-
password was retired: the merge of pull request #83 into `main`.
|
|
357
|
-
`git log --oneline --first-parent main -- deploy/gke` lists the merges that
|
|
358
|
-
changed this module, newest first; it's the one titled
|
|
359
|
-
`Merge pull request #83 ...`, just below the merge that retired the password
|
|
360
|
-
(`git log --oneline --merges --grep='#83' main` finds it directly). Then
|
|
361
|
-
`git checkout <that commit>` and follow that revision's own
|
|
362
|
-
`docs/getting-started-gke.md`, "Database login", and its order for "an
|
|
363
|
-
existing deployment still on password login": `bootstrap-database-iam.sh
|
|
364
|
-
--password-from-stdin --check`, the same without `--check`, then `up.sh`.
|
|
365
|
-
That rolls out password-less pods while the password still works as a
|
|
366
|
-
fallback, and proves the control plane and the coding proxy each read the
|
|
367
|
-
database through their own IAM login. That revision's
|
|
368
|
-
`connector_enforcement` default is still `NOT_REQUIRED`, so nothing that
|
|
369
|
-
still uses the password is cut off. Then return to this revision
|
|
370
|
-
(`git checkout main`) for the last stage.
|
|
371
|
-
|
|
372
|
-
**3. Retire the password**, once every pod speaks IAM login and this change
|
|
373
|
-
has merged to `main`:
|
|
374
|
-
|
|
375
|
-
1. Confirm nothing still uses the password: both Deployments' pods log in as
|
|
376
|
-
IAM users, and no pod has a password `DATABASE_URL` in its effective env.
|
|
377
|
-
2. Delete the `database-url` Secret Manager secret:
|
|
378
|
-
`gcloud secrets delete <name_prefix>-database-url --quiet` — this module no
|
|
379
|
-
longer creates or reads it. Deleting it by hand first, before the next
|
|
380
|
-
step, is what lets Terraform drop it from state instead of trying to
|
|
381
|
-
destroy it.
|
|
382
|
-
3. Remove any `connector_enforcement` line from `terraform.tfvars` (or set
|
|
383
|
-
it to `REQUIRED`), so the new default takes effect. Then `terraform plan`:
|
|
384
|
-
expect the generated password destroyed, the `database-url` secret and
|
|
385
|
-
its IAM binding gone from state (already deleted by hand), the old
|
|
386
|
-
password-login user forgotten (not destroyed), `connector_enforcement`
|
|
387
|
-
moving to `REQUIRED` on the instance (updated in place, not replaced),
|
|
388
|
-
and no other destroy. Review
|
|
389
|
-
the plan, then apply only once it matches that. If apply still fails
|
|
390
|
-
trying to destroy the `database-url` secret, the secret wasn't actually
|
|
391
|
-
deleted in step 2 — delete it and re-apply. Never turn off
|
|
392
|
-
`secrets_deletion_protection` to get past that error: it unprotects every
|
|
393
|
-
other secret in the same set, including `SECRET_APP_KEY` and the auth
|
|
394
|
-
keys, and losing `SECRET_APP_KEY` makes every credential already stored
|
|
395
|
-
in the database unreadable.
|
|
396
|
-
4. `deploy/gke/up.sh` — new ExternalSecrets carry no `DATABASE_URL`,
|
|
397
|
-
NetworkPolicies no longer allow 5432, migrations, rollout, and the
|
|
398
|
-
database and endpoint checks.
|
|
399
|
-
5. `deploy/gke/bootstrap-database-iam.sh` (default mode) — the guard now
|
|
400
|
-
passes, since the Secret no longer has a `DATABASE_URL`: it sets a
|
|
401
|
-
one-time owner password, reapplies the grants, and resets the password to
|
|
402
|
-
a value nobody holds.
|
|
403
|
-
6. Verify: a direct password connection is refused (NetworkPolicy blocks
|
|
404
|
-
5432, and the instance refuses it too), the pods still log in through
|
|
405
|
-
IAM, and the Terraform state holds no database password.
|
|
379
|
+
even attempt. Leave it at the default.
|
|
406
380
|
|
|
407
381
|
## 7. Verify
|
|
408
382
|
|
|
@@ -493,6 +467,38 @@ roll; if it fails, `up.sh` prints the `migrate` and `cloud-sql-proxy` container
|
|
|
493
467
|
logs (and, if those are empty or the Job timed out, the Job's and pod's
|
|
494
468
|
events), then stops.
|
|
495
469
|
|
|
470
|
+
### Upgrading an existing deployment
|
|
471
|
+
|
|
472
|
+
To upgrade, check out the new release and re-run `deploy/gke/up.sh`. No
|
|
473
|
+
manual database step is needed: `up.sh` applies the migrations, then the
|
|
474
|
+
database grants (`deploy/gke/bootstrap-database-iam.sh`, which applies
|
|
475
|
+
`deploy/gke/database-grants.sql`), and only then rolls out the new pods. A
|
|
476
|
+
release that adds a table, a column, or a workload that needs a new grant
|
|
477
|
+
therefore never runs without it.
|
|
478
|
+
|
|
479
|
+
- **If the migrations fail**, `up.sh` stops before the grants and the
|
|
480
|
+
rollout; the running version is untouched.
|
|
481
|
+
- **If the grants fail**, `up.sh` stops before the rollout with a non-zero
|
|
482
|
+
exit; the running version keeps serving. The migrations already applied
|
|
483
|
+
are additive, so the running version tolerates them. Run
|
|
484
|
+
`deploy/gke/bootstrap-database-iam.sh --check` to see the exact statement
|
|
485
|
+
the database refused without changing anything, fix the cause, and re-run
|
|
486
|
+
`up.sh`.
|
|
487
|
+
- **After the rollout**, `up.sh` checks that each new pod can read the
|
|
488
|
+
database, and asks the database, as the coding proxy's own role, for every
|
|
489
|
+
privilege `database-grants.sql` gives it
|
|
490
|
+
(`deploy/gke/proxy-grant-checks.mjs`). A missing grant stops the deploy
|
|
491
|
+
with a non-zero exit and the list of what's missing, rather than letting
|
|
492
|
+
the proxy fail registry requests with "permission denied".
|
|
493
|
+
|
|
494
|
+
Never run two `up.sh` deploys against the same project at once: both would
|
|
495
|
+
run migrations, set and reset the database owner's password, and roll out
|
|
496
|
+
over each other. Nothing locks against it, so wait for one to finish.
|
|
497
|
+
|
|
498
|
+
You run `bootstrap-database-iam.sh` by hand only on a brand-new project,
|
|
499
|
+
between `terraform apply` and the first `up.sh` (see
|
|
500
|
+
[Database login](#database-login)), or as `--check` for a dry run.
|
|
501
|
+
|
|
496
502
|
### Durable executor
|
|
497
503
|
|
|
498
504
|
The control plane runs native runs on the durable executor (`EXECUTOR=dbos`):
|
|
@@ -517,24 +523,33 @@ the step that was in flight runs again. Coding runs are Kubernetes Jobs and are
|
|
|
517
523
|
`up.sh` re-run whose source did not change, runs continue. When you deploy
|
|
518
524
|
new code, the old pod first **drains**: after its 30-second `preStop` it
|
|
519
525
|
stops the scheduler and waits for the runs it is executing to finish, up to
|
|
520
|
-
`SHUTDOWN_DRAIN_SECONDS` (
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
+
`SHUTDOWN_DRAIN_SECONDS` (540 in the GKE manifest), while the new pod
|
|
527
|
+
serves traffic. Open HTTP connections, such as a connected MCP client's
|
|
528
|
+
stream, get 10 seconds to finish and are then closed; clients reconnect to
|
|
529
|
+
the new pod.
|
|
530
|
+
An idle pod exits at once. A native run that is waiting in a `delegate_to_*`
|
|
531
|
+
call on a coding sub-agent or a sandbox-mode native sub-agent is taken over
|
|
532
|
+
by the new version: it continues when the sub-agent finishes, without
|
|
533
|
+
repeating the turns it already took. A run that was mid-turn, waiting on
|
|
534
|
+
another tool, or waiting on a control-plane native sub-agent is marked
|
|
535
|
+
`lost` rather than taken over, as is a taken-over run whose recorded steps
|
|
536
|
+
no longer match the new code, and a run still going after the drain limit.
|
|
537
|
+
The sub-agent runs a lost run started are stopped (reason
|
|
538
|
+
`parent run lost`). If an `@`-mention started a lost run, its status comment
|
|
539
|
+
on GitHub says the request was interrupted and should be repeated. The
|
|
540
|
+
manifest's `terminationGracePeriodSeconds` (600) must stay above the drain
|
|
541
|
+
limit plus the `preStop` delay. Autopilot does not allow more than 600: a
|
|
542
|
+
larger value is lowered to 600, so to change the budget, lower
|
|
543
|
+
`SHUTDOWN_DRAIN_SECONDS` rather than raising the grace period.
|
|
526
544
|
- **Data at rest and retention.** `dbos.operation_outputs` holds every step's
|
|
527
545
|
output — prompts, model responses and full tool results — with no retention
|
|
528
546
|
limit. Pruning finished workflows is the operator's job; see
|
|
529
547
|
[Durable executor](security-deployment.md#durable-executor) for what is
|
|
530
548
|
stored and how to prune it with `DBOS.deleteWorkflow`.
|
|
531
549
|
|
|
532
|
-
**Enabling it on an existing deployment.**
|
|
533
|
-
|
|
534
|
-
|
|
535
|
-
grants the new control-plane pod crash-loops with "permission denied" while
|
|
536
|
-
the old one keeps serving, and `up.sh` stops at the rollout. On a brand-new
|
|
537
|
-
project the order under "Database login" already covers it.
|
|
550
|
+
**Enabling it on an existing deployment.** Re-run `deploy/gke/up.sh`: it
|
|
551
|
+
applies the durable executor's grants before the rollout (see
|
|
552
|
+
[Upgrading an existing deployment](#upgrading-an-existing-deployment)).
|
|
538
553
|
|
|
539
554
|
**Switching back** to the in-process executor: set `EXECUTOR` to `in-process`
|
|
540
555
|
in `deploy/kind-coding/manifests/overlays/gke-autopilot/control-plane.yaml`
|
|
@@ -568,6 +583,167 @@ it, set `replicas: 0` in
|
|
|
568
583
|
A PriorityClass's value and preemption policy cannot be changed in place:
|
|
569
584
|
delete the class and re-run `up.sh` to change them.
|
|
570
585
|
|
|
586
|
+
### Native sandbox
|
|
587
|
+
|
|
588
|
+
Native sandbox requires Wardby 0.5.4 or later.
|
|
589
|
+
|
|
590
|
+
`up.sh` deploys everything the [native sandbox](native-sandbox.md) needs on
|
|
591
|
+
this cluster. It builds and pushes the `native-worker` image, checks it (Node is
|
|
592
|
+
present; `curl`, `wget`, `nc` and `ssh` are not), and pins it by digest as
|
|
593
|
+
`NATIVE_SANDBOX_WORKER_IMAGE`. It syncs the gateway's ExternalSecret, rolls out
|
|
594
|
+
`wardby-native-gateway`, waits for it, and checks its database round trip. The
|
|
595
|
+
control plane is configured with `NATIVE_SANDBOX_LAUNCHER=kubernetes`,
|
|
596
|
+
`NATIVE_SANDBOX_CPUS=0.5`, `NATIVE_SANDBOX_MEMORY_MB=512`,
|
|
597
|
+
`NATIVE_SANDBOX_MAX_CONCURRENT=4`, `NATIVE_SANDBOX_READY_TIMEOUT_MS=600000`
|
|
598
|
+
(a cold gVisor node takes about two minutes), and
|
|
599
|
+
`NATIVE_SANDBOX_ENFORCEMENT_TIMEOUT_MS=60000`. Worker pods use the gVisor runtime
|
|
600
|
+
class, `KUBERNETES_PLATFORM=gke-autopilot`, and the run priority class.
|
|
601
|
+
|
|
602
|
+
- **Database login.** The gateway has its own database login. `up.sh`
|
|
603
|
+
applies its `wardby_app` membership before the rollout, so adding its
|
|
604
|
+
identity to an existing deployment needs no manual step; see
|
|
605
|
+
[Upgrading an existing deployment](#upgrading-an-existing-deployment).
|
|
606
|
+
- **Enable per agent.** Nothing runs in the sandbox until you opt an agent in:
|
|
607
|
+
set its `nativeExecutionMode` to `sandbox` with the `update_agent` MCP tool
|
|
608
|
+
(native agents only).
|
|
609
|
+
- **Capacity.** At most `NATIVE_SANDBOX_MAX_CONCURRENT` sandbox runs are active
|
|
610
|
+
at once; a start past that fails with `native_sandbox_capacity` rather than
|
|
611
|
+
queuing. The `wardby-coding` ResourceQuota (26 pods, 11 CPU, 20Gi memory)
|
|
612
|
+
already covers the gateway's two replicas and that many 500m / 512Mi worker
|
|
613
|
+
pods. Raise the quota together with `NATIVE_SANDBOX_MAX_CONCURRENT` or
|
|
614
|
+
`CODING_MAX_CONCURRENT`.
|
|
615
|
+
- **Warm pool.** To keep idle, already-isolated workers ready so runs skip pod
|
|
616
|
+
scheduling and the isolation probe, set `NATIVE_SANDBOX_WARM_POOL_SIZE` (0 to
|
|
617
|
+
50, default 0) in the control-plane manifest and raise the `wardby-coding`
|
|
618
|
+
ResourceQuota by that many 500m / 512Mi pods. Each idle worker is billed
|
|
619
|
+
continuously. See [Warm pool](native-sandbox.md#warm-pool).
|
|
620
|
+
- **Check isolation.** `npm run test:native-cluster` runs launcher-only
|
|
621
|
+
isolation checks against the deployed gateway; set `NATIVE_TEST_WORKER_IMAGE`
|
|
622
|
+
to the worker digest and `NATIVE_TEST_FORBIDDEN` to the database's private
|
|
623
|
+
`host:port` (for example `10.0.0.5:3307`).
|
|
624
|
+
- **Roll back.** Set an agent back to `control-plane` with `update_agent`; this
|
|
625
|
+
affects only new runs, and runs already started in sandbox mode finish there.
|
|
626
|
+
To undo a bad gateway release, run
|
|
627
|
+
`kubectl -n wardby-coding rollout undo deploy/wardby-native-gateway`.
|
|
628
|
+
|
|
629
|
+
### Low-power mode
|
|
630
|
+
|
|
631
|
+
Low-power mode requires Wardby 0.6.0 or later.
|
|
632
|
+
|
|
633
|
+
Low-power mode cuts the idle cost of a deployment that runs agents only now and
|
|
634
|
+
then. The coding proxy and the native gateway scale to zero replicas when
|
|
635
|
+
nothing needs them, and wake on demand; the headroom placeholder is turned off;
|
|
636
|
+
and the control plane runs 1 copy, scaling to 2 under load. The database and
|
|
637
|
+
edge are unchanged.
|
|
638
|
+
|
|
639
|
+
Turn it on by deploying with the flag:
|
|
640
|
+
|
|
641
|
+
```sh
|
|
642
|
+
WARDBY_HOSTNAME=wardby.example.com WARDBY_LOW_POWER=1 deploy/gke/up.sh
|
|
643
|
+
```
|
|
644
|
+
|
|
645
|
+
To turn it off, re-run `up.sh` without the flag. That removes the autoscaler
|
|
646
|
+
(HorizontalPodAutoscaler `wardby-control-plane`) and the Role and RoleBinding
|
|
647
|
+
`wardby-power`, and restores the normal sizes: proxy 1, gateway 2, headroom 1,
|
|
648
|
+
control plane 1.
|
|
649
|
+
|
|
650
|
+
| Variable | Where it is set | Values | Meaning |
|
|
651
|
+
| ------------------------ | ---------------------------------- | ------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
652
|
+
| `WARDBY_LOW_POWER` | `up.sh` environment; control plane | unset, `0` (off) or `1` (on) | Anything else fails `up.sh` and stops the control plane at start-up. Needs `JOB_LAUNCHER=kubernetes`, else it logs `low_power_ignored` and does nothing. |
|
|
653
|
+
| `LOW_POWER_IDLE_MINUTES` | Control-plane Deployment | integer 5 to 1440, default `30` | How long a target must be unused before it sleeps. Read only when `WARDBY_LOW_POWER=1`. |
|
|
654
|
+
|
|
655
|
+
**Sleeping.** Every minute the scheduler leader scales the coding proxy
|
|
656
|
+
(`wardby-coding-proxy`) to 0 when no coding run is pending or running and none
|
|
657
|
+
finished within the idle window. It scales the native gateway
|
|
658
|
+
(`wardby-native-gateway`) to 0 when no sandbox native run is pending, running or
|
|
659
|
+
recently finished and the gateway has no active session. Either target sleeps
|
|
660
|
+
only once at least one idle window has passed since it was last woken (recorded
|
|
661
|
+
in its `wardby.io/power-woke-at` annotation) and since the control plane
|
|
662
|
+
started, whichever is later. The condition is checked again immediately before
|
|
663
|
+
scaling. The control plane
|
|
664
|
+
logs `power: proxy slept (idle 30m)`.
|
|
665
|
+
|
|
666
|
+
**Waking.** Starting a coding run scales the proxy to 1 and waits for a ready
|
|
667
|
+
endpoint. Starting a sandbox run does the same for the gateway. The wait is at
|
|
668
|
+
least 5 minutes, because a cold Autopilot node can add 1 to 2 minutes of
|
|
669
|
+
start-up; a `KUBERNETES_READY_TIMEOUT_MS` (proxy) or
|
|
670
|
+
`NATIVE_SANDBOX_READY_TIMEOUT_MS` (gateway) above 5 minutes, set on the
|
|
671
|
+
control-plane Deployment, raises it to that value. The first coding run after a
|
|
672
|
+
control-plane restart also runs the cluster preflight canary, because start-up
|
|
673
|
+
preflight is deferred while the proxy sleeps (`kubernetes_preflight_deferred`).
|
|
674
|
+
|
|
675
|
+
**Deploys.** Every `up.sh` run marks the proxy and gateway as just woken before
|
|
676
|
+
it applies the manifests, which bring them back up. That includes a run that
|
|
677
|
+
turns low-power mode off: the control plane being replaced still runs in
|
|
678
|
+
low-power mode until its rollout ends, and the mark stops it scaling them back
|
|
679
|
+
down. With the mode on they stay up through the deploy (its database checks
|
|
680
|
+
need them) and sleep one idle window later if nothing uses them.
|
|
681
|
+
|
|
682
|
+
**Failed replicas.** Without the headroom placeholder, a rollout is more likely
|
|
683
|
+
to hit Autopilot's admission race: the node rejects a new pod with `OutOfcpu`
|
|
684
|
+
and the Deployment starts a replacement. The rejected pod stays behind as a
|
|
685
|
+
Failed pod. After the rollouts, `up.sh` deletes Failed pods of the control
|
|
686
|
+
plane, coding proxy and native gateway (never coding-run or sandbox pods), and
|
|
687
|
+
the Viewer shows any such leftover as an old replica rather than a failure.
|
|
688
|
+
|
|
689
|
+
**Sleeping now.** To skip the idle window (for example right after a test), an
|
|
690
|
+
admin calls the MCP tool `power_sleep`, optionally with `target` set to `proxy`
|
|
691
|
+
or `gateway` (default both). It scales the target to 0 at once, but never stops
|
|
692
|
+
a run: a target with a pending or running run, or for the gateway an active
|
|
693
|
+
gateway session, is left up and its run ids are returned under `blocked`.
|
|
694
|
+
Recently finished runs do not block it. The next run wakes the target as usual.
|
|
695
|
+
`power_status` shows each target's replicas, readiness, last wake time and
|
|
696
|
+
blocking run ids. Both tools need the `power:manage` scope, which only the
|
|
697
|
+
`admin` role grants; with the mode off, `power_sleep` fails with
|
|
698
|
+
`409 low_power_disabled` and `power_status` returns `{ "enabled": false }`.
|
|
699
|
+
Each `power_sleep` is logged as `event: "power.sleep"` with the caller's
|
|
700
|
+
principal.
|
|
701
|
+
|
|
702
|
+
**Control-plane autoscaling.** The control plane scales between 1 and 2 copies
|
|
703
|
+
on CPU (20% target, scale-down after 10 minutes). A run executes on
|
|
704
|
+
the copy that started it, so scheduled runs stay on the scheduler leader, while
|
|
705
|
+
runs started by a webhook or over MCP spread across copies. While the mode is on
|
|
706
|
+
the autoscaler owns the replica count, so do not set it by hand.
|
|
707
|
+
|
|
708
|
+
**Trade-offs.**
|
|
709
|
+
|
|
710
|
+
- Headroom is off, so the control plane has less protection against being
|
|
711
|
+
preempted when the cluster is short of capacity (see
|
|
712
|
+
[Pod priority and headroom](#pod-priority-and-headroom)).
|
|
713
|
+
- The gateway runs 1 replica instead of 2 while awake, so there is no
|
|
714
|
+
redundancy.
|
|
715
|
+
- `NATIVE_SANDBOX_WARM_POOL_SIZE` must be 0; the control plane refuses to start
|
|
716
|
+
otherwise, because a warm pool needs the gateway running.
|
|
717
|
+
- The gateway must be in the same namespace as `KUBERNETES_NAMESPACE`.
|
|
718
|
+
- The control plane needs the `wardby-power` Role: `get` and `patch` on the
|
|
719
|
+
proxy and gateway Deployments, and `get` on their Endpoints (to tell when a
|
|
720
|
+
woken target is ready). If any of it is missing, start-up warns
|
|
721
|
+
`low_power_scale_forbidden: missing ...` naming each permission, and waking,
|
|
722
|
+
`power_status` and `power_sleep` fail with that error; re-run `up.sh` with
|
|
723
|
+
the flag.
|
|
724
|
+
|
|
725
|
+
**Cost.** Autopilot bills Pod requests while a Pod exists. The table uses
|
|
726
|
+
us-central1 list prices of $0.0445 per vCPU-hour and $0.0049225 per GiB-hour and
|
|
727
|
+
730 hours a month; substitute your region's current rates. Requests include the
|
|
728
|
+
Cloud SQL sidecar.
|
|
729
|
+
|
|
730
|
+
| Workload | Requests per replica | Per hour | Per month, always on | In low-power mode |
|
|
731
|
+
| ---------------------------- | --------------------- | -------- | -------------------- | --------------------------------------- |
|
|
732
|
+
| Control plane | 1.1 vCPU / 2.125 GiB | $0.0594 | $43.37 | 1 copy always; $0.0594/h per extra copy |
|
|
733
|
+
| Coding proxy | 1.1 vCPU / 3.125 GiB | $0.0643 | $46.96 | $0.0643/h only while awake |
|
|
734
|
+
| Native gateway (per replica) | 0.35 vCPU / 0.625 GiB | $0.0187 | $13.62 (x2 = $27.23) | 1 replica, $0.0187/h only while awake |
|
|
735
|
+
| Headroom placeholder | 0.25 vCPU / 0.5 GiB | $0.0136 | $9.92 | $0 |
|
|
736
|
+
|
|
737
|
+
With the mode off, those four workloads cost about $127.48 a month at these
|
|
738
|
+
rates. In low-power mode the control plane is still always on, and a fully
|
|
739
|
+
awake moment costs about $0.142 an hour for one control-plane copy, the proxy
|
|
740
|
+
and one gateway replica. Your total depends on how many hours the proxy and
|
|
741
|
+
gateway stay awake. Cloud SQL, the static address, load balancer, Cloud Armor
|
|
742
|
+
and any other always-on component are unchanged.
|
|
743
|
+
|
|
744
|
+
For error codes and log lines, see the
|
|
745
|
+
[low-power mode help article](../help/low-power-mode.md).
|
|
746
|
+
|
|
571
747
|
### Coding-run services
|
|
572
748
|
|
|
573
749
|
A coding run whose agent allows [services](coding-services.md) waits for each
|
|
@@ -579,6 +755,32 @@ that schedules onto a fresh node — one that has never pulled the image before
|
|
|
579
755
|
cached. Raise `KUBERNETES_READY_TIMEOUT_MS` if you see runs fail
|
|
580
756
|
`service_unready` only on new nodes.
|
|
581
757
|
|
|
758
|
+
### Run dependency cache
|
|
759
|
+
|
|
760
|
+
Off by default. To keep npm `node_modules` snapshots for coding runs
|
|
761
|
+
(see [Dependency cache](coding-packages.md#dependency-cache)), set
|
|
762
|
+
`dependency_cache_enabled = true` and a unique `dependency_cache_bucket_name` in
|
|
763
|
+
`terraform.tfvars`, and deploy with `WARDBY_DEPENDENCY_CACHE=true
|
|
764
|
+
deploy/gke/up.sh` (it grants the coding proxy's role the `DependencySnapshot`
|
|
765
|
+
table before the rollout; see
|
|
766
|
+
[Upgrading an existing deployment](#upgrading-an-existing-deployment)). Keep
|
|
767
|
+
`dependency_cache_max_age_days` equal to the proxy's
|
|
768
|
+
`WARDBY_DEPENDENCY_CACHE_MAX_AGE_DAYS` (default 14). Details:
|
|
769
|
+
[`deploy/gke/README.md`](../deploy/gke/README.md#run-dependency-cache).
|
|
770
|
+
|
|
771
|
+
### Session transcripts
|
|
772
|
+
|
|
773
|
+
Off by default. To keep the transcripts of Claude Code agents with
|
|
774
|
+
`sessionResume` on (see
|
|
775
|
+
[Resume a run locally](coding-agent-setup.md#resume-a-run-locally)), set
|
|
776
|
+
`session_transcripts_enabled = true` and a unique
|
|
777
|
+
`session_transcripts_bucket_name` in `terraform.tfvars`, and deploy with
|
|
778
|
+
`WARDBY_SESSION_TRANSCRIPTS=true deploy/gke/up.sh`. The bucket is separate from
|
|
779
|
+
the dependency cache bucket and only the control plane can use it; its
|
|
780
|
+
lifecycle rule and the control plane's `RUN_TRANSCRIPT_RETENTION_DAYS` both
|
|
781
|
+
come from `session_transcripts_retention_days` (default 30). Details:
|
|
782
|
+
[`deploy/gke/README.md`](../deploy/gke/README.md#session-transcripts).
|
|
783
|
+
|
|
582
784
|
### Roll back
|
|
583
785
|
|
|
584
786
|
Images are pinned by digest, so undoing a rollout restores exactly what ran
|
|
@@ -587,13 +789,12 @@ before. `up.sh` prints the previous digests at the end of every deploy.
|
|
|
587
789
|
```sh
|
|
588
790
|
kubectl -n wardby-coding rollout undo deploy/wardby-control-plane
|
|
589
791
|
kubectl -n wardby-coding rollout undo deploy/wardby-coding-proxy
|
|
792
|
+
kubectl -n wardby-coding rollout undo deploy/wardby-native-gateway
|
|
590
793
|
```
|
|
591
794
|
|
|
592
|
-
`rollout undo` restores only the Deployments' images and pod templates
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
change to the database egress rules themselves is not undone by `rollout
|
|
596
|
-
undo`.
|
|
795
|
+
`rollout undo` restores only the Deployments' images and pod templates. It
|
|
796
|
+
does not touch the database grants or any NetworkPolicy: a change to the
|
|
797
|
+
database egress rules themselves is not undone by `rollout undo`.
|
|
597
798
|
|
|
598
799
|
Database migrations only go forward: a rollback does not undo a schema change.
|
|
599
800
|
That is safe while every migration is additive (new tables, nullable columns,
|
|
@@ -623,7 +824,9 @@ kubectl -n wardby-coding rollout restart deploy/wardby-coding-proxy deploy/wardb
|
|
|
623
824
|
|
|
624
825
|
For a Jira setting, add the version to its `wardby-jira-*` secret, wait on
|
|
625
826
|
`wardby-jira-env` instead, and restart only `deploy/wardby-control-plane`.
|
|
626
|
-
Rotate the token and its `jira-api-token-expires-at` together.
|
|
827
|
+
Rotate the token and its `jira-api-token-expires-at` together. The Slack bot
|
|
828
|
+
token works the same way: add the version to `wardby-slack-bot-token`, wait on
|
|
829
|
+
`wardby-slack-env`, and restart only `deploy/wardby-control-plane`.
|
|
627
830
|
|
|
628
831
|
Pods read their environment only at start, hence the restart. The LLM API
|
|
629
832
|
keys and the database URL are read by both Deployments; the other secrets only
|