Write new journal entries under logs/core and merge read-only legacy
history without moving SQLite/WAL files. Atomically spool failed batches,
retaining unspoolable entries for event-driven retries. Journal full trap
diagnostics before UTF-8-safe status display. Port session overflow archives
and followable line/byte excerpts to the still-shipped embedded agent.
Document retention/recovery and cover the contracts with regressions.
Include one rustfmt-only normalization in the existing SDK WASI test.
Card: SAU-143
- The serve loop ends the process after EOF or exit_after_response,
also with background tasks or listeners.
- One schema generator per direction for the whole document, so types
with the same name get distinct names.
- The agent gives the complete error (code, message, data) to the
model, writes SKIP only after a successful request, caps tool output
at 64 KiB, writes each history line in one write, and skips a damaged
line.
- Endpoints skip blank and non-RPC lines. client_rs does not panic.
- #[must_use] on builders and the lock guard; #[schemars] attributes
and duplicate hooks are compile errors; raw identifiers; -32000 for
local SDK errors; x-sausage-params only for methods with params.
Part 1 fixes: complete stdout writes, buffered stdin, Rust type names
in schemas, enum variant docs, -32603 for serde errors in handlers,
crate docs and modules. End-to-end check of a generated consumer through
a fake core.
Checkpoint. Known issues, fixed in part 2: short writes on stdout,
byte-wise stdin reads, Result suffix on all result schemas, lost enum
variant docs, serde errors as invalid params, missing item docs.