mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 20:34:18 +01:00
chore(opencode): move the OpenCode pin to 2.2.5 from a workspace catalog
Manager builds against and requires OpenCode 2.2.5. Every @opencode package, plus effect and the OpenTUI/solid dependencies they share, resolves from one pnpm workspace catalog instead of separate pins. The built-against version and the supported floor are now separate settings, so a future OpenCode release can move the pin before raising the floor. Docker and the dev setup script read the floor from its own argument. ocm-cli moves to 0.6.0 on the same 2.2.5 and OpenTUI 0.8 baseline. A linked server on a different version is still connectable and now shows a neutral version notice instead of an unsupported badge.
This commit is contained in:
1 parent
dc0220843e
commit
807c7cb896
20 files changed
+583
-562
No files matched your search
@@ -136,6 +136,7 @@ export type {
|
||||
} from './pairing'
|
||||
|
||||
export {
|
||||
OPENCODE_MIN_VERSION,
|
||||
OPENCODE_PINNED_VERSION,
|
||||
OPENCODE_SUPPORTED_VERSION_RANGE,
|
||||
buildOpenCodeReleaseAsset,
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
import { compareParsedSemver, compareSemver, normalizeSemver, parseSemver, type Semver } from '../utils/semver'
|
||||
|
||||
export const OPENCODE_PINNED_VERSION = '2.2.1'
|
||||
/** The OpenCode release Manager is built against and bundles; matches the `@opencode/*` pnpm catalog entries. */
|
||||
export const OPENCODE_PINNED_VERSION = '2.2.5'
|
||||
|
||||
/** The oldest OpenCode release Manager supports; any later release of the same major is accepted. */
|
||||
export const OPENCODE_MIN_VERSION = '2.2.5'
|
||||
|
||||
const OPENCODE_RELEASE_BASE_URL = 'https://opencode.ai/files/bin'
|
||||
|
||||
@@ -47,20 +51,20 @@ export function compareOpenCodeVersions(left: string, right: string): number {
|
||||
return compareSemver(left, right)
|
||||
}
|
||||
|
||||
function parsePinnedOpenCodeVersion(): OpenCodeVersion {
|
||||
const pinned = parseOpenCodeVersion(OPENCODE_PINNED_VERSION)
|
||||
if (!pinned) throw new Error(`OPENCODE_PINNED_VERSION is not a valid version: ${OPENCODE_PINNED_VERSION}`)
|
||||
return pinned
|
||||
function parseMinOpenCodeVersion(): OpenCodeVersion {
|
||||
const min = parseOpenCodeVersion(OPENCODE_MIN_VERSION)
|
||||
if (!min) throw new Error(`OPENCODE_MIN_VERSION is not a valid version: ${OPENCODE_MIN_VERSION}`)
|
||||
return min
|
||||
}
|
||||
|
||||
const OPENCODE_PINNED = parsePinnedOpenCodeVersion()
|
||||
const OPENCODE_MIN = parseMinOpenCodeVersion()
|
||||
|
||||
export const OPENCODE_SUPPORTED_VERSION_RANGE = `>=${OPENCODE_PINNED_VERSION} <${OPENCODE_PINNED.major + 1}.0.0`
|
||||
export const OPENCODE_SUPPORTED_VERSION_RANGE = `>=${OPENCODE_MIN_VERSION} <${OPENCODE_MIN.major + 1}.0.0`
|
||||
|
||||
export function isSupportedOpenCodeVersion(version: string): boolean {
|
||||
const parsed = parseOpenCodeVersion(version)
|
||||
if (!parsed) return false
|
||||
return parsed.major === OPENCODE_PINNED.major && compareParsedSemver(parsed, OPENCODE_PINNED) >= 0
|
||||
return parsed.major === OPENCODE_MIN.major && compareParsedSemver(parsed, OPENCODE_MIN) >= 0
|
||||
}
|
||||
|
||||
export function describeUnsupportedOpenCodeVersion(version: string): string {
|
||||
|
||||
Reference in new issue
Block a user