/** * routes/calendar-composition.ts, the daemon's own calendar connection. * * Assembling it here rather than in the runtime composition root keeps one * property visible: the daemon reads the connection from the DAEMON tier and * from nowhere else. `configManager.get` and `secretsManager.get` both resolve * against the daemon's own stores, and every path and secret name the * connector uses is daemon-owned (see `config/config-ownership.ts`), so a * setup performed in any surface, the agent, the TUI, the web UI, is * readable here the moment it lands, and stays readable after that surface has * exited. That is the whole point: the runtime that has to answer mail at 3am * is not the one the operator did the setup in. * * Returns `null` when the composition is too narrow to reach a real store, so * the verbs simply stay unregistered rather than half-wired. * * Two backends can answer, and this is where one is chosen: a CalDAV server * when `surfaces.calendar.caldavUrl`/`caldavUser` are set, a connected Google * account otherwise. The five verbs behave identically either way, that is the * point of the `CalendarGatewayService` slice, so the choice is invisible * above this line. */ import { type GoogleCalendarGatewayServiceOptions } from '../../google/gateway-calendar-service.js'; import type { CalDavHttpPort } from '../../google/caldav-client.js'; import { type UntrustedContentLedger } from '../../security/untrusted-content.js'; import type { CalendarGatewayService } from './calendar.js'; /** The slice of the verb-group deps this composition needs. */ export interface CalendarCompositionDeps { readonly configManager: { get(key: never): unknown; }; readonly secretsManager: { get(key: string): Promise; }; /** Absent in narrow compositions; the adoption probe needs a real home. */ readonly homeDirectory?: string | undefined; /** Test seam: overrides the whole service, so no real store is touched. */ readonly calendarGateway?: CalendarGatewayService | undefined; /** Test seam: overrides the injected fetch. */ readonly calendarFetch?: GoogleCalendarGatewayServiceOptions['fetch'] | undefined; /** Test seam: overrides the CalDAV transport, so no socket is opened. */ readonly caldavHttp?: CalDavHttpPort | undefined; /** * Test seam: the ledger calendar reads are recorded into. Defaults to the * process-wide one, which is what production wants; tests pass their own so * one case's calendar read cannot make the next case's outward action refuse. */ readonly untrustedContentLedger?: UntrustedContentLedger | undefined; } export declare function createDaemonCalendarGatewayService(deps: CalendarCompositionDeps): CalendarGatewayService | null; //# sourceMappingURL=calendar-composition.d.ts.map