@withone/cli 2.9.1 → 2.10.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 +19 -4
- package/bin/cli.js +7 -1
- package/dist/{chunk-UP2L4XJH.js → chunk-5CPQHXTO.js} +17 -1
- package/dist/chunk-FYTWXGPJ.js +79 -0
- package/dist/{flow-runner-K73VDSS3.js → flow-runner-P23IZDWM.js} +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +872 -375
- package/dist/node-check.d.ts +36 -0
- package/dist/node-check.js +18 -0
- package/package.json +2 -2
- package/skills/one/SKILL.md +11 -0
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Refuses to run on a Node.js that still trusts the compromised eMudhra
|
|
3
|
+
* intermediate CAs (October 2026, RUSTSEC-2026-0381).
|
|
4
|
+
*
|
|
5
|
+
* Eight eMudhra/emSign intermediates were created with 8-bit private keys, so
|
|
6
|
+
* anyone can compute them and sign a certificate for any domain, including
|
|
7
|
+
* api.withone.ai. Node.js blocks them inside the TLS handshake from 22.23.4,
|
|
8
|
+
* 24.22.1 and 26.12.1 (nodejs/node#66871). On any older Node, a network
|
|
9
|
+
* attacker can intercept the CLI's traffic and the user's API key, and nothing
|
|
10
|
+
* in userland can block the intermediates the way Node's fix does.
|
|
11
|
+
*
|
|
12
|
+
* Built as its own entry so bin/cli.js can run it before loading the rest of
|
|
13
|
+
* the CLI, and before any connection opens.
|
|
14
|
+
*/
|
|
15
|
+
declare const REQUIRED_NODE = "22.23.4+, 24.22.1+ or 26.12.1+";
|
|
16
|
+
declare const REQUIRED_NODE_RANGE = "^22.23.4 || ^24.22.1 || >=26.12.1";
|
|
17
|
+
/** Set to 1 to run on an unpatched Node anyway, with a warning on every run. */
|
|
18
|
+
declare const ALLOW_UNPATCHED_ENV = "ONE_ALLOW_UNPATCHED_NODE";
|
|
19
|
+
/** True when this Node version rejects chains through the compromised eMudhra intermediates. */
|
|
20
|
+
declare function nodeHasTlsFix(version?: string): boolean;
|
|
21
|
+
/**
|
|
22
|
+
* The command that updates Node for however it was installed, judged from the
|
|
23
|
+
* path of the running binary. A line that got the fix stays on its line; any
|
|
24
|
+
* other moves to the recommended one.
|
|
25
|
+
*/
|
|
26
|
+
declare function upgradeCommand(version?: string, execPath?: string): string;
|
|
27
|
+
declare function unpatchedNodeMessage(version?: string): string;
|
|
28
|
+
/**
|
|
29
|
+
* Exits with an error on an unpatched Node; returns on a patched one. In agent
|
|
30
|
+
* mode the error is JSON on stdout with a code agents can act on. With
|
|
31
|
+
* ONE_ALLOW_UNPATCHED_NODE=1 it warns and returns instead (silently in agent
|
|
32
|
+
* mode, where stderr would corrupt the JSON for harnesses that merge streams).
|
|
33
|
+
*/
|
|
34
|
+
declare function requirePatchedNode(): void;
|
|
35
|
+
|
|
36
|
+
export { ALLOW_UNPATCHED_ENV, REQUIRED_NODE, REQUIRED_NODE_RANGE, nodeHasTlsFix, requirePatchedNode, unpatchedNodeMessage, upgradeCommand };
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ALLOW_UNPATCHED_ENV,
|
|
3
|
+
REQUIRED_NODE,
|
|
4
|
+
REQUIRED_NODE_RANGE,
|
|
5
|
+
nodeHasTlsFix,
|
|
6
|
+
requirePatchedNode,
|
|
7
|
+
unpatchedNodeMessage,
|
|
8
|
+
upgradeCommand
|
|
9
|
+
} from "./chunk-FYTWXGPJ.js";
|
|
10
|
+
export {
|
|
11
|
+
ALLOW_UNPATCHED_ENV,
|
|
12
|
+
REQUIRED_NODE,
|
|
13
|
+
REQUIRED_NODE_RANGE,
|
|
14
|
+
nodeHasTlsFix,
|
|
15
|
+
requirePatchedNode,
|
|
16
|
+
unpatchedNodeMessage,
|
|
17
|
+
upgradeCommand
|
|
18
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@withone/cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.10.0",
|
|
4
4
|
"description": "CLI for managing One",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"files": [
|
|
@@ -52,6 +52,6 @@
|
|
|
52
52
|
"url": "https://github.com/withoneai/cli"
|
|
53
53
|
},
|
|
54
54
|
"engines": {
|
|
55
|
-
"node": ">=
|
|
55
|
+
"node": "^22.23.4 || ^24.22.1 || >=26.12.1"
|
|
56
56
|
}
|
|
57
57
|
}
|
package/skills/one/SKILL.md
CHANGED
|
@@ -171,6 +171,8 @@ All segments are validated before any execution. Failed actions don't block othe
|
|
|
171
171
|
|
|
172
172
|
All errors return JSON: `{"error": "message"}`. Parse output as JSON and check for the `error` key.
|
|
173
173
|
|
|
174
|
+
The CLI requires Node.js 22.23.4+, 24.22.1+ or 26.12.1+ (older Node trusts the compromised eMudhra CA certificates). On an older Node every command exits 1 with `"code": "NODE_UPGRADE_REQUIRED"` and an `upgrade` field holding the command for the user's setup. Don't retry: show the user that command and ask them to update Node.js.
|
|
175
|
+
|
|
174
176
|
## Important Rules
|
|
175
177
|
|
|
176
178
|
- Always use `--agent` flag for structured JSON output
|
|
@@ -371,6 +373,15 @@ one --agent skills add connect # from the @withone/connect version the app
|
|
|
371
373
|
|
|
372
374
|
It lands in `.agents/skills/one-connect` (and `.claude/skills/one-connect`). The result's `next` array says what to do; the skill covers the button, the two routes, key mode vs token mode, and calling One with the grant. Never ask the user to paste the client secret or connect key into chat.
|
|
373
375
|
|
|
376
|
+
To create the Connect app itself without the dashboard, install `@withone/connect` in the project (0.19.0 or later; the file imports it from there, not from the CLI), write `one.connect.ts` with `defineConnectApp` from `@withone/connect/config` (name, `redirectUris`, `ask` per tool with `access`: `read-only`, `read-write`, `full-access`, or `custom` with `actions`), then:
|
|
377
|
+
|
|
378
|
+
```bash
|
|
379
|
+
one --agent connect types # tool slugs and action names autocomplete in one.connect.ts
|
|
380
|
+
one --agent connect create # the human approves it in the browser; then writes ONE_CLIENT_ID, ONE_PERMISSION_SET, ONE_REDIRECT_URI to .env
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
It opens a setup page in the human's browser and waits up to 10 minutes, so run it in the background or with a long timeout; the link is printed to stderr at once, so pass it on if no browser opened. The human reviews the app (or, on a re-run, its new version) and approves it with their dashboard session: an API key never creates or changes a Connect app. For a new app the page also makes `ONE_CLIENT_SECRET` and `ONE_CONNECT_KEY` and shows them once; tell the human to copy them into the env file the result names. The CLI never receives either secret. Run `connect create` again after editing the file to update the same app.
|
|
384
|
+
|
|
374
385
|
## Adding New Connections
|
|
375
386
|
|
|
376
387
|
If the user needs a platform that isn't connected yet, tell them to run:
|