Select OpenCode plugin exports from the execution host version (#24662)

* 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>
This commit is contained in:
Neil
2026-10-03 23:13:06 -07:00
committed by GitHub
co-authored by Brennan Benson
parent 3cc5e1dac6
commit 5a2aa87f1c
23 changed files with 1173 additions and 20 deletions
+26
View File
@@ -0,0 +1,26 @@
import { isValidAppVersion } from './app-version'
export type OpenCodeCliCapabilities = {
version: string | null
pluginApi: 'v1' | 'v2' | 'unknown'
promptMode: 'submit' | 'prefill' | 'unknown'
}
export function parseOpenCodeCliVersion(output: string | null | undefined): string | null {
const version = output
?.trim()
.match(/^(?:opencode\s+)?v?(\d+\.\d+\.\d+(?:-[0-9A-Za-z.-]+)?(?:\+[0-9A-Za-z.-]+)?)$/i)?.[1]
return version && isValidAppVersion(version) ? version : null
}
export function getOpenCodeCliCapabilities(
output: string | null | undefined
): OpenCodeCliCapabilities {
const version = parseOpenCodeCliVersion(output)
const major = version?.split('.')[0]
return {
version,
pluginApi: major === '1' ? 'v1' : major === '2' ? 'v2' : 'unknown',
promptMode: major === '1' ? 'submit' : version === '2.0.16' ? 'prefill' : 'unknown'
}
}