Skip to content

Bump the widget SDK to generation 2 - #26

Merged
fdussert merged 2 commits into
mainfrom
feature/sdk-2
Oct 15, 2026
Merged

fdussert merged 2 commits into
mainfrom
feature/sdk-2

Conversation

@fdussert

Copy link
Copy Markdown
Owner

Why

Since 0.2.0 the bridge gained four members a widget may rely on, without SDK_VERSION moving:

Member Came with
Fremkit.favicon(url) beed4be (host fetches a widget's favicon)
Fremkit.image(url) 517caca (shortcut icon from an image address)
Fremkit.installedApps() 353f6d0, 24ce381 (#6)
Fremkit.appIcon(bundleId) 4312058 (#12)

A registry widget calling any of them could only declare "sdk": 1, so a 0.2.0 Fremkit would install it and leave the call undefined. Refusing that install up front is the only thing the sdk number is for.

What changes

  • SDK_VERSION and the bridge's Fremkit.sdk go to 2.
  • SDK_GENERATIONS in server/src/bridge/sdk.ts lists what each generation put on Fremkit. bridge.test.ts now 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.
  • A new install test pins backward compatibility: generations only add, the check stays manifest.sdk > SDK_VERSION, and every generation from 1 up to the current one installs. The 11 registry widgets (all sdk: 1, none calling the new members) keep installing.
  • docs/writing-widgets.md gets an SDK generations section (a table of what each generation adds, which number to declare, and why data channels are not generations). docs/marketplace.md links to it, and the CHANGELOG gets an author-facing line.
  • A separate docs commit fixes AGENTS.md and the CHANGELOG preamble. Both said a widget's sdk is compared against FREMKIT_VERSION, but it is compared against SDK_VERSION. The preamble also listed three version fields to bump instead of four.

Registry (fremkit-sietch)

No change is needed. tools/vendor/widgets/manifest.ts is still identical to main because sdk remains z.number().int().min(1), and SDK_VERSION is not vendored. Registry widgets that use the new members should declare "sdk": 2 once this ships.

Checks

  • pnpm typecheck: green
  • pnpm test: server 1492/1492, ui 392/392

🤖 Generated with Claude Code

fdussert and others added 2 commits October 15, 2026 19:30
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>
@fdussert
fdussert merged commit eef33c9 into main Oct 15, 2026
1 check passed
@fdussert
fdussert deleted the feature/sdk-2 branch October 15, 2026 17:40
@fdussert fdussert mentioned this pull request Oct 15, 2026
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