small gleam coding and persistent agent daemon with a detachable cli and a canvas ui forked from okami.mom/albedo

refactor(openai_api): give request bodies generic deferred and digest parts

Request bodies carried albedo-named magic tuples: {albedo_image, Size, Read} for a stored image and {albedo_attest, ...} for Claude's billing attestation. request_body now owns a generic interface instead. `deferred(size, read)` is a part of known size read only while the body is written, and `digest(init, update, emit, placeholder)` is a part whose bytes are a digest of the whole body. Both return a StringTree to place anywhere in the body's iodata, so JSON encoders keep nesting them as before. `zstd` and `gzip` move here from the transport. The module owns the rules and reports them as a typed Invalid: at most one digest part, no deferred part after it, the digest as long as its placeholder (now checked), and no compression for a body with a deferred part. The writer takes a send function rather than a socket. Stored images become deferred parts in types.gleam, and attestation splices a digest part between raw JSON. The JSON coalescer passes any tuple through as a part rather than naming the image tag.


Author aly.codes
Date Commit Parent 83571bd6