Typed program results
Programs can now return ordered text and image content explicitly instead of using console output as an implicit result channel:
export default async function ({ result }) {
result.appendText("Rendered preview");
result.appendImage({
data: imageBase64,
mimeType: "image/png",
});
}Successful executions always include a content array. Results are committed only when the program succeeds, while console output remains diagnostic telemetry.
Each result item is transported independently, so combined output can exceed the runtime's single-frame limit without weakening per-item bounds.
This release changes the successful RunOutcome shape: consumers should read outcome.content, which is an empty array when a program appends nothing.