@naxodev/opencode-music-player 0.2.6 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -38,13 +38,13 @@ set -g allow-passthrough on
38
38
  ```
39
39
 
40
40
  > [!IMPORTANT]
41
- > This package targets the beta OpenCode 2 TUI plugin API in `opencode2 v0.0.0-next-17444`. OpenCode may change this API before its stable release.
41
+ > This source targets stable `opencode v2.0.3`. The previous beta host is unsupported. See the [compatibility contract](../../docs/opencode-compatibility.md) for the exact dependency set and release requirements.
42
42
 
43
43
  ## Requirements
44
44
 
45
45
  - macOS
46
- - OpenCode 2 `v0.0.0-next-17444`
47
- - Bun, which OpenCode uses to load TypeScript plugin packages
46
+ - OpenCode `v2.0.3`
47
+ - The Bun-based OpenCode runtime; Bun 1.3.7 for workspace development
48
48
  - [`media-control`](https://github.com/ungive/media-control), recommended:
49
49
 
50
50
  ```sh
@@ -56,17 +56,19 @@ set -g allow-passthrough on
56
56
 
57
57
  ## Install
58
58
 
59
- Add the package to the `plugin` array in your global `~/.config/opencode/tui.jsonc` or project `.opencode/tui.jsonc`:
59
+ Add the package to `plugins` in your global `~/.config/opencode/cli.json` (or `$XDG_CONFIG_HOME/opencode/cli.json`):
60
60
 
61
61
  ```jsonc
62
62
  {
63
- "$schema": "https://opencode.ai/tui.json",
64
- "plugin": ["@naxodev/opencode-music-player"],
63
+ "$schema": "https://opencode.ai/v2/cli.json",
64
+ "plugins": ["@naxodev/opencode-music-player"],
65
65
  }
66
66
  ```
67
67
 
68
68
  OpenCode installs npm plugin packages and their production dependencies in its isolated cache. Restart OpenCode after changing the package entry.
69
69
 
70
+ This package requires the supported OpenCode Bun host. The host supplies the exact plugin API, OpenTUI, and Solid versions through its runtime resolver. The plugin API and OpenTUI are optional peers. Solid is required from the host but omitted from npm peer metadata because of an upstream peer-version conflict. Music-core and pngjs remain production dependencies. Standalone loading outside OpenCode is unsupported. Workspace development uses all four exact pins from the lockfile.
71
+
70
72
  ### Local checkout
71
73
 
72
74
  OpenCode imports local packages directly and does not install their dependencies. Install them first:
@@ -75,26 +77,23 @@ OpenCode imports local packages directly and does not install their dependencies
75
77
  git clone https://github.com/naxodev/ai.git
76
78
  cd ai
77
79
  bun install --frozen-lockfile
80
+ bun run --cwd packages/opencode-music-player build
78
81
  ```
79
82
 
80
83
  Then reference the absolute package path:
81
84
 
82
85
  ```jsonc
83
86
  {
84
- "$schema": "https://opencode.ai/tui.json",
85
- "plugin": ["/absolute/path/to/ai/packages/opencode-music-player"],
87
+ "$schema": "https://opencode.ai/v2/cli.json",
88
+ "plugins": ["/absolute/path/to/ai/packages/opencode-music-player/dist"],
86
89
  }
87
90
  ```
88
91
 
89
92
  ## Verify
90
93
 
91
- Start OpenCode and list active plugin IDs:
92
-
93
- ```sh
94
- opencode2 api get /api/plugin
95
- ```
94
+ The package precompiles JSX to JavaScript and keeps every package import external. `npm pack` builds the artifact automatically. Rebuild after source edits for local testing; the host watches the generated entrypoints.
96
95
 
97
- The response should include `music-player`. If it does not, inspect `~/.local/share/opencode/log/opencode.log` for package resolution or setup errors.
96
+ Start `opencode` and run `/plugins` in the TUI. The list should include `music-player`. CLI-only plugins do not appear in the server plugin API. Inspect `~/.local/share/opencode/log/opencode.log` for package resolution or setup errors.
98
97
 
99
98
  ## Controls
100
99
 
package/SUPPORT.md CHANGED
@@ -2,6 +2,6 @@
2
2
 
3
3
  Use [GitHub Discussions](https://github.com/naxodev/ai/discussions) for installation and usage questions.
4
4
 
5
- Use [GitHub Issues](https://github.com/naxodev/ai/issues) for reproducible defects and focused feature requests. Include your macOS version, `opencode2 --version`, package version, media backend, and relevant redacted logs.
5
+ Use [GitHub Issues](https://github.com/naxodev/ai/issues) for reproducible defects and focused feature requests. Include your macOS version, `opencode --version`, package version, media backend, and relevant redacted logs.
6
6
 
7
7
  Security reports must follow the workspace [security policy](../../SECURITY.md).