/** * scanDbToolScoping — ported from `scripts/guard-db-tool-scoping.mjs`. * * The agent's raw DB tools (`db-query`, `db-exec`, `db-patch`) can only * safely expose tables with an explicit tenant scope (`owner_email` and/or * `org_id`) or a documented, reviewed exception. This guard keeps schema * drift visible: any table without raw-DB scope must either add * `owner_email`/`org_id`, or be added to the denylist with a * reviewer-readable reason. * * Conditional guard — per report 005's V1 guard set table: the original * walks every `templates/*\/server/db/schema.ts` and keys its denylist * `"