-
Notifications
You must be signed in to change notification settings - Fork 103
Add local-first plugin marketplace #653
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
GautamBytes
wants to merge
10
commits into
Gitlawb:main
Choose a base branch
from
GautamBytes:feat/plugin-marketplace
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
a1985de
feat(marketplace): add catalog validation
bfc2af0
feat(plugins): quarantine disabled plugins
0ce78f2
feat(cli): add plugin marketplace commands
124b471
docs: document plugin marketplace
4c22e60
feat: add local-first plugin marketplace
0bf831c
fix: harden plugin marketplace review findings
0fbe4e1
fix: address plugin marketplace review comments
733120d
fix: wait for interrupted exec sessions
236d6ab
fix: address coderabbit lint feedback
98c1f79
fix: handle missing recovered plugin locks
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| # Plugin Marketplace | ||
|
|
||
| Zero's plugin marketplace is local-first. Catalogs are JSON files that describe | ||
| plugin releases, signed by an optional detached Ed25519 `catalog.sig`. | ||
|
|
||
| ## Catalogs | ||
|
|
||
| Register catalogs with: | ||
|
|
||
| ```bash | ||
| zero plugins marketplace validate ./catalog.json | ||
| zero plugins marketplace add ./catalog.json --allow-unverified | ||
| zero plugins marketplace list | ||
| ``` | ||
|
|
||
| User catalogs are stored in `~/.config/zero/marketplaces.json`. Project catalogs | ||
| are stored in `<workspace>/.zero/marketplaces.json`. | ||
|
|
||
| ## Catalog Format | ||
|
|
||
| `catalog.json` has schema version `1`, a catalog id, owner, and a `plugins` | ||
| array. Each plugin has curated review metadata and one or more immutable | ||
| releases: | ||
|
|
||
| ```json | ||
| { | ||
| "schemaVersion": 1, | ||
| "id": "team", | ||
| "owner": "Platform", | ||
| "plugins": [ | ||
| { | ||
| "id": "zero.demo", | ||
| "name": "Zero Demo", | ||
| "author": {"name": "Platform"}, | ||
| "license": "MIT", | ||
| "review": { | ||
| "status": "community", | ||
| "date": "2026-07-10", | ||
| "reviewer": "Zero Security", | ||
| "url": "https://github.com/Gitlawb/zero-plugins/pull/1" | ||
| }, | ||
| "releases": [ | ||
| { | ||
| "version": "0.1.0", | ||
| "repository": "https://github.com/Gitlawb/zero-demo-plugin.git", | ||
| "commit": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", | ||
| "treeHash": "sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb", | ||
| "components": { | ||
| "tools": [{"name": "lookup", "permission": "prompt"}], | ||
| "hooks": [{"name": "preflight", "event": "beforeTool"}] | ||
| } | ||
| } | ||
| ] | ||
| } | ||
| ] | ||
| } | ||
| ``` | ||
|
|
||
| Supported hook events are exactly `beforeTool`, `afterTool`, `sessionStart`, | ||
| and `sessionEnd`. Specialist hook events are rejected by catalog validation. | ||
|
|
||
| ## Install Safety | ||
|
|
||
| Marketplace installs require `--yes` and verify the fetched plugin against | ||
| catalog metadata before publishing: | ||
|
|
||
| ```bash | ||
| zero plugins browse lookup --catalog team | ||
| zero plugins install zero.demo@team --yes --allow-unverified | ||
| ``` | ||
|
|
||
| Install checks include plugin id, manifest version, tree hash, component names, | ||
| tool permissions, and hook events. Managed plugins are recorded in `plugins.lock` | ||
| with catalog, version, commit, subdir, hash, pinned, and enabled state. | ||
|
|
||
| Install/update/remove operations take a plugin-root lock. On Unix this uses an | ||
| OS file lock, so crash-left lock files do not block later operations. On Windows | ||
| stale lock files are recovered after a short age threshold. | ||
|
|
||
| Disabled managed plugins move to `<plugins-root>/.disabled/<id>`. The loader | ||
| lists quarantined plugins but never activates them; a disabled project plugin | ||
| still shadows a same-id user plugin. |
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.