@gaunt-sloth/agent 2.0.0-alpha.23 → 2.0.0-alpha.25

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.
Files changed (56) hide show
  1. package/README.md +73 -24
  2. package/dist/core/GthDeepAgent.d.ts +3 -3
  3. package/dist/core/GthDeepAgent.js +82 -35
  4. package/dist/core/GthDeepAgent.js.map +1 -1
  5. package/dist/core/debugCapture.d.ts +1 -1
  6. package/dist/core/debugCapture.js.map +1 -1
  7. package/dist/core/subagentProfiles.d.ts +50 -0
  8. package/dist/core/subagentProfiles.js +81 -0
  9. package/dist/core/subagentProfiles.js.map +1 -0
  10. package/dist/middleware/binaryContentInjectionMiddleware.d.ts +8 -1
  11. package/dist/middleware/binaryContentInjectionMiddleware.js +11 -2
  12. package/dist/middleware/binaryContentInjectionMiddleware.js.map +1 -1
  13. package/dist/middleware/frontendImageInjectionMiddleware.d.ts +80 -0
  14. package/dist/middleware/frontendImageInjectionMiddleware.js +146 -0
  15. package/dist/middleware/frontendImageInjectionMiddleware.js.map +1 -0
  16. package/dist/middleware/registry.js +36 -1
  17. package/dist/middleware/registry.js.map +1 -1
  18. package/dist/middleware/types.d.ts +16 -2
  19. package/dist/modules/a2a/A2AClientWrapper.d.ts +15 -6
  20. package/dist/modules/a2a/A2AClientWrapper.js +93 -64
  21. package/dist/modules/a2a/A2AClientWrapper.js.map +1 -1
  22. package/dist/modules/apiAgUiModule.d.ts +68 -0
  23. package/dist/modules/apiAgUiModule.js +95 -4
  24. package/dist/modules/apiAgUiModule.js.map +1 -1
  25. package/dist/modules/interactiveSessionModule.js +199 -43
  26. package/dist/modules/interactiveSessionModule.js.map +1 -1
  27. package/dist/modules/slashCommands.d.ts +467 -0
  28. package/dist/modules/slashCommands.js +888 -0
  29. package/dist/modules/slashCommands.js.map +1 -0
  30. package/dist/resolvers.js +15 -0
  31. package/dist/resolvers.js.map +1 -1
  32. package/dist/tools/GthCustomToolkit.js +72 -3
  33. package/dist/tools/GthCustomToolkit.js.map +1 -1
  34. package/dist/tools/GthDevToolkit.d.ts +6 -3
  35. package/dist/tools/GthDevToolkit.js +31 -11
  36. package/dist/tools/GthDevToolkit.js.map +1 -1
  37. package/dist/tools/GthFileSystemToolkit.d.ts +16 -0
  38. package/dist/tools/GthFileSystemToolkit.js +218 -110
  39. package/dist/tools/GthFileSystemToolkit.js.map +1 -1
  40. package/dist/tools/McpResourceTool.d.ts +31 -0
  41. package/dist/tools/McpResourceTool.js +106 -0
  42. package/dist/tools/McpResourceTool.js.map +1 -0
  43. package/dist/tools/shell/env.js +1 -1
  44. package/dist/tools/shell/hardline.d.ts +33 -2
  45. package/dist/tools/shell/hardline.js +525 -40
  46. package/dist/tools/shell/hardline.js.map +1 -1
  47. package/package.json +8 -8
  48. package/dist/tools/shell/allowlist.d.ts +0 -11
  49. package/dist/tools/shell/allowlist.js +0 -12
  50. package/dist/tools/shell/allowlist.js.map +0 -1
  51. package/dist/tools/shell/arity.d.ts +0 -11
  52. package/dist/tools/shell/arity.js +0 -12
  53. package/dist/tools/shell/arity.js.map +0 -1
  54. package/dist/tools/shell/normalize.d.ts +0 -10
  55. package/dist/tools/shell/normalize.js +0 -11
  56. package/dist/tools/shell/normalize.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"interactiveSessionModule.js","sourceRoot":"","sources":["../../src/modules/interactiveSessionModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAChG,OAAO,EACL,qBAAqB,EACrB,OAAO,EACP,WAAW,EACX,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAC9F,OAAO,EACL,oBAAoB,EACpB,iBAAiB,GACl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C,MAAM,CAAC,CAAC;oBAChB,WAAW,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;gBACzC,CAAC;YACH,CAAC;YACD,EAAE,CAAC,KAAK,EAAE,CAAC;QACb,CAAC,CAAC;QAEF,IAAI,OAAO,EAAE,CAAC;YACZ,MAAM,cAAc,CAAC,OAAO,CAAC,CAAC;QAChC,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC;YACpC,WAAW,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC;QACzC,CAAC;QACD,IAAI,CAAC,UAAU;YAAE,MAAM,WAAW,EAAE,CAAC;QACrC,IAAI,UAAU,EAAE,CAAC;YACf,UAAU,CAAC,GAAG,EAAE;gBACd,IAAI,EAAE,CAAC;YACT,CAAC,EAAE,GAAG,CAAC,CAAC;QACV,CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,MAAM,CAAC,OAAO,EAAE,CAAC;QACvB,kBAAkB,EAAE,CAAC;QACrB,KAAK,CAAC,YAAY,aAAa,CAAC,IAAI,aAAa,GAAG,EAAE,CAAC,CAAC;QACxD,IAAI,CAAC,CAAC,CAAC,CAAC;IACV,CAAC;AACH,CAAC"}
