cloudflare-openhands-sdk 0.2.1 → 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 +13 -35
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -22,38 +22,15 @@ bun add cloudflare-openhands-sdk
|
|
|
22
22
|
|
|
23
23
|
## Quick Start
|
|
24
24
|
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
```jsonc
|
|
30
|
-
{
|
|
31
|
-
"containers": [
|
|
32
|
-
{
|
|
33
|
-
"class_name": "Sandbox",
|
|
34
|
-
"image": "./node_modules/cloudflare-openhands-sdk/Dockerfile",
|
|
35
|
-
"instance_type": "basic",
|
|
36
|
-
"max_instances": 1
|
|
37
|
-
}
|
|
38
|
-
],
|
|
39
|
-
"durable_objects": {
|
|
40
|
-
"bindings": [
|
|
41
|
-
{
|
|
42
|
-
"class_name": "Sandbox",
|
|
43
|
-
"name": "Sandbox"
|
|
44
|
-
}
|
|
45
|
-
]
|
|
46
|
-
},
|
|
47
|
-
"routes": [
|
|
48
|
-
{
|
|
49
|
-
"pattern": "*.yourdomain.com/*",
|
|
50
|
-
"zone_name": "yourdomain.com"
|
|
51
|
-
}
|
|
52
|
-
]
|
|
53
|
-
}
|
|
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
|
|
54
29
|
```
|
|
55
30
|
|
|
56
|
-
|
|
31
|
+
For detailed setup instructions, deployment guide, and usage examples, see the [example README](examples/openhands/README.md).
|
|
32
|
+
|
|
33
|
+
## Using the SDK in Your Worker
|
|
57
34
|
|
|
58
35
|
```typescript
|
|
59
36
|
import { attachOpenhandsRoutes } from 'cloudflare-openhands-sdk/routes';
|
|
@@ -113,10 +90,7 @@ The package includes a pre-configured Dockerfile that:
|
|
|
113
90
|
- Clones and builds the OpenHands software-agent-sdk
|
|
114
91
|
- Sets up the agent-server environment
|
|
115
92
|
|
|
116
|
-
|
|
117
|
-
```jsonc
|
|
118
|
-
"image": "./node_modules/cloudflare-openhands-sdk/Dockerfile"
|
|
119
|
-
```
|
|
93
|
+
For a complete Wrangler configuration example, see the [example project](examples/openhands/).
|
|
120
94
|
|
|
121
95
|
## Configuration Options
|
|
122
96
|
|
|
@@ -135,4 +109,8 @@ interface OpenhandsOptions {
|
|
|
135
109
|
|
|
136
110
|
Apache 2.0
|
|
137
111
|
|
|
138
|
-
This project is licensed under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for details.
|
|
112
|
+
This project is licensed under the Apache License, Version 2.0. See the [LICENSE](LICENSE) file for details.
|
|
113
|
+
|
|
114
|
+
## Acknowledgments
|
|
115
|
+
|
|
116
|
+
This project was inspired by the [Cloudflare Sandbox SDK opencode example](https://github.com/cloudflare/sandbox-sdk/blob/main/packages/sandbox/src/opencode/).
|