Files
tools-legacy/openspec/changes/archive/2026-10-02-fpagent-device-availability/proposal.md
T

44 lines
1.6 KiB
Markdown
Raw Normal View History

# Proposal: fpagent-device-availability
## Why
fpagent now reports whether a supported fingerprint reader is attached, as
`fprint-device-status {available, device, captureAgentId}`, sent to each portal
client on connect and whenever availability changes. The wizard does not consume
it: the header tag reflects only the socket connection, so a connected agent
with no scanner still reads "Agent connected" and capture is allowed, failing
only when the enrollment reaches the reader. Operators need to see that the
scanner is missing before they try.
## What Changes
- The wizard consumes `fprint-device-status` and tracks availability and the
device name alongside the connected state.
- The header status tag distinguishes agent offline, connected with no scanner,
and ready.
- While no supported reader is attached, the capture panel shows a warning and
the capture/recapture controls are disabled; the capture handler refuses a
racing attempt.
## Capabilities
### New Capabilities
(none)
### Modified Capabilities
- `fingerprint-wizard`: shows scanner availability from `fprint-device-status`
and gates capture on a supported reader being attached.
## Impact
- `tools/public/assets/fp/app.js`: handle the event, a multi-state status tag,
and a gated `capture()`.
- `tools/public/assets/fp/index.html`: disabled controls and an inline warning
when no reader is attached.
- `README.md`, `tools/public/assets/help.html`: document the behavior.
- Depends on `fingerprint-agent`'s `fprint-device-status` event (change
`scanner-hotplug-recovery`). Agents that do not emit it are tolerated:
availability stays unknown and captures are not blocked.