Files
goodbuddy/src/main/workspace/unsupported-remote-workspace-access.ts
T
mesalogo 607bb33249 feat: add managed SSH execution spaces
Add managed SSH Hosts and projects with signed side-by-side GoodBuddy Agent and OpenCode Runtime installation, Ask and Execute workspace access, a Main-owned model bridge, detached Agent lifecycle, durable ACP output recovery, and project activation UI.

Use protocol v2 with bounded FIFO frames over SSH instead of custom credit, priority, batching, or model-message chunking. Mismatched Host Agents now upgrade automatically, an exactly verified Node runtime is reused on-host, and local Portable builds can embed strictly verified Agent artifacts.

Release note: 新增托管 SSH 远程项目,可自动安装或升级签名 Agent/OpenCode Runtime,并在 SSH 断线后继续 Agent 工作和同步未确认输出。
2026-08-24 23:02:18 +08:00

74 lines
1.6 KiB
TypeScript

import type {
DirectoryPage,
FilePreview,
SearchPage,
WorkspaceAccess,
WorkspaceChanges,
WorkspaceChangesInput,
WorkspaceDirectoryInput,
WorkspaceEntry,
WorkspaceIdentity,
WorkspacePathInput,
WorkspaceReadInput,
WorkspaceSearchInput,
WorkspaceWriteInput,
WriteResult
} from './workspace-access'
const unsupportedRemoteMessage = '远程工作区访问尚不可用'
export class UnsupportedRemoteWorkspaceAccess
implements WorkspaceAccess {
constructor(
private readonly message: string = unsupportedRemoteMessage
) {}
private unsupported(): never {
throw new Error(this.message)
}
async getIdentity(): Promise<WorkspaceIdentity> {
return this.unsupported()
}
async listDirectory(
input: WorkspaceDirectoryInput
): Promise<DirectoryPage> {
void input
return this.unsupported()
}
async stat(input: WorkspacePathInput): Promise<WorkspaceEntry> {
void input
return this.unsupported()
}
async readText(input: WorkspaceReadInput): Promise<FilePreview> {
void input
return this.unsupported()
}
async writeTextAtomic(
input: WorkspaceWriteInput
): Promise<WriteResult> {
void input
return this.unsupported()
}
async search(input: WorkspaceSearchInput): Promise<SearchPage> {
void input
return this.unsupported()
}
async getChanges(
input: WorkspaceChangesInput
): Promise<WorkspaceChanges> {
void input
return this.unsupported()
}
async dispose(): Promise<void> {
// Cleanup is always safe and idempotent, even when access is unsupported.
}
}