provider_capability.svelte.ts view source
import {ProviderCapability} from '@fuzdev/zzz/provider_capability.svelte.js'; Per-provider availability capability, derived from the backend's
provider_status. Plain reactive class — not a Cell: it has no
persisted state, everything is $derived from
app.lookup_provider_status(name). One instance per ProviderName
lives in Capabilities.providers, collapsing what were three
hand-rolled claude/chatgpt/gemini $derived blocks plus their
init_*_check/check_* pairs into a single keyed shape.
inheritance
Capability<null | undefined>app
type Frontend
name
type ProviderName
message_id
type JsonrpcRequestId | null
status
type AsyncStatus
data
null available, undefined unknown — matches the Capability data contract.
type null | undefined
error_message
type string | null
updated
type number | null
constructor
type new (options: ProviderCapabilityOptions): ProviderCapability
options
init_check
Check availability only if it hasn't been checked before
(when status is 'initial').
type (): Promise<void>
Promise<void>check
Check availability by loading provider status from the backend.
type (): Promise<void>
Promise<void>