@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
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: repo-instructions-and-skills
|
|
3
|
+
title: Repository instructions and skills in coding runs
|
|
4
|
+
summary: What AGENTS.md, CLAUDE.md, and repo skills a coding run loads, and how to turn repo skills off per agent with codingProfile.repoSkills.
|
|
5
|
+
audience: all
|
|
6
|
+
tags: [coding, skills, repoSkills, claudeBareMode, CLAUDE.md, AGENTS.md, SKILL.md, codex, claude-code]
|
|
7
|
+
appliesTo: ">=0.5.4"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Repository instructions and skills in coding runs
|
|
11
|
+
|
|
12
|
+
Every coding run loads the repository's own instructions, and by default
|
|
13
|
+
also loads whatever agent skills the repository ships. This is on for both
|
|
14
|
+
builders and cannot be turned off for instructions; skills can be turned off
|
|
15
|
+
per agent.
|
|
16
|
+
|
|
17
|
+
## Repository instructions (always on)
|
|
18
|
+
|
|
19
|
+
| Builder | Gets |
|
|
20
|
+
| ----------- | --------------------------------------------------------------------------------- |
|
|
21
|
+
| Codex | `AGENTS.md`, read directly from the checkout |
|
|
22
|
+
| Claude Code | `CLAUDE.md`, `.claude/CLAUDE.md`, and their `@path` imports (up to 5 levels deep) |
|
|
23
|
+
|
|
24
|
+
A repository that only has `AGENTS.md` still gets it in Claude Code, through
|
|
25
|
+
a one-line `CLAUDE.md` wardby synthesizes for it. Subdirectory `CLAUDE.md`
|
|
26
|
+
files (anything other than the repository root and `.claude/CLAUDE.md`) are
|
|
27
|
+
not loaded unless an imported file pulls them in.
|
|
28
|
+
|
|
29
|
+
Claude Code's instructions and skills are bounded: at most 64 KiB per file,
|
|
30
|
+
200 files, and 256 KiB combined; symlinks and non-UTF-8 files are refused. A
|
|
31
|
+
file that doesn't pass is left out of the run rather than failing it.
|
|
32
|
+
Repository settings, hooks, `.mcp.json`, agents, and commands are never sent
|
|
33
|
+
to Claude Code — only Markdown instruction files and
|
|
34
|
+
`.claude/skills/<name>/SKILL.md` files are allowed through, whatever an
|
|
35
|
+
instruction file imports.
|
|
36
|
+
|
|
37
|
+
Repository instructions and skills are untrusted guidance: they can shape a
|
|
38
|
+
run's work but never relax the worker's sandbox rules.
|
|
39
|
+
|
|
40
|
+
## Repository skills
|
|
41
|
+
|
|
42
|
+
`codingProfile.repoSkills` loads the repository's own agent skills into a
|
|
43
|
+
run. It defaults to `true`, and the agent owner or an admin can set it with
|
|
44
|
+
`create_agent`/`update_agent`:
|
|
45
|
+
|
|
46
|
+
```json
|
|
47
|
+
{ "id": "<agent-id>", "codingProfile": { "repoSkills": false } }
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
| Builder | Reads skills from | `repoSkills: false` |
|
|
51
|
+
| ----------- | ----------------------------------- | ---------------------------------- |
|
|
52
|
+
| Codex | `.agents/skills/`, `.codex/skills/` | Every repository skill is disabled |
|
|
53
|
+
| Claude Code | `.claude/skills/<name>/SKILL.md` | No skill context is collected |
|
|
54
|
+
|
|
55
|
+
Codex's own four built-in skills (`imagegen`, `openai-docs`, `skill-creator`,
|
|
56
|
+
`skill-installer`) are always disabled, whatever `repoSkills` is set to.
|
|
57
|
+
|
|
58
|
+
A Claude Code skill ships to the worker as its `SKILL.md` only; its other
|
|
59
|
+
files (scripts, references, data) stay in the repository checkout, read or
|
|
60
|
+
run through the command runner at `/workspace/.claude/skills/<name>/`.
|
|
61
|
+
|
|
62
|
+
## Claude Code loading mode
|
|
63
|
+
|
|
64
|
+
`codingProfile.claudeBareMode` (Claude Code agents only, default `true`)
|
|
65
|
+
decides how Claude Code uses its repository instructions and skills:
|
|
66
|
+
|
|
67
|
+
- **`true` (default).** Claude Code's hardened bare mode stays on. Wardby
|
|
68
|
+
adds the repository's instruction files to the system prompt in full, and
|
|
69
|
+
lists each skill by name, description, and path; the model reads a
|
|
70
|
+
skill's full `SKILL.md` itself with `run_command`.
|
|
71
|
+
- **`false`.** Bare mode is off and Claude Code loads `CLAUDE.md` and skills
|
|
72
|
+
itself, through its native Skill tool, instead of reading them from the
|
|
73
|
+
system prompt.
|
|
74
|
+
|
|
75
|
+
Repository settings, hooks, MCP configuration, agents, and commands are
|
|
76
|
+
never loaded in either mode.
|
|
77
|
+
|
|
78
|
+
```json
|
|
79
|
+
{ "id": "<agent-id>", "codingProfile": { "claudeBareMode": false } }
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## See also
|
|
83
|
+
|
|
84
|
+
- [Choose a native or coding agent](creating-agents.md) for `codingProfile`
|
|
85
|
+
basics and the other fields it accepts.
|
|
86
|
+
- [Bring-Your-Own Coding-Worker Images](../docs/coding-worker-byo-images.md)
|
|
87
|
+
— a custom `workerImageRef` image must be rebuilt for the current release. A
|
|
88
|
+
Codex agent's image built on an older driver base rejects
|
|
89
|
+
`repoSkills: false` and keeps offering Codex's built-in skills.
|
|
90
|
+
- [Build a tool runner image for a Claude Code agent](build-claude-code-image.md)
|
|
91
|
+
to give a Claude Code agent's commands the tools your project needs.
|
|
@@ -37,6 +37,16 @@ still running. Clicking **Re-run** on the review check isn't counted as a
|
|
|
37
37
|
round itself; if the re-run's review requests changes, that starts a round
|
|
38
38
|
like any other review.
|
|
39
39
|
|
|
40
|
+
With Wardby 0.6.0 or later, a round whose agent makes no change — it decided
|
|
41
|
+
the review's finding was wrong, rather than pushing a fix — doesn't leave the
|
|
42
|
+
failed review check standing with nothing to replace it: wardby starts one
|
|
43
|
+
fresh review of the pull request's unchanged head instead, run by the same
|
|
44
|
+
reviewer that requested the changes, with the round's own summary passed
|
|
45
|
+
along as untrusted context. This happens once per review that requested
|
|
46
|
+
changes and still counts as one of the round cap's rounds; if the cap has
|
|
47
|
+
already been reached, wardby posts the usual cap comment instead of
|
|
48
|
+
re-reviewing.
|
|
49
|
+
|
|
40
50
|
Rounds are tracked with labels on the pull request:
|
|
41
51
|
|
|
42
52
|
- `wardby-autofix-<N>` — one per round, added before that round's run
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: slack-notifications
|
|
3
|
+
title: Send workflow updates to Slack
|
|
4
|
+
summary: Link a Slack channel to a Jira project or an agent to follow cards from pickup to merge, one thread per card.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [slack, notifications, channels, jira, pull-requests, link_notification_channel]
|
|
7
|
+
appliesTo: >=0.6.0
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Send workflow updates to Slack
|
|
11
|
+
|
|
12
|
+
Link a Slack channel to a Jira project or to an agent (native or coding) and wardby posts
|
|
13
|
+
that project's or agent's workflow updates there — a card picked up, a pull
|
|
14
|
+
request opened, a review verdict, fix rounds, and the merge — with one thread
|
|
15
|
+
per card. This is outbound only: nothing in Slack starts or affects a run.
|
|
16
|
+
|
|
17
|
+
## Setup checklist
|
|
18
|
+
|
|
19
|
+
1. Create the Slack app from [`deploy/slack/app-manifest.yaml`](../deploy/slack/app-manifest.yaml)
|
|
20
|
+
and install it to your workspace.
|
|
21
|
+
2. Copy the Bot User OAuth Token (`xoxb-…`).
|
|
22
|
+
3. Set `WARDBY_SLACK_BOT_TOKEN` (store it like any other provider credential)
|
|
23
|
+
and restart wardby.
|
|
24
|
+
4. Link a channel with `link_notification_channel` — to a Jira project
|
|
25
|
+
(`projectKey`) or to an agent (`agentId`).
|
|
26
|
+
5. Call `test_notification_channel` and confirm "✅ wardby is connected to
|
|
27
|
+
this channel." posts there.
|
|
28
|
+
|
|
29
|
+
## Events
|
|
30
|
+
|
|
31
|
+
`issue_picked_up`, `run_failed` (top-level runs only), `pr_opened`,
|
|
32
|
+
`review_posted` (approve / changes requested / comment), `review_fix` (round
|
|
33
|
+
started, or stopped at the cap), and `pr_closed` (merged or closed, with any
|
|
34
|
+
Jira status move). `events` on a link narrows which of these post; omitted
|
|
35
|
+
means all six. `includeCost` appends the run's spend line.
|
|
36
|
+
|
|
37
|
+
wardby never posts code, diffs, review text, or run output to Slack.
|
|
38
|
+
|
|
39
|
+
## If something isn't posting
|
|
40
|
+
|
|
41
|
+
- The link's `lastError` (from `list_notification_channels`) names the
|
|
42
|
+
problem. A channel error means the bot can't write there — see
|
|
43
|
+
[`errors/slack-channel-unreachable`](errors/slack-channel-unreachable.md).
|
|
44
|
+
- No deliveries at all, for every channel, usually means the bot token is
|
|
45
|
+
invalid, revoked, or missing a scope — see
|
|
46
|
+
[`errors/slack-auth-failed`](errors/slack-auth-failed.md).
|
|
47
|
+
- A channel that recovers gets new events again right away; deliveries that
|
|
48
|
+
already failed are not resent.
|
|
49
|
+
- Linking or testing refused outright means Slack isn't configured yet — see
|
|
50
|
+
[`errors/slack-not-configured`](errors/slack-not-configured.md).
|
|
51
|
+
|
|
52
|
+
## Related
|
|
53
|
+
|
|
54
|
+
- [Run Jira agents](jira.md) — link a channel to the same project a Jira
|
|
55
|
+
agent is linked to, to see its cards move end to end.
|
|
56
|
+
- [Automatic review fix rounds](review-fix-rounds.md) — the `review_fix`
|
|
57
|
+
event covers these rounds.
|
|
58
|
+
- [Connect GitHub repositories](github.md) — pull-request events come from
|
|
59
|
+
the same App your coding and review agents already use.
|
|
60
|
+
|
|
61
|
+
For the full guide, including scopes, threads, and failure modes, see
|
|
62
|
+
[`docs/slack-notifications.md`](../docs/slack-notifications.md).
|
|
@@ -23,6 +23,27 @@ Review the deployment guide for your target before assigning a coding profile.
|
|
|
23
23
|
|
|
24
24
|
For the specific isolation refusal, read [Coding-worker isolation unavailable](../errors/docker-isolation-unsupported.md).
|
|
25
25
|
|
|
26
|
+
## Cluster preflight at start-up (Kubernetes)
|
|
27
|
+
|
|
28
|
+
With `JOB_LAUNCHER=kubernetes`, a long-running server process (`wardby
|
|
29
|
+
serve`, `wardby mcp` over either transport, or `wardby scheduler`) starts
|
|
30
|
+
the cluster preflight as soon as it starts, instead of waiting for the
|
|
31
|
+
first coding run. Check the process's start-up log for the result: an info
|
|
32
|
+
line when the preflight passes, or a warning naming the failure code (the
|
|
33
|
+
same `kubernetes_isolation_unsupported:<check>` codes `wardby coding
|
|
34
|
+
preflight` reports) when it does not.
|
|
35
|
+
|
|
36
|
+
A failed start-up preflight is logged and retried on the next coding run,
|
|
37
|
+
not left failing until a restart: fix the underlying configuration and the
|
|
38
|
+
next run checks the cluster again on its own. If a run was already
|
|
39
|
+
starting at the moment the start-up preflight failed, that one run still
|
|
40
|
+
fails with the logged error — it was waiting on that same check — but the
|
|
41
|
+
run after it retries. This differs from a preflight failure a coding run
|
|
42
|
+
triggers itself (no start-up check ran, or the cluster is still broken when
|
|
43
|
+
the next run checks it): that failure does stick, failing every subsequent
|
|
44
|
+
run in that process until it is restarted. Run `wardby coding preflight` at
|
|
45
|
+
any time for a one-off check against the same cluster.
|
|
46
|
+
|
|
26
47
|
## Runs that stop at the turn limit
|
|
27
48
|
|
|
28
49
|
A Claude Code run whose failure category is `turn_limit` reached its agent's
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wardby/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Self-hosted control plane for budget-guarded AI agents.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/wardby/wardby#readme",
|
|
@@ -56,17 +56,21 @@
|
|
|
56
56
|
"format:check": "prettier --check .",
|
|
57
57
|
"build:vendor": "node scripts/build-sandbox-vendor.mjs",
|
|
58
58
|
"build:help": "tsx src/help/build.ts",
|
|
59
|
+
"sync:reviewer-prompt": "tsx src/quickstart/sync-reviewer-prompt.ts",
|
|
59
60
|
"build:viewer-schemas": "tsx src/viewer/build-schemas.ts",
|
|
60
61
|
"build": "npm run build:vendor && PRISMA_HIDE_UPDATE_MESSAGE=1 prisma generate && tsc -p tsconfig.build.json && npm run build:help",
|
|
61
62
|
"prepare": "npm run build:vendor && PRISMA_HIDE_UPDATE_MESSAGE=1 prisma generate",
|
|
62
63
|
"prepack": "npm run build",
|
|
63
|
-
"cli": "tsx --conditions=wardby-source src/
|
|
64
|
+
"cli": "tsx --conditions=wardby-source src/wardby-bin.ts",
|
|
64
65
|
"codex:rerecord": "tsx --conditions=wardby-source src/tools/codex-rerecord.ts",
|
|
65
66
|
"capture:autopilot": "tsx --conditions=wardby-source src/tools/capture-autopilot-dry-run.ts",
|
|
66
67
|
"test": "npm run build:vendor && vitest run",
|
|
67
68
|
"test:package": "node scripts/npm-package-acceptance.mjs",
|
|
68
69
|
"test:contract": "vitest run --config vitest.contract.config.ts",
|
|
69
70
|
"test:kubernetes": "WARDBY_KUBERNETES_TEST=1 vitest run src/providers/jobs/kubernetes.integration.test.ts",
|
|
71
|
+
"test:native-docker": "WARDBY_NATIVE_DOCKER_TEST=1 vitest run src/native-worker/docker.acceptance.test.ts",
|
|
72
|
+
"test:native-kind": "WARDBY_NATIVE_KIND_TEST=1 vitest run src/native-worker/kubernetes.acceptance.test.ts",
|
|
73
|
+
"test:native-cluster": "WARDBY_NATIVE_CLUSTER_TEST=1 vitest run src/native-worker/kubernetes-cluster.acceptance.test.ts",
|
|
70
74
|
"prisma:generate": "PRISMA_HIDE_UPDATE_MESSAGE=1 prisma generate",
|
|
71
75
|
"prisma:migrate": "prisma migrate deploy",
|
|
72
76
|
"dbos:migrate": "dbos schema \"$DATABASE_URL\"",
|
|
@@ -78,13 +82,14 @@
|
|
|
78
82
|
"observability:smoke": "node scripts/grafana-smoke.mjs",
|
|
79
83
|
"observability:down": "docker compose --env-file .env.local -f deploy/local/docker-compose.yml -f deploy/local/docker-compose.phase5.yml -f deploy/observability/docker-compose.grafana.yml down",
|
|
80
84
|
"worker:image:local": "node scripts/build-local-coding-worker.mjs",
|
|
85
|
+
"native-worker:image:local": "docker build -f src/native-worker/Dockerfile -t wardby-native-worker:local .",
|
|
81
86
|
"test:phase5": "vitest run src/coding/observability.test.ts src/coding/profile.test.ts src/coding/protocol.test.ts src/providers/coding-proxy/proxy.test.ts src/providers/coding-proxy/secure-fetch.test.ts src/providers/coding-proxy/metering.test.ts src/providers/coding-proxy/runtime.test.ts src/providers/executor/container.test.ts src/providers/jobs/docker.test.ts src/providers/jobs/docker-isolation.test.ts src/providers/jobs/fake.test.ts src/providers/vcs/github.test.ts src/mcp/tools/trigger.test.ts src/core/webhooks.test.ts src/claude-coding-worker/driver.test.ts src/claude-coding-worker/sdk.test.ts src/claude-coding-worker/image-policy.test.ts src/claude-tool-runner/command.test.mjs src/claude-tool-runner/main.test.mjs src/claude-tool-runner/image-policy.test.ts",
|
|
82
87
|
"test:phase5:database": "vitest run src/coding/schema.database.test.ts src/providers/coding-proxy/prisma-ledger.database.test.ts src/providers/executor/container.database.test.ts src/core/coding-concurrency.database.test.ts src/core/scheduler.test.ts src/mcp/integration.test.ts",
|
|
83
88
|
"verify:phase5": "npm run typecheck && npm run test:phase5 && npm run build && npm run worker:image:policy",
|
|
84
89
|
"test:docker-isolation": "node scripts/docker-isolation-acceptance.mjs",
|
|
85
90
|
"test:docker-job": "node scripts/docker-job-acceptance.mjs",
|
|
86
91
|
"test:docker-services": "node scripts/docker-services-acceptance.mjs",
|
|
87
|
-
"claude:images:local": "docker build -f src/claude-coding-worker/Dockerfile -t wardby-claude-coding-worker:phase5 . && docker build -f src/claude-tool-runner/Dockerfile -t wardby-claude-tool-runner:phase5 . && docker build -f src/claude-tool-runner/Dockerfile --target node-python -t wardby-claude-tool-runner:phase5-node-python .",
|
|
92
|
+
"claude:images:local": "docker build -f src/claude-coding-worker/Dockerfile -t wardby-claude-coding-worker:phase5 . && docker build -f src/claude-tool-runner/Dockerfile -t wardby-claude-tool-runner:phase5 . && docker build -f src/claude-tool-runner/Dockerfile --target node-python -t wardby-claude-tool-runner:phase5-node-python . && docker build -f src/claude-tool-runner/Dockerfile.custom-example -t wardby-claude-tool-runner-custom:phase5 .",
|
|
88
93
|
"test:claude-compatibility": "docker build -f src/claude-coding-worker/Dockerfile.compatibility -t wardby-claude-compat:phase5 . && docker run --rm wardby-claude-compat:phase5",
|
|
89
94
|
"test:claude-docker": "node scripts/claude-docker-acceptance.mjs",
|
|
90
95
|
"test:production-boundary": "node scripts/production-boundary-policy.mjs",
|
|
@@ -94,6 +99,8 @@
|
|
|
94
99
|
"dependencies": {
|
|
95
100
|
"@anthropic-ai/bedrock-sdk": "^0.33.4",
|
|
96
101
|
"@anthropic-ai/sdk": "^0.124.0",
|
|
102
|
+
"@aws-crypto/sha256-js": "4.0.0",
|
|
103
|
+
"@aws-sdk/rds-signer": "3.1140.0",
|
|
97
104
|
"@dbos-inc/dbos-sdk": "4.27.6",
|
|
98
105
|
"@kubernetes/client-node": "^2.0.0",
|
|
99
106
|
"@modelcontextprotocol/client": "^2.3.1",
|
|
@@ -103,6 +110,7 @@
|
|
|
103
110
|
"@prisma/client": "7.10.0",
|
|
104
111
|
"@prometheus-io/client": "^0.16.1",
|
|
105
112
|
"@renovatebot/pep440": "^5.0.1",
|
|
113
|
+
"@smithy/signature-v4": "5.7.4",
|
|
106
114
|
"croner": "^10.0.1",
|
|
107
115
|
"dotenv-flow": "^4.1.0",
|
|
108
116
|
"fast-xml-parser": "^5.11.1",
|
|
@@ -110,7 +118,7 @@
|
|
|
110
118
|
"gpt-tokenizer": "^2.5.0",
|
|
111
119
|
"jose": "^6.2.12",
|
|
112
120
|
"node-html-parser": "^9.0.3",
|
|
113
|
-
"openai": "
|
|
121
|
+
"openai": "7.30.0",
|
|
114
122
|
"papaparse": "^5.7.0",
|
|
115
123
|
"pg": "8.23.0",
|
|
116
124
|
"pino": "^9.14.0",
|
|
@@ -124,7 +132,7 @@
|
|
|
124
132
|
},
|
|
125
133
|
"devDependencies": {
|
|
126
134
|
"@eslint/js": "^10.0.1",
|
|
127
|
-
"@openai/codex-sdk": "0.
|
|
135
|
+
"@openai/codex-sdk": "0.160.1",
|
|
128
136
|
"@types/node": "^24.0.0",
|
|
129
137
|
"@types/papaparse": "^5.5.2",
|
|
130
138
|
"@types/pg": "8.23.1",
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
-- Additive: per-agent native execution mode (control-plane or sandbox) and the
|
|
2
|
+
-- per-run snapshot the executor routes on. Existing agents default to
|
|
3
|
+
-- control-plane; existing runs keep a null snapshot (legacy = control plane).
|
|
4
|
+
|
|
5
|
+
-- CreateEnum
|
|
6
|
+
CREATE TYPE "NativeExecutionMode" AS ENUM ('control-plane', 'sandbox');
|
|
7
|
+
|
|
8
|
+
-- AlterTable
|
|
9
|
+
ALTER TABLE "Agent" ADD COLUMN "nativeExecutionMode" "NativeExecutionMode" NOT NULL DEFAULT 'control-plane';
|
|
10
|
+
|
|
11
|
+
-- AlterTable
|
|
12
|
+
ALTER TABLE "Run" ADD COLUMN "nativeExecutionMode" "NativeExecutionMode";
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
-- Additive: the native sandbox gateway's session and call ledger. A session
|
|
2
|
+
-- authenticates a sandbox worker by capability hash and pins what its run
|
|
3
|
+
-- loaded; calls reserve and settle model spend and keep replayable results.
|
|
4
|
+
|
|
5
|
+
-- CreateEnum
|
|
6
|
+
CREATE TYPE "NativeGatewaySessionStatus" AS ENUM ('active', 'finished', 'cancelled');
|
|
7
|
+
|
|
8
|
+
-- CreateEnum
|
|
9
|
+
CREATE TYPE "NativeGatewayCallStatus" AS ENUM ('reserved', 'completed', 'released', 'uncertain', 'pending', 'waiting_budget');
|
|
10
|
+
|
|
11
|
+
-- CreateTable
|
|
12
|
+
CREATE TABLE "NativeGatewaySession" (
|
|
13
|
+
"id" TEXT NOT NULL,
|
|
14
|
+
"runId" TEXT NOT NULL,
|
|
15
|
+
"capabilityHash" TEXT NOT NULL,
|
|
16
|
+
"status" "NativeGatewaySessionStatus" NOT NULL DEFAULT 'active',
|
|
17
|
+
"deadlineAt" TIMESTAMP(3) NOT NULL,
|
|
18
|
+
"budgetUsd" DECIMAL(18,10) NOT NULL,
|
|
19
|
+
"snapshot" JSONB NOT NULL,
|
|
20
|
+
"budgetExhaustedAt" TIMESTAMP(3),
|
|
21
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
22
|
+
"updatedAt" TIMESTAMP(3) NOT NULL,
|
|
23
|
+
|
|
24
|
+
CONSTRAINT "NativeGatewaySession_pkey" PRIMARY KEY ("id")
|
|
25
|
+
);
|
|
26
|
+
|
|
27
|
+
-- CreateTable
|
|
28
|
+
CREATE TABLE "NativeGatewayCall" (
|
|
29
|
+
"id" TEXT NOT NULL,
|
|
30
|
+
"sessionId" TEXT NOT NULL,
|
|
31
|
+
"callId" TEXT NOT NULL,
|
|
32
|
+
"method" TEXT NOT NULL,
|
|
33
|
+
"status" "NativeGatewayCallStatus" NOT NULL,
|
|
34
|
+
"reservationUsd" DECIMAL(18,10),
|
|
35
|
+
"actualCostUsd" DECIMAL(18,10),
|
|
36
|
+
"inputTokens" INTEGER,
|
|
37
|
+
"outputTokens" INTEGER,
|
|
38
|
+
"cachedInputTokens" INTEGER,
|
|
39
|
+
"cacheWriteTokens" INTEGER,
|
|
40
|
+
"result" JSONB,
|
|
41
|
+
"childRunId" TEXT,
|
|
42
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
43
|
+
"updatedAt" TIMESTAMP(3) NOT NULL,
|
|
44
|
+
"completedAt" TIMESTAMP(3),
|
|
45
|
+
|
|
46
|
+
CONSTRAINT "NativeGatewayCall_pkey" PRIMARY KEY ("id")
|
|
47
|
+
);
|
|
48
|
+
|
|
49
|
+
-- CreateIndex
|
|
50
|
+
CREATE UNIQUE INDEX "NativeGatewaySession_runId_key" ON "NativeGatewaySession"("runId");
|
|
51
|
+
|
|
52
|
+
-- CreateIndex
|
|
53
|
+
CREATE UNIQUE INDEX "NativeGatewaySession_capabilityHash_key" ON "NativeGatewaySession"("capabilityHash");
|
|
54
|
+
|
|
55
|
+
-- CreateIndex
|
|
56
|
+
CREATE INDEX "NativeGatewayCall_sessionId_status_idx" ON "NativeGatewayCall"("sessionId", "status");
|
|
57
|
+
|
|
58
|
+
-- CreateIndex
|
|
59
|
+
CREATE UNIQUE INDEX "NativeGatewayCall_sessionId_callId_key" ON "NativeGatewayCall"("sessionId", "callId");
|
|
60
|
+
|
|
61
|
+
-- AddForeignKey
|
|
62
|
+
ALTER TABLE "NativeGatewaySession" ADD CONSTRAINT "NativeGatewaySession_runId_fkey" FOREIGN KEY ("runId") REFERENCES "Run"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
63
|
+
|
|
64
|
+
-- AddForeignKey
|
|
65
|
+
ALTER TABLE "NativeGatewayCall" ADD CONSTRAINT "NativeGatewayCall_sessionId_fkey" FOREIGN KEY ("sessionId") REFERENCES "NativeGatewaySession"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
-- Additive: runs dispatched (or asked to stop) by a process that holds no
|
|
2
|
+
-- executor -- the native sandbox gateway -- are started (or stopped) by the
|
|
3
|
+
-- scheduler leader through the server's executor.
|
|
4
|
+
|
|
5
|
+
-- AlterTable
|
|
6
|
+
ALTER TABLE "Run" ADD COLUMN "startDeferredAt" TIMESTAMP(3),
|
|
7
|
+
ADD COLUMN "stopRequestedAt" TIMESTAMP(3),
|
|
8
|
+
ADD COLUMN "stopRequestReason" TEXT;
|
|
9
|
+
|
|
10
|
+
-- CreateIndex
|
|
11
|
+
CREATE INDEX "Run_startDeferredAt_idx" ON "Run"("startDeferredAt");
|
|
12
|
+
|
|
13
|
+
-- CreateIndex
|
|
14
|
+
CREATE INDEX "Run_stopRequestedAt_idx" ON "Run"("stopRequestedAt");
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
-- Workflow notifications (Slack): channel links, the event outbox, per-channel
|
|
2
|
+
-- deliveries, and thread parents. Additive only.
|
|
3
|
+
|
|
4
|
+
CREATE TABLE "NotificationChannel" (
|
|
5
|
+
"id" TEXT NOT NULL,
|
|
6
|
+
"provider" TEXT NOT NULL,
|
|
7
|
+
"channelId" TEXT NOT NULL,
|
|
8
|
+
"channelName" TEXT,
|
|
9
|
+
"issueProvider" TEXT,
|
|
10
|
+
"projectKey" TEXT,
|
|
11
|
+
"agentId" TEXT,
|
|
12
|
+
"events" TEXT[] DEFAULT ARRAY[]::TEXT[],
|
|
13
|
+
"includeCost" BOOLEAN NOT NULL DEFAULT false,
|
|
14
|
+
"lastError" TEXT,
|
|
15
|
+
"lastErrorAt" TIMESTAMP(3),
|
|
16
|
+
"authorizedById" TEXT NOT NULL,
|
|
17
|
+
"authorizedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
18
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
19
|
+
CONSTRAINT "NotificationChannel_pkey" PRIMARY KEY ("id"),
|
|
20
|
+
CONSTRAINT "NotificationChannel_one_subject" CHECK (
|
|
21
|
+
("agentId" IS NOT NULL AND "issueProvider" IS NULL AND "projectKey" IS NULL)
|
|
22
|
+
OR ("agentId" IS NULL AND "issueProvider" IS NOT NULL AND "projectKey" IS NOT NULL)
|
|
23
|
+
)
|
|
24
|
+
);
|
|
25
|
+
|
|
26
|
+
-- Name truncated the way Prisma does for PostgreSQL's 63-byte identifier limit,
|
|
27
|
+
-- so `migrate diff` sees it as the @@unique([provider, channelId, issueProvider, projectKey]).
|
|
28
|
+
-- The one-subject CHECK above has no schema.prisma equivalent; migrate diff ignores it.
|
|
29
|
+
CREATE UNIQUE INDEX "NotificationChannel_provider_channelId_issueProvider_projec_key"
|
|
30
|
+
ON "NotificationChannel"("provider", "channelId", "issueProvider", "projectKey");
|
|
31
|
+
CREATE UNIQUE INDEX "NotificationChannel_provider_channelId_agentId_key"
|
|
32
|
+
ON "NotificationChannel"("provider", "channelId", "agentId");
|
|
33
|
+
CREATE INDEX "NotificationChannel_issueProvider_projectKey_idx"
|
|
34
|
+
ON "NotificationChannel"("issueProvider", "projectKey");
|
|
35
|
+
CREATE INDEX "NotificationChannel_agentId_idx" ON "NotificationChannel"("agentId");
|
|
36
|
+
|
|
37
|
+
ALTER TABLE "NotificationChannel" ADD CONSTRAINT "NotificationChannel_agentId_fkey"
|
|
38
|
+
FOREIGN KEY ("agentId") REFERENCES "Agent"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
39
|
+
|
|
40
|
+
CREATE TABLE "WorkflowEvent" (
|
|
41
|
+
"id" TEXT NOT NULL,
|
|
42
|
+
"kind" TEXT NOT NULL,
|
|
43
|
+
"dedupeKey" TEXT NOT NULL,
|
|
44
|
+
"runId" TEXT,
|
|
45
|
+
"agentId" TEXT,
|
|
46
|
+
"workItemProvider" TEXT,
|
|
47
|
+
"workItemKey" TEXT,
|
|
48
|
+
"codeProvider" TEXT,
|
|
49
|
+
"repository" TEXT,
|
|
50
|
+
"prNumber" INTEGER,
|
|
51
|
+
"payload" JSONB NOT NULL,
|
|
52
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
53
|
+
CONSTRAINT "WorkflowEvent_pkey" PRIMARY KEY ("id")
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
CREATE UNIQUE INDEX "WorkflowEvent_dedupeKey_key" ON "WorkflowEvent"("dedupeKey");
|
|
57
|
+
CREATE INDEX "WorkflowEvent_createdAt_idx" ON "WorkflowEvent"("createdAt");
|
|
58
|
+
|
|
59
|
+
CREATE TABLE "NotificationDelivery" (
|
|
60
|
+
"id" TEXT NOT NULL,
|
|
61
|
+
"eventId" TEXT NOT NULL,
|
|
62
|
+
"provider" TEXT NOT NULL,
|
|
63
|
+
"channelId" TEXT NOT NULL,
|
|
64
|
+
"threadKey" TEXT NOT NULL,
|
|
65
|
+
"includeCost" BOOLEAN NOT NULL DEFAULT false,
|
|
66
|
+
"state" TEXT NOT NULL DEFAULT 'pending',
|
|
67
|
+
"attempts" INTEGER NOT NULL DEFAULT 0,
|
|
68
|
+
"nextAttemptAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
69
|
+
"lastError" TEXT,
|
|
70
|
+
"messageTs" TEXT,
|
|
71
|
+
"deliveredAt" TIMESTAMP(3),
|
|
72
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
73
|
+
CONSTRAINT "NotificationDelivery_pkey" PRIMARY KEY ("id")
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
CREATE UNIQUE INDEX "NotificationDelivery_eventId_provider_channelId_key"
|
|
77
|
+
ON "NotificationDelivery"("eventId", "provider", "channelId");
|
|
78
|
+
CREATE INDEX "NotificationDelivery_state_nextAttemptAt_idx"
|
|
79
|
+
ON "NotificationDelivery"("state", "nextAttemptAt");
|
|
80
|
+
CREATE INDEX "NotificationDelivery_provider_channelId_threadKey_createdAt_idx"
|
|
81
|
+
ON "NotificationDelivery"("provider", "channelId", "threadKey", "createdAt");
|
|
82
|
+
|
|
83
|
+
ALTER TABLE "NotificationDelivery" ADD CONSTRAINT "NotificationDelivery_eventId_fkey"
|
|
84
|
+
FOREIGN KEY ("eventId") REFERENCES "WorkflowEvent"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
85
|
+
|
|
86
|
+
CREATE TABLE "NotificationThread" (
|
|
87
|
+
"id" TEXT NOT NULL,
|
|
88
|
+
"provider" TEXT NOT NULL,
|
|
89
|
+
"channelId" TEXT NOT NULL,
|
|
90
|
+
"threadKey" TEXT NOT NULL,
|
|
91
|
+
"parentTs" TEXT NOT NULL,
|
|
92
|
+
"status" TEXT NOT NULL,
|
|
93
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
94
|
+
"updatedAt" TIMESTAMP(3) NOT NULL,
|
|
95
|
+
CONSTRAINT "NotificationThread_pkey" PRIMARY KEY ("id")
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
CREATE UNIQUE INDEX "NotificationThread_provider_channelId_threadKey_key"
|
|
99
|
+
ON "NotificationThread"("provider", "channelId", "threadKey");
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
-- Additive: the native sandbox warm pool. One row per pool worker, inserted
|
|
2
|
+
-- before the worker exists; a run claims an idle row with a conditional update.
|
|
3
|
+
|
|
4
|
+
-- CreateEnum
|
|
5
|
+
CREATE TYPE "NativeWarmWorkerStatus" AS ENUM ('warming', 'idle', 'claimed', 'retiring');
|
|
6
|
+
|
|
7
|
+
-- CreateTable
|
|
8
|
+
CREATE TABLE "NativeWarmWorker" (
|
|
9
|
+
"id" TEXT NOT NULL,
|
|
10
|
+
"name" TEXT NOT NULL,
|
|
11
|
+
"status" "NativeWarmWorkerStatus" NOT NULL DEFAULT 'warming',
|
|
12
|
+
"specHash" TEXT NOT NULL,
|
|
13
|
+
"runId" TEXT,
|
|
14
|
+
"readyAt" TIMESTAMP(3),
|
|
15
|
+
"claimedAt" TIMESTAMP(3),
|
|
16
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
17
|
+
"updatedAt" TIMESTAMP(3) NOT NULL,
|
|
18
|
+
|
|
19
|
+
CONSTRAINT "NativeWarmWorker_pkey" PRIMARY KEY ("id")
|
|
20
|
+
);
|
|
21
|
+
|
|
22
|
+
-- CreateIndex
|
|
23
|
+
CREATE UNIQUE INDEX "NativeWarmWorker_name_key" ON "NativeWarmWorker"("name");
|
|
24
|
+
|
|
25
|
+
-- CreateIndex
|
|
26
|
+
CREATE UNIQUE INDEX "NativeWarmWorker_runId_key" ON "NativeWarmWorker"("runId");
|
|
27
|
+
|
|
28
|
+
-- CreateIndex
|
|
29
|
+
CREATE INDEX "NativeWarmWorker_status_specHash_idx" ON "NativeWarmWorker"("status", "specHash");
|
|
30
|
+
|
|
31
|
+
-- AddForeignKey
|
|
32
|
+
ALTER TABLE "NativeWarmWorker" ADD CONSTRAINT "NativeWarmWorker_runId_fkey" FOREIGN KEY ("runId") REFERENCES "Run"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
ALTER TABLE "Secret" ADD COLUMN "broker" JSONB;
|
|
2
|
+
|
|
3
|
+
CREATE TABLE "SecretBrokerChange" (
|
|
4
|
+
"id" TEXT NOT NULL,
|
|
5
|
+
"secretId" TEXT NOT NULL,
|
|
6
|
+
"ownerId" TEXT NOT NULL,
|
|
7
|
+
"secretName" TEXT NOT NULL,
|
|
8
|
+
"actorId" TEXT NOT NULL,
|
|
9
|
+
"before" JSONB,
|
|
10
|
+
"after" JSONB,
|
|
11
|
+
"via" TEXT NOT NULL,
|
|
12
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
13
|
+
CONSTRAINT "SecretBrokerChange_pkey" PRIMARY KEY ("id")
|
|
14
|
+
);
|
|
15
|
+
|
|
16
|
+
CREATE INDEX "SecretBrokerChange_secretId_createdAt_idx" ON "SecretBrokerChange"("secretId", "createdAt");
|
|
17
|
+
CREATE INDEX "SecretBrokerChange_ownerId_createdAt_idx" ON "SecretBrokerChange"("ownerId", "createdAt");
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
-- Additive: per-agent switch for loading the repository's agent skills into
|
|
2
|
+
-- coding runs, the per-agent Claude Code bare-mode switch, and the values fixed
|
|
3
|
+
-- on each run at dispatch. Defaults keep existing behavior and hardening.
|
|
4
|
+
|
|
5
|
+
-- AlterTable
|
|
6
|
+
ALTER TABLE "CodingAgentProfile" ADD COLUMN "repoSkills" BOOLEAN NOT NULL DEFAULT true;
|
|
7
|
+
|
|
8
|
+
-- AlterTable
|
|
9
|
+
ALTER TABLE "CodingAgentProfile" ADD COLUMN "claudeBareMode" BOOLEAN NOT NULL DEFAULT true;
|
|
10
|
+
|
|
11
|
+
-- AlterTable
|
|
12
|
+
ALTER TABLE "CodingRun" ADD COLUMN "repoSkills" BOOLEAN NOT NULL DEFAULT true;
|
|
13
|
+
|
|
14
|
+
-- AlterTable
|
|
15
|
+
ALTER TABLE "CodingRun" ADD COLUMN "claudeBareMode" BOOLEAN NOT NULL DEFAULT true;
|