Dashboard › opencode › Distillation
868e7f3c-02d2-426f-963b-fb3cc0f2f54f["lore_tm_v1_bZCmmn4zG-KlomD2ApDa59MftSTPRzQaFbQaIjuoA4k","lore_tm_v1_k_AA0rPW_PsdTXLVmVxe8cYjV66dflQfsVHPnrW4bPo","lore_tm_v1_0oIsDtEg1AfEaRHtsr5Ke4X5LYk0e0-vsc1brIzuND8","lore_tm_v1_5VgcLr-EkYgzPJ7YA-wda2K7t3gtny76eX14vrx9tlU","lore_tm_v1_l75amSYPixRllJBqRjZTiBSdpzCGrkq3UYtlpb3fie8","lore_tm_v1_JIZQh-90GTNRVl5v-7IUy_n5ydoj1Bj5T9kzRUfBhfw","lore_tm_v1_Z2UUMK6j-UhnCP_HSWltRlNFs1ZNcgrMbJp2bVVT3GA","lore_tm_v1_dNhQdTqfw_IbJKFOHfiJX0qxmSoSScMvPtv7GvVHrDE","lore_tm_v1_ZmkVPMbUEG_is4PwjNNpBATEf39UjSWr35MB58v0LWA","lore_tm_v1_vti5g7p5iaiMbvBwPr8NI85Ssz1EYR82HXsRSFeWtKM","lore_tm_v1_FduLJp6vT4U91MTkTjcHDU53fRm2UWTC4bXHZAQV2Gg"]
/home/byk/Code/opencode-v2-pilot runtime dependency direction is Schema → Core and Protocol → Server; Client runtime code may depend on Schema and Protocol but never Core or Server; sdk composes Client, Core, and Server (AGENTS.md:2).bun typecheck from package directories such as packages/core, never invoking tsc directly (/home/byk/Code/opencode-v2-pilot/AGENTS.md:173-175)./home/byk/Code/opencode-v2-pilot to run from package directories because the repo root has the do-not-run-tests-from-root guard (AGENTS.md:167-172).globalThis.* unless it is the only option, and must test actual implementation rather than duplicating implementation logic in tests (/home/byk/Code/opencode-v2-pilot/AGENTS.md:167-170).import { foo as bar } from "..." and renamed imports such as resolve as pathResolve (/home/byk/Code/opencode-v2-pilot/AGENTS.md:84-86).import("...") references such as Schema.declare<import("@opencode/plugin/effect/plugin").Plugin["effect"]>; only a genuine name collision with no alternative permits an aliased type import such as import type { Plugin as PluginDefinition } from "...", and even then it is strongly disfavored (/home/byk/Code/opencode-v2-pilot/AGENTS.md:87).import * as Foo from "..." and import type * as Foo from "..." (/home/byk/Code/opencode-v2-pilot/AGENTS.md:88).import { Project } from "@opencode/core/project" followed by Project.ID (/home/byk/Code/opencode-v2-pilot/AGENTS.md:89).await import("./module").then((mod) => mod.value()) and (await import("./module")).value() should be avoided (/home/byk/Code/opencode-v2-pilot/AGENTS.md:90)./home/byk/Code/opencode-v2-pilot/packages/plugin has two plugin versions, Effect and Promise; every Effect domain must extend its corresponding Effect API client interface from @opencode/client/effect/api, must not redefine existing client-interface functions, and may add only functions meaningful in the plugin context (packages/plugin/AGENTS.md:1-6).HttpApi changes require running bun run generate from packages/client; generated client files must not be edited directly (/home/byk/Code/opencode-v2-pilot/AGENTS.md:1)./home/byk/Code/opencode-v2-pilot is v2; new branches/worktrees should default to v2 or origin/v2, PRs should target v2, and diffs should use v2 or origin/v2 because local main may not exist (AGENTS.md:5-7)./home/byk/Code/opencode-v2-pilot does not use Changesets and .changeset files must not be added (AGENTS.md:4)./home/byk/Code/opencode-v2-pilot must contain at most three hyphen-separated words without slashes or type prefixes; examples are session-recovery, fix-scroll-state, and regenerate-sdk (AGENTS.md:30-34).type(scope): summary; valid types are feat, fix, docs, chore, refactor, and test, with optional scopes such as core, opencode, tui, app, desktop, sdk, or plugin (AGENTS.md:36-42)./home/byk/Code/opencode-lore is a Node.js >=22.5 TypeScript monorepo using pnpm workspaces, SQLite WAL mode, and FTS5, with its database at ~/.local/share/lore/lore.db (/home/byk/Code/opencode-lore/AGENTS.md:11-18).@loreai/core at packages/core/, @loreai/gateway at packages/gateway/, @loreai/opencode at packages/opencode/, and @loreai/pi at packages/pi/; gateway, opencode, and pi consume core, the gateway bundles core into one CJS file via esbuild, and the OpenCode package ships raw TypeScript (/home/byk/Code/opencode-lore/AGENTS.md:19-29).quality/REVIEW.md, including regression-test discipline, adversarial-order state setup, fan-out registry coverage, recurring bug-class batteries, and the two-reviewer rule (/home/byk/Code/opencode-lore/AGENTS.md:7-9).pnpm install, pnpm test, pnpm run typecheck, pnpm run lint, pnpm run lint:fix, pnpm run format, pnpm run format:check, and pnpm run build; tests use a temporary SQLite database through packages/core/test/setup.ts, never the production database (/home/byk/Code/opencode-lore/AGENTS.md:148-161).CHANGELOG.md must never be manually edited; release triggers are gh workflow run release.yml -f version=auto or an explicit command such as gh workflow run release.yml -f version=0.23.0 (/home/byk/Code/opencode-lore/AGENTS.md:163-175)./home/byk/Code/opencode-v2-pilot/packages/plugin/src/promise/, including adapter.ts, plugin.ts, registration.ts, session.ts, types.ts, index.ts, and domain files for agent, aisdk, catalog, command, event, integration, mcp, permission, reference, rpc, skill, storage, tool, vcs, websearch, and worktree./home/byk/Code/opencode-v2-pilot/packages/plugin/src/effect/, including plugin.ts, registration.ts, session.ts, index.ts, and corresponding domain files for agent, aisdk, catalog, command, event, integration, mcp, permission, reference, rpc, skill, storage, tool, vcs, websearch, and worktree./home/byk/Code/opencode-v2-pilot/packages/plugin/test/host.test.ts, packages/core/test/plugin.test.ts, packages/core/test/plugin-failure.test.ts, packages/tui/test/plugin-source.test.ts, and packages/server/test/plugin-activation.test.ts.packages/sdk/test/promise.test.ts: “Promise host uses the embedded router” at line 7, “Promise event streams support cancellation” at line 36, and “closing cancels active Promise event streams” at line 53.packages/sdk/test/instances.test.ts: instances are lazy, share by key and Location, and remain isolated between hosts (line 16); failed instances admit nothing, preserve healthy instances, and can be retried (line 146); persisted Session callbacks reconstruct only on a cold prompt (line 223); and plugin ID collisions reject admission and reconstruct on retry (line 297).packages/sdk/test/instances-lifecycle.test.ts, where host.close is exercised via Effect.promise(host.close) at lines 41 and 63.packages/sdk/test/import-boundaries.test.ts tests bundling Promise and Effect clients with the in-memory host (lines 10-11), while packages/sdk/test/contract-identity.test.ts imports ClientApi, groupNames, and promiseOmitEndpoints, compiles server/client contracts, and asserts emitPromise(client) equals emitPromise(server) (lines 19-20 and 96-99).packages/core/test/session-model-request-hooks.test.ts, packages/core/test/session-model-request.test.ts, packages/core/test/session-model-transport.test.ts, packages/core/test/session-model-transport-live.test.ts, packages/core/test/session-provider-context.test.ts, and packages/server/test/session-instances.test.ts.Plugin.define({ call sites: packages/sdk/test/instances-effect.test.ts:60, :175, and :265; packages/core/test/plugin/worktree.test.ts:23; packages/server/test/provider.test.ts:41; and packages/server/test/plugin-activation.test.ts:67, :132, and :172.