@devtune/agentpicks 0.4.1 → 0.4.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.
- package/README.md +7 -5
- package/dist/cli.js +164 -27
- package/package.json +1 -1
- package/schema/setup.v1.json +6 -6
package/README.md
CHANGED
|
@@ -95,6 +95,8 @@ agentpicks upload ./agentpicks-runs/<run id>
|
|
|
95
95
|
|
|
96
96
|
`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.
|
|
97
97
|
|
|
98
|
+
On a terminal, `agentpicks` with no command, `--help` and a successful `login` show the DevTune logo first. Set `AGENTPICKS_NO_LOGO=1` to leave it out.
|
|
99
|
+
|
|
98
100
|
`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.
|
|
99
101
|
|
|
100
102
|
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.
|
|
@@ -225,7 +227,7 @@ agentpicks validate
|
|
|
225
227
|
agentpicks validate feature-flags agentpicks/error-tracking.yaml
|
|
226
228
|
```
|
|
227
229
|
|
|
228
|
-
`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 in DevTune's catalogue, stacks it runs in, known agents, 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.
|
|
230
|
+
`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. When the table is wider than the terminal, it prints each setup as a block, one line per field; piped output is always the table. `agentpicks validate` checks every setup file, or the ones named, against the schema and the catalogue: a known `from`, tool keys in DevTune's catalogue, stacks it runs in, known agents, 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.
|
|
229
231
|
|
|
230
232
|
### DevTune setups
|
|
231
233
|
|
|
@@ -236,7 +238,7 @@ agentpicks push feature-flags
|
|
|
236
238
|
agentpicks run add-feature-flags
|
|
237
239
|
```
|
|
238
240
|
|
|
239
|
-
`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.
|
|
241
|
+
`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, cut at a word to at most 30 characters.
|
|
240
242
|
|
|
241
243
|
`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 pull writes a catalogue tool by its key, in a job as in a copy, and push sends the key for DevTune to fill in its signals. A job can name, by key, any tool of a category DevTune publishes; a copy names its category's tools, and another only once it is added to the copy in the DevTune app and pulled. 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.
|
|
242
244
|
|
|
@@ -266,7 +268,7 @@ jobs:
|
|
|
266
268
|
steps:
|
|
267
269
|
- uses: actions/checkout@v5
|
|
268
270
|
- run: npm install -g @anthropic-ai/claude-code@2.1.323
|
|
269
|
-
- uses: devtunehq/agentpicks@v0.4.
|
|
271
|
+
- uses: devtunehq/agentpicks@v0.4.3
|
|
270
272
|
with:
|
|
271
273
|
setup: agentpicks/error-tracking.yaml
|
|
272
274
|
agent: claude-code
|
|
@@ -280,7 +282,7 @@ jobs:
|
|
|
280
282
|
|
|
281
283
|
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.
|
|
282
284
|
|
|
283
|
-
Pin a release tag, such as `v0.4.
|
|
285
|
+
Pin a release tag, such as `v0.4.3`. 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.
|
|
284
286
|
|
|
285
287
|
| Input | Passed as |
|
|
286
288
|
|---|---|
|
|
@@ -321,7 +323,7 @@ Install Docker, Node.js 20 or later and the agent, set `DEVTUNE_API_KEY`, `DEVTU
|
|
|
321
323
|
|
|
322
324
|
```sh
|
|
323
325
|
npm install -g @anthropic-ai/claude-code@2.1.323
|
|
324
|
-
npx --yes @devtune/agentpicks@0.4.
|
|
326
|
+
npx --yes @devtune/agentpicks@0.4.3 run error-tracking --agent claude-code
|
|
325
327
|
```
|
|
326
328
|
|
|
327
329
|
## The bundle
|
package/dist/cli.js
CHANGED
|
@@ -7370,12 +7370,12 @@ var import_node_path19 = require("node:path");
|
|
|
7370
7370
|
// src/cli/main.ts
|
|
7371
7371
|
var import_node_crypto10 = require("node:crypto");
|
|
7372
7372
|
var import_node_path18 = require("node:path");
|
|
7373
|
-
var
|
|
7373
|
+
var import_promises5 = require("node:readline/promises");
|
|
7374
7374
|
|
|
7375
7375
|
// package.json
|
|
7376
7376
|
var package_default = {
|
|
7377
7377
|
name: "@devtune/agentpicks",
|
|
7378
|
-
version: "0.4.
|
|
7378
|
+
version: "0.4.3",
|
|
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: {
|
|
@@ -9567,7 +9567,7 @@ function putProp(target, key, value) {
|
|
|
9567
9567
|
else
|
|
9568
9568
|
target[key] = value;
|
|
9569
9569
|
}
|
|
9570
|
-
function mirrorShape(target, source, keys,
|
|
9570
|
+
function mirrorShape(target, source, keys, wrap2) {
|
|
9571
9571
|
const raw = sourceShape(source);
|
|
9572
9572
|
for (const key of keys) {
|
|
9573
9573
|
const desc = Object.getOwnPropertyDescriptor(raw, key);
|
|
@@ -9576,10 +9576,10 @@ function mirrorShape(target, source, keys, wrap) {
|
|
|
9576
9576
|
if (desc.get) {
|
|
9577
9577
|
deferProp(target, key, () => {
|
|
9578
9578
|
const value = source._zod.def.shape[key];
|
|
9579
|
-
return
|
|
9579
|
+
return wrap2 ? wrap2(value, key) : value;
|
|
9580
9580
|
});
|
|
9581
9581
|
} else
|
|
9582
|
-
putProp(target, key,
|
|
9582
|
+
putProp(target, key, wrap2 ? wrap2(desc.value, key) : desc.value);
|
|
9583
9583
|
}
|
|
9584
9584
|
}
|
|
9585
9585
|
function mirrorProps(target, source) {
|
|
@@ -28522,7 +28522,7 @@ var SETUP_MAX_RECORDED_TOOLS = LARGEST_CATEGORY_TOOLS + SETUP_MAX_TOOLS;
|
|
|
28522
28522
|
function setupMaxTools(categorySlug) {
|
|
28523
28523
|
return (categorySlug ? CATEGORY_TOOLS[categorySlug]?.length ?? 0 : 0) + SETUP_MAX_TOOLS;
|
|
28524
28524
|
}
|
|
28525
|
-
var PACKAGE_NAME = /^[
|
|
28525
|
+
var PACKAGE_NAME = /^[@._/:*-]*[A-Za-z0-9][A-Za-z0-9@._/:*-]*$/;
|
|
28526
28526
|
var CONFIG_NAME = /^[A-Za-z0-9@._/:*][A-Za-z0-9@._/:*-]*$/;
|
|
28527
28527
|
function signalFormat(base, field, format2, message, reviewed) {
|
|
28528
28528
|
const passes2 = (value) => typeof format2 === "function" ? format2(value) : format2.test(value);
|
|
@@ -28548,7 +28548,7 @@ var toolNameSchema = external_exports.string().trim().min(1).max(TOOL_NAME_MAX_L
|
|
|
28548
28548
|
var domainSchema = external_exports.string().trim().toLowerCase().min(3).max(DOMAIN_MAX_LENGTH).regex(/^[a-z0-9-]+(?:\.[a-z0-9-]+)+$/, {
|
|
28549
28549
|
message: "Give a bare domain, such as example.com."
|
|
28550
28550
|
});
|
|
28551
|
-
var packageNameSchema = external_exports.string().trim().min(1, { message: PACKAGE_NAME_MESSAGE }).max(PACKAGE_NAME_MAX_LENGTH, { message: PACKAGE_NAME_MESSAGE }).regex(PACKAGE_NAME, { message: PACKAGE_NAME_MESSAGE });
|
|
28551
|
+
var packageNameSchema = external_exports.string().trim().min(1, { message: PACKAGE_NAME_MESSAGE }).max(PACKAGE_NAME_MAX_LENGTH, { message: PACKAGE_NAME_MESSAGE, abort: true }).regex(PACKAGE_NAME, { message: PACKAGE_NAME_MESSAGE });
|
|
28552
28552
|
function configNameSchema(reviewed) {
|
|
28553
28553
|
return signalFormat(
|
|
28554
28554
|
external_exports.string().trim().min(CONFIG_NAME_MIN_LENGTH, { message: CONFIG_NAME_MESSAGE }).max(CONFIG_NAME_MAX_LENGTH, { message: CONFIG_NAME_MESSAGE }),
|
|
@@ -78518,8 +78518,29 @@ var fileAgent = (kind) => SETUP_AGENTS.find((name) => AGENT_KINDS2.get(name) ===
|
|
|
78518
78518
|
function nameableStack(slug2, runsIn) {
|
|
78519
78519
|
return ENVIRONMENTS.some((env) => env.slug === slug2) && !isRetiredEnvironment(slug2) && environmentRunsIn(slug2, runsIn);
|
|
78520
78520
|
}
|
|
78521
|
+
var NAME_LENGTH = 30;
|
|
78522
|
+
var TRAILING_WORDS = /* @__PURE__ */ new Set([
|
|
78523
|
+
"a",
|
|
78524
|
+
"an",
|
|
78525
|
+
"and",
|
|
78526
|
+
"for",
|
|
78527
|
+
"in",
|
|
78528
|
+
"of",
|
|
78529
|
+
"on",
|
|
78530
|
+
"or",
|
|
78531
|
+
"the",
|
|
78532
|
+
"to",
|
|
78533
|
+
"with"
|
|
78534
|
+
]);
|
|
78521
78535
|
function slugName(text3) {
|
|
78522
|
-
|
|
78536
|
+
const words = text3.normalize("NFKD").toLowerCase().split(/[^a-z0-9]+/).filter(Boolean);
|
|
78537
|
+
const kept = [];
|
|
78538
|
+
for (const word of words) {
|
|
78539
|
+
if ([...kept, word].join("-").length > NAME_LENGTH) break;
|
|
78540
|
+
kept.push(word);
|
|
78541
|
+
}
|
|
78542
|
+
while (kept.length > 1 && TRAILING_WORDS.has(kept.at(-1))) kept.pop();
|
|
78543
|
+
return kept.join("-") || words[0]?.slice(0, NAME_LENGTH) || "setup";
|
|
78523
78544
|
}
|
|
78524
78545
|
function devtuneSetupNames(setups) {
|
|
78525
78546
|
const names2 = /* @__PURE__ */ new Map();
|
|
@@ -82165,8 +82186,8 @@ async function listCommand(argv, ctx) {
|
|
|
82165
82186
|
ctx.out(`${(0, import_node_path14.join)(root, SETUPS_DIR)} holds no setup files. ${WRITE_ONE}`);
|
|
82166
82187
|
return 0;
|
|
82167
82188
|
}
|
|
82168
|
-
|
|
82169
|
-
["
|
|
82189
|
+
printSetups(
|
|
82190
|
+
["JOB", "FROM", "TESTS", "AGENTS", "RUNS"],
|
|
82170
82191
|
files.map((file2) => ({
|
|
82171
82192
|
name: file2.name,
|
|
82172
82193
|
cells: file2.setup ? setupCells(file2.setup) : null,
|
|
@@ -82222,17 +82243,46 @@ function linkedTable(files, devtune, ctx) {
|
|
|
82222
82243
|
ctx.out(`Neither ${SETUPS_DIR}/ nor DevTune holds a setup. ${WRITE_ONE}`);
|
|
82223
82244
|
return 0;
|
|
82224
82245
|
}
|
|
82225
|
-
|
|
82226
|
-
["
|
|
82246
|
+
printSetups(
|
|
82247
|
+
["WHERE", "SYNC", "JOB", "FROM", "TESTS", "AGENTS", "RUNS"],
|
|
82227
82248
|
rows,
|
|
82228
82249
|
ctx
|
|
82229
82250
|
);
|
|
82230
82251
|
footer(files, ctx);
|
|
82231
82252
|
return 0;
|
|
82232
82253
|
}
|
|
82233
|
-
|
|
82254
|
+
var TABLE_JOB_LENGTH = 48;
|
|
82255
|
+
function printSetups(titles, rows, ctx) {
|
|
82256
|
+
const table = tableLines(["NAME", ...titles], rows);
|
|
82257
|
+
const fits = ctx.columns === void 0 || table.every((line2) => line2.length <= ctx.columns);
|
|
82258
|
+
if (fits) {
|
|
82259
|
+
for (const line2 of table) ctx.out(line2);
|
|
82260
|
+
return;
|
|
82261
|
+
}
|
|
82262
|
+
const labels = [...titles.map((title) => title.toLowerCase()), "invalid"];
|
|
82263
|
+
const labelWidth = Math.max(...labels.map((label) => label.length));
|
|
82264
|
+
const field = (label, value) => {
|
|
82265
|
+
const lead = ` ${label.padEnd(labelWidth)} `;
|
|
82266
|
+
wrap(value, Math.max(ctx.columns - lead.length, 20)).forEach(
|
|
82267
|
+
(part, i) => ctx.out(`${i === 0 ? lead : " ".repeat(lead.length)}${part}`)
|
|
82268
|
+
);
|
|
82269
|
+
};
|
|
82270
|
+
rows.forEach((row, i) => {
|
|
82271
|
+
if (i > 0) ctx.out("");
|
|
82272
|
+
ctx.out(row.name);
|
|
82273
|
+
if (!row.cells) return field("invalid", row.problem);
|
|
82274
|
+
row.cells.forEach((cell, j) => {
|
|
82275
|
+
if (cell !== "-") field(labels[j], cell);
|
|
82276
|
+
});
|
|
82277
|
+
});
|
|
82278
|
+
}
|
|
82279
|
+
function tableLines(header, rows) {
|
|
82280
|
+
const jobAt = header.indexOf("JOB");
|
|
82281
|
+
const shown3 = (cells) => cells.map(
|
|
82282
|
+
(cell, i) => i === jobAt && cell.length > TABLE_JOB_LENGTH ? `${cell.slice(0, TABLE_JOB_LENGTH - 1)}\u2026` : cell
|
|
82283
|
+
);
|
|
82234
82284
|
const full = rows.flatMap(
|
|
82235
|
-
(row) => row.cells ? [[row.name, ...row.cells]] : []
|
|
82285
|
+
(row) => row.cells ? [shown3([row.name, ...row.cells])] : []
|
|
82236
82286
|
);
|
|
82237
82287
|
const widths = header.map(
|
|
82238
82288
|
(title, i) => Math.max(title.length, ...full.map((cells) => cells[i].length))
|
|
@@ -82240,11 +82290,23 @@ function printTable(header, rows, ctx) {
|
|
|
82240
82290
|
const line2 = (cells) => cells.map(
|
|
82241
82291
|
(cell, i) => i === cells.length - 1 ? cell : cell.padEnd(widths[i])
|
|
82242
82292
|
).join(" ");
|
|
82243
|
-
|
|
82244
|
-
|
|
82245
|
-
|
|
82246
|
-
row.cells ? line2([row.name, ...row.cells]) : `${row.name.padEnd(widths[0])} invalid: ${row.problem}`
|
|
82247
|
-
)
|
|
82293
|
+
return [
|
|
82294
|
+
line2(header),
|
|
82295
|
+
...rows.map(
|
|
82296
|
+
(row) => row.cells ? line2(shown3([row.name, ...row.cells])) : `${row.name.padEnd(widths[0])} invalid: ${row.problem}`
|
|
82297
|
+
)
|
|
82298
|
+
];
|
|
82299
|
+
}
|
|
82300
|
+
function wrap(text3, width) {
|
|
82301
|
+
const lines = [];
|
|
82302
|
+
let current = "";
|
|
82303
|
+
for (const word of text3.split(" ")) {
|
|
82304
|
+
if (current && current.length + 1 + word.length > width) {
|
|
82305
|
+
lines.push(current);
|
|
82306
|
+
current = word;
|
|
82307
|
+
} else current = current ? `${current} ${word}` : word;
|
|
82308
|
+
}
|
|
82309
|
+
return [...lines, current];
|
|
82248
82310
|
}
|
|
82249
82311
|
function footer(files, ctx) {
|
|
82250
82312
|
const invalid = files.filter((file2) => !file2.setup).length;
|
|
@@ -82259,10 +82321,9 @@ function problemOf(file2) {
|
|
|
82259
82321
|
return first ? `${first.field}: ${first.message}` : "";
|
|
82260
82322
|
}
|
|
82261
82323
|
function setupCells(setup) {
|
|
82262
|
-
const job = setup.job.length > 48 ? `${setup.job.slice(0, 47)}\u2026` : setup.job;
|
|
82263
82324
|
const tests = setup.repo ? `repo ${setup.repo.path}${setup.repo.ref ? ` at ${setup.repo.ref}` : ""}` : setup.stacks ? setup.stacks.map((env) => env.slug).join(", ") : "-";
|
|
82264
82325
|
return [
|
|
82265
|
-
job,
|
|
82326
|
+
setup.job,
|
|
82266
82327
|
setup.from ?? "-",
|
|
82267
82328
|
tests,
|
|
82268
82329
|
setup.agents?.join(", ") ?? "the installed one",
|
|
@@ -82295,6 +82356,7 @@ async function loginCommand(argv, ctx) {
|
|
|
82295
82356
|
const path = loginPath(ctx.io);
|
|
82296
82357
|
if (args.apiKey) {
|
|
82297
82358
|
await apiKeyLogin(args.project, baseUrl, path, ctx);
|
|
82359
|
+
await ctx.logo?.();
|
|
82298
82360
|
ctx.out(`Saved to ${path}. run and upload send bundles to this project.`);
|
|
82299
82361
|
if (ctx.io.env.DEVTUNE_API_KEY || ctx.io.env.DEVTUNE_PROJECT_ID)
|
|
82300
82362
|
ctx.out(
|
|
@@ -82318,6 +82380,7 @@ ${url2}`
|
|
|
82318
82380
|
),
|
|
82319
82381
|
save: (session) => withLoginLock(path, () => saveLogin(path, session))
|
|
82320
82382
|
});
|
|
82383
|
+
await ctx.logo?.();
|
|
82321
82384
|
ctx.out(`Signed in to ${project.name} (${project.id}).`);
|
|
82322
82385
|
ctx.out(`Granted: ${[...scopes].sort().join(", ")}.`);
|
|
82323
82386
|
const missing = AGENTPICKS_SCOPES.filter((s) => !scopes.includes(s));
|
|
@@ -82365,6 +82428,63 @@ async function apiKeyLogin(project, baseUrl, path, ctx) {
|
|
|
82365
82428
|
});
|
|
82366
82429
|
}
|
|
82367
82430
|
|
|
82431
|
+
// src/cli/logo.ts
|
|
82432
|
+
var import_promises4 = require("node:timers/promises");
|
|
82433
|
+
var MARK = [
|
|
82434
|
+
" b c b ",
|
|
82435
|
+
" b ccc b ",
|
|
82436
|
+
"b ccc b",
|
|
82437
|
+
" b ccc b ",
|
|
82438
|
+
" b c b "
|
|
82439
|
+
];
|
|
82440
|
+
var CENTRE = 5;
|
|
82441
|
+
var LAST_STEP = CENTRE + 1;
|
|
82442
|
+
var FRAME_MS = 55;
|
|
82443
|
+
var LOGO_COLUMNS = 40;
|
|
82444
|
+
var GREEN = "\x1B[38;5;36m";
|
|
82445
|
+
var BOLD = "\x1B[1m";
|
|
82446
|
+
var DIM = "\x1B[2m";
|
|
82447
|
+
var RESET = "\x1B[0m";
|
|
82448
|
+
function logoFrames(version2) {
|
|
82449
|
+
const text3 = [
|
|
82450
|
+
"",
|
|
82451
|
+
`${BOLD}DevTune${RESET}`,
|
|
82452
|
+
"Agent Picks",
|
|
82453
|
+
`${DIM}${version2}${RESET}`,
|
|
82454
|
+
""
|
|
82455
|
+
];
|
|
82456
|
+
const frame = (step, words) => MARK.map((row, r) => {
|
|
82457
|
+
const dots = [...row].map((cell, col) => {
|
|
82458
|
+
const distance = Math.abs(col - CENTRE);
|
|
82459
|
+
if (cell === " " || distance > step) return " ";
|
|
82460
|
+
const dot = distance === step ? "\xB7" : "\u25CF";
|
|
82461
|
+
return cell === "b" ? `${GREEN}${dot}${RESET}` : dot;
|
|
82462
|
+
}).join(" ");
|
|
82463
|
+
return r < words + 1 && text3[r] ? `${dots} ${text3[r]}` : dots.trimEnd();
|
|
82464
|
+
});
|
|
82465
|
+
return [
|
|
82466
|
+
...Array.from({ length: LAST_STEP + 1 }, (_, step) => frame(step, 0)),
|
|
82467
|
+
frame(LAST_STEP, 1),
|
|
82468
|
+
frame(LAST_STEP, 3)
|
|
82469
|
+
];
|
|
82470
|
+
}
|
|
82471
|
+
function logoPlayer(env, stdout) {
|
|
82472
|
+
if (!stdout.isTTY || (stdout.columns ?? 0) < LOGO_COLUMNS || env.CI || env.TERM === "dumb" || env.NO_COLOR || env.AGENTPICKS_NO_LOGO)
|
|
82473
|
+
return void 0;
|
|
82474
|
+
return async () => {
|
|
82475
|
+
const frames = logoFrames(package_default.version);
|
|
82476
|
+
for (const [i, lines] of frames.entries()) {
|
|
82477
|
+
if (i > 0) {
|
|
82478
|
+
await (0, import_promises4.setTimeout)(FRAME_MS);
|
|
82479
|
+
stdout.write(`\x1B[${lines.length}A`);
|
|
82480
|
+
}
|
|
82481
|
+
stdout.write(lines.map((line2) => `\r\x1B[2K${line2}
|
|
82482
|
+
`).join(""));
|
|
82483
|
+
}
|
|
82484
|
+
stdout.write("\n");
|
|
82485
|
+
};
|
|
82486
|
+
}
|
|
82487
|
+
|
|
82368
82488
|
// src/cli/pull-command.ts
|
|
82369
82489
|
var import_node_fs9 = require("node:fs");
|
|
82370
82490
|
var import_node_path15 = require("node:path");
|
|
@@ -84954,7 +85074,7 @@ function writtenSecrets(texts) {
|
|
|
84954
85074
|
}
|
|
84955
85075
|
|
|
84956
85076
|
// src/run/artifact-redaction.ts
|
|
84957
|
-
var
|
|
85077
|
+
var MARK2 = "[redacted]";
|
|
84958
85078
|
var WRITTEN_SECRETS_LIMIT = 200;
|
|
84959
85079
|
var WrittenSecretsLimitError = class extends Error {
|
|
84960
85080
|
constructor() {
|
|
@@ -84983,7 +85103,7 @@ function redactArtifacts(artifacts, credentials) {
|
|
|
84983
85103
|
return { artifacts: redacted, counts, redact };
|
|
84984
85104
|
}
|
|
84985
85105
|
function marks(text3) {
|
|
84986
|
-
return text3.split(
|
|
85106
|
+
return text3.split(MARK2).length - 1;
|
|
84987
85107
|
}
|
|
84988
85108
|
|
|
84989
85109
|
// src/cli/self-run.ts
|
|
@@ -85198,6 +85318,15 @@ A setup file, agentpicks/error-tracking.yaml:
|
|
|
85198
85318
|
|
|
85199
85319
|
Its schema is schema/setup.v1.json in this package; the README describes every field.
|
|
85200
85320
|
`;
|
|
85321
|
+
var INTRO = `Test which tools coding agents pick when they build your kind of app.
|
|
85322
|
+
|
|
85323
|
+
agentpicks login Sign in to your DevTune project
|
|
85324
|
+
agentpicks init Write a setup file for this repository
|
|
85325
|
+
agentpicks run Run a setup with the coding agent installed here
|
|
85326
|
+
agentpicks results Show which tool each run picked
|
|
85327
|
+
agentpicks list List this repository's setups and your project's
|
|
85328
|
+
|
|
85329
|
+
agentpicks --help lists every command and flag.`;
|
|
85201
85330
|
function defaultContext(dockerfileDir) {
|
|
85202
85331
|
return {
|
|
85203
85332
|
io: hostIo(),
|
|
@@ -85208,7 +85337,9 @@ function defaultContext(dockerfileDir) {
|
|
|
85208
85337
|
cwd: process.cwd(),
|
|
85209
85338
|
dockerfileDir,
|
|
85210
85339
|
stdinIsTerminal: Boolean(process.stdin.isTTY),
|
|
85211
|
-
interactive: Boolean(process.stdin.isTTY && process.stdout.isTTY)
|
|
85340
|
+
interactive: Boolean(process.stdin.isTTY && process.stdout.isTTY),
|
|
85341
|
+
columns: process.stdout.isTTY ? process.stdout.columns : void 0,
|
|
85342
|
+
logo: logoPlayer(process.env, process.stdout)
|
|
85212
85343
|
};
|
|
85213
85344
|
}
|
|
85214
85345
|
function printable(line2) {
|
|
@@ -85230,9 +85361,15 @@ async function main(argv, given) {
|
|
|
85230
85361
|
ctx.out(RUNNER.version);
|
|
85231
85362
|
return 0;
|
|
85232
85363
|
}
|
|
85233
|
-
if (!command
|
|
85364
|
+
if (!command) {
|
|
85365
|
+
await ctx.logo?.();
|
|
85366
|
+
ctx.out(INTRO);
|
|
85367
|
+
return 0;
|
|
85368
|
+
}
|
|
85369
|
+
if (command === "help" || command === "--help" || command === "-h" || rest.includes("--help")) {
|
|
85370
|
+
await ctx.logo?.();
|
|
85234
85371
|
ctx.out(USAGE);
|
|
85235
|
-
return
|
|
85372
|
+
return 0;
|
|
85236
85373
|
}
|
|
85237
85374
|
if (command === "init")
|
|
85238
85375
|
return await initCommand(rest, { ...ctx, ask: ctx.ask ?? askLine });
|
|
@@ -85333,7 +85470,7 @@ Or run a built-in category: agentpicks run --category <category> --stack <stack>
|
|
|
85333
85470
|
return chosen.path;
|
|
85334
85471
|
}
|
|
85335
85472
|
async function askLine(question) {
|
|
85336
|
-
const rl = (0,
|
|
85473
|
+
const rl = (0, import_promises5.createInterface)({ input: process.stdin, output: process.stdout });
|
|
85337
85474
|
try {
|
|
85338
85475
|
return await rl.question(question);
|
|
85339
85476
|
} finally {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@devtune/agentpicks",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
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": {
|
package/schema/setup.v1.json
CHANGED
|
@@ -145,7 +145,7 @@
|
|
|
145
145
|
"type": "string",
|
|
146
146
|
"minLength": 1,
|
|
147
147
|
"maxLength": 214,
|
|
148
|
-
"pattern": "^[
|
|
148
|
+
"pattern": "^[@._/:*-]*[A-Za-z0-9][A-Za-z0-9@._/:*-]*$"
|
|
149
149
|
}
|
|
150
150
|
},
|
|
151
151
|
"pypi": {
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
"type": "string",
|
|
156
156
|
"minLength": 1,
|
|
157
157
|
"maxLength": 214,
|
|
158
|
-
"pattern": "^[
|
|
158
|
+
"pattern": "^[@._/:*-]*[A-Za-z0-9][A-Za-z0-9@._/:*-]*$"
|
|
159
159
|
}
|
|
160
160
|
},
|
|
161
161
|
"gem": {
|
|
@@ -165,7 +165,7 @@
|
|
|
165
165
|
"type": "string",
|
|
166
166
|
"minLength": 1,
|
|
167
167
|
"maxLength": 214,
|
|
168
|
-
"pattern": "^[
|
|
168
|
+
"pattern": "^[@._/:*-]*[A-Za-z0-9][A-Za-z0-9@._/:*-]*$"
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
171
|
},
|
|
@@ -317,7 +317,7 @@
|
|
|
317
317
|
"type": "string",
|
|
318
318
|
"minLength": 1,
|
|
319
319
|
"maxLength": 214,
|
|
320
|
-
"pattern": "^[
|
|
320
|
+
"pattern": "^[@._/:*-]*[A-Za-z0-9][A-Za-z0-9@._/:*-]*$"
|
|
321
321
|
}
|
|
322
322
|
},
|
|
323
323
|
"pypi": {
|
|
@@ -327,7 +327,7 @@
|
|
|
327
327
|
"type": "string",
|
|
328
328
|
"minLength": 1,
|
|
329
329
|
"maxLength": 214,
|
|
330
|
-
"pattern": "^[
|
|
330
|
+
"pattern": "^[@._/:*-]*[A-Za-z0-9][A-Za-z0-9@._/:*-]*$"
|
|
331
331
|
}
|
|
332
332
|
},
|
|
333
333
|
"gem": {
|
|
@@ -337,7 +337,7 @@
|
|
|
337
337
|
"type": "string",
|
|
338
338
|
"minLength": 1,
|
|
339
339
|
"maxLength": 214,
|
|
340
|
-
"pattern": "^[
|
|
340
|
+
"pattern": "^[@._/:*-]*[A-Za-z0-9][A-Za-z0-9@._/:*-]*$"
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
},
|