@octocodeai/octocode-core 16.1.1 → 16.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (38) hide show
  1. package/dist/data/compressed.js +1 -1
  2. package/dist/data/default.json +263 -222
  3. package/dist/resources/global.js +1 -1
  4. package/dist/resources/tools/_toolkit.d.ts +55 -0
  5. package/dist/resources/tools/_toolkit.js +1 -0
  6. package/dist/resources/tools/ghCloneRepo.d.ts +25 -0
  7. package/dist/resources/tools/ghCloneRepo.js +1 -1
  8. package/dist/resources/tools/ghGetFileContent.d.ts +30 -0
  9. package/dist/resources/tools/ghGetFileContent.js +1 -1
  10. package/dist/resources/tools/ghHistoryResearch.d.ts +133 -0
  11. package/dist/resources/tools/ghHistoryResearch.js +1 -0
  12. package/dist/resources/tools/ghSearchCode.d.ts +21 -0
  13. package/dist/resources/tools/ghSearchCode.js +1 -1
  14. package/dist/resources/tools/ghSearchRepos.d.ts +38 -0
  15. package/dist/resources/tools/ghSearchRepos.js +1 -1
  16. package/dist/resources/tools/ghViewRepoStructure.d.ts +15 -0
  17. package/dist/resources/tools/ghViewRepoStructure.js +1 -1
  18. package/dist/resources/tools/localBinaryInspect.d.ts +40 -0
  19. package/dist/resources/tools/localBinaryInspect.js +1 -0
  20. package/dist/resources/tools/localFindFiles.d.ts +39 -0
  21. package/dist/resources/tools/localFindFiles.js +1 -1
  22. package/dist/resources/tools/localGetFileContent.d.ts +22 -0
  23. package/dist/resources/tools/localGetFileContent.js +1 -1
  24. package/dist/resources/tools/localSearchCode.d.ts +49 -0
  25. package/dist/resources/tools/localSearchCode.js +1 -1
  26. package/dist/resources/tools/localViewStructure.d.ts +27 -0
  27. package/dist/resources/tools/localViewStructure.js +1 -1
  28. package/dist/resources/tools/lspGetSemantics.d.ts +77 -0
  29. package/dist/resources/tools/lspGetSemantics.js +1 -1
  30. package/dist/resources/tools/npmSearch.d.ts +9 -0
  31. package/dist/resources/tools/npmSearch.js +1 -1
  32. package/dist/schemas/index.d.ts +13 -433
  33. package/dist/schemas/index.js +1 -1
  34. package/dist/schemas/runtime.js +1 -1
  35. package/dist/types/index.d.ts +2 -1
  36. package/package.json +1 -1
  37. package/dist/resources/tools/ghSearchPRs.d.ts +0 -2
  38. package/dist/resources/tools/ghSearchPRs.js +0 -1
@@ -1,2 +1,24 @@
1
+ import { z } from "zod";
1
2
  import type { ToolSpec } from "../../types/index.js";
2
3
  export declare const localGetFileContent: ToolSpec;
4
+ export declare const FetchContentQuerySchema: z.ZodObject<{
5
+ path: z.ZodString;
6
+ fullContent: z.ZodOptional<z.ZodBoolean>;
7
+ matchString: z.ZodOptional<z.ZodString>;
8
+ matchStringIsRegex: z.ZodOptional<z.ZodBoolean>;
9
+ matchStringCaseSensitive: z.ZodOptional<z.ZodBoolean>;
10
+ startLine: z.ZodOptional<z.ZodNumber>;
11
+ endLine: z.ZodOptional<z.ZodNumber>;
12
+ contextLines: z.ZodDefault<z.ZodNumber>;
13
+ charOffset: z.ZodOptional<z.ZodNumber>;
14
+ charLength: z.ZodOptional<z.ZodNumber>;
15
+ minify: z.ZodDefault<z.ZodEnum<{
16
+ none: "none";
17
+ standard: "standard";
18
+ symbols: "symbols";
19
+ }>>;
20
+ id: z.ZodOptional<z.ZodString>;
21
+ mainResearchGoal: z.ZodOptional<z.ZodString>;
22
+ researchGoal: z.ZodOptional<z.ZodString>;
23
+ reasoning: z.ZodOptional<z.ZodString>;
24
+ }, z.core.$strip>;
@@ -1 +1 @@
1
- export const localGetFileContent={name:"localGetFileContent",description:'Read a local file or region. Start with minify:"symbols" on any unknown file before reading slices.\nChoose one extraction mode — mutually exclusive: matchString (find all occurrences, returns matchRanges) | startLine/endLine (line range — both required together) | fullContent (entire file, small files only) | default (first charLength chars from line 1).\nPick minify by goal (see the minify field): "symbols" to orient, "standard" to read, "none" to quote/match whitespace.\nOutput signals: isPartial:true → check hints[] for next charOffset value (emitted as \'charOffset=N\'); matchRanges[i]={start,end} (1-based line numbers) → use matchRanges[0].start as lineHint for lspGetSemantics; warnings[] → redacted content, auto-pagination, or symbols-fallback messages.\nevidence.answerReady:true means content returned — stop calling (check isPartial separately for pagination state).\nNext: lspGetSemantics(uri=path, symbolName, lineHint=matchRanges[0].start) for semantics; localSearchCode before reading if the symbol location is unknown. Batch up to 5 files per call: queries:[{path:f1,...},{path:f2,...}].',schema:{path:"File path, absolute or workspace-relative. Use localViewStructure for directories.",fullContent:"Read the entire file. Mutually exclusive with matchString and startLine/endLine. Reserve for files you know are small — use matchString or startLine/endLine for large files.",matchString:'Text or regex anchor. All occurrences returned as merged slices. matchRanges[i]={start,end} (1-based line numbers)use matchRanges[0].start as lineHint for lspGetSemantics. Mutually exclusive with startLine/endLine and fullContent. Case-insensitive by default; set matchStringCaseSensitive:true for exact case. Set matchStringIsRegex:true for regex. Not applied when minify:"symbols".',matchStringIsRegex:"Treat matchString as a regex pattern. Use for flexible anchoring (e.g. function signatures, import patterns, JSDoc tags).",matchStringCaseSensitive:"Use case-sensitive matchString matching. Default is case-insensitive.",startLine:"1-based first line. Required together with endLine — providing only one is a validation error. Mutually exclusive with fullContent and matchString.",endLine:"1-based last line. Required together with startLine providing only one is a validation error. Mutually exclusive with fullContent and matchString. Must be >= startLine.",contextLines:"Lines of source context returned around each matchString hit — extends the snippet beyond the match itself. Raise to capture a full function body without a follow-up read.",charOffset:"Char offset for continuation reads. Read from hints[] in the prior response (emitted as 'charOffset=N') — do not compute this value manually.",charLength:"Page size in chars. Auto-paginates when unset. Set explicitly for normal source files.",minify:'"symbols": structural skeleton with line numbers in the gutter — much smaller. Use for orientation on any unknown file before reading details. matchString and charLength are ignored in symbols mode. "standard" (default): strips comments and blank lines. "none": exact raw text — use when quoting or matching whitespace precisely.'}};
1
+ import{z as e}from"zod";import{buildObject as t,charLength as n,charOffset as a,intRange as i,lineNumber as s,MAX_CONTEXT_LINES as r,metaFields as o,validateFileContentExtractionMode as l}from"./_toolkit.js";export const localGetFileContent={name:"localGetFileContent",description:'Read a local file or region. Start with minify:"symbols" on any unknown file before reading slices.\nChoose one extraction mode — mutually exclusive: matchString (find all occurrences, returns matchRanges) | startLine/endLine (line range — both required together) | fullContent (entire file, small files only) | default (first charLength chars from line 1).\nPick minify by goal (see the minify field): "symbols" to orient, "standard" to read, "none" to quote/match whitespace.\nOutput signals: isPartial:true → check hints[] for next charOffset value (emitted as \'charOffset=N\'); matchRanges[i]={start,end} (1-based line numbers) → use matchRanges[0].start as lineHint for lspGetSemantics; warnings[] → redacted content, auto-pagination, or symbols-fallback messages.\nevidence.answerReady:true means content returned — stop calling (check isPartial separately for pagination state).\nNext: lspGetSemantics(uri=path, symbolName, lineHint=matchRanges[0].start) for semantics; localSearchCode before reading if the symbol location is unknown. Batch up to 5 files per call: queries:[{path:f1,...},{path:f2,...}].',schema:{path:"File to read (absolute or workspace-relative). For directories, use localViewStructure.",fullContent:"Returns the whole file. Reserve for small files; for large ones use matchString or startLine/endLine. Mutually exclusive with both.",matchString:'Anchor text (or regex) to locate; all occurrences come back as merged slices, with matchRanges[i]={start,end} as 1-based line numbers — pass matchRanges[0].start as lineHint to lspGetSemantics. Case-insensitive unless matchStringCaseSensitive:true; regex when matchStringIsRegex:true. Mutually exclusive with startLine/endLine and fullContent; ignored when minify:"symbols".',matchStringIsRegex:"Treats matchString as a regex use for flexible anchors like function signatures, imports, or JSDoc tags.",matchStringCaseSensitive:"Makes matchString matching case-sensitive (case-insensitive otherwise).",startLine:"First line of the range. Required together with endLine — sending only one is an error. Mutually exclusive with fullContent and matchString.",endLine:"Last line of the range; must be >= startLine. Required together with startLine. Mutually exclusive with fullContent and matchString.",contextLines:"Extra source lines around each matchString hit. Raise to capture a full function body without a follow-up read.",charOffset:"Continuation offset for the next page; take it from hints[] ('charOffset=N') — do not compute it yourself.",charLength:"Page size in characters. Auto-paginates when unset; set it explicitly for normal source files.",minify:'"symbols": structural skeleton with line numbers in the gutter — much smaller. Use for orientation on any unknown file before reading details. matchString and charLength are ignored in symbols mode. "standard": strips comments and blank lines. "none": exact raw text — use when quoting or matching whitespace precisely.'}};export const FetchContentQuerySchema=t(localGetFileContent.schema,{...o,path:e.string(),fullContent:e.boolean().optional(),matchString:e.string().optional(),matchStringIsRegex:e.boolean().optional(),matchStringCaseSensitive:e.boolean().optional(),startLine:s(),endLine:s(),contextLines:i(0,r).default(5),charOffset:a(),charLength:n(),minify:e.enum(["none","standard","symbols"]).default("standard")}).superRefine(l);
@@ -1,2 +1,51 @@
1
+ import { z } from "zod";
1
2
  import type { ToolSpec } from "../../types/index.js";
2
3
  export declare const localSearchCode: ToolSpec;
4
+ export declare const RipgrepQuerySchema: z.ZodObject<{
5
+ keywords: z.ZodOptional<z.ZodString>;
6
+ path: z.ZodString;
7
+ mode: z.ZodDefault<z.ZodEnum<{
8
+ paginated: "paginated";
9
+ discovery: "discovery";
10
+ detailed: "detailed";
11
+ structural: "structural";
12
+ }>>;
13
+ pattern: z.ZodOptional<z.ZodString>;
14
+ rule: z.ZodOptional<z.ZodString>;
15
+ fixedString: z.ZodOptional<z.ZodBoolean>;
16
+ perlRegex: z.ZodOptional<z.ZodBoolean>;
17
+ caseInsensitive: z.ZodOptional<z.ZodBoolean>;
18
+ caseSensitive: z.ZodOptional<z.ZodBoolean>;
19
+ wholeWord: z.ZodOptional<z.ZodBoolean>;
20
+ invertMatch: z.ZodOptional<z.ZodBoolean>;
21
+ include: z.ZodOptional<z.ZodArray<z.ZodString>>;
22
+ exclude: z.ZodOptional<z.ZodArray<z.ZodString>>;
23
+ excludeDir: z.ZodOptional<z.ZodArray<z.ZodString>>;
24
+ noIgnore: z.ZodOptional<z.ZodBoolean>;
25
+ hidden: z.ZodOptional<z.ZodBoolean>;
26
+ filesOnly: z.ZodOptional<z.ZodBoolean>;
27
+ filesWithoutMatch: z.ZodOptional<z.ZodBoolean>;
28
+ contextLines: z.ZodOptional<z.ZodNumber>;
29
+ matchContentLength: z.ZodDefault<z.ZodNumber>;
30
+ maxMatchesPerFile: z.ZodOptional<z.ZodNumber>;
31
+ maxFiles: z.ZodOptional<z.ZodNumber>;
32
+ multiline: z.ZodOptional<z.ZodBoolean>;
33
+ multilineDotall: z.ZodOptional<z.ZodBoolean>;
34
+ sort: z.ZodDefault<z.ZodEnum<{
35
+ path: "path";
36
+ modified: "modified";
37
+ created: "created";
38
+ accessed: "accessed";
39
+ }>>;
40
+ sortReverse: z.ZodOptional<z.ZodBoolean>;
41
+ langType: z.ZodOptional<z.ZodString>;
42
+ countLinesPerFile: z.ZodOptional<z.ZodBoolean>;
43
+ countMatchesPerFile: z.ZodOptional<z.ZodBoolean>;
44
+ matchPage: z.ZodOptional<z.ZodNumber>;
45
+ itemsPerPage: z.ZodOptional<z.ZodNumber>;
46
+ page: z.ZodDefault<z.ZodNumber>;
47
+ id: z.ZodOptional<z.ZodString>;
48
+ mainResearchGoal: z.ZodOptional<z.ZodString>;
49
+ researchGoal: z.ZodOptional<z.ZodString>;
50
+ reasoning: z.ZodOptional<z.ZodString>;
51
+ }, z.core.$strip>;
@@ -1 +1 @@
1
- export const localSearchCode={name:"localSearchCode",description:'Local ripgrep search for file+line.\nChoose mode first: "paginated" (default) returns snippets; "discovery" returns file paths only — cheapest orientation; "detailed" returns expanded context per match.\nFor count-only output use countLinesPerFile:true or countMatchesPerFile:true — do NOT use mode:"count" (does not exist).\nOutput signal: searchEngine:"grep" means ripgrep was unavailable and grep was used as fallback (perlRegex features dropped, countMatchesPerFile becomes line-count semantics).\nPage only on hasMore; use matchPage for more matches in one file; narrow include/exclude/path before paging noisy results.\nBatch: pass up to 5 {keywords, path} objects in one call — e.g. search same keyword across multiple directories simultaneously.\nevidence.answerReady:true means at least one result exists; check pagination.hasMore separately before deciding to stop.\nPair with lspGetSemantics for semantic navigation — matches[0].line feeds directly as lineHint for definition, references, and call hierarchy.\nNext: localGetFileContent(path, matchString=keyword) to read context; lspGetSemantics(uri=files[0].path, symbolName, lineHint=matches[0].line) for semantics; localViewStructure if root unknown; localFindFiles when searching by filename or metadata.',schema:{keywords:"Required. Primary search term text or regex pattern. fixedString:true for literal match; perlRegex:true for PCRE2 features (lookaheads, backreferences).",path:"File or directory to search; absolute paths are safest.",mode:'"paginated" (default): match list with snippets. "discovery": file paths only — no snippets, cheapest token cost, use for orientation before reading. "detailed": expanded snippets with surrounding context for deep reading without a follow-up file read. For count-only output use countLinesPerFile:true or countMatchesPerFile:true.',fixedString:"Literal match disables regex. Mutually exclusive with perlRegex.",perlRegex:"PCRE2 regex lookaheads, backreferences. Mutually exclusive with fixedString.",caseInsensitive:"Use case-insensitive matching. Mutually exclusive with caseSensitive.",caseSensitive:"Use case-sensitive matching. Mutually exclusive with caseInsensitive.",wholeWord:"Match whole-word occurrences.",invertMatch:"Return non-matching lines. For files lacking the pattern use filesWithoutMatch.",include:"File path include globs (e.g. '*.ts', 'src/**/*.tsx'). Only files matching any listed glob are searched.",exclude:"File path exclude globs (e.g. '*.min.js', 'dist/**'). Files matching are skipped.",excludeDir:"Directory names to skip entirely (e.g. 'node_modules', 'dist', '.git'). Faster than exclude globs for directory-level skips.",noIgnore:"Bypass .gitignore and .ignore files.",hidden:"Include hidden (dot) files.",filesOnly:"Return matching file paths without line content. Mutually exclusive with filesWithoutMatch.",filesWithoutMatch:"Return file paths that do NOT contain the pattern — useful for finding files missing a required import or header. Mutually exclusive with filesOnly.",contextLines:"Lines of context around each match. Use with mode:'detailed' for self-contained snippets.",matchContentLength:"Chars per match snippet. Raise for minified code or JSON blobs, or when truncation is causing missed matches.",maxMatchesPerFile:"Limit matches per file and set per-file page size. When a file has more matches, file.pagination.hasMore triggersuse matchPage to continue. Not meaningful in filesOnly/count modes.",maxFiles:"Limit matched files returned.",multiline:"Cross-line matching (-U). Add multilineDotall when dot should match newlines.",multilineDotall:". matches newlines. Requires multiline:true.",sort:"Sort by path (default), modified time, access time, or creation time.",sortReverse:"Reverse sort order. Combined with sort:'modified' + sortReverse:true gives oldest-first.",langType:"Ripgrep language type filter (ts, js, py, go, rust, etc.). More precise than include globs.",countLinesPerFile:"Return matching line count per file instead of match content. Mutually exclusive with countMatchesPerFile. Use for orientation: which files have the most matches.",countMatchesPerFile:"Return total match count per file (counts multiple matches per line). Mutually exclusive with countLinesPerFile.",matchPage:"Per-file match page (1-based). Use with maxMatchesPerFile to iterate matches within a noisy file.",itemsPerPage:"Files per page.",page:"Result page (1-based)."}};
1
+ import{z as e}from"zod";import{buildObject as t,contextLines as a,DEFAULT_MATCH_CONTENT_LENGTH as s,intRange as i,MAX_MATCH_CONTENT_LENGTH as n,MAX_PAGE_NUMBER as o,metaFields as l,optionalPageNumber as r,pageNumber as c,StringArray as u}from"./_toolkit.js";export const localSearchCode={name:"localSearchCode",description:'Local code/text search for file+line.\nChoose mode first: "paginated" returns snippets; "discovery" returns file paths only — cheapest orientation; "detailed" returns expanded context per match.\nFor count-only output use countLinesPerFile:true or countMatchesPerFile:true — do NOT use mode:"count" (does not exist).\nOutput signal: searchEngine flags when a reduced-capability fallback ran perlRegex features are dropped and countMatchesPerFile becomes line-count semantics.\nPage only on hasMore; use matchPage for more matches in one file; narrow include/exclude/path before paging noisy results.\nBatch: pass up to 5 {keywords, path} objects in one call — e.g. search same keyword across multiple directories simultaneously.\nevidence.answerReady:true means at least one result exists; check pagination.hasMore separately before deciding to stop.\nPair with lspGetSemantics for semantic navigation — matches[0].line feeds directly as lineHint for definition, references, and call hierarchy.\nmode:"structural" (+ pattern OR rule): AST/shape queries regex can\'t express and that aren\'t symbol-identity questions — e.g. eval($X) call sites excluding comments/strings, or async fns lacking try/catch. pattern is a code-shaped query (foo($X), console.log($$$ARGS)); rule is a YAML relational/composite blob (not/inside/has/all/any). Returns node ranges; matches[].line still feeds lspGetSemantics lineHint. keywords is ignored in this mode.\nNext: localGetFileContent(path, matchString=keyword) to read context; lspGetSemantics(uri=files[0].path, symbolName, lineHint=matches[0].line) for semantics; localViewStructure if root unknown; localFindFiles when searching by filename or metadata.',schema:{keywords:"The search pattern (text or regex). Set fixedString:true for a literal match, or perlRegex:true for advanced regex features (lookaheads, backreferences).",path:"File or directory to search (absolute paths are safest).",mode:'"paginated": matches with snippets. "discovery": file paths only — cheapest, for orienting before you read. "detailed": snippets with surrounding context, for deep reading without a follow-up read. "structural": AST/shape search (set pattern OR rule) for queries regex can\'t express. For counts only, set countLinesPerFile or countMatchesPerFile.',pattern:'mode:"structural" only. An ast-grep code-shaped pattern. Metavariables: $X matches a single node (captured), $$$ARGS matches a list of nodes. E.g. eval($X) / console.log($$$) / oldApi.foo($X). Matches code structure, so comments and strings never false-positive. Mutually exclusive with rule.',rule:'mode:"structural" only. A YAML relational/composite ast-grep rule blob for what plain patterns can\'t express — negation and parent/child relations (not/inside/has/all/any). E.g. "rule:\\n pattern: await $C\\n inside:\\n kind: for_statement\\n stopBy: end". NOTE: relational sub-rules need stopBy: end to walk all ancestors/descendants, else they silently match nothing. Mutually exclusive with pattern.',fixedString:"Literal match (disables regex). Mutually exclusive with perlRegex.",perlRegex:"Advanced regex (lookaheads, backreferences). Mutually exclusive with fixedString.",caseInsensitive:"Case-insensitive matching. Mutually exclusive with caseSensitive.",caseSensitive:"Case-sensitive matching. Mutually exclusive with caseInsensitive.",wholeWord:"Matches whole words only.",invertMatch:"Returns non-matching lines. To list files lacking the pattern, use filesWithoutMatch instead.",include:"Globs of files to search, e.g. '*.ts', 'src/**/*.tsx'. Only files matching any glob are searched.",exclude:"Globs of files to skip, e.g. '*.min.js', 'dist/**'.",excludeDir:"Directory names to skip entirely (e.g. 'node_modules', 'dist', '.git') faster than exclude globs for whole directories.",noIgnore:"Searches files normally hidden by .gitignore/.ignore.",hidden:"Includes hidden (dot) files.",filesOnly:"Returns matching file paths without line content. Mutually exclusive with filesWithoutMatch.",filesWithoutMatch:"Returns files that do NOT contain the pattern — useful to find files missing a required import or header. Mutually exclusive with filesOnly.",contextLines:"Lines of context around each match. Pair with mode:'detailed' for self-contained snippets.",matchContentLength:"Characters kept per match snippet. Raise for minified code or JSON, or when truncation hides matches.",maxMatchesPerFile:"Caps matches per file and sets the per-file page size; when a file has more, file.pagination.hasMore appearspage it with matchPage. No effect in filesOnly/count modes.",maxFiles:"Caps how many matched files are returned.",multiline:"Lets a match span lines. Add multilineDotall to let . cross newlines.",multilineDotall:"Lets . match newlines too. Requires multiline:true.",sort:"Order results by path, modified time, access time, or creation time.",sortReverse:"Reverses the sort (e.g. sort:'modified' + sortReverse:true = oldest first).",langType:"Language filter (ts, js, py, go, rust, ) more precise than include globs.",countLinesPerFile:"Returns the count of matching lines per file instead of content good for orientation (which files have the most hits). Mutually exclusive with countMatchesPerFile.",countMatchesPerFile:"Returns the total match count per file (counts multiple hits on one line). Mutually exclusive with countLinesPerFile.",matchPage:"Page within one file's matches; pair with maxMatchesPerFile to walk a noisy file.",itemsPerPage:"Files per page.",page:"Result page."}};export const RipgrepQuerySchema=t(localSearchCode.schema,{...l,keywords:e.string().optional(),path:e.string(),mode:e.enum(["paginated","discovery","detailed","structural"]).default("paginated"),pattern:e.string().optional(),rule:e.string().optional(),fixedString:e.boolean().optional(),perlRegex:e.boolean().optional(),caseInsensitive:e.boolean().optional(),caseSensitive:e.boolean().optional(),wholeWord:e.boolean().optional(),invertMatch:e.boolean().optional(),include:u,exclude:u,excludeDir:u,noIgnore:e.boolean().optional(),hidden:e.boolean().optional(),filesOnly:e.boolean().optional(),filesWithoutMatch:e.boolean().optional(),contextLines:a(),matchContentLength:i(1,n).default(s),maxMatchesPerFile:i(1,n).optional(),maxFiles:i(1,n).optional(),multiline:e.boolean().optional(),multilineDotall:e.boolean().optional(),sort:e.enum(["path","modified","accessed","created"]).default("path"),sortReverse:e.boolean().optional(),langType:e.string().optional(),countLinesPerFile:e.boolean().optional(),countMatchesPerFile:e.boolean().optional(),matchPage:r(),itemsPerPage:i(1,o).optional(),page:c()}).superRefine((e,t)=>{if("structural"===e.mode){e.pattern||e.rule||t.addIssue({code:"custom",message:'mode:"structural" requires `pattern` (a code-shaped query) or `rule` (a YAML relational rule).',path:["pattern"]}),e.pattern&&e.rule&&t.addIssue({code:"custom",message:"`pattern` and `rule` are mutually exclusive.",path:["rule"]});for(const a of["fixedString","perlRegex","wholeWord","invertMatch","multiline","multilineDotall"])e[a]&&t.addIssue({code:"custom",message:`\`${a}\` is not valid with mode:"structural".`,path:[a]})}else(e.pattern||e.rule)&&t.addIssue({code:"custom",message:'`pattern`/`rule` require mode:"structural".',path:[e.pattern?"pattern":"rule"]}),e.keywords||t.addIssue({code:"custom",message:'`keywords` is required unless mode:"structural".',path:["keywords"]});e.filesOnly&&e.filesWithoutMatch&&t.addIssue({code:"custom",message:"filesOnly and filesWithoutMatch are mutually exclusive.",path:["filesWithoutMatch"]}),e.fixedString&&e.perlRegex&&t.addIssue({code:"custom",message:"fixedString and perlRegex are mutually exclusive.",path:["perlRegex"]}),e.caseSensitive&&e.caseInsensitive&&t.addIssue({code:"custom",message:"caseSensitive and caseInsensitive are mutually exclusive.",path:["caseInsensitive"]}),e.multilineDotall&&!e.multiline&&t.addIssue({code:"custom",message:"multilineDotall requires multiline=true.",path:["multilineDotall"]}),e.countLinesPerFile&&e.countMatchesPerFile&&t.addIssue({code:"custom",message:"countLinesPerFile and countMatchesPerFile are mutually exclusive.",path:["countMatchesPerFile"]})});
@@ -1,2 +1,29 @@
1
+ import { z } from "zod";
1
2
  import type { ToolSpec } from "../../types/index.js";
2
3
  export declare const localViewStructure: ToolSpec;
4
+ export declare const ViewStructureQuerySchema: z.ZodObject<{
5
+ path: z.ZodString;
6
+ details: z.ZodOptional<z.ZodBoolean>;
7
+ hidden: z.ZodOptional<z.ZodBoolean>;
8
+ sortBy: z.ZodDefault<z.ZodEnum<{
9
+ extension: "extension";
10
+ size: "size";
11
+ name: "name";
12
+ time: "time";
13
+ }>>;
14
+ reverse: z.ZodOptional<z.ZodBoolean>;
15
+ pattern: z.ZodOptional<z.ZodString>;
16
+ directoriesOnly: z.ZodOptional<z.ZodBoolean>;
17
+ filesOnly: z.ZodOptional<z.ZodBoolean>;
18
+ recursive: z.ZodOptional<z.ZodBoolean>;
19
+ extensions: z.ZodOptional<z.ZodArray<z.ZodString>>;
20
+ maxDepth: z.ZodOptional<z.ZodNumber>;
21
+ limit: z.ZodOptional<z.ZodNumber>;
22
+ showFileLastModified: z.ZodOptional<z.ZodBoolean>;
23
+ page: z.ZodDefault<z.ZodNumber>;
24
+ itemsPerPage: z.ZodOptional<z.ZodNumber>;
25
+ id: z.ZodOptional<z.ZodString>;
26
+ mainResearchGoal: z.ZodOptional<z.ZodString>;
27
+ researchGoal: z.ZodOptional<z.ZodString>;
28
+ reasoning: z.ZodOptional<z.ZodString>;
29
+ }, z.core.$strip>;
@@ -1 +1 @@
1
- export const localViewStructure={name:"localViewStructure",description:'Browse a local directory tree. Returns files[], folders[], and links[] (symlinks) at each level. When details:true or showFileLastModified:true, switches to entries[] objects with size, permissions, and timestamps.\nUse this to map a directory before searching. Use localFindFiles when you need metadata (size, modified date) or filename patterns. Use localSearchCode(mode:"discovery") to find which files contain a pattern.\nMutual exclusion: filesOnly and directoriesOnly cannot both be true.\nBulk: queries:[{path:d1},{path:d2}] to browse multiple directories in one call (max 5).\nPaginate with page=N when pagination.hasMore is true.\nNext: localGetFileContent(path), localSearchCode, lspGetSemantics after localSearchCode gives uri/symbolName/lineHint.',schema:{path:"Directory to browse. Absolute or workspace-relative. Defaults to workspace root if omitted.",details:"Set true for per-entry objects with size, permissions, and dates. Enables structured entries[] output.",hidden:"Include hidden (dot) files and directories. Default false. Enable to see .env, .git, .github, .agents directories.",sortBy:"Sort entries by: 'name' (default, alphabetical), 'size' (bytes), 'time' (last modified implicitly enables showFileLastModified), 'extension' (file type grouping).",reverse:"Reverse the sort order. Combined with sortBy:'time' + reverse:true oldest files first.",pattern:"Filename/directory name filter — glob (e.g. '*.ts') or plain substring. Only entries whose name matches are returned. For regex use localFindFiles.",directoriesOnly:"Return directories only. Mutually exclusive with filesOnly.",filesOnly:"Return files only. Mutually exclusive with directoriesOnly.",recursive:"Enable recursive traversal. Default false — top level only. Default depth when recursive:true and no depth given: 5. Use depth to control cost explicitly.",extensions:"File extension whitelist (without dot). Example: ['ts', 'tsx', 'js']. Only files with a matching extension are returned; directories are always included regardless of extension filter.",depth:"Recursion depth when recursive:true (0: immediate children only). Start shallow for large monorepos, then drill into specific subdirectories.",limit:"Pre-pagination cap on discovered entries. Use to prevent large directory scans. Distinct from page size.",showFileLastModified:"Set true to include last-modified timestamps per file entry. Independent of details:true. Enable to identify recently changed files without switching to localFindFiles.",page:"Result page (1-based).",itemsPerPage:"Directory entries per page. Use to control response size."}};
1
+ import{z as e}from"zod";import{buildObject as t,intRange as i,MAX_LOCAL_DEPTH as o,MAX_LOCAL_ITEMS_PER_PAGE as s,MAX_LOCAL_LIMIT as n,metaFields as a,pageNumber as r,StringArray as l}from"./_toolkit.js";export const localViewStructure={name:"localViewStructure",description:'Browse a local directory tree. Returns files[], folders[], and links[] (symlinks) at each level. When details:true or showFileLastModified:true, switches to entries[] objects with size, permissions, and timestamps.\nUse this to map a directory before searching. Use localFindFiles when you need metadata (size, modified date) or filename patterns. Use localSearchCode(mode:"discovery") to find which files contain a pattern.\nMutual exclusion: filesOnly and directoriesOnly cannot both be true.\nBulk: queries:[{path:d1},{path:d2}] to browse multiple directories in one call (max 5).\nPaginate with page=N when pagination.hasMore is true.\nNext: localGetFileContent(path), localSearchCode, lspGetSemantics after localSearchCode gives uri/symbolName/lineHint.',schema:{path:"Directory to browse (absolute or workspace-relative). Defaults to the workspace root.",details:"Returns per-entry objects with size, permissions, and dates (structured entries[] output).",hidden:"Includes hidden (dot) files and directories, e.g. .env, .git, .github.",sortBy:"Ordering. 'name': A–Z. 'size': by bytes. 'time': by last-modified (implicitly enables showFileLastModified). 'extension': grouped by file type.",reverse:"Reverses the sort (e.g. sortBy:'time' + reverse:true = oldest first).",pattern:"Name filter — a glob (e.g. '*.ts') or plain substring; only matching entries are returned. For regex, use localFindFiles.",directoriesOnly:"Returns directories only. Mutually exclusive with filesOnly.",filesOnly:"Returns files only. Mutually exclusive with directoriesOnly.",recursive:"Descends into subdirectories (top level only when off). When on without maxDepth, depth is capped automatically; set maxDepth to control cost.",extensions:"Extension whitelist, without dots, e.g. ['ts', 'tsx', 'js']. Only matching files are returned; directories always appear.",maxDepth:"Recursion depth when recursive is on (0 = immediate children). Start shallow on large monorepos, then drill in.",limit:"Caps how many entries are discovered before pagination guards against huge scans. Distinct from page size.",showFileLastModified:"Adds last-modified timestamps per file. Independent of details. Use to spot recently changed files without switching to localFindFiles.",page:"Result page.",itemsPerPage:"Entries per page."}};export const ViewStructureQuerySchema=t(localViewStructure.schema,{...a,path:e.string(),details:e.boolean().optional(),hidden:e.boolean().optional(),sortBy:e.enum(["name","size","time","extension"]).default("name"),reverse:e.boolean().optional(),pattern:e.string().optional(),directoriesOnly:e.boolean().optional(),filesOnly:e.boolean().optional(),recursive:e.boolean().optional(),extensions:l,maxDepth:i(0,o).optional(),limit:i(1,n).optional(),showFileLastModified:e.boolean().optional(),page:r(),itemsPerPage:i(1,s).optional()}).superRefine((e,t)=>{e.filesOnly&&e.directoriesOnly&&t.addIssue({code:"custom",message:"filesOnly and directoriesOnly are mutually exclusive.",path:["directoriesOnly"]})});
@@ -1,2 +1,79 @@
1
+ import { z } from "zod";
1
2
  import type { ToolSpec } from "../../types/index.js";
2
3
  export declare const lspGetSemantics: ToolSpec;
4
+ export declare const LSPGotoDefinitionQuerySchema: z.ZodObject<{
5
+ contextLines: z.ZodOptional<z.ZodNumber>;
6
+ uri: z.ZodString;
7
+ symbolName: z.ZodString;
8
+ lineHint: z.ZodNumber;
9
+ orderHint: z.ZodDefault<z.ZodNumber>;
10
+ id: z.ZodOptional<z.ZodString>;
11
+ mainResearchGoal: z.ZodOptional<z.ZodString>;
12
+ researchGoal: z.ZodOptional<z.ZodString>;
13
+ reasoning: z.ZodOptional<z.ZodString>;
14
+ }, z.core.$strip>;
15
+ export declare const LSPFindReferencesQuerySchema: z.ZodObject<{
16
+ includeDeclaration: z.ZodOptional<z.ZodBoolean>;
17
+ contextLines: z.ZodOptional<z.ZodNumber>;
18
+ itemsPerPage: z.ZodOptional<z.ZodNumber>;
19
+ page: z.ZodDefault<z.ZodNumber>;
20
+ groupByFile: z.ZodOptional<z.ZodBoolean>;
21
+ uri: z.ZodString;
22
+ symbolName: z.ZodString;
23
+ lineHint: z.ZodNumber;
24
+ orderHint: z.ZodDefault<z.ZodNumber>;
25
+ id: z.ZodOptional<z.ZodString>;
26
+ mainResearchGoal: z.ZodOptional<z.ZodString>;
27
+ researchGoal: z.ZodOptional<z.ZodString>;
28
+ reasoning: z.ZodOptional<z.ZodString>;
29
+ }, z.core.$strip>;
30
+ export declare const LSPCallHierarchyQuerySchema: z.ZodObject<{
31
+ direction: z.ZodEnum<{
32
+ incoming: "incoming";
33
+ outgoing: "outgoing";
34
+ }>;
35
+ depth: z.ZodOptional<z.ZodNumber>;
36
+ contextLines: z.ZodOptional<z.ZodNumber>;
37
+ itemsPerPage: z.ZodOptional<z.ZodNumber>;
38
+ page: z.ZodDefault<z.ZodNumber>;
39
+ uri: z.ZodString;
40
+ symbolName: z.ZodString;
41
+ lineHint: z.ZodNumber;
42
+ orderHint: z.ZodDefault<z.ZodNumber>;
43
+ id: z.ZodOptional<z.ZodString>;
44
+ mainResearchGoal: z.ZodOptional<z.ZodString>;
45
+ researchGoal: z.ZodOptional<z.ZodString>;
46
+ reasoning: z.ZodOptional<z.ZodString>;
47
+ }, z.core.$strip>;
48
+ export declare const LspGetSemanticsQuerySchema: z.ZodObject<{
49
+ uri: z.ZodString;
50
+ type: z.ZodDefault<z.ZodEnum<{
51
+ references: "references";
52
+ definition: "definition";
53
+ callers: "callers";
54
+ callees: "callees";
55
+ callHierarchy: "callHierarchy";
56
+ hover: "hover";
57
+ documentSymbols: "documentSymbols";
58
+ typeDefinition: "typeDefinition";
59
+ implementation: "implementation";
60
+ }>>;
61
+ symbolName: z.ZodOptional<z.ZodString>;
62
+ lineHint: z.ZodOptional<z.ZodNumber>;
63
+ orderHint: z.ZodDefault<z.ZodNumber>;
64
+ depth: z.ZodOptional<z.ZodNumber>;
65
+ includeDeclaration: z.ZodDefault<z.ZodBoolean>;
66
+ groupByFile: z.ZodOptional<z.ZodBoolean>;
67
+ page: z.ZodDefault<z.ZodNumber>;
68
+ itemsPerPage: z.ZodOptional<z.ZodNumber>;
69
+ contextLines: z.ZodOptional<z.ZodNumber>;
70
+ format: z.ZodDefault<z.ZodEnum<{
71
+ structured: "structured";
72
+ compact: "compact";
73
+ }>>;
74
+ workspaceRoot: z.ZodOptional<z.ZodString>;
75
+ id: z.ZodOptional<z.ZodString>;
76
+ mainResearchGoal: z.ZodOptional<z.ZodString>;
77
+ researchGoal: z.ZodOptional<z.ZodString>;
78
+ reasoning: z.ZodOptional<z.ZodString>;
79
+ }, z.core.$strip>;
@@ -1 +1 @@
1
- export const lspGetSemantics={name:"lspGetSemantics",description:"Typed LSP queries for semantic navigation (default type: definition).\nPrerequisites: all types except documentSymbols require symbolName + lineHint. lineHint must come from a real localSearchCode match (matches[0].line) — never guess. A wrong lineHint causes silent empty results. If lineHint is unknown: run documentSymbols (uri only) or localSearchCode first.\nType routing: documentSymbols=file outline (uri only); hover=signature+JSDoc; definition=jump to decl; typeDefinition=generic types; implementation=abstract member impl (member name, not class); references=same-package usages (bounded by TS server open files, NOT cross-package — zero results does NOT mean unused, try callers); callers=cross-package incoming calls (TS/JS/Go/Rust only — Python/C++ use references instead); callees=outgoing calls; callHierarchy=both.\nToken efficiency: format:\"compact\" on callers/callees/callHierarchy → significantly fewer tokens. groupByFile:true on references → per-file summary with lines[] (each is a valid lineHint for follow-up calls). contextLines=3–10 on callers/callees embeds source context, reducing follow-up localGetFileContent calls.\nLanguage tiers — Tier 1 all types: TS/JS/Go/Rust. Tier 2 no callHierarchy: Python/C++. Tier 3 documentSymbols+hover+definition only: Shell/HTML/CSS/YAML/TOML.\nOutput signal: resolvedSymbol.foundAtLine confirms which line LSP resolved — if far from lineHint, re-run localSearchCode to get an accurate anchor. payload.kind='empty' means LSP returned no results (symbolNotFound → re-anchor with localSearchCode; serverUnavailable → fall back to localSearchCode). In callers/callees results, each ranges[].line is the lineHint for the next lspGetSemantics call on that symbol.\nevidence.answerReady:true — stop calling.\nNext: localGetFileContent(startLine/endLine) to read the definition; lspGetSemantics(callers) for impact analysis. Batch: up to 5 queries per call — combine definition+hover or definition+callers in one request.",schema:{uri:"Target source file as absolute path or file:/// URI.",type:"(default: definition) — see type routing in description.",symbolName:"Exact identifier at lineHint. Required for all types except documentSymbols. Case-sensitive. No parentheses, no type annotations — bare name only (e.g. 'fetchPRDetail' not 'fetchPRDetail()'). Must match the token at lineHint exactly.",lineHint:"1-based line number of the symbol. Required for all types except documentSymbols. Must come from a real localSearchCode match (matches[0].line) — never estimate or guess. A wrong lineHint causes silent empty results.",orderHint:"0-based index to disambiguate when symbolName appears multiple times on lineHint (e.g. overloaded functions, chained calls). If you get the wrong symbol, increment.",depth:"Call-tree recursion depth for callHierarchy/callers/callees — immediate calls only unless raised. Raise for full chain analysis; high depth on widely-used symbols can be large — combine with format:'compact'.",includeDeclaration:"references: include the symbol's own declaration in results. Set false when you only want callers/usages, not the definition site.",groupByFile:"references only: per-file summary (path + count + all line numbers in lines[]) instead of per-location rows. Use for blast radius each entry's lines[] are valid lineHint values for follow-up calls.",page:"Result page (1-based) for documentSymbols and call-flow results.",itemsPerPage:"Items per page (symbols/locations get a larger page than call-flow results).",contextLines:"Lines of source context around each call site in callers/callees/callHierarchy (location only unless set). Raise to embed calling context and skip follow-up localGetFileContent reads.",format:'"structured" (default): typed objects with full location metadata. "compact": line-oriented strings significantly fewer tokens. Use "compact" for most navigation; use "structured" only when parsing location objects programmatically.',workspaceRoot:"Override the LSP workspace root (absolute path). Omit to use the workspace root auto-resolved from uri. Only needed when the LSP server spans multiple roots."}};
1
+ import{z as e}from"zod";import{buildObject as t,contextLines as n,intRange as o,MAX_LINE_NUMBER as i,MAX_LOCAL_DEPTH as l,MAX_ORDER_HINT as a,MAX_PR_ITEMS_PER_PAGE as s,metaFields as r,pageNumber as c}from"./_toolkit.js";export const lspGetSemantics={name:"lspGetSemantics",description:"Typed LSP queries for semantic navigation (default type: definition).\nPrerequisites: all types except documentSymbols require symbolName + lineHint. lineHint must come from a real localSearchCode match (matches[0].line) — never guess. A wrong lineHint causes silent empty results. If lineHint is unknown: run documentSymbols (uri only) or localSearchCode first.\nType routing: documentSymbols=file outline (uri only); hover=signature+JSDoc; definition=jump to decl; typeDefinition=generic types; implementation=abstract member impl (member name, not class); references=same-package usages (bounded by the language server's open files, NOT cross-package — zero results does NOT mean unused, try callers); callers=cross-package incoming calls (TS/JS/Go/Rust only — Python/C++ use references instead); callees=outgoing calls; callHierarchy=both.\nToken efficiency: format:\"compact\" on callers/callees/callHierarchy → significantly fewer tokens. groupByFile:true on references → per-file summary with lines[] (each is a valid lineHint for follow-up calls). contextLines=3–10 on callers/callees embeds source context, reducing follow-up localGetFileContent calls.\nLanguage tiers — Tier 1 all types: TS/JS/Go/Rust. Tier 2 no callHierarchy: Python/C++. Tier 3 documentSymbols+hover+definition only: Shell/HTML/CSS/YAML/TOML.\nOutput signal: resolvedSymbol.foundAtLine confirms which line LSP resolved — if far from lineHint, re-run localSearchCode to get an accurate anchor. payload.kind='empty' means LSP returned no results (symbolNotFound → re-anchor with localSearchCode; serverUnavailable → fall back to localSearchCode). In callers/callees results, each ranges[].line is the lineHint for the next lspGetSemantics call on that symbol.\nevidence.answerReady:true — stop calling.\nNext: localGetFileContent(startLine/endLine) to read the definition; lspGetSemantics(callers) for impact analysis. Batch: up to 5 queries per call — combine definition+hover or definition+callers in one request.",schema:{uri:"Target source file as an absolute path or file:/// URI.",type:"Which query to run — see the type-routing list in the description.",symbolName:"Exact identifier sitting at lineHint bare name only, no parentheses or type annotations (e.g. 'fetchPRDetail', not 'fetchPRDetail()'). Case-sensitive, must match the token exactly. Required for every type except documentSymbols.",lineHint:"Line where symbolName appears. Must come from a real localSearchCode match (matches[0].line) — never guess; a wrong value silently returns nothing. Required for every type except documentSymbols.",orderHint:"Disambiguates when symbolName occurs multiple times on lineHint (e.g. overloads, chained calls) increment if you get the wrong symbol.",depth:"Recursion depth for callHierarchy/callers/callees — immediate calls only unless raised. Raise for full chains; pair high depth on hot symbols with format:'compact' to limit size.",includeDeclaration:"references: whether to include the symbol's own declaration. Set false to get only usages, not the definition site.",groupByFile:"references: returns a per-file summary (path + count + all line numbers in lines[]) instead of per-location rows ideal for blast radius; each line is a valid lineHint for follow-ups.",page:"Result page for documentSymbols and call-flow results.",itemsPerPage:"Items per page (symbol/location lists get a larger page than call-flow results).",contextLines:"Source lines around each call site in callers/callees/callHierarchy (locations only unless set). Raise to embed calling context and skip a follow-up localGetFileContent.",format:'"structured": typed objects with full location metadata. "compact": line-oriented strings, far fewer tokens. Prefer "compact" for navigation; use "structured" only when parsing locations programmatically.',workspaceRoot:"Overrides the LSP workspace root (absolute path). Omit to auto-resolve from uri; needed only when the server spans multiple roots."}};const m={...r,uri:e.string(),symbolName:e.string(),lineHint:o(1,i),orderHint:o(0,a).default(0)};export const LSPGotoDefinitionQuerySchema=t(lspGetSemantics.schema,{...m,contextLines:n()});export const LSPFindReferencesQuerySchema=t(lspGetSemantics.schema,{...m,includeDeclaration:e.boolean().optional(),contextLines:n(),itemsPerPage:o(1,s).optional(),page:c(),groupByFile:e.boolean().optional()});export const LSPCallHierarchyQuerySchema=t(lspGetSemantics.schema,{...m,direction:e.enum(["incoming","outgoing"]),depth:o(0,l).optional(),contextLines:n(),itemsPerPage:o(1,s).optional(),page:c()});export const LspGetSemanticsQuerySchema=t(lspGetSemantics.schema,{...r,uri:e.string(),type:e.enum(["definition","references","callers","callees","callHierarchy","hover","documentSymbols","typeDefinition","implementation"]).default("definition"),symbolName:e.string().min(1).optional(),lineHint:o(1,i).optional(),orderHint:o(0,a).default(0),depth:o(0,l).optional(),includeDeclaration:e.boolean().default(!0),groupByFile:e.boolean().optional(),page:c(),itemsPerPage:o(1,s).optional(),contextLines:n(),format:e.enum(["structured","compact"]).default("structured"),workspaceRoot:e.string().optional()}).superRefine((e,t)=>{"documentSymbols"!==e.type&&(e.symbolName||t.addIssue({code:"custom",path:["symbolName"],message:"symbolName is required unless type is documentSymbols"}),Number.isInteger(e.lineHint)||t.addIssue({code:"custom",path:["lineHint"],message:"lineHint is required unless type is documentSymbols"}))});
@@ -1,2 +1,11 @@
1
+ import { z } from "zod";
1
2
  import type { ToolSpec } from "../../types/index.js";
2
3
  export declare const npmSearch: ToolSpec;
4
+ export declare const NpmPackageQuerySchema: z.ZodObject<{
5
+ packageName: z.ZodString;
6
+ page: z.ZodDefault<z.ZodNumber>;
7
+ id: z.ZodOptional<z.ZodString>;
8
+ mainResearchGoal: z.ZodOptional<z.ZodString>;
9
+ researchGoal: z.ZodOptional<z.ZodString>;
10
+ reasoning: z.ZodOptional<z.ZodString>;
11
+ }, z.core.$strip>;
@@ -1 +1 @@
1
- export const npmSearch={name:"npmSearch",description:'npm package lookup and keyword search. Returns package metadata and source repository handoff.\nExact package name (e.g. "react", "@octokit/rest") returns one rich result with version, description, keywords, and repository owner/repo for GitHub handoff.\nKeyword query (e.g. "http client typescript") returns lean results — paginate with page; pagination.hasMore and totalFound available in output.\nWhen owner+repo is present in the result, pass directly to ghViewRepoStructure or ghSearchCode. If a repositoryDirectory path follows owner/repo in the result, pass it as path= to ghViewRepoStructure to scope the tree to the package subdirectory.\nSkip if owner/repo is already known — go directly to ghViewRepoStructure.\nBatch up to 5 packages in one call: queries:[{packageName:"react"},{packageName:"lodash"}].\nNext: ghViewRepoStructure or ghSearchCode when owner/repo exists; ghSearchRepos when owner/repo is absent or non-GitHub.',schema:{packageName:"Required. Exact npm package name or keyword search query. An exact name (e.g. 'react', '@octokit/rest') returns one canonical rich result returns empty if the package does not exist (check spelling before assuming private). A keyword query returns a lean list. Scoped packages need the full scope: '@octokit/rest' not 'rest'.",page:"Keyword-result page (1-based). Exact package names always return page 1 regardless. Paginate using pagination.hasMore."}};
1
+ import{z as e}from"zod";import{buildObject as r,metaFields as t,pageNumber as a}from"./_toolkit.js";export const npmSearch={name:"npmSearch",description:'npm package lookup and keyword search. Returns package metadata and source repository handoff.\nExact package name (e.g. "react", "@octokit/rest") returns one rich result with version, description, keywords, and repository owner/repo for GitHub handoff.\nKeyword query (e.g. "http client typescript") returns lean results — paginate with page; pagination.hasMore and totalFound available in output.\nWhen owner+repo is present in the result, pass directly to ghViewRepoStructure or ghSearchCode. If a repositoryDirectory path follows owner/repo in the result, pass it as path= to ghViewRepoStructure to scope the tree to the package subdirectory.\nSkip if owner/repo is already known — go directly to ghViewRepoStructure.\nBatch up to 5 packages in one call: queries:[{packageName:"react"},{packageName:"lodash"}].\nNext: ghViewRepoStructure or ghSearchCode when owner/repo exists; ghSearchRepos when owner/repo is absent or non-GitHub.',schema:{packageName:"An exact npm package name or a keyword query. An exact name (e.g. 'react', '@octokit/rest') returns one rich result, or empty if it doesn't exist (check spelling before assuming it's private). A keyword query returns a lean list. Scoped packages need the full scope: '@octokit/rest', not 'rest'.",page:"Page for keyword results; exact-name lookups always return page 1. Paginate while pagination.hasMore."}};export const NpmPackageQuerySchema=r(npmSearch.schema,{...t,packageName:e.string(),page:a()});