Skip to content

feat: marketplace catalog + dist branch so omp can auto-update - #51

Merged
simonsmh merged 3 commits into
simonsmh:mainfrom
Eridanus117:feat/marketplace-dist
Nov 3, 2026
Merged

simonsmh merged 3 commits into
simonsmh:mainfrom
Eridanus117:feat/marketplace-dist

Conversation

@Eridanus117

Copy link
Copy Markdown
Contributor

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:

  1. a marketplace catalog
  2. a buildable-from-git artifact — marketplace installs clone a repository and symlink it; they never run a build. dist/ is gitignored here and package.json points pi.extensions at ./dist/index.js, so a catalog entry pointing at main would install a package that cannot load.

What

.omp-plugin/marketplace.json — one-entry catalog, source: {source: "github", repo: "simonsmh/pi-provider-qoder", ref: "dist"}. ref is the build branch, not main.

.github/workflows/dist-branch.yml — on every v* tag: npm ci, check, test, build, then force-push package.json + README.md + dist/ to a dist branch. Build output only; never merged back.

scripts/sync-marketplace-version.mjs — the catalog has to declare the released version, because marketplace.autoUpdate only upgrades entries that declare one, and a stale version silently disables updates. The script copies package.json#version into the catalog; npm run release:sync-marketplace writes it, --check fails, and prepublishOnly now 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 auto

Verification

  • omp plugin marketplace add . on a local checkout: catalog accepted
  • omp plugin discover: lists pi-provider-qoder@0.6.9 from the local catalog
  • node scripts/sync-marketplace-version.mjs --check → up to date; editing the version makes it exit 1
  • npm run check, npm run lint, npm test (440 passed), npm run build — clean

Open question for you

The dist branch 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 committing dist/ at release time (larger diffs on main) or leaning on npm-only distribution and skipping marketplace entirely — your call, I'm fine closing this if neither fits.

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`.
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-03T09:09:50.303623Z 6868acb New commits
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +33 to +35
- run: npm run check
- run: npm test
- run: npm run build

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge 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
@Eridanus117

Copy link
Copy Markdown
Contributor Author

Finding addressed in 7c180c9, plus CI from the same commit.

Stale catalog could still publish (P2) — correct: prepublishOnly runs only on npm publish, in a different workflow, so it could not gate this job. dist-branch.yml now runs node scripts/sync-marketplace-version.mjs --check before building; a tag that bumps package.json without syncing the catalog fails there instead of force-pushing a build that advertises the previous version.

CI — added .github/workflows/ci.yml (push to main + PRs): npm ci, the same catalog check, bun-free npm run lint / check / test.

Local verification: npm ci && npm run lint && npm run check && npm test → 440 tests pass; both workflow files parse.

Worth flagging for the reviewer: the offline verifier scripts/verify-tool-call-flow.ts already reports 18 !== 8 on main in my environment, so I did not treat that as a regression from this branch.

@simonsmh
simonsmh merged commit c4c47f7 into simonsmh:main Nov 3, 2026
1 check passed
@simonsmh

simonsmh commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Merged — thank you! Squash-merged as c4c47f7 and shipped in v0.6.10: https://github.com/simonsmh/pi-provider-qoder/releases/tag/v0.6.10

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 6868acb) to keep it mergeable — no content changes beyond that. The release also exercised the new machinery end to end: the catalog was synced to 0.6.10 before tagging, the Release workflow published to npm, and the dist-branch workflow pushed a dist branch containing dist/index.js with version 0.6.10. Thanks again!

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.

2 participants