import { BlockNoteService } from "../../../core/blocknote/services/blocknote.service"; import { FieldKind } from "../../../common/interfaces/entity.schema.interface"; import { CatalogEntity } from "../interfaces/graph.catalog.interface"; /** * Stage-1 (list) length default for entities with no `chat.list` declaration. * A rendered field whose string length exceeds this is withheld to * `availableOnRead` instead of emitted. A declared `chat.list` has no * backstop — this constant only governs the undeclared fallback. * (spec § "Stage rules") */ export declare const LIST_FIELD_MAX_CHARS = 200; export type ToolFieldStage = "list" | "detail"; export interface ToolFieldsResult { fields: Record; /** * Described, non-empty fields withheld from a list projection. Omitted * entirely when empty or when stage is "detail". */ availableOnRead?: string[]; } /** * Format a money field's raw minor-unit integer as a decimal string the LLM * can safely quote to the user (e.g. 600 with minorUnits=2 → "6.00"). * Returns null when the value is not a finite number so callers can skip * emitting a companion key for missing / null values. */ export declare function formatMoneyField(value: unknown, kind: FieldKind): string | null; /** * Renders a record's catalogued fields for a tool result and stages them * between a `list` (digest) and `detail` (complete) projection. * * Rendering runs before staging so both stages benefit: richtext fields * become markdown and empty values are dropped before the stage split ever * sees them (spec § "Rendering, then staging"). */ export declare class ToolFieldFormatterService { private readonly blockNote; constructor(blockNote: BlockNoteService); build(params: { entity: CatalogEntity; record: Record; stage: ToolFieldStage; }): ToolFieldsResult; /** * Defensive: anything that does not parse as a BlockNote node array passes * through unchanged rather than throwing (spec § "Rendering, then * staging" — malformed values must be harmless, not a 500). */ private renderRichtext; private isEmpty; } //# sourceMappingURL=field-formatting.d.ts.map