@devtune/agentpicks 0.4.2 → 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 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.
@@ -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.2
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.2`. 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.
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.2 run error-tracking --agent claude-code
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 import_promises4 = require("node:readline/promises");
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.2",
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: {
@@ -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 = /^[A-Za-z0-9@._/:*-]*[A-Za-z0-9][A-Za-z0-9@._/:*-]*$/;
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 }),
@@ -82356,6 +82356,7 @@ async function loginCommand(argv, ctx) {
82356
82356
  const path = loginPath(ctx.io);
82357
82357
  if (args.apiKey) {
82358
82358
  await apiKeyLogin(args.project, baseUrl, path, ctx);
82359
+ await ctx.logo?.();
82359
82360
  ctx.out(`Saved to ${path}. run and upload send bundles to this project.`);
82360
82361
  if (ctx.io.env.DEVTUNE_API_KEY || ctx.io.env.DEVTUNE_PROJECT_ID)
82361
82362
  ctx.out(
@@ -82379,6 +82380,7 @@ ${url2}`
82379
82380
  ),
82380
82381
  save: (session) => withLoginLock(path, () => saveLogin(path, session))
82381
82382
  });
82383
+ await ctx.logo?.();
82382
82384
  ctx.out(`Signed in to ${project.name} (${project.id}).`);
82383
82385
  ctx.out(`Granted: ${[...scopes].sort().join(", ")}.`);
82384
82386
  const missing = AGENTPICKS_SCOPES.filter((s) => !scopes.includes(s));
@@ -82426,6 +82428,63 @@ async function apiKeyLogin(project, baseUrl, path, ctx) {
82426
82428
  });
82427
82429
  }
82428
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
+
82429
82488
  // src/cli/pull-command.ts
82430
82489
  var import_node_fs9 = require("node:fs");
82431
82490
  var import_node_path15 = require("node:path");
@@ -85015,7 +85074,7 @@ function writtenSecrets(texts) {
85015
85074
  }
85016
85075
 
85017
85076
  // src/run/artifact-redaction.ts
85018
- var MARK = "[redacted]";
85077
+ var MARK2 = "[redacted]";
85019
85078
  var WRITTEN_SECRETS_LIMIT = 200;
85020
85079
  var WrittenSecretsLimitError = class extends Error {
85021
85080
  constructor() {
@@ -85044,7 +85103,7 @@ function redactArtifacts(artifacts, credentials) {
85044
85103
  return { artifacts: redacted, counts, redact };
85045
85104
  }
85046
85105
  function marks(text3) {
85047
- return text3.split(MARK).length - 1;
85106
+ return text3.split(MARK2).length - 1;
85048
85107
  }
85049
85108
 
85050
85109
  // src/cli/self-run.ts
@@ -85259,6 +85318,15 @@ A setup file, agentpicks/error-tracking.yaml:
85259
85318
 
85260
85319
  Its schema is schema/setup.v1.json in this package; the README describes every field.
85261
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.`;
85262
85330
  function defaultContext(dockerfileDir) {
85263
85331
  return {
85264
85332
  io: hostIo(),
@@ -85270,7 +85338,8 @@ function defaultContext(dockerfileDir) {
85270
85338
  dockerfileDir,
85271
85339
  stdinIsTerminal: Boolean(process.stdin.isTTY),
85272
85340
  interactive: Boolean(process.stdin.isTTY && process.stdout.isTTY),
85273
- columns: process.stdout.isTTY ? process.stdout.columns : void 0
85341
+ columns: process.stdout.isTTY ? process.stdout.columns : void 0,
85342
+ logo: logoPlayer(process.env, process.stdout)
85274
85343
  };
85275
85344
  }
85276
85345
  function printable(line2) {
@@ -85292,9 +85361,15 @@ async function main(argv, given) {
85292
85361
  ctx.out(RUNNER.version);
85293
85362
  return 0;
85294
85363
  }
85295
- if (!command || command === "help" || command === "--help" || command === "-h" || rest.includes("--help")) {
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?.();
85296
85371
  ctx.out(USAGE);
85297
- return command ? 0 : 1;
85372
+ return 0;
85298
85373
  }
85299
85374
  if (command === "init")
85300
85375
  return await initCommand(rest, { ...ctx, ask: ctx.ask ?? askLine });
@@ -85395,7 +85470,7 @@ Or run a built-in category: agentpicks run --category <category> --stack <stack>
85395
85470
  return chosen.path;
85396
85471
  }
85397
85472
  async function askLine(question) {
85398
- const rl = (0, import_promises4.createInterface)({ input: process.stdin, output: process.stdout });
85473
+ const rl = (0, import_promises5.createInterface)({ input: process.stdin, output: process.stdout });
85399
85474
  try {
85400
85475
  return await rl.question(question);
85401
85476
  } finally {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devtune/agentpicks",
3
- "version": "0.4.2",
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": {
@@ -145,7 +145,7 @@
145
145
  "type": "string",
146
146
  "minLength": 1,
147
147
  "maxLength": 214,
148
- "pattern": "^[A-Za-z0-9@._/:*-]*[A-Za-z0-9][A-Za-z0-9@._/:*-]*$"
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": "^[A-Za-z0-9@._/:*-]*[A-Za-z0-9][A-Za-z0-9@._/:*-]*$"
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": "^[A-Za-z0-9@._/:*-]*[A-Za-z0-9][A-Za-z0-9@._/:*-]*$"
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": "^[A-Za-z0-9@._/:*-]*[A-Za-z0-9][A-Za-z0-9@._/:*-]*$"
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": "^[A-Za-z0-9@._/:*-]*[A-Za-z0-9][A-Za-z0-9@._/:*-]*$"
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": "^[A-Za-z0-9@._/:*-]*[A-Za-z0-9][A-Za-z0-9@._/:*-]*$"
340
+ "pattern": "^[@._/:*-]*[A-Za-z0-9][A-Za-z0-9@._/:*-]*$"
341
341
  }
342
342
  }
343
343
  },