import { z } from 'zod';
import { estimateTokenCount } from '../tokens.js';
export const DocumentPropertiesSchema = z.object({
    title: z.string().optional(),
    subject: z.string().optional(),
    author: z.string().optional(),
    company: z.string().optional(),
    createdDate: z.string().optional(),
    modifiedDate: z.string().optional(),
    lastModifiedBy: z.string().optional(),
    keywords: z.string().optional(),
});
export function estimateTokens(input) {
    return estimateTokenCount(input);
}
export function asOptionalString(value) {
    return typeof value === 'string' && value.trim() ? value : undefined;
}
export function formatDateLike(value) {
    if (value instanceof Date)
        return value.toISOString();
    if (typeof value === 'string' && value.trim())
        return value;
    return undefined;
}
export function createInspectPayload(file, query, results) {
    return { file, query, results };
}
//# sourceMappingURL=shared.js.map