docs(agentos): sync from rivet-dev/agentos - #39
NathanFlurry wants to merge 1 commit into
Conversation
|
🚅 Deployed to the website-pr-39 environment in rivet-website
|
3403392 to
7a4bdf2
Compare
7a4bdf2 to
7d135b0
Compare
7d135b0 to
441bb3b
Compare
| const runCommandResult = await vm.process.exec( | ||
| "agentos-sandbox run-command --command echo --args 'hello from Docker sandbox'", | ||
| ); | ||
| console.log("Sandbox command:", runCommandResult.stdout.trim()); | ||
| console.log("Sandbox command:", (runCommandResult.stdout ?? "").trim()); |
There was a problem hiding this comment.
🟠 Medium · Sandbox quickstart discards the command output
process.exec() now defaults to output.capture = "none" (the sidecar maps an omitted capture mode to ExecutionOutputCapture::None). Null-coalescing stdout therefore makes this supported quickstart print an empty Sandbox command, and the unchanged call below likewise prints an empty process list. Pass { output: { capture: "all" } } to both exec() calls, as the other updated quickstarts in this diff do.
441bb3b to
00d2a58
Compare
00d2a58 to
5235824
Compare
5235824 to
43bbd7e
Compare
| const runCommandResult = await vm.process.exec( | ||
| "agentos-sandbox run-command --command echo --args 'hello from Docker sandbox'", | ||
| ); | ||
| console.log("Sandbox command:", runCommandResult.stdout.trim()); | ||
| console.log("Sandbox command:", (runCommandResult.stdout ?? "").trim()); |
There was a problem hiding this comment.
🟠 Medium · Sandbox quickstart discards the command output
process.exec() defaults to output.capture = "none"; the sidecar maps an omitted capture mode to ExecutionOutputCapture::None. Null-coalescing stdout therefore makes this quickstart print an empty Sandbox command, and the unchanged call below likewise prints an empty process list. Pass { output: { capture: "all" } } to both exec() calls, as the other updated quickstarts in this diff do.
|
|
||
| To use only your own system prompt, set `ACP_SYSTEM_PROMPT_MODE=replace` on the session's `env`. The built-in Claude Code prompt is dropped, and Claude receives the assembled agentOS prompt instead. Use `skipOsInstructions: true` with `additionalInstructions` to send only your text. | ||
|
|
There was a problem hiding this comment.
🟠 Medium · System-prompt example bypasses snippet type checking
The agentOS docs convention explicitly forbids inline fenced TypeScript because only examples under examples/ embedded through <CodeSnippet> are compiled during the website build. This new API example can therefore drift without CI detecting it. Move it to a source example (using a named docs region if needed) and embed that region here with <CodeSnippet>.
43bbd7e to
2cf8b5b
Compare
| const runCommandResult = await vm.process.exec( | ||
| "agentos-sandbox run-command --command echo --args 'hello from Docker sandbox'", | ||
| ); | ||
| console.log("Sandbox command:", runCommandResult.stdout.trim()); | ||
| console.log("Sandbox command:", (runCommandResult.stdout ?? "").trim()); |
There was a problem hiding this comment.
🟠 Medium · Sandbox quickstart discards the command output
process.exec() defaults to output.capture = "none"; the sidecar maps an omitted capture mode to ExecutionOutputCapture::None. Null-coalescing stdout therefore makes this quickstart print an empty Sandbox command, and the call below likewise prints an empty process list. Pass { output: { capture: "all" } } to both exec() calls, as the other updated quickstarts in this diff do.
|
|
||
| To use only your own system prompt, set `ACP_SYSTEM_PROMPT_MODE=replace` on the session's `env`. The built-in Claude Code prompt is dropped, and Claude receives the assembled agentOS prompt instead. Use `skipOsInstructions: true` with `additionalInstructions` to send only your text. | ||
|
|
There was a problem hiding this comment.
🟠 Medium · System-prompt example bypasses snippet type checking
The agentOS docs convention explicitly forbids inline fenced TypeScript because only examples under examples/ embedded through <CodeSnippet> are compiled during the website build. This new API example can therefore drift without CI detecting it. Move it to a source example (using a named docs region if needed) and embed that region here with <CodeSnippet>.
2cf8b5b to
be068c3
Compare
| const runCommandResult = await vm.process.exec( | ||
| "agentos-sandbox run-command --command echo --args 'hello from Docker sandbox'", | ||
| ); | ||
| console.log("Sandbox command:", runCommandResult.stdout.trim()); | ||
| console.log("Sandbox command:", (runCommandResult.stdout ?? "").trim()); |
There was a problem hiding this comment.
🟠 Medium · Sandbox quickstart discards the command output
process.exec() defaults to output.capture = "none"; the sidecar maps an omitted capture mode to ExecutionOutputCapture::None. Null-coalescing stdout therefore makes this quickstart print an empty Sandbox command, and the call below likewise prints an empty process list. Pass { output: { capture: "all" } } to both exec() calls, as the other updated quickstarts in this diff do.
|
|
||
| To use only your own system prompt, set `ACP_SYSTEM_PROMPT_MODE=replace` on the session's `env`. The built-in Claude Code prompt is dropped, and Claude receives the assembled agentOS prompt instead. Use `skipOsInstructions: true` with `additionalInstructions` to send only your text. | ||
|
|
There was a problem hiding this comment.
🟠 Medium · System-prompt example bypasses snippet type checking
The agentOS docs convention explicitly forbids inline fenced TypeScript because only examples under examples/ embedded through <CodeSnippet> are compiled during the website build. This new API example can therefore drift without CI detecting it. Move it to a source example (using a named docs region if needed) and embed that region here with <CodeSnippet>.
| const server = await runtime.javascript.spawn(serverSource, { | ||
| onStdout: (chunk) => process.stdout.write(new TextDecoder().decode(chunk)), | ||
| onStdout: (chunk) => { | ||
| const text = decoder.decode(chunk); | ||
| process.stdout.write(text); | ||
| if (text.includes("ready")) ready.resolve(); |
There was a problem hiding this comment.
🟠 Medium · Chunk-split readiness output hangs the example
onStdout receives arbitrary byte chunks, so the server's ready line is not guaranteed to arrive wholly in one callback. If it is split as rea / dy, neither text.includes("ready") succeeds and await ready.promise hangs forever even though the server is listening. Accumulate decoded output across callbacks (or parse complete lines) before matching the readiness marker; also reject the wait if the process exits first.
Automated docs sync from
rivet-dev/agentos@4f0dab7.Do not edit
vendor/agentos/here. Edit the docs inrivet-dev/agentosand this PR updates itself.