Dashboard › opencode › Distillation
1a9bbb54-6243-477a-a6b7-1af74182a89e["lore_tm_v1_uU21Bk7lNRXoQcZI9HAglJZyI9rDJwbD6BupvixfWAo","lore_tm_v1_F61IAaQTuHB9COn79g67BNlPZP-7C-l81GIdhDlXkus","lore_tm_v1_L_sRJ826iBn3xDD2T-3uyplp9n1on6xWNz9uHFlV6h0"]
/home/byk/Code/opencode-lore: /home/byk/Code/opencode-lore/packages/opencode/test/gateway-smoke.test.ts line 8 says the plugin’s startInProcess delegates to gateway startup and tests use ephemeral ports; /home/byk/Code/opencode-lore/packages/opencode/src/index.ts contains resolveGatewayUrl() at line 44, startInProcess() at line 89, and call sites at lines 265 and 272./home/byk/Code/opencode-lore/packages/opencode/eval/data/sessions/cli-nightly.json: .github/workflows/ci.yml independently computed Math.floor(Date.now() / 1000) in build-binary and publish-nightly, so binaries could contain 0.x.y-dev.T1 while version.json advertised later 0.x.y-dev.T2; matrix builds could also contain different T1 values across platforms.CLI_VERSION, causing perpetual “new nightly available” notifications and an upgrade loop that repeatedly downloads the same binary./home/byk/Code/opencode-lore/packages/opencode/eval/data/sessions/cli-nightly.json: GHCR/ORAS mutable-tag publishing was tested with oras push ghcr.io/getsentry/cli:nightly-test *.gz version.json; overwriting the same tag worked, unchanged files were deduplicated, CI required packages: write, and the package initially defaulted to private and needed one-time public visibility configuration for anonymous downloads.oras pull worked after making the GHCR package public, but raw GHCR blob requests returned a 307 Temporary Redirect to signed Azure Blob Storage. Forwarding the Authorization header to the redirect target caused a 404; the working flow extracted the redirect URL and downloaded it separately without the auth header.https://ghcr.io/token?scope=repository:getsentry/cli:pull; fetch https://ghcr.io/v2/getsentry/cli/manifests/nightly with Accept: application/vnd.oci.image.manifest.v1+json; select a layer by org.opencontainers.image.title, such as sentry-linux-x64.gz; request https://ghcr.io/v2/getsentry/cli/blobs/$DIGEST; then follow the extracted redirect URL without authorization./home/byk/Code/opencode-v2-pilot/packages/plugin/src/promise/adapter.ts lines 552-571: the promise adapter exposes worktree.list, worktree.create, worktree.remove, and worktree.refresh through adaptApiMethod(...); worktree.reload uses run(host.worktree.reload()); and worktree.transform registers definitions whose create, remove, and list callbacks are wrapped with attempt((signal) => ...) and receive an AbortSignal./home/byk/Code/opencode-v2-pilot/packages/plugin/src/promise/adapter.ts lines 573-591: session.hook(name, callback, options) registers host.session.hook(...) and converts callback results through Effect.promise(() => Promise.resolve(callback(event))); session API methods adapted through adaptApiMethod(...) are create, get, switchAgent, switchModel, prompt, generate, command, synthetic, interrupt, rename, move, wait, and context./home/byk/Code/opencode-v2-pilot/packages/plugin/src/promise/adapter.ts lines 592-600: shell.hook(name, callback) similarly registers an Effect-wrapped promise callback; plugin setup is managed by Effect.acquireRelease, calling plugin.setup(context2) on acquisition and invoking the returned cleanup function on release when one exists./home/byk/Code/opencode-v2-pilot/packages/plugin/src/promise/adapter.ts lines 606-608: attempt<A>(evaluate: (signal: AbortSignal) => PromiseLike<A>) returns Effect.tryPromise({ try: evaluate, catch: (cause) => cause })./home/byk/Code/opencode-v2-pilot/packages/plugin/src/promise/adapter.ts lines 610-639: RuntimeSchema is Schema.Codec<unknown, unknown>; executePromiseTool(tool, input, context) invokes tool.execute(...), maps progress through Effect.runPromise(context.progress(update)), converts TypedFailure into Tool.Error, derives its message from string error.error.feedback, then Error.message, then String(error.error), and treats non-TypedFailure errors as defects via Effect.die(error)./home/byk/Code/opencode-v2-pilot/packages/core/src: context hooks in tool/plugin/websearch.ts line 183, tool/plugin/subagent.ts line 237, tool/plugin/shell.ts line 274, tool/plugin/patch.ts line 295, tool/plugin/opencode.ts line 28, plugin/warming.ts line 57, plugin/plan.ts line 58, and plugin/optimize.ts line 57.SessionModelRequest imports in /home/byk/Code/opencode-v2-pilot/packages/core/src/session/generate.ts line 13, session/context.ts line 24, session/compaction.ts line 25, session/runner/step.ts line 24, and session/runner/llm.ts line 15./home/byk/Code/opencode-v2-pilot/packages/core/src/session/model-request.ts exports SessionModelRequest at line 1; triggers session.model.request at line 224 and session.http.request at line 249; documents outbound request/capability preparation around lines 273-282; reports incompatible provider context at line 362 with Provider context is incompatible with the route selected by model request hooks; and checks for provider-scoped session.http.request hooks around line 365./home/byk/Code/opencode-v2-pilot/packages/core/src/plugin/provider/openai.ts lines 294-295 for model.request, /home/byk/Code/opencode-v2-pilot/packages/core/src/plugin/provider/azure.ts lines 178-179 for http.request, and /home/byk/Code/opencode-v2-pilot/packages/core/src/plugin/provider/github-copilot.ts lines 254-255 for model.request plus lines 269-270 for http.request./home/byk/Code/opencode-v2-pilot/packages/core/src/session/context.ts line 46 documents two-phase model-request resolution where select fixes the Session; /home/byk/Code/opencode-v2-pilot/packages/core/src/session/compaction.ts line 476 states “Provider compaction requires the endpoint in provider/model settings, not a model.request rewrite”; /home/byk/Code/opencode-v2-pilot/packages/core/src/session/execution/restart.ts line 205 says shell outcomes must be admitted before a recovered child starts its first model request; and /home/byk/Code/opencode-v2-pilot/packages/core/src/session/instruction-state.ts line 164 documents rendering the epoch baseline at the start of every model request.