@wardby/cli 0.5.3 → 0.6.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/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 +7 -1
- package/dist/claude-coding-worker/driver.js +38 -5
- package/dist/claude-coding-worker/sdk.js +13 -4
- package/dist/cli-help.d.ts +1 -1
- package/dist/cli-help.js +5 -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 +141 -5
- package/dist/coding/claude-context.d.ts +45 -0
- package/dist/coding/claude-context.js +434 -0
- package/dist/coding/profile.d.ts +12 -0
- package/dist/coding/profile.js +6 -0
- package/dist/coding/protocol.d.ts +104 -0
- package/dist/coding/protocol.js +87 -3
- package/dist/coding-worker/artifact.d.ts +8 -0
- package/dist/coding-worker/artifact.js +2 -2
- package/dist/coding-worker/driver.js +2 -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/types.d.ts +2 -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 +53 -0
- package/dist/config/providers.js +92 -6
- package/dist/core/db.d.ts +16 -6
- package/dist/core/db.js +12 -10
- package/dist/core/dispatch.d.ts +11 -0
- package/dist/core/dispatch.js +36 -1
- package/dist/core/engine-native.js +9 -5
- package/dist/core/host-events.d.ts +49 -3
- package/dist/core/host-events.js +289 -15
- package/dist/core/issue-bridge.js +42 -2
- package/dist/core/issue-events.js +12 -1
- package/dist/core/issue-status.js +14 -3
- package/dist/core/merge-order-check.d.ts +129 -0
- package/dist/core/merge-order-check.js +336 -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 +25 -0
- package/dist/core/notification-templates.js +105 -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/reconciler.d.ts +4 -2
- package/dist/core/reconciler.js +29 -5
- package/dist/core/related-pull-requests.d.ts +48 -4
- package/dist/core/related-pull-requests.js +113 -11
- package/dist/core/repo-access.d.ts +15 -0
- package/dist/core/repo-access.js +66 -0
- package/dist/core/review-fix.d.ts +37 -0
- package/dist/core/review-fix.js +207 -6
- package/dist/core/review-host-tools.d.ts +20 -0
- package/dist/core/review-host-tools.js +58 -2
- package/dist/core/runner.d.ts +336 -3
- package/dist/core/runner.js +894 -317
- package/dist/core/secret-broker-config.d.ts +103 -0
- package/dist/core/secret-broker-config.js +112 -0
- package/dist/core/secrets.d.ts +39 -4
- package/dist/core/secrets.js +148 -40
- 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 +82 -0
- package/dist/core/workflow-events.js +44 -0
- package/dist/core/workflow-run-events.d.ts +16 -0
- package/dist/core/workflow-run-events.js +40 -0
- package/dist/generated/prisma/browser.d.ts +58 -0
- package/dist/generated/prisma/client.d.ts +58 -0
- package/dist/generated/prisma/commonInputTypes.d.ts +150 -0
- package/dist/generated/prisma/enums.d.ts +27 -0
- package/dist/generated/prisma/enums.js +23 -0
- package/dist/generated/prisma/internal/class.d.ts +88 -0
- package/dist/generated/prisma/internal/class.js +4 -4
- package/dist/generated/prisma/internal/prismaNamespace.d.ts +772 -1
- package/dist/generated/prisma/internal/prismaNamespace.js +135 -4
- package/dist/generated/prisma/internal/prismaNamespaceBrowser.d.ts +139 -0
- package/dist/generated/prisma/internal/prismaNamespaceBrowser.js +135 -4
- package/dist/generated/prisma/models/Agent.d.ts +360 -1
- package/dist/generated/prisma/models/CodingAgentProfile.d.ts +73 -1
- package/dist/generated/prisma/models/CodingRun.d.ts +205 -1
- package/dist/generated/prisma/models/DeferredReview.d.ts +78 -1
- package/dist/generated/prisma/models/NativeGatewayCall.d.ts +1675 -0
- package/dist/generated/prisma/models/NativeGatewayCall.js +1 -0
- package/dist/generated/prisma/models/NativeGatewaySession.d.ts +1517 -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/Run.d.ts +826 -1
- package/dist/generated/prisma/models/RunHostCheck.d.ts +36 -1
- 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 +8 -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 +1363 -176
- package/dist/import/create.js +17 -0
- package/dist/import/neutral-schema.d.ts +6 -2
- package/dist/import/neutral-schema.js +2 -0
- package/dist/mcp/auth/access.d.ts +1 -0
- 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/context.d.ts +6 -0
- package/dist/mcp/host-events/github-ingress.d.ts +23 -1
- package/dist/mcp/host-events/github-ingress.js +68 -0
- package/dist/mcp/index.d.ts +13 -0
- package/dist/mcp/index.js +59 -10
- package/dist/mcp/tools/agents.js +82 -11
- package/dist/mcp/tools/notification-channels.d.ts +2 -0
- package/dist/mcp/tools/notification-channels.js +293 -0
- package/dist/mcp/tools/power.d.ts +2 -0
- package/dist/mcp/tools/power.js +77 -0
- package/dist/mcp/tools/runs.d.ts +0 -6
- package/dist/mcp/tools/runs.js +7 -2
- 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 +200 -10
- package/dist/mcp/tools/secret-elicitation-server.js +8 -1
- 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 +184 -7
- package/dist/mcp/tools/tools.d.ts +1 -1
- package/dist/mcp/tools/tools.js +22 -2
- 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 +74 -0
- package/dist/native-worker/docker-launcher.js +237 -0
- package/dist/native-worker/gateway-server.d.ts +39 -0
- package/dist/native-worker/gateway-server.js +315 -0
- package/dist/native-worker/gateway.d.ts +44 -0
- package/dist/native-worker/gateway.js +197 -0
- package/dist/native-worker/http-server.d.ts +22 -0
- package/dist/native-worker/http-server.js +109 -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 +102 -0
- package/dist/native-worker/kubernetes-launcher.js +335 -0
- package/dist/native-worker/launch.d.ts +45 -0
- package/dist/native-worker/launch.js +44 -0
- package/dist/native-worker/ledger.d.ts +109 -0
- package/dist/native-worker/ledger.js +192 -0
- package/dist/native-worker/loopback.d.ts +12 -0
- package/dist/native-worker/loopback.js +49 -0
- package/dist/native-worker/main.d.ts +7 -0
- package/dist/native-worker/main.js +74 -0
- package/dist/native-worker/protocol.d.ts +744 -0
- package/dist/native-worker/protocol.js +200 -0
- package/dist/native-worker/sandbox-executor.d.ts +68 -0
- package/dist/native-worker/sandbox-executor.js +210 -0
- package/dist/native-worker/stdio.d.ts +29 -0
- package/dist/native-worker/stdio.js +188 -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 +115 -0
- 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 +13 -1
- 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/engine/types.d.ts +19 -0
- package/dist/providers/engine/types.js +22 -0
- package/dist/providers/executor/composition.d.ts +24 -1
- package/dist/providers/executor/composition.js +39 -6
- package/dist/providers/executor/container.d.ts +24 -1
- package/dist/providers/executor/container.js +101 -11
- package/dist/providers/executor/dbos.d.ts +42 -0
- package/dist/providers/executor/dbos.js +118 -12
- package/dist/providers/executor/deferred.d.ts +56 -0
- package/dist/providers/executor/deferred.js +119 -0
- package/dist/providers/executor/routing.d.ts +37 -10
- package/dist/providers/executor/routing.js +73 -32
- package/dist/providers/executor/types.d.ts +12 -0
- package/dist/providers/jobs/docker.js +3 -3
- package/dist/providers/jobs/fake-kubernetes-api.d.ts +21 -2
- package/dist/providers/jobs/fake-kubernetes-api.js +42 -1
- package/dist/providers/jobs/kubernetes-api.d.ts +17 -1
- package/dist/providers/jobs/kubernetes-api.js +7 -0
- package/dist/providers/jobs/kubernetes-client.d.ts +10 -1
- package/dist/providers/jobs/kubernetes-client.js +52 -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 +3 -1
- package/dist/providers/jobs/kubernetes-isolation.js +6 -0
- 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 +36 -1
- package/dist/providers/jobs/kubernetes.js +74 -4
- 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 +9 -0
- package/dist/providers/review-host/github.d.ts +11 -1
- package/dist/providers/review-host/github.js +50 -0
- package/dist/providers/review-host/types.d.ts +23 -0
- package/dist/providers/vcs/github.d.ts +32 -6
- package/dist/providers/vcs/github.js +74 -16
- package/dist/quickstart/coding-seed.d.ts +10 -3
- package/dist/quickstart/coding-seed.js +74 -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 +1 -1
- 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/host-functions.d.ts +34 -0
- package/dist/sandbox/host-functions.js +144 -80
- 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 +162 -0
- package/dist/sandbox/user-tool.d.ts +14 -0
- package/dist/sandbox/user-tool.js +32 -0
- package/dist/serve.js +18 -0
- package/dist/viewer/api-schema.d.ts +210 -14
- package/dist/viewer/api-schema.js +22 -0
- package/dist/viewer/build-schemas.js +4 -1
- 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 +172 -0
- package/docs/README.md +7 -0
- package/docs/agent-recipes.md +57 -8
- package/docs/architecture-runtime.md +16 -1
- package/docs/code-review-agents.md +139 -5
- package/docs/coding-agent-setup.md +113 -5
- package/docs/coding-packages.md +4 -2
- package/docs/coding-services.md +3 -1
- package/docs/coding-worker-byo-images.md +198 -6
- package/docs/coding-worker-isolation.md +68 -14
- package/docs/getting-started-gke.md +225 -9
- package/docs/getting-started-identity-provider.md +21 -10
- package/docs/getting-started.md +5 -4
- package/docs/jira-agents.md +5 -1
- package/docs/native-sandbox.md +635 -0
- package/docs/release-verification.md +9 -0
- package/docs/security-deployment.md +113 -12
- package/docs/slack-notifications.md +252 -0
- package/docs/tool-secrets.md +252 -0
- package/docs/viewer-api.md +46 -5
- package/docs/viewer-api.openapi.yml +1404 -0
- package/help/admin-viewer.md +6 -2
- package/help/agent-recipes.md +27 -0
- package/help/architecture-agent.md +1 -1
- package/help/brokered-secrets.md +79 -0
- package/help/build-claude-code-image.md +131 -0
- package/help/build-worker-image.md +3 -6
- package/help/code-review-agents.md +68 -6
- package/help/deploy-gke.md +8 -1
- package/help/deployment-targets.md +25 -14
- package/help/errors/coding-provider-not-configured.md +2 -2
- package/help/errors/database-auth-invalid.md +28 -0
- package/help/errors/github-account-not-allowed.md +25 -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/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-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-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 +20 -0
- package/help/errors/native-sandbox-worker-lost.md +20 -0
- package/help/errors/native-sandbox-worker-unready.md +22 -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-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/getting-started.md +4 -5
- package/help/github.md +18 -1
- package/help/identity-and-access.md +5 -1
- package/help/local-repositories.md +2 -3
- package/help/low-power-mode.md +125 -0
- package/help/merge-order-check.md +117 -0
- package/help/mobile-app.md +54 -0
- package/help/native-sandbox.md +136 -0
- package/help/observability.md +8 -0
- package/help/related-pull-requests.md +70 -9
- package/help/repo-instructions-and-skills.md +91 -0
- package/help/review-fix-rounds.md +10 -0
- package/help/slack-notifications.md +62 -0
- package/help/troubleshooting/coding-workers.md +21 -0
- package/package.json +11 -4
- 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/schema.prisma +362 -91
package/help/admin-viewer.md
CHANGED
|
@@ -3,7 +3,7 @@ id: admin-viewer
|
|
|
3
3
|
title: Watch live runs with the admin viewer API
|
|
4
4
|
summary: Read-only, deployment-wide live view of runs, sub-agent trees, triggers, outcomes and coding-run services for admins (admin:view).
|
|
5
5
|
audience: operator
|
|
6
|
-
tags: [viewer, admin, runs, live,
|
|
6
|
+
tags: [viewer, admin, runs, live, desktop, infrastructure, kubernetes, download, openapi, api contract]
|
|
7
7
|
appliesTo: ">=0.4.0"
|
|
8
8
|
---
|
|
9
9
|
|
|
@@ -33,9 +33,11 @@ must allow long-lived responses and not buffer `text/event-stream`.
|
|
|
33
33
|
|
|
34
34
|
A desktop viewer for macOS is included in the source tree (`apps/viewer`). Add
|
|
35
35
|
your server's canonical URI, sign in with an `admin` user in the browser, and it
|
|
36
|
-
shows the live graph. Its README covers setup, and what an external identity
|
|
36
|
+
shows the live graph. Each GitHub release has an unsigned macOS build of the viewer attached (see the README for opening it past Gatekeeper). Its README covers setup, and what an external identity
|
|
37
37
|
provider client needs when the server runs in delegating mode.
|
|
38
38
|
|
|
39
|
+
From Wardby 0.6.0, admins can also sign in to a mobile app for the same read-only live view; see the help article `mobile-app`.
|
|
40
|
+
|
|
39
41
|
The Infrastructure tab shows the Kubernetes pods where your deployment runs
|
|
40
42
|
coding jobs, read-only. It uses your kubeconfig (switchable per server) and
|
|
41
43
|
requires a minimal read-only Kubernetes role. See the Infrastructure view
|
|
@@ -45,5 +47,7 @@ Armor, routes), each NetworkPolicy with a plain-English summary, and on GKE a
|
|
|
45
47
|
link from each pod to the Google Cloud console. The run graph's zoom controls
|
|
46
48
|
include **Fit width**, which fills the canvas with the graph's width.
|
|
47
49
|
|
|
50
|
+
From Wardby 0.6.0 the API is also published as OpenAPI 3.1 (`docs/viewer-api.openapi.yml` in the package), an API contract you can feed to client generators such as `openapi-typescript`.
|
|
51
|
+
|
|
48
52
|
For parameters, status codes, frame formats and schemas, follow
|
|
49
53
|
[`docs/viewer-api.md`](../docs/viewer-api.md).
|
package/help/agent-recipes.md
CHANGED
|
@@ -181,6 +181,33 @@ builder's result includes `pullRequest` (`outcome`,
|
|
|
181
181
|
`repository`, `number`, `url`) from Wardby's own record when it opened or
|
|
182
182
|
pushed to one, so the lead can report the links.
|
|
183
183
|
|
|
184
|
+
When the builders' changes must land in a particular order, pass `mergeOrder`
|
|
185
|
+
(1 to 99, 1 first) in each `delegate_to_<name>` call — give a dependency a
|
|
186
|
+
lower number than what calls it, and give two changes the same number when
|
|
187
|
+
there is no order between them:
|
|
188
|
+
|
|
189
|
+
```json
|
|
190
|
+
{ "task": "Add the /quotes endpoint the client will call.", "mergeOrder": 1 }
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
```json
|
|
194
|
+
{ "task": "Add the quotes page that calls /quotes.", "mergeOrder": 2 }
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
Leave `mergeOrder` out and the pull requests' **Related pull requests**
|
|
198
|
+
section lists them in delegation order instead, labelled as a suggestion
|
|
199
|
+
rather than a set order. It applies only to coding sub-agents; a native
|
|
200
|
+
sub-agent ignores it. A follow-up that continues one of these pull requests
|
|
201
|
+
with `continuePriorRun` and no `mergeOrder` of its own keeps the pull
|
|
202
|
+
request's current value (the one most recently set for it, by the run that
|
|
203
|
+
opened it or a later continuation); one that passes `mergeOrder` replaces
|
|
204
|
+
it.
|
|
205
|
+
|
|
206
|
+
With Wardby 0.6.0 or later, once a set has more than one `mergeOrder`, each
|
|
207
|
+
pull request in it also gets a `wardby merge order` check run showing
|
|
208
|
+
whether its earlier steps have merged yet; search help for "merge order
|
|
209
|
+
check" for its states and for requiring it in branch protection.
|
|
210
|
+
|
|
184
211
|
## Step 3: confirm
|
|
185
212
|
|
|
186
213
|
Summarize what you created: each agent's name and id, the sub-agent bindings,
|
|
@@ -248,7 +248,7 @@ You are a senior software engineer doing a rigorous code review of one pull requ
|
|
|
248
248
|
The task names the pull request, its repository and its head commit, e.g. "Review pull request #12 in owner/name (head <sha>)" or "Review pull request #3 in local:/path/to/repo (head <sha>)". Pass that repository, exactly as written, to every repo_* tool.
|
|
249
249
|
|
|
250
250
|
PROCESS
|
|
251
|
-
1. Call `repo_pr_read` with the repository and the pull request number. If the pull request is closed or merged, stop and reply "skipped: PR not open". Use the returned `headSha` as the `ref` for every later read (not the branch name).
|
|
251
|
+
1. Call `repo_pr_read` with the repository and the pull request number. If the pull request is closed or merged, stop and reply "skipped: PR not open". Use the returned `headSha` as the `ref` for every later read (not the branch name). If this pull request is part of a multi-repository request, use `repo_pr_read`'s `relatedPullRequests` (current) rather than the description's Related pull requests section, which can be stale.
|
|
252
252
|
2. Architecture knowledge: read `docs/knowledge/index.md` at the head with `repo_read_file`. If it exists, open the concepts (files in docs/knowledge/) whose `wardby.affects` globs or `wardby.citations[].path` match the changed files. Treat them as recalled context, not authority (AGENTS.md wins on conflict). Flag a change that violates a concept's invariant or walks into a recorded pitfall, citing the concept file. If the pull request edits a file under docs/knowledge/, check that each edited concept's citations still point at lines that support its claim at the head, and report unresolved or stale citations as a SUGGESTED finding only (never blocking, never MUST_FIX). If docs/knowledge/index.md does not exist, skip this step.
|
|
253
253
|
3. If `lastReviewedSha` is set, you reviewed this pull request before: call `repo_pr_read` again with `sinceSha` = lastReviewedSha and review that delta (see RE-REVIEWS). Still check whether your earlier MUST_FIX items are resolved by reading the affected files at the head. Otherwise review the whole diff. If `openThreads` is non-empty, those are your own unresolved inline comments: put the `id` of each one this head fixes in `resolveThreadIds` when you publish, leave the others open, and do not post them again.
|
|
254
254
|
4. If a patch is truncated or missing, read the file with `repo_read_file`. Where the diff alone is not enough to judge correctness, read the surrounding code, and use `repo_list_files` to find callers, related modules, existing helpers and tests. Before claiming a test is missing, find the test files and read the relevant one. Before claiming duplication, find the existing code it duplicates and name it.
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: brokered-secrets
|
|
3
|
+
title: Brokered secrets and the secret broker
|
|
4
|
+
summary: Let tools use a secret only by sending it to hosts you choose, without ever reading its value.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [secrets, brokered, secret broker, security, tools, fetch, sigv4, set_secret_broker]
|
|
7
|
+
appliesTo: ">=0.6.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Brokered secrets and the secret broker
|
|
11
|
+
|
|
12
|
+
A readable secret hands its value to any tool that is granted it, so a tool with
|
|
13
|
+
untrusted code, or a prompt-injected agent, can send the value anywhere the tool
|
|
14
|
+
may fetch. A **brokered** secret never reaches tool code: you fix the hosts it
|
|
15
|
+
may be sent to and how it is placed, and the Wardby host adds it to the request.
|
|
16
|
+
|
|
17
|
+
## When to use it
|
|
18
|
+
|
|
19
|
+
Broker any secret that a tool only needs to send to an API, such as a bearer
|
|
20
|
+
token, an API key, or AWS credentials. Keep a secret readable only when the tool
|
|
21
|
+
must compute with the value itself.
|
|
22
|
+
|
|
23
|
+
## Set it up
|
|
24
|
+
|
|
25
|
+
1. Create the secret with a broker config, in one call or in the browser form's
|
|
26
|
+
"Brokered" checkbox: `create_secret { name, broker }`. For an existing secret
|
|
27
|
+
use `set_secret_broker { name, broker }`.
|
|
28
|
+
2. Attach it to the agent (`attach_secret`) and list its name in the tool
|
|
29
|
+
attachment's `allowedSecrets` (`attach_tool`).
|
|
30
|
+
3. Include the host in the attachment's `allowedHosts` too. The normal fetch
|
|
31
|
+
policy still applies on top of the broker.
|
|
32
|
+
|
|
33
|
+
The config is `{ hosts, pathPrefixes?, placement }`. Hosts are exact hostnames
|
|
34
|
+
such as `api.example.com`, and the request must use https on the default port.
|
|
35
|
+
|
|
36
|
+
## The four placements
|
|
37
|
+
|
|
38
|
+
- **header**: `{ "kind": "header", "name": "Authorization", "format": "Bearer {value}" }`
|
|
39
|
+
- **query**: `{ "kind": "query", "name": "api_key" }`
|
|
40
|
+
- **body**: `{ "kind": "body", "field": "token" }`, for a JSON-object or form body
|
|
41
|
+
- **aws-sigv4**: `{ "kind": "aws-sigv4", "region": "us-east-1", "service": "s3" }`,
|
|
42
|
+
where the value is JSON `{ "accessKeyId", "secretAccessKey", "sessionToken?" }`
|
|
43
|
+
|
|
44
|
+
## Use it in a tool
|
|
45
|
+
|
|
46
|
+
```js
|
|
47
|
+
const response = await fetch("https://api.example.com/v1/items", {
|
|
48
|
+
secrets: ["EXAMPLE_API_KEY"],
|
|
49
|
+
});
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
`secrets.get("EXAMPLE_API_KEY")` on a brokered secret throws
|
|
53
|
+
[`secret_brokered`](errors/secret-brokered.md). Redirects are not followed, and
|
|
54
|
+
the value is scrubbed from responses and console output.
|
|
55
|
+
|
|
56
|
+
## Change or remove brokering
|
|
57
|
+
|
|
58
|
+
Changing the config (hosts, path prefixes, or placement) with
|
|
59
|
+
`set_secret_broker` or `create_secret` takes effect immediately and is not
|
|
60
|
+
confirmed in a browser. Anyone who can act as the owner over MCP can send the
|
|
61
|
+
value to another host they also grant through `attach_tool` `allowedHosts`; the
|
|
62
|
+
operator's fetch policy still applies.
|
|
63
|
+
|
|
64
|
+
Only removal is confirmed: `set_secret_broker { name, broker: null }` returns a
|
|
65
|
+
browser link, and a person confirms by typing the secret's name. The MCP call
|
|
66
|
+
alone never removes it. Every change is audited.
|
|
67
|
+
|
|
68
|
+
## Related
|
|
69
|
+
|
|
70
|
+
- Full guide: [`docs/tool-secrets.md`](../docs/tool-secrets.md)
|
|
71
|
+
- [Use native agents, tools, and data](native-capabilities.md)
|
|
72
|
+
- Errors: [`secret_brokered`](errors/secret-brokered.md),
|
|
73
|
+
[`secret_not_brokered`](errors/secret-not-brokered.md),
|
|
74
|
+
[`secret_broker_destination_denied`](errors/secret-broker-destination-denied.md),
|
|
75
|
+
[`secret_broker_conflict`](errors/secret-broker-conflict.md),
|
|
76
|
+
[`secret_broker_body_invalid`](errors/secret-broker-body-invalid.md),
|
|
77
|
+
[`secret_broker_value_invalid`](errors/secret-broker-value-invalid.md),
|
|
78
|
+
[`secret_broker_changed`](errors/secret-broker-changed.md),
|
|
79
|
+
[`secret_broker_config_invalid`](errors/secret-broker-config-invalid.md)
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: build-claude-code-image
|
|
3
|
+
title: Build a tool runner image for a Claude Code agent
|
|
4
|
+
summary: A procedure an MCP assistant follows to build a custom image for a Claude Code coding agent (Ruby, Go, Java or another language) FROM the release's tool runner image, check it, and set it with workerImageRef.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [claude-code, custom-image, workerImageRef, tool-runner, worker-image, other-language, ruby, toolchain]
|
|
7
|
+
appliesTo: ">=0.5.4"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Build a tool runner image for a Claude Code agent
|
|
11
|
+
|
|
12
|
+
A Claude Code agent uses two containers. One runs Claude Code and holds its API
|
|
13
|
+
key; it always uses Wardby's standard image. The other, the **tool runner**,
|
|
14
|
+
runs the agent's commands and has the repository. `codingProfile.workerImageRef`
|
|
15
|
+
replaces the tool runner. The long-form guide is
|
|
16
|
+
[`docs/coding-worker-byo-images.md`](../docs/coding-worker-byo-images.md).
|
|
17
|
+
|
|
18
|
+
For a Codex agent, follow [Build a custom worker image](build-worker-image.md)
|
|
19
|
+
instead.
|
|
20
|
+
|
|
21
|
+
If you are an assistant connected to Wardby over MCP, follow these steps. Do
|
|
22
|
+
them in order, ask the user instead of guessing, and stop at the first failed
|
|
23
|
+
prerequisite. Never write into the user's repository; ask where to keep the
|
|
24
|
+
Dockerfile (for example a folder outside the repository).
|
|
25
|
+
|
|
26
|
+
## Step 1: find the toolchain
|
|
27
|
+
|
|
28
|
+
Read the project's manifests and how it runs its tests, as in "Step 1: find the
|
|
29
|
+
toolchain" of [Build a custom worker image](build-worker-image.md). Ask the user
|
|
30
|
+
when the language or version is unclear.
|
|
31
|
+
|
|
32
|
+
## Step 2: find the base image
|
|
33
|
+
|
|
34
|
+
Ask the user for the value of `CODING_CLAUDE_TOOL_RUNNER_IMAGE` in the Wardby
|
|
35
|
+
server's settings (on a quickstart install, `.wardby/.env` in the Wardby project
|
|
36
|
+
directory). Use `CODING_CLAUDE_TOOL_RUNNER_IMAGE_NODE_PYTHON_3_12` instead when
|
|
37
|
+
the project also needs Python. This image comes from the same Wardby release as
|
|
38
|
+
the server, which the custom image must match.
|
|
39
|
+
|
|
40
|
+
If the value is a bare local ID (`sha256:...`), tag it first, because Docker
|
|
41
|
+
cannot build `FROM` an ID:
|
|
42
|
+
|
|
43
|
+
```sh
|
|
44
|
+
docker tag sha256:<id> wardby-tool-runner-base:local
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## Step 3: write the Dockerfile
|
|
48
|
+
|
|
49
|
+
Start from the base image, install as `root`, and end as the tool runner's user:
|
|
50
|
+
|
|
51
|
+
```dockerfile
|
|
52
|
+
FROM <base image from step 2>
|
|
53
|
+
USER root
|
|
54
|
+
RUN apt-get update \
|
|
55
|
+
&& apt-get install -y --no-install-recommends <packages> \
|
|
56
|
+
&& rm -rf /var/lib/apt/lists/*
|
|
57
|
+
USER 10001:10001
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Rules:
|
|
61
|
+
|
|
62
|
+
- **Keep the entrypoint.** Do not set `ENTRYPOINT` or `CMD`, and keep
|
|
63
|
+
`USER 10001:10001` as the last `USER` line.
|
|
64
|
+
- **Install everything at build time.** A run can download only npm and PyPI
|
|
65
|
+
packages, so every other package must be in the image.
|
|
66
|
+
- **Compile in an earlier stage.** The tool runner is Debian 12 (bookworm).
|
|
67
|
+
Compile native code in an earlier build stage that uses a bookworm image,
|
|
68
|
+
and copy only the results. The long-form guide has a Ruby example.
|
|
69
|
+
- **Settings go in `/etc/profile.d/`.** Commands run as `sh -lc` with a fixed
|
|
70
|
+
environment, so `ENV` lines do not reach them. Put settings in a file under
|
|
71
|
+
`/etc/profile.d/`, and put programs in `/usr/local/bin`.
|
|
72
|
+
- **Mind the run's filesystem.** The root filesystem is read-only. `/tmp` and
|
|
73
|
+
`/home/wardby` are empty scratch space; anything the image put there is
|
|
74
|
+
hidden. `/workspace` is the checkout; files you want to keep go there. Put
|
|
75
|
+
caches and temporary files under `/workspace/.cache/`.
|
|
76
|
+
- **No root at run time.** Commands always run as user 10001 with
|
|
77
|
+
`no-new-privileges`, so setuid programs do not help.
|
|
78
|
+
- Release images are `linux/amd64`. On an ARM machine, pass
|
|
79
|
+
`--platform linux/amd64` to `docker build` and `docker run`.
|
|
80
|
+
|
|
81
|
+
## Step 4: build it and run the tests the way a run would
|
|
82
|
+
|
|
83
|
+
```sh
|
|
84
|
+
docker build --tag wardby-tool-runner-<language>:local <dockerfile folder>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Then run the project's test command against a **throwaway clone**, never the
|
|
88
|
+
user's checkout. This command uses a run's restrictions and the same fixed
|
|
89
|
+
environment a run gives commands, so `ENV` lines in the image do not apply:
|
|
90
|
+
|
|
91
|
+
```sh
|
|
92
|
+
git clone <repository> /tmp/wardby-image-check
|
|
93
|
+
docker run --rm --read-only --tmpfs /tmp:rw,noexec,nosuid,size=64m --tmpfs /home/wardby:rw,noexec,nosuid,size=64m,uid=10001,gid=10001,mode=0700 --network none --user 10001:10001 --cap-drop ALL --security-opt no-new-privileges -v /tmp/wardby-image-check:/workspace -w /workspace --entrypoint env wardby-tool-runner-<language>:local -i HOME=/home/wardby LANG=C.UTF-8 PATH=/opt/wardby/bin:/usr/local/bin:/usr/bin:/bin sh -lc '<test command, e.g. bundle exec rake test>'
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
On Linux, make the clone writable for user 10001 first (it is a throwaway copy:
|
|
97
|
+
`chmod -R a+rwX /tmp/wardby-image-check`). Fix the Dockerfile until the tests
|
|
98
|
+
run. A "command not found" means a missing program or a missing
|
|
99
|
+
`/etc/profile.d/` setting. Delete the clone afterwards.
|
|
100
|
+
|
|
101
|
+
## Step 5: choose the image reference
|
|
102
|
+
|
|
103
|
+
`workerImageRef` must be immutable; a tag is refused.
|
|
104
|
+
|
|
105
|
+
- **Local quickstart** (Wardby runs coding jobs with Docker on this machine):
|
|
106
|
+
use the local image ID,
|
|
107
|
+
`docker image inspect --format '{{.Id}}' wardby-tool-runner-<language>:local`.
|
|
108
|
+
Wardby never pulls these images, so build on the same machine.
|
|
109
|
+
- **Kubernetes**: push the image to a registry the cluster can pull from,
|
|
110
|
+
and use `<registry>/<name>@sha256:<digest>`.
|
|
111
|
+
|
|
112
|
+
## Step 6: update the builder and try it
|
|
113
|
+
|
|
114
|
+
1. Call `update_agent` with the coding agent's id and
|
|
115
|
+
`codingProfile: {workerImageRef: "<reference from step 5>"}`. This needs the
|
|
116
|
+
`agents:admin` scope and the admin role. On a hosted server, ask an
|
|
117
|
+
administrator if it is refused.
|
|
118
|
+
2. Start a small run that exercises the toolchain:
|
|
119
|
+
`trigger_agent {agentId, task: "Run the project's tests and report the results. Change nothing."}`.
|
|
120
|
+
3. Read the result with `get_run` and report to the user what ran, what passed
|
|
121
|
+
and what failed.
|
|
122
|
+
|
|
123
|
+
If a run fails with `worker_tool_runner_unreachable`, the image was usually not
|
|
124
|
+
built `FROM` this release's tool runner, or its `USER` or `ENTRYPOINT` was
|
|
125
|
+
changed. Rebuild the image whenever Wardby is upgraded.
|
|
126
|
+
|
|
127
|
+
To undo it, call `update_agent` with `codingProfile: {workerImageRef: null}`.
|
|
128
|
+
|
|
129
|
+
Related: [Build a custom worker image](build-worker-image.md),
|
|
130
|
+
[Approve packages for coding agents](coding-packages.md) and
|
|
131
|
+
[Troubleshoot coding workers](troubleshooting/coding-workers.md).
|
|
@@ -15,12 +15,9 @@ on top of Wardby's driver base image and set the coding agent's
|
|
|
15
15
|
`codingProfile.workerImageRef` to it. The long-form guide is
|
|
16
16
|
[`docs/coding-worker-byo-images.md`](../docs/coding-worker-byo-images.md).
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
`claude-code`, say so and stop; the user can switch the agent to Codex (the
|
|
22
|
-
quickstart sets Codex up with `--coding-provider codex` and an
|
|
23
|
-
`OPENAI_API_KEY`).
|
|
18
|
+
These steps build on the driver image (`codingProfile.provider: codex`). For a
|
|
19
|
+
`claude-code` agent, search help for a Claude Code image article for this
|
|
20
|
+
version; if there is none, tell the user and stop.
|
|
24
21
|
|
|
25
22
|
If you are an assistant connected to Wardby over MCP, follow these steps. Do
|
|
26
23
|
them in order, ask the user instead of guessing, and stop at the first failed
|
|
@@ -43,6 +43,17 @@ from bots and people without write access. Repository links require the
|
|
|
43
43
|
agent owner's linked GitHub access, or an explicitly recorded administrator
|
|
44
44
|
approval.
|
|
45
45
|
|
|
46
|
+
## When a review starts
|
|
47
|
+
|
|
48
|
+
A push normally starts a review right away, but its timing can be held back
|
|
49
|
+
by two independent things: from Wardby 0.6.0, the pull request's own
|
|
50
|
+
delegating request still running (see [Reviewing a pull request a delegated run
|
|
51
|
+
opened](#reviewing-a-pull-request-a-delegated-run-opened) below), and, on a
|
|
52
|
+
link set up for it, CI on the pushed head still running (see [Review after
|
|
53
|
+
CI (`waitForCi`)](#review-after-ci-waitforci) below). Either can delay the
|
|
54
|
+
check that reports the review's result; neither changes what the review
|
|
55
|
+
itself reports once it runs.
|
|
56
|
+
|
|
46
57
|
## CI and sibling pull requests
|
|
47
58
|
|
|
48
59
|
`repo_pr_read` also returns `ci`: the CI check runs and commit statuses on the
|
|
@@ -65,6 +76,54 @@ on the review check instead.
|
|
|
65
76
|
Commit statuses need the App's **Commit statuses: Read** permission; without
|
|
66
77
|
it only check runs are shown.
|
|
67
78
|
|
|
79
|
+
With Wardby 0.6.0 or later, `repo_pr_read` also returns `relatedPullRequests`: this
|
|
80
|
+
request's pull requests (`repository`, `number`, `state`, `mergeOrder`,
|
|
81
|
+
`self`), computed fresh at call time; empty on a human pull request, one
|
|
82
|
+
with no recognized Wardby marker, or a pull request on a local repository
|
|
83
|
+
(no origin marker to look up there). The `self` entry (the pull request just
|
|
84
|
+
read) always has a `state` (`draft`, `open`, `merged`, or `closed`) from that
|
|
85
|
+
same read. Another entry has a `state` (`open`, `merged`, or `closed`) only
|
|
86
|
+
when Wardby has it stored, as it does for pull requests linked to an issue,
|
|
87
|
+
and omits it otherwise; call `repo_pr_read` on that pull request when you
|
|
88
|
+
need its live state. The list is current; the PR body's **Related pull
|
|
89
|
+
requests** section can be stale — see
|
|
90
|
+
[Related pull requests across repositories](related-pull-requests.md).
|
|
91
|
+
|
|
92
|
+
With Wardby 0.6.0 or later, once a set has more than one `mergeOrder`, each
|
|
93
|
+
pull request in it also gets its own check run, named `wardby merge order`,
|
|
94
|
+
independent of any reviewer link; search help for "merge order check" for
|
|
95
|
+
its states and for requiring it in branch protection.
|
|
96
|
+
|
|
97
|
+
## Reviewing a pull request a delegated run opened
|
|
98
|
+
|
|
99
|
+
This requires Wardby 0.6.0 or later; earlier releases review such a pull
|
|
100
|
+
request on its first push. When a lead agent delegates coding work and a sub-agent opens the pull
|
|
101
|
+
request (see [Fanning out to several
|
|
102
|
+
builders](../docs/agent-recipes.md#fanning-out-to-several-builders)), every
|
|
103
|
+
reviewer linked with the `pull_request` trigger holds its review of that
|
|
104
|
+
pull request until the delegating (lead) run finishes, however it ends
|
|
105
|
+
(including failing, being cancelled or being lost), even if the link has no
|
|
106
|
+
`waitForCi` set. This gives the request's other pull requests, if any, time
|
|
107
|
+
to open before any of them is reviewed, so a reviewer does not report a
|
|
108
|
+
field or route as missing only because a sibling pull request had not opened
|
|
109
|
+
yet. When the lead run finishes normally, their **Related pull requests**
|
|
110
|
+
sections have also been rewritten (see [Related pull requests across
|
|
111
|
+
repositories](related-pull-requests.md)); when it is ended another way, such
|
|
112
|
+
as being cancelled, held reviews start without that rewrite. Either way,
|
|
113
|
+
reviewers should rely on `repo_pr_read`'s `relatedPullRequests`.
|
|
114
|
+
|
|
115
|
+
A reviewer linked with `waitForCi` then waits for CI too, once the lead run
|
|
116
|
+
finishes, with its own full 15-minute fallback counted from that point. A
|
|
117
|
+
pull request opened directly, by a human, or on a local repository is never
|
|
118
|
+
held this way. A later request that continues an already-open pull request
|
|
119
|
+
is not held again: the request that opened it has already finished (a push
|
|
120
|
+
inside the same, still-running request is held). If Wardby cannot tell
|
|
121
|
+
whether the pull request's opening run was delegated, the review starts
|
|
122
|
+
right away instead. A held review not released when its lead run finishes is
|
|
123
|
+
reconsidered by Wardby's reconciliation sweep once it has been held for 15
|
|
124
|
+
minutes and released when the lead run has finished, and dropped after 24
|
|
125
|
+
hours like a review held for CI.
|
|
126
|
+
|
|
68
127
|
## Review after CI (`waitForCi`)
|
|
69
128
|
|
|
70
129
|
A `pull_request` link can set `waitForCi: true` so this reviewer reviews a
|
|
@@ -105,12 +164,15 @@ Add this to a reviewer's system prompt:
|
|
|
105
164
|
Reviewer step (CI and related pull requests). Read `ci` from repo_pr_read.
|
|
106
165
|
When `ci` and the description's Tests disagree, follow CI and say so; never
|
|
107
166
|
ask for a fix only because a sandbox test failed while CI passed. Report
|
|
108
|
-
pending checks as pending. If
|
|
109
|
-
|
|
110
|
-
of those pull requests: do not report it as missing; note the
|
|
111
|
-
and the
|
|
112
|
-
|
|
113
|
-
|
|
167
|
+
pending checks as pending. If repo_pr_read's relatedPullRequests is
|
|
168
|
+
non-empty, a field, route or schema the change relies on may be added by
|
|
169
|
+
one of those pull requests: do not report it as missing; note the
|
|
170
|
+
dependency and the listed merge order instead. relatedPullRequests is
|
|
171
|
+
current; the PR body's "Related pull requests" section can be stale.
|
|
172
|
+
|
|
173
|
+
On a release before 0.6.0, `repo_pr_read` has no `relatedPullRequests`:
|
|
174
|
+
use the description's **Related pull requests** section in its place in that
|
|
175
|
+
step. Wardby also writes that section: see
|
|
114
176
|
[Related pull requests across repositories](related-pull-requests.md).
|
|
115
177
|
|
|
116
178
|
For App permissions, webhook setup, trigger configuration, and security
|
package/help/deploy-gke.md
CHANGED
|
@@ -29,8 +29,12 @@ The deployment process is:
|
|
|
29
29
|
3. Put first-time values in an untracked `.env.local`; `deploy/gke/up.sh`
|
|
30
30
|
seeds Secret Manager without overwriting existing production values.
|
|
31
31
|
Jira settings are optional there, all or none; see [Jira](jira.md).
|
|
32
|
-
4. Run `
|
|
32
|
+
4. Run `WARDBY_HOSTNAME=wardby.example.com deploy/gke/up.sh`, then verify DNS,
|
|
33
33
|
certificate issuance, database IAM bootstrap, and service health.
|
|
34
|
+
Use `WARDBY_HOSTNAME`, not `HOSTNAME` (shells set that to the machine name);
|
|
35
|
+
the script refuses local names such as `*.lan` or `*.local`, and asks you
|
|
36
|
+
to confirm (or set `WARDBY_HOSTNAME_CHANGE=<new hostname>`) before moving
|
|
37
|
+
a deployment to a different hostname.
|
|
34
38
|
|
|
35
39
|
When a release changes `deploy/gke/database-grants.sql`, re-run the database
|
|
36
40
|
grants bootstrap **before** deploying that release, so the proxy role can
|
|
@@ -42,6 +46,9 @@ The Kubernetes launcher runs Codex and Claude Code coding workers; a Claude
|
|
|
42
46
|
Code pod adds a tool-runner sidecar with its own image. Configure an identity
|
|
43
47
|
provider and GitHub App before allowing people to use the public endpoint.
|
|
44
48
|
|
|
49
|
+
To lower the idle cost of a lightly used deployment, see
|
|
50
|
+
[Low-power mode](../docs/getting-started-gke.md#low-power-mode) (Wardby 0.6.0 and later).
|
|
51
|
+
|
|
45
52
|
## Plan it with your assistant
|
|
46
53
|
|
|
47
54
|
If you are an assistant connected to Wardby over MCP and the user asked to plan
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: deployment-targets
|
|
3
3
|
title: Choose a deployment target
|
|
4
|
-
summary:
|
|
4
|
+
summary: Compare local, self-hosted, and GKE deployment paths and their operational boundaries.
|
|
5
5
|
audience: operator
|
|
6
6
|
tags: [deployment, docker, gke, aws, production]
|
|
7
7
|
appliesTo: >=0.2.1
|
|
@@ -9,31 +9,42 @@ appliesTo: >=0.2.1
|
|
|
9
9
|
|
|
10
10
|
# Choose a deployment target
|
|
11
11
|
|
|
12
|
-
Wardby has
|
|
12
|
+
Wardby has a local development path, a self-hosted container deployment
|
|
13
|
+
reference, and a supported GKE reference deployment. The references provide
|
|
14
|
+
different parts of a production environment; operators must complete the
|
|
15
|
+
remaining controls and verification before accepting production work.
|
|
13
16
|
|
|
14
17
|
- **Local development:** `wardby quickstart` runs the control plane locally
|
|
15
18
|
with its portable PostgreSQL container. It is the best place to evaluate,
|
|
16
19
|
develop agents, and connect a local Codex or Claude Code client.
|
|
17
|
-
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
20
|
+
`deploy/kind-coding` is a local Kubernetes proof harness, not a production
|
|
21
|
+
deployment.
|
|
22
|
+
- **Self-hosted container deployment** (e.g., Docker Compose on a VM or
|
|
23
|
+
on-premises host): Wardby supplies runtime and migration images plus a
|
|
24
|
+
Compose/Caddy edge reference. The operator supplies PostgreSQL, secrets,
|
|
25
|
+
network and egress controls, backups and restore testing, monitoring, and a
|
|
26
|
+
separate coding-controller host. Configure authentication for the deployment.
|
|
21
27
|
- **Google Kubernetes Engine Autopilot:** the supported Google Cloud path. It
|
|
22
|
-
provisions GKE, private-IP Cloud SQL
|
|
23
|
-
Claude Code workers, HTTPS Gateway, and
|
|
24
|
-
controls.
|
|
28
|
+
provisions GKE, private-IP Cloud SQL with backups and point-in-time recovery,
|
|
29
|
+
Artifact Registry, isolated Codex and Claude Code workers, HTTPS Gateway, and
|
|
30
|
+
GCP-native secret and network controls. Operators still need to choose
|
|
31
|
+
availability, test recovery, and configure alerts and retention. See
|
|
32
|
+
[Deploy on GKE](deploy-gke.md).
|
|
25
33
|
|
|
26
|
-
AWS
|
|
27
|
-
|
|
34
|
+
AWS can run the portable runtime and has a Bedrock Claude adapter, but a native
|
|
35
|
+
AWS deployment module is planned and has not shipped. Other cloud providers
|
|
28
36
|
can run the production container image with equivalent database, ingress,
|
|
29
37
|
identity, secret, isolation, and observability controls; that infrastructure is
|
|
30
|
-
operator-owned.
|
|
38
|
+
operator-owned. On Amazon EKS, set `KUBERNETES_PLATFORM=eks` (gVisor node group
|
|
39
|
+
required) and, for RDS, `DATABASE_AUTH=rds-iam`; see "Database
|
|
40
|
+
authentication" in
|
|
41
|
+
[`docs/security-deployment.md`](../docs/security-deployment.md).
|
|
31
42
|
|
|
32
43
|
The older `deploy/gcp` Cloud Run module is deprecated. Do not choose it for a
|
|
33
44
|
new installation.
|
|
34
45
|
|
|
35
|
-
Before going live, complete the
|
|
36
|
-
|
|
46
|
+
Before going live, complete the release verification and security deployment
|
|
47
|
+
checks, and make plans for backups, upgrades, alerts, and incident response. Read
|
|
37
48
|
[`docs/getting-started.md`](../docs/getting-started.md) for the local and
|
|
38
49
|
container setup, and [`docs/security-deployment.md`](../docs/security-deployment.md)
|
|
39
50
|
for the production controls.
|
|
@@ -26,8 +26,8 @@ runs recorded it) when `CODING_WORKER_IMAGE` has since been unset.
|
|
|
26
26
|
a toolchain with its own image (such as `CODING_WORKER_IMAGE_NODE_PYTHON_3_12`),
|
|
27
27
|
still runs without `CODING_WORKER_IMAGE`.
|
|
28
28
|
- **`coding_provider_not_configured:claude-code`**: `CODING_CLAUDE_WORKER_IMAGE`
|
|
29
|
-
or `CODING_CLAUDE_TOOL_RUNNER_IMAGE` isn't set. Claude Code needs both,
|
|
30
|
-
|
|
29
|
+
or `CODING_CLAUDE_TOOL_RUNNER_IMAGE` isn't set. Claude Code needs both, even
|
|
30
|
+
for an agent with its own `workerImageRef`.
|
|
31
31
|
|
|
32
32
|
This error is about images, not API keys. A missing or invalid model API key
|
|
33
33
|
fails later, when the run calls the model.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: errors/database-auth-invalid
|
|
3
|
+
title: Database authentication is misconfigured
|
|
4
|
+
summary: DATABASE_AUTH or the database URL does not meet the rules for the chosen authentication mode, so the process refused to start.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [error, database, rds, iam, deploy, database_auth_invalid, rds-iam]
|
|
7
|
+
appliesTo: ">=0.5.4"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Database authentication is misconfigured
|
|
11
|
+
|
|
12
|
+
`database_auth_invalid` means `DATABASE_AUTH` is not valid, or `DATABASE_AUTH=rds-iam` is set and `DATABASE_URL` (or `DBOS_SYSTEM_DATABASE_URL`) does not meet its rules. Wardby checks this when the process starts, so every `wardby` command fails with it, not only the server. The message names the problem; it never includes the URL, credentials, or parameter values.
|
|
13
|
+
|
|
14
|
+
`DATABASE_AUTH` is `password` (the default; the password is in `DATABASE_URL`) or `rds-iam` (Amazon RDS IAM database authentication, where the password is a short-lived token signed with the workload's AWS credentials). Any other value is refused.
|
|
15
|
+
|
|
16
|
+
Under `rds-iam` check each of these:
|
|
17
|
+
|
|
18
|
+
1. `DATABASE_URL` starts with `postgresql://` or `postgres://`, has a user, and has no password.
|
|
19
|
+
2. `AWS_REGION` or `DATABASE_AWS_REGION` is set (`DATABASE_AWS_REGION` wins).
|
|
20
|
+
3. The URL has `sslmode=verify-full` and `sslrootcert=<path to the RDS CA bundle>`, and that file exists and is readable in the container. An unreadable file is reported with its error code, such as `ENOENT` for a missing file or `EACCES` for one the process cannot read.
|
|
21
|
+
4. Only supported parameters are present: `sslmode`, `sslrootcert`, `application_name`, `fallback_application_name`, `options`, `client_encoding`, `statement_timeout`, `lock_timeout`, `idle_in_transaction_session_timeout`, `query_timeout`, `connection_limit`, `pool_timeout`, `connect_timeout`, `schema`. Anything else (`sslcert`, `sslkey`, `ssl`, `host`, `pgbouncer`, ...) is refused by name; remove it.
|
|
22
|
+
5. User and database names in the URL are correctly percent-encoded.
|
|
23
|
+
|
|
24
|
+
If the code is not raised but connections are rejected, the configuration is valid and the problem is on the AWS side: the workload's IAM role needs `rds-db:connect` for the database user, and that user needs the `rds_iam` role in the database.
|
|
25
|
+
|
|
26
|
+
`prisma migrate deploy` and `dbos schema` take a URL and do not follow `DATABASE_AUTH`. Mint a short-lived URL with the migration image's helper: `DATABASE_URL="$(node scripts/rds-iam-url.mjs)" && export DATABASE_URL && npm run prisma:migrate && npm run dbos:migrate`. It reports the same `database_auth_invalid` errors for the checks it shares. `wardby quickstart` does not support `rds-iam`.
|
|
27
|
+
|
|
28
|
+
See [Database authentication](../../docs/security-deployment.md#database-authentication).
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: errors/github-account-not-allowed
|
|
3
|
+
title: The repository's GitHub account is not served by this server
|
|
4
|
+
summary: The repository belongs to a GitHub user or organization that is neither the GitHub App's owner nor listed in WARDBY_GITHUB_ALLOWED_ACCOUNTS, so wardby refuses to link or use it.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [error, github, repositories, configuration, WARDBY_GITHUB_ALLOWED_ACCOUNTS, link_repository]
|
|
7
|
+
appliesTo: ">=0.6.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# The repository's GitHub account is not served by this server
|
|
11
|
+
|
|
12
|
+
`github_account_not_allowed` means the repository's owner is not one of the
|
|
13
|
+
accounts this server serves through its GitHub App: the App's owner and the
|
|
14
|
+
accounts in `WARDBY_GITHUB_ALLOWED_ACCOUNTS`. `link_repository` and coding
|
|
15
|
+
profiles refuse such a repository, even with `adminOverride`, and runs on an
|
|
16
|
+
existing link to it are refused.
|
|
17
|
+
|
|
18
|
+
## What to do
|
|
19
|
+
|
|
20
|
+
- **The repository should be served:** an operator adds its owner's login to
|
|
21
|
+
`WARDBY_GITHUB_ALLOWED_ACCOUNTS` and restarts the server, then links it again.
|
|
22
|
+
- **It should not:** use a repository owned by a served account, or another
|
|
23
|
+
wardby server with its own GitHub App.
|
|
24
|
+
|
|
25
|
+
Related: [Connect GitHub repositories](../github.md).
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: errors/low-power-disabled
|
|
3
|
+
title: Scale-down refused, mode not enabled
|
|
4
|
+
summary: A request to put the coding proxy or native gateway to sleep was refused because WARDBY_LOW_POWER is not 1 on this deployment.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [error, gke, kubernetes, low_power_disabled]
|
|
7
|
+
appliesTo: ">=0.6.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Sleep refused: low-power mode not enabled
|
|
11
|
+
|
|
12
|
+
`low_power_disabled` (HTTP 409) means `power_sleep` was called, but low-power
|
|
13
|
+
mode is not on for this deployment: `WARDBY_LOW_POWER` is not `1` on the
|
|
14
|
+
control plane, or the control plane does not use `JOB_LAUNCHER=kubernetes` (it
|
|
15
|
+
then logs `low_power_ignored` at start-up). Nothing was scaled.
|
|
16
|
+
|
|
17
|
+
With the mode off, the coding proxy and native gateway always run, so there is
|
|
18
|
+
nothing to put to sleep. `power_status` returns `{ "enabled": false }` in the
|
|
19
|
+
same case.
|
|
20
|
+
|
|
21
|
+
To turn the mode on:
|
|
22
|
+
|
|
23
|
+
1. Deploy with the flag: `WARDBY_HOSTNAME=wardby.example.com WARDBY_LOW_POWER=1 deploy/gke/up.sh`.
|
|
24
|
+
On a local kind cluster, use `WARDBY_LOW_POWER=1 deploy/kind-coding/up.sh` and
|
|
25
|
+
also set `WARDBY_LOW_POWER=1` in the environment of `wardby serve`.
|
|
26
|
+
2. Check that the control plane runs with `JOB_LAUNCHER=kubernetes`.
|
|
27
|
+
3. Call `power_status`; it reports `"enabled": true` once the mode is on.
|
|
28
|
+
|
|
29
|
+
See [Low-power mode on GKE](../low-power-mode.md).
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: errors/low-power-scale-forbidden
|
|
3
|
+
title: Scaling forbidden by RBAC
|
|
4
|
+
summary: In low-power mode, the control plane is not allowed to read or scale the coding proxy or native gateway Deployment, or read its Endpoints, because the wardby-power Role is missing or out of date.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [error, low-power, gke, kubernetes, rbac, low_power_scale_forbidden]
|
|
7
|
+
appliesTo: ">=0.6.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Low-power scale forbidden
|
|
11
|
+
|
|
12
|
+
`low_power_scale_forbidden` means the Kubernetes API refused the control plane
|
|
13
|
+
something low-power mode needs: reading or scaling the coding proxy or native
|
|
14
|
+
gateway Deployment, or reading its Endpoints to see whether a woken target is
|
|
15
|
+
ready. The message names the action and the object, for example
|
|
16
|
+
`may not get Endpoints "wardby-native-gateway"`. It can come from a run waking a
|
|
17
|
+
target, from `power_status`, or from `power_sleep`.
|
|
18
|
+
|
|
19
|
+
Low-power mode needs the Role `wardby-power` (and its RoleBinding) in the
|
|
20
|
+
namespace. It grants `get` and `patch` on the two Deployments and `get` on
|
|
21
|
+
their Endpoints, by name. At start-up the control plane warns
|
|
22
|
+
`low_power_scale_forbidden: missing ...` naming each missing permission (for
|
|
23
|
+
example `get endpoints/wardby-native-gateway`); if the check itself fails it
|
|
24
|
+
logs `low_power_access_check_failed`.
|
|
25
|
+
|
|
26
|
+
1. Re-run the deploy with the mode on: `WARDBY_LOW_POWER=1 deploy/gke/up.sh`
|
|
27
|
+
(on kind, `WARDBY_LOW_POWER=1 deploy/kind-coding/up.sh`). It applies the
|
|
28
|
+
current Role, including the Endpoints rule an older Role may lack.
|
|
29
|
+
2. Confirm: `kubectl -n wardby-coding describe role wardby-power` lists both
|
|
30
|
+
rules, and `kubectl -n wardby-coding get rolebinding wardby-power` exists.
|
|
31
|
+
3. If you meant to turn the mode off, unset `WARDBY_LOW_POWER` on the control
|
|
32
|
+
plane too, then re-run `up.sh` without it.
|
|
33
|
+
4. Trigger the run again.
|
|
34
|
+
|
|
35
|
+
See [Low-power mode on GKE](../low-power-mode.md).
|