mirror of
https://github.com/wu736139669/hapi.git
synced 2026-12-03 06:47:03 +00:00
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:
@@ -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',
|
||||
|
||||
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user