GoodBuddy Agents / Validate Agent source (push) Canceled after 0s
GoodBuddy Agents / Build Linux arm64 Agent (push) Canceled after 0s
GoodBuddy Agents / Build Linux x64 Agent (push) Canceled after 0s
Cross-platform packages / Validate source (push) Canceled after 0s
Cross-platform packages / Authorize desktop packaging (push) Canceled after 0s
Cross-platform packages / linux arm64 (push) Canceled after 0s
Cross-platform packages / macos arm64 (push) Canceled after 0s
Cross-platform packages / windows arm64 (push) Canceled after 0s
Cross-platform packages / linux x64 (push) Canceled after 0s
Cross-platform packages / macos x64 (push) Canceled after 0s
Cross-platform packages / windows x64 (push) Canceled after 0s
Cross-platform packages / Publish GitHub and OSS release (push) Canceled after 0s
Managed SSH project selection repeatedly activated the remote Host and could leave idle ACP bindings rejected as stale-controller after a controller generation change. Host environment updates also coupled project state to component installation evidence and presented a crowded control surface. Project selection is now local-only, one Host connection serves compatible project and conversation callers, idle bindings are safely replaced only after proven controller takeover, and active prompts keep exact resume/replay. Remote environment setup now uses explicit signed compound package preparation with bounded transfer, rollback, recovery, and clearer settings. Managed Hosts must be updated to separately distributed Agent 0.11.6 before the daemon-side controller recovery fix takes effect. Desktop packages do not embed the Agent or remote Runtime, and existing project data is preserved. Release note: 托管 SSH 项目切换不再重复连接,同一 Host 可顺畅承载多个项目和对话;同时修复重连后的 stale-controller,并优化远程环境安装、更新与状态布局。
55 lines
1.6 KiB
TypeScript
55 lines
1.6 KiB
TypeScript
import { createHash } from 'node:crypto'
|
|
import type { SshConnectionPoolTarget } from '../ssh/ssh-connection-pool'
|
|
|
|
/**
|
|
* Stable Main-only key for one exact resolved SSH target. All Host mutation
|
|
* coordinators use the same material so credential and Host Key edits cannot
|
|
* be overlooked by one component.
|
|
*/
|
|
export function remoteHostTargetIdentityKey(
|
|
target: SshConnectionPoolTarget
|
|
): string {
|
|
const hostKey = target.host.hostKey
|
|
return createHash('sha256')
|
|
.update(JSON.stringify([
|
|
'goodbuddy-remote-host-target-v1',
|
|
target.host.id,
|
|
target.host.name,
|
|
target.host.hostname,
|
|
target.host.port,
|
|
target.host.username,
|
|
target.host.authentication,
|
|
target.host.password ?? null,
|
|
target.hostRevision,
|
|
target.hostKeyGeneration,
|
|
hostKey?.algorithm ?? null,
|
|
hostKey?.publicKeyBase64 ?? null,
|
|
hostKey?.fingerprintSha256 ?? null,
|
|
hostKey?.acceptedAt ?? null,
|
|
hostKey?.generation ?? null
|
|
]))
|
|
.digest('hex')
|
|
}
|
|
|
|
/**
|
|
* Stable identity for recovering a remote operation after an ordinary Host
|
|
* edit or revalidation. It binds the actual SSH account and Host Key, but not
|
|
* display names, credentials, acceptance timestamps, or local revisions.
|
|
*/
|
|
export function remoteHostRecoveryIdentityKey(
|
|
target: SshConnectionPoolTarget
|
|
): string {
|
|
const hostKey = target.host.hostKey
|
|
return createHash('sha256')
|
|
.update(JSON.stringify([
|
|
'goodbuddy-remote-host-recovery-v1',
|
|
target.host.id,
|
|
target.host.hostname,
|
|
target.host.port,
|
|
target.host.username,
|
|
hostKey?.algorithm ?? null,
|
|
hostKey?.publicKeyBase64 ?? null
|
|
]))
|
|
.digest('hex')
|
|
}
|