@wardby/cli 0.1.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 +131 -0
- package/LICENSE +202 -0
- package/NOTICE +2 -0
- package/README.md +282 -0
- package/bin/wardby.js +3 -0
- package/deploy/local/docker-compose.yml +19 -0
- package/dist/claude-coding-worker/driver.d.ts +70 -0
- package/dist/claude-coding-worker/driver.js +128 -0
- package/dist/claude-coding-worker/main.d.ts +2 -0
- package/dist/claude-coding-worker/main.js +41 -0
- package/dist/claude-coding-worker/sdk.d.ts +4 -0
- package/dist/claude-coding-worker/sdk.js +43 -0
- package/dist/claude-coding-worker/tool-relay.d.ts +1 -0
- package/dist/claude-coding-worker/tool-relay.js +9 -0
- package/dist/cli-help.d.ts +1 -0
- package/dist/cli-help.js +20 -0
- package/dist/cli.d.ts +18 -0
- package/dist/cli.js +629 -0
- package/dist/coding/observability.d.ts +59 -0
- package/dist/coding/observability.js +77 -0
- package/dist/coding/profile.d.ts +88 -0
- package/dist/coding/profile.js +137 -0
- package/dist/coding/protocol.d.ts +345 -0
- package/dist/coding/protocol.js +445 -0
- package/dist/coding/provider.d.ts +4 -0
- package/dist/coding/provider.js +18 -0
- package/dist/coding-proxy/main.d.ts +1 -0
- package/dist/coding-proxy/main.js +51 -0
- package/dist/coding-worker/artifact.d.ts +16 -0
- package/dist/coding-worker/artifact.js +37 -0
- package/dist/coding-worker/driver.d.ts +46 -0
- package/dist/coding-worker/driver.js +158 -0
- package/dist/coding-worker/errors.d.ts +1 -0
- package/dist/coding-worker/errors.js +23 -0
- package/dist/coding-worker/isolation-probe.d.ts +1 -0
- package/dist/coding-worker/isolation-probe.js +146 -0
- package/dist/coding-worker/keeper.d.ts +4 -0
- package/dist/coding-worker/keeper.js +29 -0
- package/dist/coding-worker/main.d.ts +2 -0
- package/dist/coding-worker/main.js +43 -0
- package/dist/coding-worker/sdk.d.ts +26 -0
- package/dist/coding-worker/sdk.js +28 -0
- package/dist/coding-worker/types.d.ts +64 -0
- package/dist/coding-worker/types.js +1 -0
- package/dist/config/providers.d.ts +158 -0
- package/dist/config/providers.js +162 -0
- package/dist/core/budget-groups.d.ts +72 -0
- package/dist/core/budget-groups.js +149 -0
- package/dist/core/budget.d.ts +63 -0
- package/dist/core/budget.js +69 -0
- package/dist/core/coding-queue.d.ts +32 -0
- package/dist/core/coding-queue.js +54 -0
- package/dist/core/cron.d.ts +31 -0
- package/dist/core/cron.js +43 -0
- package/dist/core/datastores.d.ts +41 -0
- package/dist/core/datastores.js +105 -0
- package/dist/core/db.d.ts +2 -0
- package/dist/core/db.js +2 -0
- package/dist/core/dispatch.d.ts +81 -0
- package/dist/core/dispatch.js +184 -0
- package/dist/core/engine-native.d.ts +29 -0
- package/dist/core/engine-native.js +259 -0
- package/dist/core/http-runtime.d.ts +7 -0
- package/dist/core/http-runtime.js +101 -0
- package/dist/core/lease.d.ts +13 -0
- package/dist/core/lease.js +22 -0
- package/dist/core/logger.d.ts +13 -0
- package/dist/core/logger.js +45 -0
- package/dist/core/memory-tools.d.ts +11 -0
- package/dist/core/memory-tools.js +122 -0
- package/dist/core/reconciler.d.ts +45 -0
- package/dist/core/reconciler.js +152 -0
- package/dist/core/runner.d.ts +87 -0
- package/dist/core/runner.js +529 -0
- package/dist/core/scheduler.d.ts +47 -0
- package/dist/core/scheduler.js +121 -0
- package/dist/core/secrets.d.ts +46 -0
- package/dist/core/secrets.js +100 -0
- package/dist/core/subagent-memory-tools.d.ts +18 -0
- package/dist/core/subagent-memory-tools.js +121 -0
- package/dist/core/timing.d.ts +7 -0
- package/dist/core/timing.js +7 -0
- package/dist/core/webhooks.d.ts +23 -0
- package/dist/core/webhooks.js +113 -0
- package/dist/env.d.ts +11 -0
- package/dist/env.js +13 -0
- package/dist/import/budgets.d.ts +16 -0
- package/dist/import/budgets.js +21 -0
- package/dist/import/bundle.d.ts +16 -0
- package/dist/import/bundle.js +61 -0
- package/dist/import/cli-args.d.ts +2 -0
- package/dist/import/cli-args.js +44 -0
- package/dist/import/create.d.ts +34 -0
- package/dist/import/create.js +363 -0
- package/dist/import/index.d.ts +25 -0
- package/dist/import/index.js +130 -0
- package/dist/import/model-gate.d.ts +1 -0
- package/dist/import/model-gate.js +3 -0
- package/dist/import/neutral-schema.d.ts +369 -0
- package/dist/import/neutral-schema.js +109 -0
- package/dist/import/preflight.d.ts +41 -0
- package/dist/import/preflight.js +71 -0
- package/dist/import/report.d.ts +5 -0
- package/dist/import/report.js +98 -0
- package/dist/import/tool-scan.d.ts +8 -0
- package/dist/import/tool-scan.js +20 -0
- package/dist/mcp/auth/ownership.d.ts +113 -0
- package/dist/mcp/auth/ownership.js +87 -0
- package/dist/mcp/auth/principal.d.ts +9 -0
- package/dist/mcp/auth/principal.js +9 -0
- package/dist/mcp/auth/resource-server.d.ts +47 -0
- package/dist/mcp/auth/resource-server.js +82 -0
- package/dist/mcp/auth/self-hosted/browser.d.ts +3 -0
- package/dist/mcp/auth/self-hosted/browser.js +273 -0
- package/dist/mcp/auth/self-hosted/cli.d.ts +2 -0
- package/dist/mcp/auth/self-hosted/cli.js +39 -0
- package/dist/mcp/auth/self-hosted/credentials.d.ts +58 -0
- package/dist/mcp/auth/self-hosted/credentials.js +106 -0
- package/dist/mcp/auth/self-hosted/rate-limit.d.ts +13 -0
- package/dist/mcp/auth/self-hosted/rate-limit.js +20 -0
- package/dist/mcp/auth/self-hosted/session.d.ts +36 -0
- package/dist/mcp/auth/self-hosted/session.js +110 -0
- package/dist/mcp/capabilities.d.ts +11 -0
- package/dist/mcp/capabilities.js +10 -0
- package/dist/mcp/context.d.ts +46 -0
- package/dist/mcp/context.js +1 -0
- package/dist/mcp/errors.d.ts +13 -0
- package/dist/mcp/errors.js +22 -0
- package/dist/mcp/index.d.ts +32 -0
- package/dist/mcp/index.js +187 -0
- package/dist/mcp/jsonrpc.d.ts +8 -0
- package/dist/mcp/jsonrpc.js +1 -0
- package/dist/mcp/server.d.ts +107 -0
- package/dist/mcp/server.js +203 -0
- package/dist/mcp/tasks/manager.d.ts +63 -0
- package/dist/mcp/tasks/manager.js +103 -0
- package/dist/mcp/tools/agents.d.ts +2 -0
- package/dist/mcp/tools/agents.js +375 -0
- package/dist/mcp/tools/budget-groups.d.ts +2 -0
- package/dist/mcp/tools/budget-groups.js +136 -0
- package/dist/mcp/tools/datastore.d.ts +2 -0
- package/dist/mcp/tools/datastore.js +217 -0
- package/dist/mcp/tools/memory.d.ts +3 -0
- package/dist/mcp/tools/memory.js +60 -0
- package/dist/mcp/tools/models.d.ts +8 -0
- package/dist/mcp/tools/models.js +15 -0
- package/dist/mcp/tools/runs.d.ts +2 -0
- package/dist/mcp/tools/runs.js +61 -0
- package/dist/mcp/tools/scheduling.d.ts +2 -0
- package/dist/mcp/tools/scheduling.js +48 -0
- package/dist/mcp/tools/secret-elicitation-form.d.ts +22 -0
- package/dist/mcp/tools/secret-elicitation-form.js +93 -0
- package/dist/mcp/tools/secret-elicitation-server.d.ts +5 -0
- package/dist/mcp/tools/secret-elicitation-server.js +57 -0
- package/dist/mcp/tools/secret-elicitation.d.ts +38 -0
- package/dist/mcp/tools/secret-elicitation.js +52 -0
- package/dist/mcp/tools/secrets.d.ts +13 -0
- package/dist/mcp/tools/secrets.js +124 -0
- package/dist/mcp/tools/subagents.d.ts +2 -0
- package/dist/mcp/tools/subagents.js +133 -0
- package/dist/mcp/tools/text-result.d.ts +6 -0
- package/dist/mcp/tools/text-result.js +3 -0
- package/dist/mcp/tools/tools.d.ts +2 -0
- package/dist/mcp/tools/tools.js +211 -0
- package/dist/mcp/tools/trigger.d.ts +2 -0
- package/dist/mcp/tools/trigger.js +120 -0
- package/dist/mcp/tools/webhooks.d.ts +2 -0
- package/dist/mcp/tools/webhooks.js +34 -0
- package/dist/mcp/transport/http-limits.d.ts +17 -0
- package/dist/mcp/transport/http-limits.js +92 -0
- package/dist/mcp/transport/stdio.d.ts +23 -0
- package/dist/mcp/transport/stdio.js +6 -0
- package/dist/mcp/transport/streamable-http.d.ts +34 -0
- package/dist/mcp/transport/streamable-http.js +158 -0
- package/dist/mcp/unattended-schedules.d.ts +15 -0
- package/dist/mcp/unattended-schedules.js +21 -0
- package/dist/mcp/webhooks/ingress.d.ts +17 -0
- package/dist/mcp/webhooks/ingress.js +33 -0
- package/dist/observability/config.d.ts +6 -0
- package/dist/observability/config.js +20 -0
- package/dist/observability/metrics-server.d.ts +11 -0
- package/dist/observability/metrics-server.js +47 -0
- package/dist/observability/metrics.d.ts +36 -0
- package/dist/observability/metrics.js +158 -0
- package/dist/providers/auth/authorization-server.d.ts +41 -0
- package/dist/providers/auth/authorization-server.js +1 -0
- package/dist/providers/auth/delegating.d.ts +44 -0
- package/dist/providers/auth/delegating.js +105 -0
- package/dist/providers/auth/index.d.ts +11 -0
- package/dist/providers/auth/index.js +20 -0
- package/dist/providers/auth/release-gate.d.ts +1 -0
- package/dist/providers/auth/release-gate.js +4 -0
- package/dist/providers/auth/self-hosted.d.ts +78 -0
- package/dist/providers/auth/self-hosted.js +377 -0
- package/dist/providers/auth/subject.d.ts +1 -0
- package/dist/providers/auth/subject.js +6 -0
- package/dist/providers/auth/types.d.ts +63 -0
- package/dist/providers/auth/types.js +22 -0
- package/dist/providers/coding-proxy/deny-port.d.ts +5 -0
- package/dist/providers/coding-proxy/deny-port.js +45 -0
- package/dist/providers/coding-proxy/environment-credentials.d.ts +7 -0
- package/dist/providers/coding-proxy/environment-credentials.js +16 -0
- package/dist/providers/coding-proxy/index.d.ts +7 -0
- package/dist/providers/coding-proxy/index.js +7 -0
- package/dist/providers/coding-proxy/memory-ledger.d.ts +17 -0
- package/dist/providers/coding-proxy/memory-ledger.js +103 -0
- package/dist/providers/coding-proxy/metering.d.ts +20 -0
- package/dist/providers/coding-proxy/metering.js +161 -0
- package/dist/providers/coding-proxy/prisma-ledger.d.ts +15 -0
- package/dist/providers/coding-proxy/prisma-ledger.js +213 -0
- package/dist/providers/coding-proxy/proxy.d.ts +75 -0
- package/dist/providers/coding-proxy/proxy.js +721 -0
- package/dist/providers/coding-proxy/runtime.d.ts +18 -0
- package/dist/providers/coding-proxy/runtime.js +39 -0
- package/dist/providers/coding-proxy/secure-fetch.d.ts +9 -0
- package/dist/providers/coding-proxy/secure-fetch.js +72 -0
- package/dist/providers/coding-proxy/server.d.ts +17 -0
- package/dist/providers/coding-proxy/server.js +139 -0
- package/dist/providers/coding-proxy/types.d.ts +99 -0
- package/dist/providers/coding-proxy/types.js +1 -0
- package/dist/providers/datastore/index.d.ts +2 -0
- package/dist/providers/datastore/index.js +2 -0
- package/dist/providers/datastore/postgres.d.ts +20 -0
- package/dist/providers/datastore/postgres.js +130 -0
- package/dist/providers/datastore/scoped.d.ts +10 -0
- package/dist/providers/datastore/scoped.js +46 -0
- package/dist/providers/datastore/types.d.ts +31 -0
- package/dist/providers/datastore/types.js +7 -0
- package/dist/providers/email/types.d.ts +46 -0
- package/dist/providers/email/types.js +8 -0
- package/dist/providers/engine/index.d.ts +1 -0
- package/dist/providers/engine/index.js +1 -0
- package/dist/providers/engine/types.d.ts +67 -0
- package/dist/providers/engine/types.js +16 -0
- package/dist/providers/executor/build.d.ts +6 -0
- package/dist/providers/executor/build.js +15 -0
- package/dist/providers/executor/composition.d.ts +14 -0
- package/dist/providers/executor/composition.js +123 -0
- package/dist/providers/executor/container.d.ts +184 -0
- package/dist/providers/executor/container.js +936 -0
- package/dist/providers/executor/dbos-status.d.ts +50 -0
- package/dist/providers/executor/dbos-status.js +64 -0
- package/dist/providers/executor/dbos.d.ts +53 -0
- package/dist/providers/executor/dbos.js +269 -0
- package/dist/providers/executor/in-process.d.ts +18 -0
- package/dist/providers/executor/in-process.js +38 -0
- package/dist/providers/executor/index.d.ts +8 -0
- package/dist/providers/executor/index.js +8 -0
- package/dist/providers/executor/routing.d.ts +48 -0
- package/dist/providers/executor/routing.js +70 -0
- package/dist/providers/executor/types.d.ts +55 -0
- package/dist/providers/executor/types.js +1 -0
- package/dist/providers/index.d.ts +43 -0
- package/dist/providers/index.js +18 -0
- package/dist/providers/jobs/docker-isolation.d.ts +166 -0
- package/dist/providers/jobs/docker-isolation.js +724 -0
- package/dist/providers/jobs/docker.d.ts +127 -0
- package/dist/providers/jobs/docker.js +1027 -0
- package/dist/providers/jobs/fake-kubernetes-api.d.ts +98 -0
- package/dist/providers/jobs/fake-kubernetes-api.js +142 -0
- package/dist/providers/jobs/fake.d.ts +23 -0
- package/dist/providers/jobs/fake.js +132 -0
- package/dist/providers/jobs/kubernetes-api.d.ts +60 -0
- package/dist/providers/jobs/kubernetes-api.js +20 -0
- package/dist/providers/jobs/kubernetes-client.d.ts +36 -0
- package/dist/providers/jobs/kubernetes-client.js +171 -0
- package/dist/providers/jobs/kubernetes-dry-run-fixture.d.ts +49 -0
- package/dist/providers/jobs/kubernetes-dry-run-fixture.js +141 -0
- package/dist/providers/jobs/kubernetes-isolation.d.ts +147 -0
- package/dist/providers/jobs/kubernetes-isolation.js +607 -0
- package/dist/providers/jobs/kubernetes-platform.d.ts +177 -0
- package/dist/providers/jobs/kubernetes-platform.js +280 -0
- package/dist/providers/jobs/kubernetes-preflight.d.ts +59 -0
- package/dist/providers/jobs/kubernetes-preflight.js +339 -0
- package/dist/providers/jobs/kubernetes-witness.d.ts +10 -0
- package/dist/providers/jobs/kubernetes-witness.js +193 -0
- package/dist/providers/jobs/kubernetes.d.ts +127 -0
- package/dist/providers/jobs/kubernetes.js +874 -0
- package/dist/providers/jobs/safe-extract.d.ts +9 -0
- package/dist/providers/jobs/safe-extract.js +325 -0
- package/dist/providers/jobs/types.d.ts +78 -0
- package/dist/providers/jobs/types.js +6 -0
- package/dist/providers/jobs/workspace-swap.d.ts +2 -0
- package/dist/providers/jobs/workspace-swap.js +47 -0
- package/dist/providers/llm/anthropic.d.ts +13 -0
- package/dist/providers/llm/anthropic.js +21 -0
- package/dist/providers/llm/bedrock.d.ts +19 -0
- package/dist/providers/llm/bedrock.js +33 -0
- package/dist/providers/llm/claude-messages.d.ts +106 -0
- package/dist/providers/llm/claude-messages.js +157 -0
- package/dist/providers/llm/claude-provider.d.ts +40 -0
- package/dist/providers/llm/claude-provider.js +31 -0
- package/dist/providers/llm/index.d.ts +10 -0
- package/dist/providers/llm/index.js +10 -0
- package/dist/providers/llm/openai.d.ts +23 -0
- package/dist/providers/llm/openai.js +156 -0
- package/dist/providers/llm/pricing-anthropic.d.ts +4 -0
- package/dist/providers/llm/pricing-anthropic.js +30 -0
- package/dist/providers/llm/pricing-bedrock-claude.d.ts +12 -0
- package/dist/providers/llm/pricing-bedrock-claude.js +37 -0
- package/dist/providers/llm/pricing-core.d.ts +26 -0
- package/dist/providers/llm/pricing-core.js +17 -0
- package/dist/providers/llm/pricing.d.ts +30 -0
- package/dist/providers/llm/pricing.js +74 -0
- package/dist/providers/llm/registration.d.ts +8 -0
- package/dist/providers/llm/registration.js +39 -0
- package/dist/providers/llm/routing.d.ts +25 -0
- package/dist/providers/llm/routing.js +32 -0
- package/dist/providers/llm/types.d.ts +85 -0
- package/dist/providers/llm/types.js +12 -0
- package/dist/providers/memory/index.d.ts +2 -0
- package/dist/providers/memory/index.js +2 -0
- package/dist/providers/memory/postgres.d.ts +20 -0
- package/dist/providers/memory/postgres.js +72 -0
- package/dist/providers/memory/types.d.ts +32 -0
- package/dist/providers/memory/types.js +17 -0
- package/dist/providers/secrets/app-key.d.ts +8 -0
- package/dist/providers/secrets/app-key.js +50 -0
- package/dist/providers/secrets/index.d.ts +10 -0
- package/dist/providers/secrets/index.js +13 -0
- package/dist/providers/secrets/transfer-envelope.d.ts +12 -0
- package/dist/providers/secrets/transfer-envelope.js +35 -0
- package/dist/providers/secrets/types.d.ts +18 -0
- package/dist/providers/secrets/types.js +12 -0
- package/dist/providers/storage/types.d.ts +18 -0
- package/dist/providers/storage/types.js +7 -0
- package/dist/providers/vcs/git.d.ts +105 -0
- package/dist/providers/vcs/git.js +710 -0
- package/dist/providers/vcs/github.d.ts +105 -0
- package/dist/providers/vcs/github.js +394 -0
- package/dist/providers/vcs/index.d.ts +6 -0
- package/dist/providers/vcs/index.js +26 -0
- package/dist/providers/vcs/types.d.ts +118 -0
- package/dist/providers/vcs/types.js +1 -0
- package/dist/sandbox/bounded-json.d.ts +2 -0
- package/dist/sandbox/bounded-json.js +36 -0
- package/dist/sandbox/bridge.d.ts +15 -0
- package/dist/sandbox/bridge.js +78 -0
- package/dist/sandbox/eval-core.d.ts +37 -0
- package/dist/sandbox/eval-core.js +159 -0
- package/dist/sandbox/fetch-policy.d.ts +24 -0
- package/dist/sandbox/fetch-policy.js +96 -0
- package/dist/sandbox/generated/zod-to-json-schema.bundle.js +5 -0
- package/dist/sandbox/generated/zod.bundle.js +1 -0
- package/dist/sandbox/host-functions.d.ts +29 -0
- package/dist/sandbox/host-functions.js +168 -0
- package/dist/sandbox/limits.d.ts +39 -0
- package/dist/sandbox/limits.js +39 -0
- package/dist/sandbox/parser-worker/__fixtures__/crash.d.ts +1 -0
- package/dist/sandbox/parser-worker/__fixtures__/crash.js +6 -0
- package/dist/sandbox/parser-worker/__fixtures__/echo.d.ts +1 -0
- package/dist/sandbox/parser-worker/__fixtures__/echo.js +5 -0
- package/dist/sandbox/parser-worker/__fixtures__/reject.d.ts +1 -0
- package/dist/sandbox/parser-worker/__fixtures__/reject.js +5 -0
- package/dist/sandbox/parser-worker/__fixtures__/spin-forever.d.ts +1 -0
- package/dist/sandbox/parser-worker/__fixtures__/spin-forever.js +11 -0
- package/dist/sandbox/parser-worker/pool.d.ts +13 -0
- package/dist/sandbox/parser-worker/pool.js +111 -0
- package/dist/sandbox/parser-worker/worker.d.ts +14 -0
- package/dist/sandbox/parser-worker/worker.js +63 -0
- package/dist/sandbox/pii-redaction.d.ts +1 -0
- package/dist/sandbox/pii-redaction.js +29 -0
- package/dist/sandbox/prelude.d.ts +26 -0
- package/dist/sandbox/prelude.js +408 -0
- package/dist/sandbox/quickjs-module.d.ts +13 -0
- package/dist/sandbox/quickjs-module.js +19 -0
- package/dist/sandbox/run-in-sandbox.d.ts +34 -0
- package/dist/sandbox/run-in-sandbox.js +53 -0
- package/dist/sandbox/safe-fetch.d.ts +26 -0
- package/dist/sandbox/safe-fetch.js +140 -0
- package/dist/sandbox/tool-capabilities.d.ts +66 -0
- package/dist/sandbox/tool-capabilities.js +103 -0
- package/dist/sandbox/zod-params.d.ts +22 -0
- package/dist/sandbox/zod-params.js +60 -0
- package/dist/serve.d.ts +14 -0
- package/dist/serve.js +54 -0
- package/dist/wardby-bin.d.ts +2 -0
- package/dist/wardby-bin.js +20 -0
- package/package.json +123 -0
- package/prisma/migrations/20260905000000_init/migration.sql +34 -0
- package/prisma/migrations/20260905010000_scheduler_durability/migration.sql +31 -0
- package/prisma/migrations/20260905020000_tools_multiturn/migration.sql +47 -0
- package/prisma/migrations/20260905030000_cache_tool_json_schema/migration.sql +13 -0
- package/prisma/migrations/20260906000000_mcp_phase4/migration.sql +115 -0
- package/prisma/migrations/20260906010000_run_final_text/migration.sql +7 -0
- package/prisma/migrations/20260906020000_run_turns/migration.sql +6 -0
- package/prisma/migrations/20260906030000_task_principal_id/migration.sql +5 -0
- package/prisma/migrations/20260906040000_secure_self_hosted_oauth/migration.sql +67 -0
- package/prisma/migrations/20260906050000_phase5_coding_agents/migration.sql +52 -0
- package/prisma/migrations/20260906060000_tool_capability_scoping/migration.sql +22 -0
- package/prisma/migrations/20260906070000_datastore_pii_flag/migration.sql +6 -0
- package/prisma/migrations/20260906080000_secret_elicitation_outcomes/migration.sql +13 -0
- package/prisma/migrations/20260907010000_coding_proxy_ledger/migration.sql +57 -0
- package/prisma/migrations/20260907020000_budget_groups/migration.sql +24 -0
- package/prisma/migrations/20260907030000_coding_webhook_task_override/migration.sql +4 -0
- package/prisma/migrations/20260908010000_run_execution_backend/migration.sql +2 -0
- package/prisma/migrations/20260908020000_coding_run_audit_metadata/migration.sql +7 -0
- package/prisma/migrations/20260910010000_agent_secret_bound_name/migration.sql +16 -0
- package/prisma/migrations/20260911010000_coding_worker_toolchains/migration.sql +5 -0
- package/prisma/migrations/20260912010000_coding_provider_contract/migration.sql +24 -0
- package/prisma/migrations/20260912020000_coding_proxy_protocol/migration.sql +10 -0
- package/prisma/migrations/20260912030000_agent_memory/migration.sql +18 -0
- package/prisma/migrations/20260912040000_named_shared_datastores/migration.sql +68 -0
- package/prisma/migrations/20260913000000_run_trigger_webhook/migration.sql +2 -0
- package/prisma/migrations/20260913010000_agent_sub_agent/migration.sql +32 -0
- package/prisma/migrations/20260913020000_run_task_override/migration.sql +5 -0
- package/prisma/migrations/20260913030000_coding_run_root/migration.sql +11 -0
- package/prisma/migrations/20260922010000_coding_run_queued_at/migration.sql +8 -0
- package/prisma/migrations/20260922020000_coding_workspace_disk/migration.sql +8 -0
- package/prisma/migrations/migration_lock.toml +3 -0
- package/prisma/schema.prisma +723 -0
- package/scripts/git-askpass.sh +11 -0
package/.env.example
ADDED
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
# Copy to `.env` for defaults everyone shares (still gitignored — this repo
|
|
2
|
+
# has none actually safe to commit), or `.env.local` for personal overrides.
|
|
3
|
+
# Runtime commands use dotenv-flow's standard cascade. Vitest explicitly loads
|
|
4
|
+
# .env -> .env.local -> .env.test -> .env.test.local, while preserving shell/CI
|
|
5
|
+
# variables as highest priority. Direct `npx prisma ...` commands read only a
|
|
6
|
+
# plain `.env`, which is why DATABASE_URL belongs there as well.
|
|
7
|
+
#
|
|
8
|
+
# Portable Phase 1 defaults: OpenAI + local Postgres (deploy/local).
|
|
9
|
+
DATABASE_URL="postgresql://wardby:wardby@localhost:55432/wardby"
|
|
10
|
+
OPENAI_API_KEY=
|
|
11
|
+
# Set LLM_PROVIDER=anthropic to select the Claude adapter (default: openai).
|
|
12
|
+
LLM_PROVIDER=openai
|
|
13
|
+
ANTHROPIC_API_KEY=
|
|
14
|
+
|
|
15
|
+
# Phase 4: MCP server (`wardby mcp`). stdio is the local/no-OAuth default.
|
|
16
|
+
MCP_TRANSPORT=stdio
|
|
17
|
+
# host:port — required when MCP_TRANSPORT=http.
|
|
18
|
+
MCP_HTTP_BIND=127.0.0.1:8080
|
|
19
|
+
# wardby's own canonical URI — required when MCP_TRANSPORT=http (used as the
|
|
20
|
+
# OAuth resource identifier and, in self-hosted mode, the AS issuer/audience).
|
|
21
|
+
MCP_CANONICAL_URI=
|
|
22
|
+
# Optional exact additional MCP browser origins, comma-separated. No paths/wildcards.
|
|
23
|
+
# Login, consent, and logout always require the canonical origin.
|
|
24
|
+
MCP_ALLOWED_ORIGINS=
|
|
25
|
+
# stdio-mode owner identity (no token to derive one from).
|
|
26
|
+
LOCAL_PRINCIPAL=local
|
|
27
|
+
|
|
28
|
+
# AUTH_PROVIDER=delegating (default): wardby is resource-server-only and an
|
|
29
|
+
# external IdP issues tokens. Use self-hosted for provisioned-user login,
|
|
30
|
+
# consent, and public S256 PKCE clients. See docs/security-deployment.md.
|
|
31
|
+
AUTH_PROVIDER=delegating
|
|
32
|
+
# delegating mode:
|
|
33
|
+
AUTH_ISSUER=
|
|
34
|
+
AUTH_JWKS_URI=
|
|
35
|
+
AUTH_AUDIENCE=
|
|
36
|
+
# Must exactly match the normalized MCP_CANONICAL_URI for HTTP.
|
|
37
|
+
# Self-hosted keys: independently generated 32-byte keys, each encoded as 64 hex chars.
|
|
38
|
+
# Generate each with openssl rand -hex 32; supply via a secret manager in production.
|
|
39
|
+
AUTH_SIGNING_KEY=
|
|
40
|
+
AUTH_CREDENTIAL_HASH_KEY=
|
|
41
|
+
AUTH_MAX_CLIENTS=1000
|
|
42
|
+
|
|
43
|
+
# Exact normalized hosts only. Allowlisting private hosts bypasses network isolation.
|
|
44
|
+
# Only takes effect for a tool attachment whose allowedHosts includes the "*"
|
|
45
|
+
# wildcard (attach_tool / CLI `tool attach`) — a tool with an explicit host
|
|
46
|
+
# list ignores this and is restricted to exactly what it declared.
|
|
47
|
+
WARDBY_FETCH_ALLOWED_HOSTS=
|
|
48
|
+
|
|
49
|
+
# SECRET_CIPHER=app-key (default): AES-256-GCM with a local master key.
|
|
50
|
+
# kms is reserved (no adapter yet).
|
|
51
|
+
SECRET_CIPHER=app-key
|
|
52
|
+
# 32 bytes of hex (64 hex chars) — e.g. `openssl rand -hex 32`.
|
|
53
|
+
SECRET_APP_KEY=
|
|
54
|
+
|
|
55
|
+
# Local browser-backed security tests can reuse an installed Chrome instead of
|
|
56
|
+
# downloading Playwright Chromium. CI should install Playwright's pinned browser.
|
|
57
|
+
SECURITY_BROWSER_CHANNEL=
|
|
58
|
+
|
|
59
|
+
# Required only for a multi-instance HTTP deployment: shares the MCP
|
|
60
|
+
# requestState HMAC key across instances, so a secret-elicitation token
|
|
61
|
+
# minted on one instance verifies on another. 32 bytes of hex (64 hex
|
|
62
|
+
# chars) — e.g. `openssl rand -hex 32`. Leave unset for stdio or a
|
|
63
|
+
# single-instance HTTP deployment (each process falls back to its own
|
|
64
|
+
# random key, which is fine when only one process ever sees a given token).
|
|
65
|
+
REQUEST_STATE_KEY=
|
|
66
|
+
|
|
67
|
+
# Phase 5 containerized coding executor. The native executor remains the
|
|
68
|
+
# default; all values below are used only when JOB_LAUNCHER=docker.
|
|
69
|
+
JOB_LAUNCHER=local
|
|
70
|
+
# Required: immutable repository digest or Docker local image ID, never a mutable tag.
|
|
71
|
+
CODING_WORKER_IMAGE=
|
|
72
|
+
# Required: dedicated proxy container already attached to its external network.
|
|
73
|
+
CODING_PROXY_CONTAINER=
|
|
74
|
+
# Trusted host roots. VCS_WORK_ROOT is also the Docker launcher's seed/materialize root.
|
|
75
|
+
VCS_WORK_ROOT=
|
|
76
|
+
CODING_JOB_STATE_ROOT=
|
|
77
|
+
CODING_ARTIFACT_ROOT=
|
|
78
|
+
# Reference resolved only by the trusted proxy process; never passed to the worker.
|
|
79
|
+
CODING_OPENAI_CREDENTIAL_REF=env:OPENAI_API_KEY
|
|
80
|
+
CODING_CPUS=1
|
|
81
|
+
CODING_MEMORY_MB=2048
|
|
82
|
+
CODING_PIDS=128
|
|
83
|
+
CODING_DISK_MB=2048
|
|
84
|
+
# Operator ceiling (MiB) on a coding profile's per-agent workspaceDiskMb; must be >= CODING_DISK_MB.
|
|
85
|
+
# Defaults to CODING_DISK_MB, so raising it is a deliberate opt-in (on Docker the workspace is tmpfs,
|
|
86
|
+
# i.e. RAM, and every concurrent run can claim this much).
|
|
87
|
+
CODING_MAX_DISK_MB=2048
|
|
88
|
+
# Coding runs holding a slot at once, across all control-plane replicas
|
|
89
|
+
# (enforced in Postgres). Runs over the cap wait in a FIFO queue.
|
|
90
|
+
CODING_MAX_CONCURRENT=4
|
|
91
|
+
# Seconds a coding run may wait for a slot before failing (coding_queue_timeout).
|
|
92
|
+
CODING_QUEUE_TIMEOUT_SEC=3600
|
|
93
|
+
|
|
94
|
+
# JOB_LAUNCHER=kubernetes: coding runs as pods (see deploy/kind-coding/ locally).
|
|
95
|
+
# Namespace holding coding-run pods and the in-cluster coding proxy.
|
|
96
|
+
KUBERNETES_NAMESPACE=wardby-coding
|
|
97
|
+
# kubeconfig context to use; unset = current context, or in-cluster credentials.
|
|
98
|
+
KUBERNETES_CONTEXT=
|
|
99
|
+
KUBERNETES_PROXY_SERVICE=wardby-coding-proxy
|
|
100
|
+
# Required RuntimeClass for coding pods (e.g. gvisor on GKE). Unset = development
|
|
101
|
+
# cluster: the launcher logs a warning on every launch.
|
|
102
|
+
KUBERNETES_RUNTIME_CLASS=
|
|
103
|
+
|
|
104
|
+
# Phase 7 observability. Disabled unless an explicit bind is supplied. Keep
|
|
105
|
+
# production on loopback; the local Grafana Compose profile uses its private
|
|
106
|
+
# network and explicitly enables 0.0.0.0 without publishing this port.
|
|
107
|
+
METRICS_BIND=
|
|
108
|
+
METRICS_ALLOW_NON_LOOPBACK=false
|
|
109
|
+
|
|
110
|
+
# GitHub App installation used for scoped clone, branch push, and draft PR creation.
|
|
111
|
+
GITHUB_APP_ID=
|
|
112
|
+
GITHUB_APP_PRIVATE_KEY=
|
|
113
|
+
GITHUB_API_VERSION=2026-03-10
|
|
114
|
+
VCS_MAX_CHANGED_FILES=1000
|
|
115
|
+
VCS_MAX_DIFF_BYTES=1048576
|
|
116
|
+
|
|
117
|
+
# EXECUTOR=in-process (default): heartbeat + reconciler durability; a run whose
|
|
118
|
+
# process dies is reconciled to `lost`. EXECUTOR=dbos: each run is a DBOS
|
|
119
|
+
# durable workflow that resumes from its last completed LLM turn / tool call
|
|
120
|
+
# after a crash or redeploy, and `stop` is a real cancellation.
|
|
121
|
+
EXECUTOR=in-process
|
|
122
|
+
# DBOS keeps its workflow tables in schema DBOS_SCHEMA of this database.
|
|
123
|
+
# Defaults to DATABASE_URL; point elsewhere to keep them in a separate DB.
|
|
124
|
+
DBOS_SYSTEM_DATABASE_URL=
|
|
125
|
+
DBOS_SCHEMA=dbos
|
|
126
|
+
# REQUIRED when EXECUTOR=dbos (no default — EXECUTOR=dbos refuses to start
|
|
127
|
+
# without it). A restarted process with the same id re-drives its own
|
|
128
|
+
# interrupted runs at launch, so two processes sharing an id each re-drive the
|
|
129
|
+
# other's live workflows: the scheduler and the MCP server need DIFFERENT
|
|
130
|
+
# values (e.g. scheduler-1 and mcp-1).
|
|
131
|
+
DBOS_EXECUTOR_ID=
|
package/LICENSE
ADDED
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
|
|
2
|
+
Apache License
|
|
3
|
+
Version 2.0, January 2004
|
|
4
|
+
http://www.apache.org/licenses/
|
|
5
|
+
|
|
6
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
+
|
|
8
|
+
1. Definitions.
|
|
9
|
+
|
|
10
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
+
|
|
13
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
+
the copyright owner that is granting the License.
|
|
15
|
+
|
|
16
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
+
other entities that control, are controlled by, or are under common
|
|
18
|
+
control with that entity. For the purposes of this definition,
|
|
19
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
+
direction or management of such entity, whether by contract or
|
|
21
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
+
|
|
24
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
+
exercising permissions granted by this License.
|
|
26
|
+
|
|
27
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
+
including but not limited to software source code, documentation
|
|
29
|
+
source, and configuration files.
|
|
30
|
+
|
|
31
|
+
"Object" form shall mean any form resulting from mechanical
|
|
32
|
+
transformation or translation of a Source form, including but
|
|
33
|
+
not limited to compiled object code, generated documentation,
|
|
34
|
+
and conversions to other media types.
|
|
35
|
+
|
|
36
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
+
Object form, made available under the License, as indicated by a
|
|
38
|
+
copyright notice that is included in or attached to the work
|
|
39
|
+
(an example is provided in the Appendix below).
|
|
40
|
+
|
|
41
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
+
form, that is based on (or derived from) the Work and for which the
|
|
43
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
+
of this License, Derivative Works shall not include works that remain
|
|
46
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
+
the Work and Derivative Works thereof.
|
|
48
|
+
|
|
49
|
+
"Contribution" shall mean any work of authorship, including
|
|
50
|
+
the original version of the Work and any modifications or additions
|
|
51
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
53
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
+
means any form of electronic, verbal, or written communication sent
|
|
56
|
+
to the Licensor or its representatives, including but not limited to
|
|
57
|
+
communication on electronic mailing lists, source code control systems,
|
|
58
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
+
excluding communication that is conspicuously marked or otherwise
|
|
61
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
+
|
|
63
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
65
|
+
subsequently incorporated within the Work.
|
|
66
|
+
|
|
67
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
+
Work and such Derivative Works in Source or Object form.
|
|
73
|
+
|
|
74
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
+
(except as stated in this section) patent license to make, have made,
|
|
78
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
+
where such license applies only to those patent claims licensable
|
|
80
|
+
by such Contributor that are necessarily infringed by their
|
|
81
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
+
institute patent litigation against any entity (including a
|
|
84
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
+
or contributory patent infringement, then any patent licenses
|
|
87
|
+
granted to You under this License for that Work shall terminate
|
|
88
|
+
as of the date such litigation is filed.
|
|
89
|
+
|
|
90
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
+
modifications, and in Source or Object form, provided that You
|
|
93
|
+
meet the following conditions:
|
|
94
|
+
|
|
95
|
+
(a) You must give any other recipients of the Work or
|
|
96
|
+
Derivative Works a copy of this License; and
|
|
97
|
+
|
|
98
|
+
(b) You must cause any modified files to carry prominent notices
|
|
99
|
+
stating that You changed the files; and
|
|
100
|
+
|
|
101
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
+
that You distribute, all copyright, patent, trademark, and
|
|
103
|
+
attribution notices from the Source form of the Work,
|
|
104
|
+
excluding those notices that do not pertain to any part of
|
|
105
|
+
the Derivative Works; and
|
|
106
|
+
|
|
107
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
+
distribution, then any Derivative Works that You distribute must
|
|
109
|
+
include a readable copy of the attribution notices contained
|
|
110
|
+
within such NOTICE file, excluding those notices that do not
|
|
111
|
+
pertain to any part of the Derivative Works, in at least one
|
|
112
|
+
of the following places: within a NOTICE text file distributed
|
|
113
|
+
as part of the Derivative Works; within the Source form or
|
|
114
|
+
documentation, if provided along with the Derivative Works; or,
|
|
115
|
+
within a display generated by the Derivative Works, if and
|
|
116
|
+
wherever such third-party notices normally appear. The contents
|
|
117
|
+
of the NOTICE file are for informational purposes only and
|
|
118
|
+
do not modify the License. You may add Your own attribution
|
|
119
|
+
notices within Derivative Works that You distribute, alongside
|
|
120
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
+
that such additional attribution notices cannot be construed
|
|
122
|
+
as modifying the License.
|
|
123
|
+
|
|
124
|
+
You may add Your own copyright statement to Your modifications and
|
|
125
|
+
may provide additional or different license terms and conditions
|
|
126
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
+
the conditions stated in this License.
|
|
130
|
+
|
|
131
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
+
this License, without any additional terms or conditions.
|
|
135
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
+
the terms of any separate license agreement you may have executed
|
|
137
|
+
with Licensor regarding such Contributions.
|
|
138
|
+
|
|
139
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
+
except as required for reasonable and customary use in describing the
|
|
142
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
+
|
|
144
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
+
implied, including, without limitation, any warranties or conditions
|
|
149
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
+
appropriateness of using or redistributing the Work and assume any
|
|
152
|
+
risks associated with Your exercise of permissions under this License.
|
|
153
|
+
|
|
154
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
+
unless required by applicable law (such as deliberate and grossly
|
|
157
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
+
liable to You for damages, including any direct, indirect, special,
|
|
159
|
+
incidental, or consequential damages of any character arising as a
|
|
160
|
+
result of this License or out of the use or inability to use the
|
|
161
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
+
other commercial damages or losses), even if such Contributor
|
|
164
|
+
has been advised of the possibility of such damages.
|
|
165
|
+
|
|
166
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
+
or other liability obligations and/or rights consistent with this
|
|
170
|
+
License. However, in accepting such obligations, You may act only
|
|
171
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
+
defend, and hold each Contributor harmless for any liability
|
|
174
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
+
of your accepting any such warranty or additional liability.
|
|
176
|
+
|
|
177
|
+
END OF TERMS AND CONDITIONS
|
|
178
|
+
|
|
179
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
180
|
+
|
|
181
|
+
To apply the Apache License to your work, attach the following
|
|
182
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
183
|
+
replaced with your own identifying information. (Don't include
|
|
184
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
185
|
+
comment syntax for the file format. We also recommend that a
|
|
186
|
+
file or class name and description of purpose be included on the
|
|
187
|
+
same "printed page" as the copyright notice for easier
|
|
188
|
+
identification within third-party archives.
|
|
189
|
+
|
|
190
|
+
Copyright [yyyy] [name of copyright owner]
|
|
191
|
+
|
|
192
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
193
|
+
you may not use this file except in compliance with the License.
|
|
194
|
+
You may obtain a copy of the License at
|
|
195
|
+
|
|
196
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
197
|
+
|
|
198
|
+
Unless required by applicable law or agreed to in writing, software
|
|
199
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
200
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
201
|
+
See the License for the specific language governing permissions and
|
|
202
|
+
limitations under the License.
|
package/NOTICE
ADDED
package/README.md
ADDED
|
@@ -0,0 +1,282 @@
|
|
|
1
|
+
<div>
|
|
2
|
+
<img align="left" hspace="24" src="docs/assets/brand/wardby-mascot.png" alt="Wardby guardian robot protecting an agent budget" width="280">
|
|
3
|
+
<h3><big><big>Wardby</big></big> <small><em>(pronounced “WARD‑bee”)</em></small></h3>
|
|
4
|
+
<h3>Autonomous agents, bounded by design.</h3>
|
|
5
|
+
<p><strong>Most agent runners focus on helping a model complete a task. Wardby is the self-hosted control plane that decides whether the task should run, limits what it can access, and returns a reviewable outcome governed by explicit policy.</strong></p>
|
|
6
|
+
<br clear="left">
|
|
7
|
+
<p><strong>Budgets are enforced before spend: every model request must fit within a hard run limit before it reaches the provider.</strong></p>
|
|
8
|
+
<p>
|
|
9
|
+
<a href="#why-wardby">Why Wardby</a> ·
|
|
10
|
+
<a href="#why-wardby-instead-of-another-agent-runner">Why it is different</a> ·
|
|
11
|
+
<a href="#a-full-cycle-agent-from-one-conversation">Full-cycle example</a> ·
|
|
12
|
+
<a href="#host-it-in-your-cloud">Deployments</a> ·
|
|
13
|
+
<a href="#bring-your-own-observability">Observability</a> ·
|
|
14
|
+
<a href="#quickstart">Quickstart</a> ·
|
|
15
|
+
<a href="#security-boundaries">Security</a>
|
|
16
|
+
</p>
|
|
17
|
+
</div>
|
|
18
|
+
<br clear="left">
|
|
19
|
+
|
|
20
|
+
<!-- GitHub does not expose live Actions badge images for private repositories. These capability badges link authenticated readers to the authoritative workflow. -->
|
|
21
|
+
|
|
22
|
+
[](https://github.com/wardby/wardby/actions/workflows/security.yml?query=branch%3Amain)
|
|
23
|
+
[](https://github.com/wardby/wardby/actions/workflows/security.yml?query=branch%3Amain)
|
|
24
|
+
[](https://github.com/wardby/wardby/actions/workflows/security.yml?query=branch%3Amain)
|
|
25
|
+
[](https://github.com/wardby/wardby/actions/workflows/security.yml?query=branch%3Amain)
|
|
26
|
+
[](LICENSE)
|
|
27
|
+
|
|
28
|
+
> **Project status:** the control plane, scheduler, budget groups, MCP server,
|
|
29
|
+
> native agents, isolated Codex and Claude Code workers, GitHub draft-PR flow,
|
|
30
|
+
> and local observability stack are implemented and tested. Production
|
|
31
|
+
> readiness and cloud deployment coverage are still being expanded.
|
|
32
|
+
|
|
33
|
+
## Why Wardby
|
|
34
|
+
|
|
35
|
+
AI agents are easy to demo and harder to operate. Once an agent can spend
|
|
36
|
+
money, use credentials, change a repository, or run without a person watching,
|
|
37
|
+
teams need more than a prompt and a cron job.
|
|
38
|
+
|
|
39
|
+
Wardby provides the control plane around the model:
|
|
40
|
+
|
|
41
|
+
| For engineering leaders | For developers |
|
|
42
|
+
| --------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
|
|
43
|
+
| Put explicit cost, ownership, and approval boundaries around agent work. | Create and manage agents from Claude or Codex through MCP. |
|
|
44
|
+
| Keep execution, data, and credentials in infrastructure your team controls. | Choose OpenAI, Anthropic, or Bedrock-backed models per agent. |
|
|
45
|
+
| Turn one-off experiments into scheduled, observable operating processes. | Attach scoped tools, secrets, schedules, memory, and sub-agents. |
|
|
46
|
+
| Keep approval and action authority explicit for consequential outcomes. | Run optional coding tasks in isolated Codex or Claude Code workers that produce draft PRs. |
|
|
47
|
+
|
|
48
|
+
The result is not another autonomous black box. It is a way to make agent work
|
|
49
|
+
repeatable, bounded, inspectable, and reviewable.
|
|
50
|
+
|
|
51
|
+
## Why Wardby instead of another agent runner?
|
|
52
|
+
|
|
53
|
+
Agent tools solve different layers of the problem. Wardby does not need to
|
|
54
|
+
replace them: it provides the self-hosted operating boundary around agents and
|
|
55
|
+
the work they perform.
|
|
56
|
+
|
|
57
|
+
| Category | What it primarily helps you do | What Wardby adds |
|
|
58
|
+
| -------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
|
|
59
|
+
| **Agent frameworks** | Build reasoning loops, tool calls, and multi-agent logic. | Persistent ownership, schedules, budgets, credentials, run history, and lifecycle control. |
|
|
60
|
+
| **Coding agents** | Plan, edit, and test code for an interactive task. | Isolated managed workers, admission-time budgets, scoped access, and optional draft PRs. |
|
|
61
|
+
| **Hosted agent platforms** | Start quickly on infrastructure operated by another vendor. | A control plane, data, credentials, and execution boundary you can host in your own cloud. |
|
|
62
|
+
| **Workflow orchestrators** | Make application jobs durable, retryable, and observable. | Agent-specific policy, model usage, capabilities, budgets, and MCP-native operations. |
|
|
63
|
+
|
|
64
|
+
The distinction is control, not just execution. Wardby reserves spend before a
|
|
65
|
+
run starts, grants only assigned capabilities, records what happened, and
|
|
66
|
+
keeps downstream action authority separate from the worker that produced the
|
|
67
|
+
result.
|
|
68
|
+
|
|
69
|
+
## One control plane, the full lifecycle
|
|
70
|
+
|
|
71
|
+

|
|
72
|
+
|
|
73
|
+
Claude and Codex are the operator experience. Wardby is the durable system
|
|
74
|
+
behind them: it stores agent definitions, triggers work, reserves budget,
|
|
75
|
+
mediates tools and credentials, records outcomes, and exposes run state through
|
|
76
|
+
MCP.
|
|
77
|
+
|
|
78
|
+
## A full-cycle agent from one conversation
|
|
79
|
+
|
|
80
|
+
Ask your MCP client:
|
|
81
|
+
|
|
82
|
+
> Create a weekly dependency-maintenance agent for this repository. Use Claude
|
|
83
|
+
> Code, put it in a $5 weekly budget group, run it Thursday at 2:00 AM, execute
|
|
84
|
+
> the test suite, and open a draft pull request when a safe update is ready.
|
|
85
|
+
> Never merge automatically.
|
|
86
|
+
|
|
87
|
+
Claude or Codex can translate that request into Wardby MCP operations such as
|
|
88
|
+
`create_budget_group`, `create_agent`, `attach_tool`, `trigger_agent`, and
|
|
89
|
+
`get_run`. After that:
|
|
90
|
+
|
|
91
|
+
1. The scheduler or an event creates an owned run.
|
|
92
|
+
2. Wardby reserves budget and resolves only the capabilities assigned to that
|
|
93
|
+
agent.
|
|
94
|
+
3. An isolated coding worker receives the task without receiving the GitHub App
|
|
95
|
+
credential or provider API key.
|
|
96
|
+
4. The worker changes the checkout and runs its approved checks.
|
|
97
|
+
5. Trusted finalization validates the diff, pushes a unique branch, and opens at
|
|
98
|
+
most one draft pull request.
|
|
99
|
+
6. A person reviews and decides whether anything merges.
|
|
100
|
+
|
|
101
|
+
The same agent can be updated, paused, triggered, inspected, or deleted from an
|
|
102
|
+
MCP conversation. The CLI remains available as the bootstrap and operations
|
|
103
|
+
floor.
|
|
104
|
+
|
|
105
|
+
## Agent ecosystems you can compose
|
|
106
|
+
|
|
107
|
+
Wardby provides lifecycle primitives rather than prescribing one fixed catalog.
|
|
108
|
+
These are example systems a team can build and manage through MCP:
|
|
109
|
+
|
|
110
|
+
| Agent system | Typical cycle | Governed outcome |
|
|
111
|
+
| ------------------------ | ------------------------------------------------------------------ | ------------------------------------ |
|
|
112
|
+
| **Delivery pipeline** | Work request → plan → implementation → tests → review | Optional draft feature or bug-fix PR |
|
|
113
|
+
| **Security maintenance** | Scheduled scan → assess → patch → verify | Report or optional remediation PR |
|
|
114
|
+
| **Architecture review** | Inspect codebase → score risks → prioritize findings | Architecture and risk report |
|
|
115
|
+
| **QA coverage** | Map journeys → rank gaps → add tests → run suite | Coverage report or optional test PR |
|
|
116
|
+
| **System monitoring** | Receive signal → investigate → correlate → escalate | Actionable defect or incident report |
|
|
117
|
+
| **Project tracking** | Read delivery data → compare plan, cost, and progress → flag drift | Portfolio or program update |
|
|
118
|
+
|
|
119
|
+
Agents can stand alone or be connected as bounded sub-agents. Shared budget
|
|
120
|
+
groups can cap the combined spend of an ecosystem, while each agent retains its
|
|
121
|
+
own model, tools, schedule, and run history.
|
|
122
|
+
|
|
123
|
+
## Host it in your cloud
|
|
124
|
+
|
|
125
|
+
The core does not import a cloud SDK. Jobs, model access, email, secrets,
|
|
126
|
+
authentication, and object storage sit behind provider interfaces so operators
|
|
127
|
+
can choose the infrastructure boundary that fits their environment.
|
|
128
|
+
|
|
129
|
+
| Target | Current support |
|
|
130
|
+
| ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
131
|
+
| **Local Docker, VM, or on-premises** | Portable PostgreSQL and container workflow for development and self-hosting. |
|
|
132
|
+
| **Production container baseline** | Separate runtime and migration images plus a Compose/Caddy reference boundary. |
|
|
133
|
+
| **GCP** | Terraform reference for the control plane on Cloud Run and Cloud SQL. Cloud-native coding jobs and production observability are follow-on work. |
|
|
134
|
+
| **AWS** | The portable runtime and Bedrock model adapter are available; a native AWS deployment module is planned. |
|
|
135
|
+
| **Other clouds** | Run the production image and provide equivalent PostgreSQL, secrets, ingress, egress, and monitoring controls. |
|
|
136
|
+
|
|
137
|
+
Start with [deployment targets](deploy/README.md), the
|
|
138
|
+
[portable production boundary](deploy/production/README.md), or the
|
|
139
|
+
[GCP setup guide](deploy/gcp/SETUP.md). Reference deployments are examples,
|
|
140
|
+
not a requirement to use one vendor.
|
|
141
|
+
|
|
142
|
+
**A complete deployment runs more than `wardby mcp`.** `mcp` serves the MCP
|
|
143
|
+
surface; the scheduler that fires due agents and the reconciler that recovers
|
|
144
|
+
orphaned runs live in `wardby scheduler`. Run **`wardby serve`** to get all three
|
|
145
|
+
in one process. It is the container image's default command and what a
|
|
146
|
+
single-container deployment (Cloud Run, a lone VM) should run. Alternatively,
|
|
147
|
+
run `mcp` and `scheduler` as two processes, as `deploy/production/compose.yml`
|
|
148
|
+
does. Running `mcp` alone logs a startup warning if enabled schedules exist
|
|
149
|
+
that nothing will fire.
|
|
150
|
+
|
|
151
|
+
## Bring your own observability
|
|
152
|
+
|
|
153
|
+
The coding proxy can expose standard Prometheus metrics at `/metrics` when
|
|
154
|
+
`METRICS_BIND` is configured. Collection is pull-based: keep the endpoint on a
|
|
155
|
+
private network and give only your chosen collector access to it.
|
|
156
|
+
|
|
157
|
+
| Destination | Integration path |
|
|
158
|
+
| -------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
159
|
+
| **Local Prometheus and Grafana** | The included Compose profile provisions Prometheus, Grafana, and dashboards for requests, errors, latency, cost, budgets, runs, and actual spend. |
|
|
160
|
+
| **AWS CloudWatch** | Configure the [CloudWatch Agent's Prometheus collector](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/CloudWatch-Agent-PrometheusEC2.html) to scrape Wardby over private EC2, ECS, or EKS networking and import selected metrics. |
|
|
161
|
+
| **Google Cloud Monitoring** | Configure the [Google Cloud Ops Agent Prometheus receiver](https://cloud.google.com/stackdriver/docs/managed-prometheus/setup-opsagent), or a Managed Service for Prometheus collector, to scrape the private endpoint. |
|
|
162
|
+
| **Other monitoring platforms** | Use any collector or hosted service that accepts the Prometheus exposition format. |
|
|
163
|
+
|
|
164
|
+
Run the local proof without making a paid model request:
|
|
165
|
+
|
|
166
|
+
```sh
|
|
167
|
+
npm run observability:up
|
|
168
|
+
npm run observability:smoke
|
|
169
|
+
npm run observability:down
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
The included cloud deployments do not yet provision AWS or GCP collectors.
|
|
173
|
+
Current metrics primarily cover the coding proxy; application/MCP metrics,
|
|
174
|
+
production alerts, and SLOs remain operator responsibilities. See the
|
|
175
|
+
[observability guide](docs/observability.md) for boundaries and retention.
|
|
176
|
+
|
|
177
|
+
## Security boundaries
|
|
178
|
+
|
|
179
|
+
- **Hard budget enforcement:** per-agent limits and shared daily, weekly, or
|
|
180
|
+
monthly budget groups stop additional model work when the cap is reached.
|
|
181
|
+
- **Scoped capabilities:** tools, secrets, datastores, and sub-agents are
|
|
182
|
+
attached explicitly and checked against the authenticated owner.
|
|
183
|
+
- **Sandboxed tools:** native agent tools execute inside a constrained QuickJS
|
|
184
|
+
environment with controlled fetch and secret bindings.
|
|
185
|
+
- **Isolated coding workers:** Codex and Claude Code run in hardened containers
|
|
186
|
+
with resource limits, protected paths, bounded output, and reviewed network
|
|
187
|
+
access.
|
|
188
|
+
- **Credential separation:** workers do not receive provider credentials or the
|
|
189
|
+
GitHub App private key; trusted components proxy model use and finalize Git.
|
|
190
|
+
- **Explicit action authority:** the worker that produces an outcome does not
|
|
191
|
+
implicitly gain authority to apply it. Current coding finalization creates a
|
|
192
|
+
draft pull request and does not auto-merge it.
|
|
193
|
+
- **Protected remote MCP:** HTTP transport is an OAuth 2.1 resource server;
|
|
194
|
+
local stdio mode trusts the local operator.
|
|
195
|
+
- **Sanitized operations:** lifecycle events and metrics exclude prompts,
|
|
196
|
+
repository content, credentials, diffs, and raw worker output.
|
|
197
|
+
|
|
198
|
+
Read the [runtime architecture](docs/architecture-runtime.md),
|
|
199
|
+
[coding-worker isolation model](docs/coding-worker-isolation.md), and
|
|
200
|
+
[security deployment guide](docs/security-deployment.md) before enabling a
|
|
201
|
+
production repository.
|
|
202
|
+
|
|
203
|
+
Review policy is designed to support designated agents as well as people.
|
|
204
|
+
Agent approvals will be recorded as workflow evidence; operators will decide
|
|
205
|
+
whether that evidence permits an automated action or still requires a person.
|
|
206
|
+
|
|
207
|
+
## Quickstart
|
|
208
|
+
|
|
209
|
+
Requirements: Node.js 24 or newer, Docker, and one supported model-provider
|
|
210
|
+
credential.
|
|
211
|
+
|
|
212
|
+
```sh
|
|
213
|
+
git clone https://github.com/wardby/wardby.git
|
|
214
|
+
cd wardby
|
|
215
|
+
npm ci
|
|
216
|
+
cp .env.example .env
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
Edit `.env` and set `OPENAI_API_KEY` or `ANTHROPIC_API_KEY`. Generate a local
|
|
220
|
+
secret-encryption key with `openssl rand -hex 32` and use it as
|
|
221
|
+
`SECRET_APP_KEY`. Then initialize the local database and start the stdio MCP
|
|
222
|
+
server:
|
|
223
|
+
|
|
224
|
+
```sh
|
|
225
|
+
npm run db:up
|
|
226
|
+
npm run prisma:generate
|
|
227
|
+
npm run prisma:migrate
|
|
228
|
+
npm run cli -- mcp
|
|
229
|
+
```
|
|
230
|
+
|
|
231
|
+
Point Claude or Codex at `npm run cli -- mcp` with the repository as its working
|
|
232
|
+
directory. The exact client configuration format differs, but both use Wardby's
|
|
233
|
+
stdio transport locally. For shared or remote access, use Streamable HTTP with
|
|
234
|
+
OAuth and the production boundary documented above.
|
|
235
|
+
|
|
236
|
+
Once connected, ask the client to list the available Wardby tools, create an
|
|
237
|
+
agent with a small budget, trigger it, and inspect the run. Coding-agent setup
|
|
238
|
+
additionally requires a dedicated GitHub App, immutable worker images, and the
|
|
239
|
+
proxy boundary described in the [local coding-agent setup guide](docs/coding-agent-setup.md).
|
|
240
|
+
|
|
241
|
+
## What is implemented
|
|
242
|
+
|
|
243
|
+
- MCP-first agent, tool, schedule, budget-group, secret, datastore, webhook,
|
|
244
|
+
run, and sub-agent management.
|
|
245
|
+
- Scheduled and event-triggered native agents with OpenAI, direct Anthropic,
|
|
246
|
+
and Bedrock-Claude model routing.
|
|
247
|
+
- Per-run budgets, shared budget groups, usage accounting, and cancellation.
|
|
248
|
+
- QuickJS tool isolation with host allowlists and secret bindings.
|
|
249
|
+
- Containerized Codex and Claude Code executors with trusted GitHub draft-PR
|
|
250
|
+
finalization.
|
|
251
|
+
- In-process reconciliation and optional DBOS durable workflows.
|
|
252
|
+
- Self-hosted or delegated OAuth for remote MCP access.
|
|
253
|
+
- Prometheus metrics and provisioned Grafana dashboards for local operations.
|
|
254
|
+
- Portable production images, a Compose/Caddy boundary, and a GCP control-plane
|
|
255
|
+
Terraform reference.
|
|
256
|
+
|
|
257
|
+
This project is under active development. Run the
|
|
258
|
+
[release verification](docs/release-verification.md) checks and review the
|
|
259
|
+
[security deployment guide](docs/security-deployment.md) before production use.
|
|
260
|
+
|
|
261
|
+
## Repository map
|
|
262
|
+
|
|
263
|
+
```text
|
|
264
|
+
src/core/ Agents, runner, scheduler, triggers, budgets, and sandbox
|
|
265
|
+
src/mcp/ MCP transports, authentication, and management tools
|
|
266
|
+
src/providers/ Swappable model, job, VCS, email, auth, secret, and storage seams
|
|
267
|
+
src/coding-worker/ and src/claude-coding-worker/
|
|
268
|
+
Isolated Codex and Claude Code execution
|
|
269
|
+
deploy/ Local, production-reference, observability, and cloud deployment
|
|
270
|
+
prisma/ Schema and reviewed migrations
|
|
271
|
+
docs/ Architecture, security, setup, and operator guidance
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
## License
|
|
275
|
+
|
|
276
|
+
Apache License 2.0. See [LICENSE](LICENSE) for the license terms and
|
|
277
|
+
[NOTICE](NOTICE) for attribution.
|
|
278
|
+
|
|
279
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) to contribute and [SECURITY.md](SECURITY.md)
|
|
280
|
+
to report a vulnerability privately.
|
|
281
|
+
|
|
282
|
+
Built as an independent reimplementation. See [CLEANROOM.md](CLEANROOM.md).
|
package/bin/wardby.js
ADDED
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
services:
|
|
2
|
+
postgres:
|
|
3
|
+
image: postgres:16-alpine
|
|
4
|
+
environment:
|
|
5
|
+
POSTGRES_USER: wardby
|
|
6
|
+
POSTGRES_PASSWORD: wardby
|
|
7
|
+
POSTGRES_DB: wardby
|
|
8
|
+
ports:
|
|
9
|
+
- "55432:5432"
|
|
10
|
+
volumes:
|
|
11
|
+
- wardby-postgres-data:/var/lib/postgresql/data
|
|
12
|
+
healthcheck:
|
|
13
|
+
test: ["CMD-SHELL", "pg_isready -U wardby -d wardby"]
|
|
14
|
+
interval: 5s
|
|
15
|
+
timeout: 5s
|
|
16
|
+
retries: 12
|
|
17
|
+
|
|
18
|
+
volumes:
|
|
19
|
+
wardby-postgres-data:
|