@gaunt-sloth/agent 2.0.0-beta.0 → 2.0.0-beta.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.
@@ -5,9 +5,9 @@ import { GthAbstractAgent } from '@gaunt-sloth/core/core/GthAbstractAgent.js';
5
5
  import { launchBannerFields, launchBannerText } from '@gaunt-sloth/core/core/launchBanner.js';
6
6
  import { buildRejectionMessage } from '@gaunt-sloth/core/core/shell/rejection.js';
7
7
  import { renderNegotiationRows } from '@gaunt-sloth/core/core/shell/negotiation.js';
8
- import { attackBannerCopy, describeRaterOutcome, grantsRunAnyway, RATER_REASON_LABEL, } from '@gaunt-sloth/core/core/shell/escalationSeverity.js';
9
- import { frameUntrustedCommand, frameUntrustedText, frameWidthFor, narrowTerminalNotice, STICKY_PREVIEW_MAX_ROWS, } from '@gaunt-sloth/core/core/shell/framing.js';
10
- import { approvalPromptHeader } from '@gaunt-sloth/core/core/approvals/promptHeader.js';
8
+ import { attackBannerCopy, grantsRunAnyway, RATER_REASON_LABEL, } from '@gaunt-sloth/core/core/shell/escalationSeverity.js';
9
+ import { frameUntrustedCommand, frameUntrustedText, frameWidthFor, narrowTerminalNotice, } from '@gaunt-sloth/core/core/shell/framing.js';
10
+ import { APPROVAL_ASK_LINE, APPROVAL_ROW_DIALOG_TONES, approvalCategoryLine, approvalRequestRows, } from '@gaunt-sloth/core/core/approvals/approvalRequest.js';
11
11
  import { ApprovalStopError, approvalStopRows } from '@gaunt-sloth/core/core/shell/approvalStop.js';
12
12
  import { writeDebugDump } from '@gaunt-sloth/core/utils/debugDump.js';
13
13
  import { appendToFile, getCommandOutputFilePath } from '@gaunt-sloth/core/utils/fileUtils.js';
@@ -17,7 +17,7 @@ import { HumanMessage } from '@langchain/core/messages';
17
17
  import { MemorySaver } from '@langchain/langgraph';
18
18
  import { createResolvers } from '#src/resolvers.js';
19
19
  import { resolveAgentFactory } from '#src/core/resolveAgentFactory.js';
20
- import { approvalsRungNotice, approvalsStatusNotice, approvalsTrustNotice, createCommandRegistry, dispatchSlashCommand, formatConfigSummary, parseSlashCommand, } from '#src/modules/slashCommands.js';
20
+ import { approvalsRefusalsNotice, approvalsRungNotice, approvalsStatusNotice, approvalsTrustNotice, approvalsUndenyNotice, createCommandRegistry, dispatchSlashCommand, formatConfigSummary, parseSlashCommand, } from '#src/modules/slashCommands.js';
21
21
  /**
22
22
  * [[TUI-C26]] §6 / [[EXT-105]] — **every line of an escalation dialog goes through
23
23
  * {@link displayDialogLine}, and no line of one goes anywhere else.**
@@ -47,6 +47,39 @@ const dialogLines = (lines, tone = 'plain') => {
47
47
  for (const line of lines)
48
48
  displayDialogLine(line, tone);
49
49
  };
50
+ /**
51
+ * [[EXT-154]] — **the sentence a remembering answer earns, written from the lifetime the runner
52
+ * recorded rather than from the key that was pressed.**
53
+ *
54
+ * `maintenance/ux-guidelines.md` (DL-4): a confirmation states what LANDED. The two answers this
55
+ * covers — `[a]` and `[d]` — ask for a project file, and [[EXT-149]] degrades an `always` whose write
56
+ * did not reach disk to the session answer it really is. That is decided inside the runner AFTER the
57
+ * approval callback has returned, so these lines cannot be written where they are chosen; they are
58
+ * written where the outcome arrives, once, and only then.
59
+ *
60
+ * **Binary on this surface, and that is a property rather than a simplification.** `[a]` and `[d]`
61
+ * are shown only where `grantPreview`/`denyPreview` are attached, which is exactly where the runner
62
+ * has an entry to record — so an answer here always records something and `once` is unreachable.
63
+ * (The ACP surface offers its remembering options unconditionally and therefore does need the third
64
+ * case; see `acpPermissions.ts`.)
65
+ *
66
+ * `/approvals undeny` is named on the refusal branch whichever way the write went, because it lists
67
+ * and lifts a session refusal too, so the line is true on both.
68
+ */
69
+ const rememberedAnswerLine = (decision, landed) => {
70
+ const savedToProject = landed === 'always';
71
+ if (decision === 'approve') {
72
+ return savedToProject
73
+ ? 'Approved and remembered — this exact command is saved to the project allow-list.'
74
+ : 'Approved for this session only — it was not written to the project allow-list.';
75
+ }
76
+ return savedToProject
77
+ ? 'Refused — this exact call will not run and will not ask again. It is saved to this ' +
78
+ 'project, so it stays refused in new sessions; lift it with /approvals undeny.'
79
+ : 'Refused — this exact call will not run and will not ask again this session. It was not ' +
80
+ 'written to the project, so a new session will ask about it again; lift it with ' +
81
+ '/approvals undeny.';
82
+ };
50
83
  export async function createInteractiveSession(sessionConfig, commandLineConfigOverrides, message) {
51
84
  const config = { ...(await initConfig(commandLineConfigOverrides)) };
52
85
  const checkpointSaver = new MemorySaver();
@@ -120,141 +153,51 @@ export async function createInteractiveSession(sessionConfig, commandLineConfigO
120
153
  // The runner consults the allow-list BEFORE calling this, so trusted commands never reach
121
154
  // this prompt at all. (The Ink TUI surfaces the same scoped prompt via an approval bridge —
122
155
  // see tuiSessionModule's createApprovalBridge + the <ApprovalPrompt> component.)
156
+ // [[EXT-154]] — the interrupts whose answer asked for a PROJECT FILE, waiting to be told what
157
+ // they got. Only `[a]` and `[d]` land here; every other answer records nothing and is confirmed
158
+ // where it is chosen.
159
+ //
160
+ // **Keyed by the interrupt object, the correlation the seam documents**, rather than by "the
161
+ // one that is outstanding". This surface does prompt strictly one at a time, but that is a
162
+ // property of the runner's drain loop, not of this module — and holding a claim about someone
163
+ // else's loop here is how one call's persistence ends up confirmed on another call's dialog.
164
+ // Emptied as each is consumed, so nothing accumulates over a long session.
165
+ const rememberAsked = new Set();
123
166
  runner.setToolApprovalCallback(async (pending) => {
124
- const commandText = typeof pending.args.command === 'string'
125
- ? pending.args.command
126
- : JSON.stringify(pending.args);
127
- // [[TUI-C26]] §6 — the command is model-authored text going to a terminal, where it is not
128
- // inert: a carriage return reaches column 0, an escape sequence clears the screen, and a
129
- // newline alone lays down a line that looks exactly like this prompt's own chrome. It is
130
- // painted through core's framing renderer — neutralised, inside a line-number gutter, with
131
- // its command-substitution and composition sites listed above it — the SAME renderer the Ink
132
- // prompt uses, so the two surfaces cannot differ about how much of a command a human saw.
133
- // Nothing is clamped to one line: the command that motivated this hid its payload fifteen
134
- // lines into a commit message, and a clamp discards exactly what the human must rule on.
135
- const frameWidth = frameWidthFor(output.columns);
136
- const framedCommand = frameUntrustedCommand(commandText, { width: frameWidth });
137
- // [[TUI-C67]] — the opening sentence is core's, branched on the `ApprovalSubject` kind the
138
- // gate itself decided on, so a file write, an MCP call or a custom tool is announced as what
139
- // it is rather than as a shell command. The Ink prompt renders the identical call; this
140
- // surface owns only the leading blank line and the trailing colon, which is what keeps the
141
- // two from describing one call two ways.
142
- displayDialogLine(`\n${approvalPromptHeader(pending)}:`, 'warn');
143
- // Below core's floor the frame is wider than the terminal, which wraps it and puts untrusted
144
- // text at the left edge. The frame is still shown — hiding what the human must rule on would
145
- // be worse — but the guarantee has lapsed, and it says so instead of lapsing silently.
146
- const tooNarrow = narrowTerminalNotice(output.columns);
147
- if (tooNarrow)
148
- displayDialogLine(tooNarrow, 'warn');
149
- dialogLines(framedCommand.notices, 'warn');
150
- displayDialogLine('');
151
- dialogLines(framedCommand.lines);
152
- displayDialogLine('');
153
- // CFG-27: when the auto-rater escalated this command (rather than approving it), show its
154
- // outcome + reason before the human decides. §6 makes that explanation mandatory whenever a
155
- // rating exists; at the unrated rungs there is none and the prompt shows the command alone.
156
- // The outcome is a schema enum; the reason is model-authored prose and is framed exactly like
157
- // the command, because a dialog forgeable through the string that explains it is not a gate.
158
- // [[TUI-C26]] §6 — the severity is legible in three independent ways: a glyph, a sentence of
159
- // the gate's own naming what the outcome MEANS, and the tone it is painted in. The tone is
160
- // this surface's colour: `catastrophic` is painted `danger` (red) where `destructive` is
161
- // `warn` (yellow), so the two cannot look alike — and the sentence carries it anyway for a
162
- // terminal with no colour at all, which is the one that must not be left out.
163
- if (pending.safetyVerdict) {
164
- const severity = describeRaterOutcome(pending.safetyVerdict.outcome);
165
- displayDialogLine(severity.heading, severity.tone);
166
- // The reason is the RATER's, and now that the line above it is the gate's own sentence the
167
- // attribution has to be said rather than implied.
168
- displayDialogLine(RATER_REASON_LABEL, 'notice');
169
- dialogLines(frameUntrustedText(pending.safetyVerdict.reason, { width: frameWidth }).lines, severity.tone);
170
- }
171
- // EXT-71 §3.2 — when a declared `approvals.escalate` entry is what brought this call here,
172
- // the prompt shows THE ENTRY THAT FIRED. Without it the user is asked about a command their
173
- // rung would have approved, with nothing on screen tying the question to the line they wrote
174
- // — which reads as the gate malfunctioning rather than as their own rule working.
175
- // [[TUI-C26]] — framed rather than interpolated. The entry is usually something the user
176
- // wrote, but an MCP entry can carry server-supplied names, and this line sits one string away
177
- // from the prompt's own chrome. The label stays this surface's own line.
178
- if (pending.escalatedBy) {
179
- displayDialogLine('⚠ Your approvals.escalate list matched this call:', 'warn');
180
- dialogLines(frameUntrustedText(pending.escalatedBy, { width: frameWidth }).lines, 'warn');
181
- }
182
- // [[EXT-29]] §6 — when a §5 negotiation preceded this escalation, the human is shown ALL of
183
- // it. The user is not asked to rule on the final command in isolation: that the agent
184
- // proposed the same command three times unchanged, against two rejections that each told it
185
- // what to fix, is the most important thing on the screen and is invisible if only the last
186
- // attempt is shown. Rendered through core's shared renderer, so the surfaces cannot describe
187
- // one exchange two ways.
167
+ // [[EXT-137]] **the request block, rendered by core and printed linearly here.**
188
168
  //
189
- // [[TUI-C26]] §5.4 rendered as ROWS, so the two voices are told apart: the rater's turns are
190
- // painted `warn` (yellow) and the agent's plain, which is what the spec asks for and what one
191
- // joined string could not express — the whole exchange used to arrive in a single colour. Each
192
- // row also NAMES its speaker (`rater answered:` / `agent justified:`), which is the half that
193
- // survives a monochrome terminal. The rows are bound to the terminal width for the same reason
194
- // the command is: a long justification left to the terminal's own wrap continues at column 0.
169
+ // This surface has no dock: it prints and it scrolls, so what a person reads immediately
170
+ // before pressing a key is whatever happened to be printed last. That makes the ORDER the
171
+ // whole mitigation, and the order is core's rather than this module's
172
+ // `approvalRequestRows` puts the explanation first, the call after it and the HOSTS last, so
173
+ // the counterparty's identity is adjacent to the menu however long the note above it ran.
174
+ // The Ink TUI commits the identical rows into its transcript and `transcriptWindow` budgets
175
+ // them, so the three cannot come to disagree about what a human was shown.
195
176
  //
196
- // [[TUI-C75]] — the count comes from `negotiationAttempts`, not from the array: §5.3 clears
197
- // the transcript on an approved call, so the rounds that survive to here are the attempts
198
- // since the last approval and not the attempts the human is being asked to weigh.
199
- for (const row of renderNegotiationRows(pending.negotiationRounds ?? [], {
200
- width: frameWidth,
201
- ...(pending.negotiationAttempts !== undefined
202
- ? { attempts: pending.negotiationAttempts }
203
- : {}),
204
- })) {
205
- if (row.voice === 'rater')
206
- displayDialogLine(row.text, 'warn');
207
- else if (row.voice === 'agent')
208
- displayDialogLine(row.text);
209
- else
210
- displayDialogLine(row.text, 'notice');
177
+ // [[TUI-C26]] §6 every untrusted half in those rows arrives already framed: neutralised,
178
+ // inside a line-number gutter, with its command-substitution and composition sites listed
179
+ // above it. Model-authored text going to a terminal is not inert a carriage return reaches
180
+ // column 0, an escape sequence clears the screen, and a newline alone lays down a line that
181
+ // looks exactly like this dialog's own chrome. Nothing is clamped to one line: the command
182
+ // that motivated the framing hid its payload fifteen lines into a commit message, and a clamp
183
+ // discards exactly what the human must rule on.
184
+ displayDialogLine('');
185
+ for (const row of approvalRequestRows(pending, { columns: output.columns })) {
186
+ displayDialogLine(row.text, APPROVAL_ROW_DIALOG_TONES[row.tone]);
211
187
  }
212
- // EXT-71/EXT-70 §6 — the menu MUST show what a sticky choice will store, at the moment of
213
- // the choice, and it names it in the words the control is written in: the command itself for
214
- // a shell call, the tool (with its server and host bound) for a tool call, since for a tool
215
- // "the stored thing is the tool, not the arguments" (§4.7.4). The exact entry follows it, so
216
- // the user sees the thing they are agreeing to rather than a generalization of it.
188
+ // [[EXT-137]] — the two lines the Ink dock pins, printed here in this surface's equivalent
189
+ // position: immediately above the menu, which is the last thing read before a key is pressed.
190
+ // Both are ours a constant, and one of four enumerated category sentences so no amount of
191
+ // padding anywhere in the call can change a byte of either. The category is what makes the
192
+ // line worth reading: it says which CLASS of thing is about to be allowed, which a bare "an
193
+ // answer is needed" cannot, and a reader who is told nothing has no reason to look up.
194
+ displayDialogLine('');
195
+ displayDialogLine(APPROVAL_ASK_LINE, 'warn');
196
+ displayDialogLine(approvalCategoryLine(pending), 'warn');
197
+ // §6/EXT-70 — which sticky controls the gate would actually store something for. The menu
198
+ // below is assembled from these two booleans, never from what they would store.
217
199
  const sticky = pending.grantPreview !== undefined;
218
- if (sticky) {
219
- // [[TUI-C26]] — these two lines carry the command as typed (§3.1 stores it exactly, never a
220
- // widened pattern), so they inherit the command's problem in less space: an in-line
221
- // `approved by rater` fits on one line untouched. Framed like everything else, with the
222
- // label kept as this surface's OWN line so the untrusted half can never be read as chrome.
223
- // Bounded to a few rows: for a shell call these carry the command as typed, which is
224
- // already printed in full above — so an unbounded copy of a long command here (twice over,
225
- // since the entry repeats it) scrolls the MENU off the screen, and a control the human
226
- // cannot see is not one they were offered.
227
- displayDialogLine('[s]/[a] will remember:', 'notice');
228
- dialogLines(frameUntrustedText(pending.grantSummary ?? pending.grantPreview, {
229
- width: frameWidth,
230
- maxRows: STICKY_PREVIEW_MAX_ROWS,
231
- }).lines, 'notice');
232
- displayDialogLine(' stored as:', 'notice');
233
- dialogLines(frameUntrustedText(pending.grantPreview, {
234
- width: frameWidth,
235
- maxRows: STICKY_PREVIEW_MAX_ROWS,
236
- }).lines, 'notice');
237
- }
238
- // [[TUI-C26]] §6 — the same requirement for the OTHER sticky choice, and its availability is
239
- // a different question: the runner offers a deny entry in cases where no grant exists at all
240
- // (a command that does not statically resolve, every `catastrophic` verdict), because a
241
- // refusal that cannot be decided still refuses. `recorded as:` rather than a second
242
- // `stored as:` — one dialog, two labels that read alike, is how a reader loses track of which
243
- // block they are looking at. The label states the lifetime because there is no persisted deny
244
- // store and the control must not imply one.
245
200
  const stickyDeny = pending.denyPreview !== undefined;
246
- if (stickyDeny) {
247
- displayDialogLine('[d] will refuse, for the rest of this session:', 'notice');
248
- dialogLines(frameUntrustedText(pending.denySummary ?? pending.denyPreview, {
249
- width: frameWidth,
250
- maxRows: STICKY_PREVIEW_MAX_ROWS,
251
- }).lines, 'notice');
252
- displayDialogLine(' recorded as:', 'notice');
253
- dialogLines(frameUntrustedText(pending.denyPreview, {
254
- width: frameWidth,
255
- maxRows: STICKY_PREVIEW_MAX_ROWS,
256
- }).lines, 'notice');
257
- }
258
201
  setRawMode(false); // ensure typed input is echoed for this confirm
259
202
  // EXT-18: wrap the prompt in try/finally so the raw-mode/ref state is not left wedged if
260
203
  // rl.question throws. The subsequent streamResume run re-establishes raw mode + ref, but be
@@ -313,7 +256,12 @@ export async function createInteractiveSession(sessionConfig, commandLineConfigO
313
256
  return { type: 'approve', scope: 'session' };
314
257
  }
315
258
  if (sticky && (answer === 'a' || answer === 'always')) {
316
- displayDialogLine('Approved and remembered this exact command is saved to the project allow-list.', 'notice');
259
+ // [[EXT-154]]**no sentence here.** This answer asks for a project file and the write has
260
+ // not been attempted yet, so anything written on this line would be a claim about a file
261
+ // nobody has tried to make. Recorded instead, and confirmed by the outcome callback below
262
+ // once the runner says what it landed as. The approve twin of the `[d]` branch, and the one
263
+ // [[EXT-150]] found telling the identical lie beside the reject branch its node named.
264
+ rememberAsked.add(pending);
317
265
  return { type: 'approve', scope: 'always' };
318
266
  }
319
267
  // [[TUI-C26]] §6 — *always reject*: a refusal that is also recorded, so the next identical
@@ -332,20 +280,26 @@ export async function createInteractiveSession(sessionConfig, commandLineConfigO
332
280
  // widens what is answerable at any prompt. Read this as the reason not to add a fourth alias,
333
281
  // never as licence to delete the three that are here.
334
282
  const stickyRejected = stickyDeny && answer === 'd';
335
- // The confirmation says what actually happened and stops there. There is no persisted deny
336
- // store, so a line implying one would be the same failure §6 names when it calls a control
337
- // offered and then refused a bug with the evidence hidden, which is worse.
338
- displayDialogLine(stickyRejected
339
- ? 'Refused this call will not run for the rest of this session, and will not ask ' +
340
- 'again. Nothing was saved to the project, so a new session will ask about it again.'
341
- : 'Command rejected.', 'notice');
342
- // EXT-58 (§7): the model is told the moves it has — re-call with a justification, call a
343
- // different command, or ask the user — and, when the rater named an already-granted
344
- // alternative (§4.4), that tool plus the clause saying it needs no approval. A bare "user
345
- // rejected" leaves the model to guess, which it does by repeating itself or giving up.
283
+ // [[EXT-154]] the ORDINARY refusal is confirmed here and the remembered one is not, and the
284
+ // split is the whole fix. This line records nothing, so it is true the instant it is written;
285
+ // *always reject* asks for a project file, which [[EXT-107]] makes real and [[EXT-149]] can fail
286
+ // to write, and neither is known until the runner has tried. So the remembering answer is
287
+ // noted and the sentence it earns is committed by the outcome callback below — once, when it
288
+ // is known, never optimistically and then corrected.
289
+ if (stickyRejected)
290
+ rememberAsked.add(pending);
291
+ else
292
+ displayDialogLine('Command rejected.', 'notice');
293
+ // EXT-58 (§7): the model is told the moves it has re-call with a justification, or call a
294
+ // different command — and, when the rater named an already-granted alternative (§4.4), that
295
+ // tool plus the clause saying it needs no approval. A bare "user rejected" leaves the model
296
+ // to guess, which it does by repeating itself or giving up.
346
297
  return {
347
298
  type: 'reject',
348
- ...(stickyRejected ? { scope: 'session' } : {}),
299
+ // [[EXT-107]] `always`, which is what the label above promised. The lifetime that
300
+ // actually lands is core's to decide (a project file that cannot be written degrades to a
301
+ // session refusal), so this surface asks for the scope and never assumes the outcome.
302
+ ...(stickyRejected ? { scope: 'always' } : {}),
349
303
  message: buildRejectionMessage({
350
304
  source: 'user',
351
305
  toolName: pending.name,
@@ -353,6 +307,19 @@ export async function createInteractiveSession(sessionConfig, commandLineConfigO
353
307
  }),
354
308
  };
355
309
  });
310
+ // [[EXT-154]] — **the return leg**, and the reason the two sentences above moved. The runner
311
+ // records a remembering answer only after the callback that gave it has returned, so this is
312
+ // the first moment either one can be described truthfully; written any earlier, the *saved to
313
+ // this project* line sits on screen beside core's own ERROR naming the file it could not write.
314
+ //
315
+ // Nothing here decides anything — by the time it fires the answer is made and the record is
316
+ // written — and an outcome for an interrupt this surface did not note is dropped, which is what
317
+ // keeps `[o]`, `[s]` and the ordinary refusal from being confirmed twice.
318
+ runner.setApprovalOutcomeCallback((outcome) => {
319
+ if (!rememberAsked.delete(outcome.pending))
320
+ return;
321
+ displayDialogLine(rememberedAnswerLine(outcome.decision, outcome.lifetime), 'notice');
322
+ });
356
323
  // [[TUI-C68]] §6.1 — the ATTACK BANNER on the plain surface. An `attack` verdict says the
357
324
  // command's own structure evidenced compromise, and it ends the run; without this the only
358
325
  // recovery is a restart, which §12 forbids. Wiring the callback is what opts this session into
@@ -413,6 +380,39 @@ export async function createInteractiveSession(sessionConfig, commandLineConfigO
413
380
  displayDialogLine(copy.granted, 'warn');
414
381
  return 'run-anyway';
415
382
  });
383
+ // [[TUI-C69]] §5.4/§5.5 — **this session has a live display, so the negotiation is watched
384
+ // rather than only reported.** Wiring it opts this surface into both halves: each round is
385
+ // drawn the moment the gate decides it, and a negotiated approval is held visible for the
386
+ // minimum interval before it takes effect. A surface that wires nothing — an `exec` run, CI —
387
+ // neither draws nor sleeps, which is why one seam carries both.
388
+ //
389
+ // Rendered through core's shared `renderNegotiationRows`, with this surface's own existing
390
+ // voice → tone mapping: the rater's turns `warn` (yellow) as §5.4 requires, the agent's plain,
391
+ // the chrome as a notice. The rows also NAME their speaker, which is the half of the
392
+ // distinction that survives a terminal with no colour at all. The Ink TUI renders the same
393
+ // rows, so the two surfaces cannot describe one exchange differently.
394
+ runner.setNegotiationDisplay({
395
+ round: ({ round, position, agreed, revised }) => {
396
+ // One round at a time, and on THIS surface that is correct: scrollback is append-only, so
397
+ // each round is printed once as it happens and nothing redraws. The Ink dock is the one that
398
+ // needs the whole list (`renderLiveNegotiationRows`), because there the accumulated rounds
399
+ // are re-rendered into a region that cannot scroll and must therefore be bounded.
400
+ for (const row of renderNegotiationRows([round], {
401
+ width: frameWidthFor(output.columns),
402
+ mode: 'live',
403
+ from: position,
404
+ ...(agreed ? { agreed } : {}),
405
+ ...(revised ? { revised } : {}),
406
+ })) {
407
+ if (row.voice === 'rater')
408
+ displayDialogLine(row.text, 'warn');
409
+ else if (row.voice === 'agent')
410
+ displayDialogLine(row.text);
411
+ else
412
+ displayDialogLine(row.text, 'notice');
413
+ }
414
+ },
415
+ });
416
416
  if (logFileName) {
417
417
  displayInfo(`${sessionConfig.mode} session will be logged to ${logFileName}\n`);
418
418
  }
@@ -519,7 +519,19 @@ export async function createInteractiveSession(sessionConfig, commandLineConfigO
519
519
  // (the runner posture). Session-scoped, reversible, never persisted. With no argument
520
520
  // the command DISPLAYS the posture instead of changing it.
521
521
  if ('show' in result.approvals) {
522
- printNotice(approvalsStatusNotice(runner.getSessionApprovals(), runner.getAllowlistCounts(), runner.getDenylist(), runner.getGrants(), runner.getMcpAnnotationTrust()));
522
+ const refusals = runner.getRefusals();
523
+ printNotice(approvalsStatusNotice(runner.getSessionApprovals(), runner.getAllowlistCounts(), refusals, runner.getGrants(), runner.getMcpAnnotationTrust()));
524
+ // [[EXT-107]] — the refusals as their own notice, after the posture and nearest the
525
+ // prompt: it is the block the user acts on, and it carries the number `undeny` takes.
526
+ const refused = approvalsRefusalsNotice(refusals);
527
+ if (refused)
528
+ printNotice(refused);
529
+ }
530
+ else if ('undeny' in result.approvals) {
531
+ // [[EXT-107]] — lift a refusal by its number. The notice is built from what the
532
+ // runner RETURNS, so it can only describe the refusal actually lifted — including the
533
+ // case where a config entry goes on refusing the call after a saved one is removed.
534
+ printNotice(approvalsUndenyNotice(runner.liftRefusal(result.approvals.undeny.index)));
523
535
  }
524
536
  else if ('trust' in result.approvals) {
525
537
  // EXT-70 §4.7.1 — believe (or stop believing) specific hints from one server, for
@@ -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,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,GAEnB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EAAE,cAAc,EAAE,MA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;YACrC,KAAK,CAAC,YAAY,aAAa,CAAC,IAAI,WAAW,CAAC,CAAC;YACjD,KAAK,MAAM,GAAG,IAAI,gBAAgB,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;gBAAE,KAAK,CAAC,GAAG,CAAC,CAAC;QACzF,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,YAAY,aAAa,CAAC,IAAI,aAAa,GAAG,EAAE,CAAC,CAAC;QAC1D,CAAC;QACD,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,iBAAiB,EACjB,WAAW,EACX,mBAAmB,EACnB,cAAc,EACd,eAAe,EACf,iBAAiB,EACjB,kBAAkB,EAClB,kBAAkB,GAEnB,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,qBAAqB,EAAE,MAAM,6CAA6C,CAAC;AACpF,OAAO,EACL,gBAAgB,EAChB,eAAe,EACf,kBAAkB,GACnB,MAAM,oDAAoD,CAAC;AAC5D,OAAO,EACL,qBAAqB,EACrB,kBAAkB,EAClB,aAAa,EACb,oBAAoB,GACrB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,iBAAiB,EACjB,yBAAyB,EACzB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,qDAAqD,CAAC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ACvB,kBAAkB,EAAE,CAAC;QACrB,6FAA6F;QAC7F,6FAA6F;QAC7F,4FAA4F;QAC5F,+FAA+F;QAC/F,8EAA8E;QAC9E,IAAI,GAAG,YAAY,iBAAiB,EAAE,CAAC;YACrC,KAAK,CAAC,YAAY,aAAa,CAAC,IAAI,WAAW,CAAC,CAAC;YACjD,KAAK,MAAM,GAAG,IAAI,gBAAgB,CAAC,GAAG,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,CAAC;gBAAE,KAAK,CAAC,GAAG,CAAC,CAAC;QACzF,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,YAAY,aAAa,CAAC,IAAI,aAAa,GAAG,EAAE,CAAC,CAAC;QAC1D,CAAC;QACD,IAAI,CAAC,CAAC,CAAC,CAAC;IACV,CAAC;AACH,CAAC"}
@@ -13,7 +13,7 @@
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';
16
+ import type { ApprovalRefusal, ApprovalRefusalLift, ApprovalRung, McpAnnotationTrustChange, McpAnnotationTrustView, ResolvedApprovals, ToolAnnotationHint } from '@gaunt-sloth/core/config.js';
17
17
  import type { ApprovalGrant } from '@gaunt-sloth/core/core/approvals/grants.js';
18
18
  /**
19
19
  * TUI-C63 — one advertised key binding: the keys as the user's keyboard spells them, and what
@@ -250,6 +250,10 @@ export interface SlashCommandResult {
250
250
  rung: ApprovalRung;
251
251
  } | {
252
252
  trust: McpTrustRequest;
253
+ } | {
254
+ undeny: {
255
+ index: number;
256
+ };
253
257
  };
254
258
  /**
255
259
  * TUI-C18 — a committed turn's thinking to REPRINT into the transcript (the `/reasoning` command).
@@ -435,7 +439,7 @@ export declare function approvalPostureLines(current: ApprovalRung): string[];
435
439
  export declare function approvalsStatusNotice(approvals: ResolvedApprovals, allowlist: {
436
440
  session: number;
437
441
  always: number | undefined;
438
- }, deny?: readonly string[], grants?: readonly ApprovalGrant[], trust?: McpAnnotationTrustView, options?: {
442
+ }, refusals?: readonly ApprovalRefusal[], grants?: readonly ApprovalGrant[], trust?: McpAnnotationTrustView, options?: {
439
443
  /**
440
444
  * CFG-39 — set by a surface that is about to render {@link approvalPostureChoices} as an
441
445
  * interactive picker, so the same four modes are not also printed as text right above it.
@@ -446,6 +450,28 @@ export declare function approvalsStatusNotice(approvals: ResolvedApprovals, allo
446
450
  */
447
451
  interactive?: boolean;
448
452
  }): SlashCommandNotice;
453
+ /**
454
+ * [[EXT-107]] — **the refusals in force, as their own notice**: what is refused, which list holds
455
+ * it, and the number that lifts it. `null` when nothing is refused, so `/approvals` says nothing
456
+ * about refusals in the ordinary case.
457
+ *
458
+ * This is the escape hatch, and it is the reason a refusal may be persisted at all. A session-only
459
+ * *always reject* cost minutes when it was a mistake; saved to a project file it costs whatever it
460
+ * takes the user to discover a file they were never told about. So this does not count refusals, it
461
+ * makes each one findable and undoable — which is why every line carries its origin and its number.
462
+ *
463
+ * **A second notice rather than more rows on the posture one, and the reason is the pane.** The
464
+ * posture notice's head is the answer the user asked for — which mode am I on — and it already
465
+ * fills the TUI pane the picker leaves: measured, ONE added row scrolls that head off the top. Two
466
+ * notices each keep their own heading, and the refusal list ends up nearest the prompt, which is
467
+ * where the thing the user is about to act on belongs.
468
+ *
469
+ * **The overflow is walkable rather than a dead end.** The numbering is the runner's, over a
470
+ * deterministic order (config, then saved, then session), so lifting the last shown entry brings
471
+ * the next one into the list. A cap that simply hid the rest would put refusals beyond reach of the
472
+ * control that exists to reach them.
473
+ */
474
+ export declare function approvalsRefusalsNotice(refusals: readonly ApprovalRefusal[]): SlashCommandNotice | null;
449
475
  /** EXT-70 §4.7.1 — a request to start or stop believing specific hints from one server. */
450
476
  export interface McpTrustRequest {
451
477
  /** §4.7.5 — the user's own `mcpServers` config key, case-sensitive. */
@@ -456,7 +482,7 @@ export interface McpTrustRequest {
456
482
  believe: boolean;
457
483
  }
458
484
  /** Something wrong with a `/approvals trust` invocation that the command explains rather than guesses at. */
459
- export type ApprovalsUsageProblem = {
485
+ export type ApprovalsTrustUsageProblem = {
460
486
  kind: 'trust-missing-server';
461
487
  believe: boolean;
462
488
  } | {
@@ -468,6 +494,13 @@ export type ApprovalsUsageProblem = {
468
494
  believe: boolean;
469
495
  token: string;
470
496
  };
497
+ /** Something wrong with a `/approvals` subcommand that the command explains rather than guesses at. */
498
+ export type ApprovalsUsageProblem = ApprovalsTrustUsageProblem | {
499
+ kind: 'undeny-missing-number';
500
+ } | {
501
+ kind: 'undeny-bad-number';
502
+ token: string;
503
+ };
471
504
  /** What `/approvals` resolved to, or `null` when the first argument names nothing it knows. */
472
505
  export type ApprovalsAction = {
473
506
  show: true;
@@ -475,6 +508,10 @@ export type ApprovalsAction = {
475
508
  rung: ApprovalRung;
476
509
  } | {
477
510
  trust: McpTrustRequest;
511
+ } | {
512
+ undeny: {
513
+ index: number;
514
+ };
478
515
  } | {
479
516
  usage: ApprovalsUsageProblem;
480
517
  };
@@ -488,10 +525,9 @@ export type ApprovalsAction = {
488
525
  * `manual` rather than a posture of its own, so it leaves quick access — but it stays fully
489
526
  * settable here and in config, which is the whole of what "demoted" means.
490
527
  *
491
- * The retired `read-only` / `auto-safe` / `full-auto` / `ask` spellings are NOT accepted as
492
- * aliases 2.0 is a deliberate break, and a silent alias would leave the user believing in a
493
- * vocabulary the gate no longer has. They are named, with their replacements, by the config-layer
494
- * error in `RETIRED_APPROVAL_MODES`.
528
+ * The retired `ask` spelling is NOT accepted as an alias 2.0 is a deliberate break, and a silent
529
+ * alias would leave the user believing in a vocabulary the gate no longer has. It is named, with
530
+ * both of its replacements, by the config-layer error in `RETIRED_APPROVAL_MODES`.
495
531
  *
496
532
  * **Only the subcommand token is lower-cased.** A server key is the user's own `mcpServers` key
497
533
  * (§4.7.5) and is case-sensitive, so folding it would name a different server — one that believes
@@ -505,7 +541,35 @@ export declare function parseApprovalsArg(args: string[]): ApprovalsAction | nul
505
541
  * a hint that is not one of the four. Each says what is missing and shows the vocabulary, because
506
542
  * the hint names are camelCase MCP identifiers nobody guesses.
507
543
  */
508
- export declare function approvalsTrustUsageNotice(problem: ApprovalsUsageProblem): SlashCommandNotice;
544
+ export declare function approvalsTrustUsageNotice(problem: ApprovalsTrustUsageProblem): SlashCommandNotice;
545
+ /**
546
+ * Usage copy for any malformed `/approvals` subcommand. It dispatches on the problem's `kind`
547
+ * rather than on which subcommand was typed, so a new subcommand's problems are explained by adding
548
+ * a case here and cannot fall through to another subcommand's copy.
549
+ *
550
+ * **Nothing was changed** is stated on every branch, and on the [[EXT-107]] ones it is the part that
551
+ * matters: these arrive from a command that would have REMOVED a refusal, and a user who mistyped
552
+ * the number has to know the gate is still where they left it.
553
+ */
554
+ export declare function approvalsUsageNotice(problem: ApprovalsUsageProblem): SlashCommandNotice;
555
+ /**
556
+ * [[EXT-107]] — the notice for a `/approvals undeny`, built from what the runner RETURNS rather
557
+ * than from what was asked for, so it can only describe the refusal actually lifted.
558
+ *
559
+ * Three outcomes, and the two that are not a plain success are the ones worth the branches:
560
+ *
561
+ * - **A configured entry is not lifted**, because `approvals.deny` is a file the user wrote and no
562
+ * session command rewrites it. Saying where it lives is the whole of the help they need.
563
+ * - **A lifted entry that `approvals.deny` ALSO matches is still refused.** Reporting the removal
564
+ * without that would tell the user they had opened something that is still closed — the same
565
+ * "offered and then refused" failure the escalation menu is written to avoid, one layer up.
566
+ * - **A lift whose file rewrite did not land comes back tomorrow** ([[EXT-149]]). The refusal is
567
+ * gone for this session and still in the project file, so the promise this notice used to make
568
+ * unconditionally — *it will not come back in a new session* — is the one thing that is false
569
+ * there. The store's own error names the file and the reason the write failed; what this adds is
570
+ * what that means for the refusal the user just asked to lift.
571
+ */
572
+ export declare function approvalsUndenyNotice(lift: ApprovalRefusalLift): SlashCommandNotice;
509
573
  /**
510
574
  * EXT-70 §4.7.1/§4.7.4 — the notice for a landed `/approvals trust` or `/approvals untrust`, built
511
575
  * from what the runner RETURNS rather than from what was asked for, so the copy can only describe