/** * EVO-1 inbox-wake handler (durable bug #3) — the glue between the pure * `decideInboxWake` (core) and a `H2ADriver`. On each call it reads the inbox, * decides whether anything is new, and if so injects a **signed** drive line * carrying the h2a-tagged wake prompt via the injected driver. * * Driver-injected → unit-testable with `loggingDriver`/a fake; the real wake * (waking a live claude/codex) is the `nativeBackchannelDriver` + a live-host * smoke. Seeds `seen` from the inbox at construction so it does NOT wake on the * boot backlog — only on arrivals after the handler is wired. */ import { type H2AEnvelope, type H2ALaunchContext } from "@sentropic/h2a"; import { type H2ADriver } from "./index.js"; export interface InboxWakeHandlerDeps { /** This agent's instance id (signer + drive target — it wakes itself). */ readonly instance: string; /** Read the current inbox for `instance` (e.g. `() => store.readInbox(instance)`). */ readonly readInbox: () => H2AEnvelope[]; /** Private key PEM for signing the drive line (from the local keyring). */ readonly privateKeyPem: string; /** Injected driver (logging / native / command / …). */ readonly driver: H2ADriver; /** Optional host hint passed to the driver. */ readonly host?: string; /** * Resolve the host's own launch context (its tmux pane) so the * local-tmux/native driver can target it. */ readonly resolveLaunchContext?: () => H2ALaunchContext | undefined; /** Clock (drive nonce/at + wake tag). Defaults to `Date.now`. */ readonly now?: () => number; readonly log?: (line: string) => void; } /** Returns a handler; calling it injects a wake iff new inbox envelopes exist. */ export declare function createInboxWakeHandler(deps: InboxWakeHandlerDeps): () => Promise; //# sourceMappingURL=inbox-wake.d.ts.map