@wardby/cli 0.5.2 → 0.5.3

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.
Files changed (68) hide show
  1. package/dist/coding/local-git.js +9 -1
  2. package/dist/coding/registry/pypi.d.ts +25 -1
  3. package/dist/coding/registry/pypi.js +140 -16
  4. package/dist/coding/registry/types.d.ts +17 -3
  5. package/dist/config/providers.d.ts +3 -2
  6. package/dist/core/http-runtime.js +13 -6
  7. package/dist/help-index.json +207 -15
  8. package/dist/mcp/auth/ownership.d.ts +1 -1
  9. package/dist/mcp/tools/agents.js +1 -1
  10. package/dist/providers/coding-proxy/mock-upstream.d.ts +33 -0
  11. package/dist/providers/coding-proxy/mock-upstream.js +116 -0
  12. package/dist/providers/coding-proxy/registry/prisma-store.d.ts +3 -0
  13. package/dist/providers/coding-proxy/registry/prisma-store.js +17 -0
  14. package/dist/providers/coding-proxy/registry/service.d.ts +4 -0
  15. package/dist/providers/coding-proxy/registry/service.js +20 -3
  16. package/dist/providers/coding-proxy/registry/store.d.ts +18 -1
  17. package/dist/providers/coding-proxy/registry/store.js +33 -0
  18. package/dist/providers/coding-proxy/runtime.js +12 -1
  19. package/dist/providers/coding-proxy/types.d.ts +2 -0
  20. package/dist/providers/jobs/kubernetes-isolation.d.ts +13 -0
  21. package/dist/providers/jobs/kubernetes-isolation.js +52 -5
  22. package/dist/providers/jobs/kubernetes.d.ts +20 -6
  23. package/dist/providers/jobs/kubernetes.js +43 -32
  24. package/dist/providers/llm/openai.js +0 -1
  25. package/dist/quickstart/coding-db.js +14 -2
  26. package/dist/quickstart/coding-doctor.d.ts +3 -0
  27. package/dist/quickstart/coding-doctor.js +3 -0
  28. package/dist/quickstart/coding-images.d.ts +9 -0
  29. package/dist/quickstart/coding-images.js +39 -0
  30. package/dist/quickstart/coding-seed.d.ts +13 -1
  31. package/dist/quickstart/coding-seed.js +25 -7
  32. package/dist/quickstart/coding.d.ts +2 -0
  33. package/dist/quickstart/coding.js +75 -3
  34. package/dist/quickstart/config.d.ts +2 -0
  35. package/dist/quickstart/config.js +4 -0
  36. package/dist/quickstart/images.d.ts +11 -0
  37. package/dist/quickstart/images.js +74 -12
  38. package/dist/quickstart/index.d.ts +0 -2
  39. package/dist/quickstart/index.js +10 -14
  40. package/dist/quickstart/manifests.d.ts +56 -0
  41. package/dist/quickstart/manifests.js +523 -0
  42. package/dist/quickstart/python-detect.d.ts +10 -0
  43. package/dist/quickstart/python-detect.js +32 -0
  44. package/dist/quickstart/repo-packages.d.ts +10 -0
  45. package/dist/quickstart/repo-packages.js +132 -0
  46. package/dist/quickstart/reviewer-prompt.d.ts +12 -0
  47. package/dist/quickstart/reviewer-prompt.js +84 -0
  48. package/dist/quickstart/scenarios.d.ts +19 -0
  49. package/dist/quickstart/scenarios.js +28 -0
  50. package/dist/quickstart/sync-reviewer-prompt.d.ts +1 -0
  51. package/dist/quickstart/sync-reviewer-prompt.js +10 -0
  52. package/dist/quickstart-images.json +1 -1
  53. package/dist/viewer/api-schema.d.ts +4 -4
  54. package/docs/coding-agent-setup.md +17 -0
  55. package/docs/coding-packages.md +101 -3
  56. package/docs/coding-worker-byo-images.md +47 -2
  57. package/docs/coding-worker-isolation.md +20 -9
  58. package/docs/getting-started.md +139 -11
  59. package/docs/knowledge.md +11 -0
  60. package/help/architecture-agent.md +136 -0
  61. package/help/build-worker-image.md +198 -0
  62. package/help/coding-packages.md +31 -2
  63. package/help/creating-agents.md +14 -0
  64. package/help/deploy-gke.md +29 -5
  65. package/help/deployment-targets.md +3 -3
  66. package/help/getting-started.md +19 -0
  67. package/help/local-repositories.md +36 -5
  68. package/package.json +3 -2
