Merge latest invariant service seam

# Conflicts:
#	docs/module-graph.md
#	package.json
#	packages/examples/tui-demo/package.json
#	packages/examples/tui-demo/src/invariant.ts
#	packages/ui/stdio/package.json
#	packages/ui/stdio/tests/stdio.spec.ts
#	packages/ui/stdio/tsconfig.json
#	pnpm-lock.yaml
This commit is contained in:
Tianyi Cui
2026-07-20 21:02:52 +08:00
176 changed files with 1352 additions and 4308 deletions

View File

@@ -56,7 +56,7 @@ function targetRunInterface(
desired: ReadonlyMap<string, NestedMultiSelectValue<string, string>>,
): RunInterface {
const selected = desired.get('feature:app')?.choices[0]
return selected === 'acp' || selected === 'stdio' || selected === 'embed' ? selected : current
return selected === 'acp' || selected === 'tui' || selected === 'embed' ? selected : current
}
/** Reconcile one tree selection into domain commands, then review and commit once. */

View File

@@ -90,8 +90,8 @@ Change file: package.json
},
{
"default": true,
"label": "Terminal REPL",
"value": "stdio",
"label": "Terminal TUI",
"value": "tui",
},
{
"default": false,

View File

@@ -94,7 +94,7 @@ async function baseProject(): Promise<SdkProject> {
features: [
{ id: featureId('provider'), options: ['deepseek'], secrets: { apiKey: 'key' } },
{ id: featureId('bash'), options: ['local'] },
{ id: featureId('app'), options: ['stdio'] },
{ id: featureId('app'), options: ['tui'] },
{ id: featureId('persistence'), options: ['jsonl'] },
],
localPlugins: [],

View File

@@ -85,7 +85,7 @@ function commandContext(cwd: string): DshSdkCommandContext & { readStdout: () =>
function creation(
extra: ProjectCreationRequest['features'] = [],
localPlugins: readonly LocalPluginBlueprint[] = [],
app: 'acp' | 'stdio' | 'embed' = 'embed',
app: 'acp' | 'tui' | 'embed' = 'embed',
): ProjectCreationRequest {
return {
name: 'config-agent',
@@ -107,7 +107,7 @@ function creation(
async function committedProject(
extra: ProjectCreationRequest['features'] = [],
localPlugins: readonly LocalPluginBlueprint[] = [],
app: 'acp' | 'stdio' | 'embed' = 'embed',
app: 'acp' | 'tui' | 'embed' = 'embed',
): Promise<SdkProject> {
const root = await mkdtemp(join(tmpdir(), 'dsh-config-workflow-'))
temporary.push(root)
@@ -525,7 +525,7 @@ describe('ConfigWorkflow', () => {
const workflow = new ConfigWorkflow(new QueuePort([
[
{ value: 'feature:provider', choices: ['custom'] },
{ value: 'feature:app', choices: ['stdio'] },
{ value: 'feature:app', choices: ['tui'] },
{ value: 'feature:persistence', choices: ['jsonl'] },
],
'https://provider.example/v1',
@@ -536,7 +536,7 @@ describe('ConfigWorkflow', () => {
const provider = result.commit?.project.cordis.entry('llm-pi-ai')
expect(provider?.config?.apiKey).toBeDefined()
expect(provider?.config?.baseURL).toBe('https://provider.example/v1')
expect(result.commit?.project.cordis.entry('stdio')).toBeDefined()
expect(result.commit?.project.cordis.entry('tui')).toBeDefined()
expect(result.commit?.project.cordis.entry('agent-loop')).toBeDefined()
expect(result.commit?.project.cordis.entry('agent-core')).toBeUndefined()
})