Skip to content

v0.6.0

Latest

Choose a tag to compare

@ggoodman ggoodman released this 02 Aug 13:26
05a4d89

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.