@wardby/cli 0.2.0 → 0.3.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 +34 -4
- package/README.md +183 -71
- package/dist/claude-coding-worker/driver.d.ts +7 -1
- package/dist/claude-coding-worker/driver.js +31 -2
- package/dist/claude-coding-worker/main.js +5 -2
- package/dist/claude-coding-worker/tool-socket.d.ts +9 -0
- package/dist/claude-coding-worker/tool-socket.js +26 -0
- package/dist/cli-help.d.ts +1 -1
- package/dist/cli-help.js +13 -4
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +219 -29
- package/dist/coding/collect-exclude.d.ts +25 -0
- package/dist/coding/collect-exclude.js +76 -0
- package/dist/coding/profile.d.ts +67 -22
- package/dist/coding/profile.js +58 -25
- package/dist/coding/protected-path-wording.d.ts +24 -0
- package/dist/coding/protected-path-wording.js +55 -0
- package/dist/coding/protected-paths.d.ts +31 -0
- package/dist/coding/protected-paths.js +48 -0
- package/dist/coding/protocol.d.ts +99 -3
- package/dist/coding/protocol.js +155 -4
- package/dist/coding/registry/adapters.d.ts +2 -0
- package/dist/coding/registry/adapters.js +9 -0
- package/dist/coding/registry/allowlist.d.ts +9 -0
- package/dist/coding/registry/allowlist.js +28 -0
- package/dist/coding/registry/json-scan.d.ts +55 -0
- package/dist/coding/registry/json-scan.js +191 -0
- package/dist/coding/registry/lockfiles.d.ts +6 -0
- package/dist/coding/registry/lockfiles.js +89 -0
- package/dist/coding/registry/npm-lockfile.d.ts +9 -0
- package/dist/coding/registry/npm-lockfile.js +73 -0
- package/dist/coding/registry/npm-plan.d.ts +29 -0
- package/dist/coding/registry/npm-plan.js +289 -0
- package/dist/coding/registry/npm.d.ts +7 -0
- package/dist/coding/registry/npm.js +252 -0
- package/dist/coding/registry/pypi.d.ts +4 -0
- package/dist/coding/registry/pypi.js +210 -0
- package/dist/coding/registry/report.d.ts +37 -0
- package/dist/coding/registry/report.js +31 -0
- package/dist/coding/registry/token.d.ts +4 -0
- package/dist/coding/registry/token.js +7 -0
- package/dist/coding/registry/types.d.ts +286 -0
- package/dist/coding/registry/types.js +19 -0
- package/dist/coding/registry/worker-config.d.ts +14 -0
- package/dist/coding/registry/worker-config.js +31 -0
- package/dist/coding/services/builtins.d.ts +22 -0
- package/dist/coding/services/builtins.js +85 -0
- package/dist/coding/services/catalog.d.ts +443 -0
- package/dist/coding/services/catalog.js +159 -0
- package/dist/coding/services/declaration.d.ts +11 -0
- package/dist/coding/services/declaration.js +114 -0
- package/dist/coding/services/note.d.ts +8 -0
- package/dist/coding/services/note.js +15 -0
- package/dist/coding/services/resolve.d.ts +25 -0
- package/dist/coding/services/resolve.js +50 -0
- package/dist/coding/services/wording.d.ts +25 -0
- package/dist/coding/services/wording.js +70 -0
- package/dist/coding-proxy/main.js +24 -4
- package/dist/coding-worker/artifact.d.ts +18 -0
- package/dist/coding-worker/artifact.js +48 -6
- package/dist/coding-worker/debug-trace.d.ts +37 -0
- package/dist/coding-worker/debug-trace.js +117 -0
- package/dist/coding-worker/driver.d.ts +14 -1
- package/dist/coding-worker/driver.js +106 -14
- package/dist/coding-worker/errors.d.ts +7 -0
- package/dist/coding-worker/errors.js +26 -0
- package/dist/coding-worker/main.js +13 -4
- package/dist/coding-worker/sdk.d.ts +2 -2
- package/dist/coding-worker/sdk.js +7 -2
- package/dist/coding-worker/types.d.ts +3 -0
- package/dist/config/providers.d.ts +41 -0
- package/dist/config/providers.js +66 -0
- package/dist/core/budget-groups.d.ts +109 -6
- package/dist/core/budget-groups.js +125 -19
- package/dist/core/budget-wording.d.ts +22 -0
- package/dist/core/budget-wording.js +55 -0
- package/dist/core/coding-queue.d.ts +1 -1
- package/dist/core/datastores.d.ts +1 -1
- package/dist/core/datastores.js +18 -2
- package/dist/core/db.d.ts +40 -2
- package/dist/core/db.js +75 -2
- package/dist/core/dispatch.d.ts +49 -7
- package/dist/core/dispatch.js +290 -45
- package/dist/core/engine-native.js +27 -10
- package/dist/core/grants.d.ts +86 -0
- package/dist/core/grants.js +126 -0
- package/dist/core/host-events.d.ts +49 -0
- package/dist/core/host-events.js +257 -0
- package/dist/core/host-identity-links.d.ts +54 -0
- package/dist/core/host-identity-links.js +189 -0
- package/dist/core/host-status.d.ts +61 -0
- package/dist/core/host-status.js +211 -0
- package/dist/core/http-runtime.js +3 -4
- package/dist/core/in-flight-runs.d.ts +8 -0
- package/dist/core/in-flight-runs.js +56 -0
- package/dist/core/lease.d.ts +1 -1
- package/dist/core/private-directory.d.ts +20 -0
- package/dist/core/private-directory.js +36 -0
- package/dist/core/provider-wording.d.ts +12 -0
- package/dist/core/provider-wording.js +44 -0
- package/dist/core/reconciler.d.ts +39 -3
- package/dist/core/reconciler.js +86 -2
- package/dist/core/repo-access.d.ts +99 -0
- package/dist/core/repo-access.js +136 -0
- package/dist/core/review-host-checks.d.ts +11 -0
- package/dist/core/review-host-checks.js +41 -0
- package/dist/core/review-host-tools.d.ts +47 -0
- package/dist/core/review-host-tools.js +347 -0
- package/dist/core/run-heartbeat.d.ts +27 -0
- package/dist/core/run-heartbeat.js +54 -0
- package/dist/core/runner.d.ts +31 -9
- package/dist/core/runner.js +237 -40
- package/dist/core/scheduler.d.ts +1 -1
- package/dist/core/secrets.d.ts +12 -3
- package/dist/core/secrets.js +25 -6
- package/dist/core/subagent-memory-tools.d.ts +2 -2
- package/dist/core/subagent-memory-tools.js +16 -3
- package/dist/core/tool-admin.d.ts +81 -0
- package/dist/core/tool-admin.js +129 -0
- package/dist/core/tool-names.d.ts +42 -0
- package/dist/core/tool-names.js +64 -0
- package/dist/core/untrusted-content.d.ts +32 -0
- package/dist/core/untrusted-content.js +72 -0
- package/dist/core/webhooks.d.ts +9 -2
- package/dist/core/webhooks.js +23 -2
- package/dist/generated/prisma/browser.d.ts +328 -0
- package/dist/generated/prisma/browser.js +17 -0
- package/dist/generated/prisma/client.d.ts +347 -0
- package/dist/generated/prisma/client.js +34 -0
- package/dist/generated/prisma/commonInputTypes.d.ts +839 -0
- package/dist/generated/prisma/commonInputTypes.js +10 -0
- package/dist/generated/prisma/enums.d.ts +59 -0
- package/dist/generated/prisma/enums.js +59 -0
- package/dist/generated/prisma/internal/class.d.ts +605 -0
- package/dist/generated/prisma/internal/class.js +49 -0
- package/dist/generated/prisma/internal/prismaNamespace.d.ts +4494 -0
- package/dist/generated/prisma/internal/prismaNamespace.js +628 -0
- package/dist/generated/prisma/internal/prismaNamespaceBrowser.d.ts +635 -0
- package/dist/generated/prisma/internal/prismaNamespaceBrowser.js +599 -0
- package/dist/generated/prisma/models/Agent.d.ts +3560 -0
- package/dist/generated/prisma/models/Agent.js +1 -0
- package/dist/generated/prisma/models/AgentDatastore.d.ts +1210 -0
- package/dist/generated/prisma/models/AgentDatastore.js +1 -0
- package/dist/generated/prisma/models/AgentMemory.d.ts +986 -0
- package/dist/generated/prisma/models/AgentMemory.js +1 -0
- package/dist/generated/prisma/models/AgentRepository.d.ts +1425 -0
- package/dist/generated/prisma/models/AgentRepository.js +1 -0
- package/dist/generated/prisma/models/AgentSecret.d.ts +1212 -0
- package/dist/generated/prisma/models/AgentSecret.js +1 -0
- package/dist/generated/prisma/models/AgentSubAgent.d.ts +1217 -0
- package/dist/generated/prisma/models/AgentSubAgent.js +1 -0
- package/dist/generated/prisma/models/AgentTool.d.ts +1403 -0
- package/dist/generated/prisma/models/AgentTool.js +1 -0
- package/dist/generated/prisma/models/AuthFormChallenge.d.ts +1298 -0
- package/dist/generated/prisma/models/AuthFormChallenge.js +1 -0
- package/dist/generated/prisma/models/AuthLoginKey.d.ts +1245 -0
- package/dist/generated/prisma/models/AuthLoginKey.js +1 -0
- package/dist/generated/prisma/models/AuthRateLimit.d.ts +979 -0
- package/dist/generated/prisma/models/AuthRateLimit.js +1 -0
- package/dist/generated/prisma/models/AuthSession.d.ts +1376 -0
- package/dist/generated/prisma/models/AuthSession.js +1 -0
- package/dist/generated/prisma/models/AuthUser.d.ts +1700 -0
- package/dist/generated/prisma/models/AuthUser.js +1 -0
- package/dist/generated/prisma/models/BudgetGroup.d.ts +1548 -0
- package/dist/generated/prisma/models/BudgetGroup.js +1 -0
- package/dist/generated/prisma/models/CodingAgentProfile.d.ts +1681 -0
- package/dist/generated/prisma/models/CodingAgentProfile.js +1 -0
- package/dist/generated/prisma/models/CodingProxyRequest.d.ts +1749 -0
- package/dist/generated/prisma/models/CodingProxyRequest.js +1 -0
- package/dist/generated/prisma/models/CodingProxySession.d.ts +1626 -0
- package/dist/generated/prisma/models/CodingProxySession.js +1 -0
- package/dist/generated/prisma/models/CodingRun.d.ts +3583 -0
- package/dist/generated/prisma/models/CodingRun.js +1 -0
- package/dist/generated/prisma/models/CodingService.d.ts +1348 -0
- package/dist/generated/prisma/models/CodingService.js +1 -0
- package/dist/generated/prisma/models/Datastore.d.ts +1434 -0
- package/dist/generated/prisma/models/Datastore.js +1 -0
- package/dist/generated/prisma/models/DatastoreEntry.d.ts +1314 -0
- package/dist/generated/prisma/models/DatastoreEntry.js +1 -0
- package/dist/generated/prisma/models/HostEventDelivery.d.ts +946 -0
- package/dist/generated/prisma/models/HostEventDelivery.js +1 -0
- package/dist/generated/prisma/models/HostIdentity.d.ts +1232 -0
- package/dist/generated/prisma/models/HostIdentity.js +1 -0
- package/dist/generated/prisma/models/HostIdentityLinkRequest.d.ts +1473 -0
- package/dist/generated/prisma/models/HostIdentityLinkRequest.js +1 -0
- package/dist/generated/prisma/models/OAuthAuthorizationCode.d.ts +1526 -0
- package/dist/generated/prisma/models/OAuthAuthorizationCode.js +1 -0
- package/dist/generated/prisma/models/OAuthAuthorizationRequest.d.ts +1350 -0
- package/dist/generated/prisma/models/OAuthAuthorizationRequest.js +1 -0
- package/dist/generated/prisma/models/OAuthClient.d.ts +1289 -0
- package/dist/generated/prisma/models/OAuthClient.js +1 -0
- package/dist/generated/prisma/models/OAuthFamily.d.ts +1540 -0
- package/dist/generated/prisma/models/OAuthFamily.js +1 -0
- package/dist/generated/prisma/models/OAuthGrant.d.ts +1280 -0
- package/dist/generated/prisma/models/OAuthGrant.js +1 -0
- package/dist/generated/prisma/models/Principal.d.ts +2245 -0
- package/dist/generated/prisma/models/Principal.js +1 -0
- package/dist/generated/prisma/models/RegistryAllowance.d.ts +1148 -0
- package/dist/generated/prisma/models/RegistryAllowance.js +1 -0
- package/dist/generated/prisma/models/RegistryApprovedVersion.d.ts +1219 -0
- package/dist/generated/prisma/models/RegistryApprovedVersion.js +1 -0
- package/dist/generated/prisma/models/RegistryFetch.d.ts +1428 -0
- package/dist/generated/prisma/models/RegistryFetch.js +1 -0
- package/dist/generated/prisma/models/RegistryPlanRefusal.d.ts +1294 -0
- package/dist/generated/prisma/models/RegistryPlanRefusal.js +1 -0
- package/dist/generated/prisma/models/RegistryVersionFact.d.ts +1085 -0
- package/dist/generated/prisma/models/RegistryVersionFact.js +1 -0
- package/dist/generated/prisma/models/ResourceGrant.d.ts +1437 -0
- package/dist/generated/prisma/models/ResourceGrant.js +1 -0
- package/dist/generated/prisma/models/Run.d.ts +2669 -0
- package/dist/generated/prisma/models/Run.js +1 -0
- package/dist/generated/prisma/models/RunHostCheck.d.ts +1239 -0
- package/dist/generated/prisma/models/RunHostCheck.js +1 -0
- package/dist/generated/prisma/models/RunHostStatus.d.ts +1315 -0
- package/dist/generated/prisma/models/RunHostStatus.js +1 -0
- package/dist/generated/prisma/models/SchedulerLease.d.ts +970 -0
- package/dist/generated/prisma/models/SchedulerLease.js +1 -0
- package/dist/generated/prisma/models/Secret.d.ts +1399 -0
- package/dist/generated/prisma/models/Secret.js +1 -0
- package/dist/generated/prisma/models/SecretElicitationOutcome.d.ts +973 -0
- package/dist/generated/prisma/models/SecretElicitationOutcome.js +1 -0
- package/dist/generated/prisma/models/Task.d.ts +1176 -0
- package/dist/generated/prisma/models/Task.js +1 -0
- package/dist/generated/prisma/models/Tool.d.ts +1490 -0
- package/dist/generated/prisma/models/Tool.js +1 -0
- package/dist/generated/prisma/models/Webhook.d.ts +1386 -0
- package/dist/generated/prisma/models/Webhook.js +1 -0
- package/dist/generated/prisma/models.d.ts +45 -0
- package/dist/generated/prisma/models.js +1 -0
- package/dist/help/build.d.ts +1 -0
- package/dist/help/build.js +9 -0
- package/dist/help/catalog.d.ts +24 -0
- package/dist/help/catalog.js +160 -0
- package/dist/help/cli.d.ts +2 -0
- package/dist/help/cli.js +65 -0
- package/dist/help/runtime.d.ts +3 -0
- package/dist/help/runtime.js +44 -0
- package/dist/help/search.d.ts +9 -0
- package/dist/help/search.js +104 -0
- package/dist/help-index.json +660 -0
- package/dist/import/cli-args.js +3 -2
- package/dist/import/create.d.ts +6 -1
- package/dist/import/create.js +68 -14
- package/dist/import/index.d.ts +1 -1
- package/dist/import/index.js +19 -9
- package/dist/import/neutral-schema.d.ts +11 -11
- package/dist/mcp/auth/access.d.ts +70 -0
- package/dist/mcp/auth/access.js +58 -0
- package/dist/mcp/auth/grants-cli.d.ts +149 -0
- package/dist/mcp/auth/grants-cli.js +518 -0
- package/dist/mcp/auth/host-account-cli.d.ts +2 -0
- package/dist/mcp/auth/host-account-cli.js +47 -0
- package/dist/mcp/auth/ownership.d.ts +37 -63
- package/dist/mcp/auth/ownership.js +19 -14
- package/dist/mcp/auth/principal.d.ts +1 -1
- package/dist/mcp/auth/repo-authorization.d.ts +22 -0
- package/dist/mcp/auth/repo-authorization.js +51 -0
- package/dist/mcp/auth/resource-server.d.ts +32 -3
- package/dist/mcp/auth/resource-server.js +84 -3
- package/dist/mcp/auth/self-hosted/browser.js +22 -8
- package/dist/mcp/auth/self-hosted/cli.d.ts +1 -1
- package/dist/mcp/auth/self-hosted/cli.js +47 -13
- package/dist/mcp/auth/self-hosted/credentials.d.ts +21 -3
- package/dist/mcp/auth/self-hosted/credentials.js +62 -4
- package/dist/mcp/auth/self-hosted/rate-limit.d.ts +1 -1
- package/dist/mcp/auth/self-hosted/session.d.ts +3 -2
- package/dist/mcp/context.d.ts +28 -2
- package/dist/mcp/errors.d.ts +25 -6
- package/dist/mcp/errors.js +98 -0
- package/dist/mcp/host-events/github-ingress.d.ts +36 -0
- package/dist/mcp/host-events/github-ingress.js +92 -0
- package/dist/mcp/host-events/github-user-callback.d.ts +18 -0
- package/dist/mcp/host-events/github-user-callback.js +50 -0
- package/dist/mcp/index.d.ts +8 -1
- package/dist/mcp/index.js +106 -16
- package/dist/mcp/server.d.ts +1 -1
- package/dist/mcp/server.js +27 -9
- package/dist/mcp/shared/page-style.d.ts +16 -0
- package/dist/mcp/shared/page-style.js +129 -0
- package/dist/mcp/tasks/manager.d.ts +1 -1
- package/dist/mcp/tools/agents.js +447 -49
- package/dist/mcp/tools/budget-groups.js +3 -3
- package/dist/mcp/tools/datastore.js +23 -16
- package/dist/mcp/tools/grants.d.ts +2 -0
- package/dist/mcp/tools/grants.js +239 -0
- package/dist/mcp/tools/help.d.ts +5 -0
- package/dist/mcp/tools/help.js +67 -0
- package/dist/mcp/tools/host-accounts.d.ts +2 -0
- package/dist/mcp/tools/host-accounts.js +114 -0
- package/dist/mcp/tools/memory.d.ts +7 -1
- package/dist/mcp/tools/memory.js +5 -5
- package/dist/mcp/tools/repositories.d.ts +2 -0
- package/dist/mcp/tools/repositories.js +181 -0
- package/dist/mcp/tools/runs.d.ts +6 -0
- package/dist/mcp/tools/runs.js +60 -6
- package/dist/mcp/tools/scheduling.js +4 -7
- package/dist/mcp/tools/secret-elicitation-form.d.ts +1 -1
- package/dist/mcp/tools/secret-elicitation-form.js +10 -28
- package/dist/mcp/tools/secret-elicitation.d.ts +1 -1
- package/dist/mcp/tools/secrets.js +18 -6
- package/dist/mcp/tools/services.d.ts +2 -0
- package/dist/mcp/tools/services.js +222 -0
- package/dist/mcp/tools/subagents.js +53 -17
- package/dist/mcp/tools/tools.d.ts +41 -0
- package/dist/mcp/tools/tools.js +202 -41
- package/dist/mcp/tools/trigger.js +36 -6
- package/dist/mcp/tools/webhooks.js +15 -4
- package/dist/mcp/transport/streamable-http.d.ts +11 -1
- package/dist/mcp/transport/streamable-http.js +32 -2
- package/dist/mcp/unattended-schedules.d.ts +1 -1
- package/dist/mcp/webhooks/ingress.d.ts +1 -1
- package/dist/providers/auth/delegating.d.ts +19 -0
- package/dist/providers/auth/delegating.js +71 -0
- package/dist/providers/auth/index.d.ts +3 -1
- package/dist/providers/auth/index.js +11 -0
- package/dist/providers/auth/self-hosted.d.ts +4 -3
- package/dist/providers/auth/self-hosted.js +16 -4
- package/dist/providers/auth/types.d.ts +6 -0
- package/dist/providers/coding-proxy/memory-ledger.d.ts +3 -0
- package/dist/providers/coding-proxy/memory-ledger.js +21 -2
- package/dist/providers/coding-proxy/metering.d.ts +4 -0
- package/dist/providers/coding-proxy/metering.js +28 -2
- package/dist/providers/coding-proxy/prisma-ledger.d.ts +18 -1
- package/dist/providers/coding-proxy/prisma-ledger.js +50 -5
- package/dist/providers/coding-proxy/proxy.d.ts +13 -0
- package/dist/providers/coding-proxy/proxy.js +479 -18
- package/dist/providers/coding-proxy/registry/audit.d.ts +131 -0
- package/dist/providers/coding-proxy/registry/audit.js +380 -0
- package/dist/providers/coding-proxy/registry/bounded-fetch.d.ts +16 -0
- package/dist/providers/coding-proxy/registry/bounded-fetch.js +77 -0
- package/dist/providers/coding-proxy/registry/plan.d.ts +58 -0
- package/dist/providers/coding-proxy/registry/plan.js +304 -0
- package/dist/providers/coding-proxy/registry/prisma-store.d.ts +34 -0
- package/dist/providers/coding-proxy/registry/prisma-store.js +151 -0
- package/dist/providers/coding-proxy/registry/service.d.ts +213 -0
- package/dist/providers/coding-proxy/registry/service.js +1137 -0
- package/dist/providers/coding-proxy/registry/store.d.ts +127 -0
- package/dist/providers/coding-proxy/registry/store.js +70 -0
- package/dist/providers/coding-proxy/runtime.d.ts +18 -1
- package/dist/providers/coding-proxy/runtime.js +63 -0
- package/dist/providers/coding-proxy/secure-fetch.js +0 -1
- package/dist/providers/coding-proxy/server.d.ts +11 -0
- package/dist/providers/coding-proxy/server.js +163 -0
- package/dist/providers/coding-proxy/types.d.ts +15 -0
- package/dist/providers/datastore/postgres.d.ts +1 -1
- package/dist/providers/engine/types.d.ts +10 -0
- package/dist/providers/executor/build.d.ts +3 -3
- package/dist/providers/executor/composition.d.ts +4 -1
- package/dist/providers/executor/composition.js +19 -0
- package/dist/providers/executor/container.d.ts +106 -4
- package/dist/providers/executor/container.js +305 -22
- package/dist/providers/executor/dbos.d.ts +3 -4
- package/dist/providers/executor/in-process.d.ts +2 -3
- package/dist/providers/executor/routing.d.ts +7 -0
- package/dist/providers/executor/routing.js +13 -0
- package/dist/providers/executor/types.d.ts +22 -0
- package/dist/providers/jobs/claude-tool-setup.d.ts +23 -0
- package/dist/providers/jobs/claude-tool-setup.js +50 -0
- package/dist/providers/jobs/collect-prune.d.ts +7 -0
- package/dist/providers/jobs/collect-prune.js +27 -0
- package/dist/providers/jobs/docker-isolation.d.ts +48 -3
- package/dist/providers/jobs/docker-isolation.js +213 -22
- package/dist/providers/jobs/docker-services.d.ts +35 -0
- package/dist/providers/jobs/docker-services.js +191 -0
- package/dist/providers/jobs/docker.d.ts +60 -2
- package/dist/providers/jobs/docker.js +313 -50
- package/dist/providers/jobs/fake-kubernetes-api.d.ts +1 -0
- package/dist/providers/jobs/fake-kubernetes-api.js +12 -3
- package/dist/providers/jobs/kubernetes-isolation.d.ts +17 -2
- package/dist/providers/jobs/kubernetes-isolation.js +238 -57
- package/dist/providers/jobs/kubernetes-platform.d.ts +10 -4
- package/dist/providers/jobs/kubernetes-platform.js +11 -5
- package/dist/providers/jobs/kubernetes-preflight.js +3 -0
- package/dist/providers/jobs/kubernetes.d.ts +21 -2
- package/dist/providers/jobs/kubernetes.js +117 -31
- package/dist/providers/jobs/types.d.ts +20 -0
- package/dist/providers/llm/anthropic.js +6 -2
- package/dist/providers/llm/bedrock.js +2 -1
- package/dist/providers/llm/claude-messages.d.ts +5 -1
- package/dist/providers/llm/claude-messages.js +1 -0
- package/dist/providers/llm/claude-provider.d.ts +3 -1
- package/dist/providers/llm/claude-provider.js +5 -1
- package/dist/providers/llm/index.d.ts +1 -1
- package/dist/providers/llm/index.js +1 -1
- package/dist/providers/llm/pricing-anthropic.d.ts +10 -0
- package/dist/providers/llm/pricing-anthropic.js +32 -14
- package/dist/providers/llm/pricing-bedrock-claude.d.ts +8 -0
- package/dist/providers/llm/pricing-bedrock-claude.js +9 -0
- package/dist/providers/llm/routing.d.ts +10 -1
- package/dist/providers/llm/routing.js +18 -0
- package/dist/providers/llm/types.d.ts +12 -0
- package/dist/providers/llm/types.js +8 -1
- package/dist/providers/memory/postgres.d.ts +1 -1
- package/dist/providers/review-host/diff-lines.d.ts +16 -0
- package/dist/providers/review-host/diff-lines.js +59 -0
- package/dist/providers/review-host/github-events.d.ts +6 -0
- package/dist/providers/review-host/github-events.js +180 -0
- package/dist/providers/review-host/github-user-auth.d.ts +38 -0
- package/dist/providers/review-host/github-user-auth.js +128 -0
- package/dist/providers/review-host/github.d.ts +57 -0
- package/dist/providers/review-host/github.js +567 -0
- package/dist/providers/review-host/index.d.ts +12 -0
- package/dist/providers/review-host/index.js +30 -0
- package/dist/providers/review-host/review-format.d.ts +19 -0
- package/dist/providers/review-host/review-format.js +59 -0
- package/dist/providers/review-host/types.d.ts +284 -0
- package/dist/providers/review-host/types.js +24 -0
- package/dist/providers/vcs/git.d.ts +16 -6
- package/dist/providers/vcs/git.js +79 -14
- package/dist/providers/vcs/github.d.ts +74 -3
- package/dist/providers/vcs/github.js +195 -15
- package/dist/providers/vcs/types.d.ts +42 -4
- package/dist/quickstart/index.js +34 -32
- package/dist/quickstart/migrate.d.ts +23 -0
- package/dist/quickstart/migrate.js +125 -0
- package/dist/sandbox/fetch-policy.d.ts +20 -2
- package/dist/sandbox/fetch-policy.js +64 -3
- package/dist/sandbox/host-functions.d.ts +9 -1
- package/dist/sandbox/host-functions.js +12 -5
- package/dist/serve.js +1 -1
- package/dist/wardby-bin.js +6 -0
- package/docs/README.md +30 -0
- package/docs/architecture-runtime.md +90 -0
- package/docs/assets/brand/wardby-icon-512.png +0 -0
- package/docs/assets/brand/wardby-icon.svg +16 -0
- package/docs/assets/brand/wardby-mascot-profile-512.png +0 -0
- package/docs/assets/brand/wardby-mascot.png +0 -0
- package/docs/assets/brand/wardby-mascot.svg +5 -0
- package/docs/assets/wardby-workflow.svg +106 -0
- package/docs/code-review-agents.md +481 -0
- package/docs/coding-agent-setup.md +172 -0
- package/docs/coding-packages.md +455 -0
- package/docs/coding-services.md +300 -0
- package/docs/coding-worker-byo-images.md +98 -0
- package/docs/coding-worker-isolation.md +1061 -0
- package/docs/getting-started-gke.md +615 -0
- package/docs/getting-started-identity-provider.md +308 -0
- package/docs/getting-started.md +133 -0
- package/docs/observability.md +53 -0
- package/docs/release-verification.md +66 -0
- package/docs/security-deployment.md +657 -0
- package/help/code-review-agents.md +31 -0
- package/help/coding-packages.md +31 -0
- package/help/coding-services.md +71 -0
- package/help/creating-agents.md +68 -0
- package/help/deploy-gke.md +39 -0
- package/help/deployment-targets.md +39 -0
- package/help/errors/budget-group-exhausted.md +25 -0
- package/help/errors/docker-isolation-unsupported.md +26 -0
- package/help/errors/protected-path.md +45 -0
- package/help/errors/repo-access.md +27 -0
- package/help/errors/service-declaration-invalid.md +27 -0
- package/help/errors/service-declaration-unavailable.md +25 -0
- package/help/errors/service-launcher-unsupported.md +30 -0
- package/help/errors/service-not-allowed.md +27 -0
- package/help/errors/service-unknown.md +23 -0
- package/help/errors/service-unready.md +49 -0
- package/help/getting-started.md +31 -0
- package/help/github.md +30 -0
- package/help/identity-and-access.md +39 -0
- package/help/mcp.md +30 -0
- package/help/native-capabilities.md +30 -0
- package/help/observability.md +41 -0
- package/help/operating-agents.md +30 -0
- package/help/security.md +27 -0
- package/help/troubleshooting/budgets.md +26 -0
- package/help/troubleshooting/coding-workers.md +47 -0
- package/help/troubleshooting/repository-access.md +27 -0
- package/package.json +30 -11
- package/prisma/migrate.config.mjs +20 -0
- package/prisma/migrations/20260925010000_coding_collect_exclude/migration.sql +8 -0
- package/prisma/migrations/20260925015000_allowed_egress_default/migration.sql +8 -0
- package/prisma/migrations/20260925020000_coding_package_registry/migration.sql +55 -0
- package/prisma/migrations/20260925030000_tool_name_per_owner/migration.sql +11 -0
- package/prisma/migrations/20260926010000_run_trigger_host_event/migration.sql +7 -0
- package/prisma/migrations/20260926020000_code_review_hosts/migration.sql +53 -0
- package/prisma/migrations/20260926030000_auth_user_roles/migration.sql +9 -0
- package/prisma/migrations/20260926040000_agent_effort/migration.sql +6 -0
- package/prisma/migrations/20260926050000_registry_lockfile_plan/migration.sql +32 -0
- package/prisma/migrations/20260926050000_repo_access_authorization/migration.sql +82 -0
- package/prisma/migrations/20260926060000_registry_plan_refusal/migration.sql +19 -0
- package/prisma/migrations/20260926100000_registry_plan_refusal_published_at/migration.sql +5 -0
- package/prisma/migrations/20260926190000_run_host_status/migration.sql +18 -0
- package/prisma/migrations/20260926210000_run_host_status_at_dispatch/migration.sql +5 -0
- package/prisma/migrations/20260927010000_resource_grants/migration.sql +72 -0
- package/prisma/migrations/20260927020000_proxy_session_budget_exhausted/migration.sql +3 -0
- package/prisma/migrations/20260927030000_coding_debug_trace/migration.sql +4 -0
- package/prisma/migrations/20260927040000_proxy_session_upstream_failure/migration.sql +3 -0
- package/prisma/migrations/20260927050000_coding_run_services/migration.sql +74 -0
- package/prisma/migrations/20260928000000_coding_run_tool_image/migration.sql +5 -0
- package/prisma/schema.prisma +417 -23
package/help/github.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: github-integration
|
|
3
|
+
title: Connect GitHub repositories
|
|
4
|
+
summary: Authorize repository access and configure Wardby coding or review agents through a scoped GitHub App.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [github, repositories, coding-agents, code-review]
|
|
7
|
+
appliesTo: >=0.2.1
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Connect GitHub repositories
|
|
11
|
+
|
|
12
|
+
Wardby uses a GitHub App installed only on the repositories an agent may use.
|
|
13
|
+
Repository access is checked against the agent owner's linked GitHub account,
|
|
14
|
+
or an explicitly recorded administrator approval. Coding agents need write
|
|
15
|
+
access because they can push a branch and open a draft pull request.
|
|
16
|
+
|
|
17
|
+
Wardby rechecks access before preparing a coding workspace and again before
|
|
18
|
+
pushing. Losing access, unlinking the account, or a failed access check stops
|
|
19
|
+
the run without publishing changes. See [Repository-access troubleshooting](troubleshooting/repository-access.md)
|
|
20
|
+
for the resulting refusal states.
|
|
21
|
+
|
|
22
|
+
Workers do not receive the GitHub App private key. A trusted component validates
|
|
23
|
+
the changes, pushes a controlled branch, and opens at most one draft pull
|
|
24
|
+
request. Wardby does not auto-merge coding-agent output.
|
|
25
|
+
|
|
26
|
+
Read [`docs/coding-agent-setup.md`](../docs/coding-agent-setup.md) for coding
|
|
27
|
+
agent setup and [`docs/code-review-agents.md`](../docs/code-review-agents.md)
|
|
28
|
+
for pull-request review agents and webhook configuration.
|
|
29
|
+
Use [Run GitHub code-review agents](code-review-agents.md) for the operator
|
|
30
|
+
overview of checks, mentions, and fork limitations.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: identity-and-access
|
|
3
|
+
title: Configure identity and privileged access
|
|
4
|
+
summary: Protect remote MCP access with an OAuth/OIDC provider and restrict sensitive operations with scopes and roles.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [identity, oauth, oidc, access-control, mcp]
|
|
7
|
+
appliesTo: >=0.2.1
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Configure identity and privileged access
|
|
11
|
+
|
|
12
|
+
Local stdio MCP created by `wardby quickstart` trusts the local operator. A
|
|
13
|
+
shared HTTPS deployment needs an OAuth/OIDC identity provider. In delegating
|
|
14
|
+
mode, that provider authenticates the caller and issues a signed JWT access
|
|
15
|
+
token; Wardby verifies the token and enforces its scopes without administering
|
|
16
|
+
the provider's users or exchanging authorization codes.
|
|
17
|
+
|
|
18
|
+
Set the provider's resource audience, `MCP_CANONICAL_URI`, and `AUTH_AUDIENCE`
|
|
19
|
+
to the exact same public MCP URL. Tokens need a stable subject, expiry, issuer,
|
|
20
|
+
audience, and the granted Wardby scopes in `scope` or `scp`.
|
|
21
|
+
|
|
22
|
+
Scopes authorize normal operations such as managing agents, runs, tools,
|
|
23
|
+
datastores, secrets, webhooks, budgets, packages, services, and memory. Three
|
|
24
|
+
sensitive permissions have an additional role requirement:
|
|
25
|
+
|
|
26
|
+
- `agents:admin` requires the Wardby `admin` role.
|
|
27
|
+
- `packages:approve` requires the `admin` or `package-approver` role.
|
|
28
|
+
- `services:manage` requires the `admin` or `service-manager` role.
|
|
29
|
+
|
|
30
|
+
Map roles only from an IdP claim that users cannot self-assign. Removing a
|
|
31
|
+
role affects the next token the caller receives.
|
|
32
|
+
|
|
33
|
+
When you upgrade a delegating-mode deployment, define any newly advertised
|
|
34
|
+
scope, such as `services:manage`, in the provider before deploying. Clients
|
|
35
|
+
that request every advertised scope otherwise fail with `invalid_scope`.
|
|
36
|
+
|
|
37
|
+
Read [`docs/getting-started-identity-provider.md`](../docs/getting-started-identity-provider.md)
|
|
38
|
+
for the required claims, scope list, role mapping, provider examples, and
|
|
39
|
+
client registration.
|
package/help/mcp.md
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: mcp-access
|
|
3
|
+
title: Connect an MCP client
|
|
4
|
+
summary: Use Wardby's local stdio or protected HTTP MCP transport safely.
|
|
5
|
+
audience: developer
|
|
6
|
+
tags: [mcp, oauth, codex, claude-code]
|
|
7
|
+
appliesTo: >=0.2.1
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Connect an MCP client
|
|
11
|
+
|
|
12
|
+
For local use, `wardby quickstart` can register the local stdio MCP server with
|
|
13
|
+
Codex or Claude Code. Local stdio trusts the local operator.
|
|
14
|
+
|
|
15
|
+
For remote access, Wardby exposes an OAuth 2.1-protected HTTP resource server.
|
|
16
|
+
Run the service with `MCP_TRANSPORT=http`, set a canonical public URI, and use
|
|
17
|
+
the instance's configured identity-provider mode. Keep the MCP endpoint behind
|
|
18
|
+
your intended ingress and authentication boundary.
|
|
19
|
+
|
|
20
|
+
MCP clients use Wardby to manage agents, budgets, tools, schedules, secrets,
|
|
21
|
+
datastores, and runs. They do not receive the provider or GitHub App
|
|
22
|
+
credentials held by Wardby's trusted components.
|
|
23
|
+
|
|
24
|
+
With the existing `agents:read` scope, clients can also use `search_help` to
|
|
25
|
+
find bundled self-hosted guidance with fuzzy matching and `get_help_article`
|
|
26
|
+
to read a complete article by id. These tools use the same release-bundled,
|
|
27
|
+
offline catalog as `wardby help`; they expose no instance data or credentials.
|
|
28
|
+
|
|
29
|
+
See [`docs/getting-started-identity-provider.md`](../docs/getting-started-identity-provider.md)
|
|
30
|
+
for the supported self-hosted and delegated identity-provider setup.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: native-capabilities
|
|
3
|
+
title: Use native agents, tools, and data
|
|
4
|
+
summary: Attach scoped tools, secrets, datastores, memory, schedules, and sub-agents to a native Wardby agent.
|
|
5
|
+
audience: developer
|
|
6
|
+
tags: [agents, tools, secrets, datastores, memory, schedules, subagents]
|
|
7
|
+
appliesTo: >=0.2.1
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Use native agents, tools, and data
|
|
11
|
+
|
|
12
|
+
Native agents work through the Wardby control plane rather than a repository
|
|
13
|
+
checkout. Give each agent only the capabilities its job needs:
|
|
14
|
+
|
|
15
|
+
- **Tools** for approved external actions or APIs.
|
|
16
|
+
- **Secrets** as bindings to tools or agents; values remain in Wardby's trusted
|
|
17
|
+
components rather than being returned through MCP.
|
|
18
|
+
- **Datastores** for scoped application data and queries.
|
|
19
|
+
- **Memory** for agent-owned durable context.
|
|
20
|
+
- **Schedules and webhooks** to start event-driven work.
|
|
21
|
+
- **Sub-agents** for delegated, bounded work with their own capability set.
|
|
22
|
+
|
|
23
|
+
Use a budget or shared budget group on every agent, and inspect runs before
|
|
24
|
+
expanding its access. An access grant is intentional delegation: use it only
|
|
25
|
+
when an owner permits one agent to use another resource. Creating or changing
|
|
26
|
+
tools, secrets, datastores, schedules, webhooks, memory, and budget groups
|
|
27
|
+
requires the matching MCP scope.
|
|
28
|
+
|
|
29
|
+
See [Operate agents](operating-agents.md) for run and budget management, and
|
|
30
|
+
[`README.md`](../README.md) for the feature overview and MCP operations.
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: observability
|
|
3
|
+
title: Monitor Wardby
|
|
4
|
+
summary: Scrape private Prometheus metrics and build production alerting around the coding proxy and run lifecycle.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [observability, prometheus, grafana, metrics, operations]
|
|
7
|
+
appliesTo: >=0.2.1
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Monitor Wardby
|
|
11
|
+
|
|
12
|
+
When `METRICS_BIND` is configured, Wardby's coding proxy exposes Prometheus
|
|
13
|
+
metrics at `/metrics`. Keep that endpoint on a private network and permit only
|
|
14
|
+
your collector to scrape it. Metrics cover proxy requests, errors, latency,
|
|
15
|
+
audit events, model cost, reserved and actual budget spend, coding outcomes,
|
|
16
|
+
and Node.js process health; they intentionally exclude prompts, repository
|
|
17
|
+
content, credentials, diffs, raw worker output, and run identifiers.
|
|
18
|
+
|
|
19
|
+
For a local dashboard stack, run:
|
|
20
|
+
|
|
21
|
+
```sh
|
|
22
|
+
npm run observability:up
|
|
23
|
+
npm run observability:smoke
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
This starts Prometheus and Grafana locally. Use `npm run observability:down`
|
|
27
|
+
when finished.
|
|
28
|
+
|
|
29
|
+
In production, configure your own Prometheus-compatible collector, retention,
|
|
30
|
+
private connectivity, alerts, and SLOs. GCP operators can use the Ops Agent or
|
|
31
|
+
Managed Service for Prometheus; AWS operators can use the CloudWatch Agent
|
|
32
|
+
Prometheus collector. Wardby's reference cloud deployments do not provision
|
|
33
|
+
them, and application/MCP metrics are currently narrower than coding-proxy
|
|
34
|
+
metrics.
|
|
35
|
+
|
|
36
|
+
Alert on proxy failures, budget cutoffs, cleanup failures, stalled runs, and
|
|
37
|
+
sustained latency or memory growth. Wardby's database remains the source of
|
|
38
|
+
truth for runs, budgets, and accounting.
|
|
39
|
+
|
|
40
|
+
Read [`docs/observability.md`](../docs/observability.md) for configuration and
|
|
41
|
+
the full production checklist.
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: operating-agents
|
|
3
|
+
title: Operate managed agents
|
|
4
|
+
summary: Understand the identity, budget, capabilities, triggers, and result of a Wardby-managed agent.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [agents, budgets, schedules, runs]
|
|
7
|
+
appliesTo: >=0.2.1
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Operate managed agents
|
|
11
|
+
|
|
12
|
+
Every Wardby-managed agent has an owner, system prompt, model, per-run budget,
|
|
13
|
+
and explicitly attached capabilities. A run starts only when its identity,
|
|
14
|
+
policy, and available budget agree.
|
|
15
|
+
|
|
16
|
+
Create, update, pause, trigger, and inspect agents through Wardby's MCP tools.
|
|
17
|
+
The CLI is the bootstrap and operations fallback. Scheduled work requires a
|
|
18
|
+
running scheduler: `wardby serve` runs MCP, scheduler, and reconciliation in
|
|
19
|
+
one process; `wardby mcp` alone does not execute schedules.
|
|
20
|
+
|
|
21
|
+
Use [Choose a native or coding agent](creating-agents.md) to select the least
|
|
22
|
+
powerful execution model that can safely produce the desired outcome.
|
|
23
|
+
|
|
24
|
+
Before a run starts, Wardby reserves its allowed spend. The reservation is
|
|
25
|
+
constrained by the agent's own budget, any shared budget group, and any
|
|
26
|
+
sub-agent run tree. See [Budget troubleshooting](troubleshooting/budgets.md)
|
|
27
|
+
when a run is refused for lack of budget.
|
|
28
|
+
|
|
29
|
+
For the full lifecycle and the controls applied to every managed run, read
|
|
30
|
+
[`README.md`](../README.md).
|
package/help/security.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: security-boundaries
|
|
3
|
+
title: Understand Wardby security boundaries
|
|
4
|
+
summary: Review the isolation, credential, budget, and action-authority controls that apply to managed work.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [security, isolation, credentials, budgets]
|
|
7
|
+
appliesTo: >=0.2.1
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Understand Wardby security boundaries
|
|
11
|
+
|
|
12
|
+
Wardby is designed to make agent work bounded and reviewable. It applies hard
|
|
13
|
+
per-agent and shared-budget limits, grants only explicitly attached tools,
|
|
14
|
+
secrets, datastores, and sub-agents, and records a durable result.
|
|
15
|
+
|
|
16
|
+
Native tools run in a constrained QuickJS environment. Coding agents use
|
|
17
|
+
isolated workers with bounded resources and a trusted proxy. Workers do not
|
|
18
|
+
receive provider credentials or the GitHub App private key. Coding finalization
|
|
19
|
+
creates a draft pull request; it does not grant the worker merge authority.
|
|
20
|
+
|
|
21
|
+
Treat the deployment boundary as part of the security model. Restrict Docker or
|
|
22
|
+
Kubernetes administrator access, protect secrets, constrain network egress,
|
|
23
|
+
and read the deployment guide before enabling a production repository.
|
|
24
|
+
|
|
25
|
+
See [`docs/security-deployment.md`](../docs/security-deployment.md) and
|
|
26
|
+
[`docs/coding-worker-isolation.md`](../docs/coding-worker-isolation.md) for
|
|
27
|
+
the detailed operational model.
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: troubleshooting/budgets
|
|
3
|
+
title: Troubleshoot budgets and reservations
|
|
4
|
+
summary: Diagnose run refusals caused by an exhausted agent, shared budget group, or sub-agent run tree.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [budgets, reservations, refusals, scheduling]
|
|
7
|
+
appliesTo: >=0.2.1
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Troubleshoot budgets and reservations
|
|
11
|
+
|
|
12
|
+
Wardby reserves budget when it dispatches a run. The reservation is limited by
|
|
13
|
+
the agent's `budgetUsd`, the remaining shared daily, weekly, or monthly budget
|
|
14
|
+
group capacity, and the remaining parent run-tree capacity for a sub-agent.
|
|
15
|
+
|
|
16
|
+
When no capacity remains, Wardby records the run as refused and does not start
|
|
17
|
+
a worker. Common errors include `budget_group_exhausted:day`,
|
|
18
|
+
`budget_group_exhausted:week`, `budget_group_exhausted:month`, and
|
|
19
|
+
`run_tree_exhausted`.
|
|
20
|
+
|
|
21
|
+
Inspect the agent, its budget group, and recent runs before increasing a limit.
|
|
22
|
+
In-progress runs retain their unspent reservation, so overlapping scheduled,
|
|
23
|
+
webhook, and manual runs share one cap rather than each assuming the full
|
|
24
|
+
remaining balance.
|
|
25
|
+
|
|
26
|
+
For a shared-group refusal, read [Budget group exhausted](../errors/budget-group-exhausted.md).
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: troubleshooting/coding-workers
|
|
3
|
+
title: Troubleshoot coding workers
|
|
4
|
+
summary: Investigate coding-worker setup, isolation preflight, and safe failure handling.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [coding-agents, docker, kubernetes, isolation, services]
|
|
7
|
+
appliesTo: >=0.2.1
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Troubleshoot coding workers
|
|
11
|
+
|
|
12
|
+
Before enabling a coding agent, configure an immutable worker image, the
|
|
13
|
+
trusted coding proxy, a scoped GitHub App installation, and the selected job
|
|
14
|
+
launcher. Run `wardby coding preflight` after changing the Docker or Kubernetes
|
|
15
|
+
configuration.
|
|
16
|
+
|
|
17
|
+
Wardby refuses to weaken an isolation profile when a required host feature,
|
|
18
|
+
network setting, mount, environment, or cleanup guarantee cannot be verified.
|
|
19
|
+
Investigate the host configuration instead of bypassing the refusal.
|
|
20
|
+
|
|
21
|
+
Codex and Claude Code workers have different supported launcher combinations.
|
|
22
|
+
Review the deployment guide for your target before assigning a coding profile.
|
|
23
|
+
|
|
24
|
+
For the specific isolation refusal, read [Coding-worker isolation unavailable](../errors/docker-isolation-unsupported.md).
|
|
25
|
+
|
|
26
|
+
## Service refusals and failures
|
|
27
|
+
|
|
28
|
+
A repository can declare services such as PostgreSQL in `.wardby/services.yaml`
|
|
29
|
+
on its base branch. Wardby checks the declaration, the service catalog, and the
|
|
30
|
+
agent's `codingProfile.services` before a run starts, and refuses the run with a
|
|
31
|
+
`service_*` code when they disagree. The run's `error` (from `get_run`) is the
|
|
32
|
+
code followed by a sentence the requester also sees on the run's status comment.
|
|
33
|
+
|
|
34
|
+
- [`service_declaration_invalid`](../errors/service-declaration-invalid.md):
|
|
35
|
+
the file on the base branch is not a valid declaration.
|
|
36
|
+
- [`service_declaration_unavailable`](../errors/service-declaration-unavailable.md):
|
|
37
|
+
Wardby could not read the file through the GitHub App.
|
|
38
|
+
- [`service_unknown`](../errors/service-unknown.md): the catalog has no such
|
|
39
|
+
name and version.
|
|
40
|
+
- [`service_not_allowed`](../errors/service-not-allowed.md): the agent does not
|
|
41
|
+
allow that service.
|
|
42
|
+
- [`service_launcher_unsupported`](../errors/service-launcher-unsupported.md):
|
|
43
|
+
services need the Kubernetes or Docker job launcher.
|
|
44
|
+
- [`service_unready`](../errors/service-unready.md): the run started but a
|
|
45
|
+
service never became ready (launcher error `coding_service_unready:<name>`).
|
|
46
|
+
|
|
47
|
+
See [Coding services](../coding-services.md).
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
---
|
|
2
|
+
id: troubleshooting/repository-access
|
|
3
|
+
title: Troubleshoot repository access
|
|
4
|
+
summary: Diagnose why Wardby refused repository work or could not verify the agent owner's GitHub access.
|
|
5
|
+
audience: operator
|
|
6
|
+
tags: [github, repositories, authorization, refusals]
|
|
7
|
+
appliesTo: >=0.2.1
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Troubleshoot repository access
|
|
11
|
+
|
|
12
|
+
Wardby checks that the owner of a coding or repository-linked agent has the
|
|
13
|
+
required current GitHub permission. A coding repository requires write access;
|
|
14
|
+
a read-only repository link requires read access. An administrator can record a
|
|
15
|
+
repository approval when no individual's access is appropriate.
|
|
16
|
+
|
|
17
|
+
`repo_access` means the current owner no longer has the required permission,
|
|
18
|
+
has unlinked their account, or the repository was not authorized. Restore the
|
|
19
|
+
owner's GitHub link and permission, or have an administrator review and record
|
|
20
|
+
the appropriate repository authorization.
|
|
21
|
+
|
|
22
|
+
`repo_access_unavailable` means Wardby could not verify GitHub access after its
|
|
23
|
+
retry. Do not treat it as permission granted: resolve the GitHub/API condition
|
|
24
|
+
and re-run the work later.
|
|
25
|
+
|
|
26
|
+
Read [Repository access refused](../errors/repo-access.md) for the safe
|
|
27
|
+
remediation sequence.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wardby/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.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",
|
|
@@ -19,6 +19,12 @@
|
|
|
19
19
|
"budget-control"
|
|
20
20
|
],
|
|
21
21
|
"type": "module",
|
|
22
|
+
"imports": {
|
|
23
|
+
"#prisma": {
|
|
24
|
+
"wardby-source": "./src/generated/prisma/client.ts",
|
|
25
|
+
"default": "./dist/generated/prisma/client.js"
|
|
26
|
+
}
|
|
27
|
+
},
|
|
22
28
|
"engines": {
|
|
23
29
|
"node": ">=24.0.0"
|
|
24
30
|
},
|
|
@@ -29,9 +35,12 @@
|
|
|
29
35
|
".env.example",
|
|
30
36
|
"NOTICE",
|
|
31
37
|
"bin/",
|
|
38
|
+
"docs/",
|
|
32
39
|
"deploy/local/docker-compose.yml",
|
|
33
40
|
"dist/",
|
|
41
|
+
"help/",
|
|
34
42
|
"prisma/migrations/",
|
|
43
|
+
"prisma/migrate.config.mjs",
|
|
35
44
|
"prisma/schema.prisma",
|
|
36
45
|
"scripts/git-askpass.sh"
|
|
37
46
|
],
|
|
@@ -45,18 +54,19 @@
|
|
|
45
54
|
"format": "prettier --write .",
|
|
46
55
|
"format:check": "prettier --check .",
|
|
47
56
|
"build:vendor": "node scripts/build-sandbox-vendor.mjs",
|
|
48
|
-
"build": "
|
|
49
|
-
"
|
|
57
|
+
"build:help": "tsx src/help/build.ts",
|
|
58
|
+
"build": "npm run build:vendor && PRISMA_HIDE_UPDATE_MESSAGE=1 prisma generate && tsc -p tsconfig.build.json && npm run build:help",
|
|
59
|
+
"prepare": "npm run build:vendor && PRISMA_HIDE_UPDATE_MESSAGE=1 prisma generate",
|
|
50
60
|
"prepack": "npm run build",
|
|
51
|
-
"
|
|
52
|
-
"
|
|
53
|
-
"capture:autopilot": "tsx src/tools/capture-autopilot-dry-run.ts",
|
|
61
|
+
"cli": "tsx --conditions=wardby-source src/cli.ts",
|
|
62
|
+
"capture:autopilot": "tsx --conditions=wardby-source src/tools/capture-autopilot-dry-run.ts",
|
|
54
63
|
"test": "npm run build:vendor && vitest run",
|
|
55
64
|
"test:package": "node scripts/npm-package-acceptance.mjs",
|
|
56
65
|
"test:contract": "vitest run --config vitest.contract.config.ts",
|
|
57
66
|
"test:kubernetes": "WARDBY_KUBERNETES_TEST=1 vitest run src/providers/jobs/kubernetes.integration.test.ts",
|
|
58
|
-
"prisma:generate": "prisma generate",
|
|
67
|
+
"prisma:generate": "PRISMA_HIDE_UPDATE_MESSAGE=1 prisma generate",
|
|
59
68
|
"prisma:migrate": "prisma migrate deploy",
|
|
69
|
+
"dbos:migrate": "dbos schema \"$DATABASE_URL\"",
|
|
60
70
|
"db:up": "docker compose -f deploy/local/docker-compose.yml up -d",
|
|
61
71
|
"db:down": "docker compose -f deploy/local/docker-compose.yml down",
|
|
62
72
|
"coding:local:up": "docker compose --env-file .env.local -f deploy/local/docker-compose.yml -f deploy/local/docker-compose.phase5.yml up --build -d coding-proxy",
|
|
@@ -70,7 +80,8 @@
|
|
|
70
80
|
"verify:phase5": "npm run typecheck && npm run test:phase5 && npm run build && npm run worker:image:policy",
|
|
71
81
|
"test:docker-isolation": "node scripts/docker-isolation-acceptance.mjs",
|
|
72
82
|
"test:docker-job": "node scripts/docker-job-acceptance.mjs",
|
|
73
|
-
"
|
|
83
|
+
"test:docker-services": "node scripts/docker-services-acceptance.mjs",
|
|
84
|
+
"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 .",
|
|
74
85
|
"test:claude-compatibility": "docker build -f src/claude-coding-worker/Dockerfile.compatibility -t wardby-claude-compat:phase5 . && docker run --rm wardby-claude-compat:phase5",
|
|
75
86
|
"test:claude-docker": "node scripts/claude-docker-acceptance.mjs",
|
|
76
87
|
"test:production-boundary": "node scripts/production-boundary-policy.mjs",
|
|
@@ -85,19 +96,23 @@
|
|
|
85
96
|
"@modelcontextprotocol/client": "^2.0.0",
|
|
86
97
|
"@modelcontextprotocol/node": "^2.0.0",
|
|
87
98
|
"@modelcontextprotocol/server": "^2.0.0",
|
|
88
|
-
"@prisma/
|
|
99
|
+
"@prisma/adapter-pg": "7.10.0",
|
|
100
|
+
"@prisma/client": "7.10.0",
|
|
89
101
|
"@prometheus-io/client": "^0.16.1",
|
|
102
|
+
"@renovatebot/pep440": "^5.0.1",
|
|
90
103
|
"croner": "^10.0.1",
|
|
91
104
|
"dotenv-flow": "^4.1.0",
|
|
92
105
|
"fast-xml-parser": "^5.11.1",
|
|
106
|
+
"fflate": "^0.8.3",
|
|
93
107
|
"gpt-tokenizer": "^2.5.0",
|
|
94
108
|
"jose": "^6.2.12",
|
|
95
109
|
"node-html-parser": "^9.0.3",
|
|
96
110
|
"openai": "^4.67.0",
|
|
97
111
|
"papaparse": "^5.7.0",
|
|
112
|
+
"pg": "8.23.0",
|
|
98
113
|
"pino": "^9.14.0",
|
|
99
|
-
"prisma": "^6.19.3",
|
|
100
114
|
"quickjs-emscripten": "^0.32.0",
|
|
115
|
+
"semver": "^7.8.5",
|
|
101
116
|
"tar-stream": "^3.2.1",
|
|
102
117
|
"undici": "^8.7.0",
|
|
103
118
|
"zod": "^3.25.76",
|
|
@@ -108,6 +123,8 @@
|
|
|
108
123
|
"@openai/codex-sdk": "0.153.4",
|
|
109
124
|
"@types/node": "^24.0.0",
|
|
110
125
|
"@types/papaparse": "^5.5.2",
|
|
126
|
+
"@types/pg": "8.23.1",
|
|
127
|
+
"@types/semver": "^7.8.0",
|
|
111
128
|
"@types/tar-stream": "^3.1.4",
|
|
112
129
|
"esbuild": "^0.28.2",
|
|
113
130
|
"eslint": "^10.10.0",
|
|
@@ -115,12 +132,14 @@
|
|
|
115
132
|
"globals": "^17.12.0",
|
|
116
133
|
"playwright": "^1.63.0",
|
|
117
134
|
"prettier": "^3.9.6",
|
|
135
|
+
"prisma": "7.10.0",
|
|
118
136
|
"tsx": "^4.19.0",
|
|
119
137
|
"typescript": "^5.6.0",
|
|
120
138
|
"typescript-eslint": "^8.69.0",
|
|
121
139
|
"vitest": "^4.1.11"
|
|
122
140
|
},
|
|
123
141
|
"overrides": {
|
|
124
|
-
"deepmerge-ts": "8.0.2"
|
|
142
|
+
"deepmerge-ts": "8.0.2",
|
|
143
|
+
"mysql2": "3.24.4"
|
|
125
144
|
}
|
|
126
145
|
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Prisma CLI configuration shipped in the npm package for `wardby quickstart`
|
|
2
|
+
// and `wardby doctor` (src/quickstart/migrate.ts). The installed package has
|
|
3
|
+
// no Prisma CLI -- it is a devDependency -- so quickstart runs the pinned CLI
|
|
4
|
+
// on demand (`npx --yes prisma@<version> migrate deploy|status --config
|
|
5
|
+
// <this file>`).
|
|
6
|
+
//
|
|
7
|
+
// Deliberately import-free: the CLI loads this file from the installed
|
|
8
|
+
// package, where neither `prisma/config` nor dotenv-flow is resolvable. A plain
|
|
9
|
+
// object is accepted in place of defineConfig(). Paths are resolved relative
|
|
10
|
+
// to this file, so they point at the schema and migrations shipped beside it.
|
|
11
|
+
//
|
|
12
|
+
// The URL comes from the environment quickstart passes to the child process
|
|
13
|
+
// (never from argv): the .wardby/.env DATABASE_URL.
|
|
14
|
+
export default {
|
|
15
|
+
schema: "schema.prisma",
|
|
16
|
+
migrations: { path: "migrations" },
|
|
17
|
+
datasource: {
|
|
18
|
+
url: process.env.DATABASE_URL ?? "",
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
-- Additive: per-agent workspace paths never collected from a coding run. See
|
|
2
|
+
-- docs/superpowers/specs/2026-09-25-coding-package-registry-design.md §4.
|
|
3
|
+
|
|
4
|
+
-- AlterTable
|
|
5
|
+
ALTER TABLE "CodingAgentProfile" ADD COLUMN "collectExclude" JSONB NOT NULL DEFAULT '[]';
|
|
6
|
+
|
|
7
|
+
-- AlterTable
|
|
8
|
+
ALTER TABLE "CodingRun" ADD COLUMN "collectExclude" JSONB NOT NULL DEFAULT '[]';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
-- allowedEgress was stored but never enforced and is no longer written. A default
|
|
2
|
+
-- lets new rows omit it; the columns are dropped in a later release.
|
|
3
|
+
|
|
4
|
+
-- AlterTable
|
|
5
|
+
ALTER TABLE "CodingAgentProfile" ALTER COLUMN "allowedEgress" SET DEFAULT '[]';
|
|
6
|
+
|
|
7
|
+
-- AlterTable
|
|
8
|
+
ALTER TABLE "CodingRun" ALTER COLUMN "allowedEgress" SET DEFAULT '[]';
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
-- Additive: coding package registry. See
|
|
2
|
+
-- docs/superpowers/specs/2026-09-25-coding-package-registry-design.md.
|
|
3
|
+
|
|
4
|
+
-- CreateEnum
|
|
5
|
+
CREATE TYPE "RegistryFetchOutcome" AS ENUM ('served', 'refused');
|
|
6
|
+
|
|
7
|
+
-- AlterTable
|
|
8
|
+
ALTER TABLE "CodingAgentProfile" ADD COLUMN "packageAllowlist" JSONB NOT NULL DEFAULT '{}',
|
|
9
|
+
ADD COLUMN "packagePolicy" JSONB NOT NULL DEFAULT '{}';
|
|
10
|
+
|
|
11
|
+
-- AlterTable
|
|
12
|
+
ALTER TABLE "CodingRun" ADD COLUMN "packageAllowlist" JSONB NOT NULL DEFAULT '{}',
|
|
13
|
+
ADD COLUMN "packagePolicy" JSONB NOT NULL DEFAULT '{}';
|
|
14
|
+
|
|
15
|
+
-- AlterTable
|
|
16
|
+
ALTER TABLE "CodingProxySession" ADD COLUMN "registryTokenHash" TEXT;
|
|
17
|
+
|
|
18
|
+
-- CreateTable
|
|
19
|
+
CREATE TABLE "RegistryAllowance" (
|
|
20
|
+
"runId" TEXT NOT NULL,
|
|
21
|
+
"ecosystem" TEXT NOT NULL,
|
|
22
|
+
"name" TEXT NOT NULL,
|
|
23
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
24
|
+
|
|
25
|
+
CONSTRAINT "RegistryAllowance_pkey" PRIMARY KEY ("runId","ecosystem","name")
|
|
26
|
+
);
|
|
27
|
+
|
|
28
|
+
-- CreateTable
|
|
29
|
+
CREATE TABLE "RegistryFetch" (
|
|
30
|
+
"id" TEXT NOT NULL,
|
|
31
|
+
"runId" TEXT NOT NULL,
|
|
32
|
+
"ecosystem" TEXT NOT NULL,
|
|
33
|
+
"name" TEXT NOT NULL,
|
|
34
|
+
"version" TEXT,
|
|
35
|
+
"filename" TEXT,
|
|
36
|
+
"integrity" TEXT,
|
|
37
|
+
"sizeBytes" INTEGER,
|
|
38
|
+
"outcome" "RegistryFetchOutcome" NOT NULL,
|
|
39
|
+
"reason" TEXT,
|
|
40
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
41
|
+
|
|
42
|
+
CONSTRAINT "RegistryFetch_pkey" PRIMARY KEY ("id")
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
-- CreateIndex
|
|
46
|
+
CREATE UNIQUE INDEX "CodingProxySession_registryTokenHash_key" ON "CodingProxySession"("registryTokenHash");
|
|
47
|
+
|
|
48
|
+
-- CreateIndex
|
|
49
|
+
CREATE INDEX "RegistryFetch_runId_createdAt_idx" ON "RegistryFetch"("runId", "createdAt");
|
|
50
|
+
|
|
51
|
+
-- AddForeignKey
|
|
52
|
+
ALTER TABLE "RegistryAllowance" ADD CONSTRAINT "RegistryAllowance_runId_fkey" FOREIGN KEY ("runId") REFERENCES "CodingRun"("runId") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
53
|
+
|
|
54
|
+
-- AddForeignKey
|
|
55
|
+
ALTER TABLE "RegistryFetch" ADD CONSTRAINT "RegistryFetch_runId_fkey" FOREIGN KEY ("runId") REFERENCES "CodingRun"("runId") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
-- Tool names become unique per owner instead of globally, matching
|
|
2
|
+
-- BudgetGroup / Datastore / Secret. Safe on existing data: global uniqueness
|
|
3
|
+
-- already implies per-owner uniqueness. As with those models, PostgreSQL
|
|
4
|
+
-- treats NULLs as distinct, so public (null-owner) tools are not deduplicated
|
|
5
|
+
-- by this index; `wardby tool create` checks that case in the application.
|
|
6
|
+
|
|
7
|
+
-- DropIndex
|
|
8
|
+
DROP INDEX "Tool_name_key";
|
|
9
|
+
|
|
10
|
+
-- CreateIndex
|
|
11
|
+
CREATE UNIQUE INDEX "Tool_ownerId_name_key" ON "Tool"("ownerId", "name");
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
-- Additive: a run started by a code-review host event (GitHub App webhook).
|
|
2
|
+
-- Its own migration: Postgres cannot use a newly added enum value in the
|
|
3
|
+
-- same transaction that adds it. See
|
|
4
|
+
-- docs/private/2026-09-25-code-review-host-design.md §4.
|
|
5
|
+
|
|
6
|
+
-- AlterEnum
|
|
7
|
+
ALTER TYPE "RunTrigger" ADD VALUE 'host_event';
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
-- Additive: repository links for native agents, the check a run owns, and
|
|
2
|
+
-- host webhook delivery de-duplication. See
|
|
3
|
+
-- docs/private/2026-09-25-code-review-host-design.md §4.
|
|
4
|
+
|
|
5
|
+
-- CreateTable
|
|
6
|
+
CREATE TABLE "AgentRepository" (
|
|
7
|
+
"id" TEXT NOT NULL,
|
|
8
|
+
"agentId" TEXT NOT NULL,
|
|
9
|
+
"provider" TEXT NOT NULL,
|
|
10
|
+
"repository" TEXT NOT NULL,
|
|
11
|
+
"access" TEXT NOT NULL,
|
|
12
|
+
"triggers" TEXT[] DEFAULT ARRAY[]::TEXT[],
|
|
13
|
+
"checkName" TEXT,
|
|
14
|
+
"createdAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
15
|
+
|
|
16
|
+
CONSTRAINT "AgentRepository_pkey" PRIMARY KEY ("id")
|
|
17
|
+
);
|
|
18
|
+
|
|
19
|
+
-- CreateTable
|
|
20
|
+
CREATE TABLE "RunHostCheck" (
|
|
21
|
+
"runId" TEXT NOT NULL,
|
|
22
|
+
"provider" TEXT NOT NULL,
|
|
23
|
+
"repository" TEXT NOT NULL,
|
|
24
|
+
"checkId" TEXT NOT NULL,
|
|
25
|
+
"headSha" TEXT NOT NULL,
|
|
26
|
+
"completedAt" TIMESTAMP(3),
|
|
27
|
+
|
|
28
|
+
CONSTRAINT "RunHostCheck_pkey" PRIMARY KEY ("runId")
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
-- CreateTable
|
|
32
|
+
CREATE TABLE "HostEventDelivery" (
|
|
33
|
+
"provider" TEXT NOT NULL,
|
|
34
|
+
"deliveryId" TEXT NOT NULL,
|
|
35
|
+
"receivedAt" TIMESTAMP(3) NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
|
36
|
+
|
|
37
|
+
CONSTRAINT "HostEventDelivery_pkey" PRIMARY KEY ("provider","deliveryId")
|
|
38
|
+
);
|
|
39
|
+
|
|
40
|
+
-- CreateIndex
|
|
41
|
+
CREATE UNIQUE INDEX "AgentRepository_agentId_provider_repository_key" ON "AgentRepository"("agentId", "provider", "repository");
|
|
42
|
+
|
|
43
|
+
-- CreateIndex
|
|
44
|
+
CREATE INDEX "AgentRepository_provider_repository_idx" ON "AgentRepository"("provider", "repository");
|
|
45
|
+
|
|
46
|
+
-- CreateIndex
|
|
47
|
+
CREATE INDEX "HostEventDelivery_receivedAt_idx" ON "HostEventDelivery"("receivedAt");
|
|
48
|
+
|
|
49
|
+
-- AddForeignKey
|
|
50
|
+
ALTER TABLE "AgentRepository" ADD CONSTRAINT "AgentRepository_agentId_fkey" FOREIGN KEY ("agentId") REFERENCES "Agent"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
51
|
+
|
|
52
|
+
-- AddForeignKey
|
|
53
|
+
ALTER TABLE "RunHostCheck" ADD CONSTRAINT "RunHostCheck_runId_fkey" FOREIGN KEY ("runId") REFERENCES "Run"("id") ON DELETE CASCADE ON UPDATE CASCADE;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
-- Additive: roles for self-hosted users (security finding A1). A privileged
|
|
2
|
+
-- operation (make_owner, setting workerImageRef, package approval) needs its
|
|
3
|
+
-- scope on the token AND one of the user's roles granting it, checked on
|
|
4
|
+
-- every request. Role names are validated in code (admin, package-approver).
|
|
5
|
+
-- Existing users get no roles (member) - an operator re-grants admin with
|
|
6
|
+
-- `wardby auth user grant --subject <subject> --role admin`.
|
|
7
|
+
|
|
8
|
+
-- AlterTable
|
|
9
|
+
ALTER TABLE "AuthUser" ADD COLUMN "roles" TEXT[] DEFAULT ARRAY[]::TEXT[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
-- Additive: per-agent reasoning effort for native agents. Nullable, so every
|
|
2
|
+
-- existing agent keeps the provider's default. Levels are validated in code
|
|
3
|
+
-- against the agent's model (low, medium, high, xhigh, max), not a DB enum.
|
|
4
|
+
|
|
5
|
+
-- AlterTable
|
|
6
|
+
ALTER TABLE "Agent" ADD COLUMN "effort" TEXT;
|