Skip to content

chore(release): ship opencode wrapper flow#19

Merged
oritwoen merged 7 commits into
mainfrom
chore/release-opencode-wrapper
Mar 12, 2026
Merged

chore(release): ship opencode wrapper flow#19
oritwoen merged 7 commits into
mainfrom
chore/release-opencode-wrapper

Conversation

@oritwoen
Copy link
Copy Markdown
Owner

@oritwoen oritwoen commented Mar 12, 2026

OpenCode plugin subpath specifiers are still not universally installable, so this adds a publishable obsxa-opencode wrapper package and wires release automation to bump root first, sync wrapper version, bump wrapper changelog, and then finalize release. The tag-based release workflow now publishes both root and wrapper packages.

Closes

Closes #18

Adds a standalone obsxa-opencode package that re-exports the existing plugin entrypoint so users can install a stable package name while OpenCode subpath plugin specifier support is still pending.
Routes pnpm release through a single script that bumps the root package first, mirrors that version into the wrapper package, and then runs changelogen for both targets before final release commit and tag.
Extends the tag-triggered npm release workflow to publish the new wrapper package after the main package and records the release-flow change in the unreleased changelog notes.
Adds an explicit existence check before syncing wrapper metadata and removes fixed obsxa version pinning in the wrapper dependency to reduce manual drift risk between wrapper and root package maintenance.
@oritwoen oritwoen added this to the v0.0.3 milestone Mar 12, 2026
@oritwoen oritwoen self-assigned this Mar 12, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 12, 2026

📝 Walkthrough

Walkthrough

Introduces an opencode wrapper package with synchronized versioning in the release pipeline. A new Node script coordinates version syncing between root and wrapper packages, ensuring consistent releases. GitHub workflow publishes both packages.

Changes

Cohort / File(s) Summary
Release Workflow & Scripts
.github/workflows/release.yml, package.json, scripts/release-with-opencode.mjs
Added second publish step in CI workflow for ./opencode package. Release script replaced with Node script that reads root version, syncs opencode/package.json version and obsxa dependency, then runs sequential changelogen commands (bump, sync, opencode bump, release/push).
OpenCode Wrapper Package
opencode/index.mjs, opencode/index.d.mts, opencode/package.json
New wrapper package exports createObsxaPlugin from obsxa/opencode as named and default exports. Package manifest declares ES module with matching root version (0.0.2), obsxa dependency, and proper export map.
Documentation
CHANGELOG.md
Added "🏡 Chore" section documenting release automation changes: simplified flow, wrapper publish step, and metadata syncing strategy.

Sequence Diagram

sequenceDiagram
    participant User as User/CI
    participant ReleaseScript as Release Script
    participant RootPkg as Root package.json
    participant OpencodeSync as Opencode Sync
    participant OpencodePkg as Opencode package.json
    participant Changelogen as Changelogen
    participant GHWorkflow as GitHub Workflow
    
    User->>ReleaseScript: pnpm release
    ReleaseScript->>RootPkg: Read version
    RootPkg-->>ReleaseScript: v0.0.2
    ReleaseScript->>OpencodeSync: Validate opencode/package.json exists
    OpencodeSync-->>ReleaseScript: Exists ✓
    ReleaseScript->>OpencodePkg: Update version & obsxa dep to v0.0.2
    OpencodePkg-->>ReleaseScript: Written
    ReleaseScript->>Changelogen: --bump (root)
    Changelogen-->>ReleaseScript: Root bumped
    ReleaseScript->>Changelogen: --dir ./opencode -r v0.0.2 (opencode bump)
    Changelogen-->>ReleaseScript: Opencode bumped
    ReleaseScript->>Changelogen: --release -r v0.0.2 --push
    Changelogen-->>ReleaseScript: Released & pushed
    ReleaseScript-->>GHWorkflow: Trigger publish
    GHWorkflow->>GHWorkflow: Publish root package
    GHWorkflow->>GHWorkflow: Publish opencode package
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

The release script requires verification of version syncing logic, file I/O operations, and changelogen command sequencing to ensure both packages stay synchronized. Wrapper package files are straightforward re-exports and configuration. Key concern: confirm version sync doesn't break if opencode/package.json is missing or malformed.

Poem

