@amaster.ai/runtime-cli 1.1.13 → 1.1.14-beta.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.
@@ -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
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.0",
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.0"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@types/inquirer": "^9.0.7",