tui.cordis.yml 5.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. # `dsh` (the default surface) — the full-screen TUI, as a patch list over
  2. # `base.cordis.yml`. The launcher includes the base and applies this file, then
  3. # any `--config` overlay, then the personal `~/.dsh/config.yaml`, as sibling
  4. # patch lists at ONE include level: patches never cross an include boundary, so
  5. # stacking overlays as nested includes would silently stop reaching base rows.
  6. #
  7. # A patch replaces the targeted row's whole `config`, so each row below restates
  8. # every key it owns. A patch whose `id` matches no row is skipped with a Loader
  9. # warning, which is deliberate: one personal overlay is shared across surfaces,
  10. # so a row that exists only under `web` must not fail the TUI's boot.
  11. #
  12. # The launcher owns session identity and the exit line, and provides both on the
  13. # boot context rather than through config, so no key here — and no overlay
  14. # replacing one — can drop `--resume`.
  15. # ── surface-specific values the base deliberately omits ─────────────────────
  16. # `main` is the agent the TUI drives. `provider`/`model` are the route `dsh
  17. # login` rewrites and a personal overlay repoints; `cwd` anchors the session to
  18. # the invoking directory, which is also what scopes `/resume` to this workspace.
  19. - id: agent-loop
  20. config:
  21. agents:
  22. - id: main
  23. provider: deepseek
  24. model: deepseek-v4-pro
  25. cwd: !!js process.cwd()
  26. # Keep the persona to identity and behavior; tool plugins own tool guidance.
  27. # The loop resolves {{model}} from this agent's configuration.
  28. - id: system-prompt
  29. config:
  30. persona: |
  31. You are a coding agent powered by the {{model}} model.
  32. Verify your work by running the code or tests. Keep answers brief and
  33. factual.
  34. # Shipped default: full thinking at max effort on every request (wire-only
  35. # defaults; they never enter the request header).
  36. - id: llm-deepseek
  37. config:
  38. apiKey: !!js process.env.DEEPSEEK_API_KEY
  39. baseURL: !!js process.env.DEEPSEEK_BASE_URL
  40. thinking: enabled
  41. reasoningEffort: max
  42. # This single-session app resolves relative paths from the process cwd.
  43. - id: fs-local
  44. config:
  45. cwd: !!js process.cwd()
  46. # The shipped TUI presents the native tool registry. `examples/code-mode` is the
  47. # overlay that switches this row to the `run_code` transport.
  48. - id: tools
  49. config:
  50. mode: native
  51. # ── TUI-only rows ───────────────────────────────────────────────────────────
  52. - insert:
  53. # Development-only hot reload; it depends on Loader internals, so it stays a
  54. # surface row rather than joining the shared base.
  55. - id: hmr
  56. name: '@cordisjs/plugin-hmr'
  57. config:
  58. root: ['.']
  59. # Relational runtime checks over the authoritative event streams; each
  60. # companion registers the assertions its own package owns.
  61. - id: invariants
  62. name: '@deepseek-ai/dsh-invariants'
  63. - id: session-invariant
  64. name: '@deepseek-ai/dsh-session/invariant'
  65. - id: agent-invariant
  66. name: '@deepseek-ai/dsh-agent/invariant'
  67. - id: scope-invariant
  68. name: '@deepseek-ai/dsh-scope/invariant'
  69. - id: agent-loop-invariant
  70. name: '@deepseek-ai/dsh-agent-loop/invariant'
  71. - id: session-checkpoint-policy
  72. name: '@deepseek-ai/dsh-session-checkpoint-policy'
  73. # The derived query index behind `/resume`. The launcher owns the session
  74. # store location, so it provides the resolved index path on the boot context
  75. # (`launcherSessionQueryPath`); the index and the logs it indexes therefore
  76. # cannot diverge. The project-local fallback applies when no launcher sets it.
  77. - id: session-query-sqlite
  78. name: '@deepseek-ai/dsh-session-query-sqlite'
  79. config:
  80. path: !!js launcherSessionQueryPath ?? './.sessions/session-query.db'
  81. - id: session-reference
  82. name: '@deepseek-ai/dsh-session-reference'
  83. # Refuses write/edit inside the dsh checkout this launcher runs from, on that
  84. # checkout's own branch, until the session loads dsh-customize. Inert
  85. # everywhere else, so an ordinary project sees no change.
  86. - id: source-guard
  87. name: '@deepseek-ai/dsh-source-guard'
  88. - id: tool-result-prune
  89. name: '@deepseek-ai/dsh-compact-tool-result-prune'
  90. # Persisted same-session goals reach the model and the slash menu here; the
  91. # domain, driver, and `/goal` command are in the base.
  92. - id: tool-goal
  93. name: '@deepseek-ai/dsh-tool-goal'
  94. # A separate fixed consumer demonstrates fresh-agent Ralph iteration without
  95. # changing the workflow tool or same-session goal behavior.
  96. - id: tool-ralph
  97. name: '@deepseek-ai/dsh-tool-ralph'
  98. # The keyboard-backed provider behind ask_user_question and the plan-mode
  99. # review, and the front door it renders inside.
  100. - id: tui-prompt
  101. name: '@deepseek-ai/dsh-tui/prompt'
  102. # The TUI renders exactly the agent the agent-loop row bound, so it reads the
  103. # same launcher-owned identity rather than restating one.
  104. - id: tui
  105. name: '@deepseek-ai/dsh-tui'
  106. config:
  107. sessionId: !!js configuredAgentIdentities?.main?.id ?? 'main'
  108. showReasoning: true
  109. maxToolOutputLines: 6
  110. - id: tool-ask-user
  111. name: '@deepseek-ai/dsh-tool-ask-user'