🔄 Versions sync in lockstep now,
Root and wrapper take a bow,
One release script rules them all,
Both packages heed the call,
Changelogen orchestrates the flow,
Watch two packages steal the show! 📦✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed Title accurately summarizes the main change: adding and shipping the opencode wrapper package release flow.
Description check ✅ Passed Description covers the what (wrapper package + release automation wiring) and the why (subpath specifiers unreliable), with linked issue reference.
Linked Issues check ✅ Passed All acceptance criteria from #18 are met: root bumps first, wrapper version syncs to root, and release workflow publishes both packages.
Out of Scope Changes check ✅ Passed All changes directly support the wrapper package shipping and release automation requirements from #18. No unrelated modifications detected.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/release-opencode-wrapper
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch chore/release-opencode-wrapper
📝 Coding Plan for PR comments
  • Generate coding plan

Comment @coderabbitai help to get the list of available commands and usage tips.

@qodo-code-review
Copy link
Copy Markdown

Review Summary by Qodo

Add obsxa-opencode wrapper package with unified release automation

✨ Enhancement 📦 Other

Grey Divider

Walkthroughs

Description
• Add standalone obsxa-opencode wrapper package for stable plugin installation
• Implement unified release script syncing root and wrapper package versions
• Extend CI/CD to publish wrapper package alongside main package
• Add safeguards for wrapper metadata sync with existence checks
Diagram
flowchart LR
  A["Root Package"] -->|"sync version"| B["Wrapper Package<br/>obsxa-opencode"]
  C["Release Script"] -->|"bump & sync"| A
  C -->|"bump wrapper"| B
  D["CI/CD Release Job"] -->|"publish"| A
  D -->|"publish"| B
Loading

Grey Divider

File Changes

1. opencode/package.json ✨ Enhancement +21/-0

Create obsxa-opencode wrapper package definition

• Create new standalone wrapper package obsxa-opencode
• Re-export plugin entrypoint from main obsxa package
• Use flexible dependency version (*) to reduce maintenance drift
• Include minimal metadata and export configuration

opencode/package.json


2. opencode/index.mjs ✨ Enhancement +2/-0

Add wrapper package entry point

• Export createObsxaPlugin from main package entrypoint
• Provide both named and default exports for flexibility

opencode/index.mjs


3. opencode/CHANGELOG.md 📝 Documentation +3/-0

Initialize wrapper package changelog

• Initialize changelog for wrapper package
• Set up unreleased section for future updates

opencode/CHANGELOG.md


View more (4)
4. scripts/release-with-opencode.mjs ✨ Enhancement +46/-0

Implement unified release script with version sync

• Create unified release script orchestrating version bumps for root and wrapper
• Read root package version and sync to wrapper package.json
• Add existence check for wrapper package before syncing
• Run changelogen for both root and wrapper with synchronized versions

scripts/release-with-opencode.mjs


5. package.json ⚙️ Configuration changes +1/-1

Route release through unified version sync script

• Update release script to use new release-with-opencode.mjs instead of direct changelogen
• Maintain existing build and test steps in release workflow

package.json


6. .github/workflows/release.yml ⚙️ Configuration changes +4/-0

Publish wrapper package in release workflow

• Add second publish step for wrapper package in opencode/ directory
• Use same npm authentication and access settings as main package
• Publish wrapper after main package in release workflow

.github/workflows/release.yml


7. CHANGELOG.md 📝 Documentation +5/-0

Document release automation and wrapper changes

• Document release flow simplification and wrapper package sync
• Record wrapper package publishing in release workflow
• Add chore entries to unreleased section

CHANGELOG.md


Grey Divider

Qodo Logo

@qodo-code-review
Copy link
Copy Markdown

qodo-code-review Bot commented Mar 12, 2026

Code Review by Qodo

🐞 Bugs (2) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider


Action required

1. Unbounded obsxa dependency🐞 Bug ✓ Correctness
Description
obsxa-opencode re-exports createObsxaPlugin from obsxa/opencode but declares "obsxa": "*",
so installs can resolve to an arbitrary obsxa version that may not provide a compatible
./opencode export and will fail at runtime. The release sync script also only aligns the wrapper
version, not the wrapper’s obsxa dependency range, so this mismatch risk persists across releases.
Code

opencode/package.json[R18-20]

+  "dependencies": {
+    "obsxa": "*"
+  }
Evidence
The wrapper’s entrypoint is a thin re-export of a specific obsxa subpath (obsxa/opencode),
meaning the wrapper is coupled to obsxa’s exported subpath contract, but the wrapper allows any
obsxa version via * and the release script does not enforce dependency alignment.

opencode/index.mjs[1-2]
opencode/package.json[18-20]
package.json[24-37]
scripts/release-with-opencode.mjs[26-37]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`obsxa-opencode` re-exports `obsxa/opencode` but depends on `obsxa` using `&amp;amp;quot;*&amp;amp;quot;`, allowing incompatible `obsxa` versions to be installed. The release automation only syncs the wrapper version, not its `obsxa` dependency constraint.
## Issue Context
The wrapper is meant to be published alongside `obsxa` and should reliably pull a compatible `obsxa` version that exports the `./opencode` subpath.
## Fix Focus Areas
- opencode/package.json[18-20]
- scripts/release-with-opencode.mjs[26-37]
## Implementation notes
- Change `opencode/package.json` to depend on `obsxa` using a constrained range, e.g. exact `&amp;amp;quot;obsxa&amp;amp;quot;: &amp;amp;quot;${version}&amp;amp;quot;` or a compatible range like `^${version}`.
- Extend `syncOpencodePackageVersion(version)` to also update `opencodePackageJson.dependencies.obsxa` (and create the `dependencies` object if missing) to the chosen range so the wrapper’s dependency stays aligned on every release.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools



Remediation recommended

2. Wrapper lacks TS types🐞 Bug ✓ Correctness
Description
obsxa-opencode publishes only index.mjs and has no types entry or declaration file, so
TypeScript consumers importing from obsxa-opencode will not get typings (and may fail
typechecking). This is inconsistent with obsxa exporting typings for the ./opencode subpath that
the wrapper forwards to.
Code

opencode/package.json[R10-17]

+  "files": [
+    "index.mjs"
+  ],
+  "type": "module",
+  "main": "./index.mjs",
+  "exports": {
+    ".": "./index.mjs"
+  },
Evidence
The wrapper package explicitly limits published files to index.mjs and does not declare any
types file, while the root obsxa package does provide a types entry for ./opencode. This
means the wrapper removes available type information for TS users.

opencode/package.json[10-17]
package.json[33-36]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
The `obsxa-opencode` wrapper ships no TypeScript declarations, even though it forwards an API that already has types in `obsxa`.
## Issue Context
The wrapper is a publishable facade; TS users will import from `obsxa-opencode` and expect `createObsxaPlugin` and its option types to be typed.
## Fix Focus Areas
- opencode/package.json[10-17]
- opencode/index.mjs[1-2]
## Implementation notes
- Add `opencode/index.d.ts` (or `index.d.mts`) that forwards the module surface:
- `export { createObsxaPlugin } from &amp;amp;quot;obsxa/opencode&amp;amp;quot;;`
- `export { default } from &amp;amp;quot;obsxa/opencode&amp;amp;quot;;` (or keep default mapping consistent)
- `export type { ObsxaPluginOptions } from &amp;amp;quot;obsxa/opencode&amp;amp;quot;;` (and any other relevant types)
- Update `opencode/package.json`:
- add `&amp;amp;quot;types&amp;amp;quot;: &amp;amp;quot;./index.d.ts&amp;amp;quot;` (or `.d.mts`)
- include the declaration file in `&amp;amp;quot;files&amp;amp;quot;`
- optionally update `&amp;amp;quot;exports&amp;amp;quot;` to provide a `types` condition for better TS resolution.

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

ⓘ The new review experience is currently in Beta. Learn more

Grey Divider

Qodo Logo

@codeant-ai
Copy link
Copy Markdown

codeant-ai Bot commented Mar 12, 2026

Sequence Diagram

This PR introduces a single release script that bumps the root package first, synchronizes the wrapper package version, and updates both changelogs with the same release version. It also extends the tag based release workflow to publish both the main package and the new wrapper package.

sequenceDiagram
    participant Maintainer
    participant ReleaseScript
    participant RootPackage
    participant WrapperPackage
    participant ReleaseWorkflow
    participant NpmRegistry

    Maintainer->>ReleaseScript: Run release command
    ReleaseScript->>RootPackage: Bump root version and changelog
    RootPackage-->>ReleaseScript: Return new version
    ReleaseScript->>WrapperPackage: Verify wrapper package and sync version
    ReleaseScript->>WrapperPackage: Bump wrapper changelog with same version
    ReleaseScript->>ReleaseWorkflow: Create tag and push release
    ReleaseWorkflow->>NpmRegistry: Publish main package
    ReleaseWorkflow->>NpmRegistry: Publish wrapper package
