cloudaxe-opencode/packages/opencode/test/plugin
Kit Langton 6833070a57 fix(server): project /config response to JSON-safe at the HTTP boundary
Mirrors #26550 (Provider.toPublicInfo): internal runtime objects may
legitimately carry function/symbol/bigint/undefined values, but the
HTTP API contract is JSON-safe data matching the typed schema.

Plugin `config:` hooks are documented to mutate cfg in place
(registering agents/providers); that contract is preserved. The
projection happens in ConfigHttpApi.get only, so internal consumers
keep raw cfg and HTTP clients see a clean response.

Active reproducer asserts the actual product invariant — GET /config
returns a JSON-safe body even when a plugin attached a function to
cfg. Three trigger-output reproducers stay skipped: per-hook design
needed because the documented mutation contract makes a blanket
clone unsafe and `tool.parameters` is a live Effect Schema with
function-valued own keys that recursive in-place scrub would corrupt.
2026-05-09 15:08:55 -04:00
..
auth-override.test.ts fix(instance): run bootstrap from instance store (#25475) 2026-05-02 19:33:38 -04:00
cloudflare.test.ts fix(opencode): drop max_tokens for OpenAI reasoning models on Cloudflare AI Gateway (#22864) 2026-04-16 15:01:21 -05:00
codex.test.ts fix: add ChatGPT-Account-Id header for organization subscriptions (#7603) 2026-01-10 07:50:24 -06:00
github-copilot-models.test.ts fix(copilot): ensure available variants sync from api (#24734) 2026-04-28 14:58:51 -05:00
install-concurrency.test.ts refactor: remove module barrels (#24554) 2026-04-27 14:33:33 -04:00
install.test.ts refactor: remove module barrels (#24554) 2026-04-27 14:33:33 -04:00
loader-shared.test.ts fix(instance): run bootstrap from instance store (#25475) 2026-05-02 19:33:38 -04:00
meta.test.ts refactor: remove module barrels (#24554) 2026-04-27 14:33:33 -04:00
mutation-repro.test.ts fix(server): project /config response to JSON-safe at the HTTP boundary 2026-05-09 15:08:55 -04:00
shared.test.ts fix(plugin): parse package specifiers with npm-package-arg and sanitize win32 cache paths (#21135) 2026-04-06 00:26:40 +00:00
trigger.test.ts test: use testEffect for plugin triggers (#25053) 2026-04-30 14:24:53 -04:00
workspace-adapter.test.ts feat(core): copy file changes when warping (#26190) 2026-05-07 10:24:17 -04:00