@pstdio/pocketcoder-sdk 0.3.0 → 0.3.1

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
@@ -4,12 +4,18 @@ The Node ESM SDK for the PocketCoder control plane. It ships built JavaScript
4
4
  and declarations, so consumers do not need Bun, a TypeScript loader, or access
5
5
  to PocketCoder's private workspace packages.
6
6
 
7
- Runtime-validated TypeScript client for the PocketCoder control-plane API. It
8
- uses platform `fetch`, composes timeouts with caller abort signals, validates
9
- successful and error responses, and exposes typed pagination. Retryable
10
- transport failures and 408/425/429/5xx responses are retried only for reads or
11
- mutations carrying an `Idempotency-Key`; configure the bounded retry count with
12
- `maxRetries` (default `2`).
7
+ Requires Node 22.19 or newer. Install it with Bun:
8
+
9
+ ```sh
10
+ bun add @pstdio/pocketcoder-sdk
11
+ ```
12
+
13
+ Use the SDK from a trusted backend. Do not put a PocketCoder API key in browser
14
+ code or inside a workspace. The SDK uses platform `fetch`, combines its timeout
15
+ with caller cancellation, validates successful and error responses, and
16
+ provides typed pagination. Retryable transport failures and 408/425/429/5xx
17
+ responses are retried only for reads or mutations carrying an
18
+ `Idempotency-Key`. Set the bounded retry count with `maxRetries` (default `2`).
13
19
 
14
20
  ```ts
15
21
  import { PocketCoderClient } from "@pstdio/pocketcoder-sdk";
package/dist/index.d.ts CHANGED
@@ -529,7 +529,7 @@ declare class CheckpointsApi {
529
529
  }, options?: RequestOptions): Promise<Page<{
530
530
  id: string;
531
531
  workspace_id: string;
532
- state: "creating" | "ready" | "failed" | "deleting" | "deleted";
532
+ state: "deleted" | "creating" | "ready" | "failed" | "deleting";
533
533
  reason_code: string | null;
534
534
  template: {
535
535
  name: string;
@@ -550,7 +550,7 @@ declare class CheckpointsApi {
550
550
  get(id: string, options?: RequestOptions): Promise<{
551
551
  id: string;
552
552
  workspace_id: string;
553
- state: "creating" | "ready" | "failed" | "deleting" | "deleted";
553
+ state: "deleted" | "creating" | "ready" | "failed" | "deleting";
554
554
  reason_code: string | null;
555
555
  template: {
556
556
  name: string;
@@ -1202,7 +1202,7 @@ declare class WorkspacesApi {
1202
1202
  checkpoint: {
1203
1203
  id: string;
1204
1204
  workspace_id: string;
1205
- state: "creating" | "ready" | "failed" | "deleting" | "deleted";
1205
+ state: "deleted" | "creating" | "ready" | "failed" | "deleting";
1206
1206
  reason_code: string | null;
1207
1207
  template: {
1208
1208
  name: string;
package/dist/index.js CHANGED
@@ -783,7 +783,7 @@ const TemplateSpecSchema = z.object({
783
783
  version: z.string().regex(SEMVER_RE),
784
784
  image: z.string().regex(IMAGE_DIGEST_RE, { message: "image must be digest-pinned (repo@sha256:<64 hex>)" }),
785
785
  command: CommandSchema.default([
786
- "/usr/local/bin/pocketcoder-agent",
786
+ "/usr/local/bin/pocketcoder-supervisor",
787
787
  "supervise",
788
788
  "--launch-input",
789
789
  "/run/pocketcoder/input"
package/package.json CHANGED
@@ -1,51 +1,51 @@
1
1
  {
2
- "name": "@pstdio/pocketcoder-sdk",
3
- "nx": {
4
- "tags": [
5
- "scope:sdk",
6
- "type:library"
7
- ]
8
- },
9
- "version": "0.3.0",
10
- "private": false,
11
- "description": "Runtime-validated TypeScript client for the PocketCoder control plane.",
12
- "type": "module",
13
- "license": "MIT",
14
- "repository": {
15
- "type": "git",
16
- "url": "git+https://github.com/pufflyai/pocketcoder.git",
17
- "directory": "packages/sdk"
18
- },
19
- "files": [
20
- "dist",
21
- "README.md",
22
- "LICENSE"
23
- ],
24
- "exports": {
25
- ".": {
26
- "types": "./dist/index.d.ts",
27
- "import": "./dist/index.js"
28
- }
29
- },
30
- "publishConfig": {
31
- "access": "public"
32
- },
33
- "engines": {
34
- "node": ">=22.19.0"
35
- },
36
- "scripts": {
37
- "build": "tsdown",
38
- "test": "bun test",
39
- "typecheck": "tsc --project ./tsconfig.json --noEmit"
40
- },
41
- "dependencies": {
42
- "zod": "^4.0.0"
43
- },
44
- "devDependencies": {
45
- "@pstdio/pocketcoder-contracts": "workspace:*",
46
- "@types/bun": "1.3.14",
47
- "@types/node": "26.1.2",
48
- "tsdown": "0.22.14",
49
- "typescript": "5.9.3"
50
- }
2
+ "name": "@pstdio/pocketcoder-sdk",
3
+ "nx": {
4
+ "tags": [
5
+ "scope:sdk",
6
+ "type:library"
7
+ ]
8
+ },
9
+ "version": "0.3.1",
10
+ "private": false,
11
+ "description": "Runtime-validated TypeScript client for the PocketCoder control plane.",
12
+ "type": "module",
13
+ "license": "MIT",
14
+ "repository": {
15
+ "type": "git",
16
+ "url": "git+https://github.com/pufflyai/pocketcoder.git",
17
+ "directory": "packages/sdk"
18
+ },
19
+ "files": [
20
+ "dist",
21
+ "README.md",
22
+ "LICENSE"
23
+ ],
24
+ "exports": {
25
+ ".": {
26
+ "types": "./dist/index.d.ts",
27
+ "import": "./dist/index.js"
28
+ }
29
+ },
30
+ "publishConfig": {
31
+ "access": "public"
32
+ },
33
+ "engines": {
34
+ "node": ">=22.19.0"
35
+ },
36
+ "scripts": {
37
+ "build": "tsdown",
38
+ "test": "bun test",
39
+ "typecheck": "tsc --project ./tsconfig.json --noEmit"
40
+ },
41
+ "dependencies": {
42
+ "zod": "^4.0.0"
43
+ },
44
+ "devDependencies": {
45
+ "@pstdio/pocketcoder-contracts": "workspace:*",
46
+ "@types/bun": "1.3.14",
47
+ "@types/node": "26.1.2",
48
+ "tsdown": "0.22.14",
49
+ "typescript": "5.9.3"
50
+ }
51
51
  }