import { z } from 'zod';
import { type InferProvider } from './capability-definition.js';
/**
 * `home-assistant` — collection cap exposing a long-lived WebSocket
 * connection to a Home Assistant instance.
 *
 * Backed by `@camstack/addon-home-assistant` (home-assistant-js-websocket
 * wrapper). Collection mode supports multi-HA deployments (e.g. one
 * per house / per site).
 *
 * ON-DEMAND CONNECTION: the addon opens the WebSocket on the first
 * `subscribeEvents` / `callService` / `getStates` call. Stays open
 * while at least one subscription is active OR the operator
 * configured `keepOpen`.
 *
 * SUBSCRIPTION OWNERSHIP: `subscribeEvents` returns a unique
 * `subscriptionId`. Multiple consumers can share the same upstream
 * event-type subscription (HA dispatches it once over the wire);
 * the addon refcounts the upstream sub and tags emitted events with
 * `subscriptionIds[]` so consumers filter precisely without leaking
 * messages between unrelated callers.
 */
declare const HaServiceCallSchema: z.ZodObject<{
    domain: z.ZodString;
    service: z.ZodString;
    serviceData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    target: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
}, z.core.$strip>;
declare const HaStateSchema: z.ZodObject<{
    entity_id: z.ZodString;
    state: z.ZodString;
    attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
    last_changed: z.ZodOptional<z.ZodString>;
    last_updated: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const HaStatusSchema: z.ZodObject<{
    connected: z.ZodBoolean;
    host: z.ZodString;
    subscriptionCount: z.ZodNumber;
    error: z.ZodOptional<z.ZodString>;
    haVersion: z.ZodOptional<z.ZodString>;
    connectedAt: z.ZodOptional<z.ZodNumber>;
}, z.core.$strip>;
declare const HaSubscribeInputSchema: z.ZodObject<{
    eventType: z.ZodOptional<z.ZodString>;
    owner: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
declare const HaSubscribeResultSchema: z.ZodObject<{
    success: z.ZodLiteral<true>;
    subscriptionId: z.ZodString;
}, z.core.$strip>;
declare const HaUnsubscribeInputSchema: z.ZodObject<{
    subscriptionId: z.ZodString;
}, z.core.$strip>;
declare const HaSubscriptionInfoSchema: z.ZodObject<{
    subscriptionId: z.ZodString;
    eventType: z.ZodString;
    owner: z.ZodString;
    createdAt: z.ZodNumber;
}, z.core.$strip>;
export declare const homeAssistantCapability: {
    readonly name: "home-assistant";
    readonly scope: "system";
    readonly mode: "collection";
    readonly internal: true;
    readonly methods: {
        /**
         * Subscribe to HA events. Returns a `subscriptionId` to pass to
         * `unsubscribeEvents`. The addon refcounts upstream subscriptions
         * so multiple consumers share one HA-side event stream.
         * Events arrive on the kernel bus under `home-assistant.event`
         * with `subscriptionIds[]` listing which subs matched.
         */
        readonly subscribeEvents: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            eventType: z.ZodOptional<z.ZodString>;
            owner: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, z.ZodObject<{
            success: z.ZodLiteral<true>;
            subscriptionId: z.ZodString;
        }, z.core.$strip>, "mutation">;
        /** Release a specific subscription. Tears down the upstream sub
         *  only when the last owner releases. Idempotent. */
        readonly unsubscribeEvents: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            subscriptionId: z.ZodString;
        }, z.core.$strip>, z.ZodObject<{
            success: z.ZodLiteral<true>;
        }, z.core.$strip>, "mutation">;
        /**
         * Call an HA service (turn light on, run a script, etc.). Returns
         * the HA response object — usually `{context, response: ...}`.
         */
        readonly callService: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            domain: z.ZodString;
            service: z.ZodString;
            serviceData: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            target: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
        }, z.core.$strip>, z.ZodObject<{
            result: z.ZodUnknown;
        }, z.core.$strip>, "mutation">;
        /** Fetch all entity states. Cheap snapshot — HA returns the full
         *  state registry on every call. */
        readonly getStates: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodReadonly<z.ZodArray<z.ZodObject<{
            entity_id: z.ZodString;
            state: z.ZodString;
            attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            last_changed: z.ZodOptional<z.ZodString>;
            last_updated: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
        /** Fetch a single entity's current state. `null` when not found. */
        readonly getState: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            entityId: z.ZodString;
        }, z.core.$strip>, z.ZodNullable<z.ZodObject<{
            entity_id: z.ZodString;
            state: z.ZodString;
            attributes: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
            last_changed: z.ZodOptional<z.ZodString>;
            last_updated: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>>, import("./capability-definition.js").CapabilityMethodKind>;
        /** List active per-owner subscriptions. */
        readonly listSubscriptions: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodReadonly<z.ZodArray<z.ZodObject<{
            subscriptionId: z.ZodString;
            eventType: z.ZodString;
            owner: z.ZodString;
            createdAt: z.ZodNumber;
        }, z.core.$strip>>>, import("./capability-definition.js").CapabilityMethodKind>;
        readonly getStatus: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
            connected: z.ZodBoolean;
            host: z.ZodString;
            subscriptionCount: z.ZodNumber;
            error: z.ZodOptional<z.ZodString>;
            haVersion: z.ZodOptional<z.ZodString>;
            connectedAt: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
    };
};
export type IHomeAssistantProvider = InferProvider<typeof homeAssistantCapability>;
export { HaServiceCallSchema, HaStateSchema, HaStatusSchema, HaSubscribeInputSchema, HaSubscribeResultSchema, HaUnsubscribeInputSchema, HaSubscriptionInfoSchema, };
//# sourceMappingURL=home-assistant.cap.d.ts.map