@thinkingai/ae-cli 6.1.14 → 6.1.17

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 (94) hide show
  1. package/README.md +5 -2
  2. package/README.zh.md +5 -2
  3. package/dist/{auth-GBMV6TEJ.js → auth-2WTQOP77.js} +3 -3
  4. package/dist/{auth-NDSXE54J.js → auth-77BUFLGC.js} +57 -13
  5. package/dist/{capability-TAMDRZYV.js → capability-72DTW5M2.js} +9 -9
  6. package/dist/{capability-U7TDEEEG.js → capability-PJHNI4GJ.js} +9 -9
  7. package/dist/{chunk-AFXA7BRK.js → chunk-4KVPKXFX.js} +5 -5
  8. package/dist/chunk-4SGZG4XY.js +311 -0
  9. package/dist/chunk-6EIJSNBD.js +8 -0
  10. package/dist/chunk-C4MGVGJW.js +13 -0
  11. package/dist/{chunk-WZRX4KOH.js → chunk-GT46FPXN.js} +4 -6
  12. package/dist/{chunk-5XUSIK27.js → chunk-ILIU36SU.js} +10 -7
  13. package/dist/{chunk-JHENBQ5B.js → chunk-LYVNONC4.js} +0 -35
  14. package/dist/{chunk-JUW4AJXN.js → chunk-P3FGXJTU.js} +12 -7
  15. package/dist/chunk-QGM4M3NI.js +37 -0
  16. package/dist/{chunk-753BUTNZ.js → chunk-RGKJGKT7.js} +2 -2
  17. package/dist/{chunk-UIHQJK5E.js → chunk-SAU3QFIQ.js} +3 -3
  18. package/dist/{chunk-VLWOLBGZ.js → chunk-UOUS37JQ.js} +149 -161
  19. package/dist/{chunk-AXDXJTPC.js → chunk-UW5UN47B.js} +19 -2
  20. package/dist/chunk-VPKZ7I72.js +509 -0
  21. package/dist/{chunk-QATA32VR.js → chunk-VR3LCBHW.js} +2 -2
  22. package/dist/{chunk-IBH3LDAH.js → chunk-YA6SMTXG.js} +3 -3
  23. package/dist/chunk-ZZUOD757.js +598 -0
  24. package/dist/{client-L2YDMHQ6.js → client-TKG4WBHN.js} +4 -5
  25. package/dist/{community-report-client-M2RW4MXD.js → community-report-client-FI4LNVYS.js} +3 -2
  26. package/dist/{config-OL2LWGBV.js → config-RE6CMGPK.js} +7 -7
  27. package/dist/data-integration-XQYB4X4F.js +3503 -0
  28. package/dist/index.js +68 -34
  29. package/dist/local-data-upload-client-BWHSUQQK.js +167 -0
  30. package/dist/{memory-MUP7PPL7.js → memory-CHRU2F7W.js} +7 -6
  31. package/dist/{memory-U4O5PMXH.js → memory-YK33G4T7.js} +7 -6
  32. package/dist/{metadata-5MIMNIMT.js → metadata-UILXHBWF.js} +10 -9
  33. package/dist/{metadata-LERKDJN6.js → metadata-XXR34N5P.js} +10 -9
  34. package/dist/{model-JTUEO5M4.js → model-K3KLWIW6.js} +7 -3
  35. package/dist/model-NR3JHFSJ.js +139 -0
  36. package/dist/{sync-MOSFNBVR.js → sync-DAVKYVMW.js} +8 -6
  37. package/dist/sync-FCKOVWWS.js +10261 -0
  38. package/dist/{te-agent-IFKZDHZI.js → te-agent-4BKBODMF.js} +686 -71
  39. package/dist/te-agent-HLW4VTQK.js +3893 -0
  40. package/dist/{te-analysis-FCHRTNIY.js → te-analysis-O6DCO6BS.js} +36 -13
  41. package/dist/{te-analysis-QG7UKGDA.js → te-analysis-ZMNGOVNW.js} +36 -13
  42. package/dist/{te-community-HNKVTERD.js → te-community-6HPBWJUZ.js} +24 -19
  43. package/dist/{te-community-IWE5B7W6.js → te-community-HLC43QKH.js} +24 -20
  44. package/dist/{te-dataops-KXCEB4CS.js → te-dataops-EJP56W3K.js} +57 -34
  45. package/dist/{te-dataops-KQPYNAE3.js → te-dataops-HDRUXY4K.js} +59 -34
  46. package/dist/{te-engage-D6EG3NOR.js → te-engage-FGBGQ4IY.js} +9 -8
  47. package/dist/{te-engage-ZSMIJLUW.js → te-engage-RAK5PESW.js} +9 -8
  48. package/dist/{te-experiment-K5US7RMG.js → te-experiment-SO5MPDMJ.js} +9 -8
  49. package/dist/{te-experiment-WA7TFMEL.js → te-experiment-VZF7BT6G.js} +9 -8
  50. package/dist/{te-kb-OIH3T6CS.js → te-kb-SQCLHG6X.js} +250 -126
  51. package/dist/{te-system-AZ3URMUO.js → te-system-YARIK4S5.js} +7 -4
  52. package/dist/te-system-Z77IKZFN.js +2213 -0
  53. package/dist/{te-team-GZPU6UWA.js → te-team-EFKWYKMK.js} +7 -7
  54. package/dist/{update-TOBFXF2V.js → update-OGPSZM5A.js} +7 -7
  55. package/package.json +14 -3
  56. package/skills/ae-agent/SKILL.md +21 -11
  57. package/skills/ae-agent/references/approval-effect.md +44 -0
  58. package/skills/ae-agent/references/approval-request.md +46 -0
  59. package/skills/ae-agent/references/approval-task.md +45 -0
  60. package/skills/ae-agent/references/approval-type.md +32 -0
  61. package/skills/ae-agent/references/command_index.md +19 -0
  62. package/skills/ae-analysis/SKILL.md +11 -7
  63. package/skills/ae-analysis/references/adhoc_run.md +2 -0
  64. package/skills/ae-analysis/references/ai_models.md +27 -0
  65. package/skills/ae-analysis/references/analysis_gateway_assets.md +3 -2
  66. package/skills/ae-analysis/references/command_index.md +4 -1
  67. package/skills/ae-analysis/references/dashboard_get.md +8 -2
  68. package/skills/ae-analysis/references/dashboard_report_data_run.md +3 -1
  69. package/skills/ae-analysis/references/dashboard_update.md +4 -1
  70. package/skills/ae-analysis/references/project_space_business_filter_upsert.md +17 -0
  71. package/skills/ae-analysis/references/user_tag_models.md +4 -4
  72. package/skills/ae-data-integration/SKILL.md +54 -0
  73. package/skills/ae-data-integration/references/handoff.md +43 -0
  74. package/skills/ae-data-integration/references/local-analysis.md +27 -0
  75. package/skills/ae-data-integration/references/reuse.md +41 -0
  76. package/skills/ae-data-integration/references/sink-upload.md +58 -0
  77. package/skills/ae-data-integration/references/source-inspect.md +68 -0
  78. package/skills/ae-data-integration/references/sync-json-upload.md +60 -0
  79. package/skills/ae-data-integration/references/tracking-plan.md +35 -0
  80. package/skills/ae-data-integration/references/transform.md +65 -0
  81. package/skills/ae-data-integration/references/ue-mapping.md +142 -0
  82. package/skills/ae-data-integration/references/ue-routing.md +35 -0
  83. package/skills/ae-data-integration-helper/SKILL.md +1 -1
  84. package/skills/ae-dataops/SKILL.md +1 -1
  85. package/skills/ae-dataops/references/dataops-query.md +4 -4
  86. package/skills/ae-generate-tracking-plan/SKILL.md +54 -3
  87. package/skills/ae-kb/SKILL.md +55 -50
  88. package/skills/ae-kb/references/query-workflow.md +112 -0
  89. package/skills/ae-kb-discovery/SKILL.md +105 -0
  90. package/skills/ae-metadata/SKILL.md +0 -1
  91. package/dist/chunk-3FY3RJ26.js +0 -293
  92. package/dist/chunk-S5NTSDBS.js +0 -198
  93. package/dist/chunk-ZQKDZXDO.js +0 -317
  94. package/dist/cli-token-4UPER74P.js +0 -21
