Dashboard › opencode › Distillation
20b87bab-f1be-42c5-ad67-5c85f2eabe89["lore_tm_v1_JQlRfHxqbIgjbNOn26iGhT6I0pH-8gTIcd-HKlSIW2s","lore_tm_v1_4jiWtX1jVLusN5qin4jVwRnH7Glp42kATbQyEpWUWyE","lore_tm_v1_bQsb20woNQ6a2q2-w9z9L8RVEseSDDOAZzW6occMIq4","lore_tm_v1_kXKpgEKDkO2zj0EjU9kghzLXsQ8jTXS67MdhwPXoxcM","lore_tm_v1_z28eh7hOy5JbYH8kM2_VM46AewBNdfpzxETZE8Fix4Q","lore_tm_v1_ZRcWlwy8q0Y4czIYX01O1Q9oUrVsrIf-73X0Z8gQ53M","lore_tm_v1_Y6m-NhzxhDcB-2v36d7406usGwnwOx6SZ2z4QC5X_FM","lore_tm_v1_EPq-lf77c88H6UVGrDj8vHr-VE0vFpl-uvSUL5DVVcg"]
/home/byk/Code/opencode/packages/opencode/src/acp/service.ts: SetSessionModelRequest at line 27, readonly setSessionModel signature at line 68, and Effect.fn("ACP.setSessionModel") implementation at line 467; /home/byk/Code/opencode/packages/opencode/src/acp/agent.ts imports the request type at line 16 and exposes unstable_setSessionModel(params: SetSessionModelRequest) at line 75./home/byk/Code/opencode-lore-v2/packages/opencode/node_modules/@opencode/plugin/dist/promise/session.js is an empty file with 0 lines./home/byk/Code/opencode-lore-v2/packages/opencode/node_modules/@opencode/plugin/dist/host.d.ts defines Target with required directory and optional name, Entrypoints with optional server, tui, and rpc, plus resolve(target: Target): Entrypoints and load(entrypoint: string): Promise<unknown>./home/byk/Code/opencode-lore-v2/packages/opencode/node_modules/@opencode/plugin/dist/host.js resolves plugin entrypoints with resolveModule() from @opencode/util/runtime-import: server checks ["server", ""], TUI checks ["tui"], and RPC checks ["rpc"]; named targets use target.name/subpath, unnamed targets use path.resolve(target.directory, subpath || "index").@opencode/plugin host resolver suppresses only resolution failures with codes ENOENT, ENOTDIR, MODULE_NOT_FOUND, ERR_MODULE_NOT_FOUND, ERR_PACKAGE_PATH_NOT_EXPORTED, and ERR_UNSUPPORTED_DIR_IMPORT; other errors are rethrown. load(entrypoint) delegates to importModule(entrypoint).@loreai/opencode artifact contains exactly 9 listed files: package/LICENSE, package/dist/server.js, package/package.json, package/dist/server.js.map, package/README.md, package/src/index.ts, package/src/internal.ts, package/src/server-core.ts, and package/src/server-runtime.ts, plus package/src/server.ts.@loreai/opencode package metadata: version 0.40.0, ESM ("type": "module"), license FSL-1.1-Apache-2.0, description βThree-tier memory architecture for OpenCode β distillation, not summarization,β author BYK, repository git+https://github.com/BYK/loreai.git under packages/opencode, and public npm publishing.@loreai/opencode root export (".") uses ./src/index.ts for types, bun, and default; "./server" uses ./src/server.ts for types and ./dist/server.js for both bun and default. Published file roots are src/, dist/, README.md, and LICENSE.@loreai/opencode peer dependencies are @opencode-ai/plugin >=1.1.0 and optional @opencode/plugin >=0.0.0; runtime dependencies are @loreai/core 0.40.0 and @loreai/gateway 0.40.0; dev dependencies are @opencode-ai/plugin ^1.1.39, @opencode-ai/sdk ^1.1.39, @opencode/plugin 0.0.0-beta-19378, and @types/bun ^1.2.0.@loreai/opencode scripts are typecheck: tsc --noEmit and build: tsx script/build.ts; keywords are opencode, plugin, memory, agent, distillation, and llm.bbf89f31f76a000d9746733c8ad11a283d5c27fc9368b77ef682ddcf9debb2d2 and cmp_exit=0, confirming byte-for-byte equality for the compared artifacts./home/byk/Code/opencode-lore-v2/packages/opencode/dist/server.js is a bundled server artifact containing silenceStderr around lines 158 and 221, Node filesystem/path imports around lines 162β179, execSync at line 627, HTTP/HTTPS imports at lines 694β695, and gatewayPackage = "@loreai/gateway" at line 754./home/byk/Code/opencode-lore-v2/packages/core/src/log.ts defines LogSink with info, warn, error, captureException, and optional generic withDbSpan<T>(sql, fn); registerSink() supports one sink, while traceDbQuery() uses sink.withDbSpan(sql, fn) when available and otherwise calls fn() exactly once as a transparent pass-through.log.ts debug handling enables informational stderr output only when LORE_DEBUG is exactly "1" or case-insensitive "true"; this fixes the prior behavior where non-empty "0" or "false" values were mistakenly treated as enabled.log.ts uses process-global globalThis["__loreStderrSilenced"], because an in-process gatewayβs Node/CJS dist/index.cjs may bundle a second copy of @loreai/core; silenceStderr(silenced = true) is idempotent and isStderrSilenced() reads the shared flag.log.ts routes all log levels to a persistent file at ~/.local/share/lore/lore.log regardless of LORE_DEBUG, disables file logging under NODE_ENV=test, rotates beyond 5 * 1024 * 1024 bytes (5 MB) with one .log.1 backup, and checks rotation every 1000 writes.log.ts credential sanitization uses replacement marker [Filtered]; redactSensitiveLogText() redacts credential/header assignments, PEM private keys, Bearer and Basic credentials, sensitive colon-delimited headers, OpenAI-style sk- keys, GitHub tokens matching gh[pousr]_, AWS access IDs beginning AKIA, and JWT-shaped values.redactSensitiveLogText() deliberately preserves a Bearer/Basic-looking value when immediately preceded by a scheme= assignment, while raw response bodies are omitted at call sites because free-form bodies cannot be reliably sanitized.safeArgs() sanitizes strings, error stacks/messages, and stringified values; sanitizedError() creates a new Error with redacted message, preserves the original error name, and redacts the stack.log.ts are LOG_DIRECTORY_MODE = 0o700, LOG_FILE_MODE = 0o600, and NO_FOLLOW = 0 on Windows or constants.O_NOFOLLOW elsewhere.log.ts rejects paths not owned by the current user, detects device/inode changes with assertSameFile(), rejects symlink or non-directory data paths, opens Unix directories with O_RDONLY | O_DIRECTORY | O_NOFOLLOW, tightens directory permissions to 0o700, and verifies no group/other permissions remain.openLogFileForAppend() rejects existing symlinks and non-regular files, verifies ownership, and opens with O_WRONLY | O_APPEND | O_CREAT | O_NONBLOCK | NO_FOLLOW using mode 0o600; O_NONBLOCK prevents a raced-in FIFO from blocking before fstat() rejects it.openLogFileForAppend() verifies it is regular and owner-controlled, revalidates dataDir(), compares pre-open/path/post-open device and inode identities to detect races, applies fchmodSync(fd, 0o600) off Windows, and closes the descriptor on validation failure.