dsh/subagent-models.yml — opt-in overlay: subagent-model-selection-settings с маршрутами deepseek-flash/deepseek-v4-pro и subagent.maxDepth: 2. В бандл не входит: строки нет в headless, включённый флаг ломает загрузку. install.sh --check сообщает overlay и находит maxDepth: 2 в патче профиля. PORT.md §5 — как включить и что это даёт; §7/§8 обновлены. Co-Authored-By: DeepSeek Harness <noreply@deepseek.com>
40 lines
1.6 KiB
JavaScript
40 lines
1.6 KiB
JavaScript
import assert from 'node:assert/strict'
|
|
import { spawnSync } from 'node:child_process'
|
|
import { existsSync, readFileSync } from 'node:fs'
|
|
import { dirname, join } from 'node:path'
|
|
import test from 'node:test'
|
|
import { fileURLToPath } from 'node:url'
|
|
import { cleanup, tempDir, write } from './helpers.mjs'
|
|
|
|
const here = dirname(fileURLToPath(import.meta.url))
|
|
const overlay = join(here, '..', 'subagent-models.yml')
|
|
const script = join(here, '..', 'install.sh')
|
|
|
|
test('overlay enables model selection for both routes and depth 2', () => {
|
|
assert.ok(existsSync(overlay), 'dsh/subagent-models.yml is missing')
|
|
const text = readFileSync(overlay, 'utf8')
|
|
assert.match(text, /id: subagent-model-selection-settings/)
|
|
assert.match(text, /model: deepseek-flash/)
|
|
assert.match(text, /model: deepseek-v4-pro/)
|
|
assert.match(text, /id: subagent\n\s+config:\n\s+maxDepth: 2/)
|
|
assert.match(text, /headless/)
|
|
})
|
|
|
|
test('install.sh --check reports the overlay and the profile depth', () => {
|
|
const home = tempDir()
|
|
try {
|
|
const dshHome = join(home, '.dsh')
|
|
const env = { ...process.env, HOME: home, DSH_HOME: dshHome }
|
|
|
|
const missing = spawnSync('bash', [script, '--check'], { env, encoding: 'utf8' })
|
|
assert.match(missing.stderr, /subagent maxDepth is not 2/)
|
|
|
|
write(join(dshHome, 'profiles', 'desktop', 'cordis.patch.yml'), '- id: subagent\n config:\n maxDepth: 2\n')
|
|
const present = spawnSync('bash', [script, '--check'], { env, encoding: 'utf8' })
|
|
assert.match(present.stdout, /ok: subagent overlay/)
|
|
assert.match(present.stdout, /ok: subagent maxDepth=2/)
|
|
} finally {
|
|
cleanup(home)
|
|
}
|
|
})
|