@xmoon76/dsh-pi-tui 0.4.3-alpha.2 → 0.4.6

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 CHANGED
@@ -19,27 +19,32 @@ Stable releases are recommended for ordinary users. Install DSH first, then add
19
19
  the TUI to the `pi-tui` profile:
20
20
 
21
21
  ```sh
22
- npm install -g @deepseek-ai/dsh@0.1.2-rc.1
22
+ npm install -g --allow-scripts=@deepseek-ai/dsh-subprocess-local,koffi,node-pty,@google/genai,protobufjs,fs-ext @deepseek-ai/dsh@latest
23
23
  dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@latest
24
24
  dsh --profile pi-tui
25
25
  ```
26
26
 
27
27
  ### Next / npm line (validation)
28
28
 
29
- The current `next` line targets the published npm release `dsh-v0.1.3-alpha.2`.
30
- Use the isolated npm driver (installs the exact DSH version declared by this
31
- checkout and exercises the full build/test/package path):
29
+ Preview installation uses the DSH `alpha` channel and the TUI `next` channel.
30
+ The DSH native install scripts must be explicitly allowed:
32
31
 
33
32
  ```sh
34
- pnpm compat:dsh:npm
33
+ npm install -g --allow-scripts=@deepseek-ai/dsh-subprocess-local,koffi,node-pty,@google/genai,protobufjs,fs-ext @deepseek-ai/dsh@alpha
34
+ dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@next
35
+ dsh --profile pi-tui
35
36
  ```
36
37
 
37
- The startup notice on an old runtime suggests the exact npm upgrade:
38
+ Use the isolated npm driver (it installs the exact DSH version declared by this
39
+ checkout and exercises the full build/test/package path):
38
40
 
39
41
  ```sh
40
- npm install -g @deepseek-ai/dsh@0.1.3-alpha.2
42
+ pnpm compat:dsh:npm
41
43
  ```
42
44
 
45
+ See the [compatibility guide](docs/dsh-compatibility.md) for the stable minimum,
46
+ next compatibility range, and fallback paths.
47
+
43
48
  ### Requirements
44
49
 
45
50
  * DeepSeek Harness
@@ -47,35 +52,25 @@ npm install -g @deepseek-ai/dsh@0.1.3-alpha.2
47
52
 
48
53
  ### DSH/TUI version pairing (important)
49
54
 
50
- | TUI package line | Matching DSH line | Notes |
55
+ | TUI package line | Official DSH tags for the pairing | Notes |
51
56
  |---|---|---|
52
- | `0.4.1` (published `@latest`) | `>=0.1.2-rc.1` | Historical stable; validated against the rc.1 family |
53
- | Current `next` npm line (this checkout; version `0.4.3-alpha.2`) | `>=0.1.3-alpha.2` | Published npm alpha.2 target; validated against the exact 0.1.3-alpha.2 family |
54
- | `0.3.x` (`@0.3`) | `0.1.1-rc.2` | Legacy runtime line |
55
-
56
- Do not mix the stable and `next` lines. The published 0.4.1 stable line
57
- still uses the 0.1.2-rc.1 family; if you keep a legacy DSH runtime, use the 0.3
58
- compatibility line below. This `next` checkout declares the published
59
- `0.1.3-alpha.2` npm floor, and older runtimes fail at the normal
60
- incompatible-runtime boundary. The startup row's compatibility notice is
61
- best-effort rather than a Loader startup-order guarantee; the suggested upgrade
62
- target is a published npm version.
63
-
64
- ```sh
65
- npm install -g @deepseek-ai/dsh@0.1.1-rc.2
66
- dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@0.3
67
- dsh --profile pi-tui
68
- ```
57
+ | `0.4.6` (published `@latest`) | `dsh-v0.1.5-rc.1`, `dsh-v0.1.5-rc.2` | Current stable line; rc.1 minimum, rc.2 compatible |
58
+ | Current `next` npm line (this checkout; version `0.4.5`) | `dsh-v0.1.5-rc.1`, `dsh-v0.1.5-rc.2` | Current next line |
69
59
 
