mirror of
https://github.com/chriswritescode-dev/opencode-manager.git
synced 2026-12-05 12:24:30 +01:00
Merge pull request #488 from chriswritescode-dev/om-207-validate-goal-availability-during-v2
feat: upgrade OpenCode to 2.3.0 and refresh Goals on plugin.updated
This commit is contained in:
26 files changed
+794
-350
No files matched your search
@@ -125,7 +125,7 @@ jobs:
|
||||
- name: Install OpenCode CLI
|
||||
run: |
|
||||
source scripts/lib/opencode-release.sh
|
||||
download_opencode_to 2.2.1 "$RUNNER_TEMP/opencode/bin/opencode"
|
||||
download_opencode_to 2.3.0 "$RUNNER_TEMP/opencode/bin/opencode"
|
||||
echo "$RUNNER_TEMP/opencode/bin" >> "$GITHUB_PATH"
|
||||
|
||||
- name: Verify OpenCode CLI
|
||||
|
||||
+2
-2
@@ -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.2.5
|
||||
ARG OPENCODE_MIN_VERSION=2.2.5
|
||||
ARG OPENCODE_VERSION=2.3.0
|
||||
ARG OPENCODE_MIN_VERSION=2.3.0
|
||||
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
|
||||
|
||||
@@ -446,7 +446,7 @@ describe('OpenCodeServerRegistry', () => {
|
||||
|
||||
describe('test', () => {
|
||||
it('reports a supported version', async () => {
|
||||
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.2.5' }))
|
||||
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.3.0' }))
|
||||
|
||||
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.2.5', versionSupported: true, error: null })
|
||||
expect(result).toEqual({ ok: true, version: '2.3.0', 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.2.5' }))
|
||||
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.3.0' }))
|
||||
|
||||
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.2.5' }))
|
||||
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.3.0' }))
|
||||
|
||||
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.2.5' }))
|
||||
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.3.0' }))
|
||||
|
||||
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.2.5' }))
|
||||
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.3.0' }))
|
||||
|
||||
await registry.test({
|
||||
baseUrl: 'https://studio.example.com',
|
||||
|
||||
@@ -7,7 +7,7 @@ import path from 'path'
|
||||
import { OPENCODE_SERVER_USERNAME } from '@opencode-manager/shared/opencode'
|
||||
import { openCodeBinaryCandidates, resolveOpenCode2Binary, startOpenCodeServe, type ServeSpawn } from './opencode-binary'
|
||||
|
||||
const SUPPORTED_VERSION = '2.2.5'
|
||||
const SUPPORTED_VERSION = '2.3.0'
|
||||
const PATH_CANDIDATE = 'opencode'
|
||||
const ABSOLUTE_CANDIDATES = ['/usr/local/bin/opencode', '/opt/opencode/bin/opencode']
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@ import { randomBytes } from 'crypto'
|
||||
import os from 'os'
|
||||
import path from 'path'
|
||||
import { z } from 'zod'
|
||||
import { buildOpenCodeBasicAuth, isSupportedOpenCodeVersion } from '@opencode-manager/shared/opencode'
|
||||
import { buildOpenCodeBasicAuth, isSameOpenCodeMajor, isSupportedOpenCodeVersion } from '@opencode-manager/shared/opencode'
|
||||
import { OPENCODE_SERVICE_SERVE_ARGS, getOpenCodeServiceRegistrationPath, writeOpenCodeServiceSettings } from '../../src/services/opencode-service-mode'
|
||||
|
||||
const VERSION_TIMEOUT_MS = 5000
|
||||
@@ -44,7 +44,7 @@ function delay(ms: number): Promise<void> {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms))
|
||||
}
|
||||
|
||||
function readOpenCodeVersion(binary: string): string | null {
|
||||
export function readOpenCodeVersion(binary: string): string | null {
|
||||
const result = spawnSync(binary, ['--version'], { encoding: 'utf8', timeout: VERSION_TIMEOUT_MS })
|
||||
if (result.status !== 0) return null
|
||||
const match = /(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?)/.exec(`${result.stdout ?? ''}${result.stderr ?? ''}`)
|
||||
@@ -70,6 +70,15 @@ export function resolveOpenCode2Binary(
|
||||
return null
|
||||
}
|
||||
|
||||
export function resolveGoalProbeBinary(): string | null {
|
||||
const configured = process.env.OPENCODE_GOAL_PROBE_BIN
|
||||
if (configured !== undefined && configured.length > 0) {
|
||||
const version = readOpenCodeVersion(configured)
|
||||
if (version && isSameOpenCodeMajor(version)) return configured
|
||||
}
|
||||
return resolveOpenCode2Binary()
|
||||
}
|
||||
|
||||
export async function runOpenCodeStandalone(options: { cwd: string; env: NodeJS.ProcessEnv; message: string }): Promise<OpenCodeRunResult> {
|
||||
const binary = resolveOpenCode2Binary()
|
||||
if (!binary) throw new Error('no OpenCode 2 binary is available for the binary-backed test')
|
||||
|
||||
@@ -23,7 +23,7 @@ import { createStubOpenCodeClient } from './stub-opencode-client'
|
||||
export type OpenCodeServerInfo = Awaited<ReturnType<OpenCodeApi['server']['info']>>
|
||||
|
||||
export const DEFAULT_SERVER_INFO: OpenCodeServerInfo = {
|
||||
version: '2.2.5',
|
||||
version: '2.3.0',
|
||||
pid: 1234,
|
||||
urls: ['http://127.0.0.1:5551'],
|
||||
paths: { tmp: '/tmp' },
|
||||
|
||||
@@ -42,8 +42,8 @@ function lifecycleStatus(state: OpenCodeLifecycleState, healthy: boolean): OpenC
|
||||
state,
|
||||
healthy,
|
||||
port: 5551,
|
||||
version: '2.2.5',
|
||||
minVersion: '2.2.5',
|
||||
version: '2.3.0',
|
||||
minVersion: '2.3.0',
|
||||
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.2.5')
|
||||
expect(body.opencodeMinVersion).toBe('2.3.0')
|
||||
})
|
||||
|
||||
it('creates the workspace directories, AGENTS.md and a seed OpenCode config on startup', async () => {
|
||||
|
||||
@@ -0,0 +1,222 @@
|
||||
import { describe, it, expect, beforeAll, afterAll } from 'vitest'
|
||||
import { mkdir, rm, writeFile } from 'fs/promises'
|
||||
import path from 'path'
|
||||
import { z } from 'zod'
|
||||
import { buildOpenCodeBasicAuth, compareOpenCodeVersions, readSessionGoal } from '@opencode-manager/shared/opencode'
|
||||
import { FetchOpenCodeClient } from '../../src/services/opencode/client'
|
||||
import { OPENCODE_DIRECTORY_HEADER } from '../../src/services/opencode/upstream'
|
||||
import {
|
||||
createOpenCodeServeDirectories,
|
||||
readOpenCodeVersion,
|
||||
resolveGoalProbeBinary,
|
||||
startOpenCodeServe,
|
||||
} from '../helpers/opencode-binary'
|
||||
import type { OpenCodeServe, OpenCodeServeDirectories } from '../helpers/opencode-binary'
|
||||
|
||||
const BINARY = resolveGoalProbeBinary()
|
||||
const VERSION = BINARY ? readOpenCodeVersion(BINARY) : null
|
||||
const RPC_SKIPS_ACTIVATION = VERSION !== null && compareOpenCodeVersions(VERSION, '2.2.7') >= 0
|
||||
const SESSION_ID = 'ses_0000000000000000000000000'
|
||||
const SLOW_PLUGIN_MS = 3000
|
||||
const POLL_INTERVAL_MS = 100
|
||||
const WAIT_TIMEOUT_MS = 30000
|
||||
|
||||
const EventSchema = z.object({
|
||||
type: z.string(),
|
||||
location: z.object({ directory: z.string() }).optional(),
|
||||
}).loose()
|
||||
|
||||
const RpcErrorBodySchema = z.object({ type: z.string() }).loose()
|
||||
|
||||
const SLOW_PLUGIN_SOURCE = `export default {
|
||||
id: 'slow.plugin',
|
||||
async setup() {
|
||||
await new Promise((resolve) => setTimeout(resolve, 3000))
|
||||
},
|
||||
}
|
||||
`
|
||||
|
||||
type RecordedEvent = { type: string; directory: string | null; at: number }
|
||||
|
||||
function delay(ms: number): Promise<void> {
|
||||
return new Promise((resolve) => setTimeout(resolve, ms))
|
||||
}
|
||||
|
||||
async function waitFor<T>(description: string, probe: () => Promise<T | undefined> | T | undefined): Promise<T> {
|
||||
const deadline = Date.now() + WAIT_TIMEOUT_MS
|
||||
while (Date.now() < deadline) {
|
||||
const value = await probe()
|
||||
if (value !== undefined) return value
|
||||
await delay(POLL_INTERVAL_MS)
|
||||
}
|
||||
throw new Error(`Timed out waiting for ${description}`)
|
||||
}
|
||||
|
||||
async function writeSlowPlugin(directory: string): Promise<void> {
|
||||
await mkdir(directory, { recursive: true })
|
||||
await writeFile(path.join(directory, 'package.json'), JSON.stringify({ name: 'slow-plugin', version: '1.0.0', type: 'module', main: 'index.js' }))
|
||||
await writeFile(path.join(directory, 'index.js'), SLOW_PLUGIN_SOURCE)
|
||||
}
|
||||
|
||||
describe.skipIf(BINARY === null)(`OpenCode ${VERSION ?? 'unknown'} cold-Location Goal RPC`, () => {
|
||||
let directories: OpenCodeServeDirectories
|
||||
let serve: OpenCodeServe
|
||||
let client: FetchOpenCodeClient
|
||||
let coldDirectory: string
|
||||
let recorded: RecordedEvent[]
|
||||
const controller = new AbortController()
|
||||
|
||||
function findPluginUpdated(directory: string, fromIndex = 0): RecordedEvent | undefined {
|
||||
return recorded.slice(fromIndex).find((event) => event.type === 'plugin.updated' && event.directory === directory)
|
||||
}
|
||||
|
||||
async function startEventRecorder(): Promise<void> {
|
||||
const response = await fetch(`${serve.baseUrl}/api/event`, {
|
||||
headers: { Authorization: buildOpenCodeBasicAuth(serve.password), Accept: 'text/event-stream' },
|
||||
signal: controller.signal,
|
||||
})
|
||||
if (!response.ok || !response.body) throw new Error(`event stream failed with status ${response.status}`)
|
||||
const reader = response.body.getReader()
|
||||
const decoder = new TextDecoder()
|
||||
void (async () => {
|
||||
let buffer = ''
|
||||
try {
|
||||
while (true) {
|
||||
const { value, done } = await reader.read()
|
||||
if (done) return
|
||||
buffer += decoder.decode(value, { stream: true })
|
||||
const lines = buffer.split('\n')
|
||||
buffer = lines.pop() ?? ''
|
||||
for (const line of lines) {
|
||||
if (!line.startsWith('data:')) continue
|
||||
let payload: unknown
|
||||
try {
|
||||
payload = JSON.parse(line.slice(5))
|
||||
} catch {
|
||||
continue
|
||||
}
|
||||
const event = EventSchema.safeParse(payload)
|
||||
if (!event.success) continue
|
||||
recorded.push({ type: event.data.type, directory: event.data.location?.directory ?? null, at: Date.now() })
|
||||
}
|
||||
}
|
||||
} catch {
|
||||
return
|
||||
}
|
||||
})()
|
||||
}
|
||||
|
||||
beforeAll(async () => {
|
||||
if (BINARY === null) throw new Error('no OpenCode binary is available for the cold-Location Goal RPC probe')
|
||||
directories = await createOpenCodeServeDirectories()
|
||||
recorded = []
|
||||
coldDirectory = path.join(directories.root, 'cold-location')
|
||||
const configDirectory = path.join(directories.configHome, 'opencode')
|
||||
const pluginDirectory = path.join(directories.root, 'slow-plugin')
|
||||
await mkdir(configDirectory, { recursive: true })
|
||||
await writeSlowPlugin(pluginDirectory)
|
||||
await writeFile(path.join(configDirectory, 'opencode.json'), JSON.stringify({ plugins: [pluginDirectory] }))
|
||||
serve = await startOpenCodeServe({ binary: BINARY, directories, env: { OPENCODE_DISABLE_FILEWATCHER: '1' } })
|
||||
client = new FetchOpenCodeClient({
|
||||
baseUrl: serve.baseUrl,
|
||||
basicAuth: buildOpenCodeBasicAuth(serve.password),
|
||||
defaultDirectory: false,
|
||||
})
|
||||
await startEventRecorder()
|
||||
}, 120000)
|
||||
|
||||
afterAll(async () => {
|
||||
controller.abort()
|
||||
if (serve) await serve.terminate()
|
||||
if (directories) await rm(directories.root, { recursive: true, force: true })
|
||||
})
|
||||
|
||||
it('answers the first Goal read on a cold Location', async () => {
|
||||
try {
|
||||
await mkdir(coldDirectory, { recursive: true })
|
||||
const startedAt = Date.now()
|
||||
const result = await readSessionGoal(client.api, { sessionID: SESSION_ID, directory: coldDirectory })
|
||||
const duration = Date.now() - startedAt
|
||||
if (RPC_SKIPS_ACTIVATION) {
|
||||
expect(result).toEqual({ supported: false })
|
||||
expect(duration).toBeLessThan(SLOW_PLUGIN_MS / 2)
|
||||
|
||||
const rawDirectory = path.join(directories.root, 'cold-location-raw')
|
||||
await mkdir(rawDirectory, { recursive: true })
|
||||
const response = await fetch(`${serve.baseUrl}/api/rpc/opencode.goal/get`, {
|
||||
method: 'POST',
|
||||
headers: {
|
||||
Authorization: buildOpenCodeBasicAuth(serve.password),
|
||||
'content-type': 'application/json',
|
||||
[OPENCODE_DIRECTORY_HEADER]: encodeURIComponent(rawDirectory),
|
||||
},
|
||||
body: JSON.stringify({ input: { sessionID: SESSION_ID } }),
|
||||
})
|
||||
const text = await response.text()
|
||||
expect(response.status).toBe(400)
|
||||
expect(RpcErrorBodySchema.parse(JSON.parse(text)).type).toBe('rpc.unavailable')
|
||||
} else {
|
||||
expect(result).toEqual({ supported: true, goal: null })
|
||||
expect(duration).toBeGreaterThanOrEqual(SLOW_PLUGIN_MS - 500)
|
||||
}
|
||||
} catch (error) {
|
||||
throw new Error(`${error instanceof Error ? error.message : String(error)}\n${serve.readOutput()}`, { cause: error })
|
||||
}
|
||||
}, 120000)
|
||||
|
||||
it('makes the Goal readable and publishes plugin.updated for the directory', async () => {
|
||||
const pollStartedAt = Date.now()
|
||||
let goalReadableAt: number | undefined
|
||||
try {
|
||||
if (RPC_SKIPS_ACTIVATION) {
|
||||
await waitFor('the cold Location Goal to become readable', async () => {
|
||||
const polled = await readSessionGoal(client.api, { sessionID: SESSION_ID, directory: coldDirectory })
|
||||
if (!polled.supported) return undefined
|
||||
goalReadableAt = Date.now()
|
||||
return polled
|
||||
})
|
||||
}
|
||||
|
||||
const pluginUpdated = await waitFor('a plugin.updated event for the cold Location', () => findPluginUpdated(coldDirectory))
|
||||
expect(await readSessionGoal(client.api, { sessionID: SESSION_ID, directory: coldDirectory })).toEqual({ supported: true, goal: null })
|
||||
|
||||
if (RPC_SKIPS_ACTIVATION) {
|
||||
if (goalReadableAt === undefined) throw new Error('the Goal was never observed as readable')
|
||||
if (goalReadableAt > pluginUpdated.at) {
|
||||
throw new Error(
|
||||
`the Goal became readable at ${goalReadableAt} but plugin.updated for the directory arrived earlier at ${pluginUpdated.at} (polling started at ${pollStartedAt})`,
|
||||
)
|
||||
}
|
||||
expect(goalReadableAt).toBeLessThanOrEqual(pluginUpdated.at)
|
||||
}
|
||||
} catch (error) {
|
||||
throw new Error(`${error instanceof Error ? error.message : String(error)}\n${serve.readOutput()}`, { cause: error })
|
||||
}
|
||||
}, 120000)
|
||||
|
||||
it('records the Goal read after a location reload and refreshes it on plugin.updated', async () => {
|
||||
try {
|
||||
const eventsBeforeReload = recorded.length
|
||||
await client.api.location.reload({ headers: { [OPENCODE_DIRECTORY_HEADER]: encodeURIComponent(coldDirectory) } })
|
||||
const immediateStartedAt = Date.now()
|
||||
const immediate = await readSessionGoal(client.api, { sessionID: SESSION_ID, directory: coldDirectory })
|
||||
const immediateDuration = Date.now() - immediateStartedAt
|
||||
if (RPC_SKIPS_ACTIVATION) {
|
||||
expect([{ supported: false }, { supported: true, goal: null }]).toContainEqual(immediate)
|
||||
expect(immediateDuration).toBeLessThan(SLOW_PLUGIN_MS / 2)
|
||||
await waitFor('a plugin.updated event for the cold Location after the reload', () =>
|
||||
findPluginUpdated(coldDirectory, eventsBeforeReload),
|
||||
)
|
||||
expect(await readSessionGoal(client.api, { sessionID: SESSION_ID, directory: coldDirectory })).toEqual({ supported: true, goal: null })
|
||||
} else {
|
||||
expect(immediate).toEqual({ supported: true, goal: null })
|
||||
expect(immediateDuration).toBeGreaterThanOrEqual(SLOW_PLUGIN_MS - 500)
|
||||
await waitFor('a plugin.updated event for the cold Location after the reload', () =>
|
||||
findPluginUpdated(coldDirectory, eventsBeforeReload),
|
||||
)
|
||||
}
|
||||
} catch (error) {
|
||||
throw new Error(`${error instanceof Error ? error.message : String(error)}\n${serve.readOutput()}`, { cause: error })
|
||||
}
|
||||
}, 120000)
|
||||
})
|
||||
@@ -179,8 +179,8 @@ describe('Settings routes', () => {
|
||||
reload = vi.fn(async () => undefined)
|
||||
restart = vi.fn(async () => ({ healthy: true }))
|
||||
manager = {
|
||||
getVersion: vi.fn(() => '2.2.5'),
|
||||
fetchVersion: vi.fn(async () => '2.2.5'),
|
||||
getVersion: vi.fn(() => '2.3.0'),
|
||||
fetchVersion: vi.fn(async () => '2.3.0'),
|
||||
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.2.5'])
|
||||
if (requestUrl(input) === REGISTRY_URL) return registryResponse(['2.3.0'])
|
||||
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.1.1', '2.2.5', '2.2.6', '2.2.5-beta.1', '3.0.0'],
|
||||
{ '2.2.5': '2026-01-02T00:00:00Z', '2.2.6': '2026-01-03T00:00:00Z' },
|
||||
['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' },
|
||||
))
|
||||
clearOpenCodeVersionCache()
|
||||
manager.getVersion = vi.fn(() => '2.2.5')
|
||||
manager.getVersion = vi.fn(() => '2.3.0')
|
||||
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.2.6', tag: 'v2.2.6', name: 'v2.2.6', publishedAt: '2026-01-03T00:00:00Z' },
|
||||
{ version: '2.2.5', tag: 'v2.2.5', name: 'v2.2.5', publishedAt: '2026-01-02T00:00:00Z' },
|
||||
{ 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' },
|
||||
],
|
||||
currentVersion: '2.2.5',
|
||||
currentVersion: '2.3.0',
|
||||
})
|
||||
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.2.5 and restarted'],
|
||||
['an unsupported newer major', '3.0.0', 'OpenCode upgraded from v3.0.0 to v2.2.5 and restarted'],
|
||||
['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'],
|
||||
])('upgrades from %s', async (_label, currentVersion, expectedMessage) => {
|
||||
manager.getVersion = vi.fn(() => currentVersion)
|
||||
manager.fetchVersion = vi.fn(async () => '2.2.5')
|
||||
manager.fetchVersion = vi.fn(async () => '2.3.0')
|
||||
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.2.5',
|
||||
newVersion: '2.3.0',
|
||||
message: expectedMessage,
|
||||
})
|
||||
expect(installer).toHaveBeenCalledWith('2.2.5')
|
||||
expect(installer).toHaveBeenCalledWith('2.3.0')
|
||||
expect(restart).toHaveBeenCalledTimes(1)
|
||||
})
|
||||
|
||||
it('does not install when the current version is already the latest', async () => {
|
||||
manager.getVersion = vi.fn(() => '2.2.5')
|
||||
manager.getVersion = vi.fn(() => '2.3.0')
|
||||
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.2.5',
|
||||
message: 'OpenCode v2.2.5 installed and restarted',
|
||||
newVersion: '2.3.0',
|
||||
message: 'OpenCode v2.3.0 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.2.5')
|
||||
manager.fetchVersion = vi.fn(async () => '2.3.0')
|
||||
settingsApp = createApp()
|
||||
|
||||
const res = await settingsApp.request('/opencode-install-version', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ version: '2.2.5' }),
|
||||
body: JSON.stringify({ version: '2.3.0' }),
|
||||
})
|
||||
|
||||
expect(res.status).toBe(200)
|
||||
await expect(readJson(res, UpgradeResultSchema)).resolves.toMatchObject({
|
||||
success: true,
|
||||
oldVersion: '2.1.1',
|
||||
newVersion: '2.2.5',
|
||||
message: 'OpenCode changed from v2.1.1 to v2.2.5',
|
||||
newVersion: '2.3.0',
|
||||
message: 'OpenCode changed from v2.1.1 to v2.3.0',
|
||||
})
|
||||
expect(installer).toHaveBeenCalledWith('2.2.5')
|
||||
expect(installer).toHaveBeenCalledWith('2.3.0')
|
||||
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.2.5')
|
||||
manager.fetchVersion = vi.fn(async () => '2.3.0')
|
||||
settingsApp = createApp()
|
||||
|
||||
await settingsApp.request('/opencode-install-version', {
|
||||
method: 'POST',
|
||||
headers: { 'Content-Type': 'application/json' },
|
||||
body: JSON.stringify({ version: 'v2.2.5' }),
|
||||
body: JSON.stringify({ version: 'v2.3.0' }),
|
||||
})
|
||||
|
||||
expect(installer).toHaveBeenCalledWith('2.2.5')
|
||||
expect(installer).toHaveBeenCalledWith('2.3.0')
|
||||
})
|
||||
|
||||
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.2.5' }),
|
||||
body: JSON.stringify({ version: '2.3.0' }),
|
||||
})
|
||||
|
||||
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.2.5')
|
||||
expect(String(body.details)).toContain('did not result in version 2.3.0')
|
||||
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.2.5-beta.1', null],
|
||||
['an OpenCode 1.x version', '1.18.32', 'OpenCode 1.18.32 is not supported; OpenCode Manager requires OpenCode >=2.2.5 <3.0.0'],
|
||||
['a version below the supported range', '2.2.4', 'OpenCode 2.2.4 is not supported; OpenCode Manager requires OpenCode >=2.2.5 <3.0.0'],
|
||||
['a version above the supported range', '3.0.0', 'OpenCode 3.0.0 is not supported; OpenCode Manager requires OpenCode >=2.2.5 <3.0.0'],
|
||||
['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'],
|
||||
])('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.2.5' }),
|
||||
body: JSON.stringify({ version: '2.3.0' }),
|
||||
})
|
||||
|
||||
expect(res.status).toBe(400)
|
||||
@@ -813,7 +813,7 @@ describe('Settings routes', () => {
|
||||
|
||||
it.each([
|
||||
['/opencode-upgrade', undefined],
|
||||
['/opencode-install-version', JSON.stringify({ version: '2.2.5' })],
|
||||
['/opencode-install-version', JSON.stringify({ version: '2.3.0' })],
|
||||
])('refuses %s while OPENCODE_BIN manages the binary', async (path, body) => {
|
||||
process.env.OPENCODE_BIN = '/usr/local/bin/opencode'
|
||||
|
||||
|
||||
@@ -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.2.5')
|
||||
const archivePath = createArchive(workDirectory, '2.3.0')
|
||||
const { calls, fetchFn } = createFetch(archivePath)
|
||||
|
||||
const installedPath = await installOpenCodeVersion('2.2.5', { fetch: fetchFn, homeDirectory, target: linuxTarget })
|
||||
const installedPath = await installOpenCodeVersion('2.3.0', { fetch: fetchFn, homeDirectory, target: linuxTarget })
|
||||
|
||||
expect(installedPath).toBe(resolveOpenCodeBinaryPath(homeDirectory))
|
||||
expect(calls).toEqual(['https://opencode.ai/files/bin/2.2.5/opencode-linux-x64.tar.gz'])
|
||||
expect(calls).toEqual(['https://opencode.ai/files/bin/2.3.0/opencode-linux-x64.tar.gz'])
|
||||
expect(statSync(installedPath).mode & 0o777).toBe(0o755)
|
||||
expect(readFileSync(installedPath, 'utf-8')).toContain('2.2.5')
|
||||
expect(readFileSync(installedPath, 'utf-8')).toContain('2.3.0')
|
||||
})
|
||||
|
||||
it('requests the musl asset for a musl linux target', async () => {
|
||||
const homeDirectory = join(workDirectory, 'home')
|
||||
const archivePath = createArchive(workDirectory, '2.2.5')
|
||||
const archivePath = createArchive(workDirectory, '2.3.0')
|
||||
const { calls, fetchFn } = createFetch(archivePath)
|
||||
|
||||
await installOpenCodeVersion('2.2.5', {
|
||||
await installOpenCodeVersion('2.3.0', {
|
||||
fetch: fetchFn,
|
||||
homeDirectory,
|
||||
target: { platform: 'linux', arch: 'arm64', musl: true },
|
||||
})
|
||||
|
||||
expect(calls).toEqual(['https://opencode.ai/files/bin/2.2.5/opencode-linux-arm64-musl.tar.gz'])
|
||||
expect(calls).toEqual(['https://opencode.ai/files/bin/2.3.0/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.2.5')
|
||||
const archivePath = createDarwinArchive(workDirectory, '2.3.0')
|
||||
const { calls, fetchFn } = createFetch(archivePath)
|
||||
|
||||
const installedPath = await installOpenCodeVersion('2.2.5', {
|
||||
const installedPath = await installOpenCodeVersion('2.3.0', {
|
||||
fetch: fetchFn,
|
||||
homeDirectory,
|
||||
target: { platform: 'darwin', arch: 'arm64', musl: false },
|
||||
})
|
||||
|
||||
expect(calls).toEqual(['https://opencode.ai/files/bin/2.2.5/opencode-darwin-arm64.zip'])
|
||||
expect(calls).toEqual(['https://opencode.ai/files/bin/2.3.0/opencode-darwin-arm64.zip'])
|
||||
expect(installedPath).toBe(resolveOpenCodeBinaryPath(homeDirectory))
|
||||
expect(statSync(installedPath).mode & 0o777).toBe(0o755)
|
||||
expect(readFileSync(installedPath, 'utf-8')).toContain('2.2.5')
|
||||
expect(readFileSync(installedPath, 'utf-8')).toContain('2.3.0')
|
||||
})
|
||||
|
||||
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.2.5 <3.0.0')
|
||||
.rejects.toThrow('OpenCode 1.18.32 is not supported; OpenCode Manager requires OpenCode >=2.3.0 <3.0.0')
|
||||
expect(calls).toEqual([])
|
||||
})
|
||||
|
||||
it.each(['2.2.4', '3.0.0', '2.2.5-beta.1', '2.2.5; rm -rf /'])(
|
||||
it.each(['2.2.7', '3.0.0', '2.3.0-beta.1', '2.3.0; 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\.2\.5 <3\.0\.0/)
|
||||
.rejects.toThrow(/requires OpenCode >=2\.3\.0 <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.2.5', { fetch: fetchFn, homeDirectory, target: linuxTarget }))
|
||||
await expect(installOpenCodeVersion('2.3.0', { 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.2.6')
|
||||
const archivePath = createArchive(workDirectory, '2.3.1')
|
||||
const { fetchFn } = createFetch(archivePath)
|
||||
|
||||
await expect(installOpenCodeVersion('2.2.5', { fetch: fetchFn, homeDirectory, target: linuxTarget }))
|
||||
.rejects.toThrow(/2\.2\.5/)
|
||||
await expect(installOpenCodeVersion('2.3.0', { fetch: fetchFn, homeDirectory, target: linuxTarget }))
|
||||
.rejects.toThrow(/2\.3\.0/)
|
||||
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.2.5')
|
||||
const archivePath = createArchive(workDirectory, '2.3.0')
|
||||
const { fetchFn } = createFetch(archivePath)
|
||||
|
||||
await installOpenCodeVersion('2.2.5', { fetch: fetchFn, homeDirectory, target: linuxTarget })
|
||||
await installOpenCodeVersion('2.3.0', { fetch: fetchFn, homeDirectory, target: linuxTarget })
|
||||
|
||||
expect(readFileSync(resolveOpenCodeBinaryPath(homeDirectory), 'utf-8')).toContain('2.2.5')
|
||||
expect(readFileSync(resolveOpenCodeBinaryPath(homeDirectory), 'utf-8')).toContain('2.3.0')
|
||||
})
|
||||
|
||||
it('cleans up its staging directory after a successful install', async () => {
|
||||
const homeDirectory = join(workDirectory, 'home')
|
||||
const archivePath = createArchive(workDirectory, '2.2.5')
|
||||
const archivePath = createArchive(workDirectory, '2.3.0')
|
||||
const { fetchFn } = createFetch(archivePath)
|
||||
|
||||
const before = countStagingDirectories()
|
||||
await installOpenCodeVersion('2.2.5', { fetch: fetchFn, homeDirectory, target: linuxTarget })
|
||||
await installOpenCodeVersion('2.3.0', { 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.2.5': {},
|
||||
'2.2.6': {},
|
||||
'2.2.5-beta.1': {},
|
||||
'2.3.0': {},
|
||||
'2.3.1': {},
|
||||
'2.3.0-beta.1': {},
|
||||
'3.0.0': {},
|
||||
'not-a-version': {},
|
||||
},
|
||||
time: {
|
||||
'2.2.5': '2026-02-01T00:00:00.000Z',
|
||||
'2.2.6': '2026-03-01T00:00:00.000Z',
|
||||
'2.3.0': '2026-02-01T00:00:00.000Z',
|
||||
'2.3.1': '2026-03-01T00:00:00.000Z',
|
||||
},
|
||||
}
|
||||
|
||||
@@ -262,20 +262,20 @@ describe('listOpenCodeVersions', () => {
|
||||
const versions = await listOpenCodeVersions({ fetch: fetchFn })
|
||||
|
||||
expect(versions).toEqual([
|
||||
{ version: '2.2.6', publishedAt: '2026-03-01T00:00:00.000Z' },
|
||||
{ version: '2.2.5', publishedAt: '2026-02-01T00:00:00.000Z' },
|
||||
{ version: '2.3.1', publishedAt: '2026-03-01T00:00:00.000Z' },
|
||||
{ version: '2.3.0', 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.2.5': {} },
|
||||
versions: { '2.3.0': {} },
|
||||
time: {},
|
||||
})
|
||||
|
||||
await expect(listOpenCodeVersions({ fetch: fetchFn })).resolves.toEqual([
|
||||
{ version: '2.2.5', publishedAt: null },
|
||||
{ version: '2.3.0', 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.2.7': {} }, time: {} })
|
||||
const fresh = createRegistryFetch({ versions: { '2.3.1': {} }, 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.2.7', publishedAt: null }])
|
||||
expect(refreshed).toEqual([{ version: '2.3.1', 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.2.5', { fetch: fetchFn, homeDirectory, target: linuxTarget })
|
||||
const promise = installOpenCodeVersion('2.3.0', { 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.2.5')
|
||||
const archivePath = createArchive(workDirectory, '2.3.0')
|
||||
const { fetchFn } = createFetch(archivePath)
|
||||
|
||||
const promise = installOpenCodeVersion('2.2.5', { fetch: fetchFn, homeDirectory, target: linuxTarget })
|
||||
const promise = installOpenCodeVersion('2.3.0', { fetch: fetchFn, homeDirectory, target: linuxTarget })
|
||||
|
||||
await expect(promise).rejects.toBeInstanceOf(OpenCodeInstallError)
|
||||
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) => {
|
||||
context.harness.sandbox.enabled = enforced
|
||||
context.harness.ownPortAfterSpawn()
|
||||
context.harness.readVersionOutput.mockReturnValue({ stdout: 'opencode v2.2.5\n', stderr: '' })
|
||||
context.harness.readVersionOutput.mockReturnValue({ stdout: 'opencode v2.3.0\n', stderr: '' })
|
||||
|
||||
await context.harness.manager.start()
|
||||
|
||||
expect(context.harness.spawnServer).toHaveBeenCalledTimes(1)
|
||||
expect(context.harness.manager.getVersion()).toBe('2.2.5')
|
||||
expect(context.harness.manager.getVersion()).toBe('2.3.0')
|
||||
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.2.5 <3.0.0')
|
||||
expect(context.harness.manager.getLastStartupError()).toContain('requires OpenCode >=2.3.0 <3.0.0')
|
||||
expect(context.harness.manager.isLastStartupErrorNonRecoverable()).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -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.2.5')
|
||||
expect(OPENCODE_MIN_VERSION).toBe('2.2.5')
|
||||
expect(OPENCODE_PINNED_VERSION).toBe('2.3.0')
|
||||
expect(OPENCODE_MIN_VERSION).toBe('2.3.0')
|
||||
expect(compareOpenCodeVersions(OPENCODE_PINNED_VERSION, OPENCODE_MIN_VERSION)).toBeGreaterThanOrEqual(0)
|
||||
expect(OPENCODE_SUPPORTED_VERSION_RANGE).toBe('>=2.2.5 <3.0.0')
|
||||
expect(OPENCODE_SUPPORTED_VERSION_RANGE).toBe('>=2.3.0 <3.0.0')
|
||||
expect(OPENCODE_SERVER_USERNAME).toBe('opencode')
|
||||
})
|
||||
|
||||
@@ -67,41 +67,42 @@ describe('OpenCode v2 contract', () => {
|
||||
expect(isSupportedOpenCodeVersion('2.1.1')).toBe(false)
|
||||
expect(isSupportedOpenCodeVersion('2.2.1')).toBe(false)
|
||||
expect(isSupportedOpenCodeVersion('2.2.4')).toBe(false)
|
||||
expect(isSupportedOpenCodeVersion('2.2.5')).toBe(true)
|
||||
expect(isSupportedOpenCodeVersion('2.2.6')).toBe(true)
|
||||
expect(isSupportedOpenCodeVersion('2.2.5')).toBe(false)
|
||||
expect(isSupportedOpenCodeVersion('2.2.6')).toBe(false)
|
||||
expect(isSupportedOpenCodeVersion('2.3.0')).toBe(true)
|
||||
expect(isSupportedOpenCodeVersion('v2.2.5')).toBe(true)
|
||||
expect(isSupportedOpenCodeVersion(' v2.2.5 ')).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('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.2.5-alpha.1')).toBe(false)
|
||||
expect(isSupportedOpenCodeVersion('2.2.5-alpha')).toBe(false)
|
||||
expect(isSupportedOpenCodeVersion('2.2.5-rc.1+build.5')).toBe(false)
|
||||
expect(isSupportedOpenCodeVersion('2.2.5-0')).toBe(false)
|
||||
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)
|
||||
})
|
||||
|
||||
it('accepts prereleases of higher numeric cores within the pinned major', () => {
|
||||
expect(isSupportedOpenCodeVersion('2.3.0-beta.1')).toBe(true)
|
||||
expect(isSupportedOpenCodeVersion('2.2.6-rc.2')).toBe(true)
|
||||
expect(isSupportedOpenCodeVersion('2.3.1-beta.1')).toBe(true)
|
||||
expect(isSupportedOpenCodeVersion('2.3.1-rc.2')).toBe(true)
|
||||
expect(isSupportedOpenCodeVersion('3.0.0-beta.1')).toBe(false)
|
||||
})
|
||||
|
||||
it('ignores build metadata for precedence', () => {
|
||||
expect(isSupportedOpenCodeVersion('2.2.5+build')).toBe(true)
|
||||
expect(isSupportedOpenCodeVersion('2.2.5+2.0.0')).toBe(true)
|
||||
expect(isSupportedOpenCodeVersion('2.3.0+build')).toBe(true)
|
||||
expect(isSupportedOpenCodeVersion('2.3.0+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.2.5.1')).toBe(false)
|
||||
expect(isSupportedOpenCodeVersion('2.3.0.1')).toBe(false)
|
||||
expect(isSupportedOpenCodeVersion('02.2.1')).toBe(false)
|
||||
expect(isSupportedOpenCodeVersion('2.2.5-alpha..1')).toBe(false)
|
||||
expect(isSupportedOpenCodeVersion('2.3.0-alpha..1')).toBe(false)
|
||||
expect(isSupportedOpenCodeVersion('')).toBe(false)
|
||||
})
|
||||
|
||||
@@ -116,7 +117,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.2.5 <3.0.0',
|
||||
'OpenCode 3.0.0 is not supported; OpenCode Manager requires OpenCode >=2.3.0 <3.0.0',
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
@@ -118,6 +118,18 @@ describe('readSessionGoal', () => {
|
||||
await expect(readSessionGoal(createApi(call), { sessionID: SESSION_ID })).resolves.toEqual({ supported: false })
|
||||
})
|
||||
|
||||
it('reads the goal again after an unavailable rpc', async () => {
|
||||
const call = vi
|
||||
.fn<OpenCodeApi['rpc']['call']>()
|
||||
.mockRejectedValueOnce(rpcError('rpc.unavailable', 'RPC is unavailable: opencode.goal'))
|
||||
.mockResolvedValueOnce({ output: null })
|
||||
const api = createApi(call)
|
||||
|
||||
await expect(readSessionGoal(api, { sessionID: SESSION_ID })).resolves.toEqual({ supported: false })
|
||||
await expect(readSessionGoal(api, { sessionID: SESSION_ID })).resolves.toEqual({ supported: true, goal: null })
|
||||
expect(call).toHaveBeenCalledTimes(2)
|
||||
})
|
||||
|
||||
it('rethrows every other error unchanged', async () => {
|
||||
const error = rpcError('rpc.failed', 'boom')
|
||||
const call = vi.fn<OpenCodeApi['rpc']['call']>().mockRejectedValue(error)
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { act, screen, waitFor } from '@testing-library/react'
|
||||
import userEvent from '@testing-library/user-event'
|
||||
import { useState } from 'react'
|
||||
import { useState, type ReactElement } from 'react'
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
|
||||
import { useLocation } from 'react-router-dom'
|
||||
import type { FormInfo, GoalState, PermissionRequest } from '@opencode-manager/shared/opencode'
|
||||
@@ -11,6 +11,7 @@ import type { Repo } from '@/api/types'
|
||||
import type { OpenCodeServer } from '@opencode-manager/shared/schemas'
|
||||
import { hasBackgroundActivity, useSessionStatus } from '@/stores/sessionStatusStore'
|
||||
import { changeWalkthroughQueryKey } from '@/hooks/useChangeWalkthrough'
|
||||
import { useSessionGoal } from '@/hooks/useSessionGoals'
|
||||
import type { TestEventStreamTransport } from '@/lib/opencode-event-stream'
|
||||
import type { FetchFake, FetchRoute, FetchRouteResult, RecordedFetchRequest } from '@/test/fetchFake'
|
||||
import type { JsonObject } from '@opencode-manager/shared/utils'
|
||||
@@ -24,6 +25,7 @@ import {
|
||||
goalChanged,
|
||||
permissionAsked,
|
||||
permissionReplied,
|
||||
pluginUpdated,
|
||||
sessionCompactionEnded,
|
||||
sessionCompactionFailed,
|
||||
sessionCompactionStarted,
|
||||
@@ -209,6 +211,11 @@ function CacheResolutionHarness({ sessionID }: { sessionID: string }) {
|
||||
)
|
||||
}
|
||||
|
||||
function GoalReadHarness({ sessionID, directory }: { sessionID: string; directory: string }) {
|
||||
useSessionGoal(sessionID, directory)
|
||||
return null
|
||||
}
|
||||
|
||||
interface ApiState {
|
||||
repos: Repo[]
|
||||
projects: OpenCodeProject[]
|
||||
@@ -227,6 +234,7 @@ interface ApiState {
|
||||
activeResponder: FetchRoute['respond'] | null
|
||||
sessionResponder: FetchRoute['respond'] | null
|
||||
serversResponder: FetchRoute['respond'] | null
|
||||
goalResponder: FetchRoute['respond'] | null
|
||||
}
|
||||
|
||||
function createApiState(overrides: Partial<ApiState> = {}): ApiState {
|
||||
@@ -248,6 +256,7 @@ function createApiState(overrides: Partial<ApiState> = {}): ApiState {
|
||||
activeResponder: null,
|
||||
sessionResponder: null,
|
||||
serversResponder: null,
|
||||
goalResponder: null,
|
||||
...overrides,
|
||||
}
|
||||
}
|
||||
@@ -285,6 +294,8 @@ function providerRoutes(state: ApiState): FetchRoute[] {
|
||||
{ method: 'POST', path: `${localApi}/session/:sessionID/permission/:permissionID/reply`, respond: () => state.permissionReply },
|
||||
{ method: 'POST', path: `${localApi}/session/:sessionID/form/:formID/reply`, respond: () => state.formReply },
|
||||
{ method: 'DELETE', path: `${localApi}/session/:sessionID/form/:formID`, respond: () => state.formCancel },
|
||||
{ method: 'POST', path: `${localApi}/rpc/opencode.goal/get`, respond: () => state.goalResponder ? state.goalResponder(emptyRequest, {}, undefined) : ({ json: { output: null } }) },
|
||||
{ method: 'POST', path: `${remoteApi}/rpc/opencode.goal/get`, respond: () => state.goalResponder ? state.goalResponder(emptyRequest, {}, undefined) : ({ json: { output: null } }) },
|
||||
]
|
||||
}
|
||||
|
||||
@@ -309,6 +320,7 @@ interface RenderProviderOptions {
|
||||
queryClient?: ReturnType<typeof createTestQueryClient>
|
||||
auth?: 'anonymous' | 'authenticated'
|
||||
fakeTimers?: boolean
|
||||
ui?: ReactElement
|
||||
}
|
||||
|
||||
interface Deferred<T> {
|
||||
@@ -357,7 +369,7 @@ interface ProviderHarness {
|
||||
async function renderProvider(options: RenderProviderOptions = {}): Promise<ProviderHarness> {
|
||||
const api = createApiState(options.api)
|
||||
const queryClient = options.queryClient ?? createTestQueryClient()
|
||||
const result = renderWithProviders(<Harness />, {
|
||||
const result = renderWithProviders(options.ui ?? <Harness />, {
|
||||
events: true,
|
||||
route: options.route ?? '/',
|
||||
auth: options.auth ?? 'authenticated',
|
||||
@@ -1202,6 +1214,124 @@ describe('EventProvider permissions and forms', () => {
|
||||
expect(queryClient.getQueryData(['session-goal', 'session-1', '/repo'])).toEqual({ supported: true, goal: updatedGoal })
|
||||
})
|
||||
|
||||
it('refreshes an unavailable goal read on plugin.updated for its directory', async () => {
|
||||
const goal: GoalState = {
|
||||
id: 'goal-1',
|
||||
objective: 'Ship the goal bar',
|
||||
status: 'active',
|
||||
rounds: 0,
|
||||
maxRounds: 10,
|
||||
boot: 'boot-1',
|
||||
updatedAt: 1000,
|
||||
}
|
||||
let registered = false
|
||||
const goalResponder: FetchRoute['respond'] = () =>
|
||||
registered
|
||||
? { json: { output: goal } }
|
||||
: {
|
||||
status: 400,
|
||||
json: {
|
||||
_tag: 'RpcError',
|
||||
type: 'rpc.unavailable',
|
||||
message: 'RPC is unavailable: opencode.goal',
|
||||
},
|
||||
}
|
||||
const queryClient = createTestQueryClient()
|
||||
const goalKey = ['session-goal', 'session-1', '/repo']
|
||||
|
||||
const harness = await renderProvider({
|
||||
queryClient,
|
||||
ui: <GoalReadHarness sessionID="session-1" directory="/repo" />,
|
||||
api: { goalResponder },
|
||||
})
|
||||
|
||||
await waitFor(() => expect(queryClient.getQueryData(goalKey)).toEqual({ supported: false }))
|
||||
await waitFor(() => expect(queryClient.getQueryState(goalKey)?.fetchStatus).toBe('idle'))
|
||||
|
||||
registered = true
|
||||
harness.push(pluginUpdated({ directory: '/repo' }))
|
||||
|
||||
await waitFor(() => expect(queryClient.getQueryData(goalKey)).toEqual({ supported: true, goal }))
|
||||
expect(
|
||||
harness.fetchFake
|
||||
.findRequests('POST', '/api/opencode/api/rpc/opencode.goal/get')
|
||||
.every((request) => request.searchParams.get('location[directory]') === '/repo'),
|
||||
).toBe(true)
|
||||
})
|
||||
|
||||
it('invalidates only goal reads for the event directory on the local server', async () => {
|
||||
const harness = await renderProvider()
|
||||
const repoKey = ['session-goal', 'session-1', '/repo']
|
||||
const otherKey = ['session-goal', 'session-1', '/other']
|
||||
const remoteKey = ['session-goal', 'session-1', '/repo', 'srv_remote']
|
||||
harness.queryClient.setQueryData(repoKey, { supported: true, goal: null })
|
||||
harness.queryClient.setQueryData(otherKey, { supported: true, goal: null })
|
||||
harness.queryClient.setQueryData(remoteKey, { supported: true, goal: null })
|
||||
|
||||
harness.push(pluginUpdated({ directory: '/repo' }))
|
||||
|
||||
await waitFor(() => expect(harness.queryClient.getQueryState(repoKey)?.isInvalidated).toBe(true))
|
||||
expect(harness.queryClient.getQueryState(otherKey)?.isInvalidated).toBe(false)
|
||||
expect(harness.queryClient.getQueryState(remoteKey)?.isInvalidated).toBe(false)
|
||||
})
|
||||
|
||||
it('invalidates only goal reads for the event server when the event names one', async () => {
|
||||
const harness = await renderProvider()
|
||||
const repoKey = ['session-goal', 'session-1', '/repo']
|
||||
const otherKey = ['session-goal', 'session-1', '/other']
|
||||
const remoteKey = ['session-goal', 'session-1', '/repo', 'srv_remote']
|
||||
harness.queryClient.setQueryData(repoKey, { supported: true, goal: null })
|
||||
harness.queryClient.setQueryData(otherKey, { supported: true, goal: null })
|
||||
harness.queryClient.setQueryData(remoteKey, { supported: true, goal: null })
|
||||
|
||||
harness.push(pluginUpdated({ directory: '/repo', serverId: 'srv_remote' }))
|
||||
|
||||
await waitFor(() => expect(harness.queryClient.getQueryState(remoteKey)?.isInvalidated).toBe(true))
|
||||
expect(harness.queryClient.getQueryState(repoKey)?.isInvalidated).toBe(false)
|
||||
expect(harness.queryClient.getQueryState(otherKey)?.isInvalidated).toBe(false)
|
||||
})
|
||||
|
||||
it('invalidates every local goal read for a location-less plugin.updated', async () => {
|
||||
const harness = await renderProvider()
|
||||
const repoKey = ['session-goal', 'session-1', '/repo']
|
||||
const otherKey = ['session-goal', 'session-1', '/other']
|
||||
const remoteKey = ['session-goal', 'session-1', '/repo', 'srv_remote']
|
||||
harness.queryClient.setQueryData(repoKey, { supported: true, goal: null })
|
||||
harness.queryClient.setQueryData(otherKey, { supported: true, goal: null })
|
||||
harness.queryClient.setQueryData(remoteKey, { supported: true, goal: null })
|
||||
|
||||
harness.push(pluginUpdated())
|
||||
|
||||
await waitFor(() => {
|
||||
expect(harness.queryClient.getQueryState(repoKey)?.isInvalidated).toBe(true)
|
||||
expect(harness.queryClient.getQueryState(otherKey)?.isInvalidated).toBe(true)
|
||||
})
|
||||
expect(harness.queryClient.getQueryState(remoteKey)?.isInvalidated).toBe(false)
|
||||
})
|
||||
|
||||
it('invalidates cached goal reads when the browser stream connects', async () => {
|
||||
const queryClient = createTestQueryClient()
|
||||
queryClient.setQueryData(['session-goal', 'session-1', '/repo'], { supported: false })
|
||||
|
||||
await renderProvider({ queryClient })
|
||||
|
||||
await waitFor(() =>
|
||||
expect(queryClient.getQueryState(['session-goal', 'session-1', '/repo'])?.isInvalidated).toBe(true),
|
||||
)
|
||||
})
|
||||
|
||||
it('invalidates cached goal reads on an upstream resync', async () => {
|
||||
const harness = await renderProvider()
|
||||
const goalKey = ['session-goal', 'session-1', '/repo']
|
||||
harness.queryClient.setQueryData(goalKey, { supported: true, goal: null })
|
||||
|
||||
expect(harness.queryClient.getQueryState(goalKey)?.isInvalidated).toBe(false)
|
||||
|
||||
await harness.resync()
|
||||
|
||||
await waitFor(() => expect(harness.queryClient.getQueryState(goalKey)?.isInvalidated).toBe(true))
|
||||
})
|
||||
|
||||
it('invalidates the sibling caches when a branch changes outside a repo row', async () => {
|
||||
const harness = await renderProvider()
|
||||
const invalidateQueries = vi.spyOn(harness.queryClient, 'invalidateQueries')
|
||||
|
||||
@@ -41,7 +41,11 @@ import { getServerSessionPath, getSessionPath, parseRepoRoute, parseServerProjec
|
||||
import { serverScopedKey } from '@/lib/serverScope'
|
||||
import { repoMatchesDirectory } from '@/components/navigation/sidebar-session-tree'
|
||||
import { changeWalkthroughQueryKey } from '@/hooks/useChangeWalkthrough'
|
||||
import { applySessionGoalEvent, SESSION_GOAL_QUERY_ROOT } from '@/hooks/useSessionGoals'
|
||||
import {
|
||||
applySessionGoalEvent,
|
||||
invalidateSessionGoalsForLocation,
|
||||
SESSION_GOAL_QUERY_ROOT,
|
||||
} from '@/hooks/useSessionGoals'
|
||||
import { busyStatusesFromActiveSessions, useSessionStatus } from '@/stores/sessionStatusStore'
|
||||
import {
|
||||
invalidateChildSessionCaches,
|
||||
@@ -1106,6 +1110,9 @@ export function EventProvider({ children }: { children: React.ReactNode }) {
|
||||
invalidateQueryKeysDebounced(queryClient, [['opencode', 'config'], ['opencode-config']])
|
||||
invalidateProviderCachesDebounced(queryClient)
|
||||
break
|
||||
case 'plugin.updated':
|
||||
void invalidateSessionGoalsForLocation(queryClient, serverId, event.directory ?? null)
|
||||
break
|
||||
case 'ssh.host-key-request':
|
||||
setSSHHostKeyRequest(event.properties)
|
||||
break
|
||||
|
||||
@@ -1,8 +1,15 @@
|
||||
import { QueryClient, focusManager } from '@tanstack/react-query'
|
||||
import { act, screen, waitFor } from '@testing-library/react'
|
||||
import { afterEach, describe, expect, it, vi } from 'vitest'
|
||||
import { applySessionGoalEvent, useSessionGoal, useSessionGoalCommand } from './useSessionGoals'
|
||||
import {
|
||||
applySessionGoalEvent,
|
||||
invalidateSessionGoalsForLocation,
|
||||
useSessionGoal,
|
||||
useSessionGoalCommand,
|
||||
} from './useSessionGoals'
|
||||
import { renderHookWithProviders } from '@/test/render'
|
||||
import { makeSession } from '@/test/fixtures/api'
|
||||
import { LOCAL_OPENCODE_SERVER_ID } from '@opencode-manager/shared/schemas'
|
||||
import type { GoalState, SessionGoalRead } from '@opencode-manager/shared/opencode'
|
||||
import type { FetchRoute, FetchRouteResult } from '@/test/fetchFake'
|
||||
|
||||
@@ -31,6 +38,22 @@ function goalRoute(respond: FetchRoute['respond'] = () => ({ json: { output: goa
|
||||
return { method: 'POST', path: goalReadPath, respond }
|
||||
}
|
||||
|
||||
const unavailableGoalBody = {
|
||||
_tag: 'RpcError',
|
||||
type: 'rpc.unavailable',
|
||||
message: 'RPC is unavailable: opencode.goal',
|
||||
}
|
||||
|
||||
function unavailableThenGoalRoute(): FetchRoute {
|
||||
let calls = 0
|
||||
return goalRoute(() => {
|
||||
calls += 1
|
||||
return calls === 1
|
||||
? { status: 400, json: unavailableGoalBody }
|
||||
: { json: { output: goal } }
|
||||
})
|
||||
}
|
||||
|
||||
const commandRoute: FetchRoute = {
|
||||
method: 'POST',
|
||||
path: '/api/opencode/api/session/ses_1/command',
|
||||
@@ -105,6 +128,110 @@ describe('useSessionGoal', () => {
|
||||
})
|
||||
})
|
||||
|
||||
describe('invalidateSessionGoalsForLocation', () => {
|
||||
it('recovers an unavailable goal read for the invalidated location', async () => {
|
||||
const { result, fetchFake, queryClient } = renderHookWithProviders(() => useSessionGoal('ses_1', '/repo'), {
|
||||
...hookProviders,
|
||||
fetchRoutes: [unavailableThenGoalRoute()],
|
||||
})
|
||||
|
||||
await waitFor(() => expect(result.current.data).toEqual({ supported: false }))
|
||||
|
||||
await act(async () => {
|
||||
await invalidateSessionGoalsForLocation(queryClient, LOCAL_OPENCODE_SERVER_ID, '/repo')
|
||||
})
|
||||
|
||||
await waitFor(() => expect(result.current.data).toEqual(supportedGoal))
|
||||
expect(fetchFake.findRequests('POST', goalReadPath)).toHaveLength(2)
|
||||
})
|
||||
|
||||
it('keeps an always-unavailable goal unsupported without retrying', async () => {
|
||||
vi.useFakeTimers({ shouldAdvanceTime: true })
|
||||
try {
|
||||
const { result, fetchFake, queryClient } = renderHookWithProviders(() => useSessionGoal('ses_1', '/repo'), {
|
||||
...hookProviders,
|
||||
fetchRoutes: [goalRoute(() => ({ status: 400, json: unavailableGoalBody }))],
|
||||
})
|
||||
|
||||
await waitFor(() => expect(result.current.data).toEqual({ supported: false }))
|
||||
|
||||
await act(async () => {
|
||||
await invalidateSessionGoalsForLocation(queryClient, LOCAL_OPENCODE_SERVER_ID, '/repo')
|
||||
})
|
||||
|
||||
await waitFor(() => expect(fetchFake.findRequests('POST', goalReadPath)).toHaveLength(2))
|
||||
expect(result.current.data).toEqual({ supported: false })
|
||||
|
||||
await act(async () => {
|
||||
await vi.advanceTimersByTimeAsync(10_000)
|
||||
})
|
||||
expect(fetchFake.findRequests('POST', goalReadPath)).toHaveLength(2)
|
||||
expect(result.current.data).toEqual({ supported: false })
|
||||
} finally {
|
||||
vi.useRealTimers()
|
||||
}
|
||||
})
|
||||
|
||||
it('recovers an unavailable goal read on window focus', async () => {
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: { retry: false, staleTime: 0, refetchOnWindowFocus: true, gcTime: Infinity },
|
||||
mutations: { retry: false },
|
||||
},
|
||||
})
|
||||
const { result } = renderHookWithProviders(() => useSessionGoal('ses_1', '/repo'), {
|
||||
...hookProviders,
|
||||
queryClient,
|
||||
fetchRoutes: [unavailableThenGoalRoute()],
|
||||
})
|
||||
|
||||
await waitFor(() => expect(result.current.data).toEqual({ supported: false }))
|
||||
|
||||
try {
|
||||
act(() => {
|
||||
focusManager.setFocused(false)
|
||||
focusManager.setFocused(true)
|
||||
})
|
||||
await waitFor(() => expect(result.current.data).toEqual(supportedGoal))
|
||||
} finally {
|
||||
focusManager.setFocused(undefined)
|
||||
}
|
||||
})
|
||||
|
||||
it('does not refetch an inactive goal query or cache other locations after unmount', async () => {
|
||||
const pending = deferred()
|
||||
const { unmount, fetchFake, queryClient } = renderHookWithProviders(() => useSessionGoal('ses_1', '/repo'), {
|
||||
...hookProviders,
|
||||
fetchRoutes: [goalRoute(() => pending.promise)],
|
||||
})
|
||||
|
||||
await waitFor(() =>
|
||||
expect(queryClient.getQueryState(['session-goal', 'ses_1', '/repo'])?.fetchStatus).toBe('fetching'),
|
||||
)
|
||||
|
||||
unmount()
|
||||
|
||||
await act(async () => {
|
||||
await invalidateSessionGoalsForLocation(queryClient, LOCAL_OPENCODE_SERVER_ID, '/repo')
|
||||
await invalidateSessionGoalsForLocation(queryClient, LOCAL_OPENCODE_SERVER_ID, '/other')
|
||||
})
|
||||
|
||||
expect(fetchFake.findRequests('POST', goalReadPath)).toHaveLength(1)
|
||||
|
||||
await act(async () => {
|
||||
pending.resolve({ json: { output: goal } })
|
||||
})
|
||||
|
||||
await waitFor(() =>
|
||||
expect(queryClient.getQueryState(['session-goal', 'ses_1', '/repo'])?.fetchStatus).toBe('idle'),
|
||||
)
|
||||
expect(queryClient.getQueryCache().findAll({ queryKey: ['session-goal'] }).map((query) => query.queryKey)).toEqual([
|
||||
['session-goal', 'ses_1', '/repo'],
|
||||
])
|
||||
expect(fetchFake.findRequests('POST', goalReadPath)).toHaveLength(1)
|
||||
})
|
||||
})
|
||||
|
||||
describe('applySessionGoalEvent', () => {
|
||||
afterEach(() => {
|
||||
vi.useRealTimers()
|
||||
|
||||
@@ -19,9 +19,9 @@ function sessionGoalQueryKey(sessionID: string, directory: string | undefined, s
|
||||
return serverScopedKey([SESSION_GOAL_QUERY_ROOT, sessionID, directory], serverId)
|
||||
}
|
||||
|
||||
function isSessionGoalQueryFor(query: Query, sessionID: string, serverId: string): boolean {
|
||||
function isSessionGoalQueryOnServer(query: Query, serverId: string): boolean {
|
||||
const { queryKey } = query
|
||||
if (queryKey[0] !== SESSION_GOAL_QUERY_ROOT || queryKey[1] !== sessionID) return false
|
||||
if (queryKey[0] !== SESSION_GOAL_QUERY_ROOT) return false
|
||||
if (isLocalOpenCodeServer(serverId)) return queryKey.length === SESSION_GOAL_KEY_BASE_LENGTH
|
||||
return (
|
||||
queryKey.length === SESSION_GOAL_KEY_BASE_LENGTH + 1
|
||||
@@ -29,6 +29,10 @@ function isSessionGoalQueryFor(query: Query, sessionID: string, serverId: string
|
||||
)
|
||||
}
|
||||
|
||||
function isSessionGoalQueryFor(query: Query, sessionID: string, serverId: string): boolean {
|
||||
return isSessionGoalQueryOnServer(query, serverId) && query.queryKey[1] === sessionID
|
||||
}
|
||||
|
||||
function sessionGoalQueryPredicate(sessionID: string, serverId: string) {
|
||||
return (query: Query) => isSessionGoalQueryFor(query, sessionID, serverId)
|
||||
}
|
||||
@@ -56,6 +60,18 @@ export function applySessionGoalEvent(
|
||||
return true
|
||||
}
|
||||
|
||||
export async function invalidateSessionGoalsForLocation(
|
||||
queryClient: QueryClient,
|
||||
serverId: string,
|
||||
directory: string | null,
|
||||
): Promise<void> {
|
||||
await queryClient.invalidateQueries({
|
||||
predicate: (query) =>
|
||||
isSessionGoalQueryOnServer(query, serverId)
|
||||
&& (directory === null || query.queryKey[2] === directory),
|
||||
})
|
||||
}
|
||||
|
||||
type GoalCommandInput = Omit<RunCommandInput, 'name' | 'delivery'> & {
|
||||
model?: ModelRef
|
||||
agent?: string
|
||||
|
||||
@@ -75,7 +75,7 @@ describe('OpenCodeEventStream', () => {
|
||||
directory: null,
|
||||
payload: { id: 'evt_2', created: 1001, type: 'provider.updated', data: {} },
|
||||
})
|
||||
transport.message({ payload: { id: 'evt_3', created: 1002, type: 'credential.updated', data: {} } })
|
||||
transport.message({ payload: { id: 'evt_3', created: 1002, type: 'credential.updated', data: { integrationID: 'openai', credentialID: 'cred_1' } } })
|
||||
|
||||
expect(onEvent).toHaveBeenNthCalledWith(1, {
|
||||
id: 'evt_2',
|
||||
@@ -87,7 +87,7 @@ describe('OpenCodeEventStream', () => {
|
||||
id: 'evt_3',
|
||||
created: 1002,
|
||||
type: 'credential.updated',
|
||||
data: {},
|
||||
data: { integrationID: 'openai', credentialID: 'cred_1' },
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
@@ -383,7 +383,7 @@ const CredentialUpdatedSchema = z.looseObject({
|
||||
metadata: JsonObjectSchema.optional(),
|
||||
type: z.literal('credential.updated'),
|
||||
location: LocationRefSchema.optional(),
|
||||
data: z.looseObject({}),
|
||||
data: z.looseObject({ integrationID: z.string(), credentialID: z.string() }),
|
||||
})
|
||||
|
||||
const CredentialSwitchedSchema = z.looseObject({
|
||||
|
||||
Vendored
+4
@@ -330,6 +330,10 @@ export function goalChanged(
|
||||
return withContext(payload, context)
|
||||
}
|
||||
|
||||
export function pluginUpdated(context: StreamEventContext = {}): JsonObject {
|
||||
return streamEvent('plugin.updated', {}, context)
|
||||
}
|
||||
|
||||
export function sshHostKeyRequest(properties: SSHHostKeyRequest): JsonObject {
|
||||
return { type: 'ssh.host-key-request', properties }
|
||||
}
|
||||
+5
-2
@@ -10,12 +10,13 @@ to the local working tree.
|
||||
|
||||
| ocm | OpenCode Manager | Local OpenCode |
|
||||
|---|---|---|
|
||||
| 0.7.x | >= 0.19.0 | >= 2.3.0, < 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 |
|
||||
| 0.3.x | >= 0.19.0 | >= 2.0.15, < 3 |
|
||||
|
||||
ocm 0.6.x, 0.5.x, 0.4.x and 0.3.x attach through the repo-scoped Manager proxy
|
||||
ocm 0.7.x, 0.6.x, 0.5.x, 0.4.x and 0.3.x attach through the repo-scoped Manager proxy
|
||||
(`/api/opencode-proxy/repos/:repoId`), load the plugin from the OpenCode 2
|
||||
`cli.json` `plugins` list, and move sessions with OpenCode 2 session
|
||||
export/import. Older Managers lack that route; `ocm` then fails with
|
||||
@@ -25,6 +26,8 @@ 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.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
|
||||
a local OpenCode >= 2.2.5. Stay on ocm 0.5.x with an older 2.2.x. ocm 0.5.0 itself
|
||||
@@ -324,7 +327,7 @@ global installs); the plugin surface is TUI-only.
|
||||
## Requirements
|
||||
|
||||
- macOS or Linux (Windows is unsupported)
|
||||
- OpenCode >= 2.2.5 (same major, 2.x) available on `PATH` for the TUI plugin
|
||||
- OpenCode >= 2.3.0 (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`
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@opencode-manager/ocm-cli",
|
||||
"version": "0.6.0",
|
||||
"version": "0.7.0",
|
||||
"description": "OpenCode Manager CLI: attach a local OpenCode TUI to a Manager-hosted repo.",
|
||||
"license": "MIT",
|
||||
"repository": {
|
||||
@@ -18,7 +18,7 @@
|
||||
}
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@opencode/theme": ">=2.2.5 <3.0.0",
|
||||
"@opencode/theme": ">=2.3.0 <3.0.0",
|
||||
"@opentui/core": ">=0.8.0 <0.9.0",
|
||||
"@opentui/solid": ">=0.8.0 <0.9.0",
|
||||
"solid-js": ">=1.9.0"
|
||||
|
||||
Generated
+133
-220
@@ -7,26 +7,26 @@ settings:
|
||||
catalogs:
|
||||
default:
|
||||
'@opencode/client':
|
||||
specifier: 2.2.5
|
||||
version: 2.2.5
|
||||
specifier: 2.3.0
|
||||
version: 2.3.0
|
||||
'@opencode/plugin':
|
||||
specifier: 2.2.5
|
||||
version: 2.2.5
|
||||
specifier: 2.3.0
|
||||
version: 2.3.0
|
||||
'@opencode/schema':
|
||||
specifier: 2.2.5
|
||||
version: 2.2.5
|
||||
specifier: 2.3.0
|
||||
version: 2.3.0
|
||||
'@opencode/theme':
|
||||
specifier: 2.2.5
|
||||
version: 2.2.5
|
||||
specifier: 2.3.0
|
||||
version: 2.3.0
|
||||
'@opentui/core':
|
||||
specifier: 0.8.2
|
||||
version: 0.8.2
|
||||
specifier: 0.8.4
|
||||
version: 0.8.4
|
||||
'@opentui/solid':
|
||||
specifier: 0.8.2
|
||||
version: 0.8.2
|
||||
specifier: 0.8.4
|
||||
version: 0.8.4
|
||||
effect:
|
||||
specifier: 4.0.6
|
||||
version: 4.0.6
|
||||
specifier: 4.1.0
|
||||
version: 4.1.0
|
||||
solid-js:
|
||||
specifier: 1.9.18
|
||||
version: 1.9.18
|
||||
@@ -315,16 +315,16 @@ importers:
|
||||
version: link:../shared
|
||||
'@opencode/plugin':
|
||||
specifier: 'catalog:'
|
||||
version: 2.2.5(@opencode/theme@2.2.5(typescript@5.9.3)(web-tree-sitter@0.25.10))(@opentelemetry/semantic-conventions@1.43.0)(@opentui/core@0.8.2(typescript@5.9.3)(web-tree-sitter@0.25.10))(@opentui/solid@0.8.2(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.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/theme':
|
||||
specifier: 'catalog:'
|
||||
version: 2.2.5(typescript@5.9.3)(web-tree-sitter@0.25.10)
|
||||
version: 2.3.0(typescript@5.9.3)(web-tree-sitter@0.25.10)
|
||||
'@opentui/core':
|
||||
specifier: 'catalog:'
|
||||
version: 0.8.2(typescript@5.9.3)(web-tree-sitter@0.25.10)
|
||||
version: 0.8.4(typescript@5.9.3)(web-tree-sitter@0.25.10)
|
||||
'@opentui/solid':
|
||||
specifier: 'catalog:'
|
||||
version: 0.8.2(solid-js@1.9.18)(typescript@5.9.3)(web-tree-sitter@0.25.10)
|
||||
version: 0.8.4(solid-js@1.9.18)(typescript@5.9.3)(web-tree-sitter@0.25.10)
|
||||
'@types/bun':
|
||||
specifier: ^1.3.14
|
||||
version: 1.3.14
|
||||
@@ -354,13 +354,13 @@ importers:
|
||||
dependencies:
|
||||
'@opencode/client':
|
||||
specifier: 'catalog:'
|
||||
version: 2.2.5(effect@4.0.6)(solid-js@1.9.18)
|
||||
version: 2.3.0(effect@4.1.0)(solid-js@1.9.18)
|
||||
'@opencode/schema':
|
||||
specifier: 'catalog:'
|
||||
version: 2.2.5
|
||||
version: 2.3.0
|
||||
effect:
|
||||
specifier: 'catalog:'
|
||||
version: 4.0.6
|
||||
version: 4.1.0
|
||||
jsonc-parser:
|
||||
specifier: ^3.3.1
|
||||
version: 3.3.1
|
||||
@@ -816,9 +816,9 @@ packages:
|
||||
peerDependencies:
|
||||
react: '>=16.8.0'
|
||||
|
||||
'@effect/opentelemetry@4.0.6':
|
||||
resolution: {integrity: sha512-xhLR1EN4ZNaKM7Bx59SCFiRNduFzgH8LZXDrCpPN8MpQ93V0GQcFHTBah5T3EXO2v+5HTEacdTgetIA0Creqvw==}
|
||||
engines: {node: '>=18.0.0'}
|
||||
'@effect/opentelemetry@4.1.0':
|
||||
resolution: {integrity: sha512-j9bNzQaoQvcnimBFMG0i3piEW20E8HjkXAQHTJN/XqG2e4uJ9zCv53/HCNzD7+ooFn5S4nwQy/BOXeNReMIe+A==}
|
||||
engines: {node: '>=22.19.0'}
|
||||
peerDependencies:
|
||||
'@opentelemetry/api': '>=1.9.0 <2.0.0'
|
||||
'@opentelemetry/api-logs': '>=0.203.0 <0.300.0'
|
||||
@@ -829,7 +829,7 @@ packages:
|
||||
'@opentelemetry/sdk-trace-node': '>=2.0.0 <3.0.0'
|
||||
'@opentelemetry/sdk-trace-web': '>=2.0.0 <3.0.0'
|
||||
'@opentelemetry/semantic-conventions': '>=1.33.0 <2.0.0'
|
||||
effect: ^4.0.6
|
||||
effect: ^4.1.0
|
||||
peerDependenciesMeta:
|
||||
'@opentelemetry/api':
|
||||
optional: true
|
||||
@@ -848,17 +848,17 @@ packages:
|
||||
'@opentelemetry/sdk-trace-web':
|
||||
optional: true
|
||||
|
||||
'@effect/platform-node-shared@4.0.6':
|
||||
resolution: {integrity: sha512-0PhyC4uG30xGtsajnxjkcBWfTjNRzUh4ZKl1Kvo/MNyCTb+W2O+fBzf7wCRCoqt+nLudiq4V7vX40Q8XIBuMaQ==}
|
||||
engines: {node: '>=18.0.0'}
|
||||
'@effect/platform-node-shared@4.1.0':
|
||||
resolution: {integrity: sha512-uYQfFRoxWLo8fIhiSeBcmz/R1ooOfE3HF3cWHFgxz82tZMk2Wn02BGABcdLmaAch9VpDLbtWnuhSxNyBsGMUFg==}
|
||||
engines: {node: '>=22.19.0'}
|
||||
peerDependencies:
|
||||
effect: ^4.0.6
|
||||
effect: ^4.1.0
|
||||
|
||||
'@effect/platform-node@4.0.6':
|
||||
resolution: {integrity: sha512-gXvGHAy0/8PZbWvMMguloDUyeSP+rzYEo3FSEqUuGduxo9ORcGioDxPI+GOLCIFfam7VuNkmSUxBOiRMIrMrBw==}
|
||||
engines: {node: '>=18.0.0'}
|
||||
'@effect/platform-node@4.1.0':
|
||||
resolution: {integrity: sha512-v+X7moGVF9k5oMVvz0slA+NgtEod+W+oygeI285MDJgSlUCW3JcqElj+cD3rlijFZtpKhC7RLkU1GuCxjGHTpA==}
|
||||
engines: {node: '>=22.19.0'}
|
||||
peerDependencies:
|
||||
effect: ^4.0.6
|
||||
effect: ^4.1.0
|
||||
redis: '>=5.0.0 <7.0.0'
|
||||
|
||||
'@esbuild/aix-ppc64@0.27.2':
|
||||
@@ -1186,13 +1186,13 @@ packages:
|
||||
resolution: {integrity: sha512-mGUWr1uMnf0le2TwfOZY4SFxZGXGfm4Jtay/nwAa2FLNAKXUoUwaGwBMNH36UHPtinWfTSJ3nqFQr0091CxVGg==}
|
||||
engines: {node: ^20.17.0 || >=22.9.0}
|
||||
|
||||
'@opencode/ai@2.2.5':
|
||||
resolution: {integrity: sha512-TolUvNR615vpkc6FPf2np5PbAbO7k1gaVlrtZ5Wx5tN7Y8K2uSer0BZEiajJ2uBsF6RXJFfjjX1GZbcf85GtGQ==}
|
||||
'@opencode/ai@2.3.0':
|
||||
resolution: {integrity: sha512-CsaY18G5cXtNvOgvONaxguFeaWf+gENSYKzDnYIIREpoSLjLm9oF2v+adaE4nUozM1qIMR4+s23VOViaRypFLw==}
|
||||
|
||||
'@opencode/client@2.2.5':
|
||||
resolution: {integrity: sha512-EjYrFGWHURsIbjtmQdIsGSPmYZGaulxqwEfYxQH5t9838508BCIvDX9f7/ZsgNGHYXM0punA3W8hTt6GjxIEaw==}
|
||||
'@opencode/client@2.3.0':
|
||||
resolution: {integrity: sha512-xu74XGiYIqLZ2FzIrtjaR5UNWWXY3fRln0WLgZoQTR/wWMgG+T9XGQQGCl8ry8jnCFsJVokiHemBqft9oMzC1A==}
|
||||
peerDependencies:
|
||||
effect: 4.0.6
|
||||
effect: 4.1.0
|
||||
solid-js: '>=1.9.0'
|
||||
peerDependenciesMeta:
|
||||
effect:
|
||||
@@ -1200,12 +1200,12 @@ packages:
|
||||
solid-js:
|
||||
optional: true
|
||||
|
||||
'@opencode/plugin@2.2.5':
|
||||
resolution: {integrity: sha512-DHtmC55UM5NbtZwyayLxI/ygTMt3n+6xXYYBkOdNxmZ+rLcIbpjmeJvySqdxFmT3K7Pk/2pHsuocxhquu6sysA==}
|
||||
'@opencode/plugin@2.3.0':
|
||||
resolution: {integrity: sha512-wfBz8UKpy1jb8EAuFqvqbmVG6+6X6B5B+54UAGmofuT7vZ6F6cC3OQwlw1ObEi4NTKG66y0x6Z6zz4AG0H2N9Q==}
|
||||
peerDependencies:
|
||||
'@opencode/theme': 2.2.5
|
||||
'@opentui/core': '>=0.8.0'
|
||||
'@opentui/solid': '>=0.8.0'
|
||||
'@opencode/theme': 2.3.0
|
||||
'@opentui/core': '>=0.8.4'
|
||||
'@opentui/solid': '>=0.8.4'
|
||||
electron: '*'
|
||||
solid-js: '>=1.9.0'
|
||||
vite: '>=6'
|
||||
@@ -1226,17 +1226,17 @@ packages:
|
||||
vite-plugin-solid:
|
||||
optional: true
|
||||
|
||||
'@opencode/protocol@2.2.5':
|
||||
resolution: {integrity: sha512-T3ET0kS1kj8sv7/d+c1T2he7TXoZ4Rki7zTqHuv8b0kWhg3Vk6o0t+T9KsEQdEat7PFksgH5haC2iSSdJOB7/w==}
|
||||
'@opencode/protocol@2.3.0':
|
||||
resolution: {integrity: sha512-V37zTGXVa1j9aXUvUY01YN1EtfMMSWoT5pSCc6M0UsGdTUZX6QL/vMgGVGzPvbt7+Z8Vo40/0DFRPyqT4sdvnw==}
|
||||
|
||||
'@opencode/schema@2.2.5':
|
||||
resolution: {integrity: sha512-hlKk6cX28BwvOMOVG3Mtt4tEHxwY68Z6Gz5/cL32N8qfZexykCKsZai49Jms4/2gD8BzvVuBERnnlLDbdLstUA==}
|
||||
'@opencode/schema@2.3.0':
|
||||
resolution: {integrity: sha512-9CPS4+BXWUs3ELIWo68AA2q4XEPMkRYwpGYdqd/wNz3jRTOB8swef+2/z+igkCel+UtlX+dAlGTmSnid/JcoKw==}
|
||||
|
||||
'@opencode/theme@2.2.5':
|
||||
resolution: {integrity: sha512-mUW5YKCxJQHnhrCepsyMoEqWZrQFipF5WrRmos9WB/iehZiUL6ix6OXjUmv5W5gctKzgQd8tYVi7x90H5/grHQ==}
|
||||
'@opencode/theme@2.3.0':
|
||||
resolution: {integrity: sha512-p0i87SpXs2JmGUfK00H5kTS5mJeMrSXv+ntu1LpK7q/wE3o7c2+43DQ7Fv9mzh+Zpz/vZ8XEbSiCVoCL39gQVw==}
|
||||
|
||||
'@opencode/util@2.2.5':
|
||||
resolution: {integrity: sha512-RqbJ2EwxOs6oQMH1P4Yenkejit0oiAyxBTPXhzx4n6j4SOV0+Duz6lhftlJkAjTbq7Rw2b0Mzx4duOJUdw6s5A==}
|
||||
'@opencode/util@2.3.0':
|
||||
resolution: {integrity: sha512-0OIjkq9EQ/p50Wft57yr2NIyuzz1zqaBydwu/5rzEy1+Bu5hJkr5oUqAvt1ye6zZdBW3K8kiFGXFQsChX4cNPg==}
|
||||
|
||||
'@opentelemetry/api-logs@0.219.0':
|
||||
resolution: {integrity: sha512-FFx7YnaYJlIjqWW/AG/yAZ0L/NEY724PipXXXQLdtZPbLwBGbUMTGL1i/esI56TWfTUXxhLfpgrnWJCG8aUJyg==}
|
||||
@@ -1312,100 +1312,54 @@ packages:
|
||||
resolution: {integrity: sha512-eSYWTm620tTk45EKSedaUL8MFYI8hW164hIXsgIHyxu3VobUB3fFCu5t0hQby6OoWRPsG1KkKUG2M5UadiLiVg==}
|
||||
engines: {node: '>=14'}
|
||||
|
||||
'@opentui/core-darwin-arm64@0.8.0':
|
||||
resolution: {integrity: sha512-Cp+BL1DsRZhUG56AuyXlH8DA4dsKfZ3Qgh1XMYDGokkC4p9uv8kdNNhyzmURAFa2LK77XqVv1Zhwr/6DqqpMlw==}
|
||||
'@opentui/core-darwin-arm64@0.8.4':
|
||||
resolution: {integrity: sha512-kAWCmLsGuxQANeq4AjjX0Yodca2VIofQGUfIH9Edg9BKajYpf941heZfMJkkkJUXawYTNFTR2lBYsdneUUJBrg==}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@opentui/core-darwin-arm64@0.8.2':
|
||||
resolution: {integrity: sha512-/8pFK289hi+jtoUgJYZJEABTreLoQ3tNVQuMFLF0xDBkREJaR9xvh2RHKzhVLut9bhKf9oY2bgD37pMgYNqwqA==}
|
||||
cpu: [arm64]
|
||||
os: [darwin]
|
||||
|
||||
'@opentui/core-darwin-x64@0.8.0':
|
||||
resolution: {integrity: sha512-Jp4pzdIuKsS3XYq9xuWuAO52tTj9gnWeeoI3bg456CF6XnY2yQMasWOd/WmjfvYfAaJzGDFa4DNXhByBMPVuTw==}
|
||||
'@opentui/core-darwin-x64@0.8.4':
|
||||
resolution: {integrity: sha512-0S62YHtIh1Q9tTun7065njEtYUUtf1zXwllDKXr63R1cVgq+8eRdVQ2PsAGNOqB5OYYno+M8o2tuK/Es2uvmBA==}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@opentui/core-darwin-x64@0.8.2':
|
||||
resolution: {integrity: sha512-AN3QB5yIGQyKs4XKgGuA1vSLA++jonTB6NR2fNLbw4+wizgETlQ77ur30175yEVysaN2tQNO2dJasvHMx05WQg==}
|
||||
cpu: [x64]
|
||||
os: [darwin]
|
||||
|
||||
'@opentui/core-linux-arm64-musl@0.8.0':
|
||||
resolution: {integrity: sha512-8ZPl/2DChcS7XIVRPIazigXaMNyxa2bwvuzPprNbzT0+cVJLIoGC19pjiV3bI3oVXBPVMNqgIcppOrEHBhlouw==}
|
||||
'@opentui/core-linux-arm64-musl@0.8.4':
|
||||
resolution: {integrity: sha512-IG887NHjPJEw5D1dvNl9jPbcwNFREFKj2fnqEjdrwCnDRywtjNL7k7GgTo24NNlyMAZAq0OkoM0M0Sn6ex/Adg==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@opentui/core-linux-arm64-musl@0.8.2':
|
||||
resolution: {integrity: sha512-nB/RtlowKo9mlybfL1iHr0Wr4ZF/n4bQ8i7UaphUPNopXSq6YoWT7D4lyjubLBqjJ4KPkaXXHAiReSZ0e1V7ZA==}
|
||||
'@opentui/core-linux-arm64@0.8.4':
|
||||
resolution: {integrity: sha512-VGnBN3ItBwZog109wtPIou8pn93TseZwA5OZ05X2PYIYPw+IC6mVeO2Dn0qwwozLBDxeyH3ydbHMFlwzS4/fLg==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@opentui/core-linux-arm64@0.8.0':
|
||||
resolution: {integrity: sha512-b6D/VP9y0Z18tO86GSTp9BBykgR6r5CQM1ol9UMJfUt+PjN5HGksbOCDTMIQufXvt4WIUFHrSBProysJRFzbYw==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@opentui/core-linux-arm64@0.8.2':
|
||||
resolution: {integrity: sha512-Inkhg/P5UBNPySqeh0+4K8NbqUIolJ3WNgvX9I25x2nT/DFA8kUN1Y7fbQAaX2CrHa7rWu54xOmJYbYfOPsX8A==}
|
||||
cpu: [arm64]
|
||||
os: [linux]
|
||||
|
||||
'@opentui/core-linux-x64-musl@0.8.0':
|
||||
resolution: {integrity: sha512-xGEYw6wkX0sPwPx6RosQZanuWF0+5cIup2alhHHQQfKJkcLS8r8NBWlcy2LK9CoEWH6SBtNXC+9Y5IrryCOvJQ==}
|
||||
'@opentui/core-linux-x64-musl@0.8.4':
|
||||
resolution: {integrity: sha512-FAiH7wMt/ZbpP2w6TL62deNExTg5w6mujKUBSK89+gJV8FN4jk/K2xz9f522aYhC6SdbpyIKwS0oGIJldYLkcg==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@opentui/core-linux-x64-musl@0.8.2':
|
||||
resolution: {integrity: sha512-vicHTwx+jUFNcI39e6pK+hkjAhv33ebqmm0YpHHek9t3tY1PoWY6YfgI4jZVqVzcckJ7i3r3Nnl3x2YB94UUhw==}
|
||||
'@opentui/core-linux-x64@0.8.4':
|
||||
resolution: {integrity: sha512-N/uxyaPpWkCZlDXz3fgHMfMuj1L3IVZ/xZ4JifUc4NW9bwa/CYWFJ5J5jBoy2QsAIqoqo8/OD3iFpXR4o12mNQ==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@opentui/core-linux-x64@0.8.0':
|
||||
resolution: {integrity: sha512-aXBNIdE6iMf58/Tdnd6UzXeFjYfaHzQ6E0nukjLe2ir41/meJJYEAHUQ62EBr/gxvuCNZHTBQB4T9BzF7PdENQ==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@opentui/core-linux-x64@0.8.2':
|
||||
resolution: {integrity: sha512-R6SUsvcQdeVuVSdGIOYcAFrCdGGeAxzT2pJ7KT9LK6Tg0pELszpnC+FmRDiofMUz88VSjXP95NygBZx+SAvnuA==}
|
||||
cpu: [x64]
|
||||
os: [linux]
|
||||
|
||||
'@opentui/core-win32-arm64@0.8.0':
|
||||
resolution: {integrity: sha512-XtK0QMyIiqeDmrIyyAXqqp7TKaRGaWnBlbnEsNrkRLrgP+aLwRhRSHdafxi+RMqj3h9qOlb1MgnPal1kx7wP4g==}
|
||||
'@opentui/core-win32-arm64@0.8.4':
|
||||
resolution: {integrity: sha512-vjDuuIcmanoipIKdME8A7ZuBgIw2E1fv4pRJp6M19+Zfx0HIUmtA8bv+mT/kaz8Cpad9EUzJkNI5fV8P2p/iKg==}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@opentui/core-win32-arm64@0.8.2':
|
||||
resolution: {integrity: sha512-pGXmxoPcoNMRVm5DGX0+U7kwtm21Ubh+qJ5tz+kVk5LnuBiBhpkWDp2L+OjYmu9D57NrQbKhj0Tvrtu/SzdXaA==}
|
||||
cpu: [arm64]
|
||||
os: [win32]
|
||||
|
||||
'@opentui/core-win32-x64@0.8.0':
|
||||
resolution: {integrity: sha512-P5X2RcDDntIJ4q1WvQawGWCae5BzHrm50PMy7+PZ3Su8GGwnaCQ5xRHvDIQfhki8pZMo2SoTOkpStR0Wj1QoXQ==}
|
||||
'@opentui/core-win32-x64@0.8.4':
|
||||
resolution: {integrity: sha512-I4XnzUmyKCb8cRD1UntQXRkIEl0fxfQnzS3bTODWbENAOdRsK2c7Ff07DG2qTAqNijyTuk63C+uLmAT9ObOQ1Q==}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@opentui/core-win32-x64@0.8.2':
|
||||
resolution: {integrity: sha512-Tc7eNcNSlkHPB1p/9NBqQkexq/vznOPzB6V7G/kGq08y5LtOXPL0zLMJoIMNV/l52gNvv/YEi6mcBLLnpkD9Rg==}
|
||||
cpu: [x64]
|
||||
os: [win32]
|
||||
|
||||
'@opentui/core@0.8.0':
|
||||
resolution: {integrity: sha512-LwnIT7k+rGelridv7390enJXZpNuQYKIS3NdttJyoLPjbRFPyHnAKkCHk6X8MRS64vcSjOeVq9sl7XLWII16jQ==}
|
||||
'@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.8.2':
|
||||
resolution: {integrity: sha512-Ko6BfyIiCWjm/15nfgBW7aWS+jkZ+Lh16PaEecawWRnhKo7H0BsJGhnpOe/BVcrnBI7bzLgMIP5cWyDffWEP7w==}
|
||||
engines: {bun: '>=1.3.14', node: '>=26.4.0'}
|
||||
peerDependencies:
|
||||
web-tree-sitter: 0.25.10
|
||||
|
||||
'@opentui/solid@0.8.2':
|
||||
resolution: {integrity: sha512-VfIp83/Qgb040xwNQqeqe4pxDK1bmV4L2QfMPENEggXTkEcN+ZvDpsRhrfQjI0L27JWwDr9o44fXI9Ws/vo2sA==}
|
||||
'@opentui/solid@0.8.4':
|
||||
resolution: {integrity: sha512-QyaWIAtZTaAdYJiP4K2cG6hbXQkNUBfa0hjYQwvvr/V2OFIZWZ7l+SP8CYM05lBqVDfOraeThvSrhX+IuvKySA==}
|
||||
peerDependencies:
|
||||
solid-js: ^1.9.12
|
||||
|
||||
@@ -2183,7 +2137,9 @@ packages:
|
||||
'@smithy/core@3.35.0':
|
||||
resolution: {integrity: sha512-zRMhfkByhT2snNdr1si24vJitU6Cr9ix2MikUfWmkAgp4jrNP0GcKSP5YvwQ+TlI8AZXER5QOGJn3JsVtSD9/A==}
|
||||
engines: {node: '>=18.0.0'}
|
||||
deprecated: Deprecated due to a bug in custom logger data redaction. See https://github.com/aws/aws-sdk-js-v3/issues/8393.
|
||||
deprecated: |-
|
||||
Deprecated due to a bug in custom logger data redaction. Upgrade to the latest version. If you used a custom logger with this
|
||||
version, review your logs and rotate any credentials or other secrets. See https://github.com/aws/aws-sdk-js-v3/issues/8393.
|
||||
|
||||
'@smithy/credential-provider-imds@4.5.2':
|
||||
resolution: {integrity: sha512-A9uSdn72ozbRUSit0eib0TW7nXuNPlaeM0zcGkJ+nE6tFcSDbnmtwoxbTCFBukVQcszDAyvsd7+rTduPTXpygg==}
|
||||
@@ -3322,8 +3278,8 @@ packages:
|
||||
ecdsa-sig-formatter@1.0.11:
|
||||
resolution: {integrity: sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ==}
|
||||
|
||||
effect@4.0.6:
|
||||
resolution: {integrity: sha512-Tc3mkzuLR6t6P9dhLt0D2GrxYtmU5td4XEJEiXCmILz53IRIfJyHsKZWjTA3xEjiwpNTtXBgI4iqYPxMztBDrw==}
|
||||
effect@4.1.0:
|
||||
resolution: {integrity: sha512-lGx2MJJyrXA8RZb2UpQ/0Nkb5Utaimby7oD92+18noBxLPE85IFOvptdzau8dvcxAOwfwHo9iqapbKeFzqQM/Q==}
|
||||
|
||||
electron-to-chromium@1.5.267:
|
||||
resolution: {integrity: sha512-0Drusm6MVRXSOJpGbaSVgcQsuB4hEkMpHXaVstcPmhu5LIedxs1xNK/nIxmQIU/RPC0+1/o0AVZfBTkTNJOdUw==}
|
||||
@@ -5903,10 +5859,10 @@ snapshots:
|
||||
react: 19.2.3
|
||||
tslib: 2.8.1
|
||||
|
||||
'@effect/opentelemetry@4.0.6(@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.0.6)':
|
||||
'@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)':
|
||||
dependencies:
|
||||
'@opentelemetry/semantic-conventions': 1.43.0
|
||||
effect: 4.0.6
|
||||
effect: 4.1.0
|
||||
optionalDependencies:
|
||||
'@opentelemetry/api': 1.9.0
|
||||
'@opentelemetry/api-logs': 0.219.0
|
||||
@@ -5916,19 +5872,19 @@ snapshots:
|
||||
'@opentelemetry/sdk-trace-base': 2.8.0(@opentelemetry/api@1.9.0)
|
||||
'@opentelemetry/sdk-trace-node': 2.8.0(@opentelemetry/api@1.9.0)
|
||||
|
||||
'@effect/platform-node-shared@4.0.6(effect@4.0.6)':
|
||||
'@effect/platform-node-shared@4.1.0(effect@4.1.0)':
|
||||
dependencies:
|
||||
'@types/ws': 8.18.2
|
||||
effect: 4.0.6
|
||||
effect: 4.1.0
|
||||
ws: 8.22.0
|
||||
transitivePeerDependencies:
|
||||
- bufferutil
|
||||
- utf-8-validate
|
||||
|
||||
'@effect/platform-node@4.0.6(effect@4.0.6)(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))':
|
||||
dependencies:
|
||||
'@effect/platform-node-shared': 4.0.6(effect@4.0.6)
|
||||
effect: 4.0.6
|
||||
'@effect/platform-node-shared': 4.1.0(effect@4.1.0)
|
||||
effect: 4.1.0
|
||||
redis: 6.2.1(@opentelemetry/api@1.9.0)
|
||||
undici: 8.12.2
|
||||
transitivePeerDependencies:
|
||||
@@ -6244,39 +6200,39 @@ snapshots:
|
||||
node-gyp: 12.4.0
|
||||
proc-log: 6.1.0
|
||||
|
||||
'@opencode/ai@2.2.5':
|
||||
'@opencode/ai@2.3.0':
|
||||
dependencies:
|
||||
'@aws-sdk/credential-providers': 3.1057.0
|
||||
'@opencode/schema': 2.2.5
|
||||
'@opencode/schema': 2.3.0
|
||||
'@smithy/eventstream-codec': 4.2.14
|
||||
'@smithy/util-utf8': 4.2.2
|
||||
aws4fetch: 1.0.20
|
||||
effect: 4.0.6
|
||||
effect: 4.1.0
|
||||
google-auth-library: 10.5.0
|
||||
transitivePeerDependencies:
|
||||
- supports-color
|
||||
|
||||
'@opencode/client@2.2.5(effect@4.0.6)(solid-js@1.9.18)':
|
||||
'@opencode/client@2.3.0(effect@4.1.0)(solid-js@1.9.18)':
|
||||
dependencies:
|
||||
'@opencode/protocol': 2.2.5
|
||||
'@opencode/schema': 2.2.5
|
||||
'@opencode/protocol': 2.3.0
|
||||
'@opencode/schema': 2.3.0
|
||||
optionalDependencies:
|
||||
effect: 4.0.6
|
||||
effect: 4.1.0
|
||||
solid-js: 1.9.18
|
||||
|
||||
'@opencode/plugin@2.2.5(@opencode/theme@2.2.5(typescript@5.9.3)(web-tree-sitter@0.25.10))(@opentelemetry/semantic-conventions@1.43.0)(@opentui/core@0.8.2(typescript@5.9.3)(web-tree-sitter@0.25.10))(@opentui/solid@0.8.2(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.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))':
|
||||
dependencies:
|
||||
'@ai-sdk/provider': 3.0.8
|
||||
'@opencode/ai': 2.2.5
|
||||
'@opencode/client': 2.2.5(effect@4.0.6)(solid-js@1.9.18)
|
||||
'@opencode/protocol': 2.2.5
|
||||
'@opencode/schema': 2.2.5
|
||||
'@opencode/util': 2.2.5(@opentelemetry/semantic-conventions@1.43.0)(redis@6.2.1(@opentelemetry/api@1.9.0))
|
||||
effect: 4.0.6
|
||||
'@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))
|
||||
effect: 4.1.0
|
||||
optionalDependencies:
|
||||
'@opencode/theme': 2.2.5(typescript@5.9.3)(web-tree-sitter@0.25.10)
|
||||
'@opentui/core': 0.8.2(typescript@5.9.3)(web-tree-sitter@0.25.10)
|
||||
'@opentui/solid': 0.8.2(solid-js@1.9.18)(typescript@5.9.3)(web-tree-sitter@0.25.10)
|
||||
'@opencode/theme': 2.3.0(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
|
||||
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)
|
||||
transitivePeerDependencies:
|
||||
@@ -6287,29 +6243,29 @@ snapshots:
|
||||
- supports-color
|
||||
- utf-8-validate
|
||||
|
||||
'@opencode/protocol@2.2.5':
|
||||
'@opencode/protocol@2.3.0':
|
||||
dependencies:
|
||||
'@opencode/schema': 2.2.5
|
||||
effect: 4.0.6
|
||||
'@opencode/schema': 2.3.0
|
||||
effect: 4.1.0
|
||||
|
||||
'@opencode/schema@2.2.5':
|
||||
'@opencode/schema@2.3.0':
|
||||
dependencies:
|
||||
'@standard-schema/spec': 1.1.0
|
||||
effect: 4.0.6
|
||||
effect: 4.1.0
|
||||
|
||||
'@opencode/theme@2.2.5(typescript@5.9.3)(web-tree-sitter@0.25.10)':
|
||||
'@opencode/theme@2.3.0(typescript@5.9.3)(web-tree-sitter@0.25.10)':
|
||||
dependencies:
|
||||
'@opentui/core': 0.8.0(typescript@5.9.3)(web-tree-sitter@0.25.10)
|
||||
effect: 4.0.6
|
||||
'@opentui/core': 0.8.4(typescript@5.9.3)(web-tree-sitter@0.25.10)
|
||||
effect: 4.1.0
|
||||
transitivePeerDependencies:
|
||||
- typescript
|
||||
- web-tree-sitter
|
||||
|
||||
'@opencode/util@2.2.5(@opentelemetry/semantic-conventions@1.43.0)(redis@6.2.1(@opentelemetry/api@1.9.0))':
|
||||
'@opencode/util@2.3.0(@opentelemetry/semantic-conventions@1.43.0)(redis@6.2.1(@opentelemetry/api@1.9.0))':
|
||||
dependencies:
|
||||
'@effect/opentelemetry': 4.0.6(@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.0.6)
|
||||
'@effect/platform-node': 4.0.6(effect@4.0.6)(redis@6.2.1(@opentelemetry/api@1.9.0))
|
||||
'@effect/platform-node-shared': 4.0.6(effect@4.0.6)
|
||||
'@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-shared': 4.1.0(effect@4.1.0)
|
||||
'@npmcli/arborist': 9.4.0
|
||||
'@npmcli/config': 10.8.1
|
||||
'@opentelemetry/api': 1.9.0
|
||||
@@ -6322,7 +6278,7 @@ snapshots:
|
||||
'@opentelemetry/sdk-trace-base': 2.8.0(@opentelemetry/api@1.9.0)
|
||||
'@opentelemetry/sdk-trace-node': 2.8.0(@opentelemetry/api@1.9.0)
|
||||
cross-spawn: 7.0.6
|
||||
effect: 4.0.6
|
||||
effect: 4.1.0
|
||||
glob: 13.0.5
|
||||
mime-types: 3.0.2
|
||||
minimatch: 10.2.5
|
||||
@@ -6413,55 +6369,31 @@ snapshots:
|
||||
|
||||
'@opentelemetry/semantic-conventions@1.43.0': {}
|
||||
|
||||
'@opentui/core-darwin-arm64@0.8.0':
|
||||
'@opentui/core-darwin-arm64@0.8.4':
|
||||
optional: true
|
||||
|
||||
'@opentui/core-darwin-arm64@0.8.2':
|
||||
'@opentui/core-darwin-x64@0.8.4':
|
||||
optional: true
|
||||
|
||||
'@opentui/core-darwin-x64@0.8.0':
|
||||
'@opentui/core-linux-arm64-musl@0.8.4':
|
||||
optional: true
|
||||
|
||||
'@opentui/core-darwin-x64@0.8.2':
|
||||
'@opentui/core-linux-arm64@0.8.4':
|
||||
optional: true
|
||||
|
||||
'@opentui/core-linux-arm64-musl@0.8.0':
|
||||
'@opentui/core-linux-x64-musl@0.8.4':
|
||||
optional: true
|
||||
|
||||
'@opentui/core-linux-arm64-musl@0.8.2':
|
||||
'@opentui/core-linux-x64@0.8.4':
|
||||
optional: true
|
||||
|
||||
'@opentui/core-linux-arm64@0.8.0':
|
||||
'@opentui/core-win32-arm64@0.8.4':
|
||||
optional: true
|
||||
|
||||
'@opentui/core-linux-arm64@0.8.2':
|
||||
'@opentui/core-win32-x64@0.8.4':
|
||||
optional: true
|
||||
|
||||
'@opentui/core-linux-x64-musl@0.8.0':
|
||||
optional: true
|
||||
|
||||
'@opentui/core-linux-x64-musl@0.8.2':
|
||||
optional: true
|
||||
|
||||
'@opentui/core-linux-x64@0.8.0':
|
||||
optional: true
|
||||
|
||||
'@opentui/core-linux-x64@0.8.2':
|
||||
optional: true
|
||||
|
||||
'@opentui/core-win32-arm64@0.8.0':
|
||||
optional: true
|
||||
|
||||
'@opentui/core-win32-arm64@0.8.2':
|
||||
optional: true
|
||||
|
||||
'@opentui/core-win32-x64@0.8.0':
|
||||
optional: true
|
||||
|
||||
'@opentui/core-win32-x64@0.8.2':
|
||||
optional: true
|
||||
|
||||
'@opentui/core@0.8.0(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:
|
||||
bun-ffi-structs: 0.3.1(typescript@5.9.3)
|
||||
diff: 9.0.0
|
||||
@@ -6469,41 +6401,22 @@ snapshots:
|
||||
string-width: 7.2.0
|
||||
web-tree-sitter: 0.25.10
|
||||
optionalDependencies:
|
||||
'@opentui/core-darwin-arm64': 0.8.0
|
||||
'@opentui/core-darwin-x64': 0.8.0
|
||||
'@opentui/core-linux-arm64': 0.8.0
|
||||
'@opentui/core-linux-arm64-musl': 0.8.0
|
||||
'@opentui/core-linux-x64': 0.8.0
|
||||
'@opentui/core-linux-x64-musl': 0.8.0
|
||||
'@opentui/core-win32-arm64': 0.8.0
|
||||
'@opentui/core-win32-x64': 0.8.0
|
||||
'@opentui/core-darwin-arm64': 0.8.4
|
||||
'@opentui/core-darwin-x64': 0.8.4
|
||||
'@opentui/core-linux-arm64': 0.8.4
|
||||
'@opentui/core-linux-arm64-musl': 0.8.4
|
||||
'@opentui/core-linux-x64': 0.8.4
|
||||
'@opentui/core-linux-x64-musl': 0.8.4
|
||||
'@opentui/core-win32-arm64': 0.8.4
|
||||
'@opentui/core-win32-x64': 0.8.4
|
||||
transitivePeerDependencies:
|
||||
- typescript
|
||||
|
||||
'@opentui/core@0.8.2(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
|
||||
marked: 17.0.1
|
||||
string-width: 7.2.0
|
||||
web-tree-sitter: 0.25.10
|
||||
optionalDependencies:
|
||||
'@opentui/core-darwin-arm64': 0.8.2
|
||||
'@opentui/core-darwin-x64': 0.8.2
|
||||
'@opentui/core-linux-arm64': 0.8.2
|
||||
'@opentui/core-linux-arm64-musl': 0.8.2
|
||||
'@opentui/core-linux-x64': 0.8.2
|
||||
'@opentui/core-linux-x64-musl': 0.8.2
|
||||
'@opentui/core-win32-arm64': 0.8.2
|
||||
'@opentui/core-win32-x64': 0.8.2
|
||||
transitivePeerDependencies:
|
||||
- typescript
|
||||
|
||||
'@opentui/solid@0.8.2(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:
|
||||
'@babel/core': 7.29.7
|
||||
'@babel/preset-typescript': 7.27.1(@babel/core@7.29.7)
|
||||
'@opentui/core': 0.8.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)
|
||||
babel-plugin-module-resolver: 5.0.2
|
||||
babel-preset-solid: 1.9.16(@babel/core@7.29.7)(solid-js@1.9.18)
|
||||
entities: 7.0.1
|
||||
@@ -8432,7 +8345,7 @@ snapshots:
|
||||
dependencies:
|
||||
safe-buffer: 5.2.1
|
||||
|
||||
effect@4.0.6: {}
|
||||
effect@4.1.0: {}
|
||||
|
||||
electron-to-chromium@1.5.267: {}
|
||||
|
||||
|
||||
+7
-7
@@ -6,13 +6,13 @@ packages:
|
||||
- '!workspace/**'
|
||||
|
||||
catalog:
|
||||
'@opencode/client': 2.2.5
|
||||
'@opencode/plugin': 2.2.5
|
||||
'@opencode/schema': 2.2.5
|
||||
'@opencode/theme': 2.2.5
|
||||
'@opentui/core': 0.8.2
|
||||
'@opentui/solid': 0.8.2
|
||||
effect: 4.0.6
|
||||
'@opencode/client': 2.3.0
|
||||
'@opencode/plugin': 2.3.0
|
||||
'@opencode/schema': 2.3.0
|
||||
'@opencode/theme': 2.3.0
|
||||
'@opentui/core': 0.8.4
|
||||
'@opentui/solid': 0.8.4
|
||||
effect: 4.1.0
|
||||
solid-js: 1.9.18
|
||||
|
||||
onlyBuiltDependencies:
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { compareParsedSemver, compareSemver, normalizeSemver, parseSemver, type Semver } from '../utils/semver'
|
||||
|
||||
export const OPENCODE_PINNED_VERSION = '2.2.5'
|
||||
export const OPENCODE_PINNED_VERSION = '2.3.0'
|
||||
|
||||
export const OPENCODE_MIN_VERSION = '2.2.5'
|
||||
export const OPENCODE_MIN_VERSION = '2.3.0'
|
||||
|
||||
const OPENCODE_RELEASE_BASE_URL = 'https://opencode.ai/files/bin'
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
The color palettes in opencode-palettes.ts are derived from github.com/anomalyco/opencode tag v2.2.5, packages/ui/src/theme/themes.
|
||||
The color palettes in opencode-palettes.ts are derived from github.com/anomalyco/opencode tag v2.3.0, packages/ui/src/theme/themes.
|
||||
|
||||
MIT License
|
||||
|
||||
|
||||
Reference in new issue
Block a user