fix: stabilize Runtime workflows for 0.12.3

OpenCode status checks could cold-start throwaway servers, unrelated
conversations could block each other, and model, Continue, or remote paths
could replay or duplicate work under failure and backlog conditions. Settings
could also lose edits or overwrite unrelated model fields.

This update makes status checks passive, keeps per-conversation ordering while
allowing concurrency, preserves native long-running work with bounded display
capture and backpressure, narrows retries to known pre-dispatch failures, and
aligns remote Ask permissions without reducing Execute. It also keeps
Embedding updates narrow, improves settings and browser guidance, removes the
unused legacy Main gateway state, and records the validated Desktop 0.12.3 and
Agent 0.11.17 release metadata.

Release note: 改善 OpenCode 切换、多会话长任务、模型重试、远程 Ask/Execute 与设置保存可靠性,并完成 Desktop 0.12.3 / Agent 0.11.17 发布准备。
This commit is contained in:
mesalogo
2026-09-04 08:05:29 +08:00
parent 374968d50b
commit 4490e5fd15
60 changed files with 1639 additions and 3839 deletions
+21 -2
View File
@@ -44,10 +44,14 @@ export const MODEL_BRIDGE_SDK_AUTH_SENTINEL =
export type OpenCodeModelBridgeProviderConfig = {
model: string
permission?: 'ask'
agent: {
title: {
disable: true
}
build?: {
permission: 'ask'
}
}
provider: Record<
string,
@@ -389,6 +393,7 @@ export async function runOpenCodeModelBridgeHelper(options: {
protocol: ModelBridgeProtocol
model: string
supportsImageInput: boolean
workMode: 'ask' | 'execute'
opencodeEntrypoint: string
environment?: Readonly<NodeJS.ProcessEnv>
spawn?: ModelBridgeHelperSpawn
@@ -409,7 +414,8 @@ export async function runOpenCodeModelBridgeHelper(options: {
protocol: options.protocol,
model: options.model,
loopbackOrigin: origin,
supportsImageInput: options.supportsImageInput
supportsImageInput: options.supportsImageInput,
workMode: options.workMode
})
const environment = credentialFreeHelperEnvironment(
options.environment ?? process.env,
@@ -487,6 +493,7 @@ export function createOpenCodeModelBridgeProviderConfig(input: {
loopbackOrigin: string
name?: string
supportsImageInput?: boolean
workMode?: 'ask' | 'execute'
}): OpenCodeModelBridgeProviderConfig {
const model = boundedMetadataText(input.model, 'Model name')
const name = boundedMetadataText(
@@ -500,13 +507,25 @@ export function createOpenCodeModelBridgeProviderConfig(input: {
const baseURL = `${origin}/v1`
return {
model: openCodeModelBridgeModelId(input.protocol, model),
...(input.workMode === 'ask'
? {
permission: 'ask' as const
}
: {}),
// GoodBuddy owns conversation titles. A first-prompt title request can
// race the real ACP prompt, abandon its Provider response, and correctly
// poison the no-replay ledger before the user request can run.
agent: {
title: {
disable: true
}
},
...(input.workMode === 'ask'
? {
build: {
permission: 'ask' as const
}
}
: {})
},
provider: {
[providerId]: {