@@ -3,7 +3,7 @@ id: coding-packages
3
3
  title: Approve packages for coding agents
4
4
  summary: Let Codex coding workers install vetted npm and PyPI dependencies through Wardby's registry proxy.
5
5
  audience: operator
6
- tags: [coding-agents, packages, npm, pypi, supply-chain, refusals, lockfile]
6
+ tags: [coding-agents, packages, npm, pypi, supply-chain, refusals, lockfile, extras, pip-extras]
7
7
  appliesTo: >=0.2.1
8
8
  ---
9
9
 
@@ -35,8 +35,37 @@ if its own checks failed. A package reachable only through a refused one is
35
35
  refused too, so a high-severity advisory deep in a toolchain blocks every run
36
36
  that installs it.
37
37
 
38
+ ## PyPI extras
39
+
40
+ A PyPI entry may name extras, as pip does: `psycopg[binary]`,
41
+ `uvicorn[standard]>=0.30`. An extra allows only the dependencies that
42
+ package's own metadata declares under that extra (for `psycopg[binary]`, the
43
+ `psycopg-binary` wheel); a bare `psycopg` entry follows no extra, so
44
+ `psycopg-binary` is refused with `wardby_package_not_allowed`. A plain entry
45
+ follows no extras at all, its own or its dependencies': a plain `fastapi`
46
+ whose metadata asks for `uvicorn[standard]` gets bare `uvicorn` only. Extras a
47
+ dependency line names are followed only below an entry that names extras
48
+ (`fastapi[standard]`), once the proxy has served that parent's metadata: if
49
+ an extra's packages are still refused with `403 wardby_package_not_allowed`,
50
+ name the extra on the allowlist directly (`uvicorn[standard]`). Every
51
+ safeguard still applies to what an extra adds. Extras need the coding proxy
52
+ and control plane on the same Wardby version: a proxy from before extras
53
+ support cannot load an allowlist with a `name[extra]` entry, so every registry
54
+ request of that run fails; and once a profile stores an extras entry, do not
55
+ downgrade below the release that added extras.
56
+
57
+ The quickstart's coding step offers the packages a local repository declares
58
+ (`package.json`, `pyproject.toml` including its build-system packages,
59
+ `requirements*.txt`, keeping Python extras such as `psycopg[binary]`) as
60
+ `local-builder`'s allowlist after asking, or with `--allow-repo-packages` in a non-interactive
61
+ run. See [Local repositories](local-repositories.md).
62
+
63
+ > Re-running the quickstart replaces `local-builder`'s package allowlist with
64
+ > what the repository declares (or empties it), discarding any packages you
65
+ > added with `update_agent`; re-add them after a re-run.
66
+
38
67
  Review agents see the pull request's CI results in `repo_pr_read` and are
39
68
  told to trust CI over the sandbox's **Tests**.
40
69
 
41
70
  Read [`docs/coding-packages.md`](../docs/coding-packages.md) for allowlist
