SlashCommandResult
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:389
The effects a dispatched command can request. The component interprets these; the command itself stays pure (no React, no I/O) so it is trivially testable.
Properties
Section titled “Properties”approvals?
Section titled “approvals?”
optionalapprovals?: {show:true; } | {rung:"write"|"manual"|"assisted"|"auto"|"bypass"; } | {trust:McpTrustRequest; } | {undeny: {index:number; }; }
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:427
CFG-27 — a requested action from /approvals. { show: true } asks the surface to DISPLAY
the current posture; { rung } asks it to switch the session to that rung. The command itself
stays pure — it cannot read the runner’s posture — so the surface owns the apply + the
resulting-state notice (mirroring how /verbose / /debug defer their state-aware copy to
the App).
There is deliberately NO toggle action: with five ordered rungs a flip has no honest
meaning, which is also why /auto-approve and /bypass-approve were retired with the
three-mode vocabulary that gave them their names.
EXT-70 adds { trust } — start or stop believing specific annotation hints from one MCP
server (§4.7.1). It takes the same route for the same reason: the command cannot read or write
the runner’s posture, so it states the request and the surface applies it and reports what
landed.
autocompact?
Section titled “autocompact?”
optionalautocompact?: {show:true; } | {budget:TokenBudget; }
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:460
EXT-161 — a request from /autocompact to report or move the preventive compaction threshold.
Takes the same route as approvals and compact: the command cannot reach the agent, so it
states the request — already PARSED, so the surface never re-reads the grammar — and the
surface applies it and reports what landed. { show: true } is the bare form, which reports
rather than erroring; { budget } sets it for the rest of the session.
A malformed argument never reaches here: the command answers with its own notice and leaves
the threshold in force, because a typo must not switch a protection off.
clearTranscript?
Section titled “clearTranscript?”
optionalclearTranscript?:boolean
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:400
When true, the component clears the transcript.
compact?
Section titled “compact?”
optionalcompact?:object
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:448
GS2-23 — a request from /compact to fold the older conversation into a summary in the
model’s context. Takes the approvals: { rung } route for the same reason: the command cannot
reach the runner, so it states the request and the surface awaits
runner.compactConversation and commits compactionNotice for what LANDED. focus is
the free text after the command — what the summary should concentrate on.
focus?
Section titled “focus?”
optionalfocus?:string
optionalexit?:boolean
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:471
When true, the component quits the app (runs onExit).
level?
Section titled “level?”
optionallevel?:string
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:398
Level for the system line; defaults to ‘info’.
message?
Section titled “message?”
optionalmessage?:string
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:396
A terse system line (incidental/error output); commands prefer notice.
notice?
Section titled “notice?”
optionalnotice?:SlashCommandNotice
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:394
A structured notice to commit into the transcript (the command’s user-visible feedback).
Preferred over message for all commands so feedback is consistent and noticeable (TUI-C14).
reprintReasoning?
Section titled “reprintReasoning?”
optionalreprintReasoning?:object
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:440
TUI-C18 — a committed turn’s thinking to REPRINT into the transcript (the /reasoning command).
Recall rather than retro-mutation: a fresh block reusing the TUI-C15 💭/gutter styling appears
at the bottom of the conversation, where the user is looking, instead of changing a turn they
have scrolled away from. The App turns this into a reasoning transcript item; the command stays
pure (it resolves the target from turnReasonings). Absent when the command instead returns a
friendly notice (no reasoning / out-of-range).
reasoning
Section titled “reasoning”reasoning:
string
turnNumber
Section titled “turnNumber”turnNumber:
number
resume?
Section titled “resume?”
optionalresume?:object
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:469
GS2-20 — a request from /resume to re-enter a stored conversation. With an id the surface
resolves and applies it through the one seam in sessionResume.ts — the same two calls
--resume <id> makes at boot — and commits the resumed-conversation banner and the restored
turns, or the refusal. With no id the surface lists the conversations that can be resumed,
leaving out the one it is in. The command itself stays pure: it cannot reach the store or the
runner, so it states the request.
optionalid?:number
setMouse?
Section titled “setMouse?”
optionalsetMouse?:boolean
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:410
TUI-C37 — the state /mouse asks the surface to move terminal mouse reporting to. The command
stays pure (it cannot write escape sequences), so the App applies it and owns the actual
enable/disable, the same division /approvals uses for the runner’s posture.
toggleDebug?
Section titled “toggleDebug?”
optionaltoggleDebug?:boolean
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:402
When true, the component toggles the docked debug panel (the debug views).
toggleTools?
Section titled “toggleTools?”
optionaltoggleTools?:boolean
Defined in: _worktrees/docs-release/gaunt-sloth/packages/agent/src/modules/slashCommands.ts:404
When true, the component toggles tool-call panels between collapsed and expanded.