feat(dsh): integrate DeepSeek Harness through ACP (#1632)

* feat(dsh): add DeepSeek Harness ACP flavor

* fix(dsh): update mobile flavor catalogs

* fix(dsh): keep mobile spawn policy managed

* fix(dsh): keep managed policy and prompt retry

* fix(dsh): suppress unsupported runner policy flags

* fix(dsh): align native managed-policy UX
This commit is contained in:
SSU-WEI HUANG
2026-08-22 12:37:28 +08:00
committed by GitHub
parent 661e9b4eb7
commit be1ef2a2e4
52 changed files with 947 additions and 215 deletions
+15
View File
@@ -355,6 +355,21 @@ describe('buildCliArgs', () => {
expect(args).not.toContain('--hapi-session-id')
})
it('builds a remote DSH ACP runner command without unsupported policy flags', () => {
const args = buildCliArgs('dsh', {
directory: '/tmp',
existingSessionId: 'existing-hub-id',
startingMode: 'remote',
permissionMode: 'read-only'
}, true)
expect(args).toEqual([
'dsh',
'--hapi-starting-mode', 'remote',
'--started-by', 'runner',
'--existing-session-id', 'existing-hub-id'
])
})
it('does not emit --hapi-session-id for a non-pty flavor', () => {
const args = buildCliArgs('opencode', {
directory: '/tmp',
+9 -6
View File
@@ -1481,11 +1481,13 @@ export function buildCliArgs(
? 'copilot'
: agent === 'opencode'
? 'opencode'
: agent === 'pi'
? 'pi'
: agent === 'agy'
? 'agy'
: 'claude';
: agent === 'dsh'
? 'dsh'
: agent === 'pi'
? 'pi'
: agent === 'agy'
? 'agy'
: 'claude';
const args = [agentCommand];
if (options.resumeSessionId) {
if (agent === 'codex') {
@@ -1512,6 +1514,7 @@ export function buildCliArgs(
if (agent === 'codex' || agent === 'cursor' || agent === 'pi'
|| agent === 'opencode'
|| agent === 'agy'
|| agent === 'dsh'
|| (agentCommand === 'claude' && options.forkSession)) {
const existingSessionId = options.existingSessionId ?? options.sessionId;
if (existingSessionId) {
@@ -1545,7 +1548,7 @@ export function buildCliArgs(
}
// Pi RPC mode has no permission switching; never pass these flags to it
// (the Pi parser rejects --permission-mode and ignores --yolo).
if (agent !== 'pi') {
if (agent !== 'pi' && agent !== 'dsh') {
if (options.permissionMode && (PERMISSION_MODES as readonly string[]).includes(options.permissionMode)) {
args.push('--permission-mode', options.permissionMode);
} else if (yolo) {