@thinkingai/ae-cli 6.0.27 → 6.0.29

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 (111) hide show
  1. package/dist/capability-KVA55RMK.js +227 -0
  2. package/dist/capability-LKHLZQPD.js +227 -0
  3. package/dist/chunk-CWZUGF2J.js +26 -0
  4. package/dist/{chunk-YNQFYBDB.js → chunk-OJR23CIK.js} +12 -0
  5. package/dist/chunk-OO6XR6LK.js +26 -0
  6. package/dist/{chunk-C4DH76LX.js → chunk-P2JRP6HJ.js} +4 -21
  7. package/dist/{chunk-LG5YT7P7.js → chunk-S5XN6KEX.js} +4 -21
  8. package/dist/{chunk-BXMXMUD7.js → chunk-THBBNYXI.js} +12 -0
  9. package/dist/index.js +22 -11
  10. package/dist/{metadata-IPSPQBX3.js → metadata-6CCFV4K5.js} +11 -8
  11. package/dist/{metadata-N5REJ7R7.js → metadata-PDOIWH5O.js} +11 -8
  12. package/dist/{te-agent-QLIVKRUN.js → te-agent-FAIBM3SA.js} +5 -5
  13. package/dist/{te-analysis-QMZ2UH7F.js → te-analysis-DDXGM7WM.js} +1239 -470
  14. package/dist/{te-analysis-2U5EPXQC.js → te-analysis-HCDNYI7E.js} +1239 -470
  15. package/dist/{te-audience-XMRMVD2V.js → te-audience-ECFS4GF4.js} +11 -10
  16. package/dist/{te-audience-PVMKQAFH.js → te-audience-WO377T2J.js} +11 -10
  17. package/dist/{te-engage-AGREUOW7.js → te-engage-545HJL6J.js} +4 -4
  18. package/dist/{te-engage-MIIUKY6M.js → te-engage-M7JQSJDP.js} +4 -4
  19. package/dist/{te-kb-KQJ53M3A.js → te-kb-NT33UHAE.js} +1 -1
  20. package/dist/{te-meta-QLANJ4B4.js → te-meta-FADFLTDM.js} +3 -3
  21. package/dist/{te-meta-TOA6FWDE.js → te-meta-PKT27OTN.js} +3 -3
  22. package/dist/{te-team-TQGMNHQQ.js → te-team-RG75PR5D.js} +1 -1
  23. package/package.json +2 -1
  24. package/skills/ae-agent/SKILL.md +4 -3
  25. package/skills/ae-analysis/SKILL.md +88 -17
  26. package/skills/ae-analysis/references/analysis_gateway_assets.md +49 -14
  27. package/skills/ae-analysis/references/asset_abnormal_get.md +27 -0
  28. package/skills/ae-analysis/references/asset_abnormal_list.md +24 -0
  29. package/skills/ae-analysis/references/asset_authentication_list.md +23 -0
  30. package/skills/ae-analysis/references/asset_authentication_update.md +24 -0
  31. package/skills/ae-analysis/references/asset_recent_list.md +24 -0
  32. package/skills/ae-analysis/references/asset_search.md +24 -0
  33. package/skills/ae-analysis/references/bi_panel_get.md +5 -0
  34. package/skills/ae-analysis/references/bi_panel_share.md +6 -0
  35. package/skills/ae-analysis/references/bi_panel_update.md +4 -1
  36. package/skills/ae-analysis/references/bi_panel_version_get.md +23 -0
  37. package/skills/ae-analysis/references/bi_panel_version_publish.md +20 -0
  38. package/skills/ae-analysis/references/build_event_analysis_qp.md +1 -1
  39. package/skills/ae-analysis/references/build_funnel_analysis_qp.md +1 -1
  40. package/skills/ae-analysis/references/build_prop_analysis_qp.md +1 -1
  41. package/skills/ae-analysis/references/build_retention_analysis_qp.md +1 -1
  42. package/skills/ae-analysis/references/cancel_query.md +1 -1
  43. package/skills/ae-analysis/references/dashboard_daily_report_send.md +6 -1
  44. package/skills/ae-analysis/references/dashboard_report_data_export.md +6 -0
  45. package/skills/ae-analysis/references/dashboard_report_data_run.md +6 -0
  46. package/skills/ae-analysis/references/datatable_columns_get.md +24 -0
  47. package/skills/ae-analysis/references/datatable_influence_list.md +24 -0
  48. package/skills/ae-analysis/references/datatable_version_get.md +24 -0
  49. package/skills/ae-analysis/references/datatable_version_list.md +24 -0
  50. package/skills/ae-analysis/references/drilldown_user_events.md +4 -4
  51. package/skills/ae-analysis/references/event_changelog_list.md +24 -0
  52. package/skills/ae-analysis/references/event_create.md +24 -0
  53. package/skills/ae-analysis/references/event_delete.md +24 -0
  54. package/skills/ae-analysis/references/event_get.md +24 -0
  55. package/skills/ae-analysis/references/event_hide_update.md +25 -0
  56. package/skills/ae-analysis/references/event_influence_list.md +24 -0
  57. package/skills/ae-analysis/references/event_list.md +23 -0
  58. package/skills/ae-analysis/references/event_relation_update.md +24 -0
  59. package/skills/ae-analysis/references/event_update.md +26 -0
  60. package/skills/ae-analysis/references/exchange_config_update.md +24 -0
  61. package/skills/ae-analysis/references/exchange_rate_refresh.md +23 -0
  62. package/skills/ae-analysis/references/exchange_rule_list.md +23 -0
  63. package/skills/ae-analysis/references/exchange_rule_update.md +24 -0
  64. package/skills/ae-analysis/references/exchange_rule_validate.md +24 -0
  65. package/skills/ae-analysis/references/folder_create.md +18 -6
  66. package/skills/ae-analysis/references/folder_delete.md +21 -6
  67. package/skills/ae-analysis/references/folder_share.md +16 -6
  68. package/skills/ae-analysis/references/get_analysis_query_schema.md +17 -18
  69. package/skills/ae-analysis/references/get_report_definition.md +1 -1
  70. package/skills/ae-analysis/references/list_events.md +1 -1
  71. package/skills/ae-analysis/references/list_metrics.md +1 -1
  72. package/skills/ae-analysis/references/list_properties.md +1 -1
  73. package/skills/ae-analysis/references/metric_create.md +24 -0
  74. package/skills/ae-analysis/references/metric_delete.md +24 -0
  75. package/skills/ae-analysis/references/metric_get.md +24 -0
  76. package/skills/ae-analysis/references/metric_list.md +24 -0
  77. package/skills/ae-analysis/references/metric_update.md +24 -0
  78. package/skills/ae-analysis/references/project_space_create.md +19 -5
  79. package/skills/ae-analysis/references/project_space_delete.md +23 -6
  80. package/skills/ae-analysis/references/project_space_share.md +16 -6
  81. package/skills/ae-analysis/references/property_changelog_list.md +25 -0
  82. package/skills/ae-analysis/references/property_create.md +25 -0
  83. package/skills/ae-analysis/references/property_delete.md +25 -0
  84. package/skills/ae-analysis/references/property_get.md +25 -0
  85. package/skills/ae-analysis/references/property_hide_update.md +26 -0
  86. package/skills/ae-analysis/references/property_influence_list.md +25 -0
  87. package/skills/ae-analysis/references/property_list.md +24 -0
  88. package/skills/ae-analysis/references/property_related_events.md +24 -0
  89. package/skills/ae-analysis/references/property_relation_update.md +25 -0
  90. package/skills/ae-analysis/references/property_update.md +27 -0
  91. package/skills/ae-analysis/references/query_adhoc.md +34 -21
  92. package/skills/ae-analysis/references/super_metadata_export.md +36 -0
  93. package/skills/ae-analysis/references/super_metadata_import.md +24 -0
  94. package/skills/ae-analysis/references/update_report.md +3 -3
  95. package/skills/ae-analysis/references/virtual_event_create.md +25 -0
  96. package/skills/ae-analysis/references/virtual_event_delete.md +24 -0
  97. package/skills/ae-analysis/references/virtual_event_get.md +24 -0
  98. package/skills/ae-analysis/references/virtual_property_create.md +24 -0
  99. package/skills/ae-analysis/references/virtual_property_sql_rule_delete.md +25 -0
  100. package/skills/ae-analysis/references/virtual_property_sql_rule_update.md +24 -0
  101. package/skills/ae-capability/SKILL.md +103 -0
  102. package/skills/ae-community/SKILL.md +1 -1
  103. package/skills/ae-dataops/references/dataops-integration.md +3 -3
  104. package/skills/ae-engage/SKILL.md +5 -5
  105. package/skills/ae-generate-tracking-code/SKILL.md +16 -1
  106. package/skills/ae-generate-tracking-code/references/snippet-delivery.md +17 -1
  107. package/skills/ae-generate-tracking-plan/SKILL.md +30 -8
  108. package/skills/ae-metadata/references/metadata_data_table_sql_write.md +60 -8
  109. package/skills/ae-team/SKILL.md +1 -1
  110. package/skills/ae-analysis/references/folder_members.md +0 -15
  111. package/skills/ae-analysis/references/project_space_members.md +0 -15
