DebugCapture
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/dist/core/debugCapture.d.ts:62
Debug-capture sink for the TUI’s /debug panel.
A DebugCapture is an OPT-IN callback the TUI sets on a live agent after init
(on the shared import(‘#src/core/GthAbstractAgent.js’).GthAbstractAgent base, so
both the lean and deep backends support it). When present, the agent’s wrapModelCall
middleware reports, per model call:
request—request.messages: BaseMessage[], the real history sent to the model at call time (post-summarization / post-middleware), plus the DebugRequestExtras (tools, system prompt, model params) that also shape the turn. This is exactly what the model saw.response— the resolvedAIMessagereturned by the handler, captured as a whole (resolved message, not per-chunk frames; keeps the streaming core untouched).
The sink is read lazily inside the middleware (per call), so when no TUI debug panel is attached the middleware is a transparent pass-through and the normal path pays nothing.
Methods
Section titled “Methods”onRequest()?
Section titled “onRequest()?”
optionalonRequest(messages,extras?):void
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/dist/core/debugCapture.d.ts:64
The full message history sent to the model for this call, plus the request extras.
Parameters
Section titled “Parameters”messages
Section titled “messages”BaseMessage<MessageStructure<MessageToolSet>, MessageType>[]
extras?
Section titled “extras?”Returns
Section titled “Returns”void
onResponse()?
Section titled “onResponse()?”
optionalonResponse(response):void
Defined in: _worktrees/docs-release/gaunt-sloth/packages/core/dist/core/debugCapture.d.ts:66
The resolved model response for this call (an AIMessage).
Parameters
Section titled “Parameters”response
Section titled “response”unknown
Returns
Section titled “Returns”void