capabilities.svelte.ts view source
A class that encapsulates system capabilities detection and management. This is NOT generic or extensible - it contains hardcoded logic for all capabilities the system supports.
inheritance
Cell<typeof CapabilitiesJson>
backend
type Capability<ServerCapabilityData | null | undefined>
websocket
WebSocket capability that derives its state from the socket.
type Capability<WebsocketCapabilityData | null | undefined>
filesystem
The filesystem capability derives its state from the backend and zzz_dir.
type Capability<FilesystemCapabilityData | null | undefined>
ollama
Ollama capability that derives its state from provider_status (authoritative) and app.ollama (for richer data when available).
type Capability<OllamaCapabilityData | null | undefined>
claude
Claude capability that derives its state from provider_status.
type Capability<null | undefined>
chatgpt
ChatGPT capability that derives its state from provider_status.
type Capability<null | undefined>
gemini
Gemini capability that derives its state from provider_status.
type Capability<null | undefined>
pings
Store pings - both pending and completed.
type Array<PingData>
latest_ping_time
Most recent completed ping round trip time in milliseconds.
type number | null
completed_pings
Completed pings (for display).
type Array<PingData>
pending_ping_count
Number of pending pings.
type number
has_pending_pings
Has pending pings.
type boolean
backend_available
Convenience accessor for backend availability.
undefined means uninitialized, null means loading/checking.
boolean indicates if available.
type boolean | null | undefined
ollama_available
Convenience accessor for ollama availability.
undefined means uninitialized, null means loading/checking.
boolean indicates if available.
type boolean | null | undefined
websocket_available
Convenience accessor for websocket availability.
undefined means uninitialized, null means loading/checking.
boolean indicates if the socket is actively connected.
type boolean | null | undefined
filesystem_available
Convenience accessor for filesystem availability.
undefined means uninitialized, null means loading/checking.
boolean indicates if filesystem is available.
type boolean | null | undefined
ollama_models
Latest Ollama model list response, if available.
type Array<{
name: string;
size: number;
model_response: OllamaListResponseItem;
}>
constructor
type new (options: CellOptions<ZodObject<{ id: ZodDefault<$ZodBranded<ZodUUID, "Uuid">>; created: ZodDefault<$ZodBranded<ZodISODateTime, "Datetime">>; updated: ZodDefault<...>; }, $strict>>): Capabilities
options
CellOptions<ZodObject<{ id: ZodDefault<$ZodBranded<ZodUUID, "Uuid">>; created: ZodDefault<$ZodBranded<ZodISODateTime, "Datetime">>; updated: ZodDefault<...>; }, $strict>>init_backend_check
Check backend availability only if it hasn't been checked before. (when status is 'initial')
type (): Promise<void>
Promise<void>check_backend
Check backend availability with a ping.
type (): Promise<void>
Promise<void>init_ollama_check
Check Ollama availability only if it hasn't been checked before. (when status is 'initial')
type (): Promise<void>
Promise<void>check_ollama
Check Ollama availability by loading provider status and refreshing models.
type (): Promise<void>
Promise<void>handle_ping_sent
type (request_id: string | number): void
request_id
string | numbervoidhandle_ping_received
type (ping_id: string | number): void
ping_id
string | numbervoidhandle_ping_error
type (ping_id: string | number, error_message: string): void
ping_id
string | numbererror_message
stringvoidreset_backend
Reset just the backend capability to uninitialized state.
type (): void
voidinit_claude_check
Check Claude availability only if it hasn't been checked before.
type (): Promise<void>
Promise<void>check_claude
Check Claude availability by loading provider status.
type (): Promise<void>
Promise<void>init_chatgpt_check
Check ChatGPT availability only if it hasn't been checked before.
type (): Promise<void>
Promise<void>check_chatgpt
Check ChatGPT availability by loading provider status.
type (): Promise<void>
Promise<void>init_gemini_check
Check Gemini availability only if it hasn't been checked before.
type (): Promise<void>
Promise<void>check_gemini
Check Gemini availability by loading provider status.
type (): Promise<void>
Promise<void>