@naxodev/opencode-music-player 0.2.5 → 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 +17 -14
- package/SUPPORT.md +1 -1
- package/dist/index.js +2272 -0
- package/dist/tui.js +1 -0
- package/package.json +29 -21
- package/artwork-placement.ts +0 -169
- package/artwork.ts +0 -424
- package/artwork.tsx +0 -246
- package/index.tsx +0 -476
- package/kitty-graphics.ts +0 -105
- package/system-media.ts +0 -571
- package/tmux-offset.ts +0 -120
- package/tui.tsx +0 -1
- package/types.ts +0 -143
- package/ui.tsx +0 -695
- package/waveform.tsx +0 -205
package/README.md
CHANGED
|
@@ -16,6 +16,10 @@ Read the [music session architecture field guide](../../docs/music-session-archi
|
|
|
16
16
|
|
|
17
17
|
The daemon performs the bounded native `media-control get --now` read and validates the complete recording identity before and after the read. OpenCode uses those bytes when available, then keeps iTunes Search fallback, image downloads, conversion, cache/job ownership, and terminal rendering locally. Artwork failure never blocks playback state.
|
|
18
18
|
|
|
19
|
+
Catalog matching, bounded downloads, cancellation, and transient retries use the [shared host-side acquisition policy](../music-core/README.md#host-side-catalog-artwork). OpenCode keeps image conversion and its shared presentation cache/jobs. Track changes remove only the changing view's interest; another view can keep the same job alive.
|
|
20
|
+
|
|
21
|
+
Run `/music-artwork`, or select **Music → Refresh artwork** in the command palette, to recover artwork for the current track after connectivity returns. Automatic recovery stops after three transient attempts. A settled mismatch does not retry on playback snapshots. Refresh starts a new bounded attempt set; repeated refreshes while a job is active share that job. This action does not change playback.
|
|
22
|
+
|
|
19
23
|
Ghostty and other terminals with Kitty graphics support display the cover as a native image. Other terminals receive a true-color half-block rendering of the same cover.
|
|
20
24
|
|
|
21
25
|
Terminal multiplexers must pass Kitty graphics through to use native images. The player uses the half-block rendering when the host does not expose that support.
|
|
@@ -34,13 +38,13 @@ set -g allow-passthrough on
|
|
|
34
38
|
```
|
|
35
39
|
|
|
36
40
|
> [!IMPORTANT]
|
|
37
|
-
> This
|
|
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.
|
|
38
42
|
|
|
39
43
|
## Requirements
|
|
40
44
|
|
|
41
45
|
- macOS
|
|
42
|
-
- OpenCode
|
|
43
|
-
- Bun
|
|
46
|
+
- OpenCode `v2.0.3`
|
|
47
|
+
- The Bun-based OpenCode runtime; Bun 1.3.7 for workspace development
|
|
44
48
|
- [`media-control`](https://github.com/ungive/media-control), recommended:
|
|
45
49
|
|
|
46
50
|
```sh
|
|
@@ -52,17 +56,19 @@ set -g allow-passthrough on
|
|
|
52
56
|
|
|
53
57
|
## Install
|
|
54
58
|
|
|
55
|
-
Add the package to
|
|
59
|
+
Add the package to `plugins` in your global `~/.config/opencode/cli.json` (or `$XDG_CONFIG_HOME/opencode/cli.json`):
|
|
56
60
|
|
|
57
61
|
```jsonc
|
|
58
62
|
{
|
|
59
|
-
"$schema": "https://opencode.ai/
|
|
60
|
-
"
|
|
63
|
+
"$schema": "https://opencode.ai/v2/cli.json",
|
|
64
|
+
"plugins": ["@naxodev/opencode-music-player"],
|
|
61
65
|
}
|
|
62
66
|
```
|
|
63
67
|
|
|
64
68
|
OpenCode installs npm plugin packages and their production dependencies in its isolated cache. Restart OpenCode after changing the package entry.
|
|
65
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
|
+
|
|
66
72
|
### Local checkout
|
|
67
73
|
|
|
68
74
|
OpenCode imports local packages directly and does not install their dependencies. Install them first:
|
|
@@ -71,26 +77,23 @@ OpenCode imports local packages directly and does not install their dependencies
|
|
|
71
77
|
git clone https://github.com/naxodev/ai.git
|
|
72
78
|
cd ai
|
|
73
79
|
bun install --frozen-lockfile
|
|
80
|
+
bun run --cwd packages/opencode-music-player build
|
|
74
81
|
```
|
|
75
82
|
|
|
76
83
|
Then reference the absolute package path:
|
|
77
84
|
|
|
78
85
|
```jsonc
|
|
79
86
|
{
|
|
80
|
-
"$schema": "https://opencode.ai/
|
|
81
|
-
"
|
|
87
|
+
"$schema": "https://opencode.ai/v2/cli.json",
|
|
88
|
+
"plugins": ["/absolute/path/to/ai/packages/opencode-music-player/dist"],
|
|
82
89
|
}
|
|
83
90
|
```
|
|
84
91
|
|
|
85
92
|
## Verify
|
|
86
93
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
```sh
|
|
90
|
-
opencode2 api get /api/plugin
|
|
91
|
-
```
|
|
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.
|
|
92
95
|
|
|
93
|
-
The
|
|
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.
|
|
94
97
|
|
|
95
98
|
## Controls
|
|
96
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, `
|
|
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).
|