@voidrun/sdk 0.0.29 → 0.0.31
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 +10 -36
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,7 +15,7 @@ A powerful, type-safe SDK for interacting with VoidRun AI Sandboxes. Execute cod
|
|
|
15
15
|
- 🧠 **Code Interpreter** - Easy multi-language code execution (Python, JavaScript, Bash)
|
|
16
16
|
- ⚡ **Background Commands** - Run, list, kill, and attach to background processes
|
|
17
17
|
- 🔐 **Type-Safe** - Full TypeScript support with generated types from OpenAPI
|
|
18
|
-
- 🎯 **Promise-
|
|
18
|
+
- 🎯 **Promise-aokd** - Modern async/await API
|
|
19
19
|
|
|
20
20
|
## Installation
|
|
21
21
|
|
|
@@ -39,11 +39,10 @@ import { VoidRun } from "@voidrun/sdk";
|
|
|
39
39
|
// Initialize the SDK with your credentials
|
|
40
40
|
const vr = new VoidRun({
|
|
41
41
|
apiKey: "your-api-key-here",
|
|
42
|
-
baseUrl: "https://api.voidrun.com"
|
|
43
42
|
});
|
|
44
43
|
|
|
45
44
|
// Create a sandbox
|
|
46
|
-
const sandbox = await vr.createSandbox({
|
|
45
|
+
const sandbox = await vr.createSandbox({});
|
|
47
46
|
|
|
48
47
|
// Execute a command
|
|
49
48
|
const result = await sandbox.exec({ command: 'echo "Hello from VoidRun"' });
|
|
@@ -383,8 +382,8 @@ new VoidRun(options?: VoidRunConfig)
|
|
|
383
382
|
|
|
384
383
|
**Options:**
|
|
385
384
|
|
|
386
|
-
- `apiKey?: string` - API key (defaults to `process.env.
|
|
387
|
-
- `baseUrl?: string` - Base API URL (defaults to `process.env.
|
|
385
|
+
- `apiKey?: string` - API key (defaults to `process.env.VR_API_KEY`)
|
|
386
|
+
- `baseUrl?: string` - Base API URL (defaults to `process.env.VR_API_URL`)
|
|
388
387
|
- `orgId?: string` - Organization ID (optional)
|
|
389
388
|
|
|
390
389
|
**Methods:**
|
|
@@ -703,7 +702,6 @@ The SDK can be configured by passing options to the `VoidRun` constructor:
|
|
|
703
702
|
```typescript
|
|
704
703
|
const vr = new VoidRun({
|
|
705
704
|
apiKey: "your-api-key", // Required: Your API key
|
|
706
|
-
baseUrl: "https://api.voidrun.com", // Required: API base URL
|
|
707
705
|
orgId: "your-org-id" // Optional: Organization ID
|
|
708
706
|
});
|
|
709
707
|
```
|
|
@@ -772,26 +770,19 @@ npm run publish
|
|
|
772
770
|
|
|
773
771
|
## Troubleshooting
|
|
774
772
|
|
|
775
|
-
### "API key is required"
|
|
773
|
+
### "API key is required, either pass in constructor or in env vars"
|
|
776
774
|
|
|
777
775
|
Pass your API key in the constructor:
|
|
778
776
|
|
|
779
777
|
```typescript
|
|
780
778
|
const vr = new VoidRun({
|
|
781
|
-
apiKey: "your-api-key"
|
|
782
|
-
baseUrl: "https://api.voidrun.com"
|
|
779
|
+
apiKey: "your-api-key"
|
|
783
780
|
});
|
|
784
781
|
```
|
|
785
782
|
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
```typescript
|
|
791
|
-
const vr = new VoidRun({
|
|
792
|
-
apiKey: "your-api-key",
|
|
793
|
-
baseUrl: "https://api.voidrun.com"
|
|
794
|
-
});
|
|
783
|
+
Pass in env vars(.env)
|
|
784
|
+
```bash
|
|
785
|
+
VR_API_KEY=vr_sddfgd2353erggdfgfdgdgdfg
|
|
795
786
|
```
|
|
796
787
|
|
|
797
788
|
### "Sandbox creation failed"
|
|
@@ -842,7 +833,6 @@ const content = await sandbox.fs.downloadFile("/app/file.txt");
|
|
|
842
833
|
Full API documentation is available at:
|
|
843
834
|
|
|
844
835
|
- [API Client Docs](./src/api-client/docs/)
|
|
845
|
-
- [OpenAPI Spec](./openapi.yml)
|
|
846
836
|
|
|
847
837
|
## Contributing
|
|
848
838
|
|
|
@@ -854,26 +844,10 @@ ISC License - See LICENSE file for details
|
|
|
854
844
|
|
|
855
845
|
## Support
|
|
856
846
|
|
|
857
|
-
- 📧 Email: support@
|
|
847
|
+
- 📧 Email: support@void-run.com
|
|
858
848
|
- 🐛 Issues: [GitHub Issues](https://github.com/voidrun/ts-sdk/issues)
|
|
859
849
|
- 💬 Discussions: [GitHub Discussions](https://github.com/voidrun/ts-sdk/discussions)
|
|
860
850
|
|
|
861
|
-
## Changelog
|
|
862
|
-
|
|
863
|
-
### v0.0.2
|
|
864
|
-
|
|
865
|
-
- Fixed PTY session response field mapping
|
|
866
|
-
- Added fallback logic for empty sessionId
|
|
867
|
-
- Improved error handling and validation
|
|
868
|
-
|
|
869
|
-
### v0.0.1
|
|
870
|
-
|
|
871
|
-
- Initial release
|
|
872
|
-
- Sandbox management
|
|
873
|
-
- File operations
|
|
874
|
-
- Code execution
|
|
875
|
-
- PTY support
|
|
876
|
-
|
|
877
851
|
---
|
|
878
852
|
|
|
879
853
|
**Made with ❤️ by VoidRun**
|