Skip to content

Add the embeddable reference host + shellcade-kit CLI to the module#44

Merged
BCook98 merged 10 commits into
mainfrom
public-host
Jun 16, 2026
Merged

Add the embeddable reference host + shellcade-kit CLI to the module#44
BCook98 merged 10 commits into
mainfrom
public-host

Conversation

@BCook98

@BCook98 BCook98 commented Jun 15, 2026

Copy link
Copy Markdown
Contributor

What

Brings the host that runs a wasm game against the ABI — and the shellcade-kit CLI built on it — into the kit module under host/ and cmd/shellcade-kit. The CLI's check/play/smoke and the conformance gate now run the exact reference host a game runs on, built from source, with no separate host binary.

New packages:

  • host/gameabi — the wasm host (instantiates + drives the guest against the ABI; wazero/extism).
  • host/sdk — the room engine, lifecycle, and the host service interfaces (Services/ServicesFactory/Account/AccountStore).
  • host/render + host/canvas — the 80×24 framebuffer and ANSI renderer.
  • host/blobstore — hibernation snapshot store (in-memory/dir + HMAC sealing; an S3 backend is supplied by the embedder).
  • host/memsvc — in-memory implementations of the service interfaces for the CLI + conformance, with merge-rule contract tests.
  • host/gameabi/conformance — the game conformance harness (shellcade-kit check).
  • cmd/shellcade-kitnew / check / play / smoke.

Design notes

  • Additive only — the guest SDK and the ABI are unchanged.
  • Everything a host needs from a platform is reached through interfaces (Services, Account/KVStore/ConfigStore, leaderboard sink, blobstore.Store), injected by the embedder; the CLI supplies in-memory implementations.
  • The module stays dependency-clean: kit's existing "no private imports" CI guard covers the new packages.

Status

Draft — full module go build ./... && go vet ./... && go test ./... is green. Part of a larger effort to publish the host + CLI and retire the cross-repo release lockstep.

🤖 Generated with Claude Code

BCook98 and others added 10 commits June 16, 2026 07:44
Move the two seam-free foundation packages from the private shellcade
repo (internal/canvas, internal/sdk) into the public kit module under
host/. canvas is a stdlib-only leaf; sdk depends only on canvas plus
github.com/google/uuid. Import paths rewritten to
github.com/shellcade/kit/v2/host/canvas. No private packages are
referenced (go list -deps ./host/... has no shellcade/shellcade).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Move internal/session and internal/render from the private shellcade repo
into the public kit module under host/. Break session's one private edge by
switching its identity token from internal/identity.Identity to the public
sdk.Player (session treats it as an opaque value-comparable token; no field
access). render's identity coupling was indirect through session, so it is
clean once internal/canvas -> host/canvas and internal/session -> host/session.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
conformance moves to host/gameabi/conformance (subpackage so ../testdata
resolves). services.NewFactory -> memsvc.New() / memsvc.NewFactory; seatPlayer
builds sdk.Player directly instead of identity.Identity{}.Player(). No private
imports remain.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
cmd/shellcade-kit now builds on the public reference host: services.NewFactory
-> memsvc.NewFactory (play/check), identity.Identity{}.Player() -> direct
sdk.Player (local hot-seat). Adds charmbracelet/x/term for raw-mode play. The
CLI and host import zero private packages.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Both were deferred during the gameabi move (needed render/session/services).
Those are now in kit: render/session imports repointed to host/...,
services.NewFactory -> memsvc.NewFactory. Recovers the dropped coverage.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…pin job

- The *.wasm conformance/host fixtures were gitignored, so CI lacked them and
  the gameabi/conformance tests failed to LoadGame. Commit them via a .gitignore
  exception (the private repo commits these too).
- go 1.25.0 -> 1.25.11 patches the flagged stdlib vulns (net/textproto,
  crypto/x509, net) the host paths now reach (govulncheck).
- Remove the kit-pin lockstep job: the shellcade-kit binary is now built from
  this module, so the self-referential "pinned external binary embeds matching
  kit" check is obsolete.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@BCook98
BCook98 marked this pull request as ready for review June 16, 2026 09:19
@BCook98
BCook98 merged commit 27e815a into main Jun 16, 2026
6 checks passed
@BCook98
BCook98 deleted the public-host branch June 16, 2026 09:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant