* (basename-mode without a slash, implied deep prefix with one), relativized output,
* and the notice formats are pi-verbatim; the deltas: home-anchored
* default, .gitignore replaced by hard noise exclusions, and a wall-clock
* timeout with partial results. Read-only by construction.
*/
constDEFAULT_LIMIT=1000;
constfindInputSchema=z.object({
pattern: z
.string()
.min(1)
.describe("Glob pattern to match files, e.g. '*.ts', '**/*.json', or 'src/**/*.spec.ts'"),
path: z.string().optional().describe("Directory to search in (default: the learner's home directory)"),
limit: z.number().int().positive().optional().describe("Maximum number of results (default: 1000)"),
});
exportconstfindTool=lhTool({
name:"find",
description:`Search for files by glob pattern. Returns matching file paths relative to the search directory. Ignores node_modules, .git, and Library directories. Output is truncated to ${DEFAULT_LIMIT} results or ${formatSize(MAX_OUTPUT_BYTES)} (whichever is hit first).`,