Skip to content

feat(sdk): #80 — automate view-payload vendoring (kill the silent drift) - #1762

Merged
joelteply merged 2 commits into
canaryfrom
feat/vendor-views-script
Jul 4, 2026
Merged

joelteply merged 2 commits into
canaryfrom
feat/vendor-views-script

Conversation

@joelteply

Copy link
Copy Markdown
Contributor

The SDK vendors continuum view payloads from canonical protocol/typescript/positron/ to stay self-contained — but re-vendoring was manual and drifted (ChatViewState.purpose hand-synced, ForgeViewState never vendored).

  • scripts/vendor-views.mjs: one declared vendored set, deterministic copy; --check fails loud on drift.
  • Re-vendored ChatViewState (byte-exact) + vendored Forge → client can import foundry types (unblocks the foundry renderer).
  • vendor:views:check wired into check:clients — drift can't merge again.
  • Boy-scout: fixed 2 pre-existing lint + 1 pre-existing typecheck error the tightened gate surfaced.

Full check:clients green (73 client tests).

🤖 Generated with Claude Code

The SDK deliberately VENDORS continuum view payloads from the canonical ts-rs
output (protocol/typescript/positron/) so a UI app depends only on
@continuum/sdk-typescript and stays public-installable. But the re-vendoring was
manual ("do not hand-edit; re-vendor on change") and drifted silently:
ChatViewState.purpose was hand-synced (not byte-exact), ForgeViewState was never
vendored at all.

- scripts/vendor-views.mjs — ONE declared vendored set (chat + foundry closures),
  copied deterministically from protocol/. `--check` mode fails loud on drift.
- Re-vendored ChatViewState (now byte-exact) + vendored ForgeViewState +
  ForgeModelView; barrels (views/index + SDK index) export them → the client can
  now import the foundry types (unblocks the foundry renderer).
- Wired `vendor:views:check` into `check:clients` so future drift can't merge.

Boy-scout while the gate was tightened: fixed 2 pre-existing non-null-assertion
lint errors (patternProjections.spec.ts) and 1 pre-existing typecheck error
(apps/tui fixture missing the now-required `purpose`) — both slipped past the CI
ratchet since #1757/#1758 but the tightened check:clients surfaces them. Full
check:clients green (73 client tests).

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
…mated script (review #1762)

The header still said 'chat closure only' and 'do not hand-edit; re-vendor' — now
it names the chat AND foundry closures and points at scripts/vendor-views.mjs +
the check:clients drift guard. Same boy-scout discipline the header preaches.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
Claude-Session: https://claude.ai/code/session_01LoTjvf5j3Ez13g6k8mRkFo
@joelteply
joelteply merged commit 4aa1422 into canary Jul 4, 2026
2 checks passed
@joelteply
joelteply deleted the feat/vendor-views-script branch July 4, 2026 03:58
@joelteply
joelteply restored the feat/vendor-views-script branch August 21, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant