mind-body: a delivered chat image reaches her session as an image block

ChatDelivery gains tuple index 11, `image: Option<ChatImage>` ([path, mime,
size, sha256], a reference into her per-room image store, never bytes); the
pending kind is gamecult.persona.chat_pending.v2, and v1 answers and records
still decode with no image. chat_image::load is the one place a reference
becomes bytes: exact `<hex sha256 of room id>/<sha256>[.ext]` path with no
traversal or symlink, regular file, 5 MiB declared and actual, declared size
and sha256, png/jpeg/gif/webp magic bytes matching the declared mime. The
persona line carries the image as a base64 image block after its text and an
`attachment role=organ` line saying attached or not shown and why. The
stream-json echo of a line with blocks still counts as our echo. The store is
MIND_PERSONA_IMAGE_STORE; unset, every image is not shown.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
Eureka 2026-11-07 20:52:30 +00:00
commit e2c9638f27
19 changed files with 712 additions and 28 deletions

1
Cargo.lock generated
View file

@ -1146,6 +1146,7 @@ name = "mind-body"
version = "0.1.0"
dependencies = [
"anyhow",
"base64",
"chrono",
"cultcache-rs 0.2.0",
"cultnet-rs 0.1.0",