@cmdop/sdk 1.0.1 → 1.0.2

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
@@ -6,6 +6,11 @@ Typed Node SDK for CMDOP — manage your machines, fleets, tunnels, and schedule
6
6
  stream a machine's AI agent, and drive the skills marketplace, all from typed
7
7
  TypeScript.
8
8
 
9
+ 📚 **Docs: [docs.cmdop.com](https://docs.cmdop.com)** · [SDK](https://cmdop.com/sdk) ·
10
+ [Bots](https://cmdop.com/bots) · [Connect](https://cmdop.com/connect)
11
+
12
+ ![How the CMDOP SDK connects your app to your machines](https://raw.githubusercontent.com/commandoperator/cmdop-sdk/main/assets/diagram-cmdop-sdk.webp)
13
+
9
14
  - **One install, zero dependencies** — `npm i @cmdop/sdk` is everything. No
10
15
  native build step, no `optionalDependencies`, nothing fetched on first run.
11
16
  - **Works anywhere, offline-ready** — a single self-contained package runs the
@@ -114,16 +119,30 @@ Every failure surfaces as a typed error carrying a stable `code` (all extend
114
119
  import {
115
120
  AuthError, PermissionError, NotFoundError, ConflictError,
116
121
  ValidationError, RateLimitError, ServerError, ConnectionError,
117
- AgentStreamError, CmdopError,
122
+ TimeoutError, UnavailableError, AgentStreamError, CmdopError,
118
123
  } from "@cmdop/sdk";
119
124
 
120
125
  try {
121
126
  await c.machines.get("missing-id");
122
127
  } catch (e) {
123
128
  if (e instanceof NotFoundError) { /* ... */ }
124
- else if (e instanceof CmdopError) console.log(e.code, e.message);
129
+ else if (e instanceof CmdopError) {
130
+ if (e.retryable) { /* true on TimeoutError — safe to retry */ }
131
+ console.log(e.code, e.message);
132
+ }
125
133
  }
126
134
  ```
127
135
 
128
- `ConnectionError` also covers a lost connection mid-call (pending promises
129
- reject). `AgentStreamError` is the streaming-`ask` error outcome.
136
+ `ConnectionError` covers a lost connection mid-call (pending promises reject);
137
+ `TimeoutError` (a retryable subclass) is a deadline/handshake timeout;
138
+ `UnavailableError` means the relay is up but the target agent/machine is offline.
139
+ `AgentStreamError` is the streaming-`ask` error outcome.
140
+
141
+ ## Links
142
+
143
+ - **Docs** → [docs.cmdop.com](https://docs.cmdop.com)
144
+ - **SDK** → [cmdop.com/sdk](https://cmdop.com/sdk) · **Bots** →
145
+ [cmdop.com/bots](https://cmdop.com/bots) · **Connect** →
146
+ [cmdop.com/connect](https://cmdop.com/connect)
147
+ - [`@cmdop/sdk` on npm](https://www.npmjs.com/package/@cmdop/sdk) ·
148
+ [source](https://github.com/commandoperator/cmdop-sdk)
Binary file
Binary file
Binary file
Binary file
Binary file
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@cmdop/sdk",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
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
- "homepage": "https://github.com/commandoperator/cmdop-sdk/tree/main/node#readme",
6
+ "homepage": "https://docs.cmdop.com",
7
7
  "repository": {
8
8
  "type": "git",
9
9
  "url": "git+https://github.com/commandoperator/cmdop-sdk.git",