@xmoon76/dsh-pi-tui 0.2.1 → 0.2.2

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.md CHANGED
@@ -327,19 +327,20 @@ the Advanced/Unstable roadmap).
327
327
  read. Enter switches to the selected session.
328
328
  - `/search <query>` — full-text search over persisted session logs, then
329
329
  switch to a hit.
330
- - `/title [title]` / `/rename [title]` — with an argument, set the current
331
- session's title (pins it against automatic generation; titles appear in
332
- the `/sessions` picker); **without an argument, regenerate the title from
333
- the conversation — this overwrites the current title, including one you
334
- pinned earlier**.
330
+ - `/title [title]` — with an argument, set the current session's title
331
+ (pins it against automatic generation; titles appear in the `/sessions`
332
+ picker); **without an argument, regenerate the title from the
333
+ conversation — this overwrites the current title, including one you
334
+ pinned earlier** (`/rename` is an alias).
335
+ - `/tasks` — the merged task browser: background jobs AND subagents in one
336
+ searchable list (type to filter rows by kind/label/status — `subagent`,
337
+ `bash`, `failed`…). `Enter` opens the detail (child transcript for a
338
+ subagent, status viewer for a job), `i` interrupts the selected subagent.
339
+ `/subagents` is an alias.
335
340
  - `/yolo` — switch to `danger-full-access` (alias of `/permission danger-full-access`).
336
- - `/queue` — per-item queue management: edit, delete, steer one, or insert a
337
- message into the agent's inbox (the queue pane above the editor shows
338
- pending messages; `Ctrl+S` steers them all at once, `Alt+↑` pulls them all
339
- back into the editor).
340
341
  - `/status` — show the current session's stats and identity (turn counts,
341
342
  token usage, workspace, installed dsh version).
342
- - `/preset`, `/model`, `/settings`, `/export`, `/fork`, `/subagents` — see
343
+ - `/preset`, `/model`, `/settings`, `/export`, `/fork` — see
343
344
  `dsh --profile pi-tui`'s command autocomplete (`/` + Tab).
344
345
 
345
346
  ## Keybindings (selection)
@@ -354,23 +355,30 @@ the Advanced/Unstable roadmap).
354
355
  draft, if any) into the running turn at once; otherwise sends the draft
355
356
  alone. An idle agent starts a fresh turn with everything.
356
357
  - `Alt+↑` — dequeue: pull every queued message back into the editor draft.
357
- - `Ctrl+T` — toggle the full todo list; the dock above the editor always shows
358
- the todo summary and background tasks, and queued input renders between
359
- them.
358
+ - `Ctrl+T` — toggle the full todo list (in fullscreen, clicking the panel
359
+ expands it to the full list and back); the dock above the editor always
360
+ shows the todo summary and background tasks, and queued input renders
361
+ between them.
360
362
  - `@` — file/folder mentions in the editor: `@` + Tab completes files from the
361
363
  whole workspace (fd-backed when `fd` is on PATH, with a built-in recursive
362
364
  fallback otherwise). The literal `@path` is submitted and the model reads
363
- the file itself. With background work running, an empty editor's `↓` or
364
- `Ctrl+J` opens the task browser over both surfaces:
365
+ the file itself. With background work running, an empty editor's `↓` opens
366
+ the same merged task browser as `/tasks`:
365
367
  - **subagent rows** (live continuable children) — `Enter` opens the child's
366
- transcript read-only (`Esc` returns); they never register jobs records, so
367
- this browser is their only glanceable home.
368
+ transcript read-only (`Esc` returns); `i` interrupts the selected child.
369
+ They never register jobs records, so this browser is their only glanceable
370
+ home.
368
371
  - **job rows** (bash and one-shot subagent jobs) — `Enter` shows the status
369
372
  viewer only: a bash job's output read cursor belongs to the model's
370
373
  `job_output`, and a one-shot subagent job record carries no child session
371
- id, so the transcript is reached via `/subagents` (`s` stops a job).
374
+ id, so a subagent job's transcript is reached through `/tasks` by picking
375
+ the child by its label.
372
376
  The footer badge shows `[N tasks running · M agents · ↓ view]` while any
373
- background work is live.
377
+ background work is live. The queue pane above the editor shows pending
378
+ input: user messages as `❯` rows, everything else (job notices, subagent
379
+ reports, injected instructions) as `⏳` notices that fold into a
380
+ `+N more` line beyond five — and disappear once the agent has received
381
+ them.
374
382
 
