Skip to content

feat: browse and install widget packages from a store - #35

Merged
Seb-GRAF merged 7 commits into
mainfrom
feat/package-store
Oct 16, 2026
Merged

Seb-GRAF merged 7 commits into
mainfrom
feat/package-store

Conversation

@Seb-GRAF

@Seb-GRAF Seb-GRAF commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

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

  • Manifest keys description, author, repository, screenshot, minimumVersion, requires, permissions and hosts, 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.
  • Store client. StableBar reads the index at https://github.com/Seb-GRAF/stablebar-packages/releases/download/store/index.json, downloads an archive, checks its SHA-256, extracts it with /usr/bin/tar into 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.
  • Packages tab. A Store section lists the index with each package's kind, version and description, marks updates, and shows "Requires StableBar X" for packages this version can't run. Selecting one downloads it behind a progress view and shows the usual review with Install Version …. A failed store load stays in the Store section, so it never blocks local packages. A download that finishes after you've selected something else is discarded.
  • Update confirmation. Enabling a version while another version of the same package is enabled lists the commands, hosts and permissions it adds, and asks first.
  • --install-package ID installs from the store when its argument isn't a folder.
  • README: a new "Store" section and the manifest keys.

Version checks compare numerically, so 0.5.0-beta.40 counts as 0.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 over file: URLs.
  • Every package in the store repository was built into an index and archives with its build-index.sh, then installed over file: URLs. All passed.
  • --install-package with a folder and with a store id, the missing-tool line and the newer-version error, with scratch configurations.
  • Reviewed by GPT-6.1-Sol via Codex. Its finding about overlapping downloads is fixed here.
  • With a scratch configuration, --install-package installed 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 main if GitHub doesn't.

Claude Opus 5.5 via Claude Code, reviewed by GPT-6.1-Sol via Codex.

Base automatically changed from feat/no-command-packages to main October 16, 2026 10:00
@Seb-GRAF
Seb-GRAF merged commit fe9beb1 into main Oct 16, 2026
4 checks passed
@Seb-GRAF
Seb-GRAF deleted the feat/package-store branch October 16, 2026 10:06
@stablebar-releases

Copy link
Copy Markdown

🎉 This PR is included in version 0.5.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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