@withone/cli 1.16.0 → 1.17.1
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/dist/{chunk-SX2Y4HDW.js → chunk-QW4MBV4F.js} +6 -4
- package/dist/{flow-runner-7RUK2WMF.js → flow-runner-AJGIUT6E.js} +1 -1
- package/dist/index.js +301 -274
- package/package.json +1 -1
- package/skills/one/SKILL.md +116 -0
- package/skills/one/references/flows.md +278 -0
- package/skills/one/references/relay.md +179 -0
- package/skills/one-actions/SKILL.md +0 -157
- package/skills/one-flow/SKILL.md +0 -917
- package/skills/one-relay/SKILL.md +0 -303
|
@@ -1,157 +0,0 @@
|
|
|
1
|
-
---
|
|
2
|
-
name: one-actions
|
|
3
|
-
description: |
|
|
4
|
-
Use the One CLI to interact with 200+ third-party platforms (Gmail, Slack, HubSpot, Shopify, etc.) through their APIs. This skill handles the full workflow: listing connections, searching for available actions, reading action documentation, and executing API calls against connected platforms.
|
|
5
|
-
|
|
6
|
-
TRIGGER when the user wants to:
|
|
7
|
-
- List their connected platforms or connections (e.g., "what platforms am I connected to", "show my connections")
|
|
8
|
-
- Search for what they can do on a platform (e.g., "what can I do with Gmail", "find Shopify actions for creating products", "search HubSpot for contacts")
|
|
9
|
-
- Understand how an API action works before using it (e.g., "how do I send an email with Gmail", "show me the docs for this action")
|
|
10
|
-
- Execute an action on a connected platform (e.g., "send an email via Gmail", "create a contact in HubSpot", "list my Shopify orders", "fetch my calendar events")
|
|
11
|
-
- Anything involving third-party platform integrations, API calls to external services through One, or using connected apps
|
|
12
|
-
|
|
13
|
-
DO NOT TRIGGER for:
|
|
14
|
-
- Setting up One or installing MCP (that's `one init`)
|
|
15
|
-
- Configuring access control (that's `one config`)
|
|
16
|
-
- Adding new connections (that's `one connection add`)
|
|
17
|
-
---
|
|
18
|
-
|
|
19
|
-
# One Actions CLI Workflow
|
|
20
|
-
|
|
21
|
-
You have access to the One CLI which lets you interact with 200+ third-party platforms through their APIs. The CLI handles authentication, request building, and execution through One's passthrough proxy.
|
|
22
|
-
|
|
23
|
-
## The Workflow
|
|
24
|
-
|
|
25
|
-
Always follow this sequence — each step builds on the previous one:
|
|
26
|
-
|
|
27
|
-
1. **List connections** to see what platforms the user has connected
|
|
28
|
-
2. **Search actions** to find the right API action for what the user wants to do
|
|
29
|
-
3. **Get knowledge** to understand the action's parameters, requirements, and structure
|
|
30
|
-
4. **Execute** the action with the correct parameters
|
|
31
|
-
|
|
32
|
-
Never skip the knowledge step before executing — it contains critical information about required parameters, validation rules, and request structure that you need to build a correct request.
|
|
33
|
-
|
|
34
|
-
## Commands
|
|
35
|
-
|
|
36
|
-
### 1. List Connections
|
|
37
|
-
|
|
38
|
-
```bash
|
|
39
|
-
one --agent connection list
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Returns JSON with all connected platforms, their status, and connection keys. You need the **connection key** for executing actions, and the **platform name** (kebab-case) for searching actions.
|
|
43
|
-
|
|
44
|
-
Output format:
|
|
45
|
-
```json
|
|
46
|
-
{"connections": [{"platform": "gmail", "state": "active", "key": "conn_abc123"}, ...]}
|
|
47
|
-
```
|
|
48
|
-
|
|
49
|
-
### 2. Search Actions
|
|
50
|
-
|
|
51
|
-
```bash
|
|
52
|
-
one --agent actions search <platform> <query>
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
Search for actions on a specific platform using natural language. Returns JSON with up to 5 matching actions including their action IDs, HTTP methods, and paths.
|
|
56
|
-
|
|
57
|
-
- `<platform>` — Platform name in kebab-case exactly as shown in the connections list (e.g., `gmail`, `shopify`, `hub-spot`)
|
|
58
|
-
- `<query>` — Natural language description of what you want to do (e.g., `"send email"`, `"list contacts"`, `"create order"`)
|
|
59
|
-
|
|
60
|
-
Options:
|
|
61
|
-
- `-t, --type <execute|knowledge>` — Use `execute` when the user wants to perform an action, `knowledge` when they want documentation or want to write code. Defaults to `knowledge`.
|
|
62
|
-
|
|
63
|
-
Example:
|
|
64
|
-
```bash
|
|
65
|
-
one --agent actions search gmail "send email" -t execute
|
|
66
|
-
```
|
|
67
|
-
|
|
68
|
-
Output format:
|
|
69
|
-
```json
|
|
70
|
-
{"actions": [{"_id": "abc123", "title": "Send Email", "tags": [...], "method": "POST", "path": "/messages/send"}, ...]}
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
### 3. Get Action Knowledge
|
|
74
|
-
|
|
75
|
-
```bash
|
|
76
|
-
one --agent actions knowledge <platform> <actionId>
|
|
77
|
-
```
|
|
78
|
-
|
|
79
|
-
Get comprehensive documentation for an action including parameters, requirements, validation rules, request/response structure, and examples. Returns JSON with the full API knowledge and HTTP method.
|
|
80
|
-
|
|
81
|
-
Always call this before executing — it tells you exactly what parameters are required, how to structure the request, and which CLI flags to use for path variables, query parameters, and body data. Do NOT pass path or query parameters in the `-d` body flag.
|
|
82
|
-
|
|
83
|
-
Example:
|
|
84
|
-
```bash
|
|
85
|
-
one --agent actions knowledge gmail 67890abcdef
|
|
86
|
-
```
|
|
87
|
-
|
|
88
|
-
Output format:
|
|
89
|
-
```json
|
|
90
|
-
{"knowledge": "...full API documentation and guidance...", "method": "POST"}
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### 4. Execute Action
|
|
94
|
-
|
|
95
|
-
```bash
|
|
96
|
-
one --agent actions execute <platform> <actionId> <connectionKey> [options]
|
|
97
|
-
```
|
|
98
|
-
|
|
99
|
-
Execute an action on a connected platform. Returns JSON with the request details and response data. You must have retrieved the knowledge for this action first.
|
|
100
|
-
|
|
101
|
-
- `<platform>` — Platform name in kebab-case
|
|
102
|
-
- `<actionId>` — Action ID from the search results
|
|
103
|
-
- `<connectionKey>` — Connection key from `one connection list`
|
|
104
|
-
|
|
105
|
-
Options:
|
|
106
|
-
- `-d, --data <json>` — Request body as JSON string (for POST, PUT, PATCH)
|
|
107
|
-
- `--path-vars <json>` — Path variables as JSON (for URLs with `{id}` placeholders)
|
|
108
|
-
- `--query-params <json>` — Query parameters as JSON
|
|
109
|
-
- `--headers <json>` — Additional headers as JSON
|
|
110
|
-
- `--form-data` — Send as multipart/form-data instead of JSON
|
|
111
|
-
- `--form-url-encoded` — Send as application/x-www-form-urlencoded
|
|
112
|
-
- `--dry-run` — Show the request that would be sent without executing it
|
|
113
|
-
|
|
114
|
-
Examples:
|
|
115
|
-
```bash
|
|
116
|
-
# Simple GET request
|
|
117
|
-
one --agent actions execute shopify <actionId> <connectionKey>
|
|
118
|
-
|
|
119
|
-
# POST with data
|
|
120
|
-
one --agent actions execute hub-spot <actionId> <connectionKey> \
|
|
121
|
-
-d '{"properties": {"email": "jane@example.com", "firstname": "Jane"}}'
|
|
122
|
-
|
|
123
|
-
# With path variables and query params
|
|
124
|
-
one --agent actions execute shopify <actionId> <connectionKey> \
|
|
125
|
-
--path-vars '{"order_id": "12345"}' \
|
|
126
|
-
--query-params '{"limit": "10"}'
|
|
127
|
-
|
|
128
|
-
# With repeated query params (array values expand to repeated keys)
|
|
129
|
-
one --agent actions execute gmail <actionId> <connectionKey> \
|
|
130
|
-
--path-vars '{"userId": "me", "id": "msg123"}' \
|
|
131
|
-
--query-params '{"format": "metadata", "metadataHeaders": ["From", "Subject", "Date"]}'
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
Output format:
|
|
135
|
-
```json
|
|
136
|
-
{"request": {"method": "POST", "url": "https://..."}, "response": {...}}
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
## Error Handling
|
|
140
|
-
|
|
141
|
-
All errors return JSON in agent mode:
|
|
142
|
-
```json
|
|
143
|
-
{"error": "Error message here"}
|
|
144
|
-
```
|
|
145
|
-
|
|
146
|
-
Parse the output as JSON. If the `error` key is present, the command failed — report the error message to the user.
|
|
147
|
-
|
|
148
|
-
## Important Notes
|
|
149
|
-
|
|
150
|
-
- **Always use `--agent` flag** — it produces structured JSON output without spinners, colors, or interactive prompts
|
|
151
|
-
- Platform names are always **kebab-case** (e.g., `hub-spot` not `HubSpot`, `ship-station` not `ShipStation`)
|
|
152
|
-
- Always use the **exact action ID** from search results — don't guess or construct them
|
|
153
|
-
- Always read the knowledge output carefully — it tells you which parameters are required vs optional, what format they need to be in, and any caveats specific to that API
|
|
154
|
-
- JSON values passed to `-d`, `--path-vars`, `--query-params`, and `--headers` must be valid JSON strings (use single quotes around the JSON to avoid shell escaping issues)
|
|
155
|
-
- **Array query params**: Use JSON arrays for repeated query parameters — `{"metadataHeaders": ["From", "Subject"]}` expands to `metadataHeaders=From&metadataHeaders=Subject`
|
|
156
|
-
- If search returns no results, try broader queries (e.g., `"list"` instead of `"list active premium customers"`)
|
|
157
|
-
- The execute command respects access control settings configured via `one config` — if execution is blocked, the user may need to adjust their permissions
|