@kb-labs/workflow-entry 2.104.0 → 2.106.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 (56) hide show
  1. package/dist/manifest.json +901 -0
  2. package/dist/widgets/117.js +2 -3
  3. package/dist/widgets/165.js +1 -2
  4. package/dist/widgets/326.js +1 -2
  5. package/dist/widgets/370.js +1 -2
  6. package/dist/widgets/405.js +1 -2
  7. package/dist/widgets/46.js +2 -3
  8. package/dist/widgets/50.js +1 -2
  9. package/dist/widgets/546.js +1 -2
  10. package/dist/widgets/62.js +2 -3
  11. package/dist/widgets/648.js +1 -2
  12. package/dist/widgets/669.js +1 -2
  13. package/dist/widgets/707.js +1 -2
  14. package/dist/widgets/716.js +1 -2
  15. package/dist/widgets/733.js +2 -3
  16. package/dist/widgets/775.js +1 -2
  17. package/dist/widgets/78.js +1 -2
  18. package/dist/widgets/945.js +1 -2
  19. package/dist/widgets/968.js +1 -2
  20. package/dist/widgets/__federation_expose_Crons.js +1 -2
  21. package/dist/widgets/__federation_expose_Dashboard.js +1 -2
  22. package/dist/widgets/__federation_expose_DefinitionDetail.js +1 -2
  23. package/dist/widgets/__federation_expose_Definitions.js +1 -2
  24. package/dist/widgets/__federation_expose_Jobs.js +1 -2
  25. package/dist/widgets/__federation_expose_RunDetail.js +2 -3
  26. package/dist/widgets/__federation_expose_Runs.js +1 -2
  27. package/dist/widgets/mf-manifest.json +12 -12
  28. package/dist/widgets/mf-stats.json +19 -18
  29. package/dist/widgets/remoteEntry.js +3 -4
  30. package/package.json +25 -25
  31. package/dist/widgets/117.js.map +0 -1
  32. package/dist/widgets/165.js.map +0 -1
  33. package/dist/widgets/326.js.map +0 -1
  34. package/dist/widgets/370.js.map +0 -1
  35. package/dist/widgets/405.js.map +0 -1
  36. package/dist/widgets/46.js.map +0 -1
  37. package/dist/widgets/50.js.map +0 -1
  38. package/dist/widgets/546.js.map +0 -1
  39. package/dist/widgets/62.js.map +0 -1
  40. package/dist/widgets/648.js.map +0 -1
  41. package/dist/widgets/669.js.map +0 -1
  42. package/dist/widgets/707.js.map +0 -1
  43. package/dist/widgets/716.js.map +0 -1
  44. package/dist/widgets/733.js.map +0 -1
  45. package/dist/widgets/775.js.map +0 -1
  46. package/dist/widgets/78.js.map +0 -1
  47. package/dist/widgets/945.js.map +0 -1
  48. package/dist/widgets/968.js.map +0 -1
  49. package/dist/widgets/__federation_expose_Crons.js.map +0 -1
  50. package/dist/widgets/__federation_expose_Dashboard.js.map +0 -1
  51. package/dist/widgets/__federation_expose_DefinitionDetail.js.map +0 -1
  52. package/dist/widgets/__federation_expose_Definitions.js.map +0 -1
  53. package/dist/widgets/__federation_expose_Jobs.js.map +0 -1
  54. package/dist/widgets/__federation_expose_RunDetail.js.map +0 -1
  55. package/dist/widgets/__federation_expose_Runs.js.map +0 -1
  56. package/dist/widgets/remoteEntry.js.map +0 -1
