@xmoon76/dsh-pi-tui 0.4.7-alpha.1 → 0.4.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +39 -29
- package/README.md +33 -25
- package/cordis.patch.yml +32 -10
- package/dist/builtins.mjs +2 -2
- package/dist/extension/advanced.d.mts +6 -1
- package/dist/extensions.mjs +1 -2
- package/dist/index.d.mts +110 -33
- package/dist/index.mjs +2 -3
- package/dist/{src-D-4-xTUd.mjs → src-R8SVGB-L.mjs} +9669 -2389
- package/dist/startup-Cd07dCyh.mjs +289 -0
- package/dist/startup.d.mts +19 -8
- package/dist/startup.mjs +1 -237
- package/generated/dsh-presets/README.md +15 -0
- package/generated/dsh-presets/cordis.patch.yml +154 -0
- package/generated/dsh-presets/minimal.patch.yml +61 -0
- package/generated/dsh-presets/ptc.patch.yml +152 -0
- package/generated/dsh-presets/standard.patch.yml +146 -0
- package/package.json +141 -115
package/README.en.md
CHANGED
|
@@ -54,23 +54,27 @@ next compatibility range, and fallback paths.
|
|
|
54
54
|
|
|
55
55
|
| TUI package line | Official DSH tags for the pairing | Notes |
|
|
56
56
|
|---|---|---|
|
|
57
|
-
| `0.4.
|
|
58
|
-
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
the
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
57
|
+
| `0.4.8` (stable / `@latest`) | `dsh-v0.1.7-rc.1` | Current stable line; 0.1.7-rc.1 minimum |
|
|
58
|
+
| `0.4.6` (stable, previous) | `dsh-v0.1.5-rc.1`, `dsh-v0.1.5-rc.2` | Previous stable; the compatible TUI for a 0.1.5 runtime |
|
|
59
|
+
| `0.4.7-alpha.2` (next, previous) | `dsh-v0.1.6-alpha.2` | Previous next line; the compatible TUI for a 0.1.6-alpha.2 runtime |
|
|
60
|
+
|
|
61
|
+
Do not mix the stable and `@next` prerelease lines. The `0.4.8` line unifies its
|
|
62
|
+
whole DSH peer floor at `>=0.1.7-rc.1` (the rc.1 preset registry peers
|
|
63
|
+
`dsh-agent` exactly, so a wider legacy floor no longer satisfies a standalone
|
|
64
|
+
tarball install); older runtimes fail at the normal incompatible-runtime
|
|
65
|
+
boundary, so install the paired TUI line from the table above. The startup notice
|
|
66
|
+
is best-effort rather than a Loader startup-order guarantee. See the [full
|
|
67
|
+
historical compatibility matrix](docs/dsh-compatibility.md) for official-tag
|
|
68
|
+
pairings and fallback commands, and see the [latest `next`
|
|
65
69
|
README](https://github.com/XMoon/dsh-pi-tui/blob/next/README.md) for the current
|
|
66
70
|
integration status.
|
|
67
71
|
|
|
68
72
|
New agent sessions use the official roster's selected preset id. A custom DSH
|
|
69
73
|
preset literally named `code` is valid and remains `code` when it exists in the
|
|
70
74
|
current roster. DSH V3 migration owns historical session `code -> ptc`
|
|
71
|
-
conversion, while the current projection preserves a legal custom `code`.
|
|
72
|
-
|
|
73
|
-
|
|
75
|
+
conversion, while the current projection preserves a legal custom `code`. An
|
|
76
|
+
omitted legacy settings default is never aliased: with no matching declaration
|
|
77
|
+
in the current roster it is simply an invalid preference.
|
|
74
78
|
|
|
75
79
|
### Profile management
|
|
76
80
|
|
|
@@ -119,11 +123,15 @@ dsh --profile pi-tui --session <session-id>
|
|
|
119
123
|
|
|
120
124
|
`Ctrl+O` controls Tool and System details and expands/collapses long user prompts in regular mode and in fullscreen outside Focus — in fullscreen Focus it bulk-expands the recent Thought roots or collapses them all, while long user prompts are expanded by clicking the marker (or by a search hit) and collapsed with `Ctrl+O`. `Alt+T` controls Thinking separately.
|
|
121
125
|
|
|
122
|
-
###
|
|
126
|
+
### Conversation display
|
|
123
127
|
|
|
124
|
-
`/focus` groups the current turn's Thinking, Tool Calls, and intermediate replies into a live Thought block.
|
|
128
|
+
`/display focus` groups the current turn's Thinking, Tool Calls, and intermediate replies into a live Thought block; `/display full` restores the normal Transcript projection. `/focus` remains available as a compatibility command. The Compact preset is reserved and `/display compact` is rejected until its projection ships.
|
|
125
129
|
|
|
126
|
-
The full process can still be expanded when needed. In fullscreen Focus, Thought roots can be expanded/collapsed in bulk or opened with an individual card click, and the viewport survives switches and resizes.
|
|
130
|
+
The full process can still be expanded when needed. In fullscreen Focus, Thought roots can be expanded/collapsed in bulk or opened with an individual card click, and the viewport survives switches and resizes. Display presets only change presentation; they do not modify Session events.
|
|
131
|
+
|
|
132
|
+
### Communication policy
|
|
133
|
+
|
|
134
|
+
`/settings` exposes two independent communication controls. **Progress updates** owns the mid-turn update cadence: `milestones` (default) posts a brief update only when a substantial phase completes, the direction materially changes, or required user input blocks progress — never for a freshly discovered partial finding; `frequent` keeps the user actively informed through longer multi-step work; `off` suppresses progress narration entirely. **Response style** owns the visible answer's density: `default` adds no extra guidance, `concise` is compact and result-first, `explanatory` adds rationale, architecture, and tradeoffs. Changes apply on the next prompt assembly without restarting the agent and are saved across sessions. Focus is a surface capability, not a third preference: while Focus is active the progress section is simply ineffective (progress-only intermediate messages are not generated) and the saved cadence is untouched; the response style stays active in Focus.
|
|
127
135
|
|
|
128
136
|
### Sessions
|
|
129
137
|
|
|
@@ -328,20 +336,22 @@ Use `/help` inside the TUI for the current command and keybinding list. The tabl
|
|
|
328
336
|
Host shortcuts are semantic actions (`app.*`) resolved through a
|
|
329
337
|
context-aware keymap — the UI (footer hints, `/help`, `/keybindings`)
|
|
330
338
|
always shows the EFFECTIVE keys, so a remap updates every hint. Configure
|
|
331
|
-
them
|
|
332
|
-
|
|
333
|
-
|
|
339
|
+
them through the in-TUI `/keybindings` panel (it writes the `keybindings`
|
|
340
|
+
field of the `tui-app` plugin's profile-owned configuration — since DSH
|
|
341
|
+
0.1.7 TUI preferences live on the profile Config, not the retired
|
|
342
|
+
`dsh-pi-tui` settings namespace); apply with `/keybindings reload`
|
|
343
|
+
(explicit — a configuration edit takes effect after the reload, no
|
|
344
|
+
restart). Field shape:
|
|
334
345
|
|
|
335
346
|
```yaml
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
app.tasks.open: <leader>t
|
|
347
|
+
keybindings:
|
|
348
|
+
app.input.steer: ctrl+s # one key
|
|
349
|
+
app.permission.cycle: [shift+tab, ctrl+shift+p] # several keys
|
|
350
|
+
app.history.search: ctrl+r
|
|
351
|
+
app.transcript.toggleThinking: false # disable the action's keys
|
|
352
|
+
leader: ctrl+x # M6: leader sequences
|
|
353
|
+
bindings:
|
|
354
|
+
app.tasks.open: <leader>t
|
|
345
355
|
```
|
|
346
356
|
|
|
347
357
|
- A plain printable key can never be bound to a Host action (it would
|
|
@@ -562,9 +572,9 @@ This section contains DSH compatibility and CI validation details only; ordinary
|
|
|
562
572
|
|
|
563
573
|
### npm mode (current `next`)
|
|
564
574
|
|
|
565
|
-
The current
|
|
566
|
-
`dsh-v0.1.
|
|
567
|
-
resolved by its
|
|
575
|
+
The current compatibility-train line is npm mode: it targets the published
|
|
576
|
+
`dsh-v0.1.7-rc.1` family declared by this checkout's `package.json` and
|
|
577
|
+
resolved by its lockfile. The isolated npm driver installs that exact
|
|
568
578
|
family from the public registry and exercises the TUI build/test/package path:
|
|
569
579
|
|
|
570
580
|
```sh
|
package/README.md
CHANGED
|
@@ -52,19 +52,22 @@ pnpm compat:dsh:npm
|
|
|
52
52
|
|
|
53
53
|
| TUI 包版本 | 对应的官方 DSH tags | 说明 |
|
|
54
54
|
|---|---|---|
|
|
55
|
-
| `0.4.
|
|
56
|
-
|
|
|
55
|
+
| `0.4.8`(stable / `@latest`) | `dsh-v0.1.7-rc.1` | 当前稳定版;最低 0.1.7-rc.1 |
|
|
56
|
+
| `0.4.6`(stable,历史) | `dsh-v0.1.5-rc.1`、`dsh-v0.1.5-rc.2` | 上一稳定版;0.1.5 runtime 的兼容 TUI |
|
|
57
|
+
| `0.4.7-alpha.2`(next,历史) | `dsh-v0.1.6-alpha.2` | 上一条 next 线;0.1.6-alpha.2 runtime 的兼容 TUI |
|
|
57
58
|
|
|
58
|
-
不要把稳定线与
|
|
59
|
-
`>=0.1.
|
|
60
|
-
|
|
61
|
-
|
|
59
|
+
不要把稳定线与 `@next` 预发布线混装。`0.4.8` 的整个 DSH peer floor 统一为
|
|
60
|
+
`>=0.1.7-rc.1`(rc.1 的 preset registry 精确 peer `dsh-agent`,更宽的旧
|
|
61
|
+
floor 已无法满足独立 tarball 安装);旧 runtime 会在正常的不兼容边界以非零状态失败,
|
|
62
|
+
请按上表安装配对的 TUI 线。完整的历史兼容矩阵和 fallback 命令见
|
|
63
|
+
[兼容性文档](docs/dsh-compatibility.md);要查看 `@next` 的最新集成状态,请看
|
|
64
|
+
[next 分支 README](https://github.com/XMoon/dsh-pi-tui/blob/next/README.md)。
|
|
62
65
|
|
|
63
66
|
新的 Agent preset 使用当前 roster 中选定的 id。DSH 允许合法的自定义
|
|
64
67
|
`code` preset;只要当前 roster 存在它,显式输入和持久化状态都会保留 `code`。
|
|
65
68
|
DSH V3 migration 负责历史 session header/selection 的 `code -> ptc` 转换;
|
|
66
|
-
当前 projection 会原样保留合法的自定义 `code
|
|
67
|
-
|
|
69
|
+
当前 projection 会原样保留合法的自定义 `code`。省略请求的 legacy settings
|
|
70
|
+
default 不再做任何别名映射:当前 roster 没有声明就是无效偏好。
|
|
68
71
|
|
|
69
72
|
### Profile management
|
|
70
73
|
|
|
@@ -113,11 +116,15 @@ dsh --profile pi-tui --session <session-id>
|
|
|
113
116
|
|
|
114
117
|
`Ctrl+O` 控制工具和系统详情,并在普通模式与全屏非 Focus 下展开/收起超长用户 Prompt;全屏 Focus 下它整体展开最近几个 Thought root 或全部收起,超长用户 Prompt 改用点击提示行(或搜索命中)展开、`Ctrl+O` 收回。`Alt+T` 单独控制 Thinking。
|
|
115
118
|
|
|
116
|
-
###
|
|
119
|
+
### Conversation display
|
|
117
120
|
|
|
118
|
-
`/focus`
|
|
121
|
+
`/display focus` 将运行中的 Thinking、Tool Call 和中间回复聚合为一个实时更新的 Thought 区块;`/display full` 恢复普通 Transcript 展示。`/focus` 仍作为兼容命令保留。Compact 预设尚未开放,`/display compact` 会明确拒绝。
|
|
119
122
|
|
|
120
|
-
需要查看过程时可以展开,关闭 Focus 后恢复普通 Transcript 展示。全屏 Focus 中可以按 Thought root 批量展开/收起,也可以单独点击卡片;切换或缩放时会保留 viewport
|
|
123
|
+
需要查看过程时可以展开,关闭 Focus 后恢复普通 Transcript 展示。全屏 Focus 中可以按 Thought root 批量展开/收起,也可以单独点击卡片;切换或缩放时会保留 viewport。展示预设只影响界面投影,不修改 Session 中保存的事件。
|
|
124
|
+
|
|
125
|
+
### 沟通策略
|
|
126
|
+
|
|
127
|
+
`/settings` 提供两个独立的沟通设置。**Progress updates** 控制 Agent 工作时的中途更新节奏:`milestones`(默认)只在完整的阶段结束、方向实质变化或需要用户输入时简短汇报,不为「刚发现一个局部结论」而打断;`frequent` 在较长的多步工作中持续带用户跟进;`off` 完全不做过程叙述。**Response style** 控制可见回复的密度:`default` 不附加表达指导,`concise` 紧凑且结果优先,`explanatory` 补充原理、架构与取舍。两项切换都在下一次提示词组装时生效,无需重启 Agent,并跨会话保存。Focus 是展示能力而非第三个偏好:进入 Focus 时进度更新节只是暂时失效(不生成只含进度的中间消息),保存的节奏偏好不变,Response style 在 Focus 下仍然生效。
|
|
121
128
|
|
|
122
129
|
### Session
|
|
123
130
|
|
|
@@ -310,20 +317,21 @@ TUI 使用 DSH 提供的模型和设置服务。
|
|
|
310
317
|
|
|
311
318
|
Host 快捷键是语义 action(`app.*`),通过 context-aware keymap 解析——
|
|
312
319
|
UI(页脚提示、`/help`、`/keybindings`)始终显示**生效**的按键,因此
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
320
|
+
改键后所有提示自动更新。配置入口是 TUI 里的 `/keybindings` 面板
|
|
321
|
+
(写入 `tui-app` 插件的 profile 配置的 `keybindings` 字段——DSH 0.1.7
|
|
322
|
+
起 TUI 偏好保存在 profile-owned Config,不再使用旧 `dsh-pi-tui`
|
|
323
|
+
settings 命名空间);保存后用 `/keybindings reload` 应用(显式
|
|
324
|
+
reload——配置变更后执行 reload 即生效,无需重启)。字段形状:
|
|
316
325
|
|
|
317
326
|
```yaml
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
app.tasks.open: <leader>t
|
|
327
|
+
keybindings:
|
|
328
|
+
app.input.steer: ctrl+s # 单个按键
|
|
329
|
+
app.permission.cycle: [shift+tab, ctrl+shift+p] # 多个按键
|
|
330
|
+
app.history.search: ctrl+r
|
|
331
|
+
app.transcript.toggleThinking: false # 禁用该 action 的按键
|
|
332
|
+
leader: ctrl+x # M6:leader 序列
|
|
333
|
+
bindings:
|
|
334
|
+
app.tasks.open: <leader>t
|
|
327
335
|
```
|
|
328
336
|
|
|
329
337
|
- 普通可打印键永远不能绑定到 Host action(会吞掉输入);坏配置只是
|
|
@@ -535,8 +543,8 @@ dsh --profile pi-tui-dev
|
|
|
535
543
|
|
|
536
544
|
### npm 模式(当前 `next`)
|
|
537
545
|
|
|
538
|
-
|
|
539
|
-
lockfile 解析的已发布 `dsh-v0.1.
|
|
546
|
+
当前兼容列车线是 npm 模式:以本 checkout 的 `package.json` 声明、
|
|
547
|
+
lockfile 解析的已发布 `dsh-v0.1.7-rc.1` family 为兼容目标。隔离的 npm
|
|
540
548
|
驱动从公共 registry 安装该精确 family,并跑完整 build/test/package 路径:
|
|
541
549
|
|
|
542
550
|
```sh
|
package/cordis.patch.yml
CHANGED
|
@@ -26,10 +26,29 @@
|
|
|
26
26
|
|
|
27
27
|
- id: tui-app
|
|
28
28
|
name: '@xmoon76/dsh-pi-tui'
|
|
29
|
-
|
|
29
|
+
# `workspaceRegistry` is injected, not merely looked up: D2.4 Direct fork
|
|
30
|
+
# must observe the official workspace membership, and Cordis must have
|
|
31
|
+
# finished the registry's one-time history bootstrap before the surface
|
|
32
|
+
# can fork. The row below is this bundle's own, so the dependency is
|
|
33
|
+
# self-contained and a profile that disables it fails loud instead of
|
|
34
|
+
# silently forking without workspace inheritance.
|
|
35
|
+
inject: [tuiStartup, piTuiExtensions, authorization, workspaceRegistry]
|
|
30
36
|
config:
|
|
31
37
|
sessionId: ''
|
|
32
38
|
|
|
39
|
+
# Host-owned workspace membership (`ctx.workspaceRegistry`): D2.4 Direct
|
|
40
|
+
# fork mirrors the official Host rule (use the source's directly owning
|
|
41
|
+
# workspace, else the nearest ancestor workspace of a subagent source) and
|
|
42
|
+
# attaches the child after publication. That association only exists while
|
|
43
|
+
# this service is mounted, so the TUI inserts the same official row the web
|
|
44
|
+
# bundle does (the DSH installation already ships the package). Activating
|
|
45
|
+
# it also performs the official one-time history bootstrap that groups
|
|
46
|
+
# stored Session headers by canonical cwd into durable workspace records —
|
|
47
|
+
# an upstream migration, not a TUI invention, and the reason the row is
|
|
48
|
+
# documented in docs/client-server-coupling.md.
|
|
49
|
+
- id: workspace
|
|
50
|
+
name: '@deepseek-ai/dsh-workspace'
|
|
51
|
+
|
|
33
52
|
# The authorization seam (`ctx.authorization`): plugin-owned credential-
|
|
34
53
|
# obtaining flows, one attempt per key, transport-neutral notices and
|
|
35
54
|
# prompts. The dsh host does NOT mount it anywhere (the base layer ships
|
|
@@ -42,14 +61,16 @@
|
|
|
42
61
|
- id: authorization
|
|
43
62
|
name: '@deepseek-ai/dsh-authorization'
|
|
44
63
|
|
|
45
|
-
#
|
|
46
|
-
#
|
|
47
|
-
#
|
|
48
|
-
#
|
|
49
|
-
#
|
|
50
|
-
#
|
|
51
|
-
-
|
|
52
|
-
|
|
64
|
+
# The 0.1.7 declarative preset registry: preset identity, revisions and
|
|
65
|
+
# default/selection policy are registry-owned (deployment `default` here;
|
|
66
|
+
# the user's `selectedDefault` rides the profile form). The four shipped
|
|
67
|
+
# preset declarations follow as separate patch files under
|
|
68
|
+
# generated/dsh-presets/, listed after this file in package.json
|
|
69
|
+
# `dsh.bundle.patch` — a generated, parity-gated byte-exact mirror of
|
|
70
|
+
# @deepseek-ai/dsh-web-app's exported preset assets (0.1.7
|
|
71
|
+
# dsh.bundle.patch cannot reference another package's files).
|
|
72
|
+
- id: agent-preset-registry
|
|
73
|
+
name: '@deepseek-ai/dsh-agent-preset-registry'
|
|
53
74
|
config:
|
|
54
75
|
default: standard
|
|
55
76
|
|
|
@@ -75,7 +96,8 @@
|
|
|
75
96
|
# its tools, its prompt sections, its delegation backends. The base keeps them
|
|
76
97
|
# for single-session surfaces that compose their agent process-wide; the TUI
|
|
77
98
|
# now composes one preset per session, so these rows are disabled here and the
|
|
78
|
-
# `agent-
|
|
99
|
+
# official `agent-preset-registry` row above, plus the declarations it resolves,
|
|
100
|
+
# lets each session mount a preset instead.
|
|
79
101
|
#
|
|
80
102
|
# Disabling rather than deleting is deliberate: the base is shared, and a row
|
|
81
103
|
# absent from a surface overlay would silently reappear the day someone
|
package/dist/builtins.mjs
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { TUI_STARTUP_SERVICE } from "./startup.mjs";
|
|
1
|
+
import { B as PI_TUI_EXTENSIONS_SERVICE, I as dshVersion } from "./src-R8SVGB-L.mjs";
|
|
2
|
+
import { n as TUI_STARTUP_SERVICE } from "./startup-Cd07dCyh.mjs";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
//#region src/builtins.ts
|
|
@@ -302,7 +302,12 @@ interface AdvancedHostState {
|
|
|
302
302
|
setTitle(title: string | undefined): void;
|
|
303
303
|
/** Override the working-indicator message (undefined clears). */
|
|
304
304
|
setWorkingMessage(message: string | undefined): void;
|
|
305
|
-
/** Set the
|
|
305
|
+
/** Set the transcript-detail bulk-expansion master switch (recent
|
|
306
|
+
* collapsible transcript content). */
|
|
307
|
+
setTranscriptDetailExpanded(expanded: boolean): void;
|
|
308
|
+
/** Set the transcript-detail bulk-expansion master switch.
|
|
309
|
+
* @deprecated Use {@link setTranscriptDetailExpanded} — the same runtime
|
|
310
|
+
* state under its canonical name (post-F6 plan §5.6). */
|
|
306
311
|
setToolsExpanded(expanded: boolean): void;
|
|
307
312
|
}
|
|
308
313
|
/** The full advanced facade (plan §4: `advanced(service)`). */
|
package/dist/extensions.mjs
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
import "./startup.mjs";
|
|
1
|
+
import { B as PI_TUI_EXTENSIONS_SERVICE, H as describeKey, L as apply, R as inject, V as API_VERSION, z as name } from "./src-R8SVGB-L.mjs";
|
|
3
2
|
export { API_VERSION, PI_TUI_EXTENSIONS_SERVICE, apply, describeKey, inject, name };
|
package/dist/index.d.mts
CHANGED
|
@@ -2,8 +2,8 @@ import { H as TuiAction } from "./public-types-YbB5Rhku.mjs";
|
|
|
2
2
|
import z from "@deepseek-ai/schemastery";
|
|
3
3
|
import { Agent, ModelSelectionRef } from "@deepseek-ai/dsh-agent";
|
|
4
4
|
import { ContentBlock } from "@deepseek-ai/dsh-llm";
|
|
5
|
-
import {
|
|
6
|
-
import { Context } from "@deepseek-ai/cordis";
|
|
5
|
+
import { SessionId } from "@deepseek-ai/dsh-session";
|
|
6
|
+
import { Context, Volatile } from "@deepseek-ai/cordis";
|
|
7
7
|
//#region src/image/admission.d.ts
|
|
8
8
|
/** Structural subset of `ImageAttachmentRef`. */
|
|
9
9
|
interface ImageAttachmentRefLike {
|
|
@@ -84,6 +84,43 @@ interface DraftImageStoreLike {
|
|
|
84
84
|
values(): readonly DraftImage[];
|
|
85
85
|
}
|
|
86
86
|
//#endregion
|
|
87
|
+
//#region src/display-preset.d.ts
|
|
88
|
+
/**
|
|
89
|
+
* Canonical transcript display presets and their layered disclosure policy.
|
|
90
|
+
*
|
|
91
|
+
* DisplayPreset is the one runtime vocabulary for presentation state. Every
|
|
92
|
+
* preset whose projection exists in this build is available; the availability
|
|
93
|
+
* gate exists so a future preset can never be claimed by another preset's
|
|
94
|
+
* renderer before its own projection ships.
|
|
95
|
+
* @module @xmoon76/dsh-pi-tui/display-preset
|
|
96
|
+
*/
|
|
97
|
+
/** The complete display vocabulary. */
|
|
98
|
+
type DisplayPreset = 'focus' | 'compact' | 'full';
|
|
99
|
+
/** The shared mutable display authority passed between the runner, prompt and UI. */
|
|
100
|
+
interface DisplayState {
|
|
101
|
+
preset: DisplayPreset;
|
|
102
|
+
}
|
|
103
|
+
//#endregion
|
|
104
|
+
//#region src/diag.d.ts
|
|
105
|
+
interface Diag {
|
|
106
|
+
debug(message: string, fields?: Record<string, unknown>): void;
|
|
107
|
+
info(message: string, fields?: Record<string, unknown>): void;
|
|
108
|
+
warn(message: string, fields?: Record<string, unknown>): void;
|
|
109
|
+
error(message: string, fields?: Record<string, unknown>): void;
|
|
110
|
+
/** Release the file handle, if one is open. */
|
|
111
|
+
dispose(): void;
|
|
112
|
+
}
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region src/communication-policy.d.ts
|
|
115
|
+
type ProgressUpdates = 'off' | 'milestones' | 'frequent';
|
|
116
|
+
type ResponseStyle = 'default' | 'concise' | 'explanatory';
|
|
117
|
+
interface ProgressUpdatesState {
|
|
118
|
+
mode: ProgressUpdates;
|
|
119
|
+
}
|
|
120
|
+
interface ResponseStyleState {
|
|
121
|
+
style: ResponseStyle;
|
|
122
|
+
}
|
|
123
|
+
//#endregion
|
|
87
124
|
//#region src/skill-catalog.d.ts
|
|
88
125
|
/**
|
|
89
126
|
* The standing-scope skill catalog adapter: the SINGLE narrow seam between
|
|
@@ -123,16 +160,6 @@ interface HumanSkillCatalog {
|
|
|
123
160
|
readonly complete: boolean;
|
|
124
161
|
}
|
|
125
162
|
//#endregion
|
|
126
|
-
//#region src/diag.d.ts
|
|
127
|
-
interface Diag {
|
|
128
|
-
debug(message: string, fields?: Record<string, unknown>): void;
|
|
129
|
-
info(message: string, fields?: Record<string, unknown>): void;
|
|
130
|
-
warn(message: string, fields?: Record<string, unknown>): void;
|
|
131
|
-
error(message: string, fields?: Record<string, unknown>): void;
|
|
132
|
-
/** Release the file handle, if one is open. */
|
|
133
|
-
dispose(): void;
|
|
134
|
-
}
|
|
135
|
-
//#endregion
|
|
136
163
|
//#region src/tui-app.d.ts
|
|
137
164
|
/** The compaction lifecycle phase the working row advertises: idle (no
|
|
138
165
|
* compaction), summarizing (compaction/start seen, the summary is being
|
|
@@ -231,12 +258,6 @@ interface SurfaceCatalogContext {
|
|
|
231
258
|
}
|
|
232
259
|
//#endregion
|
|
233
260
|
//#region src/commands.d.ts
|
|
234
|
-
/** A balanced completed-turn prefix for forking: the log up to (and including)
|
|
235
|
-
* the last `turn/end`. Undefined when no turn has completed yet.
|
|
236
|
-
* @param events - the session log.
|
|
237
|
-
* @returns the fork seed events, or undefined.
|
|
238
|
-
*/
|
|
239
|
-
declare function forkSeed(events: readonly SessionEvent[]): readonly SessionEvent[] | undefined;
|
|
240
261
|
/**
|
|
241
262
|
* The effective mode ONE submission resolved at the submit boundary: whether
|
|
242
263
|
* an agent-facing delivery steers into the running turn or queues behind it
|
|
@@ -271,7 +292,12 @@ type HostCommandClaim = {
|
|
|
271
292
|
declare const name = "tui-runner";
|
|
272
293
|
/** Core services required before the TUI can mount. */
|
|
273
294
|
declare const inject: string[];
|
|
274
|
-
/** Plugin config: the session to resume, resolved from the startup service
|
|
295
|
+
/** Plugin config: the session to resume, resolved from the startup service,
|
|
296
|
+
* plus the DSH 0.1.7 profile-owned live TUI preferences. Every preference
|
|
297
|
+
* field is a schemastery `.volatile()` reference (PR A): the `tui-app`
|
|
298
|
+
* plugin's Config is the ONE runtime authority, Loader commits live updates
|
|
299
|
+
* into the references without remounting, and the Settings service projects
|
|
300
|
+
* these fields into editable forms keyed by the `tui-app` profile entry. */
|
|
275
301
|
interface Config {
|
|
276
302
|
/** Resumed session id; a fresh session is created when absent. */
|
|
277
303
|
sessionId?: string;
|
|
@@ -285,6 +311,58 @@ interface Config {
|
|
|
285
311
|
readonly isTTY?: boolean;
|
|
286
312
|
write(text: string): unknown;
|
|
287
313
|
};
|
|
314
|
+
/** Theme values: auto | dark | light | custom:<name>. */
|
|
315
|
+
readonly theme: Volatile<string>;
|
|
316
|
+
readonly iconStyle: Volatile<string>;
|
|
317
|
+
readonly footer: Volatile<string>;
|
|
318
|
+
/** The user's LAST NATIVE footer mode ('default' | 'compact' | 'custom'):
|
|
319
|
+
* persisted separately because `footer` itself is overwritten by
|
|
320
|
+
* 'command' when the command surface arms — the command surface's failure
|
|
321
|
+
* fallback resolves from THIS, so a compact user's fallback survives a
|
|
322
|
+
* restart. */
|
|
323
|
+
readonly footerFallbackMode: Volatile<string>;
|
|
324
|
+
/** The M2 versioned custom footer layout (a nested object, never a JSON
|
|
325
|
+
* string). No schema default: parseFooterLayout is the authority on the
|
|
326
|
+
* persisted value and resolves absence to the builtin default layout. */
|
|
327
|
+
readonly footerLayout: Volatile<unknown>;
|
|
328
|
+
/** PR C: the Custom Text/Command definition collection, retained as raw
|
|
329
|
+
* data — the fail-soft parser (footer/custom-items.ts) owns validation. */
|
|
330
|
+
readonly footerCustomItems: Volatile<unknown>;
|
|
331
|
+
/** M5: the trusted command status-line config (armed ONLY while the USER
|
|
332
|
+
* profile layer owns it — see resolveTrustedFooterCommand). */
|
|
333
|
+
readonly footerCommand: Volatile<unknown>;
|
|
334
|
+
readonly fullscreen: Volatile<string>;
|
|
335
|
+
/** Busy-Enter delivery for plain Enter while the agent runs: 'queue'
|
|
336
|
+
* (default) or 'steer'. */
|
|
337
|
+
readonly busyEnter: Volatile<string>;
|
|
338
|
+
/** Local-shell sandbox for user-typed `!`/`!!` commands: 'bypass'
|
|
339
|
+
* (default) runs them outside the dsh sandbox, 'sandbox' routes them
|
|
340
|
+
* through the dsh shell capability's policy. */
|
|
341
|
+
readonly localShellSandbox: Volatile<string>;
|
|
342
|
+
/** Home/End navigation behavior (issue #9): 'input' (default) moves
|
|
343
|
+
* within the input, 'viewport' keeps Home/End scrolling. */
|
|
344
|
+
readonly homeEndKeys: Volatile<string>;
|
|
345
|
+
/** Canonical transcript display preset (focus | compact | full). */
|
|
346
|
+
readonly displayPreset: Volatile<string>;
|
|
347
|
+
/** Mid-turn progress-update cadence (off | milestones | frequent). */
|
|
348
|
+
readonly progressUpdates: Volatile<string>;
|
|
349
|
+
/** Visible-answer density guidance (default | concise | explanatory). */
|
|
350
|
+
readonly responseStyle: Volatile<string>;
|
|
351
|
+
/** Completion-notification mode ('unfocused' | 'always' | 'off'). */
|
|
352
|
+
readonly notificationMode: Volatile<string>;
|
|
353
|
+
/** Completion-notification method ('auto' | 'osc9' | 'osc777' | 'bell'). */
|
|
354
|
+
readonly notificationMethod: Volatile<string>;
|
|
355
|
+
/** Fullscreen mouse-wheel step ('1' | '2' | '3' | '5' | '8'). */
|
|
356
|
+
readonly wheelScrollLines: Volatile<string>;
|
|
357
|
+
/** The user keybinding overrides as a whole-value RAW field. The
|
|
358
|
+
* keybindings parser (src/keybindings/config.ts) is the only
|
|
359
|
+
* validation/parsing authority — the keybinding business schema
|
|
360
|
+
* deliberately stays out of the plugin Config. */
|
|
361
|
+
readonly keybindings: Volatile<unknown>;
|
|
362
|
+
/** Internal one-shot legacy-migration marker (PR A §8.3): never a
|
|
363
|
+
* product row, never a behavior switch — it only keeps the retired
|
|
364
|
+
* settings.yaml(.imported) from re-overwriting newer user values. */
|
|
365
|
+
readonly legacySettingsMigrationVersion: Volatile<number>;
|
|
288
366
|
}
|
|
289
367
|
declare const Config: z<Config>;
|
|
290
368
|
/**
|
|
@@ -812,26 +890,25 @@ interface LegacyAgentComposition {
|
|
|
812
890
|
* standalone composition callers; that branch installs the caller-owned ref
|
|
813
891
|
* and does not require an Agent.
|
|
814
892
|
* @param presetId - the requested preset, or `undefined` for the default.
|
|
815
|
-
* @param
|
|
816
|
-
*
|
|
817
|
-
* the parameter only ever carries the runner's FocusState object, so a
|
|
818
|
-
* bare `{ enabled: boolean }` keeps the shipped .d.mts clean); when
|
|
819
|
-
* provided, the setup ALSO installs the dynamic Focus system-prompt
|
|
893
|
+
* @param displayState - the shared canonical DisplayState. When provided, the
|
|
894
|
+
* setup also installs the dynamic Focus system-prompt
|
|
820
895
|
* section exactly once per composed agent (plan §9 — every composed
|
|
821
896
|
* root TUI agent gets it; /focus toggles never re-register).
|
|
822
897
|
* @param diag - the diagnostics channel, when the caller has one.
|
|
898
|
+
* @param progressUpdatesState - optional live mid-turn update cadence. The
|
|
899
|
+
* effective text is derived from this state AND `displayState` (Focus
|
|
900
|
+
* suppresses the progress section without mutating this state), so a
|
|
901
|
+
* progress state without a display state is not installable.
|
|
902
|
+
* @param responseStyleState - optional live visible-answer style guidance,
|
|
903
|
+
* independent of display.
|
|
823
904
|
* @returns the id to record on the header (absent without a roster) and the setup callback.
|
|
824
905
|
* @throws when the roster supplies no such preset.
|
|
825
906
|
*/
|
|
826
|
-
declare function composeAgent(ctx: Context, installSelection: ModelSelectionRef, presetId?: string,
|
|
827
|
-
|
|
828
|
-
}, diag?: Diag): Promise<LegacyAgentComposition>;
|
|
829
|
-
declare function composeAgent(ctx: Context, installSelection: (agentCtx: Context, agent: Agent) => void, presetId?: string, focusState?: {
|
|
830
|
-
enabled: boolean;
|
|
831
|
-
}, diag?: Diag): Promise<AgentComposition>;
|
|
907
|
+
declare function composeAgent(ctx: Context, installSelection: ModelSelectionRef, presetId?: string, displayState?: DisplayState, diag?: Diag, progressUpdatesState?: ProgressUpdatesState, responseStyleState?: ResponseStyleState): Promise<LegacyAgentComposition>;
|
|
908
|
+
declare function composeAgent(ctx: Context, installSelection: (agentCtx: Context, agent: Agent) => void, presetId?: string, displayState?: DisplayState, diag?: Diag, progressUpdatesState?: ProgressUpdatesState, responseStyleState?: ResponseStyleState): Promise<AgentComposition>;
|
|
832
909
|
/**
|
|
833
|
-
* The preset a persisted session actually runs, read from DSH 0.1.6
|
|
834
|
-
*
|
|
910
|
+
* The preset a persisted session actually runs, read from the DSH 0.1.6 V3
|
|
911
|
+
* session projection (header initialization plus the latest selection event).
|
|
835
912
|
* @param ctx - the runner context.
|
|
836
913
|
* @param sessionId - the persisted session id.
|
|
837
914
|
* @returns the recorded preset id, or undefined to compose the default.
|
|
@@ -845,4 +922,4 @@ declare function recordedPreset(ctx: Context, sessionId: string): Promise<string
|
|
|
845
922
|
*/
|
|
846
923
|
declare function apply(ctx: Context, config: Config): void;
|
|
847
924
|
//#endregion
|
|
848
|
-
export { AgentComposition, CompactionFold, CompactionSettleSurface, Config, HOST_COMMAND_CATALOG, InitialCatalogResolution, InterruptAgentLike, InterruptWriteOutcome, InterruptWriterLike, LOCAL_COMMANDS, PendingSubagentCall, QueueFoldResult, QueueInboxMessage, ResolveInitialCatalogOptions, SESSIONLESS_COMMANDS, ViewerOpenToken, apply, busyAfterTurnBoundary, commandIsLocalForAttachments, commandRejectsImages, compactingFromLog, composeAgent, contextRefreshKind, createViewerOpenToken, dangerCommand, foldCompactionEvent, foldQueueRows,
|
|
925
|
+
export { AgentComposition, CompactionFold, CompactionSettleSurface, Config, HOST_COMMAND_CATALOG, InitialCatalogResolution, InterruptAgentLike, InterruptWriteOutcome, InterruptWriterLike, LOCAL_COMMANDS, PendingSubagentCall, QueueFoldResult, QueueInboxMessage, ResolveInitialCatalogOptions, SESSIONLESS_COMMANDS, ViewerOpenToken, apply, busyAfterTurnBoundary, commandIsLocalForAttachments, commandRejectsImages, compactingFromLog, composeAgent, contextRefreshKind, createViewerOpenToken, dangerCommand, foldCompactionEvent, foldQueueRows, inject, interruptAgent, isBareCommandLine, isLocalCommandLine, isPlainExitPrompt, matchPendingSubagentCall, name, normalizeSkillInvocation, recordedPreset, resolveInitialCatalog, resolveSubmitDelivery, resumeCommand, runningProfile, settleCompactionSurface, shouldConsumeAdvertisedMiss, subagentJobTranscriptId, subagentJobViewHint, taskRowSelectionDisposition, teardownViewerForSessionSwap, viewerActionCapability };
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { A as shouldConsumeAdvertisedMiss, C as normalizeSkillInvocation, D as resumeCommand, E as resolveSubmitDelivery, F as viewerActionCapability,
|
|
2
|
-
|
|
3
|
-
export { Config, HOST_COMMAND_CATALOG, LOCAL_COMMANDS, SESSIONLESS_COMMANDS, apply, busyAfterTurnBoundary, commandIsLocalForAttachments, commandRejectsImages, compactingFromLog, composeAgent, contextRefreshKind, createViewerOpenToken, dangerCommand, foldCompactionEvent, foldQueueRows, forkSeed, inject, interruptAgent, isBareCommandLine, isLocalCommandLine, isPlainExitPrompt, matchPendingSubagentCall, name, normalizeSkillInvocation, recordedPreset, resolveInitialCatalog, resolveSubmitDelivery, resumeCommand, runningProfile, settleCompactionSurface, shouldConsumeAdvertisedMiss, subagentJobTranscriptId, subagentJobViewHint, taskRowSelectionDisposition, teardownViewerForSessionSwap, viewerActionCapability };
|
|
1
|
+
import { A as shouldConsumeAdvertisedMiss, C as normalizeSkillInvocation, D as resumeCommand, E as resolveSubmitDelivery, F as viewerActionCapability, M as subagentJobViewHint, N as taskRowSelectionDisposition, O as runningProfile, P as teardownViewerForSessionSwap, S as name, T as resolveInitialCatalog, _ as interruptAgent, a as apply, b as isPlainExitPrompt, c as commandRejectsImages, d as contextRefreshKind, f as createViewerOpenToken, g as inject, h as foldQueueRows, i as SESSIONLESS_COMMANDS, j as subagentJobTranscriptId, k as settleCompactionSurface, l as compactingFromLog, m as foldCompactionEvent, n as HOST_COMMAND_CATALOG, o as busyAfterTurnBoundary, p as dangerCommand, r as LOCAL_COMMANDS, s as commandIsLocalForAttachments, t as Config, u as composeAgent, v as isBareCommandLine, w as recordedPreset, x as matchPendingSubagentCall, y as isLocalCommandLine } from "./src-R8SVGB-L.mjs";
|
|
2
|
+
export { Config, HOST_COMMAND_CATALOG, LOCAL_COMMANDS, SESSIONLESS_COMMANDS, apply, busyAfterTurnBoundary, commandIsLocalForAttachments, commandRejectsImages, compactingFromLog, composeAgent, contextRefreshKind, createViewerOpenToken, dangerCommand, foldCompactionEvent, foldQueueRows, inject, interruptAgent, isBareCommandLine, isLocalCommandLine, isPlainExitPrompt, matchPendingSubagentCall, name, normalizeSkillInvocation, recordedPreset, resolveInitialCatalog, resolveSubmitDelivery, resumeCommand, runningProfile, settleCompactionSurface, shouldConsumeAdvertisedMiss, subagentJobTranscriptId, subagentJobViewHint, taskRowSelectionDisposition, teardownViewerForSessionSwap, viewerActionCapability };
|