shardflux 0.1.0 → 0.2.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.
- package/README.md +10 -0
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -46,6 +46,16 @@ console.log(await cell.files.readText('/home/user/notes.txt'));
|
|
|
46
46
|
await workspace.suspend(); // resume later with open() or workspace.resume()
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
+
Give a workspace's processes your credentials as environment variables with secrets (values are
|
|
50
|
+
write-only):
|
|
51
|
+
|
|
52
|
+
```ts
|
|
53
|
+
const projectId = (await cloud.me()).api_key!.project_id;
|
|
54
|
+
await cloud.secrets.create(projectId, { name: 'OPENAI_API_KEY', value: process.env.OPENAI_API_KEY! });
|
|
55
|
+
const agentBox = await cloud.workspaces.open({ key: 'customer-42/main', template: 'python-node-browser', secrets: ['OPENAI_API_KEY'] });
|
|
56
|
+
await agentBox.secrets.set(['OPENAI_API_KEY', 'DATABASE_URL']); // every exec and terminal sees them
|
|
57
|
+
```
|
|
58
|
+
|
|
49
59
|
Everything exported by `@shardflux/sdk` is exported here, including `workspaceTools()` for agent
|
|
50
60
|
frameworks, the error classes and the API types. See the
|
|
51
61
|
[`@shardflux/sdk` README](https://www.npmjs.com/package/@shardflux/sdk) for the full guide.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "shardflux",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Shardflux: cloud computers for AI agents. The TypeScript SDK (import { Shardflux } from 'shardflux') and the shard CLI in one package.",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"access": "public"
|
|
47
47
|
},
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@shardflux/cli": "^0.
|
|
50
|
-
"@shardflux/sdk": "^0.
|
|
49
|
+
"@shardflux/cli": "^0.2.0",
|
|
50
|
+
"@shardflux/sdk": "^0.6.0"
|
|
51
51
|
}
|
|
52
52
|
}
|