70
- The published `0.4.1` stable line declares `>=0.1.2-rc.1`; this checkout's
71
- `next` npm line declares `>=0.1.3-alpha.2`. `npm install -g` is only for
72
- installing a published DSH; to install dsh-pi-tui into a DSH profile, you must
73
- use the `dsh plugin` command.
60
+ Do not mix the stable and `next` lines. The current `next` checkout declares
61
+ the published `0.1.5-rc.1` npm floor; older runtimes fail at the normal
62
+ incompatible-runtime boundary. The startup notice is best-effort rather than a
63
+ Loader startup-order guarantee. See the [full historical compatibility matrix](docs/dsh-compatibility.md)
64
+ for official-tag pairings and fallback commands, and see the [latest `next`
65
+ README](https://github.com/XMoon/dsh-pi-tui/blob/next/README.md) for the current
66
+ integration status.
74
67
 
75
68
  New agent sessions use the official roster's selected preset id. A custom DSH
76
69
  preset literally named `code` is valid and remains `code` when it exists in the
77
- current roster. Old persisted `code` defaults/session values fall back to `ptc`
78
- only after the roster proves that no custom `code` preset exists.
70
+ current roster. DSH V3 migration owns historical session `code -> ptc`
71
+ conversion, while the current projection preserves a legal custom `code`. Only
72
+ an omitted legacy settings default `code` falls back to `ptc` after the roster
73
+ proves that no custom `code` preset exists.
79
74
 
80
75
  ### Profile management
81
76
 
@@ -139,7 +134,8 @@ Supports persisted DSH Sessions, including:
139
134
  * Forking
140
135
  * Rewind
141
136
  * Session lineage
142
- * Transcript export
137
+ * `/export` — full Session archive (descendants + attachments) saved to a Client-local directory
138
+ * `/transcript` — readable Markdown transcript saved to a Client-local directory
143
139
 
144
140
  Use:
145
141
 
@@ -147,6 +143,8 @@ Use:
147
143
  /sessions
148
144
  /fork
149
145
  /rewind
146
+ /export
147
+ /transcript
150
148
  ```
151
149
 
152
150
  When the Agent is idle and the editor is empty, pressing `Esc` twice quickly also opens Rewind.
@@ -297,7 +295,7 @@ For the full `/footer` workflow, Custom Text / Command items, YAML reference, se
297
295
  | Key | Action |
298
296
  | ------------- | --------------------------------------------------- |
299
297
  | `Enter` | Submit input |
300
- | `Ctrl+Enter` | Queue the draft while the agent is busy (the opposite of Enter while busy) |
298
+ | `Ctrl+Enter` | Submit with the OPPOSITE busy behavior (steers by default; queues when `busyEnter=steer`) |
301
299
  | `Shift+Enter` | Insert newline |
302
300
  | `Esc` | Cancel current interaction / interrupt running work |
303
301
  | `Esc Esc` | Open Rewind while idle |
@@ -559,7 +557,7 @@ This section contains DSH compatibility and CI validation details only; ordinary
559
557
  ### npm mode (current `next`)
560
558
 
561
559
  The current `next` line is npm mode: it targets the published
562
- `dsh-v0.1.3-alpha.2` family declared by this checkout's `package.json` and
560
+ `dsh-v0.1.5-rc.1` family declared by this checkout's `package.json` and
563
561
  resolved by its frozen lockfile. The isolated npm driver installs that exact
564
562
  family from the public registry and exercises the TUI build/test/package path:
565
563
 
package/README.md CHANGED
@@ -18,27 +18,31 @@
18
18
  稳定版是普通用户的推荐渠道。请先安装 DSH,再将 TUI 添加到 `pi-tui` profile:
19
19
 
20
20
  ```sh
21
- npm install -g @deepseek-ai/dsh@0.1.2-rc.1
21
+ npm install -g --allow-scripts=@deepseek-ai/dsh-subprocess-local,koffi,node-pty,@google/genai,protobufjs,fs-ext @deepseek-ai/dsh@latest
22
22
  dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@latest
23
23
  dsh --profile pi-tui
24
24
  ```
25
25
 
26
26
  ### Next / npm 线(验证)
27
27
 
28
- 当前 `next` 线以已发布的 npm 版本 `dsh-v0.1.3-alpha.2` 为兼容目标。使用
29
- 隔离的 npm 驱动验证(安装 checkout 声明的精确 DSH 版本并跑完整
30
- build/test/package 路径):
28
+ 预览安装使用 DSH 的 `alpha` channel 与 TUI 的 `next` channel;安装 DSH
29
+ 时需要显式允许其原生安装脚本:
31
30
 
32
31
  ```sh
33
- pnpm compat:dsh:npm
32
+ npm install -g --allow-scripts=@deepseek-ai/dsh-subprocess-local,koffi,node-pty,@google/genai,protobufjs,fs-ext @deepseek-ai/dsh@alpha
33
+ dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@next
34
+ dsh --profile pi-tui
34
35
  ```
35
36
 
36
- 旧 runtime 的启动提示会给出精确的 npm 升级命令:
37
+ 隔离的 npm 驱动仍按本 checkout 声明的精确 DSH 版本运行,并执行完整的
38
+ build/test/package 路径:
37
39
 
38
40
  ```sh
39
- npm install -g @deepseek-ai/dsh@0.1.3-alpha.2
41
+ pnpm compat:dsh:npm
40
42
  ```
41
43
 
44
+ 具体的稳定版最低版本、next 兼容范围和回退路径见[兼容性文档](docs/dsh-compatibility.md)。
45
+
42
46
  ### 环境要求
43
47
 
44
48
  * DeepSeek Harness
@@ -46,33 +50,21 @@ npm install -g @deepseek-ai/dsh@0.1.3-alpha.2
46
50
 
47
51
  ### DSH 与 TUI 版本对应(重要)
48
52
 
49
- | TUI 包版本 | 对应 DSH 版本 | 说明 |
53
+ | TUI 包版本 | 对应的官方 DSH tags | 说明 |
50
54
  |---|---|---|
51
- | `0.4.1`(已发布 `@latest`) | `>=0.1.2-rc.1` | 历史稳定版;按 0.1.2-rc.1 family 验证 |
52
- | 当前 `next` npm 线(本 checkout;版本 `0.4.3-alpha.2`) | `>=0.1.3-alpha.2` | 已发布的 npm alpha.2 目标;按精确 0.1.3-alpha.2 family 验证 |
53
- | `0.3.x`(`@0.3`) | `0.1.1-rc.2` | 旧运行时兼容线 |
54
-
55
- 不要把稳定线与 `next` 线混装。已发布的 0.4.1 稳定线仍按
56
- 0.1.2-rc.1 family 使用;保留旧 DSH 时请使用下方的 0.3 兼容线。当前
57
- `next` checkout 的 peer floor 是 `>=0.1.3-alpha.2`,旧 runtime 会在正常的
58
- 不兼容边界以非零状态失败。启动行的兼容提示是 best-effort,不是 Loader
59
- 启动顺序保证;它建议的升级目标是已发布的 npm 版本。
60
-
61
- ```sh
62
- npm install -g @deepseek-ai/dsh@0.1.1-rc.2
63
- dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@0.3
64
- dsh --profile pi-tui
65
- ```
55
+ | `0.4.6`(已发布 `@latest`) | `dsh-v0.1.5-rc.1`、`dsh-v0.1.5-rc.2` | 当前稳定版;最低 rc.1,兼容 rc.2 |
56
+ | 当前 `next` npm 线(本 checkout;版本 `0.4.5`) | `dsh-v0.1.5-rc.1`、`dsh-v0.1.5-rc.2` | 当前 next 线 |
66
57
 
67
- 已发布的 `0.4.1` 稳定线声明支持范围是 `>=0.1.2-rc.1`;本 checkout 的
68
- `next` npm 线则声明 `>=0.1.3-alpha.2`。`npm install -g` 仅用于
69
- 安装已发布的 DSH;要将 dsh-pi-tui 安装进 DSH profile,必须使用
70
- `dsh plugin` 命令。
58
+ 不要把稳定线与 `next` 线混装。当前 `next` checkout 的 peer floor 是
59
+ `>=0.1.5-rc.1`,旧 runtime 会在正常的不兼容边界以非零状态失败。完整的
60
+ 历史兼容矩阵和 fallback 命令见 [兼容性文档](docs/dsh-compatibility.md);
61
+ 要查看 next 的最新集成状态,请看 [next 分支 README](https://github.com/XMoon/dsh-pi-tui/blob/next/README.md)。
71
62
 
72
63
  新的 Agent preset 使用当前 roster 中选定的 id。DSH 允许合法的自定义
73
64
  `code` preset;只要当前 roster 存在它,显式输入和持久化状态都会保留 `code`。
74
- 旧数据中省略请求的 `code` default/session 值只有在确认 roster 不含 `code` 后
75
- 才会回退到 `ptc`。
65
+ DSH V3 migration 负责历史 session header/selection 的 `code -> ptc` 转换;
66
+ 当前 projection 会原样保留合法的自定义 `code`。只有省略请求的 legacy
67
+ settings default `code` 才会在确认 roster 不含 `code` 后回退到 `ptc`。
76
68
 
77
69
  ### Profile management
78
70
 
@@ -136,7 +128,8 @@ dsh --profile pi-tui --session <session-id>
136
128
  * Fork
137
129
  * Rewind
138
130
  * Session lineage
139
- * Transcript 导出
131
+ * `/export` — 完整 Session 归档(含子代理与附件),保存到 Client 本地目录
132
+ * `/transcript` — 可读 Markdown 对话记录,保存到 Client 本地目录
140
133
 
141
134
  使用:
142
135
 
@@ -144,6 +137,8 @@ dsh --profile pi-tui --session <session-id>
144
137
  /sessions
145
138
  /fork
146
139
  /rewind
140
+ /export
141
+ /transcript
147
142
  ```
148
143
 
149
144
  空闲且编辑器为空时也可以快速按两次 `Esc` 打开 Rewind。
@@ -286,7 +281,7 @@ TUI 使用 DSH 提供的模型和设置服务。
286
281
  | 按键 | 功能 |
287
282
  | ------------- | ---------------------- |
288
283
  | `Enter` | 提交输入 |
289
- | `Ctrl+Enter` | Agent 忙碌时把草稿入队(与 Enter 相反) |
284
+ | `Ctrl+Enter` | 与 Enter 的忙碌行为相反(默认 steer,`busyEnter=steer` 时入队) |
290
285
  | `Shift+Enter` | 换行 |
291
286
  | `Esc` | 取消当前交互 / 中断运行 |
292
287
  | `Esc Esc` | 空闲时打开 Rewind |
@@ -538,7 +533,7 @@ dsh --profile pi-tui-dev
538
533
  ### npm 模式(当前 `next`)
539
534
 
540
535
  当前 `next` 线是 npm 模式:以本 checkout 的 `package.json` 声明、冻结
541
- lockfile 解析的已发布 `dsh-v0.1.3-alpha.2` family 为兼容目标。隔离的 npm
536
+ lockfile 解析的已发布 `dsh-v0.1.5-rc.1` family 为兼容目标。隔离的 npm
542
537
  驱动从公共 registry 安装该精确 family,并跑完整 build/test/package 路径:
543
538
 
544
539
  ```sh
package/cordis.patch.yml CHANGED
@@ -42,11 +42,12 @@
42
42
  - id: authorization
43
43
  name: '@deepseek-ai/dsh-authorization'
44
44
 
45
- # Consume DSH 0.1.2's official shipped presets directly. The upstream
45
+ # Official shipped presets are the composition authority. The upstream
46
46
  # service defaults includeShippedRoot/includeUserRoot to true, so this
47
47
  # bundle deliberately owns no duplicate standard/ptc/minimal/cordis root.
48
- # The legacy persisted id `code` is normalized at the data boundary to
49
- # `ptc`; it is not another preset row.
48
+ # DSH's V2→V3 format migration owns historical session preset conversion;
49
+ # the settings/default compatibility shim is kept separately at the TUI
50
+ # request boundary and does not add another preset row.
50
51
  - id: agent-presets
51
52
  name: '@deepseek-ai/dsh-agent-presets'
52
53
  config:
package/dist/builtins.mjs CHANGED
@@ -1,4 +1,4 @@
1
- import { I as dshVersion, V as PI_TUI_EXTENSIONS_SERVICE } from "./src-BL4AomX5.mjs";
1
+ import { W as PI_TUI_EXTENSIONS_SERVICE, z as dshVersion } from "./src-DNscMTdx.mjs";
2
2
  import { TUI_STARTUP_SERVICE } from "./startup.mjs";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { join } from "node:path";
@@ -1,4 +1,4 @@
1
- import { D as PiTuiApiInfo, E as NormalizedKey, _ as ExtensionTier, h as EditorSnapshot, ot as TuiOverlayOptions, v as ExtensionView } from "../public-types-_pe9ZH00.mjs";
1
+ import { D as PiTuiApiInfo, E as NormalizedKey, _ as ExtensionTier, h as EditorSnapshot, ot as TuiOverlayOptions, v as ExtensionView } from "../public-types-YbB5Rhku.mjs";
2
2
 
3
3
  //#region src/extension/advanced-types.d.ts
4
4
  /** API level of the advanced tier. Bumped only on advanced breaking changes. */
@@ -8,6 +8,15 @@ declare const ADVANCED_API_LEVEL: 1;
8
8
  * sees. The Host has already decoded the terminal protocol (legacy + Kitty
9
9
  * CSI-u + modifyOtherKeys encodings, bracketed paste, key release/repeat
10
10
  * filtering), so an advanced plugin behaves identically on every terminal.
11
+ *
12
+ * EXPLICIT NON-EXPANSION (v0.85.1 mouse parity audit): this contract
13
+ * deliberately does NOT carry pointer/mouse events. Advanced interactive
14
+ * custom surfaces remain keyboard-input surfaces by contract; no raw
15
+ * mouse bytes are exposed and no API-level mouse feature is added here.
16
+ * A pointer-capable Advanced plugin API would require normalized mouse
17
+ * event design, capture ordering, docs, packed declaration checks and
18
+ * plugin migration semantics — a dedicated follow-up design, not a
19
+ * side effect of Host v0.85.1 integration.
11
20
  */
12
21
  type AdvancedInputEvent = /** One key press, normalized to the semantic identity. */{
13
22
  readonly kind: 'key';
@@ -1,4 +1,4 @@
1
- import { D as PiTuiApiInfo, _ as ExtensionTier, ot as TuiOverlayOptions } from "../public-types-_pe9ZH00.mjs";
1
+ import { D as PiTuiApiInfo, _ as ExtensionTier, ot as TuiOverlayOptions } from "../public-types-YbB5Rhku.mjs";
2
2
 
3
3
  //#region src/extension/unstable-types.d.ts
4
4
  /** API level of the unstable tier. Bumped only on unstable breaking changes. */
@@ -1,4 +1,4 @@
1
- import { $ as TuiKeybindingContribution, A as PiTuiSlotSemantic, B as TextView, C as InputWidget, D as PiTuiApiInfo, E as NormalizedKey, F as SpacerView, G as TuiAutocompleteQuery, H as TuiAction, I as StackView, J as TuiColorPalette, K as TuiAutocompleteRegistryView, L as StyledSpan, M as RegistrationSpec, N as RowsView, O as PiTuiCapability, P as SessionSnapshot, Q as TuiCommandHandle, R as SurfaceSnapshot, S as HeaderBadge, T as MessagePresentationSnapshot, U as TuiAutocompleteItem, V as ToolPresentationSnapshot, W as TuiAutocompleteProvider, X as TuiCommandBridgeView, Y as TuiCommandBridgeSnapshot, Z as TuiCommandContribution, _t as TuiThemeRegistrySnapshot, a as ContributionHealth, at as TuiOverlayHandle, b as FooterSegment, bt as describeKey, c as DockItem, ct as TuiRendererRegistrySnapshot, d as EditorHost, dt as TuiSettingHandle, et as TuiKeybindingHandle, f as EditorHostAction, ft as TuiSettingsRegistrySnapshot, g as ExtensionEditor, gt as TuiThemeHandle, h as EditorSnapshot, ht as TuiThemeContribution, i as AutocompleteProviderContribution, it as TuiMessageRendererContribution, j as RegistrationHandle, k as PiTuiSlotName, l as EditorContribution, lt as TuiRendererRegistryView, m as EditorInputEvent, mt as TuiSizeValue, n as ActivitySnapshot, nt as TuiKeybindingRegistryView, o as ContributionRecord, ot as TuiOverlayOptions, p as EditorHostActionResult, pt as TuiSettingsRegistryView, q as TuiAutocompleteSuggestions, r as AutocompleteHandle, rt as TuiLocalCommandHandler, s as ContributionState, st as TuiRendererHandle, t as API_VERSION, tt as TuiKeybindingRegistrySnapshot, u as EditorHandle, ut as TuiSettingContribution, v as ExtensionView, vt as TuiThemeRegistryView, w as MarkdownView, x as FrameView, y as FooterItemContribution, yt as TuiToolRendererContribution, z as SurfaceStateValues } from "./public-types-_pe9ZH00.mjs";
1
+ import { $ as TuiKeybindingContribution, A as PiTuiSlotSemantic, B as TextView, C as InputWidget, D as PiTuiApiInfo, E as NormalizedKey, F as SpacerView, G as TuiAutocompleteQuery, H as TuiAction, I as StackView, J as TuiColorPalette, K as TuiAutocompleteRegistryView, L as StyledSpan, M as RegistrationSpec, N as RowsView, O as PiTuiCapability, P as SessionSnapshot, Q as TuiCommandHandle, R as SurfaceSnapshot, S as HeaderBadge, T as MessagePresentationSnapshot, U as TuiAutocompleteItem, V as ToolPresentationSnapshot, W as TuiAutocompleteProvider, X as TuiCommandBridgeView, Y as TuiCommandBridgeSnapshot, Z as TuiCommandContribution, _t as TuiThemeRegistrySnapshot, a as ContributionHealth, at as TuiOverlayHandle, b as FooterSegment, bt as describeKey, c as DockItem, ct as TuiRendererRegistrySnapshot, d as EditorHost, dt as TuiSettingHandle, et as TuiKeybindingHandle, f as EditorHostAction, ft as TuiSettingsRegistrySnapshot, g as ExtensionEditor, gt as TuiThemeHandle, h as EditorSnapshot, ht as TuiThemeContribution, i as AutocompleteProviderContribution, it as TuiMessageRendererContribution, j as RegistrationHandle, k as PiTuiSlotName, l as EditorContribution, lt as TuiRendererRegistryView, m as EditorInputEvent, mt as TuiSizeValue, n as ActivitySnapshot, nt as TuiKeybindingRegistryView, o as ContributionRecord, ot as TuiOverlayOptions, p as EditorHostActionResult, pt as TuiSettingsRegistryView, q as TuiAutocompleteSuggestions, r as AutocompleteHandle, rt as TuiLocalCommandHandler, s as ContributionState, st as TuiRendererHandle, t as API_VERSION, tt as TuiKeybindingRegistrySnapshot, u as EditorHandle, ut as TuiSettingContribution, v as ExtensionView, vt as TuiThemeRegistryView, w as MarkdownView, x as FrameView, y as FooterItemContribution, yt as TuiToolRendererContribution, z as SurfaceStateValues } from "./public-types-YbB5Rhku.mjs";
2
2
  import { Context, Service } from "@deepseek-ai/cordis";
3
3
 
4
4
  //#region src/extension/service.d.ts
@@ -26,9 +26,12 @@ interface PiTuiExtensionService {
26
26
  */
27
27
  subscribeState(listener: (state: SurfaceStateValues) => void): () => void;
28
28
  /**
29
- * Register a TUI command contribution (M5): execution ownership metadata
30
- * over an existing command. The bridge does NOT execute — actual
31
- * execution stays in the commands service. Owned by the calling fiber.
29
+ * Register a CLIENT-OWNED command contribution (M5): a slash name whose
30
+ * behavior lives entirely on the client (the DSH client command
31
+ * contribution shape). It joins the `/` menu merged with the host catalog
32
+ * and the runner executes its own `handler` locally; a name that is also a
33
+ * host command fails loud at candidate synthesis and never shadows it.
34
+ * Owned by the calling fiber.
32
35
  * @param contribution - the command contribution.
33
36
  */
34
37
  registerCommand(contribution: TuiCommandContribution): TuiCommandHandle;
@@ -1,3 +1,3 @@
1
- import { B as name, H as API_VERSION, R as apply, U as describeKey, V as PI_TUI_EXTENSIONS_SERVICE, z as inject } from "./src-BL4AomX5.mjs";
1
+ import { G as API_VERSION, H as inject, K as describeKey, U as name, V as apply, W as PI_TUI_EXTENSIONS_SERVICE } from "./src-DNscMTdx.mjs";
2
2
  import "./startup.mjs";
3
3
  export { API_VERSION, PI_TUI_EXTENSIONS_SERVICE, apply, describeKey, inject, name };
package/dist/index.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- import { H as TuiAction } from "./public-types-_pe9ZH00.mjs";
1
+ 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";
@@ -140,6 +140,13 @@ interface Diag {
140
140
  * being committed). Derived by the runner from compaction/start →
141
141
  * compaction/summary → compaction/end (foldCompactionEvent). */
142
142
  type CompactionPhase = 'idle' | 'summarizing' | 'applying';
143
+ /**
144
+ * The WEB composer submit gestures (DSH `ComposerSubmitGesture`): plain
145
+ * Enter, or the Cmd/Ctrl-accelerated chord. The busy-Enter policy resolves
146
+ * each to a delivery mode — plain Enter to the preferred mode, the
147
+ * accelerated chord to its OPPOSITE — so the chord is never a fixed mode.
148
+ */
149
+ type ComposerSubmitGesture = 'enter' | 'accelerated';
143
150
  /** One queued inbox row for the queue pane (mirrors the agent Inbox's lists). */
144
151
  interface QueueItem {
145
152
  /** The pending message id (agent inbox identity). */
@@ -161,6 +168,11 @@ interface SurfaceCommandSummary {
161
168
  readonly description: string;
162
169
  readonly input?: {
163
170
  readonly hint: string;
171
+ /** The descriptor's attachment declaration (DSH
172
+ * `CommandInputDescriptor.attachments`): ONLY a command declaring it may
173
+ * be invoked with composer attachments (the composer-side half of the
174
+ * contract — the host executor enforces the other half at admission). */
175
+ readonly attachments?: boolean;
164
176
  };
165
177
  }
166
178
  /** One provider's detached failure text (never the thrown value itself). */
@@ -201,6 +213,34 @@ interface SurfaceCatalogContext {
201
213
  * @returns the fork seed events, or undefined.
202
214
  */
203
215
  declare function forkSeed(events: readonly SessionEvent[]): readonly SessionEvent[] | undefined;
216
+ /**
217
+ * The effective mode ONE submission resolved at the submit boundary: whether
218
+ * an agent-facing delivery steers into the running turn or queues behind it
219
+ * (web `ComposerSubmissionPolicy` parity — an idle agent queues, plain Enter
220
+ * takes the preference, and the accelerated chord takes its OPPOSITE).
221
+ *
222
+ * It is a property of the GESTURE, not of the persisted settings: a one-shot
223
+ * gesture exists only inside the dispatch that resolved it, so every
224
+ * downstream consumer (the TUI skill delivery) accepts this value instead of
225
+ * re-deriving the mode from `busyEnter`.
226
+ */
227
+ type SubmitDelivery = 'steer' | 'queue';
228
+ /**
229
+ * The CURRENT host catalog's view of ONE parsed line (the DSH client
230
+ * `CommandUiRuntime.matchEnter` decision table): whether the host CLAIMS the
231
+ * line, and — for a claimed line — the claiming descriptor's attachment
232
+ * declaration, so the dispatch can never consult two different catalog views
233
+ * for the claim and the declaration.
234
+ */
235
+ type HostCommandClaim = {
236
+ readonly claimed: true;
237
+ /** The claiming descriptor's `input.attachments`
238
+ * (DSH `CommandInputDescriptor.attachments`): only a declaring command
239
+ * may be invoked with composer attachments. */
240
+ readonly attachments: boolean;
241
+ } | {
242
+ readonly claimed: false;
243
+ };
204
244
  //#endregion
205
245
  //#region src/index.d.ts
206
246
  /** Stable Cordis plugin name. */
@@ -258,38 +298,103 @@ declare const LOCAL_COMMANDS: Set<string>;
258
298
  * @param parsed - the parsed slash command, undefined for a plain prompt.
259
299
  * @param text - the submission text.
260
300
  * @param store - the live draft store.
261
- * @param isLocal - whether the command name is a LOCAL (TUI-owned/UI)
262
- * command; skill names answer false.
301
+ * @param isLocal - whether THIS LINE is a LOCAL (TUI-owned/UI) command; skill
302
+ * names answer false. Never derived from the name alone: a host command's
303
+ * input KIND decides which line it claims (see
304
+ * {@link commandIsLocalForAttachments}).
263
305
  */
264
306
  declare function commandRejectsImages(parsed: {
265
307
  name: string;
266
- } | undefined, text: string, store: DraftImageStoreLike, isLocal: (name: string) => boolean): boolean;
308
+ rawInput?: string;
309
+ } | undefined, text: string, store: DraftImageStoreLike, isLocal: boolean): boolean;
267
310
  /**
268
- * The AUTHORITATIVE host-owned command catalog (P1-04): every command name
269
- * the TUI registers itself (registerTuiCommands in commands.ts) plus the
270
- * ownership sets (LOCAL_COMMANDS and SESSIONLESS_COMMANDS — /kill and
271
- * other core commands the TUI does not register but dispatches locally).
272
- * A plugin command contribution is validated against this catalog at
273
- * register time: an exact or near-synonym collision is rejected loudly,
274
- * so a plugin can never shadow a built-in command.
311
+ * The STATIC host-owned command catalog (P1-04): the ownership sets
312
+ * (LOCAL_COMMANDS and SESSIONLESS_COMMANDS — the TUI's own local/UI command
313
+ * names, including the ones `registerTuiCommands` registers, plus core
314
+ * commands such as /kill that the TUI does not register but dispatches
315
+ * locally) and `/plan`. A plugin command contribution is validated against
316
+ * this fixed catalog at register time: an exact or near-synonym collision is
317
+ * rejected loudly, so a plugin can never shadow a built-in command. Names
318
+ * that only the CURRENT host catalog owns (session-scoped or dynamically
319
+ * registered commands) are not in this set — those collisions surface at
320
+ * candidate synthesis time instead.
275
321
  */
276
322
  declare const HOST_COMMAND_CATALOG: ReadonlySet<string>;
277
323
  /**
278
- * Whether one submission steers under the busy-Enter preference: NOT a
279
- * force-queued chord, NOT a TUI-owned local command, and the agent is
280
- * running with the preference set to 'steer'. Pure so the dispatch gate
281
- * (inside the runner closure) is testable headless.
324
+ * The TUI-local classification the attachment gate uses: a TUI/core local
325
+ * command or a live client command contribution is LOCAL (its line is a UI
326
+ * control — attachments are refused), while a LIVE skill wrapper is
327
+ * AGENT-FACING input (multimodal) even when a client contribution shares its
328
+ * name: the wrapper route outranks the contribution everywhere.
329
+ * @param name - the slash name.
330
+ * @param isSkillWrapper - the live skill-wrapper test (absent = none).
331
+ * @param isDynamicLocal - the live client-contribution test (absent = none).
332
+ * @param hostView - the host catalog's view of THIS LINE (`undefined` = the
333
+ * catalog does not resolve the name at all; see {@link HostCommandClaim}).
334
+ * A name the catalog RESOLVES is never a client-local line: when the
335
+ * catalog claims the line the host's own `input.attachments` declaration
336
+ * decides, and when it does not (an argued line of an execute-kind
337
+ * command) the line is an ordinary submission — never a same-named client
338
+ * contribution's.
339
+ */
340
+ declare function isLocalCommandLine(name: string, isSkillWrapper: ((name: string) => boolean) | undefined, isDynamicLocal: ((name: string) => boolean) | undefined, hostView?: HostCommandClaim | undefined): boolean;
341
+ /**
342
+ * Whether one parsed line is the BARE slash token (DSH `matchEnter`'s `bare`:
343
+ * no input follows the name — trailing whitespace is not input). It is the
344
+ * whole difference between a command invocation and an ordinary submission
345
+ * for the NAME-keyed client routes: a client command contribution claims the
346
+ * bare token only, exactly like an execute-kind host command.
347
+ * @param parsed - the parsed slash command.
348
+ * @returns whether the line carries no input after the command name.
349
+ */
350
+ declare function isBareCommandLine(parsed: {
351
+ name: string;
352
+ rawInput?: string;
353
+ }): boolean;
354
+ /**
355
+ * The attachment gate's local-command classification for ONE parsed line —
356
+ * the SINGLE classification the dispatch and its regression tests share, and
357
+ * the DSH client namespace order applied to a LINE:
358
+ * - a TUI/core local command is local;
359
+ * - `/skill <name> ...` and a LIVE skill wrapper are agent-facing
360
+ * (multimodal) even when a client contribution shares the name;
361
+ * - a name the HOST catalog RESOLVES is never local: when the catalog claims
362
+ * the line, the claiming descriptor's `input.attachments` declaration
363
+ * decides (`/goal <objective>` is claimed), and when it does not (an argued
364
+ * line of an execute-kind command, `/compact extra`) the line is an
365
+ * ordinary submission — never a command and never a same-named client
366
+ * contribution's;
367
+ * - everything else follows the live client contribution of that name — for
368
+ * the BARE token only: a contribution claims `/name`, so an argued line
369
+ * (`/deploy explain`) is an ordinary multimodal submission that keeps its
370
+ * attachments.
371
+ * @param parsed - the parsed slash command (undefined = plain prompt).
372
+ * @param isSkillWrapper - the live skill-wrapper test (absent = none).
373
+ * @param isDynamicLocal - the live client-contribution test (absent = none).
374
+ * @param hostClaim - the live HOST-catalog view of THIS LINE (absent = none).
375
+ * @returns whether the line is a local command line.
376
+ */
377
+ declare function commandIsLocalForAttachments(parsed: {
378
+ name: string;
379
+ rawInput?: string;
380
+ } | undefined, isSkillWrapper: ((name: string) => boolean) | undefined, isDynamicLocal: ((name: string) => boolean) | undefined, hostClaim?: ((parsed: {
381
+ name: string;
382
+ rawInput?: string;
383
+ }) => HostCommandClaim | undefined) | undefined): boolean;
384
+ /**
385
+ * The TUI dispatch boundary's delivery resolution: the WEB composer policy
386
+ * ({@link resolveComposerDelivery}) applied to agent-facing input, with the
387
+ * TUI's own ownership terms on top. Pure so the dispatch gate (inside the
388
+ * runner closure) is testable headless.
282
389
  * @param parsed - the parsed slash command, undefined for a plain prompt.
283
390
  * @param running - whether the live agent reports running.
391
+ * @param gesture - the composer gesture that raised the submission.
284
392
  * @param busyEnter - the persisted preference value (''/undefined = queue).
285
- * @param forceQueue - the Ctrl+Enter chord: always queue, never steer.
286
- * @param isDynamicLocal - M5: the CommandBridge's effective-local check for
287
- * plugin-declared local commands (absent = static set only).
288
393
  */
289
- declare function shouldSteerOnEnter(parsed: {
394
+ declare function resolveSubmitDelivery(parsed: {
290
395
  name: string;
291
396
  rawInput?: string;
292
- } | undefined, running: boolean, busyEnter: string | undefined, forceQueue: boolean, isDynamicLocal?: (name: string) => boolean): boolean;
397
+ } | undefined, running: boolean, gesture: ComposerSubmitGesture, busyEnter: string | undefined): SubmitDelivery;
293
398
  /**
294
399
  * Normalize an explicit `/skill <name> <args>` invocation to the skill's
295
400
  * own slash line `/<name> <args>` (review finding 2). The harness's
@@ -313,7 +418,10 @@ declare function normalizeSkillInvocation(text: string): string | undefined;
313
418
  * unadvertised miss keeps the existing plain-input fallback (the user may
314
419
  * deliberately send slash text to the model).
315
420
  * @param execution - the settled `commands.execute` outcome.
316
- * @param wasAdvertised - the claim captured BEFORE session creation.
421
+ * @param wasAdvertised - whether the submission was an advertised command
422
+ * INVOCATION: the submit-time name claim AND the command plane's final
423
+ * ownership of the line (an argued line of an execute-kind command never
424
+ * reached the plane, so it is an ordinary submission).
317
425
  * @returns whether the miss must be consumed as an advertised miss.
318
426
  */
319
427
  declare function shouldConsumeAdvertisedMiss(execution: {
@@ -669,6 +777,16 @@ interface AgentComposition {
669
777
  /** Preset id for the session header, absent when the deployment composes no roster. */
670
778
  agentPreset?: string;
671
779
  /** Agent-factory setup: model selection, then the preset mount when composed. */
780
+ setup: (agentCtx: Context, agent: Agent) => Promise<void> | void;
781
+ }
782
+ /**
783
+ * Source-compatible composition returned for standalone callers that provide
784
+ * their own ModelSelectionRef instead of an Agent-local installer.
785
+ */
786
+ interface LegacyAgentComposition {
787
+ /** Preset id for the session header, absent when the deployment composes no roster. */
788
+ agentPreset?: string;
789
+ /** Standalone setup installs the caller-owned model selection ref. */
672
790
  setup: (agentCtx: Context) => Promise<void> | void;
673
791
  }
674
792
  /**
@@ -685,9 +803,10 @@ interface AgentComposition {
685
803
  * host composition, which is the behavior before presets existed.
686
804
  * @param ctx - the runner context (services read through `ctx.get`).
687
805
  * @param installSelection - installs a fresh Agent-local model selection ref
688
- * during setup. A ModelSelectionRef is still accepted for source
689
- * compatibility with standalone composition callers; the runner always
690
- * supplies the Agent-local installer.
806
+ * during setup using the explicit Agent identity supplied by DSH. A
807
+ * ModelSelectionRef is also accepted for source compatibility with
808
+ * standalone composition callers; that branch installs the caller-owned ref
809
+ * and does not require an Agent.
691
810
  * @param presetId - the requested preset, or `undefined` for the default.
692
811
  * @param focusState - the shared Focus runtime state (STRUCTURAL on
693
812
  * purpose: the public declaration bundle must not inline src/focus.ts —
@@ -700,12 +819,15 @@ interface AgentComposition {
700
819
  * @returns the id to record on the header (absent without a roster) and the setup callback.
701
820
  * @throws when the roster supplies no such preset.
702
821
  */
703
- declare function composeAgent(ctx: Context, installSelection: ((agentCtx: Context) => void) | ModelSelectionRef, presetId?: string, focusState?: {
822
+ declare function composeAgent(ctx: Context, installSelection: ModelSelectionRef, presetId?: string, focusState?: {
823
+ enabled: boolean;
824
+ }, diag?: Diag): Promise<LegacyAgentComposition>;
825
+ declare function composeAgent(ctx: Context, installSelection: (agentCtx: Context, agent: Agent) => void, presetId?: string, focusState?: {
704
826
  enabled: boolean;
705
827
  }, diag?: Diag): Promise<AgentComposition>;
706
828
  /**
707
- * The preset a persisted session actually runs, resolved by the DSH 0.1.2+
708
- * session projection (header initialization plus the latest selection event).
829
+ * The preset a persisted session actually runs, read from DSH 0.1.5-rc.1's
830
+ * V3 session projection (header initialization plus the latest selection event).
709
831
  * @param ctx - the runner context.
710
832
  * @param sessionId - the persisted session id.
711
833
  * @returns the recorded preset id, or undefined to compose the default.
@@ -751,4 +873,4 @@ declare function recomposeBlank(ctx: Context, agent: {
751
873
  */
752
874
  declare function apply(ctx: Context, config: Config): void;
753
875
  //#endregion
754
- export { AgentComposition, CompactionFold, CompactionSettleSurface, Config, HOST_COMMAND_CATALOG, InitialCatalogResolution, InterruptAgentLike, InterruptWriterLike, LOCAL_COMMANDS, PendingSubagentCall, QueueFoldResult, QueueInboxMessage, QueueNoticeSource, RecomposableSession, RecomposeOutcome, ResolveInitialCatalogOptions, SESSIONLESS_COMMANDS, ViewerOpenToken, apply, busyAfterTurnBoundary, commandRejectsImages, compactingFromLog, composeAgent, contextRefreshKind, createViewerOpenToken, dangerCommand, foldCompactionEvent, foldQueueRows, forkSeed, inject, interruptAgent, isPlainExitPrompt, isSubagentSettlementNotice, isUserQueueInput, matchPendingSubagentCall, name, normalizeSkillInvocation, recomposeBlank, recordedPreset, resolveInitialCatalog, resumeCommand, runningProfile, settleCompactionSurface, shouldConsumeAdvertisedMiss, shouldSteerOnEnter, subagentJobTranscriptId, subagentJobViewHint, subagentNoticeIsFailure, teardownViewerForSessionSwap, viewerActionCapability };
876
+ export { AgentComposition, CompactionFold, CompactionSettleSurface, Config, HOST_COMMAND_CATALOG, InitialCatalogResolution, InterruptAgentLike, InterruptWriterLike, LOCAL_COMMANDS, PendingSubagentCall, QueueFoldResult, QueueInboxMessage, QueueNoticeSource, RecomposableSession, RecomposeOutcome, ResolveInitialCatalogOptions, SESSIONLESS_COMMANDS, ViewerOpenToken, apply, busyAfterTurnBoundary, commandIsLocalForAttachments, commandRejectsImages, compactingFromLog, composeAgent, contextRefreshKind, createViewerOpenToken, dangerCommand, foldCompactionEvent, foldQueueRows, forkSeed, inject, interruptAgent, isBareCommandLine, isLocalCommandLine, isPlainExitPrompt, isSubagentSettlementNotice, isUserQueueInput, matchPendingSubagentCall, name, normalizeSkillInvocation, recomposeBlank, recordedPreset, resolveInitialCatalog, resolveSubmitDelivery, resumeCommand, runningProfile, settleCompactionSurface, shouldConsumeAdvertisedMiss, subagentJobTranscriptId, subagentJobViewHint, subagentNoticeIsFailure, teardownViewerForSessionSwap, viewerActionCapability };
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
- import { A as shouldSteerOnEnter, C as recomposeBlank, D as runningProfile, E as resumeCommand, F as viewerActionCapability, L as forkSeed, M as subagentJobViewHint, N as subagentNoticeIsFailure, O as settleCompactionSurface, P as teardownViewerForSessionSwap, S as normalizeSkillInvocation, T as resolveInitialCatalog, _ as isPlainExitPrompt, a as apply, b as matchPendingSubagentCall, c as compactingFromLog, d as createViewerOpenToken, f as dangerCommand, g as interruptAgent, h as inject, i as SESSIONLESS_COMMANDS, j as subagentJobTranscriptId, k as shouldConsumeAdvertisedMiss, l as composeAgent, m as foldQueueRows, n as HOST_COMMAND_CATALOG, o as busyAfterTurnBoundary, p as foldCompactionEvent, r as LOCAL_COMMANDS, s as commandRejectsImages, t as Config, u as contextRefreshKind, v as isSubagentSettlementNotice, w as recordedPreset, x as name, y as isUserQueueInput } from "./src-BL4AomX5.mjs";
1
+ import { A as resumeCommand, B as forkSeed, C as matchPendingSubagentCall, D as recordedPreset, E as recomposeBlank, F as subagentJobViewHint, I as subagentNoticeIsFailure, L as teardownViewerForSessionSwap, M as settleCompactionSurface, N as shouldConsumeAdvertisedMiss, O as resolveInitialCatalog, P as subagentJobTranscriptId, R as viewerActionCapability, S as isUserQueueInput, T as normalizeSkillInvocation, _ 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 runningProfile, k as resolveSubmitDelivery, 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 name, x as isSubagentSettlementNotice, y as isLocalCommandLine } from "./src-DNscMTdx.mjs";
2
2
  import "./startup.mjs";
3
- export { Config, HOST_COMMAND_CATALOG, LOCAL_COMMANDS, SESSIONLESS_COMMANDS, apply, busyAfterTurnBoundary, commandRejectsImages, compactingFromLog, composeAgent, contextRefreshKind, createViewerOpenToken, dangerCommand, foldCompactionEvent, foldQueueRows, forkSeed, inject, interruptAgent, isPlainExitPrompt, isSubagentSettlementNotice, isUserQueueInput, matchPendingSubagentCall, name, normalizeSkillInvocation, recomposeBlank, recordedPreset, resolveInitialCatalog, resumeCommand, runningProfile, settleCompactionSurface, shouldConsumeAdvertisedMiss, shouldSteerOnEnter, subagentJobTranscriptId, subagentJobViewHint, subagentNoticeIsFailure, teardownViewerForSessionSwap, viewerActionCapability };
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, isSubagentSettlementNotice, isUserQueueInput, matchPendingSubagentCall, name, normalizeSkillInvocation, recomposeBlank, recordedPreset, resolveInitialCatalog, resolveSubmitDelivery, resumeCommand, runningProfile, settleCompactionSurface, shouldConsumeAdvertisedMiss, subagentJobTranscriptId, subagentJobViewHint, subagentNoticeIsFailure, teardownViewerForSessionSwap, viewerActionCapability };