Typed results in Sandbox runtimes
Sandbox-backed programs can now return ordered text and image content explicitly:
export default function ({ result }: AgentProgramScope) {
result.appendText("Sandbox execution complete");
result.appendImage({
data: imageBase64,
mimeType: "image/png",
});
}Successful outcomes expose these values through outcome.content. Console output remains diagnostic telemetry, and buffered results are discarded if the program fails.
This release adopts the current program-contract API and updates its runtime dependencies to @torkbot/code-mode@^0.6.0 and @torkbot/sandbox@^0.16.0. Create clients with an explicit contract:
const contract = createProgramContract({ tools: [] });
const client = createClient({ runtime, contract });