@wardby/cli 0.2.1 → 0.4.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 +53 -4
- package/README.md +52 -13
- package/dist/claude-coding-worker/driver.d.ts +6 -1
- package/dist/claude-coding-worker/driver.js +27 -1
- package/dist/claude-coding-worker/main.js +2 -0
- 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 +14 -4
- package/dist/cli.d.ts +1 -1
- package/dist/cli.js +284 -36
- package/dist/coding/base-commit.d.ts +6 -0
- package/dist/coding/base-commit.js +12 -0
- 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 +91 -4
- package/dist/coding/protocol.js +123 -12
- package/dist/coding/provider.d.ts +6 -1
- package/dist/coding/provider.js +16 -9
- 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 +6 -0
- 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 +13 -1
- package/dist/coding-worker/driver.js +102 -13
- package/dist/coding-worker/errors.js +8 -0
- package/dist/coding-worker/main.js +10 -2
- 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 +66 -0
- package/dist/config/providers.js +137 -0
- package/dist/core/attribution.d.ts +101 -0
- package/dist/core/attribution.js +208 -0
- package/dist/core/budget-groups.d.ts +120 -10
- package/dist/core/budget-groups.js +133 -24
- package/dist/core/budget-wording.d.ts +22 -0
- package/dist/core/budget-wording.js +55 -0
- package/dist/core/coding-queue.d.ts +3 -0
- package/dist/core/coding-queue.js +6 -2
- package/dist/core/coding-service-status.d.ts +11 -0
- package/dist/core/coding-service-status.js +17 -0
- package/dist/core/cost-report.d.ts +88 -0
- package/dist/core/cost-report.js +248 -0
- package/dist/core/datastores.js +18 -2
- package/dist/core/db.d.ts +5 -1
- package/dist/core/db.js +8 -2
- package/dist/core/dispatch.d.ts +74 -7
- package/dist/core/dispatch.js +382 -47
- package/dist/core/engine-native.js +44 -14
- package/dist/core/glob.d.ts +10 -0
- package/dist/core/glob.js +33 -0
- package/dist/core/grants.d.ts +86 -0
- package/dist/core/grants.js +126 -0
- package/dist/core/host-events.d.ts +72 -0
- package/dist/core/host-events.js +597 -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 +78 -0
- package/dist/core/host-status.js +228 -0
- package/dist/core/in-flight-runs.d.ts +8 -0
- package/dist/core/in-flight-runs.js +56 -0
- package/dist/core/issue-bridge.d.ts +60 -0
- package/dist/core/issue-bridge.js +189 -0
- package/dist/core/issue-dedupe.d.ts +70 -0
- package/dist/core/issue-dedupe.js +255 -0
- package/dist/core/issue-events.d.ts +42 -0
- package/dist/core/issue-events.js +155 -0
- package/dist/core/issue-status.d.ts +29 -0
- package/dist/core/issue-status.js +241 -0
- package/dist/core/issue-tracker-tools.d.ts +64 -0
- package/dist/core/issue-tracker-tools.js +850 -0
- package/dist/core/model-usage.d.ts +10 -0
- package/dist/core/model-usage.js +24 -0
- package/dist/core/provider-wording.d.ts +12 -0
- package/dist/core/provider-wording.js +44 -0
- package/dist/core/reconciler.d.ts +42 -2
- package/dist/core/reconciler.js +97 -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 +354 -0
- package/dist/core/run-heartbeat.d.ts +27 -0
- package/dist/core/run-heartbeat.js +54 -0
- package/dist/core/run-pricing.d.ts +61 -0
- package/dist/core/run-pricing.js +56 -0
- package/dist/core/runner.d.ts +33 -8
- package/dist/core/runner.js +410 -62
- package/dist/core/scheduler.d.ts +4 -1
- package/dist/core/scheduler.js +3 -2
- package/dist/core/secrets.d.ts +11 -2
- package/dist/core/secrets.js +25 -6
- package/dist/core/self-defects.d.ts +80 -0
- package/dist/core/self-defects.js +180 -0
- package/dist/core/subagent-memory-tools.d.ts +1 -1
- 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 +67 -0
- package/dist/core/untrusted-content.d.ts +32 -0
- package/dist/core/untrusted-content.js +72 -0
- package/dist/core/webhooks.d.ts +17 -2
- package/dist/core/webhooks.js +42 -3
- package/dist/generated/prisma/browser.d.ts +166 -0
- package/dist/generated/prisma/client.d.ts +166 -0
- package/dist/generated/prisma/commonInputTypes.d.ts +152 -52
- package/dist/generated/prisma/enums.d.ts +13 -0
- package/dist/generated/prisma/enums.js +12 -1
- package/dist/generated/prisma/internal/class.d.ts +242 -0
- package/dist/generated/prisma/internal/class.js +4 -4
- package/dist/generated/prisma/internal/prismaNamespace.d.ts +2571 -577
- package/dist/generated/prisma/internal/prismaNamespace.js +312 -6
- package/dist/generated/prisma/internal/prismaNamespaceBrowser.d.ts +328 -0
- package/dist/generated/prisma/internal/prismaNamespaceBrowser.js +312 -6
- package/dist/generated/prisma/models/Agent.d.ts +682 -1
- package/dist/generated/prisma/models/AgentIssueProject.d.ts +1838 -0
- package/dist/generated/prisma/models/AgentIssueProject.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/AgentTool.d.ts +95 -1
- package/dist/generated/prisma/models/AuthUser.d.ts +56 -1
- package/dist/generated/prisma/models/CodingAgentProfile.d.ts +258 -7
- package/dist/generated/prisma/models/CodingProxySession.d.ts +195 -2
- package/dist/generated/prisma/models/CodingRun.d.ts +1405 -95
- package/dist/generated/prisma/models/CodingRunServiceStatus.d.ts +1404 -0
- package/dist/generated/prisma/models/CodingRunServiceStatus.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/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/IssueFingerprint.d.ts +1183 -0
- package/dist/generated/prisma/models/IssueFingerprint.js +1 -0
- package/dist/generated/prisma/models/IssuePullRequest.d.ts +1255 -0
- package/dist/generated/prisma/models/IssuePullRequest.js +1 -0
- package/dist/generated/prisma/models/ModelCatalogEntry.d.ts +1322 -0
- package/dist/generated/prisma/models/ModelCatalogEntry.js +1 -0
- package/dist/generated/prisma/models/Principal.d.ts +455 -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 +1402 -82
- package/dist/generated/prisma/models/RunAttribution.d.ts +1259 -0
- package/dist/generated/prisma/models/RunAttribution.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/RunIssueStatus.d.ts +1199 -0
- package/dist/generated/prisma/models/RunIssueStatus.js +1 -0
- package/dist/generated/prisma/models/RunModelUsage.d.ts +1316 -0
- package/dist/generated/prisma/models/RunModelUsage.js +1 -0
- package/dist/generated/prisma/models/Tool.d.ts +15 -3
- package/dist/generated/prisma/models/WorkItem.d.ts +1408 -0
- package/dist/generated/prisma/models/WorkItem.js +1 -0
- package/dist/generated/prisma/models.d.ts +22 -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 +999 -0
- package/dist/import/cli-args.js +3 -2
- package/dist/import/create.d.ts +5 -0
- package/dist/import/create.js +67 -13
- package/dist/import/index.js +19 -9
- package/dist/import/neutral-schema.d.ts +18 -18
- package/dist/knowledge/check.d.ts +13 -0
- package/dist/knowledge/check.js +69 -0
- package/dist/knowledge/cli.d.ts +14 -0
- package/dist/knowledge/cli.js +67 -0
- package/dist/knowledge/concept.d.ts +54 -0
- package/dist/knowledge/concept.js +78 -0
- package/dist/knowledge/note.d.ts +11 -0
- package/dist/knowledge/note.js +39 -0
- package/dist/knowledge/relevance.d.ts +11 -0
- package/dist/knowledge/relevance.js +14 -0
- package/dist/knowledge/span-hash.d.ts +3 -0
- package/dist/knowledge/span-hash.js +16 -0
- package/dist/mcp/auth/access.d.ts +72 -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 +25 -51
- package/dist/mcp/auth/ownership.js +19 -14
- 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 +33 -2
- package/dist/mcp/auth/resource-server.js +99 -3
- package/dist/mcp/auth/self-hosted/browser.js +2 -2
- package/dist/mcp/auth/self-hosted/cli.js +47 -13
- package/dist/mcp/auth/self-hosted/credentials.d.ts +23 -5
- package/dist/mcp/auth/self-hosted/credentials.js +62 -4
- package/dist/mcp/auth/self-hosted/session.d.ts +7 -6
- package/dist/mcp/context.d.ts +30 -1
- package/dist/mcp/errors.d.ts +25 -6
- package/dist/mcp/errors.js +98 -0
- package/dist/mcp/host-events/deliveries.d.ts +9 -0
- package/dist/mcp/host-events/deliveries.js +17 -0
- package/dist/mcp/host-events/github-ingress.d.ts +38 -0
- package/dist/mcp/host-events/github-ingress.js +83 -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/host-events/jira-ingress.d.ts +29 -0
- package/dist/mcp/host-events/jira-ingress.js +92 -0
- package/dist/mcp/index.d.ts +10 -1
- package/dist/mcp/index.js +187 -19
- package/dist/mcp/server.js +32 -11
- package/dist/mcp/tools/agents.js +519 -50
- package/dist/mcp/tools/budget-groups.js +3 -3
- package/dist/mcp/tools/cost-report.d.ts +8 -0
- package/dist/mcp/tools/cost-report.js +60 -0
- package/dist/mcp/tools/datastore.js +22 -15
- 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/issue-projects.d.ts +2 -0
- package/dist/mcp/tools/issue-projects.js +238 -0
- package/dist/mcp/tools/memory.d.ts +7 -1
- package/dist/mcp/tools/memory.js +5 -5
- package/dist/mcp/tools/model-catalog.d.ts +22 -0
- package/dist/mcp/tools/model-catalog.js +423 -0
- package/dist/mcp/tools/repositories.d.ts +2 -0
- package/dist/mcp/tools/repositories.js +182 -0
- package/dist/mcp/tools/runs.d.ts +6 -0
- package/dist/mcp/tools/runs.js +60 -6
- package/dist/mcp/tools/scheduling.js +3 -6
- 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 +52 -16
- package/dist/mcp/tools/tools.d.ts +41 -0
- package/dist/mcp/tools/tools.js +201 -40
- package/dist/mcp/tools/trigger.js +65 -7
- package/dist/mcp/tools/webhooks.js +15 -4
- package/dist/mcp/transport/streamable-http.d.ts +15 -0
- package/dist/mcp/transport/streamable-http.js +55 -3
- package/dist/mcp/webhooks/ingress.d.ts +2 -1
- package/dist/mcp/webhooks/ingress.js +9 -2
- package/dist/providers/auth/delegating.d.ts +19 -0
- package/dist/providers/auth/delegating.js +71 -0
- package/dist/providers/auth/index.d.ts +2 -0
- package/dist/providers/auth/index.js +11 -0
- package/dist/providers/auth/self-hosted.d.ts +10 -2
- package/dist/providers/auth/self-hosted.js +55 -6
- package/dist/providers/auth/types.d.ts +6 -0
- package/dist/providers/coding-proxy/memory-ledger.d.ts +4 -1
- package/dist/providers/coding-proxy/memory-ledger.js +31 -3
- package/dist/providers/coding-proxy/metering.d.ts +6 -1
- package/dist/providers/coding-proxy/metering.js +41 -4
- package/dist/providers/coding-proxy/prisma-ledger.d.ts +17 -0
- package/dist/providers/coding-proxy/prisma-ledger.js +106 -8
- package/dist/providers/coding-proxy/proxy.d.ts +25 -2
- package/dist/providers/coding-proxy/proxy.js +561 -38
- 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 +17 -0
- 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 +33 -1
- package/dist/providers/coding-proxy/types.js +12 -1
- package/dist/providers/engine/types.d.ts +29 -0
- package/dist/providers/executor/build.d.ts +2 -2
- package/dist/providers/executor/composition.d.ts +3 -0
- package/dist/providers/executor/composition.js +28 -1
- package/dist/providers/executor/container.d.ts +134 -4
- package/dist/providers/executor/container.js +394 -37
- package/dist/providers/executor/dbos.d.ts +4 -3
- package/dist/providers/executor/dbos.js +7 -5
- package/dist/providers/executor/in-process.d.ts +2 -3
- package/dist/providers/executor/routing.d.ts +13 -0
- package/dist/providers/executor/routing.js +18 -0
- package/dist/providers/executor/types.d.ts +34 -0
- package/dist/providers/issue-tracker/adf.d.ts +31 -0
- package/dist/providers/issue-tracker/adf.js +181 -0
- package/dist/providers/issue-tracker/index.d.ts +5 -0
- package/dist/providers/issue-tracker/index.js +12 -0
- package/dist/providers/issue-tracker/jira-client.d.ts +41 -0
- package/dist/providers/issue-tracker/jira-client.js +151 -0
- package/dist/providers/issue-tracker/jira-events.d.ts +3 -0
- package/dist/providers/issue-tracker/jira-events.js +98 -0
- package/dist/providers/issue-tracker/jira.d.ts +116 -0
- package/dist/providers/issue-tracker/jira.js +502 -0
- package/dist/providers/issue-tracker/types.d.ts +269 -0
- package/dist/providers/issue-tracker/types.js +16 -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 +53 -2
- package/dist/providers/jobs/docker.js +307 -32
- 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 +24 -2
- package/dist/providers/jobs/kubernetes.js +153 -22
- package/dist/providers/jobs/service-state.d.ts +22 -0
- package/dist/providers/jobs/service-state.js +17 -0
- package/dist/providers/jobs/types.d.ts +18 -0
- package/dist/providers/llm/anthropic.d.ts +3 -3
- package/dist/providers/llm/anthropic.js +3 -5
- package/dist/providers/llm/bedrock.d.ts +3 -3
- package/dist/providers/llm/bedrock.js +3 -8
- package/dist/providers/llm/catalog-lookup.d.ts +10 -0
- package/dist/providers/llm/catalog-lookup.js +15 -0
- package/dist/providers/llm/catalog-shipped.d.ts +18 -0
- package/dist/providers/llm/catalog-shipped.js +197 -0
- package/dist/providers/llm/catalog-store.d.ts +58 -0
- package/dist/providers/llm/catalog-store.js +138 -0
- package/dist/providers/llm/catalog-types.d.ts +66 -0
- package/dist/providers/llm/catalog-types.js +64 -0
- package/dist/providers/llm/catalog.d.ts +61 -0
- package/dist/providers/llm/catalog.js +147 -0
- 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 +10 -12
- package/dist/providers/llm/claude-provider.js +15 -6
- package/dist/providers/llm/index.d.ts +9 -6
- package/dist/providers/llm/index.js +8 -5
- package/dist/providers/llm/openai.d.ts +14 -5
- package/dist/providers/llm/openai.js +24 -14
- package/dist/providers/llm/pricing-core.d.ts +5 -3
- package/dist/providers/llm/registration.js +8 -12
- package/dist/providers/llm/routing.d.ts +21 -11
- package/dist/providers/llm/routing.js +47 -13
- package/dist/providers/llm/types.d.ts +12 -0
- package/dist/providers/llm/types.js +8 -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 +226 -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 +568 -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 +309 -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 +78 -34
- package/dist/providers/vcs/github.d.ts +94 -3
- package/dist/providers/vcs/github.js +223 -17
- package/dist/providers/vcs/types.d.ts +48 -4
- package/dist/quickstart/index.d.ts +2 -0
- package/dist/quickstart/index.js +36 -8
- 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 +8 -2
- package/dist/viewer/api-schema.d.ts +2757 -0
- package/dist/viewer/api-schema.js +165 -0
- package/dist/viewer/build-schemas.d.ts +2 -0
- package/dist/viewer/build-schemas.js +18 -0
- package/dist/viewer/event-bus.d.ts +38 -0
- package/dist/viewer/event-bus.js +232 -0
- package/dist/viewer/graph.d.ts +40 -0
- package/dist/viewer/graph.js +243 -0
- package/dist/viewer/http.d.ts +30 -0
- package/dist/viewer/http.js +133 -0
- package/dist/viewer/run-detail.d.ts +4 -0
- package/dist/viewer/run-detail.js +61 -0
- package/dist/wardby-bin.js +11 -0
- package/docs/README.md +40 -0
- package/docs/agent-recipes.md +383 -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 +508 -0
- package/docs/coding-agent-setup.md +175 -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 +1068 -0
- package/docs/getting-started-gke.md +632 -0
- package/docs/getting-started-identity-provider.md +319 -0
- package/docs/getting-started.md +147 -0
- package/docs/jira-agents.md +649 -0
- package/docs/knowledge.md +387 -0
- package/docs/models.md +221 -0
- package/docs/observability.md +53 -0
- package/docs/release-verification.md +66 -0
- package/docs/security-deployment.md +667 -0
- package/docs/viewer-api.md +142 -0
- package/help/admin-viewer.md +39 -0
- package/help/agent-recipes.md +173 -0
- package/help/architecture-agent.md +189 -0
- package/help/builder-agent.md +80 -0
- package/help/code-review-agents.md +37 -0
- package/help/coding-packages.md +31 -0
- package/help/coding-services.md +71 -0
- package/help/cost-attribution.md +67 -0
- package/help/creating-agents.md +90 -0
- package/help/deploy-gke.md +45 -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/model-unavailable.md +63 -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 +32 -0
- package/help/github.md +48 -0
- package/help/identity-and-access.md +44 -0
- package/help/jira.md +135 -0
- package/help/knowledge.md +47 -0
- package/help/mcp.md +30 -0
- package/help/models.md +90 -0
- package/help/native-capabilities.md +30 -0
- package/help/observability.md +41 -0
- package/help/operating-agents.md +36 -0
- package/help/security.md +27 -0
- package/help/troubleshooting/budgets.md +32 -0
- package/help/troubleshooting/coding-workers.md +47 -0
- package/help/troubleshooting/repository-access.md +27 -0
- package/package.json +14 -3
- 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/migrations/20260930000000_jira_issue_projects/migration.sql +34 -0
- package/prisma/migrations/20261001000000_jira_phase2_allowlists/migration.sql +3 -0
- package/prisma/migrations/20261001010000_jira_link_types_allowlist/migration.sql +2 -0
- package/prisma/migrations/20261002000000_jira_coding_bridge/migration.sql +28 -0
- package/prisma/migrations/20261002010000_jira_issue_creation/migration.sql +25 -0
- package/prisma/migrations/20261003000000_issue_cost_attribution/migration.sql +56 -0
- package/prisma/migrations/20261003010000_coding_run_service_status/migration.sql +23 -0
- package/prisma/migrations/20261003020000_viewer_notify/migration.sql +54 -0
- package/prisma/migrations/20261003030000_viewer_notify_fixes/migration.sql +47 -0
- package/prisma/migrations/20261003040000_viewer_indexes/migration.sql +12 -0
- package/prisma/migrations/20261004000000_model_catalog/migration.sql +26 -0
- package/prisma/schema.prisma +663 -21
- package/dist/mcp/tools/models.d.ts +0 -8
- package/dist/mcp/tools/models.js +0 -15
- package/dist/providers/llm/pricing-anthropic.d.ts +0 -4
- package/dist/providers/llm/pricing-anthropic.js +0 -30
- package/dist/providers/llm/pricing-bedrock-claude.d.ts +0 -12
- package/dist/providers/llm/pricing-bedrock-claude.js +0 -37
- package/dist/providers/llm/pricing.d.ts +0 -30
- package/dist/providers/llm/pricing.js +0 -74
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
# Bring your own identity provider
|
|
2
|
+
|
|
3
|
+
This guide connects a deployed Wardby control plane to an existing OAuth/OIDC
|
|
4
|
+
identity provider for remote MCP access. Wardby calls this **delegating mode**:
|
|
5
|
+
your provider authenticates users and issues access tokens; Wardby acts only as
|
|
6
|
+
the protected resource that verifies those tokens and enforces their scopes.
|
|
7
|
+
|
|
8
|
+
Use this mode for a shared HTTPS deployment. Local stdio MCP created by
|
|
9
|
+
`wardby quickstart` trusts the local operator and does not use OAuth.
|
|
10
|
+
|
|
11
|
+
## What Wardby requires
|
|
12
|
+
|
|
13
|
+
Your provider must issue signed JWT access tokens with:
|
|
14
|
+
|
|
15
|
+
- `iss` exactly equal to the configured issuer;
|
|
16
|
+
- `aud` equal to Wardby's canonical MCP URI;
|
|
17
|
+
- a stable, nonblank `sub` identifying the user or workload;
|
|
18
|
+
- a future `exp` expiration; and
|
|
19
|
+
- Wardby permissions in either the `scope` or `scp` claim.
|
|
20
|
+
|
|
21
|
+
The signing key must be published at an HTTPS JWKS endpoint reachable from the
|
|
22
|
+
Wardby control plane. `email` and `roles` are retained when present, but tool
|
|
23
|
+
authorization is based on scopes, not those optional claims.
|
|
24
|
+
|
|
25
|
+
Wardby does not call the provider's user-info endpoint, exchange authorization
|
|
26
|
+
codes, refresh tokens, or administer users in delegating mode. The MCP client
|
|
27
|
+
performs the provider's authorization flow and sends the resulting bearer
|
|
28
|
+
access token to Wardby.
|
|
29
|
+
|
|
30
|
+
## 1. Choose the canonical resource
|
|
31
|
+
|
|
32
|
+
Use the final public HTTPS MCP URL as the resource identifier. For example:
|
|
33
|
+
|
|
34
|
+
```text
|
|
35
|
+
https://wardby.example.com/mcp
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
Use that exact value for all three of these:
|
|
39
|
+
|
|
40
|
+
- the IdP API, resource, or audience identifier;
|
|
41
|
+
- `MCP_CANONICAL_URI`; and
|
|
42
|
+
- `AUTH_AUDIENCE`.
|
|
43
|
+
|
|
44
|
+
Wardby refuses to start when the two environment values are not the same
|
|
45
|
+
normalized URL. A trailing slash on a non-root path is significant, so prefer
|
|
46
|
+
copying the canonical URI exactly rather than typing it separately in each
|
|
47
|
+
system.
|
|
48
|
+
|
|
49
|
+
## 2. Register Wardby as an API or resource
|
|
50
|
+
|
|
51
|
+
Create an API, resource server, or equivalent object in the identity provider.
|
|
52
|
+
Set its audience or identifier to the canonical URI and configure signed JWT
|
|
53
|
+
access tokens for that audience.
|
|
54
|
+
|
|
55
|
+
Create these scopes in the provider:
|
|
56
|
+
|
|
57
|
+
| Scope | Capability |
|
|
58
|
+
| --------------------- | ------------------------------------------------------------------ |
|
|
59
|
+
| `agents:read` | Inspect agents, models, runs, memory, and attached resources. |
|
|
60
|
+
| `agents:write` | Create and modify agents, schedules, and sub-agent relationships. |
|
|
61
|
+
| `runs:trigger` | Start agent runs. |
|
|
62
|
+
| `tools:write` | Create, attach, and manage tools. |
|
|
63
|
+
| `datastore:write` | Create, attach, query, and modify datastores. |
|
|
64
|
+
| `secrets:write` | Create, attach, rotate, and remove secret bindings. |
|
|
65
|
+
| `webhooks:write` | Create and manage webhook triggers. |
|
|
66
|
+
| `budget_groups:write` | Create and manage shared budget groups. |
|
|
67
|
+
| `packages:approve` | Approve coding agents' package allowlists. |
|
|
68
|
+
| `services:manage` | Create, update and delete coding-run service catalog entries. |
|
|
69
|
+
| `agents:admin` | Reassign agent ownership, BYO worker images; admins only. |
|
|
70
|
+
| `memory:write` | Set and delete agent memory entries. |
|
|
71
|
+
| `admin:view` | Read every owner's runs through the admin viewer API; admins only. |
|
|
72
|
+
| `models:admin` | Add, override, disable and reset model catalog entries. |
|
|
73
|
+
|
|
74
|
+
MCP clients discover this list from Wardby's protected-resource metadata and
|
|
75
|
+
may request every advertised scope. Define all fourteen in the provider even when
|
|
76
|
+
policy grants a particular client or user only a subset. Ensure granted scopes
|
|
77
|
+
are emitted in the access token's `scope` or `scp` claim; defining them only in
|
|
78
|
+
the provider UI is not sufficient.
|
|
79
|
+
|
|
80
|
+
`memory:write` was added after the first ten scopes. When you upgrade an
|
|
81
|
+
existing deployment, define it in the provider too. Otherwise, clients that
|
|
82
|
+
request every advertised scope may fail with `invalid_scope`.
|
|
83
|
+
|
|
84
|
+
`services:manage` was added after `memory:write`. When you upgrade an existing
|
|
85
|
+
deployment, define it in the provider too, for the same reason.
|
|
86
|
+
|
|
87
|
+
`admin:view` was added after `services:manage`. When you upgrade an existing
|
|
88
|
+
deployment, define it in the provider too and map it like `agents:admin`;
|
|
89
|
+
otherwise clients that request every advertised scope fail with `invalid_scope`.
|
|
90
|
+
|
|
91
|
+
`models:admin` was added after `admin:view`. When you upgrade an existing
|
|
92
|
+
deployment, define it in the provider too; otherwise clients that request
|
|
93
|
+
every advertised scope fail with `invalid_scope`.
|
|
94
|
+
|
|
95
|
+
### Wardby roles
|
|
96
|
+
|
|
97
|
+
A scope only delegates. `agents:admin`, `packages:approve`, `services:manage`,
|
|
98
|
+
`admin:view` and `models:admin` take effect only for a caller who also holds a Wardby role that grants them:
|
|
99
|
+
|
|
100
|
+
| Wardby role | Grants |
|
|
101
|
+
| ------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
102
|
+
| `admin` | `agents:admin` (`make_owner`, BYO `workerImageRef`), `packages:approve`, `services:manage`, `admin:view` (read every owner's runs, see [viewer-api.md](viewer-api.md)) and `models:admin` (model catalog) |
|
|
103
|
+
| `package-approver` | `packages:approve` (package allowlist and policy approval) |
|
|
104
|
+
| `service-manager` | `services:manage` (coding-run service catalog changes) |
|
|
105
|
+
| `model-manager` | `models:admin` (model catalog changes: `set_model`, `disable_model`, `reset_model`; see [models.md](models.md)) |
|
|
106
|
+
|
|
107
|
+
The roles come from a claim in the caller's **access token**, which you map to
|
|
108
|
+
Wardby roles:
|
|
109
|
+
|
|
110
|
+
```dotenv
|
|
111
|
+
AUTH_ROLE_CLAIM=groups # claim name or dotted path
|
|
112
|
+
AUTH_ROLE_MAP=wardby-admin=admin,wardby-packages=package-approver,wardby-services=service-manager,wardby-models=model-manager
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Wardby looks up `AUTH_ROLE_CLAIM` in two steps:
|
|
116
|
+
|
|
117
|
+
1. It first looks for a top-level claim with that exact name. This covers names
|
|
118
|
+
that themselves contain dots or slashes, such as
|
|
119
|
+
`https://wardby.example/roles`.
|
|
120
|
+
2. If there is none and the name contains `.`, it follows the name as a dotted
|
|
121
|
+
path through nested objects, such as `realm_access.roles`.
|
|
122
|
+
|
|
123
|
+
The claim can be a single string or an array of strings. Each value that
|
|
124
|
+
`AUTH_ROLE_MAP` lists gives the caller the mapped Wardby role:
|
|
125
|
+
|
|
126
|
+
- Values the map doesn't list are ignored.
|
|
127
|
+
- A missing claim, or one of any other type, gives the caller no roles.
|
|
128
|
+
- Matching is exact and **case-sensitive**. `Wardby-Admin` does not match
|
|
129
|
+
`wardby-admin`.
|
|
130
|
+
- A space-separated string counts as one value, not a list.
|
|
131
|
+
- Whitespace around `AUTH_ROLE_CLAIM`, and around entries in `AUTH_ROLE_MAP`,
|
|
132
|
+
is ignored.
|
|
133
|
+
|
|
134
|
+
**Map only IdP values that users can't create or assign to themselves.** Anyone
|
|
135
|
+
who can put a mapped value into their own token becomes an admin. Avoid group
|
|
136
|
+
names in providers that allow self-service groups or user-editable profile
|
|
137
|
+
attributes. Prefer application roles, or group IDs that only administrators
|
|
138
|
+
manage.
|
|
139
|
+
|
|
140
|
+
A dotted path splits on every `.`, so it can't address a Keycloak
|
|
141
|
+
`resource_access.<client-id>` whose client ID itself contains a dot. Use realm
|
|
142
|
+
roles in that case.
|
|
143
|
+
|
|
144
|
+
Wardby refuses to start if:
|
|
145
|
+
|
|
146
|
+
- only one of the two variables is set, or
|
|
147
|
+
- the map names an unknown Wardby role.
|
|
148
|
+
|
|
149
|
+
`AUTH_ROLE_CLAIM` and `AUTH_ROLE_MAP` are ignored in self-hosted mode, and
|
|
150
|
+
Wardby logs a warning at startup if they are set there.
|
|
151
|
+
|
|
152
|
+
With neither variable set, no caller has a role and the privileged operations
|
|
153
|
+
are refused. The claim is read on every request, from the bearer token validated
|
|
154
|
+
for Wardby's issuer and audience. Configure the provider so that only access
|
|
155
|
+
tokens carry that audience. Removing someone's group or role takes effect with
|
|
156
|
+
their next token.
|
|
157
|
+
|
|
158
|
+
Provider examples:
|
|
159
|
+
|
|
160
|
+
- **Okta** (custom authorization server): create four groups, `wardby-admin`,
|
|
161
|
+
`wardby-packages`, `wardby-services` and `wardby-models`. Add a `groups` claim
|
|
162
|
+
to the access token, filtered to those groups. Set `AUTH_ROLE_CLAIM=groups` and
|
|
163
|
+
`AUTH_ROLE_MAP=wardby-admin=admin,wardby-packages=package-approver,wardby-services=service-manager,wardby-models=model-manager`.
|
|
164
|
+
Optionally, add access policy rules so only those groups can obtain
|
|
165
|
+
`agents:admin`, `packages:approve`, `services:manage`, `admin:view` and `models:admin`.
|
|
166
|
+
- **FusionAuth:** create four application roles, `admin`,
|
|
167
|
+
`package-approver`, `service-manager` and `model-manager`. They appear in the
|
|
168
|
+
access token's top-level `roles` claim. Set `AUTH_ROLE_CLAIM=roles` and
|
|
169
|
+
`AUTH_ROLE_MAP=admin=admin,package-approver=package-approver,service-manager=service-manager,model-manager=model-manager`.
|
|
170
|
+
- **Keycloak:** create realm roles such as `wardby-admin`, `wardby-packages`,
|
|
171
|
+
`wardby-services` and `wardby-models`. Realm roles appear under
|
|
172
|
+
`realm_access.roles`. Set `AUTH_ROLE_CLAIM=realm_access.roles` and
|
|
173
|
+
`AUTH_ROLE_MAP=wardby-admin=admin,wardby-packages=package-approver,wardby-services=service-manager,wardby-models=model-manager`.
|
|
174
|
+
For client roles, use `resource_access.<client-id>.roles`. The
|
|
175
|
+
[local Keycloak harness](../deploy/keycloak-test/README.md) sets this up.
|
|
176
|
+
- **Auth0:** add the user's roles to the access token as a namespaced custom
|
|
177
|
+
claim from an Action, such as `https://wardby.example/roles`. Set
|
|
178
|
+
`AUTH_ROLE_CLAIM=https://wardby.example/roles` and an `AUTH_ROLE_MAP` naming
|
|
179
|
+
your Auth0 role names.
|
|
180
|
+
|
|
181
|
+
## 3. Register an MCP client
|
|
182
|
+
|
|
183
|
+
Most enterprise providers disable anonymous dynamic client registration. In
|
|
184
|
+
that case, register the MCP client manually as a **public/native application**:
|
|
185
|
+
|
|
186
|
+
- require authorization code flow with PKCE S256;
|
|
187
|
+
- do not issue or embed a client secret in a desktop client;
|
|
188
|
+
- register the client's exact loopback callback URI; and
|
|
189
|
+
- allow it to request the Wardby audience and scopes.
|
|
190
|
+
|
|
191
|
+
For Claude Code, a fixed callback port makes the redirect URI predictable:
|
|
192
|
+
|
|
193
|
+
```sh
|
|
194
|
+
claude mcp add --transport http wardby https://wardby.example.com/mcp \
|
|
195
|
+
--client-id YOUR_PUBLIC_CLIENT_ID \
|
|
196
|
+
--callback-port 8765
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
Register the callback URI shown by the client for port `8765` in the identity
|
|
200
|
+
provider. Other MCP clients need an equivalent way to supply a pre-registered
|
|
201
|
+
public client ID. If a client supports only dynamic registration, either enable
|
|
202
|
+
that feature with suitable provider-side restrictions or use Wardby's
|
|
203
|
+
self-hosted authentication mode.
|
|
204
|
+
|
|
205
|
+
## 4. Configure Wardby
|
|
206
|
+
|
|
207
|
+
Inject these settings through the deployment's secret/configuration mechanism:
|
|
208
|
+
|
|
209
|
+
```dotenv
|
|
210
|
+
MCP_TRANSPORT=http
|
|
211
|
+
MCP_HTTP_BIND=0.0.0.0:8080
|
|
212
|
+
MCP_CANONICAL_URI=https://wardby.example.com/mcp
|
|
213
|
+
|
|
214
|
+
AUTH_PROVIDER=delegating
|
|
215
|
+
AUTH_ISSUER=https://identity.example.com/your-tenant/
|
|
216
|
+
AUTH_JWKS_URI=https://identity.example.com/your-tenant/.well-known/jwks.json
|
|
217
|
+
AUTH_AUDIENCE=https://wardby.example.com/mcp
|
|
218
|
+
# Optional: Wardby roles (see "Wardby roles" above).
|
|
219
|
+
AUTH_ROLE_CLAIM=groups
|
|
220
|
+
AUTH_ROLE_MAP=wardby-admin=admin,wardby-packages=package-approver,wardby-services=service-manager,wardby-models=model-manager
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Copy `AUTH_ISSUER` exactly from the token's `iss` claim or the provider's
|
|
224
|
+
metadata. Copy `AUTH_JWKS_URI` from the provider's metadata rather than
|
|
225
|
+
guessing its path. Keep the application port private behind the TLS-terminating
|
|
226
|
+
proxy or load balancer; only the public HTTPS hostname should be reachable by
|
|
227
|
+
MCP clients.
|
|
228
|
+
|
|
229
|
+
`AUTH_SIGNING_KEY`, `AUTH_CREDENTIAL_HASH_KEY`, local login keys, and
|
|
230
|
+
`wardby auth user` commands belong to self-hosted mode and are not used here.
|
|
231
|
+
`SECRET_APP_KEY` remains required because it encrypts Wardby's stored
|
|
232
|
+
application secrets.
|
|
233
|
+
|
|
234
|
+
For the portable container deployment, place these values in the protected
|
|
235
|
+
production environment described by
|
|
236
|
+
[the production boundary](../deploy/production/README.md). The GKE deployment
|
|
237
|
+
helper uses self-hosted authentication by default; replace the control-plane
|
|
238
|
+
secret's auth settings with the delegated values, including `AUTH_ROLE_CLAIM`
|
|
239
|
+
and `AUTH_ROLE_MAP`, before rollout, and preserve
|
|
240
|
+
that customization in your deployment automation so a later `up.sh` does not
|
|
241
|
+
restore self-hosted mode.
|
|
242
|
+
|
|
243
|
+
## 5. Verify discovery
|
|
244
|
+
|
|
245
|
+
After deploying, request Wardby's protected-resource metadata:
|
|
246
|
+
|
|
247
|
+
```sh
|
|
248
|
+
curl --fail --silent --show-error \
|
|
249
|
+
https://wardby.example.com/.well-known/oauth-protected-resource/mcp | jq
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
Confirm that:
|
|
253
|
+
|
|
254
|
+
- `resource` is the canonical MCP URI;
|
|
255
|
+
- `authorization_servers` contains the external issuer; and
|
|
256
|
+
- `scopes_supported` contains all fourteen Wardby scopes.
|
|
257
|
+
|
|
258
|
+
An unauthenticated MCP request must return `401` with a `WWW-Authenticate`
|
|
259
|
+
challenge pointing back to that metadata document.
|
|
260
|
+
|
|
261
|
+
## 6. Verify a provider token
|
|
262
|
+
|
|
263
|
+
Obtain an access token through the registered MCP client or your provider's
|
|
264
|
+
approved test flow. Inspect its claims locally; do not paste a production token
|
|
265
|
+
into a third-party JWT debugger:
|
|
266
|
+
|
|
267
|
+
```sh
|
|
268
|
+
TOKEN='REPLACE_WITH_SHORT_LIVED_TEST_TOKEN' node -e '
|
|
269
|
+
const token = process.env.TOKEN;
|
|
270
|
+
const payload = JSON.parse(Buffer.from(token.split(".")[1], "base64url"));
|
|
271
|
+
console.log(JSON.stringify({
|
|
272
|
+
iss: payload.iss,
|
|
273
|
+
aud: payload.aud,
|
|
274
|
+
sub: payload.sub,
|
|
275
|
+
exp: payload.exp,
|
|
276
|
+
scope: payload.scope ?? payload.scp
|
|
277
|
+
}, null, 2));
|
|
278
|
+
'
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Check that the issuer and audience match the configured values and that the
|
|
282
|
+
token carries the scopes needed by the requested Wardby operation. Then connect
|
|
283
|
+
the MCP client and list agents. Wardby creates a local `Principal` for the
|
|
284
|
+
validated `sub` on first use; users remain managed entirely in the external
|
|
285
|
+
provider.
|
|
286
|
+
|
|
287
|
+
## 7. Rehearse locally with Keycloak
|
|
288
|
+
|
|
289
|
+
Before changing a production provider, exercise the complete delegated flow
|
|
290
|
+
with the repository's disposable Keycloak harness:
|
|
291
|
+
|
|
292
|
+
```sh
|
|
293
|
+
docker compose -f deploy/keycloak-test/docker-compose.yml up -d
|
|
294
|
+
./deploy/keycloak-test/setup-realm.sh
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
The script recreates a local realm, API audience, all Wardby scopes, a machine
|
|
298
|
+
client, and a public PKCE client, then prints the exact environment and Claude
|
|
299
|
+
Code command to use. It uses development HTTP and hardcoded credentials; never
|
|
300
|
+
expose it or reuse it for production. See
|
|
301
|
+
[the harness documentation](../deploy/keycloak-test/README.md) for the full
|
|
302
|
+
test procedure and cleanup.
|
|
303
|
+
|
|
304
|
+
## Troubleshooting
|
|
305
|
+
|
|
306
|
+
| Symptom | Most likely cause |
|
|
307
|
+
| --------------------------------------------- | ------------------------------------------------------------------------------------ |
|
|
308
|
+
| Authorization fails with `invalid_scope` | One or more advertised Wardby scopes do not exist in the provider. |
|
|
309
|
+
| Wardby returns `401 Invalid token` | Wrong issuer/audience, expired token, missing `sub`, unknown key, or bad signature. |
|
|
310
|
+
| Wardby returns `403 insufficient_scope` | The token is valid but `scope`/`scp` lacks the operation's required permission. |
|
|
311
|
+
| Client registration returns `403` | Anonymous dynamic registration is disabled; pre-register a public client. |
|
|
312
|
+
| Browser flow rejects the redirect | The provider's registered loopback callback does not exactly match the client. |
|
|
313
|
+
| Wardby cannot validate any newly issued token | The control plane cannot reach the JWKS URI, or provider key rotation is incomplete. |
|
|
314
|
+
| One person appears as multiple principals | The provider is emitting different or pairwise `sub` values for different clients. |
|
|
315
|
+
|
|
316
|
+
Keep JWKS access on the deployment egress allowlist, use short-lived access
|
|
317
|
+
tokens, map Wardby roles only to trusted administrators, and monitor
|
|
318
|
+
authentication failures without logging bearer tokens. Review the broader
|
|
319
|
+
[security deployment guide](security-deployment.md) before production use.
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
# Getting started
|
|
2
|
+
|
|
3
|
+
This guide gets a local Wardby control plane running without installing
|
|
4
|
+
PostgreSQL or cloning the Wardby repository. Wardby keeps its database and
|
|
5
|
+
configuration isolated from the application in which you run it.
|
|
6
|
+
|
|
7
|
+
For a shared deployment with isolated Kubernetes coding workers, use the
|
|
8
|
+
[GKE getting-started guide](getting-started-gke.md).
|
|
9
|
+
|
|
10
|
+
## Requirements
|
|
11
|
+
|
|
12
|
+
- Node.js 24 or newer.
|
|
13
|
+
- Docker with Docker Compose v2.
|
|
14
|
+
- An OpenAI or Anthropic API key.
|
|
15
|
+
- Optional: Codex or Claude Code, if you want `quickstart` to register Wardby
|
|
16
|
+
as an MCP server.
|
|
17
|
+
|
|
18
|
+
## Run quickstart
|
|
19
|
+
|
|
20
|
+
From the repository where you want to use Wardby:
|
|
21
|
+
|
|
22
|
+
```sh
|
|
23
|
+
npx --yes @wardby/cli@latest quickstart
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The guided command:
|
|
27
|
+
|
|
28
|
+
1. checks Node, Docker, Docker Compose, and the Docker daemon;
|
|
29
|
+
2. creates a private `.wardby/.env` and project state;
|
|
30
|
+
3. adds `.wardby/` to the repository's `.gitignore`;
|
|
31
|
+
4. starts PostgreSQL 16 in Docker on the first available local port beginning
|
|
32
|
+
at `55432`;
|
|
33
|
+
5. applies Wardby's packaged Prisma migrations;
|
|
34
|
+
6. creates the `hello-wardby` sample agent with a `$1` maximum run budget;
|
|
35
|
+
7. asks before making the billed model request; and
|
|
36
|
+
8. optionally registers the local stdio MCP server with Codex, Claude Code, or
|
|
37
|
+
both.
|
|
38
|
+
|
|
39
|
+
Provider credentials and `SECRET_APP_KEY` are written with owner-only file
|
|
40
|
+
permissions. They are not printed, passed as command-line arguments, or added
|
|
41
|
+
to the application's own `.env` files.
|
|
42
|
+
|
|
43
|
+
## Unattended setup
|
|
44
|
+
|
|
45
|
+
Automation must explicitly accept the billed demo with `--yes`:
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
OPENAI_API_KEY="..." npx --yes @wardby/cli@latest quickstart \
|
|
49
|
+
--provider openai \
|
|
50
|
+
--model gpt-5.6-luna \
|
|
51
|
+
--budget 1 \
|
|
52
|
+
--client codex \
|
|
53
|
+
--non-interactive \
|
|
54
|
+
--yes
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
Use `--skip-demo` to prepare the database without making a provider request.
|
|
58
|
+
This is useful for CI and package verification:
|
|
59
|
+
|
|
60
|
+
```sh
|
|
61
|
+
npx --yes @wardby/cli@latest quickstart \
|
|
62
|
+
--provider openai \
|
|
63
|
+
--non-interactive \
|
|
64
|
+
--skip-demo
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Operate the local installation
|
|
68
|
+
|
|
69
|
+
Run these from the same project directory. Set `WARDBY_PROJECT_DIR` to that
|
|
70
|
+
directory when invoking Wardby from somewhere else.
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
npx --yes @wardby/cli@latest doctor
|
|
74
|
+
npx --yes @wardby/cli@latest status
|
|
75
|
+
npx --yes @wardby/cli@latest logs --tail 100
|
|
76
|
+
npx --yes @wardby/cli@latest down
|
|
77
|
+
```
|
|
78
|
+
|
|
79
|
+
`down` stops PostgreSQL but preserves its named volume. Removing the database
|
|
80
|
+
is intentionally explicit:
|
|
81
|
+
|
|
82
|
+
```sh
|
|
83
|
+
npx --yes @wardby/cli@latest down --volumes
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
`quickstart` is safe to rerun. It reuses the project identity, port, secrets,
|
|
87
|
+
and database volume, reapplies idempotent migrations, and updates the sample
|
|
88
|
+
agent instead of creating duplicates.
|
|
89
|
+
|
|
90
|
+
## MCP configuration
|
|
91
|
+
|
|
92
|
+
Passing `--client codex`, `--client claude`, or `--client both` lets quickstart
|
|
93
|
+
register Wardby after showing the choice interactively. The generated stdio
|
|
94
|
+
entry launches the same package version and sets `WARDBY_PROJECT_DIR`, so the
|
|
95
|
+
MCP process finds this project's private Wardby configuration regardless of the
|
|
96
|
+
client's current working directory.
|
|
97
|
+
|
|
98
|
+
After connecting, try:
|
|
99
|
+
|
|
100
|
+
> List my Wardby agents, show the latest run and its actual cost, then create a
|
|
101
|
+
> new agent with a maximum budget of $0.50. Do not run it yet.
|
|
102
|
+
|
|
103
|
+
### Reasoning effort
|
|
104
|
+
|
|
105
|
+
A native agent can set `effort` (`low`, `medium`, `high`, `xhigh`, or `max`)
|
|
106
|
+
through `create_agent`, `update_agent`, or `wardby agent create --effort`. It is
|
|
107
|
+
sent on every model call and trades depth of reasoning against latency and
|
|
108
|
+
output-token cost; lower levels are faster and cheaper per turn. Leave it unset
|
|
109
|
+
to use the provider's default. Wardby rejects a level the agent's model does not
|
|
110
|
+
accept, including when you later change the model (clear it with
|
|
111
|
+
`effort: null`). Effort currently applies to direct Anthropic API models that
|
|
112
|
+
support it; OpenAI and Bedrock models accept no effort setting, and coding
|
|
113
|
+
agents do not use it.
|
|
114
|
+
|
|
115
|
+
## Coding agents
|
|
116
|
+
|
|
117
|
+
The first-run demo proves native model routing, budget admission, persistence,
|
|
118
|
+
and accounting. It deliberately does not install a GitHub App or build worker
|
|
119
|
+
images.
|
|
120
|
+
|
|
121
|
+
Coding agents require the stronger boundary described in
|
|
122
|
+
[Coding-agent setup](coding-agent-setup.md): a dedicated GitHub App, immutable
|
|
123
|
+
worker image, trusted coding proxy, and either Docker or Kubernetes as the job
|
|
124
|
+
launcher. Run `wardby coding preflight` before enabling a production repository.
|
|
125
|
+
|
|
126
|
+
## Your first agents
|
|
127
|
+
|
|
128
|
+
[Agent recipes](agent-recipes.md) gives two complete, copyable setups: an
|
|
129
|
+
architecture keeper and a builder per language. They go beyond the quickstart,
|
|
130
|
+
which runs native agents only. They require Wardby 0.4.0 or later. They need the
|
|
131
|
+
GitHub App, worker image, and job launcher from
|
|
132
|
+
[Coding-agent setup](coding-agent-setup.md). Their event triggers need GitHub to
|
|
133
|
+
reach your instance at a public HTTPS URL.
|
|
134
|
+
|
|
135
|
+
The assistant the quickstart connected can walk you through either recipe. Ask it
|
|
136
|
+
"Set up the Wardby architecture keeper for this repository" or "Set up a Wardby
|
|
137
|
+
builder for this repository"; it follows the `agent-recipes` help article.
|
|
138
|
+
|
|
139
|
+
## Next steps
|
|
140
|
+
|
|
141
|
+
- [Agent recipes](agent-recipes.md)
|
|
142
|
+
- [Runtime architecture](architecture-runtime.md)
|
|
143
|
+
- [Coding-agent setup](coding-agent-setup.md)
|
|
144
|
+
- [Bring your own identity provider](getting-started-identity-provider.md)
|
|
145
|
+
- [Observability](observability.md)
|
|
146
|
+
- [GKE deployment](getting-started-gke.md)
|
|
147
|
+
- [Security deployment guide](security-deployment.md)
|