@@ -0,0 +1,901 @@
1
+ {
2
+ "schema": "kb.plugin/3",
3
+ "id": "@kb-labs/workflow",
4
+ "version": "1.0.0",
5
+ "display": {
6
+ "name": "Workflow CLI",
7
+ "description": "CLI commands for interacting with KB Labs Workflow Daemon",
8
+ "tags": [
9
+ "workflow",
10
+ "daemon",
11
+ "jobs",
12
+ "orchestration"
13
+ ]
14
+ },
15
+ "platform": {
16
+ "requires": [],
17
+ "optional": []
18
+ },
19
+ "cli": {
20
+ "groupMeta": [
21
+ {
22
+ "path": "workflow",
23
+ "describe": "Workflow daemon commands"
24
+ },
25
+ {
26
+ "path": "workflow runs",
27
+ "describe": "Workflow run management (list, view, watch, rerun)"
28
+ },
29
+ {
30
+ "path": "workflow job",
31
+ "describe": "Raw job execution"
32
+ }
33
+ ],
34
+ "commands": [
35
+ {
36
+ "path": "workflow health",
37
+ "category": "Daemon",
38
+ "operationType": "read",
39
+ "describe": "Check workflow daemon health status.",
40
+ "longDescription": "Performs a health check on the workflow daemon by making an HTTP request to /health endpoint. Use this to verify the daemon is running and responding.",
41
+ "handler": "./commands/health.js#default",
42
+ "flags": [
43
+ {
44
+ "name": "json",
45
+ "type": "boolean",
46
+ "default": false,
47
+ "description": "Output result as JSON"
48
+ }
49
+ ],
50
+ "examples": [
51
+ "kb workflow health",
52
+ "kb workflow health --json"
53
+ ]
54
+ },
55
+ {
56
+ "path": "workflow metrics",
57
+ "category": "Daemon",
58
+ "operationType": "read",
59
+ "describe": "Get workflow daemon metrics.",
60
+ "longDescription": "Fetches comprehensive metrics from the workflow daemon including total runs, queued jobs, running jobs, completed jobs, and failure counts.",
61
+ "handler": "./commands/metrics.js#default",
62
+ "flags": [
63
+ {
64
+ "name": "json",
65
+ "type": "boolean",
66
+ "default": false,
67
+ "description": "Output result as JSON"
68
+ }
69
+ ],
70
+ "examples": [
71
+ "kb workflow metrics",
72
+ "kb workflow metrics --json"
73
+ ]
74
+ },
75
+ {
76
+ "path": "workflow lint",
77
+ "category": "Daemon",
78
+ "operationType": "read",
79
+ "describe": "Validate workflow files against the schema.",
80
+ "longDescription": "Statically validates workflow files under .kb/workflows (or a given --path) against WorkflowSpecSchema, reporting per-file issues with their JSON-path. Runs locally without the daemon. Exits non-zero if any file is invalid (or, with --strict, has warnings).",
81
+ "handler": "./commands/lint.js#default",
82
+ "flags": [
83
+ {
84
+ "name": "path",
85
+ "type": "string",
86
+ "description": "File or directory to lint (default: .kb/workflows)"
87
+ },
88
+ {
89
+ "name": "json",
90
+ "type": "boolean",
91
+ "default": false,
92
+ "description": "Output result as JSON"
93
+ },
94
+ {
95
+ "name": "strict",
96
+ "type": "boolean",
97
+ "default": false,
98
+ "description": "Treat warnings as errors"
99
+ }
100
+ ],
101
+ "examples": [
102
+ "kb workflow lint",
103
+ "kb workflow lint --path .kb/workflows/03-dev-cycle.yml",
104
+ "kb workflow lint --json",
105
+ "kb workflow lint --strict"
106
+ ]
107
+ },
108
+ {
109
+ "path": "workflow status",
110
+ "category": "Jobs",
111
+ "operationType": "read",
112
+ "describe": "(Deprecated) Get job status. Use: kb workflow runs status <runId>",
113
+ "longDescription": "Retrieves detailed status information for a specific job by ID, including current state, start time, and completion time if finished. DEPRECATED: use \"kb workflow runs status <runId>\" for run-level status.",
114
+ "handler": "./commands/status.js#default",
115
+ "flags": [
116
+ {
117
+ "name": "json",
118
+ "type": "boolean",
119
+ "default": false,
120
+ "description": "Output result as JSON"
121
+ },
122
+ {
123
+ "name": "job-id",
124
+ "type": "string",
125
+ "description": "Job ID to get status for"
126
+ }
127
+ ],
128
+ "examples": [
129
+ "kb workflow status --job-id=abc123",
130
+ "kb workflow status --job-id=abc123 --json"
131
+ ]
132
+ },
133
+ {
134
+ "path": "workflow logs",
135
+ "category": "Jobs",
136
+ "operationType": "read",
137
+ "describe": "(Deprecated) Get job/run logs. Use: kb workflow runs logs <runId>",
138
+ "longDescription": "Fetches execution logs for a specific job or run by ID. DEPRECATED: use \"kb workflow runs logs <runId>\" for run-level logs.",
139
+ "handler": "./commands/logs.js#default",
140
+ "flags": [
141
+ {
142
+ "name": "json",
143
+ "type": "boolean",
144
+ "default": false,
145
+ "description": "Output result as JSON"
146
+ },
147
+ {
148
+ "name": "job-id",
149
+ "type": "string",
150
+ "description": "Job ID to get logs for (required)"
151
+ },
152
+ {
153
+ "name": "follow",
154
+ "type": "boolean",
155
+ "default": false,
156
+ "description": "Follow log output (stream new logs)"
157
+ }
158
+ ],
159
+ "examples": [
160
+ "kb workflow logs --job-id=abc123",
161
+ "kb workflow logs --job-id=abc123 --json",
162
+ "kb workflow logs --job-id=abc123 --follow"
163
+ ]
164
+ },
165
+ {
166
+ "path": "workflow list",
167
+ "category": "Jobs",
168
+ "operationType": "read",
169
+ "describe": "(Deprecated) List active executions. Use: kb workflow runs list",
170
+ "longDescription": "Lists all currently active workflow executions or cron jobs. Can be filtered by status (running, queued, completed, failed, cancelled) or type (runs, cron). DEPRECATED: use \"kb workflow runs list\" for run listing.",
171
+ "handler": "./commands/list.js#default",
172
+ "flags": [
173
+ {
174
+ "name": "json",
175
+ "type": "boolean",
176
+ "default": false,
177
+ "description": "Output result as JSON"
178
+ },
179
+ {
180
+ "name": "status",
181
+ "type": "string",
182
+ "description": "Filter by status (running, completed, failed)"
183
+ },
184
+ {
185
+ "name": "type",
186
+ "type": "string",
187
+ "description": "Filter by type: \"runs\" (active executions), \"cron\" (scheduled jobs)"
188
+ }
189
+ ],
190
+ "examples": [
191
+ "kb workflow list",
192
+ "kb workflow list --status=running",
193
+ "kb workflow list --type=cron",
194
+ "kb workflow list --json"
195
+ ]
196
+ },
197
+ {
198
+ "path": "workflow job run",
199
+ "category": "Jobs",
200
+ "operationType": "execute",
201
+ "describe": "Submit a raw job for execution.",
202
+ "longDescription": "Submits a job to the workflow daemon for execution. Requires a handler (plugin command) and optionally accepts input parameters as JSON. Can wait for job completion with --wait flag.",
203
+ "handler": "./commands/run.js#default",
204
+ "flags": [
205
+ {
206
+ "name": "json",
207
+ "type": "boolean",
208
+ "default": false,
209
+ "description": "Output result as JSON"
210
+ },
211
+ {
212
+ "name": "handler",
213
+ "type": "string",
214
+ "description": "Plugin handler to run (e.g., \"mind:rag-query\")"
215
+ },
216
+ {
217
+ "name": "input",
218
+ "type": "string",
219
+ "description": "JSON string of input parameters"
220
+ },
221
+ {
222
+ "name": "priority",
223
+ "type": "number",
224
+ "description": "Job priority (1-10, default: 5)"
225
+ },
226
+ {
227
+ "name": "wait",
228
+ "type": "boolean",
229
+ "default": false,
230
+ "description": "Wait for job completion"
231
+ }
232
+ ],
233
+ "examples": [
234
+ "kb workflow job run --handler=mind:search --input='{\"text\":\"test\"}'",
235
+ "kb workflow job run --handler=mind:search --input='{\"text\":\"test\"}' --wait",
236
+ "kb workflow job run --handler=mind:search --input='{\"text\":\"test\"}' --priority=8",
237
+ "kb workflow job run --handler=mind:search --input='{\"text\":\"test\"}' --json"
238
+ ]
239
+ },
240
+ {
241
+ "path": "workflow runs list",
242
+ "category": "Runs",
243
+ "operationType": "read",
244
+ "describe": "List workflow runs.",
245
+ "longDescription": "Lists workflow runs with status, trigger, and duration. Filter by status (failed, running, success) or workflow ID. Use --json for machine-readable output.",
246
+ "handler": "./commands/runs-list.js#default",
247
+ "flags": [
248
+ {
249
+ "name": "json",
250
+ "type": "boolean",
251
+ "default": false,
252
+ "description": "Output result as JSON"
253
+ },
254
+ {
255
+ "name": "status",
256
+ "type": "string",
257
+ "description": "Filter by status: failed, running, success, queued, cancelled"
258
+ },
259
+ {
260
+ "name": "limit",
261
+ "type": "number",
262
+ "default": 20,
263
+ "description": "Maximum number of runs to show (default: 20)"
264
+ },
265
+ {
266
+ "name": "workflow",
267
+ "type": "string",
268
+ "description": "Filter by workflow ID or name"
269
+ }
270
+ ],
271
+ "examples": [
272
+ "kb workflow runs list",
273
+ "kb workflow runs list --status=failed",
274
+ "kb workflow runs list --status=failed --limit=5",
275
+ "kb workflow runs list --workflow=my-workflow --json"
276
+ ]
277
+ },
278
+ {
279
+ "path": "workflow runs view",
280
+ "category": "Runs",
281
+ "operationType": "read",
282
+ "describe": "View run details for incident investigation.",
283
+ "longDescription": "Shows full run details: jobs, steps, resolvedInputs, gate decisions, errors. Without a run ID shows the latest run (like gh run view). Use --log-failed to see only the logs from failed steps (fastest path to root cause). Use --json=status,jobs for selective JSON output.",
284
+ "handler": "./commands/runs-view.js#default",
285
+ "flags": [
286
+ {
287
+ "name": "run-id",
288
+ "type": "string",
289
+ "description": "Run ID to inspect (alias for positional argument)"
290
+ },
291
+ {
292
+ "name": "json",
293
+ "type": "string",
294
+ "description": "Output specific fields as JSON. Use --json (no value) or --json=all for full output, or --json=field1,field2 for selective fields."
295
+ },
296
+ {
297
+ "name": "log",
298
+ "type": "boolean",
299
+ "default": false,
300
+ "description": "Show full run logs"
301
+ },
302
+ {
303
+ "name": "log-failed",
304
+ "type": "boolean",
305
+ "default": false,
306
+ "description": "Show logs only from failed steps (most useful for investigation)"
307
+ },
308
+ {
309
+ "name": "step",
310
+ "type": "string",
311
+ "description": "Filter logs to a specific step name"
312
+ }
313
+ ],
314
+ "examples": [
315
+ "kb workflow runs view",
316
+ "kb workflow runs view <runId>",
317
+ "kb workflow runs view --run-id=<runId>",
318
+ "kb workflow runs view <runId> --log-failed",
319
+ "kb workflow runs view <runId> --log",
320
+ "kb workflow runs view <runId> --json=status,jobs",
321
+ "kb workflow runs view <runId> --json=all"
322
+ ]
323
+ },
324
+ {
325
+ "path": "workflow runs watch",
326
+ "category": "Runs",
327
+ "operationType": "execute",
328
+ "describe": "Stream workflow run events in real-time.",
329
+ "longDescription": "Connects to the run event stream via SSE and prints events as they happen. Without a run ID watches the latest run (like gh run watch). Automatically exits when the run finishes.",
330
+ "handler": "./commands/runs-watch.js#default",
331
+ "flags": [
332
+ {
333
+ "name": "run-id",
334
+ "type": "string",
335
+ "description": "Run ID to watch (alias for positional argument)"
336
+ },
337
+ {
338
+ "name": "json",
339
+ "type": "boolean",
340
+ "default": false,
341
+ "description": "Output events as JSON"
342
+ }
343
+ ],
344
+ "examples": [
345
+ "kb workflow runs watch",
346
+ "kb workflow runs watch <runId>",
347
+ "kb workflow runs watch --run-id=<runId>",
348
+ "kb workflow runs watch <runId> --json"
349
+ ]
350
+ },
351
+ {
352
+ "path": "workflow runs rerun",
353
+ "category": "Runs",
354
+ "operationType": "mutate",
355
+ "describe": "Rerun a workflow run.",
356
+ "longDescription": "Reruns a workflow by re-submitting it with the same inputs. Use --failed-only to requeue only jobs that failed or were interrupted.",
357
+ "handler": "./commands/runs-rerun.js#default",
358
+ "flags": [
359
+ {
360
+ "name": "run-id",
361
+ "type": "string",
362
+ "description": "Run ID to rerun (alias for positional argument)"
363
+ },
364
+ {
365
+ "name": "json",
366
+ "type": "boolean",
367
+ "default": false,
368
+ "description": "Output result as JSON"
369
+ },
370
+ {
371
+ "name": "failed-only",
372
+ "type": "boolean",
373
+ "default": false,
374
+ "description": "Rerun only jobs that failed or were interrupted"
375
+ }
376
+ ],
377
+ "examples": [
378
+ "kb workflow runs rerun <runId>",
379
+ "kb workflow runs rerun --run-id=<runId>",
380
+ "kb workflow runs rerun <runId> --failed-only",
381
+ "kb workflow runs rerun <runId> --json"
382
+ ]
383
+ },
384
+ {
385
+ "path": "workflow runs restart",
386
+ "category": "Runs",
387
+ "operationType": "mutate",
388
+ "describe": "Restart a run from a specific step.",
389
+ "longDescription": "Restores the run from a snapshot and re-executes from the given step. All preceding steps inherit their stored outputs without being re-run. Omitting --from-step restarts from step 1 using the snapshot env.",
390
+ "handler": "./commands/runs-restart.js#default",
391
+ "flags": [
392
+ {
393
+ "name": "run-id",
394
+ "type": "string",
395
+ "description": "Run ID to restart (alias for positional argument)"
396
+ },
397
+ {
398
+ "name": "from-step",
399
+ "type": "string",
400
+ "description": "Step ID to restart from; all preceding steps inherit their stored outputs"
401
+ },
402
+ {
403
+ "name": "json",
404
+ "type": "boolean",
405
+ "default": false,
406
+ "description": "Output result as JSON"
407
+ }
408
+ ],
409
+ "examples": [
410
+ "kb workflow runs restart <runId>",
411
+ "kb workflow runs restart <runId> --from-step=<stepId>",
412
+ "kb workflow runs restart <runId> --from-step=<stepId> --json"
413
+ ]
414
+ },
415
+ {
416
+ "path": "workflow runs cancel",
417
+ "category": "Runs",
418
+ "operationType": "mutate",
419
+ "describe": "Cancel a workflow run.",
420
+ "longDescription": "Cancels an active workflow run. If the run is not found or already finished, prints a clear error.",
421
+ "handler": "./commands/runs-cancel.js#default",
422
+ "flags": [
423
+ {
424
+ "name": "run-id",
425
+ "type": "string",
426
+ "description": "Run ID to cancel (alias for positional argument)"
427
+ },
428
+ {
429
+ "name": "json",
430
+ "type": "boolean",
431
+ "default": false,
432
+ "description": "Output result as JSON"
433
+ }
434
+ ],
435
+ "examples": [
436
+ "kb workflow runs cancel <runId>",
437
+ "kb workflow runs cancel --run-id=<runId>",
438
+ "kb workflow runs cancel <runId> --json"
439
+ ]
440
+ },
441
+ {
442
+ "path": "workflow runs logs",
443
+ "category": "Runs",
444
+ "operationType": "read",
445
+ "describe": "Fetch logs for a workflow run.",
446
+ "longDescription": "Fetches execution logs for a run. Use --log-failed to show only failed-step logs. Use --step to filter to a specific step. Accepts a positional run ID or --run-id flag.",
447
+ "handler": "./commands/runs-logs.js#default",
448
+ "flags": [
449
+ {
450
+ "name": "run-id",
451
+ "type": "string",
452
+ "description": "Run ID (alias for positional argument)"
453
+ },
454
+ {
455
+ "name": "json",
456
+ "type": "boolean",
457
+ "default": false,
458
+ "description": "Output result as JSON"
459
+ },
460
+ {
461
+ "name": "step",
462
+ "type": "string",
463
+ "description": "Filter logs to a specific step name"
464
+ },
465
+ {
466
+ "name": "log-failed",
467
+ "type": "boolean",
468
+ "default": false,
469
+ "description": "Show only logs from failed steps"
470
+ }
471
+ ],
472
+ "examples": [
473
+ "kb workflow runs logs <runId>",
474
+ "kb workflow runs logs <runId> --log-failed",
475
+ "kb workflow runs logs <runId> --step=build",
476
+ "kb workflow runs logs <runId> --json"
477
+ ]
478
+ },
479
+ {
480
+ "path": "workflow runs status",
481
+ "category": "Runs",
482
+ "operationType": "read",
483
+ "describe": "Show status summary for a workflow run.",
484
+ "longDescription": "Displays the status of a run including jobs and steps. Accepts a positional run ID or --run-id flag.",
485
+ "handler": "./commands/runs-status.js#default",
486
+ "flags": [
487
+ {
488
+ "name": "run-id",
489
+ "type": "string",
490
+ "description": "Run ID (alias for positional argument)"
491
+ },
492
+ {
493
+ "name": "json",
494
+ "type": "boolean",
495
+ "default": false,
496
+ "description": "Output result as JSON"
497
+ }
498
+ ],
499
+ "examples": [
500
+ "kb workflow runs status <runId>",
501
+ "kb workflow runs status --run-id=<runId>",
502
+ "kb workflow runs status <runId> --json"
503
+ ]
504
+ },
505
+ {
506
+ "path": "workflow runs approve",
507
+ "category": "Runs",
508
+ "operationType": "mutate",
509
+ "describe": "Approve or reject a pending approval step in a workflow run.",
510
+ "longDescription": "Resolves a human-gate (approval) step that is waiting for a decision. If the run has exactly one pending approval, it is resolved automatically. If there are multiple, specify --job-id and --step-id to target the right one. Use --action=reject to reject instead of approve (default: approve). Use --comment to attach a note to the decision.",
511
+ "handler": "./commands/runs-approve.js#default",
512
+ "flags": [
513
+ {
514
+ "name": "run-id",
515
+ "type": "string",
516
+ "description": "Run ID to approve/reject (alias for positional argument)"
517
+ },
518
+ {
519
+ "name": "job-id",
520
+ "type": "string",
521
+ "description": "Job ID containing the approval step"
522
+ },
523
+ {
524
+ "name": "step-id",
525
+ "type": "string",
526
+ "description": "Step ID to approve or reject"
527
+ },
528
+ {
529
+ "name": "action",
530
+ "type": "string",
531
+ "default": "approve",
532
+ "description": "Action to take: \"approve\" or \"reject\" (default: approve)"
533
+ },
534
+ {
535
+ "name": "comment",
536
+ "type": "string",
537
+ "description": "Optional comment to attach to the approval decision"
538
+ },
539
+ {
540
+ "name": "json",
541
+ "type": "boolean",
542
+ "default": false,
543
+ "description": "Output result as JSON"
544
+ }
545
+ ],
546
+ "examples": [
547
+ "kb workflow runs approve <runId>",
548
+ "kb workflow runs approve <runId> --action=reject --comment=\"Needs rework\"",
549
+ "kb workflow runs approve <runId> --job-id=<jobId> --step-id=<stepId>",
550
+ "kb workflow runs approve <runId> --json"
551
+ ]
552
+ },
553
+ {
554
+ "path": "workflow run",
555
+ "category": "Runs",
556
+ "operationType": "execute",
557
+ "describe": "Run workflow by ID.",
558
+ "longDescription": "Runs a workflow definition by workflow ID via /api/v1/workflows/:id/run endpoint. Supports request-level target and isolation overrides.",
559
+ "handler": "./commands/workflow-run.js#default",
560
+ "flags": [
561
+ {
562
+ "name": "json",
563
+ "type": "boolean",
564
+ "default": false,
565
+ "description": "Output result as JSON"
566
+ },
567
+ {
568
+ "name": "workflow-id",
569
+ "type": "string",
570
+ "description": "Workflow ID to run (e.g., \"release-manager/create-release\")"
571
+ },
572
+ {
573
+ "name": "input",
574
+ "type": "string",
575
+ "description": "JSON string of workflow input payload"
576
+ },
577
+ {
578
+ "name": "inputs",
579
+ "type": "string",
580
+ "description": "Deprecated alias for --input. Use --input instead."
581
+ },
582
+ {
583
+ "name": "isolation",
584
+ "type": "string",
585
+ "description": "Isolation profile: strict, balanced, or relaxed"
586
+ },
587
+ {
588
+ "name": "target-namespace",
589
+ "type": "string",
590
+ "description": "Execution target namespace"
591
+ },
592
+ {
593
+ "name": "target-environment-id",
594
+ "type": "string",
595
+ "description": "Execution target environment ID"
596
+ },
597
+ {
598
+ "name": "target-workspace-id",
599
+ "type": "string",
600
+ "description": "Execution target workspace ID"
601
+ },
602
+ {
603
+ "name": "target-workdir",
604
+ "type": "string",
605
+ "description": "Execution target workdir override"
606
+ },
607
+ {
608
+ "name": "trigger-type",
609
+ "type": "string",
610
+ "description": "Trigger type: manual, api, or cron"
611
+ },
612
+ {
613
+ "name": "trigger-user",
614
+ "type": "string",
615
+ "description": "Trigger user"
616
+ }
617
+ ],
618
+ "examples": [
619
+ "kb workflow run --workflow-id=release-manager/create-release",
620
+ "kb workflow run --workflow-id=release-manager/create-release --isolation=strict --target-namespace=team-a/prod",
621
+ "kb workflow run --workflow-id=release-manager/create-release --target-environment-id=env-123 --json"
622
+ ]
623
+ }
624
+ ]
625
+ },
626
+ "rest": {
627
+ "basePath": "/plugins/workflow",
628
+ "routes": [
629
+ {
630
+ "method": "GET",
631
+ "path": "/stats",
632
+ "handler": "./rest/stats-handler.js#default",
633
+ "describe": "Get dashboard statistics",
634
+ "output": {
635
+ "zod": "@kb-labs/workflow-contracts#DashboardStatsResponseSchema"
636
+ }
637
+ },
638
+ {
639
+ "method": "GET",
640
+ "path": "/workflows",
641
+ "handler": "./rest/workflows-list-handler.js#default",
642
+ "describe": "List all workflow definitions",
643
+ "output": {
644
+ "zod": "@kb-labs/workflow-contracts#WorkflowListResponseSchema"
645
+ }
646
+ },
647
+ {
648
+ "method": "GET",
649
+ "path": "/workflows/:id",
650
+ "handler": "./rest/workflow-detail-handler.js#default",
651
+ "describe": "Get workflow definition details",
652
+ "output": {
653
+ "zod": "@kb-labs/workflow-contracts#WorkflowInfoSchema"
654
+ }
655
+ },
656
+ {
657
+ "method": "POST",
658
+ "path": "/workflows/:id/run",
659
+ "handler": "./rest/workflow-run-handler.js#default",
660
+ "describe": "Run a workflow",
661
+ "input": {
662
+ "zod": "@kb-labs/workflow-contracts#WorkflowRunRequestSchema"
663
+ }
664
+ },
665
+ {
666
+ "method": "GET",
667
+ "path": "/workflows/:id/runs",
668
+ "handler": "./rest/workflow-runs-handler.js#default",
669
+ "describe": "Get workflow run history with pagination",
670
+ "output": {
671
+ "zod": "@kb-labs/workflow-contracts#WorkflowRunHistoryResponseSchema"
672
+ }
673
+ },
674
+ {
675
+ "method": "POST",
676
+ "path": "/workflows/runs/:runId/cancel",
677
+ "handler": "./rest/workflow-run-cancel-handler.js#default",
678
+ "describe": "Cancel a running or queued workflow run"
679
+ },
680
+ {
681
+ "method": "GET",
682
+ "path": "/runs",
683
+ "handler": "./rest/runs-list-handler.js#default",
684
+ "describe": "List all workflow runs across all workflows"
685
+ },
686
+ {
687
+ "method": "GET",
688
+ "path": "/runs/:runId",
689
+ "handler": "./rest/run-detail-handler.js#default",
690
+ "describe": "Get detailed information about a specific workflow run"
691
+ },
692
+ {
693
+ "method": "GET",
694
+ "path": "/jobs",
695
+ "handler": "./rest/jobs-list-handler.js#default",
696
+ "describe": "List workflow jobs with optional filters",
697
+ "output": {
698
+ "zod": "@kb-labs/workflow-contracts#JobListResponseSchema"
699
+ }
700
+ },
701
+ {
702
+ "method": "GET",
703
+ "path": "/jobs/:jobId",
704
+ "handler": "./rest/job-detail-handler.js#default",
705
+ "describe": "Get detailed information about a specific job",
706
+ "output": {
707
+ "zod": "@kb-labs/workflow-contracts#JobStatusInfoSchema"
708
+ }
709
+ },
710
+ {
711
+ "method": "GET",
712
+ "path": "/jobs/:jobId/logs",
713
+ "handler": "./rest/job-logs-handler.js#default",
714
+ "describe": "Get execution logs for a specific job",
715
+ "output": {
716
+ "zod": "@kb-labs/workflow-contracts#JobLogsResponseSchema"
717
+ }
718
+ },
719
+ {
720
+ "method": "GET",
721
+ "path": "/jobs/:jobId/steps",
722
+ "handler": "./rest/job-steps-handler.js#default",
723
+ "describe": "Get execution steps and progress for a specific job",
724
+ "output": {
725
+ "zod": "@kb-labs/workflow-contracts#JobStepsResponseSchema"
726
+ }
727
+ },
728
+ {
729
+ "method": "POST",
730
+ "path": "/jobs/:jobId/cancel",
731
+ "handler": "./rest/job-cancel-handler.js#default",
732
+ "describe": "Cancel a running or pending job",
733
+ "output": {
734
+ "zod": "@kb-labs/workflow-contracts#JobCancelResponseSchema"
735
+ }
736
+ },
737
+ {
738
+ "method": "GET",
739
+ "path": "/cron",
740
+ "handler": "./rest/cron-list-handler.js#default",
741
+ "describe": "List all registered cron jobs",
742
+ "output": {
743
+ "zod": "@kb-labs/workflow-contracts#CronListResponseSchema"
744
+ }
745
+ },
746
+ {
747
+ "method": "GET",
748
+ "path": "/runs/:runId/pending-approvals",
749
+ "handler": "./rest/pending-approvals-handler.js#default",
750
+ "describe": "List steps waiting for approval in a workflow run"
751
+ },
752
+ {
753
+ "method": "POST",
754
+ "path": "/runs/:runId/approve",
755
+ "handler": "./rest/resolve-approval-handler.js#default",
756
+ "describe": "Approve or reject a pending approval step"
757
+ }
758
+ ]
759
+ },
760
+ "ws": {
761
+ "basePath": "/v1/ws/plugins/workflow",
762
+ "defaults": {
763
+ "timeoutMs": 600000,
764
+ "maxMessageSize": 1048576,
765
+ "auth": "none",
766
+ "idleTimeoutMs": 300000
767
+ },
768
+ "channels": [
769
+ {
770
+ "path": "/logs/:jobId",
771
+ "handler": "./ws/logs-channel.js#default",
772
+ "description": "Real-time job logs streaming"
773
+ },
774
+ {
775
+ "path": "/progress/:jobId",
776
+ "handler": "./ws/progress-channel.js#default",
777
+ "description": "Real-time job progress updates"
778
+ }
779
+ ]
780
+ },
781
+ "studio": {
782
+ "version": 2,
783
+ "remoteName": "workflowPlugin",
784
+ "pages": [
785
+ {
786
+ "id": "workflow.dashboard",
787
+ "title": "Dashboard",
788
+ "icon": "DashboardOutlined",
789
+ "route": "/p/workflows",
790
+ "entry": "./Dashboard",
791
+ "order": 1
792
+ },
793
+ {
794
+ "id": "workflow.runs",
795
+ "title": "Runs",
796
+ "icon": "PlayCircleOutlined",
797
+ "route": "/p/workflows/runs",
798
+ "entry": "./Runs",
799
+ "order": 2
800
+ },
801
+ {
802
+ "id": "workflow.run",
803
+ "title": "Run Detail",
804
+ "icon": "PlayCircleOutlined",
805
+ "route": "/p/workflows/runs/:runId",
806
+ "entry": "./RunDetail",
807
+ "order": 3
808
+ },
809
+ {
810
+ "id": "workflow.defs",
811
+ "title": "Definitions",
812
+ "icon": "AppstoreOutlined",
813
+ "route": "/p/workflows/definitions",
814
+ "entry": "./Definitions",
815
+ "order": 4
816
+ },
817
+ {
818
+ "id": "workflow.def",
819
+ "title": "Definition Detail",
820
+ "icon": "AppstoreOutlined",
821
+ "route": "/p/workflows/definitions/:workflowId",
822
+ "entry": "./DefinitionDetail",
823
+ "order": 5
824
+ },
825
+ {
826
+ "id": "workflow.jobs",
827
+ "title": "Jobs",
828
+ "icon": "UnorderedListOutlined",
829
+ "route": "/p/workflows/jobs",
830
+ "entry": "./Jobs",
831
+ "order": 6
832
+ },
833
+ {
834
+ "id": "workflow.crons",
835
+ "title": "Crons",
836
+ "icon": "ClockCircleOutlined",
837
+ "route": "/p/workflows/crons",
838
+ "entry": "./Crons",
839
+ "order": 7
840
+ }
841
+ ],
842
+ "menus": [
843
+ {
844
+ "id": "workflows",
845
+ "label": "Workflows",
846
+ "icon": "ThunderboltOutlined",
847
+ "target": "workflow.dashboard",
848
+ "order": 10
849
+ },
850
+ {
851
+ "id": "workflows.runs",
852
+ "label": "Runs",
853
+ "icon": "PlayCircleOutlined",
854
+ "target": "workflow.runs",
855
+ "parentId": "workflows",
856
+ "order": 1
857
+ },
858
+ {
859
+ "id": "workflows.defs",
860
+ "label": "Definitions",
861
+ "icon": "AppstoreOutlined",
862
+ "target": "workflow.defs",
863
+ "parentId": "workflows",
864
+ "order": 2
865
+ },
866
+ {
867
+ "id": "workflows.jobs",
868
+ "label": "Jobs",
869
+ "icon": "UnorderedListOutlined",
870
+ "target": "workflow.jobs",
871
+ "parentId": "workflows",
872
+ "order": 3
873
+ },
874
+ {
875
+ "id": "workflows.crons",
876
+ "label": "Crons",
877
+ "icon": "ClockCircleOutlined",
878
+ "target": "workflow.crons",
879
+ "parentId": "workflows",
880
+ "order": 4
881
+ }
882
+ ]
883
+ },
884
+ "permissions": {
885
+ "env": {
886
+ "read": [
887
+ "WORKFLOW_DAEMON_URL"
888
+ ]
889
+ },
890
+ "network": {
891
+ "fetch": [
892
+ "http://localhost:*",
893
+ "http://127.0.0.1:*"
894
+ ]
895
+ },
896
+ "quotas": {
897
+ "timeoutMs": 30000,
898
+ "memoryMb": 128
899
+ }
900
+ }
901
+ }