@workbench-ai/workbench 0.0.50 → 0.0.51

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.
@@ -1 +1 @@
1
- {"version":3,"file":"command-model.d.ts","sourceRoot":"","sources":["../src/command-model.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,6BAA6B,sHAC2E,CAAC;AAOtH,eAAO,MAAM,2BAA2B,QAA0C,CAAC;AA0FnF,eAAO,MAAM,SAAS,QAAuB,CAAC;AAolB9C,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAE/D"}
1
+ {"version":3,"file":"command-model.d.ts","sourceRoot":"","sources":["../src/command-model.ts"],"names":[],"mappings":"AAOA,eAAO,MAAM,6BAA6B,sHAC2E,CAAC;AAOtH,eAAO,MAAM,2BAA2B,QAA0C,CAAC;AA0EnF,eAAO,MAAM,SAAS,QAAuB,CAAC;AAoY9C,wBAAgB,YAAY,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAE/D"}
@@ -7,7 +7,7 @@ const sourceDirectoryHelp = [
7
7
  export const LOCAL_DEV_OPEN_LIFECYCLE_NOTE = "Keep this command running while using the local web view; Ctrl-C stops the server and the page will stop working.";
8
8
  const hostedWatchLifecycleNoteLines = [
9
9
  "Watching is client-side polling only.",
10
- "Stopping this command does not cancel the hosted run; use workbench cloud runs cancel RUN_ID to cancel it.",
10
+ "Stopping this command does not cancel the hosted run.",
11
11
  ];
12
12
  export const HOSTED_WATCH_LIFECYCLE_NOTE = hostedWatchLifecycleNoteLines.join(" ");
13
13
  const localOpenLifecycleHelp = [
@@ -34,11 +34,11 @@ const rootLines = [
34
34
  " workbench adapters inspect ID [--dir DIR] [--json]",
35
35
  " workbench adapters test ID|SOURCE [--dir DIR] [--request PATH] [--output DIR] [--json]",
36
36
  "",
37
- "Local runs:",
38
- " workbench eval [SOURCE] [--dir DIR] [--candidate CANDIDATE_ID] [--runs RUNS|all] [--samples N] [--rerun] [--json]",
39
- " workbench improve [SOURCE] [--dir DIR] [--from CANDIDATE_ID] [--runs RUN] [--budget N] [--samples N] [--rerun] [--json]",
40
- " workbench retry TARGET_ID [--dir DIR] [--json]",
41
- " workbench open [SOURCE] [--dir DIR] [--run RUN_ID] [--host HOST] [--port N] [--no-open] [--json]",
37
+ "Runs:",
38
+ " workbench eval [SOURCE] [--dir DIR] [--hosted] [--benchmark OWNER/BENCHMARK] [--candidate CANDIDATE_ID] [--base CANDIDATE_ID] [--runs RUNS|all] [--samples N] [--rerun] [--watch] [--dry-run] [--json]",
39
+ " workbench improve [SOURCE] [--dir DIR] [--hosted] [--benchmark OWNER/BENCHMARK] [--from CANDIDATE_ID] [--base CANDIDATE_ID] [--runs RUN] [--budget N] [--samples N] [--rerun] [--watch] [--dry-run] [--json]",
40
+ " workbench retry TARGET_ID [--dir DIR] [--hosted] [--benchmark OWNER/BENCHMARK] [--watch] [--interval-ms N] [--timeout-ms N] [--json]",
41
+ " workbench open [SOURCE|OWNER/BENCHMARK|RUN_ID|CANDIDATE_ID] [--dir DIR] [--hosted] [--benchmark OWNER/BENCHMARK] [--run RUN_ID] [--host HOST] [--port N] [--no-open] [--json]",
42
42
  " workbench restore [--dir DIR] [--candidate CANDIDATE_ID] [--dry-run] [--yes] [--json]",
43
43
  "",
44
44
  "Local inspection:",
@@ -52,29 +52,13 @@ const rootLines = [
52
52
  " workbench traces list [--providers codex,claude] [--since 30d] [--workspace DIR] [--limit N] [--json]",
53
53
  " workbench traces show TRACE_ID [--providers codex,claude] [--since 30d] [--workspace DIR] [--json]",
54
54
  "",
55
- "Remote sync:",
55
+ "Remote:",
56
56
  " workbench login [--base-url URL] [--no-open] [--json]",
57
57
  " workbench logout [--json]",
58
58
  " workbench whoami [--dir DIR] [--json]",
59
- " workbench clone OWNER/BENCHMARK[@REF] [DIR] [--dry-run] [--json]",
60
- " workbench remote show [--dir DIR] [--json]",
61
- " workbench remote add origin OWNER/BENCHMARK[@REF] [--dir DIR] [--json]",
62
- " workbench remote set-url origin OWNER/BENCHMARK[@REF] [--dir DIR] [--json]",
63
- " workbench remote remove origin [--dir DIR] [--json]",
64
- " workbench fetch [--dir DIR] [--json]",
59
+ " workbench clone OWNER/BENCHMARK [DIR] [--dry-run] [--json]",
65
60
  " workbench pull [--dir DIR] [--dry-run] [--json]",
66
- " workbench push [SOURCE] [--dir DIR] [--tag TAG] [--visibility public|private] [--dry-run] [--json]",
67
- "",
68
- "Hosted runs and resources:",
69
- " workbench cloud eval [SOURCE] [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--base CANDIDATE_ID] [--runs RUNS|all] [--samples N] [--rerun] [--watch] [--dry-run] [--json]",
70
- " workbench cloud improve [SOURCE] [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--base CANDIDATE_ID] [--runs RUN] [--budget N] [--samples N] [--rerun] [--watch] [--dry-run] [--json]",
71
- " workbench cloud retry TARGET_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--watch] [--interval-ms N] [--timeout-ms N] [--json]",
72
- " workbench cloud open [OWNER/BENCHMARK[@REF]|RUN_ID|CANDIDATE_ID] [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--no-open] [--json]",
73
- " workbench cloud watch RUN_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--interval-ms N] [--timeout-ms N] [--json]",
74
- " workbench cloud logs RUN_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
75
- " workbench cloud star OWNER/BENCHMARK [--json]",
76
- " workbench cloud unstar OWNER/BENCHMARK [--json]",
77
- " workbench cloud benchmarks|runs|candidates <command> [options]",
61
+ " workbench push [SOURCE] [--dir DIR] [--visibility public|private] [--dry-run] [--json]",
78
62
  "",
79
63
  "Auth:",
80
64
  " workbench auth connect ADAPTER[/SLOT] [--dir DIR] [--method METHOD] [--profile PROFILE] [--profile-root DIR] [--local-only] [--json]",
@@ -86,8 +70,8 @@ const rootLines = [
86
70
  " workbench improve --budget 2 --samples 1",
87
71
  " workbench retry eval_local_123 --json",
88
72
  " workbench open --no-open --json",
89
- " workbench push --tag v1",
90
- " workbench cloud eval candidates/current --benchmark openbench/invoice-review@v1 --watch",
73
+ " workbench push",
74
+ " workbench eval --hosted candidates/current --benchmark openbench/invoice-review --watch",
91
75
  "",
92
76
  "Environment:",
93
77
  " WORKBENCH_API_URL sets the hosted Workbench API base URL.",
@@ -137,44 +121,52 @@ const commandHelp = Object.fromEntries(Object.entries({
137
121
  " workbench check",
138
122
  " workbench check candidates/current --json",
139
123
  ]),
140
- eval: withSourceDirectoryHelp([
124
+ eval: withSourceDirectoryHelp(withLifecycleHelp([
141
125
  "Usage:",
142
126
  " workbench eval [SOURCE] [--dir DIR] [--candidate CANDIDATE_ID] [--runs RUNS|all] [--samples N] [--rerun] [--json]",
127
+ " workbench eval --hosted [SOURCE] [--dir DIR] [--benchmark OWNER/BENCHMARK] [--base CANDIDATE_ID] [--runs RUNS|all] [--samples N] [--rerun] [--watch] [--dry-run] [--json]",
143
128
  "",
144
- "Ensure the selected local candidate run has an evaluation for the current benchmark. Completed work is reused only when candidate, run configuration, source, adapters, benchmark, and samples match; use --rerun to intentionally spend again.",
129
+ "Ensure the selected candidate run has an evaluation for the current benchmark. Without --hosted, execution writes local records. With --hosted, Workbench starts or reuses a hosted run against the configured remote or --benchmark target. Completed work is reused only when candidate, run configuration, source, adapters, benchmark, and samples match; use --rerun to intentionally spend again.",
145
130
  "",
146
131
  "Examples:",
147
132
  " workbench eval --samples 1",
133
+ " workbench eval --hosted candidates/current --samples 1 --watch --json",
148
134
  " workbench eval candidates/current --samples 2 --json",
149
- ]),
150
- improve: withSourceDirectoryHelp([
135
+ ], hostedWatchLifecycleHelp)),
136
+ improve: withSourceDirectoryHelp(withLifecycleHelp([
151
137
  "Usage:",
152
138
  " workbench improve [SOURCE] [--dir DIR] [--from CANDIDATE_ID] [--runs RUN] [--budget N] [--samples N] [--rerun] [--json]",
139
+ " workbench improve --hosted [SOURCE] [--dir DIR] [--benchmark OWNER/BENCHMARK] [--base CANDIDATE_ID] [--runs RUN] [--budget N] [--samples N] [--rerun] [--watch] [--dry-run] [--json]",
153
140
  "",
154
- "Ensure a local candidate improvement exists for the selected base, run, budget, and samples. Completed work is reused only when base, run configuration, source, adapters, benchmark, budget, and samples match; use --rerun to intentionally spend again.",
141
+ "Ensure a candidate improvement exists for the selected base, run, budget, and samples. Without --hosted, execution writes local records. With --hosted, Workbench starts or reuses hosted work against the configured remote or --benchmark target. Completed work is reused only when base, run configuration, source, adapters, benchmark, budget, and samples match; use --rerun to intentionally spend again.",
155
142
  "",
156
143
  "Examples:",
157
144
  " workbench improve --budget 1 --samples 1",
145
+ " workbench improve --hosted candidates/current --budget 1 --samples 1 --watch --json",
158
146
  " workbench improve candidates/current --from candidate_123 --json",
159
- ]),
160
- retry: withSourceDirectoryHelp([
147
+ ], hostedWatchLifecycleHelp)),
148
+ retry: withSourceDirectoryHelp(withLifecycleHelp([
161
149
  "Usage:",
162
150
  " workbench retry TARGET_ID [--dir DIR] [--json]",
151
+ " workbench retry --hosted TARGET_ID [--dir DIR] [--benchmark OWNER/BENCHMARK] [--watch] [--interval-ms N] [--timeout-ms N] [--json]",
163
152
  "",
164
- "Retry a failed local run or evaluation by replaying its recorded candidate, configuration, sample count, and improve budget.",
153
+ "Retry a failed run or evaluation by replaying its recorded candidate, configuration, sample count, and improve budget. Use --hosted for hosted records.",
165
154
  "",
166
155
  "Examples:",
167
156
  " workbench retry eval_local_123 --json",
157
+ " workbench retry --hosted run_123 --watch --json",
168
158
  " workbench retry run_local_123 --dir ./my-benchmark",
169
- ]),
159
+ ], hostedWatchLifecycleHelp)),
170
160
  open: withSourceDirectoryHelp(withLifecycleHelp([
171
161
  "Usage:",
172
162
  " workbench open [SOURCE] [--dir DIR] [--run RUN_ID] [--host HOST] [--port N] [--no-open] [--json]",
163
+ " workbench open --hosted [OWNER/BENCHMARK|RUN_ID|CANDIDATE_ID] [--dir DIR] [--benchmark OWNER/BENCHMARK] [--no-open] [--json]",
173
164
  "",
174
- "Start the local Workbench web view for the project and keep serving it until stopped. When a run is supplied, open directly to that run. Without --run, Workbench opens the latest run when one exists.",
165
+ "Start the local Workbench web view for the project and keep serving it until stopped. With --hosted, print and optionally open the hosted project URL instead.",
175
166
  "",
176
167
  "Examples:",
177
168
  " workbench open",
169
+ " workbench open --hosted --no-open --json",
178
170
  " workbench open --run eval_local_123 --port 4317 --no-open --json",
179
171
  ], localOpenLifecycleHelp)),
180
172
  restore: withSourceDirectoryHelp([
@@ -279,82 +271,19 @@ const commandHelp = Object.fromEntries(Object.entries({
279
271
  ]),
280
272
  clone: [
281
273
  "Usage:",
282
- " workbench clone OWNER/BENCHMARK[@REF] [DIR] [--dry-run] [--json]",
274
+ " workbench clone OWNER/BENCHMARK [DIR] [--dry-run] [--json]",
283
275
  "",
284
- "Download a hosted benchmark project into a local Workbench project and write .workbench/origin.json.",
276
+ "Clone hosted source and runtime history into a local Workbench project and remember it as the remote.",
285
277
  "",
286
278
  "Examples:",
287
279
  " workbench clone openbench/invoice-review",
288
- " workbench clone openbench/invoice-review@v1 ./invoice-review --dry-run --json",
280
+ " workbench clone openbench/invoice-review ./invoice-review --dry-run --json",
289
281
  ],
290
- remote: withSourceDirectoryHelp([
291
- "Usage:",
292
- " workbench remote show [--dir DIR] [--json]",
293
- " workbench remote add origin OWNER/BENCHMARK[@REF] [--dir DIR] [--json]",
294
- " workbench remote set-url origin OWNER/BENCHMARK[@REF] [--dir DIR] [--json]",
295
- " workbench remote remove origin [--dir DIR] [--json]",
296
- "",
297
- "Manage the project origin used by fetch, pull, and push.",
298
- "",
299
- "Examples:",
300
- " workbench remote show --json",
301
- " workbench remote add origin openbench/invoice-review@v1",
302
- ]),
303
- "remote show": withSourceDirectoryHelp([
304
- "Usage:",
305
- " workbench remote show [--dir DIR] [--json]",
306
- "",
307
- "Show the configured origin.",
308
- "",
309
- "Examples:",
310
- " workbench remote show",
311
- " workbench remote show --json",
312
- ]),
313
- "remote add": withSourceDirectoryHelp([
314
- "Usage:",
315
- " workbench remote add origin OWNER/BENCHMARK[@REF] [--dir DIR] [--json]",
316
- "",
317
- "Set the project origin.",
318
- "",
319
- "Examples:",
320
- " workbench remote add origin openbench/invoice-review@v1",
321
- " workbench remote add origin openbench/invoice-review --json",
322
- ]),
323
- "remote set-url": withSourceDirectoryHelp([
324
- "Usage:",
325
- " workbench remote set-url origin OWNER/BENCHMARK[@REF] [--dir DIR] [--json]",
326
- "",
327
- "Replace the project origin.",
328
- "",
329
- "Examples:",
330
- " workbench remote set-url origin openbench/invoice-review@v2",
331
- " workbench remote set-url origin openbench/invoice-review@v2 --json",
332
- ]),
333
- "remote remove": withSourceDirectoryHelp([
334
- "Usage:",
335
- " workbench remote remove origin [--dir DIR] [--json]",
336
- "",
337
- "Remove the project origin.",
338
- "",
339
- "Examples:",
340
- " workbench remote remove origin",
341
- " workbench remote remove origin --json",
342
- ]),
343
- fetch: withSourceDirectoryHelp([
344
- "Usage:",
345
- " workbench fetch [--dir DIR] [--json]",
346
- "",
347
- "Download remote source into .workbench/fetch without changing project files.",
348
- "",
349
- "Examples:",
350
- " workbench fetch",
351
- " workbench fetch --json",
352
- ]),
353
282
  pull: withSourceDirectoryHelp([
354
283
  "Usage:",
355
284
  " workbench pull [--dir DIR] [--dry-run] [--json]",
356
285
  "",
357
- "Update managed project source files from the configured origin.",
286
+ "Pull source and runtime history from the remembered remote into the local project.",
358
287
  "",
359
288
  "Examples:",
360
289
  " workbench pull --dry-run",
@@ -362,12 +291,12 @@ const commandHelp = Object.fromEntries(Object.entries({
362
291
  ]),
363
292
  push: withSourceDirectoryHelp([
364
293
  "Usage:",
365
- " workbench push [SOURCE] [--dir DIR] [--tag TAG] [--visibility public|private] [--dry-run] [--json]",
294
+ " workbench push [SOURCE] [--dir DIR] [--visibility public|private] [--dry-run] [--json]",
366
295
  "",
367
- "Create or update the hosted benchmark version from local project source and write .workbench/origin.json.",
296
+ "Push local project source and runtime history to the remembered remote, or create one when the project has not been pushed before.",
368
297
  "",
369
298
  "Examples:",
370
- " workbench push --tag v1 --dry-run",
299
+ " workbench push --dry-run",
371
300
  " workbench push candidates/current --visibility private --json",
372
301
  ]),
373
302
  login: [
@@ -529,319 +458,7 @@ const commandHelp = Object.fromEntries(Object.entries({
529
458
  " workbench auth disconnect codex --local-only",
530
459
  " workbench auth disconnect claude --profile default --json",
531
460
  ],
532
- cloud: [
533
- "Usage:",
534
- " workbench cloud <command> [options]",
535
- "",
536
- "Hosted Workbench Cloud execution and resource commands.",
537
- "",
538
- "Commands:",
539
- " workbench cloud eval [SOURCE] [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--base CANDIDATE_ID] [--runs RUNS|all] [--samples N] [--rerun] [--watch] [--dry-run] [--json]",
540
- " workbench cloud improve [SOURCE] [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--base CANDIDATE_ID] [--runs RUN] [--budget N] [--samples N] [--rerun] [--watch] [--dry-run] [--json]",
541
- " workbench cloud retry TARGET_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--watch] [--interval-ms N] [--timeout-ms N] [--json]",
542
- " workbench cloud open [OWNER/BENCHMARK[@REF]|RUN_ID|CANDIDATE_ID] [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--no-open] [--json]",
543
- " workbench cloud watch RUN_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--interval-ms N] [--timeout-ms N] [--json]",
544
- " workbench cloud logs RUN_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
545
- " workbench cloud star OWNER/BENCHMARK [--json]",
546
- " workbench cloud unstar OWNER/BENCHMARK [--json]",
547
- " workbench cloud benchmarks|runs|candidates <command> [options]",
548
- "",
549
- "Examples:",
550
- " workbench cloud eval candidates/current --benchmark openbench/invoice-review@v1 --dry-run --json",
551
- " workbench cloud retry run_123 --benchmark openbench/invoice-review --watch",
552
- " workbench cloud runs list --benchmark openbench/invoice-review --json",
553
- ],
554
- "cloud star": [
555
- "Usage:",
556
- " workbench cloud star OWNER/BENCHMARK [--json]",
557
- "",
558
- "Star a hosted benchmark.",
559
- "",
560
- "Examples:",
561
- " workbench cloud star openbench/invoice-review",
562
- " workbench cloud star openbench/invoice-review --json",
563
- ],
564
- "cloud unstar": [
565
- "Usage:",
566
- " workbench cloud unstar OWNER/BENCHMARK [--json]",
567
- "",
568
- "Remove your star from a hosted benchmark.",
569
- "",
570
- "Examples:",
571
- " workbench cloud unstar openbench/invoice-review",
572
- " workbench cloud unstar openbench/invoice-review --json",
573
- ],
574
- "cloud eval": withSourceDirectoryHelp(withLifecycleHelp([
575
- "Usage:",
576
- " workbench cloud eval [SOURCE] [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--base CANDIDATE_ID] [--runs RUNS|all] [--samples N] [--rerun] [--watch] [--dry-run] [--json]",
577
- "",
578
- "Ensure a hosted evaluation exists for the selected candidate run. Completed hosted work is reused only when candidate, run configuration, source, adapters, benchmark, and samples match; use --rerun to intentionally spend again.",
579
- "",
580
- "Examples:",
581
- " workbench cloud eval candidates/current --benchmark openbench/invoice-review@v1 --dry-run --json",
582
- " workbench cloud eval --benchmark openbench/invoice-review --watch",
583
- ], hostedWatchLifecycleHelp)),
584
- "cloud improve": withSourceDirectoryHelp(withLifecycleHelp([
585
- "Usage:",
586
- " workbench cloud improve [SOURCE] [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--base CANDIDATE_ID] [--runs RUN] [--budget N] [--samples N] [--rerun] [--watch] [--dry-run] [--json]",
587
- "",
588
- "Ensure a hosted candidate improvement exists for the selected base, run, budget, and samples. Completed work is reused only when base, run configuration, source, adapters, benchmark, budget, and samples match; use --rerun to intentionally spend again.",
589
- "",
590
- "Examples:",
591
- " workbench cloud improve --benchmark openbench/invoice-review --dry-run",
592
- " workbench cloud improve candidates/current --watch --json",
593
- ], hostedWatchLifecycleHelp)),
594
- "cloud retry": withSourceDirectoryHelp(withLifecycleHelp([
595
- "Usage:",
596
- " workbench cloud retry TARGET_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--watch] [--interval-ms N] [--timeout-ms N] [--json]",
597
- "",
598
- "Retry a failed hosted run or evaluation by replaying its recorded candidate, configuration, sample count, and improve budget.",
599
- "",
600
- "Examples:",
601
- " workbench cloud retry run_123 --benchmark openbench/invoice-review --watch",
602
- " workbench cloud retry eval_123 --json",
603
- ], hostedWatchLifecycleHelp)),
604
- "cloud open": [
605
- "Usage:",
606
- " workbench cloud open [OWNER/BENCHMARK[@REF]|RUN_ID|CANDIDATE_ID] [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--no-open] [--json]",
607
- "",
608
- "Print and open the hosted Workbench URL.",
609
- "",
610
- "Examples:",
611
- " workbench cloud open openbench/invoice-review --no-open",
612
- " workbench cloud open run_123 --benchmark openbench/invoice-review --json",
613
- ],
614
- "cloud watch": withSourceDirectoryHelp(withLifecycleHelp([
615
- "Usage:",
616
- " workbench cloud watch RUN_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--interval-ms N] [--timeout-ms N] [--json]",
617
- "",
618
- "Poll a hosted run until it finishes.",
619
- "",
620
- "Examples:",
621
- " workbench cloud watch run_123 --benchmark openbench/invoice-review",
622
- " workbench cloud watch run_123 --interval-ms 5000 --timeout-ms 600000 --json",
623
- ], hostedWatchLifecycleHelp)),
624
- "cloud logs": withSourceDirectoryHelp([
625
- "Usage:",
626
- " workbench cloud logs RUN_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
627
- "",
628
- "Show hosted run job statuses and errors.",
629
- "",
630
- "Examples:",
631
- " workbench cloud logs run_123 --benchmark openbench/invoice-review",
632
- " workbench cloud logs run_123 --json",
633
- ]),
634
- "cloud benchmarks": [
635
- "Usage:",
636
- " workbench cloud benchmarks <command> [options]",
637
- "",
638
- "Hosted benchmark resource commands.",
639
- "",
640
- "Commands:",
641
- " workbench cloud benchmarks list [--json]",
642
- " workbench cloud benchmarks show OWNER/BENCHMARK [--json]",
643
- " workbench cloud benchmarks versions OWNER/BENCHMARK [--json]",
644
- " workbench cloud benchmarks starred [--json]",
645
- " workbench cloud benchmarks delete OWNER/BENCHMARK [--dir DIR] [--dry-run] [--json]",
646
- "",
647
- "Examples:",
648
- " workbench cloud benchmarks list --json",
649
- " workbench cloud benchmarks show openbench/invoice-review",
650
- ],
651
- "cloud runs": [
652
- "Usage:",
653
- " workbench cloud runs <command> [options]",
654
- "",
655
- "Hosted run resource commands.",
656
- "",
657
- "Commands:",
658
- " workbench cloud runs list [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
659
- " workbench cloud runs show RUN_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
660
- " workbench cloud runs cancel RUN_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
661
- "",
662
- "Examples:",
663
- " workbench cloud runs list --benchmark openbench/invoice-review --json",
664
- " workbench cloud runs show run_123 --benchmark openbench/invoice-review",
665
- ],
666
- "cloud candidates": [
667
- "Usage:",
668
- " workbench cloud candidates <command> [options]",
669
- "",
670
- "Hosted candidate resource commands.",
671
- "",
672
- "Commands:",
673
- " workbench cloud candidates list [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
674
- " workbench cloud candidates show CANDIDATE_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
675
- " workbench cloud candidates files CANDIDATE_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
676
- " workbench cloud candidates preview CANDIDATE_ID --path PATH [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--output PATH|-] [--json]",
677
- " workbench cloud candidates pull CANDIDATE_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--out DIR] [--json]",
678
- " workbench cloud candidates publish CANDIDATE_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
679
- " workbench cloud candidates unpublish CANDIDATE_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
680
- "",
681
- "Examples:",
682
- " workbench cloud candidates list --benchmark openbench/invoice-review --json",
683
- " workbench cloud candidates preview candidate_123 --path SKILL.md --output -",
684
- ],
685
461
  }).map(([key, lines]) => [key, lines.join("\n")]));
686
462
  export function commandUsage(commandPath) {
687
- return commandHelp[commandPath] ?? cloudNestedCommandUsage(commandPath);
688
- }
689
- const hostedCommandHelp = Object.fromEntries(Object.entries({
690
- "benchmarks list": [
691
- "Usage:",
692
- " workbench cloud benchmarks list [--json]",
693
- "",
694
- "List public hosted benchmarks.",
695
- "",
696
- "Examples:",
697
- " workbench cloud benchmarks list",
698
- " workbench cloud benchmarks list --json",
699
- ],
700
- "benchmarks show": [
701
- "Usage:",
702
- " workbench cloud benchmarks show OWNER/BENCHMARK [--json]",
703
- "",
704
- "Show one hosted benchmark.",
705
- "",
706
- "Examples:",
707
- " workbench cloud benchmarks show openbench/invoice-review",
708
- " workbench cloud benchmarks show openbench/invoice-review --json",
709
- ],
710
- "benchmarks versions": [
711
- "Usage:",
712
- " workbench cloud benchmarks versions OWNER/BENCHMARK [--json]",
713
- "",
714
- "List hosted benchmark versions.",
715
- "",
716
- "Examples:",
717
- " workbench cloud benchmarks versions openbench/invoice-review",
718
- " workbench cloud benchmarks versions openbench/invoice-review --json",
719
- ],
720
- "benchmarks starred": [
721
- "Usage:",
722
- " workbench cloud benchmarks starred [--json]",
723
- "",
724
- "List benchmarks starred by the current user.",
725
- "",
726
- "Examples:",
727
- " workbench cloud benchmarks starred",
728
- " workbench cloud benchmarks starred --json",
729
- ],
730
- "benchmarks delete": [
731
- "Usage:",
732
- " workbench cloud benchmarks delete OWNER/BENCHMARK [--dir DIR] [--dry-run] [--json]",
733
- "",
734
- "Delete a hosted benchmark project that you own.",
735
- "",
736
- "Examples:",
737
- " workbench cloud benchmarks delete alice/invoice-review --dry-run",
738
- " workbench cloud benchmarks delete alice/invoice-review --json",
739
- ],
740
- "runs list": [
741
- "Usage:",
742
- " workbench cloud runs list [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
743
- "",
744
- "List hosted runs.",
745
- "",
746
- "Examples:",
747
- " workbench cloud runs list --benchmark openbench/invoice-review",
748
- " workbench cloud runs list --benchmark openbench/invoice-review --json",
749
- ],
750
- "runs show": [
751
- "Usage:",
752
- " workbench cloud runs show RUN_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
753
- "",
754
- "Show one hosted run.",
755
- "",
756
- "Examples:",
757
- " workbench cloud runs show run_123 --benchmark openbench/invoice-review",
758
- " workbench cloud runs show run_123 --json",
759
- ],
760
- "runs cancel": [
761
- "Usage:",
762
- " workbench cloud runs cancel RUN_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
763
- "",
764
- "Cancel a hosted run.",
765
- "",
766
- "Examples:",
767
- " workbench cloud runs cancel run_123 --benchmark openbench/invoice-review",
768
- " workbench cloud runs cancel run_123 --json",
769
- ],
770
- "candidates list": [
771
- "Usage:",
772
- " workbench cloud candidates list [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
773
- "",
774
- "List hosted candidates.",
775
- "",
776
- "Examples:",
777
- " workbench cloud candidates list --benchmark openbench/invoice-review",
778
- " workbench cloud candidates list --json",
779
- ],
780
- "candidates show": [
781
- "Usage:",
782
- " workbench cloud candidates show CANDIDATE_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
783
- "",
784
- "Show one hosted candidate.",
785
- "",
786
- "Examples:",
787
- " workbench cloud candidates show candidate_123 --benchmark openbench/invoice-review",
788
- " workbench cloud candidates show candidate_123 --json",
789
- ],
790
- "candidates files": [
791
- "Usage:",
792
- " workbench cloud candidates files CANDIDATE_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
793
- "",
794
- "List files in a hosted candidate snapshot.",
795
- "",
796
- "Examples:",
797
- " workbench cloud candidates files candidate_123 --benchmark openbench/invoice-review",
798
- " workbench cloud candidates files candidate_123 --json",
799
- ],
800
- "candidates preview": [
801
- "Usage:",
802
- " workbench cloud candidates preview CANDIDATE_ID --path PATH [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--output PATH|-] [--json]",
803
- "",
804
- "Preview a file from a hosted candidate snapshot.",
805
- "",
806
- "Examples:",
807
- " workbench cloud candidates preview candidate_123 --path SKILL.md --output -",
808
- " workbench cloud candidates preview candidate_123 --path SKILL.md --benchmark openbench/invoice-review",
809
- ],
810
- "candidates pull": [
811
- "Usage:",
812
- " workbench cloud candidates pull CANDIDATE_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--out DIR] [--json]",
813
- "",
814
- "Download hosted candidate files.",
815
- "",
816
- "Examples:",
817
- " workbench cloud candidates pull candidate_123 --out ./candidate-files",
818
- " workbench cloud candidates pull candidate_123 --benchmark openbench/invoice-review --json",
819
- ],
820
- "candidates publish": [
821
- "Usage:",
822
- " workbench cloud candidates publish CANDIDATE_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
823
- "",
824
- "Make a hosted candidate public.",
825
- "",
826
- "Examples:",
827
- " workbench cloud candidates publish candidate_123 --benchmark openbench/invoice-review",
828
- " workbench cloud candidates publish candidate_123 --json",
829
- ],
830
- "candidates unpublish": [
831
- "Usage:",
832
- " workbench cloud candidates unpublish CANDIDATE_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
833
- "",
834
- "Make a hosted candidate private.",
835
- "",
836
- "Examples:",
837
- " workbench cloud candidates unpublish candidate_123 --benchmark openbench/invoice-review",
838
- " workbench cloud candidates unpublish candidate_123 --json",
839
- ],
840
- }).map(([key, lines]) => [key, lines.join("\n")]));
841
- function cloudNestedCommandUsage(commandPath) {
842
- if (!commandPath.startsWith("cloud ")) {
843
- return null;
844
- }
845
- const withoutCloud = commandPath.slice("cloud ".length);
846
- return hostedCommandHelp[withoutCloud] ?? null;
463
+ return commandHelp[commandPath] ?? null;
847
464
  }