@pkgseer/cli 0.4.0 → 0.4.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.
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
version
|
|
4
|
-
} from "./shared/chunk-
|
|
4
|
+
} from "./shared/chunk-d340pysc.js";
|
|
5
5
|
|
|
6
6
|
// src/cli.ts
|
|
7
7
|
import { Command } from "commander";
|
|
@@ -6021,7 +6021,7 @@ var schemas = {
|
|
|
6021
6021
|
navigationMode: z2.enum(["summary", "detailed"]).optional().describe("Response detail level. summary (default) returns core fields; detailed adds all optional fields."),
|
|
6022
6022
|
waitTimeoutMs: z2.number().int().min(0).max(30000).optional().describe("Max milliseconds to wait for package indexing (0-30000). 0 = error immediately if not indexed."),
|
|
6023
6023
|
symbolReference: z2.object({
|
|
6024
|
-
symbol_id: z2.number().int().optional().describe("Direct symbol ID (preferred
|
|
6024
|
+
symbol_id: z2.number().int().optional().describe("Direct symbol ID from find_symbol or list_symbols results (preferred, avoids ambiguity)"),
|
|
6025
6025
|
registry: z2.enum(["npm", "pypi", "hex", "crates", "nuget", "maven", "zig", "vcpkg"]).optional().describe("Package registry (required for name-based lookup)"),
|
|
6026
6026
|
package_name: z2.string().max(255).optional().describe("Package name (required for name-based lookup)"),
|
|
6027
6027
|
symbol_name: z2.string().max(500).optional().describe("Symbol name or qualified path (required for name-based lookup). Matches both short name and qualifiedPath.")
|
|
@@ -6083,7 +6083,7 @@ var argsSchema = {
|
|
|
6083
6083
|
function createCallPathTool(pkgseerService) {
|
|
6084
6084
|
return {
|
|
6085
6085
|
name: "call_path",
|
|
6086
|
-
description: "Find the shortest call path between two symbols in the same package. " + "Uses BFS to
|
|
6086
|
+
description: "Find the shortest call path between two symbols in the same package. " + "Uses BFS to trace how function A eventually calls function B through intermediate calls. " + "Returns whether a path was found, with ordered call paths (shortest first) and hop details. " + "For direct callers/callees only, use symbol_callers or symbol_callees instead.",
|
|
6087
6087
|
schema: argsSchema,
|
|
6088
6088
|
handler: async (args, _extra) => {
|
|
6089
6089
|
return withErrorHandling("find call path", async () => {
|
|
@@ -6157,7 +6157,7 @@ var argsSchema3 = {
|
|
|
6157
6157
|
function createFetchCodeContextTool(pkgseerService) {
|
|
6158
6158
|
return {
|
|
6159
6159
|
name: "fetch_code_context",
|
|
6160
|
-
description: "Fetch code content from a repository
|
|
6160
|
+
description: "Fetch code content from a repository by file path and line range. " + "Returns full file by default, or a specific line range. " + "For symbol-based lookup, use find_symbol(include_code=true) instead. " + "Requires repo_url, git_ref (tag/commit/branch), and file_path.",
|
|
6161
6161
|
schema: argsSchema3,
|
|
6162
6162
|
handler: async ({ repo_url, git_ref, file_path, start_line, end_line }, _extra) => {
|
|
6163
6163
|
return withErrorHandling("fetch code context", async () => {
|
|
@@ -6226,7 +6226,7 @@ var argsSchema5 = {
|
|
|
6226
6226
|
function createFindSymbolTool(pkgseerService) {
|
|
6227
6227
|
return {
|
|
6228
6228
|
name: "find_symbol",
|
|
6229
|
-
description: "Find functions, methods, or classes by name in a package. " + "
|
|
6229
|
+
description: "Find functions, methods, or classes by name in a package. " + "Set include_code=true to get full source code inline, avoiding separate fetch_code_context calls. " + "Returns: symbol ID, name, qualified path, kind, file location, and optionally source code. " + "Omit name to get all public exports. Use namespace to filter by module path.",
|
|
6230
6230
|
schema: argsSchema5,
|
|
6231
6231
|
handler: async (args, _extra) => {
|
|
6232
6232
|
return withErrorHandling("find symbol", async () => {
|
|
@@ -6295,7 +6295,7 @@ var argsSchema7 = {
|
|
|
6295
6295
|
function createListSymbolsTool(pkgseerService) {
|
|
6296
6296
|
return {
|
|
6297
6297
|
name: "list_symbols",
|
|
6298
|
-
description: "Browse symbols in a package by scope. " + "Use scope='exports' for public API
|
|
6298
|
+
description: "Browse symbols in a package by scope. " + "Use scope='exports' for public API with namespace grouping and optional popularity. " + "Use scope='file' with file_path for all symbols in a specific file. " + "Returns symbols with IDs, names, qualified paths, kinds, and file locations. " + "Use find_symbol(name=<symbol>, include_code=true) to get source for any listed symbol.",
|
|
6299
6299
|
schema: argsSchema7,
|
|
6300
6300
|
handler: async (args, _extra) => {
|
|
6301
6301
|
return withErrorHandling("list symbols", async () => {
|
|
@@ -6617,7 +6617,7 @@ Results may be incomplete. Retry later for more complete results.`;
|
|
|
6617
6617
|
function createSearchTool(pkgseerService) {
|
|
6618
6618
|
return {
|
|
6619
6619
|
name: "search",
|
|
6620
|
-
description: "Search code and documentation across packages. Returns functions, classes, and
|
|
6620
|
+
description: "Search code and documentation across packages. Returns functions, classes, and doc pages " + "matching your query. Use mode='code' for code only, mode='docs' for docs only, or " + "mode='all' (default). Provide 1-20 packages. Results include relevance scores and snippets. " + "For full source of code results, use find_symbol(name=<title>, include_code=true). " + "If packages need indexing, waits up to waitTimeoutMs (default 10s) or returns searchRef — use search_status to poll.",
|
|
6621
6621
|
schema: argsSchema13,
|
|
6622
6622
|
handler: async ({ packages, query, mode, limit, waitTimeoutMs }, _extra) => {
|
|
6623
6623
|
return withErrorHandling("search packages", async () => {
|
|
@@ -6737,7 +6737,7 @@ var argsSchema15 = {
|
|
|
6737
6737
|
function createSearchStatusTool(pkgseerService) {
|
|
6738
6738
|
return {
|
|
6739
6739
|
name: "search_status",
|
|
6740
|
-
description: "Check the status of an async search and get results if complete. " + "Use
|
|
6740
|
+
description: "Check the status of an async search and get results if complete. " + "Use after search returns completed=false with a searchRef. Sessions expire after 1 hour. " + "Returns status (PENDING, INDEXING, SEARCHING, COMPLETED, TIMEOUT, FAILED), " + "progress info (packagesReady/packagesTotal), and results when COMPLETED.",
|
|
6741
6741
|
schema: argsSchema15,
|
|
6742
6742
|
handler: async ({ searchRef }, _extra) => {
|
|
6743
6743
|
return withErrorHandling("check search status", async () => {
|
|
@@ -6801,7 +6801,7 @@ var argsSchema16 = {
|
|
|
6801
6801
|
function createSearchSymbolsTool(pkgseerService) {
|
|
6802
6802
|
return {
|
|
6803
6803
|
name: "search_symbols",
|
|
6804
|
-
description: "Full-text search within package code. " + "Searches across functions, classes, modules, and doc sections. " + "Returns
|
|
6804
|
+
description: "Full-text search within package code. " + "Searches across functions, classes, modules, and doc sections. " + "Returns matching code chunks with name, type, file path, line numbers, and content previews. " + "Follow-up: use find_symbol(name=<result.name>, include_code=true) to get full source.",
|
|
6805
6805
|
schema: argsSchema16,
|
|
6806
6806
|
handler: async (args, _extra) => {
|
|
6807
6807
|
return withErrorHandling("search symbols", async () => {
|
|
@@ -6837,7 +6837,7 @@ var argsSchema17 = {
|
|
|
6837
6837
|
function createSymbolCalleesTool(pkgseerService) {
|
|
6838
6838
|
return {
|
|
6839
6839
|
name: "symbol_callees",
|
|
6840
|
-
description: "Find what a symbol calls (its dependencies). " + "Returns direct callees at max_depth=1, or transitive call chains at higher depths. " + "Includes
|
|
6840
|
+
description: "Find what a symbol calls (its dependencies). " + "Returns direct callees at max_depth=1, or transitive call chains at higher depths. " + "Includes callee names, qualified paths, file locations, call lines, and external package references. " + "Get symbol_id from find_symbol or list_symbols results. See symbol_callers for the reverse.",
|
|
6841
6841
|
schema: argsSchema17,
|
|
6842
6842
|
handler: async (args, _extra) => {
|
|
6843
6843
|
return withErrorHandling("find symbol callees", async () => {
|
|
@@ -6876,7 +6876,7 @@ var argsSchema18 = {
|
|
|
6876
6876
|
function createSymbolCallersTool(pkgseerService) {
|
|
6877
6877
|
return {
|
|
6878
6878
|
name: "symbol_callers",
|
|
6879
|
-
description: "Find what calls a symbol (its dependents/callers). " + "Returns
|
|
6879
|
+
description: "Find what calls a symbol (its dependents/callers). " + "Returns the target symbol and a list of callers with file locations and call line numbers. " + "Use same_package_only to limit to callers within the same package. " + "Get symbol_id from find_symbol or list_symbols results. See symbol_callees for the reverse.",
|
|
6880
6880
|
schema: argsSchema18,
|
|
6881
6881
|
handler: async (args, _extra) => {
|
|
6882
6882
|
return withErrorHandling("find symbol callers", async () => {
|
package/dist/index.js
CHANGED