Skip to content

WriteDebugDumpInput

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

Input to writeDebugDump.

optional approvals?: readonly ApprovalDecisionCapture[]

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

[[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:30

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:45

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:32

Model display name, already resolved by the caller.


optional modelRequest?: LastModelRequest

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

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:39

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).


transcript: unknown

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

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