@devtune/agentpicks 0.2.0 → 0.3.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.
Files changed (4) hide show
  1. package/README.md +224 -10
  2. package/dist/cli.js +81183 -70065
  3. package/package.json +5 -2
  4. package/schema/setup.v1.json +521 -0
package/README.md CHANGED
@@ -7,6 +7,8 @@ Apache-2.0.
7
7
  ```sh
8
8
  npx @devtune/agentpicks login
9
9
  npx @devtune/agentpicks run --category error-tracking --stack nextjs
10
+ npx @devtune/agentpicks init # writes a setup file, such as agentpicks/error-tracking.yaml
11
+ npx @devtune/agentpicks run error-tracking # runs agentpicks/error-tracking.yaml; see Setups
10
12
  npm install -g @devtune/agentpicks # then: agentpicks run ...
11
13
  ```
12
14
 
@@ -15,7 +17,7 @@ npm install -g @devtune/agentpicks # then: agentpicks run ...
15
17
  - Docker, running. Each run uses a fresh container with 2 CPUs and 4 GB of memory, needs 20 GB free on Docker's disk and may write up to 15 GB there. The image is built for your machine's own architecture, x86_64 or arm64, so nothing is emulated.
16
18
  - Node.js 20 or later.
17
19
  - A coding agent installed and signed in: Claude Code, Codex, OpenCode or Pi.
