release: v0.9.0 — QueryResult.truncated, kv.list pagination, allowed_mentions, validator parity
Added:
- ctx.sql.query() returns QueryResult, a list subclass carrying .truncated.
The host always computed the flag; the SDK dropped it, so a query that
silently lost rows was indistinguishable from a complete one. Subclasses
list, so iteration/indexing/len/== are unchanged.
- ctx.kv.list(start_after=...). The host caps list() at 100 keys and the
paging cursor existed platform-side but was never forwarded through RPC,
so keys 101+ were unreachable from inside a plugin.
- allowed_mentions on ctx.discord.send_message / edit_message. The host has
always accepted and sanitized it; the SDK did not expose the parameter.
Fixed:
- ctx.kv.list documented and mocked its real cap. The docstring promised
"up to 1000 results" while the host clamps to 100, so a prefix sweep
silently processed only the first 100 keys and reported success.
MockContext now clamps identically, failing in tests rather than in prod.
- Vendored validator brought to real parity with the platform. It claimed
byte-for-byte parity while missing the dashboard-manifest and
bundled-import check sections, so `yourbot validate` under-reported and a
plugin could pass locally then be rejected at publish. Verified by a
differential over 192 stored artifacts, stable across hash seeds.
- New checks in `yourbot validate`: ctx call-signature binding (the ctx API
is keyword-only, and a positional call is a runtime TypeError nothing
previously caught) and a SQL dry-check that rejects multi-statement
strings and CTEs before publish. Unknown-kwarg warns rather than blocks,
since probing for a newer SDK shape under try/except TypeError is valid.
- Finding messages are deterministic; one interpolated a raw set whose repr
order varies by process, which made byte-parity unachievable.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@