<!-- GENERATED by scripts/build-llms.mjs from llms/agent-tools.md — do not edit this file. -->

# `lr-approval-queue`

- **Import** `import '@aceshooting/lyra-ui/components/lr-approval-queue.js';` (stable tag alias; registers the tag)
- **Class** `LyraApprovalQueue`, also available unregistered from `@aceshooting/lyra-ui/components/agent-tools/approval-queue/approval-queue.class.js`
- **Family** `components/agent-tools/` — see `llms/index.md` for its siblings
- **Status** `stable` since `6.2.0` — see the maturity and deprecation policy in `llms/shared.md`
- **Release history** [CHANGELOG.md](../../CHANGELOG.md); family-wide breaking-change summaries: [llms-full.txt](../../llms-full.txt)
- **Deprecations** none
- **Optional peers** none
- **Themeable via** 11 parts, 1 custom property — see this component's own `@csspart`/`@cssprop` list below
- **Library-wide behavior** (events, form association, `locale`/`strings`, tokens, TS types): `llms/shared.md`

---

## `lr-approval-queue`

Keyboard-accessible queue of pending tool calls backed by one reusable `lr-tool-approval-dialog`.
It never executes tools or persists decisions.

**Properties:** `requests: ToolApprovalRequest[] = []` (attribute: false), where each request is
`{ id, toolName, args, status?: 'pending' | 'approved' | 'denied' }`;
`selectedInvocationId: string | null = null` (attribute `selected-invocation-id`);
`open: boolean = false`; `editable: boolean = true`; `label?: string` — omission localizes the
heading while an explicit empty string renders no heading/name. Later duplicate request
ids and empty/blank ids are omitted before count, selection, dialog lookup, or decision events are
derived.

**Events:** `lr-approval-select` (`{ invocationId }`), `lr-approval-decision` (`{ invocationId,
approved, args? }`), and `lr-approval-close` (`{ invocationId, reason }`).
`lr-approval-decision` is cancelable; calling `preventDefault()` vetoes the nested approve/deny
request and keeps the decision dialog pending.

Resolved rows (`approved`/`denied`) are never actionable. Replacing `requests` reconciles stale
selection and dialog state before another activation can use it; a request that disappears or is
resolved while open closes the dialog, and reentrant host updates during selection cannot reopen a
stale request.

**CSS parts:** `base`, `heading-row`, `heading`, `count`, `list`, `request`, `request-info`,
`tool-name`, `request-id`, `status`, `empty`. The `[part='request']` row matching
`selectedInvocationId`
carries both `data-selected="true"` (the styling hook) and `aria-current="true"` (the semantic
state), so the selection is announced, not merely painted. Other request rows explicitly render
`data-selected="false"` and `aria-current="false"`.

**Additional API surface:**

- `--lr-approval-queue-selected-border` — Selected request border. Default: `var(--lr-color-brand)`.
