nexus/packages/adapters/opencode-local
John Wessel 2aa607c828
fix(opencode-local): resolve HOME from os.userInfo() for model discovery
When Paperclip's server is started via `runuser -u node` (common in
Docker/Fly.io deployments), the HOME environment variable retains the
parent process's value (e.g. /root) instead of the target user's home
directory (/home/node). This causes `opencode models` to miss provider
auth credentials stored under the actual user's home, resulting in
"Configured OpenCode model is unavailable" errors for providers that
require API keys (e.g. zai/zhipuai).

Fix: use `os.userInfo().homedir` (reads from /etc/passwd, not env) to
ensure the child process always sees the correct HOME, regardless of
how the server was launched.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-17 12:58:13 -04:00
..
src fix(opencode-local): resolve HOME from os.userInfo() for model discovery 2026-03-17 12:58:13 -04:00
CHANGELOG.md chore: release v0.3.1 2026-03-12 13:09:22 -05:00
package.json chore: release v0.3.1 2026-03-12 13:09:22 -05:00
tsconfig.json Fix root TypeScript solution config 2026-03-09 14:09:30 -05:00
vitest.config.ts Add OpenCode provider integration and strict model selection 2026-03-05 15:24:20 +01:00