import type { DaemonVerbCaller } from './daemon-verbs.js'; /** * One paired device as the daemon describes it. * * `supported` is the field the verb actually returns, the capabilities this * node offers AND this host understands. Named as the wire names it rather than * renamed to something tidier: a rename here is a place the two can disagree, * and the disagreement would show up as "no paired phone offers this" for a * phone that offers it. */ export interface DeviceNodeSummary extends Record { readonly nodeId: string; readonly nodeKind?: string | undefined; readonly label?: string | undefined; readonly platform?: string | undefined; readonly supported?: readonly string[] | undefined; } /** One capability grant the daemon is holding. */ export interface DeviceGrantSummary { readonly grantId: string; readonly nodeId?: string | undefined; readonly capability?: string | undefined; readonly expiresAt?: number | undefined; } /** One retained capture, as the daemon describes it. */ export interface DeviceArtifactSummary extends Record { readonly artifactId: string; readonly nodeId?: string | undefined; readonly capabilityId?: string | undefined; readonly mediaType?: string | undefined; readonly byteLength?: number | undefined; /** A path on the DAEMON's filesystem. Reported, never opened from here. */ readonly daemonPath?: string | undefined; } /** * The runtime's answer to a capability request, verbatim. * * `ok: false` carries `refusal` (the runtime's code) and `detail` (its own * words). That is a real outcome, not a transport failure, so it arrives as a * value rather than a throw. */ export interface DeviceCapabilityOutcomeWire extends Record { readonly ok: boolean; readonly nodeId?: string | undefined; readonly capabilityId?: string | undefined; readonly capabilityTitle?: string | undefined; readonly authority?: string | undefined; readonly grantId?: string | null | undefined; readonly data?: unknown; readonly artifact?: DeviceArtifactSummary | null | undefined; readonly refusal?: string | undefined; readonly detail?: string | undefined; } export interface DevicesClient { /** Paired device nodes. Empty (with a logged reason) when the daemon cannot answer. */ listNodes(): Promise; /** Live capability grants. Empty (with a logged reason) when the daemon cannot answer. */ listGrants(): Promise; /** Revoke a grant. Rejects when no daemon is reachable, never reports a revoke that did not happen. */ revokeGrant(grantId: string): Promise; /** Run the grant/capture reap now. Rejects when no daemon is reachable. */ runHousekeeping(): Promise>; /** * Ask one paired device for one capability. Rejects only on a TRANSPORT * failure; a refusal by the person or the policy comes back as `ok: false`. */ requestCapability(input: { readonly nodeId: string; readonly capabilityId: string; readonly reason: string; readonly input?: Record | undefined; readonly sessionId?: string | undefined; readonly timeoutMs?: number | undefined; }): Promise; /** Retained captures, newest first. Empty (with a logged reason) when unreachable. */ listArtifacts(options?: { readonly nodeId?: string; readonly limit?: number; }): Promise<{ readonly artifacts: readonly DeviceArtifactSummary[]; readonly retained: number; readonly retentionHours: number; }>; /** Fetch a capture's bytes, base64-encoded. Rejects when it cannot be served. */ readArtifact(artifactId: string): Promise<{ readonly artifact: DeviceArtifactSummary; readonly dataBase64: string; }>; /** Whether a daemon is reachable at all, with the honest reason when not. */ describeAvailability(): string | null; } export declare function createDevicesClient(verbs: DaemonVerbCaller): DevicesClient; //# sourceMappingURL=devices-client.d.ts.map