/**
 * mesh-network — collection cap for mesh-VPN providers.
 *
 * Different shape from `network-access` (public tunnels):
 *
 *   • `network-access` exposes ONE public URL the operator hands to
 *     external clients. start/stop spawns a single edge process.
 *
 *   • `mesh-network` joins the host into a private mesh (Tailscale,
 *     Headscale, ZeroTier). The result is one or more *private*
 *     endpoints (mesh IP `100.x.x.x`, MagicDNS hostname) reachable
 *     only by peers on the same mesh. Optionally, providers that
 *     support it (Tailscale Funnel / Serve) also expose a public
 *     ingress for select ports.
 *
 * Singleton facade lives in `mesh-orchestrator.cap.ts`.
 */
import { z } from 'zod';
import { type InferProvider } from './capability-definition.js';
/**
 * A reachable endpoint on the mesh. A single provider may expose
 * multiple (mesh IP + MagicDNS hostname + Funnel public URL).
 */
declare const MeshEndpointSchema: z.ZodObject<{
    id: z.ZodString;
    label: z.ZodString;
    scope: z.ZodEnum<{
        public: "public";
        mesh: "mesh";
    }>;
    url: z.ZodString;
    hostname: z.ZodString;
    port: z.ZodNumber;
    protocol: z.ZodEnum<{
        http: "http";
        https: "https";
    }>;
}, z.core.$strip>;
export type MeshEndpoint = z.infer<typeof MeshEndpointSchema>;
declare const MeshPeerSchema: z.ZodObject<{
    id: z.ZodString;
    hostname: z.ZodString;
    addresses: z.ZodReadonly<z.ZodArray<z.ZodString>>;
    os: z.ZodOptional<z.ZodString>;
    online: z.ZodBoolean;
    lastSeenMs: z.ZodNumber;
    isSelf: z.ZodBoolean;
}, z.core.$strip>;
export type MeshPeer = z.infer<typeof MeshPeerSchema>;
declare const MeshStatusSchema: z.ZodObject<{
    joined: z.ZodBoolean;
    meshIp: z.ZodString;
    magicDnsHostname: z.ZodString;
    peerCount: z.ZodNumber;
    endpoints: z.ZodReadonly<z.ZodArray<z.ZodObject<{
        id: z.ZodString;
        label: z.ZodString;
        scope: z.ZodEnum<{
            public: "public";
            mesh: "mesh";
        }>;
        url: z.ZodString;
        hostname: z.ZodString;
        port: z.ZodNumber;
        protocol: z.ZodEnum<{
            http: "http";
            https: "https";
        }>;
    }, z.core.$strip>>>;
    error: z.ZodOptional<z.ZodString>;
}, z.core.$strip>;
export type MeshStatus = z.infer<typeof MeshStatusSchema>;
/**
 * `mesh-network` — per-provider implementation. Tailscale registers
 * one (and only one) entry. Future Headscale / ZeroTier addons would
 * register their own entries.
 */
export declare const meshNetworkCapability: {
    readonly name: "mesh-network";
    readonly scope: "system";
    readonly mode: "collection";
    readonly methods: {
        /** Return the current join state + endpoints + peer count. Cheap
         *  poll-target — admin UI hits this every few seconds. */
        readonly getStatus: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
            joined: z.ZodBoolean;
            meshIp: z.ZodString;
            magicDnsHostname: z.ZodString;
            peerCount: z.ZodNumber;
            endpoints: z.ZodReadonly<z.ZodArray<z.ZodObject<{
                id: z.ZodString;
                label: z.ZodString;
                scope: z.ZodEnum<{
                    public: "public";
                    mesh: "mesh";
                }>;
                url: z.ZodString;
                hostname: z.ZodString;
                port: z.ZodNumber;
                protocol: z.ZodEnum<{
                    http: "http";
                    https: "https";
                }>;
            }, z.core.$strip>>>;
            error: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
        /**
         * Join the host to the provider's mesh using a one-time auth key
         * (generated by the operator in the provider's admin dashboard).
         * Implementations should be idempotent — re-calling with the same
         * key while already joined is a no-op + success.
         */
        readonly join: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            authKey: z.ZodString;
            hostname: z.ZodOptional<z.ZodString>;
        }, z.core.$strip>, z.ZodObject<{
            joined: z.ZodLiteral<true>;
        }, z.core.$strip>, "mutation">;
        /** Leave the mesh. After this the meshIp/magicDnsHostname/etc.
         *  vanish until the next `join`. */
        readonly leave: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
            left: z.ZodLiteral<true>;
        }, z.core.$strip>, "mutation">;
        /** Enumerate every peer the daemon currently knows about. */
        readonly listPeers: import("./capability-definition.js").CapabilityMethodSchema<z.ZodVoid, z.ZodObject<{
            peers: z.ZodReadonly<z.ZodArray<z.ZodObject<{
                id: z.ZodString;
                hostname: z.ZodString;
                addresses: z.ZodReadonly<z.ZodArray<z.ZodString>>;
                os: z.ZodOptional<z.ZodString>;
                online: z.ZodBoolean;
                lastSeenMs: z.ZodNumber;
                isSelf: z.ZodBoolean;
            }, z.core.$strip>>>;
        }, z.core.$strip>, import("./capability-definition.js").CapabilityMethodKind>;
        /**
         * Toggle the public ingress (e.g. Tailscale Funnel) that maps a
         * local port to the open internet via the provider's edge. Idempotent.
         */
        readonly setPublicIngress: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            enabled: z.ZodBoolean;
            port: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>, z.ZodObject<{
            success: z.ZodLiteral<true>;
        }, z.core.$strip>, "mutation">;
        /**
         * Toggle the in-mesh HTTPS ingress (e.g. Tailscale Serve) so peers
         * inside the mesh hit a valid TLS endpoint instead of the raw IP.
         */
        readonly setMeshIngress: import("./capability-definition.js").CapabilityMethodSchema<z.ZodObject<{
            enabled: z.ZodBoolean;
            port: z.ZodOptional<z.ZodNumber>;
        }, z.core.$strip>, z.ZodObject<{
            success: z.ZodLiteral<true>;
        }, z.core.$strip>, "mutation">;
    };
};
export type IMeshNetworkProvider = InferProvider<typeof meshNetworkCapability>;
export {};
//# sourceMappingURL=mesh-network.cap.d.ts.map