@computesdk/lambda 1.1.7 → 1.1.8

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 +26 -6
  2. package/package.json +2 -2
package/README.md CHANGED
@@ -10,6 +10,28 @@ npm install @computesdk/lambda
10
10
 
11
11
  ## Usage
12
12
 
13
+ ### Gateway Mode (Recommended)
14
+
15
+ Use the gateway for zero-config auto-detection:
16
+
17
+ ```typescript
18
+ import { compute } from 'computesdk';
19
+
20
+ // Auto-detects Lambda from LAMBDA_API_KEY environment variable
21
+ const sandbox = await compute.sandbox.create();
22
+ console.log(`Created sandbox: ${sandbox.id}`);
23
+
24
+ // List all sandboxes
25
+ const sandboxes = await compute.sandbox.list();
26
+
27
+ // Destroy the sandbox
28
+ await sandbox.destroy();
29
+ ```
30
+
31
+ ### Direct Mode
32
+
33
+ For direct SDK usage without the gateway:
34
+
13
35
  ```typescript
14
36
  import { lambda } from '@computesdk/lambda';
15
37
 
@@ -21,18 +43,16 @@ const compute = lambda({
21
43
  });
22
44
 
23
45
  // Create a new sandbox
24
- const { sandbox, sandboxId } = await compute.sandbox.create({
46
+ const sandbox = await compute.sandbox.create({
25
47
  runtime: 'node' // or 'python'
26
48
  });
49
+ console.log(`Created sandbox: ${sandbox.id}`);
27
50
 
28
51
  // List all sandboxes
29
52
  const sandboxes = await compute.sandbox.list();
30
53
 
31
- // Get a specific sandbox
32
- const retrieved = await compute.sandbox.getById(sandboxId);
33
-
34
- // Destroy a sandbox
35
- await compute.sandbox.destroy(sandboxId);
54
+ // Destroy the sandbox
55
+ await sandbox.destroy();
36
56
  ```
37
57
 
38
58
  ## Configuration
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@computesdk/lambda",
3
- "version": "1.1.7",
3
+ "version": "1.1.8",
4
4
  "description": "Lambda Labs provider for ComputeSDK - GPU-accelerated code execution for ML and AI workloads",
5
5
  "author": "ComputeSDK Team",
6
6
  "license": "MIT",
@@ -19,7 +19,7 @@
19
19
  "dist"
20
20
  ],
21
21
  "dependencies": {
22
- "computesdk": "1.10.1"
22
+ "computesdk": "1.10.2"
23
23
  },
24
24
  "keywords": [
25
25
  "computesdk",