feat: per-member player character behind CtxFeatCharacter (wire revision 5)#34
Merged
Conversation
str glyph + ink/bg RGB + ascii fallback after each member's kind byte, in both member-bearing forms, iff the guest's meta declares the feature. EncodeCtx/EncodeCtxEpoch/DecodeCtx stay frozen features=0 wrappers. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…ning Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…the roster skim The guest decodes with its own registered meta's CtxFeatures — the character section has no in-band discriminator. The legacy-mode byte-skim cache skips the section per member so its memcmp region stays aligned. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
ABI.md §4.1 gains the per-member character section and the 1<<1 feature bit; kittest covers flag-on and flag-off; a Go-emitted golden ctx fixture lands for the Rust decode-parity test (next commit). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…r_cell Decode-side parity with the Go kit: the member character section is read iff the registered meta declares the bit; golden ctx vectors replay byte-identically; character_cell returns the one styled cell. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
BCook98
marked this pull request as ready for review
June 11, 2026 00:10
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Implements the kit half of shellcade's
add-character-builderchange (platform half: shellcade/shellcade#109, merged): every roster member in the CallContext can carry a player character — one width-1 glyph + resolved ink/bg RGB + an ASCII fallback byte — so games (boneyard, casino, …) render player avatars with zero width logic.Wire (revision 5)
Per member, immediately after its
u8 kind, iff the guest's meta declaresCtxFeatCharacter(1<<1):EncodeCtxFeat/EncodeCtxEpochFeat/DecodeCtxFeat; the existing functions are frozen features=0 wrappers, so non-declaring guests decode byte-identically (asserted byte-for-byte in tests, all three forms).SDKs
Player.Character(value-comparable),kit.CharacterCell(c) Cellreturning the one styled cell; the guest decodes with its own registered meta's CtxFeatures, including the legacy-mode roster byte-skim cache (alignment pinned by an identical-bytes ⇒ unchanged test and a character-flip ⇒ changed test).Player.character,character_cell, declared features cached once per instance (thread-local, first callback); feature-off path provably unchanged + truncation-fuzzed.rust/tests/golden/ctx_character.txt, freshness-gated) replayed decode-side in Rust with reader-position and full-consumption assertions.Docs & release
kitminor (→ v2.9.0).Gates
go test ./...,go vet, wasip1 build,cargo test(rust + crossverify) — all green. kittest conformance covers flag-on and flag-off at the public API.Sequencing
After merge + tag, the platform pins the new version and populates
sdk.Player.Characteringameabi/encodeCtx(tasks §5 of the OpenSpec change); game-side adoption follows in the games repo.🤖 Generated with Claude Code