18
- - To upload, a DevTune project API key with the Agent Picks Run scope, on an Agent Picks Local Runner, Cloud or Enterprise plan. See [Upload](#upload). `--no-upload` needs neither.
20
+ - To upload, a DevTune sign-in or project API key with the Agent Picks Run scope, on an Agent Picks Local Runner, Cloud or Enterprise plan. See [Upload](#upload). `--no-upload` needs neither.
19
21
 
20
22
  ## Run
21
23
 
@@ -34,7 +36,9 @@ agentpicks run --category error-tracking --repo .
34
36
  | `--agent` | `claude-code`, `codex`, `opencode` or `pi`. Required when several are installed. |
35
37
  | `--model` | The model to ask for. OpenCode and Pi take `anthropic/<model>` or `openai/<model>`. |
36
38
  | `--out` | Where bundles go. Default `./agentpicks-runs`. |
37
- | `--no-upload` | Keep bundles on this machine only. Send them later with `agentpicks upload`. |
39
+ | `--no-upload` | Keep bundles on this machine only. Send them later with `agentpicks upload`, except a custom setup's (see [Setups](#setups)). |
40
+
41
+ `agentpicks --help`, or `--help` after any command, prints the usage and exits successfully.
38
42
 
39
43
  Each run asks the category's `add` request. An unknown category, stack or agent is refused with the valid values. Cursor is refused: there is no capture for its runs yet.
40
44
 
@@ -81,21 +85,41 @@ Claude Code on macOS keeps its sign-in in the Keychain, which `agentpicks` never
81
85
 
82
86
  ```sh
83
87
  agentpicks login
84
- agentpicks login --project <project id>
88
+ agentpicks login --no-browser
89
+ agentpicks login --api-key [--project <project id>]
85
90
  agentpicks upload ./agentpicks-runs
86
91
  agentpicks upload ./agentpicks-runs/<run id>
87
92
  ```
88
93
 
89
- `agentpicks login` reads a project API key from standard input: paste it at the prompt, which doesn't echo it, or pipe it in. Create the key under **API Keys** in DevTune, with the **Agent Picks Run** scope. `login` asks DevTune which project the key belongs to, which needs the key's Project Read scope too; with `--project`, it saves the key for that project without asking. The key and project are saved to `agentpicks/credentials.json` under `$XDG_CONFIG_HOME`, or else `%APPDATA%` on Windows and `~/.config` elsewhere, in a file with mode 0600, so only your user can read it. `agentpicks` never prints the key.
94
+ `agentpicks login` signs in to DevTune in your browser, where you choose the project and approve its scopes. Uploading needs Agent Picks Run; `login` prints every scope the sign-in holds. If no browser opens, or with `--no-browser`, it prints the address: open it in a browser on the same machine. The sign-in is renewed when it expires. Before anything starts, `run` and `upload` ask DevTune what the sign-in may do now, and stop, saying to log in again, if DevTune refuses to renew it or it lacks Agent Picks Run. If DevTune can't be reached or is briefly unavailable, they warn and carry on, and the upload checks again. If a renewal's answer is lost, so DevTune may have renewed the sign-in without `agentpicks` saving it, they stop; run `login` again. A sign-in revoked during a long `run`, or one DevTune no longer renews, is refused at upload, and the bundle stays on disk. Uploads act as the signed-in member, who needs DevTune management permission on the account and edit rights on the project.
95
+
96
+ `agentpicks login --api-key` reads a project API key from standard input instead: paste it at the prompt, which doesn't echo it, or pipe it in. Create the key under **API Keys** in DevTune, with the **Agent Picks Run** scope. `login` asks DevTune which project the key belongs to, which needs the key's Project Read scope too; with `--project`, it saves the key for that project without asking.
97
+
98
+ Either login is saved to `agentpicks/credentials.json` under `$XDG_CONFIG_HOME`, or else `%APPDATA%` on Windows and `~/.config` elsewhere, in a file with mode 0600, so only your user can read it, and replaces the other. `agentpicks` never prints a key or token.
90
99
 
91
- In CI, set `DEVTUNE_API_KEY` and `DEVTUNE_PROJECT_ID` instead: they override the saved login. `DEVTUNE_API_BASE_URL` sets the API address, default `https://devtune.ai/api/v2`. These are the names the `devtune` CLI reads.
100
+ In CI, set `DEVTUNE_API_KEY` and `DEVTUNE_PROJECT_ID` instead: they override the saved login. Without `DEVTUNE_API_KEY`, a saved sign-in is used only for its own API address and project. `DEVTUNE_API_BASE_URL` sets the API address, default `https://devtune.ai/api/v2`. These are the names the `devtune` CLI reads.
92
101
 
93
- `run` checks for a key before anything starts, and refuses without one. Once a run's bundle is written, `run` lists its files, their sizes and the redactions, then uploads it: the manifest to DevTune, and each artifact straight to storage. It prints the run id and the upload's API address. If DevTune refuses the upload, `run` prints DevTune's reason and the command that sends the bundle later, and starts no further runs. The bundle stays on disk either way.
102
+ `run` checks for a sign-in or key before anything starts, and refuses without one. Once a run's bundle is written, `run` lists its files, their sizes and the redactions, then uploads it: the manifest to DevTune, and each artifact straight to storage. It prints the run id and the upload's API address. If DevTune refuses the upload, `run` prints DevTune's reason and the command that sends the bundle later, and starts no further runs. The bundle stays on disk either way.
94
103
 
95
104
  A `--repo` run needs the repository to have a remote that `agentpicks` records (see [The bundle](#the-bundle)), since DevTune groups a repository's runs by its remote. Without one, `run` refuses before anything starts; add an `origin` remote, or pass `--no-upload`.
96
105
 
97
106
  `agentpicks upload` takes one bundle directory, or the `--out` directory of `run`, and uploads every bundle in it. Uploading a bundle again is safe: an upload that stopped partway sends only the artifacts DevTune hasn't stored, and one that completed is left as it is. A bundle whose files changed after it was written is refused before anything is sent.
98
107
 
108
+ ### Results
109
+
110
+ ```sh
111
+ agentpicks results
112
+ agentpicks results ./agentpicks-runs ./ci-runs --json
113
+ ```
114
+
115
+ `agentpicks results` prints a row for each run in `./agentpicks-runs`, or the directories named: its run id, setup or category, agent, model and pick, then how many runs in each setup picked each tool. The pick is read from the bundle with the early-stop patterns the run recorded, in the order the early stop checks them: the packages the agent added that the patterns name, else the first added line of code they match, else a config file the agent created that they match. The pick shows the package names, the code or the file, not a tool name. A run with no pick shows `none`. A run shows `Unmeasured`, with the reason printed under the counts, when:
116
+
117
+ - its bundle fails its checks, or was written before `agentpicks` recorded a run's early-stop patterns;
118
+ - a check is unread, because its package files or diff weren't captured or the diff was cut at its size limit, and no check before it found a pick;
119
+ - the early stop saw a pick during the run that the final files no longer show by the same check: a package for an install, or code or a config file for code. `--json` prints the rows as JSON. A directory with no bundle in it exits 1.
120
+
121
+ What an agent said it picked, and rates across runs, come from DevTune's analysis of an uploaded run.
122
+
99
123
  ### Clean up
100
124
 
101
125
  ```sh
@@ -104,6 +128,196 @@ agentpicks cleanup
104
128
 
105
129
  Removes every container and image `agentpicks` made: all are labelled `dev.devtune.agentpicks`. The sandbox image is built from `docker/Dockerfile` the first time, tagged with this package's version; building a new version's image removes the older ones.
106
130
 
131
+ ## Setups
132
+
133
+ A setup is what you test, kept as a YAML file in your repository: one file per setup in the `agentpicks` folder at the repository root (the git root above where you run `agentpicks`). A setup's name is its file name without `.yaml` or `.yml`.
134
+
135
+ ```sh
136
+ agentpicks init
137
+ agentpicks init --yes
138
+ ```
139
+
140
+ `agentpicks init` writes a setup file from a few questions. Each shows its default in brackets, and Enter takes it:
141
+
142
+ - **Job**: a built-in category, which the file inherits with `from:`, or a job line of your own. The default is the category of your tool.
143
+ - **Your tool**: a catalogue tool named by your `package.json` name or scope, or your git remote's repository or owner, such as `sentry` from `getsentry/sentry-docs`.
144
+ - **Competitors**: for a category, its tools; for your own job, typed as npm packages.
145
+ - **Where to test**: `repo: .` in a git repository, else the stacks your `package.json` and lockfiles name (`next`, `@tanstack/react-start`, `@sveltejs/kit` and `express`, a pnpm monorepo's apps included, plus FastAPI and Rails).
146
+ - **Agents**: those installed here that `run` could start now, with their sign-in or key.
147
+ - **Runs** and the setup's **name**.
148
+
149
+ For a custom setup, run `agentpicks push <setup>` before running it with uploads.
150
+
151
+ Signed in with `agentpicks login`, or with `DEVTUNE_API_KEY` and `DEVTUNE_PROJECT_ID` set, a job of your own is drafted by DevTune: its requests, its competitors, and each tool's packages and config names. Drafts count against your project's hourly draft allowance. If DevTune refuses a draft or can't be reached, `init` prints one warning and asks for the rest itself.
152
+
153
+ `init` checks the file as `validate` does before writing it; on a terminal it asks again until the file passes. It won't replace a setup of the same name without `--force`. `--yes` takes every default without asking, and fails, naming what it couldn't detect, when there's no default for the job or where to test. Off a terminal, `init` needs `--yes`.
154
+
155
+ `agentpicks/error-tracking.yaml` tests the built-in error tracking category:
156
+
157
+ ```yaml
158
+ job: Add error tracking
159
+ from: error-tracking
160
+ stacks: [nextjs]
161
+ ```
162
+
163
+ `agentpicks/feature-flags.yaml` tests a job of your own:
164
+
165
+ ```yaml
166
+ job: Add feature flags
167
+ requests:
168
+ add: Add feature flags to this app, and put a new checkout page behind one.
169
+ tools:
170
+ own:
171
+ key: acme-flags
172
+ name: Acme Flags
173
+ domain: acme.dev
174
+ signals:
175
+ packages:
176
+ npm: ['@acme/flags']
177
+ configNames: [ACME_FLAGS_KEY]
178
+ competitors:
179
+ - key: launchdarkly
180
+ name: LaunchDarkly
181
+ domain: launchdarkly.com
182
+ signals:
183
+ packages:
184
+ npm: ['@launchdarkly/node-server-sdk', launchdarkly-node-server-sdk]
185
+ configNames: [LAUNCHDARKLY_SDK_KEY]
186
+ stacks: [nextjs, express]
187
+ agents: [claude-code, codex]
188
+ runs: 3
189
+ ```
190
+
191
+ | Field | |
192
+ |---|---|
193
+ | `job` | The job line, which labels the setup; a run asks `requests.add`. Required without `from`. |
194
+ | `from` | A built-in category, as `--category` takes it. The setup inherits its job, requests and tools. |
195
+ | `requests` | One request per intent: `add`, `recommend`, `hosted` and `improve`, each one line of 8 to 300 characters that names none of the setup's own tools. A run asks `add`, which a setup without `from` must give. With `from`, `null` leaves out the category's request of that intent, except `add`. |
196
+ | `tools` | `own`, your tool, and `competitors`. Each is a tool key of the `from` category (`sentry`), or a full entry: `key`, `name` and `signals`, and optionally `domain`. A full entry's key can't be one of the `from` category's. A setup without `from` needs at least one tool, each a full entry, and at least one package or config name on a tool that doesn't yield to another tool in the setup. |
197
+ | `signals` | How a tool is recognised: `packages` by `npm`, `pypi` or `gem` (a name ending in `*` matches every package that starts with the text before the `*`, and one ending in `/` every package under that scope or path, so `@acme/` matches `@acme/flags`), `configNames` (environment variable names or API hosts, not starting with `-`), and `importPatterns`, `configFiles`, `configPatterns`, `commandPatterns`, `selfHosted` (patterns of up to 200 characters that RE2 compiles), `aliases`, `brandDomains`, `frameworkBuiltIn`, `yieldsTo` and `receivesFrom`. Give at least one package, config name or pattern. Tools can't yield to each other in a loop. |
198
+ | `stacks` | Starter apps to test in, as `--stack` takes them, each once. A setup without `from` can't use `nextjs-github-actions`, `fastapi-aws` or `rails-own-servers-eu`, which run in some categories only or carry a deploy context. |
199
+ | `repo` | Your repository, in place of `stacks`: a path relative to the repository root, such as `.`, or `path` and `ref`. |
200
+ | `agents` | `claude-code`, `codex`, `opencode` or `pi`, each once and installed on the machine that runs it. Without `agents`, the one agent installed runs. |
201
+ | `runs` | Runs per agent and stack. Default 1. |
202
+ | `id` | The DevTune setup the file is linked to. `pull` and `push` write it. |
203
+ | `synced` | What the file and its DevTune setup held when they last matched: `setup`, the setup's digest, and `file`, the file's. `pull` and `push` write it; don't edit it. |
204
+
205
+ `schema/setup.v1.json` in this package is the file's JSON Schema. An editor with YAML support completes and checks a setup file against it, for example with a first line `# yaml-language-server: $schema=<path or URL of setup.v1.json>`.
206
+
207
+ ```sh
208
+ agentpicks run feature-flags --no-upload
209
+ agentpicks run agentpicks/feature-flags.yaml --agent codex --runs 1 --no-upload
210
+ agentpicks run
211
+ ```
212
+
213
+ `agentpicks run <setup>` takes the setup's name or the path of its file. Each run asks the setup's `add` request, once per agent and stack. Claude Code's early stop watches for the `from` category's tools and for the package and config names of the setup's own tools; a tool that yields to another tool in the setup (`yieldsTo`) doesn't stop it. Flags override the file: `--stack` or `--repo` replaces its stacks or repo, `--ref` its commit, `--agent` its agents, and `--runs` its runs. `--model` sets one agent's model, so a setup with several agents needs `--agent` with it. On a terminal, `agentpicks run` with no setup and no `--category` lists the setups and asks which to run.
214
+
215
+ A setup file linked to a DevTune setup (it has an `id`) uploads under that setup. An unlinked setup `from` a category, with no requests or tool signals of its own, uploads as that category. Naming the category's tools under `tools` doesn't change that. Any other setup is custom, and can't share its name with a built-in category: until `agentpicks push` saves it to DevTune, `run` refuses to start it without `--no-upload`, and `upload` refuses its bundles. A run of a linked file whose DevTune setup is gone is refused before it starts, and so is a run of a linked file with changes not pushed (push it first) or whose DevTune setup changed since the file last saw it (pull it first). DevTune refuses an upload whose prompt isn't its setup's current request, as `prompt_mismatch`. With `--no-upload`, such a run's bundles record the unpushed changes, and `upload` refuses them.
216
+
217
+ ```sh
218
+ agentpicks list
219
+ agentpicks validate
220
+ agentpicks validate feature-flags agentpicks/error-tracking.yaml
221
+ ```
222
+
223
+ `agentpicks list` prints each setup's name, job, `from`, stacks or repo, agents and runs, and flags a file that fails its checks. Signed in, it also lists the project's DevTune setups, with where each setup is (`local`, `DevTune` or `both`) and, for a linked file, whether it is in sync or which side changed. `agentpicks validate` checks every setup file, or the ones named, against the schema and the catalogue: a known `from`, tool keys of that category, stacks it runs in, known agents, signals for every full tool entry, and the limits above. With no setup named, two files with one name, such as `x.yaml` and `x.yml`, both fail; a file named by path is checked alone, as `run <path>` runs it. It prints each problem as `file: field: fix` and exits 1 if any file fails, so CI can run it.
224
+
225
+ ### DevTune setups
226
+
227
+ ```sh
228
+ agentpicks pull
229
+ agentpicks pull feature-flags --force
230
+ agentpicks push feature-flags
231
+ agentpicks run add-feature-flags
232
+ ```
233
+
234
+ `agentpicks pull` writes each of the project's DevTune setups to `agentpicks/<name>.yaml`, or into the file already linked to it, with its `id` and `synced`; `pull <setup>` writes one. It leaves a file in sync alone, and refuses to replace a file with changes not yet pushed, or an unlinked file of that name, unless you pass `--force`. A setup's name is its `from` category for an unedited copy of one, else its job line in lowercase with dashes.
235
+
236
+ `agentpicks push` saves every setup file to DevTune, and `push <setup>` one. A new file becomes a new DevTune setup, and push writes its `id` and `synced` into the file. A linked file in sync sends nothing. If the DevTune setup changed since the file last saw it, push refuses with `setup_changed` and saves nothing: pull it, apply your changes again, and push. A setup `from` a category saves as the project's setup of that category, its tools by key; a setup without `from` saves as a job. To add your own tool to a category copy, add it in the DevTune app, then run `agentpicks pull`: pull writes it as a full entry, and push refuses a full entry DevTune doesn't hold as written. DevTune doesn't send the signals of its catalogue's tools, so a job that measures one can't be pulled or pushed; change it in the DevTune app. What a file can't say, such as agent models and a job's building blocks, push sends as DevTune holds it. For a new file with `repo`, push detects the repository's stacks from its manifests and lockfiles and saves those to DevTune. The file keeps `repo`, so `run <setup>` still tests your repository. If no supported stack is detected, replace `repo` with `stacks` before pushing and pass `--repo` when running. A linked file with `repo` keeps the stacks DevTune already holds.
237
+
238
+ `agentpicks run <name>` also runs a DevTune setup that has no file here, by the name `list` shows. Its runs upload under that setup.
239
+
240
+ `list`, `pull` and `run <name>` need the sign-in to read DevTune (Visibility Read), and `push` to edit setups (Actions Write); `agentpicks login` asks for both.
241
+
242
+ ## GitHub Actions
243
+
244
+ The `devtunehq/agentpicks` action runs a setup in your workflow and uploads each run to your DevTune project. Commit the setup file to your repository (see [Setups](#setups)), such as `agentpicks/error-tracking.yaml`, then name it in `setup`.
245
+
246
+ This workflow runs that setup with Claude Code every Monday:
247
+
248
+ ```yaml
249
+ name: Agent Picks
250
+ on:
251
+ schedule:
252
+ - cron: '0 6 * * 1'
253
+ workflow_dispatch:
254
+
255
+ permissions:
256
+ contents: read
257
+
258
+ jobs:
259
+ agentpicks:
260
+ runs-on: ubuntu-latest
261
+ steps:
262
+ - uses: actions/checkout@v5
263
+ - run: npm install -g @anthropic-ai/claude-code@2.1.323
264
+ - uses: devtunehq/agentpicks@v0.3.0
265
+ with:
266
+ setup: agentpicks/error-tracking.yaml
267
+ agent: claude-code
268
+ devtune-api-key: ${{ secrets.DEVTUNE_API_KEY }}
269
+ devtune-project-id: ${{ vars.DEVTUNE_PROJECT_ID }}
270
+ env:
271
+ ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
272
+ ```
273
+
274
+ `setup` is a setup file's path in the checkout, or the name of a DevTune setup with no file, as `list` shows it. A name runs the DevTune setup: the action refuses one that is also a file in the checkout's `agentpicks` folder, so name the file by its path. To run a built-in category with no setup file, set `category` with `stack` or `repo` in place of `setup`. Set one of `setup` and `category`, not both.
275
+
276
+ Use a Linux runner: `ubuntu-latest` has Docker and Node.js 20 or later. Without Docker, `run` refuses; without Node.js 20 or later, the action does. The action uses the runner's Node.js and doesn't change it for later steps.
277
+
278
+ Pin a release tag, such as `v0.3.0`. The action runs the `@devtune/agentpicks` version in the `package.json` of its ref, so a tag runs the same CLI every time. A branch moves to each new version when the mirror syncs, and fails while that version isn't on npm.
279
+
280
+ | Input | Passed as |
281
+ |---|---|
282
+ | `setup` | `run <setup>`. A path resolves in the checkout. |
283
+ | `category` | `--category`, in place of `setup`. |
284
+ | `stack` | `--stack`, in place of the setup's stacks or repo. |
285
+ | `repo` | `--repo`, in place of the setup's stacks or repo. `.` is the checkout. |
286
+ | `runs` | `--runs` |
287
+ | `agent` | `--agent`, in place of the setup's agents. |
288
+ | `model` | `--model` |
289
+ | `out` | `--out`. Default `./agentpicks-runs`. |
290
+ | `no-upload` | `--no-upload` when `true`. Default `false`. |
291
+ | `devtune-api-key` | `DEVTUNE_API_KEY` |
292
+ | `devtune-project-id` | `DEVTUNE_PROJECT_ID` |
293
+ | `devtune-api-base-url` | `DEVTUNE_API_BASE_URL` |
294
+
295
+ The DevTune values reach the CLI only through those environment variables, never its command line, and neither the action nor the CLI prints the key. Set `devtune-api-key` and `devtune-project-id` together: with one set, all three DevTune values come from the inputs, and the action refuses to upload when the other is empty, which is how a missing or misnamed secret shows up. With both empty, the action uses the `DEVTUNE_*` variables set on the step or job, and ignores `devtune-api-base-url`. The `bundle-dir` output is the absolute path of `out`, which holds one bundle per completed run; with `no-upload: true`, keep them with `actions/upload-artifact`.
296
+
297
+ **The API key.** Create a project API key under **API Keys** in DevTune with these scopes, and add it as the `DEVTUNE_API_KEY` secret. `DEVTUNE_PROJECT_ID` isn't secret, so it can be a variable.
298
+
299
+ | Scope | Needed to |
300
+ |---|---|
301
+ | **Agent Picks Run** | Upload each run. |
302
+ | **Visibility** | Upload the runs of a linked setup file (one with an `id`), or run a DevTune setup by name: `run` reads the project's DevTune setups to find the one its runs file under. |
303
+
304
+ A linked file's run is refused before Docker starts when the file has changes not pushed, or its DevTune setup changed since the file last saw it: `push` or `pull` on your own machine after `agentpicks login`, which needs Visibility and Actions Write, then commit the file. The CI key needs neither Actions Write nor a login. See [DevTune setups](#devtune-setups).
305
+
306
+ **The agent's key.** Pass it through `env:` under a name from [Credentials](#credentials): `ANTHROPIC_AUTH_TOKEN`, `ANTHROPIC_API_KEY` or `CLAUDE_CODE_OAUTH_TOKEN` for Claude Code, `OPENAI_API_KEY` or `CODEX_API_KEY` for Codex, and for OpenCode and Pi `ANTHROPIC_API_KEY` with an `anthropic/` model or `OPENAI_API_KEY` with an `openai/` model. `CLAUDE_CODE_OAUTH_TOKEN`, from `claude setup-token`, is the only subscription sign-in that works in CI: the others are saved to a file or a keyring when you log in to the agent, and a fresh runner has none to copy.
307
+
308
+ **The agent.** `agentpicks` tests the agent installed on the runner, and installs the same version in its container, so install it at a pinned version before the action: `npm install -g @openai/codex@<version>` for Codex. Install and authenticate each agent the setup lists, or pick one with `agent`. With `agent` set, or a setup that lists its agents, a run whose agent isn't installed is refused, naming it; otherwise a runner with no agent installed is refused, listing the agents `agentpicks` can run.
309
+
310
+ **Your repository.** A setup with `repo: .`, or `repo: .` on the action, tests the checked-out commit. `actions/checkout` sets the `origin` remote that an upload needs. Files the workflow writes into the checkout, `out` included, aren't read: only committed files are tested.
311
+
312
+ ### Other CI systems
313
+
314
+ Install Docker, Node.js 20 or later and the agent, set `DEVTUNE_API_KEY`, `DEVTUNE_PROJECT_ID` and the agent's key from the CI system's secrets, and call the CLI at a pinned version from the checkout:
315
+
316
+ ```sh
317
+ npm install -g @anthropic-ai/claude-code@2.1.323
318
+ npx --yes @devtune/agentpicks@0.3.0 run error-tracking --agent claude-code
319
+ ```
320
+
107
321
  ## The bundle
108
322
 
109
323
  Each completed run writes one directory, `<out>/<run id>/`. A run that fails writes nothing, and that includes an agent that exits nonzero, unless the early stop stopped it.
@@ -114,20 +328,20 @@ redactions.json what redaction removed, per artifact
114
328
  artifacts/ what the run captured, already redacted
115
329
  ```
116
330
 
117
- `manifest.json` holds `bundleVersion` (1), the generated `runId`, the runner's version, the agent's kind, version and model, the host's OS and architecture, the image digest, the container's egress IP, the stack with its starter and lock digest or the repository with its remote address (`origin`, or the first remote) as host and path alone, without user, password, query, fragment or `transport::` prefix, or `null` with no remote, a local path, or an address it can't read with confidence, and its full commit id, the category, request intent (`add`) and exact prompt, start and end times, and each artifact's size and SHA-256. The egress IP is read inside the container from `https://api.ipify.org` before setup; when it can't be read it is `null`.
331
+ `manifest.json` holds `bundleVersion` (1), the generated `runId`, the runner's version, the agent's kind, version and model, the host's OS and architecture, the image digest, the container's egress IP, the stack with its starter and lock digest or the repository with its remote address (`origin`, or the first remote) as host and path alone, without user, password, query, fragment or `transport::` prefix, or `null` with no remote, a local path, or an address it can't read with confidence, and its full commit id, the category (`setup:<name>` for a custom setup), request intent (`add`) and exact prompt, start and end times, and each artifact's size and SHA-256. An artifact that analysis doesn't read and that is over DevTune's upload limit (50 MiB) is trimmed to whole lines within it, and the manifest records its size before and after under `truncation`: `mitm.log` and `agent.err` keep their end, and the rest keep their start. The artifacts analysis reads (the transcript, `requests.jsonl`, the diff and the source files, and the package and manifest files before and after) are never trimmed, so a result is never drawn from part of a run; over the limit, `agentpicks upload` refuses the bundle and names the limit. The egress IP is read inside the container from `https://api.ipify.org` before setup; when it can't be read it is `null`.
118
332
 
119
333
  The artifacts are those a DevTune managed run captures: `transcript.jsonl`, `diff.patch`, `requests.jsonl` (every request the agent's traffic made through the logging proxy), `llm-usage.jsonl`, `deps.txt`, the manifests and lockfiles before and after, `meta.json` (the agent's exit code) and `earlystop.json`, among others.
120
334
 
121
335
  Every artifact is redacted before it is written: the credential values the run used, every secret the agent wrote itself (a value of 12 characters or more assigned to a name such as `AUTH_SECRET`, `API_KEY` or `DB_PASSWORD` in a dotenv or shell line, YAML or a quoted string, unless it is a placeholder or a reference; for a URL, its credentials), wherever it then appears, credentials in URLs and private keys, and the [gitleaks](https://github.com/gitleaks/gitleaks) rules. `agentpicks` prints each file's size and the number of redactions. A run that wrote more than 200 secrets writes no bundle, and no further runs start.
122
336
 
123
- The schema is `bundleManifestSchema` and `redactionSummarySchema` in `src/bundle/schema.ts`.
337
+ The schema is `bundleManifestSchema` and `redactionSummarySchema` in `src/bundle/schema.ts`. Every run also writes `earlyStop`, the patterns its early stop watched for, into `manifest.json`, and a run of a setup file writes `setup` (its name, `from`, `id` and job line). Both are `agentpicks`' own, outside the bundle format, so an upload never sends them.
124
338
 
125
339
  ## The package
126
340
 
127
341
  This package is also the open half of DevTune's Agent Picks: the `Sandbox` interface and the Docker provider, the scripts a run uploads into the sandbox (environment setup, the logging proxy, the early-stop watcher, each agent's install and launch), the run lifecycle (`runInSandbox`), the category requests, the committed starters and the trace redaction. DevTune's managed runs use the same code. Classification, parsing, cost and the model proxy stay with DevTune.
128
342
 
129
- Build the CLI with `pnpm --filter @devtune/agentpicks build:cli`, which writes `dist/cli.js`. The npm package ships only that CLI and the Dockerfile; the code above is imported from source inside the monorepo.
343
+ Build the CLI with `pnpm --filter @devtune/agentpicks build:cli`, which writes `dist/cli.js`. The npm package ships only that CLI, the Dockerfile and the setup file's JSON Schema; the code above is imported from source inside the monorepo.
130
344
 
131
- `src/catalogue/early-stop.generated.ts` holds each category's early-stop patterns, which DevTune derives from its tool signals; it is generated by `pnpm --filter @kit/agent-picks generate:early-stop`.
345
+ `src/catalogue/early-stop.generated.ts` holds each category's early-stop patterns, which DevTune derives from its tool signals, and `src/catalogue/category-tools.generated.ts` each category's tool keys and names; both are generated by `pnpm --filter @kit/agent-picks generate:early-stop`.
132
346
 
133
347
  `src/run/trace-rules.generated.ts` is generated from the gitleaks rules in `vendor/gitleaks` (MIT) by `python3 packages/agentpicks/scripts/generate-trace-rules.py`.