@naxodev/opencode-music-player 0.2.6 → 0.3.1
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 +15 -15
- package/SUPPORT.md +1 -1
- package/dist/index.js +2257 -0
- package/dist/tui.js +1 -0
- package/package.json +28 -20
- package/artwork-placement.ts +0 -169
- package/artwork.ts +0 -240
- package/artwork.tsx +0 -246
- package/index.tsx +0 -493
- package/kitty-graphics.ts +0 -105
- package/system-media.ts +0 -593
- package/tmux-offset.ts +0 -120
- package/tui.tsx +0 -1
- package/types.ts +0 -144
- package/ui.tsx +0 -695
- package/waveform.tsx +0 -205
package/README.md
CHANGED
|
@@ -8,7 +8,7 @@ It supports browsers, Spotify, Apple Music, Kaset, and other apps exposed throug
|
|
|
8
8
|
|
|
9
9
|
One reconnecting music-session client supplies replayed and live state, provider status, transport, and daemon-owned native artwork bytes. The shared same-user daemon owns provider discovery, provider events and polling, the playback clock, and global transport ordering.
|
|
10
10
|
|
|
11
|
-
OpenCode keeps plugin/controller lifecycle, the Solid compact and sidebar UI,
|
|
11
|
+
OpenCode keeps plugin/controller lifecycle, the Solid compact and sidebar UI, transport loading feedback, seek coalescing, notifications, waveform projection, iTunes catalog fallback and downloads, conversion, bounded presentation cache/jobs, and Kitty or half-block rendering. Plugin disposal removes local listeners and presentation work, then disposes only its session client. Other clients keep the shared daemon alive.
|
|
12
12
|
|
|
13
13
|
Read the [music session architecture field guide](../../docs/music-session-architecture.html) for the daemon protocol, replay, reconnect, and cleanup model.
|
|
14
14
|
|
|
@@ -38,13 +38,12 @@ set -g allow-passthrough on
|
|
|
38
38
|
```
|
|
39
39
|
|
|
40
40
|
> [!IMPORTANT]
|
|
41
|
-
> This
|
|
41
|
+
> This source targets the exact stable host in the [validated compatibility metadata](../../docs/package-compatibility.md). The previous beta host is unsupported. See the [compatibility contract](../../docs/opencode-compatibility.md) for runtime ownership and release requirements.
|
|
42
42
|
|
|
43
43
|
## Requirements
|
|
44
44
|
|
|
45
45
|
- macOS
|
|
46
|
-
- OpenCode
|
|
47
|
-
- Bun, which OpenCode uses to load TypeScript plugin packages
|
|
46
|
+
- The exact tested OpenCode host and workspace Bun pin listed in the compatibility metadata
|
|
48
47
|
- [`media-control`](https://github.com/ungive/media-control), recommended:
|
|
49
48
|
|
|
50
49
|
```sh
|
|
@@ -56,17 +55,19 @@ set -g allow-passthrough on
|
|
|
56
55
|
|
|
57
56
|
## Install
|
|
58
57
|
|
|
59
|
-
Add the package to
|
|
58
|
+
Add the package to `plugins` in your global `~/.config/opencode/cli.json` (or `$XDG_CONFIG_HOME/opencode/cli.json`):
|
|
60
59
|
|
|
61
60
|
```jsonc
|
|
62
61
|
{
|
|
63
|
-
"$schema": "https://opencode.ai/
|
|
64
|
-
"
|
|
62
|
+
"$schema": "https://opencode.ai/v2/cli.json",
|
|
63
|
+
"plugins": ["@naxodev/opencode-music-player"],
|
|
65
64
|
}
|
|
66
65
|
```
|
|
67
66
|
|
|
68
67
|
OpenCode installs npm plugin packages and their production dependencies in its isolated cache. Restart OpenCode after changing the package entry.
|
|
69
68
|
|
|
69
|
+
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.
|
|
70
|
+
|
|
70
71
|
### Local checkout
|
|
71
72
|
|
|
72
73
|
OpenCode imports local packages directly and does not install their dependencies. Install them first:
|
|
@@ -75,29 +76,28 @@ OpenCode imports local packages directly and does not install their dependencies
|
|
|
75
76
|
git clone https://github.com/naxodev/ai.git
|
|
76
77
|
cd ai
|
|
77
78
|
bun install --frozen-lockfile
|
|
79
|
+
bun run --cwd packages/opencode-music-player build
|
|
78
80
|
```
|
|
79
81
|
|
|
80
82
|
Then reference the absolute package path:
|
|
81
83
|
|
|
82
84
|
```jsonc
|
|
83
85
|
{
|
|
84
|
-
"$schema": "https://opencode.ai/
|
|
85
|
-
"
|
|
86
|
+
"$schema": "https://opencode.ai/v2/cli.json",
|
|
87
|
+
"plugins": ["/absolute/path/to/ai/packages/opencode-music-player/dist"],
|
|
86
88
|
}
|
|
87
89
|
```
|
|
88
90
|
|
|
89
91
|
## Verify
|
|
90
92
|
|
|
91
|
-
|
|
93
|
+
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
94
|
|
|
93
|
-
|
|
94
|
-
opencode2 api get /api/plugin
|
|
95
|
-
```
|
|
96
|
-
|
|
97
|
-
The response should include `music-player`. If it does not, inspect `~/.local/share/opencode/log/opencode.log` for package resolution or setup errors.
|
|
95
|
+
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
96
|
|
|
99
97
|
## Controls
|
|
100
98
|
|
|
99
|
+
Play/pause uses the shared [playback toggle contract](../music-core/README.md#playback-toggle-contract). Each activation toggles the daemon's accepted state in queue order, even when this view's icon is stale. Rapid clicks remain separate commands.
|
|
100
|
+
|
|
101
101
|
The compact bar appears below the active route whenever a current track exists, including while playback is paused. It remains visible when the session sidebar is collapsed. Wide terminals show the playback marker, title, and artist. Medium terminals omit the artist. Narrow terminals truncate the title, then keep only the playback marker when metadata cannot fit safely. The bar always stays on one row.
|
|
102
102
|
|
|
103
103
|
| Input | Action |
|
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).
|