-
feat(#20): characters + me/capabilities/models onto the wt adapter (slice-5)
released this
2026-07-19 11:00:41 -07:00 Slice-5 of the worldtree-sdk cutover: migrate the remaining consumer READS +
transient-character CRUD off the hand-rolled httpx wrappers onto the
ratatoskr.wtadapter over the SDK, and delete the retired path.Adapter (
wt.py): addget_me/get_capabilities/list_character_models
/create_character/get_character_state/delete_characterover
client.me/client.capabilities/client.models/client.characters.*.
All six are open-world reads/acks returned verbatim; none carries a
discriminated SDK error, so each maps anyApiError→ theSessionApiFailed
default (INV-CUT-2) — exact parity with the retired path. No new Error-map rows.Decisions (contract § slice-5 notes):
create_characteromitsstatewhen None
(SDK-idiomatic inline literal, server-equivalent to the retired explicit null);
delete_characterreturns the SDK's open ACK verbatim (-> Mapping|None, not
normalized to None).CLI rewire (
cli.py):--whoami(me + capabilities) and--characters
(models → create → state → delete) build awt.build_clientover the injected
probe transport and catchwt.SessionApiFailed+ConnectFailed. Open-world
degrade-not-crash carried (cumulative cutover foot-gun):_characters_probe
readsitemsnull-safe and extractscharacter_iddefensively (clean abort,
no hard-index KeyError);_format_whoamiwidened toMapping.Deleted the six hand-rolled
sessions.pywrappers (net -5 mypy no-any-return);
endpoint_for_plane+get_session_bifrost(slice-6) + the exception classes
stay. Retired the correspondingtest_sessions.pyclasses; added the slice-5
adapter tests + a CLI malformed-create-abort test.LIVE SMOKE (:8081, b128) — INV-CUT-5 / DEC-4 cleared:
--whoamirendered real
identity + capabilities;--charactersdrove the full lifecycle end-to-end
(char-rp catalog → created char_8c00006e… → PAD read-back → deleted).Suite 483 green; ruff clean; mypy at the 2 pre-existing baseline errors.
Patch bump 0.21.15 → 0.21.16 (the cutover MINOR is deferred to slice-7, DEC-6).Downloads