375
383
  ## Launch options
376
384
 
package/README.zh-CN.md CHANGED
@@ -292,18 +292,19 @@ SDK。原始终端访问、pre-host 输入拦截与完整输入所有权**不属
292
292
  边输入边搜索,行按工作区分组并实时显示 `filtered/total` 计数,标题在
293
293
  后台按需加载。回车切换到所选会话。
294
294
  - `/search <query>` — 在持久化的会话日志中全文搜索,然后跳转到命中项。
295
- - `/title [title]` / `/rename [title]` — 带参数时设置当前会话的标题
296
- (固定标题,防止自动生成;标题会出现在 `/sessions` 选择器中);
297
- **不带参数时根据对话重新生成标题——这会覆盖当前标题,包括你之前
298
- 固定的标题**。
295
+ - `/title [title]` — 带参数时设置当前会话的标题(固定标题,防止自动
296
+ 生成;标题会出现在 `/sessions` 选择器中);**不带参数时根据对话重新
297
+ 生成标题——这会覆盖当前标题,包括你之前固定的标题**(`/rename` 是
298
+ 别名)。
299
+ - `/tasks` — 合并任务浏览器:后台 job 与子代理在同一个可搜索列表中
300
+ (直接输入过滤行——`subagent`、`bash`、`failed`…)。`Enter` 打开详情
301
+ (子代理为子转录,job 为状态查看器),`i` 中断选中的子代理。
302
+ `/subagents` 是别名。
299
303
  - `/yolo` — 切换到 `danger-full-access`(`/permission danger-full-access`
300
304
  的别名)。
301
- - `/queue` — 逐条管理队列:编辑、删除、单条 steer,或向 agent 的 inbox
302
- 插入消息(编辑器上方的队列窗格显示待处理消息;`Ctrl+S` 一次性全部
303
- steer,`Alt+↑` 把全部消息拉回编辑器)。
304
305
  - `/status` — 显示当前会话的统计与身份信息(回合数、token 用量、
305
306
  工作区、已安装的 dsh 版本)。
306
- - `/preset`、`/model`、`/settings`、`/export`、`/fork`、`/subagents` —
307
+ - `/preset`、`/model`、`/settings`、`/export`、`/fork` —
307
308
  见 `dsh --profile pi-tui` 的命令自动补全(`/` + Tab)。
308
309
 
309
310
  ## 快捷键(节选)
@@ -317,20 +318,25 @@ SDK。原始终端访问、pre-host 输入拦截与完整输入所有权**不属
317
318
  送入正在运行的回合;否则只发送草稿。空闲的 agent 会用全部内容开启
318
319
  新回合。
319
320
  - `Alt+↑` — 出队:把所有排队消息拉回编辑器草稿。
320
- - `Ctrl+T` — 切换完整待办列表;编辑器上方的 dock 始终显示待办摘要与
321
- 后台任务,排队的输入渲染在两者之间。
321
+ - `Ctrl+T` — 切换完整待办列表(全屏时点击面板可在完整列表与折叠之间
322
+ 切换);编辑器上方的 dock 始终显示待办摘要与后台任务,排队的输入渲染
323
+ 在两者之间。
322
324
  - `@` — 编辑器中的文件/文件夹提及:`@` + Tab 从整个工作区补全文件
323
325
  (`fd` 在 PATH 上时以其为后端,否则使用内置的递归回退)。字面
324
326
  `@path` 会被提交,由模型自行读取文件。有后台工作时,空编辑器的 `↓`
325
- 或 `Ctrl+J` 会打开覆盖两种表面的任务浏览器:
327
+ 会打开与 `/tasks` 相同的合并任务浏览器:
326
328
  - **子代理行**(可继续的实时子任务)——`Enter` 以只读方式打开子代理
327
- 的转录(`Esc` 返回);它们从不注册 job 记录,所以此浏览器是它们唯一
328
- 可一览的归宿。
329
+ 的转录(`Esc` 返回);`i` 中断选中的子代理。它们从不注册 job 记录,
330
+ 所以此浏览器是它们唯一可一览的归宿。
329
331
  - **job 行**(bash 与一次性子代理 job)——`Enter` 只显示状态查看器:
