@wardby/cli 0.5.2 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env.example +33 -0
- package/README.md +25 -14
- package/dist/claude-coding-worker/context.d.ts +22 -0
- package/dist/claude-coding-worker/context.js +92 -0
- package/dist/claude-coding-worker/driver.d.ts +7 -1
- package/dist/claude-coding-worker/driver.js +38 -5
- package/dist/claude-coding-worker/sdk.js +13 -4
- package/dist/cli-help.d.ts +1 -1
- package/dist/cli-help.js +5 -2
- package/dist/cli-native-mode.d.ts +9 -0
- package/dist/cli-native-mode.js +20 -0
- package/dist/cli.d.ts +3 -1
- package/dist/cli.js +141 -5
- package/dist/coding/claude-context.d.ts +45 -0
- package/dist/coding/claude-context.js +434 -0
- package/dist/coding/local-git.js +9 -1
- package/dist/coding/profile.d.ts +12 -0
- package/dist/coding/profile.js +6 -0
- package/dist/coding/protocol.d.ts +104 -0
- package/dist/coding/protocol.js +87 -3
- package/dist/coding/registry/pypi.d.ts +25 -1
- package/dist/coding/registry/pypi.js +140 -16
- package/dist/coding/registry/types.d.ts +17 -3
- package/dist/coding-worker/artifact.d.ts +8 -0
- package/dist/coding-worker/artifact.js +2 -2
- package/dist/coding-worker/driver.js +2 -0
- package/dist/coding-worker/sdk.d.ts +6 -0
- package/dist/coding-worker/sdk.js +1 -0
- package/dist/coding-worker/skills.d.ts +23 -0
- package/dist/coding-worker/skills.js +117 -0
- package/dist/coding-worker/types.d.ts +2 -0
- package/dist/config/github-allowed-accounts.d.ts +15 -0
- package/dist/config/github-allowed-accounts.js +36 -0
- package/dist/config/low-power.d.ts +12 -0
- package/dist/config/low-power.js +18 -0
- package/dist/config/mobile.d.ts +12 -0
- package/dist/config/mobile.js +18 -0
- package/dist/config/providers.d.ts +56 -2
- package/dist/config/providers.js +92 -6
- package/dist/core/db.d.ts +16 -6
- package/dist/core/db.js +12 -10
- package/dist/core/dispatch.d.ts +11 -0
- package/dist/core/dispatch.js +36 -1
- package/dist/core/engine-native.js +9 -5
- package/dist/core/host-events.d.ts +49 -3
- package/dist/core/host-events.js +289 -15
- package/dist/core/http-runtime.js +13 -6
- package/dist/core/issue-bridge.js +42 -2
- package/dist/core/issue-events.js +12 -1
- package/dist/core/issue-status.js +14 -3
- package/dist/core/merge-order-check.d.ts +129 -0
- package/dist/core/merge-order-check.js +336 -0
- package/dist/core/notification-dispatcher.d.ts +70 -0
- package/dist/core/notification-dispatcher.js +368 -0
- package/dist/core/notification-templates.d.ts +25 -0
- package/dist/core/notification-templates.js +105 -0
- package/dist/core/notifications.d.ts +10 -0
- package/dist/core/notifications.js +38 -0
- package/dist/core/pg-auth.d.ts +22 -0
- package/dist/core/pg-auth.js +152 -0
- package/dist/core/power-composition.d.ts +16 -0
- package/dist/core/power-composition.js +37 -0
- package/dist/core/power-idle.d.ts +14 -0
- package/dist/core/power-idle.js +30 -0
- package/dist/core/power.d.ts +71 -0
- package/dist/core/power.js +202 -0
- package/dist/core/reconciler.d.ts +4 -2
- package/dist/core/reconciler.js +29 -5
- package/dist/core/related-pull-requests.d.ts +48 -4
- package/dist/core/related-pull-requests.js +113 -11
- package/dist/core/repo-access.d.ts +15 -0
- package/dist/core/repo-access.js +66 -0
- package/dist/core/review-fix.d.ts +37 -0
- package/dist/core/review-fix.js +207 -6
- package/dist/core/review-host-tools.d.ts +20 -0
- package/dist/core/review-host-tools.js +58 -2
- package/dist/core/runner.d.ts +336 -3
- package/dist/core/runner.js +894 -317
- package/dist/core/secret-broker-config.d.ts +103 -0
- package/dist/core/secret-broker-config.js +112 -0
- package/dist/core/secrets.d.ts +39 -4
- package/dist/core/secrets.js +148 -40
- package/dist/core/workflow-event-recorder.d.ts +14 -0
- package/dist/core/workflow-event-recorder.js +120 -0
- package/dist/core/workflow-events.d.ts +82 -0
- package/dist/core/workflow-events.js +44 -0
- package/dist/core/workflow-run-events.d.ts +16 -0
- package/dist/core/workflow-run-events.js +40 -0
- package/dist/generated/prisma/browser.d.ts +58 -0
- package/dist/generated/prisma/client.d.ts +58 -0
- package/dist/generated/prisma/commonInputTypes.d.ts +150 -0
- package/dist/generated/prisma/enums.d.ts +27 -0
- package/dist/generated/prisma/enums.js +23 -0
- package/dist/generated/prisma/internal/class.d.ts +88 -0
- package/dist/generated/prisma/internal/class.js +4 -4
- package/dist/generated/prisma/internal/prismaNamespace.d.ts +772 -1
- package/dist/generated/prisma/internal/prismaNamespace.js +135 -4
- package/dist/generated/prisma/internal/prismaNamespaceBrowser.d.ts +139 -0
- package/dist/generated/prisma/internal/prismaNamespaceBrowser.js +135 -4
- package/dist/generated/prisma/models/Agent.d.ts +360 -1
- package/dist/generated/prisma/models/CodingAgentProfile.d.ts +73 -1
- package/dist/generated/prisma/models/CodingRun.d.ts +205 -1
- package/dist/generated/prisma/models/DeferredReview.d.ts +78 -1
- package/dist/generated/prisma/models/NativeGatewayCall.d.ts +1675 -0
- package/dist/generated/prisma/models/NativeGatewayCall.js +1 -0
- package/dist/generated/prisma/models/NativeGatewaySession.d.ts +1517 -0
- package/dist/generated/prisma/models/NativeGatewaySession.js +1 -0
- package/dist/generated/prisma/models/NativeWarmWorker.d.ts +1296 -0
- package/dist/generated/prisma/models/NativeWarmWorker.js +1 -0
- package/dist/generated/prisma/models/NotificationChannel.d.ts +1543 -0
- package/dist/generated/prisma/models/NotificationChannel.js +1 -0
- package/dist/generated/prisma/models/NotificationDelivery.d.ts +1502 -0
- package/dist/generated/prisma/models/NotificationDelivery.js +1 -0
- package/dist/generated/prisma/models/NotificationThread.d.ts +1090 -0
- package/dist/generated/prisma/models/NotificationThread.js +1 -0
- package/dist/generated/prisma/models/Run.d.ts +826 -1
- package/dist/generated/prisma/models/RunHostCheck.d.ts +36 -1
- package/dist/generated/prisma/models/Secret.d.ts +37 -1
- package/dist/generated/prisma/models/SecretBrokerChange.d.ts +1101 -0
- package/dist/generated/prisma/models/SecretBrokerChange.js +1 -0
- package/dist/generated/prisma/models/WorkflowEvent.d.ts +1422 -0
- package/dist/generated/prisma/models/WorkflowEvent.js +1 -0
- package/dist/generated/prisma/models.d.ts +8 -0
- package/dist/help/build.js +4 -2
- package/dist/help/catalog.d.ts +1 -1
- package/dist/help/catalog.js +31 -6
- package/dist/help-index.json +1492 -113
- package/dist/import/create.js +17 -0
- package/dist/import/neutral-schema.d.ts +6 -2
- package/dist/import/neutral-schema.js +2 -0
- package/dist/mcp/auth/access.d.ts +1 -0
- package/dist/mcp/auth/ownership.d.ts +1 -1
- package/dist/mcp/auth/repo-authorization.js +14 -0
- package/dist/mcp/auth/resource-server.d.ts +2 -1
- package/dist/mcp/auth/resource-server.js +7 -2
- package/dist/mcp/auth/self-hosted/browser.d.ts +1 -1
- package/dist/mcp/auth/self-hosted/browser.js +19 -6
- package/dist/mcp/context.d.ts +6 -0
- package/dist/mcp/host-events/github-ingress.d.ts +23 -1
- package/dist/mcp/host-events/github-ingress.js +68 -0
- package/dist/mcp/index.d.ts +13 -0
- package/dist/mcp/index.js +59 -10
- package/dist/mcp/tools/agents.js +83 -12
- package/dist/mcp/tools/notification-channels.d.ts +2 -0
- package/dist/mcp/tools/notification-channels.js +293 -0
- package/dist/mcp/tools/power.d.ts +2 -0
- package/dist/mcp/tools/power.js +77 -0
- package/dist/mcp/tools/runs.d.ts +0 -6
- package/dist/mcp/tools/runs.js +7 -2
- package/dist/mcp/tools/secret-broker-compat.d.ts +12 -0
- package/dist/mcp/tools/secret-broker-compat.js +23 -0
- package/dist/mcp/tools/secret-elicitation-form.d.ts +22 -2
- package/dist/mcp/tools/secret-elicitation-form.js +200 -10
- package/dist/mcp/tools/secret-elicitation-server.js +8 -1
- package/dist/mcp/tools/secret-elicitation.d.ts +38 -3
- package/dist/mcp/tools/secret-elicitation.js +110 -12
- package/dist/mcp/tools/secrets.js +184 -7
- package/dist/mcp/tools/tools.d.ts +1 -1
- package/dist/mcp/tools/tools.js +22 -2
- package/dist/native-worker/composition.d.ts +23 -0
- package/dist/native-worker/composition.js +77 -0
- package/dist/native-worker/docker-isolation.d.ts +65 -0
- package/dist/native-worker/docker-isolation.js +183 -0
- package/dist/native-worker/docker-launcher.d.ts +74 -0
- package/dist/native-worker/docker-launcher.js +237 -0
- package/dist/native-worker/gateway-server.d.ts +39 -0
- package/dist/native-worker/gateway-server.js +315 -0
- package/dist/native-worker/gateway.d.ts +44 -0
- package/dist/native-worker/gateway.js +197 -0
- package/dist/native-worker/http-server.d.ts +22 -0
- package/dist/native-worker/http-server.js +109 -0
- package/dist/native-worker/http-transport.d.ts +17 -0
- package/dist/native-worker/http-transport.js +88 -0
- package/dist/native-worker/kubernetes-isolation.d.ts +90 -0
- package/dist/native-worker/kubernetes-isolation.js +218 -0
- package/dist/native-worker/kubernetes-launcher.d.ts +102 -0
- package/dist/native-worker/kubernetes-launcher.js +335 -0
- package/dist/native-worker/launch.d.ts +45 -0
- package/dist/native-worker/launch.js +44 -0
- package/dist/native-worker/ledger.d.ts +109 -0
- package/dist/native-worker/ledger.js +192 -0
- package/dist/native-worker/loopback.d.ts +12 -0
- package/dist/native-worker/loopback.js +49 -0
- package/dist/native-worker/main.d.ts +7 -0
- package/dist/native-worker/main.js +74 -0
- package/dist/native-worker/protocol.d.ts +744 -0
- package/dist/native-worker/protocol.js +200 -0
- package/dist/native-worker/sandbox-executor.d.ts +68 -0
- package/dist/native-worker/sandbox-executor.js +210 -0
- package/dist/native-worker/stdio.d.ts +29 -0
- package/dist/native-worker/stdio.js +188 -0
- package/dist/native-worker/warm-delivery.d.ts +16 -0
- package/dist/native-worker/warm-delivery.js +33 -0
- package/dist/native-worker/warm-pool-ledger.d.ts +39 -0
- package/dist/native-worker/warm-pool-ledger.js +73 -0
- package/dist/native-worker/warm-pool.d.ts +107 -0
- package/dist/native-worker/warm-pool.js +283 -0
- package/dist/native-worker/worker.d.ts +17 -0
- package/dist/native-worker/worker.js +115 -0
- package/dist/providers/auth/authorization-server.d.ts +3 -0
- package/dist/providers/auth/index.js +2 -0
- package/dist/providers/auth/self-hosted.d.ts +13 -1
- package/dist/providers/auth/self-hosted.js +54 -4
- package/dist/providers/chat/fake.d.ts +46 -0
- package/dist/providers/chat/fake.js +39 -0
- package/dist/providers/chat/index.d.ts +4 -0
- package/dist/providers/chat/index.js +8 -0
- package/dist/providers/chat/slack.d.ts +37 -0
- package/dist/providers/chat/slack.js +105 -0
- package/dist/providers/chat/types.d.ts +42 -0
- package/dist/providers/chat/types.js +19 -0
- package/dist/providers/coding-proxy/mock-upstream.d.ts +33 -0
- package/dist/providers/coding-proxy/mock-upstream.js +116 -0
- package/dist/providers/coding-proxy/registry/prisma-store.d.ts +3 -0
- package/dist/providers/coding-proxy/registry/prisma-store.js +17 -0
- package/dist/providers/coding-proxy/registry/service.d.ts +4 -0
- package/dist/providers/coding-proxy/registry/service.js +20 -3
- package/dist/providers/coding-proxy/registry/store.d.ts +18 -1
- package/dist/providers/coding-proxy/registry/store.js +33 -0
- package/dist/providers/coding-proxy/runtime.js +12 -1
- package/dist/providers/coding-proxy/types.d.ts +2 -0
- package/dist/providers/engine/types.d.ts +19 -0
- package/dist/providers/engine/types.js +22 -0
- package/dist/providers/executor/composition.d.ts +24 -1
- package/dist/providers/executor/composition.js +39 -6
- package/dist/providers/executor/container.d.ts +24 -1
- package/dist/providers/executor/container.js +101 -11
- package/dist/providers/executor/dbos.d.ts +42 -0
- package/dist/providers/executor/dbos.js +118 -12
- package/dist/providers/executor/deferred.d.ts +56 -0
- package/dist/providers/executor/deferred.js +119 -0
- package/dist/providers/executor/routing.d.ts +37 -10
- package/dist/providers/executor/routing.js +73 -32
- package/dist/providers/executor/types.d.ts +12 -0
- package/dist/providers/jobs/docker.js +3 -3
- package/dist/providers/jobs/fake-kubernetes-api.d.ts +21 -2
- package/dist/providers/jobs/fake-kubernetes-api.js +42 -1
- package/dist/providers/jobs/kubernetes-api.d.ts +17 -1
- package/dist/providers/jobs/kubernetes-api.js +7 -0
- package/dist/providers/jobs/kubernetes-client.d.ts +10 -1
- package/dist/providers/jobs/kubernetes-client.js +52 -3
- package/dist/providers/jobs/kubernetes-dry-run-fixture.d.ts +6 -1
- package/dist/providers/jobs/kubernetes-dry-run-fixture.js +6 -3
- package/dist/providers/jobs/kubernetes-isolation.d.ts +16 -1
- package/dist/providers/jobs/kubernetes-isolation.js +58 -5
- package/dist/providers/jobs/kubernetes-platform.d.ts +4 -1
- package/dist/providers/jobs/kubernetes-platform.js +38 -1
- package/dist/providers/jobs/kubernetes-preflight.d.ts +2 -1
- package/dist/providers/jobs/kubernetes-preflight.js +4 -2
- package/dist/providers/jobs/kubernetes.d.ts +56 -7
- package/dist/providers/jobs/kubernetes.js +117 -36
- package/dist/providers/jobs/metadata-probes.d.ts +11 -0
- package/dist/providers/jobs/metadata-probes.js +13 -0
- package/dist/providers/jobs/types.d.ts +9 -0
- package/dist/providers/llm/openai.js +0 -1
- package/dist/providers/review-host/github.d.ts +11 -1
- package/dist/providers/review-host/github.js +50 -0
- package/dist/providers/review-host/types.d.ts +23 -0
- package/dist/providers/vcs/github.d.ts +32 -6
- package/dist/providers/vcs/github.js +74 -16
- package/dist/quickstart/coding-db.js +14 -2
- package/dist/quickstart/coding-doctor.d.ts +3 -0
- package/dist/quickstart/coding-doctor.js +3 -0
- package/dist/quickstart/coding-images.d.ts +9 -0
- package/dist/quickstart/coding-images.js +39 -0
- package/dist/quickstart/coding-seed.d.ts +20 -1
- package/dist/quickstart/coding-seed.js +96 -7
- package/dist/quickstart/coding.d.ts +2 -0
- package/dist/quickstart/coding.js +75 -3
- package/dist/quickstart/config.d.ts +2 -0
- package/dist/quickstart/config.js +4 -0
- package/dist/quickstart/images.d.ts +13 -0
- package/dist/quickstart/images.js +80 -12
- package/dist/quickstart/index.d.ts +0 -2
- package/dist/quickstart/index.js +10 -14
- package/dist/quickstart/manifests.d.ts +56 -0
- package/dist/quickstart/manifests.js +523 -0
- package/dist/quickstart/python-detect.d.ts +10 -0
- package/dist/quickstart/python-detect.js +32 -0
- package/dist/quickstart/repo-packages.d.ts +10 -0
- package/dist/quickstart/repo-packages.js +132 -0
- package/dist/quickstart/reviewer-prompt.d.ts +12 -0
- package/dist/quickstart/reviewer-prompt.js +84 -0
- package/dist/quickstart/scenarios.d.ts +19 -0
- package/dist/quickstart/scenarios.js +28 -0
- package/dist/quickstart/sync-reviewer-prompt.d.ts +1 -0
- package/dist/quickstart/sync-reviewer-prompt.js +10 -0
- package/dist/quickstart-images.json +1 -1
- package/dist/sandbox/brokered-fetch.d.ts +23 -0
- package/dist/sandbox/brokered-fetch.js +37 -0
- package/dist/sandbox/host-functions.d.ts +34 -0
- package/dist/sandbox/host-functions.js +144 -80
- package/dist/sandbox/prelude.js +7 -1
- package/dist/sandbox/run-in-sandbox.d.ts +19 -0
- package/dist/sandbox/run-in-sandbox.js +28 -10
- package/dist/sandbox/safe-fetch.d.ts +2 -0
- package/dist/sandbox/safe-fetch.js +3 -1
- package/dist/sandbox/secret-broker-sigv4.d.ts +2 -0
- package/dist/sandbox/secret-broker-sigv4.js +49 -0
- package/dist/sandbox/secret-broker.d.ts +34 -0
- package/dist/sandbox/secret-broker.js +162 -0
- package/dist/sandbox/user-tool.d.ts +14 -0
- package/dist/sandbox/user-tool.js +32 -0
- package/dist/serve.js +18 -0
- package/dist/viewer/api-schema.d.ts +214 -18
- package/dist/viewer/api-schema.js +22 -0
- package/dist/viewer/build-schemas.js +4 -1
- package/dist/viewer/event-bus.d.ts +6 -0
- package/dist/viewer/event-bus.js +16 -7
- package/dist/viewer/graph.d.ts +5 -2
- package/dist/viewer/graph.js +7 -2
- package/dist/viewer/http.d.ts +0 -1
- package/dist/viewer/http.js +2 -2
- package/dist/viewer/infra.js +25 -2
- package/dist/viewer/limits.d.ts +4 -0
- package/dist/viewer/limits.js +4 -0
- package/dist/viewer/openapi.d.ts +15 -0
- package/dist/viewer/openapi.js +172 -0
- package/docs/README.md +7 -0
- package/docs/agent-recipes.md +57 -8
- package/docs/architecture-runtime.md +16 -1
- package/docs/code-review-agents.md +139 -5
- package/docs/coding-agent-setup.md +127 -2
- package/docs/coding-packages.md +105 -5
- package/docs/coding-services.md +3 -1
- package/docs/coding-worker-byo-images.md +239 -2
- package/docs/coding-worker-isolation.md +88 -23
- package/docs/getting-started-gke.md +225 -9
- package/docs/getting-started-identity-provider.md +21 -10
- package/docs/getting-started.md +140 -11
- package/docs/jira-agents.md +5 -1
- package/docs/knowledge.md +11 -0
- package/docs/native-sandbox.md +635 -0
- package/docs/release-verification.md +9 -0
- package/docs/security-deployment.md +113 -12
- package/docs/slack-notifications.md +252 -0
- package/docs/tool-secrets.md +252 -0
- package/docs/viewer-api.md +46 -5
- package/docs/viewer-api.openapi.yml +1404 -0
- package/help/admin-viewer.md +6 -2
- package/help/agent-recipes.md +27 -0
- package/help/architecture-agent.md +136 -0
- package/help/brokered-secrets.md +79 -0
- package/help/build-claude-code-image.md +131 -0
- package/help/build-worker-image.md +195 -0
- package/help/code-review-agents.md +68 -6
- package/help/coding-packages.md +31 -2
- package/help/creating-agents.md +14 -0
- package/help/deploy-gke.md +37 -6
- package/help/deployment-targets.md +24 -13
- package/help/errors/coding-provider-not-configured.md +2 -2
- package/help/errors/database-auth-invalid.md +28 -0
- package/help/errors/github-account-not-allowed.md +25 -0
- package/help/errors/low-power-disabled.md +29 -0
- package/help/errors/low-power-scale-forbidden.md +35 -0
- package/help/errors/low-power-wake-timeout.md +30 -0
- package/help/errors/mobile-disabled.md +31 -0
- package/help/errors/native-sandbox-capacity.md +22 -0
- package/help/errors/native-sandbox-deadline-exceeded.md +19 -0
- package/help/errors/native-sandbox-docker-failed.md +20 -0
- package/help/errors/native-sandbox-gateway-unavailable.md +21 -0
- package/help/errors/native-sandbox-image-not-pinned.md +19 -0
- package/help/errors/native-sandbox-isolation-mismatch.md +20 -0
- package/help/errors/native-sandbox-network-unenforced.md +22 -0
- package/help/errors/native-sandbox-requires-catalog.md +31 -0
- package/help/errors/native-sandbox-unavailable.md +19 -0
- package/help/errors/native-sandbox-warm-delivery-failed.md +21 -0
- package/help/errors/native-sandbox-worker-exited.md +20 -0
- package/help/errors/native-sandbox-worker-lost.md +20 -0
- package/help/errors/native-sandbox-worker-unready.md +22 -0
- package/help/errors/secret-broker-body-invalid.md +26 -0
- package/help/errors/secret-broker-changed.md +20 -0
- package/help/errors/secret-broker-config-invalid.md +30 -0
- package/help/errors/secret-broker-conflict.md +27 -0
- package/help/errors/secret-broker-destination-denied.md +28 -0
- package/help/errors/secret-broker-value-invalid.md +28 -0
- package/help/errors/secret-brokered.md +24 -0
- package/help/errors/secret-not-brokered.md +25 -0
- package/help/errors/slack-auth-failed.md +48 -0
- package/help/errors/slack-channel-unreachable.md +39 -0
- package/help/errors/slack-not-configured.md +33 -0
- package/help/getting-started.md +18 -0
- package/help/github.md +18 -1
- package/help/identity-and-access.md +5 -1
- package/help/local-repositories.md +35 -5
- package/help/low-power-mode.md +125 -0
- package/help/merge-order-check.md +117 -0
- package/help/mobile-app.md +54 -0
- package/help/native-sandbox.md +136 -0
- package/help/observability.md +8 -0
- package/help/related-pull-requests.md +70 -9
- package/help/repo-instructions-and-skills.md +91 -0
- package/help/review-fix-rounds.md +10 -0
- package/help/slack-notifications.md +62 -0
- package/help/troubleshooting/coding-workers.md +21 -0
- package/package.json +13 -5
- package/prisma/migrations/20261009000003_native_execution_mode/migration.sql +12 -0
- package/prisma/migrations/20261009000004_native_gateway_ledger/migration.sql +65 -0
- package/prisma/migrations/20261009000005_native_gateway_call_child_agent/migration.sql +5 -0
- package/prisma/migrations/20261009000006_run_deferred_start_stop/migration.sql +14 -0
- package/prisma/migrations/20261009000007_native_gateway_network_ready/migration.sql +5 -0
- package/prisma/migrations/20261010000001_workflow_notifications/migration.sql +99 -0
- package/prisma/migrations/20261011000001_native_gateway_session_status_index/migration.sql +2 -0
- package/prisma/migrations/20261012000001_native_warm_worker/migration.sql +32 -0
- package/prisma/migrations/20261013000001_coding_run_merge_order/migration.sql +2 -0
- package/prisma/migrations/20261013000001_secret_broker/migration.sql +17 -0
- package/prisma/migrations/20261013000002_deferred_review_request/migration.sql +4 -0
- package/prisma/migrations/20261014000000_repo_skills/migration.sql +15 -0
- package/prisma/migrations/20261015000001_coding_run_merge_order_index/migration.sql +2 -0
- package/prisma/migrations/20261015000002_no_change_rereview/migration.sql +2 -0
- package/prisma/schema.prisma +362 -91
|
@@ -0,0 +1,252 @@
|
|
|
1
|
+
# Secrets and tools
|
|
2
|
+
|
|
3
|
+
> **Brokered secrets require Wardby 0.6.0 or later.** The readable-secret
|
|
4
|
+
> guidance applies to earlier releases.
|
|
5
|
+
|
|
6
|
+
A native agent's tools can use secrets such as API keys. This guide covers how
|
|
7
|
+
secrets reach tools, the difference between readable and brokered secrets, and
|
|
8
|
+
how to make a secret brokered so a tool can send it to hosts you choose without
|
|
9
|
+
ever reading its value.
|
|
10
|
+
|
|
11
|
+
## Secrets and tools
|
|
12
|
+
|
|
13
|
+
1. **Create** the secret with `create_secret`. Omit `value` to enter it through a
|
|
14
|
+
one-time browser link instead of passing it as a plaintext argument. Secrets
|
|
15
|
+
are encrypted at rest and never returned by any MCP tool; `list_secrets`
|
|
16
|
+
returns names, metadata, and any broker config only.
|
|
17
|
+
2. **Attach** it to an agent with `attach_secret`. You can attach under an alias
|
|
18
|
+
with `alias`; the alias is the name tools use.
|
|
19
|
+
3. **Grant it to a tool** by listing its name in the `allowedSecrets` of the
|
|
20
|
+
tool's attachment (`attach_tool`). A tool can use only the secrets its own
|
|
21
|
+
attachment lists.
|
|
22
|
+
4. A tool reads a readable secret with `await secrets.get("NAME")`.
|
|
23
|
+
|
|
24
|
+
Only the agent's owner can bind secrets and grant them to tools. A binding
|
|
25
|
+
resolves only while the secret's owner is the agent's current owner.
|
|
26
|
+
|
|
27
|
+
## Readable vs brokered
|
|
28
|
+
|
|
29
|
+
A **readable** secret (the default) hands its value to tool code. Any tool that
|
|
30
|
+
is granted it can read the value and send it anywhere the tool is allowed to
|
|
31
|
+
fetch. That includes a tool with untrusted code, and a tool that a
|
|
32
|
+
prompt-injected agent talks into sending the value somewhere unintended.
|
|
33
|
+
|
|
34
|
+
A **brokered** secret never reaches tool code. The owner fixes where the value
|
|
35
|
+
may be sent (exact hosts, optional path prefixes) and how it is placed in the
|
|
36
|
+
request. The tool names the secret in a `fetch` call and the Wardby host adds
|
|
37
|
+
the value to the outgoing request itself. Reading a brokered secret with
|
|
38
|
+
`secrets.get` fails with [`secret_brokered`](../help/errors/secret-brokered.md).
|
|
39
|
+
|
|
40
|
+
Brokering guarantees the value is only ever sent to the destinations in the
|
|
41
|
+
broker config, and is scrubbed from what the tool receives back. It does not
|
|
42
|
+
stop a tool from misusing the access that the sent request itself grants; see
|
|
43
|
+
[Limits and choosing destinations](#limits-and-choosing-destinations).
|
|
44
|
+
|
|
45
|
+
## Making a secret brokered
|
|
46
|
+
|
|
47
|
+
There are three ways to set a broker config:
|
|
48
|
+
|
|
49
|
+
- **At creation**: `create_secret { name, broker }`, with or without `value`.
|
|
50
|
+
- **In the browser form**: the value-entry link shows a "Brokered
|
|
51
|
+
(recommended)" checkbox with the config fields. The form warns that an
|
|
52
|
+
unbrokered secret can be read and sent anywhere its tools can fetch, and that
|
|
53
|
+
brokered secrets only work with tools that use `fetch(url, { secrets })`.
|
|
54
|
+
- **On an existing secret**: `set_secret_broker { name, broker }`.
|
|
55
|
+
|
|
56
|
+
The config has these fields. Unknown fields are rejected.
|
|
57
|
+
|
|
58
|
+
| Field | Required | Meaning |
|
|
59
|
+
| -------------- | -------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
60
|
+
| `hosts` | yes | 1 to 20 exact hostnames, for example `api.example.com`. No scheme, port, wildcard, or IP address (including short forms such as `127.1` or `0x7f.0.0.1`). |
|
|
61
|
+
| `pathPrefixes` | no | Up to 20 paths that each start with `/`, with no `?`, `#`, backslash, control character, `%2F`, or `%5C`. When set, the request path must start with one of them. |
|
|
62
|
+
| `placement` | yes | How the value is added to the request: `header`, `query`, `body`, or `aws-sigv4`. See [Placements](#placements). |
|
|
63
|
+
|
|
64
|
+
A config that fails validation is refused with
|
|
65
|
+
[`secret_broker_config_invalid`](../help/errors/secret-broker-config-invalid.md).
|
|
66
|
+
Setting a config also checks the stored value against it, so a value that
|
|
67
|
+
cannot be brokered is refused with
|
|
68
|
+
[`secret_broker_value_invalid`](../help/errors/secret-broker-value-invalid.md).
|
|
69
|
+
Every change is audited.
|
|
70
|
+
|
|
71
|
+
Updating a config with `set_secret_broker` returns the config before and after
|
|
72
|
+
and, when an attached tool still reads the secret with `secrets.get`, a
|
|
73
|
+
`warnings` list. `attach_tool` returns the same kind of warning when you grant a
|
|
74
|
+
brokered secret to a tool whose code calls `secrets.get`. The warnings are a
|
|
75
|
+
best-effort text scan and never block the call.
|
|
76
|
+
|
|
77
|
+
**The tool attachment's `allowedHosts` must also include the host.** The tool's
|
|
78
|
+
normal fetch policy still applies on top of the broker: a brokered request to a
|
|
79
|
+
host the attachment does not list is refused like any other fetch.
|
|
80
|
+
|
|
81
|
+
## Placements
|
|
82
|
+
|
|
83
|
+
Each placement is one example config. Replace the host with your service's.
|
|
84
|
+
|
|
85
|
+
**Header.** `format` must contain `{value}` exactly once and no line breaks.
|
|
86
|
+
Header names such as `Host`, `Content-Length`, and `Transfer-Encoding` cannot be
|
|
87
|
+
used.
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"hosts": ["api.example.com"],
|
|
92
|
+
"pathPrefixes": ["/v1/"],
|
|
93
|
+
"placement": { "kind": "header", "name": "Authorization", "format": "Bearer {value}" }
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
**Query parameter.**
|
|
98
|
+
|
|
99
|
+
```json
|
|
100
|
+
{
|
|
101
|
+
"hosts": ["api.example.com"],
|
|
102
|
+
"placement": { "kind": "query", "name": "api_key" }
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
**Body field.** The tool's request must have a body that is a JSON object with a
|
|
107
|
+
JSON `content-type` (`application/json` or `+json`), or a form body with
|
|
108
|
+
`application/x-www-form-urlencoded`. The host adds the field to it.
|
|
109
|
+
|
|
110
|
+
```json
|
|
111
|
+
{
|
|
112
|
+
"hosts": ["api.example.com"],
|
|
113
|
+
"placement": { "kind": "body", "field": "token" }
|
|
114
|
+
}
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
**AWS SigV4.** The host signs the request with AWS's signer, so the tool gets an
|
|
118
|
+
authorized call without ever holding the keys. The secret's value must be JSON:
|
|
119
|
+
|
|
120
|
+
```json
|
|
121
|
+
{ "accessKeyId": "AKIA...", "secretAccessKey": "...", "sessionToken": "..." }
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
`sessionToken` is optional. The config names the region and service:
|
|
125
|
+
|
|
126
|
+
```json
|
|
127
|
+
{
|
|
128
|
+
"hosts": ["my-bucket.s3.us-east-1.amazonaws.com"],
|
|
129
|
+
"placement": { "kind": "aws-sigv4", "region": "us-east-1", "service": "s3" }
|
|
130
|
+
}
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
For `s3` the signer adds a payload checksum and does not double-encode the path;
|
|
134
|
+
other services use standard SigV4 path encoding. A request must not already set
|
|
135
|
+
`authorization`, `x-amz-date`, `x-amz-security-token`, or
|
|
136
|
+
`x-amz-content-sha256`. Give the secret an IAM identity with only the
|
|
137
|
+
permissions the tool needs, because the tool can make any call that identity is
|
|
138
|
+
allowed to.
|
|
139
|
+
|
|
140
|
+
## Using a brokered secret in a tool
|
|
141
|
+
|
|
142
|
+
Name the secret in the `secrets` option of `fetch`. The name is the one the tool
|
|
143
|
+
attachment grants in `allowedSecrets`.
|
|
144
|
+
|
|
145
|
+
```js
|
|
146
|
+
const response = await fetch("https://api.example.com/v1/items", {
|
|
147
|
+
method: "GET",
|
|
148
|
+
secrets: ["EXAMPLE_API_KEY"],
|
|
149
|
+
});
|
|
150
|
+
return await response.json();
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
A request can name up to 8 brokered secrets. Naming a secret that is readable,
|
|
154
|
+
or that the tool is not granted, fails with
|
|
155
|
+
[`secret_not_brokered`](../help/errors/secret-not-brokered.md).
|
|
156
|
+
`secrets.get("EXAMPLE_API_KEY")` on a brokered secret throws
|
|
157
|
+
[`secret_brokered`](../help/errors/secret-brokered.md), so update tools that read
|
|
158
|
+
the value to use `fetch` instead.
|
|
159
|
+
|
|
160
|
+
## What the host enforces
|
|
161
|
+
|
|
162
|
+
- **https only**, to the default port. Any other scheme or port is refused with
|
|
163
|
+
[`secret_broker_destination_denied`](../help/errors/secret-broker-destination-denied.md).
|
|
164
|
+
- **Exact hosts and path prefixes.** Every secret in the request must allow the
|
|
165
|
+
request's host and, when it sets `pathPrefixes`, its path. A secret with
|
|
166
|
+
`pathPrefixes` is also refused for a path containing an encoded slash or
|
|
167
|
+
backslash (`%2F`, `%5C`), which a server could decode into a separator.
|
|
168
|
+
- **No redirects.** A 3xx response is returned to the tool as is. Following it
|
|
169
|
+
is a new request that is checked against the broker config again.
|
|
170
|
+
- **No overrides.** If the tool already sets the header, query parameter, or body
|
|
171
|
+
field that a broker places, or two secrets place the same spot, or a request
|
|
172
|
+
names more than one SigV4 secret, the call fails with
|
|
173
|
+
[`secret_broker_conflict`](../help/errors/secret-broker-conflict.md).
|
|
174
|
+
Body placement on an unsuitable body fails with
|
|
175
|
+
[`secret_broker_body_invalid`](../help/errors/secret-broker-body-invalid.md).
|
|
176
|
+
- **Response scrubbing.** The value is replaced with `[REDACTED]` in the response
|
|
177
|
+
body, headers, status text, and final URL, including its base64, URL-safe
|
|
178
|
+
base64, and percent-encoded forms.
|
|
179
|
+
For SigV4 the secret access key and session token are scrubbed.
|
|
180
|
+
- **Console redaction.** The value is redacted from the tool's console output.
|
|
181
|
+
- **Minimum length.** A brokered value must be at least 6 characters, so that
|
|
182
|
+
scrubbing cannot redact ordinary short text. For SigV4, the secret access key
|
|
183
|
+
and session token must each be at least 6 characters.
|
|
184
|
+
|
|
185
|
+
## Changing and removing brokering
|
|
186
|
+
|
|
187
|
+
Changing a broker config takes effect immediately and is not confirmed in a
|
|
188
|
+
browser. `set_secret_broker` with a new config, or `create_secret` with a
|
|
189
|
+
`broker`, replaces the hosts, path prefixes, and placement at once. Anyone who
|
|
190
|
+
can act as the secret's owner over MCP can therefore send the value to another
|
|
191
|
+
host, as long as they can also grant that host to a tool through `attach_tool`
|
|
192
|
+
`allowedHosts`. The operator's fetch policy still applies to every brokered
|
|
193
|
+
request. Only removing brokering needs a person's confirmation.
|
|
194
|
+
|
|
195
|
+
Removing brokering makes the value readable by tools again, so it is never done
|
|
196
|
+
by an MCP call alone. `set_secret_broker { name, broker: null }` returns a
|
|
197
|
+
browser link. A person opens it, sees the current config, and types the
|
|
198
|
+
secret's name to confirm. Call `set_secret_broker` with `broker: null` again to
|
|
199
|
+
see the outcome.
|
|
200
|
+
|
|
201
|
+
The link is tied to the config it was created for. If the config changed after
|
|
202
|
+
the link was created, submitting it fails with
|
|
203
|
+
[`secret_broker_changed`](../help/errors/secret-broker-changed.md); request a
|
|
204
|
+
new link.
|
|
205
|
+
|
|
206
|
+
The browser confirmation raises the cost of removal but has a limit: an agent
|
|
207
|
+
that has its own browser or HTTP tools running on the owner's machine could
|
|
208
|
+
open and submit the link itself. Do not give an untrusted agent such tools on
|
|
209
|
+
the machine of the person who owns the secret.
|
|
210
|
+
|
|
211
|
+
Every broker change, whether through MCP or the browser, is recorded in the
|
|
212
|
+
`SecretBrokerChange` table with the actor, the config before and after, and
|
|
213
|
+
whether it came from `mcp` or `browser`.
|
|
214
|
+
|
|
215
|
+
## Limits and choosing destinations
|
|
216
|
+
|
|
217
|
+
Brokering controls where the value goes, not what the destination does with a
|
|
218
|
+
request. Choose destinations with that in mind:
|
|
219
|
+
|
|
220
|
+
- Changing the config is not browser-confirmed (see
|
|
221
|
+
[Changing and removing brokering](#changing-and-removing-brokering)), so
|
|
222
|
+
brokering protects against tool code, not against someone who holds the
|
|
223
|
+
owner's MCP access.
|
|
224
|
+
- An endpoint on an allowed host that stores or publishes what you send (a
|
|
225
|
+
paste service, a public bucket, a webhook relay, a log collector that
|
|
226
|
+
indexes request headers) can still expose the placed value. Allow only hosts
|
|
227
|
+
that do not echo or publish credentials, and narrow them with
|
|
228
|
+
`pathPrefixes`.
|
|
229
|
+
- Responses are scrubbed only for the encodings listed above. A destination
|
|
230
|
+
that returns a transformed copy of the value (hashed, split, or re-encoded)
|
|
231
|
+
is not covered.
|
|
232
|
+
- A signing or token-minting endpoint, and SigV4 itself, give the tool
|
|
233
|
+
authorized calls rather than the key. The tool can still make every call the
|
|
234
|
+
credential permits, so scope the credential to the least access needed.
|
|
235
|
+
- Brokering does not change who can attach tools or grant secrets. Keep
|
|
236
|
+
`allowedSecrets` and `allowedHosts` narrow on each attachment.
|
|
237
|
+
|
|
238
|
+
## Errors
|
|
239
|
+
|
|
240
|
+
| Code | Meaning |
|
|
241
|
+
| ---------------------------------------------------------------------------------------- | ----------------------------------------------------------------------- |
|
|
242
|
+
| [`secret_brokered`](../help/errors/secret-brokered.md) | A tool read a brokered secret with `secrets.get`. |
|
|
243
|
+
| [`secret_not_brokered`](../help/errors/secret-not-brokered.md) | `fetch` named a secret that is not brokered or not granted to the tool. |
|
|
244
|
+
| [`secret_broker_destination_denied`](../help/errors/secret-broker-destination-denied.md) | The URL is not https, or its host, port, or path is outside the config. |
|
|
245
|
+
| [`secret_broker_conflict`](../help/errors/secret-broker-conflict.md) | The request sets what a broker places, or brokers collide. |
|
|
246
|
+
| [`secret_broker_body_invalid`](../help/errors/secret-broker-body-invalid.md) | Body placement needs a JSON-object or form-encoded body. |
|
|
247
|
+
| [`secret_broker_value_invalid`](../help/errors/secret-broker-value-invalid.md) | The value is too short, or is not the JSON a SigV4 secret needs. |
|
|
248
|
+
| [`secret_broker_changed`](../help/errors/secret-broker-changed.md) | A removal link was created before the broker config last changed. |
|
|
249
|
+
| [`secret_broker_config_invalid`](../help/errors/secret-broker-config-invalid.md) | The broker config failed validation. |
|
|
250
|
+
|
|
251
|
+
See also the short help article
|
|
252
|
+
[Brokered secrets](../help/brokered-secrets.md).
|
package/docs/viewer-api.md
CHANGED
|
@@ -32,9 +32,22 @@ self-hosted mode a client may register a loopback redirect
|
|
|
32
32
|
use any port at sign-in, as RFC 8252 describes. Everything except the port
|
|
33
33
|
must match the registered redirect.
|
|
34
34
|
|
|
35
|
+
Mobile clients sign in with PKCE and a private-use redirect URI,
|
|
36
|
+
`com.wardby.mobile:/oauth` by default. A self-hosted server accepts it only when
|
|
37
|
+
`WARDBY_MOBILE_ENABLED=true`, and only by exact match; every other non-web
|
|
38
|
+
redirect is refused. Turning mobile off refuses new sign-ins and stops existing
|
|
39
|
+
mobile sessions at their next token refresh (an access token already issued
|
|
40
|
+
works until it expires, at most 10 minutes); turning it back on lets those
|
|
41
|
+
sessions refresh again. While it is off, client registration returns
|
|
42
|
+
`400 invalid_redirect_uri` with a `mobile_disabled` description. White-label
|
|
43
|
+
builds set `WARDBY_MOBILE_REDIRECT_URI` to their own reverse-domain URI, such as
|
|
44
|
+
`com.example.app:/oauth`; changing it also signs out clients registered under the
|
|
45
|
+
old value. A malformed value for either variable stops startup in every auth
|
|
46
|
+
mode. See the help article `mobile-app`.
|
|
47
|
+
|
|
35
48
|
## Endpoints
|
|
36
49
|
|
|
37
|
-
All
|
|
50
|
+
All four endpoints accept only `GET`.
|
|
38
51
|
|
|
39
52
|
| Status | Meaning |
|
|
40
53
|
| ------ | ----------------------------------------------------------------- |
|
|
@@ -62,7 +75,12 @@ Each run carries its agent, status, trigger, turn and token counts, cost and
|
|
|
62
75
|
budget, outcomes, and coding-run services. `model` is the model the run used
|
|
63
76
|
(a coding run's own model, otherwise the agent's). `codingProvider` names the
|
|
64
77
|
coding worker, such as `codex` or `claude-code`, and is `null` for runs that
|
|
65
|
-
aren't coding runs.
|
|
78
|
+
aren't coding runs. `nativeExecutionMode` says where a native run executed,
|
|
79
|
+
`control-plane` or `sandbox` (its own isolated container or pod), recorded when
|
|
80
|
+
the run started; it is `null` for coding runs and for runs from before the
|
|
81
|
+
server recorded it. `warmWorkerName` names the warm pool worker (container or
|
|
82
|
+
pod) a sandbox run claimed, so a client can find that pod, which carries no
|
|
83
|
+
run label; it is `null` otherwise, and once the server has retired the worker.
|
|
66
84
|
`declaredServices` lists the services (name and version) a coding run was
|
|
67
85
|
started with; `services` holds their recorded readiness. A finished run can
|
|
68
86
|
declare a service that has no readiness record, for example a run from before
|
|
@@ -94,6 +112,15 @@ of the SHA-256 of the run id, so a client can match a pod to a run it already
|
|
|
94
112
|
knows. The response never includes credentials, the server's kube context, or
|
|
95
113
|
image references. `kubernetes` is `null` for the other launchers.
|
|
96
114
|
|
|
115
|
+
`native` describes how sandbox-mode native agents run, and is `null` when
|
|
116
|
+
`NATIVE_SANDBOX_LAUNCHER` is unset: `launcher` (`docker` or `kubernetes`),
|
|
117
|
+
`warmPoolSize` (`NATIVE_SANDBOX_WARM_POOL_SIZE`), and for Kubernetes the
|
|
118
|
+
namespace their pods run in, the runtime class (or `null`), and the labels on
|
|
119
|
+
their pods: `componentLabel` on every sandbox pod, `runLabel` (the same run-id
|
|
120
|
+
hash as coding runs) on a run's own pod, and `warmPoolLabel` plus the
|
|
121
|
+
`warmWorkerLabel` key on warm pool pods, which have no run label even after a
|
|
122
|
+
run claims them.
|
|
123
|
+
|
|
97
124
|
### `GET /admin/api/events`
|
|
98
125
|
|
|
99
126
|
A Server-Sent Events stream (`text/event-stream`) of live changes. Frames:
|
|
@@ -145,9 +172,23 @@ operator's own kubeconfig; the README lists the Kubernetes Role it needs.
|
|
|
145
172
|
|
|
146
173
|
## Response schemas
|
|
147
174
|
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
`
|
|
175
|
+
`docs/viewer-api.openapi.yml` (OpenAPI 3.1) is the machine-readable contract
|
|
176
|
+
for all four endpoints: bearer authentication (`admin:view` scope and the
|
|
177
|
+
`admin` role), query parameters, error responses and their codes, and the
|
|
178
|
+
component schemas for every response and event. It ships in the npm package, so
|
|
179
|
+
`npm pack @wardby/cli@<version>` fetches it without installing anything.
|
|
180
|
+
|
|
181
|
+
Generate client types from it, for example:
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
npx openapi-typescript docs/viewer-api.openapi.yml -o api.d.ts
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Plain JSON Schemas for every response and event are also in
|
|
188
|
+
`src/viewer/schemas/` of the source tree (`graph-snapshot.schema.json`,
|
|
189
|
+
`infra-info.schema.json`, `run-detail.schema.json`,
|
|
190
|
+
`viewer-event.schema.json`). Both the OpenAPI document and the JSON Schemas are
|
|
191
|
+
regenerated by `npm run build:viewer-schemas`; do not edit them by hand.
|
|
151
192
|
|
|
152
193
|
## Proxies and load balancers
|
|
153
194
|
|