1
+ {"version":3,"file":"interactiveSessionModule.js","sourceRoot":"","sources":["../../src/modules/interactiveSessionModule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAyC,UAAU,EAAE,MAAM,6BAA6B,CAAC;AAChG,OAAO,EACL,qBAAqB,EACrB,OAAO,EACP,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,GACnB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MAAM,0CAA0C,CAAC;AAC1E,OAAO,EAAE,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAA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CAAC;IACH,CAAC;IAAC,OAAO,GAAG,EAAE,CAAC;QACb,MAAM,MAAM,CAAC,OAAO,EAAE,CAAC;QACvB,kBAAkB,EAAE,CAAC;QACrB,KAAK,CAAC,YAAY,aAAa,CAAC,IAAI,aAAa,GAAG,EAAE,CAAC,CAAC;QACxD,IAAI,CAAC,CAAC,CAAC,CAAC;IACV,CAAC;AACH,CAAC"}
@@ -0,0 +1,467 @@
1
+ /**
2
+ * Pure, React-free slash-command layer shared by BOTH interactive surfaces (GS2-8): the Ink
3
+ * TUI (`packages/app/src/tui/`, which re-exports this module) and the readline `--no-tui`
4
+ * session (`interactiveSessionModule.ts` in this package). One registry, one source of truth —
5
+ * a command added here appears in `/help` on both surfaces automatically.
6
+ *
7
+ * Mirrors how the TUI's `viewModel.ts` keeps its fold logic out of the components: the registry
8
+ * and the parse/dispatch helpers here are unit-testable in isolation, and each surface is the
9
+ * only place that turns the resulting {@link SlashCommandResult} into its own state / side
10
+ * effects (the TUI's `<App>` clears the transcript / pushes notices / quits; the readline loop
11
+ * prints notices and degrades TUI-only effects with a clear "needs the TUI" message).
12
+ *
13
+ * The registry is a plain array so later layers (e.g. extension-registered commands, EXT-5)
14
+ * can append more entries via {@link createCommandRegistry} without this module changing.
15
+ */
16
+ import type { ApprovalRung, McpAnnotationTrustChange, McpAnnotationTrustView, ResolvedApprovals, ToolAnnotationHint } from '@gaunt-sloth/core/config.js';
17
+ import type { ApprovalGrant } from '@gaunt-sloth/core/core/approvals/grants.js';
18
+ /** Read-only session context a command may surface (e.g. `/status`, `/model`). */
19
+ export interface SlashCommandContext {
20
+ mode: string;
21
+ modelDisplayName: string;
22
+ /** Count of committed turns so far (for `/help`-style introspection if needed). */
23
+ turnCount: number;
24
+ /** Whether tool-call panels currently show their full args/result (drives `/verbose` copy). */
25
+ toolsExpanded: boolean;
26
+ /** Whether the docked debug panel is currently shown (drives `/debug` copy). */
27
+ debugVisible: boolean;
28
+ /**
29
+ * TUI-C37 — whether terminal mouse reporting is currently on (drives `/mouse` copy). Undefined on
30
+ * surfaces that have no mouse layer at all, where `/mouse` reports itself unavailable rather than
31
+ * claiming a state it cannot change.
32
+ */
33
+ mouseEnabled?: boolean;
34
+ /**
35
+ * Pre-rendered, secret-free summary lines of the resolved config, surfaced read-only by
36
+ * `/config` (GS2-1). The App builds these once from the resolved config (see
37
+ * {@link formatConfigSummary}); omitted where no config is loaded (e.g. the fixture agent).
38
+ */
39
+ configSummary?: string[];
40
+ /**
41
+ * TUI-C19 — the actual config-validation warnings (unknown keys / deprecated names) captured at
42
+ * load, so `/config` can render the DETAILS the standing "config has problems" advisory line
43
+ * points at. Empty/omitted ⇒ `/config` shows only the resolved summary (a clean config).
44
+ */
45
+ configWarnings?: string[];
46
+ /**
47
+ * GS2-7 (B20) / GS2-19 — pre-rendered recent-conversation lines for `/history`. The App builds
48
+ * these fail-soft from the local history store (see `formatConversationList`); omitted when no
49
+ * store is available (history never enabled / DB missing), in which case `/history` shows an
50
+ * "unavailable" notice.
51
+ */
52
+ historySummary?: string[];
53
+ /**
54
+ * GS2-7 (B20) — pre-rendered analytics lines for `/insights` (see `formatInsightsSummary`),
55
+ * built fail-soft by the App; omitted when no store is available.
56
+ */
57
+ insightsSummary?: string[];
58
+ /**
59
+ * GS2-7 (B20) — a fail-soft search provider for `/search <query>`, bound by the App to the local
60
+ * history store (returns already-formatted result lines). Injected (rather than the command
61
+ * touching the DB) so the registry stays pure and testable with a stub. Omitted when no store is
62
+ * available, in which case `/search` reports that history is unavailable.
63
+ */
64
+ historySearch?: (query: string) => string[];
65
+ /**
66
+ * TUI-C18 — the reasoning text of each committed assistant turn, in transcript order (index 0 =
67
+ * turn 1). `''` for a turn that produced no thinking layer. Drives `/reasoning`, which reprints a
68
+ * committed turn's thinking (frozen in `<Static>`, so it can never re-expand in place). The App
69
+ * builds this from the transcript; omitted (empty) where there are no committed turns yet.
70
+ */
71
+ turnReasonings?: string[];
72
+ /**
73
+ * GS2-46 — the live transcript (all committed turns, tool calls + results) and the resolved
74
+ * config, for `/debug-dump`. Kept opaque (`unknown`) so this pure module stays decoupled from
75
+ * the TUI's `TranscriptItem` type and `GthConfig` — forwarded as-is into the injected
76
+ * `dumpDebugSession` writer (see {@link DebugDumpInput}). Omitted where no session state is
77
+ * available (e.g. the fixture agent), in which case `/debug-dump` reports itself unavailable.
78
+ */
79
+ transcript?: unknown[];
80
+ /** GS2-46 — see {@link SlashCommandContext.transcript}. */
81
+ resolvedConfig?: unknown;
82
+ /**
83
+ * GS2-46 — fs-writing implementation for `/debug-dump`: writes an UNSANITIZED archive
84
+ * (transcript, resolved config, env/version info, the in-memory debugLog ring buffer, and
85
+ * best-effort git repo state) to `~/.gsloth/debug-dumps/<timestamp>/` and returns its path.
86
+ * Injected by the App the same way `historySearch` is (GS2-7), so this module stays pure and
87
+ * testable with a fake — the real writer (`packages/core/src/utils/debugDump.ts`) does the
88
+ * actual I/O. Omitted ⇒ `/debug-dump` reports itself unavailable (fixture / no session state).
89
+ */
90
+ dumpDebugSession?: (input: DebugDumpInput) => {
91
+ archiveDir: string;
92
+ };
93
+ }
94
+ /**
95
+ * GS2-46 — the input `/debug-dump` assembles from context and hands to the injected
96
+ * `dumpDebugSession` writer. `transcript`/`config` are opaque to this pure module (the real
97
+ * writer, not this file, interprets them); `modelDisplayName` mirrors the field already on
98
+ * {@link SlashCommandContext}.
99
+ */
100
+ export interface DebugDumpInput {
101
+ transcript: unknown[];
102
+ config: unknown;
103
+ modelDisplayName: string;
104
+ /**
105
+ * GS2-47 — whether the writer should redact secrets from every artifact. Resolved by
106
+ * {@link resolveDebugDumpRedact} from the config (`debugDump.redact`, default ON) and the
107
+ * `--unsafe-no-redact` command flag, then threaded straight through to `writeDebugDump`.
108
+ */
109
+ redact: boolean;
110
+ }
111
+ /**
112
+ * The subset of the resolved config `/config` surfaces. Structurally typed (not the full
113
+ * `GthConfig`) so this pure module stays decoupled from the config types; the caller passes the
114
+ * real resolved config, which is a superset.
115
+ */
116
+ export interface ConfigSummaryInput {
117
+ modelDisplayName?: string;
118
+ agent?: {
119
+ backend?: string;
120
+ };
121
+ filesystem?: unknown;
122
+ streamOutput?: boolean;
123
+ useColour?: boolean;
124
+ consoleLevel?: unknown;
125
+ commands?: Record<string, unknown>;
126
+ }
127
+ /**
128
+ * Build the compact, read-only `/config` summary (GS2-1): a handful of the most orienting
129
+ * resolved-config fields, one per line, with a pointer to `gth config print` for the full view.
130
+ * Pure and secret-free — it only reads non-sensitive scalar fields (never API keys / the live
131
+ * llm instance). Used by the App to fill {@link SlashCommandContext.configSummary}.
132
+ *
133
+ * CFG-25 — `filesystem` is a precedence-picked per-command field (GS2-60), so the panel prints the
134
+ * EFFECTIVE value for the running `command`, read from `config.commands[command].filesystem` —
135
+ * where the GS2-60 resolution already baked the correct 4-layer precedence — falling back to the
136
+ * top-level value, exactly the read `getEffectiveConfig` performs (no precedence re-derived here).
137
+ * When the effective and top-level values differ, both are shown
138
+ * (`Filesystem: all (code; top-level: none)`) so the top-level default can never understate what
139
+ * the session can actually do. Of the other precedence-picked fields
140
+ * (`builtInTools`/`allowedTools`/`binaryFormats`), none are printed by this panel, so none can
141
+ * misreport the same way.
142
+ */
143
+ export declare function formatConfigSummary(config: ConfigSummaryInput, command?: string): string[];
144
+ /**
145
+ * The `/config` notice, from the pre-rendered summary lines (or an unavailable fallback).
146
+ *
147
+ * TUI-C19 — when config-validation `warnings` are present (unknown keys / deprecated names), they
148
+ * are rendered FIRST, as the details the standing "config has problems" advisory line points at,
149
+ * then a blank spacer, then the resolved summary. A clean config (no warnings) reads exactly as
150
+ * before. Tone flips to `warn` (yellow) while there are warnings so the block reads as caution.
151
+ */
152
+ export declare function configNotice(summary: string[] | undefined, warnings?: string[]): SlashCommandNotice;
153
+ /** The `/history` notice (GS2-7): recent recorded sessions, or an "unavailable" fallback. */
154
+ export declare function historyNotice(summary: string[] | undefined): SlashCommandNotice;
155
+ /** The `/insights` notice (GS2-7): local analytics summary, or an "unavailable" fallback. */
156
+ export declare function insightsNotice(summary: string[] | undefined): SlashCommandNotice;
157
+ /**
158
+ * The `/search` notice (GS2-7). With no query it prints usage; otherwise it runs the injected
159
+ * fail-soft {@link SlashCommandContext.historySearch} provider and renders its result lines. When
160
+ * no provider is bound (no store), it reports history as unavailable.
161
+ */
162
+ export declare function searchNotice(args: string[], search: ((query: string) => string[]) | undefined): SlashCommandNotice;
163
+ /**
164
+ * A structured, noticeable command-feedback block (TUI-C14): a title that states WHAT happened
165
+ * plus body lines explaining HOW it affects the user. The component renders these via
166
+ * `<CommandNotice>` so every command gives consistent, explanatory feedback.
167
+ */
168
+ export interface SlashCommandNotice {
169
+ title: string;
170
+ lines: string[];
171
+ /** Title tone; defaults to 'info' (cyan). Use 'warn' (yellow) for unknown commands. */
172
+ tone?: 'info' | 'warn';
173
+ }
174
+ /**
175
+ * The effects a dispatched command can request. The component interprets these; the command
176
+ * itself stays pure (no React, no I/O) so it is trivially testable.
177
+ */
178
+ export interface SlashCommandResult {
179
+ /**
180
+ * A structured notice to commit into the transcript (the command's user-visible feedback).
181
+ * Preferred over `message` for all commands so feedback is consistent and noticeable (TUI-C14).
182
+ */
183
+ notice?: SlashCommandNotice;
184
+ /** A terse system line (incidental/error output); commands prefer `notice`. */
185
+ message?: string;
186
+ /** Level for the system line; defaults to 'info'. */
187
+ level?: string;
188
+ /** When true, the component clears the transcript. */
189
+ clearTranscript?: boolean;
190
+ /** When true, the component toggles the docked debug panel (subagents + debug views). */
191
+ toggleDebug?: boolean;
192
+ /** When true, the component toggles tool-call panels between collapsed and expanded. */
193
+ toggleTools?: boolean;
194
+ /**
195
+ * TUI-C37 — the state `/mouse` asks the surface to move terminal mouse reporting to. The command
196
+ * stays pure (it cannot write escape sequences), so the App applies it and owns the actual
197
+ * enable/disable, the same division `/approvals` uses for the runner's posture.
198
+ */
199
+ setMouse?: boolean;
200
+ /**
201
+ * CFG-27 — a requested action from `/approvals`. `{ show: true }` asks the surface to DISPLAY
202
+ * the current posture; `{ rung }` asks it to switch the session to that rung. The command itself
203
+ * stays pure — it cannot read the runner's posture — so the surface owns the apply + the
204
+ * resulting-state notice (mirroring how `/verbose` / `/debug` defer their state-aware copy to
205
+ * the App).
206
+ *
207
+ * There is deliberately NO `toggle` action: with five ordered rungs a flip has no honest
208
+ * meaning, which is also why `/auto-approve` and `/bypass-approve` were retired with the
209
+ * three-mode vocabulary that gave them their names.
210
+ *
211
+ * EXT-70 adds `{ trust }` — start or stop believing specific annotation hints from one MCP
212
+ * server (§4.7.1). It takes the same route for the same reason: the command cannot read or write
213
+ * the runner's posture, so it states the request and the surface applies it and reports what
214
+ * landed.
215
+ */
216
+ approvals?: {
217
+ show: true;
218
+ } | {
219
+ rung: ApprovalRung;
220
+ } | {
221
+ trust: McpTrustRequest;
222
+ };
223
+ /**
224
+ * TUI-C18 — a committed turn's thinking to REPRINT into the transcript (the `/reasoning` command).
225
+ * Committed reasoning is frozen in Ink's `<Static>` and can never re-expand in place, so instead of
226
+ * mutating the old turn we emit a fresh block that reuses the TUI-C15 `💭`/gutter styling. The App
227
+ * turns this into a `reasoning` transcript item; the command stays pure (it resolves the target from
228
+ * `turnReasonings`). Absent when the command instead returns a friendly `notice` (no reasoning /
229
+ * out-of-range).
230
+ */
231
+ reprintReasoning?: {
232
+ reasoning: string;
233
+ turnNumber: number;
234
+ };
235
+ /** When true, the component quits the app (runs `onExit`). */
236
+ exit?: boolean;
237
+ }
238
+ /** A single registered slash command. `run` is pure: context in, result out. */
239
+ export interface SlashCommand {
240
+ /** The name without the leading slash, e.g. `help`. Matched case-insensitively. */
241
+ name: string;
242
+ /** One-line description shown by `/help`. */
243
+ description: string;
244
+ /**
245
+ * EXT-12 — whether this command may be dispatched WHILE a turn is streaming ("during
246
+ * inference"). Defaults to false: most commands are idle-only. The read-only / session-toggle
247
+ * commands (e.g. `/approvals`, `/verbose`, `/debug`, `/help`, `/model`) set this so the user
248
+ * can change the approval mode or inspect state mid-turn without interrupting the run. Commands that
249
+ * mutate the transcript or thread (`/clear`) or end the session (`/exit`) stay idle-only.
250
+ */
251
+ availableDuringRun?: boolean;
252
+ run(ctx: SlashCommandContext, args: string[]): SlashCommandResult;
253
+ }
254
+ /** Parsed shape of a `/...` line. `null` for plain (non-slash) input. */
255
+ export interface ParsedSlashCommand {
256
+ name: string;
257
+ args: string[];
258
+ }
259
+ /**
260
+ * Parse a raw input line into a slash command, or `null` if it is not one. A line is a slash
261
+ * command iff its first non-whitespace character is `/` AND no further `/` appears after the
262
+ * leading one (GS2-8, Mari's dogfood addendum): a pasted filesystem path like
263
+ * `/usr/home/bob/test.md` contains later slashes, so it falls through as ordinary prompt text
264
+ * instead of being swallowed as an unknown command. The name is lower-cased; remaining
265
+ * whitespace-separated tokens are the args.
266
+ */
267
+ export declare function parseSlashCommand(input: string): ParsedSlashCommand | null;
268
+ /**
269
+ * TUI-C10 — the discovery-menu trigger test. The Ink `<PromptInput>` shows the slash-command menu
270
+ * while the user is typing a bare command: the raw input is a menu query iff its first character is
271
+ * `/` and it contains no whitespace yet (once a space is typed the user is entering args, so the
272
+ * menu closes and normal dispatch takes over). Returns the lower-cased query AFTER the slash (so a
273
+ * bare `/` yields `''` = "show everything"), or `null` when the input is not a menu trigger.
274
+ *
275
+ * Kept pure and next to the registry (like {@link parseSlashCommand}) so the menu's show/hide and
276
+ * filter logic is unit-testable without React.
277
+ *
278
+ * GS2-8 — mirrors {@link parseSlashCommand}'s `/`-vs-path heuristic: input with a later `/`
279
+ * (a pasted path like `/usr/bin`) is not a command, so it never triggers the menu either.
280
+ */
281
+ export declare function slashMenuQuery(input: string): string | null;
282
+ /**
283
+ * TUI-C10 — filter the registry down to the commands that match a menu query, most-relevant first.
284
+ * Prefix matches (the name starts with the query) rank above looser substring matches; within each
285
+ * bucket the registry's own order is preserved (so extension-registered commands — appended to the
286
+ * array — naturally sort after the built-ins). An empty query returns the whole registry, so a bare
287
+ * `/` lists every command including any the extensions added (never a hardcoded list).
288
+ *
289
+ * Pure: takes the registry the caller already built via {@link createCommandRegistry}, so the menu
290
+ * automatically reflects extension commands without this layer knowing they exist.
291
+ */
292
+ export declare function filterSlashCommands(registry: SlashCommand[], query: string): SlashCommand[];
293
+ /**
294
+ * The notice for the tool-detail toggle, given the RESULTING (post-toggle) state. Shared by the
295
+ * `/verbose` command (GS2-8 rename of `/tools`) and the Ctrl+T key handler so the copy
296
+ * is single-sourced (TUI-C14).
297
+ */
298
+ export declare function toolsToggleNotice(expanded: boolean): SlashCommandNotice;
299
+ /**
300
+ * The notice for the debug-panel toggle, given the RESULTING (post-toggle) state. Shared so the
301
+ * command reports exactly the state the component will apply.
302
+ */
303
+ export declare function debugToggleNotice(visible: boolean): SlashCommandNotice;
304
+ /**
305
+ * CFG-27 — the notice for a landed approvals RUNG, given the RESULTING (post-apply) posture.
306
+ * Shared so every surface reports exactly the state that was applied, and so the copy can never
307
+ * drift from what the gate actually does.
308
+ *
309
+ * The body of each notice is §10's description, **verbatim** — the one place the ladder is
310
+ * explained to the user, so it must not be paraphrased per surface. §10 rule 4 also fixes the
311
+ * label: the display spelling with spaces, never the kebab-case identifier.
312
+ *
313
+ * `bypass` is the only warn-toned one: it is the single rung with no gate at all. Note what is
314
+ * NOT here — the hardline floor. §8.1 forbids advertising it: descriptions name only protections
315
+ * the user can inspect and extend, which is the deny list.
316
+ */
317
+ /**
318
+ * TUI-C37 — feedback for `/mouse`, describing the state the session has LANDED on.
319
+ *
320
+ * The selection hint is repeated on every "on" notice rather than shown once at launch, because the
321
+ * moment a user reaches for `/mouse` is exactly the moment they are trying to copy something and
322
+ * finding that dragging no longer selects. Telling them there and then is the difference between a
323
+ * fixed problem and a filed bug.
324
+ */
325
+ export declare function mouseToggleNotice(enabled: boolean): SlashCommandNotice;
326
+ /** TUI-C37 — `/mouse` on a surface with no mouse layer (the plain readline session, the fixture). */
327
+ export declare function mouseUnavailableNotice(): SlashCommandNotice;
328
+ /**
329
+ * TUI-C37 — parse `/mouse [on|off]`. No argument means "toggle", which is what a bare command name
330
+ * usually means; `null` marks an argument that is neither, so the caller can say so rather than
331
+ * guess. `resolve` needs the current state only for the toggle case.
332
+ */
333
+ export declare function parseMouseArg(args: string[], current: boolean): boolean | null;
334
+ export declare function approvalsRungNotice(approvals: ResolvedApprovals): SlashCommandNotice;
335
+ /**
336
+ * CFG-27 — the `/approvals` DISPLAY: the rung and its description, the rater profile at the two
337
+ * rated rungs, and the allow/deny list sizes. Pure: the surface reads the live posture from the
338
+ * runner and hands it in.
339
+ *
340
+ * `always: undefined` means the persisted store has not been loaded, and is rendered `—` rather
341
+ * than a misleading `0` — a display must not create the store in order to count it.
342
+ */
343
+ export declare function approvalsStatusNotice(approvals: ResolvedApprovals, allowlist: {
344
+ session: number;
345
+ always: number | undefined;
346
+ }, deny?: readonly string[], grants?: readonly ApprovalGrant[], trust?: McpAnnotationTrustView): SlashCommandNotice;
347
+ /** EXT-70 §4.7.1 — a request to start or stop believing specific hints from one server. */
348
+ export interface McpTrustRequest {
349
+ /** §4.7.5 — the user's own `mcpServers` config key, case-sensitive. */
350
+ server: string;
351
+ /** The hints this request moves, in canonical spelling. Never empty. */
352
+ hints: ToolAnnotationHint[];
353
+ /** `true` to believe them, `false` to stop. */
354
+ believe: boolean;
355
+ }
356
+ /** Something wrong with a `/approvals trust` invocation that the command explains rather than guesses at. */
357
+ export type ApprovalsUsageProblem = {
358
+ kind: 'trust-missing-server';
359
+ believe: boolean;
360
+ } | {
361
+ kind: 'trust-missing-hints';
362
+ believe: boolean;
363
+ server: string;
364
+ } | {
365
+ kind: 'unknown-hint';
366
+ believe: boolean;
367
+ token: string;
368
+ };
369
+ /** What `/approvals` resolved to, or `null` when the first argument names nothing it knows. */
370
+ export type ApprovalsAction = {
371
+ show: true;
372
+ } | {
373
+ rung: ApprovalRung;
374
+ } | {
375
+ trust: McpTrustRequest;
376
+ } | {
377
+ usage: ApprovalsUsageProblem;
378
+ };
379
+ /**
380
+ * CFG-27/EXT-70 — parse the `/approvals` argument: no arg SHOWS the current posture; any of the
381
+ * five kebab-case rung names switches to it; `trust` / `untrust` move which of a server's
382
+ * annotation hints are believed (§4.7.1). Returns `null` for an unrecognized first argument so the
383
+ * command renders a usage hint instead of guessing.
384
+ *
385
+ * The retired `auto` / `ask` spellings are NOT accepted as aliases — this is still alpha, and a
386
+ * silent alias would leave the user believing in a vocabulary the gate no longer has.
387
+ *
388
+ * **Only the subcommand token is lower-cased.** A server key is the user's own `mcpServers` key
389
+ * (§4.7.5) and is case-sensitive, so folding it would name a different server — one that believes
390
+ * nothing, silently, while the notice reported success. A hint is matched case-insensitively
391
+ * against the fixed vocabulary and echoed back in its **canonical** spelling, so `readonlyhint`
392
+ * resolves rather than vanishing, and what lands in the policy is the name the derivation reads.
393
+ */
394
+ export declare function parseApprovalsArg(args: string[]): ApprovalsAction | null;
395
+ /**
396
+ * EXT-70 §4.7.1 — usage copy for a `/approvals trust` invocation that named no server, no hint, or
397
+ * a hint that is not one of the four. Each says what is missing and shows the vocabulary, because
398
+ * the hint names are camelCase MCP identifiers nobody guesses.
399
+ */
400
+ export declare function approvalsTrustUsageNotice(problem: ApprovalsUsageProblem): SlashCommandNotice;
401
+ /**
402
+ * EXT-70 §4.7.1/§4.7.4 — the notice for a landed `/approvals trust` or `/approvals untrust`, built
403
+ * from what the runner RETURNS rather than from what was asked for, so the copy can only describe
404
+ * the trust actually in force.
405
+ *
406
+ * **The withdrawal half states the consequence where the withdrawal happens.** Ceasing to believe a
407
+ * hint pushes it back to the MCP fail-closed default, and for `readOnlyHint`, `openWorldHint` and
408
+ * `destructiveHint` that is a *weakening* — so §4.7.4 will withdraw that server's saved approvals at
409
+ * the next call, with its own notice. That is the correct direction and is not suppressed; what
410
+ * would be wrong is for the user to meet it as a surprise three turns later. `idempotentHint` is the
411
+ * one hint no weakening move names, so withdrawing it invalidates nothing and the line is absent —
412
+ * which is why the line is driven by the runner's `weakening` list rather than by "was anything
413
+ * withdrawn".
414
+ */
415
+ export declare function approvalsTrustNotice(change: McpAnnotationTrustChange): SlashCommandNotice;
416
+ /**
417
+ * TUI-C18 — resolve a `/reasoning` invocation against the committed turns' reasoning (in transcript
418
+ * order, index 0 = turn 1). Pure, so the whole selection + friendly-notice logic is unit-testable
419
+ * without React:
420
+ *
421
+ * - **no arg** → the most recent turn that actually recorded thinking; if none exists, a friendly
422
+ * info notice (nothing to show).
423
+ * - **`<n>`** → turn `n` (1-based). A non-positive / non-integer / out-of-range `n` → a warn notice;
424
+ * a valid turn that recorded no thinking → an info notice. Otherwise a `reprintReasoning` request.
425
+ *
426
+ * The App renders a `reprintReasoning` result as a fresh reasoning block (reusing the TUI-C15
427
+ * styling) and a `notice` result via the shared `CommandNotice`.
428
+ */
429
+ export declare function resolveReasoning(reasonings: string[], args: string[]): SlashCommandResult;
430
+ /**
431
+ * GS2-47 — resolve whether the `/debug-dump` archive should be redacted. ON by default; opt out via
432
+ * the config (`debugDump.redact: false`) OR the `--unsafe-no-redact` command flag. Any uncertainty
433
+ * (no/non-object config) defaults to redacting — fail safe. `resolvedConfig` is opaque here, so this
434
+ * reads the flag structurally without depending on the `GthConfig` type.
435
+ */
436
+ export declare function resolveDebugDumpRedact(resolvedConfig: unknown, args: string[]): boolean;
437
+ /**
438
+ * The `/debug-dump` success notice (a standard 3-line CommandNotice — DL-1: no command reads as
439
+ * "does nothing"). GS2-47 flips the default to REDACTED: when redaction ran (the default) the note
440
+ * is softened ("secrets redacted; review before sharing") and points at the opt-out. When the user
441
+ * opted OUT (raw archive) it is the loud, impossible-to-miss UNSANITIZED warning. Colour follows
442
+ * DL-8 / the tone rule in maintenance/ux-guidelines.md: the safe, redacted default is normal
443
+ * feedback (no `tone` ⇒ info), while the raw opt-out is caution and so `tone: 'warn'` (yellow) —
444
+ * mirroring how `approvalsModeNotice` reserves yellow for the dangerous (gate-off) state. Redaction is
445
+ * best-effort pattern-based, so even the softened note still says review-before-sharing.
446
+ */
447
+ export declare function debugDumpNotice(archiveDir: string, redacted: boolean): SlashCommandNotice;
448
+ /**
449
+ * Build the default command registry. Returns a fresh array each call so callers may push
450
+ * extension commands onto it (EXT-5) without sharing mutable module state.
451
+ */
452
+ export declare function createCommandRegistry(): SlashCommand[];
453
+ /** Build the `/help` notice from a registry: one body line per command (`/name — description`). */
454
+ export declare function formatHelp(registry: SlashCommand[]): SlashCommandNotice;
455
+ /**
456
+ * Dispatch a parsed command against a registry. Unknown commands return a friendly hint
457
+ * rather than throwing, so the component can render it as a system line and never forward
458
+ * the text to the model.
459
+ *
460
+ * EXT-12 — when `options.duringRun` is set (a turn is streaming), commands that are not marked
461
+ * {@link SlashCommand.availableDuringRun} are refused with a friendly notice rather than run,
462
+ * so mid-turn input can only reach the safe, non-mutating commands (`/approvals`, `/verbose`,
463
+ * `/debug`, …). `/help` is always allowed.
464
+ */
465
+ export declare function dispatchSlashCommand(parsed: ParsedSlashCommand, registry: SlashCommand[], ctx: SlashCommandContext, options?: {
466
+ duringRun?: boolean;
467
+ }): SlashCommandResult;