@xmoon76/dsh-pi-tui 0.4.0-alpha.1 → 0.4.0
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 +27 -15
- package/README.md +26 -14
- package/cordis.patch.yml +9 -5
- package/dist/builtins.mjs +1 -1
- package/dist/extension/unstable.d.mts +46 -18
- package/dist/extensions.mjs +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{src-syk6h8J9.mjs → src-zkySYmLZ.mjs} +5302 -1490
- package/dist/startup.d.mts +1 -1
- package/dist/startup.mjs +25 -7
- package/package.json +97 -91
package/README.en.md
CHANGED
|
@@ -18,7 +18,7 @@ dsh --profile pi-tui
|
|
|
18
18
|
|
|
19
19
|
## DSH compatibility and source validation
|
|
20
20
|
|
|
21
|
-
The published package declares the lower-bound-only DSH peer contract `>=0.1.2-
|
|
21
|
+
The published package declares the lower-bound-only DSH peer contract `>=0.1.2-rc.1`. Source validation does not change that contract or vendor DSH into this repository.
|
|
22
22
|
|
|
23
23
|
When the target DSH version is not yet available from npm, validate against the official checkout pinned by commit SHA:
|
|
24
24
|
|
|
@@ -26,7 +26,7 @@ When the target DSH version is not yet available from npm, validate against the
|
|
|
26
26
|
pnpm compat:dsh:source -- --dsh-dir "$HOME/project/deepseek-harness"
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
CI
|
|
29
|
+
CI follows the tracked `test/compat/dsh-mode.json` policy for pushes to `next` and pull requests targeting `next`; `main` and every tag use npm Mode. Both `next` lanes use `test/compat/dsh-source.json` for the current validated DSH target; Source Mode validates the complete official DSH tarball family, TUI presets, and the old-runtime boundary, while npm Mode runs the frozen registry lane. The published `pi2dsh` ecosystem check is explicitly marked skipped for an unpublished source family. See [`docs/dsh-compatibility.md`](docs/dsh-compatibility.md) for the full workflow.
|
|
30
30
|
|
|
31
31
|
## Features
|
|
32
32
|
|
|
@@ -115,10 +115,17 @@ The browser distinguishes:
|
|
|
115
115
|
|
|
116
116
|
Completed one-shot Subagents remain available for persisted Transcript inspection.
|
|
117
117
|
|
|
118
|
-
A direct `continuable` Child can be opened in an interactive viewer and sent follow-up messages directly. The Child has its own Transcript, Draft, and runtime state, without modifying the main Session input.
|
|
118
|
+
A direct `continuable` Child can be opened in an interactive viewer and sent follow-up messages directly (through DSH's official `subagents.prompt()` human channel — queued in order as the Child's own next turn, with user provenance). The Child has its own Transcript, Draft, and runtime state, without modifying the main Session input.
|
|
119
119
|
|
|
120
120
|
Deeper nested Subagents are read-only by default.
|
|
121
121
|
|
|
122
|
+
The official subagent model selection (the DSH `subagent-model-selection`
|
|
123
|
+
setting) can be toggled and its allowlist maintained in `/settings`: once
|
|
124
|
+
enabled, a NEW session's official `subagent` tool may pick the child
|
|
125
|
+
provider/model per call (bounded by the allowlist). The setting is sampled at
|
|
126
|
+
session composition and never rewrites the tools of an already-running
|
|
127
|
+
session.
|
|
128
|
+
|
|
122
129
|
### Shell
|
|
123
130
|
|
|
124
131
|
The editor supports two Shell modes:
|
|
@@ -312,19 +319,25 @@ dsh-pi-tui:
|
|
|
312
319
|
|
|
313
320
|
| TUI package line | Matching DSH line | Notes |
|
|
314
321
|
|---|---|---|
|
|
315
|
-
| `0.4.0
|
|
322
|
+
| `0.4.0` (`@latest`) | `>=0.1.2-rc.1` | Current stable; validated against the rc.1 family |
|
|
323
|
+
| `0.4.x-alpha` (`@next`) | `>=0.1.2-rc.1` | Subsequent prerelease; each release validates its concrete DSH family |
|
|
324
|
+
| `0.4.0-alpha.2` (published) | `>=0.1.2-alpha.4` | Previous 0.4 prerelease; its releases validated the alpha.4/alpha.5 family |
|
|
325
|
+
| `0.4.0-alpha.1` (published) | `>=0.1.2-alpha.2` | Earlier 0.4 prerelease; accepts the alpha.2/alpha.3 runtime |
|
|
316
326
|
| `0.3.x` (`@0.3`) | `0.1.1-rc.2` | Legacy runtime line |
|
|
317
327
|
|
|
318
|
-
Do not mix the
|
|
328
|
+
Do not mix the lines: DSH 0.1.1 is outside the 0.4 peer window and the
|
|
319
329
|
normal incompatible-runtime boundary will fail. The startup row prints upgrade
|
|
320
330
|
and rollback guidance when concurrent Loader ordering allows it, but that
|
|
321
331
|
friendly notice is best-effort rather than a startup-order guarantee. If you
|
|
322
|
-
keep DSH 0.1.1, use the 0.3 TUI line
|
|
323
|
-
|
|
332
|
+
keep DSH 0.1.1, use the 0.3 TUI line; if you keep the alpha.2/alpha.3
|
|
333
|
+
baseline, use `@xmoon76/dsh-pi-tui@0.4.0-alpha.1`; if you keep the
|
|
334
|
+
alpha.4/alpha.5 baseline, use `@xmoon76/dsh-pi-tui@0.4.0-alpha.2`. For the
|
|
335
|
+
current 0.4 stable release, install the matching DSH first and then add the
|
|
336
|
+
TUI to a profile:
|
|
324
337
|
|
|
325
338
|
```sh
|
|
326
|
-
npm install -g @deepseek-ai/dsh@0.1.2-
|
|
327
|
-
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@
|
|
339
|
+
npm install -g @deepseek-ai/dsh@0.1.2-rc.1
|
|
340
|
+
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@latest
|
|
328
341
|
dsh --profile pi-tui
|
|
329
342
|
```
|
|
330
343
|
|
|
@@ -336,7 +349,7 @@ dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@0.3
|
|
|
336
349
|
dsh --profile pi-tui
|
|
337
350
|
```
|
|
338
351
|
|
|
339
|
-
The
|
|
352
|
+
The current 0.4 line declares `>=0.1.2-rc.1`; each release validates
|
|
340
353
|
its concrete DSH family. Running only `npm install -g @xmoon76/dsh-pi-tui` does
|
|
341
354
|
not install the plugin into a DSH profile; the `dsh plugin` command is still
|
|
342
355
|
required.
|
|
@@ -348,12 +361,11 @@ only after the roster proves that no custom `code` preset exists.
|
|
|
348
361
|
|
|
349
362
|
### npm
|
|
350
363
|
|
|
351
|
-
Using a dedicated `pi-tui` profile is recommended.
|
|
352
|
-
|
|
353
|
-
prerelease channel:
|
|
364
|
+
Using a dedicated `pi-tui` profile is recommended. Use the TUI channel that
|
|
365
|
+
matches your DSH line: `@latest` for stable releases, `@next` for prereleases:
|
|
354
366
|
|
|
355
367
|
```sh
|
|
356
|
-
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@
|
|
368
|
+
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@latest
|
|
357
369
|
dsh --profile pi-tui
|
|
358
370
|
```
|
|
359
371
|
|
|
@@ -365,7 +377,7 @@ dsh --profile pi-tui --session <session-id>
|
|
|
365
377
|
|
|
366
378
|
### Source Mode (validation only)
|
|
367
379
|
|
|
368
|
-
Source Mode is only for `next` CI and local compatibility
|
|
380
|
+
Source Mode is the validation-only distribution selected by the tracked policy for `next` CI and available for local compatibility checks. It reads the full commit pin in `test/compat/dsh-source.json`, builds the official DSH tarball family, installs it through temporary pnpm overrides, and removes the temporary state afterward. Do not write DSH source paths, `file:` dependencies, or workspace symlinks into a published package.
|
|
369
381
|
|
|
370
382
|
```sh
|
|
371
383
|
pnpm compat:dsh:source -- --dsh-dir "$HOME/project/deepseek-harness"
|
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ dsh --profile pi-tui
|
|
|
18
18
|
|
|
19
19
|
## DSH 兼容性与源码验证
|
|
20
20
|
|
|
21
|
-
发布包通过 `package.json` peer contract 使用 DSH `>=0.1.2-
|
|
21
|
+
发布包通过 `package.json` peer contract 使用 DSH `>=0.1.2-rc.1`;源码验证不会修改这个发布契约,也不会把 DSH vendor 进本仓库。
|
|
22
22
|
|
|
23
23
|
当目标 DSH 版本尚未发布到 npm 时,可以用固定 commit 的官方源码包做本地验证:
|
|
24
24
|
|
|
@@ -26,7 +26,7 @@ dsh --profile pi-tui
|
|
|
26
26
|
pnpm compat:dsh:source -- --dsh-dir "$HOME/project/deepseek-harness"
|
|
27
27
|
```
|
|
28
28
|
|
|
29
|
-
CI
|
|
29
|
+
CI 对 push 到 `next` 以及目标为 `next` 的 PR 遵循跟踪的 `test/compat/dsh-mode.json` 策略;`main` 和所有 tag 使用 npm Mode。`next` 的两种 lane 都从 `test/compat/dsh-source.json` 读取当前 validated DSH target;Source Mode 会验证完整的官方 DSH tarball family、TUI 预设和旧 runtime 边界,npm Mode 则运行冻结的 registry lane。对于尚未发布的 source family,已发布 `pi2dsh` 的生态检查会明确标记为 skipped。详细流程见 [`docs/dsh-compatibility.md`](docs/dsh-compatibility.md)。
|
|
30
30
|
|
|
31
31
|
## 功能
|
|
32
32
|
|
|
@@ -94,7 +94,7 @@ Rewind 会从选中的历史 User Turn 创建新的 Child Session,并把对应
|
|
|
94
94
|
|
|
95
95
|
### Subagent 与后台任务
|
|
96
96
|
|
|
97
|
-
`/tasks`
|
|
97
|
+
`/tasks` 打开完整 Task Center(当前 Session 的所有后台工作);Footer 的 `↓` 直接打开轻量 Quick Tasks(只看正在运行的工作)。
|
|
98
98
|
|
|
99
99
|
Subagent 按完整 lineage 显示,包括嵌套创建的 descendant:
|
|
100
100
|
|
|
@@ -113,12 +113,19 @@ main
|
|
|
113
113
|
* nested descendant
|
|
114
114
|
* 后台 Job
|
|
115
115
|
|
|
116
|
+
两个视图共享同一份运行时状态:`A` 切换 Active / All scope,`Tab` 切换类型过滤,`/` 进入搜索,`S`(确认后)停止所选任务,`N` / `Shift+N` 在运行中的任务间跳转,Quick 内 `T` 或底部 "View all" 行进入完整 Task Center,`Esc` 逐层返回。
|
|
117
|
+
|
|
116
118
|
已经结束的 one-shot Subagent 仍可以打开并查看持久化 Transcript。
|
|
117
119
|
|
|
118
|
-
对于当前 Session 的直接 `continuable` Child,可以进入交互式 Viewer,并直接向该 Subagent
|
|
120
|
+
对于当前 Session 的直接 `continuable` Child,可以进入交互式 Viewer,并直接向该 Subagent 发送后续消息(走 DSH 官方 `subagents.prompt()` 人类输入通道——按顺序排队为 Child 自己的下一个 turn,并保留 user 来源)。Child 使用自己的 Transcript、Draft 和运行状态,不会修改主 Session 的输入。
|
|
119
121
|
|
|
120
122
|
更深层的 nested Subagent 默认以只读方式查看。
|
|
121
123
|
|
|
124
|
+
官方 Subagent 模型选择(DSH `subagent-model-selection` 设置)可在 `/settings`
|
|
125
|
+
中开关并维护 allowlist:开启后**新建** Session 的官方 `subagent` 工具可以按调用
|
|
126
|
+
选择子 Agent 的 provider/model(受 allowlist 限制)。设置在 Session 组合时采样,
|
|
127
|
+
不会改写已在运行的 Session 的工具。
|
|
128
|
+
|
|
122
129
|
### Shell
|
|
123
130
|
|
|
124
131
|
编辑器支持两种 Shell 模式:
|
|
@@ -301,18 +308,23 @@ dsh-pi-tui:
|
|
|
301
308
|
|
|
302
309
|
| TUI 包版本 | 对应 DSH 版本 | 说明 |
|
|
303
310
|
|---|---|---|
|
|
304
|
-
| `0.4.0
|
|
311
|
+
| `0.4.0`(`@latest`) | `>=0.1.2-rc.1` | 当前稳定版;按 0.1.2-rc.1 family 验证 |
|
|
312
|
+
| `0.4.x-alpha`(`@next`) | `>=0.1.2-rc.1` | 后续预发布线;按每个发布版本的具体 DSH family 验证 |
|
|
313
|
+
| `0.4.0-alpha.2`(已发布) | `>=0.1.2-alpha.4` | 上一条 0.4 预发布线;其发布版本按 alpha.4/alpha.5 family 验证 |
|
|
314
|
+
| `0.4.0-alpha.1`(已发布) | `>=0.1.2-alpha.2` | 更早的 0.4 预发布线;接受 alpha.2/alpha.3 运行时 |
|
|
305
315
|
| `0.3.x`(`@0.3`) | `0.1.1-rc.2` | 旧运行时兼容线 |
|
|
306
316
|
|
|
307
317
|
不要把两条线混装:DSH 0.1.1 不在 0.4 的 peer 支持范围内,运行时会在
|
|
308
318
|
正常的不兼容边界以非零状态失败。启动行会在 Loader 并发挂载顺序允许时打印
|
|
309
319
|
升级和回退提示,但该友好提示是 best-effort,不是启动顺序保证;保留 DSH
|
|
310
|
-
0.1.1 时请使用 0.3
|
|
311
|
-
|
|
320
|
+
0.1.1 时请使用 0.3,保留 alpha.2/alpha.3 时请使用
|
|
321
|
+
`@xmoon76/dsh-pi-tui@0.4.0-alpha.1`,保留 alpha.4/alpha.5 时请使用
|
|
322
|
+
`@xmoon76/dsh-pi-tui@0.4.0-alpha.2`。当前 0.4 稳定版的推荐安装顺序如下
|
|
323
|
+
(先装 DSH,再把 TUI 装入 profile):
|
|
312
324
|
|
|
313
325
|
```sh
|
|
314
|
-
npm install -g @deepseek-ai/dsh@0.1.2-
|
|
315
|
-
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@
|
|
326
|
+
npm install -g @deepseek-ai/dsh@0.1.2-rc.1
|
|
327
|
+
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@latest
|
|
316
328
|
dsh --profile pi-tui
|
|
317
329
|
```
|
|
318
330
|
|
|
@@ -324,8 +336,8 @@ dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@0.3
|
|
|
324
336
|
dsh --profile pi-tui
|
|
325
337
|
```
|
|
326
338
|
|
|
327
|
-
`0.4`
|
|
328
|
-
DSH family。仅执行 `npm install -g @xmoon76/dsh-pi-tui` 不会把插件安装进
|
|
339
|
+
`0.4` 当前线的声明支持范围是 `>=0.1.2-rc.1`;每个发布版本都会验证
|
|
340
|
+
具体的 DSH family。仅执行 `npm install -g @xmoon76/dsh-pi-tui` 不会把插件安装进
|
|
329
341
|
DSH profile,实际使用仍应执行上面的 `dsh plugin` 命令。
|
|
330
342
|
|
|
331
343
|
新的 Agent preset 使用当前 roster 中选定的 id。DSH 允许合法的自定义
|
|
@@ -335,11 +347,11 @@ DSH profile,实际使用仍应执行上面的 `dsh plugin` 命令。
|
|
|
335
347
|
|
|
336
348
|
### npm
|
|
337
349
|
|
|
338
|
-
推荐使用单独的 `pi-tui` profile
|
|
350
|
+
推荐使用单独的 `pi-tui` profile。使用与 DSH 版本匹配的
|
|
339
351
|
TUI channel(稳定版用 `@latest`,预发布版用 `@next`):
|
|
340
352
|
|
|
341
353
|
```sh
|
|
342
|
-
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@
|
|
354
|
+
dsh plugin --profile pi-tui -- add @xmoon76/dsh-pi-tui@latest
|
|
343
355
|
dsh --profile pi-tui
|
|
344
356
|
```
|
|
345
357
|
|
|
@@ -351,7 +363,7 @@ dsh --profile pi-tui --session <session-id>
|
|
|
351
363
|
|
|
352
364
|
### Source Mode(仅验证)
|
|
353
365
|
|
|
354
|
-
Source Mode
|
|
366
|
+
Source Mode 是 `next` CI 按跟踪策略选用的、并可用于本地兼容性检查的验证专用 distribution。它从 `test/compat/dsh-source.json` 的完整 commit SHA 构建官方 DSH tarball family,通过临时 pnpm overrides 安装,并在完成后清理临时状态。不要把 DSH 源码路径、`file:` 依赖或 workspace symlink 写入发布 package。
|
|
355
367
|
|
|
356
368
|
```sh
|
|
357
369
|
pnpm compat:dsh:source -- --dsh-dir "$HOME/project/deepseek-harness"
|
package/cordis.patch.yml
CHANGED
|
@@ -52,9 +52,13 @@
|
|
|
52
52
|
config:
|
|
53
53
|
default: standard
|
|
54
54
|
|
|
55
|
-
# The official standard preset
|
|
56
|
-
#
|
|
57
|
-
#
|
|
55
|
+
# The official standard preset composes its `subagent` tool with
|
|
56
|
+
# `modelSelectionSettings: true`, which injects this Host-owned setting
|
|
57
|
+
# service — the row is required for the standard composition to mount.
|
|
58
|
+
# Mounting the service ALONE enables nothing: it only owns the
|
|
59
|
+
# `subagent-model-selection` settings section (default enabled=false,
|
|
60
|
+
# empty allowlist). Each NEW session samples that section at
|
|
61
|
+
# composition; the TUI exposes the toggle + allowlist in /settings.
|
|
58
62
|
- id: subagent-model-selection-settings
|
|
59
63
|
name: '@deepseek-ai/dsh-tool-subagent/model-selection-settings'
|
|
60
64
|
|
|
@@ -84,8 +88,8 @@
|
|
|
84
88
|
#
|
|
85
89
|
# Rows that STAY on the host plane (not listed): `tools` (registry), `shell-env`
|
|
86
90
|
# (publishes the DSH env the model's shell sees), `subagent` + its spawn/fork
|
|
87
|
-
# backends (process singletons), `
|
|
88
|
-
#
|
|
91
|
+
# backends (process singletons), `subagent-model-selection-settings`, the
|
|
92
|
+
# goal/jobs/compaction services and
|
|
89
93
|
# their host infrastructure, `permission`, `approval`, `sandbox*`,
|
|
90
94
|
# `fs-observation-policy`, `spill*`, `timeout-policy`, `repeat-tool-reminder`,
|
|
91
95
|
# `session-*`, `token-meter`. `command-goal` is disabled below and reintroduced
|
package/dist/builtins.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { H as PI_TUI_EXTENSIONS_SERVICE, L as dshVersion } from "./src-
|
|
1
|
+
import { H as PI_TUI_EXTENSIONS_SERVICE, L as dshVersion } from "./src-zkySYmLZ.mjs";
|
|
2
2
|
import { TUI_STARTUP_SERVICE } from "./startup.mjs";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
|
@@ -4,15 +4,35 @@ import { D as PiTuiApiInfo, _ as ExtensionTier, ot as TuiOverlayOptions } from "
|
|
|
4
4
|
/** API level of the unstable tier. Bumped only on unstable breaking changes. */
|
|
5
5
|
declare const UNSTABLE_API_LEVEL: 1;
|
|
6
6
|
/**
|
|
7
|
-
* One
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
7
|
+
* One normalized terminal input sequence (plan §5). The plugin receives
|
|
8
|
+
* the input AFTER the terminal pipeline has reassembled and normalized it
|
|
9
|
+
* — NOT the raw OS byte stream. The Host's input path is:
|
|
10
|
+
*
|
|
11
|
+
* ```text
|
|
12
|
+
* OS stdin
|
|
13
|
+
* → ProcessTerminal / StdinBuffer (batched chunks split into individual
|
|
14
|
+
* sequences; bracketed-paste content re-wrapped in its markers)
|
|
15
|
+
* → keyboard-protocol negotiation (Kitty flags / DA replies filtered)
|
|
16
|
+
* → native modifier normalization (Windows / Apple Terminal Return →
|
|
17
|
+
* CSI-u Shift+Enter)
|
|
18
|
+
* → TUI-owned query replies filtered (OSC11 background, color-scheme
|
|
19
|
+
* reports, cell-size responses)
|
|
20
|
+
* → TUI input listeners
|
|
21
|
+
* → THIS capture (BEFORE Host semantic routing)
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
24
|
+
* So the sequence is a `preHostInput` event: it can see, consume or
|
|
25
|
+
* rewrite anything the Host router would otherwise decode — Enter, Esc,
|
|
26
|
+
* Ctrl+C, bracketed paste (markers preserved), CSI-u sequences — but it
|
|
27
|
+
* CANNOT see the terminal-negotiation replies the TUI itself consumes
|
|
28
|
+
* (Kitty/DA, OSC11, color-scheme, cell-size), and it never sees raw
|
|
29
|
+
* multi-byte chunks mid-sequence. `surfaceId` identifies the surface
|
|
30
|
+
* generation the sequence arrived on.
|
|
11
31
|
*/
|
|
12
32
|
interface UnstableRawInputEvent {
|
|
13
|
-
/** The
|
|
33
|
+
/** The normalized terminal input sequence (a sequence, not a raw chunk). */
|
|
14
34
|
readonly data: string;
|
|
15
|
-
/** The surface generation the
|
|
35
|
+
/** The surface generation the sequence arrived on. */
|
|
16
36
|
readonly surfaceId: string;
|
|
17
37
|
}
|
|
18
38
|
/** The outcome of one raw interception (plan §5). */
|
|
@@ -33,12 +53,17 @@ type UnstableRawInputResult = /** Pass the chunk through unchanged (the Host con
|
|
|
33
53
|
type UnstableRawCaptureMode = 'observe' | 'capture' | 'exclusive';
|
|
34
54
|
/**
|
|
35
55
|
* One raw input capture registration (plan §5/§8). The capture is
|
|
36
|
-
* consulted by the Host BEFORE
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
40
|
-
*
|
|
41
|
-
* the
|
|
56
|
+
* consulted by the Host BEFORE semantic routing — after the terminal
|
|
57
|
+
* pipeline has reassembled and normalized the input (see
|
|
58
|
+
* {@link UnstableRawInputEvent}): it can see, consume or rewrite any
|
|
59
|
+
* sequence that would otherwise reach the Host router, including Enter,
|
|
60
|
+
* Esc, Ctrl+C, paste and CSI-u sequences. It is NOT consulted before
|
|
61
|
+
* terminal protocol decoding: the TUI's own negotiation replies (Kitty
|
|
62
|
+
* flags, DA, OSC11, color-scheme, cell-size) never reach a capture, and
|
|
63
|
+
* a capture cannot break the terminal negotiation. This is the Unstable
|
|
64
|
+
* contract: a broken capture can still make Host shortcuts stop working.
|
|
65
|
+
* The ONLY Host-owned recovery is the emergency fail-safe (triple-Esc),
|
|
66
|
+
* which the Unstable API cannot rewrite.
|
|
42
67
|
*
|
|
43
68
|
* Modes:
|
|
44
69
|
* - `observe` — never consumes or rewrites; a pure observer.
|
|
@@ -48,8 +73,8 @@ type UnstableRawCaptureMode = 'observe' | 'capture' | 'exclusive';
|
|
|
48
73
|
* registration is an explicit error, never a load-order winner.
|
|
49
74
|
*
|
|
50
75
|
* Ordering is deterministic: `priority` ASC, then `id` ASC. A throwing
|
|
51
|
-
* handler is isolated (health ledger) and FAILS OPEN — the
|
|
52
|
-
* through, so a broken capture can never stall the TUI.
|
|
76
|
+
* handler is isolated (health ledger) and FAILS OPEN — the sequence
|
|
77
|
+
* passes through, so a broken capture can never stall the TUI.
|
|
53
78
|
*/
|
|
54
79
|
interface UnstableRawInputSpec {
|
|
55
80
|
/** Stable diagnostic identity, unique per owner. */
|
|
@@ -83,7 +108,9 @@ interface UnstableRawInputHandle {
|
|
|
83
108
|
interface UnstableMountedComponent {
|
|
84
109
|
/** Render the current state as raw terminal lines at the given width. */
|
|
85
110
|
render(width: number): string[];
|
|
86
|
-
/** Receive one
|
|
111
|
+
/** Receive one normalized terminal input sequence while this component
|
|
112
|
+
* owns focus (the same preHostInput contract as
|
|
113
|
+
* {@link UnstableRawInputEvent} — never raw OS bytes). */
|
|
87
114
|
handleInput?(raw: string): void;
|
|
88
115
|
/** The component was disposed (mount closed / surface died). */
|
|
89
116
|
dispose?(): void;
|
|
@@ -133,9 +160,10 @@ interface UnstableSurfaceHandle {
|
|
|
133
160
|
requestRender(): void;
|
|
134
161
|
/**
|
|
135
162
|
* Mount a low-level component (plan §9 option A) as a capturing overlay.
|
|
136
|
-
* The plugin renders RAW lines and receives
|
|
137
|
-
* the
|
|
138
|
-
*
|
|
163
|
+
* The plugin renders RAW lines and receives the normalized input
|
|
164
|
+
* sequence (the preHostInput contract — see UnstableRawInputEvent;
|
|
165
|
+
* never raw OS bytes); the Host owns the physical mount, focus,
|
|
166
|
+
* stacking, fullscreen migration and teardown. Caller-fiber-owned lease.
|
|
139
167
|
*/
|
|
140
168
|
mountComponent(component: UnstableMountedComponent, options?: TuiOverlayOptions): UnstableMountLease;
|
|
141
169
|
}
|
package/dist/extensions.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { B as inject, H as PI_TUI_EXTENSIONS_SERVICE, U as API_VERSION, V as name, W as describeKey, z as apply } from "./src-
|
|
1
|
+
import { B as inject, H as PI_TUI_EXTENSIONS_SERVICE, U as API_VERSION, V as name, W as describeKey, z as apply } from "./src-zkySYmLZ.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
|
@@ -725,7 +725,7 @@ declare function recordedPreset(ctx: Context, sessionId: string): Promise<string
|
|
|
725
725
|
/** The session surface {@link recomposeBlank} needs: its log and the append seam. */
|
|
726
726
|
interface RecomposableSession {
|
|
727
727
|
readonly id: string;
|
|
728
|
-
|
|
728
|
+
snapshotEvents(): readonly SessionEvent$1[];
|
|
729
729
|
append(type: 'agent-preset/selected', data: {
|
|
730
730
|
agentPreset: string;
|
|
731
731
|
}): unknown;
|
package/dist/index.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { A as shouldConsumeAdvertisedMiss, C as normalizeSkillInvocation, D as resumeCommand, E as resolveInitialCatalog, F as teardownViewerForSessionSwap, I as viewerActionCapability, M as subagentJobTranscriptId, N as subagentJobViewHint, O as runningProfile, P as subagentNoticeIsFailure, R as forkSeed, S as name, T as recordedPreset, _ as interruptAgent, a as SessionLockRefusedError, b as isUserQueueInput, c as commandRejectsImages, d as contextRefreshKind, f as createViewerOpenToken, g as inject, h as foldQueueRows, i as SESSIONLESS_COMMANDS, j as shouldSteerOnEnter, k as settleCompactionSurface, l as compactingFromLog, m as foldCompactionEvent, n as HOST_COMMAND_CATALOG, o as apply, p as dangerCommand, r as LOCAL_COMMANDS, s as busyAfterTurnBoundary, t as Config, u as composeAgent, v as isPlainExitPrompt, w as recomposeBlank, x as matchPendingSubagentCall, y as isSubagentSettlementNotice } from "./src-
|
|
1
|
+
import { A as shouldConsumeAdvertisedMiss, C as normalizeSkillInvocation, D as resumeCommand, E as resolveInitialCatalog, F as teardownViewerForSessionSwap, I as viewerActionCapability, M as subagentJobTranscriptId, N as subagentJobViewHint, O as runningProfile, P as subagentNoticeIsFailure, R as forkSeed, S as name, T as recordedPreset, _ as interruptAgent, a as SessionLockRefusedError, b as isUserQueueInput, c as commandRejectsImages, d as contextRefreshKind, f as createViewerOpenToken, g as inject, h as foldQueueRows, i as SESSIONLESS_COMMANDS, j as shouldSteerOnEnter, k as settleCompactionSurface, l as compactingFromLog, m as foldCompactionEvent, n as HOST_COMMAND_CATALOG, o as apply, p as dangerCommand, r as LOCAL_COMMANDS, s as busyAfterTurnBoundary, t as Config, u as composeAgent, v as isPlainExitPrompt, w as recomposeBlank, x as matchPendingSubagentCall, y as isSubagentSettlementNotice } from "./src-zkySYmLZ.mjs";
|
|
2
2
|
import "./startup.mjs";
|
|
3
3
|
export { Config, HOST_COMMAND_CATALOG, LOCAL_COMMANDS, SESSIONLESS_COMMANDS, SessionLockRefusedError, 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 };
|