Interface: ReportDrafter
Defined in: server/insights/ask/report-drafter.ts:20
The LLM "Ask" port. A drafter turns a natural-language question plus the
PHYSICAL-FREE ReportingModelMetadata projection into a candidate
ReportDefinition, serialized as text. It does not validate, it does not
execute, and it is deliberately the ONLY place in the insights module that
talks to a model provider.
Everything a drafter can see is in DraftReportInput. There is no
field through which report ROWS could reach a model — no rows, no
sampleData, no result, no Prisma client. That absence is the security
property: the drafter sees logical keys, labels, semantic types, capped enum
allowlists, capabilities, and format hints, and nothing else. See
src/shared/insights/types/model-metadata.ts (and its unit test asserting
no configured table/column name appears in the projection).
Methods
draftReport()
draftReport(input: DraftReportInput): Promise<DraftReportOutput>;Defined in: server/insights/ask/report-drafter.ts:21
Parameters
| Parameter | Type |
|---|---|
input | DraftReportInput |
Returns
Promise<DraftReportOutput>