A2ATaskPanel
Single A2A Task detail surface mirroring the spec's Task object: identity header (task id + contextId + TaskStateBadge), role-turned message history in ChatMessage conventions, artifact list delegating each artifact to ArtifactViewer, and a mono key/value metadata block. Temporal spine — a task is a thing moving through time.
import { A2ATaskPanel } from "@nodus/design-system/patterns"Props
| Prop | Type | Default | Description |
|---|---|---|---|
idreq | string | — | A2A Task identifier. |
contextIdreq | string | — | Context (conversation/thread) identifier grouping related tasks. |
statusreq | 'submitted' | 'working' | 'input-required' | 'auth-required' | 'completed' | 'failed' | 'canceled' | 'rejected' | 'unknown' | — | Current A2A TaskState, rendered via TaskStateBadge. |
historyreq | Array<{ role: 'user' | 'agent'; parts: A2APart[] }> | — | Role-turned message history in wire order. Text parts render as body text; other kinds as chips. |
artifactsreq | Array<{ artifactId: string; name?: string; parts: A2APart[] }> | — | Artifacts attached to the task — each delegates to ArtifactViewer. |
metadata | Record<string, unknown> | — | Optional extension metadata, rendered as a mono key/value block. |
idrequiredstringDefault —A2A Task identifier.
contextIdrequiredstringDefault —Context (conversation/thread) identifier grouping related tasks.
statusrequired'submitted' | 'working' | 'input-required' | 'auth-required' | 'completed' | 'failed' | 'canceled' | 'rejected' | 'unknown'Default —Current A2A TaskState, rendered via TaskStateBadge.
historyrequiredArray<{ role: 'user' | 'agent'; parts: A2APart[] }>Default —Role-turned message history in wire order. Text parts render as body text; other kinds as chips.
artifactsrequiredArray<{ artifactId: string; name?: string; parts: A2APart[] }>Default —Artifacts attached to the task — each delegates to ArtifactViewer.
metadataRecord<string, unknown>Default —Optional extension metadata, rendered as a mono key/value block.
This component was designed to express:
Explore Related
Badge for the nine A2A protocol TaskStates (submitted, working, input-required, auth-required, completed, failed, canceled, rejected, unknown). Extends the StateBadge anatomy with protocol-grouped semantic colors; exports a taskStateGroup helper for branching on active/interrupted/terminal.
Part-type-aware renderer for the A2A Artifact model ({artifactId, name?, parts}): text parts as a typographic block, data parts as DataList-convention key/value rows, file parts as a mediaType + uri chip (never fetched), unknown kinds as a warning row. Validation-gold accent — an artifact is enriched output. The appending prop shows a StreamingDot tail while artifact-update appends arrive.
Ordered task list with status tracking and priority
Conversational message bubble for human or AI sender