Remove the redundant dsh-tui-demo bin and the RESUME_SESSION_ID environment
variable, leaving dsh as the one terminal entrypoint.
The dsh-tui-demo package was a plugin (the TUI app bundle mounted by dsh's
config) plus a bin that booted a leaf cordis.yml — the same job `dsh [config]`
does. The bin, its ./bin export, its built-bin.e2e.ts, the tsdown bin entry,
and the now-unused dsh-app-boot dependency are removed; the package keeps its
plugin and invariant. demo:cordis, demo:code-mode, and the tui-agent and
cordis-agent keyless PTY smokes now launch through apps/cli/src/bin.ts with the
config as the positional argument. cli-demo/acp-demo/jsonrpc-demo keep their
bins (distinct surfaces).
RESUME_SESSION_ID was the only bridge from --resume into the shipped config;
--resume now provides the id on the boot context via ctx.provide(
RESUME_SESSION_ID_KEY, id), and the four configs read it as a bare identifier
through a quoted typeof-guarded !!js expression. The TUI resumeCommand fixtures
and docs move to `dsh --resume {session}`.
Agent Note and its Chinese pair updated; config-catalog regenerated.
24 lines
1.0 KiB
TypeScript
24 lines
1.0 KiB
TypeScript
import { fileURLToPath } from 'node:url'
|
|
import { describe, expect, it } from 'vitest'
|
|
import { LOADER_SMOKE_TEST_TIMEOUT_MS } from '@deepseek-ai/dsh-loader-smoke'
|
|
import { runTuiPtySmoke } from '../../tui-agent/tests/pty-harness.ts'
|
|
|
|
const binScript = fileURLToPath(new URL('../../../apps/cli/src/bin.ts', import.meta.url))
|
|
const configPath = fileURLToPath(new URL('../cordis.yml', import.meta.url))
|
|
const tsconfigPath = fileURLToPath(new URL('../../../tsconfig.json', import.meta.url))
|
|
|
|
describe('cordis-agent keyless smoke (real Loader tree in a PTY)', () => {
|
|
it('boots the full tool-cordis tree and exits cleanly through the TUI', async () => {
|
|
const output = await runTuiPtySmoke({
|
|
label: 'cordis-agent',
|
|
tempDirPrefix: 'cordis-agent-smoke-',
|
|
binScript,
|
|
configPath,
|
|
tsconfigPath,
|
|
env: { DEEPSEEK_API_KEY: 'keyless-smoke-no-call' },
|
|
actions: [{ waitFor: 'cordis-agent ready.', send: '/exit\r' }],
|
|
})
|
|
expect(output).toContain('cordis-agent ready.')
|
|
}, LOADER_SMOKE_TEST_TIMEOUT_MS)
|
|
})
|