@wardby/cli 0.5.2 → 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/local-git.js +9 -1
- 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/registry/pypi.d.ts +25 -1
- package/dist/coding/registry/pypi.js +140 -16
- package/dist/coding/registry/types.d.ts +17 -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 +56 -2
- 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/http-runtime.js +13 -6
- 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 +1492 -113
- 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/ownership.d.ts +1 -1
- 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 +83 -12
- 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/coding-proxy/mock-upstream.d.ts +33 -0
- package/dist/providers/coding-proxy/mock-upstream.js +116 -0
- package/dist/providers/coding-proxy/registry/prisma-store.d.ts +3 -0
- package/dist/providers/coding-proxy/registry/prisma-store.js +17 -0
- package/dist/providers/coding-proxy/registry/service.d.ts +4 -0
- package/dist/providers/coding-proxy/registry/service.js +20 -3
- package/dist/providers/coding-proxy/registry/store.d.ts +18 -1
- package/dist/providers/coding-proxy/registry/store.js +33 -0
- package/dist/providers/coding-proxy/runtime.js +12 -1
- package/dist/providers/coding-proxy/types.d.ts +2 -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 +16 -1
- package/dist/providers/jobs/kubernetes-isolation.js +58 -5
- 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 +56 -7
- package/dist/providers/jobs/kubernetes.js +117 -36
- 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/llm/openai.js +0 -1
- 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-db.js +14 -2
- package/dist/quickstart/coding-doctor.d.ts +3 -0
- package/dist/quickstart/coding-doctor.js +3 -0
- package/dist/quickstart/coding-images.d.ts +9 -0
- package/dist/quickstart/coding-images.js +39 -0
- package/dist/quickstart/coding-seed.d.ts +20 -1
- package/dist/quickstart/coding-seed.js +96 -7
- package/dist/quickstart/coding.d.ts +2 -0
- package/dist/quickstart/coding.js +75 -3
- package/dist/quickstart/config.d.ts +2 -0
- package/dist/quickstart/config.js +4 -0
- package/dist/quickstart/images.d.ts +13 -0
- package/dist/quickstart/images.js +80 -12
- package/dist/quickstart/index.d.ts +0 -2
- package/dist/quickstart/index.js +10 -14
- package/dist/quickstart/manifests.d.ts +56 -0
- package/dist/quickstart/manifests.js +523 -0
- package/dist/quickstart/python-detect.d.ts +10 -0
- package/dist/quickstart/python-detect.js +32 -0
- package/dist/quickstart/repo-packages.d.ts +10 -0
- package/dist/quickstart/repo-packages.js +132 -0
- package/dist/quickstart/reviewer-prompt.d.ts +12 -0
- package/dist/quickstart/reviewer-prompt.js +84 -0
- package/dist/quickstart/scenarios.d.ts +19 -0
- package/dist/quickstart/scenarios.js +28 -0
- package/dist/quickstart/sync-reviewer-prompt.d.ts +1 -0
- package/dist/quickstart/sync-reviewer-prompt.js +10 -0
- 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 +214 -18
- 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 +127 -2
- package/docs/coding-packages.md +105 -5
- package/docs/coding-services.md +3 -1
- package/docs/coding-worker-byo-images.md +239 -2
- package/docs/coding-worker-isolation.md +88 -23
- package/docs/getting-started-gke.md +225 -9
- package/docs/getting-started-identity-provider.md +21 -10
- package/docs/getting-started.md +140 -11
- package/docs/jira-agents.md +5 -1
- package/docs/knowledge.md +11 -0
- 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 +136 -0
- package/help/brokered-secrets.md +79 -0
- package/help/build-claude-code-image.md +131 -0
- package/help/build-worker-image.md +195 -0
- package/help/code-review-agents.md +68 -6
- package/help/coding-packages.md +31 -2
- package/help/creating-agents.md +14 -0
- package/help/deploy-gke.md +37 -6
- package/help/deployment-targets.md +24 -13
- 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 +18 -0
- package/help/github.md +18 -1
- package/help/identity-and-access.md +5 -1
- package/help/local-repositories.md +35 -5
- 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 +13 -5
- 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
|
@@ -135,14 +135,41 @@ then:
|
|
|
135
135
|
`CODING_CLAUDE_WORKER_IMAGE` plus `CODING_CLAUDE_TOOL_RUNNER_IMAGE`, override
|
|
136
136
|
them with your own digests;
|
|
137
137
|
- starts the coding proxy and runs the coding preflight;
|
|
138
|
+
- detects Python projects: if the repository's committed root holds
|
|
139
|
+
`pyproject.toml`, `setup.py`, `setup.cfg`, `Pipfile` or a `requirements*.txt`,
|
|
140
|
+
`local-builder` gets a Node + Python 3.12 workspace (`toolchain: node-python`)
|
|
141
|
+
for Codex and Claude Code, with `pytest` and `ruff`, so it can run the tests.
|
|
142
|
+
The images come from `CODING_WORKER_IMAGE_NODE_PYTHON_3_12` (Codex) and
|
|
143
|
+
`CODING_CLAUDE_TOOL_RUNNER_IMAGE_NODE_PYTHON_3_12` (Claude Code); set them to
|
|
144
|
+
override. If this version has no Python image, quickstart says so and the
|
|
145
|
+
builder uses the Node workspace (it can edit but not run Python tests). Other
|
|
146
|
+
languages need a bring-your-own image via `workerImageRef`. See the BYO
|
|
147
|
+
worker images guide in the long-form docs;
|
|
138
148
|
- finds the repository: a trusted folder that is a git repository, or the
|
|
139
149
|
repositories directly inside a trusted folder (hidden folders are skipped).
|
|
140
150
|
With several it asks which to use; non-interactively it uses the first in
|
|
141
151
|
sorted order and prints the choice. Re-run with `--trust <repo>` to pick
|
|
142
152
|
another: folders passed on a run take precedence over saved ones;
|
|
153
|
+
- offers the packages the repository declares (`package.json` dependencies,
|
|
154
|
+
`pyproject.toml` dependencies including optional groups and Poetry, with
|
|
155
|
+
Poetry's legacy `[tool.poetry.dev-dependencies]`, the `[build-system]
|
|
156
|
+
requires` build packages (or `setuptools` and `wheel` when there is no
|
|
157
|
+
`[build-system]` table), and
|
|
158
|
+
`requirements*.txt`, read from the committed root) as `local-builder`'s
|
|
159
|
+
package allowlist: names without versions (Python extras such as
|
|
160
|
+
`psycopg[binary]` are kept), up to 200 per ecosystem. It lists them
|
|
161
|
+
and asks "Allow local-builder to install these packages through Wardby's
|
|
162
|
+
registry? [Y/n]"; every registry safeguard still applies. If you decline, or
|
|
163
|
+
run non-interactively without `--allow-repo-packages`, the allowlist stays
|
|
164
|
+
empty: add packages later with `update_agent` and
|
|
165
|
+
`codingProfile.packageAllowlist`. A re-run replaces the allowlist with what
|
|
166
|
+
the repository declares now. A manifest quickstart cannot read is skipped
|
|
167
|
+
with a note. See [Approve packages for coding agents](coding-packages.md);
|
|
143
168
|
- creates `local-builder` (a coding agent, $2 budget) and `local-reviewer`
|
|
144
|
-
(a review agent, $1 budget
|
|
145
|
-
|
|
169
|
+
(a review agent, $1.50 budget, on Claude Sonnet 5 or `gpt-5.6-terra` by
|
|
170
|
+
default, with the thorough review prompt quoted in
|
|
171
|
+
[Set up an architecture agent](architecture-agent.md#reviewer-system-prompt))
|
|
172
|
+
for the repository and prints the two `trigger_agent` calls to try; and
|
|
146
173
|
- if the repository has no `.wardby/services.yaml`, offers a starter one with
|
|
147
174
|
PostgreSQL and/or Redis. It is committed to the branch
|
|
148
175
|
`wardby/quickstart-services` without touching your working tree. Merge that
|
|
@@ -151,11 +178,14 @@ then:
|
|
|
151
178
|
branch" is whichever branch is checked out when quickstart runs.
|
|
152
179
|
|
|
153
180
|
Flags: `--coding` (run the step), `--no-coding` (skip it), `--trust <dir>`
|
|
154
|
-
(repeatable), `--coding-provider codex|claude-code
|
|
155
|
-
`--starter-services postgres,redis|none
|
|
181
|
+
(repeatable), `--coding-provider codex|claude-code`,
|
|
182
|
+
`--starter-services postgres,redis|none` and `--allow-repo-packages` (or
|
|
183
|
+
`--no-allow-repo-packages`). In `--non-interactive` mode the step
|
|
156
184
|
only runs with `--coding`, and it needs at least one `--trust`. `doctor` and
|
|
157
185
|
`status` report the trusted folders, worker image, coding proxy and each local
|
|
158
|
-
agent's repository, and `down` stops the proxy with the database.
|
|
186
|
+
agent's repository, and `down` stops the proxy with the database. Quickstart
|
|
187
|
+
ends with a menu of next things to ask your assistant, each naming the help
|
|
188
|
+
article it follows; see [Get started](getting-started.md).
|
|
159
189
|
|
|
160
190
|
## Errors
|
|
161
191
|
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: low-power-mode
|
|
3
|
+
title: Low power mode on GKE
|
|
4
|
+
summary: Low power mode: scale the coding proxy and native gateway to zero when idle to cut the cost of a lightly used GKE deployment, and what changes when they wake.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [gke, cost, low-power, scale-to-zero, kubernetes, autoscaling, idle, power_sleep, power_status, sleep now, power:manage]
|
|
7
|
+
appliesTo: ">=0.6.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Low-power mode on GKE
|
|
11
|
+
|
|
12
|
+
Low-power mode reduces the cost of a GKE Autopilot deployment that runs agents
|
|
13
|
+
only occasionally. When it is on, the coding proxy and the native gateway scale
|
|
14
|
+
to zero replicas after an idle window and wake when a run needs them. The
|
|
15
|
+
headroom placeholder is off, and the control plane runs 1 copy that scales to 2
|
|
16
|
+
under load.
|
|
17
|
+
|
|
18
|
+
It needs `JOB_LAUNCHER=kubernetes`. Without it Wardby logs `low_power_ignored`
|
|
19
|
+
and the mode does nothing.
|
|
20
|
+
|
|
21
|
+
## Turn it on or off
|
|
22
|
+
|
|
23
|
+
```sh
|
|
24
|
+
WARDBY_HOSTNAME=wardby.example.com WARDBY_LOW_POWER=1 deploy/gke/up.sh
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Re-running `up.sh` without `WARDBY_LOW_POWER=1` turns it off: it removes the
|
|
28
|
+
autoscaler `wardby-control-plane` and the Role and RoleBinding `wardby-power`
|
|
29
|
+
and restores proxy 1, gateway 2, headroom 1, control plane 1.
|
|
30
|
+
|
|
31
|
+
`WARDBY_LOW_POWER` accepts only unset, `0` or `1`; anything else fails `up.sh`
|
|
32
|
+
and stops the control plane at start-up. `LOW_POWER_IDLE_MINUTES` is an integer
|
|
33
|
+
from 5 to 1440 (default 30) set on the control-plane Deployment; it is read
|
|
34
|
+
only when `WARDBY_LOW_POWER=1`.
|
|
35
|
+
|
|
36
|
+
## How it behaves
|
|
37
|
+
|
|
38
|
+
- **Sleep.** Every minute the scheduler leader scales the coding proxy
|
|
39
|
+
(`wardby-coding-proxy`) or native gateway (`wardby-native-gateway`) to 0 when
|
|
40
|
+
nothing is pending or running for it and nothing finished within the idle
|
|
41
|
+
window. The gateway also needs no active session. Either target sleeps only
|
|
42
|
+
once at least one idle window has passed since it was last woken (annotation
|
|
43
|
+
`wardby.io/power-woke-at`) and since the control plane started, whichever is
|
|
44
|
+
later. The check repeats just before scaling. Log: `power: proxy slept (idle 30m)`.
|
|
45
|
+
- **Wake.** A coding run scales the proxy to 1 and waits for a ready endpoint;
|
|
46
|
+
a sandbox run does the same for the gateway. The wait is at least 5 minutes.
|
|
47
|
+
A `KUBERNETES_READY_TIMEOUT_MS` (proxy) or `NATIVE_SANDBOX_READY_TIMEOUT_MS`
|
|
48
|
+
(gateway) above that, set on the control-plane Deployment, raises it. Expect
|
|
49
|
+
about 1 to 2 minutes extra on a cold node. Log: `power: proxy woke`.
|
|
50
|
+
- **Preflight.** The first coding run after a control-plane restart also runs
|
|
51
|
+
the cluster preflight canary, because start-up preflight is deferred while the
|
|
52
|
+
proxy sleeps (`kubernetes_preflight_deferred`).
|
|
53
|
+
- **Deploys.** Every `up.sh` run, including one that turns the mode off, marks
|
|
54
|
+
the proxy and gateway as just woken before it brings them back up, so the
|
|
55
|
+
control plane being replaced cannot scale them down mid-deploy. With the mode
|
|
56
|
+
on they stay up through the deploy (its database checks need them) and sleep
|
|
57
|
+
one idle window later.
|
|
58
|
+
- **Control plane.** It scales 1 to 2 on CPU (20% target, scale down
|
|
59
|
+
after 10 minutes). A run executes on the copy that started it, so scheduled
|
|
60
|
+
runs stay on the scheduler leader; webhook and MCP-started runs spread. The
|
|
61
|
+
autoscaler owns the replica count while the mode is on.
|
|
62
|
+
|
|
63
|
+
## Sleep now
|
|
64
|
+
|
|
65
|
+
To skip the idle window, for example right after a test, call `power_sleep`.
|
|
66
|
+
Pass `target: "proxy"` or `target: "gateway"` to sleep one; omit it for both.
|
|
67
|
+
|
|
68
|
+
- It scales the target to 0 at once, ignoring the idle window and the woke-at
|
|
69
|
+
grace.
|
|
70
|
+
- It never stops a run. A target with a pending or running run, or for the
|
|
71
|
+
gateway an active gateway session, stays up, and its run ids are returned:
|
|
72
|
+
`{ "slept": ["proxy"], "blocked": [{ "target": "gateway", "runIds": ["..."] }] }`.
|
|
73
|
+
Recently finished runs do not block it.
|
|
74
|
+
- The next run wakes the target as usual.
|
|
75
|
+
- Each call is logged with `event: "power.sleep"` and the caller's principal.
|
|
76
|
+
|
|
77
|
+
`power_status` returns, for each target, `replicas`, `ready`, `wokeAt` and
|
|
78
|
+
`blockers` (the run ids keeping it busy).
|
|
79
|
+
|
|
80
|
+
Both tools need the `power:manage` scope, which only the `admin` role grants
|
|
81
|
+
(see [Identity and access](identity-and-access.md)). With the mode off,
|
|
82
|
+
`power_sleep` fails with
|
|
83
|
+
[`409 low_power_disabled`](errors/low-power-disabled.md) and `power_status`
|
|
84
|
+
returns `{ "enabled": false }`.
|
|
85
|
+
|
|
86
|
+
## Trade-offs and requirements
|
|
87
|
+
|
|
88
|
+
- With headroom off, the control plane has less protection against preemption.
|
|
89
|
+
- The gateway runs 1 replica instead of 2 while awake: no redundancy.
|
|
90
|
+
- `NATIVE_SANDBOX_WARM_POOL_SIZE` must be 0, or the control plane refuses to
|
|
91
|
+
start.
|
|
92
|
+
- The gateway must be in the same namespace as `KUBERNETES_NAMESPACE`.
|
|
93
|
+
|
|
94
|
+
## Cost
|
|
95
|
+
|
|
96
|
+
Autopilot bills Pod requests while a Pod exists. At us-central1 list prices
|
|
97
|
+
($0.0445 per vCPU-hour, $0.0049225 per GiB-hour, 730 hours a month; use your
|
|
98
|
+
region's rates), always-on cost per workload is: control plane (1.1 vCPU / 2.125
|
|
99
|
+
GiB) $43.37, coding proxy (1.1 / 3.125) $46.96, native gateway (0.35 / 0.625 per
|
|
100
|
+
replica, two replicas) $27.23, headroom (0.25 / 0.5) $9.92. In low-power mode
|
|
101
|
+
the proxy costs $0.0643 an hour and a gateway replica $0.0187 an hour only
|
|
102
|
+
while awake, and headroom costs nothing. See
|
|
103
|
+
[Getting started on GKE](../docs/getting-started-gke.md#low-power-mode) for the
|
|
104
|
+
full table.
|
|
105
|
+
|
|
106
|
+
## Errors and log lines
|
|
107
|
+
|
|
108
|
+
- [`low_power_wake_timeout`](errors/low-power-wake-timeout.md): the target did
|
|
109
|
+
not become ready in time, or its Deployment does not exist.
|
|
110
|
+
- [`low_power_disabled`](errors/low-power-disabled.md): `power_sleep` was
|
|
111
|
+
called while the mode is off.
|
|
112
|
+
- [`low_power_scale_forbidden`](errors/low-power-scale-forbidden.md): the
|
|
113
|
+
control plane may not read or scale a Deployment or read its Endpoints
|
|
114
|
+
(Role `wardby-power` missing or out of date).
|
|
115
|
+
- Also: `power_sleep_failed`, `low_power_access_check_failed`,
|
|
116
|
+
`low_power_ignored`.
|
|
117
|
+
|
|
118
|
+
## Local kind
|
|
119
|
+
|
|
120
|
+
`WARDBY_LOW_POWER=1 deploy/kind-coding/up.sh` applies the Role. The kind control
|
|
121
|
+
plane runs on your host, so set `WARDBY_LOW_POWER=1` (and optionally
|
|
122
|
+
`LOW_POWER_IDLE_MINUTES`) in the environment of `wardby serve` too.
|
|
123
|
+
|
|
124
|
+
Related: [Deploy Wardby on GKE Autopilot](deploy-gke.md),
|
|
125
|
+
[Run native agents in a sandbox](native-sandbox.md).
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: merge-order-check
|
|
3
|
+
title: The wardby merge order check
|
|
4
|
+
summary: A per-pull-request `wardby merge order` check that tracks whether the pull requests a step depends on, by mergeOrder, have merged yet.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [github, checks, branch protection, merge order, delegation, mergeOrder, pull-requests, related-pull-requests]
|
|
7
|
+
appliesTo: ">=0.6.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# The wardby merge order check
|
|
11
|
+
|
|
12
|
+
> **Requires Wardby 0.6.0 or later.**
|
|
13
|
+
|
|
14
|
+
When a delegating agent sets a `mergeOrder` on a request's pull requests
|
|
15
|
+
(see [Setting a merge
|
|
16
|
+
order](related-pull-requests.md#setting-a-merge-order)), Wardby posts a
|
|
17
|
+
check run named exactly **`wardby merge order`** on each open or draft pull
|
|
18
|
+
request of that [related set](related-pull-requests.md) that its own GitHub
|
|
19
|
+
App opened. The check tells you, per pull request, whether the steps it
|
|
20
|
+
depends on have merged yet — so you can tell at a glance, or gate a merge
|
|
21
|
+
on it, without reading every sibling pull request's state by hand.
|
|
22
|
+
|
|
23
|
+
## When it is posted
|
|
24
|
+
|
|
25
|
+
Only when the pull request's related set has **more than one distinct
|
|
26
|
+
`mergeOrder` value** across its members, merged and closed ones included.
|
|
27
|
+
A request whose pull requests all share one `mergeOrder`, or carry none at
|
|
28
|
+
all, gets no check. A pull request without a `mergeOrder` is never checked
|
|
29
|
+
itself, and is never any other pull request's dependency either.
|
|
30
|
+
|
|
31
|
+
A member with order _k_ depends on every other member of the set with a
|
|
32
|
+
strictly lower, non-null order. Members that share the same `mergeOrder`
|
|
33
|
+
have no order between them — neither is the other's dependency, and either
|
|
34
|
+
may merge first.
|
|
35
|
+
|
|
36
|
+
## The three states
|
|
37
|
+
|
|
38
|
+
- **Waiting for earlier steps (`in_progress`)** — one or more dependencies
|
|
39
|
+
(strictly lower `mergeOrder`) have not merged yet. The title reads
|
|
40
|
+
"Waiting for _N_ earlier pull request(s) to merge", and the summary lists
|
|
41
|
+
them by link.
|
|
42
|
+
- **Every earlier step has merged (`success`)** — every dependency has
|
|
43
|
+
merged, or the pull request is the set's lowest step and has nothing to
|
|
44
|
+
wait for. The check completes with conclusion `success`.
|
|
45
|
+
- **An earlier step was closed without merging (`failure`)** — a dependency
|
|
46
|
+
was closed and never merged. The check completes with conclusion
|
|
47
|
+
`failure` and names the closed pull request(s) in the summary.
|
|
48
|
+
|
|
49
|
+
Every state's summary also carries a step label, "Step _k_ of _n_ in the
|
|
50
|
+
merge order set by the delegating agent," counted over the whole set
|
|
51
|
+
(merged and closed pull requests included), so a pull request's step
|
|
52
|
+
number doesn't change as earlier steps merge.
|
|
53
|
+
|
|
54
|
+
### Waiting for the delegating run to finish
|
|
55
|
+
|
|
56
|
+
While the delegating (lead) agent's run that produced this set is still
|
|
57
|
+
running, it may still add or reorder steps. So, for every pull request
|
|
58
|
+
above the set's **lowest** step, a would-be `success` is held back: the
|
|
59
|
+
check stays `in_progress` with the title "Waiting for the delegating run
|
|
60
|
+
to finish" until that run ends, however it ends. Only a lead agent's run
|
|
61
|
+
holds later steps this way: a coding run that continues one of the set's
|
|
62
|
+
pull requests on its own (a review fix round, or an `@` mention picked up
|
|
63
|
+
by a coding link) never does, and its pushes update the check as they
|
|
64
|
+
land. The lowest step still
|
|
65
|
+
reports `success` right away ("First step: nothing to wait for") — it has
|
|
66
|
+
no dependency this hold could change. A pull request already `in_progress`
|
|
67
|
+
on an unmerged dependency, or `failure` on a closed one, is reported as
|
|
68
|
+
such regardless of whether the delegating run is still running.
|
|
69
|
+
|
|
70
|
+
## When it is updated
|
|
71
|
+
|
|
72
|
+
The check is recomputed and reposted, reading every member's current state
|
|
73
|
+
live from GitHub:
|
|
74
|
+
|
|
75
|
+
- when the delegating (lead) agent's run finishes;
|
|
76
|
+
- when any pull request in the set is closed or merged;
|
|
77
|
+
- on a new head or a reopen of any pull request in
|
|
78
|
+
the set, on every open or draft pull request Wardby's own GitHub App
|
|
79
|
+
opened; and
|
|
80
|
+
- by Wardby's own reconciliation sweep (below), for events the first three
|
|
81
|
+
points might have missed.
|
|
82
|
+
|
|
83
|
+
Reopening a closed, unmerged dependency moves any pull request that was
|
|
84
|
+
reported `failure` because of it back to `in_progress` — once that
|
|
85
|
+
dependency merges (or another dependency is still unmerged or closed), the
|
|
86
|
+
check moves on from there as usual.
|
|
87
|
+
|
|
88
|
+
### The reconciliation sweep
|
|
89
|
+
|
|
90
|
+
As a fallback for a missed GitHub event, Wardby periodically re-checks
|
|
91
|
+
merge-ordered sets in the background: at most once every 10 minutes per
|
|
92
|
+
process, covering the 50 most recently updated coding runs that carry a
|
|
93
|
+
`mergeOrder` and were updated within the last 7 days, resolved to their
|
|
94
|
+
request's run tree and synced a bounded number at a time, least-recently
|
|
95
|
+
swept first, so every covered set is revisited eventually. A set whose
|
|
96
|
+
pull requests haven't changed in over 7 days relies on its GitHub events
|
|
97
|
+
alone.
|
|
98
|
+
|
|
99
|
+
## Requiring it in branch protection
|
|
100
|
+
|
|
101
|
+
Posting the check never blocks a merge by itself — that's opt-in. To make
|
|
102
|
+
GitHub refuse a merge until a pull request's earlier steps have merged,
|
|
103
|
+
add `wardby merge order` as a required status check in the repository's
|
|
104
|
+
branch protection rules (or, on a repository using rulesets, its ruleset's
|
|
105
|
+
required status checks): **Settings → Branches** (or **Rules → Rulesets**)
|
|
106
|
+
**→ require status checks to pass → `wardby merge order`**. GitHub matches
|
|
107
|
+
required checks by name, so it must be exactly that string. Also set the
|
|
108
|
+
required check's expected source to your Wardby GitHub App, so a check of
|
|
109
|
+
the same name reported by anything else (another App, or a workflow in the
|
|
110
|
+
repository — any workflow with `checks: write`, such as one running on a
|
|
111
|
+
pull request author's `GITHUB_TOKEN`) cannot satisfy it. A request
|
|
112
|
+
without a `mergeOrder` on more than one pull request never posts this
|
|
113
|
+
check, so don't require it on a repository whose pull requests are never
|
|
114
|
+
ordered this way — GitHub would then wait on a check that never arrives.
|
|
115
|
+
|
|
116
|
+
See also [Branch protection](../docs/code-review-agents.md#branch-protection)
|
|
117
|
+
for requiring a passing _review_ the same way.
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: mobile-app
|
|
3
|
+
title: Use the wardby mobile app
|
|
4
|
+
summary: Let admins sign in to the wardby mobile app for a read-only live view of runs; enable it with WARDBY_MOBILE_ENABLED on self-hosted auth or register the redirect URI in your IdP.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [mobile, ios, android, sign-in, oauth, WARDBY_MOBILE_ENABLED]
|
|
7
|
+
appliesTo: ">=0.6.0"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Use the wardby mobile app
|
|
11
|
+
|
|
12
|
+
The mobile app is a read-only live view of runs for admins, built on the admin
|
|
13
|
+
viewer API (see `admin-viewer`). Sign-in needs the `admin` role and the
|
|
14
|
+
`admin:view` scope.
|
|
15
|
+
|
|
16
|
+
## Enable it with self-hosted auth
|
|
17
|
+
|
|
18
|
+
Mobile sign-in is off by default. Set `WARDBY_MOBILE_ENABLED=true` on the
|
|
19
|
+
control plane and restart it. The OAuth server then accepts exactly one extra
|
|
20
|
+
redirect URI, `com.wardby.mobile:/oauth`, by exact match only. On GKE, pass
|
|
21
|
+
`WARDBY_MOBILE_ENABLED=true` to `deploy/gke/up.sh` on every run; a run without it
|
|
22
|
+
turns mobile sign-in off.
|
|
23
|
+
|
|
24
|
+
`WARDBY_MOBILE_REDIRECT_URI` is for white-label builds only. It must be a
|
|
25
|
+
reverse-domain private-use URI, for example `com.example.app:/oauth`: a
|
|
26
|
+
lowercase scheme with at least one dot, then `:/`, then a path of letters,
|
|
27
|
+
digits, `/`, `_` or `-`, with no host, query or fragment. Changing it signs out
|
|
28
|
+
app clients registered under the old value; they must sign in again. A
|
|
29
|
+
malformed `WARDBY_MOBILE_ENABLED` or `WARDBY_MOBILE_REDIRECT_URI` stops startup
|
|
30
|
+
in every auth mode.
|
|
31
|
+
|
|
32
|
+
## Enable it with an external identity provider
|
|
33
|
+
|
|
34
|
+
Wardby needs no setting. Register `com.wardby.mobile:/oauth` (or your
|
|
35
|
+
white-label redirect) as an allowed redirect URI on the IdP client that
|
|
36
|
+
requests `admin:view`, and make sure the `admin:view` scope is defined and
|
|
37
|
+
mapped. See [Configure identity and privileged access](identity-and-access.md).
|
|
38
|
+
|
|
39
|
+
## Turning it off
|
|
40
|
+
|
|
41
|
+
Set `WARDBY_MOBILE_ENABLED=false` (or unset it). New sign-ins and token
|
|
42
|
+
refreshes are refused. Access tokens already issued keep working until they
|
|
43
|
+
expire, at most 10 minutes. Turning it back on lets existing sessions refresh
|
|
44
|
+
again; nothing is revoked.
|
|
45
|
+
|
|
46
|
+
## Troubleshooting
|
|
47
|
+
|
|
48
|
+
If the app's registration or sign-in is refused with `mobile_disabled`, see
|
|
49
|
+
[Mobile sign-in is not enabled](errors/mobile-disabled.md).
|
|
50
|
+
|
|
51
|
+
## See also
|
|
52
|
+
|
|
53
|
+
- [Watch live runs with the admin viewer API](admin-viewer.md)
|
|
54
|
+
- The viewer API reference in `docs/viewer-api.md`.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: native-sandbox
|
|
3
|
+
title: Run native agents in a sandbox
|
|
4
|
+
summary: Turn on sandbox mode so a native agent's turn loop and tools run in a single-use, credential-free Docker container or Kubernetes pod behind a native gateway.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [native-agents, sandbox, isolation, docker, kubernetes, native-gateway, security, warm-pool]
|
|
7
|
+
appliesTo: ">=0.5.4"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Run native agents in a sandbox
|
|
11
|
+
|
|
12
|
+
By default a native agent runs inside the Wardby server. Set its
|
|
13
|
+
`nativeExecutionMode` to `sandbox` and its whole turn loop and user tools run in
|
|
14
|
+
a single-use Docker container or Kubernetes pod (the `wardby-native-worker`
|
|
15
|
+
image) instead. The
|
|
16
|
+
container has no credentials, no database access, no Docker socket, and no
|
|
17
|
+
network except the **native gateway**, a separate trusted container that holds
|
|
18
|
+
the LLM credentials and enforces each tool attachment's grants. The server and
|
|
19
|
+
gateway are trusted; the agent loop and user tool code are not.
|
|
20
|
+
|
|
21
|
+
## Turn it on
|
|
22
|
+
|
|
23
|
+
1. Run the gateway: `wardby native-gateway` in a container with the server's
|
|
24
|
+
database, LLM, secrets, and integration settings, listening on
|
|
25
|
+
`NATIVE_GATEWAY_LISTEN` (default `0.0.0.0:8790`; `GET /healthz`). Give it no
|
|
26
|
+
Docker socket.
|
|
27
|
+
2. On the server (`wardby serve` or `wardby scheduler`) set
|
|
28
|
+
`NATIVE_SANDBOX_LAUNCHER=docker`, `NATIVE_SANDBOX_WORKER_IMAGE` (a
|
|
29
|
+
`repo@sha256:...` digest or local image id), and `NATIVE_GATEWAY_CONTAINER`
|
|
30
|
+
(the gateway container's name). Optional: `NATIVE_GATEWAY_URL`,
|
|
31
|
+
`NATIVE_SANDBOX_CPUS` (1), `NATIVE_SANDBOX_MEMORY_MB` (512),
|
|
32
|
+
`NATIVE_SANDBOX_PIDS` (128).
|
|
33
|
+
3. Set the mode with `create_agent` or `update_agent` (`nativeExecutionMode`:
|
|
34
|
+
`control-plane` or `sandbox`; native agents only), or from the CLI with
|
|
35
|
+
`wardby agent create ... --native-execution-mode sandbox` or
|
|
36
|
+
`wardby agent mode <name> sandbox`. `sandbox` is refused when the server
|
|
37
|
+
(or, for the CLI, its environment) has no native sandbox configured. Each
|
|
38
|
+
run keeps the mode it started with; `get_run` shows it.
|
|
39
|
+
|
|
40
|
+
### Kubernetes
|
|
41
|
+
|
|
42
|
+
Set `NATIVE_SANDBOX_LAUNCHER=kubernetes` instead and the server starts one pod
|
|
43
|
+
per run. Run the gateway as a Deployment in the run namespace with a ClusterIP
|
|
44
|
+
Service that exposes both 8790 and the deny port 8791, and a NetworkPolicy that
|
|
45
|
+
admits `wardby.io/component: native-run` pods on both ports (keep the 8791
|
|
46
|
+
rule). On the server set `NATIVE_SANDBOX_WORKER_IMAGE` to a registry digest
|
|
47
|
+
(`repo@sha256:...`; a local image id is not accepted), and optionally
|
|
48
|
+
`NATIVE_SANDBOX_NAMESPACE` (default `KUBERNETES_NAMESPACE`, else
|
|
49
|
+
`wardby-coding`), `KUBERNETES_CONTEXT`, `NATIVE_SANDBOX_RUNTIME_CLASS` (for
|
|
50
|
+
example gVisor), `NATIVE_GATEWAY_SERVICE` (default `wardby-native-gateway`),
|
|
51
|
+
`NATIVE_SANDBOX_PRIORITY_CLASS` (not a `system-` class),
|
|
52
|
+
`NATIVE_SANDBOX_MAX_CONCURRENT` (cap on simultaneous sandbox runs across all
|
|
53
|
+
replicas; unset means no cap), `NATIVE_SANDBOX_READY_TIMEOUT_MS` (default 120000) and `NATIVE_SANDBOX_ENFORCEMENT_TIMEOUT_MS` (default 30000).
|
|
54
|
+
`NATIVE_SANDBOX_PIDS` applies to Docker only. On GKE Autopilot also set
|
|
55
|
+
`KUBERNETES_PLATFORM=gke-autopilot`: pod resources are conformed to Autopilot's
|
|
56
|
+
rules and the gVisor runtime class is required. On Amazon EKS with a gVisor node
|
|
57
|
+
group set `KUBERNETES_PLATFORM=eks`, which also requires the gVisor runtime class. The shipped GKE deployment
|
|
58
|
+
runs the gateway for you; see the GKE guide. The
|
|
59
|
+
server needs permission in that namespace to create, get, and delete pods,
|
|
60
|
+
Secrets, and NetworkPolicies, list pods, exec into pods, and get Services.
|
|
61
|
+
|
|
62
|
+
Each run starts "not ready": the gateway refuses the worker until the server
|
|
63
|
+
has verified the pod and its NetworkPolicy and proven from inside the pod that
|
|
64
|
+
the gateway answers while the deny port, the outside world, and the cloud
|
|
65
|
+
metadata endpoints do not. Failures
|
|
66
|
+
there are
|
|
67
|
+
[native_sandbox_network_unenforced](errors/native-sandbox-network-unenforced.md),
|
|
68
|
+
[native_sandbox_isolation_mismatch](errors/native-sandbox-isolation-mismatch.md),
|
|
69
|
+
[native_sandbox_gateway_unavailable](errors/native-sandbox-gateway-unavailable.md),
|
|
70
|
+
and [native_sandbox_worker_unready](errors/native-sandbox-worker-unready.md).
|
|
71
|
+
A start past the concurrent cap or the namespace quota fails with
|
|
72
|
+
[native_sandbox_capacity](errors/native-sandbox-capacity.md).
|
|
73
|
+
|
|
74
|
+
The full procedure, topology, and local compose overlay are in
|
|
75
|
+
[Native sandbox](../docs/native-sandbox.md).
|
|
76
|
+
|
|
77
|
+
### Warm pool
|
|
78
|
+
|
|
79
|
+
Set `NATIVE_SANDBOX_WARM_POOL_SIZE` (0 to 50, default 0 = off) to keep that many
|
|
80
|
+
idle, already-isolated workers ready, with either launcher. A run claims one
|
|
81
|
+
atomically through the database; its input and one-time gateway capability are
|
|
82
|
+
delivered over exec stdin only after the claim, and the worker is still
|
|
83
|
+
single-use. `NATIVE_SANDBOX_WARM_MAX_AGE_MS` (60000 to 21600000, default 1800000) replaces idle workers older than that. With no idle worker, or one that
|
|
84
|
+
fails the claim-time re-check, the run cold-launches as usual. If delivery fails
|
|
85
|
+
and the worker cannot be confirmed gone within 30 seconds, the run fails with
|
|
86
|
+
[native_sandbox_warm_delivery_failed](errors/native-sandbox-warm-delivery-failed.md).
|
|
87
|
+
|
|
88
|
+
Idle workers are extra pods or containers: the Kubernetes ResourceQuota needs
|
|
89
|
+
room for `NATIVE_SANDBOX_MAX_CONCURRENT` plus the pool size, and each idle
|
|
90
|
+
worker reserves its CPU and memory (billed on GKE Autopilot). Rebuild the worker
|
|
91
|
+
image so it can be a pool worker. Pool workers are named `wardby-nwarm-<token>`
|
|
92
|
+
and labelled `wardby.io/pool=warm`; logs use module `native-warm-pool`. Details
|
|
93
|
+
are in [Native sandbox](../docs/native-sandbox.md#warm-pool).
|
|
94
|
+
|
|
95
|
+
## What to expect
|
|
96
|
+
|
|
97
|
+
- The worker is read-only, non-root (uid 10001), has all capabilities dropped, a
|
|
98
|
+
size-capped `/tmp`, and CPU, memory, and PID limits. Each run gets its own
|
|
99
|
+
internal network shared only with the gateway.
|
|
100
|
+
- The gateway is the budget authority: it reserves each model call's worst-case
|
|
101
|
+
cost first and settles at actual usage. A call the budget cannot cover ends the
|
|
102
|
+
run `budget_exhausted`.
|
|
103
|
+
- Sub-agents of a sandboxed run are managed runs started by the scheduler
|
|
104
|
+
leader on its next tick (about every 10 seconds), so the server or scheduler
|
|
105
|
+
must be running.
|
|
106
|
+
- A sandbox run has a 60-minute maximum lifetime.
|
|
107
|
+
|
|
108
|
+
## Roll back
|
|
109
|
+
|
|
110
|
+
Set the agent back to `control-plane`. Only new runs are affected: runs
|
|
111
|
+
already started in sandbox mode finish there.
|
|
112
|
+
|
|
113
|
+
## Troubleshooting
|
|
114
|
+
|
|
115
|
+
Check the gateway with `GET /healthz`, list worker containers with
|
|
116
|
+
`docker ps --all --filter label=io.wardby.component=native-worker`, and read the
|
|
117
|
+
run's error with `get_run`. On Kubernetes list worker pods with
|
|
118
|
+
`kubectl get pods -n <namespace> -l wardby.io/component=native-run`. Error
|
|
119
|
+
codes:
|
|
120
|
+
|
|
121
|
+
- [native_sandbox_unavailable](errors/native-sandbox-unavailable.md)
|
|
122
|
+
- [native_sandbox_worker_exited](errors/native-sandbox-worker-exited.md)
|
|
123
|
+
- [native_sandbox_deadline_exceeded](errors/native-sandbox-deadline-exceeded.md)
|
|
124
|
+
- [native_sandbox_worker_lost](errors/native-sandbox-worker-lost.md)
|
|
125
|
+
- [native_sandbox_image_not_pinned](errors/native-sandbox-image-not-pinned.md)
|
|
126
|
+
- [native_sandbox_docker_failed](errors/native-sandbox-docker-failed.md)
|
|
127
|
+
- [native_sandbox_network_unenforced](errors/native-sandbox-network-unenforced.md)
|
|
128
|
+
- [native_sandbox_isolation_mismatch](errors/native-sandbox-isolation-mismatch.md)
|
|
129
|
+
- [native_sandbox_gateway_unavailable](errors/native-sandbox-gateway-unavailable.md)
|
|
130
|
+
- [native_sandbox_worker_unready](errors/native-sandbox-worker-unready.md)
|
|
131
|
+
- [native_sandbox_capacity](errors/native-sandbox-capacity.md)
|
|
132
|
+
- [native_sandbox_warm_delivery_failed](errors/native-sandbox-warm-delivery-failed.md)
|
|
133
|
+
- [native_sandbox_requires_catalog](errors/native-sandbox-requires-catalog.md)
|
|
134
|
+
|
|
135
|
+
See also [Use native agents, tools, and data](native-capabilities.md) and
|
|
136
|
+
[Understand Wardby security boundaries](security.md).
|
package/help/observability.md
CHANGED
|
@@ -37,5 +37,13 @@ Alert on proxy failures, budget cutoffs, cleanup failures, stalled runs, and
|
|
|
37
37
|
sustained latency or memory growth. Wardby's database remains the source of
|
|
38
38
|
truth for runs, budgets, and accounting.
|
|
39
39
|
|
|
40
|
+
With the durable executor (`EXECUTOR=dbos`), also watch the server logs for
|
|
41
|
+
the `run_ownership_lost` warning. It means a run's owner stalled long enough
|
|
42
|
+
for another process to adopt the run, and the stalled attempt stopped without
|
|
43
|
+
writing the run; the step it stopped at had its model spend discarded. The run
|
|
44
|
+
itself is unaffected. Repeated warnings point at event-loop or database-pool
|
|
45
|
+
starvation. See the durable executor section of
|
|
46
|
+
[`docs/security-deployment.md`](../docs/security-deployment.md).
|
|
47
|
+
|
|
40
48
|
Read [`docs/observability.md`](../docs/observability.md) for configuration and
|
|
41
49
|
the full production checklist.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
id: related-pull-requests
|
|
3
3
|
title: Related pull requests across repositories
|
|
4
|
-
summary: Wardby lists the other pull requests from the same request in each pull request's description,
|
|
4
|
+
summary: Wardby lists the other pull requests from the same request in each pull request's description, in the merge order the delegating agent set (mergeOrder) or else a suggested merge order.
|
|
5
5
|
audience: operator
|
|
6
6
|
tags: [github, pull-requests, multi-repo, merge-order, related, siblings, continuePriorRun, coding-agents, jira]
|
|
7
7
|
appliesTo: ">=0.4.2"
|
|
@@ -14,7 +14,7 @@ agent that delegates to one coding agent per repository, or several runs for
|
|
|
14
14
|
the same Jira issue — Wardby adds a **Related pull requests** section to each
|
|
15
15
|
of those pull requests' descriptions. It lists the others with links and
|
|
16
16
|
their state, names the originating issue when there is one, and gives a
|
|
17
|
-
|
|
17
|
+
merge order: the one the delegating agent set, or else a suggested one.
|
|
18
18
|
|
|
19
19
|
Without a tracked Jira issue, the list covers the pull requests opened by
|
|
20
20
|
runs in the same delegation tree (the same lead run and everything it
|
|
@@ -30,13 +30,33 @@ included, plus that run tree's own siblings.
|
|
|
30
30
|
section on every open pull request of the request with the full list and
|
|
31
31
|
current states. A later run that pushes to any pull request in the set
|
|
32
32
|
refreshes the section on all of them the same way, and never removes it.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
33
|
+
With Wardby 0.6.0 or later, a reviewer linked to one of these pull requests does
|
|
34
|
+
not review it until that same lead run finishes, however it ends. When the
|
|
35
|
+
lead finishes normally the section has already been rewritten by then;
|
|
36
|
+
when it is ended another way, such as being cancelled, reviews start
|
|
37
|
+
without that rewrite, so reviewers should rely on `repo_pr_read`'s
|
|
38
|
+
`relatedPullRequests` either way — see [Reviewing a pull request a
|
|
39
|
+
delegated run
|
|
40
|
+
opened](code-review-agents.md#reviewing-a-pull-request-a-delegated-run-opened).
|
|
41
|
+
- **Merge order.** Without a `mergeOrder` (see below) on any pull request in
|
|
42
|
+
the set, open (and draft) pull requests are numbered as a **Suggested merge
|
|
43
|
+
order (the order Wardby's agent opened them in)** — delegation order, not a
|
|
44
|
+
dependency analysis, and only reliable when the lead delegates repositories
|
|
45
|
+
that own shared data first (see
|
|
37
46
|
[Fanning out to several builders](../docs/agent-recipes.md#fanning-out-to-several-builders)).
|
|
38
|
-
|
|
39
|
-
|
|
47
|
+
When any pull request in the set has a `mergeOrder` (open, merged or
|
|
48
|
+
closed), the open ones that have one are numbered under **Merge order (set
|
|
49
|
+
by the delegating agent; equal steps can merge in either order)** and
|
|
50
|
+
labelled "step k of n" (equal values share a step and merge in either
|
|
51
|
+
order relative to each other), and any open pull request without one is
|
|
52
|
+
listed after under "Not ordered:". If only merged or closed pull requests
|
|
53
|
+
have a `mergeOrder`, every open one is listed under "Not ordered:" and the
|
|
54
|
+
"Merge order" heading is left out. Steps are counted over the whole set,
|
|
55
|
+
merged and closed pull requests included, so "step 2 of 3" keeps its label
|
|
56
|
+
after step 1 merges. Either way, check it before merging — neither is a
|
|
57
|
+
guarantee. Merged and closed pull requests follow in a separate "Already
|
|
58
|
+
merged or closed" list, as context only, with their step label when they
|
|
59
|
+
have one.
|
|
40
60
|
- Only open pull requests that Wardby's own GitHub App opened are edited;
|
|
41
61
|
merged or closed ones are listed but never changed, and a pull request
|
|
42
62
|
from a different Wardby deployment sharing the same App is never touched.
|
|
@@ -49,9 +69,50 @@ included, plus that run tree's own siblings.
|
|
|
49
69
|
|
|
50
70
|
Reviewers see the section in the pull request description, so a reviewer
|
|
51
71
|
agent can tell that a field, route, or schema a change relies on is added by
|
|
52
|
-
a sibling pull request rather than missing.
|
|
72
|
+
a sibling pull request rather than missing. Because the description is only
|
|
73
|
+
rewritten at the points above, a sibling opened (or merged, or closed) since
|
|
74
|
+
then can be missing from it or shown with an old state. With Wardby 0.6.0 or later,
|
|
75
|
+
`repo_pr_read`'s `relatedPullRequests` field lists the request's pull
|
|
76
|
+
requests fresh on every call instead, so a reviewer should prefer it over
|
|
77
|
+
the description's section when they disagree. Its entry for the pull request
|
|
78
|
+
just read always carries that pull request's live state; another entry
|
|
79
|
+
carries a state only when Wardby has one stored (pull requests linked to an
|
|
80
|
+
issue) and omits it otherwise, so call `repo_pr_read` on that pull request
|
|
81
|
+
for its live state. `relatedPullRequests` is empty for a pull request on a
|
|
82
|
+
local repository, which has no App-authored marker to resolve the request
|
|
83
|
+
from. See the
|
|
84
|
+
reviewer step in
|
|
53
85
|
[Run GitHub code-review agents](code-review-agents.md#ci-and-sibling-pull-requests).
|
|
54
86
|
|
|
87
|
+
## Setting a merge order
|
|
88
|
+
|
|
89
|
+
A lead agent sets the order explicitly by passing `mergeOrder` on its
|
|
90
|
+
`delegate_to_<name>` call to a coding sub-agent: an integer from 1 to 99,
|
|
91
|
+
where 1 merges first. Give a repository that other repositories' changes
|
|
92
|
+
depend on a lower number than the ones that use it — for example a shared
|
|
93
|
+
service `1`, the API that calls it `2`, the client that calls the API `3`.
|
|
94
|
+
Give two changes the same number when there is no order between them; they
|
|
95
|
+
share a step and either can merge first. A bad value (not an integer, or
|
|
96
|
+
outside 1-99) is refused as a tool error, not silently dropped or clamped.
|
|
97
|
+
|
|
98
|
+
Set it whenever one request's change spans several repositories and the
|
|
99
|
+
pull requests need to land in a specific sequence; leave it out and the set
|
|
100
|
+
keeps the delegation-order suggestion above. `mergeOrder` applies only to
|
|
101
|
+
coding sub-agents, since only a coding run's pull request can be ordered: a
|
|
102
|
+
native sub-agent ignores it, and its tool result notes that it did.
|
|
103
|
+
|
|
104
|
+
Each pull request shows the value most recently set for it, by the run that
|
|
105
|
+
opened it or a later continuation of it. A `continuePriorRun` call that
|
|
106
|
+
omits `mergeOrder` keeps that current value, so a follow-up does not need to
|
|
107
|
+
repeat it to keep a pull request in its place; one that sets `mergeOrder`
|
|
108
|
+
replaces it.
|
|
109
|
+
|
|
110
|
+
With Wardby 0.6.0 or later, once a set has more than one `mergeOrder`, each
|
|
111
|
+
open or draft pull request Wardby opened in it also gets a check run named
|
|
112
|
+
`wardby merge order`, tracking whether the pull requests it depends on have
|
|
113
|
+
merged yet. It's an informational check by default; search help for "merge
|
|
114
|
+
order check" for its states and for requiring it in branch protection.
|
|
115
|
+
|
|
55
116
|
## Follow-up runs and sibling pull requests
|
|
56
117
|
|
|
57
118
|
When someone asks for a follow-up on one of these pull requests (an
|