Loading

Generated by CodeAnt AI

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

No issues found across 7 files

Comment thread opencode/package.json
Copy link
Copy Markdown

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

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: ace554cf6d

ℹ️ 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 thread opencode/package.json Outdated
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
package.json (1)

48-48: Keep the normal release gates here.

This path can tag and push a release even when the new wrapper entrypoint breaks exports or declarations, because it skips pnpm lint and pnpm typecheck.

Possible fix
-    "release": "pnpm test:run && pnpm build && node ./scripts/release-with-opencode.mjs"
+    "release": "pnpm lint && pnpm typecheck && pnpm test:run && pnpm build && node ./scripts/release-with-opencode.mjs"

Based on learnings: Default verification sequence after non-trivial edits: pnpm lintpnpm typecheckpnpm test:runpnpm build

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 48, The "release" npm script currently runs "pnpm
test:run && pnpm build && node ./scripts/release-with-opencode.mjs" which skips
linting and typechecking; update the "release" script entry named "release" to
run the full verification sequence: "pnpm lint" then "pnpm typecheck" then "pnpm
test:run" then "pnpm build" before invoking
"./scripts/release-with-opencode.mjs" so releases are gated by lint and type
checks.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@opencode/package.json`:
- Around line 10-17: Add TypeScript declaration file for the published wrapper
package so consumers get types: create a new file opencode/index.d.mts that
re-exports the type declarations from the main package (exporting
createObsxaPlugin and default) by referencing the existing types built at
dist/opencode.d.mts / the upstream module "obsxa/opencode"; this ensures the
symbol createObsxaPlugin (and default export) are available to TypeScript users
importing from obsxa-opencode.

In `@scripts/release-with-opencode.mjs`:
- Around line 31-37: The release script currently updates
opencodePackageJson.version but leaves the wrapper's "obsxa" dependency as "*"
which causes installs to pick up the wrong major; modify the code that handles
opencodePackageJson (the opencodePackageJson, opencodePackageJsonPath and
version variables) to also set opencodePackageJson.dependencies.obsxa = version
(or the appropriate released semver string) before calling writeFileSync so the
published opencode package pins "obsxa" to the release version.

---

Nitpick comments:
In `@package.json`:
- Line 48: The "release" npm script currently runs "pnpm test:run && pnpm build
&& node ./scripts/release-with-opencode.mjs" which skips linting and
typechecking; update the "release" script entry named "release" to run the full
verification sequence: "pnpm lint" then "pnpm typecheck" then "pnpm test:run"
then "pnpm build" before invoking "./scripts/release-with-opencode.mjs" so
releases are gated by lint and type checks.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 335b734c-cde4-44e9-8cc2-212c7b75dede

📥 Commits

Reviewing files that changed from the base of the PR and between 18934c4 and ace554c.

📒 Files selected for processing (7)
  • .github/workflows/release.yml
  • CHANGELOG.md
  • opencode/CHANGELOG.md
  • opencode/index.mjs
  • opencode/package.json
  • package.json
  • scripts/release-with-opencode.mjs
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: cubic · AI code reviewer
🧰 Additional context used
📓 Path-based instructions (2)
**/*.md

📄 CodeRabbit inference engine (CLAUDE.md)

Use @mention syntax in documentation to reference agents (e.g., @AGENTS.md)

Files:

  • opencode/CHANGELOG.md
  • CHANGELOG.md
**/*.{ts,tsx,js,mjs}

📄 CodeRabbit inference engine (AGENTS.md)

Use ESM-only TypeScript with "type": "module" in package.json; do not introduce CommonJS

Files:

  • scripts/release-with-opencode.mjs
  • opencode/index.mjs
🧠 Learnings (5)
📓 Common learnings
Learnt from: oritwoen
Repo: oritwoen/obsxa PR: 9
File: package.json:58-58
Timestamp: 2026-03-11T19:03:02.039Z
Learning: In `package.json` of `oritwoen/obsxa`, `opencode-ai/plugin` is intentionally pinned to `"latest"` in devDependencies to track plugin API movement. Do not flag this as a non-reproducible build issue.
📚 Learning: 2026-03-11T19:03:02.039Z
Learnt from: oritwoen
Repo: oritwoen/obsxa PR: 9
File: package.json:58-58
Timestamp: 2026-03-11T19:03:02.039Z
Learning: In `package.json` of `oritwoen/obsxa`, `opencode-ai/plugin` is intentionally pinned to `"latest"` in devDependencies to track plugin API movement. Do not flag this as a non-reproducible build issue.

Applied to files:

  • opencode/index.mjs
  • package.json
  • CHANGELOG.md
  • opencode/package.json
📚 Learning: 2026-03-12T11:16:05.994Z
Learnt from: CR
Repo: oritwoen/obsxa PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-12T11:16:05.994Z
Learning: Default verification sequence after non-trivial edits: `pnpm lint` → `pnpm typecheck` → `pnpm test:run` → `pnpm build`

Applied to files:

  • package.json
📚 Learning: 2026-03-12T11:16:05.994Z
Learnt from: CR
Repo: oritwoen/obsxa PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-12T11:16:05.994Z
Learning: Applies to {drizzle/**/*.ts,src/**/schema.ts} : Schema changes must go through Drizzle migrations using `pnpm generate`, not ad-hoc SQL edits in runtime code

Applied to files:

  • package.json
📚 Learning: 2026-03-12T11:16:05.994Z
Learnt from: CR
Repo: oritwoen/obsxa PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-03-12T11:16:05.994Z
Learning: Do not run destructive git operations, commit, push, or modify generated artifacts (`dist/`, `drizzle/meta/`) unless explicitly requested

Applied to files:

  • package.json

Comment thread opencode/package.json
Comment thread scripts/release-with-opencode.mjs
Keeps obsxa-opencode bound to the exact root package version and updates release sync logic so dependency and wrapper version move together on every release.
Adds declaration entrypoints to obsxa-opencode so TypeScript consumers get createObsxaPlugin types from the wrapper package, matching the runtime re-export.
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@scripts/release-with-opencode.mjs`:
- Around line 47-48: The script calls runChangelogen(["--bump", "--dir",
"./opencode", "-r", version]) which writes opencode/CHANGELOG.md but then only
runs runChangelogen(["--release", "-r", version, "--push"]) scoped to root, so
the opencode changelog isn't committed/tagged; fix by running a release scoped
to ./opencode as well (e.g., invoke runChangelogen(["--release", "--dir",
"./opencode", "-r", version]) before the final --push) or otherwise make the
release step monorepo-aware so that runChangelogen handles both root and
./opencode commits/tags.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5a66e677-86d1-46e4-bd6f-273210c22a84

