@w6w/cli 0.1.0

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.
Files changed (71) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +110 -0
  3. package/dist/bin/w6w.d.ts +22 -0
  4. package/dist/bin/w6w.d.ts.map +1 -0
  5. package/dist/bin/w6w.js +58 -0
  6. package/dist/bin/w6w.js.map +1 -0
  7. package/dist/mod.d.ts +131 -0
  8. package/dist/mod.d.ts.map +1 -0
  9. package/dist/mod.js +257 -0
  10. package/dist/mod.js.map +1 -0
  11. package/dist/src/args.d.ts +79 -0
  12. package/dist/src/args.d.ts.map +1 -0
  13. package/dist/src/args.js +130 -0
  14. package/dist/src/args.js.map +1 -0
  15. package/dist/src/client.d.ts +90 -0
  16. package/dist/src/client.d.ts.map +1 -0
  17. package/dist/src/client.js +172 -0
  18. package/dist/src/client.js.map +1 -0
  19. package/dist/src/commands/connections.d.ts +13 -0
  20. package/dist/src/commands/connections.d.ts.map +1 -0
  21. package/dist/src/commands/connections.js +30 -0
  22. package/dist/src/commands/connections.js.map +1 -0
  23. package/dist/src/commands/documents.d.ts +34 -0
  24. package/dist/src/commands/documents.d.ts.map +1 -0
  25. package/dist/src/commands/documents.js +179 -0
  26. package/dist/src/commands/documents.js.map +1 -0
  27. package/dist/src/commands/index.d.ts +27 -0
  28. package/dist/src/commands/index.d.ts.map +1 -0
  29. package/dist/src/commands/index.js +39 -0
  30. package/dist/src/commands/index.js.map +1 -0
  31. package/dist/src/commands/me.d.ts +29 -0
  32. package/dist/src/commands/me.d.ts.map +1 -0
  33. package/dist/src/commands/me.js +52 -0
  34. package/dist/src/commands/me.js.map +1 -0
  35. package/dist/src/commands/run.d.ts +24 -0
  36. package/dist/src/commands/run.d.ts.map +1 -0
  37. package/dist/src/commands/run.js +78 -0
  38. package/dist/src/commands/run.js.map +1 -0
  39. package/dist/src/commands/shared.d.ts +117 -0
  40. package/dist/src/commands/shared.d.ts.map +1 -0
  41. package/dist/src/commands/shared.js +152 -0
  42. package/dist/src/commands/shared.js.map +1 -0
  43. package/dist/src/commands/vars.d.ts +59 -0
  44. package/dist/src/commands/vars.d.ts.map +1 -0
  45. package/dist/src/commands/vars.js +216 -0
  46. package/dist/src/commands/vars.js.map +1 -0
  47. package/dist/src/commands/workflows.d.ts +13 -0
  48. package/dist/src/commands/workflows.d.ts.map +1 -0
  49. package/dist/src/commands/workflows.js +75 -0
  50. package/dist/src/commands/workflows.js.map +1 -0
  51. package/dist/src/exit.d.ts +51 -0
  52. package/dist/src/exit.d.ts.map +1 -0
  53. package/dist/src/exit.js +94 -0
  54. package/dist/src/exit.js.map +1 -0
  55. package/dist/src/help.d.ts +48 -0
  56. package/dist/src/help.d.ts.map +1 -0
  57. package/dist/src/help.generated.d.ts +88 -0
  58. package/dist/src/help.generated.d.ts.map +1 -0
  59. package/dist/src/help.generated.js +988 -0
  60. package/dist/src/help.generated.js.map +1 -0
  61. package/dist/src/help.js +128 -0
  62. package/dist/src/help.js.map +1 -0
  63. package/dist/src/output.d.ts +84 -0
  64. package/dist/src/output.d.ts.map +1 -0
  65. package/dist/src/output.js +94 -0
  66. package/dist/src/output.js.map +1 -0
  67. package/dist/src/runtime.d.ts +37 -0
  68. package/dist/src/runtime.d.ts.map +1 -0
  69. package/dist/src/runtime.js +57 -0
  70. package/dist/src/runtime.js.map +1 -0
  71. package/package.json +42 -0