@@ -0,0 +1,24 @@
1
+ # analysis-meta virtual-event delete
2
+
3
+ Use when the user needs to delete a virtual event rule.
4
+
5
+ Do not use this command for unrelated analysis queries, ad-hoc query construction, or MCP metadata discovery when an existing specialized command already fits the user's request.
6
+
7
+ Command:
8
+
9
+ ```bash
10
+ ae-cli analysis-meta virtual-event delete --project-id <project_id> --v-event-id <v_event_id>
11
+ ae-cli analysis-meta virtual-event delete --dry-run
12
+ ```
13
+
14
+ Capability id: `metadata.virtual_event.delete`.
15
+
16
+ Input sends `project_id`, `v_event_id`.
17
+
18
+ Output is the gateway envelope. `data` contains the common-service capability result.
19
+
20
+ ## Parameters
21
+ | Parameter | Required | Description |
22
+ |---|---|---|
23
+ | `--project-id` | Yes | Numeric project ID. |
24
+ | `--v-event-id` | Yes | Virtual event ID. |
@@ -0,0 +1,24 @@
1
+ # analysis-meta virtual-event get
2
+
3
+ Use when the user needs to get virtual event rule.
4
+
5
+ Do not use this command for unrelated analysis queries, ad-hoc query construction, or MCP metadata discovery when an existing specialized command already fits the user's request.
6
+
7
+ Command:
8
+
9
+ ```bash
10
+ ae-cli analysis-meta virtual-event get --project-id <project_id> --v-event-id <v_event_id>
11
+ ae-cli analysis-meta virtual-event get --dry-run
12
+ ```
13
+
14
+ Capability id: `metadata.virtual_event.get`.
15
+
16
+ Input sends `project_id`, `v_event_id`.
17
+
18
+ Output is the gateway envelope. `data` contains the common-service capability result.
19
+
20
+ ## Parameters
21
+ | Parameter | Required | Description |
22
+ |---|---|---|
23
+ | `--project-id` | Yes | Numeric project ID. |
24
+ | `--v-event-id` | Yes | Virtual event ID. |
@@ -0,0 +1,24 @@
1
+ # analysis-meta virtual-property create
2
+
3
+ Use when the user needs to create a SQL virtual event or user property.
4
+
5
+ Do not use this command for unrelated analysis queries, ad-hoc query construction, or MCP metadata discovery when an existing specialized command already fits the user's request.
6
+
7
+ Command:
8
+
9
+ ```bash
10
+ ae-cli analysis-meta virtual-property create --project-id <project_id> --payload '{}'
11
+ ae-cli analysis-meta virtual-property create --dry-run
12
+ ```
13
+
14
+ Capability id: `metadata.virtual_property.create`.
15
+
16
+ Input sends `project_id`, `payload`.
17
+
18
+ Output is the gateway envelope. `data` contains the common-service capability result.
19
+
20
+ ## Parameters
21
+ | Parameter | Required | Description |
22
+ |---|---|---|
23
+ | `--project-id` | Yes | Numeric project ID. |
24
+ | `--payload` | Yes | Capability payload JSON. |
@@ -0,0 +1,25 @@
1
+ # analysis-meta virtual-property sql-rule-delete
2
+
3
+ Use when the user needs to delete or revoke SQL virtual property rule.
4
+
5
+ Do not use this command for unrelated analysis queries, ad-hoc query construction, or MCP metadata discovery when an existing specialized command already fits the user's request.
6
+
7
+ Command:
8
+
9
+ ```bash
10
+ ae-cli analysis-meta virtual-property sql-rule-delete --project-id <project_id> --v-prop-id <v_prop_id> --operation <operation>
11
+ ae-cli analysis-meta virtual-property sql-rule-delete --dry-run
12
+ ```
13
+
14
+ Capability id: `metadata.virtual_property.sql_rule_delete`.
15
+
16
+ Input sends `project_id`, `v_prop_id`, `operation`.
17
+
18
+ Output is the gateway envelope. `data` contains the common-service capability result.
19
+
20
+ ## Parameters
21
+ | Parameter | Required | Description |
22
+ |---|---|---|
23
+ | `--project-id` | Yes | Numeric project ID. |
24
+ | `--v-prop-id` | Yes | Virtual property ID. |
25
+ | `--operation` | No | Delete operation. Use revoke to revoke instead of delete. |
@@ -0,0 +1,24 @@
1
+ # analysis-meta virtual-property sql-rule-update
2
+
3
+ Use when the user needs to update SQL virtual property rule.
4
+
5
+ Do not use this command for unrelated analysis queries, ad-hoc query construction, or MCP metadata discovery when an existing specialized command already fits the user's request.
6
+
7
+ Command:
8
+
9
+ ```bash
10
+ ae-cli analysis-meta virtual-property sql-rule-update --project-id <project_id> --payload '{}'
11
+ ae-cli analysis-meta virtual-property sql-rule-update --dry-run
12
+ ```
13
+
14
+ Capability id: `metadata.virtual_property.sql_rule_update`.
15
+
16
+ Input sends `project_id`, `payload`.
17
+
18
+ Output is the gateway envelope. `data` contains the common-service capability result.
19
+
20
+ ## Parameters
21
+ | Parameter | Required | Description |
22
+ |---|---|---|
23
+ | `--project-id` | Yes | Numeric project ID. |
24
+ | `--payload` | Yes | Capability payload JSON. |
@@ -0,0 +1,103 @@
1
+ ---
2
+ name: ae-capability
3
+ version: 1.2.0
4
+ description: "AE/TE capability gateway discovery and generic invocation with ae-cli. Use when the user needs to list or search available capabilities, inspect an unknown capability schema/risk/auth contract, dry-run a capability, or invoke a long-tail capability that has no curated ae-cli command. Always discover and inspect before composing input; never guess capability IDs or input fields."
5
+ ---
6
+
7
+ # ae-capability
8
+
9
+ Use this skill for progressive capability discovery and generic gateway invocation. Prefer a domain-specific curated command when one exists; use `ae-cli capability ...` for discovery and long-tail capabilities.
10
+
11
+ ## Decision Order
12
+
13
+ 1. Use a domain skill and its curated command when it directly covers the task.
14
+ 2. Otherwise search the capability catalog.
15
+ 3. Inspect the selected capability before constructing input.
16
+ 4. Dry-run with real input when helpful.
17
+ 5. Run after dry-run succeeds; obtain chat confirmation only for delete capabilities.
18
+
19
+ Never guess a capability ID, input field, enum value, resource ID, or project ID.
20
+
21
+ ## Skill references
22
+
23
+ Default: **do not** create a standalone skill reference for every new capability. Use `search` → `inspect` → `dry-run` → `run`; catalog `description`, `risk`, and `inspect` `input_schema` are the contract.
24
+
25
+ Create or keep a standalone reference only when at least one applies: L2 hard bar, easily confused with neighbors, `high-risk-write` delete workflow, or multi-step orchestration. Domain skills may inline one-line summaries in overview matrices (e.g. `analysis_gateway_assets.md`). See [`capability-command-admission` §10](../../docs/capability-command-admission.md).
26
+
27
+ ## Commands
28
+
29
+ ```bash
30
+ # List summaries for one capability namespace.
31
+ ae-cli capability list --domain <domain>
32
+
33
+ # Search capability IDs and descriptions. All terms must match.
34
+ ae-cli capability search "<terms>" --domain <domain>
35
+
36
+ # Read input_schema, risk, auth, output, and dry-run support.
37
+ ae-cli capability inspect <capability-id>
38
+
39
+ # Validate and preview input without execution.
40
+ ae-cli capability dry-run <capability-id> --input '<json-object>'
41
+
42
+ # Execute after inspection (and dry-run when input is non-trivial).
43
+ ae-cli capability run <capability-id> --input '<json-object>'
44
+ ```
45
+
46
+ `--input` accepts:
47
+
48
+ - An inline JSON object.
49
+ - A JSON file path.
50
+ - `@<path>`.
51
+ - `-` to read JSON from stdin.
52
+
53
+ The capability namespace is inferred from `<capability-id>` for `inspect`, `dry-run`, and `run`. Use `--domain <domain>` only to override routing.
54
+
55
+ ## Risk Levels (aligned with lark-cli)
56
+
57
+ | `risk` | Meaning | Chat confirmation before `run`? | CLI `[y/N]` without `--yes`? |
58
+ | --- | --- | --- | --- |
59
+ | `read` | Query / list / inspect | No | No |
60
+ | `write` | Create, update, share, and other ordinary writes | No | No |
61
+ | `high-risk-write` | Delete or remove resources | **Yes** | **Yes** |
62
+
63
+ Legacy values such as `create`, `update`, or `delete` are normalized to this three-tier model (`delete` → `high-risk-write`; `create`/`update` → `write`).
64
+
65
+ ## Safety
66
+
67
+ - `list`, `search`, `inspect`, and `dry-run` never execute business mutations.
68
+ - `capability run` inspects metadata before execution when `--yes` is absent.
69
+ - Only `high-risk-write` requires chat confirmation before `capability run ... --yes`.
70
+ - `read` and `write` may run directly after inspect/dry-run.
71
+ - Use `--yes` on delete runs only after the user explicitly authorizes execution in chat.
72
+ - Global `--dry-run` on `capability run` calls the gateway dry-run endpoint instead of execute.
73
+
74
+ ## High-Risk Confirmation Workflow (Agent)
75
+
76
+ Applies only when `inspect` shows `risk=high-risk-write`.
77
+
78
+ User intent (for example "delete this space") is **not** execution authorization. Do not pass `--yes` just because the user stated the desired action.
79
+
80
+ 1. Run `capability inspect` and `capability dry-run` with the final input.
81
+ 2. **Stop in the same turn.** Do not call `capability run` in the same turn as dry-run.
82
+ 3. Summarize in chat: capability ID, `project_id`, key input fields, and `risk=high-risk-write`.
83
+ 4. Ask the user to confirm execution. Prefer `AskUserQuestion` when that tool is available; otherwise ask in plain text and wait for the user's **next message**.
84
+ 5. Only after the user replies with explicit authorization (for example `confirm`, `execute`, or `yes`) run `capability run ... --yes` with the same input as dry-run.
85
+
86
+ For `risk=write`, run directly after a successful dry-run; no chat confirmation gate.
87
+
88
+ Never pass `--yes` on the first delete attempt. CLI terminal `[y/N]` prompts do not work in Agent Bash; chat confirmation is the real gate for `high-risk-write`.
89
+
90
+ ## Output
91
+
92
+ - `list` returns `{ domain, count, capabilities }`.
93
+ - `search` returns `{ domain, query, count, capabilities }`.
94
+ - `inspect`, `dry-run`, and `run` return gateway data in the standard ae-cli envelope.
95
+
96
+ ## Examples
97
+
98
+ ```bash
99
+ ae-cli capability search "dashboard list" --domain analysis
100
+ ae-cli capability inspect analysis.dashboard.list
101
+ ae-cli capability dry-run analysis.dashboard.list --input '{"project_id":1}'
102
+ ae-cli capability run analysis.dashboard.list --input input.json
103
+ ```
@@ -214,4 +214,4 @@ Structured multi-step reports (MCP tool chains) — open the linked reference fo
214
214
 
