Skip to content

Share npm plugin build and publish scripts - #43

Merged
Stephen Belanger (Qard) merged 1 commit into
mainfrom
refactor/shared-npm-distribution
Sep 1, 2026
Merged

Share npm plugin build and publish scripts#43
Stephen Belanger (Qard) merged 1 commit into
mainfrom
refactor/shared-npm-distribution

Conversation

@Qard

Copy link
Copy Markdown
Collaborator

What this changes

OpenCode and Pi currently carry separate build and guarded-publish scripts whose behavior is identical apart from the agent name. That makes packaging fixes easy to apply to one npm integration but miss on the other.

This PR moves those two behaviors into shared, agent-validated scripts:

  • scripts/build-npm-plugin.sh assembles either package, injects the shared daemon client, installs from the lockfile, builds, and removes build dependencies
  • scripts/publish-npm-plugin.sh enforces the same npm tag allowlist and dry-run-only local publish policy for both packages
  • each per-agent build.sh and publish.sh becomes a four-line dispatch wrapper

The result is one implementation of npm assembly and one implementation of publish safety, with a net reduction in shell code. Agent-specific validation and package contents remain separate.

This PR does not change marketplace distribution, release workflows, package manifests, runtime tracing, or daemon behavior.

Validation

  • bash -n on both shared scripts and all four wrappers
  • make validate-opencode validate-pi
  • DRY_RUN=1 src/plugins/opencode/publish.sh
  • DRY_RUN=1 src/plugins/pi/publish.sh
  • git diff --check

Both packages build from frozen lockfiles, pass format/lint/type/tests, smoke-import, and complete package dry-runs.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 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-09-01T16:15:20.621085Z 91d4772 PR opened
ℹ️ About Codex in GitHub

Your 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.

@Qard
Stephen Belanger (Qard) merged commit 07fd1a7 into main Sep 1, 2026
20 checks passed
@Qard
Stephen Belanger (Qard) deleted the refactor/shared-npm-distribution branch September 1, 2026 16:47
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