import { type AgentKind } from '@lobu/core/contracts/worker/device-automation'; import type { PollResponse } from '@lobu/core/contracts/worker/protocol'; import { MutableWorkerAdvertisementProvider } from './client.js'; import { WorkerPollLoop } from './poll-loop.js'; import { NativeBridgeClient } from './native-bridge/client.js'; import { NATIVE_BRIDGE_PROTOCOL } from './native-bridge/protocol.js'; export declare const MAC_DEVICE_PLATFORM = "macos"; export declare const INTERNAL_ACP_ADAPTER_ARG = "--internal-acp-adapter"; export interface MacDeviceDaemonOptions { apiUrl?: string; workerId?: string; workerApiToken?: string; version: string; pollIntervalMs?: number; maxConcurrentJobs?: number; defaultAgentKind?: AgentKind; debug?: boolean; noPoll?: boolean; supervisedStdio?: boolean; } export interface MacDeviceDaemonMetadata { name: 'lobu-device-daemon'; version: string; protocol: typeof NATIVE_BRIDGE_PROTOCOL; platform: typeof MAC_DEVICE_PLATFORM; artifact: 'standalone-bun-macho-arm64'; } export declare function macDeviceDaemonMetadata(version: string): MacDeviceDaemonMetadata; /** * Argv for re-entering this daemon's own entrypoint. A compiled artifact is its * own interpreter, so the internal argument stands alone; running from source * needs the script path back in front of it. */ export declare function packagedDaemonArgs(...args: string[]): string[]; export declare function selectMacDeviceDaemonAgentKind(runnableAgentKinds: readonly AgentKind[], explicitAgentKind?: AgentKind): AgentKind | undefined; export declare function createMacDeviceDaemonShutdown(controller: AbortController, loop: WorkerPollLoop, bridge?: NativeBridgeClient, shutdownTimeoutMs?: number): () => Promise; export declare function validateMacDeviceDaemonOptions(options: MacDeviceDaemonOptions): Required> & Omit; /** * Whether the native bridge implements this run's connector. * * The daemon answers from the inventory the Mac app itself declared over the * bridge — the same manifests it advertises to the gateway — so what it will * execute and what it claims to offer cannot drift apart. It used to answer * from a routing marker the gateway derived from the connector manifest, which * meant the implementation had to be written into the manifest and hashed into * the contract's identity; a contract carrying its implementation cannot be * shared with a second endpoint. * * A payload carrying `compiled_code` is not bridge work by construction: the * gateway ships code only for connectors the device does NOT implement. */ export declare function bridgeImplementsRun(job: PollResponse, advertisementProvider: MutableWorkerAdvertisementProvider | undefined): boolean; export declare function createMacDeviceDaemon(options: MacDeviceDaemonOptions, dependencies?: { advertisementProvider?: MutableWorkerAdvertisementProvider; bridge?: NativeBridgeClient; shutdownController?: AbortController; }): WorkerPollLoop; export declare function runMacDeviceDaemon(options: MacDeviceDaemonOptions): Promise; //# sourceMappingURL=mac-device-daemon.d.ts.map