feat: add secure multi-runtime controls

Make agent backends configurable and governable with encrypted credentials, explicit context sharing, and tool approval boundaries.

Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
This commit is contained in:
lofyer
2026-07-30 10:52:35 +08:00
co-authored by factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
parent 1b6178b841
commit 698a15ad14
27 changed files with 2465 additions and 91 deletions
+2 -1
View File
@@ -19,6 +19,7 @@ export type OpenCodeRuntimeOptions = {
}
export class OpenCodeRuntime implements AgentRuntime {
readonly requiresToolApproval = true
private client?: OpencodeClient
private server?: OpenCodeServer
private readonly sessions = new Map<string, string>()
@@ -108,7 +109,7 @@ export class OpenCodeRuntime implements AgentRuntime {
signal: AbortSignal
): AsyncGenerator<AgentEvent, void, void> {
const client = await this.getClient()
const directory = request.workspace ?? this.options.defaultWorkspace
const directory = this.options.defaultWorkspace
const sessionId = await this.getSessionId(client, request, directory)
yield {