diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ac683d43..af6a39c2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -125,7 +125,7 @@ jobs: - name: Install OpenCode CLI run: | 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" - name: Verify OpenCode CLI diff --git a/Dockerfile b/Dockerfile index e7f3146a..5f8efade 100644 --- a/Dockerfile +++ b/Dockerfile @@ -63,8 +63,8 @@ FROM base AS runner # 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. ARG UV_VERSION=0.12.7 -ARG OPENCODE_VERSION=2.3.0 -ARG OPENCODE_MIN_VERSION=2.3.0 +ARG OPENCODE_VERSION=2.4.2 +ARG OPENCODE_MIN_VERSION=2.4.2 ARG MICROSANDBOX_VERSION=0.7.2 ARG PLAYWRIGHT_VERSION=1.63.0 # Bump TOOLS_CACHEBUST (e.g. via --build-arg) to force a fresh uv/opencode diff --git a/backend/src/routes/oauth.test.ts b/backend/src/routes/oauth.test.ts index 38771476..57258b1a 100644 --- a/backend/src/routes/oauth.test.ts +++ b/backend/src/routes/oauth.test.ts @@ -8,7 +8,7 @@ import { readJson } from '../../test/helpers/read-json' import { createOAuthRoutes } from './oauth' import { createStubOpenCodeClient } from '../../test/helpers/stub-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 type { IntegrationInfo, IntegrationMethod } from '@opencode-manager/shared/opencode' 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() app.route('/oauth', createOAuthRoutes(client)) + await waitForOpenCodePluginsLoaded(client) const methodsResponse = await app.request('/oauth/auth-methods') expect(methodsResponse.status).toBe(200) diff --git a/backend/src/routes/providers.test.ts b/backend/src/routes/providers.test.ts index f89ec5e3..d7ce2ed2 100644 --- a/backend/src/routes/providers.test.ts +++ b/backend/src/routes/providers.test.ts @@ -9,7 +9,7 @@ import type { JsonObject, JsonValue } from '@opencode-manager/shared/utils' import { createProvidersRoutes } from './providers' import { createStubOpenCodeClient } from '../../test/helpers/stub-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 { ClientError } 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() app.route('/providers', createProvidersRoutes(client)) - await client.api.integration.list() + await waitForOpenCodePluginsLoaded(client) const connectResponse = await app.request('/providers/anthropic/credentials', { method: 'POST', @@ -534,7 +534,7 @@ describe.skipIf(!openCodeBinary)('providers routes against a real OpenCode 2 ser const app = new Hono() app.route('/providers', createProvidersRoutes(client)) - await client.api.integration.list() + await waitForOpenCodePluginsLoaded(client) const rejected = await app.request('/providers/azure/credentials', { method: 'POST', diff --git a/backend/src/services/opencode-server-registry.test.ts b/backend/src/services/opencode-server-registry.test.ts index 1b1f2fb5..97cd50a2 100644 --- a/backend/src/services/opencode-server-registry.test.ts +++ b/backend/src/services/opencode-server-registry.test.ts @@ -446,7 +446,7 @@ describe('OpenCodeServerRegistry', () => { describe('test', () => { 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({ baseUrl: 'https://studio.example.com/', @@ -454,7 +454,7 @@ describe('OpenCodeServerRegistry', () => { 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') const headers = new Headers(fetchFn.mock.calls[0]?.[1]?.headers) expect(headers.get('authorization')).toBe(`Basic ${btoa('alice:super-secret')}`) @@ -475,7 +475,7 @@ describe('OpenCodeServerRegistry', () => { username: 'alice', 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 }) @@ -490,7 +490,7 @@ describe('OpenCodeServerRegistry', () => { baseUrl: 'https://studio.example.com', password: 'super-secret', }) - fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.3.0' })) + fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.4.2' })) const result = await registry.test({ baseUrl: 'https://studio.example.com/opencode', @@ -510,7 +510,7 @@ describe('OpenCodeServerRegistry', () => { baseUrl: 'https://studio.example.com', password: 'super-secret', }) - fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.3.0' })) + fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.4.2' })) const result = await registry.test({ baseUrl: 'https://relocated.example.com', @@ -530,7 +530,7 @@ describe('OpenCodeServerRegistry', () => { baseUrl: 'https://studio.example.com', password: 'super-secret', }) - fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.3.0' })) + fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.4.2' })) await registry.test({ baseUrl: 'https://studio.example.com', diff --git a/backend/test/helpers/opencode-binary.test.ts b/backend/test/helpers/opencode-binary.test.ts index f823556b..bc6af6bc 100644 --- a/backend/test/helpers/opencode-binary.test.ts +++ b/backend/test/helpers/opencode-binary.test.ts @@ -4,10 +4,10 @@ import { mkdtemp, rm } from 'fs/promises' import { vi } from 'vitest' import os from 'os' 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' -const SUPPORTED_VERSION = '2.3.0' +const SUPPORTED_VERSION = OPENCODE_PINNED_VERSION const PATH_CANDIDATE = 'opencode' const ABSOLUTE_CANDIDATES = ['/usr/local/bin/opencode', '/opt/opencode/bin/opencode'] diff --git a/backend/test/helpers/opencode-binary.ts b/backend/test/helpers/opencode-binary.ts index a640ddc3..6cf8a84d 100644 --- a/backend/test/helpers/opencode-binary.ts +++ b/backend/test/helpers/opencode-binary.ts @@ -6,12 +6,14 @@ import { randomBytes } from 'crypto' import os from 'os' import path from 'path' 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' const VERSION_TIMEOUT_MS = 5000 const SERVE_READY_TIMEOUT_MS = 60000 const SERVE_POLL_INTERVAL_MS = 250 +const PLUGIN_LOAD_TIMEOUT_MS = 30000 +const PLUGIN_POLL_INTERVAL_MS = 100 const RUN_TIMEOUT_MS = 90000 const STOP_TIMEOUT_MS = 5000 const KILL_CONFIRM_MS = 2000 @@ -44,6 +46,22 @@ function delay(ms: number): Promise { return new Promise((resolve) => setTimeout(resolve, ms)) } +export async function waitForOpenCodePluginsLoaded( + client: { api: OpenCodeApi }, + timeoutMs: number = PLUGIN_LOAD_TIMEOUT_MS, +): Promise { + 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 { const result = spawnSync(binary, ['--version'], { encoding: 'utf8', timeout: VERSION_TIMEOUT_MS }) if (result.status !== 0) return null diff --git a/backend/test/helpers/opencode-server-harness.ts b/backend/test/helpers/opencode-server-harness.ts index 24d4311d..4991f13b 100644 --- a/backend/test/helpers/opencode-server-harness.ts +++ b/backend/test/helpers/opencode-server-harness.ts @@ -23,7 +23,7 @@ import { createStubOpenCodeClient } from './stub-opencode-client' export type OpenCodeServerInfo = Awaited> export const DEFAULT_SERVER_INFO: OpenCodeServerInfo = { - version: '2.3.0', + version: '2.4.2', pid: 1234, urls: ['http://127.0.0.1:5551'], paths: { tmp: '/tmp' }, diff --git a/backend/test/index.test.ts b/backend/test/index.test.ts index a4879a6c..00f0c45c 100644 --- a/backend/test/index.test.ts +++ b/backend/test/index.test.ts @@ -4,7 +4,7 @@ import { createServer, type Server } from 'node:net' import { join } from 'node:path' import { z } from 'zod' 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 { BackendApp, BackendAppDependencies, @@ -42,8 +42,8 @@ function lifecycleStatus(state: OpenCodeLifecycleState, healthy: boolean): OpenC state, healthy, port: 5551, - version: '2.3.0', - minVersion: '2.3.0', + version: OPENCODE_PINNED_VERSION, + minVersion: OPENCODE_MIN_VERSION, versionSupported: true, lastError: null, activeRecoveryAction: null, @@ -149,7 +149,7 @@ describe('backend app wiring', { timeout: 30000 }, () => { expect(response.status).toBe(200) const body = HealthResponseSchema.parse(await response.json()) 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 () => { diff --git a/backend/test/routes/settings.test.ts b/backend/test/routes/settings.test.ts index 9fb34aa4..f53f7520 100644 --- a/backend/test/routes/settings.test.ts +++ b/backend/test/routes/settings.test.ts @@ -179,8 +179,8 @@ describe('Settings routes', () => { reload = vi.fn(async () => undefined) restart = vi.fn(async () => ({ healthy: true })) manager = { - getVersion: vi.fn(() => '2.3.0'), - fetchVersion: vi.fn(async () => '2.3.0'), + getVersion: vi.fn(() => '2.4.2'), + fetchVersion: vi.fn(async () => '2.4.2'), clearStartupError: vi.fn(), getLastStartupError: vi.fn(() => null), markRestartPending: vi.fn(), @@ -200,7 +200,7 @@ describe('Settings routes', () => { syncManagerGitIdentityConfig: syncIdentity, } 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 }) }) await writeConfig('opencode.json', '{}') @@ -546,11 +546,11 @@ describe('Settings routes', () => { describe('OpenCode version routes', () => { it('lists supported OpenCode 2 releases with the current version', async () => { fetchMock.mockImplementation(async () => registryResponse( - ['1.18.32', '2.2.7', '2.3.0', '2.3.1', '2.3.0-beta.1', '3.0.0'], - { '2.3.0': '2026-01-02T00:00:00Z', '2.3.1': '2026-01-03T00:00:00Z' }, + ['1.18.32', '2.2.7', '2.4.2', '2.4.3', '2.4.2-beta.1', '3.0.0'], + { '2.4.2': '2026-01-02T00:00:00Z', '2.4.3': '2026-01-03T00:00:00Z' }, )) clearOpenCodeVersionCache() - manager.getVersion = vi.fn(() => '2.3.0') + manager.getVersion = vi.fn(() => '2.4.2') settingsApp = createApp() const res = await settingsApp.request('/opencode-versions') @@ -558,10 +558,10 @@ describe('Settings routes', () => { expect(res.status).toBe(200) await expect(readJson(res, VersionsSchema)).resolves.toEqual({ versions: [ - { version: '2.3.1', tag: 'v2.3.1', name: 'v2.3.1', 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.3', tag: 'v2.4.3', name: 'v2.4.3', publishedAt: '2026-01-03T00: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) }) @@ -586,11 +586,11 @@ describe('Settings routes', () => { }) it.each([ - ['an older installable version', '2.1.1', 'OpenCode upgraded from v2.1.1 to v2.3.0 and restarted'], - ['an unsupported newer major', '3.0.0', 'OpenCode upgraded from v3.0.0 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.4.2 and restarted'], ])('upgrades from %s', async (_label, currentVersion, expectedMessage) => { manager.getVersion = vi.fn(() => currentVersion) - manager.fetchVersion = vi.fn(async () => '2.3.0') + manager.fetchVersion = vi.fn(async () => '2.4.2') settingsApp = createApp() const res = await settingsApp.request('/opencode-upgrade', { method: 'POST' }) @@ -600,15 +600,15 @@ describe('Settings routes', () => { success: true, upgraded: true, oldVersion: currentVersion, - newVersion: '2.3.0', + newVersion: '2.4.2', message: expectedMessage, }) - expect(installer).toHaveBeenCalledWith('2.3.0') + expect(installer).toHaveBeenCalledWith('2.4.2') expect(restart).toHaveBeenCalledTimes(1) }) 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() const res = await settingsApp.request('/opencode-upgrade', { method: 'POST' }) @@ -634,8 +634,8 @@ describe('Settings routes', () => { success: true, upgraded: true, oldVersion: null, - newVersion: '2.3.0', - message: 'OpenCode v2.3.0 installed and restarted', + newVersion: '2.4.2', + message: 'OpenCode v2.4.2 installed and restarted', }) expect(restart).toHaveBeenCalledTimes(1) }) @@ -656,38 +656,38 @@ describe('Settings routes', () => { it('installs a requested version and restarts', async () => { 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() const res = await settingsApp.request('/opencode-install-version', { method: 'POST', headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ version: '2.3.0' }), + body: JSON.stringify({ version: '2.4.2' }), }) expect(res.status).toBe(200) await expect(readJson(res, UpgradeResultSchema)).resolves.toMatchObject({ success: true, oldVersion: '2.1.1', - newVersion: '2.3.0', - message: 'OpenCode changed from v2.1.1 to v2.3.0', + newVersion: '2.4.2', + 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) }) it('installs the bare version when the request carries a v prefix', async () => { 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() await settingsApp.request('/opencode-install-version', { method: 'POST', 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 () => { @@ -698,13 +698,13 @@ describe('Settings routes', () => { const res = await settingsApp.request('/opencode-install-version', { method: 'POST', headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ version: '2.3.0' }), + body: JSON.stringify({ version: '2.4.2' }), }) expect(res.status).toBe(400) const body = await readJson(res, UpgradeResultSchema) 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') }) @@ -713,10 +713,10 @@ describe('Settings routes', () => { ['a missing version', undefined, null], ['a command injection attempt', '1.2.27; cat /etc/passwd; #', null], ['an invalid format', 'invalid', null], - ['a prerelease', '2.3.0-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'], - ['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 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 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.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.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.4.2 <3.0.0'], ])('rejects %s before installing', async (_label, version, expectedError) => { const res = await settingsApp.request('/opencode-install-version', { method: 'POST', @@ -803,7 +803,7 @@ describe('Settings routes', () => { const res = await settingsApp.request('/opencode-install-version', { method: 'POST', headers: { 'Content-Type': 'application/json' }, - body: JSON.stringify({ version: '2.3.0' }), + body: JSON.stringify({ version: '2.4.2' }), }) expect(res.status).toBe(400) @@ -813,7 +813,7 @@ describe('Settings routes', () => { it.each([ ['/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) => { process.env.OPENCODE_BIN = '/usr/local/bin/opencode' diff --git a/backend/test/services/opencode-installer.test.ts b/backend/test/services/opencode-installer.test.ts index 6143588c..c43a63f6 100644 --- a/backend/test/services/opencode-installer.test.ts +++ b/backend/test/services/opencode-installer.test.ts @@ -131,46 +131,46 @@ describe('resolveOpenCodeInstallTarget', () => { describe('installOpenCodeVersion', () => { it('downloads, verifies and installs the requested version', async () => { 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 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(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(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 () => { const homeDirectory = join(workDirectory, 'home') - const archivePath = createArchive(workDirectory, '2.3.0') + const archivePath = createArchive(workDirectory, '2.4.2') const { calls, fetchFn } = createFetch(archivePath) - await installOpenCodeVersion('2.3.0', { + await installOpenCodeVersion('2.4.2', { fetch: fetchFn, homeDirectory, 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 () => { 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 installedPath = await installOpenCodeVersion('2.3.0', { + const installedPath = await installOpenCodeVersion('2.4.2', { fetch: fetchFn, homeDirectory, 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(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 () => { @@ -178,18 +178,18 @@ describe('installOpenCodeVersion', () => { const { calls, fetchFn } = createFetch(null) 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([]) }) - 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', async (version) => { const homeDirectory = join(workDirectory, 'home') const { calls, fetchFn } = createFetch(null) 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([]) }, ) @@ -198,18 +198,18 @@ describe('installOpenCodeVersion', () => { const homeDirectory = join(workDirectory, 'home') 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/) expect(() => statSync(resolveOpenCodeBinaryPath(homeDirectory))).toThrow() }) it('fails and leaves no binary behind when the archive reports a different version', async () => { const homeDirectory = join(workDirectory, 'home') - const archivePath = createArchive(workDirectory, '2.3.1') + const archivePath = createArchive(workDirectory, '2.4.3') const { fetchFn } = createFetch(archivePath) - await expect(installOpenCodeVersion('2.3.0', { fetch: fetchFn, homeDirectory, target: linuxTarget })) - .rejects.toThrow(/2\.3\.0/) + await expect(installOpenCodeVersion('2.4.2', { fetch: fetchFn, homeDirectory, target: linuxTarget })) + .rejects.toThrow(/2\.4\.2/) expect(() => statSync(resolveOpenCodeBinaryPath(homeDirectory))).toThrow() }) @@ -218,21 +218,21 @@ describe('installOpenCodeVersion', () => { mkdirSync(join(homeDirectory, '.opencode', 'bin'), { recursive: true }) 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) - 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 () => { const homeDirectory = join(workDirectory, 'home') - const archivePath = createArchive(workDirectory, '2.3.0') + const archivePath = createArchive(workDirectory, '2.4.2') const { fetchFn } = createFetch(archivePath) 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) }) @@ -244,15 +244,15 @@ describe('listOpenCodeVersions', () => { '1.18.32': {}, '2.0.14': {}, '2.1.1': {}, - '2.3.0': {}, - '2.3.1': {}, - '2.3.0-beta.1': {}, + '2.4.2': {}, + '2.4.3': {}, + '2.4.2-beta.1': {}, '3.0.0': {}, 'not-a-version': {}, }, time: { - '2.3.0': '2026-02-01T00:00:00.000Z', - '2.3.1': '2026-03-01T00:00:00.000Z', + '2.4.2': '2026-02-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 }) expect(versions).toEqual([ - { version: '2.3.1', publishedAt: '2026-03-01T00:00:00.000Z' }, - { version: '2.3.0', publishedAt: '2026-02-01T00:00:00.000Z' }, + { version: '2.4.3', publishedAt: '2026-03-01T00:00:00.000Z' }, + { version: '2.4.2', publishedAt: '2026-02-01T00:00:00.000Z' }, ]) expect(calls).toEqual(['https://registry.npmjs.org/@opencode/cli']) }) it('reports a null publishedAt when the registry has no timestamp for a version', async () => { const { fetchFn } = createRegistryFetch({ - versions: { '2.3.0': {} }, + versions: { '2.4.2': {} }, time: {}, }) 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 () => { 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 await listOpenCodeVersions({ fetch: stale.fetchFn, now: () => now }) now += 5 * 60 * 1000 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(fresh.calls).toHaveLength(1) }) @@ -331,7 +331,7 @@ describe('OpenCodeInstallError swap signalling', () => { const homeDirectory = join(workDirectory, 'home') 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.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 () => { const homeDirectory = join(workDirectory, 'home') mkdirSync(resolveOpenCodeBinaryPath(homeDirectory), { recursive: true }) - const archivePath = createArchive(workDirectory, '2.3.0') + const archivePath = createArchive(workDirectory, '2.4.2') 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.toMatchObject({ swapStarted: true }) diff --git a/backend/test/services/opencode-single-server.test.ts b/backend/test/services/opencode-single-server.test.ts index 74c1ca97..68a357fc 100644 --- a/backend/test/services/opencode-single-server.test.ts +++ b/backend/test/services/opencode-single-server.test.ts @@ -703,12 +703,12 @@ describe('OpenCodeServerManager - plugins and version', () => { it.each([true, false])('starts on a supported OpenCode 2 build (enforced: %s)', async (enforced) => { context.harness.sandbox.enabled = enforced 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() 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) }) @@ -717,7 +717,7 @@ describe('OpenCodeServerManager - plugins and version', () => { await expect(context.harness.manager.start()).rejects.toThrow('OpenCode 1.18.32 is not supported') 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) }) }) diff --git a/backend/test/shared/opencode-contract.test.ts b/backend/test/shared/opencode-contract.test.ts index ba7fadba..d9e6dff8 100644 --- a/backend/test/shared/opencode-contract.test.ts +++ b/backend/test/shared/opencode-contract.test.ts @@ -52,10 +52,10 @@ function createFetchSpy() { describe('OpenCode v2 contract', () => { describe('version policy', () => { 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_MIN_VERSION).toBe('2.3.0') + expect(OPENCODE_PINNED_VERSION).toBe('2.4.2') + expect(OPENCODE_MIN_VERSION).toBe('2.4.2') 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') }) @@ -69,40 +69,42 @@ describe('OpenCode v2 contract', () => { expect(isSupportedOpenCodeVersion('2.2.4')).toBe(false) expect(isSupportedOpenCodeVersion('2.2.5')).toBe(false) expect(isSupportedOpenCodeVersion('2.2.6')).toBe(false) - expect(isSupportedOpenCodeVersion('2.3.0')).toBe(true) - expect(isSupportedOpenCodeVersion('2.3.1')).toBe(true) - expect(isSupportedOpenCodeVersion('v2.3.0')).toBe(true) - expect(isSupportedOpenCodeVersion(' v2.3.0 ')).toBe(true) + expect(isSupportedOpenCodeVersion('2.3.0')).toBe(false) + expect(isSupportedOpenCodeVersion('2.3.1')).toBe(false) + expect(isSupportedOpenCodeVersion('2.4.2')).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.1.0')).toBe(false) expect(isSupportedOpenCodeVersion('not-a-version')).toBe(false) }) it('rejects prereleases of the pinned version', () => { - expect(isSupportedOpenCodeVersion('2.3.0-alpha.1')).toBe(false) - expect(isSupportedOpenCodeVersion('2.3.0-alpha')).toBe(false) - expect(isSupportedOpenCodeVersion('2.3.0-rc.1+build.5')).toBe(false) - expect(isSupportedOpenCodeVersion('2.3.0-0')).toBe(false) + expect(isSupportedOpenCodeVersion('2.4.2-alpha.1')).toBe(false) + expect(isSupportedOpenCodeVersion('2.4.2-alpha')).toBe(false) + expect(isSupportedOpenCodeVersion('2.4.2-rc.1+build.5')).toBe(false) + expect(isSupportedOpenCodeVersion('2.4.2-0')).toBe(false) }) it('accepts prereleases of higher numeric cores within the pinned major', () => { - expect(isSupportedOpenCodeVersion('2.3.1-beta.1')).toBe(true) - expect(isSupportedOpenCodeVersion('2.3.1-rc.2')).toBe(true) + expect(isSupportedOpenCodeVersion('2.4.3-beta.1')).toBe(true) + expect(isSupportedOpenCodeVersion('2.4.3-rc.2')).toBe(true) expect(isSupportedOpenCodeVersion('3.0.0-beta.1')).toBe(false) }) it('ignores build metadata for precedence', () => { - expect(isSupportedOpenCodeVersion('2.3.0+build')).toBe(true) - expect(isSupportedOpenCodeVersion('2.3.0+2.0.0')).toBe(true) + expect(isSupportedOpenCodeVersion('2.4.2+build')).toBe(true) + expect(isSupportedOpenCodeVersion('2.4.2+2.0.0')).toBe(true) }) it('rejects malformed and incomplete versions', () => { expect(isSupportedOpenCodeVersion('2garbage')).toBe(false) expect(isSupportedOpenCodeVersion('2')).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('2.3.0-alpha..1')).toBe(false) + expect(isSupportedOpenCodeVersion('2.4.2-alpha..1')).toBe(false) expect(isSupportedOpenCodeVersion('')).toBe(false) }) @@ -117,7 +119,7 @@ describe('OpenCode v2 contract', () => { it('describes the supported range for unsupported versions', () => { 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', ) }) }) diff --git a/ocm-cli/README.md b/ocm-cli/README.md index 3cd4812a..d1c1f8b1 100644 --- a/ocm-cli/README.md +++ b/ocm-cli/README.md @@ -10,7 +10,7 @@ to the local working tree. | 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.5.x | >= 0.19.0 | >= 2.2.0, < 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 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 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 - 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) - OpenCode Manager >= 0.19.0 - `git` and `tar` (with gzip support, i.e. the `-z` flag) available on `PATH` diff --git a/ocm-cli/package.json b/ocm-cli/package.json index a63dcaaf..258dbbaf 100644 --- a/ocm-cli/package.json +++ b/ocm-cli/package.json @@ -18,7 +18,7 @@ } }, "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/solid": ">=0.8.0 <0.9.0", "solid-js": ">=1.9.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 826c02f4..5d1c58f0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,17 +7,17 @@ settings: catalogs: default: '@opencode/client': - specifier: 2.3.0 - version: 2.3.0 + specifier: 2.4.2 + version: 2.4.2 '@opencode/plugin': - specifier: 2.3.0 - version: 2.3.0 + specifier: 2.4.2 + version: 2.4.2 '@opencode/schema': - specifier: 2.3.0 - version: 2.3.0 + specifier: 2.4.2 + version: 2.4.2 '@opencode/theme': - specifier: 2.3.0 - version: 2.3.0 + specifier: 2.4.2 + version: 2.4.2 '@opentui/core': specifier: 0.8.4 version: 0.8.4 @@ -318,10 +318,10 @@ importers: version: link:../shared '@opencode/plugin': 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': 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': specifier: 'catalog:' version: 0.8.4(typescript@5.9.3)(web-tree-sitter@0.25.10) @@ -357,10 +357,10 @@ importers: dependencies: '@opencode/client': 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': specifier: 'catalog:' - version: 2.3.0 + version: 2.4.2 effect: specifier: 'catalog:' version: 4.1.0 @@ -1189,11 +1189,11 @@ packages: resolution: {integrity: sha512-mGUWr1uMnf0le2TwfOZY4SFxZGXGfm4Jtay/nwAa2FLNAKXUoUwaGwBMNH36UHPtinWfTSJ3nqFQr0091CxVGg==} engines: {node: ^20.17.0 || >=22.9.0} - '@opencode/ai@2.3.0': - resolution: {integrity: sha512-CsaY18G5cXtNvOgvONaxguFeaWf+gENSYKzDnYIIREpoSLjLm9oF2v+adaE4nUozM1qIMR4+s23VOViaRypFLw==} + '@opencode/ai@2.4.2': + resolution: {integrity: sha512-p3tOtq8jewfxMesBDo2ZSsc77ZqoB5qbTZcuUrNcner4KHoex4iwhsNTw0CWkUhxkBwWH7xJjkv3+eXXzxf4+w==} - '@opencode/client@2.3.0': - resolution: {integrity: sha512-xu74XGiYIqLZ2FzIrtjaR5UNWWXY3fRln0WLgZoQTR/wWMgG+T9XGQQGCl8ry8jnCFsJVokiHemBqft9oMzC1A==} + '@opencode/client@2.4.2': + resolution: {integrity: sha512-Wnb/wMl3HzPHu7WR4DYc4TkziFDdB6xUpNoLGGz7SMUIbBWPYhV2wPRenR7UEeMdlHlKgaYcxixTH80H+5YP2g==} peerDependencies: effect: 4.1.0 solid-js: '>=1.9.0' @@ -1203,12 +1203,12 @@ packages: solid-js: optional: true - '@opencode/plugin@2.3.0': - resolution: {integrity: sha512-wfBz8UKpy1jb8EAuFqvqbmVG6+6X6B5B+54UAGmofuT7vZ6F6cC3OQwlw1ObEi4NTKG66y0x6Z6zz4AG0H2N9Q==} + '@opencode/plugin@2.4.2': + resolution: {integrity: sha512-8qXTNu3ExZ5ElgWGEmgt0to2sCtiQEzmaV/BlMDiO6ENQTS0JJuOJ7PxZdxIhKZyMUxmL1DIwUCOaqMc9/EDJQ==} peerDependencies: - '@opencode/theme': 2.3.0 - '@opentui/core': '>=0.8.4' - '@opentui/solid': '>=0.8.4' + '@opencode/theme': 2.4.2 + '@opentui/core': '>=0.8.0' + '@opentui/solid': '>=0.8.0' electron: '*' solid-js: '>=1.9.0' vite: '>=6' @@ -1229,17 +1229,17 @@ packages: vite-plugin-solid: optional: true - '@opencode/protocol@2.3.0': - resolution: {integrity: sha512-V37zTGXVa1j9aXUvUY01YN1EtfMMSWoT5pSCc6M0UsGdTUZX6QL/vMgGVGzPvbt7+Z8Vo40/0DFRPyqT4sdvnw==} + '@opencode/protocol@2.4.2': + resolution: {integrity: sha512-w87Ym2Xd449fngSXNNbWE5d5mWl5sxeK8I/yp0TVb0rpQM1+jriwKh6g2Akxrp1Xzdwrz84gfms+ZEtM30R00g==} - '@opencode/schema@2.3.0': - resolution: {integrity: sha512-9CPS4+BXWUs3ELIWo68AA2q4XEPMkRYwpGYdqd/wNz3jRTOB8swef+2/z+igkCel+UtlX+dAlGTmSnid/JcoKw==} + '@opencode/schema@2.4.2': + resolution: {integrity: sha512-/qAbNPjIO4uOvaBB9UcxUZUGXtdp8OeR65gUi8HrVrxSJMxocMg7Yky7U2iiZzGiE9mE4NsQQK9F8cN/2vjkoA==} - '@opencode/theme@2.3.0': - resolution: {integrity: sha512-p0i87SpXs2JmGUfK00H5kTS5mJeMrSXv+ntu1LpK7q/wE3o7c2+43DQ7Fv9mzh+Zpz/vZ8XEbSiCVoCL39gQVw==} + '@opencode/theme@2.4.2': + resolution: {integrity: sha512-Kw6SPRsv17VmIdVH1LkaztcoARpNed3ueynr/ifzrWG4J7ynzOZCxfJm5DATKT+0b/4HQsL6grvmGRV8AQVijw==} - '@opencode/util@2.3.0': - resolution: {integrity: sha512-0OIjkq9EQ/p50Wft57yr2NIyuzz1zqaBydwu/5rzEy1+Bu5hJkr5oUqAvt1ye6zZdBW3K8kiFGXFQsChX4cNPg==} + '@opencode/util@2.4.2': + resolution: {integrity: sha512-anYWKTU+N35MuNL/l0x8uREG4Gb7CvyAfRDJhz6JAg9yQSpGYqPNQUJqaPgPpXA0Zrac1uJCEGXx9Zb4HG+fjA==} '@opentelemetry/api-logs@0.219.0': resolution: {integrity: sha512-FFx7YnaYJlIjqWW/AG/yAZ0L/NEY724PipXXXQLdtZPbLwBGbUMTGL1i/esI56TWfTUXxhLfpgrnWJCG8aUJyg==} @@ -1320,49 +1320,97 @@ packages: cpu: [arm64] 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': resolution: {integrity: sha512-0S62YHtIh1Q9tTun7065njEtYUUtf1zXwllDKXr63R1cVgq+8eRdVQ2PsAGNOqB5OYYno+M8o2tuK/Es2uvmBA==} cpu: [x64] 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': resolution: {integrity: sha512-IG887NHjPJEw5D1dvNl9jPbcwNFREFKj2fnqEjdrwCnDRywtjNL7k7GgTo24NNlyMAZAq0OkoM0M0Sn6ex/Adg==} cpu: [arm64] os: [linux] 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': resolution: {integrity: sha512-VGnBN3ItBwZog109wtPIou8pn93TseZwA5OZ05X2PYIYPw+IC6mVeO2Dn0qwwozLBDxeyH3ydbHMFlwzS4/fLg==} cpu: [arm64] 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': resolution: {integrity: sha512-FAiH7wMt/ZbpP2w6TL62deNExTg5w6mujKUBSK89+gJV8FN4jk/K2xz9f522aYhC6SdbpyIKwS0oGIJldYLkcg==} cpu: [x64] os: [linux] 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': resolution: {integrity: sha512-N/uxyaPpWkCZlDXz3fgHMfMuj1L3IVZ/xZ4JifUc4NW9bwa/CYWFJ5J5jBoy2QsAIqoqo8/OD3iFpXR4o12mNQ==} cpu: [x64] 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': resolution: {integrity: sha512-vjDuuIcmanoipIKdME8A7ZuBgIw2E1fv4pRJp6M19+Zfx0HIUmtA8bv+mT/kaz8Cpad9EUzJkNI5fV8P2p/iKg==} cpu: [arm64] os: [win32] + '@opentui/core-win32-arm64@0.9.9': + resolution: {integrity: sha512-EiLfLFuNV4z1iXzx0fCDKGuweME4qkQOZgtLQmKak7IXicng02w3hbgkeWZrtPvuuZWB3WkqnNa0j6OD7UbpJQ==} + cpu: [arm64] + os: [win32] + '@opentui/core-win32-x64@0.8.4': resolution: {integrity: sha512-I4XnzUmyKCb8cRD1UntQXRkIEl0fxfQnzS3bTODWbENAOdRsK2c7Ff07DG2qTAqNijyTuk63C+uLmAT9ObOQ1Q==} cpu: [x64] os: [win32] + '@opentui/core-win32-x64@0.9.9': + resolution: {integrity: sha512-WhLVmvPr5V+K0LN7ss0Ss0LxgYHyM0SKAaOtWP9oJSt4LnyFnRd3Hy6OQh67dANlCmr/sSkRN8OqQ0thmWuFyA==} + cpu: [x64] + os: [win32] + '@opentui/core@0.8.4': resolution: {integrity: sha512-s2z2FFEWxsQ6IPVEiAjlHHY5yssnCI+dIltL54+ZhVz1EWxylaB0HER+ypPL2goot0DKwKqrM57rnomh19/2rQ==} engines: {bun: '>=1.3.14', node: '>=26.4.0'} peerDependencies: 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': resolution: {integrity: sha512-QyaWIAtZTaAdYJiP4K2cG6hbXQkNUBfa0hjYQwvvr/V2OFIZWZ7l+SP8CYM05lBqVDfOraeThvSrhX+IuvKySA==} peerDependencies: @@ -6245,10 +6293,10 @@ snapshots: node-gyp: 12.4.0 proc-log: 6.1.0 - '@opencode/ai@2.3.0': + '@opencode/ai@2.4.2': dependencies: '@aws-sdk/credential-providers': 3.1057.0 - '@opencode/schema': 2.3.0 + '@opencode/schema': 2.4.2 '@smithy/eventstream-codec': 4.2.14 '@smithy/util-utf8': 4.2.2 aws4fetch: 1.0.20 @@ -6257,25 +6305,25 @@ snapshots: transitivePeerDependencies: - 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: - '@opencode/protocol': 2.3.0 - '@opencode/schema': 2.3.0 + '@opencode/protocol': 2.4.2 + '@opencode/schema': 2.4.2 optionalDependencies: effect: 4.1.0 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: '@ai-sdk/provider': 3.0.8 - '@opencode/ai': 2.3.0 - '@opencode/client': 2.3.0(effect@4.1.0)(solid-js@1.9.18) - '@opencode/protocol': 2.3.0 - '@opencode/schema': 2.3.0 - '@opencode/util': 2.3.0(@opentelemetry/semantic-conventions@1.43.0)(redis@6.2.1(@opentelemetry/api@1.9.0)) + '@opencode/ai': 2.4.2 + '@opencode/client': 2.4.2(effect@4.1.0)(solid-js@1.9.18) + '@opencode/protocol': 2.4.2 + '@opencode/schema': 2.4.2 + '@opencode/util': 2.4.2(@opentelemetry/semantic-conventions@1.43.0)(redis@6.2.1(@opentelemetry/api@1.9.0)) effect: 4.1.0 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/solid': 0.8.4(solid-js@1.9.18)(typescript@5.9.3)(web-tree-sitter@0.25.10) solid-js: 1.9.18 @@ -6288,25 +6336,25 @@ snapshots: - supports-color - utf-8-validate - '@opencode/protocol@2.3.0': + '@opencode/protocol@2.4.2': dependencies: - '@opencode/schema': 2.3.0 + '@opencode/schema': 2.4.2 effect: 4.1.0 - '@opencode/schema@2.3.0': + '@opencode/schema@2.4.2': dependencies: '@standard-schema/spec': 1.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: - '@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 transitivePeerDependencies: - typescript - 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: '@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)) @@ -6417,27 +6465,51 @@ snapshots: '@opentui/core-darwin-arm64@0.8.4': optional: true + '@opentui/core-darwin-arm64@0.9.9': + optional: true + '@opentui/core-darwin-x64@0.8.4': optional: true + '@opentui/core-darwin-x64@0.9.9': + optional: true + '@opentui/core-linux-arm64-musl@0.8.4': optional: true + '@opentui/core-linux-arm64-musl@0.9.9': + optional: true + '@opentui/core-linux-arm64@0.8.4': optional: true + '@opentui/core-linux-arm64@0.9.9': + optional: true + '@opentui/core-linux-x64-musl@0.8.4': optional: true + '@opentui/core-linux-x64-musl@0.9.9': + optional: true + '@opentui/core-linux-x64@0.8.4': optional: true + '@opentui/core-linux-x64@0.9.9': + optional: true + '@opentui/core-win32-arm64@0.8.4': optional: true + '@opentui/core-win32-arm64@0.9.9': + optional: true + '@opentui/core-win32-x64@0.8.4': 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)': dependencies: bun-ffi-structs: 0.3.1(typescript@5.9.3) @@ -6457,6 +6529,24 @@ snapshots: transitivePeerDependencies: - 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)': dependencies: '@babel/core': 7.29.7 diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 461fa5f7..5bf60d47 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -6,10 +6,10 @@ packages: - '!workspace/**' catalog: - '@opencode/client': 2.3.0 - '@opencode/plugin': 2.3.0 - '@opencode/schema': 2.3.0 - '@opencode/theme': 2.3.0 + '@opencode/client': 2.4.2 + '@opencode/plugin': 2.4.2 + '@opencode/schema': 2.4.2 + '@opencode/theme': 2.4.2 '@opentui/core': 0.8.4 '@opentui/solid': 0.8.4 effect: 4.1.0 diff --git a/shared/src/opencode/release.ts b/shared/src/opencode/release.ts index 9a46f42a..a2095fdb 100644 --- a/shared/src/opencode/release.ts +++ b/shared/src/opencode/release.ts @@ -1,8 +1,8 @@ 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' diff --git a/shared/src/themes/OPENCODE_THEMES_LICENSE b/shared/src/themes/OPENCODE_THEMES_LICENSE index 36084d6b..386118fd 100644 --- a/shared/src/themes/OPENCODE_THEMES_LICENSE +++ b/shared/src/themes/OPENCODE_THEMES_LICENSE @@ -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