330
332
  bash job 的输出读取游标属于模型的 `job_output`,而一次性子代理 job
331
- 记录不带子会话 id,因此转录需通过 `/subagents` 访问(`s` 停止 job)。
333
+ 记录不带子会话 id,因此子代理 job 的转录需通过 `/tasks` 按标签
334
+ 挑选子代理访问。
332
335
  只要有后台工作处于活动状态,页脚徽章就会显示
333
- `[N tasks running · M agents · ↓ view]`。
336
+ `[N tasks running · M agents · ↓ view]`。编辑器上方的队列窗格显示
337
+ 待处理输入:用户消息为 `❯` 行,其余(任务通知、子代理汇报、注入的
338
+ 指令)为 `⏳` 通知行,超过五条折叠为 `+N more`——并在主 agent 接收
339
+ 后消失。
334
340
 
335
341
  ## 启动选项
336
342
 
package/dist/builtins.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  import { TUI_STARTUP_SERVICE } from "./startup.mjs";
2
- import { M as PI_TUI_EXTENSIONS_SERVICE } from "./src-C_RdKmcj.mjs";
2
+ import { N as PI_TUI_EXTENSIONS_SERVICE } from "./src-BsSlpFFF.mjs";
3
3
  import { readFileSync } from "node:fs";
4
4
  import { join } from "node:path";
5
5
  //#region src/builtins.ts
@@ -1,3 +1,3 @@
1
1
  import "./startup.mjs";
2
- import { A as inject, M as PI_TUI_EXTENSIONS_SERVICE, N as API_VERSION, P as describeKey, j as name, k as apply } from "./src-C_RdKmcj.mjs";
2
+ import { A as apply, F as describeKey, M as name, N as PI_TUI_EXTENSIONS_SERVICE, P as API_VERSION, j as inject } from "./src-BsSlpFFF.mjs";
3
3
  export { API_VERSION, PI_TUI_EXTENSIONS_SERVICE, apply, describeKey, inject, name };
package/dist/index.d.mts CHANGED
@@ -262,7 +262,22 @@ interface QueueNoticeSource {
262
262
  readonly form?: string;
263
263
  readonly kind?: string;
264
264
  readonly summary?: string;
265
+ /** The reporting child's session id (subagent-report relays). */
266
+ readonly senderSessionId?: string;
265
267
  }
268
+ /**
269
+ * Whether an inbox message is USER-ORIGIN input — the queue pane's steerable
270
+ * `❯` rows. Everything else is injected context, not the user's own queued
271
+ * input, and must never read as one: plugin notices (background-job
272
+ * completions), `subagent-report` relays (a child's active report, e.g.
273
+ * "Background subagent X reported:"), injected skill/agent instructions,
274
+ * goal messages. The web makes the same cut (`placement: source.kind ===
275
+ * 'user' ? 'steering' : 'context'`), and this deployment's queue pane has
276
+ * the same rule: only user-origin rows are steerable. A sourceless row
277
+ * (undefined) is treated as user input — plain rows never carry a source.
278
+ * @param source - the message source projection, or undefined for a plain row.
279
+ */
280
+ declare function isUserQueueInput(source: QueueNoticeSource | undefined): boolean;
266
281
  /**
267
282
  * Whether a plain submitted draft is the quit word: exactly `exit` (trimmed,
268
283
  * lowercase). The runner intercepts this BEFORE any session creation or
@@ -483,4 +498,4 @@ declare function recomposeBlank(ctx: Context, agent: {
483
498
  */
484
499
  declare function apply(ctx: Context, config: Config): void;
485
500
  //#endregion
