@withone/cli 2.3.2 → 2.5.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
CHANGED
|
@@ -185,7 +185,7 @@ Opens your browser, you authorize, done. The CLI polls until the connection is l
|
|
|
185
185
|
|
|
186
186
|
### `one list`
|
|
187
187
|
|
|
188
|
-
List your active connections with their status, connection keys, and
|
|
188
|
+
List your active connections with their status, connection keys, and the access this key has on each.
|
|
189
189
|
|
|
190
190
|
```bash
|
|
191
191
|
one list
|
|
@@ -199,15 +199,15 @@ one list
|
|
|
199
199
|
|
|
200
200
|
You need the connection key (rightmost column) when executing actions.
|
|
201
201
|
|
|
202
|
-
**Access reporting.** Every connection carries an `access` field
|
|
202
|
+
**Access reporting.** Every connection carries an `access` field: what this key may run there. The CLI reads it from One (`GET /v1/access/me`, the access chosen on the consent page or later in the dashboard) and narrows it by any limits you set with [`one config`](#one-config) — the server's answer is the ceiling, local settings can only lower it.
|
|
203
203
|
|
|
204
|
-
| Policy | Means |
|
|
205
|
-
|
|
206
|
-
| `{"policy": "full"}` | Every action on the connection |
|
|
207
|
-
| `{"policy": "methods", "methods": ["GET"]}` | Only actions with those
|
|
208
|
-
| `{"policy": "actions", "actions": [{"actionId": "...", "title": "...", "method": "..."}]}` | Only these specific actions |
|
|
204
|
+
| Policy | Means | `level` |
|
|
205
|
+
|--------|-------|---------|
|
|
206
|
+
| `{"policy": "full"}` | Every action on the connection | `full` (Full access) |
|
|
207
|
+
| `{"policy": "methods", "methods": ["GET"]}` | Only actions with those methods | `read-only`, `read-write` (GET, POST, PUT, PATCH), or `custom` |
|
|
208
|
+
| `{"policy": "actions", "actions": [{"actionId": "...", "title": "...", "method": "..."}]}` | Only these specific actions | `custom`, or `none` when empty |
|
|
209
209
|
|
|
210
|
-
|
|
210
|
+
A connection the key does not reach is not listed. When the policy is `actions`, those actions are exactly what may run — `actions load <actionId>` reads their docs, no find needed.
|
|
211
211
|
|
|
212
212
|
```jsonc
|
|
213
213
|
// one --agent list
|
|
@@ -219,14 +219,14 @@ An action allowlist wins over the permission level (and is then method-filtered
|
|
|
219
219
|
"platform": "gmail",
|
|
220
220
|
"state": "operational",
|
|
221
221
|
"key": "live::gmail::default::abc123",
|
|
222
|
-
"access": { "policy": "methods", "methods": ["GET"] }
|
|
222
|
+
"access": { "policy": "methods", "methods": ["GET"], "level": "read-only" }
|
|
223
223
|
}
|
|
224
224
|
],
|
|
225
|
-
"
|
|
225
|
+
"accessSource": "server"
|
|
226
226
|
}
|
|
227
227
|
```
|
|
228
228
|
|
|
229
|
-
`knowledgeOnly: true` appears when knowledge-only mode is on (execution disabled), and `unresolvedActionIds` lists
|
|
229
|
+
`accessSource` is `"server"` when One reported the key's access and `"local"` when it could not (an older API); then `access` shows only the CLI's own settings, the human table labels the column "Access (CLI settings only)", and `accessHint` says One may allow less. `knowledgeOnly: true` appears when knowledge-only mode is on (execution disabled), and `unresolvedActionIds` lists action ids that could not be looked up.
|
|
230
230
|
|
|
231
231
|
This mirrors the `access` field on the One MCP server's `list_one_integrations` tool, so both surfaces report access the same way.
|
|
232
232
|
|
|
@@ -498,6 +498,28 @@ one relay deliveries --endpoint-id <id> # Check delivery status
|
|
|
498
498
|
|
|
499
499
|
Start with `one relay platforms` to discover which platforms support relay at all, then drill into `event-types <platform>` for the specific events. Run `one guide relay` for the full reference including `--metadata` requirements per platform.
|
|
500
500
|
|
|
501
|
+
### `one skills`
|
|
502
|
+
|
|
503
|
+
Optional skills for your coding agent, installed on request. The One skill itself still comes from `one init` (and `one config skills sync|status`); these commands never touch it.
|
|
504
|
+
|
|
505
|
+
```bash
|
|
506
|
+
one skills list # the One skill and each optional skill, with where it is installed
|
|
507
|
+
one skills add connect # the One Connect skill, into this project
|
|
508
|
+
one skills add connect --global # ...or for every project on this machine
|
|
509
|
+
one skills add connect --agents claude-code,windsurf # link exactly these agents
|
|
510
|
+
one skills update [connect] # re-copy after upgrading @withone/connect
|
|
511
|
+
one skills remove connect # remove it and the agent folders that point at it
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
What `one skills add connect` does:
|
|
515
|
+
|
|
516
|
+
1. **Finds the skill** in the `@withone/connect` package your project installed (`node_modules/@withone/connect/skills/one-connect`), so your agent reads the docs for the exact SDK version your code calls. If the package isn't installed yet, it downloads the latest published package from npm and checks it against the registry's integrity hash first.
|
|
517
|
+
2. **Installs it** into `.agents/skills/one-connect` (read by Codex, Cursor, Amp and OpenCode) and links `.claude/skills/one-connect` for Claude Code. Windsurf, Kiro, Goose and Roo get a link when the project already has their folder (`.windsurf`, `.kiro`, `.goose`, `.roo`). Where links aren't allowed (Windows without developer mode), it uses a junction, then a copy.
|
|
518
|
+
3. **Stamps** the install with the package version in `.one-skill.json`.
|
|
519
|
+
4. **Keeps it fresh**: any `one` command run in the project re-copies the skill when the installed `@withone/connect` version changes. Local files only; no network.
|
|
520
|
+
|
|
521
|
+
Commit `.agents/skills/one-connect` and the agent links so your team's agents share the skill. Agent mode (`--agent`) returns JSON for every subcommand.
|
|
522
|
+
|
|
501
523
|
### `one guide [topic]`
|
|
502
524
|
|
|
503
525
|
Get the full CLI usage guide, designed for AI agents that only have the binary (no MCP, no IDE skills).
|
|
@@ -104,6 +104,20 @@ var OneApi = class {
|
|
|
104
104
|
if (!text) return {};
|
|
105
105
|
return JSON.parse(text);
|
|
106
106
|
}
|
|
107
|
+
/**
|
|
108
|
+
* The calling key's own access, as One enforces it: `GET /v1/access/me`.
|
|
109
|
+
* Resolves `null` for a key with no restrictions. Throws `ApiError` when the
|
|
110
|
+
* API does not answer it (for example an older backend without the route).
|
|
111
|
+
*/
|
|
112
|
+
async getOwnAccess() {
|
|
113
|
+
const body = await this.request("/access/me");
|
|
114
|
+
if (body === null) return null;
|
|
115
|
+
if (typeof body !== "object" || !("rules" in body || "methods" in body)) {
|
|
116
|
+
throw new ApiError(502, "Unexpected answer from /access/me");
|
|
117
|
+
}
|
|
118
|
+
const doc = body;
|
|
119
|
+
return { methods: doc.methods ?? null, rules: doc.rules ?? null };
|
|
120
|
+
}
|
|
107
121
|
async whoami() {
|
|
108
122
|
return this.request("/users/whoami");
|
|
109
123
|
}
|
|
@@ -2285,7 +2299,7 @@ async function executeSubflowStep(step, context, api, permissions, allowedAction
|
|
|
2285
2299
|
if (flowStack.includes(resolvedKey)) {
|
|
2286
2300
|
throw new Error(`Circular flow detected: ${[...flowStack, resolvedKey].join(" \u2192 ")}`);
|
|
2287
2301
|
}
|
|
2288
|
-
const { loadFlowWithMeta: loadFlowWithMeta2 } = await import("./flow-runner-
|
|
2302
|
+
const { loadFlowWithMeta: loadFlowWithMeta2 } = await import("./flow-runner-4A5ANCTT.js");
|
|
2289
2303
|
const { flow: subFlow, rootDir: subRootDir } = loadFlowWithMeta2(resolvedKey);
|
|
2290
2304
|
const subContext = await executeFlow(
|
|
2291
2305
|
subFlow,
|