@tencentcloudadp/cli 0.0.0-stage → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +118 -2
- package/bin/adp.js +4 -0
- package/config-schema.json +319 -0
- package/dist/cli.js +28513 -0
- package/dist/cli.js.map +1 -0
- package/package.json +70 -4
- package/skills/adp/SKILL.md +116 -0
- package/skills/adp/configuration/SKILL.md +51 -0
- package/skills/adp/create/SKILL.md +189 -0
- package/skills/adp/evals/evals.json +60 -0
- package/skills/adp/gotchas/SKILL.md +92 -0
- package/skills/adp/references/app-keys.md +41 -0
- package/skills/adp/references/app-modes.md +36 -0
- package/skills/adp/references/auth.md +45 -0
- package/skills/adp/references/canvas/branch.json +159 -0
- package/skills/adp/references/canvas/deep-research.json +267 -0
- package/skills/adp/references/canvas/dynamic-option.json +410 -0
- package/skills/adp/references/canvas/extract.json +109 -0
- package/skills/adp/references/canvas/intent.json +340 -0
- package/skills/adp/references/canvas/llm.json +161 -0
- package/skills/adp/references/canvas/main.json +155 -0
- package/skills/adp/references/canvas/option.json +97 -0
- package/skills/adp/references/canvas/single.json +155 -0
- package/skills/adp/references/canvas/sub.json +125 -0
- package/skills/adp/references/credentials.md +40 -0
- package/skills/adp/references/inventory.md +39 -0
- package/skills/adp/references/memory.md +54 -0
- package/skills/adp/references/operations.md +56 -0
- package/skills/adp/references/pitfalls.md +125 -0
- package/skills/adp/references/platform-skills.md +31 -0
- package/skills/adp/references/timers.md +42 -0
- package/skills/adp/references/tuning.md +79 -0
- package/skills/adp/references/volumes.md +18 -0
- package/skills/adp/references/workflows.md +241 -0
package/README.md
CHANGED
|
@@ -1,3 +1,119 @@
|
|
|
1
|
-
#
|
|
1
|
+
# @tencentcloudadp/cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Command-line interface for [Tencent Cloud Agent Development Platform](https://cloud.tencent.com/document/product/1759/132555) (product 1759, API `2026-05-20`).
|
|
4
|
+
|
|
5
|
+
Package: `@tencentcloudadp/cli`
|
|
6
|
+
Binary: `adp`
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
### Global install via npm
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
npm install -g @tencentcloudadp/cli
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Requires Node.js 20+.
|
|
17
|
+
|
|
18
|
+
### Upgrade
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
adp version --format json # installed vs. newest release on npm
|
|
22
|
+
adp upgrade --yes # global install with the detected package manager
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
### Local install from source
|
|
26
|
+
|
|
27
|
+
If you are developing locally or installing from source:
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
# Clone the repository
|
|
31
|
+
git clone https://github.com/TencentCloud/adp-cli.git
|
|
32
|
+
cd adp-cli
|
|
33
|
+
|
|
34
|
+
# Install dependencies, build bundle, and symlink adp globally
|
|
35
|
+
make install-local
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
This installs dependencies (via pnpm), bundles the CLI and JSON schemas, and symlinks `adp` into your global npm binary path (`$(npm prefix -g)/bin/adp`). To uninstall:
|
|
39
|
+
|
|
40
|
+
```bash
|
|
41
|
+
make uninstall-local
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Quick start
|
|
45
|
+
|
|
46
|
+
Get a **CAM** SecretId / SecretKey (starts with `AKID`) from [API Key Management](https://console.cloud.tencent.com/cam/capi). SecretKey is shown only once. This CLI is public cloud only (`adp.tencentcloudapi.com`); independent-site keys are not accepted.
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
export TENCENTCLOUD_SECRET_ID=...
|
|
50
|
+
export TENCENTCLOUD_SECRET_KEY=...
|
|
51
|
+
adp login
|
|
52
|
+
adp whoami --format json
|
|
53
|
+
adp init --name demo --space-id <space> --model-id <model> --create-remote
|
|
54
|
+
adp deploy --dry-run
|
|
55
|
+
adp deploy
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Knowledge-base documents (same CAM keys; default KB id = `app_id`):
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
adp kb doc import --file ./faq.md
|
|
62
|
+
adp kb doc list --format json
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Do not pass secrets as CLI flags. On a TTY, `adp login` prints the CAM URLs and can prompt instead of env vars.
|
|
66
|
+
|
|
67
|
+
After install, put the companion skill on the coding agent:
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
adp skills install --yes
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
Look up official ADP docs without guessing numeric slugs:
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
adp docs search ModifyApp --format json
|
|
77
|
+
adp docs get 132502 --format json
|
|
78
|
+
adp docs config --format json
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Output contract
|
|
82
|
+
|
|
83
|
+
`adp` serves humans and agents with one binary.
|
|
84
|
+
|
|
85
|
+
| stdout is a TTY | `--format` | Result |
|
|
86
|
+
| --- | --- | --- |
|
|
87
|
+
| yes | `auto` (default) | tables on stdout, progress on stderr |
|
|
88
|
+
| no (pipe / `CI=1`) | `auto` | JSON envelope on stdout |
|
|
89
|
+
| any | `json` / `--json` | JSON envelope |
|
|
90
|
+
| any | `text` | tables even when piped |
|
|
91
|
+
|
|
92
|
+
Failures print a JSON envelope as the last line of stderr. Exit codes: `0` ok, `2` usage, `3` not found, `4` auth, `5` conflict, `1` other.
|
|
93
|
+
|
|
94
|
+
Discover commands without auth:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
adp --version
|
|
98
|
+
adp schema --format json
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
`adp schema` includes `global_flags`. In a pipe (or with `--format json`, or under a detected coding agent), `adp` with no subcommand also prints that schema. On a TTY it prints `--help`. Either way a bare `adp` never takes over the terminal.
|
|
102
|
+
|
|
103
|
+
## Global flags
|
|
104
|
+
|
|
105
|
+
`--config` `--cwd` `--env` `--region` `--format` `--yes` `--quiet` `--limit` `--fields` `--dry-run`
|
|
106
|
+
|
|
107
|
+
`--json` is an alias for `--format json`. Resource IDs prefer named flags (`--app-id`) over positionals.
|
|
108
|
+
|
|
109
|
+
## Make targets
|
|
110
|
+
|
|
111
|
+
`make check` is the same gate CI runs: install, format, architecture-check, sdk-baseline-check, secrets-check, knip, typecheck, test, build.
|
|
112
|
+
|
|
113
|
+
`make install-local` builds and installs `adp` onto this machine. `make uninstall-local` removes it.
|
|
114
|
+
|
|
115
|
+
## Docs
|
|
116
|
+
|
|
117
|
+
- **[User Documentation](docs/user/README.md)**: Full user guide (quickstart, authentication, configuration, app modes, workflows, knowledge base, commands, debugging, and troubleshooting).
|
|
118
|
+
- **[Architecture & Developer Docs](docs/README.md)**: Internal architecture, DDD layers, design decisions, and contribution guide.
|
|
119
|
+
- **[CLAUDE.md](CLAUDE.md)**: Instructions and constraints for AI coding agents.
|
package/bin/adp.js
ADDED
|
@@ -0,0 +1,319 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$ref": "#/definitions/AdpConfig",
|
|
3
|
+
"definitions": {
|
|
4
|
+
"AdpConfig": {
|
|
5
|
+
"type": "object",
|
|
6
|
+
"properties": {
|
|
7
|
+
"$schema": {
|
|
8
|
+
"type": "string"
|
|
9
|
+
},
|
|
10
|
+
"name": {
|
|
11
|
+
"type": "string",
|
|
12
|
+
"minLength": 1
|
|
13
|
+
},
|
|
14
|
+
"app_mode": {
|
|
15
|
+
"type": "number",
|
|
16
|
+
"enum": [
|
|
17
|
+
1,
|
|
18
|
+
2,
|
|
19
|
+
3,
|
|
20
|
+
4
|
|
21
|
+
],
|
|
22
|
+
"default": 2
|
|
23
|
+
},
|
|
24
|
+
"region": {
|
|
25
|
+
"type": "string",
|
|
26
|
+
"minLength": 1,
|
|
27
|
+
"default": "ap-guangzhou"
|
|
28
|
+
},
|
|
29
|
+
"space_id": {
|
|
30
|
+
"type": "string",
|
|
31
|
+
"minLength": 1
|
|
32
|
+
},
|
|
33
|
+
"app_id": {
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
"agent_id": {
|
|
37
|
+
"type": "string"
|
|
38
|
+
},
|
|
39
|
+
"avatar": {
|
|
40
|
+
"type": "string"
|
|
41
|
+
},
|
|
42
|
+
"greeting": {
|
|
43
|
+
"type": "object",
|
|
44
|
+
"properties": {
|
|
45
|
+
"greeting": {
|
|
46
|
+
"type": "string",
|
|
47
|
+
"minLength": 1
|
|
48
|
+
},
|
|
49
|
+
"opening_question_list": {
|
|
50
|
+
"type": "array",
|
|
51
|
+
"items": {
|
|
52
|
+
"type": "string"
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"required": [
|
|
57
|
+
"greeting"
|
|
58
|
+
],
|
|
59
|
+
"additionalProperties": false
|
|
60
|
+
},
|
|
61
|
+
"role_description": {
|
|
62
|
+
"type": "string"
|
|
63
|
+
},
|
|
64
|
+
"memory": {
|
|
65
|
+
"type": "object",
|
|
66
|
+
"properties": {
|
|
67
|
+
"enabled": {
|
|
68
|
+
"type": "boolean"
|
|
69
|
+
},
|
|
70
|
+
"long_memory_day": {
|
|
71
|
+
"type": "integer"
|
|
72
|
+
},
|
|
73
|
+
"prompt_content": {
|
|
74
|
+
"type": "string"
|
|
75
|
+
},
|
|
76
|
+
"prompt_mode": {
|
|
77
|
+
"type": "integer"
|
|
78
|
+
}
|
|
79
|
+
},
|
|
80
|
+
"required": [
|
|
81
|
+
"enabled"
|
|
82
|
+
],
|
|
83
|
+
"additionalProperties": false
|
|
84
|
+
},
|
|
85
|
+
"web_search": {
|
|
86
|
+
"type": "object",
|
|
87
|
+
"properties": {
|
|
88
|
+
"enabled": {
|
|
89
|
+
"type": "boolean"
|
|
90
|
+
},
|
|
91
|
+
"provider": {
|
|
92
|
+
"type": "string"
|
|
93
|
+
},
|
|
94
|
+
"top_n": {
|
|
95
|
+
"type": "integer"
|
|
96
|
+
},
|
|
97
|
+
"api_key": {
|
|
98
|
+
"type": "string"
|
|
99
|
+
}
|
|
100
|
+
},
|
|
101
|
+
"required": [
|
|
102
|
+
"enabled"
|
|
103
|
+
],
|
|
104
|
+
"additionalProperties": false
|
|
105
|
+
},
|
|
106
|
+
"mode": {
|
|
107
|
+
"type": "object",
|
|
108
|
+
"properties": {
|
|
109
|
+
"multi_agent": {
|
|
110
|
+
"type": "object",
|
|
111
|
+
"properties": {
|
|
112
|
+
"collaboration_mode": {
|
|
113
|
+
"type": "integer"
|
|
114
|
+
},
|
|
115
|
+
"workflow_id": {
|
|
116
|
+
"type": "string"
|
|
117
|
+
},
|
|
118
|
+
"workflow_name": {
|
|
119
|
+
"type": "string"
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
"required": [
|
|
123
|
+
"collaboration_mode"
|
|
124
|
+
],
|
|
125
|
+
"additionalProperties": false
|
|
126
|
+
},
|
|
127
|
+
"single_workflow": {
|
|
128
|
+
"type": "object",
|
|
129
|
+
"properties": {
|
|
130
|
+
"workflow_id": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"minLength": 1
|
|
133
|
+
},
|
|
134
|
+
"workflow_name": {
|
|
135
|
+
"type": "string"
|
|
136
|
+
},
|
|
137
|
+
"async_workflow": {
|
|
138
|
+
"type": "boolean"
|
|
139
|
+
},
|
|
140
|
+
"enabled": {
|
|
141
|
+
"type": "boolean"
|
|
142
|
+
},
|
|
143
|
+
"workflow_description": {
|
|
144
|
+
"type": "string"
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
"required": [
|
|
148
|
+
"workflow_id"
|
|
149
|
+
],
|
|
150
|
+
"additionalProperties": false
|
|
151
|
+
},
|
|
152
|
+
"claw": {
|
|
153
|
+
"type": "object",
|
|
154
|
+
"properties": {
|
|
155
|
+
"team_enabled": {
|
|
156
|
+
"type": "boolean"
|
|
157
|
+
},
|
|
158
|
+
"team_prompt": {
|
|
159
|
+
"type": "string"
|
|
160
|
+
}
|
|
161
|
+
},
|
|
162
|
+
"additionalProperties": false
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
"additionalProperties": false
|
|
166
|
+
},
|
|
167
|
+
"shared_kb_ids": {
|
|
168
|
+
"type": "array",
|
|
169
|
+
"items": {
|
|
170
|
+
"type": "string"
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
"agent": {
|
|
174
|
+
"type": "object",
|
|
175
|
+
"properties": {
|
|
176
|
+
"profile": {
|
|
177
|
+
"type": "object",
|
|
178
|
+
"properties": {
|
|
179
|
+
"name": {
|
|
180
|
+
"type": "string",
|
|
181
|
+
"minLength": 1
|
|
182
|
+
},
|
|
183
|
+
"description": {
|
|
184
|
+
"type": "string"
|
|
185
|
+
},
|
|
186
|
+
"icon_url": {
|
|
187
|
+
"type": "string"
|
|
188
|
+
},
|
|
189
|
+
"role": {
|
|
190
|
+
"type": "integer"
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"required": [
|
|
194
|
+
"name"
|
|
195
|
+
],
|
|
196
|
+
"additionalProperties": false
|
|
197
|
+
},
|
|
198
|
+
"instructions": {
|
|
199
|
+
"type": "string"
|
|
200
|
+
},
|
|
201
|
+
"instructions_file": {
|
|
202
|
+
"type": "string"
|
|
203
|
+
},
|
|
204
|
+
"model": {
|
|
205
|
+
"type": "object",
|
|
206
|
+
"properties": {
|
|
207
|
+
"model_id": {
|
|
208
|
+
"type": "string",
|
|
209
|
+
"minLength": 1
|
|
210
|
+
},
|
|
211
|
+
"alias": {
|
|
212
|
+
"type": "string"
|
|
213
|
+
},
|
|
214
|
+
"context_words_limit": {
|
|
215
|
+
"type": "number"
|
|
216
|
+
},
|
|
217
|
+
"instructions_words_limit": {
|
|
218
|
+
"type": "number"
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
"required": [
|
|
222
|
+
"model_id"
|
|
223
|
+
],
|
|
224
|
+
"additionalProperties": false
|
|
225
|
+
},
|
|
226
|
+
"skill_ids": {
|
|
227
|
+
"type": "array",
|
|
228
|
+
"items": {
|
|
229
|
+
"type": "string"
|
|
230
|
+
}
|
|
231
|
+
},
|
|
232
|
+
"plugin_ids": {
|
|
233
|
+
"type": "array",
|
|
234
|
+
"items": {
|
|
235
|
+
"type": "string"
|
|
236
|
+
}
|
|
237
|
+
},
|
|
238
|
+
"connector_ids": {
|
|
239
|
+
"type": "array",
|
|
240
|
+
"items": {
|
|
241
|
+
"type": "string"
|
|
242
|
+
}
|
|
243
|
+
},
|
|
244
|
+
"tools": {
|
|
245
|
+
"type": "array",
|
|
246
|
+
"items": {
|
|
247
|
+
"type": "object",
|
|
248
|
+
"properties": {
|
|
249
|
+
"plugin_id": {
|
|
250
|
+
"type": "string",
|
|
251
|
+
"minLength": 1
|
|
252
|
+
},
|
|
253
|
+
"tool_id": {
|
|
254
|
+
"type": "string",
|
|
255
|
+
"minLength": 1
|
|
256
|
+
},
|
|
257
|
+
"tool_source": {
|
|
258
|
+
"type": "integer"
|
|
259
|
+
},
|
|
260
|
+
"description": {
|
|
261
|
+
"type": "string"
|
|
262
|
+
},
|
|
263
|
+
"is_disabled": {
|
|
264
|
+
"type": "boolean"
|
|
265
|
+
}
|
|
266
|
+
},
|
|
267
|
+
"required": [
|
|
268
|
+
"plugin_id",
|
|
269
|
+
"tool_id"
|
|
270
|
+
],
|
|
271
|
+
"additionalProperties": false
|
|
272
|
+
}
|
|
273
|
+
},
|
|
274
|
+
"plugins": {
|
|
275
|
+
"type": "array",
|
|
276
|
+
"items": {
|
|
277
|
+
"type": "object",
|
|
278
|
+
"properties": {
|
|
279
|
+
"plugin_id": {
|
|
280
|
+
"type": "string",
|
|
281
|
+
"minLength": 1
|
|
282
|
+
},
|
|
283
|
+
"auth_type": {
|
|
284
|
+
"type": "integer"
|
|
285
|
+
},
|
|
286
|
+
"enable_cam_role_auth": {
|
|
287
|
+
"type": "boolean"
|
|
288
|
+
},
|
|
289
|
+
"oauth_consent": {
|
|
290
|
+
"type": "integer"
|
|
291
|
+
}
|
|
292
|
+
},
|
|
293
|
+
"required": [
|
|
294
|
+
"plugin_id"
|
|
295
|
+
],
|
|
296
|
+
"additionalProperties": false
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
"max_reasoning_round": {
|
|
300
|
+
"type": "number"
|
|
301
|
+
}
|
|
302
|
+
},
|
|
303
|
+
"required": [
|
|
304
|
+
"profile",
|
|
305
|
+
"model"
|
|
306
|
+
],
|
|
307
|
+
"additionalProperties": false
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"required": [
|
|
311
|
+
"name",
|
|
312
|
+
"space_id",
|
|
313
|
+
"agent"
|
|
314
|
+
],
|
|
315
|
+
"additionalProperties": false
|
|
316
|
+
}
|
|
317
|
+
},
|
|
318
|
+
"$schema": "http://json-schema.org/draft-07/schema#"
|
|
319
|
+
}
|