/** * Reading fields off untrusted `unknown` values. * * The single owner of turning an unvalidated value into a typed field, so chat * parsing never hand-rolls its own record/string checks. Dependency-free apart * from JSON stringification: no chat, tool, or schema knowledge belongs here. */ import { type ChatJsonValue } from "./json-value.js"; /** JSON-compatible value. Re-exported from `json-value.ts` so both agree by construction. */ export type JsonValue = ChatJsonValue; /** Check whether a value is a non-array object. */ export declare function isRecord(value: unknown): value is Record; /** Return string field. */ export declare function getStringField(value: unknown, field: string, fallback: string): string; /** Return a string field when present, else undefined. */ export declare function getOptionalStringField(value: unknown, key: string): string | undefined; /** Return a non-empty string field when present, else undefined. */ export declare function getNonEmptyStringField(value: unknown, key: string): string | undefined; /** Shallow-copy a value into a plain record, or an empty record. */ export declare function toRecord(value: unknown): Record; /** Stringify unknown helper. */ export declare function stringifyUnknown(value: unknown): string; /** Convert a value into a JSON-safe value. */ export declare function toJsonValue(value: unknown): JsonValue; //# sourceMappingURL=part-field-access.d.ts.map