import{type TemplateResult,type PropertyValues}from'lit';import type{AgentStatusKind}from'../../../ai/types.js';import{LyraElement,type LyraEventDetailSnapshot}from'../../../internal/lyra-element.js';import type{LyraFrame}from'../../../internal/variants.js';import'../../overlays/badge/badge.class.js';import'../../overlays/empty/empty.class.js';import type{AgentRunActivateDetail}from'../run-events.js';export interface SubagentRun{readonly id:string;readonly parentId?:string;readonly label:string;readonly status:AgentStatusKind;readonly task?:string;readonly model?:string; /** Completion ratio in the inclusive 0..1 range. */ readonly progressRatio?:number;readonly startedAt?:number;readonly endedAt?:number;readonly metadata?:Readonly>;}export interface LyraSubagentPanelEventMap{'lr-run-activate':CustomEvent>>;'lr-cancel':CustomEvent>;'lr-run-retry':CustomEvent>;} /** * `` — a controlled hierarchy of nested agent runs with lifecycle status, * task/model context, progress, selection, cancellation, and retry intents. Runs with empty ids * are omitted and later duplicate ids are ignored before hierarchy, focus, counts, and events. * * Public collection properties take bounded, clone-owned readonly snapshots. Create a new * collection and reassign it after changes; mutating the assigned array does not update the view. * * @customElement lr-subagent-panel * @event lr-run-activate - A complete subagent run was activated. `detail: { runId, run }`. * @event lr-cancel - Cancellation was requested for an active run. * @event lr-run-retry - Retry was requested for an errored/cancelled run. * @csspart base - The named subagent region. * @csspart list - Hierarchical run list. * @csspart run - One run. * @csspart run-selected - The selected run. * @csspart run-row - Run content and actions. * @csspart run-trigger - Run selection action. * @csspart label - Run label. * @csspart status - Lifecycle status badge. * @csspart task - Caller-supplied task text. * @csspart model - Caller-supplied model id. * @csspart progress - Progress indicator. * @csspart actions - Run actions. * @csspart cancel - Cancellation action. * @csspart retry - Retry action. * @csspart limit - Resource-ceiling status shown when additional runs are omitted. * @csspart empty - The empty state. * @cssprop [--lr-subagent-panel-selected-border=var(--lr-color-brand)] - Selected run border. * @cssprop [--lr-subagent-panel-progress-track=var(--lr-color-border)] - Progress track. * @cssprop [--lr-subagent-panel-progress-fill=var(--lr-color-brand)] - Progress fill. * @cssprop [--lr-subagent-panel-compact-trigger-padding=var(--lr-space-2xs) var(--lr-space-s)] - * `[part="run-trigger"]` padding while `compact`. * @cssprop [--lr-subagent-panel-compact-trigger-gap=var(--lr-space-2xs)] - Gap between * `[part="run-trigger"]`'s label/status/task/model/progress while `compact`. * @cssprop [--lr-subagent-panel-compact-font-size=var(--lr-font-size-2xs)] - `[part="task"]`/ * `[part="model"]` font size while `compact`. * @cssprop [--lr-subagent-panel-compact-action-padding=var(--lr-space-2xs)] - `[part="cancel"]`/ * `[part="retry"]` padding while `compact`. * @cssprop [--lr-subagent-panel-background=var(--lr-color-surface)] - Resting fill of each run * row's trigger and action buttons. Hover and press follow * `--lr-subagent-panel-hover-background`, so retune both together. * @cssprop [--lr-subagent-panel-hover-background=var(--lr-color-surface-raised)] - Hovered fill of * each run row's trigger and action buttons. The pressed fill is this value mixed a further * `--lr-color-mix-active` toward `--lr-color-mix-partner`, so retuning hover carries the press * with it. * @cssprop [--lr-subagent-panel-border-color=var(--lr-color-border)] - Colour of each run row's * border and of its action divider. A selected row still uses * `--lr-subagent-panel-selected-border`. * @cssprop [--lr-subagent-panel-radius=var(--lr-radius)] - Corner radius of each run row. * `frame="plain"` still squares the corners. * @status stable * @since 7.0.0 */ export declare class LyraSubagentPanel extends LyraElement{protected static readonly ownedCollectionProperties:readonly string[];static styles:import("lit").CSSResultGroup[];protected static readonly immutableEventDetails:readonly string[];runs:readonly SubagentRun[];selectedRunId:string|null; /** Optional accessible-name override for the `role="tree"` element. Omission localizes the * default; any supplied string, including `''`, is rendered verbatim. */ label?:string; /** Tighter run-row padding/gaps and smaller task/model text -- same convention as * `lr-task-list`/`lr-stack-trace`/`lr-thinking-panel`/`lr-terminal`'s `compact`. Defaults to * `false`, i.e. full padding. Purely a density knob: each row's own border stays, so use * `frame="plain"` instead to drop the chrome entirely. */ compact:boolean; /** Visual chrome for each run row, in the library's shared container-frame vocabulary. `'card'` * (the default) keeps each row's own border/radius; `'plain'` drops it, for a transcript or * message-bubble context that already draws its own border around a nested * `` and would otherwise double it. */ frame:LyraFrame; /** Roving-tabindex focus target. `null` defaults the first rendered row to `tabindex="0"`. */ private focusedId; /** * Cache of `ordered()`'s result, refreshed only in `willUpdate()` when `runs` changes. Reading * this instead of recomputing avoids re-flattening/re-validating the whole tree on every * keystroke (`onKeyDown`) and every render. */ private orderedRunsCache;private announcementSink?;private previousLimitText;private suppressNextLimitAnnouncement;private syncAnnouncementSink;connectedCallback():void;disconnectedCallback():void;private statusLabel;private ordered;protected willUpdate(changed:PropertyValues):void;protected updated(_changed:PropertyValues):void;private runElement;private focusRow;private onKeyDown;private onFocusIn;private renderRun;render():TemplateResult;}declare global{interface HTMLElementTagNameMap{'lr-subagent-panel':LyraSubagentPanel;}}