📥 Commits

Reviewing files that changed from the base of the PR and between ace554c and c070940.

📒 Files selected for processing (2)
  • opencode/package.json
  • scripts/release-with-opencode.mjs
🚧 Files skipped from review as they are similar to previous changes (1)
  • opencode/package.json
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: cubic · AI code reviewer
🧰 Additional context used
📓 Path-based instructions (1)
**/*.{ts,tsx,js,mjs}

📄 CodeRabbit inference engine (AGENTS.md)

Use ESM-only TypeScript with "type": "module" in package.json; do not introduce CommonJS

Files:

  • scripts/release-with-opencode.mjs
🧠 Learnings (2)
📓 Common learnings
Learnt from: oritwoen
Repo: oritwoen/obsxa PR: 9
File: package.json:58-58
Timestamp: 2026-03-11T19:03:02.039Z
Learning: In `package.json` of `oritwoen/obsxa`, `opencode-ai/plugin` is intentionally pinned to `"latest"` in devDependencies to track plugin API movement. Do not flag this as a non-reproducible build issue.
📚 Learning: 2026-03-11T19:03:02.039Z
Learnt from: oritwoen
Repo: oritwoen/obsxa PR: 9
File: package.json:58-58
Timestamp: 2026-03-11T19:03:02.039Z
Learning: In `package.json` of `oritwoen/obsxa`, `opencode-ai/plugin` is intentionally pinned to `"latest"` in devDependencies to track plugin API movement. Do not flag this as a non-reproducible build issue.

Applied to files:

  • scripts/release-with-opencode.mjs

Comment thread scripts/release-with-opencode.mjs Outdated
Drops opencode changelog bumping and removes opencode/CHANGELOG.md so release tagging stays single-source in root and avoids conflicting multi-release tag behavior.
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@scripts/release-with-opencode.mjs`:
- Around line 10-14: The call in runChangelogen uses execFileSync("changelogen",
...) which fails on Windows because .cmd files aren't executed directly; update
runChangelogen (the execFileSync call) to be cross-platform by either adding {
shell: true } to the options, or invoking cmd.exe explicitly via
execFileSync("cmd.exe", ["/c", "changelogen", ...args], {...}), or replace
execFileSync with a cross-platform spawn (e.g., cross-spawn) to ensure
changelogen runs correctly on Windows.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8a28c389-95e3-4cf9-8ff6-13deb23e61e6

📥 Commits

Reviewing files that changed from the base of the PR and between 76db412 and 761a98a.

📒 Files selected for processing (2)
  • CHANGELOG.md
  • scripts/release-with-opencode.mjs
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: cubic · AI code reviewer
🧰 Additional context used
📓 Path-based instructions (2)
**/*.{ts,tsx,js,mjs}

