Resource

content-writer

Writer for streaming tool execution content.

resource content-writer;

F check-write

check-write: func() -> result​<u64, stream-error>;

Check readiness for writing. Returns the number of bytes that can be written to the current content block without blocking.

F write

write: func(contents: list​<u8>) -> result​<_, stream-error>;

Write contents to the in-progress content block.

F send-error

send-error: func(id: id, output: output-stream, reason: string) -> result​<_, stream-error>;

Send a simple error message as a complete result and close the output stream.