486
- export { AgentComposition, CompactionFold, Config, HOST_COMMAND_CATALOG, InitialCatalogResolution, LOCAL_COMMANDS, PendingSubagentCall, QueueFoldResult, QueueInboxMessage, QueueNoticeSource, RecomposableSession, RecomposeOutcome, ResolveInitialCatalogOptions, SESSIONLESS_COMMANDS, SessionLockRefusedError, apply, busyAfterTurnBoundary, compactingFromLog, composeAgent, dangerCommand, foldCompactionEvent, foldQueueRows, forkSeed, inject, isPlainExitPrompt, isSubagentSettlementNotice, matchPendingSubagentCall, name, recomposeBlank, recordedPreset, resolveInitialCatalog, resumeCommand, runningProfile, shouldConsumeAdvertisedMiss, shouldSteerOnEnter, subagentJobTranscriptId, subagentJobViewHint, subagentNoticeIsFailure };
501
+ export { AgentComposition, CompactionFold, Config, HOST_COMMAND_CATALOG, InitialCatalogResolution, LOCAL_COMMANDS, PendingSubagentCall, QueueFoldResult, QueueInboxMessage, QueueNoticeSource, RecomposableSession, RecomposeOutcome, ResolveInitialCatalogOptions, SESSIONLESS_COMMANDS, SessionLockRefusedError, apply, busyAfterTurnBoundary, compactingFromLog, composeAgent, dangerCommand, foldCompactionEvent, foldQueueRows, forkSeed, inject, isPlainExitPrompt, isSubagentSettlementNotice, isUserQueueInput, matchPendingSubagentCall, name, recomposeBlank, recordedPreset, resolveInitialCatalog, resumeCommand, runningProfile, shouldConsumeAdvertisedMiss, shouldSteerOnEnter, subagentJobTranscriptId, subagentJobViewHint, subagentNoticeIsFailure };
package/dist/index.mjs CHANGED
@@ -1,3 +1,3 @@
1
1
  import "./startup.mjs";
2
- import { C as shouldConsumeAdvertisedMiss, D as subagentNoticeIsFailure, E as subagentJobViewHint, O as forkSeed, S as runningProfile, T as subagentJobTranscriptId, _ as name, a as SessionLockRefusedError, b as resolveInitialCatalog, c as compactingFromLog, d as foldCompactionEvent, f as foldQueueRows, g as matchPendingSubagentCall, h as isSubagentSettlementNotice, i as SESSIONLESS_COMMANDS, l as composeAgent, m as isPlainExitPrompt, n as HOST_COMMAND_CATALOG, o as apply, p as inject, r as LOCAL_COMMANDS, s as busyAfterTurnBoundary, t as Config, u as dangerCommand, v as recomposeBlank, w as shouldSteerOnEnter, x as resumeCommand, y as recordedPreset } from "./src-C_RdKmcj.mjs";
3
- export { Config, HOST_COMMAND_CATALOG, LOCAL_COMMANDS, SESSIONLESS_COMMANDS, SessionLockRefusedError, apply, busyAfterTurnBoundary, compactingFromLog, composeAgent, dangerCommand, foldCompactionEvent, foldQueueRows, forkSeed, inject, isPlainExitPrompt, isSubagentSettlementNotice, matchPendingSubagentCall, name, recomposeBlank, recordedPreset, resolveInitialCatalog, resumeCommand, runningProfile, shouldConsumeAdvertisedMiss, shouldSteerOnEnter, subagentJobTranscriptId, subagentJobViewHint, subagentNoticeIsFailure };
2
+ import { C as runningProfile, D as subagentJobViewHint, E as subagentJobTranscriptId, O as subagentNoticeIsFailure, S as resumeCommand, T as shouldSteerOnEnter, _ as matchPendingSubagentCall, a as SessionLockRefusedError, b as recordedPreset, c as compactingFromLog, d as foldCompactionEvent, f as foldQueueRows, g as isUserQueueInput, h as isSubagentSettlementNotice, i as SESSIONLESS_COMMANDS, k as forkSeed, l as composeAgent, m as isPlainExitPrompt, n as HOST_COMMAND_CATALOG, o as apply, p as inject, r as LOCAL_COMMANDS, s as busyAfterTurnBoundary, t as Config, u as dangerCommand, v as name, w as shouldConsumeAdvertisedMiss, x as resolveInitialCatalog, y as recomposeBlank } from "./src-BsSlpFFF.mjs";
3
+ export { Config, HOST_COMMAND_CATALOG, LOCAL_COMMANDS, SESSIONLESS_COMMANDS, SessionLockRefusedError, apply, busyAfterTurnBoundary, compactingFromLog, composeAgent, dangerCommand, foldCompactionEvent, foldQueueRows, forkSeed, inject, isPlainExitPrompt, isSubagentSettlementNotice, isUserQueueInput, matchPendingSubagentCall, name, recomposeBlank, recordedPreset, resolveInitialCatalog, resumeCommand, runningProfile, shouldConsumeAdvertisedMiss, shouldSteerOnEnter, subagentJobTranscriptId, subagentJobViewHint, subagentNoticeIsFailure };