Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.2.3 "$RUNNER_TEMP/opencode/bin/opencode"
echo "$RUNNER_TEMP/opencode/bin" >> "$GITHUB_PATH"

- name: Verify OpenCode CLI
Expand Down
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
- **Dependency Inversion**: Depend on abstractions, not concretions—inject dependencies and avoid hard-coding implementations.
- YAGNI: Don’t build or keep code you don’t need. If you change something, remove the unused parts. use the new code or keep the old, but don’t keep both.
- Never leave dead code: remove unused code, commented-out blocks, and unused variables/imports.
- `temp/opencode` is a reference clone of OpenCode 2 at tag `v2.0.15` (gitignored, never committed)
- `temp/opencode` is a reference clone of OpenCode 2 at the tag matching `OPENCODE_PINNED_VERSION` (the single pin in `shared/src/opencode/release.ts`; gitignored, never committed)
- Use shared types from workspace package (@opencode-manager/shared)
- OpenCode server runs on port 5551, backend API on port 5003
- Prefer pnpm over npm for all package management
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ 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.1
ARG OPENCODE_VERSION=2.2.3
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
Expand Down
12 changes: 6 additions & 6 deletions backend/src/services/opencode-server-registry.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -449,15 +449,15 @@ describe('OpenCodeServerRegistry', () => {

describe('test', () => {
it('reports a supported version', async () => {
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.2.1' }))
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.2.3' }))

const result = await registry.test({
baseUrl: 'https://studio.example.com/',
username: 'alice',
password: 'super-secret',
})

expect(result).toEqual({ ok: true, version: '2.2.1', versionSupported: true, error: null })
expect(result).toEqual({ ok: true, version: '2.2.3', 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')}`)
Expand All @@ -478,7 +478,7 @@ describe('OpenCodeServerRegistry', () => {
username: 'alice',
password: 'super-secret',
})
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.2.1' }))
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.2.3' }))

const result = await registry.test({ serverId: server.id })

Expand All @@ -493,7 +493,7 @@ describe('OpenCodeServerRegistry', () => {
baseUrl: 'https://studio.example.com',
password: 'super-secret',
})
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.2.1' }))
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.2.3' }))

const result = await registry.test({
baseUrl: 'https://studio.example.com/opencode',
Expand All @@ -513,7 +513,7 @@ describe('OpenCodeServerRegistry', () => {
baseUrl: 'https://studio.example.com',
password: 'super-secret',
})
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.2.1' }))
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.2.3' }))

const result = await registry.test({
baseUrl: 'https://relocated.example.com',
Expand All @@ -533,7 +533,7 @@ describe('OpenCodeServerRegistry', () => {
baseUrl: 'https://studio.example.com',
password: 'super-secret',
})
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.2.1' }))
fetchFn.mockResolvedValueOnce(jsonResponse({ version: '2.2.3' }))

await registry.test({
baseUrl: 'https://studio.example.com',
Expand Down
4 changes: 2 additions & 2 deletions backend/test/helpers/opencode-binary.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { EventEmitter } from 'events'
import { mkdtemp, rm } from 'fs/promises'
import os from 'os'
import path from 'path'
import { OPENCODE_SERVER_USERNAME } from '@opencode-manager/shared/opencode'
import { OPENCODE_PINNED_VERSION, OPENCODE_SERVER_USERNAME } from '@opencode-manager/shared/opencode'
import { resolveOpenCode2Binary, startOpenCodeServe } from './opencode-binary'

const childProcessMock = vi.hoisted(() => ({
Expand All @@ -16,7 +16,7 @@ vi.mock('child_process', () => ({
spawn: childProcessMock.spawn,
}))

const SUPPORTED_VERSION = '2.2.1'
const SUPPORTED_VERSION = OPENCODE_PINNED_VERSION
const OPENCODE_BIN_FIXTURE = '/fixture/opencode-2'
const PATH_CANDIDATE = 'opencode'
const ABSOLUTE_CANDIDATES = ['/usr/local/bin/opencode', '/opt/opencode/bin/opencode']
Expand Down
Loading
Loading