@cmdop/sdk 1.0.2 → 1.1.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
|
@@ -93,6 +93,18 @@ for await (const frame of stream) {
|
|
|
93
93
|
const text = await c.machines.ask(machineId, "uptime").collect();
|
|
94
94
|
```
|
|
95
95
|
|
|
96
|
+
**Connection PIN.** If a machine requires a PIN, pass it **upfront** — the SDK is
|
|
97
|
+
headless, so there's no prompt to answer:
|
|
98
|
+
|
|
99
|
+
```ts
|
|
100
|
+
const text = await c.machines.ask(machineId, "uptime", { pin: "1234" }).collect();
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
A wrong PIN throws `PinDeniedError`; an unverified one throws `PinTimeoutError`
|
|
104
|
+
(both extend `PermissionError`, non-retryable). The reactive `stream.pin(...)`
|
|
105
|
+
callback above is for interactive use (a human at a prompt). The relay never
|
|
106
|
+
stores the PIN — it forwards it once to the target, which verifies it locally.
|
|
107
|
+
|
|
96
108
|
Frame types: `event · done · error · confirm_required · pin_required ·
|
|
97
109
|
pin_denied`. An `error` outcome throws `AgentStreamError`.
|
|
98
110
|
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/bin/cmdop-core-linux-x64
CHANGED
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cmdop/sdk",
|
|
3
|
-
"version": "1.0
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Typed Node SDK for CMDOP \u2014 spawns the baked-in cmdop-core Go binary and speaks protobuf over stdio (machines, fleets, tunnels, schedules, keys, and machine AI ask streaming).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://docs.cmdop.com",
|