📄 CodeRabbit inference engine (AGENTS.md)

Use ESM-only TypeScript with "type": "module" in package.json; do not introduce CommonJS

Files:

  • scripts/release-with-opencode.mjs
**/*.md

📄 CodeRabbit inference engine (CLAUDE.md)

Use @mention syntax in documentation to reference agents (e.g., @AGENTS.md)

Files:

  • CHANGELOG.md
🧠 Learnings (3)
📓 Common learnings
Learnt from: oritwoen
Repo: oritwoen/obsxa PR: 19
File: scripts/release-with-opencode.mjs:0-0
Timestamp: 2026-03-12T13:12:57.305Z
Learning: In `oritwoen/obsxa`, the release flow uses a single root changelog and release tag for both the root package and the `obsxa-opencode` wrapper (`opencode/`). `opencode/CHANGELOG.md` was intentionally removed and changelogen is NOT run with `--dir ./opencode`. Do not flag the absence of a separate opencode release step as a bug.
Learnt from: oritwoen
Repo: oritwoen/obsxa PR: 9
File: package.json:58-58
Timestamp: 2026-03-11T19:03:02.039Z
Learning: In `package.json` of `oritwoen/obsxa`, `opencode-ai/plugin` is intentionally pinned to `"latest"` in devDependencies to track plugin API movement. Do not flag this as a non-reproducible build issue.
📚 Learning: 2026-03-12T13:12:57.305Z
Learnt from: oritwoen
Repo: oritwoen/obsxa PR: 19
File: scripts/release-with-opencode.mjs:0-0
Timestamp: 2026-03-12T13:12:57.305Z
Learning: In `oritwoen/obsxa`, the release flow uses a single root changelog and release tag for both the root package and the `obsxa-opencode` wrapper (`opencode/`). `opencode/CHANGELOG.md` was intentionally removed and changelogen is NOT run with `--dir ./opencode`. Do not flag the absence of a separate opencode release step as a bug.

Applied to files:

  • scripts/release-with-opencode.mjs
  • CHANGELOG.md
📚 Learning: 2026-03-11T19:03:02.039Z
Learnt from: oritwoen
Repo: oritwoen/obsxa PR: 9
File: package.json:58-58
Timestamp: 2026-03-11T19:03:02.039Z
Learning: In `package.json` of `oritwoen/obsxa`, `opencode-ai/plugin` is intentionally pinned to `"latest"` in devDependencies to track plugin API movement. Do not flag this as a non-reproducible build issue.

Applied to files:

  • scripts/release-with-opencode.mjs
  • CHANGELOG.md
🔇 Additional comments (2)
CHANGELOG.md (1)

5-10: LGTM - changelog entries accurately reflect the release automation changes.

The three bullets clearly document the wrapper package release flow, format matches existing conventions, and line 9 correctly reflects the single root changelog approach per the retrieved learning.

scripts/release-with-opencode.mjs (1)

31-35: This fixes the wrapper/root drift at install time.

Setting both opencodePackageJson.version and dependencies.obsxa to the same release version means obsxa-opencode@x.y.z no longer installs against whatever obsxa@* happens to resolve to later.

Comment thread scripts/release-with-opencode.mjs
@oritwoen oritwoen merged commit 14bf067 into main Mar 12, 2026
4 checks passed
@oritwoen oritwoen deleted the chore/release-opencode-wrapper branch March 12, 2026 13:22
@oritwoen oritwoen restored the chore/release-opencode-wrapper branch March 12, 2026 13:55
@oritwoen oritwoen deleted the chore/release-opencode-wrapper branch March 12, 2026 13:55
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.

Release synced opencode wrapper package

1 participant