Files
goodbuddy/tests/remote-runtime-lock.test.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

41 lines
1.2 KiB
TypeScript

import { readFileSync } from 'node:fs'
import { resolve } from 'node:path'
import { describe, expect, it } from 'vitest'
import {
remoteRuntimeLockSchema
} from '../src/shared/remote-runtime-launch-contracts'
describe('Remote Runtime lock', () => {
it('pins the exact OpenCode Linux packages from package-lock.json', () => {
const runtimeLock = remoteRuntimeLockSchema.parse(
readJson('remote-runtime-lock.json')
)
const packageLock = readJson('package-lock.json') as {
packages: Record<
string,
{ version?: string; integrity?: string }
>
}
const opencode = runtimeLock.runtimes.opencode
expect(opencode.entrypoint).toBe('bin/opencode')
expect(opencode.argvPrefix).toEqual(['acp'])
for (const target of Object.values(opencode.targets)) {
const lockedPackage =
packageLock.packages[`node_modules/${target.package}`]
expect(lockedPackage).toEqual(
expect.objectContaining({
version: opencode.version,
integrity: target.integrity
})
)
}
})
})
function readJson(fileName: string): unknown {
return JSON.parse(
readFileSync(resolve(process.cwd(), fileName), 'utf8')
)
}