@xmoon76/dsh-pi-tui 0.1.3 → 0.1.4

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
@@ -2,7 +2,7 @@
2
2
 
3
3
  A third-party TUI mode for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (`dsh`), built on a vendored fork of [pi-tui](https://github.com/MoonshotAI/kimi-code/tree/main/packages/pi-tui).
4
4
 
5
- This package is the `dsh.bundle` layer that makes `dsh --profile pi-tui` run a terminal UI instead of the browser GUI (`dsh --profile web`) or one-shot mode (`dsh --profile headless`). The vendored pi-tui fork (`@xmoon76/pi-tui`, with its five local rendering fixes) is bundled inside this package's build output — you only ever install this one package.
5
+ This package is the `dsh.bundle` layer that makes `dsh --profile pi-tui` run a terminal UI instead of the browser GUI (`dsh --profile web`) or one-shot mode (`dsh --profile headless`). The vendored pi-tui fork (`@xmoon76/pi-tui`, with its local rendering fixes — the divergence ledger lives in the repo at `packages/pi-tui/AGENTS.md`) is bundled inside this package's build output — you only ever install this one package.
6
6
 
7
7
  ## Install
8
8
 
package/dist/index.d.mts CHANGED
@@ -22,6 +22,43 @@ interface Config {
22
22
  sessionId?: string;
23
23
  }
24
24
  declare const Config: z<Config>;
25
+ /**
26
+ * Slash commands that need no session: before the first user message
27
+ * (deferred start) they run locally without creating one. Everything else
28
+ * dispatches through `commands.execute`, which creates the session lazily
29
+ * (the command line IS the first user input). Commands in this set must
30
+ * tolerate `liveAgent === undefined` in their handlers.
31
+ *
32
+ * Exported for the headless suite: the gate is exactly where a sessionless
33
+ * command silently starts creating sessions again.
34
+ */
35
+ declare const SESSIONLESS_COMMANDS: Set<string>;
36
+ /**
37
+ * The LOCAL-execute command set: TUI-owned UI/control commands AND core
38
+ * control commands the TUI does not itself register (e.g. /kill) that
39
+ * must ALWAYS run locally through the commands service, never steered,
40
+ * regardless of the busyEnter preference. Everything NOT in this set —
41
+ * plain prompts AND non-local commands (the per-skill slash commands like
42
+ * /grilling or /matrix-cli) — flows through the busy-Enter submission
43
+ * policy while the agent is running: web parity, where a skill invocation
44
+ * is a plain `session.prompt` whose leading `/name` line the host's
45
+ * pre-step listener (dsh-tool-skill) resolves into the injected skill
46
+ * body — there is no command-execution wire for skills.
47
+ */
48
+ declare const LOCAL_COMMANDS: Set<string>;
49
+ /**
50
+ * Whether one submission steers under the busy-Enter preference: NOT a
51
+ * force-queued chord, NOT a TUI-owned local command, and the agent is
52
+ * running with the preference set to 'steer'. Pure so the dispatch gate
53
+ * (inside the runner closure) is testable headless.
54
+ * @param parsed - the parsed slash command, undefined for a plain prompt.
55
+ * @param running - whether the live agent reports running.
56
+ * @param busyEnter - the persisted preference value (''/undefined = queue).
57
+ * @param forceQueue - the Ctrl+Enter chord: always queue, never steer.
58
+ */
59
+ declare function shouldSteerOnEnter(parsed: {
60
+ name: string;
61
+ } | undefined, running: boolean, busyEnter: string | undefined, forceQueue: boolean): boolean;
25
62
  /**
26
63
  * Read an explicit child-session reference from a future/extended job record.
27
64
  * Current dsh JobSnapshot records do not expose one, so this normally returns
@@ -131,4 +168,4 @@ declare function recomposeBlank(ctx: Context, agent: {
131
168
  */
132
169
  declare function apply(ctx: Context, config: Config): void;
133
170
  //#endregion
134
- export { AgentComposition, Config, RecomposableSession, RecomposeOutcome, apply, composeAgent, dangerCommand, forkSeed, inject, name, recomposeBlank, recordedPreset, resumeCommand, runningProfile, subagentJobTranscriptId, subagentJobViewHint };
171
+ export { AgentComposition, Config, LOCAL_COMMANDS, RecomposableSession, RecomposeOutcome, SESSIONLESS_COMMANDS, apply, composeAgent, dangerCommand, forkSeed, inject, name, recomposeBlank, recordedPreset, resumeCommand, runningProfile, shouldSteerOnEnter, subagentJobTranscriptId, subagentJobViewHint };