Repository navigation
feat: marketplace catalog + dist branch so omp can auto-update - #51
Conversation
omp auto-updates marketplace plugins (`marketplace.autoUpdate=auto`) but has no equivalent for npm-installed ones, so an install only moves when the user runs `omp plugin upgrade`. Marketplace installs clone a repository and symlink it, never building it, and `dist/` is gitignored here — a catalog pointing at `main` would produce a package whose `pi.extensions` target does not exist. So: - `.omp-plugin/marketplace.json` declares the plugin and points at a `dist` ref - `.github/workflows/dist-branch.yml` builds on every `v*` tag and force-pushes the output to a `dist` branch - `scripts/sync-marketplace-version.mjs` keeps the catalog version equal to package.json, and `prepublishOnly` fails when they drift Verified: the catalog parses with `omp plugin marketplace add` and `omp plugin discover` lists `pi-provider-qoder@0.6.9`.
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e657e9460a
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| - run: npm run check | ||
| - run: npm test | ||
| - run: npm run build |
There was a problem hiding this comment.
Validate the catalog version before publishing the dist branch
If a release tag bumps package.json without synchronizing the catalog, this job still publishes: npm run check only runs TypeScript, and the catalog guard is exclusively in prepublishOnly, which npm documents as running “ONLY on npm publish.” That command runs in the separate release.yml workflow, so its failure cannot prevent this job from force-pushing the new build while the catalog still advertises the previous version. Marketplace auto-updates therefore miss that release despite successful dist publication. Run node scripts/sync-marketplace-version.mjs --check here before pushing.
Useful? React with 👍 / 👎.
- dist-branch: run `sync-marketplace-version.mjs --check` before building, since `prepublishOnly` only fires on `npm publish` (a different workflow) and could not stop a stale catalog from being published - ci: lint, typecheck, tests, and the same catalog check on push and PRs
|
Finding addressed in 7c180c9, plus CI from the same commit. Stale catalog could still publish (P2) — correct: CI — added Local verification: Worth flagging for the reviewer: the offline verifier |
# Conflicts: # README.md
|
Merged — thank you! Squash-merged as Notes from the merge: after #50 went in, this PR's README section conflicted with #50's, so I merged main into the branch and kept both sections (commit |
Why
omp auto-updates marketplace plugins (
marketplace.autoUpdate = auto) but has no equivalent for npm installs. Getting this extension onto that path needs two things that do not exist yet in this repo, and the second one is the subtle part:dist/is gitignored here andpackage.jsonpointspi.extensionsat./dist/index.js, so a catalog entry pointing atmainwould install a package that cannot load.What
.omp-plugin/marketplace.json— one-entry catalog,source: {source: "github", repo: "simonsmh/pi-provider-qoder", ref: "dist"}.refis the build branch, notmain..github/workflows/dist-branch.yml— on everyv*tag:npm ci,check,test,build, then force-pushpackage.json+README.md+dist/to adistbranch. Build output only; never merged back.scripts/sync-marketplace-version.mjs— the catalog has to declare the released version, becausemarketplace.autoUpdateonly upgrades entries that declare one, and a stale version silently disables updates. The script copiespackage.json#versioninto the catalog;npm run release:sync-marketplacewrites it,--checkfails, andprepublishOnlynow runs the check so a release cannot ship a stale catalog.Usage after merge:
omp plugin marketplace add simonsmh/pi-provider-qoder omp plugin install pi-provider-qoder@pi-provider-qoder omp config set marketplace.autoUpdate autoVerification
omp plugin marketplace add .on a local checkout: catalog acceptedomp plugin discover: listspi-provider-qoder@0.6.9from the local catalognode scripts/sync-marketplace-version.mjs --check→ up to date; editing the version makes it exit 1npm run check,npm run lint,npm test(440 passed),npm run build— cleanOpen question for you
The
distbranch is the least invasive way to give a marketplace a loadable package, but it does add a force-pushed branch to the repo. If you'd rather not, the alternative is committingdist/at release time (larger diffs onmain) or leaning on npm-only distribution and skipping marketplace entirely — your call, I'm fine closing this if neither fits.