215
215
  ## Write operations
216
216
 
217
- Most community commands are **read-only**. If new write-capable commands are added later, confirm user intent and use `--yes` where the CLI marks **`risk: write`**.
217
+ Most community commands are **read-only**. If new write-capable commands are added later, confirm user intent and use `--yes` where the CLI marks **`risk: high-risk-write`**.
@@ -236,10 +236,10 @@ ae-cli dataops_integration +stop_sync_solution --spaceCode "${spaceCode}" \
236
236
  - **Datasource component template**: `+get_datasource_component_template` requires only `--componentName`. It returns component metadata, `requiredFields`, `optionalFields`, `envJsonExampleObject`, and `importantNotes`.
237
237
  - **Datasource list**: `+list_space_datasources` requires `--spaceCode`; `--datasourceName` and `--componentName` are optional filters. It returns datasource summary fields including `datasourceId`, `dataSourceComponentName`, `dataSourceName`, `dataSourceRemark`, `dataSourceStatus`, `connectStatus`, `syncTaskNum`, and `sharedConfig`.
238
238
  - **Datasource detail**: `+get_datasource_detail` requires `--spaceCode` and `--datasourceName`. It returns `datasourceId`, `dataSourceComponentName`, `dataSourceName`, `dataSourceRemark`, `dataSourceStatus`, `connectStatus`, `syncTaskNum`, `sharedConfig`, masked `connectConfig`, `connectFails`, and `lastConnectTime`.
239
- - **Datasource creation**: `+add_datasource` creates directly after the CLI write confirmation. `envJsonList` must be a JSON array string using keys from the component template `requiredFields`; `sharedConfig=true` uses one config for DEV/PROD, while `sharedConfig=false` requires two configs (DEV, PROD).
239
+ - **Datasource creation**: `+add_datasource` creates directly (`risk: write`, no CLI confirmation). `envJsonList` must be a JSON array string using keys from the component template `requiredFields`; `sharedConfig=true` uses one config for DEV/PROD, while `sharedConfig=false` requires two configs (DEV, PROD).
240
240
  - **Datasource connection test**: `+test_datasource_connect` requires `--spaceCode` and `--datasourceName`. It tests the saved datasource config and returns `datasourceName`, `connectStatus`, `connectFails`, `lastConnectTime`, and `nextAction`.
241
- - **Datasource modification**: `+modify_datasource` creates no preview; it updates only provided optional fields after the CLI write confirmation. Use `--envJsonList` with the same JSON array format as `+add_datasource`.
242
- - **Datasource online**: `+online_datasource` requires `--spaceCode` and `--dataSourceNames`. It executes after the CLI write confirmation and returns `failDataSources` and `successDataSourceNames`.
241
+ - **Datasource modification**: `+modify_datasource` creates no preview; it updates only provided optional fields (`risk: write`). Use `--envJsonList` with the same JSON array format as `+add_datasource`.
242
+ - **Datasource online**: `+online_datasource` requires `--spaceCode` and `--dataSourceNames`. It executes directly (`risk: write`) and returns `failDataSources` and `successDataSourceNames`.
243
243
  - **Sync datasources**: `+list_sync_datasources` requires `--spaceCode`; `--env` is optional and defaults to `DEV`. It returns `sourceComponentSet` and `sinkComponentSet`, grouped by component, with `dataSourceList` and `supportableComponent`.
244
244
  - **Datasource databases**: `+list_datasource_databases` requires `--spaceCode` and `--datasourceId`; `--catalog` and `--env` are optional, and `--env` defaults to `DEV`. It returns an array of objects with `databaseName`.
245
245
  - **Datasource tables**: `+list_datasource_tables` requires `--spaceCode`, `--datasourceId`, and `--database`; `--catalog` and `--env` are optional, and `--env` defaults to `DEV`. It returns table metadata including `database`, `tableName`, `tableType`, `tableComment`, `engine`, `disabled`, `disabledReasons`, `sameVersion`, and `supportSharding`.
@@ -228,12 +228,12 @@ Commands that accept date parameters usually use `yyyy-MM-dd`, for example `--st
228
228
 
229
229
  ## Write Operation Reminder
230
230
 
231
- The following commands are write operations. Confirm that the user intent is explicit before executing them:
231
+ High-risk delete commands (`risk: high-risk-write`) require explicit user authorization before execution. Ordinary write commands (`risk: write`) do not:
232
232
 
233
- - Channels and config channels: `+add_channel`, `+delete_channel`, `+update_channel_status`, `+delete_config_channel`, `+update_config_channel_status`
234
- - Strategies and config items: `+delete_config_item`, `+copy_config_template`, `+manage_strategy`
235
- - Flows: `+save_flow`, `+modify_flow_base_info`, `+manage_flow`, `+delete_flow`
236
- - Tasks: `+save_task`, `+manage_task`
233
+ - Channels and config channels: `+add_channel` (write), `+delete_channel` (high-risk-write), `+update_channel_status` (write), `+delete_config_channel` (high-risk-write), `+update_config_channel_status` (write)
234
+ - Strategies and config items: `+delete_config_item` (high-risk-write), `+copy_config_template` (write), `+manage_strategy` (write)
235
+ - Flows: `+save_flow` (write), `+modify_flow_base_info` (write), `+manage_flow` (write), `+delete_flow` (high-risk-write)
236
+ - Tasks: `+save_task` (write), `+manage_task` (write)
237
237
 
238
238
  For task draft creation or update, use this workflow:
239
239
 
@@ -97,7 +97,8 @@ First, check if `.ae-cli/draft.json` exists and read existing configuration:
97
97
  - If the project is missing, ambiguous, or has no `appId`, ask the user to copy APP_ID from AE Admin → "Project Settings" → "Integration Config".
98
98
  2. **SERVER_URL** — Data ingestion endpoint (**different from web URL**; go to AE Admin → "Project Settings" → "Integration Config" → fill in "Public URL")
99
99
  - If `meta.project_id` is known, you may try `ae-cli analysis_meta +get_project_config --project_id <project_id>` once.
100
- - Use the returned value only if the response explicitly contains a receiver URL field such as `serverUrl`, `pushUrl`, `push_url`, `receiverUrl`, `publicUrl`, or equivalent ingestion endpoint field.
100
+ - Use the returned value only if the response explicitly contains a receiver URL field such as `serverUrl`, `pushUrl`, `push_url`, `receiverUrl`, `publicUrl`, `publicReceiverAddress`, `privateReceiverAddress`, or equivalent ingestion endpoint field.
101
+ - If both `publicReceiverAddress` and `privateReceiverAddress` are present, prefer `publicReceiverAddress` as `SERVER_URL` for generated snippets unless the user explicitly needs an internal/private-network receiver.
101
102
  - If a value is found, ask: **"I found SERVER_URL `<url>` for project `<projectId>`. Use it? yes / enter new value"**
102
103
  - ⚠️ "Public URL" only shows if previously filled in; if empty, this field won't display
103
104
  - Solution: ask ops for the URL, or **skip this step** (use `SERVER_URL` or `PUSH_URL` placeholder in code)
@@ -507,6 +508,20 @@ Upload list rules:
507
508
  - Include generated debug scripts if the user selected the debug option.
508
509
  - Do not upload files inserted directly into the user's project; only upload generated output artifacts.
509
510
 
511
+ ### Attachment upload compatibility
512
+
513
+ The Agent attachment backend accepts a limited document MIME set. Code/config artifacts such as `.java`, `.kt`, `.swift`, `.m`, `.ets`, `.cs`, `.py`, `.go`, `.ts`, `.js`, `.php`, and `.json` may be rejected if uploaded directly.
514
+
515
+ Before running `ae-cli agent +add-attachment`, prepare the upload list as follows:
516
+ - Keep every original generated file unchanged under `.ae-cli/output/`.
517
+ - For each generated text artifact whose extension may be unsupported by the attachment backend, create an upload-only sibling copy by appending `.txt` to the filename.
518
+ - Example: `.ae-cli/output/java-sdk.java` → `.ae-cli/output/java-sdk.java.txt`
519
+ - Example: `.ae-cli/output/daemon.json` → `.ae-cli/output/daemon.json.txt`
520
+ - The `.txt` copy must have identical content to the original file. Do not wrap it in markdown fences, do not add headers, and do not change line endings intentionally.
521
+ - Upload the `.txt` compatibility copies instead of the unsupported originals.
522
+ - Keep `.md`, `.txt`, and `.csv` artifacts in the upload list as-is.
523
+ - In the final response, list the original deliverable paths first, then mention any `.txt` compatibility copies used only for attachment upload.
524
+
510
525
  If upload succeeds, include the attachment upload result in the final response and tell the user the files are available from the file/attachment management entry. If upload fails because Agent attachment credentials are unavailable, keep the local `.ae-cli/output/` files and tell the user the upload did not complete.
511
526
 
512
527
  ### All snippets
@@ -247,6 +247,22 @@ Upload list must include:
247
247
 
248
248
  Only upload generated output artifacts. Do not upload files inserted directly into the user's project.
249
249
 
250
+ ### Upload Compatibility for Code and Config Files
251
+
252
+ The attachment upload endpoint accepts a limited document MIME set. Many generated tracking artifacts are valid text files but have extensions that may be rejected by the backend when uploaded directly, including `.java`, `.kt`, `.swift`, `.m`, `.ets`, `.cs`, `.py`, `.go`, `.ts`, `.js`, `.php`, and `.json`.
253
+
254
+ Before calling `ae-cli agent +add-attachment`, build an upload-safe file list:
255
+
256
+ 1. Keep the original generated files unchanged in `.ae-cli/output/`.
257
+ 2. For each unsupported text artifact, create a sibling upload-only copy with `.txt` appended to the original filename.
258
+ - `.ae-cli/output/android-sdk-java.java` → `.ae-cli/output/android-sdk-java.java.txt`
259
+ - `.ae-cli/output/daemon.json` → `.ae-cli/output/daemon.json.txt`
260
+ 3. Copy the content exactly. Do not add markdown fences, comments, titles, or any extra bytes beyond the original text content.
261
+ 4. Upload the `.txt` compatibility copies instead of the unsupported originals.
262
+ 5. Upload already-supported text artifacts such as `.md`, `.txt`, and `.csv` directly.
263
+
264
+ The final deliverable list should still point users to the original generated files. Mention the `.txt` files only as attachment-upload compatibility copies.
265
+
250
266
  If upload succeeds, report that the files are available from the file/attachment management entry. If upload fails because Agent attachment credentials are unavailable, preserve the local output files and report the upload failure separately.
251
267
 
252
268
  ---
@@ -325,7 +341,7 @@ After generation, perform language style checks on each output file:
325
341
 
326
342
  #### Step 5: Upload Generated Artifacts
327
343
 
328
- Upload all generated `.ae-cli/output/` artifacts to the Agent attachment library using `ae-cli agent +add-attachment --yes --files '<json-array>'`.
344
+ Prepare upload compatibility copies for unsupported code/config extensions, then upload the safe file list to the Agent attachment library using `ae-cli agent +add-attachment --yes --files '<json-array>'`.
329
345
 
330
346
  ---
331
347
 
@@ -82,7 +82,7 @@ Phase 0 → 1 → 2 → 3 → 4, do not skip steps.
82
82
  > Determine `<user_lang>` from user's input language: Chinese→`zh`, English→`en`, Japanese→`ja`, Korean→`ko`. Other languages default to `en`.
83
83
  > All subsequent CLI commands must be prefixed with `AE_LANG=<user_lang>` to ensure CLI output and generated xlsx headers match the user's language.
84
84
 
85
- Collect the following **5 items** sequentially, **do NOT ask all at once**:
85
+ Collect the following **4 items** sequentially, **do NOT ask all at once**:
86
86
 
87
87
  ### Item 1 — Application Scenario
88
88
 
@@ -122,15 +122,16 @@ Reply with number(s), e.g. 1 or 1,3. Select up to 2.
122
122
  ```
123
123
 
124
124
  Do not rewrite this source material list as unnumbered bullets, cards, or prose. The user must be able to reply with the visible numbers.
125
+ When translating this prompt, preserve the numeric prefixes and line breaks exactly. Every visible option MUST be on its own line and MUST begin with `1 -`, `2 -`, `3 -`, etc. Never place two numbered options in the same paragraph or visual line. If a Markdown renderer may collapse soft line breaks, use Markdown hard line breaks (two trailing spaces before newline) rather than blank lines. Translation may change only the option text, not the numbering prefix or one-option-per-line structure.
125
126
 
126
127
  User can multi-select (max 2). Interpret numbers by the **visible list shown to the user**, not by the non-sandbox canonical list.
127
128
 
128
- Canonical source material options:
129
+ Canonical source material options (non-sandbox numbering):
129
130
 
130
- - **Product document** (local path, sandbox workspace path, uploaded attachment, URL, image file, or folder) — Extract events and properties from product docs; supports md/pdf/docx/URL/images (png/jpg/jpeg/webp)
131
- - **Detailed description** (conversational) — Describe app business flow, core features, user behaviors, monetization model, etc.
132
- - **Codebase** (local project path; hidden in sandbox) — Analyze source code to extract events and properties
133
- - **Pre-built template** (built-in industry and game genre templates) — Select a built-in template (run `AE_LANG=<user_lang> ae-cli tracking plan list-templates --json` to see available templates)
131
+ 1. **Product document** ****(****local path, sandbox workspace path, uploaded attachment, URL, image file, or folder) — Extract events and properties from product docs; supports md/pdf/docx/URL/images (png/jpg/jpeg/webp)
132
+ 2. **Detailed description** (conversational) — Describe app business flow, core features, user behaviors, monetization model, etc.
133
+ 3. **Codebase** (local project path; hidden in sandbox) — Analyze source code to extract events and properties
134
+ 4. **Pre-built template** (built-in industry and game genre templates) — Select a built-in template (run `AE_LANG=<user_lang> ae-cli tracking plan list-templates --json` to see available templates)
134
135
 
135
136
  Based on user selection, determine source material type and record to `meta.source_type`:
136
137
 
@@ -143,8 +144,29 @@ Based on user selection, determine source material type and record to `meta.sour
143
144
  | Any two-item combo | Join two types with `_` | First as baseline, second as supplement (priority: template → codebase → prd → chat) |
144
145
 
145
146
  **Follow-up questions** (ask in selection order):
146
- - Product doc → if not in a sandbox environment, ask **"What is the product document path? You can provide one or more paths, separated by commas or newlines (local paths, URLs, image files, or folders)"**
147
- - Product doc → if in a sandbox environment, ask **"What is the product document path? You can provide one or more sandbox workspace paths, uploaded attachment paths, URLs, image files, or folders. You can also attach/upload relevant files here, and I will read them from the sandbox workspace if available."**
147
+ - Product doc → if not in a sandbox environment, ask exactly:
148
+ ```text
149
+ What is the product document path?
150
+
151
+ You can provide one or more items, separated by commas or newlines:
152
+ 1. Local file path
153
+ 2. URL
154
+ 3. Image file path
155
+ 4. Folder path
156
+ ```
157
+ - Product doc → if in a sandbox environment, ask exactly:
158
+ ```text
159
+ What is the product document path?
160
+
161
+ You can provide one or more items, separated by commas or newlines:
162
+ 1. Sandbox workspace path
163
+ 2. Uploaded attachment path
164
+ 3. URL
165
+ 4. Image file path
166
+ 5. Folder path
167
+
168
+ You can also attach/upload relevant files here, and I will read them from the sandbox workspace if available.
169
+ ```
148
170
  - Detailed description → If too vague, follow up on core features, user behaviors, business flows, monetization
149
171
  - Codebase → ask **"What is the project directory path?"**, then scan source to extract business logic
150
172
  - Pre-built template → display matching templates for user confirmation
@@ -5,8 +5,8 @@
5
5
  ## Command
6
6
 
7
7
  ```bash
