@gaunt-sloth/agent 2.0.0-alpha.24 → 2.0.0-alpha.26

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.
@@ -1,16 +1,18 @@
1
1
  import { initConfig } from '@gaunt-sloth/core/config.js';
2
- import { defaultStatusCallback, display, displayInfo, displayWarning, flushSessionLog, formatInputPrompt, initSessionLogging, stopSessionLogging, } from '@gaunt-sloth/core/utils/consoleUtils.js';
2
+ import { defaultStatusCallback, display, displayInfo, displayLaunchBanner, displayWarning, flushSessionLog, formatInputPrompt, initSessionLogging, stopSessionLogging, } from '@gaunt-sloth/core/utils/consoleUtils.js';
3
3
  import { GthAgentRunner } from '@gaunt-sloth/core/core/GthAgentRunner.js';
4
4
  import { GthAbstractAgent } from '@gaunt-sloth/core/core/GthAbstractAgent.js';
5
+ import { launchBannerFields, launchBannerText } from '@gaunt-sloth/core/core/launchBanner.js';
6
+ import { buildRejectionMessage } from '@gaunt-sloth/core/core/shell/rejection.js';
5
7
  import { writeDebugDump } from '@gaunt-sloth/core/utils/debugDump.js';
6
8
  import { appendToFile, getCommandOutputFilePath } from '@gaunt-sloth/core/utils/fileUtils.js';
7
9
  import { openConversationSafe, recordSessionSafe, } from '@gaunt-sloth/core/history/recordSession.js';
8
- import { createInterface, error, exit, getProjectDir, refStdin, setRawMode, stdin as input, stdout as output, } from '@gaunt-sloth/core/utils/systemUtils.js';
10
+ import { createInterface, error, exit, getProjectDir, getUseColour, refStdin, setRawMode, stdin as input, stdout as output, } from '@gaunt-sloth/core/utils/systemUtils.js';
9
11
  import { HumanMessage } from '@langchain/core/messages';
10
12
  import { MemorySaver } from '@langchain/langgraph';
11
13
  import { createResolvers } from '#src/resolvers.js';
12
14
  import { resolveAgentFactory } from '#src/core/resolveAgentFactory.js';
13
- import { createCommandRegistry, dispatchSlashCommand, formatConfigSummary, parseSlashCommand, } from '#src/modules/slashCommands.js';
15
+ import { approvalsRungNotice, approvalsStatusNotice, approvalsTrustNotice, createCommandRegistry, dispatchSlashCommand, formatConfigSummary, parseSlashCommand, } from '#src/modules/slashCommands.js';
14
16
  export async function createInteractiveSession(sessionConfig, commandLineConfigOverrides, message) {
15
17
  const config = { ...(await initConfig(commandLineConfigOverrides)) };
16
18
  const checkpointSaver = new MemorySaver();
@@ -84,10 +86,28 @@ export async function createInteractiveSession(sessionConfig, commandLineConfigO
84
86
  : JSON.stringify(pending.args);
85
87
  displayWarning(`\nThe agent wants to run a shell command via ${pending.name}:`);
86
88
  display(`\n ${commandText}\n`);
87
- // EXT-10: if the LLM-as-judge gate escalated (rather than auto-approving) this command, show
88
- // its flag + reason before the human decides.
89
+ // CFG-27: when the auto-rater escalated this command (rather than approving it), show its
90
+ // outcome + reason before the human decides. §6 makes that explanation mandatory whenever a
91
+ // rating exists; at the unrated rungs there is none and the prompt shows the command alone.
89
92
  if (pending.safetyVerdict) {
90
- displayWarning(`⚠ safety judge (${pending.safetyVerdict.risk}): ${pending.safetyVerdict.reason}`);
93
+ displayWarning(`⚠ Auto-rater (${pending.safetyVerdict.outcome}): ${pending.safetyVerdict.reason}`);
94
+ }
95
+ // EXT-71 §3.2 — when a declared `approvals.escalate` entry is what brought this call here,
96
+ // the prompt shows THE ENTRY THAT FIRED. Without it the user is asked about a command their
97
+ // rung would have approved, with nothing on screen tying the question to the line they wrote
98
+ // — which reads as the gate malfunctioning rather than as their own rule working.
99
+ if (pending.escalatedBy) {
100
+ displayWarning(`⚠ Your approvals.escalate list matched this call: ${pending.escalatedBy}`);
101
+ }
102
+ // EXT-71/EXT-70 §6 — the menu MUST show what a sticky choice will store, at the moment of
103
+ // the choice, and it names it in the words the control is written in: the command itself for
104
+ // a shell call, the tool (with its server and host bound) for a tool call, since for a tool
105
+ // "the stored thing is the tool, not the arguments" (§4.7.4). The exact entry follows it, so
106
+ // the user sees the thing they are agreeing to rather than a generalization of it.
107
+ const sticky = pending.grantPreview !== undefined;
108
+ if (sticky) {
109
+ displayInfo(`[s]/[a] will remember ${pending.grantSummary ?? pending.grantPreview}`);
110
+ displayInfo(` stored as ${pending.grantPreview}`);
91
111
  }
92
112
  setRawMode(false); // ensure typed input is echoed for this confirm
93
113
  // EXT-18: wrap the prompt in try/finally so the raw-mode/ref state is not left wedged if
@@ -96,7 +116,15 @@ export async function createInteractiveSession(sessionConfig, commandLineConfigO
96
116
  // suspended on the tool interrupt, whose stream-end unref'd stdin).
97
117
  let answer;
98
118
  try {
99
- answer = (await askLine(formatInputPrompt('Approve? [o]nce / [s]ession / [a]lways / [N]o: ')))
119
+ // §6 a sticky control is SHOWN only where a sticky grant is actually on offer. Where
120
+ // nothing would be remembered — a `catastrophic` outcome (§4.2), a command that does not
121
+ // statically resolve, a tool call nothing can attribute — the menu simply does not offer
122
+ // the choice, because "a control that is offered and then refused reads as a bug rather
123
+ // than as a policy". Hiding it, never disabling it: a disabled control invites the user to
124
+ // hunt for why.
125
+ answer = (await askLine(formatInputPrompt(sticky
126
+ ? 'Approve? [o]nce / [s]ession / [a]lways / [N]o: '
127
+ : 'Approve? [o]nce / [N]o: ')))
100
128
  .trim()
101
129
  .toLowerCase();
102
130
  }
@@ -106,16 +134,47 @@ export async function createInteractiveSession(sessionConfig, commandLineConfigO
106
134
  if (answer === 'o' || answer === 'once') {
107
135
  return { type: 'approve', scope: 'once' };
108
136
  }
137
+ // CFG-28 (§4.2) — a `catastrophic` approval is NEVER sticky. The runner clamps the
138
+ // allow-list write, so `[s]` and `[a]` grant exactly this one invocation and the next
139
+ // variant prompts again. The decision is still returned unchanged: that clamp is the single
140
+ // chokepoint, in core, so the policy does not depend on which surface asked. What must change
141
+ // HERE is only the confirmation — §6 rejects "a control that is offered and then refused",
142
+ // and a confirmation that promises a persistence the gate has already discarded is that same
143
+ // failure with the evidence hidden. Withdrawing the key itself is [[TUI-C26]]'s.
144
+ // The confirmation must name what actually happened, and the condition for that is the SAME
145
+ // one that decides whether the control was shown: no grant on offer means no grant written,
146
+ // whatever key was typed. `catastrophic` keeps its own wording because the reason matters to
147
+ // the reader, but it is one case of the general one rather than the only one — the other
148
+ // cases (a command that does not statically resolve, an unattributable tool call) used to be
149
+ // confirmed as remembered while the runner stored nothing.
150
+ const notRemembered = pending.safetyVerdict?.outcome === 'catastrophic'
151
+ ? 'Approved this once — a command rated catastrophic is never remembered, so the next ' +
152
+ 'one like it will ask again.'
153
+ : 'Approved this once — there is nothing about this call that can be remembered, so the ' +
154
+ 'next one like it will ask again.';
109
155
  if (answer === 's' || answer === 'session') {
110
- displayInfo('Approved for this session, future variants will not re-prompt.');
156
+ displayInfo(sticky ? 'Approved this exact command will not ask again this session.' : notRemembered);
111
157
  return { type: 'approve', scope: 'session' };
112
158
  }
113
159
  if (answer === 'a' || answer === 'always') {
114
- displayInfo('Approved and remembered, saved to the project allow-list.');
160
+ displayInfo(sticky
161
+ ? 'Approved and remembered — this exact command is saved to the project allow-list.'
162
+ : notRemembered);
115
163
  return { type: 'approve', scope: 'always' };
116
164
  }
117
165
  displayInfo('Command rejected.');
118
- return { type: 'reject', message: 'User rejected the shell command.' };
166
+ // EXT-58 (§7): the model is told the moves it has — re-call with a justification, call a
167
+ // different command, or ask the user — and, when the rater named an already-granted
168
+ // alternative (§4.4), that tool plus the clause saying it needs no approval. A bare "user
169
+ // rejected" leaves the model to guess, which it does by repeating itself or giving up.
170
+ return {
171
+ type: 'reject',
172
+ message: buildRejectionMessage({
173
+ source: 'user',
174
+ toolName: pending.name,
175
+ verdict: pending.safetyVerdict,
176
+ }),
177
+ };
119
178
  });
120
179
  if (logFileName) {
121
180
  displayInfo(`${sessionConfig.mode} session will be logged to ${logFileName}\n`);
@@ -205,7 +264,9 @@ export async function createInteractiveSession(sessionConfig, commandLineConfigO
205
264
  // below rather than vanishing from the catalog.
206
265
  toolsExpanded: false,
207
266
  debugVisible: false,
208
- configSummary: formatConfigSummary(config),
267
+ // CFG-25 — pass the session command so the panel prints the EFFECTIVE per-command
268
+ // filesystem value (e.g. `all` for `code`), not the top-level default.
269
+ configSummary: formatConfigSummary(config, sessionConfig.mode),
209
270
  // GS2-56 — `/debug-dump` is now available here. This surface keeps no on-screen
210
271
  // transcript array, so `transcript` is empty; the real as-sent history lands in the
211
272
  // archive's model-messages.json from the always-on snapshot (that is the point).
@@ -217,21 +278,25 @@ export async function createInteractiveSession(sessionConfig, commandLineConfigO
217
278
  await endSession();
218
279
  break;
219
280
  }
220
- if (result.autoApprove) {
221
- // EXT-12 — `/auto-approve` (with the `/yolo` alias) sets session-wide shell
222
- // auto-approval at the approval-decision layer (the runner flag). Session-scoped,
223
- // reversible, never persisted; the hardline floor still blocks catastrophic commands.
224
- // The runner seeds this from the static `shellYolo` config, so `/auto-approve off`
225
- // also turns off a config-enabled auto-approval.
226
- const enabled = result.autoApprove === 'toggle'
227
- ? runner.toggleSessionYolo()
228
- : runner.setSessionYolo(result.autoApprove === 'on');
229
- if (enabled) {
230
- displayWarning('Auto-approve ON shell commands run this session without the per-command prompt. ' +
231
- 'The hardline safety floor still blocks catastrophic commands. Run /auto-approve off to require approvals.');
281
+ if (result.approvals) {
282
+ // CFG-27 — `/approvals <rung>` sets the session rung at the approval-decision layer
283
+ // (the runner posture). Session-scoped, reversible, never persisted. With no argument
284
+ // the command DISPLAYS the posture instead of changing it.
285
+ if ('show' in result.approvals) {
286
+ printNotice(approvalsStatusNotice(runner.getSessionApprovals(), runner.getAllowlistCounts(), runner.getDenylist(), runner.getGrants(), runner.getMcpAnnotationTrust()));
287
+ }
288
+ else if ('trust' in result.approvals) {
289
+ // EXT-70 §4.7.1 believe (or stop believing) specific hints from one server, for
290
+ // this session. The notice is built from what the runner RETURNS, so it can only
291
+ // describe the trust actually in force including §4.7.4's consequence when the
292
+ // withdrawal is a weakening.
293
+ const { server, hints, believe } = result.approvals.trust;
294
+ printNotice(approvalsTrustNotice(runner.setMcpAnnotationTrust(server, hints, believe)));
232
295
  }
233
296
  else {
234
- displayInfo('Auto-approve OFF — approvals required before each shell command.');
297
+ runner.setSessionApprovalRung(result.approvals.rung);
298
+ // Report the posture the runner actually LANDED on, not the one requested.
299
+ printNotice(approvalsRungNotice(runner.getSessionApprovals()));
235
300
  }
236
301
  }
237
302
  else if (result.clearTranscript ||
@@ -287,6 +352,21 @@ export async function createInteractiveSession(sessionConfig, commandLineConfigO
287
352
  await processMessage(message);
288
353
  }
289
354
  else {
355
+ // TUI-C33 — the ASCII-art launch banner, ABOVE the untouched ready message. Only on this
356
+ // branch: an `-m` run goes straight to work, which is the readline twin of the TUI hiding
357
+ // its intro when it mounts with an initialMessage.
358
+ //
359
+ // Gated on `stdout.isTTY` (as the TUI's viewport bump is) so piped, redirected and non-TTY
360
+ // runs stay clean, and on `getUseColour()` for the escapes, so a monochrome session degrades
361
+ // the banner to plain text instead of dropping it. `stdout.columns` is what every field is
362
+ // truncated against — see launchBanner.ts on why a wrapped line would shatter the art.
363
+ if (output.isTTY) {
364
+ displayLaunchBanner(launchBannerText({
365
+ ...launchBannerFields(config.modelDisplayName, config.modelProviderType),
366
+ columns: output.columns,
367
+ colour: getUseColour(),
368
+ }));
369
+ }
290
370
  display(sessionConfig.readyMessage);
291
371
  displayInfo(sessionConfig.exitMessage);
292
372
  }
@@ -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,gBAAgB,EAAE,MAAM,4CAA4C,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAC9F,OA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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,CAAC;AAC9F,OAAO,EAAE,qBAAqB,EAAE,MAAM,2CAA2C,CAAC;AAClF,OAAO,EAAE,cAAc,EAAE,MAAM,sCAAsC,CAAC;AACtE,OAAO,EAAE,YAAY,EAAE,wBAAwB,EAAE,MAAM,sCAAsC,CAAC;AAC9F,OAAO,EACL,oBAAoB,EACpB,iBAAiB,GAClB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EACL,eAAe,EACf,KAAK,EACL,IAAI,EACJ,aAAa,EACb,YAAY,EACZ,QAAQ,EACR,UAAU,EACV,KAAK,IAAI,KAAK,EACd,MAAM,IAAI,MAAM,GACjB,MAAM,wCAAwC,CAAC;AAEhD,OAAO,EAAoB,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAC1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b,CAAC,CAAC;QAEF,IAAI,OAAO,EAAE,CAAC;YACZ,MAAM,cAAc,CAAC,OAAO,CAAC,CAAC;QAChC,CAAC;aAAM,CAAC;YACN,yFAAyF;YACzF,0FAA0F;YAC1F,mDAAmD;YACnD,EAAE;YACF,2FAA2F;YAC3F,6FAA6F;YAC7F,2FAA2F;YAC3F,uFAAuF;YACvF,IAAI,MAAM,CAAC,KAAK,EAAE,CAAC;gBACjB,mBAAmB,CACjB,gBAAgB,CAAC;oBACf,GAAG,kBAAkB,CAAC,MAAM,CAAC,gBAAgB,EAAE,MAAM,CAAC,iBAAiB,CAAC;oBACxE,OAAO,EAAE,MAAM,CAAC,OAAO;oBACvB,MAAM,EAAE,YAAY,EAAE;iBACvB,CAAC,CACH,CAAC;YACJ,CAAC;YACD,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"}
@@ -13,6 +13,8 @@
13
13
  * The registry is a plain array so later layers (e.g. extension-registered commands, EXT-5)
14
14
  * can append more entries via {@link createCommandRegistry} without this module changing.
15
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';
16
18
  /** Read-only session context a command may surface (e.g. `/status`, `/model`). */
17
19
  export interface SlashCommandContext {
18
20
  mode: string;
@@ -23,6 +25,12 @@ export interface SlashCommandContext {
23
25
  toolsExpanded: boolean;
24
26
  /** Whether the docked debug panel is currently shown (drives `/debug` copy). */
25
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;
26
34
  /**
27
35
  * Pre-rendered, secret-free summary lines of the resolved config, surfaced read-only by
28
36
  * `/config` (GS2-1). The App builds these once from the resolved config (see
@@ -121,8 +129,18 @@ export interface ConfigSummaryInput {
121
129
  * resolved-config fields, one per line, with a pointer to `gth config print` for the full view.
122
130
  * Pure and secret-free — it only reads non-sensitive scalar fields (never API keys / the live
123
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.
124
142
  */
125
- export declare function formatConfigSummary(config: ConfigSummaryInput): string[];
143
+ export declare function formatConfigSummary(config: ConfigSummaryInput, command?: string): string[];
126
144
  /**
127
145
  * The `/config` notice, from the pre-rendered summary lines (or an unavailable fallback).
128
146
  *
@@ -174,13 +192,34 @@ export interface SlashCommandResult {
174
192
  /** When true, the component toggles tool-call panels between collapsed and expanded. */
175
193
  toggleTools?: boolean;
176
194
  /**
177
- * EXT-12a requested change to the runner's session-scoped auto-approve flag (shell commands
178
- * auto-approved this session), from the `/auto-approve` command: `'on'` / `'off'` set it
179
- * explicitly, `'toggle'` flips it. The command itself stays pure — it cannot read the runner's
180
- * flag — so the App owns the actual apply + the resulting-state notice (mirroring how `/verbose`
181
- * / `/debug` defer their state-aware copy to the App).
195
+ * TUI-C37the 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.
182
198
  */
183
- autoApprove?: 'on' | 'off' | 'toggle';
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
+ };
184
223
  /**
185
224
  * TUI-C18 — a committed turn's thinking to REPRINT into the transcript (the `/reasoning` command).
186
225
  * Committed reasoning is frozen in Ink's `<Static>` and can never re-expand in place, so instead of
@@ -205,8 +244,8 @@ export interface SlashCommand {
205
244
  /**
206
245
  * EXT-12 — whether this command may be dispatched WHILE a turn is streaming ("during
207
246
  * inference"). Defaults to false: most commands are idle-only. The read-only / session-toggle
208
- * commands (e.g. `/auto-approve`, `/verbose`, `/debug`, `/help`, `/model`) set this so the user
209
- * can flip auto-approval or inspect state mid-turn without interrupting the run. Commands that
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
210
249
  * mutate the transcript or thread (`/clear`) or end the session (`/exit`) stay idle-only.
211
250
  */
212
251
  availableDuringRun?: boolean;
@@ -263,17 +302,117 @@ export declare function toolsToggleNotice(expanded: boolean): SlashCommandNotice
263
302
  */
264
303
  export declare function debugToggleNotice(visible: boolean): SlashCommandNotice;
265
304
  /**
266
- * The notice for the `/auto-approve` toggle (EXT-12), given the RESULTING (post-apply) state.
267
- * Shared so the command reports exactly the state the App applies. ON is rendered 'warn' (yellow)
268
- * because it disables the approval gate for the session; OFF is 'info'.
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.
269
399
  */
270
- export declare function autoApproveNotice(on: boolean): SlashCommandNotice;
400
+ export declare function approvalsTrustUsageNotice(problem: ApprovalsUsageProblem): SlashCommandNotice;
271
401
  /**
272
- * EXT-12parse the `/auto-approve` argument: no arg (or `toggle`) flips; `on`/`off` (and the
273
- * friendly synonyms `enable`/`disable`, `true`/`false`) set explicitly. Returns `null` for an
274
- * unrecognized argument so the command can render a usage hint instead of guessing.
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".
275
414
  */
276
- export declare function parseAutoApproveArg(args: string[]): 'on' | 'off' | 'toggle' | null;
415
+ export declare function approvalsTrustNotice(change: McpAnnotationTrustChange): SlashCommandNotice;
277
416
  /**
278
417
  * TUI-C18 — resolve a `/reasoning` invocation against the committed turns' reasoning (in transcript
279
418
  * order, index 0 = turn 1). Pure, so the whole selection + friendly-notice logic is unit-testable
@@ -302,7 +441,7 @@ export declare function resolveDebugDumpRedact(resolvedConfig: unknown, args: st
302
441
  * opted OUT (raw archive) it is the loud, impossible-to-miss UNSANITIZED warning. Colour follows
303
442
  * DL-8 / the tone rule in maintenance/ux-guidelines.md: the safe, redacted default is normal
304
443
  * feedback (no `tone` ⇒ info), while the raw opt-out is caution and so `tone: 'warn'` (yellow) —
305
- * mirroring how `autoApproveNotice` reserves yellow for the dangerous (gate-off) state. Redaction is
444
+ * mirroring how `approvalsModeNotice` reserves yellow for the dangerous (gate-off) state. Redaction is
306
445
  * best-effort pattern-based, so even the softened note still says review-before-sharing.
307
446
  */
308
447
  export declare function debugDumpNotice(archiveDir: string, redacted: boolean): SlashCommandNotice;
@@ -320,7 +459,7 @@ export declare function formatHelp(registry: SlashCommand[]): SlashCommandNotice
320
459
  *
321
460
  * EXT-12 — when `options.duringRun` is set (a turn is streaming), commands that are not marked
322
461
  * {@link SlashCommand.availableDuringRun} are refused with a friendly notice rather than run,
323
- * so mid-turn input can only reach the safe, non-mutating commands (`/auto-approve`, `/verbose`,
462
+ * so mid-turn input can only reach the safe, non-mutating commands (`/approvals`, `/verbose`,
324
463
  * `/debug`, …). `/help` is always allowed.
325
464
  */
326
465
  export declare function dispatchSlashCommand(parsed: ParsedSlashCommand, registry: SlashCommand[], ctx: SlashCommandContext, options?: {