Dashboard › opencode › Distillation
71a7ac57-008b-4a35-a945-5fc0e467643a["lore_tm_v1_XbaWE8JJLCyRF8ZapFPCcMdo0V4it83PvQh99zazrjY","lore_tm_v1_44MMi-HtNK0NukZrozwoMxkEBcGlnd-sWrutbStP1NI","lore_tm_v1_JDt2xMtk1fl-RY0dbfTgvge-WCQiTTaD-hijB0-Jffs","lore_tm_v1_aevpcMAWfPajnqcyQGFes0lPEYzK6wk3NOzzRl_mhzc","lore_tm_v1_JK2DbJOCxFVaDAYbRGQFWEwJFpazfp9nZDCErnkAx9o","lore_tm_v1_6HvV6E_cq8BtQM6YVtvJjnmMGs76w_C_gdTehKkvStE","lore_tm_v1_QD5wykC8J_mUmkTgfNnfny0EiibZKF8rLnhdPG4Vx9M","lore_tm_v1_dmJVbejM498gqpXAyGk4omsrLy0jSwoLadJ8b4J8YTY"]
/home/byk/Code/opencode-v2-pilot/packages/plugin/test/host.test.ts uses fixture source throw new Error("Plugin code must not run during resolution") for every entrypoint so any evaluation during Host.resolve causes test failure./home/byk/Code/opencode-v2-pilot/packages/plugin/test/host.test.ts defines fixture(files: Record<string, string>, installed = false), creating a temporary opencode-host-* directory; installed fixtures use node_modules/@fixture/plugin, return file URLs via pathToFileURL, and recursively delete the root through [Symbol.asyncDispose].Host.resolve tests in /home/byk/Code/opencode-v2-pilot/packages/plugin/test/host.test.ts verify a directory without package.json resolves conventional index.ts, tui.tsx, and rpc.ts as server, tui, and rpc.Host.resolve tests verify a TUI-only directory containing only tui.tsx resolves { server: undefined, tui: <tui.tsx URL>, rpc: undefined }.Host.resolve tests verify installed packages without exports use either default index.js or package.json field main: "lib/backend.js" for the server, while conventionally resolving tui.js and rpc.js.Host.resolve tests verify local packages with package.json but no exports conventionally resolve index.js, tui.js, and rpc.js.Host.resolve tests verify package exports { ".": "./dist/root.js", "./server": "./dist/backend.js", "./tui": "./dist/terminal.js", "./rpc": "./dist/contract.js" } resolve the explicit ./server export instead of root, plus the explicit TUI and RPC exports.Host.resolve tests verify conditional exports prefer import over require: root resolves ./dist/server.mjs rather than ./dist/server.cjs, TUI resolves ./dist/tui.mjs rather than ./dist/tui.cjs, and RPC remains undefined.Host.resolve tests verify an installed package exporting only "./tui": "./dist/terminal.js" does not fall back to unexported index.js, server.js, or rpc.js; result is { server: undefined, tui: <dist/terminal.js URL>, rpc: undefined }.Host.resolve tests verify an exported path whose file is missing, such as "./tui": "./missing.js", is not returned; result is { server: undefined, tui: undefined, rpc: undefined }./home/byk/Code/opencode-v2-pilot/packages/core/test/session-model-request-hooks.test.ts defines KINDS: ReadonlyArray<SessionRequestKind> = ["primary", "compaction", "title", "generate"] and verifies every kind emits both http.request and http.response plugin hooks in that order, each carrying agent Agent.ID.make("build").ses_hook_kind, project Project.ID.global, directory /project, model gpt-5.5 from provider test, capabilities { tools: true, input: ["text"], output: ["text"] }, context limit 200_000, output limit 32_000, and an HTTP POST to https://example.test/v1/chat/completions returning status 200./home/byk/Code/opencode-v2-pilot/packages/core/test/session-model-request.test.ts verifies unsupportedParts() replaces unsupported user image and PDF media with visible text errors: ERROR: Cannot read "logo.png" (this model does not support image input). Inform the user. and ERROR: Cannot read "document.pdf" (this model does not support pdf input). Inform the user.unsupportedParts() also replaces unsupported image files nested inside ToolResultPart content while preserving adjacent text, and preserves image media unchanged when model input capabilities include "image".boundImages() preserves images below its trigger; for three images of exactly 9 * 1024 * 1024 characters each, it replaces the oldest two with text and retains third.png as media.boundImages() handles images nested in tool results; for two images of exactly 13 * 1024 * 1024 characters each, it replaces first.png with text and retains second.png as a file./home/byk/Code/opencode-v2-pilot/packages/plugin/src/promise/registration.ts defines Registration with readonly dispose: () => Promise<void>./home/byk/Code/opencode-v2-pilot/packages/plugin/src/promise/registration.ts defines ModelHookOptions with optional readonly providerID?: string; this limits a hook to one provider, while unscoped hooks apply to every provider.Hooks<Spec> registers a callback (input: Spec[Name]) => Promise<void> | void and returns Promise<Registration>.ModelHooks<Spec> has the same callback and return shape, with conditional options?: Spec[Name] extends { readonly model: unknown } ? ModelHookOptions : never, so provider scoping is available only for hooks whose event has a model.Transform<Input> is (callback: (input: Input) => void) => Promise<Registration>./home/byk/Code/opencode-v2-pilot/packages/core/src/config/normalize.ts imports ConfigCompaction from @opencode/schema/config/compaction and normalizes compaction configuration around lines 324β374.compaction.tail_turns and compaction.prune as unsupported when present.compaction.auto using ConfigCompaction.Info.fields.auto.compaction.preserve_recent_tokens to native compaction.keep.tokens, decoding with ConfigCompaction.Keep.fields.tokens; if compaction.keep is present but is not a record, it records an invalid diagnostic.prefer(legacyTokens, nativeTokens, ["compaction", "keep", "tokens"], diagnostics).compaction.reserved to native compaction.buffer, decoding both with ConfigCompaction.Info.fields.buffer and combining them through prefer(legacyBuffer, nativeBuffer, ["compaction", "buffer"], diagnostics).encoded.compaction = result when the normalized result has fields or the input compaction object was explicitly empty.