Repository navigation
theme-types: the GUI's contracts as of 0.8.15 (4ab6eae) - #20
connorburgess wants to merge 1 commit into
Conversation
Symptom: packages/shared-types calls itself a verbatim copy of the GUI's shared/ contracts, pinned to GUI aebf57d (0.8.0), but six of its eight files no longer match the GUI's main. A theme written against the mirror learns an image contract the GUI has dropped: `composePrompt(message, items, local)` and the `ThemeApi.control.attach` doc tell it to put a remote image's URL, with the board's `?k=` key, into the prompt's text, while the GUI now writes only local paths and says no URL is ever written, since a prompt's text goes to the model and to every sink that takes prompts. The mirror's contrast.ts also leaves out the focus-ring floor (`MARKS`, `--focus` in `STOCK_TEXT_TOKENS`) the GUI's skin list now measures, and its built-in skins carry the old orange `--focus`. Cause: the copy had not been refreshed since GUI 0.8.0. Fix: copy the eight shared/*.ts files from GUI commit 4ab6eae (0.8.15, v0.8.15-4) over the mirror; color-theme.ts and plugin-api.ts were already identical. The README pins the mirror to 4ab6eae and names the new contrast and attachments exports in its list, and the changelog records the refresh under Unreleased. No export was removed or renamed; `composePrompt` loses its third parameter and `splitAttachments` returns the wider `PromptItem`, and nothing in this repo calls either. Signed-off-by: Connor Burgess <connorburgesscodes@gmail.com>
|
TL;DR
Six of the eight mirrored files in packages/shared-types are copied again, unchanged, from the GUI. In attachments.ts, No findings sure enough to post from reading the change. Merge confidence 5 of 5 Where to read first
Tests and reachReach: no graph yet, so this review could not trace what the change reaches. Stages: 232 s
|
What
@sessionpipe-gui/theme-types(packages/shared-types): the eight mirroredshared/*.tsfiles are copied again, verbatim, from GUI commit4ab6eae(0.8.15,v0.8.15-4), the same refresh #9 did for 0.8.0. Six files change (api.ts,attachments.ts,contrast.ts,theme-api.ts,skins-builtin.ts,skin-api.ts);color-theme.tsandplugin-api.tswere already identical. The README's pin line now names4ab6eae(0.8.15), its export list namesMARKS,promptWordsandPromptItem, and the changelog has a line under Unreleased.What a theme author gets from it:
composePrompt(message, items, local)and theThemeApi.control.attachdoc still told a theme to write a remote image's URL, with the board's?k=key, into the prompt's text. The GUI's current copy iscomposePrompt(message, items): it writes only paths on the GUI's own machine, and says no URL is ever written, because a prompt's text goes to the model and to every sink that takes prompts.attach's doc now says the same.splitAttachmentsalso reads a machine's "Attached files" block and spacesheep's Talk block, and returnsPromptItem(AttachmentRef | SavedFileRef | LinkPictureRef).contrast.tsgainsMARKS(--focus≥ 3:1 on--bgand--bg-2) and a stock--focusinSTOCK_TEXT_TOKENS, andtextTierWarningsmeasures it. The built-in skins'--focusis the ink colour, not orange.api.tsadds arrangements,UploadedFile,LocalMachineSettings, thelimitedrelay state, theunconfirmedoutcome, andunfollowed/unheard/answer/nonceon a control row, among others.No export was removed or renamed.
composePromptloses its third parameter,splitAttachmentsreturns the wider union, andAttachmentRefgainskind?: never; nothing in this repo calls or builds either (git grepoutsidepackages/shared-typesfinds only the changelog line, and the built bundles indist/contain neither name).Why
The package's README calls it a verbatim copy of the GUI's contracts that "must be kept in sync by hand", pinned to
aebf57d(0.8.0). Against the GUI's main (4ab6eae), six of its eight files no longer matched, and the image contract it taught is the one the GUI dropped so that the board's key never goes into prompt text.Proof
Every file byte-for-byte against the GUI:
npm run typecheck && npm run lint && npm run build && npm teston this branch:dist/is not tracked, so the build changes no committed file.#19 (
check.mjs --skinmeasures an unset text tier at its stock value) is also mine and also touchesCHANGELOG.md; itscheck.mjsreadsSTOCK_TEXT_TOKENSandTEXT_TIERSfrom this package'scontrast.ts. This branch merges cleanly into both main and #19's head (git merge-tree --write-tree, no conflicts), and with both applied,check.mjsandcheck.mjs --skinon the three bundled skins still say "all good", with output identical to #19 alone (every bundled skin sets its own--focus). Once both land,--skinalso fills an unset--focuswith its new stock value when a skin sets only the ground, as the GUI's skin list now does. Teachingcheck.mjstheMARKSfloor by name is a separate follow-up, not part of this pull request.Also out of scope: canvas comments that call
unheardandunconfirmed"newer than this repo's copy of the wire types" (packages/canvas/src/window.ts,test/map.spec.ts) are now out of date, and canvas does not yet useunfollowed. Both are follow-ups for canvas.Checklist
git commit -s): the DCO is the only paperwork.npm run typecheck && npm run lint && npm run build && npm testpass.// SPDX-License-Identifier: Apache-2.0; anything bundled from a third party is inTHIRD_PARTY_NOTICES.mdandNOTICE. (No new files; the copied files keep the GUI's SPDX line.)CHANGELOG.mdif a person would notice.