@withone/cli 1.29.0 → 1.31.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 +69 -2
- package/dist/{chunk-AZV4EGKT.js → chunk-645Z3ARQ.js} +124 -32
- package/dist/{flow-runner-AK5W4GLF.js → flow-runner-HT74FKPD.js} +1 -1
- package/dist/index.js +4074 -218
- package/package.json +8 -3
- package/profiles/attio/attioCompanies.json +16 -0
- package/profiles/attio/attioPeople.json +17 -0
- package/profiles/fathom/meetings.json +27 -0
- package/profiles/gmail/gmailThreads.json +28 -0
- package/profiles/google-calendar/events.json +17 -0
- package/profiles/notion/search.json +18 -0
- package/profiles/stripe/balanceTransactions.json +17 -0
- package/profiles/stripe/customers.json +18 -0
- package/skills/one/SKILL.md +43 -0
- package/skills/one/references/flows.md +4 -0
package/package.json
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@withone/cli",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.31.0",
|
|
4
4
|
"description": "CLI for managing One",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
7
7
|
"bin",
|
|
8
8
|
"dist",
|
|
9
|
-
"skills"
|
|
9
|
+
"skills",
|
|
10
|
+
"profiles"
|
|
10
11
|
],
|
|
11
12
|
"bin": {
|
|
12
13
|
"one": "./bin/cli.js"
|
|
@@ -24,7 +25,11 @@
|
|
|
24
25
|
"picocolors": "^1.1.1",
|
|
25
26
|
"smol-toml": "^1.6.0"
|
|
26
27
|
},
|
|
28
|
+
"optionalDependencies": {
|
|
29
|
+
"better-sqlite3": "^11.7.0"
|
|
30
|
+
},
|
|
27
31
|
"devDependencies": {
|
|
32
|
+
"@types/better-sqlite3": "^7.6.13",
|
|
28
33
|
"@types/node": "^22.13.1",
|
|
29
34
|
"tsup": "^8.3.6",
|
|
30
35
|
"typescript": "^5.7.3"
|
|
@@ -36,4 +41,4 @@
|
|
|
36
41
|
"engines": {
|
|
37
42
|
"node": ">=18"
|
|
38
43
|
}
|
|
39
|
-
}
|
|
44
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Attio companies — CRM company records with domains, industry, and custom attributes",
|
|
3
|
+
"platform": "attio",
|
|
4
|
+
"model": "attioCompanies",
|
|
5
|
+
"connectionKey": "AUTO",
|
|
6
|
+
"actionId": "conn_mod_def::GJt0lFZ6kpk::attio-companies-list",
|
|
7
|
+
"resultsPath": "companies",
|
|
8
|
+
"idField": "id",
|
|
9
|
+
"pagination": {
|
|
10
|
+
"type": "offset",
|
|
11
|
+
"passAs": "body:offset"
|
|
12
|
+
},
|
|
13
|
+
"limitLocation": "body",
|
|
14
|
+
"limitParam": "limit",
|
|
15
|
+
"defaultLimit": 100
|
|
16
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Attio people — CRM contact records with emails, phone numbers, and custom attributes",
|
|
3
|
+
"platform": "attio",
|
|
4
|
+
"model": "attioPeople",
|
|
5
|
+
"connectionKey": "AUTO",
|
|
6
|
+
"identityKey": "primary_email_address",
|
|
7
|
+
"actionId": "conn_mod_def::GJt0lFZ6kpk::attio-people-list",
|
|
8
|
+
"resultsPath": "people",
|
|
9
|
+
"idField": "id",
|
|
10
|
+
"pagination": {
|
|
11
|
+
"type": "offset",
|
|
12
|
+
"passAs": "body:offset"
|
|
13
|
+
},
|
|
14
|
+
"limitLocation": "body",
|
|
15
|
+
"limitParam": "limit",
|
|
16
|
+
"defaultLimit": 100
|
|
17
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Fathom meetings — recorded meetings with transcripts, summaries, action items, and attendees",
|
|
3
|
+
"platform": "fathom",
|
|
4
|
+
"model": "meetings",
|
|
5
|
+
"connectionKey": "AUTO",
|
|
6
|
+
"actionId": "conn_mod_def::fathom::meetings-list",
|
|
7
|
+
"resultsPath": "items",
|
|
8
|
+
"idField": "recording_id",
|
|
9
|
+
"pagination": {
|
|
10
|
+
"type": "cursor",
|
|
11
|
+
"nextPath": "next_cursor",
|
|
12
|
+
"passAs": "query:cursor",
|
|
13
|
+
"hasMorePath": "has_more"
|
|
14
|
+
},
|
|
15
|
+
"dateFilter": { "param": "created_after", "format": "iso8601" },
|
|
16
|
+
"defaultLimit": 50,
|
|
17
|
+
"queryParams": {
|
|
18
|
+
"include_action_items": "true"
|
|
19
|
+
},
|
|
20
|
+
"enrich": {
|
|
21
|
+
"actionId": "conn_mod_def::GIpBYFV5Mog::G6aag6ykQ-uD6XCeUUnq7Q",
|
|
22
|
+
"pathVars": {
|
|
23
|
+
"RECORDING_ID": "{recording_id}"
|
|
24
|
+
},
|
|
25
|
+
"concurrency": 3
|
|
26
|
+
}
|
|
27
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Gmail email threads — primary inbox with full message bodies (no attachments)",
|
|
3
|
+
"platform": "gmail",
|
|
4
|
+
"model": "gmailThreads",
|
|
5
|
+
"connectionKey": "AUTO",
|
|
6
|
+
"actionId": "conn_mod_def::GJ3ok-Q0D40::oLWNlcx4QDORaL_18z-MsQ",
|
|
7
|
+
"resultsPath": "threads",
|
|
8
|
+
"idField": "id",
|
|
9
|
+
"pagination": {
|
|
10
|
+
"type": "token",
|
|
11
|
+
"nextPath": "nextPageToken",
|
|
12
|
+
"passAs": "query:pageToken"
|
|
13
|
+
},
|
|
14
|
+
"limitParam": "maxResults",
|
|
15
|
+
"defaultLimit": 100,
|
|
16
|
+
"pathVars": { "userId": "me" },
|
|
17
|
+
"queryParams": { "q": "category:primary" },
|
|
18
|
+
"enrich": {
|
|
19
|
+
"actionId": "conn_mod_def::GJ3ok0Eq0R8::AAzgZVLqTg2iBuITKpJLZg",
|
|
20
|
+
"pathVars": { "userId": "me", "id": "{id}" },
|
|
21
|
+
"queryParams": { "format": "full" },
|
|
22
|
+
"exclude": [
|
|
23
|
+
"messages[].payload.parts[].body.data",
|
|
24
|
+
"messages[].payload.body.data"
|
|
25
|
+
],
|
|
26
|
+
"concurrency": 5
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Google Calendar events — meetings, appointments, and all-day events with attendees and location",
|
|
3
|
+
"platform": "google-calendar",
|
|
4
|
+
"model": "events",
|
|
5
|
+
"connectionKey": "AUTO",
|
|
6
|
+
"actionId": "conn_mod_def::GJ5x5pOh2TU::gcal-events-list",
|
|
7
|
+
"resultsPath": "items",
|
|
8
|
+
"idField": "id",
|
|
9
|
+
"pagination": {
|
|
10
|
+
"type": "token",
|
|
11
|
+
"nextPath": "nextPageToken",
|
|
12
|
+
"passAs": "query:pageToken"
|
|
13
|
+
},
|
|
14
|
+
"pathVars": { "calendarId": "primary" },
|
|
15
|
+
"defaultLimit": 250,
|
|
16
|
+
"limitParam": "maxResults"
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Notion pages and databases — full workspace search with titles, properties, and metadata",
|
|
3
|
+
"platform": "notion",
|
|
4
|
+
"model": "search",
|
|
5
|
+
"connectionKey": "AUTO",
|
|
6
|
+
"actionId": "conn_mod_def::GJ5En67fz04::-CJAS419SVWm7L2l6brp6A",
|
|
7
|
+
"resultsPath": "results",
|
|
8
|
+
"idField": "id",
|
|
9
|
+
"pagination": {
|
|
10
|
+
"type": "cursor",
|
|
11
|
+
"nextPath": "next_cursor",
|
|
12
|
+
"passAs": "body:start_cursor",
|
|
13
|
+
"hasMorePath": "has_more"
|
|
14
|
+
},
|
|
15
|
+
"limitLocation": "body",
|
|
16
|
+
"limitParam": "page_size",
|
|
17
|
+
"defaultLimit": 100
|
|
18
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Stripe balance transactions — payments, refunds, payouts, and fees with amount, currency, and status",
|
|
3
|
+
"platform": "stripe",
|
|
4
|
+
"model": "balanceTransactions",
|
|
5
|
+
"connectionKey": "AUTO",
|
|
6
|
+
"actionId": "conn_mod_def::GGx6clhYjSQ::3kEaM3HQTA2JRfW3DzXC4g",
|
|
7
|
+
"resultsPath": "data",
|
|
8
|
+
"idField": "id",
|
|
9
|
+
"pagination": {
|
|
10
|
+
"type": "id",
|
|
11
|
+
"passAs": "query:starting_after",
|
|
12
|
+
"hasMorePath": "has_more",
|
|
13
|
+
"idField": "id"
|
|
14
|
+
},
|
|
15
|
+
"defaultLimit": 100,
|
|
16
|
+
"limitParam": "limit"
|
|
17
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Stripe customers — customer records with email, name, payment methods, and subscription status",
|
|
3
|
+
"platform": "stripe",
|
|
4
|
+
"model": "customers",
|
|
5
|
+
"connectionKey": "AUTO",
|
|
6
|
+
"actionId": "conn_mod_def::GGx6clhYjSQ::customers-list",
|
|
7
|
+
"resultsPath": "data",
|
|
8
|
+
"idField": "id",
|
|
9
|
+
"identityKey": "email",
|
|
10
|
+
"pagination": {
|
|
11
|
+
"type": "id",
|
|
12
|
+
"passAs": "query:starting_after",
|
|
13
|
+
"hasMorePath": "has_more",
|
|
14
|
+
"idField": "id"
|
|
15
|
+
},
|
|
16
|
+
"defaultLimit": 100,
|
|
17
|
+
"limitParam": "limit"
|
|
18
|
+
}
|
package/skills/one/SKILL.md
CHANGED
|
@@ -76,6 +76,10 @@ Options:
|
|
|
76
76
|
- `--form-data` — Send as multipart/form-data
|
|
77
77
|
- `--form-url-encoded` — Send as application/x-www-form-urlencoded
|
|
78
78
|
- `--dry-run` — Preview the request without executing
|
|
79
|
+
- `--mock` — Return example response without making an API call (useful for building UI)
|
|
80
|
+
- `--skip-validation` — Skip input validation against the action schema
|
|
81
|
+
|
|
82
|
+
The CLI validates required parameters before executing. Missing params return a structured error with the flag name, parameter name, and description. Pass `--skip-validation` to bypass.
|
|
79
83
|
|
|
80
84
|
Examples:
|
|
81
85
|
```bash
|
|
@@ -97,6 +101,18 @@ one --agent actions execute gmail <actionId> <connectionKey> \
|
|
|
97
101
|
--query-params '{"format": "metadata", "metadataHeaders": ["From", "Subject", "Date"]}'
|
|
98
102
|
```
|
|
99
103
|
|
|
104
|
+
### Parallel execution
|
|
105
|
+
|
|
106
|
+
Execute multiple actions concurrently with `--parallel`, separating each action with `--`:
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
one --agent actions execute --parallel \
|
|
110
|
+
gmail send-email conn123 -d '{"to":"a@b.com"}' \
|
|
111
|
+
-- slack post-message conn456 -d '{"text":"done"}'
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
All segments are validated before any execution. Failed actions don't block others. Use `--max-concurrency <n>` (default 5) to control batching. Agent-mode output: `{"parallel":true,"results":[...],"succeeded":N,"failed":N,"totalDurationMs":N}`.
|
|
115
|
+
|
|
100
116
|
## Error Handling
|
|
101
117
|
|
|
102
118
|
All errors return JSON: `{"error": "message"}`. Parse output as JSON and check for the `error` key.
|
|
@@ -122,6 +138,33 @@ Knowledge and search responses are cached locally (`~/.one/cache/`). Subsequent
|
|
|
122
138
|
- Manage cache: `one cache list`, `one cache clear`, `one cache update-all`
|
|
123
139
|
- `actions execute` is NEVER cached — always fresh
|
|
124
140
|
|
|
141
|
+
## Local Data Sync
|
|
142
|
+
|
|
143
|
+
Sync platform data into local SQLite for instant queries, full-text search, scheduled refresh, and change-driven automation.
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
# First time only
|
|
147
|
+
one sync install
|
|
148
|
+
|
|
149
|
+
# Check built-in profiles (pre-validated configs for common platforms)
|
|
150
|
+
one --agent sync profiles
|
|
151
|
+
|
|
152
|
+
# Setup (uses built-in if available, otherwise auto-infers + auto-tests)
|
|
153
|
+
one --agent sync init stripe balanceTransactions
|
|
154
|
+
# If _complete: true and _test.ok: true → go straight to sync run
|
|
155
|
+
|
|
156
|
+
# Sync + query
|
|
157
|
+
one --agent sync run stripe
|
|
158
|
+
one --agent sync query stripe/balanceTransactions --where "status=available" --limit 20
|
|
159
|
+
one --agent sync search "refund" # FTS across all synced platforms
|
|
160
|
+
one --agent sync list stripe # progress + freshness
|
|
161
|
+
|
|
162
|
+
# Schedule unattended syncs
|
|
163
|
+
one sync schedule add stripe --every 1h
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
**Advanced features** (enrich, transform, exclude, identityKey, hooks, --full-refresh, --where-sql delete, cursor resume): run `one guide sync` for the full reference.
|
|
167
|
+
|
|
125
168
|
## Beyond Single Actions
|
|
126
169
|
|
|
127
170
|
One also supports more advanced patterns. Read the relevant reference file before using these:
|
|
@@ -628,6 +628,7 @@ one --agent flow validate <key>
|
|
|
628
628
|
one --agent flow execute <key> -i key=value
|
|
629
629
|
one --agent flow execute <key> --dry-run -i key=value
|
|
630
630
|
one --agent flow execute <key> --dry-run --mock -i key=value
|
|
631
|
+
one --agent flow execute <key> --skip-validation -i key=value
|
|
631
632
|
one --agent flow execute <key> --allow-bash -i key=value
|
|
632
633
|
one --agent flow runs [flowKey]
|
|
633
634
|
one --agent flow resume <runId>
|
|
@@ -635,9 +636,12 @@ one --agent flow resume <runId>
|
|
|
635
636
|
|
|
636
637
|
## Important Notes
|
|
637
638
|
|
|
639
|
+
- **Prefer passthrough actions over custom actions.** Custom actions add server-side fan-out that causes timeouts at scale. The flow runner handles pagination, retries, and rate limiting locally. Search with `-t knowledge` to find passthrough endpoints (e.g. GET `/gmail/v1/users/{userId}/threads` instead of POST `/gmail/get-threads`)
|
|
638
640
|
- Connection keys are inputs, not hardcoded — makes workflows portable
|
|
639
641
|
- Action IDs in examples are placeholders — always use `actions search` to find real IDs
|
|
640
642
|
- Code steps support `require('crypto')`, `require('buffer')`, `require('url')`, `require('path')` — `fs`, `http`, `child_process` are blocked
|
|
641
643
|
- Bash steps require `--allow-bash` flag
|
|
644
|
+
- Action steps validate required params before executing — pass `--skip-validation` to bypass
|
|
645
|
+
- `--mock` now returns realistic example data from action schemas (instead of echoed config)
|
|
642
646
|
- State is persisted after every step — resume picks up where it left off
|
|
643
647
|
- For bash+Claude steps, always set timeout to 180000+ and run sequentially (not in parallel)
|