@@ -1,16 +1,16 @@
1
1
  import {
2
2
  getAuthHeaders,
3
3
  kbApi
4
- } from "./chunk-AFXA7BRK.js";
4
+ } from "./chunk-4KVPKXFX.js";
5
5
  import {
6
6
  printError,
7
7
  printOutput
8
- } from "./chunk-WZRX4KOH.js";
9
- import "./chunk-S5NTSDBS.js";
10
- import "./chunk-ZQKDZXDO.js";
11
- import "./chunk-3FY3RJ26.js";
12
- import "./chunk-AXDXJTPC.js";
13
- import "./chunk-JHENBQ5B.js";
8
+ } from "./chunk-GT46FPXN.js";
9
+ import "./chunk-4SGZG4XY.js";
10
+ import "./chunk-ZZUOD757.js";
11
+ import "./chunk-UW5UN47B.js";
12
+ import "./chunk-LYVNONC4.js";
13
+ import "./chunk-QGM4M3NI.js";
14
14
 
15
15
  // src/commands/te-team/shared.ts
16
16
  var API_PREFIX = process.env.AE_API_PREFIX ?? "/agent";
@@ -7,18 +7,18 @@ import {
7
7
  printError,
8
8
  printOutput,
9
9
  recordVersionSyncResult
10
- } from "./chunk-WZRX4KOH.js";
10
+ } from "./chunk-GT46FPXN.js";
11
11
  import {
12
12
  peekCliToken
13
- } from "./chunk-S5NTSDBS.js";
14
- import {
15
- missingAeHostHint
16
- } from "./chunk-ZQKDZXDO.js";
13
+ } from "./chunk-4SGZG4XY.js";
17
14
  import {
18
15
  getActiveHost,
16
+ missingAeHostHint,
19
17
  normalizeUrl
20
- } from "./chunk-3FY3RJ26.js";
21
- import "./chunk-JHENBQ5B.js";
18
+ } from "./chunk-ZZUOD757.js";
19
+ import "./chunk-UW5UN47B.js";
20
+ import "./chunk-LYVNONC4.js";
21
+ import "./chunk-QGM4M3NI.js";
22
22
 
23
23
  // src/commands/update.ts
24
24
  var HOST_OPTION_DESC = "Override active AE host URL (e.g., https://ta.thinkingdata.cn)";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thinkingai/ae-cli",
3
- "version": "6.1.14",
3
+ "version": "6.1.17",
4
4
  "description": "CLI tool for ThinkingAI (AE) analytics platform",
5
5
  "type": "module",
6
6
  "bin": {
@@ -39,13 +39,15 @@
39
39
  "verify:analysis-common-tools": "node scripts/verify-te-common-tools.mjs",
40
40
  "verify:experiment-tools": "node scripts/verify-te-experiment-tools.mjs && node --import tsx test/experiment/experiment-capability-command.test.mjs",
41
41
  "verify:team-tools": "node scripts/verify-te-team-tools.mjs",
42
- "verify:agent-tools": "node scripts/verify-agent-tools.mjs && npm run verify:sandbox-tools",
42
+ "verify:agent-tools": "node --test test/agent-command-registry.test.mjs && tsx tests/te-agent-credentials.test.ts && tsx tests/te-agent-unified-auth.test.ts && tsx tests/te-agent-conversations.test.ts && tsx scripts/verify-agent-tools.mjs && npm run verify:approval && npm run verify:sandbox-tools",
43
+ "verify:approval": "tsx tests/approval-command.test.ts && tsx tests/approval-cli-client.test.ts && tsx tests/approval-skill.test.ts",
43
44
  "verify:memory": "tsx tests/memory-command.test.ts && tsx tests/memory-cli-client.test.ts && tsx tests/memory-skill.test.ts",
44
45
  "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
+ "verify:kb-skill": "node test/kb-skill-query-workflow.test.mjs",
45
47
  "verify:sandbox-tools": "tsx test/sandbox-tools.test.ts",
46
48
  "verify:skill-version-management": "tsx tests/skill-version-management.test.ts",
47
49
  "verify:skill-reference-files": "tsx tests/skill-reference-files.test.ts",
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",
50
+ "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 && tsx tests/local-data-inspect-convert.test.ts && tsx tests/local-data-upload-client.test.ts && tsx tests/local-data-upload-command.test.ts && tsx tests/local-data-encoding-sniff.test.ts && tsx tests/local-data-time-formats.test.ts && tsx tests/local-data-eight-types.test.ts && tsx tests/local-data-mapping-extras.test.ts && tsx tests/local-data-plan.test.ts && tsx tests/local-data-handoff.test.ts && tsx tests/local-data-reuse.test.ts && tsx tests/local-data-conflicts-resolutions.test.ts && tsx tests/runner-variadic-flags.test.ts && node test/local-data-skill.test.mjs",
49
51
  "verify:self-check-overlay": "node test/self-check-overlay.test.mjs",
50
52
  "verify:update-check": "npx tsx test/update-check.test.mjs",
51
53
  "verify:version-sync": "npx tsx tests/version-sync.test.ts",
@@ -78,18 +80,27 @@
78
80
  "archiver": "^5.3.2",
79
81
  "cli-table3": "^0.6.5",
80
82
  "commander": "^12.1.0",
83
+ "csv-parse": "^7.0.2",
81
84
  "exceljs": "^4.4.0",
85
+ "iconv-lite": "^0.7.3",
82
86
  "jq-wasm": "^3.0.0-jq-1.8.2",
87
+ "jschardet": "^3.1.4",
83
88
  "json-bigint": "^1.0.0",
89
+ "saxes": "^6.0.0",
90
+ "stream-json": "^1.9.1",
84
91
  "turndown": "^7.2.4",
85
92
  "undici": "^6.19.0",
93
+ "unzipper": "^0.12.5",
86
94
  "ws": "^8.18.0",
87
95
  "xlsx": "^0.18.5"
88
96
  },
