chore(opencode): move the OpenCode pin and supported floor to 2.4.2

This commit is contained in:
Chris Scott committed 2026-11-28 20:14:02 -05:00
1 parent bf2f81f921
commit 68f67327fc
19 files changed
+281 -170

No files matched your search

+1 -1
View File
@@ -125,7 +125,7 @@ jobs:
- name: Install OpenCode CLI - name: Install OpenCode CLI
run: | run: |
source scripts/lib/opencode-release.sh source scripts/lib/opencode-release.sh
download_opencode_to 2.3.0 "$RUNNER_TEMP/opencode/bin/opencode" download_opencode_to 2.4.2 "$RUNNER_TEMP/opencode/bin/opencode"
echo "$RUNNER_TEMP/opencode/bin" >> "$GITHUB_PATH" echo "$RUNNER_TEMP/opencode/bin" >> "$GITHUB_PATH"
- name: Verify OpenCode CLI - name: Verify OpenCode CLI
+2 -2
View File
@@ -63,8 +63,8 @@ FROM base AS runner
# an arm64 host builds the amd64 platform; 0.12.7 is the newest verified-good # an arm64 host builds the amd64 platform; 0.12.7 is the newest verified-good
# release, so re-verify a bump there before moving it. # release, so re-verify a bump there before moving it.
ARG UV_VERSION=0.12.7 ARG UV_VERSION=0.12.7
ARG OPENCODE_VERSION=2.3.0 ARG OPENCODE_VERSION=2.4.2
ARG OPENCODE_MIN_VERSION=2.3.0 ARG OPENCODE_MIN_VERSION=2.4.2
ARG MICROSANDBOX_VERSION=0.7.2 ARG MICROSANDBOX_VERSION=0.7.2
ARG PLAYWRIGHT_VERSION=1.63.0 ARG PLAYWRIGHT_VERSION=1.63.0
# Bump TOOLS_CACHEBUST (e.g. via --build-arg) to force a fresh uv/opencode # Bump TOOLS_CACHEBUST (e.g. via --build-arg) to force a fresh uv/opencode
+2 -1
View File
@@ -8,7 +8,7 @@ import { readJson } from '../../test/helpers/read-json'
import { createOAuthRoutes } from './oauth' import { createOAuthRoutes } from './oauth'
import { createStubOpenCodeClient } from '../../test/helpers/stub-opencode-client' import { createStubOpenCodeClient } from '../../test/helpers/stub-opencode-client'
import { FetchOpenCodeClient } from '../services/opencode/client' import { FetchOpenCodeClient } from '../services/opencode/client'
import { resolveOpenCode2Binary, startOpenCodeServe } from '../../test/helpers/opencode-binary' import { resolveOpenCode2Binary, startOpenCodeServe, waitForOpenCodePluginsLoaded } from '../../test/helpers/opencode-binary'
import { buildOpenCodeBasicAuth, ClientError } from '@opencode-manager/shared/opencode' import { buildOpenCodeBasicAuth, ClientError } from '@opencode-manager/shared/opencode'
import type { IntegrationInfo, IntegrationMethod } from '@opencode-manager/shared/opencode' import type { IntegrationInfo, IntegrationMethod } from '@opencode-manager/shared/opencode'
import type { OpenCodeClient } from '../services/opencode/client' import type { OpenCodeClient } from '../services/opencode/client'
@@ -370,6 +370,7 @@ describe.skipIf(!openCodeBinary)('oauth routes against a real OpenCode 2 server'
}) })
const app = new Hono() const app = new Hono()
app.route('/oauth', createOAuthRoutes(client)) app.route('/oauth', createOAuthRoutes(client))
await waitForOpenCodePluginsLoaded(client)
const methodsResponse = await app.request('/oauth/auth-methods') const methodsResponse = await app.request('/oauth/auth-methods')
expect(methodsResponse.status).toBe(200) expect(methodsResponse.status).toBe(200)
+3 -3
View File
@@ -9,7 +9,7 @@ import type { JsonObject, JsonValue } from '@opencode-manager/shared/utils'
import { createProvidersRoutes } from './providers' import { createProvidersRoutes } from './providers'
import { createStubOpenCodeClient } from '../../test/helpers/stub-opencode-client' import { createStubOpenCodeClient } from '../../test/helpers/stub-opencode-client'
import { FetchOpenCodeClient } from '../services/opencode/client' import { FetchOpenCodeClient } from '../services/opencode/client'
import { resolveOpenCode2Binary, startOpenCodeServe } from '../../test/helpers/opencode-binary' import { resolveOpenCode2Binary, startOpenCodeServe, waitForOpenCodePluginsLoaded } from '../../test/helpers/opencode-binary'
import { buildOpenCodeBasicAuth } from '@opencode-manager/shared/opencode' import { buildOpenCodeBasicAuth } from '@opencode-manager/shared/opencode'
import { ClientError } from '@opencode-manager/shared/opencode' import { ClientError } from '@opencode-manager/shared/opencode'
import type { IntegrationInfo } from '@opencode-manager/shared/opencode' import type { IntegrationInfo } from '@opencode-manager/shared/opencode'
@@ -502,7 +502,7 @@ describe.skipIf(!openCodeBinary)('providers routes against a real OpenCode 2 ser
const app = new Hono() const app = new Hono()
app.route('/providers', createProvidersRoutes(client)) app.route('/providers', createProvidersRoutes(client))
await client.api.integration.list() await waitForOpenCodePluginsLoaded(client)
const connectResponse = await app.request('/providers/anthropic/credentials', { const connectResponse = await app.request('/providers/anthropic/credentials', {
method: 'POST', method: 'POST',
@@ -534,7 +534,7 @@ describe.skipIf(!openCodeBinary)('providers routes against a real OpenCode 2 ser
const app = new Hono() const app = new Hono()
app.route('/providers', createProvidersRoutes(client)) app.route('/providers', createProvidersRoutes(client))
await client.api.integration.list() await waitForOpenCodePluginsLoaded(client)
const rejected = await app.request('/providers/azure/credentials', { const rejected = await app.request('/providers/azure/credentials', {
method: 'POST', method: 'POST',
@@ -446,7 +446,7 @@ describe('OpenCodeServerRegistry', () => {
describe('test', () => { describe('test', () => {
it('reports a supported version', async () => { it('reports a supported version', async () => {
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.3.0' })) fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.4.2' }))
const result = await registry.test({ const result = await registry.test({
baseUrl: 'https://studio.example.com/', baseUrl: 'https://studio.example.com/',
@@ -454,7 +454,7 @@ describe('OpenCodeServerRegistry', () => {
password: 'super-secret', password: 'super-secret',
}) })
expect(result).toEqual({ ok: true, version: '2.3.0', versionSupported: true, error: null }) expect(result).toEqual({ ok: true, version: '2.4.2', versionSupported: true, error: null })
expect(fetchFn.mock.calls[0]?.[0]).toBe('https://studio.example.com/api/info') expect(fetchFn.mock.calls[0]?.[0]).toBe('https://studio.example.com/api/info')
const headers = new Headers(fetchFn.mock.calls[0]?.[1]?.headers) const headers = new Headers(fetchFn.mock.calls[0]?.[1]?.headers)
expect(headers.get('authorization')).toBe(`Basic ${btoa('alice:super-secret')}`) expect(headers.get('authorization')).toBe(`Basic ${btoa('alice:super-secret')}`)
@@ -475,7 +475,7 @@ describe('OpenCodeServerRegistry', () => {
username: 'alice', username: 'alice',
password: 'super-secret', password: 'super-secret',
}) })
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.3.0' })) fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.4.2' }))
const result = await registry.test({ serverId: server.id }) const result = await registry.test({ serverId: server.id })
@@ -490,7 +490,7 @@ describe('OpenCodeServerRegistry', () => {
baseUrl: 'https://studio.example.com', baseUrl: 'https://studio.example.com',
password: 'super-secret', password: 'super-secret',
}) })
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.3.0' })) fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.4.2' }))
const result = await registry.test({ const result = await registry.test({
baseUrl: 'https://studio.example.com/opencode', baseUrl: 'https://studio.example.com/opencode',
@@ -510,7 +510,7 @@ describe('OpenCodeServerRegistry', () => {
baseUrl: 'https://studio.example.com', baseUrl: 'https://studio.example.com',
password: 'super-secret', password: 'super-secret',
}) })
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.3.0' })) fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.4.2' }))
const result = await registry.test({ const result = await registry.test({
baseUrl: 'https://relocated.example.com', baseUrl: 'https://relocated.example.com',
@@ -530,7 +530,7 @@ describe('OpenCodeServerRegistry', () => {
baseUrl: 'https://studio.example.com', baseUrl: 'https://studio.example.com',
password: 'super-secret', password: 'super-secret',
}) })
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.3.0' })) fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.4.2' }))
await registry.test({ await registry.test({
baseUrl: 'https://studio.example.com', baseUrl: 'https://studio.example.com',
+2 -2
View File
@@ -4,10 +4,10 @@ import { mkdtemp, rm } from 'fs/promises'
import { vi } from 'vitest' import { vi } from 'vitest'
import os from 'os' import os from 'os'
import path from 'path' import path from 'path'
import { OPENCODE_SERVER_USERNAME } from '@opencode-manager/shared/opencode' import { OPENCODE_PINNED_VERSION, OPENCODE_SERVER_USERNAME } from '@opencode-manager/shared/opencode'
import { openCodeBinaryCandidates, resolveOpenCode2Binary, startOpenCodeServe, type ServeSpawn } from './opencode-binary' import { openCodeBinaryCandidates, resolveOpenCode2Binary, startOpenCodeServe, type ServeSpawn } from './opencode-binary'
const SUPPORTED_VERSION = '2.3.0' const SUPPORTED_VERSION = OPENCODE_PINNED_VERSION
const PATH_CANDIDATE = 'opencode' const PATH_CANDIDATE = 'opencode'
const ABSOLUTE_CANDIDATES = ['/usr/local/bin/opencode', '/opt/opencode/bin/opencode'] const ABSOLUTE_CANDIDATES = ['/usr/local/bin/opencode', '/opt/opencode/bin/opencode']
+19 -1
View File
@@ -6,12 +6,14 @@ import { randomBytes } from 'crypto'
import os from 'os' import os from 'os'
import path from 'path' import path from 'path'
import { z } from 'zod' import { z } from 'zod'
import { buildOpenCodeBasicAuth, isSameOpenCodeMajor, isSupportedOpenCodeVersion } from '@opencode-manager/shared/opencode' import { buildOpenCodeBasicAuth, isSameOpenCodeMajor, isSupportedOpenCodeVersion, type OpenCodeApi } from '@opencode-manager/shared/opencode'
import { OPENCODE_SERVICE_SERVE_ARGS, getOpenCodeServiceRegistrationPath, writeOpenCodeServiceSettings } from '../../src/services/opencode-service-mode' import { OPENCODE_SERVICE_SERVE_ARGS, getOpenCodeServiceRegistrationPath, writeOpenCodeServiceSettings } from '../../src/services/opencode-service-mode'
const VERSION_TIMEOUT_MS = 5000 const VERSION_TIMEOUT_MS = 5000
const SERVE_READY_TIMEOUT_MS = 60000 const SERVE_READY_TIMEOUT_MS = 60000
const SERVE_POLL_INTERVAL_MS = 250 const SERVE_POLL_INTERVAL_MS = 250
const PLUGIN_LOAD_TIMEOUT_MS = 30000
const PLUGIN_POLL_INTERVAL_MS = 100
const RUN_TIMEOUT_MS = 90000 const RUN_TIMEOUT_MS = 90000
const STOP_TIMEOUT_MS = 5000 const STOP_TIMEOUT_MS = 5000
const KILL_CONFIRM_MS = 2000 const KILL_CONFIRM_MS = 2000
@@ -44,6 +46,22 @@ function delay(ms: number): Promise<void> {
return new Promise((resolve) => setTimeout(resolve, ms)) return new Promise((resolve) => setTimeout(resolve, ms))
} }
export async function waitForOpenCodePluginsLoaded(
client: { api: OpenCodeApi },
timeoutMs: number = PLUGIN_LOAD_TIMEOUT_MS,
): Promise<void> {
const deadline = Date.now() + timeoutMs
while (Date.now() < deadline) {
try {
const { data } = await client.api.plugin.list()
if (data.length > 0) return
} catch {
}
await delay(PLUGIN_POLL_INTERVAL_MS)
}
throw new Error(`OpenCode server plugins did not load within ${timeoutMs}ms`)
}
export function readOpenCodeVersion(binary: string): string | null { export function readOpenCodeVersion(binary: string): string | null {
const result = spawnSync(binary, ['--version'], { encoding: 'utf8', timeout: VERSION_TIMEOUT_MS }) const result = spawnSync(binary, ['--version'], { encoding: 'utf8', timeout: VERSION_TIMEOUT_MS })
if (result.status !== 0) return null if (result.status !== 0) return null
@@ -23,7 +23,7 @@ import { createStubOpenCodeClient } from './stub-opencode-client'
export type OpenCodeServerInfo = Awaited<ReturnType<OpenCodeApi['server']['info']>> export type OpenCodeServerInfo = Awaited<ReturnType<OpenCodeApi['server']['info']>>
export const DEFAULT_SERVER_INFO: OpenCodeServerInfo = { export const DEFAULT_SERVER_INFO: OpenCodeServerInfo = {
version: '2.3.0', version: '2.4.2',
pid: 1234, pid: 1234,
urls: ['http://127.0.0.1:5551'], urls: ['http://127.0.0.1:5551'],
paths: { tmp: '/tmp' }, paths: { tmp: '/tmp' },
+4 -4
View File
@@ -4,7 +4,7 @@ import { createServer, type Server } from 'node:net'
import { join } from 'node:path' import { join } from 'node:path'
import { z } from 'zod' import { z } from 'zod'
import type { AssistantModeStatus } from '@opencode-manager/shared/types' import type { AssistantModeStatus } from '@opencode-manager/shared/types'
import type { OpenCodeLifecycleState, OpenCodeLifecycleStatus } from '@opencode-manager/shared/opencode' import { OPENCODE_MIN_VERSION, OPENCODE_PINNED_VERSION, type OpenCodeLifecycleState, type OpenCodeLifecycleStatus } from '@opencode-manager/shared/opencode'
import type { import type {
BackendApp, BackendApp,
BackendAppDependencies, BackendAppDependencies,
@@ -42,8 +42,8 @@ function lifecycleStatus(state: OpenCodeLifecycleState, healthy: boolean): OpenC
state, state,
healthy, healthy,
port: 5551, port: 5551,
version: '2.3.0', version: OPENCODE_PINNED_VERSION,
minVersion: '2.3.0', minVersion: OPENCODE_MIN_VERSION,
versionSupported: true, versionSupported: true,
lastError: null, lastError: null,
activeRecoveryAction: null, activeRecoveryAction: null,
@@ -149,7 +149,7 @@ describe('backend app wiring', { timeout: 30000 }, () => {
expect(response.status).toBe(200) expect(response.status).toBe(200)
const body = HealthResponseSchema.parse(await response.json()) const body = HealthResponseSchema.parse(await response.json())
expect(body.database).toBe('connected') expect(body.database).toBe('connected')
expect(body.opencodeMinVersion).toBe('2.3.0') expect(body.opencodeMinVersion).toBe(OPENCODE_MIN_VERSION)
}) })
it('creates the workspace directories, AGENTS.md and a seed OpenCode config on startup', async () => { it('creates the workspace directories, AGENTS.md and a seed OpenCode config on startup', async () => {
+33 -33
View File
@@ -179,8 +179,8 @@ describe('Settings routes', () => {
reload = vi.fn(async () => undefined) reload = vi.fn(async () => undefined)
restart = vi.fn(async () => ({ healthy: true })) restart = vi.fn(async () => ({ healthy: true }))
manager = { manager = {
getVersion: vi.fn(() => '2.3.0'), getVersion: vi.fn(() => '2.4.2'),
fetchVersion: vi.fn(async () => '2.3.0'), fetchVersion: vi.fn(async () => '2.4.2'),
clearStartupError: vi.fn(), clearStartupError: vi.fn(),
getLastStartupError: vi.fn(() => null), getLastStartupError: vi.fn(() => null),
markRestartPending: vi.fn(), markRestartPending: vi.fn(),
@@ -200,7 +200,7 @@ describe('Settings routes', () => {
syncManagerGitIdentityConfig: syncIdentity, syncManagerGitIdentityConfig: syncIdentity,
} }
fetchMock = vi.spyOn(globalThis, 'fetch').mockImplementation(async (input) => { fetchMock = vi.spyOn(globalThis, 'fetch').mockImplementation(async (input) => {
if (requestUrl(input) === REGISTRY_URL) return registryResponse(['2.3.0']) if (requestUrl(input) === REGISTRY_URL) return registryResponse(['2.4.2'])
return new Response(null, { status: 404 }) return new Response(null, { status: 404 })
}) })
await writeConfig('opencode.json', '{}') await writeConfig('opencode.json', '{}')
@@ -546,11 +546,11 @@ describe('Settings routes', () => {
describe('OpenCode version routes', () => { describe('OpenCode version routes', () => {
it('lists supported OpenCode 2 releases with the current version', async () => { it('lists supported OpenCode 2 releases with the current version', async () => {
fetchMock.mockImplementation(async () => registryResponse( fetchMock.mockImplementation(async () => registryResponse(
['1.18.32', '2.2.7', '2.3.0', '2.3.1', '2.3.0-beta.1', '3.0.0'], ['1.18.32', '2.2.7', '2.4.2', '2.4.3', '2.4.2-beta.1', '3.0.0'],
{ '2.3.0': '2026-01-02T00:00:00Z', '2.3.1': '2026-01-03T00:00:00Z' }, { '2.4.2': '2026-01-02T00:00:00Z', '2.4.3': '2026-01-03T00:00:00Z' },
)) ))
clearOpenCodeVersionCache() clearOpenCodeVersionCache()
manager.getVersion = vi.fn(() => '2.3.0') manager.getVersion = vi.fn(() => '2.4.2')
settingsApp = createApp() settingsApp = createApp()
const res = await settingsApp.request('/opencode-versions') const res = await settingsApp.request('/opencode-versions')
@@ -558,10 +558,10 @@ describe('Settings routes', () => {
expect(res.status).toBe(200) expect(res.status).toBe(200)
await expect(readJson(res, VersionsSchema)).resolves.toEqual({ await expect(readJson(res, VersionsSchema)).resolves.toEqual({
versions: [ versions: [
{ version: '2.3.1', tag: 'v2.3.1', name: 'v2.3.1', publishedAt: '2026-01-03T00:00:00Z' }, { version: '2.4.3', tag: 'v2.4.3', name: 'v2.4.3', publishedAt: '2026-01-03T00:00:00Z' },
{ version: '2.3.0', tag: 'v2.3.0', name: 'v2.3.0', publishedAt: '2026-01-02T00:00:00Z' }, { version: '2.4.2', tag: 'v2.4.2', name: 'v2.4.2', publishedAt: '2026-01-02T00:00:00Z' },
], ],
currentVersion: '2.3.0', currentVersion: '2.4.2',
}) })
expect(fetchMock).toHaveBeenCalledWith(REGISTRY_URL) expect(fetchMock).toHaveBeenCalledWith(REGISTRY_URL)
}) })
@@ -586,11 +586,11 @@ describe('Settings routes', () => {
}) })
it.each([ it.each([
['an older installable version', '2.1.1', 'OpenCode upgraded from v2.1.1 to v2.3.0 and restarted'], ['an older installable version', '2.1.1', 'OpenCode upgraded from v2.1.1 to v2.4.2 and restarted'],
['an unsupported newer major', '3.0.0', 'OpenCode upgraded from v3.0.0 to v2.3.0 and restarted'], ['an unsupported newer major', '3.0.0', 'OpenCode upgraded from v3.0.0 to v2.4.2 and restarted'],
])('upgrades from %s', async (_label, currentVersion, expectedMessage) => { ])('upgrades from %s', async (_label, currentVersion, expectedMessage) => {
manager.getVersion = vi.fn(() => currentVersion) manager.getVersion = vi.fn(() => currentVersion)
manager.fetchVersion = vi.fn(async () => '2.3.0') manager.fetchVersion = vi.fn(async () => '2.4.2')
settingsApp = createApp() settingsApp = createApp()
const res = await settingsApp.request('/opencode-upgrade', { method: 'POST' }) const res = await settingsApp.request('/opencode-upgrade', { method: 'POST' })
@@ -600,15 +600,15 @@ describe('Settings routes', () => {
success: true, success: true,
upgraded: true, upgraded: true,
oldVersion: currentVersion, oldVersion: currentVersion,
newVersion: '2.3.0', newVersion: '2.4.2',
message: expectedMessage, message: expectedMessage,
}) })
expect(installer).toHaveBeenCalledWith('2.3.0') expect(installer).toHaveBeenCalledWith('2.4.2')
expect(restart).toHaveBeenCalledTimes(1) expect(restart).toHaveBeenCalledTimes(1)
}) })
it('does not install when the current version is already the latest', async () => { it('does not install when the current version is already the latest', async () => {
manager.getVersion = vi.fn(() => '2.3.0') manager.getVersion = vi.fn(() => '2.4.2')
settingsApp = createApp() settingsApp = createApp()
const res = await settingsApp.request('/opencode-upgrade', { method: 'POST' }) const res = await settingsApp.request('/opencode-upgrade', { method: 'POST' })
@@ -634,8 +634,8 @@ describe('Settings routes', () => {
success: true, success: true,
upgraded: true, upgraded: true,
oldVersion: null, oldVersion: null,
newVersion: '2.3.0', newVersion: '2.4.2',
message: 'OpenCode v2.3.0 installed and restarted', message: 'OpenCode v2.4.2 installed and restarted',
}) })
expect(restart).toHaveBeenCalledTimes(1) expect(restart).toHaveBeenCalledTimes(1)
}) })
@@ -656,38 +656,38 @@ describe('Settings routes', () => {
it('installs a requested version and restarts', async () => { it('installs a requested version and restarts', async () => {
manager.getVersion = vi.fn(() => '2.1.1') manager.getVersion = vi.fn(() => '2.1.1')
manager.fetchVersion = vi.fn(async () => '2.3.0') manager.fetchVersion = vi.fn(async () => '2.4.2')
settingsApp = createApp() settingsApp = createApp()
const res = await settingsApp.request('/opencode-install-version', { const res = await settingsApp.request('/opencode-install-version', {
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ version: '2.3.0' }), body: JSON.stringify({ version: '2.4.2' }),
}) })
expect(res.status).toBe(200) expect(res.status).toBe(200)
await expect(readJson(res, UpgradeResultSchema)).resolves.toMatchObject({ await expect(readJson(res, UpgradeResultSchema)).resolves.toMatchObject({
success: true, success: true,
oldVersion: '2.1.1', oldVersion: '2.1.1',
newVersion: '2.3.0', newVersion: '2.4.2',
message: 'OpenCode changed from v2.1.1 to v2.3.0', message: 'OpenCode changed from v2.1.1 to v2.4.2',
}) })
expect(installer).toHaveBeenCalledWith('2.3.0') expect(installer).toHaveBeenCalledWith('2.4.2')
expect(restart).toHaveBeenCalledTimes(1) expect(restart).toHaveBeenCalledTimes(1)
}) })
it('installs the bare version when the request carries a v prefix', async () => { it('installs the bare version when the request carries a v prefix', async () => {
manager.getVersion = vi.fn(() => '2.1.1') manager.getVersion = vi.fn(() => '2.1.1')
manager.fetchVersion = vi.fn(async () => '2.3.0') manager.fetchVersion = vi.fn(async () => '2.4.2')
settingsApp = createApp() settingsApp = createApp()
await settingsApp.request('/opencode-install-version', { await settingsApp.request('/opencode-install-version', {
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ version: 'v2.3.0' }), body: JSON.stringify({ version: 'v2.4.2' }),
}) })
expect(installer).toHaveBeenCalledWith('2.3.0') expect(installer).toHaveBeenCalledWith('2.4.2')
}) })
it('reports failure when the installed version is not the requested one', async () => { it('reports failure when the installed version is not the requested one', async () => {
@@ -698,13 +698,13 @@ describe('Settings routes', () => {
const res = await settingsApp.request('/opencode-install-version', { const res = await settingsApp.request('/opencode-install-version', {
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ version: '2.3.0' }), body: JSON.stringify({ version: '2.4.2' }),
}) })
expect(res.status).toBe(400) expect(res.status).toBe(400)
const body = await readJson(res, UpgradeResultSchema) const body = await readJson(res, UpgradeResultSchema)
expect(body.success).toBe(false) expect(body.success).toBe(false)
expect(String(body.details)).toContain('did not result in version 2.3.0') expect(String(body.details)).toContain('did not result in version 2.4.2')
expect(body.newVersion).toBe('2.1.1') expect(body.newVersion).toBe('2.1.1')
}) })
@@ -713,10 +713,10 @@ describe('Settings routes', () => {
['a missing version', undefined, null], ['a missing version', undefined, null],
['a command injection attempt', '1.2.27; cat /etc/passwd; #', null], ['a command injection attempt', '1.2.27; cat /etc/passwd; #', null],
['an invalid format', 'invalid', null], ['an invalid format', 'invalid', null],
['a prerelease', '2.3.0-beta.1', null], ['a prerelease', '2.4.2-beta.1', null],
['an OpenCode 1.x version', '1.18.32', 'OpenCode 1.18.32 is not supported; OpenCode Manager requires OpenCode >=2.3.0 <3.0.0'], ['an OpenCode 1.x version', '1.18.32', 'OpenCode 1.18.32 is not supported; OpenCode Manager requires OpenCode >=2.4.2 <3.0.0'],
['a version below the supported range', '2.2.7', 'OpenCode 2.2.7 is not supported; OpenCode Manager requires OpenCode >=2.3.0 <3.0.0'], ['a version below the supported range', '2.2.7', 'OpenCode 2.2.7 is not supported; OpenCode Manager requires OpenCode >=2.4.2 <3.0.0'],
['a version above the supported range', '3.0.0', 'OpenCode 3.0.0 is not supported; OpenCode Manager requires OpenCode >=2.3.0 <3.0.0'], ['a version above the supported range', '3.0.0', 'OpenCode 3.0.0 is not supported; OpenCode Manager requires OpenCode >=2.4.2 <3.0.0'],
])('rejects %s before installing', async (_label, version, expectedError) => { ])('rejects %s before installing', async (_label, version, expectedError) => {
const res = await settingsApp.request('/opencode-install-version', { const res = await settingsApp.request('/opencode-install-version', {
method: 'POST', method: 'POST',
@@ -803,7 +803,7 @@ describe('Settings routes', () => {
const res = await settingsApp.request('/opencode-install-version', { const res = await settingsApp.request('/opencode-install-version', {
method: 'POST', method: 'POST',
headers: { 'Content-Type': 'application/json' }, headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ version: '2.3.0' }), body: JSON.stringify({ version: '2.4.2' }),
}) })
expect(res.status).toBe(400) expect(res.status).toBe(400)
@@ -813,7 +813,7 @@ describe('Settings routes', () => {
it.each([ it.each([
['/opencode-upgrade', undefined], ['/opencode-upgrade', undefined],
['/opencode-install-version', JSON.stringify({ version: '2.3.0' })], ['/opencode-install-version', JSON.stringify({ version: '2.4.2' })],
])('refuses %s while OPENCODE_BIN manages the binary', async (path, body) => { ])('refuses %s while OPENCODE_BIN manages the binary', async (path, body) => {
process.env.OPENCODE_BIN = '/usr/local/bin/opencode' process.env.OPENCODE_BIN = '/usr/local/bin/opencode'
@@ -131,46 +131,46 @@ describe('resolveOpenCodeInstallTarget', () => {
describe('installOpenCodeVersion', () => { describe('installOpenCodeVersion', () => {
it('downloads, verifies and installs the requested version', async () => { it('downloads, verifies and installs the requested version', async () => {
const homeDirectory = join(workDirectory, 'home') const homeDirectory = join(workDirectory, 'home')
const archivePath = createArchive(workDirectory, '2.3.0') const archivePath = createArchive(workDirectory, '2.4.2')
const { calls, fetchFn } = createFetch(archivePath) const { calls, fetchFn } = createFetch(archivePath)
const installedPath = await installOpenCodeVersion('2.3.0', { fetch: fetchFn, homeDirectory, target: linuxTarget }) const installedPath = await installOpenCodeVersion('2.4.2', { fetch: fetchFn, homeDirectory, target: linuxTarget })
expect(installedPath).toBe(resolveOpenCodeBinaryPath(homeDirectory)) expect(installedPath).toBe(resolveOpenCodeBinaryPath(homeDirectory))
expect(calls).toEqual(['https://opencode.ai/files/bin/2.3.0/opencode-linux-x64.tar.gz']) expect(calls).toEqual(['https://opencode.ai/files/bin/2.4.2/opencode-linux-x64.tar.gz'])
expect(statSync(installedPath).mode & 0o777).toBe(0o755) expect(statSync(installedPath).mode & 0o777).toBe(0o755)
expect(readFileSync(installedPath, 'utf-8')).toContain('2.3.0') expect(readFileSync(installedPath, 'utf-8')).toContain('2.4.2')
}) })
it('requests the musl asset for a musl linux target', async () => { it('requests the musl asset for a musl linux target', async () => {
const homeDirectory = join(workDirectory, 'home') const homeDirectory = join(workDirectory, 'home')
const archivePath = createArchive(workDirectory, '2.3.0') const archivePath = createArchive(workDirectory, '2.4.2')
const { calls, fetchFn } = createFetch(archivePath) const { calls, fetchFn } = createFetch(archivePath)
await installOpenCodeVersion('2.3.0', { await installOpenCodeVersion('2.4.2', {
fetch: fetchFn, fetch: fetchFn,
homeDirectory, homeDirectory,
target: { platform: 'linux', arch: 'arm64', musl: true }, target: { platform: 'linux', arch: 'arm64', musl: true },
}) })
expect(calls).toEqual(['https://opencode.ai/files/bin/2.3.0/opencode-linux-arm64-musl.tar.gz']) expect(calls).toEqual(['https://opencode.ai/files/bin/2.4.2/opencode-linux-arm64-musl.tar.gz'])
}) })
it('extracts the darwin zip asset and installs it', async () => { it('extracts the darwin zip asset and installs it', async () => {
const homeDirectory = join(workDirectory, 'home') const homeDirectory = join(workDirectory, 'home')
const archivePath = createDarwinArchive(workDirectory, '2.3.0') const archivePath = createDarwinArchive(workDirectory, '2.4.2')
const { calls, fetchFn } = createFetch(archivePath) const { calls, fetchFn } = createFetch(archivePath)
const installedPath = await installOpenCodeVersion('2.3.0', { const installedPath = await installOpenCodeVersion('2.4.2', {
fetch: fetchFn, fetch: fetchFn,
homeDirectory, homeDirectory,
target: { platform: 'darwin', arch: 'arm64', musl: false }, target: { platform: 'darwin', arch: 'arm64', musl: false },
}) })
expect(calls).toEqual(['https://opencode.ai/files/bin/2.3.0/opencode-darwin-arm64.zip']) expect(calls).toEqual(['https://opencode.ai/files/bin/2.4.2/opencode-darwin-arm64.zip'])
expect(installedPath).toBe(resolveOpenCodeBinaryPath(homeDirectory)) expect(installedPath).toBe(resolveOpenCodeBinaryPath(homeDirectory))
expect(statSync(installedPath).mode & 0o777).toBe(0o755) expect(statSync(installedPath).mode & 0o777).toBe(0o755)
expect(readFileSync(installedPath, 'utf-8')).toContain('2.3.0') expect(readFileSync(installedPath, 'utf-8')).toContain('2.4.2')
}) })
it('rejects an OpenCode 1.x version before downloading anything', async () => { it('rejects an OpenCode 1.x version before downloading anything', async () => {
@@ -178,18 +178,18 @@ describe('installOpenCodeVersion', () => {
const { calls, fetchFn } = createFetch(null) const { calls, fetchFn } = createFetch(null)
await expect(installOpenCodeVersion('1.18.32', { fetch: fetchFn, homeDirectory, target: linuxTarget })) await expect(installOpenCodeVersion('1.18.32', { fetch: fetchFn, homeDirectory, target: linuxTarget }))
.rejects.toThrow('OpenCode 1.18.32 is not supported; OpenCode Manager requires OpenCode >=2.3.0 <3.0.0') .rejects.toThrow('OpenCode 1.18.32 is not supported; OpenCode Manager requires OpenCode >=2.4.2 <3.0.0')
expect(calls).toEqual([]) expect(calls).toEqual([])
}) })
it.each(['2.2.7', '3.0.0', '2.3.0-beta.1', '2.3.0; rm -rf /'])( it.each(['2.2.7', '3.0.0', '2.4.2-beta.1', '2.4.2; rm -rf /'])(
'rejects %s outside the supported stable range before downloading anything', 'rejects %s outside the supported stable range before downloading anything',
async (version) => { async (version) => {
const homeDirectory = join(workDirectory, 'home') const homeDirectory = join(workDirectory, 'home')
const { calls, fetchFn } = createFetch(null) const { calls, fetchFn } = createFetch(null)
await expect(installOpenCodeVersion(version, { fetch: fetchFn, homeDirectory, target: linuxTarget })) await expect(installOpenCodeVersion(version, { fetch: fetchFn, homeDirectory, target: linuxTarget }))
.rejects.toThrow(/requires OpenCode >=2\.3\.0 <3\.0\.0/) .rejects.toThrow(/requires OpenCode >=2\.4\.2 <3\.0\.0/)
expect(calls).toEqual([]) expect(calls).toEqual([])
}, },
) )
@@ -198,18 +198,18 @@ describe('installOpenCodeVersion', () => {
const homeDirectory = join(workDirectory, 'home') const homeDirectory = join(workDirectory, 'home')
const { fetchFn } = createFetch(null, 404) const { fetchFn } = createFetch(null, 404)
await expect(installOpenCodeVersion('2.3.0', { fetch: fetchFn, homeDirectory, target: linuxTarget })) await expect(installOpenCodeVersion('2.4.2', { fetch: fetchFn, homeDirectory, target: linuxTarget }))
.rejects.toThrow(/404/) .rejects.toThrow(/404/)
expect(() => statSync(resolveOpenCodeBinaryPath(homeDirectory))).toThrow() expect(() => statSync(resolveOpenCodeBinaryPath(homeDirectory))).toThrow()
}) })
it('fails and leaves no binary behind when the archive reports a different version', async () => { it('fails and leaves no binary behind when the archive reports a different version', async () => {
const homeDirectory = join(workDirectory, 'home') const homeDirectory = join(workDirectory, 'home')
const archivePath = createArchive(workDirectory, '2.3.1') const archivePath = createArchive(workDirectory, '2.4.3')
const { fetchFn } = createFetch(archivePath) const { fetchFn } = createFetch(archivePath)
await expect(installOpenCodeVersion('2.3.0', { fetch: fetchFn, homeDirectory, target: linuxTarget })) await expect(installOpenCodeVersion('2.4.2', { fetch: fetchFn, homeDirectory, target: linuxTarget }))
.rejects.toThrow(/2\.3\.0/) .rejects.toThrow(/2\.4\.2/)
expect(() => statSync(resolveOpenCodeBinaryPath(homeDirectory))).toThrow() expect(() => statSync(resolveOpenCodeBinaryPath(homeDirectory))).toThrow()
}) })
@@ -218,21 +218,21 @@ describe('installOpenCodeVersion', () => {
mkdirSync(join(homeDirectory, '.opencode', 'bin'), { recursive: true }) mkdirSync(join(homeDirectory, '.opencode', 'bin'), { recursive: true })
writeFileSync(resolveOpenCodeBinaryPath(homeDirectory), '#!/bin/sh\necho "opencode v2.1.1"\n') writeFileSync(resolveOpenCodeBinaryPath(homeDirectory), '#!/bin/sh\necho "opencode v2.1.1"\n')
const archivePath = createArchive(workDirectory, '2.3.0') const archivePath = createArchive(workDirectory, '2.4.2')
const { fetchFn } = createFetch(archivePath) const { fetchFn } = createFetch(archivePath)
await installOpenCodeVersion('2.3.0', { fetch: fetchFn, homeDirectory, target: linuxTarget }) await installOpenCodeVersion('2.4.2', { fetch: fetchFn, homeDirectory, target: linuxTarget })
expect(readFileSync(resolveOpenCodeBinaryPath(homeDirectory), 'utf-8')).toContain('2.3.0') expect(readFileSync(resolveOpenCodeBinaryPath(homeDirectory), 'utf-8')).toContain('2.4.2')
}) })
it('cleans up its staging directory after a successful install', async () => { it('cleans up its staging directory after a successful install', async () => {
const homeDirectory = join(workDirectory, 'home') const homeDirectory = join(workDirectory, 'home')
const archivePath = createArchive(workDirectory, '2.3.0') const archivePath = createArchive(workDirectory, '2.4.2')
const { fetchFn } = createFetch(archivePath) const { fetchFn } = createFetch(archivePath)
const before = countStagingDirectories() const before = countStagingDirectories()
await installOpenCodeVersion('2.3.0', { fetch: fetchFn, homeDirectory, target: linuxTarget }) await installOpenCodeVersion('2.4.2', { fetch: fetchFn, homeDirectory, target: linuxTarget })
expect(countStagingDirectories()).toBe(before) expect(countStagingDirectories()).toBe(before)
}) })
@@ -244,15 +244,15 @@ describe('listOpenCodeVersions', () => {
'1.18.32': {}, '1.18.32': {},
'2.0.14': {}, '2.0.14': {},
'2.1.1': {}, '2.1.1': {},
'2.3.0': {}, '2.4.2': {},
'2.3.1': {}, '2.4.3': {},
'2.3.0-beta.1': {}, '2.4.2-beta.1': {},
'3.0.0': {}, '3.0.0': {},
'not-a-version': {}, 'not-a-version': {},
}, },
time: { time: {
'2.3.0': '2026-02-01T00:00:00.000Z', '2.4.2': '2026-02-01T00:00:00.000Z',
'2.3.1': '2026-03-01T00:00:00.000Z', '2.4.3': '2026-03-01T00:00:00.000Z',
}, },
} }
@@ -262,20 +262,20 @@ describe('listOpenCodeVersions', () => {
const versions = await listOpenCodeVersions({ fetch: fetchFn }) const versions = await listOpenCodeVersions({ fetch: fetchFn })
expect(versions).toEqual([ expect(versions).toEqual([
{ version: '2.3.1', publishedAt: '2026-03-01T00:00:00.000Z' }, { version: '2.4.3', publishedAt: '2026-03-01T00:00:00.000Z' },
{ version: '2.3.0', publishedAt: '2026-02-01T00:00:00.000Z' }, { version: '2.4.2', publishedAt: '2026-02-01T00:00:00.000Z' },
]) ])
expect(calls).toEqual(['https://registry.npmjs.org/@opencode/cli']) expect(calls).toEqual(['https://registry.npmjs.org/@opencode/cli'])
}) })
it('reports a null publishedAt when the registry has no timestamp for a version', async () => { it('reports a null publishedAt when the registry has no timestamp for a version', async () => {
const { fetchFn } = createRegistryFetch({ const { fetchFn } = createRegistryFetch({
versions: { '2.3.0': {} }, versions: { '2.4.2': {} },
time: {}, time: {},
}) })
await expect(listOpenCodeVersions({ fetch: fetchFn })).resolves.toEqual([ await expect(listOpenCodeVersions({ fetch: fetchFn })).resolves.toEqual([
{ version: '2.3.0', publishedAt: null }, { version: '2.4.2', publishedAt: null },
]) ])
}) })
@@ -293,14 +293,14 @@ describe('listOpenCodeVersions', () => {
it('refreshes the list once the five minute cache expires', async () => { it('refreshes the list once the five minute cache expires', async () => {
const stale = createRegistryFetch(registryPayload) const stale = createRegistryFetch(registryPayload)
const fresh = createRegistryFetch({ versions: { '2.3.1': {} }, time: {} }) const fresh = createRegistryFetch({ versions: { '2.4.3': {} }, time: {} })
let now = 1_000_000 let now = 1_000_000
await listOpenCodeVersions({ fetch: stale.fetchFn, now: () => now }) await listOpenCodeVersions({ fetch: stale.fetchFn, now: () => now })
now += 5 * 60 * 1000 now += 5 * 60 * 1000
const refreshed = await listOpenCodeVersions({ fetch: fresh.fetchFn, now: () => now }) const refreshed = await listOpenCodeVersions({ fetch: fresh.fetchFn, now: () => now })
expect(refreshed).toEqual([{ version: '2.3.1', publishedAt: null }]) expect(refreshed).toEqual([{ version: '2.4.3', publishedAt: null }])
expect(stale.calls).toHaveLength(1) expect(stale.calls).toHaveLength(1)
expect(fresh.calls).toHaveLength(1) expect(fresh.calls).toHaveLength(1)
}) })
@@ -331,7 +331,7 @@ describe('OpenCodeInstallError swap signalling', () => {
const homeDirectory = join(workDirectory, 'home') const homeDirectory = join(workDirectory, 'home')
const { fetchFn } = createFetch(null, 404) const { fetchFn } = createFetch(null, 404)
const promise = installOpenCodeVersion('2.3.0', { fetch: fetchFn, homeDirectory, target: linuxTarget }) const promise = installOpenCodeVersion('2.4.2', { fetch: fetchFn, homeDirectory, target: linuxTarget })
await expect(promise).rejects.toBeInstanceOf(OpenCodeInstallError) await expect(promise).rejects.toBeInstanceOf(OpenCodeInstallError)
await expect(promise).rejects.toMatchObject({ swapStarted: false }) await expect(promise).rejects.toMatchObject({ swapStarted: false })
@@ -341,10 +341,10 @@ describe('OpenCodeInstallError swap signalling', () => {
it('marks a failure while replacing the binary as having started the binary swap', async () => { it('marks a failure while replacing the binary as having started the binary swap', async () => {
const homeDirectory = join(workDirectory, 'home') const homeDirectory = join(workDirectory, 'home')
mkdirSync(resolveOpenCodeBinaryPath(homeDirectory), { recursive: true }) mkdirSync(resolveOpenCodeBinaryPath(homeDirectory), { recursive: true })
const archivePath = createArchive(workDirectory, '2.3.0') const archivePath = createArchive(workDirectory, '2.4.2')
const { fetchFn } = createFetch(archivePath) const { fetchFn } = createFetch(archivePath)
const promise = installOpenCodeVersion('2.3.0', { fetch: fetchFn, homeDirectory, target: linuxTarget }) const promise = installOpenCodeVersion('2.4.2', { fetch: fetchFn, homeDirectory, target: linuxTarget })
await expect(promise).rejects.toBeInstanceOf(OpenCodeInstallError) await expect(promise).rejects.toBeInstanceOf(OpenCodeInstallError)
await expect(promise).rejects.toMatchObject({ swapStarted: true }) await expect(promise).rejects.toMatchObject({ swapStarted: true })
@@ -703,12 +703,12 @@ describe('OpenCodeServerManager - plugins and version', () => {
it.each([true, false])('starts on a supported OpenCode 2 build (enforced: %s)', async (enforced) => { it.each([true, false])('starts on a supported OpenCode 2 build (enforced: %s)', async (enforced) => {
context.harness.sandbox.enabled = enforced context.harness.sandbox.enabled = enforced
context.harness.ownPortAfterSpawn() context.harness.ownPortAfterSpawn()
context.harness.readVersionOutput.mockReturnValue({ stdout: 'opencode v2.3.0\n', stderr: '' }) context.harness.readVersionOutput.mockReturnValue({ stdout: 'opencode v2.4.2\n', stderr: '' })
await context.harness.manager.start() await context.harness.manager.start()
expect(context.harness.spawnServer).toHaveBeenCalledTimes(1) expect(context.harness.spawnServer).toHaveBeenCalledTimes(1)
expect(context.harness.manager.getVersion()).toBe('2.3.0') expect(context.harness.manager.getVersion()).toBe('2.4.2')
expect(context.harness.manager.isVersionSupported()).toBe(true) expect(context.harness.manager.isVersionSupported()).toBe(true)
}) })
@@ -717,7 +717,7 @@ describe('OpenCodeServerManager - plugins and version', () => {
await expect(context.harness.manager.start()).rejects.toThrow('OpenCode 1.18.32 is not supported') await expect(context.harness.manager.start()).rejects.toThrow('OpenCode 1.18.32 is not supported')
expect(context.harness.spawnServer).not.toHaveBeenCalled() expect(context.harness.spawnServer).not.toHaveBeenCalled()
expect(context.harness.manager.getLastStartupError()).toContain('requires OpenCode >=2.3.0 <3.0.0') expect(context.harness.manager.getLastStartupError()).toContain('requires OpenCode >=2.4.2 <3.0.0')
expect(context.harness.manager.isLastStartupErrorNonRecoverable()).toBe(true) expect(context.harness.manager.isLastStartupErrorNonRecoverable()).toBe(true)
}) })
}) })
+20 -18
View File
@@ -52,10 +52,10 @@ function createFetchSpy() {
describe('OpenCode v2 contract', () => { describe('OpenCode v2 contract', () => {
describe('version policy', () => { describe('version policy', () => {
it('pins the built-against version, keeps a separate supported floor and fixes the V2 server username', () => { it('pins the built-against version, keeps a separate supported floor and fixes the V2 server username', () => {
expect(OPENCODE_PINNED_VERSION).toBe('2.3.0') expect(OPENCODE_PINNED_VERSION).toBe('2.4.2')
expect(OPENCODE_MIN_VERSION).toBe('2.3.0') expect(OPENCODE_MIN_VERSION).toBe('2.4.2')
expect(compareOpenCodeVersions(OPENCODE_PINNED_VERSION, OPENCODE_MIN_VERSION)).toBeGreaterThanOrEqual(0) expect(compareOpenCodeVersions(OPENCODE_PINNED_VERSION, OPENCODE_MIN_VERSION)).toBeGreaterThanOrEqual(0)
expect(OPENCODE_SUPPORTED_VERSION_RANGE).toBe('>=2.3.0 <3.0.0') expect(OPENCODE_SUPPORTED_VERSION_RANGE).toBe('>=2.4.2 <3.0.0')
expect(OPENCODE_SERVER_USERNAME).toBe('opencode') expect(OPENCODE_SERVER_USERNAME).toBe('opencode')
}) })
@@ -69,40 +69,42 @@ describe('OpenCode v2 contract', () => {
expect(isSupportedOpenCodeVersion('2.2.4')).toBe(false) expect(isSupportedOpenCodeVersion('2.2.4')).toBe(false)
expect(isSupportedOpenCodeVersion('2.2.5')).toBe(false) expect(isSupportedOpenCodeVersion('2.2.5')).toBe(false)
expect(isSupportedOpenCodeVersion('2.2.6')).toBe(false) expect(isSupportedOpenCodeVersion('2.2.6')).toBe(false)
expect(isSupportedOpenCodeVersion('2.3.0')).toBe(true) expect(isSupportedOpenCodeVersion('2.3.0')).toBe(false)
expect(isSupportedOpenCodeVersion('2.3.1')).toBe(true) expect(isSupportedOpenCodeVersion('2.3.1')).toBe(false)
expect(isSupportedOpenCodeVersion('v2.3.0')).toBe(true) expect(isSupportedOpenCodeVersion('2.4.2')).toBe(true)
expect(isSupportedOpenCodeVersion(' v2.3.0 ')).toBe(true) expect(isSupportedOpenCodeVersion('2.4.3')).toBe(true)
expect(isSupportedOpenCodeVersion('v2.4.2')).toBe(true)
expect(isSupportedOpenCodeVersion(' v2.4.2 ')).toBe(true)
expect(isSupportedOpenCodeVersion('3.0.0')).toBe(false) expect(isSupportedOpenCodeVersion('3.0.0')).toBe(false)
expect(isSupportedOpenCodeVersion('3.1.0')).toBe(false) expect(isSupportedOpenCodeVersion('3.1.0')).toBe(false)
expect(isSupportedOpenCodeVersion('not-a-version')).toBe(false) expect(isSupportedOpenCodeVersion('not-a-version')).toBe(false)
}) })
it('rejects prereleases of the pinned version', () => { it('rejects prereleases of the pinned version', () => {
expect(isSupportedOpenCodeVersion('2.3.0-alpha.1')).toBe(false) expect(isSupportedOpenCodeVersion('2.4.2-alpha.1')).toBe(false)
expect(isSupportedOpenCodeVersion('2.3.0-alpha')).toBe(false) expect(isSupportedOpenCodeVersion('2.4.2-alpha')).toBe(false)
expect(isSupportedOpenCodeVersion('2.3.0-rc.1+build.5')).toBe(false) expect(isSupportedOpenCodeVersion('2.4.2-rc.1+build.5')).toBe(false)
expect(isSupportedOpenCodeVersion('2.3.0-0')).toBe(false) expect(isSupportedOpenCodeVersion('2.4.2-0')).toBe(false)
}) })
it('accepts prereleases of higher numeric cores within the pinned major', () => { it('accepts prereleases of higher numeric cores within the pinned major', () => {
expect(isSupportedOpenCodeVersion('2.3.1-beta.1')).toBe(true) expect(isSupportedOpenCodeVersion('2.4.3-beta.1')).toBe(true)
expect(isSupportedOpenCodeVersion('2.3.1-rc.2')).toBe(true) expect(isSupportedOpenCodeVersion('2.4.3-rc.2')).toBe(true)
expect(isSupportedOpenCodeVersion('3.0.0-beta.1')).toBe(false) expect(isSupportedOpenCodeVersion('3.0.0-beta.1')).toBe(false)
}) })
it('ignores build metadata for precedence', () => { it('ignores build metadata for precedence', () => {
expect(isSupportedOpenCodeVersion('2.3.0+build')).toBe(true) expect(isSupportedOpenCodeVersion('2.4.2+build')).toBe(true)
expect(isSupportedOpenCodeVersion('2.3.0+2.0.0')).toBe(true) expect(isSupportedOpenCodeVersion('2.4.2+2.0.0')).toBe(true)
}) })
it('rejects malformed and incomplete versions', () => { it('rejects malformed and incomplete versions', () => {
expect(isSupportedOpenCodeVersion('2garbage')).toBe(false) expect(isSupportedOpenCodeVersion('2garbage')).toBe(false)
expect(isSupportedOpenCodeVersion('2')).toBe(false) expect(isSupportedOpenCodeVersion('2')).toBe(false)
expect(isSupportedOpenCodeVersion('2.0')).toBe(false) expect(isSupportedOpenCodeVersion('2.0')).toBe(false)
expect(isSupportedOpenCodeVersion('2.3.0.1')).toBe(false) expect(isSupportedOpenCodeVersion('2.4.2.1')).toBe(false)
expect(isSupportedOpenCodeVersion('02.2.1')).toBe(false) expect(isSupportedOpenCodeVersion('02.2.1')).toBe(false)
expect(isSupportedOpenCodeVersion('2.3.0-alpha..1')).toBe(false) expect(isSupportedOpenCodeVersion('2.4.2-alpha..1')).toBe(false)
expect(isSupportedOpenCodeVersion('')).toBe(false) expect(isSupportedOpenCodeVersion('')).toBe(false)
}) })
@@ -117,7 +119,7 @@ describe('OpenCode v2 contract', () => {
it('describes the supported range for unsupported versions', () => { it('describes the supported range for unsupported versions', () => {
expect(describeUnsupportedOpenCodeVersion('3.0.0')).toBe( expect(describeUnsupportedOpenCodeVersion('3.0.0')).toBe(
'OpenCode 3.0.0 is not supported; OpenCode Manager requires OpenCode >=2.3.0 <3.0.0', 'OpenCode 3.0.0 is not supported; OpenCode Manager requires OpenCode >=2.4.2 <3.0.0',
) )
}) })
}) })
+3 -3
View File
@@ -10,7 +10,7 @@ to the local working tree.
| ocm | OpenCode Manager | Local OpenCode | | ocm | OpenCode Manager | Local OpenCode |
|---|---|---| |---|---|---|
| 0.7.x | >= 0.19.0 | >= 2.3.0, < 3 | | 0.7.x | >= 0.19.0 | >= 2.4.2, < 3 |
| 0.6.x | >= 0.19.0 | >= 2.2.5, < 3 | | 0.6.x | >= 0.19.0 | >= 2.2.5, < 3 |
| 0.5.x | >= 0.19.0 | >= 2.2.0, < 3 | | 0.5.x | >= 0.19.0 | >= 2.2.0, < 3 |
| 0.4.x | >= 0.19.0 | >= 2.0.15, < 3 | | 0.4.x | >= 0.19.0 | >= 2.0.15, < 3 |
@@ -26,7 +26,7 @@ Use ocm 0.2.x with OpenCode Manager < 0.19.0 and OpenCode 1.x, installed pinned
`@opencode-manager/ocm-cli@0.2`. ocm is published together with each OpenCode Manager `@opencode-manager/ocm-cli@0.2`. ocm is published together with each OpenCode Manager
release. release.
From ocm 0.7.0, the TUI plugin is built against `@opencode/plugin` 2.3.0 and OpenTUI 0.8.4 and declares an `@opencode/theme` peer of `>=2.3.0`, so it requires a local OpenCode >= 2.3.0. Stay on ocm 0.6.x with OpenCode 2.2.5 to 2.2.x. From ocm 0.7.0, the TUI plugin is built against `@opencode/plugin` 2.4.2 and OpenTUI 0.8.4 and declares an `@opencode/theme` peer of `>=2.4.2`, so it requires a local OpenCode >= 2.4.2. Stay on ocm 0.6.x with OpenCode 2.2.5 to 2.2.x.
From ocm 0.6.0, the TUI plugin is built against `@opencode/plugin` 2.2.5 and From ocm 0.6.0, the TUI plugin is built against `@opencode/plugin` 2.2.5 and
OpenTUI 0.8 and declares an `@opencode/theme` peer of `>=2.2.5`, so it requires OpenTUI 0.8 and declares an `@opencode/theme` peer of `>=2.2.5`, so it requires
@@ -327,7 +327,7 @@ global installs); the plugin surface is TUI-only.
## Requirements ## Requirements
- macOS or Linux (Windows is unsupported) - macOS or Linux (Windows is unsupported)
- OpenCode >= 2.3.0 (same major, 2.x) available on `PATH` for the TUI plugin - OpenCode >= 2.4.2 (same major, 2.x) available on `PATH` for the TUI plugin
- Node available on `PATH` (runs the `ocm` binary) - Node available on `PATH` (runs the `ocm` binary)
- OpenCode Manager >= 0.19.0 - OpenCode Manager >= 0.19.0
- `git` and `tar` (with gzip support, i.e. the `-z` flag) available on `PATH` - `git` and `tar` (with gzip support, i.e. the `-z` flag) available on `PATH`
+1 -1
View File
@@ -18,7 +18,7 @@
} }
}, },
"peerDependencies": { "peerDependencies": {
"@opencode/theme": ">=2.3.0 <3.0.0", "@opencode/theme": ">=2.4.2 <3.0.0",
"@opentui/core": ">=0.8.0 <0.9.0", "@opentui/core": ">=0.8.0 <0.9.0",
"@opentui/solid": ">=0.8.0 <0.9.0", "@opentui/solid": ">=0.8.0 <0.9.0",
"solid-js": ">=1.9.0" "solid-js": ">=1.9.0"
+137 -47
View File
@@ -7,17 +7,17 @@ settings:
catalogs: catalogs:
default: default:
'@opencode/client': '@opencode/client':
specifier: 2.3.0 specifier: 2.4.2
version: 2.3.0 version: 2.4.2
'@opencode/plugin': '@opencode/plugin':
specifier: 2.3.0 specifier: 2.4.2
version: 2.3.0 version: 2.4.2
'@opencode/schema': '@opencode/schema':
specifier: 2.3.0 specifier: 2.4.2
version: 2.3.0 version: 2.4.2
'@opencode/theme': '@opencode/theme':
specifier: 2.3.0 specifier: 2.4.2
version: 2.3.0 version: 2.4.2
'@opentui/core': '@opentui/core':
specifier: 0.8.4 specifier: 0.8.4
version: 0.8.4 version: 0.8.4
@@ -318,10 +318,10 @@ importers:
version: link:../shared version: link:../shared
'@opencode/plugin': '@opencode/plugin':
specifier: 'catalog:' specifier: 'catalog:'
version: 2.3.0(@opencode/theme@2.3.0(typescript@5.9.3)(web-tree-sitter@0.25.10))(@opentelemetry/semantic-conventions@1.43.0)(@opentui/core@0.8.4(typescript@5.9.3)(web-tree-sitter@0.25.10))(@opentui/solid@0.8.4(solid-js@1.9.18)(typescript@5.9.3)(web-tree-sitter@0.25.10))(redis@6.2.1(@opentelemetry/api@1.9.0))(solid-js@1.9.18)(vite@7.3.0(@types/node@22.19.19)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.46.0)(yaml@2.9.0)) version: 2.4.2(@opencode/theme@2.4.2(typescript@5.9.3)(web-tree-sitter@0.25.10))(@opentelemetry/semantic-conventions@1.43.0)(@opentui/core@0.8.4(typescript@5.9.3)(web-tree-sitter@0.25.10))(@opentui/solid@0.8.4(solid-js@1.9.18)(typescript@5.9.3)(web-tree-sitter@0.25.10))(redis@6.2.1(@opentelemetry/api@1.9.0))(solid-js@1.9.18)(vite@7.3.0(@types/node@22.19.19)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.46.0)(yaml@2.9.0))
'@opencode/theme': '@opencode/theme':
specifier: 'catalog:' specifier: 'catalog:'
version: 2.3.0(typescript@5.9.3)(web-tree-sitter@0.25.10) version: 2.4.2(typescript@5.9.3)(web-tree-sitter@0.25.10)
'@opentui/core': '@opentui/core':
specifier: 'catalog:' specifier: 'catalog:'
version: 0.8.4(typescript@5.9.3)(web-tree-sitter@0.25.10) version: 0.8.4(typescript@5.9.3)(web-tree-sitter@0.25.10)
@@ -357,10 +357,10 @@ importers:
dependencies: dependencies:
'@opencode/client': '@opencode/client':
specifier: 'catalog:' specifier: 'catalog:'
version: 2.3.0(effect@4.1.0)(solid-js@1.9.18) version: 2.4.2(effect@4.1.0)(solid-js@1.9.18)
'@opencode/schema': '@opencode/schema':
specifier: 'catalog:' specifier: 'catalog:'
version: 2.3.0 version: 2.4.2
effect: effect:
specifier: 'catalog:' specifier: 'catalog:'
version: 4.1.0 version: 4.1.0
@@ -1189,11 +1189,11 @@ packages:
resolution: {integrity: sha512-mGUWr1uMnf0le2TwfOZY4SFxZGXGfm4Jtay/nwAa2FLNAKXUoUwaGwBMNH36UHPtinWfTSJ3nqFQr0091CxVGg==} resolution: {integrity: sha512-mGUWr1uMnf0le2TwfOZY4SFxZGXGfm4Jtay/nwAa2FLNAKXUoUwaGwBMNH36UHPtinWfTSJ3nqFQr0091CxVGg==}
engines: {node: ^20.17.0 || >=22.9.0} engines: {node: ^20.17.0 || >=22.9.0}
'@opencode/ai@2.3.0': '@opencode/ai@2.4.2':
resolution: {integrity: sha512-CsaY18G5cXtNvOgvONaxguFeaWf+gENSYKzDnYIIREpoSLjLm9oF2v+adaE4nUozM1qIMR4+s23VOViaRypFLw==} resolution: {integrity: sha512-p3tOtq8jewfxMesBDo2ZSsc77ZqoB5qbTZcuUrNcner4KHoex4iwhsNTw0CWkUhxkBwWH7xJjkv3+eXXzxf4+w==}
'@opencode/client@2.3.0': '@opencode/client@2.4.2':
resolution: {integrity: sha512-xu74XGiYIqLZ2FzIrtjaR5UNWWXY3fRln0WLgZoQTR/wWMgG+T9XGQQGCl8ry8jnCFsJVokiHemBqft9oMzC1A==} resolution: {integrity: sha512-Wnb/wMl3HzPHu7WR4DYc4TkziFDdB6xUpNoLGGz7SMUIbBWPYhV2wPRenR7UEeMdlHlKgaYcxixTH80H+5YP2g==}
peerDependencies: peerDependencies:
effect: 4.1.0 effect: 4.1.0
solid-js: '>=1.9.0' solid-js: '>=1.9.0'
@@ -1203,12 +1203,12 @@ packages:
solid-js: solid-js:
optional: true optional: true
'@opencode/plugin@2.3.0': '@opencode/plugin@2.4.2':
resolution: {integrity: sha512-wfBz8UKpy1jb8EAuFqvqbmVG6+6X6B5B+54UAGmofuT7vZ6F6cC3OQwlw1ObEi4NTKG66y0x6Z6zz4AG0H2N9Q==} resolution: {integrity: sha512-8qXTNu3ExZ5ElgWGEmgt0to2sCtiQEzmaV/BlMDiO6ENQTS0JJuOJ7PxZdxIhKZyMUxmL1DIwUCOaqMc9/EDJQ==}
peerDependencies: peerDependencies:
'@opencode/theme': 2.3.0 '@opencode/theme': 2.4.2
'@opentui/core': '>=0.8.4' '@opentui/core': '>=0.8.0'
'@opentui/solid': '>=0.8.4' '@opentui/solid': '>=0.8.0'
electron: '*' electron: '*'
solid-js: '>=1.9.0' solid-js: '>=1.9.0'
vite: '>=6' vite: '>=6'
@@ -1229,17 +1229,17 @@ packages:
vite-plugin-solid: vite-plugin-solid:
optional: true optional: true
'@opencode/protocol@2.3.0': '@opencode/protocol@2.4.2':
resolution: {integrity: sha512-V37zTGXVa1j9aXUvUY01YN1EtfMMSWoT5pSCc6M0UsGdTUZX6QL/vMgGVGzPvbt7+Z8Vo40/0DFRPyqT4sdvnw==} resolution: {integrity: sha512-w87Ym2Xd449fngSXNNbWE5d5mWl5sxeK8I/yp0TVb0rpQM1+jriwKh6g2Akxrp1Xzdwrz84gfms+ZEtM30R00g==}
'@opencode/schema@2.3.0': '@opencode/schema@2.4.2':
resolution: {integrity: sha512-9CPS4+BXWUs3ELIWo68AA2q4XEPMkRYwpGYdqd/wNz3jRTOB8swef+2/z+igkCel+UtlX+dAlGTmSnid/JcoKw==} resolution: {integrity: sha512-/qAbNPjIO4uOvaBB9UcxUZUGXtdp8OeR65gUi8HrVrxSJMxocMg7Yky7U2iiZzGiE9mE4NsQQK9F8cN/2vjkoA==}
'@opencode/theme@2.3.0': '@opencode/theme@2.4.2':
resolution: {integrity: sha512-p0i87SpXs2JmGUfK00H5kTS5mJeMrSXv+ntu1LpK7q/wE3o7c2+43DQ7Fv9mzh+Zpz/vZ8XEbSiCVoCL39gQVw==} resolution: {integrity: sha512-Kw6SPRsv17VmIdVH1LkaztcoARpNed3ueynr/ifzrWG4J7ynzOZCxfJm5DATKT+0b/4HQsL6grvmGRV8AQVijw==}
'@opencode/util@2.3.0': '@opencode/util@2.4.2':
resolution: {integrity: sha512-0OIjkq9EQ/p50Wft57yr2NIyuzz1zqaBydwu/5rzEy1+Bu5hJkr5oUqAvt1ye6zZdBW3K8kiFGXFQsChX4cNPg==} resolution: {integrity: sha512-anYWKTU+N35MuNL/l0x8uREG4Gb7CvyAfRDJhz6JAg9yQSpGYqPNQUJqaPgPpXA0Zrac1uJCEGXx9Zb4HG+fjA==}
'@opentelemetry/api-logs@0.219.0': '@opentelemetry/api-logs@0.219.0':
resolution: {integrity: sha512-FFx7YnaYJlIjqWW/AG/yAZ0L/NEY724PipXXXQLdtZPbLwBGbUMTGL1i/esI56TWfTUXxhLfpgrnWJCG8aUJyg==} resolution: {integrity: sha512-FFx7YnaYJlIjqWW/AG/yAZ0L/NEY724PipXXXQLdtZPbLwBGbUMTGL1i/esI56TWfTUXxhLfpgrnWJCG8aUJyg==}
@@ -1320,49 +1320,97 @@ packages:
cpu: [arm64] cpu: [arm64]
os: [darwin] os: [darwin]
'@opentui/core-darwin-arm64@0.9.9':
resolution: {integrity: sha512-KmDAKo9GnvJ8HNw8C9YSUdeA8jO1xjp7YxObPhhfdxfpWCwHOrM2W91pmgW14p52vOdvhCBMZvgX/1mHFAXYbQ==}
cpu: [arm64]
os: [darwin]
'@opentui/core-darwin-x64@0.8.4': '@opentui/core-darwin-x64@0.8.4':
resolution: {integrity: sha512-0S62YHtIh1Q9tTun7065njEtYUUtf1zXwllDKXr63R1cVgq+8eRdVQ2PsAGNOqB5OYYno+M8o2tuK/Es2uvmBA==} resolution: {integrity: sha512-0S62YHtIh1Q9tTun7065njEtYUUtf1zXwllDKXr63R1cVgq+8eRdVQ2PsAGNOqB5OYYno+M8o2tuK/Es2uvmBA==}
cpu: [x64] cpu: [x64]
os: [darwin] os: [darwin]
'@opentui/core-darwin-x64@0.9.9':
resolution: {integrity: sha512-3fz8z5kZwawz/PvewzDVDkyVYMrLqIDA/Eat1jwVkzFrqCVqh903P7Qr6Wpf/Ahg5La/qqqZMxRRYjc40qEW+A==}
cpu: [x64]
os: [darwin]
'@opentui/core-linux-arm64-musl@0.8.4': '@opentui/core-linux-arm64-musl@0.8.4':
resolution: {integrity: sha512-IG887NHjPJEw5D1dvNl9jPbcwNFREFKj2fnqEjdrwCnDRywtjNL7k7GgTo24NNlyMAZAq0OkoM0M0Sn6ex/Adg==} resolution: {integrity: sha512-IG887NHjPJEw5D1dvNl9jPbcwNFREFKj2fnqEjdrwCnDRywtjNL7k7GgTo24NNlyMAZAq0OkoM0M0Sn6ex/Adg==}
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
libc: [musl] libc: [musl]
'@opentui/core-linux-arm64-musl@0.9.9':
resolution: {integrity: sha512-FdbKKXfXk6Y5z46wojVNnHyPuEns8Dn7/ONhYTgBi0Z/dBVc/aRWRYzXHIn7x3ZBLpA0fNU01wTAW3SxgOmBmQ==}
cpu: [arm64]
os: [linux]
libc: [musl]
'@opentui/core-linux-arm64@0.8.4': '@opentui/core-linux-arm64@0.8.4':
resolution: {integrity: sha512-VGnBN3ItBwZog109wtPIou8pn93TseZwA5OZ05X2PYIYPw+IC6mVeO2Dn0qwwozLBDxeyH3ydbHMFlwzS4/fLg==} resolution: {integrity: sha512-VGnBN3ItBwZog109wtPIou8pn93TseZwA5OZ05X2PYIYPw+IC6mVeO2Dn0qwwozLBDxeyH3ydbHMFlwzS4/fLg==}
cpu: [arm64] cpu: [arm64]
os: [linux] os: [linux]
'@opentui/core-linux-arm64@0.9.9':
resolution: {integrity: sha512-nHLjJH04gqsE2WW6P0yNuzlxddeBYTwDpyDfscico9YBtOj21stfpEf7G5PIGhfeMCSmsY3D1B52ebrISq0YgA==}
cpu: [arm64]
os: [linux]
'@opentui/core-linux-x64-musl@0.8.4': '@opentui/core-linux-x64-musl@0.8.4':
resolution: {integrity: sha512-FAiH7wMt/ZbpP2w6TL62deNExTg5w6mujKUBSK89+gJV8FN4jk/K2xz9f522aYhC6SdbpyIKwS0oGIJldYLkcg==} resolution: {integrity: sha512-FAiH7wMt/ZbpP2w6TL62deNExTg5w6mujKUBSK89+gJV8FN4jk/K2xz9f522aYhC6SdbpyIKwS0oGIJldYLkcg==}
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
libc: [musl] libc: [musl]
'@opentui/core-linux-x64-musl@0.9.9':
resolution: {integrity: sha512-LvFHYVK/oWTsjaMj7UknAWMmRlhfpo85vW+RALHd2Y/t0PnRCHlEr2uRWPAlrymqIxU4tqei6BIodQLozc0HLg==}
cpu: [x64]
os: [linux]
libc: [musl]
'@opentui/core-linux-x64@0.8.4': '@opentui/core-linux-x64@0.8.4':
resolution: {integrity: sha512-N/uxyaPpWkCZlDXz3fgHMfMuj1L3IVZ/xZ4JifUc4NW9bwa/CYWFJ5J5jBoy2QsAIqoqo8/OD3iFpXR4o12mNQ==} resolution: {integrity: sha512-N/uxyaPpWkCZlDXz3fgHMfMuj1L3IVZ/xZ4JifUc4NW9bwa/CYWFJ5J5jBoy2QsAIqoqo8/OD3iFpXR4o12mNQ==}
cpu: [x64] cpu: [x64]
os: [linux] os: [linux]
'@opentui/core-linux-x64@0.9.9':
resolution: {integrity: sha512-7W0ffV5ci202+6IkY3oh5Y67QWj/CjVJY0LkSaGu56/rLtRWL6RIl0/V9S5NSu2EcwqAyTp8C+EIhBdOoDwhCA==}
cpu: [x64]
os: [linux]
'@opentui/core-win32-arm64@0.8.4': '@opentui/core-win32-arm64@0.8.4':
resolution: {integrity: sha512-vjDuuIcmanoipIKdME8A7ZuBgIw2E1fv4pRJp6M19+Zfx0HIUmtA8bv+mT/kaz8Cpad9EUzJkNI5fV8P2p/iKg==} resolution: {integrity: sha512-vjDuuIcmanoipIKdME8A7ZuBgIw2E1fv4pRJp6M19+Zfx0HIUmtA8bv+mT/kaz8Cpad9EUzJkNI5fV8P2p/iKg==}
cpu: [arm64] cpu: [arm64]
os: [win32] os: [win32]
'@opentui/core-win32-arm64@0.9.9':
resolution: {integrity: sha512-EiLfLFuNV4z1iXzx0fCDKGuweME4qkQOZgtLQmKak7IXicng02w3hbgkeWZrtPvuuZWB3WkqnNa0j6OD7UbpJQ==}
cpu: [arm64]
os: [win32]
'@opentui/core-win32-x64@0.8.4': '@opentui/core-win32-x64@0.8.4':
resolution: {integrity: sha512-I4XnzUmyKCb8cRD1UntQXRkIEl0fxfQnzS3bTODWbENAOdRsK2c7Ff07DG2qTAqNijyTuk63C+uLmAT9ObOQ1Q==} resolution: {integrity: sha512-I4XnzUmyKCb8cRD1UntQXRkIEl0fxfQnzS3bTODWbENAOdRsK2c7Ff07DG2qTAqNijyTuk63C+uLmAT9ObOQ1Q==}
cpu: [x64] cpu: [x64]
os: [win32] os: [win32]
'@opentui/core-win32-x64@0.9.9':
resolution: {integrity: sha512-WhLVmvPr5V+K0LN7ss0Ss0LxgYHyM0SKAaOtWP9oJSt4LnyFnRd3Hy6OQh67dANlCmr/sSkRN8OqQ0thmWuFyA==}
cpu: [x64]
os: [win32]
'@opentui/core@0.8.4': '@opentui/core@0.8.4':
resolution: {integrity: sha512-s2z2FFEWxsQ6IPVEiAjlHHY5yssnCI+dIltL54+ZhVz1EWxylaB0HER+ypPL2goot0DKwKqrM57rnomh19/2rQ==} resolution: {integrity: sha512-s2z2FFEWxsQ6IPVEiAjlHHY5yssnCI+dIltL54+ZhVz1EWxylaB0HER+ypPL2goot0DKwKqrM57rnomh19/2rQ==}
engines: {bun: '>=1.3.14', node: '>=26.4.0'} engines: {bun: '>=1.3.14', node: '>=26.4.0'}
peerDependencies: peerDependencies:
web-tree-sitter: 0.25.10 web-tree-sitter: 0.25.10
'@opentui/core@0.9.9':
resolution: {integrity: sha512-Dq4pFkTvM6QkQw8lcplnRF1JFbW5vSSYmymUA/nIVKOoqSUV/cxV3ns3KkOGwzR/JpeGxGrzc4wXEuY5RYrTzQ==}
engines: {bun: '>=1.3.14', node: '>=26.4.0'}
peerDependencies:
web-tree-sitter: 0.25.10
'@opentui/solid@0.8.4': '@opentui/solid@0.8.4':
resolution: {integrity: sha512-QyaWIAtZTaAdYJiP4K2cG6hbXQkNUBfa0hjYQwvvr/V2OFIZWZ7l+SP8CYM05lBqVDfOraeThvSrhX+IuvKySA==} resolution: {integrity: sha512-QyaWIAtZTaAdYJiP4K2cG6hbXQkNUBfa0hjYQwvvr/V2OFIZWZ7l+SP8CYM05lBqVDfOraeThvSrhX+IuvKySA==}
peerDependencies: peerDependencies:
@@ -6245,10 +6293,10 @@ snapshots:
node-gyp: 12.4.0 node-gyp: 12.4.0
proc-log: 6.1.0 proc-log: 6.1.0
'@opencode/ai@2.3.0': '@opencode/ai@2.4.2':
dependencies: dependencies:
'@aws-sdk/credential-providers': 3.1057.0 '@aws-sdk/credential-providers': 3.1057.0
'@opencode/schema': 2.3.0 '@opencode/schema': 2.4.2
'@smithy/eventstream-codec': 4.2.14 '@smithy/eventstream-codec': 4.2.14
'@smithy/util-utf8': 4.2.2 '@smithy/util-utf8': 4.2.2
aws4fetch: 1.0.20 aws4fetch: 1.0.20
@@ -6257,25 +6305,25 @@ snapshots:
transitivePeerDependencies: transitivePeerDependencies:
- supports-color - supports-color
'@opencode/client@2.3.0(effect@4.1.0)(solid-js@1.9.18)': '@opencode/client@2.4.2(effect@4.1.0)(solid-js@1.9.18)':
dependencies: dependencies:
'@opencode/protocol': 2.3.0 '@opencode/protocol': 2.4.2
'@opencode/schema': 2.3.0 '@opencode/schema': 2.4.2
optionalDependencies: optionalDependencies:
effect: 4.1.0 effect: 4.1.0
solid-js: 1.9.18 solid-js: 1.9.18
'@opencode/plugin@2.3.0(@opencode/theme@2.3.0(typescript@5.9.3)(web-tree-sitter@0.25.10))(@opentelemetry/semantic-conventions@1.43.0)(@opentui/core@0.8.4(typescript@5.9.3)(web-tree-sitter@0.25.10))(@opentui/solid@0.8.4(solid-js@1.9.18)(typescript@5.9.3)(web-tree-sitter@0.25.10))(redis@6.2.1(@opentelemetry/api@1.9.0))(solid-js@1.9.18)(vite@7.3.0(@types/node@22.19.19)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.46.0)(yaml@2.9.0))': '@opencode/plugin@2.4.2(@opencode/theme@2.4.2(typescript@5.9.3)(web-tree-sitter@0.25.10))(@opentelemetry/semantic-conventions@1.43.0)(@opentui/core@0.8.4(typescript@5.9.3)(web-tree-sitter@0.25.10))(@opentui/solid@0.8.4(solid-js@1.9.18)(typescript@5.9.3)(web-tree-sitter@0.25.10))(redis@6.2.1(@opentelemetry/api@1.9.0))(solid-js@1.9.18)(vite@7.3.0(@types/node@22.19.19)(jiti@2.6.1)(lightningcss@1.30.2)(terser@5.46.0)(yaml@2.9.0))':
dependencies: dependencies:
'@ai-sdk/provider': 3.0.8 '@ai-sdk/provider': 3.0.8
'@opencode/ai': 2.3.0 '@opencode/ai': 2.4.2
'@opencode/client': 2.3.0(effect@4.1.0)(solid-js@1.9.18) '@opencode/client': 2.4.2(effect@4.1.0)(solid-js@1.9.18)
'@opencode/protocol': 2.3.0 '@opencode/protocol': 2.4.2
'@opencode/schema': 2.3.0 '@opencode/schema': 2.4.2
'@opencode/util': 2.3.0(@opentelemetry/semantic-conventions@1.43.0)(redis@6.2.1(@opentelemetry/api@1.9.0)) '@opencode/util': 2.4.2(@opentelemetry/semantic-conventions@1.43.0)(redis@6.2.1(@opentelemetry/api@1.9.0))
effect: 4.1.0 effect: 4.1.0
optionalDependencies: optionalDependencies:
'@opencode/theme': 2.3.0(typescript@5.9.3)(web-tree-sitter@0.25.10) '@opencode/theme': 2.4.2(typescript@5.9.3)(web-tree-sitter@0.25.10)
'@opentui/core': 0.8.4(typescript@5.9.3)(web-tree-sitter@0.25.10) '@opentui/core': 0.8.4(typescript@5.9.3)(web-tree-sitter@0.25.10)
'@opentui/solid': 0.8.4(solid-js@1.9.18)(typescript@5.9.3)(web-tree-sitter@0.25.10) '@opentui/solid': 0.8.4(solid-js@1.9.18)(typescript@5.9.3)(web-tree-sitter@0.25.10)
solid-js: 1.9.18 solid-js: 1.9.18
@@ -6288,25 +6336,25 @@ snapshots:
- supports-color - supports-color
- utf-8-validate - utf-8-validate
'@opencode/protocol@2.3.0': '@opencode/protocol@2.4.2':
dependencies: dependencies:
'@opencode/schema': 2.3.0 '@opencode/schema': 2.4.2
effect: 4.1.0 effect: 4.1.0
'@opencode/schema@2.3.0': '@opencode/schema@2.4.2':
dependencies: dependencies:
'@standard-schema/spec': 1.1.0 '@standard-schema/spec': 1.1.0
effect: 4.1.0 effect: 4.1.0
'@opencode/theme@2.3.0(typescript@5.9.3)(web-tree-sitter@0.25.10)': '@opencode/theme@2.4.2(typescript@5.9.3)(web-tree-sitter@0.25.10)':
dependencies: dependencies:
'@opentui/core': 0.8.4(typescript@5.9.3)(web-tree-sitter@0.25.10) '@opentui/core': 0.9.9(typescript@5.9.3)(web-tree-sitter@0.25.10)
effect: 4.1.0 effect: 4.1.0
transitivePeerDependencies: transitivePeerDependencies:
- typescript - typescript
- web-tree-sitter - web-tree-sitter
'@opencode/util@2.3.0(@opentelemetry/semantic-conventions@1.43.0)(redis@6.2.1(@opentelemetry/api@1.9.0))': '@opencode/util@2.4.2(@opentelemetry/semantic-conventions@1.43.0)(redis@6.2.1(@opentelemetry/api@1.9.0))':
dependencies: dependencies:
'@effect/opentelemetry': 4.1.0(@opentelemetry/api-logs@0.219.0)(@opentelemetry/api@1.9.0)(@opentelemetry/resources@2.8.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-logs@0.219.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-metrics@2.8.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@2.8.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-node@2.8.0(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.43.0)(effect@4.1.0) '@effect/opentelemetry': 4.1.0(@opentelemetry/api-logs@0.219.0)(@opentelemetry/api@1.9.0)(@opentelemetry/resources@2.8.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-logs@0.219.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-metrics@2.8.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-base@2.8.0(@opentelemetry/api@1.9.0))(@opentelemetry/sdk-trace-node@2.8.0(@opentelemetry/api@1.9.0))(@opentelemetry/semantic-conventions@1.43.0)(effect@4.1.0)
'@effect/platform-node': 4.1.0(effect@4.1.0)(redis@6.2.1(@opentelemetry/api@1.9.0)) '@effect/platform-node': 4.1.0(effect@4.1.0)(redis@6.2.1(@opentelemetry/api@1.9.0))
@@ -6417,27 +6465,51 @@ snapshots:
'@opentui/core-darwin-arm64@0.8.4': '@opentui/core-darwin-arm64@0.8.4':
optional: true optional: true
'@opentui/core-darwin-arm64@0.9.9':
optional: true
'@opentui/core-darwin-x64@0.8.4': '@opentui/core-darwin-x64@0.8.4':
optional: true optional: true
'@opentui/core-darwin-x64@0.9.9':
optional: true
'@opentui/core-linux-arm64-musl@0.8.4': '@opentui/core-linux-arm64-musl@0.8.4':
optional: true optional: true
'@opentui/core-linux-arm64-musl@0.9.9':
optional: true
'@opentui/core-linux-arm64@0.8.4': '@opentui/core-linux-arm64@0.8.4':
optional: true optional: true
'@opentui/core-linux-arm64@0.9.9':
optional: true
'@opentui/core-linux-x64-musl@0.8.4': '@opentui/core-linux-x64-musl@0.8.4':
optional: true optional: true
'@opentui/core-linux-x64-musl@0.9.9':
optional: true
'@opentui/core-linux-x64@0.8.4': '@opentui/core-linux-x64@0.8.4':
optional: true optional: true
'@opentui/core-linux-x64@0.9.9':
optional: true
'@opentui/core-win32-arm64@0.8.4': '@opentui/core-win32-arm64@0.8.4':
optional: true optional: true
'@opentui/core-win32-arm64@0.9.9':
optional: true
'@opentui/core-win32-x64@0.8.4': '@opentui/core-win32-x64@0.8.4':
optional: true optional: true
'@opentui/core-win32-x64@0.9.9':
optional: true
'@opentui/core@0.8.4(typescript@5.9.3)(web-tree-sitter@0.25.10)': '@opentui/core@0.8.4(typescript@5.9.3)(web-tree-sitter@0.25.10)':
dependencies: dependencies:
bun-ffi-structs: 0.3.1(typescript@5.9.3) bun-ffi-structs: 0.3.1(typescript@5.9.3)
@@ -6457,6 +6529,24 @@ snapshots:
transitivePeerDependencies: transitivePeerDependencies:
- typescript - typescript
'@opentui/core@0.9.9(typescript@5.9.3)(web-tree-sitter@0.25.10)':
dependencies:
bun-ffi-structs: 0.3.1(typescript@5.9.3)
diff: 9.0.0
string-width: 7.2.0
web-tree-sitter: 0.25.10
optionalDependencies:
'@opentui/core-darwin-arm64': 0.9.9
'@opentui/core-darwin-x64': 0.9.9
'@opentui/core-linux-arm64': 0.9.9
'@opentui/core-linux-arm64-musl': 0.9.9
'@opentui/core-linux-x64': 0.9.9
'@opentui/core-linux-x64-musl': 0.9.9
'@opentui/core-win32-arm64': 0.9.9
'@opentui/core-win32-x64': 0.9.9
transitivePeerDependencies:
- typescript
'@opentui/solid@0.8.4(solid-js@1.9.18)(typescript@5.9.3)(web-tree-sitter@0.25.10)': '@opentui/solid@0.8.4(solid-js@1.9.18)(typescript@5.9.3)(web-tree-sitter@0.25.10)':
dependencies: dependencies:
'@babel/core': 7.29.7 '@babel/core': 7.29.7
+4 -4
View File
@@ -6,10 +6,10 @@ packages:
- '!workspace/**' - '!workspace/**'
catalog: catalog:
'@opencode/client': 2.3.0 '@opencode/client': 2.4.2
'@opencode/plugin': 2.3.0 '@opencode/plugin': 2.4.2
'@opencode/schema': 2.3.0 '@opencode/schema': 2.4.2
'@opencode/theme': 2.3.0 '@opencode/theme': 2.4.2
'@opentui/core': 0.8.4 '@opentui/core': 0.8.4
'@opentui/solid': 0.8.4 '@opentui/solid': 0.8.4
effect: 4.1.0 effect: 4.1.0
+2 -2
View File
@@ -1,8 +1,8 @@
import { compareParsedSemver, compareSemver, normalizeSemver, parseSemver, type Semver } from '../utils/semver' import { compareParsedSemver, compareSemver, normalizeSemver, parseSemver, type Semver } from '../utils/semver'
export const OPENCODE_PINNED_VERSION = '2.3.0' export const OPENCODE_PINNED_VERSION = '2.4.2'
export const OPENCODE_MIN_VERSION = '2.3.0' export const OPENCODE_MIN_VERSION = '2.4.2'
const OPENCODE_RELEASE_BASE_URL = 'https://opencode.ai/files/bin' const OPENCODE_RELEASE_BASE_URL = 'https://opencode.ai/files/bin'
+1 -1
View File
@@ -1,4 +1,4 @@
The color palettes in opencode-palettes.ts are derived from github.com/anomalyco/opencode tag v2.3.0, packages/ui/src/theme/themes. The color palettes in opencode-palettes.ts are derived from github.com/anomalyco/opencode tag v2.4.2, packages/ui/src/theme/themes.
MIT License MIT License