Daita agents / guide
How Daita validates catalog or workspace scope, executes bounded reads, and returns structured evidence.
For SQLite and PostgreSQL, the model uses one dialect-specific tool:
data_query_sqlitedata_query_postgresqlEach call includes source_id, sql, and optional positional parameters. The runtime then:
SQLite uses a connector-level authorizer. PostgreSQL uses a deliberately bounded function set because server functions can perform external I/O even in a read-only transaction.
Arbitrary SQL mutation is unsupported. The only database mutation is the separate data_preview_postgresql_update → data_update_postgresql path for exact tables and assignment columns that an operator explicitly enabled. It accepts structured filters and assignments, not model-authored SQL. See PostgreSQL Updates.
A database query must reference at least one current readable resource in the selected source. Unknown tables, columns, or resources outside the exact read scope are rejected before source I/O. Results retain source and resource revisions so their structural provenance remains inspectable.
Database query results include:
Truncation is explicit. A model should not present a truncated result as a complete population. When the requested output is a file, use data_export_sqlite or data_export_postgresql to create an exact bounded CSV or XLSX artifact.
Model-proposed values should use parameters when possible rather than SQL interpolation. Connector adapters preserve normalized JSON-safe values and reject unsupported shapes.
Local CSV, TSV, JSON-records/NDJSON, and Parquet data use file_query, not a catalog source tool. Daita expands one workspace-relative pattern, revision-binds the exact file manifest, and exposes only the relation data to a private DuckDB worker.
Text discovery and reading use file_search and file_read. There is no data_read_file tool and no attached CSV/JSON directory source in the current framework.
Parser, catalog, permission, freshness, containment, and connector failures become bounded model-visible tool results. The direct loop may let the model correct a bad selector or SQL query on the next step, but it does not start a separate repair workflow or verifier pass.