Streaming Output and Progress

Streaming lets operators see a long-running process or script while it is working. WOML records bounded, redacted operational output separately from the durable run events that decide retries and workflow results. Losing or pruning output cannot change a run's outcome.

Stream process output

Set stream: true on an approved process request inside <script>:

JavaScript
const result = await services.process.run({
  executable: "bun",
  args: ["test"],
  timeout: "10m",
  stream: true,
  output: { stdout: "discard", stderr: "discard", maxBytes: 65536 }
}, { name: "project-tests" });
return { exitCode: result.exitCode, streamTruncated: result.streamTruncated };

Streaming and returned capture are independent. Discarding captured text keeps large logs out of durable step results. Process execution still requires an operator grant or Process Policy.

Report meaningful progress

Use a stable progress lane ID for quantities that an operator can understand:

JavaScript
await services.progress.report({
  id: "validation",
  current: 3,
  total: 10,
  unit: "files",
  message: "Validated 3 of 10 files"
});

Progress is operational data, not input for later steps. Repeated updates are coalesced, and the latest accepted snapshot is persisted before the attempt closes. Script console messages also enter the bounded operational stream.

Follow and replay

Terminal
woml logs <run-id> --follow
woml logs <run-id> --tail 200 --json
woml logs <run-id> --after 420 --no-follow

Ctrl+C detaches the viewer; it does not cancel the run. A saved cursor lets a viewer reconnect without repeating records. Retention gaps and truncation are reported explicitly. Do not treat redaction as permission to print credentials: avoid writing secrets to stdout or progress messages in the first place.