fix: prevent runtime permission stalls and Agent reconnect failures
Execute could stall on workspace-external access or native child-session permissions, while structured questions could be lost or answered incorrectly. Route owned OpenCode descendant interactions, correct Continue question and custom-answer handling, and resolve DSH Execute ACP permissions without a second approval. Ask remains read-only and unrelated sessions stay isolated. Restore the required DSH session projection service. Reuse offline OpenCode configuration by plugin version, remove unused npm shims from remote payloads, normalize dependency modes, and accept real compound descriptors up to 4 MiB. Fix intermittent Agent attach rejection and closed-handshake waits. Add focused and real-Runtime regressions, document interaction boundaries and validation evidence, and include the existing application/tool navigation design drafts. Those navigation changes are design-only, not implemented UI. Validation: full suite 3597 passed, 0 failed, 61 skipped across 338 files; typecheck, lint, release-note verification, whitespace and relative-link checks passed. Current-source Linux x64 installation, Ask/Execute, native subagent external writes, reconnect and stop/bootstrap passed with 10 completed real model calls, 13 native endpoint tests and 20 consecutive handshakes. System sleep/wake and release CI packaging remain unverified. Release note: 修复 Execute 访问工作区外目录或运行原生子代理时卡在权限等待的问题,并恢复 OpenCode 与 Continue 结构化问答的正确转交。修复远程 Agent 安装与重连失败;Ask 仍保持只读,任意终端密码或业务确认不会自动代答。
This commit is contained in:
@@ -6,6 +6,7 @@ import {
|
||||
} from 'node:crypto'
|
||||
import {
|
||||
chmodSync,
|
||||
lstatSync,
|
||||
mkdirSync,
|
||||
mkdtempSync,
|
||||
readFileSync,
|
||||
@@ -31,6 +32,7 @@ import {
|
||||
type RemoteRuntimeBundleManifest,
|
||||
type RemoteRuntimeLock
|
||||
} from '../src/shared/remote-runtime-launch-contracts'
|
||||
import { createOpenCodeConfigFixture } from './support/opencode-config-fixture'
|
||||
|
||||
type VerifiedBundle = {
|
||||
bundleDirectory: string
|
||||
@@ -110,6 +112,7 @@ beforeEach(() => {
|
||||
temporaryRoot = resolve(
|
||||
mkdtempSync(join(tmpdir(), 'goodbuddy-runtime-build-'))
|
||||
)
|
||||
createOpenCodeConfigFixture(temporaryRoot)
|
||||
privateKey = createPrivateKey({
|
||||
key: Buffer.from(
|
||||
'302e020100300506032b657004220420202122232425262728292a2b2c2d2e2f303132333435363738393a3b3c3d3e3f',
|
||||
@@ -243,6 +246,14 @@ describe('Remote Runtime bundle tooling', () => {
|
||||
}
|
||||
})
|
||||
expect(first.manifest).not.toHaveProperty('quotas')
|
||||
expect(first.manifest.files.some((file) => file.path.includes('/.bin/'))).toBe(false)
|
||||
const pluginPath = 'config/opencode/node_modules/@opencode-ai/plugin/index.js'
|
||||
expect(first.manifest.files).toContainEqual(expect.objectContaining({
|
||||
path: pluginPath, mode: '0644'
|
||||
}))
|
||||
if (process.platform !== 'win32') {
|
||||
expect(lstatSync(join(first.bundleDirectory, pluginPath)).mode & 0o777).toBe(0o644)
|
||||
}
|
||||
})
|
||||
|
||||
it('creates deterministic archives and imports only verified content', () => {
|
||||
@@ -257,9 +268,9 @@ describe('Remote Runtime bundle tooling', () => {
|
||||
built.bundleDirectory,
|
||||
secondArchive
|
||||
)
|
||||
expect(readFileSync(secondArchive)).toEqual(
|
||||
expect(readFileSync(secondArchive).equals(
|
||||
readFileSync(firstArchive)
|
||||
)
|
||||
)).toBe(true)
|
||||
|
||||
const imported = runtimeBundle.importRuntimeArchive(
|
||||
firstArchive,
|
||||
@@ -335,7 +346,7 @@ describe('Remote Runtime bundle tooling', () => {
|
||||
}))
|
||||
}
|
||||
const built = runtimeBundle.buildRuntimeBundle({
|
||||
projectRoot: process.cwd(),
|
||||
projectRoot: temporaryRoot,
|
||||
architecture: 'x64',
|
||||
runtimeArchive,
|
||||
outputRoot: join(temporaryRoot, 'production'),
|
||||
@@ -354,7 +365,7 @@ describe('Remote Runtime bundle tooling', () => {
|
||||
|
||||
function build(outputRoot: string): VerifiedBundle {
|
||||
return runtimeBundle.buildRuntimeBundle({
|
||||
projectRoot: process.cwd(),
|
||||
projectRoot: temporaryRoot,
|
||||
architecture: 'x64',
|
||||
runtimeArchive,
|
||||
outputRoot,
|
||||
|
||||
Reference in New Issue
Block a user