Repository navigation
Bump the widget SDK to generation 2 - #26
Merged
Merged
Conversation
Since 0.2.0 the bridge gained favicon(), image(), installedApps() and appIcon(), but SDK_VERSION stayed at 1. A registry widget calling one of them could only declare "sdk": 1, so a 0.2.0 Fremkit would install it and leave the call undefined - the half-broken install the number exists to prevent. Bump to 2 and record what each generation added in SDK_GENERATIONS. The bridge test now refuses a Fremkit member that no generation lists, so the next helper cannot ship without someone deciding whether it needs a new generation. Generations only add: the installer still compares manifest.sdk > SDK_VERSION, and a test pins that sdk 1 packages keep installing. The registry needs no change: its vendored manifest schema accepts any sdk >= 1 and does not carry SDK_VERSION. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
AGENTS.md and the CHANGELOG preamble both said the registry compares a widget's sdk against FREMKIT_VERSION. It never did: the installer and the marketplace compare it against SDK_VERSION in server/src/bridge/sdk.ts. Believing the release number was the gate is how 0.3.0 nearly shipped new bridge helpers under generation 1. The preamble also listed three version fields where a release bumps four (ui/package.json was missing). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Merged
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.
Why
Since 0.2.0 the bridge gained four members a widget may rely on, without
SDK_VERSIONmoving:Fremkit.favicon(url)Fremkit.image(url)Fremkit.installedApps()Fremkit.appIcon(bundleId)A registry widget calling any of them could only declare
"sdk": 1, so a 0.2.0 Fremkit would install it and leave the callundefined. Refusing that install up front is the only thing thesdknumber is for.What changes
SDK_VERSIONand the bridge'sFremkit.sdkgo to2.SDK_GENERATIONSinserver/src/bridge/sdk.tslists what each generation put onFremkit.bridge.test.tsnow fails on a bridge member that no generation lists, so the next helper can't ship without someone deciding whether it needs a new generation.manifest.sdk > SDK_VERSION, and every generation from 1 up to the current one installs. The 11 registry widgets (allsdk: 1, none calling the new members) keep installing.docs/writing-widgets.mdgets an SDK generations section (a table of what each generation adds, which number to declare, and why data channels are not generations).docs/marketplace.mdlinks to it, and the CHANGELOG gets an author-facing line.sdkis compared againstFREMKIT_VERSION, but it is compared againstSDK_VERSION. The preamble also listed three version fields to bump instead of four.Registry (fremkit-sietch)
No change is needed.
tools/vendor/widgets/manifest.tsis still identical tomainbecausesdkremainsz.number().int().min(1), andSDK_VERSIONis not vendored. Registry widgets that use the new members should declare"sdk": 2once this ships.Checks
pnpm typecheck: greenpnpm test: server 1492/1492, ui 392/392🤖 Generated with Claude Code