Skip to content

WriteDebugDumpInput

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/utils/debugDump.ts:30

Input to writeDebugDump.

optional approvals?: readonly ApprovalDecisionCapture[]

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/utils/debugDump.ts:78

[[TUI-C27]] — the approvals gate’s own record of every gated decision this session made: what the rater was SHOWN and what it ANSWERED, on the approving branch as much as the rejecting one, plus which stage of the gate decided.

Threaded straight from runner.getApprovalCaptures() by the caller, exactly as modelRequest is threaded from the agent. ADDITIVE & optional: present and non-empty ⇒ approvals.json; absent or empty ⇒ the file is simply omitted (a session that gated nothing has nothing to say about it).

It goes through the same renderStructured pass as transcript.json and model-messages.json — the [[GS2-47]]/[[GS2-54]] literal + pattern redaction over the secret values collectSecretValues harvested from env and config. That is deliberate reuse rather than a policy of its own: the captured rating prompt carries the user’s own last five messages verbatim plus the command, so it is at least as sensitive as the transcript, and a second redaction policy for one artifact is how two policies come to disagree.


config: unknown

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/utils/debugDump.ts:34

The resolved effective config (the live GthConfig). Opaque — serialized as JSON.


optional cwd?: string

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/utils/debugDump.ts:49

Working directory for git-state collection. Defaults to process.cwd(); overridable for tests so the “not a git repo” / “inside a git repo” paths are both exercisable without depending on where the test runner happens to execute.


optional modelDisplayName?: string

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/utils/debugDump.ts:36

Model display name, already resolved by the caller.


optional modelRequest?: LastModelRequest

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/utils/debugDump.ts:60

GS2-56 — the always-on snapshot of the last model request (the composed system prompt, tool defs with schema, model params, tool-choice, and the AS-SENT post-summarization messages), threaded straight from agent.lastModelRequest by the caller (both the TUI and the readline --no-tui surface). ADDITIVE & optional: when present, writeDebugDump writes model-request.json (the extras) and model-messages.json (the as-sent messages, distinct from the conversation-view transcript.json), both routed through the same redaction pass as every other artifact. Absent (no model call yet / a surface with no agent handle) ⇒ those two files are simply omitted.


optional redact?: boolean

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/utils/debugDump.ts:43

GS2-47 — apply the shared secret-redaction pass to every artifact before writing. Defaults to ON: omitted or any value other than the literal false redacts (read-site !== false, matching the config default so an opt-out has to be explicit). false writes a RAW archive (the caller is then responsible for the loud “may contain secrets” warning).


optional termination?: DebugDumpTermination

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/utils/debugDump.ts:92

[[EXT-159]] — why the last turn ended, and what the provider said about each message in it.

This is the artifact’s answer to the question it exists to be asked. Measured on two real dumps of a stopped run: the terminating error appeared only in transcript.json, nothing in debug-log.txt said what happened, and no finish_reason was recorded anywhere at all — so the file a maintainer opens first could not say which of a dozen unrelated causes it was.

ALWAYS written when the caller threads it, including when reason is null. An absent reason means a termination site nobody classified, which is a defect signal this archive exists to carry; omitting the file for it would make the one case worth reporting the one case that leaves no trace.


transcript: unknown

Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/src/utils/debugDump.ts:32

The full transcript (all turns, tool calls + results). Opaque — serialized as JSON.