// 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 and two timeouts, one query form, * and end() are used here. */ export class Pool { constructor(config?: { connectionString?: string; /** How long a connection may take before the query fails (ms). */ connectionTimeoutMillis?: number; /** How long a query may take before it fails, client side (ms). */ query_timeout?: number; }); query(text: string, params?: unknown[]): Promise<{ rows: any[]; rowCount: number }>; end(): Promise; } }