// Ambient types for `pg` (node-postgres), which ships its types only via the separate `@types/pg` // package. Rather than pull that in at tsc time, this declares the exact slice model-usage uses — // the same precedent anthropic-manager sets for `tweetnacl-sealedbox-js` (a local ambient .d.ts, // listed in tsconfig `include`, default-imported). The real `pg` is installed into the module's // runtime image (package.json `dependencies`; novox/hq ADR 0052), so this types the code without // deciding what runs. declare module "pg" { /** A lazily-connecting connection pool. Only the connection string, one query form, and end() are * used here. */ export class Pool { constructor(config?: { connectionString?: string }); query(text: string, params?: unknown[]): Promise<{ rows: any[]; rowCount: number }>; end(): Promise; } }