Charis
12869fcd9f
studio: flip executeSql signature to SafeSqlFragment (7/7) ( #46007 )
...
## Summary
Final PR in the SafeSql migration stack. Stacked on top of #46006 .
Tightens `executeSql`'s `sql` parameter from `string` to
`SafeSqlFragment`. Any future raw-string caller is now a compile error —
the SafeSql safety property becomes structural rather than
convention-based.
Also adapts the AI `execute_sql` tool to promote AI-generated SQL via
`acceptUntrustedSql(untrustedSql(sql))` inside the `execute` callback.
The tool's existing \`needsApproval: true\` gate ensures `execute` only
runs after the user has explicitly approved — that approval is the
gesture that promotes untrusted to safe.
## Test plan
- [x] `pnpm typecheck` passes
- [x] Grep for any remaining raw-string `executeSql` calls in
`apps/studio` returns nothing
- [x] Dev-server smoke: AI tool approval flow executes SQL
2026-05-15 20:07:54 +00:00
..
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-05-14 15:12:08 -04:00
2026-04-07 20:34:10 -04:00
2026-04-03 09:15:57 +02:00
2026-05-14 13:52:29 +05:30
2026-05-05 12:02:52 -04:00
2026-04-16 09:27:57 +10:00
2026-04-03 09:15:57 +02:00
2026-04-20 10:33:56 +10:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-05-06 12:21:48 -04:00
2026-05-04 13:08:06 -04:00
2026-04-03 09:15:57 +02:00
2026-05-15 16:41:58 +08:00
2026-05-15 14:50:38 -04:00
2026-05-14 15:12:08 -04:00
2026-05-06 12:21:48 -04:00
2026-05-06 12:21:48 -04:00
2026-04-03 09:15:57 +02:00
2026-05-15 12:08:20 -04:00
2026-05-06 12:21:48 -04:00
2026-05-06 12:21:48 -04:00
2026-05-15 12:08:20 -04:00
2026-05-06 10:53:49 +08:00
2026-05-06 12:21:48 -04:00
2026-04-03 09:15:57 +02:00
2026-05-13 16:07:10 +00:00
2026-04-03 09:15:57 +02:00
2026-04-21 16:38:03 +12:00
2026-05-12 15:24:21 -04:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-27 17:42:34 +08:00
2026-04-27 17:42:34 +08:00
2026-04-03 09:15:57 +02:00
2026-05-13 16:07:10 +00:00
2026-04-03 09:15:57 +02:00
2026-05-05 16:32:37 +08:00
2026-04-15 12:34:28 -03:00
2026-04-29 14:12:33 +08:00
2026-04-03 09:15:57 +02:00
2026-04-07 20:34:10 -04:00
2026-04-03 09:15:57 +02:00
2026-05-14 10:29:50 -04:00
2026-05-06 21:31:11 +08:00
2026-05-13 16:07:10 +00:00
2026-04-28 15:02:49 +08:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-27 17:42:34 +08:00
2026-04-27 17:42:34 +08:00
2026-04-03 09:15:57 +02:00
2026-04-27 17:42:34 +08:00
2026-04-03 09:15:57 +02:00
2026-04-23 18:02:08 +00:00
2026-05-07 16:44:01 -03:00
2026-04-15 12:34:28 -03:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-05-15 14:50:38 -04:00
2026-05-04 16:24:44 -07:00
2026-05-08 13:24:25 +08:00
2026-04-27 17:42:34 +08:00
2026-04-03 09:15:57 +02:00
2026-04-29 21:42:05 +02:00
2026-05-15 14:50:38 -04:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-05-15 20:07:54 +00:00
2026-04-03 09:15:57 +02:00
2026-04-27 17:42:34 +08:00
2026-05-06 12:21:48 -04:00
2026-04-03 09:15:57 +02:00
2026-05-07 16:44:01 -03:00
2026-04-03 09:15:57 +02:00
2026-05-14 15:12:08 -04:00
2026-05-04 13:08:06 -04:00
2026-05-14 15:12:08 -04:00
2026-04-03 09:15:57 +02:00
2026-04-03 09:15:57 +02:00
2026-04-07 20:34:10 -04:00
2026-04-27 17:42:34 +08:00
2026-05-04 13:08:06 -04:00
2026-05-13 16:07:10 +00:00
2024-07-04 14:48:10 +08:00
2026-01-22 11:17:49 -05:00
2026-03-16 11:22:30 +01:00
2026-04-03 09:15:57 +02:00
2026-04-20 22:32:35 +08:00
2026-04-20 22:32:35 +08:00
2026-04-03 09:15:57 +02:00