import { z } from 'zod';
export const SearchByTimeInputSchema = z.object({
root: z.string().optional().describe("검색 루트. 서버가 허용한 루트(allowed roots) 중 하나여야 함. 생략 시 기본 루트 사용."),
path: z.string().default("").describe("root 하위 시작 경로(상대 경로). 기본값은 root 자체(빈 문자열)."),
timeField: z.enum(["modified", "created"]).describe("시간 기준 필드"),
from: z.string().datetime().optional().describe("시작 시각(포함). 생략 가능."),
to: z.string().datetime().optional().describe("종료 시각(미포함). 생략 가능."),
glob: z.string().optional().describe("glob 패턴(예: **/*.md). 생략 시 모든 항목 매칭."),
recursive: z.boolean().default(true),
maxDepth: z.number().int().min(0).optional().describe("재귀 탐색 시 최대 깊이. recursive=false면 무시. 생략 시 제한 없음(서버 기본 제한은 별도)."),
includeFiles: z.boolean().default(true),
includeDirectories: z.boolean().default(false),
sort: z.enum(["time_desc", "time_asc", "path_asc"]).default("time_desc"),
limit: z.number().int().min(1).max(1000).default(50),
cursor: z.string().optional()
});
export type SearchByTimeInput = z.infer<typeof SearchByTimeInputSchema>;
export const SearchByTimeOutputSchema = z.object({
results: z.array(z.object({
path: z.string(),
isDirectory: z.boolean(),
modified: z.string().datetime(),
created: z.string().datetime(),
size: z.number().int()
})),
nextCursor: z.string().optional()
});
export type SearchByTimeOutput = z.infer<typeof SearchByTimeOutputSchema>;