@wardby/cli 0.1.0 → 0.2.1
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/README.md +183 -96
- package/deploy/local/docker-compose.yml +5 -5
- package/dist/claude-coding-worker/driver.d.ts +1 -0
- package/dist/claude-coding-worker/driver.js +4 -1
- package/dist/claude-coding-worker/main.js +3 -2
- package/dist/cli-help.d.ts +1 -1
- package/dist/cli-help.js +5 -0
- package/dist/cli.js +0 -0
- package/dist/coding/protocol.d.ts +28 -3
- package/dist/coding/protocol.js +53 -2
- package/dist/coding-worker/artifact.d.ts +12 -0
- package/dist/coding-worker/artifact.js +48 -6
- package/dist/coding-worker/driver.d.ts +1 -0
- package/dist/coding-worker/driver.js +4 -1
- package/dist/coding-worker/errors.d.ts +7 -0
- package/dist/coding-worker/errors.js +18 -0
- package/dist/coding-worker/main.js +3 -2
- package/dist/core/budget-groups.d.ts +1 -1
- package/dist/core/coding-queue.d.ts +1 -1
- package/dist/core/datastores.d.ts +1 -1
- package/dist/core/db.d.ts +36 -2
- package/dist/core/db.js +69 -2
- package/dist/core/dispatch.d.ts +16 -1
- package/dist/core/dispatch.js +33 -5
- package/dist/core/http-runtime.js +3 -4
- package/dist/core/lease.d.ts +1 -1
- package/dist/core/private-directory.d.ts +20 -0
- package/dist/core/private-directory.js +36 -0
- package/dist/core/reconciler.d.ts +1 -1
- package/dist/core/runner.d.ts +1 -1
- package/dist/core/scheduler.d.ts +1 -1
- package/dist/core/secrets.d.ts +1 -1
- package/dist/core/subagent-memory-tools.d.ts +1 -1
- package/dist/core/webhooks.d.ts +1 -1
- package/dist/env.js +8 -1
- package/dist/generated/prisma/browser.d.ts +228 -0
- package/dist/generated/prisma/browser.js +17 -0
- package/dist/generated/prisma/client.d.ts +247 -0
- package/dist/generated/prisma/client.js +34 -0
- package/dist/generated/prisma/commonInputTypes.d.ts +809 -0
- package/dist/generated/prisma/commonInputTypes.js +10 -0
- package/dist/generated/prisma/enums.d.ts +53 -0
- package/dist/generated/prisma/enums.js +54 -0
- package/dist/generated/prisma/internal/class.d.ts +462 -0
- package/dist/generated/prisma/internal/class.js +49 -0
- package/dist/generated/prisma/internal/prismaNamespace.d.ts +3325 -0
- package/dist/generated/prisma/internal/prismaNamespace.js +455 -0
- package/dist/generated/prisma/internal/prismaNamespaceBrowser.d.ts +449 -0
- package/dist/generated/prisma/internal/prismaNamespaceBrowser.js +426 -0
- package/dist/generated/prisma/models/Agent.d.ts +3267 -0
- package/dist/generated/prisma/models/Agent.js +1 -0
- package/dist/generated/prisma/models/AgentDatastore.d.ts +1210 -0
- package/dist/generated/prisma/models/AgentDatastore.js +1 -0
- package/dist/generated/prisma/models/AgentMemory.d.ts +986 -0
- package/dist/generated/prisma/models/AgentMemory.js +1 -0
- package/dist/generated/prisma/models/AgentSecret.d.ts +1212 -0
- package/dist/generated/prisma/models/AgentSecret.js +1 -0
- package/dist/generated/prisma/models/AgentSubAgent.d.ts +1217 -0
- package/dist/generated/prisma/models/AgentSubAgent.js +1 -0
- package/dist/generated/prisma/models/AgentTool.d.ts +1309 -0
- package/dist/generated/prisma/models/AgentTool.js +1 -0
- package/dist/generated/prisma/models/AuthFormChallenge.d.ts +1298 -0
- package/dist/generated/prisma/models/AuthFormChallenge.js +1 -0
- package/dist/generated/prisma/models/AuthLoginKey.d.ts +1245 -0
- package/dist/generated/prisma/models/AuthLoginKey.js +1 -0
- package/dist/generated/prisma/models/AuthRateLimit.d.ts +979 -0
- package/dist/generated/prisma/models/AuthRateLimit.js +1 -0
- package/dist/generated/prisma/models/AuthSession.d.ts +1376 -0
- package/dist/generated/prisma/models/AuthSession.js +1 -0
- package/dist/generated/prisma/models/AuthUser.d.ts +1645 -0
- package/dist/generated/prisma/models/AuthUser.js +1 -0
- package/dist/generated/prisma/models/BudgetGroup.d.ts +1548 -0
- package/dist/generated/prisma/models/BudgetGroup.js +1 -0
- package/dist/generated/prisma/models/CodingAgentProfile.d.ts +1430 -0
- package/dist/generated/prisma/models/CodingAgentProfile.js +1 -0
- package/dist/generated/prisma/models/CodingProxyRequest.d.ts +1749 -0
- package/dist/generated/prisma/models/CodingProxyRequest.js +1 -0
- package/dist/generated/prisma/models/CodingProxySession.d.ts +1505 -0
- package/dist/generated/prisma/models/CodingProxySession.js +1 -0
- package/dist/generated/prisma/models/CodingRun.d.ts +2402 -0
- package/dist/generated/prisma/models/CodingRun.js +1 -0
- package/dist/generated/prisma/models/Datastore.d.ts +1434 -0
- package/dist/generated/prisma/models/Datastore.js +1 -0
- package/dist/generated/prisma/models/DatastoreEntry.d.ts +1314 -0
- package/dist/generated/prisma/models/DatastoreEntry.js +1 -0
- package/dist/generated/prisma/models/OAuthAuthorizationCode.d.ts +1526 -0
- package/dist/generated/prisma/models/OAuthAuthorizationCode.js +1 -0
- package/dist/generated/prisma/models/OAuthAuthorizationRequest.d.ts +1350 -0
- package/dist/generated/prisma/models/OAuthAuthorizationRequest.js +1 -0
- package/dist/generated/prisma/models/OAuthClient.d.ts +1289 -0
- package/dist/generated/prisma/models/OAuthClient.js +1 -0
- package/dist/generated/prisma/models/OAuthFamily.d.ts +1540 -0
- package/dist/generated/prisma/models/OAuthFamily.js +1 -0
- package/dist/generated/prisma/models/OAuthGrant.d.ts +1280 -0
- package/dist/generated/prisma/models/OAuthGrant.js +1 -0
- package/dist/generated/prisma/models/Principal.d.ts +1790 -0
- package/dist/generated/prisma/models/Principal.js +1 -0
- package/dist/generated/prisma/models/Run.d.ts +2281 -0
- package/dist/generated/prisma/models/Run.js +1 -0
- package/dist/generated/prisma/models/SchedulerLease.d.ts +970 -0
- package/dist/generated/prisma/models/SchedulerLease.js +1 -0
- package/dist/generated/prisma/models/Secret.d.ts +1399 -0
- package/dist/generated/prisma/models/Secret.js +1 -0
- package/dist/generated/prisma/models/SecretElicitationOutcome.d.ts +973 -0
- package/dist/generated/prisma/models/SecretElicitationOutcome.js +1 -0
- package/dist/generated/prisma/models/Task.d.ts +1176 -0
- package/dist/generated/prisma/models/Task.js +1 -0
- package/dist/generated/prisma/models/Tool.d.ts +1478 -0
- package/dist/generated/prisma/models/Tool.js +1 -0
- package/dist/generated/prisma/models/Webhook.d.ts +1386 -0
- package/dist/generated/prisma/models/Webhook.js +1 -0
- package/dist/generated/prisma/models.d.ts +32 -0
- package/dist/generated/prisma/models.js +1 -0
- package/dist/import/create.d.ts +1 -1
- package/dist/import/create.js +1 -1
- package/dist/import/index.d.ts +1 -1
- package/dist/mcp/auth/ownership.d.ts +19 -19
- package/dist/mcp/auth/principal.d.ts +1 -1
- package/dist/mcp/auth/resource-server.d.ts +1 -1
- package/dist/mcp/auth/self-hosted/browser.js +20 -6
- package/dist/mcp/auth/self-hosted/cli.d.ts +1 -1
- package/dist/mcp/auth/self-hosted/credentials.d.ts +1 -1
- package/dist/mcp/auth/self-hosted/rate-limit.d.ts +1 -1
- package/dist/mcp/auth/self-hosted/session.d.ts +1 -1
- package/dist/mcp/context.d.ts +1 -1
- package/dist/mcp/server.d.ts +1 -1
- package/dist/mcp/shared/page-style.d.ts +16 -0
- package/dist/mcp/shared/page-style.js +129 -0
- package/dist/mcp/tasks/manager.d.ts +1 -1
- package/dist/mcp/tools/agents.js +1 -1
- package/dist/mcp/tools/datastore.js +1 -1
- package/dist/mcp/tools/scheduling.js +1 -1
- package/dist/mcp/tools/secret-elicitation-form.d.ts +1 -1
- package/dist/mcp/tools/secret-elicitation-form.js +10 -28
- package/dist/mcp/tools/secret-elicitation.d.ts +1 -1
- package/dist/mcp/tools/subagents.js +1 -1
- package/dist/mcp/tools/tools.js +1 -1
- package/dist/mcp/transport/streamable-http.d.ts +1 -1
- package/dist/mcp/unattended-schedules.d.ts +1 -1
- package/dist/mcp/webhooks/ingress.d.ts +1 -1
- package/dist/providers/auth/index.d.ts +1 -1
- package/dist/providers/auth/self-hosted.d.ts +2 -2
- package/dist/providers/coding-proxy/prisma-ledger.d.ts +1 -1
- package/dist/providers/coding-proxy/runtime.d.ts +1 -1
- package/dist/providers/datastore/postgres.d.ts +1 -1
- package/dist/providers/executor/build.d.ts +1 -1
- package/dist/providers/executor/composition.d.ts +1 -1
- package/dist/providers/executor/container.d.ts +1 -1
- package/dist/providers/executor/container.js +10 -3
- package/dist/providers/executor/dbos.d.ts +1 -1
- package/dist/providers/jobs/docker.d.ts +11 -0
- package/dist/providers/jobs/docker.js +34 -18
- package/dist/providers/jobs/kubernetes.js +5 -10
- package/dist/providers/jobs/types.d.ts +2 -0
- package/dist/providers/memory/postgres.d.ts +1 -1
- package/dist/providers/vcs/git.js +2 -1
- package/dist/quickstart/config.d.ts +30 -0
- package/dist/quickstart/config.js +106 -0
- package/dist/quickstart/index.d.ts +5 -0
- package/dist/quickstart/index.js +527 -0
- package/dist/quickstart/migrate.d.ts +23 -0
- package/dist/quickstart/migrate.js +125 -0
- package/dist/wardby-bin.js +35 -9
- package/package.json +22 -9
- package/prisma/migrate.config.mjs +20 -0
- package/prisma/schema.prisma +10 -2
- package/dist/providers/auth/release-gate.d.ts +0 -1
- package/dist/providers/auth/release-gate.js +0 -4
package/README.md
CHANGED
|
@@ -1,79 +1,175 @@
|
|
|
1
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">
|
|
2
|
+
<img align="left" hspace="24" src="https://raw.githubusercontent.com/wardby/wardby/main/docs/assets/brand/wardby-mascot.png" alt="Wardby guardian robot protecting an agent budget" width="280">
|
|
3
3
|
<h3><big><big>Wardby</big></big> <small><em>(pronounced “WARD‑bee”)</em></small></h3>
|
|
4
4
|
<h3>Autonomous agents, bounded by design.</h3>
|
|
5
|
-
<p><strong>
|
|
5
|
+
<p><strong>Agent runners help a model complete a task. Wardby is the self-hosted control plane that governs the work around it: whether it may run, what it may access, what it may spend, and what reviewable outcome it may produce.</strong></p>
|
|
6
6
|
<br clear="left">
|
|
7
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><strong>Bring your providers. Keep your infrastructure. Govern agents in one place.</strong></p>
|
|
8
9
|
<p>
|
|
10
|
+
<a href="#get-started">Get started</a> ·
|
|
9
11
|
<a href="#why-wardby">Why Wardby</a> ·
|
|
10
|
-
<a href="#
|
|
12
|
+
<a href="#where-wardby-fits">Where it fits</a> ·
|
|
11
13
|
<a href="#a-full-cycle-agent-from-one-conversation">Full-cycle example</a> ·
|
|
12
14
|
<a href="#host-it-in-your-cloud">Deployments</a> ·
|
|
13
15
|
<a href="#bring-your-own-observability">Observability</a> ·
|
|
14
|
-
<a href="#quickstart">Quickstart</a> ·
|
|
15
16
|
<a href="#security-boundaries">Security</a>
|
|
16
17
|
</p>
|
|
17
18
|
</div>
|
|
18
19
|
<br clear="left">
|
|
19
20
|
|
|
20
|
-
<!--
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
<!-- The first four badges are live: the npm version, Node floor and license are
|
|
22
|
+
read from the published package, and the security badge shows the latest run of
|
|
23
|
+
the security workflow on main. The last three are capability labels describing
|
|
24
|
+
what that workflow enforces -- they are not status and never change colour.
|
|
25
|
+
Every URL is absolute because npm renders this README too, and a relative path
|
|
26
|
+
there resolves against npmjs.com instead of this repository. -->
|
|
27
|
+
|
|
28
|
+
[](https://www.npmjs.com/package/@wardby/cli)
|
|
29
|
+
[](https://github.com/wardby/wardby/actions/workflows/security.yml?query=branch%3Amain)
|
|
30
|
+
[](https://www.npmjs.com/package/@wardby/cli)
|
|
31
|
+
[](https://github.com/wardby/wardby/blob/main/LICENSE)
|
|
23
32
|
[](https://github.com/wardby/wardby/actions/workflows/security.yml?query=branch%3Amain)
|
|
24
33
|
[](https://github.com/wardby/wardby/actions/workflows/security.yml?query=branch%3Amain)
|
|
25
34
|
[](https://github.com/wardby/wardby/actions/workflows/security.yml?query=branch%3Amain)
|
|
26
|
-
[](LICENSE)
|
|
27
35
|
|
|
28
36
|
> **Project status:** the control plane, scheduler, budget groups, MCP server,
|
|
29
37
|
> native agents, isolated Codex and Claude Code workers, GitHub draft-PR flow,
|
|
30
38
|
> and local observability stack are implemented and tested. Production
|
|
31
39
|
> readiness and cloud deployment coverage are still being expanded.
|
|
32
40
|
|
|
41
|
+
## Get started
|
|
42
|
+
|
|
43
|
+
### Run locally in five minutes
|
|
44
|
+
|
|
45
|
+
Requirements: Node.js 24 or newer, Docker, and an OpenAI or Anthropic API key.
|
|
46
|
+
You do not need to clone Wardby or install PostgreSQL.
|
|
47
|
+
|
|
48
|
+
1. From the project where you want to use Wardby, run:
|
|
49
|
+
|
|
50
|
+
```sh
|
|
51
|
+
npx --yes @wardby/cli@latest quickstart
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
2. Follow the prompts to choose a provider, start PostgreSQL, create a `$1`
|
|
55
|
+
demo agent, and optionally connect Codex or Claude Code through MCP.
|
|
56
|
+
|
|
57
|
+
3. Verify the installation:
|
|
58
|
+
|
|
59
|
+
```sh
|
|
60
|
+
npx --yes @wardby/cli@latest doctor
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Quickstart keeps credentials and local state under `.wardby/` in the current
|
|
64
|
+
project. Read the [local getting-started guide](https://github.com/wardby/wardby/blob/main/docs/getting-started.md)
|
|
65
|
+
for unattended setup, lifecycle commands, MCP configuration, and cleanup.
|
|
66
|
+
|
|
67
|
+
### Develop Wardby from source
|
|
68
|
+
|
|
69
|
+
Clone the repository only when you want to contribute to Wardby, inspect its
|
|
70
|
+
deployment assets, or build images yourself:
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
git clone https://github.com/wardby/wardby.git
|
|
74
|
+
cd wardby
|
|
75
|
+
npm ci
|
|
76
|
+
npm run build
|
|
77
|
+
npm test
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
Continue with [CONTRIBUTING.md](https://github.com/wardby/wardby/blob/main/CONTRIBUTING.md)
|
|
81
|
+
for the development database, migrations, required checks, and contribution
|
|
82
|
+
expectations.
|
|
83
|
+
|
|
84
|
+
### Deploy for a team
|
|
85
|
+
|
|
86
|
+
- Follow the [GKE guide](https://github.com/wardby/wardby/blob/main/docs/getting-started-gke.md)
|
|
87
|
+
for the supported Google Cloud reference deployment.
|
|
88
|
+
- Start from the [portable production boundary](https://github.com/wardby/wardby/blob/main/deploy/production/README.md)
|
|
89
|
+
for another cloud, VM, or container platform.
|
|
90
|
+
- Follow [Bring your own identity provider](https://github.com/wardby/wardby/blob/main/docs/getting-started-identity-provider.md)
|
|
91
|
+
to protect remote MCP with your existing OAuth/OIDC provider.
|
|
92
|
+
|
|
33
93
|
## Why Wardby
|
|
34
94
|
|
|
35
95
|
AI agents are easy to demo and harder to operate. Once an agent can spend
|
|
36
96
|
money, use credentials, change a repository, or run without a person watching,
|
|
37
97
|
teams need more than a prompt and a cron job.
|
|
38
98
|
|
|
99
|
+
### One control plane instead of scattered automation
|
|
100
|
+
|
|
101
|
+
Teams often begin with Claude Code or Codex on developer machines,
|
|
102
|
+
repository-specific automation, and separate provider dashboards. As adoption
|
|
103
|
+
grows, agent definitions, ownership, credentials, budgets, schedules, and run
|
|
104
|
+
history become fragmented across tools and repositories.
|
|
105
|
+
|
|
106
|
+
Wardby gives every Wardby-managed agent one durable operational identity: who
|
|
107
|
+
owns it, why it exists, what it may access, when it runs, what it may spend,
|
|
108
|
+
and what outcome it produced.
|
|
109
|
+
|
|
39
110
|
Wardby provides the control plane around the model:
|
|
40
111
|
|
|
41
|
-
| For engineering leaders
|
|
42
|
-
|
|
|
43
|
-
|
|
|
44
|
-
|
|
|
45
|
-
|
|
|
46
|
-
|
|
|
112
|
+
| For engineering leaders | For developers |
|
|
113
|
+
| ---------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
|
|
114
|
+
| Keep an inventory of owned agents, purposes, schedules, limits, and results. | Create and manage agents from Claude or Codex through MCP. |
|
|
115
|
+
| See reserved budget and actual usage across Wardby-managed agents. | Choose OpenAI, Anthropic, or Bedrock-backed models per agent. |
|
|
116
|
+
| Keep execution, data, and credentials in infrastructure your team controls. | Switch approved models or builders without rewriting the governance contract. |
|
|
117
|
+
| Turn one-off experiments into scheduled, observable operating processes. | Attach scoped tools, secrets, schedules, memory, and sub-agents. |
|
|
118
|
+
| 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
119
|
|
|
48
120
|
The result is not another autonomous black box. It is a way to make agent work
|
|
49
121
|
repeatable, bounded, inspectable, and reviewable.
|
|
50
122
|
|
|
51
|
-
##
|
|
123
|
+
## Where Wardby fits
|
|
52
124
|
|
|
53
125
|
Agent tools solve different layers of the problem. Wardby does not need to
|
|
54
126
|
replace them: it provides the self-hosted operating boundary around agents and
|
|
55
127
|
the work they perform.
|
|
56
128
|
|
|
57
|
-
| Category
|
|
58
|
-
|
|
|
59
|
-
| **
|
|
60
|
-
| **
|
|
61
|
-
| **
|
|
62
|
-
| **
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
129
|
+
| Category | What it primarily helps you do | What Wardby adds |
|
|
130
|
+
| --------------------------- | ----------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
|
|
131
|
+
| **Repository automation** | Run jobs for one repository in response to delivery events. | One agent catalog, budget model, and policy boundary across repositories and triggers. |
|
|
132
|
+
| **Agent frameworks** | Build reasoning loops, tool calls, and multi-agent logic. | Persistent ownership, schedules, budgets, credentials, run history, and lifecycle control. |
|
|
133
|
+
| **Coding agents** | Plan, edit, and test code for an interactive task. | Isolated managed workers, admission-time budgets, scoped access, and optional draft PRs. |
|
|
134
|
+
| **Provider dashboards** | Report usage and cost within one model provider. | Agent-owned budgets, capabilities, runs, and outcomes across approved providers. |
|
|
135
|
+
| **LLM gateways** | Route model requests, manage keys, and enforce quotas. | Budgets tied to named agents, owned runs, capabilities, schedules, and outcomes. |
|
|
136
|
+
| **Observability platforms** | Trace requests, evaluate quality, and explain cost. | Admission and execution controls applied before work occurs, plus a durable agent catalog. |
|
|
137
|
+
| **Vendor control planes** | Govern agents inside one provider or cloud ecosystem. | A self-hosted boundary spanning approved providers, builders, repositories, and clouds. |
|
|
138
|
+
| **Workflow orchestrators** | Make application jobs durable, retryable, and observable. | Agent-specific policy, model usage, capabilities, budgets, and MCP-native operations. |
|
|
139
|
+
|
|
140
|
+
The distinction is governed work, not just model calls or execution. Rather
|
|
141
|
+
than assembling a gateway, scheduler, agent catalog, budget service,
|
|
142
|
+
capability registry, and run database, Wardby provides one operating boundary.
|
|
143
|
+
It reserves spend before a run starts, grants only assigned capabilities,
|
|
144
|
+
records what happened, and keeps downstream action authority separate from the
|
|
145
|
+
worker that produced the result.
|
|
146
|
+
|
|
147
|
+
> **Scope:** Wardby's inventory and budget views cover work managed through
|
|
148
|
+
> Wardby. Provider reconciliation and unmanaged-agent discovery are required
|
|
149
|
+
> before those views can represent every AI agent or expense in an
|
|
150
|
+
> organization.
|
|
151
|
+
|
|
152
|
+
## One operational contract, the full lifecycle
|
|
153
|
+
|
|
154
|
+

|
|
155
|
+
|
|
156
|
+
Claude and Codex are the operator experience. Wardby is the durable operating
|
|
157
|
+
boundary between intent and agent execution: it stores agent definitions,
|
|
158
|
+
triggers work, reserves budget, mediates tools and credentials, records
|
|
159
|
+
outcomes, and exposes run state through MCP. Nothing runs until identity,
|
|
160
|
+
policy, and available budget agree.
|
|
161
|
+
|
|
162
|
+
### Governed shared state for agent teams
|
|
163
|
+
|
|
164
|
+
Named Wardby datastores let related agents exchange persistent structured data
|
|
165
|
+
without sharing an unrestricted database credential. Datastores are owned and
|
|
166
|
+
attached to agents explicitly; each sandboxed tool can reach only approved
|
|
167
|
+
bound names and key prefixes.
|
|
168
|
+
|
|
169
|
+
A planner can publish a feature plan, a builder can record implementation
|
|
170
|
+
state, and a reviewer or QA agent can add findings to the same governed
|
|
171
|
+
workspace. Datastores provide bounded coordination state, not a replacement
|
|
172
|
+
for authoritative source systems or searchable agent memory.
|
|
77
173
|
|
|
78
174
|
## A full-cycle agent from one conversation
|
|
79
175
|
|
|
@@ -100,13 +196,17 @@ Claude or Codex can translate that request into Wardby MCP operations such as
|
|
|
100
196
|
|
|
101
197
|
The same agent can be updated, paused, triggered, inspected, or deleted from an
|
|
102
198
|
MCP conversation. The CLI remains available as the bootstrap and operations
|
|
103
|
-
floor.
|
|
199
|
+
floor. The result is autonomy with a receipt: an owned run with bounded spend,
|
|
200
|
+
assigned capabilities, durable status, and a reviewable outcome.
|
|
104
201
|
|
|
105
202
|
## Agent ecosystems you can compose
|
|
106
203
|
|
|
107
204
|
Wardby provides lifecycle primitives rather than prescribing one fixed catalog.
|
|
108
205
|
These are example systems a team can build and manage through MCP:
|
|
109
206
|
|
|
207
|
+
**Builders can vary. The controls do not.** Each system inherits the same
|
|
208
|
+
budget, capability, identity, evidence, and review contract.
|
|
209
|
+
|
|
110
210
|
| Agent system | Typical cycle | Governed outcome |
|
|
111
211
|
| ------------------------ | ------------------------------------------------------------------ | ------------------------------------ |
|
|
112
212
|
| **Delivery pipeline** | Work request → plan → implementation → tests → review | Optional draft feature or bug-fix PR |
|
|
@@ -122,31 +222,33 @@ own model, tools, schedule, and run history.
|
|
|
122
222
|
|
|
123
223
|
## Host it in your cloud
|
|
124
224
|
|
|
225
|
+
**Bring your providers. Keep your infrastructure. Govern agents in one place.**
|
|
226
|
+
|
|
125
227
|
The core does not import a cloud SDK. Jobs, model access, email, secrets,
|
|
126
228
|
authentication, and object storage sit behind provider interfaces so operators
|
|
127
|
-
can choose the infrastructure boundary that fits their environment.
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
|
134
|
-
|
|
|
135
|
-
| **
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
229
|
+
can choose the infrastructure boundary that fits their environment. Models,
|
|
230
|
+
coding executors, cloud platforms, and observability systems can change
|
|
231
|
+
independently instead of defining the agent architecture. This reduces
|
|
232
|
+
control-plane lock-in without pretending that source control, model providers,
|
|
233
|
+
or monitoring systems disappear.
|
|
234
|
+
|
|
235
|
+
| Target | Current support |
|
|
236
|
+
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------- |
|
|
237
|
+
| **Local Docker, VM, or on-premises** | Portable PostgreSQL and container workflow for development and self-hosting. |
|
|
238
|
+
| **Production container baseline** | Separate runtime and migration images plus a Compose/Caddy reference boundary. |
|
|
239
|
+
| **GKE Autopilot** | Supported GCP reference with private Cloud SQL, isolated Codex worker pods, HTTPS Gateway, and immutable images. |
|
|
240
|
+
| **AWS** | The portable runtime and Bedrock model adapter are available; a native AWS deployment module is planned. |
|
|
241
|
+
| **Other clouds** | Run the production image and provide equivalent PostgreSQL, secrets, ingress, egress, and monitoring controls. |
|
|
242
|
+
|
|
243
|
+
Start with [deployment targets](https://github.com/wardby/wardby/blob/main/deploy/README.md), the
|
|
244
|
+
[portable production boundary](https://github.com/wardby/wardby/blob/main/deploy/production/README.md), or the
|
|
245
|
+
[GKE getting-started guide](https://github.com/wardby/wardby/blob/main/docs/getting-started-gke.md). Reference deployments are examples,
|
|
140
246
|
not a requirement to use one vendor.
|
|
141
247
|
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
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.
|
|
248
|
+
For a single-container deployment, run **`wardby serve`** to start MCP, the
|
|
249
|
+
scheduler, and reconciliation together. Split deployments can run `wardby mcp`
|
|
250
|
+
and `wardby scheduler` separately; `mcp` alone does not fire schedules. See the
|
|
251
|
+
deployment guides above for the complete process boundary.
|
|
150
252
|
|
|
151
253
|
## Bring your own observability
|
|
152
254
|
|
|
@@ -172,7 +274,7 @@ npm run observability:down
|
|
|
172
274
|
The included cloud deployments do not yet provision AWS or GCP collectors.
|
|
173
275
|
Current metrics primarily cover the coding proxy; application/MCP metrics,
|
|
174
276
|
production alerts, and SLOs remain operator responsibilities. See the
|
|
175
|
-
[observability guide](docs/observability.md) for boundaries and retention.
|
|
277
|
+
[observability guide](https://github.com/wardby/wardby/blob/main/docs/observability.md) for boundaries and retention.
|
|
176
278
|
|
|
177
279
|
## Security boundaries
|
|
178
280
|
|
|
@@ -195,48 +297,33 @@ production alerts, and SLOs remain operator responsibilities. See the
|
|
|
195
297
|
- **Sanitized operations:** lifecycle events and metrics exclude prompts,
|
|
196
298
|
repository content, credentials, diffs, and raw worker output.
|
|
197
299
|
|
|
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
|
|
300
|
+
Read the [runtime architecture](https://github.com/wardby/wardby/blob/main/docs/architecture-runtime.md),
|
|
301
|
+
[coding-worker isolation model](https://github.com/wardby/wardby/blob/main/docs/coding-worker-isolation.md), and
|
|
302
|
+
[security deployment guide](https://github.com/wardby/wardby/blob/main/docs/security-deployment.md) before enabling a
|
|
201
303
|
production repository.
|
|
202
304
|
|
|
203
305
|
Review policy is designed to support designated agents as well as people.
|
|
204
306
|
Agent approvals will be recorded as workflow evidence; operators will decide
|
|
205
307
|
whether that evidence permits an automated action or still requires a person.
|
|
206
308
|
|
|
207
|
-
##
|
|
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
|
-
```
|
|
309
|
+
## Optional npm installation
|
|
218
310
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
`SECRET_APP_KEY`. Then initialize the local database and start the stdio MCP
|
|
222
|
-
server:
|
|
311
|
+
The `npx` quickstart above requires no installation. To pin Wardby as a local
|
|
312
|
+
project dependency instead:
|
|
223
313
|
|
|
224
314
|
```sh
|
|
225
|
-
npm
|
|
226
|
-
npm run prisma:generate
|
|
227
|
-
npm run prisma:migrate
|
|
228
|
-
npm run cli -- mcp
|
|
315
|
+
npm install @wardby/cli
|
|
229
316
|
```
|
|
230
317
|
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
OAuth and the production boundary documented above.
|
|
318
|
+
That install is audit-clean: the published package carries no Prisma CLI,
|
|
319
|
+
`@prisma/config`, `deepmerge-ts`, or `mysql2`, so `npm audit` reports nothing
|
|
320
|
+
and no `overrides` entry is needed in your own `package.json`.
|
|
235
321
|
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
322
|
+
`wardby quickstart` and `wardby doctor` separately fetch the pinned Prisma CLI
|
|
323
|
+
(`prisma@7.10.0`) on demand via `npx` to run migrations, so the machine running
|
|
324
|
+
them needs npm registry access at that moment. See
|
|
325
|
+
[Images and dependencies](https://github.com/wardby/wardby/blob/main/docs/security-deployment.md#images-and-dependencies)
|
|
326
|
+
for the repository's own dependency-override policy.
|
|
240
327
|
|
|
241
328
|
## What is implemented
|
|
242
329
|
|
|
@@ -251,12 +338,12 @@ proxy boundary described in the [local coding-agent setup guide](docs/coding-age
|
|
|
251
338
|
- In-process reconciliation and optional DBOS durable workflows.
|
|
252
339
|
- Self-hosted or delegated OAuth for remote MCP access.
|
|
253
340
|
- Prometheus metrics and provisioned Grafana dashboards for local operations.
|
|
254
|
-
- Portable production images, a Compose/Caddy boundary, and a
|
|
255
|
-
Terraform reference.
|
|
341
|
+
- Portable production images, a Compose/Caddy boundary, and a GKE Autopilot
|
|
342
|
+
Terraform reference deployment.
|
|
256
343
|
|
|
257
344
|
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.
|
|
345
|
+
[release verification](https://github.com/wardby/wardby/blob/main/docs/release-verification.md) checks and review the
|
|
346
|
+
[security deployment guide](https://github.com/wardby/wardby/blob/main/docs/security-deployment.md) before production use.
|
|
260
347
|
|
|
261
348
|
## Repository map
|
|
262
349
|
|
|
@@ -273,10 +360,10 @@ docs/ Architecture, security, setup, and operator guidance
|
|
|
273
360
|
|
|
274
361
|
## License
|
|
275
362
|
|
|
276
|
-
Apache License 2.0. See [LICENSE](LICENSE) for the license terms and
|
|
277
|
-
[NOTICE](NOTICE) for attribution.
|
|
363
|
+
Apache License 2.0. See [LICENSE](https://github.com/wardby/wardby/blob/main/LICENSE) for the license terms and
|
|
364
|
+
[NOTICE](https://github.com/wardby/wardby/blob/main/NOTICE) for attribution.
|
|
278
365
|
|
|
279
|
-
See [CONTRIBUTING.md](CONTRIBUTING.md) to contribute and [SECURITY.md](SECURITY.md)
|
|
366
|
+
See [CONTRIBUTING.md](https://github.com/wardby/wardby/blob/main/CONTRIBUTING.md) to contribute and [SECURITY.md](https://github.com/wardby/wardby/blob/main/SECURITY.md)
|
|
280
367
|
to report a vulnerability privately.
|
|
281
368
|
|
|
282
|
-
Built as an independent reimplementation. See [CLEANROOM.md](CLEANROOM.md).
|
|
369
|
+
Built as an independent reimplementation. See [CLEANROOM.md](https://github.com/wardby/wardby/blob/main/CLEANROOM.md).
|
|
@@ -2,15 +2,15 @@ services:
|
|
|
2
2
|
postgres:
|
|
3
3
|
image: postgres:16-alpine
|
|
4
4
|
environment:
|
|
5
|
-
POSTGRES_USER: wardby
|
|
6
|
-
POSTGRES_PASSWORD: wardby
|
|
7
|
-
POSTGRES_DB: wardby
|
|
5
|
+
POSTGRES_USER: ${WARDBY_POSTGRES_USER:-wardby}
|
|
6
|
+
POSTGRES_PASSWORD: ${WARDBY_POSTGRES_PASSWORD:-wardby}
|
|
7
|
+
POSTGRES_DB: ${WARDBY_POSTGRES_DB:-wardby}
|
|
8
8
|
ports:
|
|
9
|
-
- "55432:5432"
|
|
9
|
+
- "${WARDBY_POSTGRES_PORT:-55432}:5432"
|
|
10
10
|
volumes:
|
|
11
11
|
- wardby-postgres-data:/var/lib/postgresql/data
|
|
12
12
|
healthcheck:
|
|
13
|
-
test: ["CMD-SHELL", "pg_isready -U
|
|
13
|
+
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
|
|
14
14
|
interval: 5s
|
|
15
15
|
timeout: 5s
|
|
16
16
|
retries: 12
|
|
@@ -20,6 +20,7 @@ export declare const CLAUDE_OUTPUT_JSON_SCHEMA: {
|
|
|
20
20
|
};
|
|
21
21
|
readonly tag: {
|
|
22
22
|
readonly type: "string";
|
|
23
|
+
readonly description: "Optional short label shown in the pull request title, such as a ticket id. At most 32 characters: letters, digits, '.', '_', '/', '-', starting with a letter or digit, with no spaces. Example: \"add-jokes\". Omit it when there is no natural label.";
|
|
23
24
|
};
|
|
24
25
|
readonly tests: {
|
|
25
26
|
readonly type: "array";
|
|
@@ -13,7 +13,10 @@ export const CLAUDE_OUTPUT_JSON_SCHEMA = {
|
|
|
13
13
|
runId: { type: "string" },
|
|
14
14
|
outcome: { type: "string", enum: ["changes_ready", "no_changes", "budget_exhausted"] },
|
|
15
15
|
summary: { type: "string" },
|
|
16
|
-
tag: {
|
|
16
|
+
tag: {
|
|
17
|
+
type: "string",
|
|
18
|
+
description: "Optional short label shown in the pull request title, such as a ticket id. At most 32 characters: letters, digits, '.', '_', '/', '-', starting with a letter or digit, with no spaces. Example: \"add-jokes\". Omit it when there is no natural label.",
|
|
19
|
+
},
|
|
17
20
|
tests: {
|
|
18
21
|
type: "array",
|
|
19
22
|
maxItems: 64,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import { readCodingInput, writeCodingOutputAtomic } from "../coding-worker/artifact.js";
|
|
3
|
-
import { safeWorkerErrorCode } from "../coding-worker/errors.js";
|
|
3
|
+
import { safeOutputIssues, safeWorkerErrorCode } from "../coding-worker/errors.js";
|
|
4
4
|
import { runClaudeCodingWorker } from "./driver.js";
|
|
5
5
|
import { createClaudeSdkQuery } from "./sdk.js";
|
|
6
6
|
const INPUT_PATH = "/run/wardby/input/input.json";
|
|
@@ -36,6 +36,7 @@ catch (error) {
|
|
|
36
36
|
: safeCode === "worker_failed"
|
|
37
37
|
? `worker_${stage}_failed`
|
|
38
38
|
: safeCode;
|
|
39
|
-
|
|
39
|
+
const issues = code === "coding_output_invalid" ? safeOutputIssues(error) : undefined;
|
|
40
|
+
process.stderr.write(`${JSON.stringify({ error: code, ...(issues ? { issues } : {}) })}\n`);
|
|
40
41
|
process.exitCode = controller.signal.aborted ? 143 : 1;
|
|
41
42
|
}
|
package/dist/cli-help.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const CLI_USAGE = "usage:\n wardby agent create --name <n> --model <m> --prompt <p> --budget <usd> [--schedule \"<cron>\"] [--timezone <tz>] [--max-turns <n>]\n wardby agent list\n wardby agent schedule <name> --cron \"<expr>\" [--timezone <tz>] [--disable]\n wardby tool create --name <n> --description <d> --params <file> --code <file>\n wardby tool attach <tool-name> <agent-name>\n wardby tool detach <tool-name> <agent-name>\n wardby tool list [--agent <name>]\n wardby run <name>\n wardby runs [--agent <name>] [--limit N] [--status <s>]\n wardby coding preflight (JOB_LAUNCHER=docker or kubernetes)\n wardby coding cleanup --run-id <id>\n wardby scheduler [--scope default]\n wardby mcp (MCP_TRANSPORT=stdio|http selects the transport)\n wardby serve [--scope default] (mcp + scheduler + reconciler in one process; http only)\n wardby import <bundle-dir> --owner <subject> [--public] [--include-secrets --transfer-key <pem>] [--default-budget <usd>] [--dry-run] [--prefix <p>] [--on-conflict fail|skip|rename] [--allow-open-fetch]\n\noptions:\n -h, --help Show this help\n -v, --version Show the installed Wardby version";
|
|
1
|
+
export declare const CLI_USAGE = "usage:\n wardby quickstart [--provider openai|anthropic] [--model <m>] [--budget <usd>] [--client none|codex|claude|both] [--skip-demo] [--non-interactive --yes]\n wardby doctor\n wardby status\n wardby logs [--tail N] [--follow]\n wardby down [--volumes]\n wardby agent create --name <n> --model <m> --prompt <p> --budget <usd> [--schedule \"<cron>\"] [--timezone <tz>] [--max-turns <n>]\n wardby agent list\n wardby agent schedule <name> --cron \"<expr>\" [--timezone <tz>] [--disable]\n wardby tool create --name <n> --description <d> --params <file> --code <file>\n wardby tool attach <tool-name> <agent-name>\n wardby tool detach <tool-name> <agent-name>\n wardby tool list [--agent <name>]\n wardby run <name>\n wardby runs [--agent <name>] [--limit N] [--status <s>]\n wardby coding preflight (JOB_LAUNCHER=docker or kubernetes)\n wardby coding cleanup --run-id <id>\n wardby scheduler [--scope default]\n wardby mcp (MCP_TRANSPORT=stdio|http selects the transport)\n wardby serve [--scope default] (mcp + scheduler + reconciler in one process; http only)\n wardby import <bundle-dir> --owner <subject> [--public] [--include-secrets --transfer-key <pem>] [--default-budget <usd>] [--dry-run] [--prefix <p>] [--on-conflict fail|skip|rename] [--allow-open-fetch]\n\noptions:\n -h, --help Show this help\n -v, --version Show the installed Wardby version";
|
package/dist/cli-help.js
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
export const CLI_USAGE = `usage:
|
|
2
|
+
wardby quickstart [--provider openai|anthropic] [--model <m>] [--budget <usd>] [--client none|codex|claude|both] [--skip-demo] [--non-interactive --yes]
|
|
3
|
+
wardby doctor
|
|
4
|
+
wardby status
|
|
5
|
+
wardby logs [--tail N] [--follow]
|
|
6
|
+
wardby down [--volumes]
|
|
2
7
|
wardby agent create --name <n> --model <m> --prompt <p> --budget <usd> [--schedule "<cron>"] [--timezone <tz>] [--max-turns <n>]
|
|
3
8
|
wardby agent list
|
|
4
9
|
wardby agent schedule <name> --cron "<expr>" [--timezone <tz>] [--disable]
|
package/dist/cli.js
CHANGED
|
File without changes
|
|
@@ -6,10 +6,35 @@ export declare const MAX_CODING_SUMMARY_BYTES: number;
|
|
|
6
6
|
export declare const MAX_CODING_TESTS = 64;
|
|
7
7
|
export declare const MAX_CODING_TEST_COMMAND_BYTES: number;
|
|
8
8
|
export declare const MAX_TAG_BYTES = 32;
|
|
9
|
+
/**
|
|
10
|
+
* A worker's output-schema failure, reduced to where and how it failed, never
|
|
11
|
+
* what the model wrote: `<path>:<zod issue code>`, where the path is dot-joined
|
|
12
|
+
* schema keys and array indices (`$` for the root). Unrecognized keys the model
|
|
13
|
+
* invented are carried only as the `unrecognized_keys` code, never by name.
|
|
14
|
+
*/
|
|
15
|
+
export declare const MAX_CODING_OUTPUT_ISSUES = 8;
|
|
16
|
+
export declare const SAFE_CODING_OUTPUT_ISSUE: RegExp;
|
|
9
17
|
export declare function normalizeGitHubRepository(value: string): string;
|
|
10
18
|
export declare function normalizeGitRef(value: string): string;
|
|
11
19
|
export declare const CodingBaseRefSchema: z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>;
|
|
12
20
|
export declare const CodingTaskOverrideSchema: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>;
|
|
21
|
+
/**
|
|
22
|
+
* A coding worker receives only its task text, so a coding agent's own
|
|
23
|
+
* instructions (its systemPrompt) travel inside that text, ahead of the
|
|
24
|
+
* request. Blank instructions leave the task unchanged. The combination must
|
|
25
|
+
* still fit MAX_CODING_TASK_BYTES; exceeding it is an error naming both parts
|
|
26
|
+
* rather than a silent truncation of either.
|
|
27
|
+
*/
|
|
28
|
+
export declare function composeCodingTask(instructions: string | null | undefined, task: string): string;
|
|
29
|
+
/**
|
|
30
|
+
* The tag only labels a pull request title, so a model's malformed tag must not
|
|
31
|
+
* sink an otherwise finished run. A tag that already passes is kept as-is; any
|
|
32
|
+
* other string becomes a lowercase slug (runs of disallowed characters to "-",
|
|
33
|
+
* no leading or trailing punctuation, at most MAX_TAG_BYTES), and one with
|
|
34
|
+
* nothing usable left, or a non-string, becomes null. GitHub finalization still
|
|
35
|
+
* re-validates whatever survives.
|
|
36
|
+
*/
|
|
37
|
+
export declare function normalizeCodingTag(value: unknown): string | null | undefined;
|
|
13
38
|
export declare const CodingTaskInputSchema: z.ZodEffects<z.ZodObject<{
|
|
14
39
|
schemaVersion: z.ZodLiteral<1>;
|
|
15
40
|
runId: z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>;
|
|
@@ -103,7 +128,7 @@ export declare const CodingAgentOutputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
103
128
|
command: string;
|
|
104
129
|
outcome: "passed" | "failed" | "skipped";
|
|
105
130
|
}>, "many">;
|
|
106
|
-
tag: z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>;
|
|
131
|
+
tag: z.ZodEffects<z.ZodEffects<z.ZodOptional<z.ZodNullable<z.ZodString>>, string | undefined, string | null | undefined>, string | undefined, unknown>;
|
|
107
132
|
}, "strict", z.ZodTypeAny, {
|
|
108
133
|
outcome: "changes_ready" | "no_changes" | "budget_exhausted";
|
|
109
134
|
schemaVersion: 1;
|
|
@@ -123,7 +148,7 @@ export declare const CodingAgentOutputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
123
148
|
command: string;
|
|
124
149
|
outcome: "passed" | "failed" | "skipped";
|
|
125
150
|
}[];
|
|
126
|
-
tag?:
|
|
151
|
+
tag?: unknown;
|
|
127
152
|
}>, {
|
|
128
153
|
tag?: string | undefined;
|
|
129
154
|
summary: string;
|
|
@@ -143,7 +168,7 @@ export declare const CodingAgentOutputSchema: z.ZodEffects<z.ZodObject<{
|
|
|
143
168
|
command: string;
|
|
144
169
|
outcome: "passed" | "failed" | "skipped";
|
|
145
170
|
}[];
|
|
146
|
-
tag?:
|
|
171
|
+
tag?: unknown;
|
|
147
172
|
}>;
|
|
148
173
|
export declare const CodingRunResultSchema: z.ZodEffects<z.ZodEffects<z.ZodObject<{
|
|
149
174
|
schemaVersion: z.ZodLiteral<1>;
|