@thinkingai/ae-cli 6.1.12 → 6.1.13

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 (137) hide show
  1. package/README.md +0 -2
  2. package/README.zh.md +0 -2
  3. package/dist/{auth-NN55553T.js → auth-GBMV6TEJ.js} +2 -2
  4. package/dist/{auth-GDV3H5I4.js → auth-NDSXE54J.js} +4 -4
  5. package/dist/{capability-DRLGDVS4.js → capability-TAMDRZYV.js} +18 -8
  6. package/dist/{capability-P6GK3AQH.js → capability-U7TDEEEG.js} +18 -8
  7. package/dist/{chunk-GJJA4CQZ.js → chunk-3FY3RJ26.js} +0 -4
  8. package/dist/{chunk-GS2P7LFD.js → chunk-5XUSIK27.js} +2 -2
  9. package/dist/{chunk-7KQWSBSL.js → chunk-753BUTNZ.js} +3 -3
  10. package/dist/{chunk-VTXHDCBW.js → chunk-AFXA7BRK.js} +2 -2
  11. package/dist/chunk-IBH3LDAH.js +556 -0
  12. package/dist/{chunk-RBNKI5ZW.js → chunk-JUW4AJXN.js} +2 -2
  13. package/dist/{chunk-TS6BUGUY.js → chunk-QATA32VR.js} +3 -3
  14. package/dist/{chunk-Z3OXWCIA.js → chunk-S5NTSDBS.js} +2 -2
  15. package/dist/chunk-UIHQJK5E.js +556 -0
  16. package/dist/{chunk-VKD5WQKN.js → chunk-VLWOLBGZ.js} +142 -24
  17. package/dist/{chunk-YTG6Q75E.js → chunk-WZRX4KOH.js} +25 -3
  18. package/dist/{chunk-YV52FB5G.js → chunk-ZQKDZXDO.js} +1 -1
  19. package/dist/{cli-token-GL5MS5FK.js → cli-token-4UPER74P.js} +3 -3
  20. package/dist/{chunk-6A2FUCIS.js → client-L2YDMHQ6.js} +5 -6
  21. package/dist/{config-4VZNLBKF.js → config-OL2LWGBV.js} +4 -33
  22. package/dist/index.js +25 -38
  23. package/dist/{memory-RWJW4XFO.js → memory-MUP7PPL7.js} +4 -4
  24. package/dist/{memory-VO2ZJCRT.js → memory-U4O5PMXH.js} +4 -4
  25. package/dist/{metadata-YGTHR2XJ.js → metadata-UORZTW3T.js} +21 -11
  26. package/dist/{metadata-ZRN2GHPN.js → metadata-VVQ3AQT5.js} +21 -11
  27. package/dist/{model-CLUIK3K5.js → model-JTUEO5M4.js} +2 -2
  28. package/dist/{sync-3REDHGY6.js → sync-MOSFNBVR.js} +5 -5
  29. package/dist/{te-agent-XNPELAKX.js → te-agent-IFKZDHZI.js} +25 -18
  30. package/dist/{te-analysis-GJI5FZUL.js → te-analysis-KOKHJJPE.js} +1225 -450
  31. package/dist/{te-analysis-N2BRDJZ5.js → te-analysis-LLOCCBJ4.js} +1225 -450
  32. package/dist/{te-community-SQXKE5OO.js → te-community-HNKVTERD.js} +207 -12
  33. package/dist/{te-community-TYSNU3NQ.js → te-community-IWE5B7W6.js} +208 -12
  34. package/dist/{te-dataops-OWIADNSM.js → te-dataops-KQPYNAE3.js} +262 -145
  35. package/dist/{te-dataops-5TM7WZDI.js → te-dataops-KXCEB4CS.js} +262 -145
  36. package/dist/{te-engage-L72HWRGO.js → te-engage-BRLSRVQT.js} +565 -16
  37. package/dist/{te-engage-QWM4GFS7.js → te-engage-HE4OPZIT.js} +565 -16
  38. package/dist/{te-experiment-2T2HEZML.js → te-experiment-K5US7RMG.js} +6 -6
  39. package/dist/{te-experiment-PVEY7AEZ.js → te-experiment-WA7TFMEL.js} +6 -6
  40. package/dist/{te-kb-VRMEY3D4.js → te-kb-OIH3T6CS.js} +4 -4
  41. package/dist/{te-system-XGS5EQIQ.js → te-system-AZ3URMUO.js} +515 -11
  42. package/dist/{te-team-BZRDV2CM.js → te-team-GZPU6UWA.js} +5 -5
  43. package/dist/{update-HEDXGOJH.js → update-TOBFXF2V.js} +4 -4
  44. package/package.json +5 -5
  45. package/skills/ae-agent/SKILL.md +3 -3
  46. package/skills/ae-agent/references/list-skill-references.md +4 -4
  47. package/skills/ae-agent/references/read-skill-reference.md +10 -7
  48. package/skills/ae-agent/references/upload-skill-reference.md +11 -9
  49. package/skills/ae-analysis/SKILL.md +15 -12
  50. package/skills/ae-analysis/metadata_resolution.md +150 -0
  51. package/skills/ae-analysis/references/adhoc_export.md +17 -2
  52. package/skills/ae-analysis/references/adhoc_run.md +12 -8
  53. package/skills/ae-analysis/references/ai_models.md +31 -5
  54. package/skills/ae-analysis/references/analysis_data_retrieval.md +104 -16
  55. package/skills/ae-analysis/references/analysis_drilldown_contract.md +4 -4
  56. package/skills/ae-analysis/references/analysis_gateway_assets.md +12 -10
  57. package/skills/ae-analysis/references/artifact_download.md +4 -3
  58. package/skills/ae-analysis/references/asset_abnormal_list.md +5 -3
  59. package/skills/ae-analysis/references/asset_authentication_list.md +5 -3
  60. package/skills/ae-analysis/references/asset_search.md +5 -3
  61. package/skills/ae-analysis/references/bi_panel_page_data_export.md +1 -1
  62. package/skills/ae-analysis/references/bi_panel_page_data_run.md +4 -4
  63. package/skills/ae-analysis/references/catalog_export.md +28 -0
  64. package/skills/ae-analysis/references/catalog_list.md +44 -0
  65. package/skills/ae-analysis/references/command_index.md +72 -63
  66. package/skills/ae-analysis/references/dashboard_report_data_run.md +11 -4
  67. package/skills/ae-analysis/references/datatable_version_list.md +5 -3
  68. package/skills/ae-analysis/references/drilldown_entities_run.md +4 -4
  69. package/skills/ae-analysis/references/drilldown_events_run.md +2 -2
  70. package/skills/ae-analysis/references/drilldown_user_events_export.md +1 -1
  71. package/skills/ae-analysis/references/drilldown_user_events_run.md +2 -2
  72. package/skills/ae-analysis/references/entity_detail_run.md +4 -4
  73. package/skills/ae-analysis/references/entity_id_import_options.md +1 -1
  74. package/skills/ae-analysis/references/event_detail_run.md +4 -4
  75. package/skills/ae-analysis/references/event_export.md +21 -0
  76. package/skills/ae-analysis/references/event_list.md +7 -6
  77. package/skills/ae-analysis/references/exchange_rule_list.md +5 -3
  78. package/skills/ae-analysis/references/history_tag_data_drilldown_export.md +4 -2
  79. package/skills/ae-analysis/references/history_tag_data_drilldown_run.md +2 -2
  80. package/skills/ae-analysis/references/history_tag_data_run.md +2 -2
  81. package/skills/ae-analysis/references/metric_export.md +21 -0
  82. package/skills/ae-analysis/references/metric_list.md +8 -7
  83. package/skills/ae-analysis/references/property_export.md +21 -0
  84. package/skills/ae-analysis/references/property_list.md +9 -8
  85. package/skills/ae-analysis/references/query_context_get.md +20 -0
  86. package/skills/ae-analysis/references/query_create_result_cluster.md +1 -1
  87. package/skills/ae-analysis/references/report_change_log_list.md +1 -1
  88. package/skills/ae-analysis/references/report_create.md +3 -3
  89. package/skills/ae-analysis/references/report_data_run.md +8 -8
  90. package/skills/ae-analysis/references/report_update.md +3 -3
  91. package/skills/ae-analysis/references/report_version_rollback.md +1 -1
  92. package/skills/ae-analysis/references/rule_list.md +6 -4
  93. package/skills/ae-analysis/references/run_inspect.md +8 -5
  94. package/skills/ae-analysis/references/run_wait.md +37 -0
  95. package/skills/ae-analysis/references/user_cluster_export.md +13 -0
  96. package/skills/ae-analysis/references/user_cluster_list.md +6 -2
  97. package/skills/ae-analysis/references/user_cluster_member_export.md +5 -3
  98. package/skills/ae-analysis/references/user_cluster_member_list.md +4 -4
  99. package/skills/ae-analysis/references/user_tag_export.md +13 -0
  100. package/skills/ae-analysis/references/user_tag_list.md +6 -2
  101. package/skills/ae-analysis/references/user_tag_member_export.md +5 -3
  102. package/skills/ae-analysis/references/user_tag_member_list.md +4 -4
  103. package/skills/ae-analysis/references/virtual_property_create.md +2 -2
  104. package/skills/ae-community/SKILL.md +2 -2
  105. package/skills/ae-dataops/SKILL.md +4 -3
  106. package/skills/ae-dataops/references/dataops-flow-create.md +47 -3
  107. package/skills/ae-engage/SKILL.md +46 -6
  108. package/skills/ae-engage/references/build-task-save-guide.md +12 -0
  109. package/skills/ae-engage/references/cancel-query-run.md +31 -0
  110. package/skills/ae-engage/references/config-item-analysis-report.md +14 -1
  111. package/skills/ae-engage/references/config-item-strategy-comparison.md +11 -1
  112. package/skills/ae-engage/references/config-item-trigger-report.md +15 -1
  113. package/skills/ae-engage/references/flow-metric-detail-report.md +134 -0
  114. package/skills/ae-engage/references/flow-metric-update.md +77 -0
  115. package/skills/ae-engage/references/flow-metric-user.md +118 -0
  116. package/skills/ae-engage/references/flow-node-metric-user.md +122 -0
  117. package/skills/ae-engage/references/flow-node-user.md +122 -0
  118. package/skills/ae-engage/references/push-record-query.md +32 -1
  119. package/skills/ae-engage/references/save-task.md +9 -0
  120. package/skills/ae-engage/references/task-data-detail.md +9 -2
  121. package/skills/ae-engage/references/task-metric-detail.md +9 -2
  122. package/skills/ae-engage/references/task-submit-approval.md +3 -0
  123. package/skills/ae-experiment/references/save_experiment.md +4 -0
  124. package/skills/ae-experiment-design/SKILL.md +1 -1
  125. package/skills/ae-experiment-design/references/platform-operations.md +1 -1
  126. package/skills/ae-experiment-insight/references/platform-operations.md +1 -1
  127. package/skills/ae-metadata/SKILL.md +2 -1
  128. package/skills/ae-metadata/references/metadata_data_table_download.md +10 -2
  129. package/skills/ae-metadata/references/metadata_data_table_list.md +5 -2
  130. package/skills/ae-system/SKILL.md +66 -3
  131. package/dist/chunk-DT6Y3TD7.js +0 -232
  132. package/dist/chunk-MVDZ7DBQ.js +0 -231
  133. package/dist/chunk-NBPKWKRA.js +0 -51
  134. package/dist/client-DAIPF7XN.js +0 -23
  135. package/dist/raw-52B4UKO4.js +0 -71
  136. package/dist/te-meta-53BVXPFI.js +0 -95
  137. package/dist/te-meta-TOCBPBXI.js +0 -95
