Dashboard › opencode › Distillation
68171d52-b417-46cf-8774-5d4e6e39537c["lore_tm_v1_SqKP6HJyBS7osDifLgBQTZ7DxSPdVIBE9YfvAcsy4KE","lore_tm_v1_CEwa1Ugg-usu2butymJBa6ZB9q5KyLFrJssPLLvIy8g","lore_tm_v1_Q_xaMhS4zxahugJAdJ3L8tlJ0GhCFK_MLnULg7iEU64","lore_tm_v1_7u09NjZPmyVbt2Xxxm4bIVpc9R5elCPBwhs-tjwokq0"]
StartOptions.processBoundary because signals and shutdown affect the host process; embedded plugins never request lifecycle control. Quiet in-process callers use { quiet:true, local:true }, route notices through file logging, and must not write lifecycle text into full-screen TUIs.pid, processIdentity, and an owner-only token because PID reuse makes numeric ownership insufficient. Reuse, termination, and discovery cleanup require the exact recorded generation; records are removed only while every identity field still matches.workspace metadata. Globally scoped events were chosen over isolated/local bus delivery because TUI, HTTP, sync, and control-plane consumers span instance boundaries; without workspace context, subscribers cannot safely filter or attribute events. EventV2Bridge is the compatibility boundary publishing EventV2 values to GlobalBus.sdk-next composes Client, Core, and Server. Client must never import Core or Server.@loreai/core must support bundled Node-compatible CJS for gateway and raw TypeScript for OpenCode/Pi. Only packages/core/src/db/driver.node.ts may import node:sqlite; all other source must use #db/driver because Bun lacks node:sqlite. Both bundled and raw-TypeScript consumers must be tested because either path can hide failures in the other.session.tool.success/failed and session.compaction.ended settle replayable state; reasoning and compaction deltas remain live-only progress.96a9731947.validation === "codex", explicit terminal response.output: [] may retain streamed state only if every accumulated item is done. Empty snapshots with unfinished items, nonempty contradictory snapshots, and public-mode empty snapshots must be rejected. Omitted Codex snapshots remain sparse-lifecycle compatible. OpenCode’s unconditional terminal acceptance was rejected because it weakens protection against malformed or contradictory snapshots.applyLoreProviderConfig must authoritatively set options.headerTimeout = false for Lore-routed openai and openai-codex providers because OpenCode has already merged its inherited 60-second timeout and Lore owns the foreground deadline. Routing must use cfg.provider and options.baseURL, not provider-specific base-URL environment variables. An openai provider entry must be created when absent so routing applies universally.computeMaxTokens in pipeline.ts must reserve thinking budget. The prior EMA floor max(8192, 3×outputEMA) ignored Anthropic’s combined thinking-and-visible max_tokens budget, allowing all 8192 tokens to be consumed by reasoning, producing finish:"length" with no text/tool part and silently exiting the agent loop. Fix: pass thinkingBudget; set baseFloor = thinkingBudget + THINKING_OUTPUT_HEADROOM (8192), clamped by modelOutput; gate with if (!isCC) because CC clients are excluded and OpenCode does not send x-claude-code-session-id. Anthropic includes thinking tokens in output_tokens, so thinking truncation does not corrupt the EMA.heap_used_bytes; repeated collections near the heap ceiling demonstrate JavaScript retention and OOM risk. CPU-heavy paths may amplify GC but do not identify the retained object graph, so capture a heap snapshot before naming its owner.session_state.header_session_id (OpenCode client-visible x-lore-session-id) to session_state.session_id (Lore internal session ID), then query Sentry using the internal ID because setSentryRequestContext() uses Lore’s internal ID as the conversation ID.git add . before committing. Partial staging was rejected because it can omit related tests, fixtures, or configuration, causing broken CI or non-reproducible commits.opencode.json; BYK/loreai normally has none, and such an untracked configuration contaminates cache/auth tests..lore.md is auto-managed by the background lore process. On stash-pop conflicts, resolve it to “ours” (origin/main) and never hand-edit it because session memory is reapplied on the next cycle. Commit regenerated .lore.md changes with git add . like all other changes..lore.md on main had auto-managed unstaged local changes that blocked git checkout <other-branch> and git pull/fast-forward; git stash --keep-index --include-untracked followed by checkout to another branch failed. Valid resolutions were git checkout -- .lore.md to discard local changes, or stash then drop. (meaning Aug 7, 2026)#1598 merged into main via fast-forward bf8ffa02 → c1edc4fb, bringing .lore.md (167 lines), embedding-worker.ts (24 lines), and new embedding-worker-stderr-routing.test.ts (98 lines). (meaning Aug 7, 2026)Use when..., and say Use ONLY when... where adjacent topics could activate the skill incorrectly.opencode.json model values must always include the provider prefix, for example anthropic/claude-sonnet-4-6.opencode.json mcp[name] requires type, and command must always be an array of strings, never one shell string. Bare model names and string commands violate the configuration contract and create ambiguous provider or argument parsing./home/byk/Code/opencode-lore contains 34 entries: .craft.yml, .git/, .github/, .gitignore, .jj/, .lore.md, .opencode/, .oxfmtrc.json, .oxlintrc.json, .plans/, .sentryclirc, .vendor-build/, .worktrees/, AGENTS.md, CHANGELOG.md, codecov.yml, LICENSE, local_cache/, node_modules/, package.json, packages/, patches/, pnpm-lock.yaml, pnpm-workspace.yaml, quality/, README.md, scripts/, stryker.config.mjs, supabase/, tsconfig.base.json, tsconfig.json, vitest.config.ts, vitest.evals.config.ts, and vitest.mutation.config.ts./home/byk/Code/opencode-v2-pilot/packages/plugin/src/source.ts lines 53–66. digest(file: string, directory: boolean) returns Hash.sha256(directory ? JSON.stringify(readdirSync(file).sort()) : readFileSync(file)), returning "missing" on any caught error.localSource(spec: string, directory: string) in /home/byk/Code/opencode-v2-pilot/packages/plugin/src/source.ts: it returns new URL(spec) for file:// specs; for specs beginning ./ or ../, or satisfying path.isAbsolute(spec), it returns pathToFileURL(path.resolve(directory, spec)); otherwise it returns undefined./home/byk/Code/opencode-lore/.opencode contains 6 entries: .gitignore, bun.lock, node_modules/, package-lock.json, package.json, and plans/.