/** * Local-socket client used by `loopsy shell` and (later) `loopsy attach`. * * Connects to the daemon's Unix-domain socket, negotiates a session, * and pipes the current terminal: stdin → daemon → PTY → daemon → stdout. * On the configured detach key (default Ctrl-A D) the client drops the * connection and restores the terminal mode; the PTY keeps running on * the daemon side so the user (or a phone) can attach again. */ export interface OpenSessionOptions { /** Socket path. Defaults to `~/.loopsy/loopsyd.sock`. */ socketPath?: string; /** Either create a new session… */ spawn?: { agent: string; cwd?: string; extraArgs?: string[]; customCommandId?: string; name?: string; }; /** …or attach an existing one (by uuid or name). Exactly one of spawn / attach must be set. */ attach?: { idOrName: string; }; /** * Override the detach trigger. Pass `null` to disable (only way to * detach is to close the host terminal, which keeps the PTY alive * but there's no graceful "back to your shell" UX). The default * matches screen/tmux conventions. */ detachKey?: 'ctrl-a-d' | null; } export declare function defaultSocketPath(): string; /** * Run an interactive session against the daemon. Resolves to the PTY * exit code when the daemon reports one, or `null` if the user * detached. Throws if the socket can't be reached. */ export declare function runInteractive(opts: OpenSessionOptions): Promise; /** * Send a single JSON command to the daemon and resolve to the first JSON * response. Used by `loopsy list`, `loopsy kill`, etc. — anything that * doesn't need a long-lived attachment. Throws if the socket can't be * reached, the daemon disconnects without replying, or the reply is a * `session-error`. */ export declare function oneShotQuery(request: object, opts?: { socketPath?: string; timeoutMs?: number; }): Promise; //# sourceMappingURL=local-client.d.ts.map