@workbench-ai/workbench 0.0.46
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/dist/adapter-project.d.ts +29 -0
- package/dist/adapter-project.d.ts.map +1 -0
- package/dist/adapter-project.js +363 -0
- package/dist/benchmark-fingerprint.d.ts +6 -0
- package/dist/benchmark-fingerprint.d.ts.map +1 -0
- package/dist/benchmark-fingerprint.js +101 -0
- package/dist/command-model.d.ts +5 -0
- package/dist/command-model.d.ts.map +1 -0
- package/dist/command-model.js +558 -0
- package/dist/dev-open/client.css +8157 -0
- package/dist/dev-open/client.js +252596 -0
- package/dist/dev-open/fonts/geist-cyrillic-wght-normal.woff2 +0 -0
- package/dist/dev-open/fonts/geist-latin-ext-wght-normal.woff2 +0 -0
- package/dist/dev-open/fonts/geist-latin-wght-normal.woff2 +0 -0
- package/dist/dev-open-server.d.ts +57 -0
- package/dist/dev-open-server.d.ts.map +1 -0
- package/dist/dev-open-server.js +496 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +3943 -0
- package/dist/init-scaffold.d.ts +22 -0
- package/dist/init-scaffold.d.ts.map +1 -0
- package/dist/init-scaffold.js +30 -0
- package/dist/init-template-pack.d.ts +19 -0
- package/dist/init-template-pack.d.ts.map +1 -0
- package/dist/init-template-pack.js +250 -0
- package/dist/local-archive.d.ts +23 -0
- package/dist/local-archive.d.ts.map +1 -0
- package/dist/local-archive.js +741 -0
- package/dist/project-source.d.ts +51 -0
- package/dist/project-source.d.ts.map +1 -0
- package/dist/project-source.js +700 -0
- package/dist/workbench.d.ts +3 -0
- package/dist/workbench.d.ts.map +1 -0
- package/dist/workbench.js +4 -0
- package/dist/workspace-snapshot.d.ts +10 -0
- package/dist/workspace-snapshot.d.ts.map +1 -0
- package/dist/workspace-snapshot.js +81 -0
- package/package.json +45 -0
|
@@ -0,0 +1,558 @@
|
|
|
1
|
+
const sourceDirectoryHelp = [
|
|
2
|
+
"Directory:",
|
|
3
|
+
" Run from a Workbench project containing benchmark.yaml plus subjects/<name>/subject.yaml.",
|
|
4
|
+
" Subject manifests declare their files with files.path, usually files beside subject.yaml.",
|
|
5
|
+
" Pass --dir DIR or pass benchmark.yaml, subjects/<name>, or subjects/<name>/subject.yaml as SOURCE.",
|
|
6
|
+
];
|
|
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
|
+
const hostedWatchLifecycleNoteLines = [
|
|
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.",
|
|
11
|
+
];
|
|
12
|
+
export const HOSTED_WATCH_LIFECYCLE_NOTE = hostedWatchLifecycleNoteLines.join(" ");
|
|
13
|
+
const localOpenLifecycleHelp = [
|
|
14
|
+
"Lifecycle:",
|
|
15
|
+
" workbench open starts a long-running local web server.",
|
|
16
|
+
` ${LOCAL_DEV_OPEN_LIFECYCLE_NOTE}`,
|
|
17
|
+
];
|
|
18
|
+
const hostedWatchLifecycleHelp = [
|
|
19
|
+
"Lifecycle:",
|
|
20
|
+
...hostedWatchLifecycleNoteLines.map((line) => ` ${line}`),
|
|
21
|
+
];
|
|
22
|
+
const rootLines = [
|
|
23
|
+
"Usage:",
|
|
24
|
+
" workbench <command> [options]",
|
|
25
|
+
"",
|
|
26
|
+
...sourceDirectoryHelp,
|
|
27
|
+
"",
|
|
28
|
+
"Project:",
|
|
29
|
+
" workbench init [DIR] --skill NAME --agent ADAPTER [--from PATH] [--example] [--json]",
|
|
30
|
+
" workbench init [DIR] --command NAME [--from PATH] [--example] [--json]",
|
|
31
|
+
" workbench check [SOURCE] [--dir DIR] [--json]",
|
|
32
|
+
" workbench adapters create PATH [--dir DIR] [--json]",
|
|
33
|
+
" workbench adapters list [--dir DIR] [--json]",
|
|
34
|
+
" workbench adapters inspect ID [--dir DIR] [--json]",
|
|
35
|
+
" workbench adapters test ID|SOURCE [--dir DIR] [--request PATH] [--output DIR] [--json]",
|
|
36
|
+
"",
|
|
37
|
+
"Local runs:",
|
|
38
|
+
" workbench eval [SOURCE] [--dir DIR] [--subject ID] [--samples N] [--json]",
|
|
39
|
+
" workbench improve [SOURCE] [--dir DIR] [--from SUBJECT_ID] [--optimizer OPTIMIZER_YAML] [--budget N] [--samples N] [--json]",
|
|
40
|
+
" workbench open [SOURCE] [--dir DIR] [--host HOST] [--port N] [--no-open] [--json]",
|
|
41
|
+
" workbench checkpoint [--dir DIR] [--json]",
|
|
42
|
+
" workbench restore [--dir DIR] [--subject ID] [--dry-run] [--yes] [--json]",
|
|
43
|
+
"",
|
|
44
|
+
"Local inspection:",
|
|
45
|
+
" workbench runs list [--dir DIR] [--json]",
|
|
46
|
+
" workbench runs show RUN_ID [--dir DIR] [--json]",
|
|
47
|
+
" workbench subjects list [--dir DIR] [--json]",
|
|
48
|
+
" workbench subjects show SUBJECT_ID [--dir DIR] [--json]",
|
|
49
|
+
" workbench subjects files [--dir DIR] [--subject ID] [--json]",
|
|
50
|
+
" workbench subjects preview --path PATH [--dir DIR] [--subject ID] [--output PATH|-] [--json]",
|
|
51
|
+
"",
|
|
52
|
+
"Remote sync:",
|
|
53
|
+
" workbench login [--base-url URL] [--no-open] [--json]",
|
|
54
|
+
" workbench logout [--json]",
|
|
55
|
+
" workbench whoami [--dir DIR] [--json]",
|
|
56
|
+
" workbench clone OWNER/BENCHMARK[@REF] [DIR] [--dry-run] [--json]",
|
|
57
|
+
" workbench remote show [--dir DIR] [--json]",
|
|
58
|
+
" workbench remote add origin OWNER/BENCHMARK[@REF] [--dir DIR] [--json]",
|
|
59
|
+
" workbench remote set-url origin OWNER/BENCHMARK[@REF] [--dir DIR] [--json]",
|
|
60
|
+
" workbench remote remove origin [--dir DIR] [--json]",
|
|
61
|
+
" workbench fetch [--dir DIR] [--json]",
|
|
62
|
+
" workbench pull [--dir DIR] [--dry-run] [--json]",
|
|
63
|
+
" workbench push [SOURCE] [--dir DIR] [--tag TAG] [--visibility public|private] [--dry-run] [--json]",
|
|
64
|
+
"",
|
|
65
|
+
"Hosted runs and resources:",
|
|
66
|
+
" workbench cloud eval [SOURCE] [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--base SUBJECT_ID] [--samples N] [--watch] [--dry-run] [--json]",
|
|
67
|
+
" workbench cloud improve [SOURCE] [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--base SUBJECT_ID] [--optimizer OPTIMIZER_YAML] [--budget N] [--samples N] [--watch] [--dry-run] [--json]",
|
|
68
|
+
" workbench cloud open [OWNER/BENCHMARK[@REF]|RUN_ID|SUBJECT_ID] [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--no-open] [--json]",
|
|
69
|
+
" workbench cloud watch RUN_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--interval-ms N] [--timeout-ms N] [--json]",
|
|
70
|
+
" workbench cloud logs RUN_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
|
|
71
|
+
" workbench cloud fork OWNER/BENCHMARK[@REF] [NAME] [--json]",
|
|
72
|
+
" workbench cloud star OWNER/BENCHMARK [--json]",
|
|
73
|
+
" workbench cloud unstar OWNER/BENCHMARK [--json]",
|
|
74
|
+
" workbench cloud benchmarks|runs|subjects <command> [options]",
|
|
75
|
+
"",
|
|
76
|
+
"Auth:",
|
|
77
|
+
" workbench auth connect ADAPTER[/SLOT] [--dir DIR] [--method METHOD] [--profile PROFILE] [--profile-root DIR] [--local-only] [--json]",
|
|
78
|
+
" workbench auth disconnect ADAPTER[/SLOT] [--profile PROFILE] [--local-only] [--json]",
|
|
79
|
+
"",
|
|
80
|
+
"Examples:",
|
|
81
|
+
" workbench init --skill invoice-review --agent codex",
|
|
82
|
+
" workbench eval subjects/codex --samples 1",
|
|
83
|
+
" workbench improve --budget 2 --samples 1",
|
|
84
|
+
" workbench open --no-open --json",
|
|
85
|
+
" workbench push --tag v1",
|
|
86
|
+
" workbench cloud eval subjects/codex --benchmark openbench/invoice-review@v1 --watch",
|
|
87
|
+
"",
|
|
88
|
+
"Environment:",
|
|
89
|
+
" WORKBENCH_API_URL sets the hosted Workbench API base URL.",
|
|
90
|
+
"",
|
|
91
|
+
"Default API URL:",
|
|
92
|
+
" https://v2.workbench.ai",
|
|
93
|
+
];
|
|
94
|
+
export const rootUsage = rootLines.join("\n");
|
|
95
|
+
function withSourceDirectoryHelp(lines) {
|
|
96
|
+
return withHelpAfterUsage(lines, sourceDirectoryHelp);
|
|
97
|
+
}
|
|
98
|
+
function withLifecycleHelp(lines, lifecycleHelp) {
|
|
99
|
+
return withHelpAfterUsage(lines, lifecycleHelp);
|
|
100
|
+
}
|
|
101
|
+
function withHelpAfterUsage(lines, helpLines) {
|
|
102
|
+
const firstBlankIndex = lines.indexOf("");
|
|
103
|
+
if (firstBlankIndex < 0) {
|
|
104
|
+
return [...lines, "", ...helpLines];
|
|
105
|
+
}
|
|
106
|
+
return [
|
|
107
|
+
...lines.slice(0, firstBlankIndex),
|
|
108
|
+
"",
|
|
109
|
+
...helpLines,
|
|
110
|
+
"",
|
|
111
|
+
...lines.slice(firstBlankIndex + 1),
|
|
112
|
+
];
|
|
113
|
+
}
|
|
114
|
+
const commandHelp = Object.fromEntries(Object.entries({
|
|
115
|
+
init: [
|
|
116
|
+
"Usage:",
|
|
117
|
+
" workbench init [DIR] --skill NAME --agent ADAPTER [--from PATH] [--example] [--json]",
|
|
118
|
+
" workbench init [DIR] --command NAME [--from PATH] [--example] [--json]",
|
|
119
|
+
"",
|
|
120
|
+
"Scaffold a local Workbench project. benchmark.yaml selects an engine; the built-in workbench engine owns tasks, environment, and scoring under engine.with. subjects/<name>/subject.yaml owns files.path and run behavior. optimizers/<name>.yaml owns improvement behavior.",
|
|
121
|
+
"",
|
|
122
|
+
"Examples:",
|
|
123
|
+
" workbench init --skill invoice-review --agent codex",
|
|
124
|
+
" workbench init --command command-eval",
|
|
125
|
+
],
|
|
126
|
+
check: withSourceDirectoryHelp([
|
|
127
|
+
"Usage:",
|
|
128
|
+
" workbench check [SOURCE] [--dir DIR] [--json]",
|
|
129
|
+
"",
|
|
130
|
+
"Validate benchmark.yaml, one subject manifest, and an optional optimizer manifest.",
|
|
131
|
+
"",
|
|
132
|
+
"Examples:",
|
|
133
|
+
" workbench check",
|
|
134
|
+
" workbench check subjects/codex --json",
|
|
135
|
+
]),
|
|
136
|
+
eval: withSourceDirectoryHelp([
|
|
137
|
+
"Usage:",
|
|
138
|
+
" workbench eval [SOURCE] [--dir DIR] [--subject ID] [--samples N] [--json]",
|
|
139
|
+
"",
|
|
140
|
+
"Run the selected local subject against the current benchmark and record attempts, results, traces, artifacts, and a run record under .workbench/runtime.",
|
|
141
|
+
"",
|
|
142
|
+
"Examples:",
|
|
143
|
+
" workbench eval --samples 1",
|
|
144
|
+
" workbench eval subjects/codex --samples 2 --json",
|
|
145
|
+
]),
|
|
146
|
+
improve: withSourceDirectoryHelp([
|
|
147
|
+
"Usage:",
|
|
148
|
+
" workbench improve [SOURCE] [--dir DIR] [--from SUBJECT_ID] [--optimizer OPTIMIZER_YAML] [--budget N] [--samples N] [--json]",
|
|
149
|
+
"",
|
|
150
|
+
"Run local subject improvement. By default, Workbench improves the current subject. If it has not been evaluated yet, Workbench evaluates it first. Use --from to improve an explicit subject id.",
|
|
151
|
+
"",
|
|
152
|
+
"Examples:",
|
|
153
|
+
" workbench improve --budget 1 --samples 1",
|
|
154
|
+
" workbench improve subjects/codex --from subj_123 --optimizer optimizers/codex.yaml --json",
|
|
155
|
+
]),
|
|
156
|
+
open: withSourceDirectoryHelp(withLifecycleHelp([
|
|
157
|
+
"Usage:",
|
|
158
|
+
" workbench open [SOURCE] [--dir DIR] [--host HOST] [--port N] [--no-open] [--json]",
|
|
159
|
+
"",
|
|
160
|
+
"Start the local Workbench web view for the project and keep serving it until stopped.",
|
|
161
|
+
"",
|
|
162
|
+
"Examples:",
|
|
163
|
+
" workbench open",
|
|
164
|
+
" workbench open --port 4317 --no-open --json",
|
|
165
|
+
], localOpenLifecycleHelp)),
|
|
166
|
+
checkpoint: withSourceDirectoryHelp([
|
|
167
|
+
"Usage:",
|
|
168
|
+
" workbench checkpoint [--dir DIR] [--json]",
|
|
169
|
+
"",
|
|
170
|
+
"Save the current subject files into local history and make the checkpoint active.",
|
|
171
|
+
]),
|
|
172
|
+
restore: withSourceDirectoryHelp([
|
|
173
|
+
"Usage:",
|
|
174
|
+
" workbench restore [--dir DIR] [--subject ID] [--dry-run] [--yes] [--json]",
|
|
175
|
+
"",
|
|
176
|
+
"Restore a local subject snapshot into the subject files directory.",
|
|
177
|
+
"",
|
|
178
|
+
"Examples:",
|
|
179
|
+
" workbench restore --subject subj_123 --dry-run",
|
|
180
|
+
" workbench restore --subject subj_123 --yes",
|
|
181
|
+
]),
|
|
182
|
+
runs: [
|
|
183
|
+
"Usage:",
|
|
184
|
+
" workbench runs <command> [options]",
|
|
185
|
+
"",
|
|
186
|
+
"Inspect local run history.",
|
|
187
|
+
"",
|
|
188
|
+
"Commands:",
|
|
189
|
+
" workbench runs list [--dir DIR] [--json]",
|
|
190
|
+
" workbench runs show RUN_ID [--dir DIR] [--json]",
|
|
191
|
+
],
|
|
192
|
+
"runs list": withSourceDirectoryHelp([
|
|
193
|
+
"Usage:",
|
|
194
|
+
" workbench runs list [--dir DIR] [--json]",
|
|
195
|
+
"",
|
|
196
|
+
"List local runs.",
|
|
197
|
+
]),
|
|
198
|
+
"runs show": withSourceDirectoryHelp([
|
|
199
|
+
"Usage:",
|
|
200
|
+
" workbench runs show RUN_ID [--dir DIR] [--json]",
|
|
201
|
+
"",
|
|
202
|
+
"Show one local run record.",
|
|
203
|
+
]),
|
|
204
|
+
subjects: [
|
|
205
|
+
"Usage:",
|
|
206
|
+
" workbench subjects <command> [options]",
|
|
207
|
+
"",
|
|
208
|
+
"Inspect local subjects.",
|
|
209
|
+
"",
|
|
210
|
+
"Commands:",
|
|
211
|
+
" workbench subjects list [--dir DIR] [--json]",
|
|
212
|
+
" workbench subjects show SUBJECT_ID [--dir DIR] [--json]",
|
|
213
|
+
" workbench subjects files [--dir DIR] [--subject ID] [--json]",
|
|
214
|
+
" workbench subjects preview --path PATH [--dir DIR] [--subject ID] [--output PATH|-] [--json]",
|
|
215
|
+
],
|
|
216
|
+
"subjects list": withSourceDirectoryHelp([
|
|
217
|
+
"Usage:",
|
|
218
|
+
" workbench subjects list [--dir DIR] [--json]",
|
|
219
|
+
"",
|
|
220
|
+
"List local subjects.",
|
|
221
|
+
]),
|
|
222
|
+
"subjects show": withSourceDirectoryHelp([
|
|
223
|
+
"Usage:",
|
|
224
|
+
" workbench subjects show SUBJECT_ID [--dir DIR] [--json]",
|
|
225
|
+
"",
|
|
226
|
+
"Show one local subject.",
|
|
227
|
+
]),
|
|
228
|
+
"subjects files": withSourceDirectoryHelp([
|
|
229
|
+
"Usage:",
|
|
230
|
+
" workbench subjects files [--dir DIR] [--subject ID] [--json]",
|
|
231
|
+
"",
|
|
232
|
+
"List files in a local subject snapshot.",
|
|
233
|
+
]),
|
|
234
|
+
"subjects preview": withSourceDirectoryHelp([
|
|
235
|
+
"Usage:",
|
|
236
|
+
" workbench subjects preview --path PATH [--dir DIR] [--subject ID] [--output PATH|-] [--json]",
|
|
237
|
+
"",
|
|
238
|
+
"Preview a file from a local subject snapshot.",
|
|
239
|
+
]),
|
|
240
|
+
clone: [
|
|
241
|
+
"Usage:",
|
|
242
|
+
" workbench clone OWNER/BENCHMARK[@REF] [DIR] [--dry-run] [--json]",
|
|
243
|
+
"",
|
|
244
|
+
"Download a hosted benchmark project into a local Workbench project and write .workbench/origin.json.",
|
|
245
|
+
],
|
|
246
|
+
remote: withSourceDirectoryHelp([
|
|
247
|
+
"Usage:",
|
|
248
|
+
" workbench remote show [--dir DIR] [--json]",
|
|
249
|
+
" workbench remote add origin OWNER/BENCHMARK[@REF] [--dir DIR] [--json]",
|
|
250
|
+
" workbench remote set-url origin OWNER/BENCHMARK[@REF] [--dir DIR] [--json]",
|
|
251
|
+
" workbench remote remove origin [--dir DIR] [--json]",
|
|
252
|
+
"",
|
|
253
|
+
"Manage the project origin used by fetch, pull, and push.",
|
|
254
|
+
]),
|
|
255
|
+
"remote show": withSourceDirectoryHelp([
|
|
256
|
+
"Usage:",
|
|
257
|
+
" workbench remote show [--dir DIR] [--json]",
|
|
258
|
+
"",
|
|
259
|
+
"Show the configured origin.",
|
|
260
|
+
]),
|
|
261
|
+
"remote add": withSourceDirectoryHelp([
|
|
262
|
+
"Usage:",
|
|
263
|
+
" workbench remote add origin OWNER/BENCHMARK[@REF] [--dir DIR] [--json]",
|
|
264
|
+
"",
|
|
265
|
+
"Set the project origin.",
|
|
266
|
+
]),
|
|
267
|
+
"remote set-url": withSourceDirectoryHelp([
|
|
268
|
+
"Usage:",
|
|
269
|
+
" workbench remote set-url origin OWNER/BENCHMARK[@REF] [--dir DIR] [--json]",
|
|
270
|
+
"",
|
|
271
|
+
"Replace the project origin.",
|
|
272
|
+
]),
|
|
273
|
+
"remote remove": withSourceDirectoryHelp([
|
|
274
|
+
"Usage:",
|
|
275
|
+
" workbench remote remove origin [--dir DIR] [--json]",
|
|
276
|
+
"",
|
|
277
|
+
"Remove the project origin.",
|
|
278
|
+
]),
|
|
279
|
+
fetch: withSourceDirectoryHelp([
|
|
280
|
+
"Usage:",
|
|
281
|
+
" workbench fetch [--dir DIR] [--json]",
|
|
282
|
+
"",
|
|
283
|
+
"Download remote source into .workbench/fetch without changing project files.",
|
|
284
|
+
]),
|
|
285
|
+
pull: withSourceDirectoryHelp([
|
|
286
|
+
"Usage:",
|
|
287
|
+
" workbench pull [--dir DIR] [--dry-run] [--json]",
|
|
288
|
+
"",
|
|
289
|
+
"Update managed project source files from the configured origin.",
|
|
290
|
+
]),
|
|
291
|
+
push: withSourceDirectoryHelp([
|
|
292
|
+
"Usage:",
|
|
293
|
+
" workbench push [SOURCE] [--dir DIR] [--tag TAG] [--visibility public|private] [--dry-run] [--json]",
|
|
294
|
+
"",
|
|
295
|
+
"Create or update the hosted benchmark version from local project source and write .workbench/origin.json.",
|
|
296
|
+
]),
|
|
297
|
+
login: [
|
|
298
|
+
"Usage:",
|
|
299
|
+
" workbench login [--base-url URL] [--no-open] [--json]",
|
|
300
|
+
"",
|
|
301
|
+
"Authenticate this machine with Workbench Cloud.",
|
|
302
|
+
],
|
|
303
|
+
logout: [
|
|
304
|
+
"Usage:",
|
|
305
|
+
" workbench logout [--json]",
|
|
306
|
+
"",
|
|
307
|
+
"Remove the stored Workbench Cloud access token.",
|
|
308
|
+
],
|
|
309
|
+
whoami: withSourceDirectoryHelp([
|
|
310
|
+
"Usage:",
|
|
311
|
+
" workbench whoami [--dir DIR] [--json]",
|
|
312
|
+
"",
|
|
313
|
+
"Show the effective Workbench Cloud API target, login status, username, and required adapter auth status.",
|
|
314
|
+
]),
|
|
315
|
+
adapters: withSourceDirectoryHelp([
|
|
316
|
+
"Usage:",
|
|
317
|
+
" workbench adapters create PATH [--dir DIR] [--json]",
|
|
318
|
+
" workbench adapters list [--dir DIR] [--json]",
|
|
319
|
+
" workbench adapters inspect ID [--dir DIR] [--json]",
|
|
320
|
+
" workbench adapters test ID|SOURCE [--dir DIR] [--request PATH] [--output DIR] [--json]",
|
|
321
|
+
"",
|
|
322
|
+
"Create, list, inspect, and locally replay Workbench adapters. Adapter sources can be local paths, npm: package refs, or git: refs.",
|
|
323
|
+
]),
|
|
324
|
+
"adapters test": withSourceDirectoryHelp([
|
|
325
|
+
"Usage:",
|
|
326
|
+
" workbench adapters test ID|SOURCE [--dir DIR] [--request PATH] [--output DIR] [--json]",
|
|
327
|
+
"",
|
|
328
|
+
"Validate an adapter manifest, or replay its command locally when --request is provided. Without --output, replay uses a temporary output directory.",
|
|
329
|
+
]),
|
|
330
|
+
auth: [
|
|
331
|
+
"Usage:",
|
|
332
|
+
" workbench auth <command> [options]",
|
|
333
|
+
"",
|
|
334
|
+
"Connect adapter auth for local and hosted runs.",
|
|
335
|
+
"",
|
|
336
|
+
"Commands:",
|
|
337
|
+
" workbench auth connect ADAPTER[/SLOT] [--dir DIR] [--method METHOD] [--profile PROFILE] [--profile-root DIR] [--local-only] [--json]",
|
|
338
|
+
" workbench auth disconnect ADAPTER[/SLOT] [--profile PROFILE] [--local-only] [--json]",
|
|
339
|
+
],
|
|
340
|
+
"auth connect": [
|
|
341
|
+
"Usage:",
|
|
342
|
+
" workbench auth connect ADAPTER[/SLOT] [--dir DIR] [--method METHOD] [--profile PROFILE] [--profile-root DIR] [--local-only] [--json]",
|
|
343
|
+
"",
|
|
344
|
+
"Connect adapter auth using a manifest-supported method.",
|
|
345
|
+
],
|
|
346
|
+
"auth disconnect": [
|
|
347
|
+
"Usage:",
|
|
348
|
+
" workbench auth disconnect ADAPTER[/SLOT] [--profile PROFILE] [--local-only] [--json]",
|
|
349
|
+
"",
|
|
350
|
+
"Disconnect adapter auth locally and, when logged in, in hosted Workbench.",
|
|
351
|
+
],
|
|
352
|
+
cloud: [
|
|
353
|
+
"Usage:",
|
|
354
|
+
" workbench cloud <command> [options]",
|
|
355
|
+
"",
|
|
356
|
+
"Hosted Workbench Cloud execution and resource commands.",
|
|
357
|
+
"",
|
|
358
|
+
"Commands:",
|
|
359
|
+
" workbench cloud eval [SOURCE] [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--base SUBJECT_ID] [--samples N] [--watch] [--dry-run] [--json]",
|
|
360
|
+
" workbench cloud improve [SOURCE] [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--base SUBJECT_ID] [--optimizer OPTIMIZER_YAML] [--budget N] [--samples N] [--watch] [--dry-run] [--json]",
|
|
361
|
+
" workbench cloud open [OWNER/BENCHMARK[@REF]|RUN_ID|SUBJECT_ID] [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--no-open] [--json]",
|
|
362
|
+
" workbench cloud watch RUN_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--interval-ms N] [--timeout-ms N] [--json]",
|
|
363
|
+
" workbench cloud logs RUN_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
|
|
364
|
+
" workbench cloud fork OWNER/BENCHMARK[@REF] [NAME] [--json]",
|
|
365
|
+
" workbench cloud star OWNER/BENCHMARK [--json]",
|
|
366
|
+
" workbench cloud unstar OWNER/BENCHMARK [--json]",
|
|
367
|
+
" workbench cloud benchmarks|runs|subjects <command> [options]",
|
|
368
|
+
],
|
|
369
|
+
"cloud fork": [
|
|
370
|
+
"Usage:",
|
|
371
|
+
" workbench cloud fork OWNER/BENCHMARK[@REF] [NAME] [--json]",
|
|
372
|
+
"",
|
|
373
|
+
"Fork a hosted benchmark project when you intend to change benchmark source.",
|
|
374
|
+
],
|
|
375
|
+
"cloud star": [
|
|
376
|
+
"Usage:",
|
|
377
|
+
" workbench cloud star OWNER/BENCHMARK [--json]",
|
|
378
|
+
"",
|
|
379
|
+
"Star a hosted benchmark.",
|
|
380
|
+
],
|
|
381
|
+
"cloud unstar": [
|
|
382
|
+
"Usage:",
|
|
383
|
+
" workbench cloud unstar OWNER/BENCHMARK [--json]",
|
|
384
|
+
"",
|
|
385
|
+
"Remove your star from a hosted benchmark.",
|
|
386
|
+
],
|
|
387
|
+
"cloud eval": withSourceDirectoryHelp(withLifecycleHelp([
|
|
388
|
+
"Usage:",
|
|
389
|
+
" workbench cloud eval [SOURCE] [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--base SUBJECT_ID] [--samples N] [--watch] [--dry-run] [--json]",
|
|
390
|
+
"",
|
|
391
|
+
"Submit subject files to Workbench Cloud and run hosted evaluation.",
|
|
392
|
+
], hostedWatchLifecycleHelp)),
|
|
393
|
+
"cloud improve": withSourceDirectoryHelp(withLifecycleHelp([
|
|
394
|
+
"Usage:",
|
|
395
|
+
" workbench cloud improve [SOURCE] [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--base SUBJECT_ID] [--optimizer OPTIMIZER_YAML] [--budget N] [--samples N] [--watch] [--dry-run] [--json]",
|
|
396
|
+
"",
|
|
397
|
+
"Run hosted subject improvement.",
|
|
398
|
+
], hostedWatchLifecycleHelp)),
|
|
399
|
+
"cloud open": [
|
|
400
|
+
"Usage:",
|
|
401
|
+
" workbench cloud open [OWNER/BENCHMARK[@REF]|RUN_ID|SUBJECT_ID] [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--no-open] [--json]",
|
|
402
|
+
"",
|
|
403
|
+
"Print and open the hosted Workbench URL.",
|
|
404
|
+
],
|
|
405
|
+
"cloud watch": withSourceDirectoryHelp(withLifecycleHelp([
|
|
406
|
+
"Usage:",
|
|
407
|
+
" workbench cloud watch RUN_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--interval-ms N] [--timeout-ms N] [--json]",
|
|
408
|
+
"",
|
|
409
|
+
"Poll a hosted run until it finishes.",
|
|
410
|
+
], hostedWatchLifecycleHelp)),
|
|
411
|
+
"cloud logs": withSourceDirectoryHelp([
|
|
412
|
+
"Usage:",
|
|
413
|
+
" workbench cloud logs RUN_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
|
|
414
|
+
"",
|
|
415
|
+
"Show hosted run job statuses and errors.",
|
|
416
|
+
]),
|
|
417
|
+
"cloud benchmarks": [
|
|
418
|
+
"Usage:",
|
|
419
|
+
" workbench cloud benchmarks <command> [options]",
|
|
420
|
+
"",
|
|
421
|
+
"Hosted benchmark resource commands.",
|
|
422
|
+
"",
|
|
423
|
+
"Commands:",
|
|
424
|
+
" workbench cloud benchmarks list [--json]",
|
|
425
|
+
" workbench cloud benchmarks show OWNER/BENCHMARK [--json]",
|
|
426
|
+
" workbench cloud benchmarks versions OWNER/BENCHMARK [--json]",
|
|
427
|
+
" workbench cloud benchmarks starred [--json]",
|
|
428
|
+
" workbench cloud benchmarks delete OWNER/BENCHMARK [--dir DIR] [--dry-run] [--json]",
|
|
429
|
+
],
|
|
430
|
+
"cloud runs": [
|
|
431
|
+
"Usage:",
|
|
432
|
+
" workbench cloud runs <command> [options]",
|
|
433
|
+
"",
|
|
434
|
+
"Hosted run resource commands.",
|
|
435
|
+
"",
|
|
436
|
+
"Commands:",
|
|
437
|
+
" workbench cloud runs list [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
|
|
438
|
+
" workbench cloud runs show RUN_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
|
|
439
|
+
" workbench cloud runs cancel RUN_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
|
|
440
|
+
],
|
|
441
|
+
"cloud subjects": [
|
|
442
|
+
"Usage:",
|
|
443
|
+
" workbench cloud subjects <command> [options]",
|
|
444
|
+
"",
|
|
445
|
+
"Hosted subject resource commands.",
|
|
446
|
+
"",
|
|
447
|
+
"Commands:",
|
|
448
|
+
" workbench cloud subjects list [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
|
|
449
|
+
" workbench cloud subjects show SUBJECT_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
|
|
450
|
+
" workbench cloud subjects files SUBJECT_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
|
|
451
|
+
" workbench cloud subjects preview SUBJECT_ID --path PATH [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--output PATH|-] [--json]",
|
|
452
|
+
" workbench cloud subjects pull SUBJECT_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--out DIR] [--json]",
|
|
453
|
+
" workbench cloud subjects publish SUBJECT_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
|
|
454
|
+
" workbench cloud subjects unpublish SUBJECT_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
|
|
455
|
+
],
|
|
456
|
+
}).map(([key, lines]) => [key, lines.join("\n")]));
|
|
457
|
+
export function commandUsage(commandPath) {
|
|
458
|
+
return commandHelp[commandPath] ?? cloudNestedCommandUsage(commandPath);
|
|
459
|
+
}
|
|
460
|
+
const hostedCommandHelp = Object.fromEntries(Object.entries({
|
|
461
|
+
"benchmarks list": [
|
|
462
|
+
"Usage:",
|
|
463
|
+
" workbench cloud benchmarks list [--json]",
|
|
464
|
+
"",
|
|
465
|
+
"List public hosted benchmarks.",
|
|
466
|
+
],
|
|
467
|
+
"benchmarks show": [
|
|
468
|
+
"Usage:",
|
|
469
|
+
" workbench cloud benchmarks show OWNER/BENCHMARK [--json]",
|
|
470
|
+
"",
|
|
471
|
+
"Show one hosted benchmark.",
|
|
472
|
+
],
|
|
473
|
+
"benchmarks versions": [
|
|
474
|
+
"Usage:",
|
|
475
|
+
" workbench cloud benchmarks versions OWNER/BENCHMARK [--json]",
|
|
476
|
+
"",
|
|
477
|
+
"List hosted benchmark versions.",
|
|
478
|
+
],
|
|
479
|
+
"benchmarks starred": [
|
|
480
|
+
"Usage:",
|
|
481
|
+
" workbench cloud benchmarks starred [--json]",
|
|
482
|
+
"",
|
|
483
|
+
"List benchmarks starred by the current user.",
|
|
484
|
+
],
|
|
485
|
+
"benchmarks delete": [
|
|
486
|
+
"Usage:",
|
|
487
|
+
" workbench cloud benchmarks delete OWNER/BENCHMARK [--dir DIR] [--dry-run] [--json]",
|
|
488
|
+
"",
|
|
489
|
+
"Delete a hosted benchmark project that you own.",
|
|
490
|
+
],
|
|
491
|
+
"runs list": [
|
|
492
|
+
"Usage:",
|
|
493
|
+
" workbench cloud runs list [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
|
|
494
|
+
"",
|
|
495
|
+
"List hosted runs.",
|
|
496
|
+
],
|
|
497
|
+
"runs show": [
|
|
498
|
+
"Usage:",
|
|
499
|
+
" workbench cloud runs show RUN_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
|
|
500
|
+
"",
|
|
501
|
+
"Show one hosted run.",
|
|
502
|
+
],
|
|
503
|
+
"runs cancel": [
|
|
504
|
+
"Usage:",
|
|
505
|
+
" workbench cloud runs cancel RUN_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
|
|
506
|
+
"",
|
|
507
|
+
"Cancel a hosted run.",
|
|
508
|
+
],
|
|
509
|
+
"subjects list": [
|
|
510
|
+
"Usage:",
|
|
511
|
+
" workbench cloud subjects list [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
|
|
512
|
+
"",
|
|
513
|
+
"List hosted subjects.",
|
|
514
|
+
],
|
|
515
|
+
"subjects show": [
|
|
516
|
+
"Usage:",
|
|
517
|
+
" workbench cloud subjects show SUBJECT_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
|
|
518
|
+
"",
|
|
519
|
+
"Show one hosted subject.",
|
|
520
|
+
],
|
|
521
|
+
"subjects files": [
|
|
522
|
+
"Usage:",
|
|
523
|
+
" workbench cloud subjects files SUBJECT_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
|
|
524
|
+
"",
|
|
525
|
+
"List files in a hosted subject snapshot.",
|
|
526
|
+
],
|
|
527
|
+
"subjects preview": [
|
|
528
|
+
"Usage:",
|
|
529
|
+
" workbench cloud subjects preview SUBJECT_ID --path PATH [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--output PATH|-] [--json]",
|
|
530
|
+
"",
|
|
531
|
+
"Preview a file from a hosted subject snapshot.",
|
|
532
|
+
],
|
|
533
|
+
"subjects pull": [
|
|
534
|
+
"Usage:",
|
|
535
|
+
" workbench cloud subjects pull SUBJECT_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--out DIR] [--json]",
|
|
536
|
+
"",
|
|
537
|
+
"Download hosted subject files.",
|
|
538
|
+
],
|
|
539
|
+
"subjects publish": [
|
|
540
|
+
"Usage:",
|
|
541
|
+
" workbench cloud subjects publish SUBJECT_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
|
|
542
|
+
"",
|
|
543
|
+
"Make a hosted subject public.",
|
|
544
|
+
],
|
|
545
|
+
"subjects unpublish": [
|
|
546
|
+
"Usage:",
|
|
547
|
+
" workbench cloud subjects unpublish SUBJECT_ID [--dir DIR] [--benchmark OWNER/BENCHMARK[@REF]] [--json]",
|
|
548
|
+
"",
|
|
549
|
+
"Make a hosted subject private.",
|
|
550
|
+
],
|
|
551
|
+
}).map(([key, lines]) => [key, lines.join("\n")]));
|
|
552
|
+
function cloudNestedCommandUsage(commandPath) {
|
|
553
|
+
if (!commandPath.startsWith("cloud ")) {
|
|
554
|
+
return null;
|
|
555
|
+
}
|
|
556
|
+
const withoutCloud = commandPath.slice("cloud ".length);
|
|
557
|
+
return hostedCommandHelp[withoutCloud] ?? null;
|
|
558
|
+
}
|