SubagentEvidence

Unpublished development API. This package is under development and is not available as a published release.

Borrowed child evidence and the transcript that carries each child's attributed messages.

import type { SubagentEvidence } from '@threadplane/react/chat';

Declaration

export interface SubagentEvidence<TMessage extends SubagentEvidenceMessage = SubagentEvidenceMessage>  {
  readonly earlierSubagents?: readonly SubagentEvidenceRecord[];
  readonly running?: boolean;
  readonly subagents: readonly SubagentEvidenceRecord[];
  readonly toolLabel?: (name: string) => string | undefined;
  readonly toolOutcome?: (activity: ToolActivityInfo) => ToolActivityOutcome | undefined;
  readonly transcript: readonly TMessage[];
}

Type parameters

Members

earlierSubagents

Children that settled in earlier runs or were restored with the thread, such as a native session's earlierSubagents. They come first, and a current child with the same run ID replaces its earlier record.

readonly earlierSubagents?: readonly SubagentEvidenceRecord[];

running

True while the root run is active. Without it a child with no terminal evidence is unknown, not running.

readonly running?: boolean;

subagents

readonly subagents: readonly SubagentEvidenceRecord[];

toolLabel

App-authored human labels for the children's own tool calls.

readonly toolLabel?: (name: string) => string | undefined;

toolOutcome

App-authored outcomes for the children's own completed calls, the same callback MessageList takes. Sources an outcome declares are listed in the Sources panel of the message that started the child.

readonly toolOutcome?: (activity: ToolActivityInfo) => ToolActivityOutcome | undefined;

transcript

readonly transcript: readonly TMessage[];