You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
OpenCode native plugin for auto-discovery of installed harnesses #17
src/main/installer/index.ts discovers harnesses via which() then falls back to the npm-global root. On macOS when the user installed via Homebrew the claude binary lives in /opt/homebrew/bin — already on PATH for most users but not in npm-global. On Linux with NVM-flipping users, the resolution gets fragile.
OpenCode reads ~/.config/opencode/opencode.json for everything: providers, plugins, MCP servers. It supports installing community plugins via the plugin[] array. A small OpenCode plugin installed via opencode plugin install @hoist/discover could run at OpenCode's startup and:
Read /usr/bin/env + ~/.bashrc/~/.zshrc paths to discover installed harness binaries
Compare against the hoist catalog (src/main/providers/harnesses.ts shape)
Report back to hoist via a local Unix socket or ~/.cache/hoist/discovery.json
This is an OpenCode-side affordance, not hoist-side — but it's the cleanest way to feed accurate detection back into the GUI's "Installed · v2.1.204" cards.
Scope
New repo under packages/opencode-plugin-hoist/ (or just in src/opencode-plugin/ until we publish).
Small plugin with no deps: spawns which for each catalog binary, writes ~/.cache/hoist/discovery.json with { path, version } per tool.
installer/discoverInstalled() reads that file first (if newer than 5 minutes), then falls back to the current which + npm-global probe.
Renderer keeps showing the discovered status without a UI change.
CLI hoist install/hoist list picks it up via the same shared discoverInstalled.
Acceptance criteria
Installing the OpenCode plugin populates ~/.cache/hoist/discovery.json within 200 ms of OpenCode startup.
If plugin isn't installed, behavior is identical to today (which + npm-global).
discoverInstalled reads the cache file when present and fresh, otherwise falls back.
Plugin is small (< 200 lines of TS, no runtime deps).
agent claim: agent/issue-17-opencode-discovery @ b01234d. Scope this run: app side only - OpenCode discovery plugin under src/opencode-plugin/ plus cache-aware discoverInstalled in src/main/installer/. CLI parity stays a separate PR (independent release flow).
App-side slice up in #53 (plugin + cache-aware discoverInstalled, ci:app green, mocked-layout proof on the PR). CLI parity in cli/src/lib/harnesses.ts remains for a separate CLI PR, so this issue stays open.
App-side slice merged in #53 (merge commit 141783e on main) after a rebase over #48, #50 and #52. What remains on this issue is CLI parity only - cli/src/lib/harnesses.ts reading the same ~/.cache/hoist/discovery.json before its probe, as a separate CLI PR under the independent CLI release flow. The agent label stays on, but there is no open agent branch behind it now, so the next run can claim the CLI slice fresh.
agent claim: ao/hoist-development/agent-issue-17-cli-discovery @ 141783e. Remaining CLI-only slice: read the existing OpenCode discovery cache before PATH/npm probes, preserve fallback behaviour and prove it with fixture-backed tests and a built CLI transcript. App and release flows stay unchanged.
Remaining CLI slice is pushed in #54 (7d91d20). Fresh plugin cache now feeds CLI discovery, stale/invalid entries retain PATH/npm fallback, and installs read the live version. mise run ci:cli passed with 25 tests; the PR includes a compiled-binary fixture transcript proving cache hits launch no tools and stale/absent cache falls back. This is the current open agent PR; leave #17 open until its Closes #17 merges.
Activity
johnnyhuy commentedon Nov 9, 2026
agent claim: agent/issue-17-opencode-discovery @ b01234d. Scope this run: app side only - OpenCode discovery plugin under src/opencode-plugin/ plus cache-aware discoverInstalled in src/main/installer/. CLI parity stays a separate PR (independent release flow).
johnnyhuy commentedon Nov 9, 2026
App-side slice up in #53 (plugin + cache-aware discoverInstalled, ci:app green, mocked-layout proof on the PR). CLI parity in cli/src/lib/harnesses.ts remains for a separate CLI PR, so this issue stays open.
johnnyhuy commentedon Nov 9, 2026
App-side slice merged in #53 (merge commit 141783e on main) after a rebase over #48, #50 and #52. What remains on this issue is CLI parity only - cli/src/lib/harnesses.ts reading the same ~/.cache/hoist/discovery.json before its probe, as a separate CLI PR under the independent CLI release flow. The agent label stays on, but there is no open agent branch behind it now, so the next run can claim the CLI slice fresh.
johnnyhuy commentedon Nov 10, 2026
agent claim: ao/hoist-development/agent-issue-17-cli-discovery @ 141783e. Remaining CLI-only slice: read the existing OpenCode discovery cache before PATH/npm probes, preserve fallback behaviour and prove it with fixture-backed tests and a built CLI transcript. App and release flows stay unchanged.
johnnyhuy commentedon Nov 10, 2026
Remaining CLI slice is pushed in #54 (7d91d20). Fresh plugin cache now feeds CLI discovery, stale/invalid entries retain PATH/npm fallback, and installs read the live version. mise run ci:cli passed with 25 tests; the PR includes a compiled-binary fixture transcript proving cache hits launch no tools and stale/absent cache falls back. This is the current open agent PR; leave #17 open until its Closes #17 merges.