Dashboard › opencode › Distillation
97731064-c4f7-4280-beb2-a2a602f27518["lore_tm_v1_K0M-H4tMS6Sok9V9vhOSroWQyqdabG4ZQabDVUbBVHc"]
packages/opencode/test/internal.test.ts adds a regression test for parseUpstreamExtraHeaders("x-empty:\r\nx-team: platform\r\ninvalid"), expecting exactly [["x-empty", ""], ["x-team", "platform"]]; this verifies preservation of empty header values, CRLF parsing, whitespace trimming, and omission of a malformed line without changing legacy semantics.packages/opencode/test/package.test.ts is a new 62-line package/build test that invokes pnpm run build via execFileSync() and exercises the resulting package code with process.execPath.packages/opencode/test/server-runtime.test.ts exercises acquireServerRuntime("/workspace/project", ...), mocks resolveGateway, and covers gateway configurations including local gatewayBase: "http://127.0.0.1:3207" and remote gatewayBase: "https://gateway.example"; it also inspects generated headers.packages/opencode/test/server.test.ts mocks @loreai/core as { rewriteRequest } and supplies a mocked runtime whose dispose method is asynchronous.packages/opencode/test/server.test.ts scenarios use project directories /workspace/project and /workspace/b, verify registration of the "lore-curator" agent, exercise model-event handling and headers including "x-lore-session-id": "ses_1", and include a setup/registration failure expected to reject with "registration failed".http://127.0.0.1:3207, a session ID ses_1, and an agent value "build" in lifecycle/isolation scenarios.