/** * schema-domain-connectors.ts, the mail and calendar connector's config * (`email.*`, `calendar.*`, `google.*`). * * ── What failed before this file existed ────────────────────────────────── * * The daemon really stores these keys, a Gmail app password reference, an * OAuth client id and secret reference, the private calendar feed address, * under exactly these paths, seeded at runtime onto the live config object by * `connector-config-sections.ts` (a structural cast that bypasses * `CONFIG_SCHEMA`/`DEFAULT_CONFIG` entirely, because `email`, `calendar` and * `google` were never CONFIG_SCHEMA categories). Nothing else about them was * declared anywhere. * * The settings surface's whole authority is `isValidConfigKey` / * `configManager.getSchema()`, both of which read `CONFIG_SCHEMA` * (schema.ts). A key absent from `CONFIG_SCHEMA` is "Unknown setting", full * stop, so the agent's settings surface answered "Unknown setting * calendar.google.clientId" for a key the daemon reads and writes every time * it composes mail or refreshes a calendar, and a catalog query for * `google.oauth.refreshToken` matched 0 of the schema's rows. A connection * the daemon had genuinely made was invisible to the one place an operator * would look to confirm it. * * This is the same migration `config-ownership.ts` already records for * `surfaces.email.*` / `surfaces.calendar.*` (see its trailing comment, * schema-domain-daemon-mailbox.ts): promoting an app-layer section seeded by * a cast into real, schema-registered, described settings makes the key * daemon-owned, renders it in the settings modal, and puts it in the walk * that `listDaemonOwnedConfigPaths()` derives credential names from. Doing * it here removes 19 of the paths `config-ownership.ts` used to have to hand- * enumerate on `DAEMON_OWNED_NON_SCHEMA_CONFIG_PATHS` because nothing else * declared them. * * ── Why `calendar.google.icsUrl` is added here too ──────────────────────── * * It was always a real daemon-owned path (`config-ownership.ts`'s non-schema * list carried it), but `connector-config-sections.ts`'s seed defaults never * included it, a section shape and its schema now have to agree, so it is * added to both in this change. * * ── Why these are a different domain from `surfaces.email.*` / * `surfaces.calendar.*` ───────────────────────────────────────────────── * * `surfaces.email.*` (schema-domain-daemon-mailbox.ts) is read by the * inbound-mail watcher. `email.*` here is the connector `EmailService` * composes, sends and lists mail through (see * `control-plane/routes/email-composition.ts`, "the daemon's own mailbox"). * Both are real, both are read in production, and unifying them is a * separate piece of work from giving each one a real schema row, this * change does the latter only, for the keys `connector-config-sections.ts` * already seeds. * * ── Secret-bearing rows ──────────────────────────────────────────────────── * * `email.passwordRef`, `email.smtpPasswordRef`, `calendar.google.clientSecretRef`, * `calendar.microsoft.clientSecretRef`, `calendar.google.icsUrl` and * `google.oauth.refreshToken` are declared in * `secret-bearing-config-keys.ts` (`SECRET_BEARING_CONFIG_PATHS`) already, * that is what routes a write into the encrypted secret store and masks a * render. Each row's own description says so, the same house phrasing * `surfaces.email.password` / `surfaces.calendar.caldavPassword` use in * schema-domain-daemon-mailbox.ts: the value held here is a reference into * the secret store, and the secret itself is never held in config. */ import { type ConfigSettingDefinition } from './schema-shared.js'; import type { CalendarConnectorConfig, EmailConnectorConfig, GoogleConnectorConfig } from './schema-types-connectors.js'; export type { CalendarConnectorConfig, CalendarConnectorProviderConfig, EmailConnectorConfig, EmailConnectorImapSecurity, EmailConnectorSmtpSecurity, GoogleConnectorConfig, } from './schema-types-connectors.js'; declare module './schema-types.js' { interface GoodVibesConfig { email: EmailConnectorConfig; calendar: CalendarConnectorConfig; google: GoogleConnectorConfig; } } export declare const connectorConfigDefaults: { email: EmailConnectorConfig; calendar: CalendarConnectorConfig; google: GoogleConnectorConfig; }; export declare const connectorConfigSettings: ConfigSettingDefinition[]; //# sourceMappingURL=schema-domain-connectors.d.ts.map