cloudflare-openhands-sdk 0.2.0 → 0.3.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 (3) hide show
  1. package/Dockerfile +2 -3
  2. package/README.md +18 -36
  3. package/package.json +1 -1
package/Dockerfile CHANGED
@@ -14,6 +14,5 @@ RUN git clone https://github.com/OpenHands/software-agent-sdk.git && \
14
14
  cd software-agent-sdk && \
15
15
  make build
16
16
 
17
- # Required during local development to access exposed ports
18
- EXPOSE 8080
19
-
17
+ # Allows access to exposed ports from the default OpenHands port during local development
18
+ EXPOSE 8001
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  SDK for integrating OpenHands agent-server with Cloudflare Workers Sandbox.
4
4
 
5
+ ![Cloudflare OpenHands](assets/cf-openhands.jpeg)
6
+
5
7
  ## Installation
6
8
 
7
9
  ```bash
@@ -15,43 +17,22 @@ bun add cloudflare-openhands-sdk
15
17
  ## Prerequisites
16
18
 
17
19
  - `@cloudflare/sandbox` (peer dependency) - Install in your Worker project
18
- - Cloudflare Workers account with Sandbox support
20
+ - Cloudflare Workers Paid account
19
21
  - Custom domain (required for preview URLs)
20
22
 
21
23
  ## Quick Start
22
24
 
23
- ### 1. Configure Wrangler
24
-
25
- Add the Dockerfile to your `wrangler.jsonc`:
26
-
27
- ```jsonc
28
- {
29
- "containers": [
30
- {
31
- "class_name": "Sandbox",
32
- "image": "./node_modules/cloudflare-openhands-sdk/Dockerfile",
33
- "instance_type": "basic",
34
- "max_instances": 1
35
- }
36
- ],
37
- "durable_objects": {
38
- "bindings": [
39
- {
40
- "class_name": "Sandbox",
41
- "name": "Sandbox"
42
- }
43
- ]
44
- },
45
- "routes": [
46
- {
47
- "pattern": "*.yourdomain.com/*",
48
- "zone_name": "yourdomain.com"
49
- }
50
- ]
51
- }
25
+ The fastest way to get started is using our example template:
26
+
27
+ ```bash
28
+ npm create cloudflare@latest -- openhands-example --template=jagzmz/cloudflare-openhands-sdk/examples/openhands
29
+ # or
30
+ pnpm create cloudflare@latest -- openhands-example --template=jagzmz/cloudflare-openhands-sdk/examples/openhands
52
31
  ```
53
32
 
54
- ### 2. Use the SDK in Your Worker
33
+ For detailed setup instructions, deployment guide, and usage examples, see the [example README](examples/openhands/README.md).
34
+
35
+ ## Using the SDK in Your Worker
55
36
 
56
37
  ```typescript
57
38
  import { attachOpenhandsRoutes } from 'cloudflare-openhands-sdk/routes';
@@ -111,10 +92,7 @@ The package includes a pre-configured Dockerfile that:
111
92
  - Clones and builds the OpenHands software-agent-sdk
112
93
  - Sets up the agent-server environment
113
94
 
114
- Reference it in your `wrangler.jsonc`:
115
- ```jsonc
116
- "image": "./node_modules/cloudflare-openhands-sdk/Dockerfile"
117
- ```
95
+ For a complete Wrangler configuration example, see the [example project](examples/openhands/).
118
96
 
119
97
  ## Configuration Options
120
98
 
@@ -133,4 +111,8 @@ interface OpenhandsOptions {
133
111
 
134
112
  Apache 2.0
135
113
 
136
- This project is licensed under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for details.
114
+ This project is licensed under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for details.
115
+
116
+ ## Acknowledgments
117
+
118
+ This project was inspired by the [Cloudflare Sandbox SDK opencode example](https://github.com/cloudflare/sandbox-sdk/blob/main/packages/sandbox/src/opencode/).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cloudflare-openhands-sdk",
3
- "version": "0.2.0",
3
+ "version": "0.3.0",
4
4
  "description": "SDK for integrating OpenHands agent-server with Cloudflare Workers Sandbox",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",