Dashboard › opencode › Distillation
cf5d0919-1c92-455c-811a-cb75f4b3e262["lore_tm_v1_5QR8nEUKTsy2PApnWPAmdYMIO-jnyb4S974O8wvvrT8","lore_tm_v1_QeSQoWb5le_RVaLYMJBZL4uBm2HMQ5PLgEkHCMqyOLc","lore_tm_v1_nVQCFFWC04MNQYilkegN9u3SbpdjtoKcuM6eWJlKT0w","lore_tm_v1_gjOvYNW6MUlym_d2JQGYhoj12wj_BmpmOxcxcTTy4ak","lore_tm_v1_JLwcCNJX5NniRMfAJ2yL75zulMo418KG3_ifcPvGyqc","lore_tm_v1_nHfhzvorsev7ChVbL0Axeb8vTvfp8c9gg8EShUJNbbg","lore_tm_v1_ubHLM18bBzRcVHhuyxbGW-vr1dH7gtE7g_P11_qigMM","lore_tm_v1_Q8bQsdk5NNtayVD2n5MuCfCo6CUmaiwyPk7NHEM6_6s","lore_tm_v1_pKD2pfOrjKrYr-Wr3Gi1xO2TVvS5RO1slQ9Nr4MbIvk","lore_tm_v1_Qp9qSNXK0LBjhNJwp9_TrGwOLTqfHls4lDOvNrJ7IOA","lore_tm_v1_5l33z38UpY3u65MXl_1ahM_jDK9WGuUjKjx-NVVQcfU","lore_tm_v1_pd_SuPIYOvl6TsE38TUZEGQ6hCVHif299FlHI3sP2so","lore_tm_v1_bC1VcYMJIA7AZasImi7dgdgGG0kwqxoLjK7rVcQ6Yt0","lore_tm_v1_kxKbCBVvVVg_HLbW3TfCd0lR5q2DU8kDhY1kIAIgqtw","lore_tm_v1_yGIaGoPTnkJs8VRe6aTVJotAZMXV_ck8L7dO7kQ_TrY","lore_tm_v1_74EApzBPui-hONCjH1cpPxQ1M20AGKBbEIQNpm3Ucdo"]
Date: Sep 17, 2026
sdk-next composes Client, Core, and Server.import { foo as bar } from "..." and resolve as pathResolve.import * as Foo from "..." and import type * as Foo from "..."; namespace-style values should instead import a module’s own exported namespace by name, such as import { Project } from "@opencode-ai/core/project" and Project.ID.bun typecheck from package directories such as packages/opencode, never running tsc directly.do-not-run-tests-from-root guard; tests must run from package directories such as packages/opencode.HttpApi changes require bun run generate from packages/client; src/generated and src/generated-effect must not be edited directly.SessionV2.prompt(...) durably admits one session_input before scheduling advisory SessionExecution.wake(sessionID), except resume: false is admit-only; explicit Session-ID reuse adopts the existing Session; prompt message-ID reuse reconciles only exact retries matching Session, prompt, and delivery mode.SessionExecution to be process-global and Session-ID based; SessionRunner, model resolution, tool registry, permissions, and filesystem remain Location-scoped; V2 interruption targets only the active process-local ownership chain, while idle or missing interruption is a no-op.llm.stream(request) call per provider turn and reloading projected history before durable continuation; orchestration must not bridge through legacy SessionPrompt.loop(...) or an in-memory tool loop.SessionRunCoordinator joins explicit same-Session resumes, coalesces prompt wakeups, and permits different Sessions concurrently; advisory wakes drain eligible durable inbox rows only, and post-crash provider-work retry requires a separate explicit design.steer inputs promote at the next safe provider-turn boundary while continuation is needed; explicit queue inputs remain pending until otherwise idle, then one queued input promotes before continuation is reevaluated; any promoted user input resets the selected agent’s provider-turn allowance, with a steer batch resetting it once./tmp/opencode/session-recovery-v20-review was detached at base ab9408c81cc9916177641ae8e9f08624fc27b5b9; patch SHA-256 matched 24352107c74d8245fcba7f8571ba0be4b7fc514e6c73cfbf0498f0c25f29f9ba and size was 419965 bytes; SEA SHA-256 matched d0c78e881892d4f894fab7f6be00643c133ca21f9d2c88ae0d5ff31215393021 and size was 157879104 bytes.patch_paths=34, worktree_paths=34, path_set_match=True, and blob_mismatches=0.packages/core/src/database/migration/20260914170650_session-recovery.ts, packages/core/src/session/execution/claim.ts, packages/core/src/session/recovery-id.ts, packages/core/src/session/recovery.ts, and packages/core/test/session-execution-local.test.ts.python failed with /usr/bin/bash: line 1: python: command not found; subsequent provenance comparison nevertheless completed successfully with all 34 paths matching and zero blob mismatches.packages/opencode/AGENTS.md guidance prohibits export namespace Foo { ... }; modules must use flat top-level exports and a self-reexport such as export * as Foo from "./foo", or export * as Foo from "." for a single-namespace index.ts.packages/opencode/AGENTS.md guidance prohibits barrel index.ts files in multi-sibling directories such as src/session/; each sibling must self-reexport and consumers must import the specific sibling, e.g. import { SessionRetry } from "@/session/retry".Effect.gen(function* () { ... }) for composition, Effect.fn("Domain.method") for named/traced effects, Effect.fnUntraced for internal helpers, Effect.callback for callback APIs, and Effect.void instead of Effect.succeed(undefined) or Effect.succeed(void 0).Effect.fork and Effect.forkDaemon do not exist; use Effect.forkIn(scope).makeRuntime from src/effect/run-service.ts for all services and InstanceState from src/effect/instance-state.ts for per-directory or per-project state requiring per-instance cleanup.HttpApiBuilder.group(...); declared raw request/response or WebSocket routes must use HttpApiBuilder.group(...) with handleRaw(...); raw HttpRouter.use(...) is reserved for routes outside the declared API surface.Effect.provide(SomeLayer) inside request handlers or raw callbacks; stable layers belong at the application/layer boundary, while Effect.provideService(...) in middleware is only for request-derived context such as WorkspaceRouteContext, InstanceRef, or WorkspaceRef.@opencode-ai/schema to contain browser-safe wire/storage contracts only, preserving dependency direction @opencode-ai/schema <- @opencode-ai/protocol <- @opencode-ai/server; runtime behavior, services, side effects, and host-local implementation stay in their owning domain packages.V1, and replacement architecture not to retain V2 permanently in namespaces, brands, or identifiers.optional(...) helper so encoded objects omit undefined; raw Schema.optional(...) is allowed only when explicitly preserving encoded undefined is intentional and documented.Schema.mutable(...) for runtime convenience; mutation must be explicitly introduced at the runtime boundary with Types.DeepMutable, a purpose-built draft type, or another mutable API.Schema.Any; use Schema.Json for JSON-serializable values and Schema.Unknown for genuinely opaque values requiring consumer narrowing.