Skip to content

fix: Added oc-plugin key to package.json#25

Open
ndhansen wants to merge 1 commit intoDEVtheOPS:mainfrom
ndhansen:fix-missing-package-json-key
Open

fix: Added oc-plugin key to package.json#25
ndhansen wants to merge 1 commit intoDEVtheOPS:mainfrom
ndhansen:fix-missing-package-json-key

Conversation

@ndhansen
Copy link
Copy Markdown

@ndhansen ndhansen commented Mar 31, 2026

Description

This PR adds an oc-plugin key to the package.json file, which is now required by opencode.

Type of change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Refactoring (no functional changes)
  • Chore (dependency updates, etc.)

Checklist

  • I have read the CONTRIBUTING.md document
  • My code follows the style guidelines of this project
  • bun run typecheck passes with no errors
  • bun test passes with no errors
  • I have added tests that prove my fix is effective or that my feature works
  • I have updated the documentation accordingly
  • My commits follow the Conventional Commits specification

Related issues

#24

Additional context

I tested it by first installing it locally without my change:

$ opencode plugin ./opencode-plugin-otel/

┌  Install plugin ./opencode-plugin-otel/
│
◇  Plugin package ready
│
■  No plugin targets found
│
■  "./opencode-plugin-otel/" does not declare supported targets in package.json
│
●  Expected: "oc-plugin": ["server", "tui"] or tuples like [["tui", { ... }]].
│
└  Done

Then installing it locally with my change:

$ opencode plugin ./opencode-plugin-otel/

┌  Install plugin ./opencode-plugin-otel/
│
◇  Plugin package ready
│
◇  Detected server target
│
◇  Plugin config updated
│
●  Added to /home/tigadmin/code/.opencode/opencode.jsonc
│
◆  Installed ./opencode-plugin-otel/
│
●  Scope: local (/home/tigadmin/code/.opencode)
│
└  Done

I didn't add tests, because I don't believe the tests cover the installation in opencode, and my changes only affect the packaging.

Summary by CodeRabbit

  • Chores
    • Updated package configuration to designate the package as a server-side plugin, enabling compatibility with the appropriate runtime environment.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 31, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 31ad1d6c-d6e9-4a69-8951-a241007e9afc

📥 Commits

Reviewing files that changed from the base of the PR and between c75ec47 and 9975938.

📒 Files selected for processing (1)
  • package.json

📝 Walkthrough

Walkthrough

Added an oc-plugin field to package.json with the value ["server"], designating the package as a server-type OpenCode plugin. No other configuration, dependencies, or functionality were modified.

Changes

Cohort / File(s) Summary
Package Configuration
package.json
Added top-level oc-plugin: ["server"] field to identify the package as an OpenCode server plugin.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Possibly related issues

Poem

🐰 A tiny field in JSON neat,
"oc-plugin" now complete!
Server marked for all to see,
Plugin magic—hopping free! 🎉

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding an oc-plugin key to package.json, which is the sole objective of this pull request.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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.

1 participant