@xmoon76/dsh-pi-tui 0.4.5 → 0.4.7-alpha.1
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 +18 -12
- package/README.md +11 -8
- package/cordis.patch.yml +5 -8
- package/dist/builtins.mjs +1 -1
- package/dist/extensions.mjs +1 -1
- package/dist/index.d.mts +77 -105
- package/dist/index.mjs +2 -2
- package/dist/{src-B65x1oP2.mjs → src-D-4-xTUd.mjs} +6842 -2260
- package/dist/startup.d.mts +14 -5
- package/dist/startup.mjs +34 -6
- package/package.json +114 -91
package/README.en.md
CHANGED
|
@@ -54,11 +54,11 @@ 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
|
-
| Current `next` npm line (this checkout; version `0.4.
|
|
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.7-alpha.1`) | `dsh-v0.1.6-alpha.1` | Current next line |
|
|
59
59
|
|
|
60
60
|
Do not mix the stable and `next` lines. The current `next` checkout declares
|
|
61
|
-
the published `0.1.
|
|
61
|
+
the published `0.1.6-alpha.1` npm floor; older runtimes fail at the normal
|
|
62
62
|
incompatible-runtime boundary. The startup notice is best-effort rather than a
|
|
63
63
|
Loader startup-order guarantee. See the [full historical compatibility matrix](docs/dsh-compatibility.md)
|
|
64
64
|
for official-tag pairings and fallback commands, and see the [latest `next`
|
|
@@ -114,9 +114,10 @@ dsh --profile pi-tui --session <session-id>
|
|
|
114
114
|
* Todo / Goal status
|
|
115
115
|
* Human-readable terminal window titles
|
|
116
116
|
* Bounded long-session windows with stable paging and live-follow position
|
|
117
|
+
* Long user prompts collapse to head + marker + tail; `Ctrl+O` expands and collapses them in regular mode and in fullscreen outside Focus
|
|
117
118
|
* No duplicate ghost Tool Cards after compaction / pruning
|
|
118
119
|
|
|
119
|
-
`Ctrl+O` controls Tool and System details
|
|
120
|
+
`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.
|
|
120
121
|
|
|
121
122
|
### Focus Mode
|
|
122
123
|
|
|
@@ -187,11 +188,16 @@ The browser distinguishes:
|
|
|
187
188
|
* nested descendants
|
|
188
189
|
* background Jobs
|
|
189
190
|
|
|
190
|
-
The
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
191
|
+
The Footer's `↓` opens Quick Tasks as a lightweight browsing view: it only
|
|
192
|
+
supports arrow navigation, left/right expand/collapse, `Tab` type cycling,
|
|
193
|
+
`Enter` open, and `Esc` close. The bottom “Open Task Center” row opens the full
|
|
194
|
+
Task Center.
|
|
195
|
+
|
|
196
|
+
The full Task Center additionally offers `A` to toggle Active / All, `/` search,
|
|
197
|
+
`Tab` / `Shift+Tab` to cycle types in both directions, `S` to stop the selected
|
|
198
|
+
task after confirmation, and `R` to refresh/retry. Quick Tasks consumes only the
|
|
199
|
+
whitelist above; every other keystroke is a no-op that never enters search, stop
|
|
200
|
+
confirmation, or management state, so `Esc` always closes it in one layer.
|
|
195
201
|
|
|
196
202
|
Completed one-shot Subagents remain available for persisted Transcript inspection.
|
|
197
203
|
|
|
@@ -305,8 +311,8 @@ For the full `/footer` workflow, Custom Text / Command items, YAML reference, se
|
|
|
305
311
|
| `Ctrl+T` | Toggle the todo panel |
|
|
306
312
|
| `Ctrl+R` | Search input history |
|
|
307
313
|
| `Ctrl+F` | Search Transcript |
|
|
308
|
-
| `Ctrl+End` | Jump to the latest Transcript output in fullscreen
|
|
309
|
-
| `Ctrl+O` | Expand / collapse Tool and System details; in fullscreen Focus, bulk-toggle the Thought roots |
|
|
314
|
+
| `Ctrl+End` | Jump to the latest Transcript output in fullscreen; a clickable `↓ Latest` appears after leaving the live tail |
|
|
315
|
+
| `Ctrl+O` | Expand / collapse Tool and System details and long user prompts in regular/fullscreen-non-Focus; in fullscreen Focus, bulk-toggle the Thought roots (expand long user prompts by clicking the marker) |
|
|
310
316
|
| `Alt+T` | Expand / collapse Thinking |
|
|
311
317
|
| `Ctrl+G` | Edit current input in `$VISUAL`/`$EDITOR` |
|
|
312
318
|
| `Ctrl+V` | Paste image |
|
|
@@ -557,7 +563,7 @@ This section contains DSH compatibility and CI validation details only; ordinary
|
|
|
557
563
|
### npm mode (current `next`)
|
|
558
564
|
|
|
559
565
|
The current `next` line is npm mode: it targets the published
|
|
560
|
-
`dsh-v0.1.
|
|
566
|
+
`dsh-v0.1.6-alpha.1` family declared by this checkout's `package.json` and
|
|
561
567
|
resolved by its frozen lockfile. The isolated npm driver installs that exact
|
|
562
568
|
family from the public registry and exercises the TUI build/test/package path:
|
|
563
569
|
|
package/README.md
CHANGED
|
@@ -52,11 +52,11 @@ pnpm compat:dsh:npm
|
|
|
52
52
|
|
|
53
53
|
| TUI 包版本 | 对应的官方 DSH tags | 说明 |
|
|
54
54
|
|---|---|---|
|
|
55
|
-
| `0.4.
|
|
56
|
-
| 当前 `next` npm 线(本 checkout;版本 `0.4.
|
|
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.7-alpha.1`) | `dsh-v0.1.6-alpha.1` | 当前 next 线 |
|
|
57
57
|
|
|
58
58
|
不要把稳定线与 `next` 线混装。当前 `next` checkout 的 peer floor 是
|
|
59
|
-
`>=0.1.
|
|
59
|
+
`>=0.1.6-alpha.1`,旧 runtime 会在正常的不兼容边界以非零状态失败。完整的
|
|
60
60
|
历史兼容矩阵和 fallback 命令见 [兼容性文档](docs/dsh-compatibility.md);
|
|
61
61
|
要查看 next 的最新集成状态,请看 [next 分支 README](https://github.com/XMoon/dsh-pi-tui/blob/next/README.md)。
|
|
62
62
|
|
|
@@ -108,9 +108,10 @@ dsh --profile pi-tui --session <session-id>
|
|
|
108
108
|
* Todo / Goal 状态展示
|
|
109
109
|
* 可读的终端窗口标题
|
|
110
110
|
* 长会话按有界窗口浏览,并保留翻页与实时跟随位置
|
|
111
|
+
* 超长用户 Prompt 默认折叠为 head + marker + tail;普通与全屏非 Focus 下 `Ctrl+O` 展开、收回
|
|
111
112
|
* Compaction / prune 后不会出现重复的幽灵 Tool Card
|
|
112
113
|
|
|
113
|
-
`Ctrl+O`
|
|
114
|
+
`Ctrl+O` 控制工具和系统详情,并在普通模式与全屏非 Focus 下展开/收起超长用户 Prompt;全屏 Focus 下它整体展开最近几个 Thought root 或全部收起,超长用户 Prompt 改用点击提示行(或搜索命中)展开、`Ctrl+O` 收回。`Alt+T` 单独控制 Thinking。
|
|
114
115
|
|
|
115
116
|
### Focus Mode
|
|
116
117
|
|
|
@@ -180,7 +181,9 @@ main
|
|
|
180
181
|
* nested descendant
|
|
181
182
|
* 后台 Job
|
|
182
183
|
|
|
183
|
-
|
|
184
|
+
Footer `↓` 打开的 Quick Tasks 是轻量浏览视图,只提供方向键导航、左右展开/折叠、`Tab` 类型过滤、`Enter` 打开和 `Esc` 关闭。底部 “Open Task Center” 行可进入完整 Task Center。
|
|
185
|
+
|
|
186
|
+
完整 Task Center 额外提供 `A` 切换 Active / All、`/` 搜索、`Tab` / `Shift+Tab` 双向切换类型、`S`(确认后)停止所选任务以及 `R` 刷新 / 重试。Quick Tasks 只消费上述白名单按键,其余输入一律 no-op,不会进入搜索、停止确认或任务管理状态,因此 `Esc` 始终一层关闭。
|
|
184
187
|
|
|
185
188
|
已经结束的 one-shot Subagent 仍可以打开并查看持久化 Transcript。
|
|
186
189
|
|
|
@@ -291,8 +294,8 @@ TUI 使用 DSH 提供的模型和设置服务。
|
|
|
291
294
|
| `Ctrl+T` | 切换 Todo 面板 |
|
|
292
295
|
| `Ctrl+R` | 搜索输入历史 |
|
|
293
296
|
| `Ctrl+F` | 搜索 Transcript |
|
|
294
|
-
| `Ctrl+End` | 全屏时跳到最新 Transcript
|
|
295
|
-
| `Ctrl+O` | 展开 /
|
|
297
|
+
| `Ctrl+End` | 全屏时跳到最新 Transcript 输出;离开 live tail 时底部显示可点击的 `↓ Latest` |
|
|
298
|
+
| `Ctrl+O` | 展开 / 折叠工具和系统详情;普通与全屏非 Focus 下展开/收起超长用户 Prompt;全屏 Focus 下整体切换 Thought root(超长用户 Prompt 用点击/搜索展开) |
|
|
296
299
|
| `Alt+T` | 展开 / 折叠 Thinking |
|
|
297
300
|
| `Ctrl+G` | 使用 `$VISUAL`/`$EDITOR` 编辑输入 |
|
|
298
301
|
| `Ctrl+V` | 粘贴图片 |
|
|
@@ -533,7 +536,7 @@ dsh --profile pi-tui-dev
|
|
|
533
536
|
### npm 模式(当前 `next`)
|
|
534
537
|
|
|
535
538
|
当前 `next` 线是 npm 模式:以本 checkout 的 `package.json` 声明、冻结
|
|
536
|
-
lockfile 解析的已发布 `dsh-v0.1.
|
|
539
|
+
lockfile 解析的已发布 `dsh-v0.1.6-alpha.1` family 为兼容目标。隔离的 npm
|
|
537
540
|
驱动从公共 registry 安装该精确 family,并跑完整 build/test/package 路径:
|
|
538
541
|
|
|
539
542
|
```sh
|
package/cordis.patch.yml
CHANGED
|
@@ -63,12 +63,6 @@
|
|
|
63
63
|
- id: subagent-model-selection-settings
|
|
64
64
|
name: '@deepseek-ai/dsh-tool-subagent/model-selection-settings'
|
|
65
65
|
|
|
66
|
-
# Host-plane TypeScript runtime: the `ptc` preset's `tool-presentation`
|
|
67
|
-
# row waits for `codeRuntime` and fails the preset at mount without it
|
|
68
|
-
# (same host row the web bundle inserts).
|
|
69
|
-
- id: code-runtime
|
|
70
|
-
name: '@deepseek-ai/dsh-code-runtime-worker-thread'
|
|
71
|
-
|
|
72
66
|
# Host-plane cordis runner: the `cordis` preset's `tool-cordis` row waits
|
|
73
67
|
# for `dynamicCordisRunner`/`cordisInspect` and fails the preset at mount
|
|
74
68
|
# without them (same host row the web bundle inserts).
|
|
@@ -93,7 +87,10 @@
|
|
|
93
87
|
# goal/jobs/compaction services and
|
|
94
88
|
# their host infrastructure, `permission`, `approval`, `sandbox*`,
|
|
95
89
|
# `fs-observation-policy`, `spill*`, `timeout-policy`, `repeat-tool-reminder`,
|
|
96
|
-
# `session-*`, `token-meter`. `
|
|
90
|
+
# `session-*`, `token-meter`. The base's official `ptc-runtime` row also stays:
|
|
91
|
+
# it provides `ptcRuntime`, which the `ptc` preset's `tool-presentation` row
|
|
92
|
+
# waits for, and this overlay owns no second PTC runtime.
|
|
93
|
+
# `command-goal` is disabled below and reintroduced
|
|
97
94
|
# only by presets that own that command in their scoped composition.
|
|
98
95
|
|
|
99
96
|
- id: tool-bash
|
|
@@ -147,7 +144,7 @@
|
|
|
147
144
|
- id: tool-subagent-fork
|
|
148
145
|
disabled: true
|
|
149
146
|
|
|
150
|
-
- id: workflow-
|
|
147
|
+
- id: workflow-ptc
|
|
151
148
|
disabled: true
|
|
152
149
|
|
|
153
150
|
- id: tool-workflow
|
package/dist/builtins.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { I as dshVersion, V as PI_TUI_EXTENSIONS_SERVICE } from "./src-D-4-xTUd.mjs";
|
|
2
2
|
import { TUI_STARTUP_SERVICE } from "./startup.mjs";
|
|
3
3
|
import { readFileSync } from "node:fs";
|
|
4
4
|
import { join } from "node:path";
|
package/dist/extensions.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import {
|
|
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-D-4-xTUd.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
|
@@ -3,9 +3,7 @@ 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
5
|
import { SessionEvent, SessionId } from "@deepseek-ai/dsh-session";
|
|
6
|
-
import { CommandDescriptor } from "@deepseek-ai/dsh-commands";
|
|
7
6
|
import { Context } from "@deepseek-ai/cordis";
|
|
8
|
-
import { SessionEvent as SessionEvent$1 } from "@deepseek-ai/dsh-session/types";
|
|
9
7
|
//#region src/image/admission.d.ts
|
|
10
8
|
/** Structural subset of `ImageAttachmentRef`. */
|
|
11
9
|
interface ImageAttachmentRefLike {
|
|
@@ -114,6 +112,8 @@ interface HumanSkillSummary {
|
|
|
114
112
|
readonly name: string;
|
|
115
113
|
readonly description: string;
|
|
116
114
|
readonly whenToUse?: string;
|
|
115
|
+
/** Official model-invocation capability; Host-local paths are omitted. */
|
|
116
|
+
readonly modelInvocable?: boolean;
|
|
117
117
|
}
|
|
118
118
|
/** The detached human skill catalog one observation produced. */
|
|
119
119
|
interface HumanSkillCatalog {
|
|
@@ -147,23 +147,47 @@ type CompactionPhase = 'idle' | 'summarizing' | 'applying';
|
|
|
147
147
|
* accelerated chord to its OPPOSITE — so the chord is never a fixed mode.
|
|
148
148
|
*/
|
|
149
149
|
type ComposerSubmitGesture = 'enter' | 'accelerated';
|
|
150
|
-
/** One queued
|
|
150
|
+
/** One semantic queued pending-input row for the queue pane. */
|
|
151
151
|
interface QueueItem {
|
|
152
|
-
/** The pending message id (agent inbox identity). */
|
|
152
|
+
/** The pending message id (agent inbox identity), or a local request id. */
|
|
153
153
|
id: string;
|
|
154
154
|
/** The message text, single-line display form. */
|
|
155
155
|
text: string;
|
|
156
156
|
/** next-turn followup vs next-step steer. */
|
|
157
157
|
mode: 'followup' | 'steer';
|
|
158
|
-
/**
|
|
159
|
-
|
|
160
|
-
|
|
158
|
+
/** The correlation identity (authoritative rpc id or local request id). */
|
|
159
|
+
rpcId?: string;
|
|
160
|
+
/** A client-local echo not yet backed by an authoritative occurrence. */
|
|
161
|
+
local?: boolean;
|
|
161
162
|
}
|
|
162
163
|
//#endregion
|
|
163
164
|
//#region src/surface-catalog.d.ts
|
|
165
|
+
/** Minimal live-agent face consumed by the effective catalog readers. */
|
|
166
|
+
interface SurfaceCatalogAgent {
|
|
167
|
+
readonly ctx: object;
|
|
168
|
+
readonly session: {
|
|
169
|
+
readonly header: {
|
|
170
|
+
readonly cwd?: string;
|
|
171
|
+
};
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
/** Local structural command face, compatible with both npm and Source Mode DSH.
|
|
175
|
+
* The optional identity is part of the official 0.1.6 descriptor; an older
|
|
176
|
+
* runtime's descriptor may omit it. */
|
|
177
|
+
interface SurfaceCommandDescriptor {
|
|
178
|
+
readonly definitionId?: string;
|
|
179
|
+
readonly name: string;
|
|
180
|
+
readonly description: string;
|
|
181
|
+
readonly input?: {
|
|
182
|
+
readonly hint: string;
|
|
183
|
+
readonly attachments?: boolean;
|
|
184
|
+
};
|
|
185
|
+
}
|
|
164
186
|
/** One effective command's discovery metadata (the official descriptor's
|
|
165
|
-
* display fields; never a handler or
|
|
187
|
+
* display fields and optional stable identity; never a handler or definition). */
|
|
166
188
|
interface SurfaceCommandSummary {
|
|
189
|
+
/** Stable plugin-owned identity from the official command descriptor. */
|
|
190
|
+
readonly definitionId?: string;
|
|
167
191
|
readonly name: string;
|
|
168
192
|
readonly description: string;
|
|
169
193
|
readonly input?: {
|
|
@@ -196,7 +220,7 @@ interface SurfaceCatalogSnapshot {
|
|
|
196
220
|
}
|
|
197
221
|
/** The commands-service surface the collector reads. */
|
|
198
222
|
interface SurfaceCommandsService {
|
|
199
|
-
list(agent:
|
|
223
|
+
list(agent: SurfaceCatalogAgent): readonly SurfaceCommandDescriptor[];
|
|
200
224
|
}
|
|
201
225
|
/** The narrow context surface {@link readSurfaceCatalog} consumes. The
|
|
202
226
|
* SKILL services are NOT reached here: every dsh skill/agent-presets
|
|
@@ -427,6 +451,31 @@ declare function normalizeSkillInvocation(text: string): string | undefined;
|
|
|
427
451
|
declare function shouldConsumeAdvertisedMiss(execution: {
|
|
428
452
|
readonly result: unknown;
|
|
429
453
|
} | undefined, wasAdvertised: boolean): boolean;
|
|
454
|
+
/** Public settlement shape for the interrupt helper. Kept local so the
|
|
455
|
+
* entry-point declaration does not expose the internal runtime port module. */
|
|
456
|
+
type InterruptWriteOutcome = {
|
|
457
|
+
readonly kind: 'committed';
|
|
458
|
+
readonly value: undefined;
|
|
459
|
+
} | {
|
|
460
|
+
readonly kind: 'rejected';
|
|
461
|
+
readonly error: {
|
|
462
|
+
readonly code: string;
|
|
463
|
+
readonly message: string;
|
|
464
|
+
readonly details?: Readonly<Record<string, unknown>>;
|
|
465
|
+
};
|
|
466
|
+
} | {
|
|
467
|
+
readonly kind: 'cancelled';
|
|
468
|
+
} | {
|
|
469
|
+
readonly kind: 'indeterminate';
|
|
470
|
+
readonly error: {
|
|
471
|
+
readonly code: string;
|
|
472
|
+
readonly message: string;
|
|
473
|
+
readonly details?: Readonly<Record<string, unknown>>;
|
|
474
|
+
};
|
|
475
|
+
} | {
|
|
476
|
+
readonly kind: 'unsupported';
|
|
477
|
+
readonly reason: string;
|
|
478
|
+
};
|
|
430
479
|
/** The live-agent surface {@link interruptAgent} needs (structural — the
|
|
431
480
|
* TUI never imports the agent runtime for this call). */
|
|
432
481
|
interface InterruptAgentLike {
|
|
@@ -444,11 +493,7 @@ interface InterruptAgentLike {
|
|
|
444
493
|
* type so the public declaration never inlines internal runtime modules;
|
|
445
494
|
* the runner's SessionWriter satisfies it). */
|
|
446
495
|
interface InterruptWriterLike {
|
|
447
|
-
cancel(sessionId: string
|
|
448
|
-
kind: 'user';
|
|
449
|
-
}, options: {
|
|
450
|
-
keepInbox: boolean;
|
|
451
|
-
}): void;
|
|
496
|
+
cancel(sessionId: string): Promise<InterruptWriteOutcome>;
|
|
452
497
|
}
|
|
453
498
|
/**
|
|
454
499
|
* Interrupt the live agent (web Stop parity): abort the current
|
|
@@ -469,7 +514,7 @@ interface InterruptWriterLike {
|
|
|
469
514
|
* log, which the design explicitly rejects — the parked queue is the
|
|
470
515
|
* agreed web-parity behavior until upstream lands the capability.
|
|
471
516
|
*/
|
|
472
|
-
declare function interruptAgent(agent: InterruptAgentLike | undefined, writer: InterruptWriterLike):
|
|
517
|
+
declare function interruptAgent(agent: InterruptAgentLike | undefined, writer: InterruptWriterLike): Promise<InterruptWriteOutcome>;
|
|
473
518
|
/** One unsettled subagent delegation, in tool/call order. */
|
|
474
519
|
interface PendingSubagentCall {
|
|
475
520
|
readonly callId: string;
|
|
@@ -594,30 +639,18 @@ interface ResolveInitialCatalogOptions {
|
|
|
594
639
|
}
|
|
595
640
|
declare function resolveInitialCatalog(options: ResolveInitialCatalogOptions): Promise<InitialCatalogResolution>;
|
|
596
641
|
declare function subagentJobTranscriptId(snapshot: unknown): string | undefined;
|
|
597
|
-
/** Viewer body for a subagent job with no uniquely matched child. */
|
|
598
|
-
declare function subagentJobViewHint(status: string, detail: string | undefined): string;
|
|
599
|
-
/** The message-source projection the queue filter reads (a structural subset
|
|
600
|
-
* of dsh's message sources, so the helpers are testable without dsh types). */
|
|
601
|
-
interface QueueNoticeSource {
|
|
602
|
-
readonly form?: string;
|
|
603
|
-
readonly kind?: string;
|
|
604
|
-
readonly summary?: string;
|
|
605
|
-
/** The reporting child's session id (subagent-report relays). */
|
|
606
|
-
readonly senderSessionId?: string;
|
|
607
|
-
}
|
|
608
642
|
/**
|
|
609
|
-
*
|
|
610
|
-
*
|
|
611
|
-
*
|
|
612
|
-
*
|
|
613
|
-
*
|
|
614
|
-
* goal messages. The web makes the same cut (`placement: source.kind ===
|
|
615
|
-
* 'user' ? 'steering' : 'context'`), and this deployment's queue pane has
|
|
616
|
-
* the same rule: only user-origin rows are steerable. A sourceless row
|
|
617
|
-
* (undefined) is treated as user input — plain rows never carry a source.
|
|
618
|
-
* @param source - the message source projection, or undefined for a plain row.
|
|
643
|
+
* The Task Center row-selection disposition (plan §4.3/§4.4). A subagent
|
|
644
|
+
* transcript opens a session/viewer surface that REPLACES the browser; a
|
|
645
|
+
* Job row's detail keeps it mounted (the caller passes {@link openJobView}'s
|
|
646
|
+
* disposition). An UNKNOWN row — a stale panel selection after a live
|
|
647
|
+
* re-projection — also keeps the parent usable instead of dismissing it.
|
|
619
648
|
*/
|
|
620
|
-
declare function
|
|
649
|
+
declare function taskRowSelectionDisposition(row: {
|
|
650
|
+
readonly kind: 'job' | 'subagent';
|
|
651
|
+
} | undefined, jobDetail: 'close' | 'keep-open'): 'close' | 'keep-open';
|
|
652
|
+
/** Viewer body for a subagent job with no uniquely matched child. */
|
|
653
|
+
declare function subagentJobViewHint(status: string, detail: string | undefined): string;
|
|
621
654
|
/**
|
|
622
655
|
* Whether a plain submitted draft is the quit word: exactly `exit` (trimmed,
|
|
623
656
|
* lowercase). The runner intercepts this BEFORE any session creation or
|
|
@@ -626,47 +659,18 @@ declare function isUserQueueInput(source: QueueNoticeSource | undefined): boolea
|
|
|
626
659
|
* @param text - the submitted draft.
|
|
627
660
|
*/
|
|
628
661
|
declare function isPlainExitPrompt(text: string): boolean;
|
|
629
|
-
/**
|
|
630
|
-
* Whether an inbox message is a BACKGROUND-SUBAGENT settlement notice — the
|
|
631
|
-
* runtime's account of a child ending, not steerable user input. Two dsh
|
|
632
|
-
* producers push these into the parent's inbox:
|
|
633
|
-
* - continuable children: `source.kind === 'subagent-settled'` (the
|
|
634
|
-
* continuation manager's settlement notice);
|
|
635
|
-
* - one-shot background subagent jobs: tool-jobs completion notices whose
|
|
636
|
-
* summary starts with the job kind (`subagent <label> [status: …]`).
|
|
637
|
-
* The queue pane mirrors the inbox, but these belong to the task browser
|
|
638
|
-
* (terminal job rows / inactive child rows), so the mirror drops them and
|
|
639
|
-
* only failures surface as a transient error notify.
|
|
640
|
-
* @param source - the message source projection, or undefined for a plain row.
|
|
641
|
-
*/
|
|
642
|
-
declare function isSubagentSettlementNotice(source: QueueNoticeSource | undefined): boolean;
|
|
643
|
-
/**
|
|
644
|
-
* Whether a subagent settlement notice reports FAILURE, classified on the
|
|
645
|
-
* producers' own deterministic wording:
|
|
646
|
-
* - `subagent-settled` summaries: "finished and will do no further work"
|
|
647
|
-
* is the only success wording; aborted / max-tokens / refusal / error /
|
|
648
|
-
* unknown endings all fail;
|
|
649
|
-
* - tool-jobs subagent summaries carry the terminal status line, whose
|
|
650
|
-
* failure statuses are `failed` and `killed` (dsh JobStatus).
|
|
651
|
-
* A notice that cannot be classified is treated as success (silent).
|
|
652
|
-
* @param source - the message source projection.
|
|
653
|
-
*/
|
|
654
|
-
declare function subagentNoticeIsFailure(source: QueueNoticeSource | undefined): boolean;
|
|
655
|
-
/** One inbox message as the queue mirror sees it (a structural projection). */
|
|
662
|
+
/** One semantic pending-input item as the queue mirror sees it. */
|
|
656
663
|
interface QueueInboxMessage {
|
|
657
664
|
readonly id: string;
|
|
658
665
|
readonly content: readonly ContentBlock[];
|
|
659
|
-
readonly source?: QueueNoticeSource;
|
|
660
666
|
}
|
|
661
|
-
/** The
|
|
662
|
-
* settlement summaries the caller should notify (each once). */
|
|
667
|
+
/** The queue-pane rows for one semantic pending-input batch. */
|
|
663
668
|
interface QueueFoldResult {
|
|
664
|
-
/** Queue rows (background-subagent settlement notices excluded). */
|
|
665
669
|
readonly rows: QueueItem[];
|
|
666
|
-
/** Failed settlement summaries not yet notified (the caller notifies). */
|
|
667
|
-
readonly failures: readonly string[];
|
|
668
670
|
}
|
|
669
|
-
|
|
671
|
+
/** Build queue-pane rows from semantic pending-input occurrences, preserving
|
|
672
|
+
* their order and content without inspecting backend-specific metadata. */
|
|
673
|
+
declare function foldQueueRows(messages: readonly QueueInboxMessage[], mode: 'followup' | 'steer'): QueueFoldResult;
|
|
670
674
|
/**
|
|
671
675
|
* Whether a shell command matches a destructive pattern. `rm` is treated
|
|
672
676
|
* specially: any spelling of recursive + force flags (`rm -rf`, `rm -r -f`,
|
|
@@ -826,45 +830,13 @@ declare function composeAgent(ctx: Context, installSelection: (agentCtx: Context
|
|
|
826
830
|
enabled: boolean;
|
|
827
831
|
}, diag?: Diag): Promise<AgentComposition>;
|
|
828
832
|
/**
|
|
829
|
-
* The preset a persisted session actually runs, read from DSH 0.1.
|
|
833
|
+
* The preset a persisted session actually runs, read from DSH 0.1.6-alpha.1's
|
|
830
834
|
* V3 session projection (header initialization plus the latest selection event).
|
|
831
835
|
* @param ctx - the runner context.
|
|
832
836
|
* @param sessionId - the persisted session id.
|
|
833
837
|
* @returns the recorded preset id, or undefined to compose the default.
|
|
834
838
|
*/
|
|
835
839
|
declare function recordedPreset(ctx: Context, sessionId: string): Promise<string | undefined>;
|
|
836
|
-
/** The session surface {@link recomposeBlank} needs: its log and the append seam. */
|
|
837
|
-
interface RecomposableSession {
|
|
838
|
-
readonly id: string;
|
|
839
|
-
snapshotEvents(): readonly SessionEvent$1[];
|
|
840
|
-
append(type: 'agent-preset/selected', data: {
|
|
841
|
-
agentPreset: string;
|
|
842
|
-
}): unknown;
|
|
843
|
-
}
|
|
844
|
-
/** Outcome of {@link recomposeBlank}: the swap committed, or the session is locked. */
|
|
845
|
-
type RecomposeOutcome = {
|
|
846
|
-
kind: 'switched';
|
|
847
|
-
preset: string;
|
|
848
|
-
} | {
|
|
849
|
-
kind: 'locked';
|
|
850
|
-
};
|
|
851
|
-
/**
|
|
852
|
-
* Re-compose one agent onto another preset while its session is still blank.
|
|
853
|
-
*
|
|
854
|
-
* A started conversation's history was produced under its preset's tools, so
|
|
855
|
-
* only a session with no `turn/start` event may swap — the same rule as the
|
|
856
|
-
* official `agentPreset.select` RPC. The selection is appended to the log only
|
|
857
|
-
* after the swap committed (a rejected mount leaves the old composition).
|
|
858
|
-
* @param ctx - the runner context.
|
|
859
|
-
* @param agent - the live agent whose composition to swap.
|
|
860
|
-
* @param id - the target preset id.
|
|
861
|
-
* @returns `switched` with the committed preset id, or `locked` when a turn has run.
|
|
862
|
-
* @throws when the roster supplies no such preset or its composition is unusable.
|
|
863
|
-
*/
|
|
864
|
-
declare function recomposeBlank(ctx: Context, agent: {
|
|
865
|
-
ctx: Context;
|
|
866
|
-
session: RecomposableSession;
|
|
867
|
-
}, id: string): Promise<RecomposeOutcome>;
|
|
868
840
|
/**
|
|
869
841
|
* Mount the TUI: resolve the model selection, create or resume the agent,
|
|
870
842
|
* wire the surface to the agent, and subscribe to the session firehose.
|
|
@@ -873,4 +845,4 @@ declare function recomposeBlank(ctx: Context, agent: {
|
|
|
873
845
|
*/
|
|
874
846
|
declare function apply(ctx: Context, config: Config): void;
|
|
875
847
|
//#endregion
|
|
876
|
-
export { AgentComposition, CompactionFold, CompactionSettleSurface, Config, HOST_COMMAND_CATALOG, InitialCatalogResolution, InterruptAgentLike, InterruptWriterLike, LOCAL_COMMANDS, PendingSubagentCall, QueueFoldResult, QueueInboxMessage,
|
|
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, forkSeed, 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,3 @@
|
|
|
1
|
-
import { A as
|
|
1
|
+
import { A as shouldConsumeAdvertisedMiss, C as normalizeSkillInvocation, D as resumeCommand, E as resolveSubmitDelivery, F as viewerActionCapability, L as forkSeed, 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-D-4-xTUd.mjs";
|
|
2
2
|
import "./startup.mjs";
|
|
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,
|
|
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 };
|