Dashboard › opencode › Distillation
16bfe587-e48d-4560-8073-d8695b3b11e5["lore_tm_v1_OuMorqlsBkLfS-R1G3sx1LiQxhEyll9Ku_JaiBBovAk","lore_tm_v1_IAp2FOd1nHZNrwZSy7v1Pzq0ErayYrv-8PmpSleqEGw","lore_tm_v1_XkqzEUBjQo8R64qLcmHj13vshHxRDWwaULx6pyWjIv4","lore_tm_v1_1eikCagNZNLfM512ngjVBfw61J4B5iahB8WmMHa3M4k","lore_tm_v1_yuvEmpIIaMGI4DSM6qx0NgMicmC32UdUa1Ck7beWOlw"]
https://gateway.example and then failed with /usr/bin/bash: line 1: ${g.origin}${u.pathname}: bad substitution.gatewayBase found exactly 11 matches: /home/byk/Code/opencode-lore-v2/packages/opencode/test/index.test.ts lines 133 and 210; /home/byk/Code/opencode-lore-v2/packages/opencode/test/server-runtime.test.ts lines 34, 68, 92, 97, 117, and 132; and /home/byk/Code/opencode-lore-v2/packages/opencode/test/server.test.ts lines 9, 254, and 261./home/byk/Code/opencode-lore-v2/packages/opencode/test/index.test.ts:133 comments that opencode's resolveSDK() bypasses rewriting to `${gatewayBase}/v1`, while line 210 defines a test named is a no-op when gatewayBase is empty (test env / startup failure)./home/byk/Code/opencode-lore-v2/packages/opencode/test/server-runtime.test.ts uses gatewayBase: "http://127.0.0.1:3207" at lines 34, 68, and 92; gatewayBase: "http://127.0.0.1:5673" at line 97; expects the second value to equal "http://127.0.0.1:5673" at line 117; and uses gatewayBase: "https://gateway.example" at line 132./home/byk/Code/opencode-lore-v2/packages/opencode/test/server.test.ts uses gatewayBase: "http://127.0.0.1:3207" at lines 9, 254, and 261.1 match for location in /home/byk/Code/opencode-v2-pilot/packages/plugin/src/promise/plugin.ts: line 27 declares readonly location: Location.Info./home/byk/Code/opencode-v2-pilot/packages/plugin/src/promise/plugin.ts imports Location from @opencode/schema/location; its Context interface exposes readonly fields app, location, options, agent, aisdk, catalog, command, event, experimental, integration, mcp, generate, permission, plugin, reference, rpc, session, shell, skill, storage, tool, vcs, websearch, and worktree./home/byk/Code/opencode-v2-pilot/packages/plugin/src/promise/plugin.ts, Context.experimental.terminal is Pick<OpenCodeClient["experimental"]["persistentPty"], "read">, Context.plugin is Pick<PluginApi, "list">, and Context.generate is GenerateApi./home/byk/Code/opencode-v2-pilot/packages/plugin/src/promise/plugin.ts defines Cleanup = () => Promise<void> | void; Plugin has readonly id: string and setup: (context: Context) => Promise<Cleanup | void> | Cleanup | void; define(plugin: Plugin) returns plugin./home/byk/Code/opencode-v2-pilot/packages/schema/src/location.ts exports the namespace Location from ./location.js; defines Ref as a Schema.Struct containing directory: AbsolutePath and optional workspaceID: WorkspaceID, annotated with identifier "Location.Ref"; and defines Info as Schema.Class<Info>("Location.Info").Location.Info in /home/byk/Code/opencode-v2-pilot/packages/schema/src/location.ts contains directory: AbsolutePath, optional workspaceID: WorkspaceID, and project with id: ProjectID, directory: AbsolutePath, and canonical: AbsolutePath./home/byk/Code/opencode-v2-pilot/packages/schema/src/location.ts defines response<S extends Schema.Top>(data: S) to return Schema.Struct({ location: Info, data })./home/byk/Code/opencode-v2-pilot/packages/schema/AGENTS.md states that @opencode/schema owns browser-safe wire and storage contracts and must preserve dependency direction @opencode/schema <- @opencode/protocol <- @opencode/server; runtime behavior, service layers, side effects, and host-local details belong in their owning domain packages.V1 contracts under src/v1/; current code must not depend on that subtree, permanent replacement contracts must not retain V2, and V1-only events such as message.updated and message.part.* must remain outside current Protocol/SDK Next unless a current-client requirement is documented.Plugin.ID, Question.Info, Session.Info, and Agent.Info, flat top-level exports with namespace projection where appropriate, and no bridge aliases such as PluginID, PluginEvent, PtyInfo, PtyEvent, SessionSchema, AgentSchema, or ModelSchema.Schema.Struct records to use same-name interfaces; unions, scalars, arrays, branded scalar types, and event payload helpers use type aliases; exported schema values and namespace objects use PascalCase; schema combinators use camelCase; and the static-method combinator is statics(...).optional(...) helper for optional object properties, normally uses Schema.withDecodingDefault(...) for decode-only external defaults, keeps public contracts readonly, avoids current public Schema.Any, uses Schema.Json for JSON-serializable values, and uses Schema.Unknown for opaque values requiring narrowing.create(), generated ID validators to match the exact emitted prefix including _, and reusable public schemas to have unique, stable, domain-qualified identifiers such as Model.Ref and Agent.Color.undefined, absence of accidental current-contract Schema.Any, stable and unique public identifiers, exact facade/schema identity, and exclusion of V1-only events from current Protocol manifests.