mirror of
https://github.com/stablyai/orca.git
synced 2026-10-08 00:02:38 +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>
40 lines
1.1 KiB
TypeScript
40 lines
1.1 KiB
TypeScript
import {
|
|
getOpenCodeCliCapabilities,
|
|
type OpenCodeCliCapabilities
|
|
} from '../shared/opencode-cli-version'
|
|
import { addWslEnvKeys } from '../shared/wsl-env'
|
|
|
|
export function restoreOpenCodeCapabilities(value: unknown): OpenCodeCliCapabilities | undefined {
|
|
if (
|
|
!value ||
|
|
typeof value !== 'object' ||
|
|
!('version' in value) ||
|
|
typeof value.version !== 'string'
|
|
) {
|
|
return undefined
|
|
}
|
|
const capabilities = getOpenCodeCliCapabilities(value.version)
|
|
return capabilities.pluginApi === 'unknown' ? undefined : capabilities
|
|
}
|
|
|
|
export function applyOpenCodePluginSelection(
|
|
env: Record<string, string>,
|
|
envToDelete: string[],
|
|
capabilities: OpenCodeCliCapabilities | null | undefined,
|
|
wsl: boolean
|
|
): void {
|
|
delete env.ORCA_OPENCODE_PLUGIN_API
|
|
if (!capabilities || capabilities.pluginApi === 'unknown') {
|
|
return
|
|
}
|
|
env.ORCA_OPENCODE_PLUGIN_API = capabilities.pluginApi
|
|
for (let index = envToDelete.length - 1; index >= 0; index -= 1) {
|
|
if (envToDelete[index] === 'ORCA_OPENCODE_PLUGIN_API') {
|
|
envToDelete.splice(index, 1)
|
|
}
|
|
}
|
|
if (wsl) {
|
|
addWslEnvKeys(env, ['ORCA_OPENCODE_PLUGIN_API'])
|
|
}
|
|
}
|