@@ -1,14 +1,14 @@
1
1
  import {
2
2
  getAuthHeaders,
3
3
  kbApi
4
- } from "./chunk-VTXHDCBW.js";
4
+ } from "./chunk-AFXA7BRK.js";
5
5
  import {
6
6
  printError,
7
7
  printOutput
8
- } from "./chunk-YTG6Q75E.js";
9
- import "./chunk-Z3OXWCIA.js";
10
- import "./chunk-YV52FB5G.js";
11
- import "./chunk-GJJA4CQZ.js";
8
+ } from "./chunk-WZRX4KOH.js";
9
+ import "./chunk-S5NTSDBS.js";
10
+ import "./chunk-ZQKDZXDO.js";
11
+ import "./chunk-3FY3RJ26.js";
12
12
  import "./chunk-AXDXJTPC.js";
13
13
  import "./chunk-JHENBQ5B.js";
14
14
 
@@ -7,17 +7,17 @@ import {
7
7
  printError,
8
8
  printOutput,
9
9
  recordVersionSyncResult
10
- } from "./chunk-YTG6Q75E.js";
10
+ } from "./chunk-WZRX4KOH.js";
11
11
  import {
12
12
  peekCliToken
13
- } from "./chunk-Z3OXWCIA.js";
13
+ } from "./chunk-S5NTSDBS.js";
14
14
  import {
15
15
  missingAeHostHint
16
- } from "./chunk-YV52FB5G.js";
16
+ } from "./chunk-ZQKDZXDO.js";
17
17
  import {
18
18
  getActiveHost,
19
19
  normalizeUrl
20
- } from "./chunk-GJJA4CQZ.js";
20
+ } from "./chunk-3FY3RJ26.js";
21
21
  import "./chunk-JHENBQ5B.js";
22
22
 
23
23
  // src/commands/update.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkingai/ae-cli",
3
- "version": "6.1.12",
3
+ "version": "6.1.13",
4
4
  "description": "CLI tool for ThinkingAI (AE) analytics platform",
5
5
  "type": "module",