@@ -0,0 +1,988 @@
1
+ // AUTOGENERATED — DO NOT EDIT BY HAND.
2
+ //
3
+ // Written by `scripts/gen-help.ts` from the shared wrapper surface contract, the
4
+ // same machine-readable file all three w6w wrappers implement. Regenerate with:
5
+ //
6
+ // deno task gen:help
7
+ //
8
+ // Edits made here are lost on the next run, and `tests/help_test.ts` compares this
9
+ // file byte-for-byte against a fresh render — so a contract change that was not
10
+ // regenerated fails the suite instead of shipping stale help. The render is passed
11
+ // through `deno fmt` with this repo's own configuration, which is why the file
12
+ // satisfies `deno task fmt:check` like any hand-written module.
13
+ //
14
+ // Generation happens at development time on purpose: an installed `@w6w/cli` has
15
+ // no contract file beside it to read, so a runtime read would work in development
16
+ // and break for every user. Nothing under `src/` opens a JSON file.
17
+ /** The command tree, generated from the shared wrapper surface contract. */
18
+ export const HELP_TREE = {
19
+ "binary": "w6w",
20
+ "contractVersion": "0.1.0",
21
+ "tagline": "command-line client for the w6w workflow platform",
22
+ "usage": "w6w <command> [options]",
23
+ "docsUrl": "https://w6w.dev/docs/cli",
24
+ "commands": [
25
+ {
26
+ "operation": "me",
27
+ "path": [
28
+ "me",
29
+ ],
30
+ "name": "me",
31
+ "aliases": [
32
+ [
33
+ "info",
34
+ ],
35
+ ],
36
+ "summary": "Caller identity plus w6w component versions.",
37
+ "short": "Caller identity plus w6w component versions",
38
+ "headline": "caller identity plus w6w component versions",
39
+ "usage": "w6w me [options]",
40
+ "naming": "w6w me",
41
+ "status": "required",
42
+ "params": [
43
+ {
44
+ "name": "json",
45
+ "kind": "flag",
46
+ "display": "--json",
47
+ "description": "Output raw JSON instead of a table",
48
+ "required": false,
49
+ },
50
+ ],
51
+ "examples": [
52
+ "w6w me",
53
+ "w6w info",
54
+ ],
55
+ "notes": [],
56
+ },
57
+ {
58
+ "operation": "run",
59
+ "path": [
60
+ "run",
61
+ ],
62
+ "name": "run",
63
+ "aliases": [],
64
+ "summary": "Run anything addressable by URN — a connection action, a function, an endpoint or a workflow.",
65
+ "short": "Run anything addressable by URN",
66
+ "headline": "run anything addressable by URN — a connection action, a function, an endpoint or a workflow",
67
+ "usage": "w6w run <urn> [options]",
68
+ "naming": "w6w run <urn> [--action <a>] [--payload <json>]",
69
+ "status": "required",
70
+ "params": [
71
+ {
72
+ "name": "urn",
73
+ "kind": "argument",
74
+ "display": "<urn>",
75
+ "description": "conn_… | wf_… | fn_… | ep_… (see: w6w connections list, w6w workflows list)",
76
+ "required": true,
77
+ },
78
+ {
79
+ "name": "action",
80
+ "kind": "flag",
81
+ "display": "--action <a>",
82
+ "description": "Action to invoke (connection URNs only)",
83
+ "required": false,
84
+ },
85
+ {
86
+ "name": "payload",
87
+ "kind": "flag",
88
+ "display": "--payload <json>",
89
+ "description": "Input object, as a JSON string",
90
+ "required": false,
91
+ },
92
+ {
93
+ "name": "json",
94
+ "kind": "flag",
95
+ "display": "--json",
96
+ "description": "Output raw JSON instead of a table",
97
+ "required": false,
98
+ },
99
+ ],
100
+ "examples": [
101
+ 'w6w run conn_01HQ8N --action send_email --payload \'{"to":"a@b.com"}\'',
102
+ 'w6w run wf_01HQ8N --payload \'{"email":"a@b.com"}\'',
103
+ ],
104
+ "notes": [
105
+ 'The result is tagged by kind. A connection action and a function return their value directly; a workflow returns a run id and status "queued" and is not waited on — use "w6w workflows run <id> --wait" when you need to wait, set variables, or pass a trigger. Documents and variables are not URNs: address them with "w6w documents" and "w6w vars".',
106
+ ],
107
+ },
108
+ ],
109
+ "groups": [
110
+ {
111
+ "name": "connections",
112
+ "summary": "Inspect connections",
113
+ "headline": "inspect connections",
114
+ "usage": "w6w connections <command> [options]",
115
+ "commands": [
116
+ {
117
+ "operation": "connections.list",
118
+ "path": [
119
+ "connections",
120
+ "list",
121
+ ],
122
+ "name": "list",
123
+ "aliases": [],
124
+ "summary": "List the caller's connections (credentials redacted).",
125
+ "short": "List the caller's connections (credentials redacted)",
126
+ "headline": "list the caller's connections (credentials redacted)",
127
+ "usage": "w6w connections list [options]",
128
+ "naming": "w6w connections list",
129
+ "status": "required",
130
+ "params": [
131
+ {
132
+ "name": "json",
133
+ "kind": "flag",
134
+ "display": "--json",
135
+ "description": "Output raw JSON instead of a table",
136
+ "required": false,
137
+ },
138
+ ],
139
+ "examples": [
140
+ "w6w connections list",
141
+ "w6w connections list --json",
142
+ ],
143
+ "notes": [],
144
+ },
145
+ ],
146
+ "options": [],
147
+ "examples": [
148
+ "w6w connections list",
149
+ ],
150
+ },
151
+ {
152
+ "name": "workflows",
153
+ "summary": "List and run workflows",
154
+ "headline": "list and run workflows",
155
+ "usage": "w6w workflows <command> [options]",
156
+ "commands": [
157
+ {
158
+ "operation": "workflows.list",
159
+ "path": [
160
+ "workflows",
161
+ "list",
162
+ ],
163
+ "name": "list",
164
+ "aliases": [],
165
+ "summary": "List the caller's workflow definitions.",
166
+ "short": "List the caller's workflow definitions",
167
+ "headline": "list the caller's workflow definitions",
168
+ "usage": "w6w workflows list [options]",
169
+ "naming": "w6w workflows list [--project <id>]",
170
+ "status": "required",
171
+ "params": [
172
+ {
173
+ "name": "project",
174
+ "kind": "flag",
175
+ "display": "--project <id>",
176
+ "description": "Project to scope to (default: the account's default project)",
177
+ "required": false,
178
+ },
179
+ {
180
+ "name": "json",
181
+ "kind": "flag",
182
+ "display": "--json",
183
+ "description": "Output raw JSON instead of a table",
184
+ "required": false,
185
+ },
186
+ ],
187
+ "examples": [
188
+ "w6w workflows list",
189
+ "w6w workflows list --project prj_01HQ8N",
190
+ ],
191
+ "notes": [],
192
+ },
193
+ {
194
+ "operation": "workflows.run",
195
+ "path": [
196
+ "workflows",
197
+ "run",
198
+ ],
199
+ "name": "run",
200
+ "aliases": [],
201
+ "summary": "Enqueue a workflow run; optionally wait for a terminal state.",
202
+ "short": "Enqueue a workflow run; optionally wait for a terminal state",
203
+ "headline": "enqueue a workflow run; optionally wait for a terminal state",
204
+ "usage": "w6w workflows run <id> [options]",
205
+ "naming": "w6w workflows run <id> [--wait]",
206
+ "status": "required",
207
+ "params": [
208
+ {
209
+ "name": "id",
210
+ "kind": "argument",
211
+ "display": "<id>",
212
+ "description": "Workflow id (see: w6w workflows list)",
213
+ "required": true,
214
+ },
215
+ {
216
+ "name": "wait",
217
+ "kind": "flag",
218
+ "display": "--wait",
219
+ "description": "Wait for the run to reach a terminal state",
220
+ "required": false,
221
+ },
222
+ {
223
+ "name": "variables",
224
+ "kind": "flag",
225
+ "display": "--var <key=value>",
226
+ "description": "Set a run variable (repeatable)",
227
+ "required": false,
228
+ },
229
+ {
230
+ "name": "trigger",
231
+ "kind": "flag",
232
+ "display": "--trigger <json>",
233
+ "description": "Trigger payload, as a JSON string",
234
+ "required": false,
235
+ },
236
+ {
237
+ "name": "json",
238
+ "kind": "flag",
239
+ "display": "--json",
240
+ "description": "Output raw JSON instead of a table",
241
+ "required": false,
242
+ },
243
+ ],
244
+ "examples": [
245
+ "w6w workflows run wf_01HQ8N --var email=a@b.com",
246
+ "w6w workflows run wf_01HQ8N --wait --json",
247
+ ],
248
+ "notes": [
249
+ 'Without --wait the run is queued and the command returns immediately with a run id and status "queued". With --wait the CLI returns when the run finishes or the server\'s wait window expires — a run still in progress is reported as "running", which is not an error.',
250
+ 'A run that finished with status "failed" exits 3, so --wait is usable in CI without parsing stdout.',
251
+ ],
252
+ },
253
+ ],
254
+ "options": [],
255
+ "examples": [
256
+ "w6w workflows list",
257
+ "w6w workflows run wf_01HQ8N --wait",
258
+ ],
259
+ },
260
+ {
261
+ "name": "documents",
262
+ "summary": "Create, read, update and delete documents",
263
+ "headline": "create, read, update and delete documents",
264
+ "usage": "w6w documents <command> [options]",
265
+ "commands": [
266
+ {
267
+ "operation": "documents.list",
268
+ "path": [
269
+ "documents",
270
+ "list",
271
+ ],
272
+ "name": "list",
273
+ "aliases": [],
274
+ "summary": "List the caller's documents in a project.",
275
+ "short": "List the caller's documents in a project",
276
+ "headline": "list the caller's documents in a project",
277
+ "usage": "w6w documents list [options]",
278
+ "naming": "w6w documents list [--project <id>]",
279
+ "status": "required",
280
+ "params": [
281
+ {
282
+ "name": "project",
283
+ "kind": "flag",
284
+ "display": "--project <id>",
285
+ "description": "Project to scope to (default: the account's default project)",
286
+ "required": false,
287
+ },
288
+ {
289
+ "name": "json",
290
+ "kind": "flag",
291
+ "display": "--json",
292
+ "description": "Output raw JSON instead of a table",
293
+ "required": false,
294
+ },
295
+ ],
296
+ "examples": [
297
+ "w6w documents list",
298
+ "w6w documents list --project prj_01HQ8N",
299
+ ],
300
+ "notes": [],
301
+ },
302
+ {
303
+ "operation": "documents.get",
304
+ "path": [
305
+ "documents",
306
+ "get",
307
+ ],
308
+ "name": "get",
309
+ "aliases": [],
310
+ "summary": "Fetch one document by its `doc_…` id.",
311
+ "short": "Fetch one document by its `doc_…` id",
312
+ "headline": "fetch one document by its `doc_…` id",
313
+ "usage": "w6w documents get <id> [options]",
314
+ "naming": "w6w documents get <id> [--project <id>]",
315
+ "status": "required",
316
+ "params": [
317
+ {
318
+ "name": "id",
319
+ "kind": "argument",
320
+ "display": "<id>",
321
+ "description": "Document id (see: w6w documents list)",
322
+ "required": true,
323
+ },
324
+ {
325
+ "name": "project",
326
+ "kind": "flag",
327
+ "display": "--project <id>",
328
+ "description": "Project to scope to (default: the account's default project)",
329
+ "required": false,
330
+ },
331
+ {
332
+ "name": "json",
333
+ "kind": "flag",
334
+ "display": "--json",
335
+ "description": "Output raw JSON instead of a table",
336
+ "required": false,
337
+ },
338
+ ],
339
+ "examples": [
340
+ "w6w documents get doc_01HQ8N",
341
+ ],
342
+ "notes": [],
343
+ },
344
+ {
345
+ "operation": "documents.getByKey",
346
+ "path": [
347
+ "documents",
348
+ "get-by-key",
349
+ ],
350
+ "name": "get-by-key",
351
+ "aliases": [],
352
+ "summary": "Fetch one document by its human-chosen `key`.",
353
+ "short": "Fetch one document by its human-chosen `key`",
354
+ "headline": "fetch one document by its human-chosen `key`",
355
+ "usage": "w6w documents get-by-key <key> [options]",
356
+ "naming": "w6w documents get-by-key <key> [--project <id>]",
357
+ "status": "required",
358
+ "params": [
359
+ {
360
+ "name": "key",
361
+ "kind": "argument",
362
+ "display": "<key>",
363
+ "description": "Document key, as chosen at creation",
364
+ "required": true,
365
+ },
366
+ {
367
+ "name": "project",
368
+ "kind": "flag",
369
+ "display": "--project <id>",
370
+ "description": "Project to scope to (default: the account's default project)",
371
+ "required": false,
372
+ },
373
+ {
374
+ "name": "json",
375
+ "kind": "flag",
376
+ "display": "--json",
377
+ "description": "Output raw JSON instead of a table",
378
+ "required": false,
379
+ },
380
+ ],
381
+ "examples": [
382
+ "w6w documents get-by-key onboarding-email",
383
+ ],
384
+ "notes": [],
385
+ },
386
+ {
387
+ "operation": "documents.create",
388
+ "path": [
389
+ "documents",
390
+ "create",
391
+ ],
392
+ "name": "create",
393
+ "aliases": [],
394
+ "summary": "Create a document under a caller-chosen `key`.",
395
+ "short": "Create a document under a caller-chosen `key`",
396
+ "headline": "create a document under a caller-chosen `key`",
397
+ "usage": "w6w documents create <key> --content <text> [options]",
398
+ "naming": "w6w documents create <key> --content <text> [--format <f>] [--description <d>] [--project <id>]",
399
+ "status": "required",
400
+ "params": [
401
+ {
402
+ "name": "key",
403
+ "kind": "argument",
404
+ "display": "<key>",
405
+ "description": "Document key to create (unique per project)",
406
+ "required": true,
407
+ },
408
+ {
409
+ "name": "content",
410
+ "kind": "flag",
411
+ "display": "--content <text>",
412
+ "description": "Document content, as raw text",
413
+ "required": true,
414
+ },
415
+ {
416
+ "name": "format",
417
+ "kind": "flag",
418
+ "display": "--format <f>",
419
+ "description": "Content format hint: text|markdown|yaml|html|json (default: text)",
420
+ "required": false,
421
+ },
422
+ {
423
+ "name": "description",
424
+ "kind": "flag",
425
+ "display": "--description <d>",
426
+ "description": "Human-readable description",
427
+ "required": false,
428
+ },
429
+ {
430
+ "name": "project",
431
+ "kind": "flag",
432
+ "display": "--project <id>",
433
+ "description": "Project to scope to (default: the account's default project)",
434
+ "required": false,
435
+ },
436
+ {
437
+ "name": "json",
438
+ "kind": "flag",
439
+ "display": "--json",
440
+ "description": "Output raw JSON instead of a table",
441
+ "required": false,
442
+ },
443
+ ],
444
+ "examples": [
445
+ 'w6w documents create onboarding-email --content "Welcome aboard!" --format markdown',
446
+ ],
447
+ "notes": [],
448
+ },
449
+ {
450
+ "operation": "documents.update",
451
+ "path": [
452
+ "documents",
453
+ "update",
454
+ ],
455
+ "name": "update",
456
+ "aliases": [],
457
+ "summary": "Patch a document's content, format or description.",
458
+ "short": "Patch a document's content, format or description",
459
+ "headline": "patch a document's content, format or description",
460
+ "usage": "w6w documents update <id> [options]",
461
+ "naming": "w6w documents update <id> [--content <text>] [--format <f>] [--description <d>] [--project <id>]",
462
+ "status": "required",
463
+ "params": [
464
+ {
465
+ "name": "id",
466
+ "kind": "argument",
467
+ "display": "<id>",
468
+ "description": "Document id (see: w6w documents list)",
469
+ "required": true,
470
+ },
471
+ {
472
+ "name": "content",
473
+ "kind": "flag",
474
+ "display": "--content <text>",
475
+ "description": "Document content, as raw text",
476
+ "required": false,
477
+ },
478
+ {
479
+ "name": "format",
480
+ "kind": "flag",
481
+ "display": "--format <f>",
482
+ "description": "Content format hint: text|markdown|yaml|html|json (default: text)",
483
+ "required": false,
484
+ },
485
+ {
486
+ "name": "description",
487
+ "kind": "flag",
488
+ "display": "--description <d>",
489
+ "description": "Human-readable description",
490
+ "required": false,
491
+ },
492
+ {
493
+ "name": "project",
494
+ "kind": "flag",
495
+ "display": "--project <id>",
496
+ "description": "Project to scope to (default: the account's default project)",
497
+ "required": false,
498
+ },
499
+ {
500
+ "name": "json",
501
+ "kind": "flag",
502
+ "display": "--json",
503
+ "description": "Output raw JSON instead of a table",
504
+ "required": false,
505
+ },
506
+ ],
507
+ "examples": [
508
+ 'w6w documents update doc_01HQ8N --content "Welcome aboard!"',
509
+ ],
510
+ "notes": [],
511
+ },
512
+ {
513
+ "operation": "documents.delete",
514
+ "path": [
515
+ "documents",
516
+ "delete",
517
+ ],
518
+ "name": "delete",
519
+ "aliases": [],
520
+ "summary": "Delete a document.",
521
+ "short": "Delete a document",
522
+ "headline": "delete a document",
523
+ "usage": "w6w documents delete <id> [options]",
524
+ "naming": "w6w documents delete <id> [--project <id>]",
525
+ "status": "required",
526
+ "params": [
527
+ {
528
+ "name": "id",
529
+ "kind": "argument",
530
+ "display": "<id>",
531
+ "description": "Document id (see: w6w documents list)",
532
+ "required": true,
533
+ },
534
+ {
535
+ "name": "project",
536
+ "kind": "flag",
537
+ "display": "--project <id>",
538
+ "description": "Project to scope to (default: the account's default project)",
539
+ "required": false,
540
+ },
541
+ {
542
+ "name": "json",
543
+ "kind": "flag",
544
+ "display": "--json",
545
+ "description": "Output raw JSON instead of a table",
546
+ "required": false,
547
+ },
548
+ ],
549
+ "examples": [
550
+ "w6w documents delete doc_01HQ8N",
551
+ ],
552
+ "notes": [],
553
+ },
554
+ ],
555
+ "options": [
556
+ {
557
+ "name": "project",
558
+ "kind": "flag",
559
+ "display": "--project <id>",
560
+ "description": "Project to scope to (default: the account's default project)",
561
+ "required": false,
562
+ },
563
+ ],
564
+ "examples": [
565
+ "w6w documents list",
566
+ "w6w documents get doc_01HQ8N",
567
+ ],
568
+ },
569
+ {
570
+ "name": "vars",
571
+ "summary": "Create, read, update and delete variables",
572
+ "headline": "create, read, update and delete variables",
573
+ "usage": "w6w vars <command> [options]",
574
+ "commands": [
575
+ {
576
+ "operation": "vars.list",
577
+ "path": [
578
+ "vars",
579
+ "list",
580
+ ],
581
+ "name": "list",
582
+ "aliases": [],
583
+ "summary": "List the caller's typed variables.",
584
+ "short": "List the caller's typed variables",
585
+ "headline": "list the caller's typed variables",
586
+ "usage": "w6w vars list [options]",
587
+ "naming": "w6w vars list",
588
+ "status": "required",
589
+ "params": [
590
+ {
591
+ "name": "json",
592
+ "kind": "flag",
593
+ "display": "--json",
594
+ "description": "Output raw JSON instead of a table",
595
+ "required": false,
596
+ },
597
+ ],
598
+ "examples": [
599
+ "w6w vars list",
600
+ ],
601
+ "notes": [],
602
+ },
603
+ {
604
+ "operation": "vars.get",
605
+ "path": [
606
+ "vars",
607
+ "get",
608
+ ],
609
+ "name": "get",
610
+ "aliases": [],
611
+ "summary": "Fetch one variable by its `var_…` id.",
612
+ "short": "Fetch one variable by its `var_…` id",
613
+ "headline": "fetch one variable by its `var_…` id",
614
+ "usage": "w6w vars get <id> [options]",
615
+ "naming": "w6w vars get <id>",
616
+ "status": "required",
617
+ "params": [
618
+ {
619
+ "name": "id",
620
+ "kind": "argument",
621
+ "display": "<id>",
622
+ "description": "Variable id (see: w6w vars list)",
623
+ "required": true,
624
+ },
625
+ {
626
+ "name": "json",
627
+ "kind": "flag",
628
+ "display": "--json",
629
+ "description": "Output raw JSON instead of a table",
630
+ "required": false,
631
+ },
632
+ ],
633
+ "examples": [
634
+ "w6w vars get var_01HQ8N",
635
+ ],
636
+ "notes": [],
637
+ },
638
+ {
639
+ "operation": "vars.getByName",
640
+ "path": [
641
+ "vars",
642
+ "get-by-name",
643
+ ],
644
+ "name": "get-by-name",
645
+ "aliases": [],
646
+ "summary": "Fetch one variable by its human-chosen `name`.",
647
+ "short": "Fetch one variable by its human-chosen `name`",
648
+ "headline": "fetch one variable by its human-chosen `name`",
649
+ "usage": "w6w vars get-by-name <name> [options]",
650
+ "naming": "w6w vars get-by-name <name>",
651
+ "status": "required",
652
+ "params": [
653
+ {
654
+ "name": "name",
655
+ "kind": "argument",
656
+ "display": "<name>",
657
+ "description": "Variable name, as chosen at creation",
658
+ "required": true,
659
+ },
660
+ {
661
+ "name": "json",
662
+ "kind": "flag",
663
+ "display": "--json",
664
+ "description": "Output raw JSON instead of a table",
665
+ "required": false,
666
+ },
667
+ ],
668
+ "examples": [
669
+ "w6w vars get-by-name greeting",
670
+ ],
671
+ "notes": [],
672
+ },
673
+ {
674
+ "operation": "vars.create",
675
+ "path": [
676
+ "vars",
677
+ "create",
678
+ ],
679
+ "name": "create",
680
+ "aliases": [],
681
+ "summary": "Create a typed variable under a caller-chosen `name`.",
682
+ "short": "Create a typed variable under a caller-chosen `name`",
683
+ "headline": "create a typed variable under a caller-chosen `name`",
684
+ "usage": "w6w vars create <name> --type <t> --value <v> [options]",
685
+ "naming": "w6w vars create <name> --type <t> --value <v> [--description <d>]",
686
+ "status": "required",
687
+ "params": [
688
+ {
689
+ "name": "name",
690
+ "kind": "argument",
691
+ "display": "<name>",
692
+ "description": "Variable name to create (must match ^[a-z_][a-z0-9_]*$)",
693
+ "required": true,
694
+ },
695
+ {
696
+ "name": "type",
697
+ "kind": "flag",
698
+ "display": "--type <t>",
699
+ "description": "Value type: string|number|boolean|json",
700
+ "required": true,
701
+ },
702
+ {
703
+ "name": "value",
704
+ "kind": "flag",
705
+ "display": "--value <v>",
706
+ "description": "Value, validated against the variable's type",
707
+ "required": true,
708
+ },
709
+ {
710
+ "name": "description",
711
+ "kind": "flag",
712
+ "display": "--description <d>",
713
+ "description": "Human-readable description",
714
+ "required": false,
715
+ },
716
+ {
717
+ "name": "json",
718
+ "kind": "flag",
719
+ "display": "--json",
720
+ "description": "Output raw JSON instead of a table",
721
+ "required": false,
722
+ },
723
+ ],
724
+ "examples": [
725
+ "w6w vars create greeting --type string --value hello",
726
+ ],
727
+ "notes": [],
728
+ },
729
+ {
730
+ "operation": "vars.update",
731
+ "path": [
732
+ "vars",
733
+ "update",
734
+ ],
735
+ "name": "update",
736
+ "aliases": [],
737
+ "summary": "Patch a variable's type, value or description.",
738
+ "short": "Patch a variable's type, value or description",
739
+ "headline": "patch a variable's type, value or description",
740
+ "usage": "w6w vars update <id> [options]",
741
+ "naming": "w6w vars update <id> [--type <t>] [--value <v>] [--description <d>]",
742
+ "status": "required",
743
+ "params": [
744
+ {
745
+ "name": "id",
746
+ "kind": "argument",
747
+ "display": "<id>",
748
+ "description": "Variable id (see: w6w vars list)",
749
+ "required": true,
750
+ },
751
+ {
752
+ "name": "type",
753
+ "kind": "flag",
754
+ "display": "--type <t>",
755
+ "description": "Value type: string|number|boolean|json",
756
+ "required": false,
757
+ },
758
+ {
759
+ "name": "value",
760
+ "kind": "flag",
761
+ "display": "--value <v>",
762
+ "description": "Value, validated against the variable's type",
763
+ "required": false,
764
+ },
765
+ {
766
+ "name": "description",
767
+ "kind": "flag",
768
+ "display": "--description <d>",
769
+ "description": "Human-readable description",
770
+ "required": false,
771
+ },
772
+ {
773
+ "name": "json",
774
+ "kind": "flag",
775
+ "display": "--json",
776
+ "description": "Output raw JSON instead of a table",
777
+ "required": false,
778
+ },
779
+ ],
780
+ "examples": [
781
+ "w6w vars update var_01HQ8N --value goodbye",
782
+ ],
783
+ "notes": [],
784
+ },
785
+ {
786
+ "operation": "vars.delete",
787
+ "path": [
788
+ "vars",
789
+ "delete",
790
+ ],
791
+ "name": "delete",
792
+ "aliases": [],
793
+ "summary": "Delete a variable.",
794
+ "short": "Delete a variable",
795
+ "headline": "delete a variable",
796
+ "usage": "w6w vars delete <id> [options]",
797
+ "naming": "w6w vars delete <id>",
798
+ "status": "required",
799
+ "params": [
800
+ {
801
+ "name": "id",
802
+ "kind": "argument",
803
+ "display": "<id>",
804
+ "description": "Variable id (see: w6w vars list)",
805
+ "required": true,
806
+ },
807
+ {
808
+ "name": "json",
809
+ "kind": "flag",
810
+ "display": "--json",
811
+ "description": "Output raw JSON instead of a table",
812
+ "required": false,
813
+ },
814
+ ],
815
+ "examples": [
816
+ "w6w vars delete var_01HQ8N",
817
+ ],
818
+ "notes": [],
819
+ },
820
+ ],
821
+ "options": [],
822
+ "examples": [
823
+ "w6w vars list",
824
+ "w6w vars create greeting --type string --value hello",
825
+ ],
826
+ },
827
+ ],
828
+ "globalFlags": [
829
+ {
830
+ "name": "--base-url",
831
+ "alias": null,
832
+ "type": "string",
833
+ "env": "W6W_BASE_URL",
834
+ "display": "--base-url <url>",
835
+ "description": "API base URL (env: W6W_BASE_URL)",
836
+ },
837
+ {
838
+ "name": "--token",
839
+ "alias": null,
840
+ "type": "string",
841
+ "env": "W6W_TOKEN",
842
+ "display": "--token <token>",
843
+ "description": "API token (env: W6W_TOKEN)",
844
+ },
845
+ {
846
+ "name": "--json",
847
+ "alias": null,
848
+ "type": "boolean",
849
+ "env": null,
850
+ "display": "--json",
851
+ "description": "Output raw JSON instead of a table",
852
+ },
853
+ {
854
+ "name": "--no-color",
855
+ "alias": null,
856
+ "type": "boolean",
857
+ "env": null,
858
+ "display": "--no-color",
859
+ "description": "Disable colored output",
860
+ },
861
+ {
862
+ "name": "--version",
863
+ "alias": "-v",
864
+ "type": "boolean",
865
+ "env": null,
866
+ "display": "-v, --version",
867
+ "description": "Print the CLI version",
868
+ },
869
+ {
870
+ "name": "--help",
871
+ "alias": "-h",
872
+ "type": "boolean",
873
+ "env": null,
874
+ "display": "-h, --help",
875
+ "description": "Show help for any command",
876
+ },
877
+ ],
878
+ "examples": [
879
+ "w6w me",
880
+ "w6w workflows list",
881
+ "w6w workflows run wf_01H… --wait",
882
+ "w6w documents list",
883
+ "w6w vars create greeting --type string --value hello",
884
+ 'w6w run conn_01H… --action send_email --payload \'{"to":"a@b.com"}\'',
885
+ ],
886
+ };
887
+ /** Every command path the parser may match, aliases included. */
888
+ export const COMMAND_PATHS = [
889
+ [
890
+ "me",
891
+ ],
892
+ [
893
+ "info",
894
+ ],
895
+ [
896
+ "run",
897
+ ],
898
+ [
899
+ "connections",
900
+ "list",
901
+ ],
902
+ [
903
+ "workflows",
904
+ "list",
905
+ ],
906
+ [
907
+ "workflows",
908
+ "run",
909
+ ],
910
+ [
911
+ "documents",
912
+ "list",
913
+ ],
914
+ [
915
+ "documents",
916
+ "get",
917
+ ],
918
+ [
919
+ "documents",
920
+ "get-by-key",
921
+ ],
922
+ [
923
+ "documents",
924
+ "create",
925
+ ],
926
+ [
927
+ "documents",
928
+ "update",
929
+ ],
930
+ [
931
+ "documents",
932
+ "delete",
933
+ ],
934
+ [
935
+ "vars",
936
+ "list",
937
+ ],
938
+ [
939
+ "vars",
940
+ "get",
941
+ ],
942
+ [
943
+ "vars",
944
+ "get-by-name",
945
+ ],
946
+ [
947
+ "vars",
948
+ "create",
949
+ ],
950
+ [
951
+ "vars",
952
+ "update",
953
+ ],
954
+ [
955
+ "vars",
956
+ "delete",
957
+ ],
958
+ ];
959
+ /** The exit-code contract, verbatim from the shared contract's `cli.exitCodes`. */
960
+ export const EXIT_CODES = [
961
+ {
962
+ "code": 0,
963
+ "name": "SUCCESS",
964
+ "meaning": "success, including help and a queued/running workflow",
965
+ },
966
+ {
967
+ "code": 1,
968
+ "name": "USAGE",
969
+ "meaning": "usage error",
970
+ },
971
+ {
972
+ "code": 2,
973
+ "name": "API_ERROR",
974
+ "meaning": "API error (4xx/5xx, including auth failure)",
975
+ },
976
+ {
977
+ "code": 3,
978
+ "name": "RUN_FAILURE",
979
+ "meaning": "run failure (--wait returned status 'failed')",
980
+ },
981
+ ];
982
+ export const EXIT_SUCCESS = 0;
983
+ export const EXIT_USAGE = 1;
984
+ export const EXIT_API_ERROR = 2;
985
+ export const EXIT_RUN_FAILURE = 3;
986
+ /** The global flags, lifted out of the tree for the argument parser. */
987
+ export const GLOBAL_FLAGS = HELP_TREE.globalFlags;
988
+ //# sourceMappingURL=help.generated.js.map