Files
sim/apps
Waleed 8174182e69 feat(bigquery): validate integration + add dataset/table lifecycle tools (#5480)
* feat(bigquery): validate integration against live API docs, add dataset/table lifecycle + query-result tools

- Cross-checked existing query/list_datasets/list_tables/get_table/insert_rows tools against BigQuery REST v2 docs; no critical issues found
- Added 6 new tools covered by the existing bigquery OAuth scope: create/delete dataset, create/delete table, list table data, get query results
- Wired new operations into the block (subblocks, conditions, tools.config), registry, and barrel exports

* fix(bigquery): address Greptile + Cursor Bugbot review findings

- create_table: guard JSON.parse on the schema field with a clear error, trim tableReference IDs in the request body
- create_dataset: trim datasetId in the request body
- block: stop leaking a stale query "location" value into create_dataset when datasetLocation is empty; clarify pageToken output description covers list_table_data and get_query_results too

* fix(bigquery): address second round of Cursor Bugbot findings

- create_table: validate parsed schema is a non-empty array of field objects with a name, not just syntactically valid JSON
- get_query_results: guard timeoutMs with Number.isFinite before appending to the query string, matching maxResults

* fix(bigquery): final alignment pass from independent multi-agent validation

- Add missing projectId block output (returned by get_table/create_table/create_dataset but was silently dropped from the block's output schema)
- Switch query/rows/schema subBlocks from long-input to code, matching the JSON/SQL field convention used by every other DB integration (clickhouse, mongodb, postgresql, supabase)

* fix(bigquery): stop leaking stale datasetId/tableId into create_dataset/create_table

Same class of bug as the earlier location leak: params() spread hidden
datasetId/tableId from ...rest unconditionally, so a stale value from a
previously-selected operation could survive into create_dataset/create_table
if the dedicated new-ID field was somehow empty. Gate datasetId/tableId (and
location) to the operations that actually use them, via shared op-list
constants also reused by the corresponding subblock conditions.
2026-07-07 12:10:03 -07:00
..