@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-c1e7ntb6.js";
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 when available)"),
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 find how function A eventually calls function B through intermediate calls. " + "Returns: whether a path was found, source and destination symbols, " + "and ordered call paths (shortest first) with hop details.",
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. Use this to expand code search results and see " + "more context around a match. Returns full file by default, or a specific line range. " + "Requires repo_url, git_ref (tag/commit/branch), and file_path from search results.",
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. " + "Use for targeted lookups when you know the symbol name. " + "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.",
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 exploration with namespace grouping and optional popularity data. " + "Use scope='file' with file_path to see all symbols in a specific file. " + "Returns: symbols with IDs, names, qualified paths, kinds, and file locations.",
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 documentation pages " + "matching your query. Use mode='code' for code only, mode='docs' for documentation only, or " + "mode='all' (default) for both. Provide 1-20 packages to search. Results include relevance scores " + "and snippets showing matches. If packages need indexing, the search will wait up to waitTimeoutMs " + "(default 10s). If not complete, returns progress info with searchRef for follow-up.",
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 this after a search returns incomplete (completed=false) to poll for completion. " + "Returns status (PENDING, INDEXING, SEARCHING, COMPLETED, TIMEOUT, FAILED), " + "progress info (packagesReady/packagesTotal), and results when status is COMPLETED.",
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: matching code chunks with name, type, file path, line numbers, " + "and content previews. Use for finding implementations by keyword.",
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: callee names, qualified paths, file locations, call lines, " + "and external package references. Use to understand a function's dependency footprint.",
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: the target symbol and a list of symbols that call it, " + "with their file locations and call line numbers. " + "Use same_package_only to limit to callers within the same package.",
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
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  version
3
- } from "./shared/chunk-c1e7ntb6.js";
3
+ } from "./shared/chunk-d340pysc.js";
4
4
  export {
5
5
  version
6
6
  };
@@ -1,4 +1,4 @@
1
1
  // package.json
2
- var version = "0.4.0";
2
+ var version = "0.4.1";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pkgseer/cli",
3
3
  "description": "CLI companion for PkgSeer - package intelligence for developers and AI assistants",
4
- "version": "0.4.0",
4
+ "version": "0.4.1",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist",