@thinkingai/ae-cli 6.0.24 → 6.0.27

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 (130) hide show
  1. package/dist/{auth-A2XXG5K4.js → auth-7TQRGLBC.js} +10 -8
  2. package/dist/{auth-IDPKDFSY.js → auth-MEJ642P4.js} +2 -2
  3. package/dist/chunk-2NDGFQHW.js +190 -0
  4. package/dist/{chunk-NGJDCOYA.js → chunk-7QQ4233A.js} +3 -3
  5. package/dist/{chunk-PFJFZVCK.js → chunk-AJTH7LT3.js} +3 -2
  6. package/dist/{chunk-V5R5UIRM.js → chunk-BXMXMUD7.js} +65 -6
  7. package/dist/{chunk-AKORWVHJ.js → chunk-C4DH76LX.js} +1 -1
  8. package/dist/{chunk-NXJP4CES.js → chunk-GWZ5MYWE.js} +3 -3
  9. package/dist/{chunk-F3ZDMC2W.js → chunk-KCA6BA5D.js} +2 -2
  10. package/dist/{chunk-WXBCP6SD.js → chunk-KGJQCYVC.js} +1 -1
  11. package/dist/{chunk-FIT4CFIN.js → chunk-LG5YT7P7.js} +1 -1
  12. package/dist/{chunk-IDXW6MEJ.js → chunk-MDJGDI6K.js} +2 -2
  13. package/dist/{chunk-4FQ36OGO.js → chunk-R77JT7XD.js} +53 -6
  14. package/dist/{chunk-65DKFJZB.js → chunk-YCLVYFK7.js} +49 -6
  15. package/dist/{chunk-2OW2RENH.js → chunk-YNQFYBDB.js} +64 -6
  16. package/dist/{chunk-ONOA6DYB.js → chunk-ZAOL36CG.js} +1 -1
  17. package/dist/cli-token-TVQRSE46.js +18 -0
  18. package/dist/{client-7L735LVY.js → client-2643Z5AG.js} +3 -3
  19. package/dist/{config-SXD2JKSL.js → config-ZVPARN4R.js} +4 -9
  20. package/dist/index.js +24 -24
  21. package/dist/{metadata-QWUAX625.js → metadata-IPSPQBX3.js} +5 -5
  22. package/dist/{metadata-XWTEGEN2.js → metadata-N5REJ7R7.js} +5 -5
  23. package/dist/{model-3OVX42DA.js → model-T3KZJWLW.js} +2 -2
  24. package/dist/{raw-IANB4AV5.js → raw-OHSUK42D.js} +4 -4
  25. package/dist/{sync-4HQ3CXSK.js → sync-ULT5SECP.js} +3 -3
  26. package/dist/{te-agent-OYNNTJDU.js → te-agent-QLIVKRUN.js} +1146 -61
  27. package/dist/{te-analysis-CRPFK3LX.js → te-analysis-2U5EPXQC.js} +207 -69
  28. package/dist/{te-analysis-JX3V76OI.js → te-analysis-QMZ2UH7F.js} +207 -69
  29. package/dist/{te-audience-RO2IZOUC.js → te-audience-PVMKQAFH.js} +5 -5
  30. package/dist/{te-audience-77FGNG5E.js → te-audience-XMRMVD2V.js} +5 -5
  31. package/dist/{te-common-4TRJPRC5.js → te-common-CFGQXTFV.js} +5 -5
  32. package/dist/{te-common-PUXBUPOL.js → te-common-SDB3O2QG.js} +5 -5
  33. package/dist/{te-community-XKE526DS.js → te-community-6A7LKYUH.js} +5 -5
  34. package/dist/{te-community-NPDZQKMY.js → te-community-GMWFGILT.js} +5 -5
  35. package/dist/{te-dataops-PW74WP76.js → te-dataops-6LIPYNGH.js} +90 -68
  36. package/dist/{te-dataops-6KWLFNV4.js → te-dataops-Z53CTG2U.js} +90 -68
  37. package/dist/{te-engage-HTLMUN7G.js → te-engage-AGREUOW7.js} +30 -15
  38. package/dist/{te-engage-YPQIVF5H.js → te-engage-MIIUKY6M.js} +30 -15
  39. package/dist/{te-kb-DOGDQIU4.js → te-kb-KQJ53M3A.js} +4 -4
  40. package/dist/{te-meta-5ESSQ5B3.js → te-meta-QLANJ4B4.js} +5 -5
  41. package/dist/{te-meta-Z47X4VT3.js → te-meta-TOA6FWDE.js} +5 -5
  42. package/dist/{te-team-SOVKZIDD.js → te-team-TQGMNHQQ.js} +5 -5
  43. package/package.json +3 -1
  44. package/skills/ae-agent/SKILL.md +158 -189
  45. package/skills/ae-agent/references/accept-skill-share.md +39 -0
  46. package/skills/ae-agent/references/add-attachment.md +57 -0
  47. package/skills/ae-agent/references/add-mcp.md +75 -0
  48. package/skills/ae-agent/references/add-model.md +70 -0
  49. package/skills/ae-agent/references/add-skill.md +71 -0
  50. package/skills/ae-agent/references/approve-skill.md +41 -0
  51. package/skills/ae-agent/references/attachment-stats.md +50 -0
  52. package/skills/ae-agent/references/auto-provision-mcp-credentials.md +57 -0
  53. package/skills/ae-agent/references/cancel-skill-submission.md +39 -0
  54. package/skills/ae-agent/references/copy-skill.md +53 -0
  55. package/skills/ae-agent/references/create-agent.md +71 -0
  56. package/skills/ae-agent/references/create-automation.md +99 -0
  57. package/skills/ae-agent/references/del-agent.md +38 -0
  58. package/skills/ae-agent/references/del-attachment.md +35 -0
  59. package/skills/ae-agent/references/del-mcp.md +35 -0
  60. package/skills/ae-agent/references/del-model.md +37 -0
  61. package/skills/ae-agent/references/del-skill-asset.md +41 -0
  62. package/skills/ae-agent/references/del-skill-reference.md +41 -0
  63. package/skills/ae-agent/references/del-skill-script.md +41 -0
  64. package/skills/ae-agent/references/del-skill.md +36 -0
  65. package/skills/ae-agent/references/edit-skill.md +64 -0
  66. package/skills/ae-agent/references/get-agent.md +37 -0
  67. package/skills/ae-agent/references/get-skill-content.md +36 -0
  68. package/skills/ae-agent/references/list-agents.md +40 -0
  69. package/skills/ae-agent/references/list-attachments.md +42 -0
  70. package/skills/ae-agent/references/list-automations.md +41 -0
  71. package/skills/ae-agent/references/list-mcp-credentials.md +65 -0
  72. package/skills/ae-agent/references/list-mcp-market.md +58 -0
  73. package/skills/ae-agent/references/list-mcps.md +37 -0
  74. package/skills/ae-agent/references/list-models.md +38 -0
  75. package/skills/ae-agent/references/list-skill-assets.md +35 -0
  76. package/skills/ae-agent/references/list-skill-market.md +59 -0
  77. package/skills/ae-agent/references/list-skill-references.md +36 -0
  78. package/skills/ae-agent/references/list-skill-scripts.md +35 -0
  79. package/skills/ae-agent/references/list-skill-shares.md +49 -0
  80. package/skills/ae-agent/references/list-skill-submissions.md +45 -0
  81. package/skills/ae-agent/references/list-skills.md +37 -0
  82. package/skills/ae-agent/references/mcp-auth-disconnect.md +50 -0
  83. package/skills/ae-agent/references/mcp-auth-start.md +61 -0
  84. package/skills/ae-agent/references/mcp-auth-status.md +56 -0
  85. package/skills/ae-agent/references/mcp-stats.md +68 -0
  86. package/skills/ae-agent/references/mcp-token.md +63 -0
  87. package/skills/ae-agent/references/mcp-tools.md +55 -0
  88. package/skills/ae-agent/references/read-skill-asset.md +51 -0
  89. package/skills/ae-agent/references/read-skill-reference.md +50 -0
  90. package/skills/ae-agent/references/read-skill-script.md +51 -0
  91. package/skills/ae-agent/references/reject-skill-share.md +37 -0
  92. package/skills/ae-agent/references/reject-skill.md +42 -0
  93. package/skills/ae-agent/references/rescan-skills.md +44 -0
  94. package/skills/ae-agent/references/set-mcp-credential.md +67 -0
  95. package/skills/ae-agent/references/set-mcp-meta.md +52 -0
  96. package/skills/ae-agent/references/set-skill-meta.md +51 -0
  97. package/skills/ae-agent/references/share-skill.md +50 -0
  98. package/skills/ae-agent/references/submit-skill.md +51 -0
  99. package/skills/ae-agent/references/test-model.md +61 -0
  100. package/skills/ae-agent/references/toggle-mcp.md +39 -0
  101. package/skills/ae-agent/references/toggle-model.md +37 -0
  102. package/skills/ae-agent/references/toggle-skill.md +37 -0
  103. package/skills/ae-agent/references/update-agent.md +71 -0
  104. package/skills/ae-agent/references/update-automation.md +83 -0
  105. package/skills/ae-agent/references/update-mcp.md +79 -0
  106. package/skills/ae-agent/references/update-model.md +77 -0
  107. package/skills/ae-agent/references/upload-skill-asset.md +49 -0
  108. package/skills/ae-agent/references/upload-skill-reference.md +51 -0
  109. package/skills/ae-agent/references/upload-skill-script.md +49 -0
  110. package/skills/ae-agent/references/upload-skill.md +89 -0
  111. package/skills/ae-analysis/SKILL.md +4 -2
  112. package/skills/ae-analysis/references/analysis_gateway_assets.md +21 -6
  113. package/skills/ae-analysis/references/artifact_download.md +17 -0
  114. package/skills/ae-analysis/references/bi_panel_page_data_export.md +11 -1
  115. package/skills/ae-analysis/references/dashboard_copy.md +3 -1
  116. package/skills/ae-analysis/references/dashboard_daily_report_send.md +4 -2
  117. package/skills/ae-analysis/references/dashboard_daily_report_update.md +3 -1
  118. package/skills/ae-analysis/references/dashboard_definition_export.md +21 -3
  119. package/skills/ae-analysis/references/dashboard_report_data_export.md +11 -1
  120. package/skills/ae-analysis/references/project_space_create.md +1 -1
  121. package/skills/ae-analysis/references/run_inspect.md +22 -0
  122. package/skills/ae-dataops/references/dataops-flow-create.md +2 -2
  123. package/skills/ae-dataops/references/dataops-flow-monitor.md +3 -3
  124. package/skills/ae-dataops/references/dataops-integration.md +1 -0
  125. package/skills/ae-engage/references/flow-node-config-schema.md +32 -8
  126. package/skills/ae-engage/references/save-flow.md +65 -29
  127. package/skills/ae-engage/references/validate-flow-node-config.md +28 -10
  128. package/skills/ae-generate-tracking-plan/SKILL.md +9 -7
  129. package/dist/chunk-OCQPQYHZ.js +0 -105
  130. package/dist/cli-token-OZXHC3U2.js +0 -14
@@ -0,0 +1,68 @@
1
+ # agent +mcp-stats (MCP Call Statistics)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
4
+
5
+ Domain: **MCP Servers / read**
6
+
7
+ ## Use Cases
8
+ - Show MCP tool call statistics for the current user over the last N days.
9
+ - Endpoint: `GET /api/sandbox/agent/mcp-servers/stats`.
10
+ - Returns aggregations: total calls, by-server, daily, and daily-by-server.
11
+
12
+ ## Mandatory Rules (MUST)
13
+ - `--days` must be an integer between 1 and 365 when provided; defaults to 30.
14
+ - Statistics are scoped to the authenticated user's own MCP usage.
15
+
16
+ ## Command
17
+ ```bash
18
+ # Default: last 30 days
19
+ ae-cli agent +mcp-stats
20
+
21
+ # Last 7 days
22
+ ae-cli agent +mcp-stats --days 7
23
+
24
+ # Dry-run to inspect the request
25
+ ae-cli agent +mcp-stats --dry-run --days 7
26
+ ```
27
+
28
+ ## Parameters
29
+ | Parameter | Required | Description |
30
+ |---|---|---|
31
+ | `--days` | No | Lookback window in days (1-365, default 30) |
32
+
33
+ ## Response Shape
34
+ ```json
35
+ {
36
+ "days": 30,
37
+ "totalCalls": 128,
38
+ "byServer": { "clxxx-server-a": 80, "clxxx-server-b": 48 },
39
+ "daily": [
40
+ { "date": "2026-06-07", "calls": 5 },
41
+ { "date": "2026-06-08", "calls": 0 }
42
+ ],
43
+ "dailyByServer": {
44
+ "clxxx-server-a": { "2026-06-07": 3, "2026-06-08": 0 }
45
+ }
46
+ }
47
+ ```
48
+
49
+ | Field | Description |
50
+ |---|---|
51
+ | `days` | The lookback window used for this query |
52
+ | `totalCalls` | Sum of all MCP tool calls over the window |
53
+ | `byServer` | Map of `mcpServerId` → call count |
54
+ | `daily` | Array of `{ date, calls }` for each day in the window (oldest → newest) |
55
+ | `dailyByServer` | Map of `mcpServerId` → `{ date: calls }` |
56
+
57
+ ## Decision Rules
58
+ - Use `--days 7` for a weekly review, `--days 30` (default) for a monthly review.
59
+ - `daily` always contains one entry per day in the window (zero-filled), so it is safe to chart directly.
60
+ - `byServer` only contains servers with at least one call in the window; cross-reference IDs with `+list-mcps` to resolve names.
61
+
62
+ ## Next Steps on Failure
63
+ - `--days must be an integer between 1 and 365`: pass an integer in range.
64
+ - `500` 获取 MCP 调用统计失败: an internal aggregation error — retry, then contact the platform maintainer if it persists.
65
+
66
+ ## Recommended Chaining
67
+ - `+mcp-stats` (which servers are active) → `+list-mcps` (resolve server IDs to names)
68
+ - `+mcp-stats` (low/no calls) → `+mcp-tools` (verify the server exposes tools) → `+mcp-auth-start` if `needs_auth`
@@ -0,0 +1,63 @@
1
+ # agent +mcp-token (Get MCP Token)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
4
+
5
+ Domain: **MCP Credentials / read**
6
+
7
+ ## Use Cases
8
+ - Get the plaintext MCP token for `useMcpToken=true` system MCP servers.
9
+ - Endpoint: `GET /api/sandbox/agent/mcp-credentials/mcp-token`.
10
+ - All such servers share one token; the server decrypts and returns it.
11
+ - This is a product behavior (consistent with the web UI) — the token is returned in plaintext so it can be used as a Bearer credential for MCP API calls.
12
+
13
+ ## Mandatory Rules (MUST)
14
+ - No flags required.
15
+ - The returned token is **plaintext** — handle it as a secret:
16
+ - Do NOT write it to shell history (avoid `export MCP_TOKEN=$(ae-cli agent +mcp-token)` without precautions).
17
+ - Do NOT log it or commit it to version control.
18
+ - Prefer piping directly to the consuming process or a secure store.
19
+ - The command prints a security warning to stderr (when a TTY is detected) reminding the user to safeguard the token.
20
+
21
+ ## Command
22
+ ```bash
23
+ # Get the MCP token (prints to stdout as JSON)
24
+ ae-cli agent +mcp-token
25
+
26
+ # Pipe to a file (avoid shell history)
27
+ ae-cli agent +mcp-token --format json > /dev/shm/mcp-token.json 2>/dev/null
28
+
29
+ # Dry-run to inspect the request
30
+ ae-cli agent +mcp-token --dry-run
31
+ ```
32
+
33
+ ## Parameters
34
+ | Parameter | Required | Description |
35
+ |---|---|---|
36
+ | (none) | — | — |
37
+
38
+ ## Decision Rules
39
+ - If the user needs the shared MCP token to call MCP-enabled APIs, use this command.
40
+ - The token is shared across all `useMcpToken=true` system MCP servers — a single call returns it.
41
+ - If `token` is `null`, no credential has been provisioned yet — run `+auto-provision-mcp-credentials` first.
42
+ - Prefer `+list-mcp-credentials` to check credential status without exposing the plaintext token.
43
+
44
+ ## Response Shape
45
+ ```json
46
+ {
47
+ "token": "mcp-xxxxxxxxxxxxxxxx"
48
+ }
49
+ ```
50
+
51
+ When no token is provisioned:
52
+ ```json
53
+ {
54
+ "token": null
55
+ }
56
+ ```
57
+
58
+ ## Next Steps on Failure
59
+ - `401` / auth expired: run `ae-cli auth login`.
60
+ - `token: null`: run `+auto-provision-mcp-credentials` to provision the token first.
61
+
62
+ ## Recommended Chaining
63
+ - `+auto-provision-mcp-credentials` (provision) → `+mcp-token` (retrieve) → use as `Authorization: bearer <token>` for MCP API calls
@@ -0,0 +1,55 @@
1
+ # agent +mcp-tools (List MCP Server Tools)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
4
+
5
+ Domain: **MCP Servers / read**
6
+
7
+ ## Use Cases
8
+ - List the tools exposed by an MCP server (name, description, input schema).
9
+ - Endpoint: `GET /api/sandbox/agent/mcp-servers/[id]/tools`.
10
+ - Includes OAuth auto-refresh: if the credential is about to expire, the server attempts a refresh before listing tools.
11
+
12
+ ## Mandatory Rules (MUST)
13
+ - `--id` is required. Obtain the real MCP server record ID (CUID) via `+list-mcps` — do not guess.
14
+ - The MCP server must be enabled and properly configured; otherwise the server returns a structured error.
15
+
16
+ ## Command
17
+ ```bash
18
+ ae-cli agent +mcp-tools --id <mcp-cuid>
19
+
20
+ # Dry-run to inspect the request
21
+ ae-cli agent +mcp-tools --dry-run --id <mcp-cuid>
22
+ ```
23
+
24
+ ## Parameters
25
+ | Parameter | Required | Description |
26
+ |---|---|---|
27
+ | `--id` | Yes | MCP server record ID (CUID) |
28
+
29
+ ## Decision Rules
30
+ - If the user wants to see what tools an MCP server provides, use this command.
31
+ - The response includes `server` (id, name, transport) and `tools` (array of `{name, description, inputSchema}`).
32
+ - If the server returns `needs_auth` (400), run `+mcp-auth-start` to start OAuth, then retry.
33
+ - If the server returns `reauth_required` (428), the credential has expired — run `+mcp-auth-start` to re-authorize.
34
+ - If the server returns `disabled` (400), enable the MCP first with `+toggle-mcp --enabled true`.
35
+
36
+ ## Response Shape
37
+ ```json
38
+ {
39
+ "server": { "id": "clxxx", "name": "my-mcp", "transport": "http" },
40
+ "tools": [
41
+ { "name": "search", "description": "Search the web", "inputSchema": { "type": "object", "properties": {} } }
42
+ ]
43
+ }
44
+ ```
45
+
46
+ ## Next Steps on Failure
47
+ - `404` / not found: re-run `+list-mcps` to verify the server ID.
48
+ - `400` needs_auth: run `+mcp-auth-start --id <id>`, then poll `+mcp-auth-status`.
49
+ - `428` reauth_required: credential expired — run `+mcp-auth-start` to re-authorize.
50
+ - `400` disabled: run `+toggle-mcp --id <id> --enabled true`.
51
+ - `502` connection_failed: verify the MCP server URL is reachable.
52
+
53
+ ## Recommended Chaining
54
+ - `+list-mcps` → confirm `id` → `+mcp-tools`
55
+ - `+mcp-tools` (fails needs_auth) → `+mcp-auth-start` → `+mcp-auth-status` → `+mcp-tools`
@@ -0,0 +1,51 @@
1
+ # agent +read-skill-asset (Read Skill Asset)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
4
+
5
+ Domain: **Skills / read**
6
+
7
+ ## Use Cases
8
+ - Read a Skill asset file's raw binary content (binary-safe).
9
+ - Endpoint: `GET /api/sandbox/agent/skills/[id]/assets/[...path]`.
10
+ - By default returns `{ content, fileName }` where content is best-effort UTF-8 text.
11
+ - Use `--output <path>` to save the raw binary content to a local file (preserves binary data).
12
+
13
+ ## Mandatory Rules (MUST)
14
+ - `--id` is required. Obtain the real Skill record ID (CUID) via `+list-skills` — do not guess.
15
+ - `--path` is required and specifies the relative file path within the assets directory.
16
+ - For binary files (images, PDFs, etc.), always use `--output` to avoid UTF-8 corruption.
17
+
18
+ ## Command
19
+ ```bash
20
+ # Read a text asset (default JSON output)
21
+ ae-cli agent +read-skill-asset --id <skill-cuid> --path guide.txt
22
+
23
+ # Save binary asset to local file
24
+ ae-cli agent +read-skill-asset --id <skill-cuid> --path icon.png --output ./icon.png
25
+
26
+ # Read from a sub-directory
27
+ ae-cli agent +read-skill-asset --id <skill-cuid> --path "sub/data.csv" --output ./data.csv
28
+
29
+ # Dry-run to inspect the request before executing
30
+ ae-cli agent +read-skill-asset --dry-run --id <skill-cuid> --path icon.png
31
+ ```
32
+
33
+ ## Parameters
34
+ | Parameter | Required | Description |
35
+ |---|---|---|
36
+ | `--id` | Yes | Skill record ID (CUID) |
37
+ | `--path` | Yes | Relative file path within assets (e.g. `"icon.png"` or `"sub/data.csv"`) |
38
+ | `--output` | No | Write binary content to a local file (preserves binary data) |
39
+
40
+ ## Decision Rules
41
+ - Use `+list-skill-assets` to discover available file paths before reading.
42
+ - For text files (.md, .txt, .csv, .json), the default JSON output `{ content }` is sufficient.
43
+ - For binary files (.png, .pdf, .zip, etc.), always use `--output <path>` to save to disk — the default text output may corrupt binary data.
44
+ - Read operation: no confirmation prompt needed.
45
+
46
+ ## Next Steps on Failure
47
+ - `404` / not found: re-run `+list-skill-assets` to verify the file path.
48
+ - `文件不存在`: the file path does not exist in the assets directory.
49
+
50
+ ## Recommended Chaining
51
+ - `+list-skill-assets` → confirm `path` → `+read-skill-asset --output` → `+del-skill-asset` (if cleanup needed)
@@ -0,0 +1,50 @@
1
+ # agent +read-skill-reference (Read Skill Reference)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
4
+
5
+ Domain: **Skills / read**
6
+
7
+ ## Use Cases
8
+ - Read a Skill reference `.md` file's raw content (binary-safe).
9
+ - Endpoint: `GET /api/sandbox/agent/skills/[id]/references/[...path]`.
10
+ - By default returns `{ content, fileName }` where content is UTF-8 text.
11
+ - Use `--output <path>` to save the raw content to a local file.
12
+
13
+ ## Mandatory Rules (MUST)
14
+ - `--id` is required. Obtain the real Skill record ID (CUID) via `+list-skills` — do not guess.
15
+ - `--path` is required and specifies the relative file path within the references directory.
16
+
17
+ ## Command
18
+ ```bash
19
+ # Read a reference (default JSON output)
20
+ ae-cli agent +read-skill-reference --id <skill-cuid> --path guide.md
21
+
22
+ # Save reference to local file
23
+ ae-cli agent +read-skill-reference --id <skill-cuid> --path guide.md --output ./guide.md
24
+
25
+ # Read from a sub-directory
26
+ ae-cli agent +read-skill-reference --id <skill-cuid> --path "advanced/tips.md"
27
+
28
+ # Dry-run to inspect the request before executing
29
+ ae-cli agent +read-skill-reference --dry-run --id <skill-cuid> --path guide.md
30
+ ```
31
+
32
+ ## Parameters
33
+ | Parameter | Required | Description |
34
+ |---|---|---|
35
+ | `--id` | Yes | Skill record ID (CUID) |
36
+ | `--path` | Yes | Relative file path within references (e.g. `"guide.md"` or `"advanced/tips.md"`) |
37
+ | `--output` | No | Write content to a local file |
38
+
39
+ ## Decision Rules
40
+ - Use `+list-skill-references` to discover available file paths before reading.
41
+ - References are `.md` files — the default JSON output `{ content }` is usually sufficient.
42
+ - Use `--output` to save the content to a local file for editing or backup.
43
+ - Read operation: no confirmation prompt needed.
44
+
45
+ ## Next Steps on Failure
46
+ - `404` / not found: re-run `+list-skill-references` to verify the file path.
47
+ - `文件不存在`: the file path does not exist in the references directory.
48
+
49
+ ## Recommended Chaining
50
+ - `+list-skill-references` → confirm `path` → `+read-skill-reference` → `+del-skill-reference` (if cleanup needed)
@@ -0,0 +1,51 @@
1
+ # agent +read-skill-script (Read Skill Script)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
4
+
5
+ Domain: **Skills / read**
6
+
7
+ ## Use Cases
8
+ - Read a Skill script file's raw binary content (binary-safe).
9
+ - Endpoint: `GET /api/sandbox/agent/skills/[id]/scripts/[...path]`.
10
+ - By default returns `{ content, fileName }` where content is best-effort UTF-8 text.
11
+ - Use `--output <path>` to save the raw binary content to a local file (preserves binary data).
12
+
13
+ ## Mandatory Rules (MUST)
14
+ - `--id` is required. Obtain the real Skill record ID (CUID) via `+list-skills` — do not guess.
15
+ - `--path` is required and specifies the relative file path within the scripts directory.
16
+ - For binary files, always use `--output` to avoid UTF-8 corruption.
17
+
18
+ ## Command
19
+ ```bash
20
+ # Read a text script (default JSON output)
21
+ ae-cli agent +read-skill-script --id <skill-cuid> --path helper.sh
22
+
23
+ # Save binary script to local file
24
+ ae-cli agent +read-skill-script --id <skill-cuid> --path tool.bin --output ./tool.bin
25
+
26
+ # Read from a sub-directory
27
+ ae-cli agent +read-skill-script --id <skill-cuid> --path "tools/run.py"
28
+
29
+ # Dry-run to inspect the request before executing
30
+ ae-cli agent +read-skill-script --dry-run --id <skill-cuid> --path helper.sh
31
+ ```
32
+
33
+ ## Parameters
34
+ | Parameter | Required | Description |
35
+ |---|---|---|
36
+ | `--id` | Yes | Skill record ID (CUID) |
37
+ | `--path` | Yes | Relative file path within scripts (e.g. `"helper.sh"` or `"tools/run.py"`) |
38
+ | `--output` | No | Write binary content to a local file (preserves binary data) |
39
+
40
+ ## Decision Rules
41
+ - Use `+list-skill-scripts` to discover available file paths before reading.
42
+ - For text files (.sh, .py, .js, etc.), the default JSON output `{ content }` is sufficient.
43
+ - For binary files, always use `--output <path>` to save to disk.
44
+ - Read operation: no confirmation prompt needed.
45
+
46
+ ## Next Steps on Failure
47
+ - `404` / not found: re-run `+list-skill-scripts` to verify the file path.
48
+ - `文件不存在`: the file path does not exist in the scripts directory.
49
+
50
+ ## Recommended Chaining
51
+ - `+list-skill-scripts` → confirm `path` → `+read-skill-script --output` → `+del-skill-script` (if cleanup needed)
@@ -0,0 +1,37 @@
1
+ # agent +reject-skill-share (Reject Skill Share)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
4
+
5
+ Domain: **Skill Share (peer-to-peer) / write**
6
+
7
+ ## Use Cases
8
+ - Reject a received Skill share.
9
+ - Endpoint: `POST /api/sandbox/agent/skills/shares/[id]/reject`.
10
+ - Sharing is Skill-only — MCP has no share flow.
11
+
12
+ ## Mandatory Rules (MUST)
13
+ - `--id` is required and must reference a **share** record (CUID), not a Skill ID. Obtain it via `+list-skill-shares --direction received` — do not guess.
14
+ - Write operation: keep the confirmation prompt unless `--yes` is explicitly requested.
15
+ - Only `pending` shares can be rejected.
16
+
17
+ ## Command
18
+ ```bash
19
+ ae-cli agent +reject-skill-share --id <share-cuid> --yes
20
+ ae-cli agent +reject-skill-share --dry-run --id <share-cuid>
21
+ ```
22
+
23
+ ## Parameters
24
+ | Parameter | Required | Description |
25
+ |---|---|---|
26
+ | `--id` | Yes | Share record ID (CUID) |
27
+
28
+ ## Decision Rules
29
+ - `--id` here is a share ID (not a Skill ID).
30
+ - Use this when the recipient does not want to accept a pending share.
31
+ - Cannot reject a share that is already `accepted` / `rejected`.
32
+
33
+ ## Next Steps on Failure
34
+ - `404` / not found: re-run `+list-skill-shares --direction received --status pending` to verify the share ID.
35
+
36
+ ## Recommended Chaining
37
+ - `+list-skill-shares --direction received --status pending` → confirm share `id` → `+reject-skill-share` (or `+accept-skill-share`)
@@ -0,0 +1,42 @@
1
+ # agent +reject-skill (Reject Skill Submission)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
4
+
5
+ Domain: **Skill Approval (company-scope publish) / write**
6
+
7
+ ## Use Cases
8
+ - Reject a pending Skill submission with a reason (root only).
9
+ - Endpoint: `POST /api/sandbox/agent/skills/submissions/[id]/reject`.
10
+ - Approval is Skill-only — MCP has no approval flow.
11
+
12
+ ## Mandatory Rules (MUST)
13
+ - `--id` is required and must reference a **submission** record (CUID), not a Skill ID. Obtain it via `+list-skill-submissions` — do not guess.
14
+ - `--reason` is required (1–80 chars) — the rejection reason.
15
+ - **Root only** — non-root users cannot reject submissions.
16
+ - Write operation: keep the confirmation prompt unless `--yes` is explicitly requested.
17
+ - Only `pending` submissions can be rejected.
18
+
19
+ ## Command
20
+ ```bash
21
+ ae-cli agent +reject-skill --id <submission-cuid> --reason "Needs more detail" --yes
22
+ ae-cli agent +reject-skill --dry-run --id <submission-cuid> --reason "Needs more detail"
23
+ ```
24
+
25
+ ## Parameters
26
+ | Parameter | Required | Description |
27
+ |---|---|---|
28
+ | `--id` | Yes | Submission record ID (CUID) |
29
+ | `--reason` | Yes | Rejection reason (1–80 chars) |
30
+
31
+ ## Decision Rules
32
+ - `--id` here is a submission ID (not a Skill ID).
33
+ - Use this after reviewing a pending submission (`+list-skill-submissions --status pending`) when the submission should not be published.
34
+ - Cannot reject a submission that is already `approved` / `rejected` / `cancelled`.
35
+
36
+ ## Next Steps on Failure
37
+ - `--reason length must be between 1 and 80`: adjust the reason length.
38
+ - `404` / not found: re-run `+list-skill-submissions --status pending` to verify the submission ID.
39
+ - Permission error: the current user is not root.
40
+
41
+ ## Recommended Chaining
42
+ - `+list-skill-submissions --status pending` → confirm submission `id` → `+reject-skill` (or `+approve-skill`)
@@ -0,0 +1,44 @@
1
+ # agent +rescan-skills (Rescan Skills)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
4
+
5
+ Domain: **Skills / write**
6
+
7
+ ## Use Cases
8
+ - Rescan Skill files on the server filesystem and sync them to the database.
9
+ - Endpoint: `POST /api/sandbox/agent/skills/rescan`.
10
+ - **Root-only**: requires root privileges; non-root users get a 403.
11
+ - No flags — the scan covers all Skill directories on the server.
12
+
13
+ ## Mandatory Rules (MUST)
14
+ - This command takes no flags.
15
+ - **Root-only operation**: non-root users will receive a 403 error.
16
+ - Write operation: keep the confirmation prompt unless `--yes` is explicitly requested.
17
+ - Prefer `--dry-run` before executing — rescan has filesystem side effects.
18
+
19
+ ## Command
20
+ ```bash
21
+ # Rescan and sync
22
+ ae-cli agent +rescan-skills --yes
23
+
24
+ # Dry-run to inspect the request before executing
25
+ ae-cli agent +rescan-skills --dry-run
26
+ ```
27
+
28
+ ## Parameters
29
+ | Parameter | Required | Description |
30
+ |---|---|---|
31
+ | _(none)_ | — | This command takes no flags |
32
+
33
+ ## Decision Rules
34
+ - Use this command when Skill files on disk are out of sync with the database (e.g. after manual filesystem changes or migration).
35
+ - This is a root-only operation — confirm the user has root privileges before running.
36
+ - The scan covers all Skill directories (system, company, personal) on the server.
37
+ - Use `--dry-run` first to verify the request shape before executing.
38
+
39
+ ## Next Steps on Failure
40
+ - `403` / 无权限: the current user is not root — rescan requires root privileges.
41
+ - `扫描同步失败`: the scan encountered filesystem errors — check server logs and Skill directory permissions.
42
+
43
+ ## Recommended Chaining
44
+ - `+rescan-skills` → `+list-skills` (verify the synced state)
@@ -0,0 +1,67 @@
1
+ # agent +set-mcp-credential (Set MCP Credential)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
4
+
5
+ Domain: **MCP Credentials / write**
6
+
7
+ ## Use Cases
8
+ - Upsert a per-user credential for a system-scope MCP server (by `mcpServerId` + `userId`).
9
+ - Endpoint: `POST /api/sandbox/agent/mcp-credentials`.
10
+ - The `token` (when provided) is encrypted server-side before storage.
11
+ - Use this to manually set an API key or OAuth token for a system MCP server.
12
+
13
+ ## Mandatory Rules (MUST)
14
+ - `--mcp-server-id` is required. Obtain the real system MCP server record ID (CUID) via `+list-mcps` (scope=system) or `+list-mcp-credentials` — do not guess.
15
+ - `--auth-type` defaults to `oauth`; must be `oauth` or `apikey` when provided.
16
+ - `--token` is optional but recommended — without it, only the credential record is created/enabled without a stored token.
17
+ - `--expires-at` (when provided) must be a valid ISO 8601 datetime (e.g. `2026-12-31T23:59:59Z`).
18
+ - Write operation: keep the confirmation prompt unless `--yes` is explicitly requested.
19
+
20
+ ## Command
21
+ ```bash
22
+ # Set an OAuth token with expiry
23
+ ae-cli agent +set-mcp-credential --mcp-server-id <mcp-cuid> --token "abc123" --expires-at "2026-12-31T23:59:59Z" --yes
24
+
25
+ # Set an API key (no expiry)
26
+ ae-cli agent +set-mcp-credential --mcp-server-id <mcp-cuid> --auth-type apikey --token "sk-xxx" --yes
27
+
28
+ # Dry-run to inspect the request
29
+ ae-cli agent +set-mcp-credential --dry-run --mcp-server-id <mcp-cuid> --token "abc123"
30
+ ```
31
+
32
+ ## Parameters
33
+ | Parameter | Required | Description |
34
+ |---|---|---|
35
+ | `--mcp-server-id` | Yes | System MCP server record ID (CUID) |
36
+ | `--auth-type` | No | `oauth` \| `apikey` (default `oauth`) |
37
+ | `--token` | No | Token / API key (plaintext; encrypted server-side) |
38
+ | `--expires-at` | No | ISO 8601 datetime (e.g. `2026-12-31T23:59:59Z`) |
39
+
40
+ ## Decision Rules
41
+ - If the user wants to manually set a token/API key for a system MCP server, use this command.
42
+ - For OAuth-based servers, prefer `+mcp-auth-start` (full OAuth flow with auto-refresh). Use `+set-mcp-credential` only when you have a pre-obtained token.
43
+ - For API-key-based servers (`--auth-type apikey`), this is the primary way to set the key.
44
+ - The token is encrypted at rest; it is never returned in plaintext via `+list-mcp-credentials` (use `+mcp-token` for useMcpToken servers).
45
+ - To bulk-provision credentials for all system MCP servers at once, use `+auto-provision-mcp-credentials`.
46
+
47
+ ## Response Shape
48
+ ```json
49
+ {
50
+ "item": {
51
+ "mcpServerId": "clxxx",
52
+ "userId": "uyyy",
53
+ "authType": "oauth",
54
+ "enabled": true,
55
+ "expiresAt": "2026-12-31T23:59:59.000Z",
56
+ "hasToken": true
57
+ }
58
+ }
59
+ ```
60
+
61
+ ## Next Steps on Failure
62
+ - `404` not_found_or_forbidden: the MCP server does not exist or is not a system-scope server.
63
+ - `401` / auth expired: run `ae-cli auth login`.
64
+
65
+ ## Recommended Chaining
66
+ - `+list-mcp-credentials` (check) → `+set-mcp-credential` (set) → `+list-mcp-credentials` (verify)
67
+ - For OAuth servers: `+mcp-auth-start` (preferred) → `+mcp-auth-status` → `+mcp-tools`
@@ -0,0 +1,52 @@
1
+ # agent +set-mcp-meta (Set MCP Market Meta)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
4
+
5
+ Domain: **Category & Icon (meta) / write**
6
+
7
+ ## Use Cases
8
+ - Update an MCP server's market category and/or icon.
9
+ - Endpoint: `PATCH /api/sandbox/agent/mcp-servers/[id]/meta`.
10
+ - Company scope requires root; system scope is read-only.
11
+
12
+ ## Mandatory Rules (MUST)
13
+ - `--id` is required. Obtain the real MCP server record ID (CUID) via `+list-mcps` — do not guess.
14
+ - At least one of `--category` / `--icon-emoji` / `--icon-color` must be provided.
15
+ - `--category` must be one of the market category keys (see below) when provided.
16
+ - Company scope meta requires root; system scope meta is read-only.
17
+ - Write operation: keep the confirmation prompt unless `--yes` is explicitly requested.
18
+
19
+ ## Market Category Keys
20
+ `ae_preset | dev_tool | search_tool | data_query | content_gen | enterprise | life | automation | other`
21
+
22
+ ## Command
23
+ ```bash
24
+ ae-cli agent +set-mcp-meta --id <mcp-cuid> --category dev_tool --icon-emoji robot --yes
25
+ ae-cli agent +set-mcp-meta --id <mcp-cuid> --icon-color "#1E76F0"
26
+ ae-cli agent +set-mcp-meta --id <mcp-cuid> --category data_query
27
+ ae-cli agent +set-mcp-meta --dry-run --id <mcp-cuid> --category dev_tool
28
+ ```
29
+
30
+ ## Parameters
31
+ | Parameter | Required | Description |
32
+ |---|---|---|
33
+ | `--id` | Yes | MCP server record ID (CUID) |
34
+ | `--category` | No* | Market category key (see above) |
35
+ | `--icon-emoji` | No* | Market icon emoji (e.g. `robot`) |
36
+ | `--icon-color` | No* | Market icon color (e.g. `#1E76F0`) |
37
+
38
+ \* At least one of these three must be provided.
39
+
40
+ ## Decision Rules
41
+ - If the user wants to change an MCP server's market category or icon, use this.
42
+ - For company-scope MCP servers, only root users can set meta; for system-scope, meta is read-only.
43
+ - `+add-mcp` also accepts `--category` / `--icon-emoji` / `--icon-color` at creation; use `+set-mcp-meta` to adjust them afterwards.
44
+
45
+ ## Next Steps on Failure
46
+ - `Provide at least one of --category / --icon-emoji / --icon-color`: add at least one meta field.
47
+ - `--category must be one of...`: use one of the category keys.
48
+ - Permission error on company scope: the current user is not root.
49
+
50
+ ## Recommended Chaining
51
+ - `+list-mcps` → confirm `id` → `+set-mcp-meta`
52
+ - `+add-mcp` → `+set-mcp-meta` (adjust meta after creation)
@@ -0,0 +1,51 @@
1
+ # agent +set-skill-meta (Set Skill Market Meta)
2
+
3
+ > **Prerequisite:** Follow the Global AE CLI Rules in [`../SKILL.md`](../SKILL.md).
4
+
5
+ Domain: **Category & Icon (meta) / write**
6
+
7
+ ## Use Cases
8
+ - Update a Skill's market category and/or icon.
9
+ - Endpoint: `PATCH /api/sandbox/agent/skills/[id]/meta`.
10
+ - Company scope requires root; system scope is read-only.
11
+
12
+ ## Mandatory Rules (MUST)
13
+ - `--id` is required. Obtain the real Skill record ID (CUID) via `+list-skills` — do not guess.
14
+ - At least one of `--category` / `--icon-emoji` / `--icon-color` must be provided.
15
+ - `--category` must be one of the market category keys (see below) when provided.
16
+ - Company scope meta requires root; system scope meta is read-only.
17
+ - Write operation: keep the confirmation prompt unless `--yes` is explicitly requested.
18
+
19
+ ## Market Category Keys
20
+ `ae_preset | dev_tool | search_tool | data_query | content_gen | enterprise | life | automation | other`
21
+
22
+ ## Command
23
+ ```bash
24
+ ae-cli agent +set-skill-meta --id <skill-cuid> --category data_query --yes
25
+ ae-cli agent +set-skill-meta --id <skill-cuid> --icon-emoji robot --icon-color "#1E76F0"
26
+ ae-cli agent +set-skill-meta --dry-run --id <skill-cuid> --category dev_tool
27
+ ```
28
+
29
+ ## Parameters
30
+ | Parameter | Required | Description |
31
+ |---|---|---|
32
+ | `--id` | Yes | Skill record ID (CUID) |
33
+ | `--category` | No* | Market category key (see above) |
34
+ | `--icon-emoji` | No* | Market icon emoji (e.g. `robot`) |
35
+ | `--icon-color` | No* | Market icon color (e.g. `#1E76F0`) |
36
+
37
+ \* At least one of these three must be provided.
38
+
39
+ ## Decision Rules
40
+ - If the user wants to change a Skill's market category or icon, use this.
41
+ - For company-scope Skills, only root users can set meta; for system-scope, meta is read-only.
42
+ - `+add-skill` and `+copy-skill` also accept `--category` / `--icon-emoji` / `--icon-color`; use `+set-skill-meta` to adjust them afterwards.
43
+
44
+ ## Next Steps on Failure
45
+ - `Provide at least one of --category / --icon-emoji / --icon-color`: add at least one meta field.
46
+ - `--category must be one of...`: use one of the category keys.
47
+ - Permission error on company scope: the current user is not root.
48
+
49
+ ## Recommended Chaining
50
+ - `+list-skills` → confirm `id` → `+set-skill-meta`
51
+ - `+add-skill` / `+copy-skill` → `+set-skill-meta` (adjust meta after creation/copy)