Repository navigation
feat: browse and install widget packages from a store - #35
Merged
Merged
Conversation
This was referenced Oct 16, 2026
This was referenced Oct 16, 2026
|
🎉 This PR is included in version 0.5.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
This was referenced Oct 21, 2026
This was referenced Nov 16, 2026
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.
Problem
Part of #33, everything except secret settings, which #36 adds. Sharing a widget meant sending a folder: there was nowhere to find packages, no integrity check, no way to update, and nothing told you what a package needs.
Changes
description,author,repository,screenshot,minimumVersion,requires,permissionsandhosts, shown in the review. The review names required tools missing from the login shell's PATH, and refuses a package that needs a newer StableBar.https://github.com/Seb-GRAF/stablebar-packages/releases/download/store/index.json, downloads an archive, checks its SHA-256, extracts it with/usr/bin/tarinto a temporary folder, checks its id and version against the index, then reviews and installs it with the same code as a local folder. The index decoder ignores unknown keys and entries of unknown kinds, because older apps read the same index. The index doesn't repeat commands or requirements: they come from the downloaded package's own review.--install-package IDinstalls from the store when its argument isn't a folder.Version checks compare numerically, so
0.5.0-beta.40counts as0.5.0. Beta users can then install packages that need the coming release; strict SemVer ordering would refuse them until the stable release.The store is https://github.com/Seb-GRAF/stablebar-packages. Its CI validates every package against StableBar and publishes the index and archives.
Testing
swift test: all tests pass, including manifest decoding, minimum versions, lenient index decoding with an unknown kind, checksum and id mismatches, the update additions, missing tools, and installing from a local index and archive overfile:URLs.build-index.sh, then installed overfile:URLs. All passed.--install-packagewith a folder and with a store id, the missing-tool line and the newer-version error, with scratch configurations.--install-packageinstalled seven packages from the published store (https://github.com/Seb-GRAF/stablebar-packages/releases/tag/store). In a scratch instance, the Store section listed the index and reviewed a downloaded package. Not tried yet: the update confirmation.Merging
A merge commit. Stacked on #34: merge that first, then retarget this to
mainif GitHub doesn't.Claude Opus 5.5 via Claude Code, reviewed by GPT-6.1-Sol via Codex.