SessionDevtools
Development hooks a host passes to follow or drive a session.
import type { SessionDevtools } from '@threadplane/ag-ui';Declaration
export interface SessionDevtools {
report?(cause: string, changed: readonly string[]): void;
takeScriptedRun?(): ScriptedRun | null | undefined;
}Members
report · overload 1
Called after each publication with what caused it and the names of the
snapshot fields that changed. The cause is a protocol event's type, or
run:start, run:end, history or reset for a change no event
caused. Values are never passed. Publications that change no listed
field are not reported.
report?(cause: string, changed: readonly string[]): void;Parameters
cause· requiredstringchanged· requiredreadonly string[]
Returns
voidtakeScriptedRun · overload 1
Asked before each request. A run it returns is served in place of the
network, through the same pipeline; its RUN_STARTED and RUN_FINISHED
take the request's own thread and run identifiers.
takeScriptedRun?(): ScriptedRun | null | undefined;Returns
ScriptedRun | null | undefined