@computesdk/buddy 1.0.11 → 1.0.12

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 +6 -6
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -33,7 +33,7 @@ import { buddy } from '@computesdk/buddy';
33
33
 
34
34
  const compute = buddy();
35
35
 
36
- const sandbox = await compute.sandbox.create();
36
+ const sandbox = await compute.instances.create();
37
37
 
38
38
  const result = await sandbox.runCommand('echo "hello from buddy"');
39
39
  console.log(result.stdout);
@@ -99,7 +99,7 @@ installation, set `apiUrl` instead.
99
99
  Beyond the cross-provider options, `create` accepts:
100
100
 
101
101
  ```ts
102
- await compute.sandbox.create({
102
+ await compute.instances.create({
103
103
  // Expose ports up front, so getUrl needs no extra round trip
104
104
  ports: [3000, { port: 443, type: 'TLS', region: 'EU' }],
105
105
  // Resources — either a preset, or cpu/memory that map onto one
@@ -117,7 +117,7 @@ await compute.sandbox.create({
117
117
  ## Exposing ports
118
118
 
119
119
  ```ts
120
- const sandbox = await compute.sandbox.create({ ports: [3000] });
120
+ const sandbox = await compute.instances.create({ ports: [3000] });
121
121
  await sandbox.runCommand('npx serve -l 3000', { background: true });
122
122
 
123
123
  const url = await sandbox.getUrl({ port: 3000 });
@@ -152,14 +152,14 @@ A snapshot is a disk image taken from a live sandbox, and doubles as the reusabl
152
152
  image other providers call a template.
153
153
 
154
154
  ```ts
155
- const snapshot = await compute.snapshot.create(sandbox.sandboxId, { name: 'with-deps' });
155
+ const snapshot = await compute.snapshot.create(sandbox.instanceId, { name: 'with-deps' });
156
156
 
157
157
  await compute.snapshot.list(); // the whole project
158
- await compute.snapshot.list({ sandboxId: sandbox.sandboxId }); // one sandbox
158
+ await compute.snapshot.list({ instanceId: sandbox.instanceId }); // one sandbox
159
159
  await compute.snapshot.delete(snapshot.id);
160
160
 
161
161
  // Booting from it is a normal create
162
- const prepared = await compute.sandbox.create({ snapshotId: snapshot.id });
162
+ const prepared = await compute.instances.create({ snapshotId: snapshot.id });
163
163
  ```
164
164
 
165
165
  Buddy creates snapshots asynchronously and they cannot be restored until they turn
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@computesdk/buddy",
3
- "version": "1.0.11",
3
+ "version": "1.0.12",
4
4
  "description": "Buddy provider for ComputeSDK - Persistent Ubuntu sandboxes for agents, booting in milliseconds, with preview URLs and snapshots",
5
5
  "author": "Lucas Czulak",
6
6
  "license": "MIT",
@@ -19,8 +19,8 @@
19
19
  ],
20
20
  "dependencies": {
21
21
  "@buddy-works/sandbox-sdk": "^0.1.10",
22
- "@computesdk/provider": "2.1.13",
23
- "computesdk": "4.1.11"
22
+ "computesdk": "4.1.12",
23
+ "@computesdk/provider": "2.1.14"
24
24
  },
25
25
  "engines": {
26
26
  "node": "^20.19.0 || >=22.12.0"