paperclip/packages/adapters/opencode-local
Jannes Stubbemann 6eeb8039e9 fix(opencode-local): browser-safe modelProfiles env access + note on invalid PAPERCLIP_OPENCODE_PROVIDERS
Two fixes on the gateway-routing PR:

- index.ts is shared client/server code (the UI imports it for
  DEFAULT_OPENCODE_LOCAL_MODEL et al.), but buildOpenCodeModelProfiles()
  defaulted its env parameter to a bare `process.env` evaluated at module
  load. Under the e2e lane the UI is served through Vite dev middleware,
  which does not rewrite `process.env`, so the browser threw
  "ReferenceError: process is not defined" at module evaluation and the
  entire app failed to render — breaking every UI e2e spec. Guard with
  `typeof process` and fall back to an empty env.

- parseProviderConfig() silently swallowed JSON.parse failures of
  PAPERCLIP_OPENCODE_PROVIDERS, making a misconfigured value
  undiagnosable. It now appends a note ("contains invalid JSON" /
  "is not a JSON object") so the skipped provider block is visible in the
  run notes. Tests cover both malformed-JSON and non-object values.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-06-10 11:41:57 +02:00
..
src fix(opencode-local): browser-safe modelProfiles env access + note on invalid PAPERCLIP_OPENCODE_PROVIDERS 2026-06-10 11:41:57 +02:00
CHANGELOG.md chore: release v0.3.1 2026-03-12 13:09:22 -05:00
package.json fix: add npm provenance package metadata 2026-03-17 16:01:48 -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