mirror of
https://github.com/stablyai/orca.git
synced 2026-10-09 08:02:35 +00:00
* fix: wait for OpenCode worker composer before first dispatch Reuse captured composer readiness on local and paired execution hosts and revoke launching-shell paste anchors. Co-authored-by: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> * feat(opencode): probe execution-host CLI capabilities * fix(opencode): select plugin default for execution host loader * fix(opencode): limit prompt prefill capability to verified release * feat(opencode): probe launch capabilities on the execution host * fix(opencode): select plugin loader for the launched host binary * fix(opencode): match WSL probe cwd and declared guest environment * fix(opencode): preserve launch environment deletion boundaries * STRICT launch CI contract correction * CAPS launch CI contract correction * test: initialize Claude prompt state in output retention fixture --------- Co-authored-by: Brennan Benson <79079362+brennanb2025@users.noreply.github.com>
35 lines
1.2 KiB
TypeScript
35 lines
1.2 KiB
TypeScript
import { expect, it } from 'vitest'
|
|
import { getOpenCodeCliCapabilities, parseOpenCodeCliVersion } from './opencode-cli-version'
|
|
|
|
it.each(['1.1.23', 'opencode v2.0.16', '2.0.0-beta.1+build'])('parses CLI output %s', (output) => {
|
|
expect(parseOpenCodeCliVersion(output)).toBe(output.replace(/^opencode v/, ''))
|
|
})
|
|
it.each([null, '', 'Error 2.0.16', '1.1', '2.0.16\nwarning'])(
|
|
'does not mistake other output for a version',
|
|
(output) => {
|
|
expect(parseOpenCodeCliVersion(output)).toBeNull()
|
|
}
|
|
)
|
|
it('keeps future versions unknown instead of assuming a plugin loader or prompt policy', () => {
|
|
expect(getOpenCodeCliCapabilities('3.0.0')).toEqual({
|
|
version: '3.0.0',
|
|
pluginApi: 'unknown',
|
|
promptMode: 'unknown'
|
|
})
|
|
expect(getOpenCodeCliCapabilities('1.1.23')).toEqual({
|
|
version: '1.1.23',
|
|
pluginApi: 'v1',
|
|
promptMode: 'submit'
|
|
})
|
|
expect(getOpenCodeCliCapabilities('opencode v2.0.16')).toEqual({
|
|
version: '2.0.16',
|
|
pluginApi: 'v2',
|
|
promptMode: 'prefill'
|
|
})
|
|
})
|
|
|
|
it('does not opt unverified v2 builds into an extra prompt submission', () => {
|
|
expect(getOpenCodeCliCapabilities('2.0.17').promptMode).toBe('unknown')
|
|
expect(getOpenCodeCliCapabilities('2.0.16-beta').promptMode).toBe('unknown')
|
|
})
|