Skip to content

Commit f9349da

Browse files
opencolinclaude
andcommitted
Trim narrative comments per review
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 6f6d687 commit f9349da

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

examples/computesdk-tenki/run.mjs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,15 @@
11
// Run code on Tenki through ComputeSDK — one provider interface, swappable backends.
2-
// The official @computesdk/tenki provider drives Tenki microVMs under the hood.
32
import { compute } from "computesdk";
43
import { tenki } from "@computesdk/tenki";
54

6-
// The provider also reads TENKI_API_KEY / TENKI_AUTH_TOKEN from the environment.
75
compute.setConfig({ provider: tenki({ apiKey: process.env.TENKI_API_KEY }) });
86

97
const sandbox = await compute.sandbox.create();
108
try {
11-
// runCommand wraps the command in `sh -lc`, so pipes, globs, and env expansion work.
9+
// runCommand goes through `sh -lc`, so shell syntax works.
1210
const hello = await sandbox.runCommand('echo "Hello from $(uname -sr)"');
1311
console.log(hello.stdout.trim());
1412

15-
// Native filesystem API — files move over Tenki's data plane, not through shell quoting.
1613
await sandbox.filesystem.writeFile("/home/tenki/app.py", 'print(6 * 7)\n');
1714
const result = await sandbox.runCommand("python3 /home/tenki/app.py");
1815
console.log(result.stdout.trim()); // 42

examples/computesdk-tenki/verify.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,13 @@ let sandbox;
3232
try {
3333
sandbox = await compute.sandbox.create();
3434

35-
// 1) runCommand (goes through `sh -lc`) → assert stdout
35+
// 1) runCommand → assert stdout
3636
const r = await sandbox.runCommand("python3 -c 'print(6 * 7)'");
3737
if (!(r.exitCode === 0 && r.stdout.trim() === "42")) {
3838
throw new Error(`runCommand: exit ${r.exitCode}, stdout ${JSON.stringify(r.stdout)}, stderr ${JSON.stringify(r.stderr)}`);
3939
}
4040

41-
// 2) native filesystem API → write, assert exists, read back
41+
// 2) filesystem API → write, assert exists, read back
4242
const path = "/home/tenki/verify-note.txt";
4343
const content = "written via the ComputeSDK filesystem API\n";
4444
await sandbox.filesystem.writeFile(path, content);

0 commit comments

Comments
 (0)