@amaster.ai/runtime-cli 1.1.13 → 1.1.14-beta.1

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.
@@ -149,6 +149,35 @@ amaster entity bulk-update default users --app myapp --items '[{"id":"123","stat
149
149
  amaster entity bulk-delete default users --app myapp --ids '123,456'
150
150
  ```
151
151
 
152
+ ### Model Discovery
153
+
154
+ ```bash
155
+ amaster model datasources [--app <app-code>]
156
+ amaster model table-schema <source-id> [--app <app-code>] [--tables '<csv-or-json-array-or-@file>']
157
+ ```
158
+
159
+ Command semantics:
160
+
161
+ - `datasources`: discover runtime data sources and the models/tables under each source.
162
+ - `table-schema <source-id>`: fetch `CREATE TABLE` statements for one datasource, optionally narrowed to selected tables.
163
+
164
+ Important details:
165
+
166
+ - These commands use the runtime-facing `/api/entity/source/...` endpoints, not the internal MCP `innerapi` routes.
167
+ - Use `datasources` first to learn the real `sourceId`; do not guess it.
168
+ - `--tables` accepts comma-separated names, a JSON array, or `@file`.
169
+ - `table-schema` returns all table schemas in the datasource when `--tables` is omitted.
170
+ - This is the current supported way for an agent using `amaster` to discover available tables before running `entity` queries.
171
+ - Real validated example: `https://bleulig7o.helige.cn/api/entity/source/list_with_models` returns datasource `source-ae0rbo4tg9a8`, and `table-schema` succeeds for tables such as `products`, `categories`, and `stock_out_applications`.
172
+
173
+ Minimal examples:
174
+
175
+ ```bash
176
+ amaster model datasources --app bleulig7o
177
+ amaster model table-schema source-ae0rbo4tg9a8 --app bleulig7o
178
+ amaster model table-schema source-ae0rbo4tg9a8 --app bleulig7o --tables products,categories
179
+ ```
180
+
152
181
  ### BPM
153
182
 
154
183
  ```bash
@@ -258,17 +287,24 @@ amaster bpm user-roles user_2 --app myapp
258
287
  ### Workflow
259
288
 
260
289
  ```bash
290
+ amaster workflow list [--app <app-code>] [--page <n>] [--limit <n>] [--mode <mode>]
291
+ amaster workflow get <id> [--app <app-code>]
261
292
  amaster workflow run <name> [--app <app-code>] [--input '<json-or-@file>'] [--request '<json-or-@file>'] [--response-mode <mode>] [--user <user>] [--files '<json-or-@file>'] [--trace-id <traceId>]
262
293
  ```
263
294
 
264
295
  Command semantics:
265
296
 
297
+ - `list`: discover workflow apps exposed by the current runtime app.
298
+ - `get <id>`: fetch one workflow DSL and derive its start-node input variables.
266
299
  - `run <name>`: call `workflow-client.run` and print the workflow run result.
267
300
 
268
301
  Important details:
269
302
 
270
- - `name` must be the workflow YAML filename without extension and without subpaths.
271
- - Workflow names are app-specific. The current SDK and CLI do not provide a `workflow list` command, so agents must obtain the workflow name from app docs, UI, or the operator.
303
+ - `list` defaults to `mode=workflow`, because `workflow run` only applies to runnable workflow apps.
304
+ - `list` returns two different identifiers: use `id` with `amaster workflow get <id>`, and use `runnable_name` with `amaster workflow run <runnable_name>`.
305
+ - `get <id>` expects the workflow app ID from `workflow list`, not the runnable name.
306
+ - `get <id>` returns `name`, and that `name` is the runnable workflow name for `workflow run`.
307
+ - `name` in `workflow run` must be the runnable workflow name without subpaths.
272
308
  - `--input` must be a JSON object and maps to `WorkflowRunRequest.inputs`.
273
309
  - `--request` accepts the full `WorkflowRunRequest` object.
274
310
  - Explicit flags such as `--input`, `--response-mode`, `--user`, `--files`, and `--trace-id` override the same keys inside `--request`.
@@ -281,6 +317,8 @@ Important details:
281
317
  Minimal examples:
282
318
 
283
319
  ```bash
320
+ amaster workflow list --app myapp --format pretty
321
+ amaster workflow get bdcb98cf-613b-4ad7-bd41-d9a7f8aec199 --app rcz7v42lr --format pretty
284
322
  amaster workflow run data-processor --app myapp --input '{"documentId":"abc"}'
285
323
  amaster workflow run data-processor --app myapp --request '{"inputs":{"documentId":"abc"},"user":"user-1"}'
286
324
  amaster workflow run text-sentiment-analysis --app rcz7v42lr --input '{"input_text":"I love this product. It is fast and easy to use."}'
@@ -318,7 +356,6 @@ amaster s3 metadata uploads/report.pdf --app myapp
318
356
  ## Scope Limits
319
357
 
320
358
  - Only use commands documented in this skill. Do not invent additional subcommands from intuition, stale README text, or helper functions that are not wired into the public CLI.
321
- - Workflow discovery is not available in the current CLI or SDK surface. There is no `amaster workflow list`, so workflow names must come from app docs, UI, or the operator.
322
359
  - Local app config is stored in `~/.amaster/config.json`.
323
360
 
324
361
  ## Runtime State And File Locations
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@amaster.ai/runtime-cli",
3
- "version": "1.1.13",
3
+ "version": "1.1.14-beta.1",
4
4
  "description": "CLI for Amaster SDK - Multi-app support for OpenClaw",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
@@ -39,7 +39,7 @@
39
39
  "ora": "^8.0.1",
40
40
  "yaml": "^2.3.4",
41
41
  "inquirer": "^9.2.12",
42
- "@amaster.ai/client": "1.1.13"
42
+ "@amaster.ai/client": "1.1.14-beta.1"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/inquirer": "^9.0.7",