6
6
  "bin": {
@@ -30,21 +30,21 @@
30
30
  "verify:analysis-system": "tsx tests/analysis-system-capability-command.test.ts",
31
31
  "verify:output-contract": "tsx tests/output-contract.test.ts",
32
32
  "verify:analysis-cluster-routing": "node scripts/verify-analysis-cluster-routing.mjs",
33
- "verify:multi-cluster-mode": "node test/multi-cluster-mode.test.mjs",
34
33
  "verify:metadata-capability": "npx tsx test/metadata-capability-commands.test.mjs",
35
34
  "verify:community-capability": "node test/community-capability-routing.test.mjs",
36
35
  "verify:community-report": "npx tsx tests/community-report-standard-v5.test.ts && npx tsx tests/community-report-client.test.ts && npx tsx tests/community-report-framework.test.ts && npx tsx tests/community-data-report-command.test.ts && node test/community-data-report-skill.test.mjs",
37
36
  "verify:engage-capability": "tsx test/engage/engage-capability-command.test.mjs && tsx test/engage/semantic-qp-validation.test.mjs && node test/engage/engage-skill-capability.test.mjs",
38
37
  "verify:retired-analysis-commands": "node --test test/retired-analysis-commands.test.mjs",
39
- "verify:analysis-meta-tools": "node scripts/verify-te-meta-tools.mjs",
38
+ "verify:retired-api-command": "node --test test/retired-api-command.test.mjs",
40
39
  "verify:analysis-common-tools": "node scripts/verify-te-common-tools.mjs",
41
40
  "verify:experiment-tools": "node scripts/verify-te-experiment-tools.mjs && node --import tsx test/experiment/experiment-capability-command.test.mjs",
42
41
  "verify:team-tools": "node scripts/verify-te-team-tools.mjs",
43
42
  "verify:agent-tools": "node scripts/verify-agent-tools.mjs && npm run verify:sandbox-tools",
44
43
  "verify:memory": "tsx tests/memory-command.test.ts && tsx tests/memory-cli-client.test.ts && tsx tests/memory-skill.test.ts",
45
- "verify:system-tools": "node scripts/verify-system-tools.mjs && npx tsx tests/system-domain.test.ts && npx tsx tests/sandbox-tool-package.test.ts",
44
+ "verify:system-tools": "node scripts/verify-system-tools.mjs && npx tsx tests/system-domain.test.ts && npx tsx tests/te-agent-download.test.ts && npx tsx tests/sandbox-tool-package.test.ts",
46
45
  "verify:sandbox-tools": "tsx test/sandbox-tools.test.ts",
47
46
  "verify:skill-version-management": "tsx tests/skill-version-management.test.ts",
47
+ "verify:skill-reference-files": "tsx tests/skill-reference-files.test.ts",
48
48
  "verify:tracking-tools": "tsx test/tracking-client.test.mjs && tsx test/tracking-skill-flow.test.mjs && node test/tracking-commands.test.mjs && tsx tests/tracking-display-name-sync.test.ts",
49
49
  "verify:self-check-overlay": "node test/self-check-overlay.test.mjs",
50
50
  "verify:update-check": "npx tsx test/update-check.test.mjs",
@@ -57,7 +57,7 @@
57
57
  "check:agents-docs": "node scripts/check-agents-docs-sync.mjs",
58
58
  "prepublishOnly": "npm run check:release && npm run build",
59
59
  "start": "node dist/index.js",
60
- "test": "npx tsx src/index.ts --help && npm run verify:sandbox-tools"
60
+ "test": "npx tsx src/index.ts --help && npm run verify:retired-api-command && npm run verify:sandbox-tools"
61
61
  },
