Dashboard › opencode › Distillation
50e7f7bc-38dd-4af6-8d39-f7048616ea4b["lore_tm_v1_5YcQDuu9sfMMIZ3lY3pETIEArVmvfyBUw6LAqq3Yiyw","lore_tm_v1_zmPNWYt8j5eIa1QDRQ1VOWH3Iu8Vaz7ou2wjl04-wVE","lore_tm_v1_RrGGntaYgxIWCm07eUqEz634INn6dbqwNjD6Mfh-4tw","lore_tm_v1_n-T2n6sRr2gP1YlKLcK5QIfCQOCfqADsrngl73p8T6A","lore_tm_v1_2SBz65U1gSfgdbunjs2bXBprwHU4MxFwQ9p6Eys-9Fw","lore_tm_v1_m05tz64UeEHr70qxsf0o5SZa8GD5Vp7ChGjuP_WkGT4","lore_tm_v1_844SQzuWTXE8upDapRQy20G6ip7AJs_N6wijS4qlaZg","lore_tm_v1_t8LKZ0bmo0ZL60V3h3Gf36kuOowCX9H_XHvguLdcMEk","lore_tm_v1_RWFRW3UWb09fMU_ZxKW_9aHIm7uk3bll5J_QJ0FPKJM","lore_tm_v1_FTL2vG5Wc-NxlUhUeB-Pwx2VnQ1OvphTcCPY-Dw9U20","lore_tm_v1_7TKNRys-BvGEgKVYEK2NG0Z1fCK8w8xsPfRyY8hoRLM","lore_tm_v1_87wDUbav74LyjXcYcZlxBkqf2yASfoWRqVz4VgFoBRA","lore_tm_v1_H6eA-uVgaFMPrnWgK22Dk5KSjtrWQT6h6kX2s149Xk8","lore_tm_v1_mbvTbKJeloz445x-nvA5u570la1HgDU-2ZvFEiUWplc","lore_tm_v1_SaACeOGi7iEWWzwdWGvO8EaYHjPdQWHphbZv0ucO9NE","lore_tm_v1_qxtJBZjqNiJBtwUsCknRY4pIiixatmZ_bk0acaqnGeY","lore_tm_v1_pDhNXHqxsPpeZj02q3VDM45Rh0q4Tbnt7iL8E5KjnnM","lore_tm_v1_j3NfE17TG4yr036sLKmqUFZPNPUwrAtpQrjnsHKIYdM","lore_tm_v1_qpmC53gl-pPqK6AFFJOZCOFKlv8Th7cb_4ORRiYINpo","lore_tm_v1_HGWsobRL6W8m-vy_d137Qun__1rBIxeIYJJ9qBcybW4","lore_tm_v1_v-HPKp96f699_rNwI8pEqvZ2dJByf0HQbKO9GO_Q7Kk","lore_tm_v1_81JQWLwXTgzP6Ge-TOqZaESNzuhnciWVXNFM8QsyIno","lore_tm_v1_xBt1WSUmJimZ8eNpAvigxlvPLCEP-SBTJuaoTuMAiZg","lore_tm_v1_SJfyF6cqBmPgYt03c12qRPFxitrlbkc4byXqiRQSzpw","lore_tm_v1_bbM-y0pnSsJ4L37HVpfFSL3GngrSWADm9GOz1f3gex0","lore_tm_v1_ax7W3o6mnTFLNhUuhrtzEHBJxAOEV9md8mmd_6UPS6M","lore_tm_v1_39Fj-LO2F-rWvsSGsD1cZpGSV1qofM_sVDqv3q5Si5s","lore_tm_v1_35q1y-lrtVP1NtUmOyOxm2NfurKB-ZaFKxIbsJopgDA","lore_tm_v1_TF7EKSdN3ndsKoJ5BQpbBKnXSe0U_xLB_oFmHV30dcM","lore_tm_v1_yBwJYcOvY2hfAjPXGPtGOonNXlIp9zxu_LBgtM22w0g","lore_tm_v1_NedaAEFKphffhGP6eblZU12sna8UtzzbrMoHfsgiWuM","lore_tm_v1_JeKdq-0mnlgRXWkwymSyhnngn_x9pdI8Slj36fCvLnI"]
/home/byk/Code/opencode-v2-pilot/packages/cli/src/commands/handlers/plugin/inventory.ts defines Item with runtime: "Server" | "TUI", target, name, optional version, outdated, and optional error. inspect(selected?) obtains the service endpoint, calls client.plugin.list({ location: { directory: process.cwd() } }), checks server package plugins through client.plugin.check(...) when applicable, and reports failed server state via plugin.state.error.info.plugins, excluding targets beginning with -, equal to *, ending in .*, or beginning with opencode.; retains installable targets accepted by Npm.isInstallablePackage; resolves versions with npm.resolve(target); checks updates with npm.check(target) concurrently using { concurrency: "unbounded" }; and renders failed checks using Cause.pretty(outdated.cause). A selected target producing no server or TUI items fails with Plugin is not configured: ${selected}.displayVersion(version) in /home/byk/Code/opencode-v2-pilot/packages/cli/src/commands/handlers/plugin/inventory.ts shortens exact 40- or 64-character hexadecimal versions to 7 characters. format(items) groups output in "Server" then "TUI" order and renders each item as name version (check failed|update available|current)./home/byk/Code/opencode-v2-pilot/packages/schema/src/config/provider.ts models provider request overlays as optional headers and body; provider/model overlays include optional settings, headers, and body. Config.Provider.Info supports optional compaction, canonical, name, env, package, overlays, and models, but no baseURL or headerTimeout fields were shown in this V2 schema./home/byk/Code/opencode-v2-pilot/packages/cli/src/node/target.ts supports executable targets for darwin, linux, and win32, each on arm64 or x64; unsupported pairs throw Unsupported Node executable target: ${platform}-${arch}. It selects platform-specific @lydell/node-pty-*, @parcel/watcher-*, @ff-labs/fff-bin-*, and @yuuang/ffi-rs-* packages/assets; Linux uses -glibc/-gnu, Windows FFI uses -msvc, and opencodePtyAsset is undefined only on Windows.nodeExecArgv = ["--experimental-ffi", "--use-system-ca", "--disable-warning=ExperimentalWarning"]. Bundled WASM assets are @silvia-odwyer/photon-node/photon_rs_bg.wasm, web-tree-sitter/tree-sitter.wasm, tree-sitter-bash/tree-sitter-bash.wasm, and tree-sitter-powershell/tree-sitter-powershell.wasm; attention audio includes bip-bop-01.mp3, bip-bop-03.mp3, staplebops-06.mp3, nope-03.mp3, and yup-01.mp3./home/byk/Code/opencode-v2-pilot/packages/plugin-browser/package.json identifies @opencode/plugin-browser version 0.0.0 as “OpenCode's desktop browser plugin”; exports ., ./rpc, and ./proxy from TypeScript sources; publishes only dist; builds with tsc -p tsconfig.build.json; typechecks with tsgo --noEmit -p tsconfig.test.json; tests with bun test; and depends on @opencode/plugin, @opencode/schema, and effect./home/byk/Code/opencode-v2-pilot/packages/util/src/npm.ts defines resolved package metadata as directory, name, optional version, and optional revision. Its NPM service supports add, resolve, check, update, and which; add/update can fail with NpmInstallFailedError or EffectFlock.LockError, while check can fail with NpmInstallFailedError./home/byk/Code/opencode-v2-pilot/package.json uses packageManager: "bun@1.4.2". Multiple subpackages specify Node >=22, while services/www specifies Node >=22.12./home/byk/Code/opencode-lore/packages/core/src/fetch-interceptor.ts wraps globalThis.fetch and injects dynamic per-request headers while preserving original provider auth and URL context. Its recognized endpoint patterns cover /v1/..., /api/v1/..., /api/..., /openai/v1/..., /anthropic/v1/..., and /codex/responses; protocol gateway paths are Anthropic → /v1/messages, OpenAI Chat → /v1/chat/completions, and OpenAI Responses → /v1/responses, with /codex/responses rewritten to /v1/codex/responses.ArrayBuffer, or typed-array bodies without consuming them, but cannot inspect streaming bodies or bodies available only on a Request; those fall through to a warn-once path. Endpoint suffix detection is ordered longest-first: 1. /chat/completions, 2. /codex/responses, 3. /responses, 4. /messages./home/byk/Code/opencode-lore/packages/core/dist/{bun,node,types} and 11 gateway outputs under /home/byk/Code/opencode-lore/packages/gateway/dist: bin.cjs, embedding-worker.cjs, embedding-worker.js, index.bun.js, index.cjs, index.cjs.map, index.d.cts, ort-wasm-simd-threaded.mjs, ort-wasm-simd-threaded.wasm, vector-worker.cjs, and vector-worker.js.DEFAULT_BASE_URL = "https://api.anthropic.com/v1", PATH = "/messages", and DEFAULT_MAX_TOKENS = 32_000; OpenAI Chat uses DEFAULT_BASE_URL = "https://api.openai.com/v1" and PATH = "/chat/completions"; Open Responses uses PATH = "/responses". Provider-specific variants include Moonshot and MiniMax Anthropic endpoints under /anthropic/v1/messages.session.model.request and session.http.request hooks expose session, agent, model/provider, and final Request data, allowing exact upstream URL/path preservation without Lore’s legacy config hook or process-wide fetch patch; the port must also replace obsolete compaction, agent, parent-session, toast, and TUI assumptions./home/byk/Code/opencode-v2-pilot/packages/core/src/session/compaction.ts defaults to { auto: true, buffer: DEFAULT_BUFFER, tokens: DEFAULT_KEEP_TOKENS }; its editor’s configure(settings) independently updates auto, buffer, and tokens. Automatic compaction exits when config.auto is false and computes thresholds using config.buffer."coder" or "code" are always a normal turn."title", "summary", "summarize", "categorize", "label", or "classify" are always passthrough./home/byk/Code/opencode-lore/packages/gateway/src/compaction.ts uses authoritative x-lore-agent matching before heuristic scoring in isMetaRequest(req): primary agents return false, meta agents return true, and unknown agents fall through. Compaction requests are handled separately and return false from isMetaRequest.2 worth 3 points; messages ≤ 2 worth 3; system length < 500 chars worth 2; maxTokens from 1 through 300 worth 3; meta keywords worth 2; threshold 8; and keyword scanning only when the system prompt is at most 2000 chars. Keywords include "generate a title", "generate a short title", "title for the conversation", "title for this conversation", "summarize this conversation", "summarize the conversation", "conversation summary", "categorize", "classify this", and "label this".session.model.request hook also sees title-generation attempts: /home/byk/Code/opencode-v2-pilot/packages/core/test/session-title.test.ts verifies fallback from small model title-small variant "low" to primary model title-model variant "high" after "Small model unavailable", with the hook observing both model requests in order and the resulting title "Generated Title".Npm.isInstallablePackage(pkg) in /home/byk/Code/opencode-v2-pilot/packages/util/src/npm.ts accepts any package target parsed as registry or git. Registry targets allow npm-package-arg types version, range, or tag; git targets track whether a commit is pinned. Registry targets are mutable unless an exact version is used, and git targets are mutable unless gitCommittish is a commit.git-${slug}-${sha256(pkg).slice(0, 12)} for git targets, sanitized ${name}@${spec} for registry targets, and sanitized raw input otherwise. Retention constants are 7 * 24 * 60 * 60 * 1_000 ms for normal cache generations and 60 * 60 * 1_000 ms for staging.