Something went wrong. Try again.
opencode v2 mirror
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829import { Option, Schema } from "effect"
declare const OPENCODE_VERSION: stringdeclare const OPENCODE_CHANNEL: stringdeclare const OPENCODE_ARTIFACT: stringdeclare const OPENCODE_RELEASE_HIGHLIGHTS: string
const version = typeof OPENCODE_VERSION === "string" ? OPENCODE_VERSION : "local"const channel = typeof OPENCODE_CHANNEL === "string" ? OPENCODE_CHANNEL : "local"const artifact = typeof OPENCODE_ARTIFACT === "string" ? OPENCODE_ARTIFACT : "cli"// Stable release builds embed the release notes' Highlights; every other build has none.const highlights = typeof OPENCODE_RELEASE_HIGHLIGHTS === "string" ? Option.getOrElse( Schema.decodeUnknownOption( Schema.fromJsonString(Schema.Array(Schema.Struct({ title: Schema.String, body: Schema.String }))), )(OPENCODE_RELEASE_HIGHLIGHTS), () => [], ) : []
export { version as OPENCODE_VERSION, channel as OPENCODE_CHANNEL, artifact as OPENCODE_ARTIFACT, highlights as OPENCODE_HIGHLIGHTS,}export const OPENCODE_LOCAL = channel === "local"