62
62
  "repository": {
63
63
  "type": "git",
@@ -133,9 +133,9 @@ If the user's intent is data analysis, audience management, metadata governance,
133
133
  - `+upload-skill-asset` ([doc](references/upload-skill-asset.md)) — upload an asset file (`isDangerousFile` checked; 1MB)
134
134
  - `+read-skill-asset` ([doc](references/read-skill-asset.md)) — read an asset file (binary-safe with `--output`)
135
135
  - `+del-skill-asset` ([doc](references/del-skill-asset.md)) — delete an asset file
136
- - `+list-skill-references` ([doc](references/list-skill-references.md)) — list reference files (`.md` only)
137
- - `+upload-skill-reference` ([doc](references/upload-skill-reference.md)) — upload a reference file (`.md` only; 1MB)
138
- - `+read-skill-reference` ([doc](references/read-skill-reference.md)) — read a reference file
136
+ - `+list-skill-references` ([doc](references/list-skill-references.md)) — list all reference files
137
+ - `+upload-skill-reference` ([doc](references/upload-skill-reference.md)) — upload a non-dangerous reference file (1MB)
138
+ - `+read-skill-reference` ([doc](references/read-skill-reference.md)) — read text directly or save binary content with `--output`
139
139
  - `+del-skill-reference` ([doc](references/del-skill-reference.md)) — delete a reference file
140
140
  - `+list-skill-scripts` ([doc](references/list-skill-scripts.md)) — list script files of a Skill
141
141
  - `+upload-skill-script` ([doc](references/upload-skill-script.md)) — upload a script file (`isDangerousFile` checked; 1MB)
@@ -5,10 +5,10 @@
5
5
  Domain: **Skills / read**
6
6
 
7
7
  ## Use Cases
8
- - List all `.md` files in a Skill's `references` directory.
8
+ - List all files in a Skill's `references` directory.
9
9
  - Endpoint: `GET /api/sandbox/agent/skills/[id]/references`.
10
- - Returns `{ items: [...] }` with file metadata (name, size, etc.).
11
- - Only `.md` files are listed (references directory is markdown-only).
10
+ - Returns `{ items: [{ name, path }] }`.
11
+ - Text and non-text files are both listed.
12
12
 
13
13
  ## Mandatory Rules (MUST)
14
14
  - `--id` is required. Obtain the real Skill record ID (CUID) via `+list-skills` — do not guess.
@@ -27,7 +27,7 @@ ae-cli agent +list-skill-references --dry-run --id <skill-cuid>
27
27
  ## Decision Rules
28
28
  - Use `+list-skills` to confirm the Skill ID before listing references.
29
29
  - Read operation: no confirmation prompt needed.
30
- - References are `.md` files that provide additional context for the Skill.
30
+ - References may be text files such as Markdown/CSV or non-text files such as spreadsheets and PDFs.
31
31
 
32
32
  ## Next Steps on Failure
33
33
  - `404` / not found: re-run `+list-skills` to verify the Skill ID and scope.
@@ -5,10 +5,10 @@
5
5
  Domain: **Skills / read**
6
6
 
7
7
  ## Use Cases
8
- - Read a Skill reference `.md` file's raw content (binary-safe).
8
+ - Read or download a Skill reference file.
9
9
  - Endpoint: `GET /api/sandbox/agent/skills/[id]/references/[...path]`.
10
- - By default returns `{ content, fileName }` where content is UTF-8 text.
11
- - Use `--output <path>` to save the raw content to a local file.
10
+ - Text responses return `{ content, fileName }` by default.
11
+ - Non-text responses require `--output <path>` to preserve the original bytes.
12
12
 
13
13
  ## Mandatory Rules (MUST)
14
14
  - `--id` is required. Obtain the real Skill record ID (CUID) via `+list-skills` — do not guess.
@@ -22,6 +22,9 @@ ae-cli agent +read-skill-reference --id <skill-cuid> --path guide.md
22
22
  # Save reference to local file
23
23
  ae-cli agent +read-skill-reference --id <skill-cuid> --path guide.md --output ./guide.md
24
24
 
25
+ # Download a non-text reference (required for spreadsheets, PDFs, and other binary files)
26
+ ae-cli agent +read-skill-reference --id <skill-cuid> --path metrics.xlsx --output ./metrics.xlsx
27
+
25
28
  # Read from a sub-directory
26
29
  ae-cli agent +read-skill-reference --id <skill-cuid> --path "advanced/tips.md"
27
30
 
@@ -34,17 +37,17 @@ ae-cli agent +read-skill-reference --dry-run --id <skill-cuid> --path guide.md
34
37
  |---|---|---|
35
38
  | `--id` | Yes | Skill record ID (CUID) |
36
39
  | `--path` | Yes | Relative file path within references (e.g. `"guide.md"` or `"advanced/tips.md"`) |
37
- | `--output` | No | Write content to a local file |
40
+ | `--output` | No | Write the original bytes to a local file; required for non-text files |
38
41
 
39
42
  ## Decision Rules
40
43
  - Use `+list-skill-references` to discover available file paths before reading.
41
- - References are `.md` files — the default JSON output `{ content }` is usually sufficient.
42
- - Use `--output` to save the content to a local file for editing or backup.
44
+ - Use the default JSON output only for text references.
45
+ - Always use `--output` for spreadsheets, PDFs, archives, images, and other non-text files.
43
46
  - Read operation: no confirmation prompt needed.
44
47
 
45
48
  ## Next Steps on Failure
46
49
  - `404` / not found: re-run `+list-skill-references` to verify the file path.
47
- - `文件不存在`: the file path does not exist in the references directory.
50
+ - `output_required`: re-run with `--output <path>` to preserve binary content.
48
51
 
49
52
  ## Recommended Chaining
50
53
  - `+list-skill-references` → confirm `path` → `+read-skill-reference` → `+del-skill-reference` (if cleanup needed)
@@ -5,15 +5,14 @@
5
5
  Domain: **Skills / write**
6
6
 
7
7
  ## Use Cases
8
- - Upload a single `.md` file to a Skill's `references` directory (multipart upload).
8
+ - Upload a single file to a Skill's `references` directory (multipart upload).
9
9
  - Endpoint: `POST /api/sandbox/agent/skills/[id]/references` (multipart/form-data).
10
10
  - Max file size: 1MB per file.
11
- - **Only `.md` files are allowed** other extensions are rejected.
11
+ - Markdown, text, CSV, spreadsheet, PDF, and other non-dangerous file types are supported.
12
12
 
13
13
  ## Mandatory Rules (MUST)
14
14
  - `--id` is required. Obtain the real Skill record ID (CUID) via `+list-skills` — do not guess.
15
- - `--file` is required, must be an existing local `.md` file.
16
- - Non-`.md` files are rejected — use `+upload-skill-asset` for other file types.
15
+ - `--file` is required and must be an existing local file.
17
16
  - Max 1MB per file; server enforces `isDangerousFile` checks.
18
17
  - This is an ordinary `write` operation and does not require CLI confirmation.
19
18
 
@@ -25,6 +24,9 @@ ae-cli agent +upload-skill-reference --id <skill-cuid> --file ./guide.md
25
24
  # Upload to a sub-directory
26
25
  ae-cli agent +upload-skill-reference --id <skill-cuid> --file ./advanced.md --sub-path "advanced/"
27
26
 
27
+ # Upload a spreadsheet reference
28
+ ae-cli agent +upload-skill-reference --id <skill-cuid> --file ./metrics.xlsx
29
+
28
30
  # Dry-run to inspect the request before executing
29
31
  ae-cli agent +upload-skill-reference --dry-run --id <skill-cuid> --file ./guide.md
30
32
  ```
@@ -33,19 +35,19 @@ ae-cli agent +upload-skill-reference --dry-run --id <skill-cuid> --file ./guide.
33
35
  | Parameter | Required | Description |
34
36
  |---|---|---|
35
37
  | `--id` | Yes | Skill record ID (CUID) |
36
- | `--file` | Yes | Local `.md` file path to upload (max 1MB) |
38
+ | `--file` | Yes | Local file path to upload (max 1MB) |
37
39
  | `--sub-path` | No | Sub-directory under references (e.g. `"advanced/"`) |
38
40
 
39
41
  ## Decision Rules
40
- - Verify the file exists locally and has a `.md` extension before uploading.
41
- - For non-markdown files, use `+upload-skill-asset` instead.
42
+ - Verify the file exists locally and does not exceed 1MB before uploading.
43
+ - Keep supporting material in `references`; use `assets` for files consumed as presentation or runtime assets.
42
44
  - Use `--sub-path` to organize references into sub-directories.
43
45
  - Use `--dry-run` first to verify the request shape before executing.
44
46
 
45
47
  ## Next Steps on Failure
46
48
  - `File not found`: verify the local file path.
47
- - `--file must be a .md file for references`: use `+upload-skill-asset` for non-markdown files.
48
- - `文件过大(上限 1MB)`: the file exceeds the 1MB limit split the markdown.
49
+ - File-too-large API error: the file exceeds the 1MB limit reduce or split the file.
50
+ - Dangerous-file API error: the file type is blocked by the server safety policy.
49
51
 
50
52
  ## Recommended Chaining
51
53
  - `+list-skills` → `+list-skill-references` → `+upload-skill-reference` → `+list-skill-references` (verify)
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ae-analysis
3
- version: 4.0.4
3
+ version: 4.2.0
4
4
  description: "Use ae-cli for AE/TE analysis-side data questions, asset operations, and asset governance: reports, analysis boards, BI dashboards, ad-hoc models, drilldown, detail data, alerts, clusters, tags, metrics, metadata, project configuration, tracking plans, governance asset lists/rules/lineage/impact/dependency, batch asset operations, projects, and resource links. Use when the user asks to query data, explain a change, export evidence, or inspect/create/update/govern analysis assets."
5
5
  ---
6
6
 
@@ -18,6 +18,7 @@ This is the single entry skill for analysis intent and command execution.
18
18
  3. For an AI-facing ad-hoc definition, also read [`references/ai_models.md`](references/ai_models.md).
19
19
  4. For cluster/tag `--definition-request`, also read the matching [`references/user_cluster_models.md`](references/user_cluster_models.md) or [`references/user_tag_models.md`](references/user_tag_models.md). Shared primitives live in [`references/audience_models.md`](references/audience_models.md).
20
20
  5. For analysis data retrieval, choose `run` or `export` using [`references/analysis_data_retrieval.md`](references/analysis_data_retrieval.md).
21
+ 6. When an AI-QP compile failure contains `slot_kind`, `allowed_resource_types`, `search_targets`, and `next_action`, read and follow [`metadata_resolution.md`](metadata_resolution.md).
21
22
 
22
23
  The generated command index is exhaustive. This file contains routing and workflow rules only; do not duplicate a hand-maintained command inventory here.
23
24
 
@@ -29,11 +30,10 @@ Use this skill for these CLI services:
29
30
  - `analysis-meta`: gateway metadata assets, events, properties, virtual metadata, metrics, data tables, exchange rules, and super metadata.
30
31
  - `analysis-governance`: gateway asset governance operations, including governed asset lists/exports, lineage, dependency, impact, query history, rule schema/list/create/update/delete, batch asset actions, and operation records. Use this service for asset governance workflows, not for metadata event/property/metric CRUD.
31
32
  - `tracking`: gateway tracking plan, checking, ingest, live-data, and event blacklist operations.
32
- - `analysis_meta`: legacy MCP metadata commands. Prefer `analysis-meta` gateway commands whenever the generated index contains the needed operation.
33
33
 
34
34
  For metadata gateway detail outside the commands in the generated index, use the metadata skill. For Engage, DataOps, or Community work, use the corresponding skill.
35
35
 
36
- Use `ae-cli` first. Fall back to te-mcp only for command-not-found, not-supported/not-implemented, a confirmed capability gap, or repeated failures that are not caused by parameters, types, time formats, permissions, timeout choice, or payload construction. State the fallback reason. A validation error or `need_clarification` is a reason to correct the input, not to switch tools.
36
+ Use `ae-cli` as the only execution path for this skill. If a command is missing, unsupported, not implemented, or a capability gap is confirmed, report the gap and stop or provide framework-level guidance; do not switch to direct MCP execution. Repeated failures are not evidence of a capability gap until parameters, types, time formats, permissions, timeout choice, and payload construction have been checked. A validation error or `need_clarification` is a reason to correct the input, not to switch tools.
37
37
 
38
38
  For tags and audience clusters, use the native `analysis user-tag ...` and `analysis user-cluster ...` gateway commands.
39
39
 
@@ -42,8 +42,6 @@ For tags and audience clusters, use the native `analysis user-tag ...` and `anal
42
42
  Command forms:
43
43
 
44
44
  ```bash
45
- ae-cli analysis +<command> [options]
46
- ae-cli analysis_meta +<command> [options]
47
45
  ae-cli analysis <resource> <action> [options]
48
46
  ae-cli analysis-meta <resource> <action> [options]
49
47
  ae-cli analysis-governance <resource> <action> [options]
@@ -51,7 +49,6 @@ ae-cli tracking <resource> <action> [options]
51
49
  ae-cli capability search|inspect|validate|dry-run|run [options]
52
50
  ```
53
51
 
54
- - Legacy `+` commands use underscore flags such as `--project_id`.
55
52
  - Gateway commands use kebab-case flags such as `--project-id`; the CLI sends snake_case JSON.
56
53
  - JSON values must be JSON string literals.
57
54
  - Global flags include `--host`, `--format json|table`, `--jq`, `--validate`, `--dry-run`, and `--yes`. Use `--validate` alone to normalize complex capability input; use `--dry-run` alone for execution or risk preview.
@@ -100,9 +97,13 @@ Before a project-scoped command:
100
97
 
101
98
  ### C. FUZZY_SEARCH_FALLBACK
102
99
 
103
- For saved-asset operations on reports, dashboards, metrics, clusters, tags, and alerts, use the relevant list/search command first unless an exact ID or canonical asset name was already verified. Search the user's phrase, broaden it up to two times, then list all candidates. If no resource exists, stop instead of fabricating one.
100
+ For saved-asset operations on reports, dashboards, metrics, clusters, tags, and alerts, use the relevant list/search command first unless an exact ID or canonical asset name was already verified. For event, property, metric, cluster, and tag catalogs, put the user's phrase and its useful synonyms in one `--queries` JSON array; matching is OR across at most 20 keywords. For ordinary asset discovery, broaden the keyword batch up to two times, then list all candidates. If no resource exists, stop instead of fabricating one.
104
101
 
105
- Do not pre-list events or properties before constructing an AI-facing intent model. Pass the user's wording directly in `definition`; the backend resolves it and returns `resolved` evidence. Call event/property metadata commands only when the user explicitly asks to inspect metadata, the compiler returns `need_clarification` with candidates, or the compiler reports an explicit metadata-resolution capability gap.
102
+ Only when explicitly complete event, property, metric, cluster, or tag metadata is needed, use that resource's `export --output <temporary_path>/<resource>` command. Event/property/metric exports use `.json`; cluster/tag exports use `.jsonl` and an integrity sidecar. Search the temporary file locally and keep the full rows out of model context. Do not page repeatedly to synthesize a complete catalog.
103
+
104
+ Do not pre-list events or properties before constructing an AI-facing intent model. Pass the user's wording directly in `definition`; the backend resolves it and returns `resolved` evidence. Call event/property metadata commands only when the user explicitly asks to inspect metadata, a structured compiler error instructs `next_action=search_candidates`, or the compiler reports an explicit metadata-resolution capability gap. When compiler candidates already exist, ask the user to confirm without another metadata call. If the user explicitly rejects every candidate for that path, treat the rejected set as exhausted and continue through the one aggregate-search workflow in `metadata_resolution.md`; do not terminate the original task or repeat the rejected candidates.
105
+
106
+ The generic saved-asset search rule above does not control structured AI-QP metadata failures. For those failures, `allowed_resource_types` is authoritative: collect the whole compiler error array and follow the one aggregate online search, optional full-catalog, conversation-reuse workflow in `metadata_resolution.md`. Never use a candidate from either path without user confirmation.
106
107
 
107
108
  ### Existing business asset before ad-hoc
108
109
 
@@ -121,18 +122,20 @@ Do not call removed QP builders or schema helpers for ad-hoc analysis. `--defini
121
122
  - Metric value, trend, comparison, or anomaly -> saved report/dashboard first, then ad-hoc data.
122
123
  - Metric definition search/create/update -> metadata commands.
123
124
  - Event/entity rows -> `event-detail run|export` or `entity-detail run|export`.
124
- - Events/entities from a query result -> pass the original `--project-id`, then follow the returned synchronous `query_context_id` and `sources[].drilldown`; never reconstruct raw QP or use export rows as coordinates.
125
+ - Events/entities from a query result -> pass the original `--project-id`, follow the returned synchronous `query_context_id` and compact source action summary, then call `analysis query-context get` for full coordinate options; never reconstruct raw QP or use export rows as coordinates.
125
126
  - Cluster/tag definition -> matching gateway cluster/tag commands and matching model reference.
126
127
  - Tag/cluster candidate values, including requests phrased as "latest version" or "latest result" -> resolve the exact asset, then use `analysis filter-value list` with `cluster_date_policy=LATEST`. This means the latest computed data snapshot, never a definition or configuration release; do not invent version lists, version IDs, draft states, or publish states.
127
128
  - Alert/configuration/tracking-plan requests -> the dedicated gateway command reference from the index.
128
129
 
129
130
  ### Run, export, and follow-up
130
131
 
131
- - `run` is a bounded inline preview for known-small work that can complete within the synchronous limits.
132
+ - `run` is a bounded inline preview for work that can complete within the synchronous limits. Agents should normally pass `--preview-rows 100`; omitting it deliberately uses the model's current cluster-configured synchronous limit. User tag/cluster member list commands are the exception: omission defaults to 1000 rows, matching the UI member query.
132
133
  - `export` is for complete, unknown-size, over-limit, or long-running results. It returns `run_id` and `artifact_id`.
133
134
  - Drilldown event/entity/user-event exports are `csv.gz` full-download streams bounded by `model_full_download_limit`; never pass or simulate `limit`, `offset`, `page_num`, or `page_size`.
134
- - Inspect with `analysis run inspect`, download with `analysis artifact download`, and cancel with `analysis query cancel`. Do not call raw lifecycle URLs.
135
- - Drilldown requires the original `--project-id`, a synchronous preview context, and the selected source's returned row/column/metric coordinate options. Common rejects a project ID that does not match the stored context. If the context/options are absent or the action is not advertised, report that drilldown/result-cluster creation is unavailable.
135
+ - Plain `export` submits only. Add `--wait` to wait for terminal state, or `--output <file>` to wait and atomically stream the completed artifact; `--output` implies wait. Existing files require explicit `--force`.
136
+ - Resume detached or interrupted work with `analysis run wait --run-id <run_id> [--output <file>]`. Local interruption never cancels the remote run; cancel only through the explicit `analysis query cancel` command.
137
+ - `analysis run inspect` and `analysis artifact download` remain primitive lifecycle commands. Do not call raw lifecycle URLs. Use `--wait-timeout-seconds` only to bound local waiting; it never changes or cancels the remote runtime.
138
+ - Drilldown requires the original `--project-id`, a synchronous preview context, and row/column/metric coordinate options fetched with `analysis query-context get`. Common rejects a project ID that does not match the stored context. If the context/options are absent or the action is not advertised, report that drilldown/result-cluster creation is unavailable.
136
139
 
137
140
  ### Writes and destructive operations
138
141
 
@@ -0,0 +1,150 @@
1
+ # Structured AI-QP metadata resolution
2
+
3
+ Use this workflow only when `analysis adhoc run|export`, report create, or report update fails with `AI_QP_COMPILE_FAILED` and metadata errors contain:
4
+
5
+ - `path`
6
+ - `slot_kind`
7
+ - `raw_value`
8
+ - `allowed_resource_types`
9
+ - `search_targets`
10
+ - `candidates`
11
+ - `next_action`
12
+
13
+ The Common compiler returns every unresolved slot from the same compile attempt. Treat that complete error array as one resolution plan. Do not run this workflow independently for each `path`.
14
+
15
+ `allowed_resource_types` and `search_targets` are authoritative for their exact paths. Do not add, remove, prioritize, or reinterpret resource types. `search_targets[].constraints` must be applied when filtering local rows.
16
+
17
+ ## One catalog for the conversation
18
+
19
+ The complete analysis metadata catalog contains these resource types in one JSONL file:
20
+
21
+ - `event`
22
+ - `metric`
23
+ - `event_property`
24
+ - `user_property`
25
+ - `cluster`
26
+ - `tag`
27
+
28
+ Use the current Agent conversation context as the catalog base:
29
+
30
+ 1. If the Agent host exposes a private artifact or workspace directory scoped to the current conversation, use it as `<agent-conversation-root>`.
31
+ 2. Use:
32
+
33
+ ```text
34
+ <agent-conversation-root>/ae-cli/analysis-metadata/
35
+ ```
36
+
37
+ Do not assume a product-specific environment variable, Agent implementation, or launcher contract.
38
+
39
+ If the host has no stable conversation-scoped directory, create one private fallback root once:
40
+
41
+ ```bash
42
+ mktemp -d "${TMPDIR:-/tmp}/ae-cli-analysis-metadata.XXXXXX"
43
+ ```
44
+
45
+ Retain that absolute path in the current conversation state. Never create a new root per error, command, or turn.
46
+
47
+ Normalize the AE host to its lowercase URL origin without a trailing slash. Set `host-key` to the first 16 lowercase hex characters of the origin SHA-256. Use:
48
+
49
+ ```text
50
+ <session-root>/<host-key>/project-<project_id>/catalog.jsonl
51
+ <session-root>/<host-key>/project-<project_id>/catalog.meta.json
52
+ ```
53
+
54
+ Create the directory with mode `0700`. Do not put a token, user name, or user ID in its path.
55
+
56
+ Before reuse, require both files and verify:
57
+
58
+ - `schema_version=1`
59
+ - `resource_type=analysis_metadata`
60
+ - `complete=true`
61
+ - `host` and `project_id` match the current request
62
+ - `principal_fingerprint` is present
63
+ - JSONL SHA-256 equals `content_sha256`
64
+ - the authenticated principal has not changed during the conversation
65
+
66
+ If any check fails, discard the cached pair for this workflow and fetch it again. A `.part` file or JSONL without the completed metadata sidecar is never valid.
67
+
68
+ ## Compile-wide workflow
69
+
70
+ 1. Read the complete compiler error array.
71
+ 2. Keep existing compiler `candidates` for their exact paths. They require confirmation and no metadata lookup unless the user explicitly rejects every candidate for that path. After an explicit reject-all response, discard that rejected set and treat the path as requiring `next_action=search_candidates`, using its existing `raw_value`, `allowed_resource_types`, and `search_targets`.
72
+ 3. Collect every empty-candidate path with `next_action=search_candidates`.
73
+ 4. If at least one such path exists, check the one conversation catalog above.
74
+ 5. If a valid complete catalog exists, skip every online metadata call and search it locally as described below.
75
+ 6. If no valid catalog exists:
76
+ - Generate useful synonyms for every empty-candidate path from its `raw_value` and `slot_kind`.
77
+ - Deduplicate the synonyms from all paths into one `queries` array.
78
+ - Take the union of those paths' `allowed_resource_types` into one `resource-types` array. Do not add other types.
79
+ - Invoke exactly one aggregate online search:
80
+
81
+ ```bash
82
+ ae-cli analysis-meta catalog list \
83
+ --project-id <project_id> \
84
+ --queries '["<all deduplicated synonyms>"]' \
85
+ --resource-types '["<union of allowed resource types>"]' \
86
+ --limit-per-type 20
87
+ ```
88
+
89
+ 7. Split the online rows back across paths:
90
+ - Accept a row for a path only when its `resource_type` is allowed by that path.
91
+ - Apply that path's `search_targets[].constraints`.
92
+ - Prefer the server-provided exact matches before contained matches.
93
+ - Deduplicate by `resource_type + resource_key`.
94
+ 8. If every searched path now has at least one candidate, skip the full catalog and continue to confirmation.
95
+ 9. If any searched path still has no candidate, download the complete catalog exactly once:
96
+
97
+ ```bash
98
+ ae-cli analysis-meta catalog export \
99
+ --project-id <project_id> \
100
+ --output "<catalog_dir>/catalog.jsonl"
101
+ ```
102
+
103
+ 10. Search the one JSONL locally for every path still without a candidate:
104
+ - Generate useful synonyms from that path's `raw_value` and `slot_kind`.
105
+ - Filter rows by `search_targets[].resource_type`.
106
+ - Apply every target `constraints` field.
107
+ - Prefer exact `resource_key`, then exact `display_name`, then contained display name or remark.
108
+ - Deduplicate by `resource_type + resource_key`.
109
+ - Return only a small candidate subset to model context; never read the full catalog into context.
110
+ 11. Aggregate candidates for all paths and ask the user to confirm each selected candidate in one interaction.
111
+ 12. Keep the original definition unchanged. Build one `resolutions` object keyed by compiler path and rerun the original command once with `--resolutions`.
112
+
113
+ A reject-all response is a state transition, not task cancellation. Run the aggregate online search at most once for the rejected path set, then use the same complete-catalog fallback above if needed. Never repeat candidates the user already rejected. If the complete catalog has no different candidate, ask for an exact canonical name or a changed business definition.
114
+
115
+ Do not call event, property, metric, cluster, or tag list commands in this structured workflow. Do not run `--queries` synonym rounds: the aggregate online search is one call for the whole compile error array, never one call per path or resource type. The unified catalog capability replaces both repeated online searches and per-resource full exports.
116
+
117
+ Once a valid complete catalog exists for the current host, project, principal, and conversation, never call `analysis-meta catalog list` again in that scope, and never call `analysis-meta catalog export` again either. Search the complete local snapshot instead; a local no-match is a complete negative result for this snapshot.
118
+
119
+ An online response with `has_more=true` is bounded discovery, not a complete negative result. If any path remains unresolved after that response, use the one complete-catalog fallback instead of paging or broadening online queries. Permission, network, and server errors are failures, not empty search results, and must not trigger the full-catalog fallback.
120
+
121
+ ## Confirmation and deterministic binding
122
+
123
+ Never use a compiler or local candidate without explicit user confirmation.
124
+
125
+ For each confirmed path, pass:
126
+
127
+ ```json
128
+ {
129
+ "resolutions": {
130
+ "request.metrics[0].event": {
131
+ "raw_value": "付费事件",
132
+ "resource_type": "event",
133
+ "resource_key": "payment"
134
+ }
135
+ }
136
+ }
137
+ ```
138
+
139
+ The server verifies that:
140
+
141
+ - the path still exists in the unchanged definition;
142
+ - `raw_value` still matches that path;
143
+ - `resource_type` is allowed for that path;
144
+ - `resource_key` is currently accessible in the project and identity scope.
145
+
146
+ Handle `RESOLUTION_STALE`, `RESOLUTION_TYPE_NOT_ALLOWED`, and `RESOLUTION_PATH_INVALID` as deterministic validation failures. Do not retry the same resolution unchanged.
147
+
148
+ If the complete local catalog has no candidate for a path, ask the user for an exact canonical name or a different business definition. Never fabricate an entity.
149
+
150
+ Permission, network, and server errors are not empty catalogs. Report them and do not publish or reuse a failed catalog.
@@ -13,6 +13,7 @@ ae-cli analysis adhoc export \
13
13
  --project-id <project_id> \
14
14
  --model-type <model_type> \
15
15
  --definition '<json>' \
16
+ [--resolutions '<confirmed_resolution_json>'] \
16
17
  [--request-id cli_<32 lowercase hex>] \
17
18
  [--use-cache true|false] \
18
19
  [--zone-offset <hours>] \
@@ -20,7 +21,11 @@ ae-cli analysis adhoc export \
20
21
  [--cluster-query-scope GLOBAL|SLAVE] \
21
22
  [--slave-cluster-id <id>] \
22
23
  [--artifact-format jsonl|csv] \
23
- [--timeout-seconds <n>]
24
+ [--timeout-seconds <n>] \
25
+ [--wait] \
26
+ [--wait-timeout-seconds <n>] \
27
+ [--output <file>] \
28
+ [--force]
24
29
  ```
25
30
 
26
31
  ## AI models
@@ -40,6 +45,7 @@ Rules:
40
45
  - `--project-id`: target project ID.
41
46
  - `--model-type`: one of the 12 AI-facing model names from [`ai_models.md`](ai_models.md). Do not pass `scenario`, `history_tag`, or `cluster`; tags and cohorts/clusters are separate capabilities.
42
47
  - `--definition`: model-specific AI-facing definition JSON.
48
+ - `--resolutions`: only after user confirmation, pass deterministic bindings keyed by compiler error path while keeping `--definition` unchanged. Follow [`../metadata_resolution.md`](../metadata_resolution.md).
43
49
  - `--artifact-format`: `jsonl` or `csv`.
44
50
 
45
51
  Async export has no inline row limit. Runtime defaults to and is capped at 21600 seconds (6 hours); cancel earlier with `analysis query cancel --run-id <run_id>`. The routing rule lives in [`analysis_data_retrieval.md`](analysis_data_retrieval.md).
@@ -63,16 +69,25 @@ The response is an async artifact descriptor:
63
69
 
64
70
  Preserve the `run_id` and `artifact_id` from this exact submit response as one pair. Do not infer either ID from a path or reuse an ID from another export.
65
71
 
66
- Export submission compiles the definition before creating an artifact or run. The execute, `--validate`, and `--dry-run` paths return `AI_QP_COMPILE_FAILED` immediately when clarification is required, with `meta.compile_status`, full `meta.errors[]` (including `candidates` and `suggestions`), `meta.resolved`, and `meta.warnings`. A compile failure has no `run_id` or `artifact_id`; resolve the ambiguity and submit a new request.
72
+ Export submission compiles the definition before creating an artifact or run. The execute, `--validate`, and `--dry-run` paths return `AI_QP_COMPILE_FAILED` immediately when clarification is required, with `meta.compile_status`, full structured `meta.errors[]`, `meta.resolved`, and `meta.warnings`. Follow [`../metadata_resolution.md`](../metadata_resolution.md), confirm candidates, then retry with `--resolutions`. A compile failure has no `run_id` or `artifact_id`.
67
73
 
68
74
  Use:
69
75
 
70
76
  ```bash
77
+ ae-cli analysis adhoc export ... --wait
78
+ ae-cli analysis adhoc export ... --output <file>
79
+ ae-cli analysis run wait --run-id <run_id> [--output <file>]
71
80
  ae-cli analysis run inspect --run-id <run_id>
72
81
  ae-cli analysis artifact download --run-id <run_id> --artifact-id <artifact_id> --output <file>
73
82
  ae-cli analysis query cancel --run-id <run_id>
74
83
  ```
75
84
 
85
+ Plain export submits only. `--output` implies `--wait`;
86
+ `--wait-timeout-seconds` defaults to 600 seconds and controls only the local
87
+ CLI wait. `--force` is valid only
88
+ with `--output` and permits atomic replacement of an existing file. Local wait
89
+ interruption or deadline does not cancel the remote run.
90
+
76
91
  If query execution fails, `run inspect` reaches `FAILED`; it must not produce a completed empty artifact. Download only after the successful terminal states documented in `analysis_data_retrieval.md`.
77
92
 
78
93
  Exported rows are durable data, not interactive preview coordinates. Never drill down or create a result cluster from the submit response or downloaded artifact. Run a bounded synchronous preview containing the desired cell first.
@@ -15,13 +15,14 @@ ae-cli analysis adhoc run \
15
15
  --project-id <project_id> \
16
16
  --model-type <model_type> \
17
17
  --definition '<json>' \
18
+ [--resolutions '<confirmed_resolution_json>'] \
18
19
  [--request-id cli_<32 lowercase hex>] \
19
20
  [--use-cache true|false] \
20
21
  [--zone-offset <hours>] \
21
22
  [--fields '["列名"]'] \
22
23
  [--cluster-query-scope GLOBAL|SLAVE] \
23
24
  [--slave-cluster-id <id>] \
24
- [--limit <n>] \
25
+ [--preview-rows <n>] \
25
26
  [--timeout-seconds <n>]
26
27
  ```
27
28
 
@@ -36,10 +37,13 @@ For SQL model definitions, do not invent table or column names. If the table ref
36
37
  - `--project-id`: target project ID.
37
38
  - `--model-type`: one of the 12 AI-facing model names from [`ai_models.md`](ai_models.md). Do not pass `scenario`, `history_tag`, or `cluster`; tags and cohorts/clusters are separate capabilities.
38
39
  - `--definition`: model-specific AI-facing definition JSON.
40
+ - `--resolutions`: only after user confirmation, pass deterministic bindings keyed by compiler error path. Keep `--definition` unchanged; follow [`../metadata_resolution.md`](../metadata_resolution.md).
39
41
 
40
- Control defaults: `--limit` default 100 / max 1000, `--timeout-seconds` default 60 / max 180. The routing rule lives in [`analysis_data_retrieval.md`](analysis_data_retrieval.md).
42
+ Omit `--preview-rows` to use the current model and cluster synchronous row limit. An explicit value must be positive and cannot exceed that runtime limit; agents should normally pass 100 to bound context. `--timeout-seconds` defaults to 120 and has a maximum of 180. The routing rule lives in [`analysis_data_retrieval.md`](analysis_data_retrieval.md).
41
43
 
42
- If the user asks for more than 1000 rows, or the SQL text requests `LIMIT 2000` (or any limit above 1000), go directly to `analysis adhoc export`. Do not lower the SQL limit to 1000, run a truncated sync query first, or loop over repeated `run` calls.
44
+ For `model_type=path`, `preview_rows` follows the analysis UI's graph contract: it limits real nodes per path level, not total nodes across the graph. Nodes beyond the per-level boundary are combined into a `more` node. `result.nodes` retains that synthesized node for graph structure and drilldown coordinates. `returned_rows` counts real business nodes actually returned across all levels; it excludes synthesized `more` nodes and the real nodes folded into them. The count may still exceed `preview_rows` because the boundary applies independently to each level. `has_more=true` means at least one level contains real nodes folded into `more`.
45
+
46
+ If the requested result exceeds the current runtime synchronous maximum, go directly to `analysis adhoc export`. Do not lower the requested row count, run a partial sync query first, or loop over repeated `run` calls.
43
47
 
44
48
  Do not use raw QP, `events`, `event_view`, `visual_view`, removed ad-hoc QP builder outputs, or schema helper outputs as `--definition`.
45
49
 
@@ -52,14 +56,14 @@ Cluster routing: omit both routing flags for current-self data. Before `GLOBAL`
52
56
  The response may include:
53
57
 
54
58
  - `query_context_id`: Redis-backed context for follow-ups from this bounded synchronous preview.
55
- - `sources[].drilldown`: finite row, column, and metric options plus allowed actions. The preview `limit` is the selection boundary.
56
- - `title` / `rows` / `total` / `returned_rows` / `truncated`: tabular preview fields. When truncated, use `adhoc export`; there is no next-page request.
57
- - `result`: direct result for non-tabular models.
59
+ - `sources[].drilldown`: compact allowed-action summary. Detailed coordinate options are read lazily with `analysis query-context get`; `preview_rows` remains the selection boundary.
60
+ - `title` / `rows` / `returned_rows` / `has_more`: tabular preview fields. `total` appears only when the backend supplies an exact total. When `has_more` is true, use `adhoc export`; there is no next-page request.
61
+ - `result`: direct result for non-tabular models. Path results also return top-level `returned_rows` and `has_more` using the per-level node contract above.
58
62
  - `request_id`: lifecycle request id.
59
63
  - `actual_cluster_query_scope`, optional `actual_slave_cluster_id`, and `cluster_query_scope_source`: actual physical data route. Verify these before comparing results or following the query context.
60
64
 
61
65
  Execution failures are returned as command failures with `request_id`; only the explicit project-no-data condition is a successful empty result. Do not interpret an empty object as evidence that a failed query succeeded.
62
66
 
63
- The execute, `--validate`, and `--dry-run` paths all compile the AI-facing definition. If metadata resolution needs clarification, the command fails with `AI_QP_COMPILE_FAILED`; inspect `meta.compile_status`, `meta.errors[]`, `meta.resolved`, and `meta.warnings`. Each error retains `path`, `message`, `code`, `candidates`, and `suggestions`. Select an exact candidate from this response or ask the user; do not guess from display text.
67
+ The execute, `--validate`, and `--dry-run` paths all compile the AI-facing definition. If metadata resolution needs clarification, the command fails with `AI_QP_COMPILE_FAILED`; inspect `meta.compile_status`, `meta.errors[]`, `meta.resolved`, and `meta.warnings`. Each metadata error retains `path`, `slot_kind`, `raw_value`, `allowed_resource_types`, `search_targets`, and `candidates`. Follow [`../metadata_resolution.md`](../metadata_resolution.md); do not guess from display text.
64
68
 
65
- Read [`analysis_drilldown_contract.md`](analysis_drilldown_contract.md). Use the context only with an action advertised by the selected source/metric, and assemble the coordinate only from returned option fragments. Do not pass raw QP or infer a coordinate from display text.
69
+ Read [`analysis_drilldown_contract.md`](analysis_drilldown_contract.md). Use the context only with an action advertised by the selected source, call `analysis query-context get`, and assemble the coordinate only from its returned option fragments. Do not pass raw QP or infer a coordinate from display text.