mirror of
https://github.com/stablyai/orca.git
synced 2026-10-31 17:17: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 * wip(opencode): authorize native startup prompt intent at execution owner * fix(opencode): atomically replace status plugin entrypoints * fix(opencode): retain plugin permissions across restrictive umasks * test(opencode): resolve permission fixture from primary cwd * feat(opencode): install startup prompt plugin independently of status hooks * fix(opencode): wait for admitted startup intent and preserve failed-launch briefs * fix(opencode): unsubscribe hook settings during async host shutdown * STRICT launch CI contract correction * CAPS launch CI contract correction * INTENT launch CI contract correction * test: initialize Claude prompt state in output retention fixture * Wait for OpenCode location hydration in intent startup * Bind OpenCode startup readiness to the current location in intent startup * Retry interrupted OpenCode startup prompt claims --------- Co-authored-by: Brennan Benson <79079362+brennanb2025@users.noreply.github.com> Co-authored-by: Ahmed Nagy <ahmednagy25t@gmail.com> Co-authored-by: Orca startup hydration review <agents@stably.ai> Co-authored-by: Orca <dev@stably.ai>
46 lines
1.5 KiB
TypeScript
46 lines
1.5 KiB
TypeScript
import { mkdirSync } from 'node:fs'
|
|
import { join } from 'node:path'
|
|
import {
|
|
isInstalledOpenCodePluginCurrent,
|
|
isOverlayOpenCodePluginCurrent
|
|
} from '../../shared/opencode-installed-plugin'
|
|
import {
|
|
writeCanonicalOpenCodePluginAtomically,
|
|
writeOverlayOpenCodePluginAtomically
|
|
} from '../../shared/opencode-plugin-atomic-write'
|
|
import {
|
|
writeOpenCodeTuiPlugin,
|
|
writeOpenCodeTuiPluginDirectory
|
|
} from '../../shared/opencode-tui-plugin-install'
|
|
|
|
export function writeOpenCodePluginConfig(options: {
|
|
configDir: string
|
|
pluginFileName: string
|
|
getSource: () => string
|
|
installsTuiPlugin: boolean
|
|
tuiOnlyDirectory: string | undefined
|
|
ownership: 'canonical' | 'overlay'
|
|
}): void {
|
|
const pluginsDir = join(options.configDir, 'plugins')
|
|
mkdirSync(pluginsDir, { recursive: true })
|
|
const pluginPath = join(pluginsDir, options.pluginFileName)
|
|
const source = options.getSource()
|
|
if (options.tuiOnlyDirectory) {
|
|
writeOpenCodeTuiPluginDirectory(pluginsDir, options.tuiOnlyDirectory, source, options.ownership)
|
|
return
|
|
}
|
|
if (options.installsTuiPlugin) {
|
|
writeOpenCodeTuiPlugin(pluginsDir, options.pluginFileName, source, options.ownership)
|
|
}
|
|
const overlay = options.ownership === 'overlay'
|
|
const current = overlay
|
|
? isOverlayOpenCodePluginCurrent(pluginPath, source)
|
|
: isInstalledOpenCodePluginCurrent(pluginPath, source)
|
|
if (!current) {
|
|
const write = overlay
|
|
? writeOverlayOpenCodePluginAtomically
|
|
: writeCanonicalOpenCodePluginAtomically
|
|
write(pluginPath, source)
|
|
}
|
|
}
|