Master's log-backed session-title capability already titles sessions durably (deterministic fallback in the spine, optional model providers). Remove the TUI's own autoTitle generation — the latch, prompt, cap, and llm stream call — and keep the terminal rename: the TUI folds the logged title on mount and sets '<session title> — <configured title>' on every accepted session/title event. The tui-agent example and the scripted PTY fixture mount session-title-first-message-llm so titles stay model-made; the scripted adapter's tool-less branch now answers that provider's auxiliary request. See .agents/notes/implemented/simplification/2026-07-22-tui-titles-from-session-title-service.md
163 lines
5.7 KiB
YAML
163 lines
5.7 KiB
YAML
# Full-screen TUI coding agent with swappable DeepSeek and local-bash backends.
|
|
# `dsh-tui-demo` supplies the agent spine, workspace instructions, generic
|
|
# task controls, JSONL persistence, the pi-tui front door, and `main`.
|
|
# HMR remains a leaf because it requires Loader internals; `demo:tui` passes
|
|
# `--expose-internals`. The app bin loads the gitignored root `.env`; this file
|
|
# reads `DEEPSEEK_API_KEY` and optional `DEEPSEEK_BASE_URL` through `!!js`.
|
|
|
|
# Hot-module reload for the dev/demo loop (needs `node --expose-internals`).
|
|
- id: hmr
|
|
name: '@cordisjs/plugin-hmr'
|
|
config:
|
|
root: ['.']
|
|
|
|
# The native DeepSeek adapter. Shipped default: full thinking at max effort on
|
|
# every request (wire-only defaults; they never enter the request header).
|
|
- id: llm-deepseek
|
|
name: '@deepseek-ai/dsh-llm-deepseek'
|
|
config:
|
|
apiKey: !!js process.env.DEEPSEEK_API_KEY
|
|
baseURL: !!js process.env.DEEPSEEK_BASE_URL
|
|
thinking: enabled
|
|
reasoningEffort: max
|
|
|
|
# Local executor for the app bundle's bash tool.
|
|
- id: bash
|
|
name: '@deepseek-ai/dsh-bash-local'
|
|
config:
|
|
timeoutMs: 60000
|
|
|
|
# The app bundle pre-creates the TUI's `main` agent.
|
|
- id: tui-agent
|
|
name: '@deepseek-ai/dsh-tui-demo'
|
|
config:
|
|
provider: deepseek
|
|
model: deepseek-v4-pro
|
|
# Set RESUME_SESSION_ID to continue a prior persisted session (the ids live
|
|
# under ./.sessions); unset starts a fresh session each run.
|
|
resumeSessionId: !!js process.env.RESUME_SESSION_ID
|
|
persistenceRoot: './.sessions'
|
|
# Printed on exit and listed by `/resume`; `{session}` fills the live id.
|
|
# `dsh --resume <id>` sets RESUME_SESSION_ID above, so run it from this cwd.
|
|
resumeCommand: 'dsh --resume {session}'
|
|
workspaceContext:
|
|
maxBytes: 65536
|
|
ui:
|
|
showReasoning: true
|
|
maxToolOutputLines: 6
|
|
# Keep the persona to identity and behavior; tool plugins own tool guidance.
|
|
# The loop resolves {{model}} from this agent's configuration.
|
|
persona: |
|
|
You are a coding agent powered by the {{model}} model.
|
|
|
|
Verify your work by running the code or tests. Keep answers brief and
|
|
factual.
|
|
|
|
# Model-made session titles on the first-message cadence: replaces the spine's
|
|
# deterministic fallback title with a short model summary. The TUI renders the
|
|
# logged `session/title` as the banner subtitle and the terminal window title.
|
|
# Omitting provider/model inherits the main request's exact route.
|
|
- id: session-title-llm
|
|
name: '@deepseek-ai/dsh-session-title-first-message-llm'
|
|
config:
|
|
targetWords: 5
|
|
targetCjkCharacters: 10
|
|
maxInputBytes: 4096
|
|
maxOutputTokens: 64
|
|
timeoutMs: 60000
|
|
|
|
# Replay-aware request pressure with one service-wide context window.
|
|
- id: token-meter
|
|
name: '@deepseek-ai/dsh-token-meter'
|
|
|
|
- id: tool-result-prune
|
|
name: '@deepseek-ai/dsh-compact-tool-result-prune'
|
|
|
|
# Summarize an older range after measured pressure or a canonical provider overflow.
|
|
# Service-wide policy provides pressure, retention, and one overflow-retry default.
|
|
- id: compact-basic
|
|
name: '@deepseek-ai/dsh-compact-basic'
|
|
|
|
# Expose fresh-child `spawn` and completed-prefix `fork` through independent
|
|
# in-process backends. Each tool instance needs a distinct `toolName`; the registry
|
|
# rejects duplicates. These leaves follow the app because it provides `ctx.agents` and `ctx.tools`.
|
|
- id: subagent
|
|
name: '@deepseek-ai/dsh-subagent'
|
|
|
|
- id: subagent-spawn
|
|
name: '@deepseek-ai/dsh-subagent-spawn'
|
|
config:
|
|
providerName: spawn
|
|
|
|
- id: subagent-fork
|
|
name: '@deepseek-ai/dsh-subagent-fork'
|
|
config:
|
|
providerName: fork
|
|
|
|
- id: tool-subagent
|
|
name: '@deepseek-ai/dsh-tool-subagent'
|
|
config:
|
|
provider: spawn
|
|
toolName: subagent
|
|
|
|
- id: tool-subagent-fork
|
|
name: '@deepseek-ai/dsh-tool-subagent'
|
|
config:
|
|
provider: fork
|
|
toolName: subagent_fork
|
|
|
|
|
|
# The worker-thread workflow engine fans a model-written JavaScript script's
|
|
# `agent()` calls out through the spawn backend; the adjacent tool exposes it to the model.
|
|
- id: workflow-workerthread
|
|
name: '@deepseek-ai/dsh-workflow-workerthread'
|
|
config:
|
|
provider: spawn
|
|
|
|
- id: tool-workflow
|
|
name: '@deepseek-ai/dsh-tool-workflow'
|
|
|
|
# A separate fixed consumer demonstrates fresh-agent Ralph iteration without
|
|
# changing the workflow tool or same-session goal behavior.
|
|
- id: tool-ralph
|
|
name: '@deepseek-ai/dsh-tool-ralph'
|
|
|
|
# Policy loads before the model-facing filesystem tools so writes and edits require
|
|
# an observed file. This single-session app resolves relative paths from the process cwd.
|
|
- id: fs-local
|
|
name: '@deepseek-ai/dsh-fs-local'
|
|
config:
|
|
cwd: !!js process.cwd()
|
|
|
|
- id: fs-policy
|
|
name: '@deepseek-ai/dsh-fs-policy'
|
|
|
|
- id: tool-fs
|
|
name: '@deepseek-ai/dsh-tool-fs'
|
|
|
|
# Bash-backed discovery tools (glob/grep): fixed ripgrep commands through the
|
|
# local bash executor above — not ctx.fs. Capped results save the complete
|
|
# formatted list through the spill backend below (ctx.spillStore, optional).
|
|
- id: tool-fs-search
|
|
name: '@deepseek-ai/dsh-tool-fs-search'
|
|
|
|
# The tool-call timeout enforcer: arms each declared ToolDefinition.timeoutMs
|
|
# (the search tools above declare 30s) as a deadline on exec.signal. Without
|
|
# it a declared budget is advisory and only the bash executor's own timeout
|
|
# backstop applies.
|
|
- id: timeout-policy
|
|
name: '@deepseek-ai/dsh-timeout-policy'
|
|
|
|
# Tool-output spill stack: a local backend that saves oversized tool text under
|
|
# a private session-scoped dir, and the tools/post-execute policy that replaces
|
|
# an over-budget plain-text result with a preview + the spill locator/retrieval
|
|
# hint. A leaf pair after the app (needs ctx.tools). The policy is a no-op until
|
|
# a tool returns more than maxInlineBytes of plain text.
|
|
- id: spill-local
|
|
name: '@deepseek-ai/dsh-spill-local'
|
|
|
|
- id: spill-policy
|
|
name: '@deepseek-ai/dsh-spill-policy'
|
|
config:
|
|
maxInlineBytes: 50000
|