89
97
  "devDependencies": {
90
98
  "@types/archiver": "^5.3.4",
99
+ "@types/iconv-lite": "^0.0.1",
91
100
  "@types/node": "^22.0.0",
101
+ "@types/stream-json": "^1.7.8",
92
102
  "@types/turndown": "^5.0.6",
103
+ "@types/unzipper": "^0.10.11",
93
104
  "@types/ws": "^8.5.0",
94
105
  "jszip": "^3.10.1",
95
106
  "tsup": "^8.0.0",
@@ -1,12 +1,13 @@
1
1
  ---
2
2
  name: ae-agent
3
- version: 1.5.1
4
- description: "AE Agent platform CLI for Agent, archived conversation, automation, model, MCP, Skill, attachment, and user-memory work. Use when managing these resources, browsing Agent markets, restoring archived conversations, creating scheduled automations, persisting user memory, or answering from user preferences, background, stable workflows, or historical conventions."
3
+ version: 1.5.3
4
+ description: "AE Agent platform CLI for Agent, approval, archived conversation, automation, model, MCP, Skill, attachment, and user-memory work. Use when managing these resources, browsing Agent markets, handling approval requests and tasks, restoring archived conversations, creating scheduled automations, persisting user memory, or answering from user preferences, background, stable workflows, or historical conventions."
5
5
  ---
6
6
 
7
7
  # ae-agent
8
8
 
9
9
  > **CRITICAL — Before running any `ae-cli agent +<command>` command, you MUST first read the corresponding `references/<command>.md`.** The reference filename equals the command name without the leading `+`, for example `+add-mcp` -> `references/add-mcp.md`.
10
+ > **CRITICAL — Before running hierarchical approval commands, read the matching resource reference: `approval-type.md`, `approval-request.md`, `approval-task.md`, or `approval-effect.md`.**
10
11
  > **CRITICAL — Never guess record IDs (Agent / automation / model / MCP / Skill / submission / share / attachment).** Always use the appropriate `+list-*` command to discover real IDs first.
11
12
  > **CRITICAL — Agent platform resources are served under `/api/sandbox/agent/*`, but `ae-cli memory` is now served under `/api/cli/memory/v1/*` and uses the CLI token main chain.** Do not reference legacy memory paths.
12
13
 
@@ -22,6 +23,7 @@ Agent resource commands live under the `agent` service. Quick help:
22
23
  ae-cli agent --help
23
24
  ae-cli agent +list-agents --help
24
25
  ae-cli agent +create-automation --help
26
+ ae-cli agent approval-request --help
25
27
  ```
26
28
 
27
29
  User memory commands live under the `memory` service:
@@ -32,11 +34,11 @@ ae-cli memory +<command> [options]
32
34
 
33
35
  ## Global AE CLI Rules
34
36
 
35
- - Use this skill for Agent platform resource management: Agents, archived conversations, automations, models, MCP servers, Skills, attachments, the MCP/Skill market, Skill copy/approval/share flows, and user memories.
36
- - **Read operations** (`+list-*`) can run directly once required IDs are known.
37
+ - Use this skill for Agent platform resource management: Agents, generic approvals, archived conversations, automations, models, MCP servers, Skills, attachments, the MCP/Skill market, Skill copy/approval/share flows, and user memories.
38
+ - **Read operations** (`risk: read`) can run directly once required IDs are known.
37
39
  - **Write operations** (`risk: write`) can run directly once required IDs and references are verified.
38
- - **Delete operations** (`risk: high-risk-write`) require explicit user authorization. Pass `--yes` only after the user confirms.
39
- - Prefer `--dry-run` before delete operations to inspect the request shape without executing.
40
+ - **High-risk write operations** (`risk: high-risk-write`) require explicit user authorization. Pass `--yes` only after the user confirms.
41
+ - Prefer `--dry-run` before high-risk write operations to inspect the request shape without executing.
40
42
  - Local-Agent runtime `memory +mark-used` is silent internal usage accounting after an answer actually uses memory.
41
43
  - Personal and company scope resources can be created/updated/deleted; company scope requires root/agent_admin role; system resources are read-only (exception: root users can approve/reject submissions and set company-scope meta).
42
44
  - Toggle operations on company/system resources only affect the current user's preference, not the global state.
@@ -49,7 +51,7 @@ ae-cli memory +<command> [options]
49
51
  | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------- |
50
52
  | `--format <json\|table>` | Output format. Default is JSON. |
51
53
  | `--host <url>` | Override the active AE host. Available on every command and may be placed after the subcommand, e.g. `ae-cli agent +<command> --host <url>`. |
52
- | `--yes` | Skip confirmation for `high-risk-write` (delete) operations. |
54
+ | `--yes` | Skip confirmation for `high-risk-write` operations after explicit user authorization. |
53
55
  | `--dry-run` | Show request details (method + URL + body) without executing. |
54
56
 
55
57
  ### Output and Errors
@@ -65,13 +67,14 @@ Use `ae-agent` for all Agent platform resource work:
65
67
  - **Agents, conversations & automations**: list Agents, find/restore archived conversations, and create/list/update scheduled Agent automations.
66
68
  - **Models**: list, add, delete, toggle custom models.
67
69
  - **MCP servers**: list, add, delete, toggle MCP servers; browse the MCP market; set market meta.
68
- - **Skills**: list, add, delete, toggle Skills; browse the Skill market; set market meta; copy system/company Skills to personal; submit/approve/reject company-scope Skills; share/accept/reject peer-to-peer Skills.
70
+ - **Approvals**: discover versioned approval types, submit/query/cancel approval requests, and query/approve/reject approval tasks.
71
+ - **Skills**: list, add, delete, toggle Skills; browse the Skill market; set market meta; copy system/company Skills to personal; use legacy company-publish approval commands during the compatibility period; share/accept/reject peer-to-peer Skills.
69
72
  - **Attachments**: list, upload, soft-delete sandbox files in the attachment library.
70
73
  - **User Memory**: recall, account for, create, update, extract, organize, preview, and initialize long-term user memories through the `memory` domain.
71
74
 
72
75
  If the user's intent is data analysis, audience management, metadata governance, TeamRuns, or knowledge bases, switch to `ae-analysis` / `ae-engage` / `ae-dataops` / `ae-team` / `ae-kb`.
73
76
 
74
- ## Tool Groups (69 commands)
77
+ ## Tool Groups (82 commands)
75
78
 
76
79
  ### Agents (5)
77
80
 
@@ -166,6 +169,13 @@ If the user's intent is data analysis, audience management, metadata governance,
166
169
  - `+approve-skill` ([doc](references/approve-skill.md)) — approve a submission (root only). Creates a company-scope copy
167
170
  - `+reject-skill` ([doc](references/reject-skill.md)) — reject a submission with a reason (root only)
168
171
 
172
+ ### Generic Approval Workflow (13)
173
+
174
+ - `approval-type list|get` ([doc](references/approval-type.md)) — discover versioned approval definitions and input contracts
175
+ - `approval-request list|get|submit|cancel` ([doc](references/approval-request.md)) — query, submit, and cancel approval requests with stable request IDs
176
+ - `approval-task list|get|approve|reject` ([doc](references/approval-task.md)) — query and decide approval tasks with stable task IDs
177
+ - `approval-effect list|get|retry` ([doc](references/approval-effect.md)) — inspect safe execution state and explicitly retry failed/manual-required Effects
178
+
169
179
  ### Skill Share (peer-to-peer) (4)
170
180
 
171
181
  - `+share-skill` ([doc](references/share-skill.md)) — share a personal Skill to a same-company user
@@ -188,7 +198,7 @@ If the user's intent is data analysis, audience management, metadata governance,
188
198
 
189
199
  Use the `memory` domain, not the `agent` domain. The memory domain uses te-claude CLI token APIs under `/api/cli/memory/v1/memories*`, like analysis-side CLI token transport. It must not call Web-only `/api/memories*`, `/api/agent-session-defaults*`, or legacy `/api/sandbox/agent/memories*`.
190
200
 
191
- > **CRITICAL — Memory commands marked `write` in the table below run without `--yes`; only `high-risk-write` delete operations use `--yes` after explicit user confirmation. For local Agents, `+mark-used` is silent internal accounting and also runs without `--yes`. Web Agents never call it.**
201
+ > **CRITICAL — Memory commands marked `write` in the table below run without `--yes`. Within the memory domain, `high-risk-write` delete operations use `--yes` after explicit user confirmation. For local Agents, `+mark-used` is silent internal accounting and also runs without `--yes`. Web Agents never call it.**
192
202
 
193
203
  | Command | Risk | Purpose |
194
204
  | -------------------- | ----: | ---------------------------------------------------------------------------------------------- |
@@ -256,7 +266,7 @@ For a local Agent, a successful `+mark-used` response means only that the dedupl
256
266
  - **Market category keys**: `ae_preset | dev_tool | search_tool | data_query | content_gen | enterprise | life | automation | other`. Sort options: `newest | calls | likes` (`calls` sorts MCP by call count, Skill by download count). Market scope: `all | system | company | custom` (`custom` = personal).
257
267
  - **Meta on create/copy**: `+add-mcp` / `+add-skill` / `+copy-skill` accept optional `--category / --icon-emoji / --icon-color`; these are applied via a follow-up meta PATCH after creation. MCP creation still does NOT validate server connectivity.
258
268
  - **Copy vs toggle**: `+copy-skill` copies a system/company Skill to an independent personal copy. MCP has no copy (use `+toggle-mcp` to enable a system/company MCP per-user).
259
- - **Approval & share are Skill-only**: MCP has no approval or share flow. `+approve-skill` / `+reject-skill` require root.
269
+ - **Approval & share boundaries**: MCP has no approval or share flow. Generic approval commands currently expose `skill.publish@1` and future registered approval types; legacy `+approve-skill` / `+reject-skill` remain during the compatibility period and require root.
260
270
  - **`--id` semantics differ by command**: `+submit-skill` / `+share-skill` / `+copy-skill` take a Skill ID; `+cancel-skill-submission` / `+approve-skill` / `+reject-skill` take a submission ID; `+accept-skill-share` / `+reject-skill-share` take a share ID.
261
271
 
262
272
  ## Typical Workflows
@@ -0,0 +1,44 @@
1
+ # agent approval-effect (Inspect and Retry Approval Effects)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
4
+
5
+ Domain: **Generic Approval Effect / read + high-risk-write**
6
+
7
+ ## Commands
8
+
9
+ ```bash
10
+ ae-cli agent approval-effect list --status failed --limit 20
11
+ ae-cli agent approval-effect list --status manual_required --approval-request-id <request-id>
12
+ ae-cli agent approval-effect get --effect-id <effect-id>
13
+ ae-cli --dry-run agent approval-effect retry --effect-id <effect-id> --expected-version 3 --expected-attempt 1 --reason "Artifact storage was restored" --client-request-id <unique-id>
14
+ ae-cli --yes agent approval-effect retry --effect-id <effect-id> --expected-version 3 --expected-attempt 1 --reason "Artifact storage was restored" --client-request-id <unique-id>
15
+ ```
16
+
17
+ ## Mandatory Rules
18
+
19
+ - Effect identity is independent from request and task identity. Use `--effect-id`; use `--approval-request-id` only as a list filter.
20
+ - List/get return a safe view with request/type/resource summary, status, attempt, stable failure category, and safe result reference. They do not return artifact contents, credentials, runner leases, idempotency keys, or sensitive decision payloads.
21
+ - Retry only an Effect whose latest server state is `failed` or `manual_required`. Never infer Adapter idempotency or retry a `pending`, `running`, or `succeeded` Effect.
22
+ - Immediately before retry, run `get` and pass both `optimistic_version` as `--expected-version` and `attempt` as `--expected-attempt`.
23
+ - `--reason` is required and becomes auditable retry evidence. Generate a unique `--client-request-id` for the logical retry.
24
+ - Retry is `high-risk-write`. Obtain explicit user authorization, then pass `--yes`. Do not bypass permission, tenant-hidden, state, version, attempt, or artifact errors.
25
+ - The CLI transport does not perform business retries. Refresh state and ask for a new decision after a stable conflict.
26
+
27
+ ## Dry-run Boundary
28
+
29
+ `--dry-run` is only a local method, URL, and body preview. The body uses snake_case and sets the server-required `confirm_risk` field, but the preview does not verify current administrator status, live Effect state, or artifact availability, and it does not authorize actual execution or bypass the CLI confirmation gate.
30
+
31
+ ## Error Handling
32
+
33
+ - `approval_effect_retry_conflict`: re-run `get`; the status, optimistic version, attempt, or runner ownership changed. Do not blindly replay stale values, and stop unless the refreshed Effect is `failed` or `manual_required`.
34
+ - Artifact unavailable/manual recovery errors: repair the underlying storage or Adapter condition before considering another retry.
35
+ - Permission and tenant-hidden not-found errors must not be bypassed or retried with guessed IDs.
36
+
37
+ ## Transition Metadata
38
+
39
+ - Transition status: transitional
40
+ - Owning module: te-agent approval domain
41
+ - Current transport: CLI-token-only versioned REST at `/agent/api/cli/approval/v1`
42
+ - Gateway target: `approval.effect.list`, `approval.effect.get`, and `approval.effect.retry`
43
+ - Review after: 2026-11-17
44
+ - Exit condition: Migrate these commands when equivalent Gateway schemas preserve safe output, administrator authorization, high-risk confirmation, expected version/attempt fencing, idempotency, cursor pagination, dry-run, and structured error contracts.
@@ -0,0 +1,46 @@
1
+ # agent approval-request (Manage Approval Requests)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md) and read [`approval-type.md`](approval-type.md) before submitting.
4
+
5
+ Domain: **Generic Approval Request / read + write**
6
+
7
+ ## Commands
8
+
9
+ ```bash
10
+ ae-cli agent approval-request list --status pending --limit 20
11
+ ae-cli agent approval-request list --cursor <next_cursor> --approval-type-id skill.publish@1
12
+ ae-cli agent approval-request get --approval-request-id <request-id>
13
+ ae-cli agent approval-request submit --approval-type-id skill.publish@1 --resource-id <skill-id> --reason "Publish this Skill" --payload '{"description":"Publish this Skill"}' --client-request-id <unique-id>
14
+ ae-cli --dry-run agent approval-request cancel --approval-request-id <request-id> --expected-version 0 --client-request-id <unique-id>
15
+ ae-cli agent approval-request cancel --approval-request-id <request-id> --expected-version 0 --reason "No longer needed" --client-request-id <unique-id>
16
+ ```
17
+
18
+ ## Mandatory Rules
19
+
20
+ - Keep resource and request identities separate: `--resource-id` identifies the business resource; `--approval-request-id` identifies the approval aggregate.
21
+ - Generate a stable unique `--client-request-id` for each logical write. Reuse it only to replay the identical command.
22
+ - Read the latest request before cancellation and pass its `optimistic_version` as `--expected-version`.
23
+ - `--payload` must be a JSON object whose keys recursively use snake_case and match the selected type's `input_schema`.
24
+ - Request filters use opaque cursor pagination. Pass `next_cursor` unchanged to the next `--cursor` call.
25
+ - A requester may cancel their own pending request without a reason. A company manager cancelling another user's request must provide `--reason`.
26
+ - Write commands are ordinary `write` operations. They do not require `--yes`.
27
+
28
+ ## Dry-run Boundary
29
+
30
+ `--dry-run` is a local method, URL, and body preview. It does not call te-agent and therefore does not verify server permissions, current request state, artifact availability, registered type state, or future conditional routing.
31
+
32
+ ## Error Handling
33
+
34
+ - `approval_active_request_conflict`: inspect the active request instead of creating another one.
35
+ - `approval_version_conflict`: refresh the request/task, then decide whether to issue a new logical command with a new client request ID.
36
+ - `approval_idempotency_conflict`: do not reuse the client request ID with a changed payload.
37
+ - Permission and tenant-hidden not-found errors must not be bypassed or retried with guessed IDs.
38
+
39
+ ## Transition Metadata
40
+
41
+ - Transition status: transitional
42
+ - Owning module: te-agent approval domain
43
+ - Current transport: CLI-token-only versioned REST at `/agent/api/cli/approval/v1`
44
+ - Gateway target: `approval.request.list`, `approval.request.get`, `approval.request.submit`, and `approval.request.cancel`
45
+ - Review after: 2026-11-17
46
+ - Exit condition: Migrate these commands when equivalent Gateway schemas preserve idempotency, optimistic concurrency, cursor pagination, authorization, dry-run, and structured output contracts.
@@ -0,0 +1,45 @@
1
+ # agent approval-task (Review Approval Tasks)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
4
+
5
+ Domain: **Generic Approval Task / read + write**
6
+
7
+ ## Commands
8
+
9
+ ```bash
10
+ ae-cli agent approval-task list --status pending --limit 20
11
+ ae-cli agent approval-task list --approval-request-id <request-id>
12
+ ae-cli agent approval-task get --task-id <task-id>
13
+ ae-cli --dry-run agent approval-task approve --task-id <task-id> --expected-version 0 --client-request-id <unique-id>
14
+ ae-cli agent approval-task approve --task-id <task-id> --expected-version 0 --note "Reviewed" --client-request-id <unique-id>
15
+ ae-cli agent approval-task reject --task-id <task-id> --expected-version 0 --reason "Missing evidence" --client-request-id <unique-id>
16
+ ```
17
+
18
+ ## Mandatory Rules
19
+
20
+ - Keep task and request identities separate. `--task-id` selects the actionable unit; `--approval-request-id` only filters task lists.
21
+ - Never guess task IDs. Discover current tasks with `approval-task list`, then read the chosen task with `get`.
22
+ - Read the latest task immediately before a decision and pass its `optimistic_version` as `--expected-version`.
23
+ - Approval allows an optional `--note`; rejection requires a non-empty `--reason`.
24
+ - Generate a stable unique `--client-request-id` for each logical decision. Reuse it only to replay the identical decision.
25
+ - Current server role and company membership are authoritative. A task returned earlier may become ineligible before the write.
26
+ - Write commands are ordinary `write` operations. They do not require `--yes`.
27
+
28
+ ## Dry-run Boundary
29
+
30
+ `--dry-run` is a local method, URL, and body preview. It does not call te-agent and therefore does not verify current approver eligibility, live task/request versions, or future multi-step and conditional routing.
31
+
32
+ ## Error Handling
33
+
34
+ - `approval_version_conflict`: refresh both the task and request before deciding whether to retry.
35
+ - `approval_idempotency_conflict`: do not reuse the client request ID with a changed action or payload.
36
+ - Permission and tenant-hidden not-found errors must not be bypassed or retried with guessed IDs.
37
+
38
+ ## Transition Metadata
39
+
40
+ - Transition status: transitional
41
+ - Owning module: te-agent approval domain
42
+ - Current transport: CLI-token-only versioned REST at `/agent/api/cli/approval/v1`
43
+ - Gateway target: `approval.task.list`, `approval.task.get`, `approval.task.approve`, and `approval.task.reject`
44
+ - Review after: 2026-11-17
45
+ - Exit condition: Migrate these commands when equivalent Gateway schemas preserve task identity, current-role authorization, optimistic concurrency, idempotency, cursor pagination, dry-run, and structured output contracts.
@@ -0,0 +1,32 @@
1
+ # agent approval-type (Discover Approval Types)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
4
+
5
+ Domain: **Generic Approval / read**
6
+
7
+ ## Commands
8
+
9
+ ```bash
10
+ ae-cli agent approval-type list
11
+ ae-cli agent approval-type get --approval-type-id skill.publish@1
12
+ ```
13
+
14
+ ## Mandatory Rules
15
+
16
+ - Use `list` to discover registered versioned type IDs. Never guess a type version.
17
+ - Use `get` before `approval-request submit`; its `input_schema` defines the type-specific snake_case payload.
18
+ - `--approval-type-id` is a versioned type identity such as `skill.publish@1`, not a request or task ID.
19
+ - V1 definitions describe one `ANY_ONE` step. Do not infer future multi-step or conditional behavior from local CLI output.
20
+
21
+ ## Output
22
+
23
+ The response keeps the te-agent public snake_case contract, including `input_schema`, `snapshot_schema`, `principal_selector`, `flow`, and `effect` metadata.
24
+
25
+ ## Transition Metadata
26
+
27
+ - Transition status: transitional
28
+ - Owning module: te-agent approval domain
29
+ - Current transport: CLI-token-only versioned REST at `/agent/api/cli/approval/v1`
30
+ - Gateway target: `approval.type.list` and `approval.type.get`
31
+ - Review after: 2026-11-17
32
+ - Exit condition: Migrate these commands to equivalent Capability Gateway schemas once discovery, authorization, output, and versioning contracts are stable, or remove the curated commands if L3 provides the same typed safety.
@@ -0,0 +1,19 @@
1
+ # Generic Approval Command Risk Index
2
+
3
+ This index provides command-level risk metadata for generic approval examples. The command implementation remains the source of truth for runtime admission.
4
+
5
+ | CLI command | Transport | Risk | Reference |
6
+ | -------------------------------------------- | ----------------------------- | --------------- | -------------------- |
7
+ | `ae-cli agent approval-type list` | CLI-token-only versioned REST | read | approval-type.md |
8
+ | `ae-cli agent approval-type get` | CLI-token-only versioned REST | read | approval-type.md |
9
+ | `ae-cli agent approval-request list` | CLI-token-only versioned REST | read | approval-request.md |
10
+ | `ae-cli agent approval-request get` | CLI-token-only versioned REST | read | approval-request.md |
11
+ | `ae-cli agent approval-request submit` | CLI-token-only versioned REST | write | approval-request.md |
12
+ | `ae-cli agent approval-request cancel` | CLI-token-only versioned REST | write | approval-request.md |
13
+ | `ae-cli agent approval-task list` | CLI-token-only versioned REST | read | approval-task.md |
14
+ | `ae-cli agent approval-task get` | CLI-token-only versioned REST | read | approval-task.md |
15
+ | `ae-cli agent approval-task approve` | CLI-token-only versioned REST | write | approval-task.md |
16
+ | `ae-cli agent approval-task reject` | CLI-token-only versioned REST | write | approval-task.md |
17
+ | `ae-cli agent approval-effect list` | CLI-token-only versioned REST | read | approval-effect.md |
18
+ | `ae-cli agent approval-effect get` | CLI-token-only versioned REST | read | approval-effect.md |
19
+ | `ae-cli agent approval-effect retry` | CLI-token-only versioned REST | high-risk-write | approval-effect.md |
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: ae-analysis
3
- version: 4.2.0
3
+ version: 4.2.2
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
 
@@ -8,9 +8,11 @@ description: "Use ae-cli for AE/TE analysis-side data questions, asset operation
8
8
 
9
9
  This is the single entry skill for analysis intent and command execution.
10
10
 
11
- ## Before any command
11
+ ## Route before reading
12
12
 
13
- 1. If the command family is already known, open its dedicated reference directly. Otherwise search only the matching row in [`references/command_index.md`](references/command_index.md) (for example with `rg`); do not read the exhaustive index end to end.
13
+ 1. Map the request to a command family before opening any reference.
14
+ - Known family: open only its dedicated reference. For example, a retention request goes directly to `references/adhoc_run.md` plus the `retention` section of `references/ai_models.md`.
15
+ - Unknown family: search [`references/command_index.md`](references/command_index.md) with `rg` or an equivalent text-search tool and keep only the matching rows. `command_index.md` is a search-only fallback; never open it with a whole-file read or print the entire file.
14
16
  2. Read the selected command's dedicated reference before composing it:
15
17
  - `event list` -> `references/event_list.md`
16
18
  - `analysis dashboard list` -> `references/dashboard_list.md`
@@ -20,7 +22,7 @@ This is the single entry skill for analysis intent and command execution.
20
22
  5. For analysis data retrieval, choose `run` or `export` using [`references/analysis_data_retrieval.md`](references/analysis_data_retrieval.md).
21
23
  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).
22
24
 
23
- The generated command index is exhaustive. This file contains routing and workflow rules only; do not duplicate a hand-maintained command inventory here.
25
+ Routing is complete when one command family and its dedicated references are selected. The generated command index is exhaustive and must stay out of model context except for matching search rows. This file contains routing and workflow rules only; do not duplicate a hand-maintained command inventory here.
24
26
 
25
27
  ## Boundaries and priority
26
28
 
@@ -111,9 +113,10 @@ When the request can map to a saved business definition:
111
113
 
112
114
  1. Extract metric, dimensions, filters, time window, and comparison semantics.
113
115
  2. Search reports; use dashboard search only to discover candidate embedded reports.
114
- 3. Read the candidate definition and verify semantic equality, not merely a similar name.
115
- 4. Use report/dashboard data when the definition matches.
116
- 5. Use `analysis adhoc run|export` when no definition matches, the user explicitly requests ad-hoc exploration, or custom grouping/filtering is required.
116
+ 3. Before querying a selected dashboard's report data, call `analysis dashboard get` exactly once with the verified project and dashboard IDs. Preserve non-empty `location.folder_name`, `dashboard_name`, `remark`, and `notes[].note_title/description` as authored dashboard context for all results from that dashboard. Do not repeat the detail call per report.
117
+ 4. Read the candidate definition and verify semantic equality, not merely a similar name.
118
+ 5. Use report/dashboard data when the definition matches.
119
+ 6. Use `analysis adhoc run|export` when no definition matches, the user explicitly requests ad-hoc exploration, or custom grouping/filtering is required.
117
120
 
118
121
  Do not call removed QP builders or schema helpers for ad-hoc analysis. `--definition` is the AI-facing contract from `ai_models.md`, not raw QP or a frontend DTO.
119
122
 
@@ -165,6 +168,7 @@ For attribution, use the algorithms and self-checks in [`references/analysis_int
165
168
  - Include the metric, time window, dimension/filter scope, value, and baseline needed to reproduce it.
166
169
  - Separate observed evidence from inferred causes and state uncertainty.
167
170
  - For attribution, include total absolute/percentage change and dimension contributions sorted by absolute delta; verify the contribution sum.
171
+ - For saved dashboard answers, use non-empty `location.folder_name`, `dashboard_name`, `remark`, and `notes[].note_title/description` to establish business scope. Label folder names and notes as authored context, separately from observed query evidence.
168
172
  - Do not return an unexplained raw table.
169
173
  - State missing data, definition, permission, or capability constraints explicitly.
170
174
 
@@ -66,4 +66,6 @@ Execution failures are returned as command failures with `request_id`; only the
66
66
 
67
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.
68
68
 
69
+ For a complex definition, finish the complete user-requested definition first, validate that exact definition once, and then run the same definition once. Never execute a simplified variant that omits requested filters or groups just to obtain a result. If validation rejects fields, inspect this command's model contract or capability schema once, correct all reported fields together, and revalidate the complete definition.
70
+
69
71
  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.
@@ -178,6 +178,33 @@ Use for retained/lost users from an initial event to a return event.
178
178
 
179
179
  Use `stat_type=lost` for lost-user analysis. Use `rtn_rate_or_num=count` when the user asks for user counts instead of rates.
180
180
 
181
+ Initial-event and return-event property filters use the retention-specific shape below. Put them inside `retention`; use `event_property_name` instead of a generic `field` object. Do not use top-level `filters`, `retention.filters`, or `initial_event_filters`.
182
+
183
+ ```json
184
+ {
185
+ "time_range": {"mode": "custom", "start_time": "2026-08-18 00:00:00", "end_time": "2026-08-18 23:59:59"},
186
+ "time_particle_size": "day",
187
+ "retention": {
188
+ "initial_event": "register",
189
+ "initial_filters": [
190
+ {"event_property_name": "case_id", "operator": "eq", "values": ["retention_test"]}
191
+ ],
192
+ "initial_filter_relation": "and",
193
+ "return_event": "login",
194
+ "return_filters": [
195
+ {"event_property_name": "case_id", "operator": "eq", "values": ["retention_test"]}
196
+ ],
197
+ "return_filter_relation": "and",
198
+ "stat_type": "retention",
199
+ "unit_num": 1,
200
+ "rtn_rate_or_num": "rate",
201
+ "groups": [
202
+ {"field": {"name": "channel", "type": "event_property"}}
203
+ ]
204
+ }
205
+ }
206
+ ```
207
+
181
208
  ### `funnel`
182
209
 
183
210
  Use for ordered conversion steps with a conversion window.
@@ -97,8 +97,8 @@ Prefer the run/artifact commands over hand-written HTTP, Python, or curl. Analys
97
97
  | `dashboard-report add` | `analysis.dashboard_report.add` | Add reports to a dashboard | `--dashboard-id`, `--report-ids` | Add result |
98
98
  | `dashboard list` | `analysis.dashboard.list` | Find accessible dashboards | `--project-id`, optional `--queries`, `--fields`, `--limit`, `--offset` | Paginated dashboard summaries |
99
99
  | `dashboard create` | `analysis.dashboard.create` | Create a dashboard | `--project-id`, `--dashboard-name`, optional `--space-id`, `--folder-id` | Created dashboard |
100
- | `dashboard get` | `analysis.dashboard.get` | Inspect one dashboard definition/share/report structure, including creator and creation/update time | `--project-id`, `--dashboard-id` | Dashboard detail |
101
- | `dashboard update` | `analysis.dashboard.update` | Update settings or upsert a note | `--operation settings|note-upsert`, IDs, optional `--payload` | Update result |
100
+ | `dashboard get` | `analysis.dashboard.get` | Inspect one dashboard location/definition/share/report structure, including notes, creator, and creation/update time | `--project-id`, `--dashboard-id` | Dashboard detail with location and normalized notes |
101
+ | `dashboard update` | `analysis.dashboard.update` | Update settings, upsert a note, or replace the dashboard-level business filter | `--operation settings|note-upsert|business-filter`, IDs, optional `--filter`/`--payload` | Update result |
102
102
  | `dashboard share-info` | `analysis.dashboard.share_info` | Read dashboard sharing info | `--project-id`, `--dashboard-id` | Share info |
103
103
  | `dashboard share` | `analysis.dashboard.share` | Modify dashboard sharing | `--project-id`, `--dashboard-id`, `--payload` or `--member-authorities` | Share update result |
104
104
  | `dashboard delete` | `analysis.dashboard.delete` | Delete dashboards | `--project-id`, `--dashboard-ids '[...]'` | Delete result |
@@ -130,6 +130,7 @@ Prefer the run/artifact commands over hand-written HTTP, Python, or curl. Analys
130
130
  | `bi-panel-page-data run` | `analysis.bi_panel_page_data.run` | Bounded inline BI page data | `--panel-id`, `--page-key`, `--result-type charts|summary` | Inline page data |
131
131
  | `bi-panel-page-data export` | `analysis.bi_panel_page_data.export` | Large/long BI page data | same as run, optional `--artifact-format jsonl` | Async artifact descriptor |
132
132
  | `project-space list` | `analysis.project_space.list` | Find accessible project spaces | `--project-id`, optional list filters | Paginated project spaces |
133
+ | `project-space business-filter-upsert` | `analysis.project_space.business_filter_upsert` | Create or replace the space-level business filter | `--project-id`, `--space-id`, `--filter` | Saved space filter |
133
134
  | `project-space get` | `analysis.project_space.get` | Inspect one project space | `--project-id`, `--space-id` | Project space detail |
134
135
  | `favorite add` | `analysis.favorite.add` | Favorite dashboard/BI/folder | required `--asset-id`, `--asset-type`; optional `--space-id` | Favorite result |
135
136
  | `favorite remove` | `analysis.favorite.remove` | Remove favorite | same as add | Remove result |
@@ -2,6 +2,8 @@
2
2
 
3
3
  <!-- Generated by scripts/generate-analysis-skill-index.mts. Do not edit manually. -->
4
4
 
5
+ **Search-only fallback:** search this file for matching command rows. When the command family is already known, open its dedicated reference directly. Never load or print this exhaustive file in full.
6
+
5
7
  This is the exhaustive command and flag inventory for the analysis skill. Read the linked command reference for routing, semantic input contracts, output interpretation, and cases where the command must not be used.
6
8
 
7
9
  | Command | Capability ID | Risk | Flags | Reference |
@@ -41,7 +43,7 @@ This is the exhaustive command and flag inventory for the analysis skill. Read t
41
43
  | `ae-cli analysis dashboard share` | analysis.dashboard.share | write | `--project-id` (number; required) — Numeric project ID.<br>`--dashboard-id` (number; required) — Dashboard ID.<br>`--member-authorities` (json; optional) — Complete user authority map: {"<numeric_user_id>":"READ\|EDIT\|CREATOR\|MAINTAIN"}. An empty object removes all directly shared users.<br>`--payload` (json; optional) — Optional snake_case object for complex capability payload fields. | [dashboard_share.md](dashboard_share.md) |
42
44
  | `ae-cli analysis dashboard share-info` | analysis.dashboard.share_info | read | `--project-id` (number; required) — Numeric project ID.<br>`--dashboard-id` (number; required) — Dashboard ID. | [dashboard_share_info.md](dashboard_share_info.md) |
43
45
  | `ae-cli analysis dashboard task-status` | analysis.dashboard.task_status | read | `--project-id` (number; required) — Numeric project ID.<br>`--dashboard-id` (number; required) — Dashboard ID. | [dashboard_task_status.md](dashboard_task_status.md) |
44
- | `ae-cli analysis dashboard update` | analysis.dashboard.update | write | `--project-id` (number; required) — Numeric project ID.<br>`--operation` (string; required) — Update operation: settings or note-upsert.<br>`--dashboard-id` (number; optional) — Dashboard ID for a single-dashboard update.<br>`--dashboard-ids` (json; optional) — Dashboard ID array for batch settings updates.<br>`--dashboard-name` (string; optional) — Dashboard name for single rename.<br>`--zone-offset` (number; optional) — Fixed dashboard time zone offset in hours. For example, UTC+8 is 8 and UTC-5 is -5. Valid range: -12 to 14.<br>`--refresh-type` (number; optional, min=0, max=1) — Dashboard refresh type: 0 real-time, 1 scheduled.<br>`--dashboard-status` (string; optional) — Dashboard status: normal or freeze.<br>`--note-id` (number; optional) — Dashboard note ID. Omit to create a new note.<br>`--note-title` (string; optional) — Dashboard note title.<br>`--description` (string; optional) — Dashboard note description.<br>`--ui-config` (string; optional) — Dashboard or note UI config string.<br>`--payload` (json; optional) — Optional snake_case object for complex capability payload fields. | [dashboard_update.md](dashboard_update.md) |
46
+ | `ae-cli analysis dashboard update` | analysis.dashboard.update | write | `--project-id` (number; required) — Numeric project ID.<br>`--operation` (string; required) — Update operation: settings, note-upsert, or business-filter.<br>`--dashboard-id` (number; optional) — Dashboard ID for a single-dashboard update.<br>`--dashboard-ids` (json; optional) — Dashboard ID array for batch settings updates.<br>`--dashboard-name` (string; optional) — Dashboard name for single rename.<br>`--zone-offset` (number; optional) — Fixed dashboard time zone offset in hours. For example, UTC+8 is 8 and UTC-5 is -5. Valid range: -12 to 14.<br>`--refresh-type` (number; optional, min=0, max=1) — Dashboard refresh type: 0 real-time, 1 scheduled.<br>`--dashboard-status` (string; optional) — Dashboard status: normal or freeze.<br>`--note-id` (number; optional) — Dashboard note ID. Omit to create a new note.<br>`--note-title` (string; optional) — Dashboard note title.<br>`--description` (string; optional) — Dashboard note description.<br>`--ui-config` (string; optional) — Dashboard or note UI config string.<br>`--filter` (json; optional) — Dashboard-level business filter in snake_case QP form. Required with --operation business-filter. Pass {"junction_kind":"and","ta_filters":[]} to clear it.<br>`--payload` (json; optional) — Optional snake_case object for complex capability payload fields. | [dashboard_update.md](dashboard_update.md) |
45
47
  | `ae-cli analysis dashboard-daily-report get` | analysis.dashboard_daily_report.get | read | `--project-id` (number; required) — Numeric project ID.<br>`--dashboard-id` (number; required) — Dashboard ID. | [dashboard_daily_report_get.md](dashboard_daily_report_get.md) |
46
48
  | `ae-cli analysis dashboard-daily-report send` | analysis.dashboard_daily_report.send | write | `--project-id` (number; required) — Numeric project ID.<br>`--dashboard-id` (number; required) — Dashboard ID.<br>`--need-csv` (boolean; optional) — Whether to include CSV attachment.<br>`--host-url` (string; optional) — Public host URL used in report links.<br>`--send-title` (string; optional) — Daily report title.<br>`--send-content` (string; optional) — Daily report content.<br>`--lang` (string; optional) — Report language.<br>`--screen-type` (string; optional) — Screenshot screen type.<br>`--zone-offset` (number; optional) — Time zone offset.<br>`--email-login-users` (string; optional) — Comma-separated login users for email.<br>`--email-new` (string; optional) — Comma-separated direct email addresses. The server selects company SMTP or the default mail service.<br>`--dd-url` (json; optional) — DingTalk webhook URL array, e.g. ["https://..."].<br>`--wx-url` (json; optional) — WeCom webhook URL array, e.g. ["https://..."].<br>`--feishu-info` (json; optional) — Feishu image upload and bot config, e.g. {"app_id":"cli_xxx","app_secret":"secret_xxx","webhook":["https://..."]}.<br>`--kim-url` (json; optional) — KIM/custom webhook URL array, e.g. ["https://..."].<br>`--slack-url` (json; optional) — Slack webhook URL array, e.g. ["https://..."].<br>`--payload` (json; optional) — Optional snake_case object for complex capability payload fields. | [dashboard_daily_report_send.md](dashboard_daily_report_send.md) |
47
49
  | `ae-cli analysis dashboard-daily-report send-status` | analysis.dashboard_daily_report.send_status | read | `--project-id` (number; required) — Numeric project ID.<br>`--task-id` (number; required) — Task ID returned by dashboard-daily-report send. | [dashboard_daily_report_send_status.md](dashboard_daily_report_send_status.md) |
@@ -76,6 +78,7 @@ This is the exhaustive command and flag inventory for the analysis skill. Read t
76
78
  | `ae-cli analysis input-file inspect` | gateway lifecycle | read | `--input-file-id` (string; required) — Uploaded input file ID, for example ifile_<32 lowercase hex>. | [input_file_inspect.md](input_file_inspect.md) |
77
79
  | `ae-cli analysis input-file purpose list` | analysis.input_file.purpose.list | read | `--project-id` (number; required) — Numeric project ID. | [input_file_purpose_list.md](input_file_purpose_list.md) |
78
80
  | `ae-cli analysis input-file upload` | gateway lifecycle | write | `--project-id` (number; required) — Numeric project ID.<br>`--purpose` (string; required) — Purpose returned by analysis input-file purpose list.<br>`--file` (string; required) — Local file path to upload. | [input_file_upload.md](input_file_upload.md) |
81
+ | `ae-cli analysis project-space business-filter-upsert` | analysis.project_space.business_filter_upsert | write | `--project-id` (number; required) — Numeric project ID.<br>`--space-id` (number; required) — Project space ID.<br>`--filter` (json; required) — Space-level business filter in snake_case QP form. Pass {"junction_kind":"and","ta_filters":[]} to clear it. | [project_space_business_filter_upsert.md](project_space_business_filter_upsert.md) |
79
82
  | `ae-cli analysis project-space get` | analysis.project_space.get | read | `--project-id` (number; required) — Numeric project ID.<br>`--space-id` (number; required) — Project space ID.<br>`--fields` (json; optional) — Optional result field projection JSON array. | [project_space_get.md](project_space_get.md) |
80
83
  | `ae-cli analysis project-space list` | analysis.project_space.list | read | `--project-id` (number; required) — Numeric project ID.<br>`--queries` (json; optional) — Optional JSON array of 1 to 20 keyword filters. Results match any keyword.<br>`--fields` (json; optional) — Optional result field projection JSON array.<br>`--limit` (number; optional, min=1, max=200) — Directory page size. Default: 50, max: 200. Values outside 1..200 are rejected.<br>`--offset` (number; optional, min=0) — Zero-based directory page offset. Default: 0. Negative values are rejected. | [project_space_list.md](project_space_list.md) |
81
84
  | `ae-cli analysis public-link create` | analysis.public_link.create | write | `--project-id` (number; required) — Numeric project ID.<br>`--company-id` (number; optional) — Company ID. Derived from project ID when omitted.<br>`--resource-type` (string; required) — Resource type: dashboard or bi_panel.<br>`--resource-id` (number; required) — Target resource ID.<br>`--access-controls` (json; optional) — Public link access-control JSON.<br>`--remark` (string; optional) — Public link remark.<br>`--effective-at` (string; required) — Effective time, yyyy-MM-dd HH:mm:ss.<br>`--expires-at` (string; required) — Expiration time, yyyy-MM-dd HH:mm:ss.<br>`--payload` (json; optional) — Optional snake_case object for complex capability payload fields. | [public_link_create.md](public_link_create.md) |
@@ -1,6 +1,6 @@
1
1
  # analysis dashboard get
2
2
 
3
- Use when the user needs one dashboard detail, including basic metadata such as creator and create/update time, settings, reports, notes, and sharing information.
3
+ Use when the user needs one dashboard detail or when an agent needs the business context for dashboard report data. The detail includes location, creator and create/update time, settings, reports, notes, and sharing information.
4
4
 
5
5
  Do not use to query report result data. Use `dashboard-report-data run` or `dashboard-report-data export`.
6
6
 
@@ -12,4 +12,10 @@ ae-cli analysis dashboard get --project-id <project_id> --dashboard-id <dashboar
12
12
 
13
13
  Input sends `project_id`, `dashboard_id`, and optional `use_cache`.
14
14
 
15
- Output is the gateway envelope. `data` contains the dashboard detail returned by the capability gateway.
15
+ Output is the gateway envelope. `data` contains the dashboard detail returned by the capability gateway. Business-context fields are stable snake_case:
16
+
17
+ - `dashboard_id`, `dashboard_name`, and optional `remark` identify and describe the dashboard.
18
+ - `location` always contains `space_id`, `space_name`, `folder_id`, and `folder_name`; values are null when that level does not apply. `folder_name` is the immediate parent folder.
19
+ - `notes` is an array whose items contain `note_id`, `note_title`, and `description`.
20
+
21
+ When this detail is fetched before a dashboard data query, preserve non-empty `location.folder_name`, `dashboard_name`, `remark`, and `notes[].note_title/description` as dashboard context. Use them to interpret the report results, but distinguish this authored context from conclusions observed in the queried data.
@@ -2,7 +2,9 @@
2
2
 
3
3
  Execute bounded inline dashboard report data queries. Dashboard report data follows report-data model coverage: the 12 analysis report models from `ai_models.md` plus tag report data.
4
4
 
5
- Typical closed loop: find the dashboard -> inspect its reports -> resolve exact filter values when needed -> optionally resolve a physical query route -> run -> verify actual route and per-report warnings -> drill down through the returned report source.
5
+ Typical closed loop: find the dashboard -> inspect its dashboard context and reports -> resolve exact filter values when needed -> optionally resolve a physical query route -> run -> verify actual route and per-report warnings -> drill down through the returned report source.
6
+
7
+ Before the first data query for a selected dashboard, run `ae-cli analysis dashboard get` exactly once with the same `project_id` and `dashboard_id`. Preserve non-empty `location.folder_name`, `dashboard_name`, `remark`, and `notes[].note_title/description` as dashboard context for every report result in this dashboard query. A folder name such as `Campaign A` can provide business scope that a generic dashboard name such as `Base Data` does not. Treat notes as authored explanatory context, not as measured evidence. Do not repeat `dashboard get` for each report in the same continuous workflow unless the dashboard changes or the user explicitly requests a refresh.
6
8
 
7
9
  Routing: read [`analysis_data_retrieval.md`](analysis_data_retrieval.md) before choosing this `run` command instead of `dashboard-report-data export`.
8
10