@adcp/client 4.1.0 → 4.3.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/.claude-plugin/marketplace.json +17 -0
- package/.claude-plugin/plugin.json +24 -0
- package/README.md +18 -0
- package/dist/lib/protocols/a2a.d.ts.map +1 -1
- package/dist/lib/protocols/a2a.js +4 -1
- package/dist/lib/protocols/a2a.js.map +1 -1
- package/dist/lib/protocols/mcp.d.ts.map +1 -1
- package/dist/lib/protocols/mcp.js +5 -14
- package/dist/lib/protocols/mcp.js.map +1 -1
- package/dist/lib/testing/client.d.ts +5 -0
- package/dist/lib/testing/client.d.ts.map +1 -1
- package/dist/lib/testing/client.js +21 -3
- package/dist/lib/testing/client.js.map +1 -1
- package/dist/lib/testing/scenarios/sponsored-intelligence.js +3 -3
- package/dist/lib/testing/scenarios/sponsored-intelligence.js.map +1 -1
- package/dist/lib/testing/types.d.ts +10 -0
- package/dist/lib/testing/types.d.ts.map +1 -1
- package/dist/lib/types/core.generated.d.ts +2 -2
- package/dist/lib/types/core.generated.d.ts.map +1 -1
- package/dist/lib/types/core.generated.js +1 -1
- package/dist/lib/types/schemas.generated.d.ts +31 -24
- package/dist/lib/types/schemas.generated.d.ts.map +1 -1
- package/dist/lib/types/schemas.generated.js +14 -8
- package/dist/lib/types/schemas.generated.js.map +1 -1
- package/dist/lib/types/tools.generated.d.ts +25 -4
- package/dist/lib/types/tools.generated.d.ts.map +1 -1
- package/package.json +4 -2
- package/skills/adcp/SKILL.md +230 -0
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: adcp
|
|
3
|
+
description: Interact with AdCP (Ad Context Protocol) advertising agents over MCP or A2A protocols. Use when the user wants to call AdCP tools (get_products, create_media_buy, sync_creatives, etc.), discover an agent's capabilities, run protocol compliance tests, look up brands or properties in the AdCP registry, manage saved agent aliases, or debug agent responses. NOT for general HTTP/REST API calls. Requires @adcp/client (npm).
|
|
4
|
+
argument-hint: "<agent> [tool] [payload] | test <agent> [scenario] | registry <command>"
|
|
5
|
+
allowed-tools: Bash, Read
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
# AdCP CLI
|
|
9
|
+
|
|
10
|
+
Use `adcp` (or `npx @adcp/client`) to interact with AdCP advertising agents, run compliance tests, and query the AdCP registry.
|
|
11
|
+
|
|
12
|
+
## Quick start — zero config
|
|
13
|
+
|
|
14
|
+
Built-in test agents work immediately with no setup:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
# Try AdCP right now
|
|
18
|
+
adcp test-mcp # List tools on the MCP test agent
|
|
19
|
+
adcp test-mcp get_products '{"brief":"coffee brands"}' # Call a tool
|
|
20
|
+
adcp test-a2a get_products '{"brief":"coffee brands"}' # Same thing over A2A
|
|
21
|
+
|
|
22
|
+
# Run compliance tests
|
|
23
|
+
adcp test test-mcp discovery # Test tool discovery
|
|
24
|
+
adcp test test-mcp full_sales_flow # Full media buy lifecycle
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Built-in aliases (no setup needed):
|
|
28
|
+
- `test-mcp` — Public test agent via MCP (pre-authenticated)
|
|
29
|
+
- `test-a2a` — Public test agent via A2A (pre-authenticated)
|
|
30
|
+
- `test-no-auth` — MCP without auth (demonstrates auth errors)
|
|
31
|
+
- `test-a2a-no-auth` — A2A without auth
|
|
32
|
+
- `creative` — Official creative agent (MCP, requires `--auth` or `ADCP_AUTH_TOKEN`)
|
|
33
|
+
|
|
34
|
+
## Calling agent tools
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
adcp <alias|url> [tool-name] [payload] [options]
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Discover tools (omit tool name)
|
|
41
|
+
```bash
|
|
42
|
+
adcp https://agent.example.com
|
|
43
|
+
adcp my-alias
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
### Call a tool
|
|
47
|
+
```bash
|
|
48
|
+
adcp https://agent.example.com get_products '{"brief":"coffee brands"}'
|
|
49
|
+
adcp https://agent.example.com create_media_buy @payload.json
|
|
50
|
+
echo '{"brief":"travel"}' | adcp https://agent.example.com get_products -
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Authentication (priority order)
|
|
54
|
+
```bash
|
|
55
|
+
adcp my-alias get_products '{}' # 1. Saved config
|
|
56
|
+
adcp https://agent.example.com get_products '{}' --auth $TOKEN # 2. Flag
|
|
57
|
+
export ADCP_AUTH_TOKEN=your-token && adcp https://agent.example.com get_products '{}' # 3. Env
|
|
58
|
+
adcp https://agent.example.com/mcp --oauth # 4. OAuth (MCP only)
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Output modes
|
|
62
|
+
```bash
|
|
63
|
+
adcp test-mcp get_products '{"brief":"test"}' # Pretty print (default)
|
|
64
|
+
adcp test-mcp get_products '{"brief":"test"}' --json # Raw JSON for scripting
|
|
65
|
+
adcp test-mcp get_products '{"brief":"test"}' --debug # Connection diagnostics
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### Force protocol (default is auto-detect)
|
|
69
|
+
```bash
|
|
70
|
+
adcp https://agent.example.com get_products '{}' --protocol mcp
|
|
71
|
+
adcp https://agent.example.com get_products '{}' --protocol a2a
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
## Test runner
|
|
75
|
+
|
|
76
|
+
Run protocol compliance tests against any AdCP agent. 20 built-in scenarios.
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
adcp test <agent> [scenario] [options]
|
|
80
|
+
adcp test --list-scenarios
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Scenarios (run `adcp test --list-scenarios` for all 20 with descriptions)
|
|
84
|
+
| Scenario | What it tests |
|
|
85
|
+
|----------|---------------|
|
|
86
|
+
| `health_check` | Basic connectivity |
|
|
87
|
+
| `discovery` | get_products, list_creative_formats, list_authorized_properties |
|
|
88
|
+
| `create_media_buy` | Discovery + create a media buy (dry-run by default) |
|
|
89
|
+
| `full_sales_flow` | Full lifecycle: discovery, create, update, delivery |
|
|
90
|
+
| `creative_flow` | Creative agent: list_formats, build, preview |
|
|
91
|
+
| `signals_flow` | Signals: get_signals, activate |
|
|
92
|
+
| `validation` | Schema validation (invalid inputs should be rejected) |
|
|
93
|
+
| `error_handling` | Verify proper error responses |
|
|
94
|
+
| `pricing_edge_cases` | Auction vs fixed pricing, min spend, bid_price |
|
|
95
|
+
| `behavior_analysis` | Auth, brief relevance, filtering behavior |
|
|
96
|
+
| `capability_discovery` | v3: get_adcp_capabilities |
|
|
97
|
+
| `governance_property_lists` | v3: property list CRUD |
|
|
98
|
+
| `governance_content_standards` | v3: content standards listing and calibration |
|
|
99
|
+
| `si_session_lifecycle` | v3: structured interaction sessions |
|
|
100
|
+
|
|
101
|
+
### Examples
|
|
102
|
+
```bash
|
|
103
|
+
adcp test test-mcp discovery # Quick check
|
|
104
|
+
adcp test test-mcp full_sales_flow --json # CI-friendly JSON output
|
|
105
|
+
adcp test https://my-agent.com validation --protocol mcp
|
|
106
|
+
adcp test my-alias create_media_buy --no-dry-run # Real operations (careful!)
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
### Test options
|
|
110
|
+
- `--json` — Machine-readable output for CI
|
|
111
|
+
- `--debug` — Verbose logging
|
|
112
|
+
- `--protocol mcp|a2a` — Force protocol
|
|
113
|
+
- `--no-dry-run` — Execute real operations (default is dry-run)
|
|
114
|
+
- `--brief "text"` — Custom brief for product discovery tests
|
|
115
|
+
|
|
116
|
+
## Registry
|
|
117
|
+
|
|
118
|
+
Look up brands, properties, agents, and publishers in the AdCP registry.
|
|
119
|
+
|
|
120
|
+
```bash
|
|
121
|
+
adcp registry <command> [args] [options]
|
|
122
|
+
```
|
|
123
|
+
|
|
124
|
+
### Lookups
|
|
125
|
+
```bash
|
|
126
|
+
adcp registry brand nike.com
|
|
127
|
+
adcp registry brands nike.com adidas.com --json
|
|
128
|
+
adcp registry property nytimes.com
|
|
129
|
+
adcp registry enrich-brand nike.com
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### Discovery and validation
|
|
133
|
+
```bash
|
|
134
|
+
adcp registry discover https://agent.example.com
|
|
135
|
+
adcp registry validate nytimes.com
|
|
136
|
+
adcp registry validate-publisher nytimes.com
|
|
137
|
+
adcp registry lookup nytimes.com
|
|
138
|
+
adcp registry check-auth https://agent.com domain nytimes.com
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### Listing and search
|
|
142
|
+
```bash
|
|
143
|
+
adcp registry agents --type sales --health
|
|
144
|
+
adcp registry search nike --json
|
|
145
|
+
adcp registry publishers
|
|
146
|
+
adcp registry stats
|
|
147
|
+
```
|
|
148
|
+
|
|
149
|
+
### Save operations (requires --auth or ADCP_REGISTRY_API_KEY)
|
|
150
|
+
```bash
|
|
151
|
+
adcp registry save-brand acme.com "Acme Corp" --auth $KEY
|
|
152
|
+
adcp registry save-property example.com https://agent.com --auth $KEY
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
## Agent management
|
|
156
|
+
|
|
157
|
+
```bash
|
|
158
|
+
adcp --save-auth prod https://prod-agent.com # Interactive setup
|
|
159
|
+
adcp --save-auth prod https://agent.com --auth $TOKEN # With token
|
|
160
|
+
adcp --save-auth prod https://agent.com --no-auth # No auth
|
|
161
|
+
adcp --save-auth prod https://agent.com/mcp --oauth # OAuth (MCP only)
|
|
162
|
+
adcp --list-agents
|
|
163
|
+
adcp --remove-agent prod
|
|
164
|
+
adcp --show-config
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
Config stored at `~/.adcp/config.json`.
|
|
168
|
+
|
|
169
|
+
## Async/webhook support
|
|
170
|
+
|
|
171
|
+
For long-running operations (e.g. create_media_buy with human-in-the-loop approval):
|
|
172
|
+
|
|
173
|
+
```bash
|
|
174
|
+
adcp https://agent.example.com create_media_buy @payload.json --auth $TOKEN --wait
|
|
175
|
+
adcp http://localhost:3000/mcp create_media_buy @payload.json --wait --local
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
- `--wait` — Start webhook listener, wait for async response
|
|
179
|
+
- `--local` — Local webhook without ngrok (for localhost agents)
|
|
180
|
+
- `--timeout MS` — Webhook timeout (default: 300000 = 5 min)
|
|
181
|
+
|
|
182
|
+
Remote `--wait` requires ngrok: `brew install ngrok`
|
|
183
|
+
|
|
184
|
+
## Exit codes
|
|
185
|
+
|
|
186
|
+
- `0` — Success
|
|
187
|
+
- `1` — Network or JSON error
|
|
188
|
+
- `2` — Invalid arguments
|
|
189
|
+
- `3` — Agent error (auth failure, task failed, webhook timeout)
|
|
190
|
+
|
|
191
|
+
## Task: $ARGUMENTS
|
|
192
|
+
|
|
193
|
+
### Step 1: Check installation
|
|
194
|
+
```bash
|
|
195
|
+
which adcp 2>/dev/null && echo "installed" || echo "use npx @adcp/client"
|
|
196
|
+
```
|
|
197
|
+
If not installed, prefix all commands with `npx @adcp/client`. Requires Node.js 18+.
|
|
198
|
+
|
|
199
|
+
### Step 2: Route the request
|
|
200
|
+
|
|
201
|
+
- **"try AdCP" / "show me how it works" / no specific agent** — Use built-in `test-mcp`
|
|
202
|
+
- **"what tools" / "discover" / "list tools"** — `adcp <agent>` with no tool name
|
|
203
|
+
- **"test" / "run tests" / "compliance" / "validate agent"** — `adcp test <agent> [scenario]`
|
|
204
|
+
- **"brand" / "property" / "registry" / "look up" / "validate domain"** — `adcp registry <command>`
|
|
205
|
+
- **Specific tool name mentioned** — `adcp <agent> <tool> '<payload>'`
|
|
206
|
+
- **"compare protocols"** — Run same call with `--protocol mcp` then `--protocol a2a`, diff results
|
|
207
|
+
|
|
208
|
+
### Step 3: Handle authentication
|
|
209
|
+
|
|
210
|
+
1. Built-in aliases `test-mcp` and `test-a2a` have auth included — use for demos
|
|
211
|
+
2. `creative` alias has no auth bundled — user must provide `--auth` or `ADCP_AUTH_TOKEN`
|
|
212
|
+
3. Saved aliases may have auth — check with `adcp --list-agents`
|
|
213
|
+
4. `--auth $TOKEN` flag or `ADCP_AUTH_TOKEN` env var
|
|
214
|
+
5. `--oauth` for MCP agents using OAuth (opens browser, saves tokens to alias)
|
|
215
|
+
6. If no auth and agent requires it, ask the user
|
|
216
|
+
|
|
217
|
+
### Step 4: Choose output format
|
|
218
|
+
|
|
219
|
+
- Default (pretty print) for exploration and debugging
|
|
220
|
+
- `--json` when piping, parsing, or running in CI
|
|
221
|
+
- `--debug` when troubleshooting connection or protocol issues
|
|
222
|
+
|
|
223
|
+
### Step 5: Run and interpret
|
|
224
|
+
|
|
225
|
+
- Run the command
|
|
226
|
+
- Exit code 1: network/parsing error — suggest `--debug`
|
|
227
|
+
- Exit code 2: bad arguments — check syntax
|
|
228
|
+
- Exit code 3: agent error — check auth token, try `--debug`, verify agent is reachable
|
|
229
|
+
- Empty results are valid — do not fabricate data
|
|
230
|
+
- For `--json` output, parse and summarize the key fields for the user
|