@agentconnect/sdk 0.1.6 → 0.2.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.
Files changed (2) hide show
  1. package/README.md +17 -0
  2. package/package.json +1 -6
package/README.md CHANGED
@@ -91,6 +91,23 @@ await session.close();
91
91
  client.close();
92
92
  ```
93
93
 
94
+ ## Embedded host (Node backend)
95
+
96
+ ```ts
97
+ import { AgentConnect } from '@agentconnect/sdk';
98
+ import { createHostBridge } from '@agentconnect/host';
99
+
100
+ globalThis.__AGENTCONNECT_BRIDGE__ = createHostBridge({
101
+ mode: 'embedded',
102
+ basePath: process.cwd(),
103
+ });
104
+
105
+ const client = await AgentConnect.connect({ preferInjected: true });
106
+ ```
107
+
108
+ If your SDK runs in the browser, expose a WebSocket host from your backend using
109
+ `startDevHost` and connect with `AgentConnect.connect({ host: 'ws://...' })`.
110
+
94
111
  ## Provider and model helpers
95
112
 
96
113
  ```ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentconnect/sdk",
3
- "version": "0.1.6",
3
+ "version": "0.2.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "homepage": "https://github.com/rayzhudev/agent-connect",
@@ -19,11 +19,6 @@
19
19
  "import": "./dist/index.js",
20
20
  "types": "./dist/index.d.ts",
21
21
  "default": "./dist/index.js"
22
- },
23
- "./host": {
24
- "import": "./dist/host.js",
25
- "types": "./dist/host.d.ts",
26
- "default": "./dist/host.js"
27
22
  }
28
23
  },
29
24
  "files": [