Merge origin/master into feat/tui-package
Master unifies every live agent with its exact SessionId and moves declarative startup failures to agent-loop/config-start-failed. Keeping the branch’s AgentId label binding would let the TUI target the wrong lifecycle after reload and would miss asynchronous resume failures. Resolve that contract migration by giving the selected terminal front door the same generated or resumed SessionId as agent-core, mounting the front door first, and entering fullscreen only after the matching root appears. Refresh the source-derived catalogs and keyless terminal goldens so Code Mode, workflow, Cordis-tool, and transient UI scenarios all exercise the merged identity model.
This commit is contained in:
@@ -14,9 +14,9 @@ buffer
|
||||
style 0-0 fg=bright-blue
|
||||
style 2-36 fg=bright-black
|
||||
style 99-99 fg=bright-blue
|
||||
3| "│ main • deepseek-v4-flash • main-session │"
|
||||
3| "│ deepseek-v4-flash • main-session │"
|
||||
style 0-0 fg=bright-blue
|
||||
style 2-44 dim
|
||||
style 2-35 dim
|
||||
style 99-99 fg=bright-blue
|
||||
4| "╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
|
||||
style 0-99 fg=bright-blue
|
||||
|
||||
@@ -14,9 +14,9 @@ buffer
|
||||
style 0-0 fg=bright-blue
|
||||
style 2-27 fg=bright-black
|
||||
style 99-99 fg=bright-blue
|
||||
3| "│ main • deepseek-v4-flash • main-session │"
|
||||
3| "│ deepseek-v4-flash • main-session │"
|
||||
style 0-0 fg=bright-blue
|
||||
style 2-44 dim
|
||||
style 2-35 dim
|
||||
style 99-99 fg=bright-blue
|
||||
4| "╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
|
||||
style 0-99 fg=bright-blue
|
||||
|
||||
@@ -14,9 +14,9 @@ buffer
|
||||
style 0-0 fg=bright-blue
|
||||
style 2-42 fg=bright-black
|
||||
style 99-99 fg=bright-blue
|
||||
3| "│ main • deepseek-v4-flash • main-session │"
|
||||
3| "│ deepseek-v4-flash • main-session │"
|
||||
style 0-0 fg=bright-blue
|
||||
style 2-44 dim
|
||||
style 2-35 dim
|
||||
style 99-99 fg=bright-blue
|
||||
4| "╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
|
||||
style 0-99 fg=bright-blue
|
||||
|
||||
@@ -14,9 +14,9 @@ buffer
|
||||
style 0-0 fg=bright-blue
|
||||
style 2-34 fg=bright-black
|
||||
style 99-99 fg=bright-blue
|
||||
3| "│ main • deepseek-v4-flash • main-session │"
|
||||
3| "│ deepseek-v4-flash • main-session │"
|
||||
style 0-0 fg=bright-blue
|
||||
style 2-44 dim
|
||||
style 2-35 dim
|
||||
style 99-99 fg=bright-blue
|
||||
4| "╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
|
||||
style 0-99 fg=bright-blue
|
||||
|
||||
@@ -14,9 +14,9 @@ buffer
|
||||
style 0-0 fg=bright-blue
|
||||
style 2-41 fg=bright-black
|
||||
style 99-99 fg=bright-blue
|
||||
3| "│ main • deepseek-v4-flash • main-session │"
|
||||
3| "│ deepseek-v4-flash • main-session │"
|
||||
style 0-0 fg=bright-blue
|
||||
style 2-44 dim
|
||||
style 2-35 dim
|
||||
style 99-99 fg=bright-blue
|
||||
4| "╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
|
||||
style 0-99 fg=bright-blue
|
||||
|
||||
@@ -14,9 +14,9 @@ buffer
|
||||
style 0-0 fg=bright-blue
|
||||
style 2-37 fg=bright-black
|
||||
style 99-99 fg=bright-blue
|
||||
3| "│ main • deepseek-v4-flash • main-session │"
|
||||
3| "│ deepseek-v4-flash • main-session │"
|
||||
style 0-0 fg=bright-blue
|
||||
style 2-44 dim
|
||||
style 2-35 dim
|
||||
style 99-99 fg=bright-blue
|
||||
4| "╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
|
||||
style 0-99 fg=bright-blue
|
||||
|
||||
@@ -14,9 +14,9 @@ buffer
|
||||
style 0-0 fg=bright-blue
|
||||
style 2-27 fg=bright-black
|
||||
style 99-99 fg=bright-blue
|
||||
3| "│ main • deepseek-v4-flash • main-session │"
|
||||
3| "│ deepseek-v4-flash • main-session │"
|
||||
style 0-0 fg=bright-blue
|
||||
style 2-44 dim
|
||||
style 2-35 dim
|
||||
style 99-99 fg=bright-blue
|
||||
4| "╰──────────────────────────────────────────────────────────────────────────────────────────────────╯"
|
||||
style 0-99 fg=bright-blue
|
||||
|
||||
@@ -66,7 +66,7 @@ if status is None:
|
||||
_, status = os.waitpid(pid, 0)
|
||||
sys.stdout.buffer.write(output)
|
||||
if scenario == "resume-failure":
|
||||
if b'ui-tui: agent "main" failed to start:' not in output:
|
||||
if b'ui-tui: session "missing-session" failed to start:' not in output:
|
||||
sys.stderr.write("TUI did not render the startup failure before timeout\n")
|
||||
sys.exit(126)
|
||||
if not os.WIFEXITED(status) or os.WEXITSTATUS(status) != 1:
|
||||
@@ -167,7 +167,6 @@ describe('tui-agent keyless smoke (real Loader tree in a PTY)', () => {
|
||||
|
||||
it('prints a config-resume failure and exits instead of leaving a blank terminal', async () => {
|
||||
const output = await runTuiLoaderSmoke({ resumeSessionId: 'missing-session', scenario: 'resume-failure' })
|
||||
expect(output).toContain('ui-tui: agent "main" failed to start:')
|
||||
expect(output).toContain('missing-session')
|
||||
expect(output).toContain('ui-tui: session "missing-session" failed to start:')
|
||||
}, LOADER_SMOKE_TEST_TIMEOUT_MS)
|
||||
})
|
||||
|
||||
@@ -5,7 +5,7 @@ import { fileURLToPath } from 'node:url'
|
||||
import { afterAll, describe, expect, it } from 'vitest'
|
||||
import { Context } from 'cordis'
|
||||
import { scrubRequestHeaders } from '@deepseek-ai/dsh-acp-snapshot'
|
||||
import { AgentId, type Agent } from '@deepseek-ai/dsh-agent'
|
||||
import type { Agent } from '@deepseek-ai/dsh-agent'
|
||||
import * as AgentCore from '@deepseek-ai/dsh-agent-spine-demo'
|
||||
import { LocalBashExecutor } from '@deepseek-ai/dsh-bash-local'
|
||||
import WorkerCodeRuntime from '@deepseek-ai/dsh-code-runtime-worker'
|
||||
@@ -223,14 +223,13 @@ async function runScenario(scenario: Scenario): Promise<ScenarioResult> {
|
||||
ctx.on(name, () => { workflowEvents.push(name) })
|
||||
}
|
||||
const handle = await ctx.agents.create({
|
||||
agentId: AgentId('main'),
|
||||
sessionId: SessionId('main-session'),
|
||||
meta: { cwd },
|
||||
agentOptions: { provider: 'deepseek', model: 'deepseek-v4-flash' },
|
||||
})
|
||||
const agent: Agent = handle.agent
|
||||
controller = createTuiChat(ctx, {
|
||||
agent: 'main',
|
||||
sessionId: 'main-session',
|
||||
color: true,
|
||||
showReasoning: true,
|
||||
title: 'DSH TUI snapshot',
|
||||
|
||||
Reference in New Issue
Block a user