@amaster.ai/runtime-cli 1.1.9 → 1.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +272 -18
- package/dist/cli.cjs +1708 -232
- package/dist/cli.cjs.map +1 -1
- package/dist/cli.js +1708 -232
- package/dist/cli.js.map +1 -1
- package/dist/index.cjs +1708 -232
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +1708 -232
- package/dist/index.js.map +1 -1
- package/dist/skill/SKILL.md +161 -87
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @amaster.ai/runtime-cli
|
|
2
2
|
|
|
3
|
-
CLI for Amaster SDK - Multi-app support for OpenClaw. Manage multiple Amaster applications, entities, BPM processes, workflows, and S3
|
|
3
|
+
CLI for Amaster SDK - Multi-app support for OpenClaw. Manage multiple Amaster applications, entities, BPM processes, workflows, and S3 object operations from a single command-line interface.
|
|
4
4
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
@@ -9,8 +9,8 @@ CLI for Amaster SDK - Multi-app support for OpenClaw. Manage multiple Amaster ap
|
|
|
9
9
|
- **Structured Output**: `json`, `pretty`, `table`, `ndjson`, and `csv`
|
|
10
10
|
- **Entity Management**: CRUD, options lookup, and bulk operations on entities
|
|
11
11
|
- **BPM**: Manage Camunda processes, tasks, and instances
|
|
12
|
-
- **Workflow**:
|
|
13
|
-
- **S3 Storage**: Upload, download
|
|
12
|
+
- **Workflow**: Run workflows
|
|
13
|
+
- **S3 Storage**: Upload files, download objects, and inspect metadata
|
|
14
14
|
- **OpenClaw Integration**: Initialize app-specific skills and MCP servers
|
|
15
15
|
|
|
16
16
|
## Installation
|
|
@@ -42,6 +42,8 @@ npm_config_ignore_scripts=1 npm uninstall -g @amaster.ai/runtime-cli
|
|
|
42
42
|
|
|
43
43
|
## Quick Start
|
|
44
44
|
|
|
45
|
+
Apps that expose anonymous endpoints do not require `amaster login` first. When no local token exists, the CLI now sends unauthenticated requests and lets the server decide whether the endpoint is public or requires auth.
|
|
46
|
+
|
|
45
47
|
### 1. Initialize an App
|
|
46
48
|
|
|
47
49
|
```bash
|
|
@@ -84,6 +86,10 @@ amaster logout --app myapp
|
|
|
84
86
|
### 4. Use SDK Features
|
|
85
87
|
|
|
86
88
|
```bash
|
|
89
|
+
# Run an anonymous workflow when the app exposes it publicly
|
|
90
|
+
amaster workflow run text-sentiment-analysis --app myapp \
|
|
91
|
+
--input '{"input_text":"I love this product. It is fast and easy to use."}'
|
|
92
|
+
|
|
87
93
|
# List entities - full JSON output (default)
|
|
88
94
|
amaster entity list default products --app myapp
|
|
89
95
|
|
|
@@ -169,7 +175,7 @@ amaster entity bulk-delete default products --app myapp --ids 1,2,3
|
|
|
169
175
|
amaster entity bulk-delete default products --app myapp --ids '[1,2,3]'
|
|
170
176
|
```
|
|
171
177
|
|
|
172
|
-
For `amaster entity list`, explicit options such as `--fields`, `--relations`, and `--order-by` override the same keys inside `--query`.
|
|
178
|
+
For `amaster entity list`, explicit options such as `--page`, `--page-size`, `--fields`, `--relations`, and `--order-by` override the same keys inside `--query`. If you omit `--page` and `--page-size`, the CLI does not inject pagination defaults and forwards only the parameters you provided.
|
|
173
179
|
|
|
174
180
|
## Commands
|
|
175
181
|
|
|
@@ -223,8 +229,8 @@ amaster whoami [options] # Show current user information
|
|
|
223
229
|
```bash
|
|
224
230
|
amaster entity list <namespace> <entity> [options]
|
|
225
231
|
--app <app-code> # App code (uses default if not specified)
|
|
226
|
-
--page <page> # Page number
|
|
227
|
-
--page-size <size> # Page size
|
|
232
|
+
--page <page> # Page number
|
|
233
|
+
--page-size <size> # Page size
|
|
228
234
|
-f, --fields <fields> # Comma-separated fields to return
|
|
229
235
|
-r, --relations <relations> # Comma-separated relations to load
|
|
230
236
|
-k, --keyword <keyword> # Keyword to search
|
|
@@ -341,42 +347,290 @@ amaster entity bulk-delete default products --app myapp --ids 1,2,3
|
|
|
341
347
|
```bash
|
|
342
348
|
amaster bpm processes [options] # List process definitions
|
|
343
349
|
--app <app-code> # App code (uses default if not specified)
|
|
350
|
+
--key <key> # Filter by process definition key
|
|
351
|
+
--name <name> # Filter by process definition name
|
|
352
|
+
--latest-version # Only return latest version
|
|
353
|
+
--active # Only return active process definitions
|
|
354
|
+
--suspended # Only return suspended process definitions
|
|
355
|
+
--sort-by <field> # Sort field
|
|
356
|
+
--sort-order <order> # Sort order: asc | desc
|
|
357
|
+
-q, --query <json> # Additional ProcessDefinitionQueryParams as JSON or @file
|
|
358
|
+
|
|
359
|
+
amaster bpm xml <key> [options] # Get BPMN XML for a process definition key
|
|
360
|
+
--app <app-code> # App code (uses default if not specified)
|
|
344
361
|
|
|
345
362
|
amaster bpm start <key> [options] # Start a process instance
|
|
346
363
|
--app <app-code> # App code (uses default if not specified)
|
|
347
|
-
-v, --variables <json> # Process variables as JSON
|
|
364
|
+
-v, --variables <json> # Process variables as JSON or @file
|
|
365
|
+
|
|
366
|
+
amaster bpm instances [options] # List process instances
|
|
367
|
+
--app <app-code> # App code (uses default if not specified)
|
|
368
|
+
--process-definition-key <key> # Filter by process definition key
|
|
369
|
+
--active # Only return active instances
|
|
370
|
+
--first-result <n> # Pagination offset
|
|
371
|
+
--max-results <n> # Maximum number of results
|
|
372
|
+
-q, --query <json> # Additional ProcessInstanceQueryParams as JSON or @file
|
|
373
|
+
|
|
374
|
+
amaster bpm instance <id> [options] # Get a process instance by ID
|
|
375
|
+
--app <app-code> # App code (uses default if not specified)
|
|
376
|
+
|
|
377
|
+
amaster bpm instance-tree <id> [options] # Get activity instance tree
|
|
378
|
+
--app <app-code> # App code (uses default if not specified)
|
|
379
|
+
|
|
380
|
+
amaster bpm active-activities <id> [options] # Get active activities
|
|
381
|
+
--app <app-code> # App code (uses default if not specified)
|
|
382
|
+
|
|
383
|
+
amaster bpm runtime-variables <id> [options] # Get runtime variables
|
|
384
|
+
--app <app-code> # App code (uses default if not specified)
|
|
385
|
+
|
|
386
|
+
amaster bpm variables <id> [options] # Get historic variables
|
|
387
|
+
--app <app-code> # App code (uses default if not specified)
|
|
388
|
+
--name <name> # Filter by variable name
|
|
389
|
+
|
|
390
|
+
amaster bpm delete-instance <id> [options] # Delete a process instance
|
|
391
|
+
--app <app-code> # App code (uses default if not specified)
|
|
392
|
+
--skip-custom-listeners # Skip custom listeners during deletion
|
|
393
|
+
|
|
394
|
+
amaster bpm suspend-instance <id> [options] # Suspend a process instance
|
|
395
|
+
--app <app-code> # App code (uses default if not specified)
|
|
396
|
+
|
|
397
|
+
amaster bpm activate-instance <id> [options] # Activate a process instance
|
|
398
|
+
--app <app-code> # App code (uses default if not specified)
|
|
399
|
+
|
|
400
|
+
amaster bpm modify-instance <id> [options] # Modify a process instance
|
|
401
|
+
--app <app-code> # App code (uses default if not specified)
|
|
402
|
+
-m, --modification <json> # ProcessInstanceModification JSON or @file
|
|
348
403
|
|
|
349
404
|
amaster bpm tasks [options] # List tasks
|
|
350
405
|
--app <app-code> # App code (uses default if not specified)
|
|
351
406
|
-a, --assignee <assignee> # Filter by assignee
|
|
407
|
+
--process-instance-id <id> # Filter by process instance ID
|
|
408
|
+
--candidate-user <user> # Filter by candidate user
|
|
409
|
+
--candidate-group <group> # Filter by candidate group
|
|
410
|
+
--name <name> # Filter by exact task name
|
|
411
|
+
--name-like <name> # Filter by fuzzy task name
|
|
412
|
+
--task-definition-key <key> # Filter by task definition key
|
|
413
|
+
--first-result <n> # Pagination offset
|
|
414
|
+
--max-results <n> # Maximum number of results
|
|
415
|
+
--sort-by <field> # Sort field
|
|
416
|
+
--sort-order <order> # Sort order: asc | desc
|
|
417
|
+
-q, --query <json> # Additional TaskQueryParams as JSON or @file
|
|
418
|
+
|
|
419
|
+
amaster bpm task <id> [options] # Get a task by ID
|
|
420
|
+
--app <app-code> # App code (uses default if not specified)
|
|
421
|
+
|
|
422
|
+
amaster bpm task-count [options] # Get task count
|
|
423
|
+
--app <app-code> # App code (uses default if not specified)
|
|
424
|
+
-a, --assignee <assignee> # Filter by assignee
|
|
425
|
+
--process-instance-id <id> # Filter by process instance ID
|
|
426
|
+
--candidate-user <user> # Filter by candidate user
|
|
427
|
+
--candidate-group <group> # Filter by candidate group
|
|
428
|
+
--name <name> # Filter by exact task name
|
|
429
|
+
--name-like <name> # Filter by fuzzy task name
|
|
430
|
+
--task-definition-key <key> # Filter by task definition key
|
|
431
|
+
--first-result <n> # Pagination offset
|
|
432
|
+
--max-results <n> # Maximum number of results
|
|
433
|
+
--sort-by <field> # Sort field
|
|
434
|
+
--sort-order <order> # Sort order: asc | desc
|
|
435
|
+
-q, --query <json> # Additional TaskQueryParams as JSON or @file
|
|
352
436
|
|
|
353
437
|
amaster bpm complete <id> [options] # Complete a task
|
|
354
438
|
--app <app-code> # App code (uses default if not specified)
|
|
355
|
-
-v, --variables <json> # Task variables as JSON
|
|
439
|
+
-v, --variables <json> # Task variables as JSON or @file
|
|
440
|
+
|
|
441
|
+
amaster bpm delegate <id> [options] # Delegate a task
|
|
442
|
+
--app <app-code> # App code (uses default if not specified)
|
|
443
|
+
--user-id <userId> # Delegate target user ID
|
|
444
|
+
|
|
445
|
+
amaster bpm task-form <id> [options] # Get task form metadata
|
|
446
|
+
amaster bpm task-form-schema <id> [options] # Get task form schema
|
|
447
|
+
--redirect <url> # Optional redirect URL
|
|
448
|
+
amaster bpm task-form-variables <id> [options] # Get task form variables
|
|
449
|
+
amaster bpm task-rendered-form <id> [options] # Get rendered task form HTML
|
|
450
|
+
amaster bpm task-deployed-form <id> [options] # Get deployed task form definition
|
|
451
|
+
--app <app-code> # App code (uses default if not specified)
|
|
452
|
+
|
|
453
|
+
amaster bpm start-form <key> [options] # Get start form info
|
|
454
|
+
amaster bpm start-form-variables <key> [options] # Get start form variables
|
|
455
|
+
amaster bpm start-form-deployed <key> [options] # Get deployed start form
|
|
456
|
+
--app <app-code> # App code (uses default if not specified)
|
|
457
|
+
|
|
458
|
+
amaster bpm history-tasks [options] # List history tasks
|
|
459
|
+
--app <app-code> # App code (uses default if not specified)
|
|
460
|
+
--task-assignee <assignee> # Filter by historical task assignee
|
|
461
|
+
--process-instance-id <id> # Filter by process instance ID
|
|
462
|
+
--finished # Only return finished history tasks
|
|
463
|
+
--unfinished # Only return unfinished history tasks
|
|
464
|
+
--scope <scope> # handled
|
|
465
|
+
--first-result <n> # Pagination offset
|
|
466
|
+
--max-results <n> # Maximum number of results
|
|
467
|
+
--sort-by <field> # Sort field
|
|
468
|
+
--sort-order <order> # Sort order: asc | desc
|
|
469
|
+
-q, --query <json> # Additional HistoryTaskQueryParams as JSON or @file
|
|
470
|
+
|
|
471
|
+
amaster bpm history-task-count [options] # Get history task count
|
|
472
|
+
--app <app-code> # App code (uses default if not specified)
|
|
473
|
+
[same filters as history-tasks]
|
|
474
|
+
|
|
475
|
+
amaster bpm history-instances [options] # List history process instances
|
|
476
|
+
--app <app-code> # App code (uses default if not specified)
|
|
477
|
+
--started-by <userId> # Filter by starter user ID
|
|
478
|
+
--process-definition-key <key> # Filter by process definition key
|
|
479
|
+
--finished # Only return finished history instances
|
|
480
|
+
--unfinished # Only return unfinished history instances
|
|
481
|
+
--scope <scope> # initiated
|
|
482
|
+
--sort-by <field> # Sort field
|
|
483
|
+
--sort-order <order> # Sort order: asc | desc
|
|
484
|
+
--first-result <n> # Pagination offset
|
|
485
|
+
--max-results <n> # Maximum number of results
|
|
486
|
+
-q, --query <json> # Additional HistoryProcessInstanceQueryParams as JSON or @file
|
|
487
|
+
|
|
488
|
+
amaster bpm history-instance-count [options] # Get history process instance count
|
|
489
|
+
--app <app-code> # App code (uses default if not specified)
|
|
490
|
+
[same filters as history-instances]
|
|
491
|
+
|
|
492
|
+
amaster bpm history-instance <id> [options] # Get a history process instance by ID
|
|
493
|
+
--app <app-code> # App code (uses default if not specified)
|
|
494
|
+
|
|
495
|
+
amaster bpm history-activities [options] # List history activity instances
|
|
496
|
+
--app <app-code> # App code (uses default if not specified)
|
|
497
|
+
--process-instance-id <id> # Filter by process instance ID
|
|
498
|
+
--activity-id <activityId> # Filter by BPMN activity ID
|
|
499
|
+
--activity-type <activityType> # Filter by activity type
|
|
500
|
+
--finished # Only return finished activity instances
|
|
501
|
+
--sort-by <field> # Sort field
|
|
502
|
+
--sort-order <order> # Sort order: asc | desc
|
|
503
|
+
-q, --query <json> # Additional HistoryActivityQueryParams as JSON or @file
|
|
504
|
+
|
|
505
|
+
amaster bpm history-variables [options] # List history variable instances
|
|
506
|
+
--app <app-code> # App code (uses default if not specified)
|
|
507
|
+
--process-instance-id <id> # Filter by process instance ID
|
|
508
|
+
--variable-name <name> # Filter by variable name
|
|
509
|
+
--deserialize-values # Deserialize complex variable values
|
|
510
|
+
-q, --query <json> # Additional HistoryVariableQueryParams as JSON or @file
|
|
511
|
+
|
|
512
|
+
amaster bpm user-operations [options] # List user operation logs
|
|
513
|
+
--app <app-code> # App code (uses default if not specified)
|
|
514
|
+
--process-instance-id <id> # Filter by process instance ID
|
|
515
|
+
--task-id <id> # Filter by task ID
|
|
516
|
+
--user-id <userId> # Filter by user ID
|
|
517
|
+
--operation-type <type> # Filter by operation type
|
|
518
|
+
--sort-by <field> # Sort field
|
|
519
|
+
--sort-order <order> # Sort order: asc | desc
|
|
520
|
+
--first-result <n> # Pagination offset
|
|
521
|
+
--max-results <n> # Maximum number of results
|
|
522
|
+
-q, --query <json> # Additional UserOperationLogQueryParams as JSON or @file
|
|
523
|
+
|
|
524
|
+
amaster bpm delete-history-instance <id> [options] # Delete a history process instance
|
|
525
|
+
--app <app-code> # App code (uses default if not specified)
|
|
526
|
+
|
|
527
|
+
amaster bpm roles [options] # List runtime roles
|
|
528
|
+
--app <app-code> # App code (uses default if not specified)
|
|
529
|
+
|
|
530
|
+
amaster bpm user-roles <userId> [options] # List roles assigned to a user
|
|
531
|
+
--app <app-code> # App code (uses default if not specified)
|
|
356
532
|
```
|
|
357
533
|
|
|
358
|
-
|
|
534
|
+
#### BPM Parameter Examples
|
|
359
535
|
|
|
360
536
|
```bash
|
|
361
|
-
|
|
362
|
-
|
|
537
|
+
# Filter process definitions
|
|
538
|
+
amaster bpm processes --app myapp --key order-approval --latest-version
|
|
539
|
+
|
|
540
|
+
# Get BPMN XML
|
|
541
|
+
amaster bpm xml order-approval --app myapp --format pretty
|
|
542
|
+
|
|
543
|
+
# Start a process with inline JSON
|
|
544
|
+
amaster bpm start order-approval --app myapp \
|
|
545
|
+
--variables '{"orderId":"123","amount":199.5}'
|
|
546
|
+
|
|
547
|
+
# Start a process with @file
|
|
548
|
+
amaster bpm start order-approval --app myapp \
|
|
549
|
+
--variables @./process-start.json
|
|
550
|
+
|
|
551
|
+
# List instances
|
|
552
|
+
amaster bpm instances --app myapp --process-definition-key order-approval --active
|
|
553
|
+
|
|
554
|
+
# Inspect a single instance
|
|
555
|
+
amaster bpm instance proc-123 --app myapp
|
|
556
|
+
|
|
557
|
+
# Read active activities
|
|
558
|
+
amaster bpm active-activities proc-123 --app myapp
|
|
559
|
+
|
|
560
|
+
# Read runtime variables
|
|
561
|
+
amaster bpm runtime-variables proc-123 --app myapp
|
|
562
|
+
|
|
563
|
+
# Read historic variables
|
|
564
|
+
amaster bpm variables proc-123 --app myapp --name amount
|
|
565
|
+
|
|
566
|
+
# List tasks with filters
|
|
567
|
+
amaster bpm tasks --app myapp --assignee user-1 --sort-by created --sort-order desc
|
|
568
|
+
|
|
569
|
+
# Count tasks
|
|
570
|
+
amaster bpm task-count --app myapp --candidate-group finance
|
|
571
|
+
|
|
572
|
+
# Complete a task
|
|
573
|
+
amaster bpm complete task-123 --app myapp --variables '{"approved":true}'
|
|
574
|
+
|
|
575
|
+
# Delegate a task
|
|
576
|
+
amaster bpm delegate task-123 --app myapp --user-id user-2
|
|
577
|
+
|
|
578
|
+
# Read task form schema
|
|
579
|
+
amaster bpm task-form-schema task-123 --app myapp
|
|
580
|
+
|
|
581
|
+
# Read start form info
|
|
582
|
+
amaster bpm start-form order-approval --app myapp
|
|
363
583
|
|
|
364
|
-
|
|
584
|
+
# Query history tasks and process instances
|
|
585
|
+
amaster bpm history-tasks --app myapp --task-assignee user-1 --finished
|
|
586
|
+
amaster bpm history-instances --app myapp --process-definition-key order-approval --finished
|
|
587
|
+
|
|
588
|
+
# Query history activities / variables / user operations
|
|
589
|
+
amaster bpm history-activities --app myapp --process-instance-id proc-123
|
|
590
|
+
amaster bpm history-variables --app myapp --process-instance-id proc-123 --variable-name amount
|
|
591
|
+
amaster bpm user-operations --app myapp --process-instance-id proc-123 --sort-by timestamp --sort-order desc
|
|
592
|
+
|
|
593
|
+
# Runtime roles
|
|
594
|
+
amaster bpm roles --app myapp
|
|
595
|
+
amaster bpm user-roles user-2 --app myapp
|
|
596
|
+
|
|
597
|
+
# Suspend / activate / delete instance
|
|
598
|
+
amaster bpm suspend-instance proc-123 --app myapp
|
|
599
|
+
amaster bpm activate-instance proc-123 --app myapp
|
|
600
|
+
amaster bpm delete-instance proc-123 --app myapp --skip-custom-listeners
|
|
601
|
+
|
|
602
|
+
# Delete a historical instance
|
|
603
|
+
amaster bpm delete-history-instance proc-123 --app myapp
|
|
604
|
+
|
|
605
|
+
# Modify an instance from @file
|
|
606
|
+
amaster bpm modify-instance proc-123 --app myapp \
|
|
607
|
+
--modification @./process-modification.json
|
|
608
|
+
```
|
|
609
|
+
|
|
610
|
+
### Workflow
|
|
611
|
+
|
|
612
|
+
```bash
|
|
613
|
+
amaster workflow run <name> [options] # Run a workflow
|
|
365
614
|
--app <app-code> # App code (uses default if not specified)
|
|
366
|
-
-i, --input <json> # Workflow
|
|
615
|
+
-i, --input <json> # Workflow inputs object as JSON or @file
|
|
616
|
+
-r, --request <json> # Full WorkflowRunRequest as JSON or @file
|
|
617
|
+
--response-mode <mode> # blocking | streaming
|
|
618
|
+
--user <user> # Workflow user identifier
|
|
619
|
+
--files <json> # Workflow files array as JSON or @file
|
|
620
|
+
--trace-id <traceId> # Workflow trace ID
|
|
367
621
|
```
|
|
368
622
|
|
|
369
623
|
### S3 Storage
|
|
370
624
|
|
|
371
625
|
```bash
|
|
372
|
-
amaster s3
|
|
626
|
+
amaster s3 upload <file> [options] # Upload a file
|
|
373
627
|
--app <app-code> # App code (uses default if not specified)
|
|
374
|
-
-b, --bucket <bucket> # Bucket name
|
|
375
628
|
|
|
376
|
-
amaster s3
|
|
629
|
+
amaster s3 download <key> <output> [options]
|
|
630
|
+
--app <app-code> # App code (uses default if not specified)
|
|
631
|
+
|
|
632
|
+
amaster s3 metadata <key> [options]
|
|
377
633
|
--app <app-code> # App code (uses default if not specified)
|
|
378
|
-
-b, --bucket <bucket> # Bucket name
|
|
379
|
-
-k, --key <key> # Object key
|
|
380
634
|
```
|
|
381
635
|
|
|
382
636
|
## Configuration
|