42
- syntax, package-policy controls, lockfile behavior, and refusal errors.
71
+ syntax (including [PyPI extras](../docs/coding-packages.md#pypi-extras)), package-policy controls, lockfile behavior, and refusal errors.
@@ -59,6 +59,20 @@ separately; a missing one fails the run itself at dispatch, not
59
59
  `create_agent`/`update_agent`. See [Models and pricing](models.md) and
60
60
  [Model not available](errors/model-unavailable.md).
61
61
 
62
+ ## Run it on a schedule
63
+
64
+ Give an agent a cron schedule with `set_schedule` (`agentId`, `schedule` such
65
+ as `0 6 * * 1`, and `timezone`), and turn it off with `disable_schedule`. A
66
+ coding agent needs a `codingProfile.defaultTask` first, since a scheduled run
67
+ has no one to pass a task. A native agent's system prompt is its task. Trigger
68
+ the agent once with `trigger_agent` and check the result before scheduling it.
69
+
70
+ Schedules fire only while a Wardby scheduler runs: `wardby serve`, or
71
+ `wardby scheduler` next to `wardby mcp`. On a quickstart install, start
72
+ `npx @wardby/cli@latest scheduler` from the project directory and keep it
73
+ running; the MCP server your assistant starts never fires schedules. See
74
+ [Operate managed agents](operating-agents.md).
75
+
62
76
  ## Decision checklist
63
77
 
64
78
  Choose a native agent when all of these are true:
@@ -11,8 +11,9 @@ appliesTo: >=0.2.1
11
11
 
12
12
  The supported Google Cloud deployment creates a GKE Autopilot cluster, private
13
13
  Cloud SQL for PostgreSQL, Artifact Registry, HTTPS Gateway, Google Secret
14
- Manager synchronization, and isolated gVisor-backed **Codex** coding-worker
15
- pods. It also applies namespace RBAC and default-deny network policies.
14
+ Manager synchronization, and isolated gVisor-backed coding-worker pods for
15
+ Codex and Claude Code. It also applies namespace RBAC and default-deny network
16
+ policies.
16
17
 
17
18
  Use a dedicated billed project, a hostname you control, remote Terraform state,
18
19
  and a GitHub App installed only on repositories that agents need. Review
@@ -37,9 +38,32 @@ already write the tables and columns it adds (such as per-model usage for
37
38
  [cost attribution](cost-attribution.md), or a run's live turn count). Until the
38
39
  grants are applied, the coding proxy's writes are refused and coding runs fail.
39
40
 
40
- Claude Code's two-container executor is currently Docker-only; Kubernetes
41
- coding workers use the Codex path. Configure an identity provider and GitHub
42
- App before allowing people to use the public endpoint.
41
+ The Kubernetes launcher runs Codex and Claude Code coding workers; a Claude
42
+ Code pod adds a tool-runner sidecar with its own image. Configure an identity
43
+ provider and GitHub App before allowing people to use the public endpoint.
44
+
45
+ ## Plan it with your assistant
46
+
47
+ If you are an assistant connected to Wardby over MCP and the user asked to plan
48
+ a GKE deployment, produce a written plan; do not create cloud resources. Read
49
+ [Choose a deployment target](deployment-targets.md) first and confirm GKE is
50
+ the right target. Then ask for, one at a time, and record:
51
+
52
+ 1. The Google Cloud project (dedicated, with billing) and region, and who
53
+ holds the IAM roles to apply Terraform.
54
+ 2. The public hostname and who controls its DNS.
55
+ 3. The identity provider for people signing in (see
56
+ [Configure identity and privileged access](identity-and-access.md)).
57
+ 4. The GitHub App: which repositories it is installed on (see
58
+ [Connect GitHub repositories](github.md)).
59
+ 5. Which coding providers the agents use (Codex, Claude Code or both), and
60
+ which provider keys and worker images that needs.
61
+ 6. Where Terraform state lives, and the monthly cloud budget and alerts.
62
+ 7. Optional: Jira.
63
+
64
+ The plan lists those answers, the ordered steps above with the values filled
65
+ in, the commands the user will run themselves, and the open questions. Point
66
+ the user to the full guide below for every step.
43
67
 
44
68
  Follow the complete, ordered guide at
45
69
  [`docs/getting-started-gke.md`](../docs/getting-started-gke.md). It includes
@@ -19,9 +19,9 @@ Wardby has one local path and two production-ready deployment shapes:
19
19
  identity provider. The Compose and Caddy configuration is a reference
20
20
  baseline, not a managed platform.
21
21
  - **Google Kubernetes Engine Autopilot:** the supported Google Cloud path. It
22
- provisions GKE, private-IP Cloud SQL, Artifact Registry, isolated Codex
23
- workers, HTTPS Gateway, and GCP-native secret and network controls. See
24
- [Deploy on GKE](deploy-gke.md).
22
+ provisions GKE, private-IP Cloud SQL, Artifact Registry, isolated Codex and
23
+ Claude Code workers, HTTPS Gateway, and GCP-native secret and network
24
+ controls. See [Deploy on GKE](deploy-gke.md).
25
25
 
26
26
  AWS is supported as a portable runtime target and has a Bedrock Claude adapter,
27
27
  but Wardby does not ship a native AWS deployment module. Other cloud providers
@@ -30,6 +30,11 @@ Claude Code. Run `wardby doctor` afterwards to verify the local installation.
30
30
  Review that branch with
31
31
  `trigger_agent {"agentId": "<reviewer id>", "review": {"branch": "wardby/run-<run id>"}}`.
32
32
  You need Docker and an OpenAI key (Codex) or an Anthropic key (Claude Code).
33
+ For a Python project (a root `pyproject.toml`, `setup.py`, `setup.cfg`,
34
+ `Pipfile` or `requirements*.txt`), the builder gets a Node + Python 3.12
35
+ workspace and can run `pytest`. Quickstart also offers the packages the
36
+ repository declares as the builder's package allowlist, so it can install
37
+ them (`--allow-repo-packages` in a non-interactive run).
33
38
  See [Use local git repositories](local-repositories.md).
34
39
  - **B. A coding agent that opens GitHub pull requests.** Do A first. Then
35
40
  install a GitHub App on the repository (Contents and Pull requests: read and
@@ -42,6 +47,20 @@ Claude Code. Run `wardby doctor` afterwards to verify the local installation.
42
47
  with webhooks, link a native agent to the repository with the `pull_request`
43
48
  trigger, and open a pull request. See [Code review agents](code-review-agents.md).
44
49
 
50
+ - **D. Another language (Go, Java, Rust…).** Do A with Codex, then build a
51
+ worker image with that toolchain on the base image `wardby doctor` prints,
52
+ and set the builder's `codingProfile.workerImageRef`. Ask your assistant
53
+ "Help me build a Wardby worker image for Go"; it follows
54
+ [Build a custom worker image](build-worker-image.md). Codex agents only.
55
+
56
+ The quickstart ends with a menu of next steps to ask your assistant: run the
57
+ builder and reviewer, allow more packages, build a worker image, schedule an
58
+ agent, set up an architecture reviewer and keeper (see
59
+ [Set up an architecture agent](architecture-agent.md), which has a
60
+ local-repository variant), or plan a GKE deployment
61
+ ([Deploy on GKE](deploy-gke.md)). Each names the help article the assistant
62
+ follows.
63
+
45
64
  The full step-by-step guide is "Choose what to set up next" in
46
65
  [`docs/getting-started.md`](../docs/getting-started.md).
47
66
 
@@ -135,14 +135,42 @@ then:
135
135
  `CODING_CLAUDE_WORKER_IMAGE` plus `CODING_CLAUDE_TOOL_RUNNER_IMAGE`, override
136
136
  them with your own digests;
137
137
  - starts the coding proxy and runs the coding preflight;
138
+ - detects Python projects: if the repository's committed root holds
139
+ `pyproject.toml`, `setup.py`, `setup.cfg`, `Pipfile` or a `requirements*.txt`,
140
+ `local-builder` gets a Node + Python 3.12 workspace (`toolchain: node-python`)
141
+ for Codex and Claude Code, with `pytest` and `ruff`, so it can run the tests.
142
+ The images come from `CODING_WORKER_IMAGE_NODE_PYTHON_3_12` (Codex) and
143
+ `CODING_CLAUDE_TOOL_RUNNER_IMAGE_NODE_PYTHON_3_12` (Claude Code); set them to
144
+ override. If this version has no Python image, quickstart says so and the
145
+ builder uses the Node workspace (it can edit but not run Python tests). Other
146
+ languages need a bring-your-own image via `workerImageRef`, which is
147
+ Codex-only today: Claude Code agents cannot use a custom toolchain yet. See
148
+ the BYO worker images guide in the long-form docs;
138
149
  - finds the repository: a trusted folder that is a git repository, or the
139
150
  repositories directly inside a trusted folder (hidden folders are skipped).
140
151
  With several it asks which to use; non-interactively it uses the first in
141
152
  sorted order and prints the choice. Re-run with `--trust <repo>` to pick
142
153
  another: folders passed on a run take precedence over saved ones;
154
+ - offers the packages the repository declares (`package.json` dependencies,
155
+ `pyproject.toml` dependencies including optional groups and Poetry, with
156
+ Poetry's legacy `[tool.poetry.dev-dependencies]`, the `[build-system]
157
+ requires` build packages (or `setuptools` and `wheel` when there is no
158
+ `[build-system]` table), and
159
+ `requirements*.txt`, read from the committed root) as `local-builder`'s
160
+ package allowlist: names without versions (Python extras such as
161
+ `psycopg[binary]` are kept), up to 200 per ecosystem. It lists them
162
+ and asks "Allow local-builder to install these packages through Wardby's
163
+ registry? [Y/n]"; every registry safeguard still applies. If you decline, or
164
+ run non-interactively without `--allow-repo-packages`, the allowlist stays
165
+ empty: add packages later with `update_agent` and
166
+ `codingProfile.packageAllowlist`. A re-run replaces the allowlist with what
167
+ the repository declares now. A manifest quickstart cannot read is skipped
168
+ with a note. See [Approve packages for coding agents](coding-packages.md);
143
169
  - creates `local-builder` (a coding agent, $2 budget) and `local-reviewer`
144
- (a review agent, $1 budget) for the repository and prints the two
145
- `trigger_agent` calls to try; and
170
+ (a review agent, $1.50 budget, on Claude Sonnet 5 or `gpt-5.6-terra` by
171
+ default, with the thorough review prompt quoted in
172
+ [Set up an architecture agent](architecture-agent.md#reviewer-system-prompt))
173
+ for the repository and prints the two `trigger_agent` calls to try; and
146
174
  - if the repository has no `.wardby/services.yaml`, offers a starter one with
147
175
  PostgreSQL and/or Redis. It is committed to the branch
148
176
  `wardby/quickstart-services` without touching your working tree. Merge that
@@ -151,11 +179,14 @@ then:
151
179
  branch" is whichever branch is checked out when quickstart runs.
152
180
 
153
181
  Flags: `--coding` (run the step), `--no-coding` (skip it), `--trust <dir>`
154
- (repeatable), `--coding-provider codex|claude-code` and
155
- `--starter-services postgres,redis|none`. In `--non-interactive` mode the step
182
+ (repeatable), `--coding-provider codex|claude-code`,
183
+ `--starter-services postgres,redis|none` and `--allow-repo-packages` (or
184
+ `--no-allow-repo-packages`). In `--non-interactive` mode the step
156
185
  only runs with `--coding`, and it needs at least one `--trust`. `doctor` and
157
186
  `status` report the trusted folders, worker image, coding proxy and each local
158
- agent's repository, and `down` stops the proxy with the database.
187
+ agent's repository, and `down` stops the proxy with the database. Quickstart
188
+ ends with a menu of next things to ask your assistant, each naming the help
189
+ article it follows; see [Get started](getting-started.md).
159
190
 
160
191
  ## Errors
161
192
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wardby/cli",
3
- "version": "0.5.2",
3
+ "version": "0.5.3",
4
4
  "description": "Self-hosted control plane for budget-guarded AI agents.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/wardby/wardby#readme",
@@ -56,6 +56,7 @@
56
56
  "format:check": "prettier --check .",
57
57
  "build:vendor": "node scripts/build-sandbox-vendor.mjs",
58
58
  "build:help": "tsx src/help/build.ts",
59
+ "sync:reviewer-prompt": "tsx src/quickstart/sync-reviewer-prompt.ts",
59
60
  "build:viewer-schemas": "tsx src/viewer/build-schemas.ts",
60
61
  "build": "npm run build:vendor && PRISMA_HIDE_UPDATE_MESSAGE=1 prisma generate && tsc -p tsconfig.build.json && npm run build:help",
61
62
  "prepare": "npm run build:vendor && PRISMA_HIDE_UPDATE_MESSAGE=1 prisma generate",
@@ -110,7 +111,7 @@
110
111
  "gpt-tokenizer": "^2.5.0",
111
112
  "jose": "^6.2.12",
112
113
  "node-html-parser": "^9.0.3",
113
- "openai": "^4.67.0",
114
+ "openai": "7.30.0",
114
115
  "papaparse": "^5.7.0",
115
116
  "pg": "8.23.0",
116
117
  "pino": "^9.14.0",