@sayknow-cli/bridge-client 0.3.16 → 0.4.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 ADDED
@@ -0,0 +1,29 @@
1
+ # @sayknow-cli/bridge-client
2
+
3
+ `@sayknow-cli/bridge-client` is the standalone SDK v3 WebSocket transport client for Sayknow-CLI. It exports `SdkClient`, `SdkClientError`, and the associated frame, request, reconnect, and options types.
4
+
5
+ ```ts
6
+ import { SdkClient } from "@sayknow-cli/bridge-client";
7
+
8
+ const client = await SdkClient.connect(endpoint.url, endpoint.token);
9
+ try {
10
+ const metadata = await client.query("session.metadata");
11
+ console.log(metadata);
12
+ } finally {
13
+ await client.close();
14
+ }
15
+ ```
16
+
17
+ ## Transport contract
18
+
19
+ The client adds the endpoint token as a WebSocket query parameter, waits for a server `hello` frame before requests are sent, and correlates responses by request ID. A server error response rejects with `SdkClientError`, whose `code`, `message`, and `details` preserve the wire error. It bounds open, hello, retry, and request work with the configured timeout and optional absolute deadline.
20
+
21
+ A request that has been sent is never replayed after reconnect. Callers that need retry semantics must decide whether retrying their operation is safe and provide their own idempotency protocol where appropriate.
22
+
23
+ ## Scope and compatibility
24
+
25
+ This package is transport-only. It does not import, instantiate, dispatch to, or otherwise own `AgentSession`, broker lifecycle, backend process management, or application operation handlers.
26
+
27
+ It is SDK v3 only. The historical BridgeClient/backend-bridge protocol, RPC ingress, and compatibility behavior are intentionally unsupported and must not be restored. Use the documented SDK v3 WebSocket endpoint and frames instead.
28
+
29
+ `@sayknow-cli/coding-agent/sdk` re-exports this package for compatibility; both entrypoints expose the same `SdkClient` class identity.
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "type": "module",
3
3
  "name": "@sayknow-cli/bridge-client",
4
- "version": "0.3.16",
5
- "description": "TypeScript client SDK for the SKC backend bridge protocol",
4
+ "version": "0.4.2",
5
+ "description": "Transport-only v3 SDK WebSocket client",
6
6
  "homepage": "https://sayknow-cli.com",
7
- "author": "jaybeyond",
7
+ "author": "jaybeyond and Sayknow-CLI Contributors",
8
8
  "license": "MIT",
9
9
  "repository": {
10
10
  "type": "git",
@@ -15,12 +15,13 @@
15
15
  "url": "https://github.com/jaybeyond/Sayknow_CLI/issues"
16
16
  },
17
17
  "keywords": [
18
- "skc",
19
- "bridge",
20
- "sdk"
18
+ "sdk",
19
+ "websocket",
20
+ "transport",
21
+ "client"
21
22
  ],
22
23
  "main": "./src/index.ts",
23
- "types": "./dist/types/index.d.ts",
24
+ "types": "./src/index.ts",
24
25
  "scripts": {
25
26
  "check": "biome check . && bun run check:types",
26
27
  "check:types": "tsc -p tsconfig.json --noEmit",
@@ -36,17 +37,12 @@
36
37
  "bun": ">=1.3.14"
37
38
  },
38
39
  "files": [
39
- "src",
40
- "dist/types"
40
+ "src"
41
41
  ],
42
42
  "exports": {
43
43
  ".": {
44
- "types": "./dist/types/index.d.ts",
44
+ "types": "./src/index.ts",
45
45
  "import": "./src/index.ts"
46
- },
47
- "./*": {
48
- "types": "./dist/types/*.d.ts",
49
- "import": "./src/*.ts"
50
46
  }
51
47
  }
52
48
  }