@devtune/agentpicks 0.4.3 → 0.4.4
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 +21 -11
- package/dist/cli.js +62 -11
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,17 +1,27 @@
|
|
|
1
1
|
# @devtune/agentpicks
|
|
2
2
|
|
|
3
|
-
Test which tools the coding agents installed on your machine pick when they build your kind of app. `agentpicks run` gives an agent a real request (add error tracking, choose a database) in a committed starter app or your own repository, inside a fresh Docker container, writes what it did to a bundle on disk
|
|
3
|
+
Test which tools the coding agents installed on your machine pick when they build your kind of app. `agentpicks run` gives an agent a real request (add error tracking, choose a database) in a committed starter app or your own repository, inside a fresh Docker container, and writes what it did to a bundle on disk: its transcript, its code changes, every URL it fetched and every package it installed. `agentpicks results` reads which tool each run picked from those bundles.
|
|
4
4
|
|
|
5
|
-
Apache-2.0.
|
|
5
|
+
Apache-2.0. None of this needs a DevTune account:
|
|
6
6
|
|
|
7
7
|
```sh
|
|
8
|
-
npx @devtune/agentpicks
|
|
9
|
-
npx @devtune/agentpicks run
|
|
10
|
-
npx @devtune/agentpicks
|
|
11
|
-
npx @devtune/agentpicks
|
|
8
|
+
npx @devtune/agentpicks init # writes a setup file, such as agentpicks/error-tracking.yaml
|
|
9
|
+
npx @devtune/agentpicks run error-tracking --no-upload # runs it; see Setups
|
|
10
|
+
npx @devtune/agentpicks run --category error-tracking --stack nextjs --no-upload
|
|
11
|
+
npx @devtune/agentpicks results
|
|
12
12
|
npm install -g @devtune/agentpicks # then: agentpicks run ...
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
+
To have DevTune analyse the runs (what the agent said it picked, pick rates, loss reasons and the Actions that follow), sign in, save the setup and upload what you already ran:
|
|
16
|
+
|
|
17
|
+
```sh
|
|
18
|
+
npx @devtune/agentpicks login
|
|
19
|
+
npx @devtune/agentpicks push
|
|
20
|
+
npx @devtune/agentpicks upload ./agentpicks-runs
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
A kept run uploads once its setup is pushed with the same `from`, add request and tools the run tested. See [Upload](#upload).
|
|
24
|
+
|
|
15
25
|
## Requirements
|
|
16
26
|
|
|
17
27
|
- 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.
|
|
@@ -36,7 +46,7 @@ agentpicks run --category error-tracking --repo .
|
|
|
36
46
|
| `--agent` | `claude-code`, `codex`, `opencode` or `pi`. Required when several are installed. |
|
|
37
47
|
| `--model` | The model to ask for. OpenCode and Pi take `anthropic/<model>` or `openai/<model>`. |
|
|
38
48
|
| `--out` | Where bundles go. Default `./agentpicks-runs`. |
|
|
39
|
-
| `--no-upload` | Keep bundles on this machine only. Send them later with `agentpicks upload
|
|
49
|
+
| `--no-upload` | Keep bundles on this machine only. Send them later with `agentpicks upload`; a custom setup's once `agentpicks push` saves it (see [Setups](#setups)). |
|
|
40
50
|
|
|
41
51
|
`agentpicks --help`, or `--help` after any command, prints the usage and exits successfully.
|
|
42
52
|
|
|
@@ -219,7 +229,7 @@ agentpicks run
|
|
|
219
229
|
|
|
220
230
|
`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, and nor does a tool named by key alone or a full entry with no package or config name, so a setup whose tools are all like these isn't stopped early. 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.
|
|
221
231
|
|
|
222
|
-
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
|
|
232
|
+
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`. 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`. A `--no-upload` bundle of a custom setup, or of a linked file's changes not pushed, uploads once `agentpicks push` has saved the file with the same `from`, add request and tools the run tested: run `upload` from the repository that holds the file. Adding what `push` needs and a run doesn't, such as a `recommend` request, is fine. A bundle of an add request or tools the file or DevTune no longer holds can't file under the setup; run the setup again.
|
|
223
233
|
|
|
224
234
|
```sh
|
|
225
235
|
agentpicks list
|
|
@@ -268,7 +278,7 @@ jobs:
|
|
|
268
278
|
steps:
|
|
269
279
|
- uses: actions/checkout@v5
|
|
270
280
|
- run: npm install -g @anthropic-ai/claude-code@2.1.323
|
|
271
|
-
- uses: devtunehq/agentpicks@v0.4.
|
|
281
|
+
- uses: devtunehq/agentpicks@v0.4.4
|
|
272
282
|
with:
|
|
273
283
|
setup: agentpicks/error-tracking.yaml
|
|
274
284
|
agent: claude-code
|
|
@@ -282,7 +292,7 @@ jobs:
|
|
|
282
292
|
|
|
283
293
|
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.
|
|
284
294
|
|
|
285
|
-
Pin a release tag, such as `v0.4.
|
|
295
|
+
Pin a release tag, such as `v0.4.4`. 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.
|
|
286
296
|
|
|
287
297
|
| Input | Passed as |
|
|
288
298
|
|---|---|
|
|
@@ -323,7 +333,7 @@ Install Docker, Node.js 20 or later and the agent, set `DEVTUNE_API_KEY`, `DEVTU
|
|
|
323
333
|
|
|
324
334
|
```sh
|
|
325
335
|
npm install -g @anthropic-ai/claude-code@2.1.323
|
|
326
|
-
npx --yes @devtune/agentpicks@0.4.
|
|
336
|
+
npx --yes @devtune/agentpicks@0.4.4 run error-tracking --agent claude-code
|
|
327
337
|
```
|
|
328
338
|
|
|
329
339
|
## The bundle
|
package/dist/cli.js
CHANGED
|
@@ -7375,7 +7375,7 @@ var import_promises5 = require("node:readline/promises");
|
|
|
7375
7375
|
// package.json
|
|
7376
7376
|
var package_default = {
|
|
7377
7377
|
name: "@devtune/agentpicks",
|
|
7378
|
-
version: "0.4.
|
|
7378
|
+
version: "0.4.4",
|
|
7379
7379
|
description: "The open Agent Picks runner: the agentpicks CLI, which tests the coding agents installed on your machine in fresh Docker containers, and the sandbox code DevTune runs its managed tests on",
|
|
7380
7380
|
license: "Apache-2.0",
|
|
7381
7381
|
engines: {
|
|
@@ -8786,6 +8786,14 @@ function fileDigest(file2) {
|
|
|
8786
8786
|
for (const key of LOCAL_ONLY) delete content[key];
|
|
8787
8787
|
return (0, import_node_crypto2.createHash)("sha256").update(canonical(content)).digest("hex");
|
|
8788
8788
|
}
|
|
8789
|
+
function runDigest(file2) {
|
|
8790
|
+
const tested = {
|
|
8791
|
+
from: file2.from,
|
|
8792
|
+
add: file2.requests?.add,
|
|
8793
|
+
tools: file2.tools
|
|
8794
|
+
};
|
|
8795
|
+
return (0, import_node_crypto2.createHash)("sha256").update(canonical(tested)).digest("hex");
|
|
8796
|
+
}
|
|
8789
8797
|
|
|
8790
8798
|
// ../../node_modules/.pnpm/zod@4.6.6_patch_hash=96bd69fd10dbaf45f7f092f491f5876d12a54eb6e3908dd65bb626412caa94b4/node_modules/zod/v4/classic/external.js
|
|
8791
8799
|
var external_exports = {};
|
|
@@ -77794,8 +77802,13 @@ var bundleSetupSchema = external_exports.object({
|
|
|
77794
77802
|
id: external_exports.string().min(1).nullable(),
|
|
77795
77803
|
/** The job line. */
|
|
77796
77804
|
job: external_exports.string().min(1),
|
|
77797
|
-
/** Set when the run asked a linked file's changes not yet pushed, so it
|
|
77805
|
+
/** Set when the run asked a linked file's changes not yet pushed, so it files only once they are. */
|
|
77798
77806
|
unpushed: external_exports.boolean().optional(),
|
|
77807
|
+
/**
|
|
77808
|
+
* The digest of what the run tested (runDigest), for a run kept with --no-upload: `upload` files
|
|
77809
|
+
* a custom setup's run, or one of changes not pushed, once a push has saved a file that tests this.
|
|
77810
|
+
*/
|
|
77811
|
+
asked: external_exports.string().regex(/^[0-9a-f]{64}$/).optional(),
|
|
77799
77812
|
/** The catalogue tools the setup names by key that the run's early stop doesn't hold. */
|
|
77800
77813
|
unrecognised: external_exports.array(external_exports.string().min(1)).optional()
|
|
77801
77814
|
});
|
|
@@ -81075,11 +81088,15 @@ async function linkedSetup(id, shown3, ctx) {
|
|
|
81075
81088
|
async function linkUploads(plan, setup, content, shown3, ctx) {
|
|
81076
81089
|
const unpushed = setup.id !== null && content !== void 0 && hasUnpushedChanges(content);
|
|
81077
81090
|
if (!plan.upload)
|
|
81078
|
-
return
|
|
81091
|
+
return content && plan.setup ? {
|
|
81079
81092
|
...plan,
|
|
81080
81093
|
setup: {
|
|
81081
81094
|
...plan.setup,
|
|
81082
|
-
record: {
|
|
81095
|
+
record: {
|
|
81096
|
+
...plan.setup.record,
|
|
81097
|
+
asked: runDigest(content),
|
|
81098
|
+
...unpushed ? { unpushed: true } : {}
|
|
81099
|
+
}
|
|
81083
81100
|
}
|
|
81084
81101
|
} : plan;
|
|
81085
81102
|
if (setup.id === null) {
|
|
@@ -81107,13 +81124,14 @@ async function linkUploads(plan, setup, content, shown3, ctx) {
|
|
|
81107
81124
|
};
|
|
81108
81125
|
}
|
|
81109
81126
|
async function linkedBundle(bundle, ctx) {
|
|
81110
|
-
const
|
|
81127
|
+
const record2 = bundle.setup;
|
|
81128
|
+
if (!record2) return null;
|
|
81129
|
+
const shown3 = `${bundle.dir} (a run of ${record2.name})`;
|
|
81130
|
+
const custom2 = bundle.manifest.request.category.startsWith(
|
|
81131
|
+
CUSTOM_SETUP_CATEGORY_PREFIX
|
|
81132
|
+
);
|
|
81133
|
+
const id = record2.id && !record2.unpushed ? record2.id : record2.unpushed || custom2 ? pushedSince(record2, bundle.dir, shown3, ctx) : null;
|
|
81111
81134
|
if (!id) return null;
|
|
81112
|
-
const shown3 = `${bundle.dir} (a run of ${bundle.setup.name})`;
|
|
81113
|
-
if (bundle.setup.unpushed)
|
|
81114
|
-
throw new UsageError(
|
|
81115
|
-
`${shown3} ran with changes not pushed to its DevTune setup, so it can't file under it. Run agentpicks push ${bundle.setup.name}, then run the setup again.`
|
|
81116
|
-
);
|
|
81117
81135
|
const slug2 = (await linkedSetup(id, shown3, ctx)).category_slug;
|
|
81118
81136
|
return {
|
|
81119
81137
|
...bundle,
|
|
@@ -81123,6 +81141,38 @@ async function linkedBundle(bundle, ctx) {
|
|
|
81123
81141
|
}
|
|
81124
81142
|
};
|
|
81125
81143
|
}
|
|
81144
|
+
function pushedSince(record2, dir, shown3, ctx) {
|
|
81145
|
+
if (!record2.asked) {
|
|
81146
|
+
if (!record2.id) return null;
|
|
81147
|
+
throw new UsageError(
|
|
81148
|
+
`${shown3} ran with changes not pushed to its DevTune setup, so it can't file under it. Run agentpicks push ${record2.name}, then run the setup again.`
|
|
81149
|
+
);
|
|
81150
|
+
}
|
|
81151
|
+
const named = listSetupFiles(setupsRoot(ctx.cwd)).filter(
|
|
81152
|
+
(path) => (0, import_node_path10.basename)(path, (0, import_node_path10.extname)(path)) === record2.name
|
|
81153
|
+
);
|
|
81154
|
+
const content = named.length === 1 ? readSetupFile(named[0]).content : void 0;
|
|
81155
|
+
if (!content)
|
|
81156
|
+
throw new UsageError(
|
|
81157
|
+
`${shown3} uploads under the DevTune setup its file ${record2.name} is linked to, and there is no readable setup ${record2.name} here. Run agentpicks upload from the repository whose agentpicks folder holds it.`
|
|
81158
|
+
);
|
|
81159
|
+
const asked = runDigest(content) === record2.asked;
|
|
81160
|
+
const runAgain = `Run agentpicks run ${record2.name} again to upload its runs.`;
|
|
81161
|
+
if (content.id === void 0 || hasUnpushedChanges(content)) {
|
|
81162
|
+
if (!asked)
|
|
81163
|
+
throw new UsageError(
|
|
81164
|
+
`${shown3} tested a version of ${record2.name} that the file no longer holds, so no push can save what it tested. ${runAgain}`
|
|
81165
|
+
);
|
|
81166
|
+
throw new UsageError(
|
|
81167
|
+
`${shown3} tested what ${record2.name} holds now, which isn't saved to DevTune yet. Run agentpicks push ${record2.name}, then agentpicks upload ${dir} again.`
|
|
81168
|
+
);
|
|
81169
|
+
}
|
|
81170
|
+
if (!asked || record2.id && record2.id !== content.id)
|
|
81171
|
+
throw new UsageError(
|
|
81172
|
+
`${shown3} tested a version of ${record2.name} that DevTune doesn't hold, so it can't file under its setup. ${runAgain}`
|
|
81173
|
+
);
|
|
81174
|
+
return content.id;
|
|
81175
|
+
}
|
|
81126
81176
|
|
|
81127
81177
|
// src/cli/category-copy.ts
|
|
81128
81178
|
async function categoryCopyPlan(args, ctx) {
|
|
@@ -85298,7 +85348,8 @@ push Saves a setup file, or every one, to DevTune and links it. A setup cha
|
|
|
85298
85348
|
validate Checks every setup file, or the ones named, against the setup schema and the
|
|
85299
85349
|
catalogue. Exits non-zero if any fails, naming the file and field.
|
|
85300
85350
|
upload Uploads a bundle directory, or every bundle in an --out directory. Uploading again
|
|
85301
|
-
sends only what isn't stored yet.
|
|
85351
|
+
sends only what isn't stored yet. A custom setup's bundle, or one of changes not
|
|
85352
|
+
pushed, uploads once agentpicks push has saved the add request and tools it tested.
|
|
85302
85353
|
results Shows which tool each run in ./agentpicks-runs, or the directories named, picked: the
|
|
85303
85354
|
packages it added, or the code or config file that shows the pick, read from its
|
|
85304
85355
|
bundle as the run's early stop reads it. A run with no pick shows none, and one whose
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devtune/agentpicks",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "The open Agent Picks runner: the agentpicks CLI, which tests the coding agents installed on your machine in fresh Docker containers, and the sandbox code DevTune runs its managed tests on",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"engines": {
|