8
- ae-cli metadata data-table sql-write --project-id <project_id> --operation create --table-name datatable_<project_id>_<name> --columns '<columns_json>' --qp '<qp_json>' --zone-offset 8 --strategy overwrite --yes
9
- ae-cli metadata data-table sql-write --project-id <project_id> --operation update --data-table-id <id> --columns '<columns_json>' --qp '<qp_json>' --yes
8
+ ae-cli metadata data-table sql-write --project-id <project_id> --operation create --table-name datatable_<project_id>_<name> --columns '<columns_json>' --qp '<qp_json>' --zone-offset 8 --yes
9
+ ae-cli metadata data-table sql-write --project-id <project_id> --operation update --data-table-id <id> --columns '<columns_json>' --qp '<qp_json>' --strategy overwrite --update-cron '0 0 * * * ?' --yes
10
10
  ```
11
11
 
12
12
  ## Parameters
@@ -15,18 +15,70 @@ ae-cli metadata data-table sql-write --project-id <project_id> --operation updat
15
15
  |---|---|---|
16
16
  | `--project-id` / `-p` | Yes | Numeric project ID. |
17
17
  | `--operation` | Yes | `create` or `update`. |
18
- | `--columns` | Yes | Column definitions JSON array. Preferred fields are `column_name`, `column_type`, and `column_desc`; CLI also accepts `name`, `type`, and `display_name` aliases. |
19
- | `--qp` | Yes | SQL data table query plan JSON. |
18
+ | `--columns` | Yes | Column definitions JSON array. Preferred fields are `column_name`, `column_type`, and `column_desc`; CLI also accepts `name`, `type`, and `display_name` aliases. Must match SQL output column names. |
19
+ | `--qp` | Yes | `SqlDatatableDef` JSON object (see below). |
20
20
  | `--data-table-id` | For update | Existing data table ID. |
21
21
  | `--table-name` | For create | Technical table name. Use `datatable_<project_id>_<name>`. |
22
22
  | `--display-name` | No | Human-readable name. |
23
23
  | `--remarks` | No | Table remarks. |
24
24
  | `--zone-offset` | No | Time zone offset in hours. For example, UTC+8 is `8` and UTC-5 is `-5`. Valid range: -12 to 14. |
25
- | `--strategy` | No | `overwrite` or `insert`. |
26
- | `--update-cron` | No | Scheduled update cron. |
25
+ | `--strategy` | For update | `overwrite` or `insert`. Ignored for create. |
26
+ | `--update-cron` | For update | Scheduled update cron. Ignored for create. |
27
+
28
+ ## QP contract (`SqlDatatableDef`)
29
+
30
+ `--qp` must be a JSON object with this shape. **Do not** pass a top-level `sql` field.
31
+
32
+ ```json
33
+ {
34
+ "taSqlVo": {
35
+ "sql": "select '1' as id, 'demo' as name",
36
+ "sqlVoParams": []
37
+ },
38
+ "taSqlView": {}
39
+ }
40
+ ```
41
+
42
+ | Field | Required | Description |
43
+ |---|---|---|
44
+ | `taSqlVo` | Yes | SQL entity definition (`TaSqlVo`). |
45
+ | `taSqlVo.sql` | Yes | SELECT statement. Output columns must appear in `--columns`. |
46
+ | `taSqlVo.sqlVoParams` | No | Dynamic SQL parameters. Use `[]` when none. |
47
+ | `taSqlView` | No | SQL view (`TaSqlView`). Use `{}` when no dynamic view params. |
48
+ | `taSqlView.sqlViewParams` | No | View dynamic parameters. |
49
+
50
+ Inspect the live schema:
51
+
52
+ ```bash
53
+ ae-cli capability inspect metadata.data_table.sql_write
54
+ ```
55
+
56
+ ## Create example
57
+
58
+ ```bash
59
+ ae-cli metadata data-table sql-write \
60
+ --project-id 1 \
61
+ --operation create \
62
+ --table-name datatable_1_orders_dim \
63
+ --display-name "Orders dim" \
64
+ --columns '[{"name":"id","type":"string","display_name":"id"},{"name":"name","type":"string","display_name":"name"}]' \
65
+ --qp '{"taSqlVo":{"sql":"select '\''1'\'' as id, '\''demo'\'' as name","sqlVoParams":[]},"taSqlView":{}}' \
66
+ --zone-offset 8 \
67
+ --dry-run
68
+
69
+ ae-cli metadata data-table sql-write \
70
+ --project-id 1 \
71
+ --operation create \
72
+ --table-name datatable_1_orders_dim \
73
+ --display-name "Orders dim" \
74
+ --columns '[{"name":"id","type":"string","display_name":"id"},{"name":"name","type":"string","display_name":"name"}]' \
75
+ --qp '{"taSqlVo":{"sql":"select '\''1'\'' as id, '\''demo'\'' as name","sqlVoParams":[]},"taSqlView":{}}' \
76
+ --zone-offset 8
77
+ ```
27
78
 
28
79
  ## Decision Rules
29
80
 
30
- - This is a write command; use `--dry-run` before non-dry-run and pass `--yes` when executing.
31
- - Keep `columns` and `qp` as valid JSON; do not pass raw SQL unless the server schema requires it inside `qp`.
81
+ - This is a write command; use `--dry-run` before non-dry-run execution.
82
+ - Keep `columns` and `qp` as valid JSON. `qp` must follow `SqlDatatableDef`; dry-run validates structure but does not execute SQL.
32
83
  - If you provide a table name, it must include the project segment, for example `datatable_2_orders_sql`.
84
+ - If execute fails with `CAPABILITY_EXECUTION_FAILED`, fix qp structure first, then retry with a valid query before investigating backend SQL/Presto issues.
@@ -21,7 +21,7 @@ Global parameters:
21
21
  | `--format <json\|table>` | Output format. Default is JSON. |
22
22
  | `--jq <expr>` | jq filter expression for JSON output. |
23
23
  | `--host <url>` | Override the active AE host. Available on every command and may be placed after the subcommand, e.g. `ae-cli team +<command> --host <url>`. |
24
- | `--yes` | Skip confirmation for write operations. |
24
+ | `--yes` | Skip confirmation for `high-risk-write` (delete) operations. |
25
25
  | `--dry-run` | Show request details without executing. |
26
26
 
27
27
  Output and errors:
@@ -1,15 +0,0 @@
1
- # analysis folder members
2
-
3
- Use when the user needs to inspect folder members.
4
-
5
- Do not use to modify members. Use `folder share`.
6
-
7
- Command:
8
-
9
- ```bash
10
- ae-cli analysis folder members --project-id <project_id> --folder-id <folder_id>
11
- ```
12
-
13
- Input sends `project_id` and `folder_id`.
14
-
15
- Output is the gateway envelope. `data` contains folder members.
@@ -1,15 +0,0 @@
1
- # analysis project-space members
2
-
3
- Use when the user needs to inspect project-space members.
4
-
5
- Do not use to modify members. Use `project-space share`.
6
-
7
- Command:
8
-
9
- ```bash
10
- ae-cli analysis project-space members --project-id <project_id> --space-id <space_id>
11
- ```
12
-
13
- Input sends `project_id` and `space_id`.
14
-
15
- Output is the gateway envelope. `data` contains project-space members.