@easbot/codebase 0.3.37 → 0.3.40
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/README.en.md +139 -40
- package/README.md +69 -1
- package/dist/assets/txt/src/plugin/tool/codebase.txt +214 -0
- package/dist/chunks/{chunk-OUJNWRIY.mjs → chunk-KUX25CUR.mjs} +2 -2
- package/dist/chunks/{chunk-FZNMPXUO.mjs → chunk-OXF2UU4K.mjs} +10 -10
- package/dist/chunks/{chunk-6NYX22KV.cjs → chunk-P3IAXGOT.cjs} +6 -6
- package/dist/chunks/{chunk-VXLUR7M5.cjs → chunk-XGZDPIEP.cjs} +11 -11
- package/dist/chunks/{cli-handler-7HKSS3UW.mjs → cli-handler-FGFM3HBJ.mjs} +1 -1
- package/dist/chunks/cli-handler-WCP6T427.cjs +1 -0
- package/dist/chunks/{stdio-server-37QG6AO2.cjs → stdio-server-BLGU4RQ5.cjs} +2 -2
- package/dist/chunks/{stdio-server-QAEXVFSI.mjs → stdio-server-OD7CDSWQ.mjs} +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +7 -1
- package/dist/index.d.cts +162 -1
- package/dist/index.d.ts +162 -1
- package/dist/index.mjs +7 -1
- package/package.json +12 -9
- package/dist/chunks/cli-handler-OU2TC2SB.cjs +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as COMMANDS_HELP,d as handleCodebaseCli,e as mapCodebaseDoctor,a as renderBanner,b as renderHelp}from'./chunk-
|
|
1
|
+
export{c as COMMANDS_HELP,d as handleCodebaseCli,e as mapCodebaseDoctor,a as renderBanner,b as renderHelp}from'./chunk-KUX25CUR.mjs';import'./chunk-OXF2UU4K.mjs';import'./chunk-ETCTXAXR.mjs';import'./chunk-H4VZF3ZQ.mjs';import'./chunk-ECMVXJH2.mjs';import'./chunk-QZMJ5EUF.mjs';import'./chunk-EU2I2AMK.mjs';import'./chunk-KTSR5VPT.mjs';import'./chunk-ESA2CL57.mjs';import'./chunk-43WAI4Z7.mjs';import'./chunk-47LKNS74.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkP3IAXGOT_cjs=require('./chunk-P3IAXGOT.cjs');require('./chunk-XGZDPIEP.cjs'),require('./chunk-Y7JDLK56.cjs'),require('./chunk-J7Z3MIR7.cjs'),require('./chunk-D5NDNAKA.cjs'),require('./chunk-3DAM6EZN.cjs'),require('./chunk-AARBEAIB.cjs'),require('./chunk-W5SMGCKO.cjs'),require('./chunk-EH2QTB6S.cjs'),require('./chunk-VZCOLSBF.cjs'),require('./chunk-R32346OA.cjs');Object.defineProperty(exports,"COMMANDS_HELP",{enumerable:true,get:function(){return chunkP3IAXGOT_cjs.c}});Object.defineProperty(exports,"handleCodebaseCli",{enumerable:true,get:function(){return chunkP3IAXGOT_cjs.d}});Object.defineProperty(exports,"mapCodebaseDoctor",{enumerable:true,get:function(){return chunkP3IAXGOT_cjs.e}});Object.defineProperty(exports,"renderBanner",{enumerable:true,get:function(){return chunkP3IAXGOT_cjs.a}});Object.defineProperty(exports,"renderHelp",{enumerable:true,get:function(){return chunkP3IAXGOT_cjs.b}});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
'use strict';var chunkVXLUR7M5_cjs=require('./chunk-VXLUR7M5.cjs');require('./chunk-3DAM6EZN.cjs'),require('./chunk-AARBEAIB.cjs'),require('./chunk-W5SMGCKO.cjs'),require('./chunk-EH2QTB6S.cjs'),require('./chunk-VZCOLSBF.cjs'),require('./chunk-R32346OA.cjs');var mcp=require('@easbot/mcp'),utils=require('@easbot/utils');var f=utils.Log.create({service:"codebase.mcp.stdio"}),Q=["query","node","context","impact","callers","callees","explore","status","doctor"];exports.CodebaseStdioServer=void 0;(t=>{let n;function s(){return n||(f.debug("initializing CodebaseStdioServer state factory (lazy)"),n=()=>({toolNames:[...Q],cachedConfigId:"",cachedConfigName:"",cachedConfigVersion:""})),n}async function a(o,r){let p=s()(),g=(process.env.EASBOT_MCP_TRUSTED_LOCAL??"true").toLowerCase()!=="false",l=new mcp.ToolRegistry;me(l,o,g);let y=p.toolNames;f.info("starting codebase MCP stdio server",{id:r.id,name:r.name,toolCount:y.length});let h=await mcp.createAndStartStdioServer(r,l),E=null,$=new Promise(c=>{E=c;}),S=c=>{f.info("received signal, stopping MCP server",{signal:c}),E?.();},T=()=>S("SIGINT"),N=()=>S("SIGTERM");process.on("SIGINT",T),process.on("SIGTERM",N);try{await $;}finally{try{process.off("SIGINT",T),process.off("SIGTERM",N);}catch(c){f.warn("failed to remove signal handlers",{error:utils.errorMeta(c)});}try{await h.stop();}catch(c){f.warn("server.stop failed during cleanup",{error:utils.errorMeta(c)});}try{await o.close();}catch(c){f.warn("codebase.close failed during cleanup",{error:utils.errorMeta(c)});}}return {id:r.id,name:r.name,version:r.version,tools:y}}t.start=a;function d(){return s()().toolNames}t.getToolNames=d;function e(){n=void 0;}t.__resetForTests=e;})(exports.CodebaseStdioServer||(exports.CodebaseStdioServer={}));var X={readOnlyHint:true,destructiveHint:false,idempotentHint:true,openWorldHint:false},z={type:"object",additionalProperties:false,properties:{query:{type:"string",description:'Symbol name or partial name (e.g., "auth", "UserService"). Empty string returns recent nodes.'},kind:{type:"string",description:"Filter by node kind. One of: class, function, method, interface, type, variable, route, component, const.",enum:["class","function","method","interface","type","variable","route","component","const"]},file:{type:"string",description:'Filter by file path (substring match, e.g., "src/auth").'},intent:{type:"string",description:'LLM context for ranking (e.g., "adding OAuth support").'},includeContent:{type:"boolean",description:"Include source code snippets (default false; use `explore` for full code).",default:false},maxResults:{type:"number",description:"Maximum results",default:10,minimum:1,maximum:100},language:{type:"string",description:"Filter by programming language",enum:["ts","tsx","js","py","rs","go","c","cpp","csharp","java","scala","ruby","php","zig"]},astType:{type:"string",description:"Filter by AST node type (more specific than kind)."}},required:[]},K={type:"object",additionalProperties:false,properties:{name:{type:"string",description:'Symbol name (e.g., "AuthService"). Recommended \u2014 LLM workflow: query \u2192 use returned name.'},nodeId:{type:"string",description:"Node ID (direct lookup, zero ambiguity)."},file:{type:"string",description:"File path or basename to disambiguate when multiple same-named symbols exist."},kind:{type:"string",description:"Filter by node kind (class, function, method, interface, type, variable, route, component, const)."},includeContent:{type:"boolean",description:"Include source code body (default true).",default:true},includeEdges:{type:"boolean",description:"Include edge listing (incoming + outgoing).",default:true},maxEdgesPerNode:{type:"number",description:"Max edges to return (default 10; range [1, 100]).",default:10,minimum:1,maximum:100}},required:[]},V={type:"object",additionalProperties:false,properties:{name:{type:"string",description:"Symbol name \u2014 LLM workflow friendly."},nodeId:{type:"string",description:"Node ID (direct lookup)."},file:{type:"string",description:"File path or basename to disambiguate."},kind:{type:"string",description:"Filter by node kind in BFS result."},depth:{type:"number",description:"BFS depth (1 = direct only, 2 = default, 3 = max).",default:2,minimum:1,maximum:3},maxNodes:{type:"number",description:"Max nodes in result.",default:100,minimum:1,maximum:500},direction:{type:"string",description:"Edge direction filter",enum:["incoming","outgoing","both"],default:"both"},maxEdgesPerNode:{type:"number",description:"Max edges per direction per BFS level (default 10; range [1, 100]).",default:10,minimum:1,maximum:100}},required:[]},J={type:"object",additionalProperties:false,properties:{name:{type:"string",description:"Symbol name \u2014 LLM workflow friendly."},nodeId:{type:"string",description:"Node ID (direct lookup)."},file:{type:"string",description:"File path or basename to disambiguate."},kind:{type:"string",description:"Filter by node kind in BFS result."},depth:{type:"number",description:"Max BFS depth (1-3).",default:2,minimum:1,maximum:3},maxResults:{type:"number",description:"Max affected symbols (default 10; range [1, 200]).",default:10,minimum:1,maximum:200},maxEdgesPerNode:{type:"number",description:"Max incoming edges per BFS level (default 10; range [1, 100]).",default:10,minimum:1,maximum:100}},required:[]},Z={type:"object",additionalProperties:false,properties:{name:{type:"string",description:"Symbol name to find callers for."},nodeId:{type:"string",description:"Node ID (direct lookup)."},file:{type:"string",description:"File path or basename to disambiguate."},kind:{type:"string",description:"Filter by node kind."},maxResults:{type:"number",description:"Max callers to return (default 10; range [1, 200]).",default:10,minimum:1,maximum:200},maxEdgesPerNode:{type:"number",description:"Max incoming edges (default 10; range [1, 100]).",default:10,minimum:1,maximum:100}},required:[]},ee={type:"object",additionalProperties:false,properties:{name:{type:"string",description:"Symbol name to find callees for."},nodeId:{type:"string",description:"Node ID (direct lookup)."},file:{type:"string",description:"File path or basename to disambiguate."},kind:{type:"string",description:"Filter by node kind."},maxResults:{type:"number",description:"Max callees to return (default 10; range [1, 200]).",default:10,minimum:1,maximum:200},maxEdgesPerNode:{type:"number",description:"Max outgoing edges (default 10; range [1, 100]).",default:10,minimum:1,maximum:100}},required:[]},te={type:"object",additionalProperties:false,properties:{query:{type:"string",description:'Symbol name or natural language query (e.g., "auth flow", "MemorySystem").'},file:{type:"string",description:"File path or basename to disambiguate."},kind:{type:"string",description:"Filter by node kind."},maxFiles:{type:"number",description:"Max entry-point files.",default:5,minimum:1,maximum:20},maxSymbols:{type:"number",description:"Max symbols per file.",default:3,minimum:1,maximum:10},maxEdgesPerNode:{type:"number",description:"Max caller/callee edges per symbol (default 10; range [1, 100]).",default:10,minimum:1,maximum:100},depth:{type:"number",description:"Neighbor depth for callers/callees (default 1).",default:1,minimum:1,maximum:2},includeContent:{type:"boolean",description:"Include source code body (default true).",default:true},intent:{type:"string",description:"LLM context for ranking."}},required:["query"]},q={type:"object",additionalProperties:false,properties:{}},ne={query:'Hybrid search over indexed code nodes (FTS + vector + basic + name-segment). Returns symbol locations grouped by file with line-numbered snippets.\n\nWHEN TO USE: Quick lookup of "where is X defined?" \u2014 get symbol locations and snippets in one call. Use `context` to understand a symbol\'s surroundings; use `impact` to see blast radius; use `explore` to get the actual source.\n\nAFTER THIS: Use `node <name>` to fetch full details of one match; use `context` to walk neighbors; use `explore` to get source code.\n\nNOTES: Default FTS-only (fast). Pass `includeContent: true` to include code snippets in results. Use `kind` for friendlier semantic filter (class/function/method/...) instead of `astType`.',node:"Show details for a single symbol: kind, language, location, modifiers, source code, edges.\n\nWHEN TO USE: After `query` / `context` returns a list \u2014 fetch one match's full metadata and edge summary. Pass `name` (preferred) or `nodeId`.\n\nAFTER THIS: Use `context` to walk neighbors; use `impact` for blast radius; use `explore` to get source code + caller/callee trail.\n\nNOTES: `name` is the LLM-friendly input. `file` / `kind` disambiguate when multiple same-named symbols exist. Source code is included by default (set `includeContent: false` for metadata only).",context:"Build a sub-graph around a symbol (BFS to N-level neighbors). Returns incoming/outgoing edges and neighbor nodes grouped by depth.\n\nWHEN TO USE: Understand a symbol's surroundings \u2014 who calls it, what it calls, who extends it. Use after `query` / `node` to get the symbol.\n\nAFTER THIS: Use `impact` for blast-radius (callers only, deeper depth). Use `callers` / `callees` for a flat list. Use `query` to find related symbols.\n\nNOTES: `name` is the LLM-friendly input. Does NOT include source code (use `explore` for code). Set `direction` to narrow to incoming/outgoing only.",impact:"Blast radius of changing a symbol: BFS incoming edges (CALLS / IMPORTS / TYPE_REFERENCES), bucketed by depth. d=1 (WILL BREAK) / d=2 (LIKELY AFFECTED) / d=3 (MAY NEED TESTING).\n\nWHEN TO USE: Before refactoring a symbol \u2014 see what depends on it. Use after `query` to get the symbol.\n\nAFTER THIS: Review d=1 first (those WILL BREAK). Use `node <name>` on high-risk nodes to read their source.\n\nNOTES: `name` is the LLM-friendly input. Returns counts per depth bucket, not full lists. For flat caller list, use `callers`.",callers:'Flat list of who calls <symbol> (incoming CALLS / IMPORTS / TYPE_REFERENCES / EXTENDS / IMPLEMENTS / METHOD_OVERRIDES).\n\nWHEN TO USE: Quick "who depends on this?" lookup. Use `impact` for bucketed risk analysis; use `context` for both directions.\n\nAFTER THIS: Use `node <name>` on a high-traffic caller to read its source.\n\nNOTES: `name` is the LLM-friendly input. Returns up to `maxResults` callers (default 10). Use `file` / `kind` to disambiguate.',callees:'Flat list of what <symbol> calls (outgoing CALLS / IMPORTS / TYPE_REFERENCES / EXTENDS / IMPLEMENTS).\n\nWHEN TO USE: Quick "what does this function do?" lookup. Use `context` for both directions.\n\nAFTER THIS: Use `node <name>` on a key callee to read its source.\n\nNOTES: `name` is the LLM-friendly input. Returns up to `maxResults` callees (default 10). Use `file` / `kind` to disambiguate.',explore:"**PRIMARY TOOL \u2014 call FIRST** for almost any question OR before an edit: how does X work, architecture, a bug, where/what is X, surveying an area, or symbols you are about to change.\n\nReturns verbatim source of relevant symbols grouped by file in ONE capped call (Read-equivalent \u2014 treat shown source as already Read; do NOT re-open those files), plus caller/callee trail.\n\nWHEN TO USE: Whenever you need to understand an area of the codebase or before refactoring. Query can be a symbol name or natural language.\n\nAFTER THIS: Use `node <name>` for metadata only; use `impact` for blast-radius; use `callers` / `callees` for flat lists.\n\nNOTES: Usually the ONLY call you need \u2014 more accurate context, in far fewer tokens and round-trips than search/Read/Grep loop. The single most cost-effective tool.",status:`Show index state, db path, node/edge counts, indexed files, meta config.
|
|
1
|
+
'use strict';var chunkXGZDPIEP_cjs=require('./chunk-XGZDPIEP.cjs');require('./chunk-3DAM6EZN.cjs'),require('./chunk-AARBEAIB.cjs'),require('./chunk-W5SMGCKO.cjs'),require('./chunk-EH2QTB6S.cjs'),require('./chunk-VZCOLSBF.cjs'),require('./chunk-R32346OA.cjs');var mcp=require('@easbot/mcp'),utils=require('@easbot/utils');var f=utils.Log.create({service:"codebase.mcp.stdio"}),Q=["query","node","context","impact","callers","callees","explore","status","doctor"];exports.CodebaseStdioServer=void 0;(t=>{let n;function s(){return n||(f.debug("initializing CodebaseStdioServer state factory (lazy)"),n=()=>({toolNames:[...Q],cachedConfigId:"",cachedConfigName:"",cachedConfigVersion:""})),n}async function a(o,r){let p=s()(),g=(process.env.EASBOT_MCP_TRUSTED_LOCAL??"true").toLowerCase()!=="false",l=new mcp.ToolRegistry;me(l,o,g);let y=p.toolNames;f.info("starting codebase MCP stdio server",{id:r.id,name:r.name,toolCount:y.length});let h=await mcp.createAndStartStdioServer(r,l),E=null,$=new Promise(c=>{E=c;}),S=c=>{f.info("received signal, stopping MCP server",{signal:c}),E?.();},T=()=>S("SIGINT"),N=()=>S("SIGTERM");process.on("SIGINT",T),process.on("SIGTERM",N);try{await $;}finally{try{process.off("SIGINT",T),process.off("SIGTERM",N);}catch(c){f.warn("failed to remove signal handlers",{error:utils.errorMeta(c)});}try{await h.stop();}catch(c){f.warn("server.stop failed during cleanup",{error:utils.errorMeta(c)});}try{await o.close();}catch(c){f.warn("codebase.close failed during cleanup",{error:utils.errorMeta(c)});}}return {id:r.id,name:r.name,version:r.version,tools:y}}t.start=a;function d(){return s()().toolNames}t.getToolNames=d;function e(){n=void 0;}t.__resetForTests=e;})(exports.CodebaseStdioServer||(exports.CodebaseStdioServer={}));var X={readOnlyHint:true,destructiveHint:false,idempotentHint:true,openWorldHint:false},z={type:"object",additionalProperties:false,properties:{query:{type:"string",description:'Symbol name or partial name (e.g., "auth", "UserService"). Empty string returns recent nodes.'},kind:{type:"string",description:"Filter by node kind. One of: class, function, method, interface, type, variable, route, component, const.",enum:["class","function","method","interface","type","variable","route","component","const"]},file:{type:"string",description:'Filter by file path (substring match, e.g., "src/auth").'},intent:{type:"string",description:'LLM context for ranking (e.g., "adding OAuth support").'},includeContent:{type:"boolean",description:"Include source code snippets (default false; use `explore` for full code).",default:false},maxResults:{type:"number",description:"Maximum results",default:10,minimum:1,maximum:100},language:{type:"string",description:"Filter by programming language",enum:["ts","tsx","js","py","rs","go","c","cpp","csharp","java","scala","ruby","php","zig"]},astType:{type:"string",description:"Filter by AST node type (more specific than kind)."}},required:[]},K={type:"object",additionalProperties:false,properties:{name:{type:"string",description:'Symbol name (e.g., "AuthService"). Recommended \u2014 LLM workflow: query \u2192 use returned name.'},nodeId:{type:"string",description:"Node ID (direct lookup, zero ambiguity)."},file:{type:"string",description:"File path or basename to disambiguate when multiple same-named symbols exist."},kind:{type:"string",description:"Filter by node kind (class, function, method, interface, type, variable, route, component, const)."},includeContent:{type:"boolean",description:"Include source code body (default true).",default:true},includeEdges:{type:"boolean",description:"Include edge listing (incoming + outgoing).",default:true},maxEdgesPerNode:{type:"number",description:"Max edges to return (default 10; range [1, 100]).",default:10,minimum:1,maximum:100}},required:[]},V={type:"object",additionalProperties:false,properties:{name:{type:"string",description:"Symbol name \u2014 LLM workflow friendly."},nodeId:{type:"string",description:"Node ID (direct lookup)."},file:{type:"string",description:"File path or basename to disambiguate."},kind:{type:"string",description:"Filter by node kind in BFS result."},depth:{type:"number",description:"BFS depth (1 = direct only, 2 = default, 3 = max).",default:2,minimum:1,maximum:3},maxNodes:{type:"number",description:"Max nodes in result.",default:100,minimum:1,maximum:500},direction:{type:"string",description:"Edge direction filter",enum:["incoming","outgoing","both"],default:"both"},maxEdgesPerNode:{type:"number",description:"Max edges per direction per BFS level (default 10; range [1, 100]).",default:10,minimum:1,maximum:100}},required:[]},J={type:"object",additionalProperties:false,properties:{name:{type:"string",description:"Symbol name \u2014 LLM workflow friendly."},nodeId:{type:"string",description:"Node ID (direct lookup)."},file:{type:"string",description:"File path or basename to disambiguate."},kind:{type:"string",description:"Filter by node kind in BFS result."},depth:{type:"number",description:"Max BFS depth (1-3).",default:2,minimum:1,maximum:3},maxResults:{type:"number",description:"Max affected symbols (default 10; range [1, 200]).",default:10,minimum:1,maximum:200},maxEdgesPerNode:{type:"number",description:"Max incoming edges per BFS level (default 10; range [1, 100]).",default:10,minimum:1,maximum:100}},required:[]},Z={type:"object",additionalProperties:false,properties:{name:{type:"string",description:"Symbol name to find callers for."},nodeId:{type:"string",description:"Node ID (direct lookup)."},file:{type:"string",description:"File path or basename to disambiguate."},kind:{type:"string",description:"Filter by node kind."},maxResults:{type:"number",description:"Max callers to return (default 10; range [1, 200]).",default:10,minimum:1,maximum:200},maxEdgesPerNode:{type:"number",description:"Max incoming edges (default 10; range [1, 100]).",default:10,minimum:1,maximum:100}},required:[]},ee={type:"object",additionalProperties:false,properties:{name:{type:"string",description:"Symbol name to find callees for."},nodeId:{type:"string",description:"Node ID (direct lookup)."},file:{type:"string",description:"File path or basename to disambiguate."},kind:{type:"string",description:"Filter by node kind."},maxResults:{type:"number",description:"Max callees to return (default 10; range [1, 200]).",default:10,minimum:1,maximum:200},maxEdgesPerNode:{type:"number",description:"Max outgoing edges (default 10; range [1, 100]).",default:10,minimum:1,maximum:100}},required:[]},te={type:"object",additionalProperties:false,properties:{query:{type:"string",description:'Symbol name or natural language query (e.g., "auth flow", "MemorySystem").'},file:{type:"string",description:"File path or basename to disambiguate."},kind:{type:"string",description:"Filter by node kind."},maxFiles:{type:"number",description:"Max entry-point files.",default:5,minimum:1,maximum:20},maxSymbols:{type:"number",description:"Max symbols per file.",default:3,minimum:1,maximum:10},maxEdgesPerNode:{type:"number",description:"Max caller/callee edges per symbol (default 10; range [1, 100]).",default:10,minimum:1,maximum:100},depth:{type:"number",description:"Neighbor depth for callers/callees (default 1).",default:1,minimum:1,maximum:2},includeContent:{type:"boolean",description:"Include source code body (default true).",default:true},intent:{type:"string",description:"LLM context for ranking."}},required:["query"]},q={type:"object",additionalProperties:false,properties:{}},ne={query:'Hybrid search over indexed code nodes (FTS + vector + basic + name-segment). Returns symbol locations grouped by file with line-numbered snippets.\n\nWHEN TO USE: Quick lookup of "where is X defined?" \u2014 get symbol locations and snippets in one call. Use `context` to understand a symbol\'s surroundings; use `impact` to see blast radius; use `explore` to get the actual source.\n\nAFTER THIS: Use `node <name>` to fetch full details of one match; use `context` to walk neighbors; use `explore` to get source code.\n\nNOTES: Default FTS-only (fast). Pass `includeContent: true` to include code snippets in results. Use `kind` for friendlier semantic filter (class/function/method/...) instead of `astType`.',node:"Show details for a single symbol: kind, language, location, modifiers, source code, edges.\n\nWHEN TO USE: After `query` / `context` returns a list \u2014 fetch one match's full metadata and edge summary. Pass `name` (preferred) or `nodeId`.\n\nAFTER THIS: Use `context` to walk neighbors; use `impact` for blast radius; use `explore` to get source code + caller/callee trail.\n\nNOTES: `name` is the LLM-friendly input. `file` / `kind` disambiguate when multiple same-named symbols exist. Source code is included by default (set `includeContent: false` for metadata only).",context:"Build a sub-graph around a symbol (BFS to N-level neighbors). Returns incoming/outgoing edges and neighbor nodes grouped by depth.\n\nWHEN TO USE: Understand a symbol's surroundings \u2014 who calls it, what it calls, who extends it. Use after `query` / `node` to get the symbol.\n\nAFTER THIS: Use `impact` for blast-radius (callers only, deeper depth). Use `callers` / `callees` for a flat list. Use `query` to find related symbols.\n\nNOTES: `name` is the LLM-friendly input. Does NOT include source code (use `explore` for code). Set `direction` to narrow to incoming/outgoing only.",impact:"Blast radius of changing a symbol: BFS incoming edges (CALLS / IMPORTS / TYPE_REFERENCES), bucketed by depth. d=1 (WILL BREAK) / d=2 (LIKELY AFFECTED) / d=3 (MAY NEED TESTING).\n\nWHEN TO USE: Before refactoring a symbol \u2014 see what depends on it. Use after `query` to get the symbol.\n\nAFTER THIS: Review d=1 first (those WILL BREAK). Use `node <name>` on high-risk nodes to read their source.\n\nNOTES: `name` is the LLM-friendly input. Returns counts per depth bucket, not full lists. For flat caller list, use `callers`.",callers:'Flat list of who calls <symbol> (incoming CALLS / IMPORTS / TYPE_REFERENCES / EXTENDS / IMPLEMENTS / METHOD_OVERRIDES).\n\nWHEN TO USE: Quick "who depends on this?" lookup. Use `impact` for bucketed risk analysis; use `context` for both directions.\n\nAFTER THIS: Use `node <name>` on a high-traffic caller to read its source.\n\nNOTES: `name` is the LLM-friendly input. Returns up to `maxResults` callers (default 10). Use `file` / `kind` to disambiguate.',callees:'Flat list of what <symbol> calls (outgoing CALLS / IMPORTS / TYPE_REFERENCES / EXTENDS / IMPLEMENTS).\n\nWHEN TO USE: Quick "what does this function do?" lookup. Use `context` for both directions.\n\nAFTER THIS: Use `node <name>` on a key callee to read its source.\n\nNOTES: `name` is the LLM-friendly input. Returns up to `maxResults` callees (default 10). Use `file` / `kind` to disambiguate.',explore:"**PRIMARY TOOL \u2014 call FIRST** for almost any question OR before an edit: how does X work, architecture, a bug, where/what is X, surveying an area, or symbols you are about to change.\n\nReturns verbatim source of relevant symbols grouped by file in ONE capped call (Read-equivalent \u2014 treat shown source as already Read; do NOT re-open those files), plus caller/callee trail.\n\nWHEN TO USE: Whenever you need to understand an area of the codebase or before refactoring. Query can be a symbol name or natural language.\n\nAFTER THIS: Use `node <name>` for metadata only; use `impact` for blast-radius; use `callers` / `callees` for flat lists.\n\nNOTES: Usually the ONLY call you need \u2014 more accurate context, in far fewer tokens and round-trips than search/Read/Grep loop. The single most cost-effective tool.",status:`Show index state, db path, node/edge counts, indexed files, meta config.
|
|
2
2
|
|
|
3
3
|
WHEN TO USE: Diagnostic only \u2014 check whether the index is up-to-date or stale. Skip unless debugging.
|
|
4
4
|
|
|
@@ -15,7 +15,7 @@ NOTES: Read-only. Returns healthy/unhealthy + a list of issues.`};function i(n,s
|
|
|
15
15
|
|
|
16
16
|
${t}
|
|
17
17
|
|
|
18
|
-
... and ${e.length-5} more candidates.`}return mcp.formatFailClosed(n,a)}function oe(n,s){return async(a,d)=>{let e=a;try{let t=u(n),o=await
|
|
18
|
+
... and ${e.length-5} more candidates.`}return mcp.formatFailClosed(n,a)}function oe(n,s){return async(a,d)=>{let e=a;try{let t=u(n),o=await chunkXGZDPIEP_cjs.a(t,{query:e.query,kind:e.kind,file:e.file,intent:e.intent,includeContent:e.includeContent??!1,maxResults:e.maxResults??10,language:e.language,astType:e.astType,maxEdgesPerNode:e.maxEdgesPerNode??10}),r=await chunkXGZDPIEP_cjs.y(o.hits,{pendingFiles:[],toolName:"query",writeToDisk:!1});return i(r)}catch(t){return i(m(t,"query",s),true)}}}function se(n,s){return async(a,d)=>{let e=a;try{let t=u(n),o=await chunkXGZDPIEP_cjs.b(t,{name:e.name,nodeId:e.nodeId,file:e.file,kind:e.kind,includeEdges:e.includeEdges??!0,includeContent:e.includeContent??!0,maxEdgesPerNode:e.maxEdgesPerNode??10}),r=await chunkXGZDPIEP_cjs.E(o.node,o.edges,{pendingFiles:[],toolName:"node",writeToDisk:!1});return i(r)}catch(t){return i(m(t,"node",s),true)}}}function re(n,s){return async(a,d)=>{let e=a;try{let t=u(n),o=await chunkXGZDPIEP_cjs.c(t,{name:e.name,nodeId:e.nodeId,file:e.file,kind:e.kind,depth:e.depth??2,maxNodes:e.maxNodes??100,direction:e.direction??"both",maxEdgesPerNode:e.maxEdgesPerNode??10});if(!o.root)return i("**context** \u2014 node not found.");let r=[],p=[];for(let l of o.edges)l.target===o.root.id?r.push(l):p.push(l);let g=await chunkXGZDPIEP_cjs.A(o.root,r,p,o.nodes.map(l=>l.node),{pendingFiles:[],toolName:"context",writeToDisk:!1});return i(g)}catch(t){return i(m(t,"context",s),true)}}}function ae(n,s){return async(a,d)=>{let e=a;try{let t=u(n),o=await chunkXGZDPIEP_cjs.d(t,{name:e.name,nodeId:e.nodeId,file:e.file,kind:e.kind,depth:e.depth??2,maxResults:e.maxResults??10,maxEdgesPerNode:e.maxEdgesPerNode??10});if(!o.root)return i("**impact** \u2014 node not found.");let r=[],p=n.getDatabase();for(let l of o.buckets)for(let y of l.sample){let h=p.getNodeById(y.id);h&&r.push({source:h,relation:y.relation});}let g=await chunkXGZDPIEP_cjs.z(o.root,r,{pendingFiles:[],toolName:"impact",writeToDisk:!1});return i(g)}catch(t){return i(m(t,"impact",s),true)}}}function ie(n,s){return async(a,d)=>{let e=a;try{let t=u(n),o=await chunkXGZDPIEP_cjs.e(t,{name:e.name,nodeId:e.nodeId,file:e.file,kind:e.kind,maxResults:e.maxResults??10,maxEdgesPerNode:e.maxEdgesPerNode??10}),r=await chunkXGZDPIEP_cjs.B(o,{toolName:"codebase_callers"});return i(r)}catch(t){return i(m(t,"callers",s),true)}}}function de(n,s){return async(a,d)=>{let e=a;try{let t=u(n),o=await chunkXGZDPIEP_cjs.f(t,{name:e.name,nodeId:e.nodeId,file:e.file,kind:e.kind,maxResults:e.maxResults??10,maxEdgesPerNode:e.maxEdgesPerNode??10}),r=await chunkXGZDPIEP_cjs.C(o,{toolName:"codebase_callees"});return i(r)}catch(t){return i(m(t,"callees",s),true)}}}function le(n,s){return async(a,d)=>{let e=a;try{let t=u(n),o=await chunkXGZDPIEP_cjs.g(t,{query:e.query,file:e.file,kind:e.kind,maxFiles:e.maxFiles??5,maxSymbols:e.maxSymbols??3,maxEdgesPerNode:e.maxEdgesPerNode??10,depth:e.depth??1,includeContent:e.includeContent??!0,intent:e.intent}),r=await chunkXGZDPIEP_cjs.F(o,{pendingFiles:[],toolName:"explore",writeToDisk:!1});return i(r)}catch(t){return i(m(t,"explore",s),true)}}}function ce(n,s){return async(a,d)=>{try{let e=u(n),t=await chunkXGZDPIEP_cjs.h(e,{}),o=await chunkXGZDPIEP_cjs.D(t,{toolName:"codebase_status"});return i(o)}catch(e){return i(m(e,"status",s),true)}}}function ue(n,s){return async(a,d)=>{try{let e=u(n),t=await chunkXGZDPIEP_cjs.i(e,{}),o=await chunkXGZDPIEP_cjs.h(e,{}),r=`**Codebase Health Check**
|
|
19
19
|
|
|
20
20
|
- Healthy: ${t.healthy?"\u2713 yes":"\u2717 no"}
|
|
21
21
|
- Nodes: ${o.nodeCount}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {a,y,b,E,c,A,d,z as z$1,e,B as B$1,f as f$1,C,g,F,h,D,i as i$1}from'./chunk-FZNMPXUO.mjs';import'./chunk-QZMJ5EUF.mjs';import'./chunk-EU2I2AMK.mjs';import'./chunk-KTSR5VPT.mjs';import'./chunk-ESA2CL57.mjs';import'./chunk-43WAI4Z7.mjs';import'./chunk-47LKNS74.mjs';import {ToolRegistry,createAndStartStdioServer,formatFailClosed}from'@easbot/mcp';import {Log,errorMeta}from'@easbot/utils';var f=Log.create({service:"codebase.mcp.stdio"}),Q=["query","node","context","impact","callers","callees","explore","status","doctor"],B;(t=>{let n;function s(){return n||(f.debug("initializing CodebaseStdioServer state factory (lazy)"),n=()=>({toolNames:[...Q],cachedConfigId:"",cachedConfigName:"",cachedConfigVersion:""})),n}async function a(o,r){let p=s()(),g=(process.env.EASBOT_MCP_TRUSTED_LOCAL??"true").toLowerCase()!=="false",l=new ToolRegistry;me(l,o,g);let y=p.toolNames;f.info("starting codebase MCP stdio server",{id:r.id,name:r.name,toolCount:y.length});let h=await createAndStartStdioServer(r,l),E=null,$=new Promise(c=>{E=c;}),S=c=>{f.info("received signal, stopping MCP server",{signal:c}),E?.();},T=()=>S("SIGINT"),N=()=>S("SIGTERM");process.on("SIGINT",T),process.on("SIGTERM",N);try{await $;}finally{try{process.off("SIGINT",T),process.off("SIGTERM",N);}catch(c){f.warn("failed to remove signal handlers",{error:errorMeta(c)});}try{await h.stop();}catch(c){f.warn("server.stop failed during cleanup",{error:errorMeta(c)});}try{await o.close();}catch(c){f.warn("codebase.close failed during cleanup",{error:errorMeta(c)});}}return {id:r.id,name:r.name,version:r.version,tools:y}}t.start=a;function d(){return s()().toolNames}t.getToolNames=d;function e(){n=void 0;}t.__resetForTests=e;})(B||(B={}));var X={readOnlyHint:true,destructiveHint:false,idempotentHint:true,openWorldHint:false},z={type:"object",additionalProperties:false,properties:{query:{type:"string",description:'Symbol name or partial name (e.g., "auth", "UserService"). Empty string returns recent nodes.'},kind:{type:"string",description:"Filter by node kind. One of: class, function, method, interface, type, variable, route, component, const.",enum:["class","function","method","interface","type","variable","route","component","const"]},file:{type:"string",description:'Filter by file path (substring match, e.g., "src/auth").'},intent:{type:"string",description:'LLM context for ranking (e.g., "adding OAuth support").'},includeContent:{type:"boolean",description:"Include source code snippets (default false; use `explore` for full code).",default:false},maxResults:{type:"number",description:"Maximum results",default:10,minimum:1,maximum:100},language:{type:"string",description:"Filter by programming language",enum:["ts","tsx","js","py","rs","go","c","cpp","csharp","java","scala","ruby","php","zig"]},astType:{type:"string",description:"Filter by AST node type (more specific than kind)."}},required:[]},K={type:"object",additionalProperties:false,properties:{name:{type:"string",description:'Symbol name (e.g., "AuthService"). Recommended \u2014 LLM workflow: query \u2192 use returned name.'},nodeId:{type:"string",description:"Node ID (direct lookup, zero ambiguity)."},file:{type:"string",description:"File path or basename to disambiguate when multiple same-named symbols exist."},kind:{type:"string",description:"Filter by node kind (class, function, method, interface, type, variable, route, component, const)."},includeContent:{type:"boolean",description:"Include source code body (default true).",default:true},includeEdges:{type:"boolean",description:"Include edge listing (incoming + outgoing).",default:true},maxEdgesPerNode:{type:"number",description:"Max edges to return (default 10; range [1, 100]).",default:10,minimum:1,maximum:100}},required:[]},V={type:"object",additionalProperties:false,properties:{name:{type:"string",description:"Symbol name \u2014 LLM workflow friendly."},nodeId:{type:"string",description:"Node ID (direct lookup)."},file:{type:"string",description:"File path or basename to disambiguate."},kind:{type:"string",description:"Filter by node kind in BFS result."},depth:{type:"number",description:"BFS depth (1 = direct only, 2 = default, 3 = max).",default:2,minimum:1,maximum:3},maxNodes:{type:"number",description:"Max nodes in result.",default:100,minimum:1,maximum:500},direction:{type:"string",description:"Edge direction filter",enum:["incoming","outgoing","both"],default:"both"},maxEdgesPerNode:{type:"number",description:"Max edges per direction per BFS level (default 10; range [1, 100]).",default:10,minimum:1,maximum:100}},required:[]},J={type:"object",additionalProperties:false,properties:{name:{type:"string",description:"Symbol name \u2014 LLM workflow friendly."},nodeId:{type:"string",description:"Node ID (direct lookup)."},file:{type:"string",description:"File path or basename to disambiguate."},kind:{type:"string",description:"Filter by node kind in BFS result."},depth:{type:"number",description:"Max BFS depth (1-3).",default:2,minimum:1,maximum:3},maxResults:{type:"number",description:"Max affected symbols (default 10; range [1, 200]).",default:10,minimum:1,maximum:200},maxEdgesPerNode:{type:"number",description:"Max incoming edges per BFS level (default 10; range [1, 100]).",default:10,minimum:1,maximum:100}},required:[]},Z={type:"object",additionalProperties:false,properties:{name:{type:"string",description:"Symbol name to find callers for."},nodeId:{type:"string",description:"Node ID (direct lookup)."},file:{type:"string",description:"File path or basename to disambiguate."},kind:{type:"string",description:"Filter by node kind."},maxResults:{type:"number",description:"Max callers to return (default 10; range [1, 200]).",default:10,minimum:1,maximum:200},maxEdgesPerNode:{type:"number",description:"Max incoming edges (default 10; range [1, 100]).",default:10,minimum:1,maximum:100}},required:[]},ee={type:"object",additionalProperties:false,properties:{name:{type:"string",description:"Symbol name to find callees for."},nodeId:{type:"string",description:"Node ID (direct lookup)."},file:{type:"string",description:"File path or basename to disambiguate."},kind:{type:"string",description:"Filter by node kind."},maxResults:{type:"number",description:"Max callees to return (default 10; range [1, 200]).",default:10,minimum:1,maximum:200},maxEdgesPerNode:{type:"number",description:"Max outgoing edges (default 10; range [1, 100]).",default:10,minimum:1,maximum:100}},required:[]},te={type:"object",additionalProperties:false,properties:{query:{type:"string",description:'Symbol name or natural language query (e.g., "auth flow", "MemorySystem").'},file:{type:"string",description:"File path or basename to disambiguate."},kind:{type:"string",description:"Filter by node kind."},maxFiles:{type:"number",description:"Max entry-point files.",default:5,minimum:1,maximum:20},maxSymbols:{type:"number",description:"Max symbols per file.",default:3,minimum:1,maximum:10},maxEdgesPerNode:{type:"number",description:"Max caller/callee edges per symbol (default 10; range [1, 100]).",default:10,minimum:1,maximum:100},depth:{type:"number",description:"Neighbor depth for callers/callees (default 1).",default:1,minimum:1,maximum:2},includeContent:{type:"boolean",description:"Include source code body (default true).",default:true},intent:{type:"string",description:"LLM context for ranking."}},required:["query"]},q={type:"object",additionalProperties:false,properties:{}},ne={query:'Hybrid search over indexed code nodes (FTS + vector + basic + name-segment). Returns symbol locations grouped by file with line-numbered snippets.\n\nWHEN TO USE: Quick lookup of "where is X defined?" \u2014 get symbol locations and snippets in one call. Use `context` to understand a symbol\'s surroundings; use `impact` to see blast radius; use `explore` to get the actual source.\n\nAFTER THIS: Use `node <name>` to fetch full details of one match; use `context` to walk neighbors; use `explore` to get source code.\n\nNOTES: Default FTS-only (fast). Pass `includeContent: true` to include code snippets in results. Use `kind` for friendlier semantic filter (class/function/method/...) instead of `astType`.',node:"Show details for a single symbol: kind, language, location, modifiers, source code, edges.\n\nWHEN TO USE: After `query` / `context` returns a list \u2014 fetch one match's full metadata and edge summary. Pass `name` (preferred) or `nodeId`.\n\nAFTER THIS: Use `context` to walk neighbors; use `impact` for blast radius; use `explore` to get source code + caller/callee trail.\n\nNOTES: `name` is the LLM-friendly input. `file` / `kind` disambiguate when multiple same-named symbols exist. Source code is included by default (set `includeContent: false` for metadata only).",context:"Build a sub-graph around a symbol (BFS to N-level neighbors). Returns incoming/outgoing edges and neighbor nodes grouped by depth.\n\nWHEN TO USE: Understand a symbol's surroundings \u2014 who calls it, what it calls, who extends it. Use after `query` / `node` to get the symbol.\n\nAFTER THIS: Use `impact` for blast-radius (callers only, deeper depth). Use `callers` / `callees` for a flat list. Use `query` to find related symbols.\n\nNOTES: `name` is the LLM-friendly input. Does NOT include source code (use `explore` for code). Set `direction` to narrow to incoming/outgoing only.",impact:"Blast radius of changing a symbol: BFS incoming edges (CALLS / IMPORTS / TYPE_REFERENCES), bucketed by depth. d=1 (WILL BREAK) / d=2 (LIKELY AFFECTED) / d=3 (MAY NEED TESTING).\n\nWHEN TO USE: Before refactoring a symbol \u2014 see what depends on it. Use after `query` to get the symbol.\n\nAFTER THIS: Review d=1 first (those WILL BREAK). Use `node <name>` on high-risk nodes to read their source.\n\nNOTES: `name` is the LLM-friendly input. Returns counts per depth bucket, not full lists. For flat caller list, use `callers`.",callers:'Flat list of who calls <symbol> (incoming CALLS / IMPORTS / TYPE_REFERENCES / EXTENDS / IMPLEMENTS / METHOD_OVERRIDES).\n\nWHEN TO USE: Quick "who depends on this?" lookup. Use `impact` for bucketed risk analysis; use `context` for both directions.\n\nAFTER THIS: Use `node <name>` on a high-traffic caller to read its source.\n\nNOTES: `name` is the LLM-friendly input. Returns up to `maxResults` callers (default 10). Use `file` / `kind` to disambiguate.',callees:'Flat list of what <symbol> calls (outgoing CALLS / IMPORTS / TYPE_REFERENCES / EXTENDS / IMPLEMENTS).\n\nWHEN TO USE: Quick "what does this function do?" lookup. Use `context` for both directions.\n\nAFTER THIS: Use `node <name>` on a key callee to read its source.\n\nNOTES: `name` is the LLM-friendly input. Returns up to `maxResults` callees (default 10). Use `file` / `kind` to disambiguate.',explore:"**PRIMARY TOOL \u2014 call FIRST** for almost any question OR before an edit: how does X work, architecture, a bug, where/what is X, surveying an area, or symbols you are about to change.\n\nReturns verbatim source of relevant symbols grouped by file in ONE capped call (Read-equivalent \u2014 treat shown source as already Read; do NOT re-open those files), plus caller/callee trail.\n\nWHEN TO USE: Whenever you need to understand an area of the codebase or before refactoring. Query can be a symbol name or natural language.\n\nAFTER THIS: Use `node <name>` for metadata only; use `impact` for blast-radius; use `callers` / `callees` for flat lists.\n\nNOTES: Usually the ONLY call you need \u2014 more accurate context, in far fewer tokens and round-trips than search/Read/Grep loop. The single most cost-effective tool.",status:`Show index state, db path, node/edge counts, indexed files, meta config.
|
|
1
|
+
import {a,y,b,E,c,A,d,z as z$1,e,B as B$1,f as f$1,C,g,F,h,D,i as i$1}from'./chunk-OXF2UU4K.mjs';import'./chunk-QZMJ5EUF.mjs';import'./chunk-EU2I2AMK.mjs';import'./chunk-KTSR5VPT.mjs';import'./chunk-ESA2CL57.mjs';import'./chunk-43WAI4Z7.mjs';import'./chunk-47LKNS74.mjs';import {ToolRegistry,createAndStartStdioServer,formatFailClosed}from'@easbot/mcp';import {Log,errorMeta}from'@easbot/utils';var f=Log.create({service:"codebase.mcp.stdio"}),Q=["query","node","context","impact","callers","callees","explore","status","doctor"],B;(t=>{let n;function s(){return n||(f.debug("initializing CodebaseStdioServer state factory (lazy)"),n=()=>({toolNames:[...Q],cachedConfigId:"",cachedConfigName:"",cachedConfigVersion:""})),n}async function a(o,r){let p=s()(),g=(process.env.EASBOT_MCP_TRUSTED_LOCAL??"true").toLowerCase()!=="false",l=new ToolRegistry;me(l,o,g);let y=p.toolNames;f.info("starting codebase MCP stdio server",{id:r.id,name:r.name,toolCount:y.length});let h=await createAndStartStdioServer(r,l),E=null,$=new Promise(c=>{E=c;}),S=c=>{f.info("received signal, stopping MCP server",{signal:c}),E?.();},T=()=>S("SIGINT"),N=()=>S("SIGTERM");process.on("SIGINT",T),process.on("SIGTERM",N);try{await $;}finally{try{process.off("SIGINT",T),process.off("SIGTERM",N);}catch(c){f.warn("failed to remove signal handlers",{error:errorMeta(c)});}try{await h.stop();}catch(c){f.warn("server.stop failed during cleanup",{error:errorMeta(c)});}try{await o.close();}catch(c){f.warn("codebase.close failed during cleanup",{error:errorMeta(c)});}}return {id:r.id,name:r.name,version:r.version,tools:y}}t.start=a;function d(){return s()().toolNames}t.getToolNames=d;function e(){n=void 0;}t.__resetForTests=e;})(B||(B={}));var X={readOnlyHint:true,destructiveHint:false,idempotentHint:true,openWorldHint:false},z={type:"object",additionalProperties:false,properties:{query:{type:"string",description:'Symbol name or partial name (e.g., "auth", "UserService"). Empty string returns recent nodes.'},kind:{type:"string",description:"Filter by node kind. One of: class, function, method, interface, type, variable, route, component, const.",enum:["class","function","method","interface","type","variable","route","component","const"]},file:{type:"string",description:'Filter by file path (substring match, e.g., "src/auth").'},intent:{type:"string",description:'LLM context for ranking (e.g., "adding OAuth support").'},includeContent:{type:"boolean",description:"Include source code snippets (default false; use `explore` for full code).",default:false},maxResults:{type:"number",description:"Maximum results",default:10,minimum:1,maximum:100},language:{type:"string",description:"Filter by programming language",enum:["ts","tsx","js","py","rs","go","c","cpp","csharp","java","scala","ruby","php","zig"]},astType:{type:"string",description:"Filter by AST node type (more specific than kind)."}},required:[]},K={type:"object",additionalProperties:false,properties:{name:{type:"string",description:'Symbol name (e.g., "AuthService"). Recommended \u2014 LLM workflow: query \u2192 use returned name.'},nodeId:{type:"string",description:"Node ID (direct lookup, zero ambiguity)."},file:{type:"string",description:"File path or basename to disambiguate when multiple same-named symbols exist."},kind:{type:"string",description:"Filter by node kind (class, function, method, interface, type, variable, route, component, const)."},includeContent:{type:"boolean",description:"Include source code body (default true).",default:true},includeEdges:{type:"boolean",description:"Include edge listing (incoming + outgoing).",default:true},maxEdgesPerNode:{type:"number",description:"Max edges to return (default 10; range [1, 100]).",default:10,minimum:1,maximum:100}},required:[]},V={type:"object",additionalProperties:false,properties:{name:{type:"string",description:"Symbol name \u2014 LLM workflow friendly."},nodeId:{type:"string",description:"Node ID (direct lookup)."},file:{type:"string",description:"File path or basename to disambiguate."},kind:{type:"string",description:"Filter by node kind in BFS result."},depth:{type:"number",description:"BFS depth (1 = direct only, 2 = default, 3 = max).",default:2,minimum:1,maximum:3},maxNodes:{type:"number",description:"Max nodes in result.",default:100,minimum:1,maximum:500},direction:{type:"string",description:"Edge direction filter",enum:["incoming","outgoing","both"],default:"both"},maxEdgesPerNode:{type:"number",description:"Max edges per direction per BFS level (default 10; range [1, 100]).",default:10,minimum:1,maximum:100}},required:[]},J={type:"object",additionalProperties:false,properties:{name:{type:"string",description:"Symbol name \u2014 LLM workflow friendly."},nodeId:{type:"string",description:"Node ID (direct lookup)."},file:{type:"string",description:"File path or basename to disambiguate."},kind:{type:"string",description:"Filter by node kind in BFS result."},depth:{type:"number",description:"Max BFS depth (1-3).",default:2,minimum:1,maximum:3},maxResults:{type:"number",description:"Max affected symbols (default 10; range [1, 200]).",default:10,minimum:1,maximum:200},maxEdgesPerNode:{type:"number",description:"Max incoming edges per BFS level (default 10; range [1, 100]).",default:10,minimum:1,maximum:100}},required:[]},Z={type:"object",additionalProperties:false,properties:{name:{type:"string",description:"Symbol name to find callers for."},nodeId:{type:"string",description:"Node ID (direct lookup)."},file:{type:"string",description:"File path or basename to disambiguate."},kind:{type:"string",description:"Filter by node kind."},maxResults:{type:"number",description:"Max callers to return (default 10; range [1, 200]).",default:10,minimum:1,maximum:200},maxEdgesPerNode:{type:"number",description:"Max incoming edges (default 10; range [1, 100]).",default:10,minimum:1,maximum:100}},required:[]},ee={type:"object",additionalProperties:false,properties:{name:{type:"string",description:"Symbol name to find callees for."},nodeId:{type:"string",description:"Node ID (direct lookup)."},file:{type:"string",description:"File path or basename to disambiguate."},kind:{type:"string",description:"Filter by node kind."},maxResults:{type:"number",description:"Max callees to return (default 10; range [1, 200]).",default:10,minimum:1,maximum:200},maxEdgesPerNode:{type:"number",description:"Max outgoing edges (default 10; range [1, 100]).",default:10,minimum:1,maximum:100}},required:[]},te={type:"object",additionalProperties:false,properties:{query:{type:"string",description:'Symbol name or natural language query (e.g., "auth flow", "MemorySystem").'},file:{type:"string",description:"File path or basename to disambiguate."},kind:{type:"string",description:"Filter by node kind."},maxFiles:{type:"number",description:"Max entry-point files.",default:5,minimum:1,maximum:20},maxSymbols:{type:"number",description:"Max symbols per file.",default:3,minimum:1,maximum:10},maxEdgesPerNode:{type:"number",description:"Max caller/callee edges per symbol (default 10; range [1, 100]).",default:10,minimum:1,maximum:100},depth:{type:"number",description:"Neighbor depth for callers/callees (default 1).",default:1,minimum:1,maximum:2},includeContent:{type:"boolean",description:"Include source code body (default true).",default:true},intent:{type:"string",description:"LLM context for ranking."}},required:["query"]},q={type:"object",additionalProperties:false,properties:{}},ne={query:'Hybrid search over indexed code nodes (FTS + vector + basic + name-segment). Returns symbol locations grouped by file with line-numbered snippets.\n\nWHEN TO USE: Quick lookup of "where is X defined?" \u2014 get symbol locations and snippets in one call. Use `context` to understand a symbol\'s surroundings; use `impact` to see blast radius; use `explore` to get the actual source.\n\nAFTER THIS: Use `node <name>` to fetch full details of one match; use `context` to walk neighbors; use `explore` to get source code.\n\nNOTES: Default FTS-only (fast). Pass `includeContent: true` to include code snippets in results. Use `kind` for friendlier semantic filter (class/function/method/...) instead of `astType`.',node:"Show details for a single symbol: kind, language, location, modifiers, source code, edges.\n\nWHEN TO USE: After `query` / `context` returns a list \u2014 fetch one match's full metadata and edge summary. Pass `name` (preferred) or `nodeId`.\n\nAFTER THIS: Use `context` to walk neighbors; use `impact` for blast radius; use `explore` to get source code + caller/callee trail.\n\nNOTES: `name` is the LLM-friendly input. `file` / `kind` disambiguate when multiple same-named symbols exist. Source code is included by default (set `includeContent: false` for metadata only).",context:"Build a sub-graph around a symbol (BFS to N-level neighbors). Returns incoming/outgoing edges and neighbor nodes grouped by depth.\n\nWHEN TO USE: Understand a symbol's surroundings \u2014 who calls it, what it calls, who extends it. Use after `query` / `node` to get the symbol.\n\nAFTER THIS: Use `impact` for blast-radius (callers only, deeper depth). Use `callers` / `callees` for a flat list. Use `query` to find related symbols.\n\nNOTES: `name` is the LLM-friendly input. Does NOT include source code (use `explore` for code). Set `direction` to narrow to incoming/outgoing only.",impact:"Blast radius of changing a symbol: BFS incoming edges (CALLS / IMPORTS / TYPE_REFERENCES), bucketed by depth. d=1 (WILL BREAK) / d=2 (LIKELY AFFECTED) / d=3 (MAY NEED TESTING).\n\nWHEN TO USE: Before refactoring a symbol \u2014 see what depends on it. Use after `query` to get the symbol.\n\nAFTER THIS: Review d=1 first (those WILL BREAK). Use `node <name>` on high-risk nodes to read their source.\n\nNOTES: `name` is the LLM-friendly input. Returns counts per depth bucket, not full lists. For flat caller list, use `callers`.",callers:'Flat list of who calls <symbol> (incoming CALLS / IMPORTS / TYPE_REFERENCES / EXTENDS / IMPLEMENTS / METHOD_OVERRIDES).\n\nWHEN TO USE: Quick "who depends on this?" lookup. Use `impact` for bucketed risk analysis; use `context` for both directions.\n\nAFTER THIS: Use `node <name>` on a high-traffic caller to read its source.\n\nNOTES: `name` is the LLM-friendly input. Returns up to `maxResults` callers (default 10). Use `file` / `kind` to disambiguate.',callees:'Flat list of what <symbol> calls (outgoing CALLS / IMPORTS / TYPE_REFERENCES / EXTENDS / IMPLEMENTS).\n\nWHEN TO USE: Quick "what does this function do?" lookup. Use `context` for both directions.\n\nAFTER THIS: Use `node <name>` on a key callee to read its source.\n\nNOTES: `name` is the LLM-friendly input. Returns up to `maxResults` callees (default 10). Use `file` / `kind` to disambiguate.',explore:"**PRIMARY TOOL \u2014 call FIRST** for almost any question OR before an edit: how does X work, architecture, a bug, where/what is X, surveying an area, or symbols you are about to change.\n\nReturns verbatim source of relevant symbols grouped by file in ONE capped call (Read-equivalent \u2014 treat shown source as already Read; do NOT re-open those files), plus caller/callee trail.\n\nWHEN TO USE: Whenever you need to understand an area of the codebase or before refactoring. Query can be a symbol name or natural language.\n\nAFTER THIS: Use `node <name>` for metadata only; use `impact` for blast-radius; use `callers` / `callees` for flat lists.\n\nNOTES: Usually the ONLY call you need \u2014 more accurate context, in far fewer tokens and round-trips than search/Read/Grep loop. The single most cost-effective tool.",status:`Show index state, db path, node/edge counts, indexed files, meta config.
|
|
2
2
|
|
|
3
3
|
WHEN TO USE: Diagnostic only \u2014 check whether the index is up-to-date or stale. Skip unless debugging.
|
|
4
4
|
|
package/dist/cli.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';var chunkR32346OA_cjs=require('./chunks/chunk-R32346OA.cjs'),fs=require('fs'),path=require('path'),url=require('url');var G=path.dirname(url.fileURLToPath(chunkR32346OA_cjs.d));function y(){try{let t=path.join(G,"..","package.json");return JSON.parse(fs.readFileSync(t,"utf-8")).version??"0.0.0"}catch{return "0.0.0"}}var u=new Set(["DEBUG","INFO","WARN","ERROR"]);function A(t){let n={logLevel:"INFO",printLogs:false,debug:false};for(let s=0;s<t.length;s++){let e=t[s];if(e)if(e==="--cwd"&&s+1<t.length){let o=t[s+1];o&&!o.startsWith("-")&&(n.cwd=o,s++);}else if(e.startsWith("--cwd="))n.cwd=e.slice(6);else if(e==="--config"&&s+1<t.length){let o=t[s+1];o&&!o.startsWith("-")&&(n.configPath=o,s++);}else if(e.startsWith("--config="))n.configPath=e.slice(9);else if(e==="--log-level"&&s+1<t.length){let o=t[s+1];if(o&&!o.startsWith("-")){let a=o.toUpperCase();u.has(a)&&(n.logLevel=a,s++);}}else if(e.startsWith("--log-level=")){let o=e.slice(12).toUpperCase();u.has(o)&&(n.logLevel=o);}else e==="--print-logs"?n.printLogs=true:e==="--debug"&&(n.debug=true);}return n}async function E(){let t=process.argv.slice(2),n=y(),{loadEnv:s}=await import('@easbot/utils');s(),process.env.EASBOT_LANG||(process.env.EASBOT_LANG="en-US");let e=A(t),{Log:o}=await import('@easbot/utils'),{getXdgData:a}=await import('./chunks/interfaces-YGSG2MI4.cjs'),m=path.join(a(),"log");if(await o.init({logDir:m,print:e.printLogs,dev:e.debug||false,level:e.logLevel}),t.length===0){let{renderBanner:r}=await import('./chunks/cli-handler-
|
|
2
|
+
'use strict';var chunkR32346OA_cjs=require('./chunks/chunk-R32346OA.cjs'),fs=require('fs'),path=require('path'),url=require('url');var G=path.dirname(url.fileURLToPath(chunkR32346OA_cjs.d));function y(){try{let t=path.join(G,"..","package.json");return JSON.parse(fs.readFileSync(t,"utf-8")).version??"0.0.0"}catch{return "0.0.0"}}var u=new Set(["DEBUG","INFO","WARN","ERROR"]);function A(t){let n={logLevel:"INFO",printLogs:false,debug:false};for(let s=0;s<t.length;s++){let e=t[s];if(e)if(e==="--cwd"&&s+1<t.length){let o=t[s+1];o&&!o.startsWith("-")&&(n.cwd=o,s++);}else if(e.startsWith("--cwd="))n.cwd=e.slice(6);else if(e==="--config"&&s+1<t.length){let o=t[s+1];o&&!o.startsWith("-")&&(n.configPath=o,s++);}else if(e.startsWith("--config="))n.configPath=e.slice(9);else if(e==="--log-level"&&s+1<t.length){let o=t[s+1];if(o&&!o.startsWith("-")){let a=o.toUpperCase();u.has(a)&&(n.logLevel=a,s++);}}else if(e.startsWith("--log-level=")){let o=e.slice(12).toUpperCase();u.has(o)&&(n.logLevel=o);}else e==="--print-logs"?n.printLogs=true:e==="--debug"&&(n.debug=true);}return n}async function E(){let t=process.argv.slice(2),n=y(),{loadEnv:s}=await import('@easbot/utils');s(),process.env.EASBOT_LANG||(process.env.EASBOT_LANG="en-US");let e=A(t),{Log:o}=await import('@easbot/utils'),{getXdgData:a}=await import('./chunks/interfaces-YGSG2MI4.cjs'),m=path.join(a(),"log");if(await o.init({logDir:m,print:e.printLogs,dev:e.debug||false,level:e.logLevel}),t.length===0){let{renderBanner:r}=await import('./chunks/cli-handler-WCP6T427.cjs');r();return}if(t[0]==="--help"||t[0]==="-h"){let{renderHelp:r}=await import('./chunks/cli-handler-WCP6T427.cjs');r();return}if(t[0]==="--version"||t[0]==="-v"){console.log(n);return}let c=e.cwd??process.cwd(),{handleCodebaseCli:L}=await import('./chunks/cli-handler-WCP6T427.cjs'),{setInstanceAdapter:b}=await import('./chunks/interfaces-YGSG2MI4.cjs');b({directory:c,worktree:c});let g=[];for(let r=0;r<t.length;r++){let i=t[r];if(i){if(i==="--cwd"||i==="--config"||i==="--log-level"||i==="--print-logs"||i==="--debug"){if(i!=="--print-logs"&&i!=="--debug"){let d=t[r+1];d&&!d.startsWith("-")&&r++;}continue}i.startsWith("--cwd=")||i.startsWith("--config=")||i.startsWith("--log-level=")||g.push(i);}}let{setAdapterRegistry:v}=await import('@easbot/llm'),{getGlobal:l,getInstance:p}=await import('./chunks/interfaces-YGSG2MI4.cjs');v({config:void 0,instance:{getDirectory:()=>p().directory,getWorktree:()=>p().worktree},global:{home:l().Path.home,data:l().Path.data,cache:l().Path.cache,config:l().Path.config,state:l().Path.state,log:l().Path.log,bin:l().Path.bin},installation:{getVersion:()=>n,getChannel:()=>"local",getUserAgent:()=>`easbot-codebase/${n}`}});let f=await L(g,{version:n,cwd:c});f.code!==0&&(process.exitCode=f.code);}E().catch(t=>{console.error(t),process.exitCode=1;}).finally(async()=>{try{let{Log:t}=await import('@easbot/utils');await t.close();}catch{}process.exit(process.exitCode??0);});
|
package/dist/cli.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import'./chunks/chunk-47LKNS74.mjs';import {readFileSync}from'fs';import {dirname,join}from'path';import {fileURLToPath}from'url';var W=dirname(fileURLToPath(import.meta.url));function G(){try{let t=join(W,"..","package.json");return JSON.parse(readFileSync(t,"utf-8")).version??"0.0.0"}catch{return "0.0.0"}}var h=new Set(["DEBUG","INFO","WARN","ERROR"]);function y(t){let n={logLevel:"INFO",printLogs:false,debug:false};for(let s=0;s<t.length;s++){let e=t[s];if(e)if(e==="--cwd"&&s+1<t.length){let o=t[s+1];o&&!o.startsWith("-")&&(n.cwd=o,s++);}else if(e.startsWith("--cwd="))n.cwd=e.slice(6);else if(e==="--config"&&s+1<t.length){let o=t[s+1];o&&!o.startsWith("-")&&(n.configPath=o,s++);}else if(e.startsWith("--config="))n.configPath=e.slice(9);else if(e==="--log-level"&&s+1<t.length){let o=t[s+1];if(o&&!o.startsWith("-")){let a=o.toUpperCase();h.has(a)&&(n.logLevel=a,s++);}}else if(e.startsWith("--log-level=")){let o=e.slice(12).toUpperCase();h.has(o)&&(n.logLevel=o);}else e==="--print-logs"?n.printLogs=true:e==="--debug"&&(n.debug=true);}return n}async function A(){let t=process.argv.slice(2),n=G(),{loadEnv:s}=await import('@easbot/utils');s(),process.env.EASBOT_LANG||(process.env.EASBOT_LANG="en-US");let e=y(t),{Log:o}=await import('@easbot/utils'),{getXdgData:a}=await import('./chunks/interfaces-UUDPRWI6.mjs'),w=join(a(),"log");if(await o.init({logDir:w,print:e.printLogs,dev:e.debug||false,level:e.logLevel}),t.length===0){let{renderBanner:r}=await import('./chunks/cli-handler-
|
|
2
|
+
import'./chunks/chunk-47LKNS74.mjs';import {readFileSync}from'fs';import {dirname,join}from'path';import {fileURLToPath}from'url';var W=dirname(fileURLToPath(import.meta.url));function G(){try{let t=join(W,"..","package.json");return JSON.parse(readFileSync(t,"utf-8")).version??"0.0.0"}catch{return "0.0.0"}}var h=new Set(["DEBUG","INFO","WARN","ERROR"]);function y(t){let n={logLevel:"INFO",printLogs:false,debug:false};for(let s=0;s<t.length;s++){let e=t[s];if(e)if(e==="--cwd"&&s+1<t.length){let o=t[s+1];o&&!o.startsWith("-")&&(n.cwd=o,s++);}else if(e.startsWith("--cwd="))n.cwd=e.slice(6);else if(e==="--config"&&s+1<t.length){let o=t[s+1];o&&!o.startsWith("-")&&(n.configPath=o,s++);}else if(e.startsWith("--config="))n.configPath=e.slice(9);else if(e==="--log-level"&&s+1<t.length){let o=t[s+1];if(o&&!o.startsWith("-")){let a=o.toUpperCase();h.has(a)&&(n.logLevel=a,s++);}}else if(e.startsWith("--log-level=")){let o=e.slice(12).toUpperCase();h.has(o)&&(n.logLevel=o);}else e==="--print-logs"?n.printLogs=true:e==="--debug"&&(n.debug=true);}return n}async function A(){let t=process.argv.slice(2),n=G(),{loadEnv:s}=await import('@easbot/utils');s(),process.env.EASBOT_LANG||(process.env.EASBOT_LANG="en-US");let e=y(t),{Log:o}=await import('@easbot/utils'),{getXdgData:a}=await import('./chunks/interfaces-UUDPRWI6.mjs'),w=join(a(),"log");if(await o.init({logDir:w,print:e.printLogs,dev:e.debug||false,level:e.logLevel}),t.length===0){let{renderBanner:r}=await import('./chunks/cli-handler-FGFM3HBJ.mjs');r();return}if(t[0]==="--help"||t[0]==="-h"){let{renderHelp:r}=await import('./chunks/cli-handler-FGFM3HBJ.mjs');r();return}if(t[0]==="--version"||t[0]==="-v"){console.log(n);return}let c=e.cwd??process.cwd(),{handleCodebaseCli:m}=await import('./chunks/cli-handler-FGFM3HBJ.mjs'),{setInstanceAdapter:L}=await import('./chunks/interfaces-UUDPRWI6.mjs');L({directory:c,worktree:c});let g=[];for(let r=0;r<t.length;r++){let i=t[r];if(i){if(i==="--cwd"||i==="--config"||i==="--log-level"||i==="--print-logs"||i==="--debug"){if(i!=="--print-logs"&&i!=="--debug"){let d=t[r+1];d&&!d.startsWith("-")&&r++;}continue}i.startsWith("--cwd=")||i.startsWith("--config=")||i.startsWith("--log-level=")||g.push(i);}}let{setAdapterRegistry:b}=await import('@easbot/llm'),{getGlobal:l,getInstance:p}=await import('./chunks/interfaces-UUDPRWI6.mjs');b({config:void 0,instance:{getDirectory:()=>p().directory,getWorktree:()=>p().worktree},global:{home:l().Path.home,data:l().Path.data,cache:l().Path.cache,config:l().Path.config,state:l().Path.state,log:l().Path.log,bin:l().Path.bin},installation:{getVersion:()=>n,getChannel:()=>"local",getUserAgent:()=>`easbot-codebase/${n}`}});let f=await m(g,{version:n,cwd:c});f.code!==0&&(process.exitCode=f.code);}A().catch(t=>{console.error(t),process.exitCode=1;}).finally(async()=>{try{let{Log:t}=await import('@easbot/utils');await t.close();}catch{}process.exit(process.exitCode??0);});
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1,7 @@
|
|
|
1
|
-
'use strict';var
|
|
1
|
+
'use strict';var chunkP3IAXGOT_cjs=require('./chunks/chunk-P3IAXGOT.cjs'),chunkXGZDPIEP_cjs=require('./chunks/chunk-XGZDPIEP.cjs'),chunkY7JDLK56_cjs=require('./chunks/chunk-Y7JDLK56.cjs'),chunkJ7Z3MIR7_cjs=require('./chunks/chunk-J7Z3MIR7.cjs');require('./chunks/chunk-D5NDNAKA.cjs');var chunk3DAM6EZN_cjs=require('./chunks/chunk-3DAM6EZN.cjs'),chunkAARBEAIB_cjs=require('./chunks/chunk-AARBEAIB.cjs'),chunkW5SMGCKO_cjs=require('./chunks/chunk-W5SMGCKO.cjs'),chunkEH2QTB6S_cjs=require('./chunks/chunk-EH2QTB6S.cjs'),chunkVZCOLSBF_cjs=require('./chunks/chunk-VZCOLSBF.cjs'),chunkR32346OA_cjs=require('./chunks/chunk-R32346OA.cjs'),llm=require('@easbot/llm'),terminal=require('@easbot/terminal'),r=require('zod'),fs=require('fs'),plugin=require('@easbot/plugin'),W=require('fs/promises'),utils=require('@easbot/utils');function _interopDefault(e){return e&&e.__esModule?e:{default:e}}var r__default=/*#__PURE__*/_interopDefault(r);var W__default=/*#__PURE__*/_interopDefault(W);var ne=utils.Log.create({service:"codebase.plugin.tool.knowledge-truncation"}),Ge=30,Ue=1500,I={codebase:1500},k={listPaths:["hits","callers","callees","references","directlyAffected","transitivelyAffected","files","entryPoints","entryPoints.*.symbols","edges","nodes"],fieldPaths:["hits.*.content","hits.*.snippet","hits.*.docstring","hits.*.sourceCode","references.*.snippet","directlyAffected.*.snippet","transitivelyAffected.*.snippet","files.*.summary","entryPoints.*.symbols.*.node.text","entryPoints.*.symbols.*.node.sourceCode"]};var ze=["hits","files","results","matches","nodes","edges"];function Ve(e,t){return !e||e.length===0?{items:[],truncated:false,dropped:0}:e.length<=t?{items:e.slice(),truncated:false,dropped:0}:{items:e.slice(0,t),truncated:true,dropped:e.length-t}}function Xe(e,t){if(e==null)return {value:"",truncated:false,droppedChars:0};if(typeof e!="string")return {value:String(e),truncated:false,droppedChars:0};if(e.length<=t)return {value:e,truncated:false,droppedChars:0};let o=e.length-t;return {value:`${e.slice(0,t)}\u2026(+${o} chars)`,truncated:true,droppedChars:o}}function Z(e,t){let o=0,i=false,n=(s,l)=>{if(s!=null){if(Array.isArray(s)){for(let c of t)D(c,l)&&(o+=s.length,i=true);for(let c=0;c<s.length;c++)n(s[c],[...l,String(c)]);return}if(typeof s=="object"){let a=s;for(let[c,E]of Object.entries(a))n(E,[...l,c]);}}};return n(e,[]),i?o:0}function D(e,t){let o=e.split(".");if(o.length!==t.length)return false;for(let i=0;i<o.length;i++){let n=o[i];if(n!=="*"&&n!==t[i])return false}return true}async function M(e,t){let o=t.listLimit??Ge,i=t.fieldMax??Ue,n=t.saveFull!==false,s=Math.max(Z(e,[...ze]),Z(e,t.paths.listPaths)),l;n&&(l=await Ye(e,t.toolName));let a=0,c=0,E=new WeakSet,f=(d,b)=>{if(d==null)return d;if(typeof d=="string"){for(let m of t.paths.fieldPaths??[])if(D(m,b)){let g=Xe(d,i);return g.truncated&&(c+=1),g.value}return d}if(Array.isArray(d)){let m=false;for(let g of t.paths.listPaths)if(D(g,b)){m=true;break}if(m){let g=Ve(d,o);return g.truncated&&(a+=g.dropped),g.items.map((S,O)=>f(S,[...b,String(O)]))}return d.map((g,S)=>f(g,[...b,String(S)]))}if(typeof d=="object"){if(E.has(d))return d;E.add(d);let m=d,g={};for(let[S,O]of Object.entries(m))g[S]=f(O,[...b,S]);return g}return d},y=f(e,[]),p=a>0||c>0;return p&&ne.debug("knowledge tool trimmed",{toolName:t.toolName,total:s,trimmedListCount:a,trimmedFieldCount:c,outputPath:l}),{result:y,total:s,truncated:p,trimmedListCount:a,trimmedFieldCount:c,outputPath:l}}async function Ye(e,t){try{let o=utils.Filesystem.join(chunkJ7Z3MIR7_cjs.h(),"tool-output");await W__default.default.mkdir(o,{recursive:!0}).catch(()=>{});let i=t.replace(/[^a-zA-Z0-9_-]/g,"_"),n=utils.Identifier.ascending("tool"),s=utils.Filesystem.join(o,`knowledge_${i}_${n}.json`);return await W__default.default.writeFile(s,JSON.stringify(e,null,2),"utf-8"),s}catch(o){ne.warn("knowledge truncation: persistFullResult failed",{toolName:t,error:utils.errorMeta(o)});return}}function w(e,t){if(!e.truncated)return "";let o=[];return o.push("---"),o.push(`[${t} output truncated for context window]`),o.push(`- Total items: ${e.total}`),o.push(`- Items shown: ${e.total-e.trimmedListCount}`),o.push(`- Fields trimmed: ${e.trimmedFieldCount}`),e.outputPath&&(o.push(`- Full data saved to: ${e.outputPath}`),o.push("- To recover: use Grep to search this file, or Read with offset/limit."),o.push(`- To narrow: call ${t} again with a more specific query.`)),o.join(`
|
|
2
|
+
`)}var Je=["callers","callees","references","directlyAffected","transitivelyAffected","edges"];function ee(e){switch(e){case "CALLS":return 0;case "IMPORTS":return 1;case "TYPE_REFERENCES":return 2;case "EXTENDS":case "IMPLEMENTS":return 3;default:return 4}}function We(e,t,o){return e.filePath==="(unresolved)"?o==="callers"||o==="callees":!(t.rootFilePath&&e.filePath&&e.filePath!==t.rootFilePath&&!Qe(t.rootFilePath,e.filePath))}function te(e){let t=e.replace(/\\/g,"/"),o=[...t.matchAll(/(?:^|\/)(packages|apps|examples|src|tests|bin|scripts)\//g)];if(o.length>0){let i=o[o.length-1];if(i&&i.index!==void 0)return t.slice(i.index+(i[0].startsWith("/")?1:0))}return t}function Qe(e,t){let o=te(e),i=te(t),n=o.split("/")[0]??"",s=i.split("/")[0]??"";return !n||!s?true:n===s}function T(e,t={}){let o=t.maxEdgesPerList??15;if(e==null||typeof e!="object"||Array.isArray(e))return e;let i={...e};for(let s of Je){let l=i[s];if(!Array.isArray(l))continue;let a=l.filter(p=>p===null||typeof p!="object"?false:We(p,t,s)),c=new Set,f=a.filter(p=>{let d=p,b=`${d.filePath??""}:${d.startLine??0}:${d.name??""}`;return c.has(b)?false:(c.add(b),true)}).map((p,d)=>({edge:p,idx:d})).sort((p,d)=>{let b=ee(p.edge.relation),m=ee(d.edge.relation);return b!==m?b-m:p.idx-d.idx}).map(({edge:p})=>p),y=f.length>o?f.slice(0,o):f;i[s]=y;}let n=["hits","facts","chunks","nodes","files","results","matches","entryPoints"];for(let s of n){let l=i[s];Array.isArray(l)&&(i[s]=l.map(a=>a===null||typeof a!="object"?a:T(a,t)));}return Array.isArray(i.entryPoints)&&(i.entryPoints=i.entryPoints.map(s=>{if(s===null||typeof s!="object")return s;let l=s;return Array.isArray(l.symbols)?(l.symbols=l.symbols.map(a=>a===null||typeof a!="object"?a:T(a,t)),l):s})),i}var F=utils.Log.create({service:"codebase.plugin.tool"});var dt=utils.loadTextFile("./codebase.txt",chunkR32346OA_cjs.d),lt=dt(),x=r__default.default.enum(["function","method","class","interface","type","variable","route","component","const"]),ct=r__default.default.enum(["incoming","outgoing","both"]),N=utils.Schema.stringArray,ut=r__default.default.discriminatedUnion("operation",[r__default.default.object({operation:r__default.default.literal("search"),query:r__default.default.string().describe("Search query (symbol name / natural language / snippet)"),kind:x.optional().describe("Filter by node kind"),file:r__default.default.string().optional().describe("Filter by source file (substring match)"),language:r__default.default.string().optional().describe("Filter by programming language"),astType:r__default.default.string().optional().describe("Filter by AST type (finer than kind)"),intent:r__default.default.string().optional().describe("LLM task context (for ranking)"),maxResults:utils.Schema.positiveInt.optional().default(10).describe("Max results (default 10)"),maxEdgesPerNode:utils.Schema.positiveInt.optional().default(10).refine(e=>e===void 0||e>=1&&e<=100,{message:"maxEdgesPerNode must be in [1, 100]"}).describe("Max edges per search hit (default 10; range [1, 100])"),includeContent:r__default.default.boolean().optional().default(false).describe("Include source content (default false)"),enableFts:r__default.default.boolean().optional().default(true).describe("Enable FTS search (default true)")}),r__default.default.object({operation:r__default.default.literal("node"),name:r__default.default.string().optional().describe("Node name (recommended; LLM workflow friendly)"),nodeId:r__default.default.string().optional().describe("Node ID (zero ambiguity)"),file:r__default.default.string().optional().describe("File path (disambiguation)"),kind:x.optional().describe("Kind (disambiguation)"),includeEdges:r__default.default.boolean().optional().default(false).describe("Include edges (default false)"),includeContent:r__default.default.boolean().optional().default(false).describe("Include source content (default false)"),maxEdgesPerNode:utils.Schema.positiveInt.optional().default(10).refine(e=>e===void 0||e>=1&&e<=100,{message:"maxEdgesPerNode must be in [1, 100]"}).describe("Max edges to return (default 10; range [1, 100])")}),r__default.default.object({operation:r__default.default.literal("context"),name:r__default.default.string().optional().describe("Center node name"),nodeId:r__default.default.string().optional().describe("Center node ID (zero ambiguity)"),file:r__default.default.string().optional().describe("File path (disambiguation)"),kind:x.optional().describe("Kind (disambiguation)"),depth:utils.Schema.positiveInt.optional().default(2).describe("BFS depth (default 2, max 3)"),maxNodes:utils.Schema.positiveInt.optional().default(100).describe("Max nodes (default 100)"),maxEdgesPerNode:utils.Schema.positiveInt.optional().default(10).refine(e=>e===void 0||e>=1&&e<=100,{message:"maxEdgesPerNode must be in [1, 100]"}).describe("Max edges per direction per BFS level (default 10; range [1, 100])"),direction:ct.optional().default("both").describe("Edge direction (default both)"),relationTypes:N.optional().describe('Relation type filter (exact match against @easbot/codebase RelationType enum), e.g. `["CALLS","IMPORTS"]`. Valid values: CALLS / IMPORTS / TYPE_REFERENCES / ANNOTATES / EXTENDS / IMPLEMENTS / HAS_METHOD / HAS_PROPERTY / METHOD_OVERRIDES / CONTAINS.')}),r__default.default.object({operation:r__default.default.literal("impact"),name:r__default.default.string().optional().describe("Center node name"),nodeId:r__default.default.string().optional().describe("Center node ID"),file:r__default.default.string().optional().describe("File path (disambiguation)"),kind:x.optional().describe("Kind (disambiguation)"),depth:utils.Schema.positiveInt.optional().default(2).describe("BFS depth (default 2, max 3)"),relationTypes:N.optional().describe('Relation type filter (exact match against @easbot/codebase RelationType enum), e.g. `["CALLS","IMPORTS"]`. Valid values: CALLS / IMPORTS / TYPE_REFERENCES / ANNOTATES / EXTENDS / IMPLEMENTS / HAS_METHOD / HAS_PROPERTY / METHOD_OVERRIDES / CONTAINS.'),maxResults:utils.Schema.positiveInt.optional().default(10).describe("Max affected nodes (default 10)"),maxEdgesPerNode:utils.Schema.positiveInt.optional().default(10).refine(e=>e===void 0||e>=1&&e<=100,{message:"maxEdgesPerNode must be in [1, 100]"}).describe("Max incoming edges per BFS level (default 10; range [1, 100])")}),r__default.default.object({operation:r__default.default.literal("callers"),name:r__default.default.string().optional().describe("Target node name"),nodeId:r__default.default.string().optional().describe("Target node ID"),file:r__default.default.string().optional().describe("File path (disambiguation)"),kind:x.optional().describe("Kind (disambiguation)"),relationTypes:N.optional().describe('Relation type filter (exact match against @easbot/codebase RelationType enum), e.g. `["CALLS","IMPORTS"]`. Valid values: CALLS / IMPORTS / TYPE_REFERENCES / ANNOTATES / EXTENDS / IMPLEMENTS / HAS_METHOD / HAS_PROPERTY / METHOD_OVERRIDES / CONTAINS.'),maxResults:utils.Schema.positiveInt.optional().default(10).describe("Max results (default 10)"),maxEdgesPerNode:utils.Schema.positiveInt.optional().default(10).refine(e=>e===void 0||e>=1&&e<=100,{message:"maxEdgesPerNode must be in [1, 100]"}).describe("Max incoming edges (default 10; range [1, 100])")}),r__default.default.object({operation:r__default.default.literal("callees"),name:r__default.default.string().optional().describe("Target node name"),nodeId:r__default.default.string().optional().describe("Target node ID"),file:r__default.default.string().optional().describe("File path (disambiguation)"),kind:x.optional().describe("Kind (disambiguation)"),relationTypes:N.optional().describe('Relation type filter (exact match against @easbot/codebase RelationType enum), e.g. `["CALLS","IMPORTS"]`. Valid values: CALLS / IMPORTS / TYPE_REFERENCES / ANNOTATES / EXTENDS / IMPLEMENTS / HAS_METHOD / HAS_PROPERTY / METHOD_OVERRIDES / CONTAINS.'),maxResults:utils.Schema.positiveInt.optional().default(10).describe("Max results (default 10)"),maxEdgesPerNode:utils.Schema.positiveInt.optional().default(10).refine(e=>e===void 0||e>=1&&e<=100,{message:"maxEdgesPerNode must be in [1, 100]"}).describe("Max outgoing edges (default 10; range [1, 100])")}),r__default.default.object({operation:r__default.default.literal("explore"),query:r__default.default.string().describe("Entry query (symbol name or natural language, required)"),file:r__default.default.string().optional().describe("File path filter"),kind:x.optional().describe("Kind filter"),maxFiles:utils.Schema.positiveInt.optional().default(5).describe("Entry point count (default 5)"),maxSymbols:utils.Schema.positiveInt.optional().default(3).describe("Symbols per entry point (default 3)"),maxEdgesPerNode:utils.Schema.positiveInt.optional().default(10).refine(e=>e===void 0||e>=1&&e<=100,{message:"maxEdgesPerNode must be in [1, 100]"}).describe("Max caller/callee edges per symbol (default 10; range [1, 100])"),depth:utils.Schema.positiveInt.optional().default(1).describe("Neighbor depth (default 1)"),includeContent:r__default.default.boolean().optional().default(true).describe("Include source content (default true)"),intent:r__default.default.string().optional().describe("LLM task context")}),r__default.default.object({operation:r__default.default.literal("status")})]);function ft(e){return e.worktree??e.directory??utils.Instance.worktree??process.cwd()}async function pt(e){let t;try{t=chunk3DAM6EZN_cjs.c(e);}catch{return}if(!fs.existsSync(t))throw new utils.NameErrors.OperationFailedError({message:`Codebase knowledge graph is not initialized at ${e} (db not found at ${t}).
|
|
3
|
+
Run \`easbot codebase index <workspaceDir>\` (one-time bootstrap) and retry. See eas-knowledge-using skill for details.`,operation:"codebase-init-required"})}function gt(e){return {workspaceDir:e,rootDir:e}}function bt(e){return e.map(t=>({nodeId:t.nodeId,name:t.name,kind:t.kind,filePath:t.filePath,startLine:t.startLine,endLine:t.endLine,edges:t.edges,source:t.source,score:t.score,snippet:t.snippet}))}var A=plugin.createTool({description:lt,args:ut,isEnabled:()=>chunkY7JDLK56_cjs.b.exists(),async execute(e,t){await t.ask({permission:"codebase",patterns:e.operation==="search"||e.operation==="explore"?[e.query]:e.operation==="node"||e.operation==="context"||e.operation==="impact"||e.operation==="callers"||e.operation==="callees"?[e.name??e.nodeId??"*"]:["*"],always:["*"],metadata:{operation:e.operation,...(e.operation==="search"||e.operation==="explore")&&{query:e.query},...(e.operation==="node"||e.operation==="context"||e.operation==="impact"||e.operation==="callers"||e.operation==="callees")&&{name:e.name,nodeId:e.nodeId}}});let o=ft(t);await pt(o),F.debug("codebase tool execute",{operation:e.operation,workspaceDir:o,...(e.operation==="search"||e.operation==="explore")&&{query:e.query}});try{let i=gt(o),n=await mt(e,i),s=await M(n,{toolName:`codebase_${e.operation}`,paths:k}),l=s.result.root,a=l?.file_path??l?.filePath??"",c=T(s.result,{rootFilePath:a||void 0}),E=await Et(e,c,i),f=await llm.Truncate.output(E,{contentType:"output",toolName:`codebase_${e.operation}`},{name:t.agent}),y=w(s,`codebase_${e.operation}`);return {output:f.truncated?`${f.content}
|
|
4
|
+
|
|
5
|
+
[Full output truncated: ${f.outputPath}]`:y?`${f.content}
|
|
6
|
+
|
|
7
|
+
${y}`:f.content,title:`Codebase: ${e.operation}${e.operation==="search"||e.operation==="explore"?` (${e.query})`:""}${e.operation==="node"&&e.name?` (${e.name})`:""}`,metadata:{operation:e.operation,enabled:!0,available:!0,workspaceDir:o,truncated:f.truncated,...f.truncated?{outputPath:f.outputPath}:{},...(e.operation==="search"||e.operation==="explore")&&{query:e.query},...(e.operation==="node"||e.operation==="context"||e.operation==="impact"||e.operation==="callers"||e.operation==="callees")&&{name:e.name,nodeId:e.nodeId}}}}catch(i){if(utils.ServiceError.isInstance(i))return F.debug("codebase tool business result",{operation:e.operation,workspaceDir:o,code:i.data.code,message:i.data.message}),{output:utils.ServiceErrorBus.toMarkdown(i,{tool:"codebase",operation:e.operation,resultTag:"<codebase_context>",pack:"codebase"}),title:`Codebase: ${e.operation} (${i.data.code})`,metadata:{operation:e.operation,enabled:true,available:true,workspaceDir:o,businessErrorCode:i.data.code}};throw F.warn("codebase tool execute failed",{operation:e.operation,workspaceDir:o,error:utils.errorMeta(i)}),i}}});async function mt(e,t){switch(e.operation){case "search":return chunkXGZDPIEP_cjs.a(t,{query:e.query,kind:e.kind,file:e.file,language:e.language,astType:e.astType,intent:e.intent,includeContent:e.includeContent,maxResults:e.maxResults,maxEdgesPerNode:e.maxEdgesPerNode,enableFts:e.enableFts,snippetMaxChars:I.codebase});case "node":return chunkXGZDPIEP_cjs.b(t,{name:e.name,nodeId:e.nodeId,file:e.file,kind:e.kind,includeEdges:e.includeEdges,includeContent:e.includeContent,maxEdgesPerNode:e.maxEdgesPerNode});case "context":return chunkXGZDPIEP_cjs.c(t,{name:e.name,nodeId:e.nodeId,file:e.file,kind:e.kind,depth:e.depth,maxNodes:e.maxNodes,direction:e.direction,relationTypes:e.relationTypes,maxEdgesPerNode:e.maxEdgesPerNode});case "impact":return chunkXGZDPIEP_cjs.d(t,{name:e.name,nodeId:e.nodeId,file:e.file,kind:e.kind,depth:e.depth,relationTypes:e.relationTypes,maxResults:e.maxResults,maxEdgesPerNode:e.maxEdgesPerNode});case "callers":return chunkXGZDPIEP_cjs.e(t,{name:e.name,nodeId:e.nodeId,file:e.file,kind:e.kind,relationTypes:e.relationTypes,maxResults:e.maxResults,maxEdgesPerNode:e.maxEdgesPerNode});case "callees":return chunkXGZDPIEP_cjs.f(t,{name:e.name,nodeId:e.nodeId,file:e.file,kind:e.kind,relationTypes:e.relationTypes,maxResults:e.maxResults,maxEdgesPerNode:e.maxEdgesPerNode});case "explore":return chunkXGZDPIEP_cjs.g(t,{query:e.query,file:e.file,kind:e.kind,maxFiles:e.maxFiles,maxSymbols:e.maxSymbols,depth:e.depth,includeContent:e.includeContent,intent:e.intent,maxEdgesPerNode:e.maxEdgesPerNode,snippetMaxChars:I.codebase});case "status":return chunkXGZDPIEP_cjs.h(t,{})}}async function Et(e,t,o){let i={toolName:`codebase_${e.operation}`};switch(e.operation){case "search":return chunkXGZDPIEP_cjs.y(bt(t.hits),i);case "impact":return JSON.stringify(t,null,2);case "context":return JSON.stringify(t,null,2);case "node":{let n=t;return chunkXGZDPIEP_cjs.E(n.node,n.edges,i)}case "explore":return chunkXGZDPIEP_cjs.F(t,i);case "callers":return chunkXGZDPIEP_cjs.B(t,i);case "callees":return chunkXGZDPIEP_cjs.C(t,i);case "status":{let n=t;return terminal.renderKnowledgeStatus({packageName:"codebase",rootDir:n.workspaceDir,configPath:n.configPath??"",configExists:typeof n.configExists=="boolean"?n.configExists:false,dbPath:n.dbPath,dbExists:typeof n.dbExists=="boolean"?n.dbExists:true,dbSize:n.dbSize,indexState:n.indexState,schemaVersion:(()=>{let s=n.meta?.schema_version;return s&&Number.isFinite(Number.parseInt(s,10))?Number.parseInt(s,10):void 0})(),extractionVersion:n.extractionVersion,lastSyncAt:n.lastSync,vectorEnabled:typeof n.vectorEnabled=="boolean"?n.vectorEnabled:false,embeddingDims:typeof n.embeddingDims=="number"?n.embeddingDims:void 0,llm:n.llm??{initialized:false,capabilities:{}},healthy:n.healthy,dbStats:n.dbStats,extras:(()=>{let s={};if(n.isStale===true&&(s.stale="yes \u2014 reindex recommended"),typeof n.ftsAvailable=="boolean"&&(s.fts_available=n.ftsAvailable?"yes":"no"),n.meta&&typeof n.meta=="object")for(let[l,a]of Object.entries(n.meta))a!=null&&(s[`meta/${l}`]=String(a));return Object.keys(s).length>0?s:void 0})()})}}}var P="codebase",v="0.3.39",ie={name:P,version:v,description:"EASBot codebase plugin: code knowledge graph tool",entry:"./index.mjs",capabilities:["tools"]};var C=async e=>({tools:{[P]:A}});Object.defineProperty(exports,"handleCodebaseCli",{enumerable:true,get:function(){return chunkP3IAXGOT_cjs.d}});Object.defineProperty(exports,"renderBanner",{enumerable:true,get:function(){return chunkP3IAXGOT_cjs.a}});Object.defineProperty(exports,"renderHelp",{enumerable:true,get:function(){return chunkP3IAXGOT_cjs.b}});Object.defineProperty(exports,"SECTION_END",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.p}});Object.defineProperty(exports,"SECTION_MARKER",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.o}});Object.defineProperty(exports,"callees",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.f}});Object.defineProperty(exports,"callers",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.e}});Object.defineProperty(exports,"context",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.c}});Object.defineProperty(exports,"defaultRiskLabel",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.u}});Object.defineProperty(exports,"doctor",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.i}});Object.defineProperty(exports,"emptyFormattedNode",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.n}});Object.defineProperty(exports,"explore",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.g}});Object.defineProperty(exports,"formatCodebaseEdge",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.l}});Object.defineProperty(exports,"formatCodebaseNode",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.k}});Object.defineProperty(exports,"formatCodebaseSearchHits",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.m}});Object.defineProperty(exports,"impact",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.d}});Object.defineProperty(exports,"initCodebase",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.j}});Object.defineProperty(exports,"node",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.b}});Object.defineProperty(exports,"renderCalleesFromResult",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.C}});Object.defineProperty(exports,"renderCallersFromResult",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.B}});Object.defineProperty(exports,"renderContext",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.v}});Object.defineProperty(exports,"renderContextFromQuery",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.A}});Object.defineProperty(exports,"renderExploreFromResult",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.F}});Object.defineProperty(exports,"renderImpact",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.t}});Object.defineProperty(exports,"renderImpactFromTuples",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.z}});Object.defineProperty(exports,"renderNeighborList",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.x}});Object.defineProperty(exports,"renderNode",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.w}});Object.defineProperty(exports,"renderNodeDetail",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.E}});Object.defineProperty(exports,"renderSearch",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.y}});Object.defineProperty(exports,"renderSearchResult",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.s}});Object.defineProperty(exports,"renderStatusFromResult",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.D}});Object.defineProperty(exports,"search",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.a}});Object.defineProperty(exports,"status",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.h}});Object.defineProperty(exports,"truncateAtSectionBoundary",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.q}});Object.defineProperty(exports,"truncateAtSectionBoundarySync",{enumerable:true,get:function(){return chunkXGZDPIEP_cjs.r}});Object.defineProperty(exports,"CODEBASE_JSON_REL_PATH",{enumerable:true,get:function(){return chunkY7JDLK56_cjs.a}});Object.defineProperty(exports,"CodebaseCache",{enumerable:true,get:function(){return chunkY7JDLK56_cjs.b}});Object.defineProperty(exports,"getGlobal",{enumerable:true,get:function(){return chunkJ7Z3MIR7_cjs.c}});Object.defineProperty(exports,"getHomeDir",{enumerable:true,get:function(){return chunkJ7Z3MIR7_cjs.g}});Object.defineProperty(exports,"getInstance",{enumerable:true,get:function(){return chunkJ7Z3MIR7_cjs.f}});Object.defineProperty(exports,"getProjectDirectory",{enumerable:true,get:function(){return chunkJ7Z3MIR7_cjs.l}});Object.defineProperty(exports,"getXdgCache",{enumerable:true,get:function(){return chunkJ7Z3MIR7_cjs.k}});Object.defineProperty(exports,"getXdgConfig",{enumerable:true,get:function(){return chunkJ7Z3MIR7_cjs.i}});Object.defineProperty(exports,"getXdgData",{enumerable:true,get:function(){return chunkJ7Z3MIR7_cjs.h}});Object.defineProperty(exports,"getXdgState",{enumerable:true,get:function(){return chunkJ7Z3MIR7_cjs.j}});Object.defineProperty(exports,"resetGlobalAdapter",{enumerable:true,get:function(){return chunkJ7Z3MIR7_cjs.b}});Object.defineProperty(exports,"resetInstanceAdapter",{enumerable:true,get:function(){return chunkJ7Z3MIR7_cjs.e}});Object.defineProperty(exports,"setGlobalAdapter",{enumerable:true,get:function(){return chunkJ7Z3MIR7_cjs.a}});Object.defineProperty(exports,"setInstanceAdapter",{enumerable:true,get:function(){return chunkJ7Z3MIR7_cjs.d}});Object.defineProperty(exports,"CodeBase",{enumerable:true,get:function(){return chunk3DAM6EZN_cjs.r}});Object.defineProperty(exports,"EdgeExtractor",{enumerable:true,get:function(){return chunk3DAM6EZN_cjs.l}});Object.defineProperty(exports,"FILE_EXTENSION_MAP",{enumerable:true,get:function(){return chunk3DAM6EZN_cjs.f}});Object.defineProperty(exports,"Indexer",{enumerable:true,get:function(){return chunk3DAM6EZN_cjs.n}});Object.defineProperty(exports,"NodeExtractor",{enumerable:true,get:function(){return chunk3DAM6EZN_cjs.j}});Object.defineProperty(exports,"ParserManager",{enumerable:true,get:function(){return chunk3DAM6EZN_cjs.g}});Object.defineProperty(exports,"QueryInterface",{enumerable:true,get:function(){return chunk3DAM6EZN_cjs.p}});Object.defineProperty(exports,"codebaseConfigPath",{enumerable:true,get:function(){return chunk3DAM6EZN_cjs.b}});Object.defineProperty(exports,"codebaseDbPath",{enumerable:true,get:function(){return chunk3DAM6EZN_cjs.c}});Object.defineProperty(exports,"createCodebase",{enumerable:true,get:function(){return chunk3DAM6EZN_cjs.s}});Object.defineProperty(exports,"createEdgeExtractor",{enumerable:true,get:function(){return chunk3DAM6EZN_cjs.m}});Object.defineProperty(exports,"createIndexer",{enumerable:true,get:function(){return chunk3DAM6EZN_cjs.o}});Object.defineProperty(exports,"createNodeExtractor",{enumerable:true,get:function(){return chunk3DAM6EZN_cjs.k}});Object.defineProperty(exports,"createQueryInterface",{enumerable:true,get:function(){return chunk3DAM6EZN_cjs.q}});Object.defineProperty(exports,"easbotDir",{enumerable:true,get:function(){return chunk3DAM6EZN_cjs.a}});Object.defineProperty(exports,"getParserManager",{enumerable:true,get:function(){return chunk3DAM6EZN_cjs.h}});Object.defineProperty(exports,"resetParserManager",{enumerable:true,get:function(){return chunk3DAM6EZN_cjs.i}});Object.defineProperty(exports,"DatabaseManager",{enumerable:true,get:function(){return chunkAARBEAIB_cjs.f}});Object.defineProperty(exports,"CODEBASE_BUSINESS_CODES",{enumerable:true,get:function(){return chunkW5SMGCKO_cjs.c}});Object.defineProperty(exports,"CODEBASE_BUSINESS_HINTS",{enumerable:true,get:function(){return chunkW5SMGCKO_cjs.d}});Object.defineProperty(exports,"CodebaseError",{enumerable:true,get:function(){return chunkW5SMGCKO_cjs.b}});Object.defineProperty(exports,"registerBusinessErrors",{enumerable:true,get:function(){return chunkW5SMGCKO_cjs.e}});Object.defineProperty(exports,"Llm",{enumerable:true,get:function(){return chunkEH2QTB6S_cjs.a}});Object.defineProperty(exports,"llm",{enumerable:true,get:function(){return chunkEH2QTB6S_cjs.b}});Object.defineProperty(exports,"CodebaseJsonSchema",{enumerable:true,get:function(){return chunkVZCOLSBF_cjs.e}});Object.defineProperty(exports,"DEFAULT_CODEBASE_JSON",{enumerable:true,get:function(){return chunkVZCOLSBF_cjs.g}});Object.defineProperty(exports,"DEFAULT_EMBEDDING_CONFIG",{enumerable:true,get:function(){return chunkVZCOLSBF_cjs.a}});Object.defineProperty(exports,"DEFAULT_INDEXER_CONFIG",{enumerable:true,get:function(){return chunkVZCOLSBF_cjs.b}});Object.defineProperty(exports,"DEFAULT_PARSER_CONFIG",{enumerable:true,get:function(){return chunkVZCOLSBF_cjs.c}});Object.defineProperty(exports,"DEFAULT_TOKENIZER_CONFIG",{enumerable:true,get:function(){return chunkVZCOLSBF_cjs.d}});Object.defineProperty(exports,"Truncate",{enumerable:true,get:function(){return llm.Truncate}});Object.defineProperty(exports,"renderKnowledgeStatus",{enumerable:true,get:function(){return terminal.renderKnowledgeStatus}});exports.CODEBASE_PLUGIN_ID=P;exports.CODEBASE_PLUGIN_MANIFEST=ie;exports.CODEBASE_PLUGIN_VERSION=v;exports.CodebasePlugin=C;exports.CodebasePluginEntry=C;exports.CodebaseTool=A;
|
package/dist/index.d.cts
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
+
import * as _easbot_types from '@easbot/types';
|
|
1
2
|
import { KnowledgeSearchOptions, SearchConfig, BaseSearchResult, KnowledgeLlmStatus, CodebaseKnowledgeConfigWithModels, CodebaseKnowledgeConfig, IGlobal, IInstance } from '@easbot/types';
|
|
2
3
|
export { CodebaseKnowledgeConfig, CodebaseKnowledgeConfigWithModels, SyncConfig } from '@easbot/types';
|
|
3
4
|
import z$1, { z } from 'zod';
|
|
4
5
|
import { EmbeddingModelV3 } from '@ai-sdk/provider';
|
|
5
6
|
export { EmbeddingModelV3 as EmbeddingModel } from '@ai-sdk/provider';
|
|
6
7
|
import { ILLMInitConfig, ILLMCapabilities, LanguageModelRef, EmbeddingModelRef, ILLM } from '@easbot/llm';
|
|
8
|
+
export { Truncate } from '@easbot/llm';
|
|
9
|
+
export { renderKnowledgeStatus } from '@easbot/terminal';
|
|
10
|
+
import { Plugin, PluginManifest } from '@easbot/plugin';
|
|
7
11
|
export { ServiceError, ServiceError as ServiceErrorInstance } from '@easbot/utils';
|
|
8
12
|
|
|
9
13
|
type IndexState = 'uninitialized' | 'indexing' | 'complete' | 'partial' | 'failed' | 'stale';
|
|
@@ -1957,6 +1961,163 @@ declare namespace Llm {
|
|
|
1957
1961
|
}
|
|
1958
1962
|
declare const llm: ILLM;
|
|
1959
1963
|
|
|
1964
|
+
declare const CodebasePlugin: Plugin;
|
|
1965
|
+
|
|
1966
|
+
declare const CODEBASE_PLUGIN_ID = "codebase";
|
|
1967
|
+
declare const CODEBASE_PLUGIN_VERSION = "0.3.39";
|
|
1968
|
+
declare const CODEBASE_PLUGIN_MANIFEST: PluginManifest;
|
|
1969
|
+
|
|
1970
|
+
declare const CodebaseTool: _easbot_types.ToolDefinition & {
|
|
1971
|
+
args: z$1.ZodDiscriminatedUnion<[z$1.ZodObject<{
|
|
1972
|
+
operation: z$1.ZodLiteral<"search">;
|
|
1973
|
+
query: z$1.ZodString;
|
|
1974
|
+
kind: z$1.ZodOptional<z$1.ZodEnum<{
|
|
1975
|
+
function: "function";
|
|
1976
|
+
type: "type";
|
|
1977
|
+
method: "method";
|
|
1978
|
+
class: "class";
|
|
1979
|
+
interface: "interface";
|
|
1980
|
+
variable: "variable";
|
|
1981
|
+
route: "route";
|
|
1982
|
+
component: "component";
|
|
1983
|
+
const: "const";
|
|
1984
|
+
}>>;
|
|
1985
|
+
file: z$1.ZodOptional<z$1.ZodString>;
|
|
1986
|
+
language: z$1.ZodOptional<z$1.ZodString>;
|
|
1987
|
+
astType: z$1.ZodOptional<z$1.ZodString>;
|
|
1988
|
+
intent: z$1.ZodOptional<z$1.ZodString>;
|
|
1989
|
+
maxResults: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodNumber, z$1.ZodString]>, z$1.ZodTransform<number, string | number>>, z$1.ZodNumber>>>;
|
|
1990
|
+
maxEdgesPerNode: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodNumber, z$1.ZodString]>, z$1.ZodTransform<number, string | number>>, z$1.ZodNumber>>>;
|
|
1991
|
+
includeContent: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBoolean>>;
|
|
1992
|
+
enableFts: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBoolean>>;
|
|
1993
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
1994
|
+
operation: z$1.ZodLiteral<"node">;
|
|
1995
|
+
name: z$1.ZodOptional<z$1.ZodString>;
|
|
1996
|
+
nodeId: z$1.ZodOptional<z$1.ZodString>;
|
|
1997
|
+
file: z$1.ZodOptional<z$1.ZodString>;
|
|
1998
|
+
kind: z$1.ZodOptional<z$1.ZodEnum<{
|
|
1999
|
+
function: "function";
|
|
2000
|
+
type: "type";
|
|
2001
|
+
method: "method";
|
|
2002
|
+
class: "class";
|
|
2003
|
+
interface: "interface";
|
|
2004
|
+
variable: "variable";
|
|
2005
|
+
route: "route";
|
|
2006
|
+
component: "component";
|
|
2007
|
+
const: "const";
|
|
2008
|
+
}>>;
|
|
2009
|
+
includeEdges: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBoolean>>;
|
|
2010
|
+
includeContent: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBoolean>>;
|
|
2011
|
+
maxEdgesPerNode: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodNumber, z$1.ZodString]>, z$1.ZodTransform<number, string | number>>, z$1.ZodNumber>>>;
|
|
2012
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
2013
|
+
operation: z$1.ZodLiteral<"context">;
|
|
2014
|
+
name: z$1.ZodOptional<z$1.ZodString>;
|
|
2015
|
+
nodeId: z$1.ZodOptional<z$1.ZodString>;
|
|
2016
|
+
file: z$1.ZodOptional<z$1.ZodString>;
|
|
2017
|
+
kind: z$1.ZodOptional<z$1.ZodEnum<{
|
|
2018
|
+
function: "function";
|
|
2019
|
+
type: "type";
|
|
2020
|
+
method: "method";
|
|
2021
|
+
class: "class";
|
|
2022
|
+
interface: "interface";
|
|
2023
|
+
variable: "variable";
|
|
2024
|
+
route: "route";
|
|
2025
|
+
component: "component";
|
|
2026
|
+
const: "const";
|
|
2027
|
+
}>>;
|
|
2028
|
+
depth: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodNumber, z$1.ZodString]>, z$1.ZodTransform<number, string | number>>, z$1.ZodNumber>>>;
|
|
2029
|
+
maxNodes: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodNumber, z$1.ZodString]>, z$1.ZodTransform<number, string | number>>, z$1.ZodNumber>>>;
|
|
2030
|
+
maxEdgesPerNode: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodNumber, z$1.ZodString]>, z$1.ZodTransform<number, string | number>>, z$1.ZodNumber>>>;
|
|
2031
|
+
direction: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodEnum<{
|
|
2032
|
+
incoming: "incoming";
|
|
2033
|
+
outgoing: "outgoing";
|
|
2034
|
+
both: "both";
|
|
2035
|
+
}>>>;
|
|
2036
|
+
relationTypes: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodArray<z$1.ZodString>, z$1.ZodString]>, z$1.ZodTransform<string[], string | string[]>>, z$1.ZodArray<z$1.ZodString>>>;
|
|
2037
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
2038
|
+
operation: z$1.ZodLiteral<"impact">;
|
|
2039
|
+
name: z$1.ZodOptional<z$1.ZodString>;
|
|
2040
|
+
nodeId: z$1.ZodOptional<z$1.ZodString>;
|
|
2041
|
+
file: z$1.ZodOptional<z$1.ZodString>;
|
|
2042
|
+
kind: z$1.ZodOptional<z$1.ZodEnum<{
|
|
2043
|
+
function: "function";
|
|
2044
|
+
type: "type";
|
|
2045
|
+
method: "method";
|
|
2046
|
+
class: "class";
|
|
2047
|
+
interface: "interface";
|
|
2048
|
+
variable: "variable";
|
|
2049
|
+
route: "route";
|
|
2050
|
+
component: "component";
|
|
2051
|
+
const: "const";
|
|
2052
|
+
}>>;
|
|
2053
|
+
depth: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodNumber, z$1.ZodString]>, z$1.ZodTransform<number, string | number>>, z$1.ZodNumber>>>;
|
|
2054
|
+
relationTypes: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodArray<z$1.ZodString>, z$1.ZodString]>, z$1.ZodTransform<string[], string | string[]>>, z$1.ZodArray<z$1.ZodString>>>;
|
|
2055
|
+
maxResults: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodNumber, z$1.ZodString]>, z$1.ZodTransform<number, string | number>>, z$1.ZodNumber>>>;
|
|
2056
|
+
maxEdgesPerNode: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodNumber, z$1.ZodString]>, z$1.ZodTransform<number, string | number>>, z$1.ZodNumber>>>;
|
|
2057
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
2058
|
+
operation: z$1.ZodLiteral<"callers">;
|
|
2059
|
+
name: z$1.ZodOptional<z$1.ZodString>;
|
|
2060
|
+
nodeId: z$1.ZodOptional<z$1.ZodString>;
|
|
2061
|
+
file: z$1.ZodOptional<z$1.ZodString>;
|
|
2062
|
+
kind: z$1.ZodOptional<z$1.ZodEnum<{
|
|
2063
|
+
function: "function";
|
|
2064
|
+
type: "type";
|
|
2065
|
+
method: "method";
|
|
2066
|
+
class: "class";
|
|
2067
|
+
interface: "interface";
|
|
2068
|
+
variable: "variable";
|
|
2069
|
+
route: "route";
|
|
2070
|
+
component: "component";
|
|
2071
|
+
const: "const";
|
|
2072
|
+
}>>;
|
|
2073
|
+
relationTypes: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodArray<z$1.ZodString>, z$1.ZodString]>, z$1.ZodTransform<string[], string | string[]>>, z$1.ZodArray<z$1.ZodString>>>;
|
|
2074
|
+
maxResults: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodNumber, z$1.ZodString]>, z$1.ZodTransform<number, string | number>>, z$1.ZodNumber>>>;
|
|
2075
|
+
maxEdgesPerNode: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodNumber, z$1.ZodString]>, z$1.ZodTransform<number, string | number>>, z$1.ZodNumber>>>;
|
|
2076
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
2077
|
+
operation: z$1.ZodLiteral<"callees">;
|
|
2078
|
+
name: z$1.ZodOptional<z$1.ZodString>;
|
|
2079
|
+
nodeId: z$1.ZodOptional<z$1.ZodString>;
|
|
2080
|
+
file: z$1.ZodOptional<z$1.ZodString>;
|
|
2081
|
+
kind: z$1.ZodOptional<z$1.ZodEnum<{
|
|
2082
|
+
function: "function";
|
|
2083
|
+
type: "type";
|
|
2084
|
+
method: "method";
|
|
2085
|
+
class: "class";
|
|
2086
|
+
interface: "interface";
|
|
2087
|
+
variable: "variable";
|
|
2088
|
+
route: "route";
|
|
2089
|
+
component: "component";
|
|
2090
|
+
const: "const";
|
|
2091
|
+
}>>;
|
|
2092
|
+
relationTypes: z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodArray<z$1.ZodString>, z$1.ZodString]>, z$1.ZodTransform<string[], string | string[]>>, z$1.ZodArray<z$1.ZodString>>>;
|
|
2093
|
+
maxResults: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodNumber, z$1.ZodString]>, z$1.ZodTransform<number, string | number>>, z$1.ZodNumber>>>;
|
|
2094
|
+
maxEdgesPerNode: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodNumber, z$1.ZodString]>, z$1.ZodTransform<number, string | number>>, z$1.ZodNumber>>>;
|
|
2095
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
2096
|
+
operation: z$1.ZodLiteral<"explore">;
|
|
2097
|
+
query: z$1.ZodString;
|
|
2098
|
+
file: z$1.ZodOptional<z$1.ZodString>;
|
|
2099
|
+
kind: z$1.ZodOptional<z$1.ZodEnum<{
|
|
2100
|
+
function: "function";
|
|
2101
|
+
type: "type";
|
|
2102
|
+
method: "method";
|
|
2103
|
+
class: "class";
|
|
2104
|
+
interface: "interface";
|
|
2105
|
+
variable: "variable";
|
|
2106
|
+
route: "route";
|
|
2107
|
+
component: "component";
|
|
2108
|
+
const: "const";
|
|
2109
|
+
}>>;
|
|
2110
|
+
maxFiles: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodNumber, z$1.ZodString]>, z$1.ZodTransform<number, string | number>>, z$1.ZodNumber>>>;
|
|
2111
|
+
maxSymbols: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodNumber, z$1.ZodString]>, z$1.ZodTransform<number, string | number>>, z$1.ZodNumber>>>;
|
|
2112
|
+
maxEdgesPerNode: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodNumber, z$1.ZodString]>, z$1.ZodTransform<number, string | number>>, z$1.ZodNumber>>>;
|
|
2113
|
+
depth: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodPipe<z$1.ZodPipe<z$1.ZodUnion<readonly [z$1.ZodNumber, z$1.ZodString]>, z$1.ZodTransform<number, string | number>>, z$1.ZodNumber>>>;
|
|
2114
|
+
includeContent: z$1.ZodDefault<z$1.ZodOptional<z$1.ZodBoolean>>;
|
|
2115
|
+
intent: z$1.ZodOptional<z$1.ZodString>;
|
|
2116
|
+
}, z$1.core.$strip>, z$1.ZodObject<{
|
|
2117
|
+
operation: z$1.ZodLiteral<"status">;
|
|
2118
|
+
}, z$1.core.$strip>], "operation">;
|
|
2119
|
+
};
|
|
2120
|
+
|
|
1960
2121
|
declare const I18n: {
|
|
1961
2122
|
readonly defaultLocale: "zh-CN";
|
|
1962
2123
|
readonly timeZone: "Asia/Shanghai";
|
|
@@ -2344,4 +2505,4 @@ declare namespace CodebaseCache {
|
|
|
2344
2505
|
function getConfigPath(): Promise<string>;
|
|
2345
2506
|
}
|
|
2346
2507
|
|
|
2347
|
-
export { type ASTNodeType, CODEBASE_BUSINESS_CODES, CODEBASE_BUSINESS_HINTS, CODEBASE_JSON_REL_PATH, type CalleeEntry, type CalleesParams, type CalleesResult, type CallerEntry, type CallersParams, type CallersResult, CodeBase, type CodeKnowledgeGraphConfig, CodebaseCache, type CodebaseCliDeps, type CodebaseCliResult, type CodebaseConfig, CodebaseError, type CodebaseJson, CodebaseJsonSchema, type ContextInput, type ContextNode, type ContextParams, type ContextResult, DEFAULT_CODEBASE_JSON, DEFAULT_EMBEDDING_CONFIG, DEFAULT_INDEXER_CONFIG, DEFAULT_PARSER_CONFIG, DEFAULT_TOKENIZER_CONFIG, DatabaseManager, type DoctorParams, type DoctorResult, type Edge, EdgeExtractor, type EdgeQueryFilter, type EdgeWithNodes, type ExploreEntryPoint, type ExploreParams, type ExploreResult, type ExtractedEdge, type ExtractedNode, FILE_EXTENSION_MAP, type FileHashRecord, type FormattedEdge, type FormattedNode, type FormattedSearchHit, type GraphStatus, type HealthCheckResult, type HybridSearchResult, type ICodebase, type IEdgeExtractor, type INodeExtractor, type IParser, type ImpactBucket, type ImpactBucketEntry, type ImpactParams, type ImpactResult, type IndexResult, Indexer, type IndexerConfig, type Language, Llm, type LlmInitConfig, type LlmModels, type LlmOptions, type Node, NodeExtractor, type NodeKind, type NodeParams, type NodeQueryFilter, type NodeResult, type NodeWithEdges, ParserManager, type PendingFile, type ProgressCallback, QueryInterface, type RelationQueryOptions, type RelationType, type RenderOptions, SECTION_END, SECTION_MARKER, type SearchHit, type SearchOptions, type SearchParams, type SearchResult$1 as SearchResult, type ServiceContext, type StatusParams, type StatusResult, type SyncResult, type TruncateOptions, type TruncateResult, callees, callers, codebaseConfigPath, codebaseDbPath, context, createCodebase, createEdgeExtractor, createIndexer, createNodeExtractor, createQueryInterface, defaultRiskLabel, doctor, easbotDir, emptyFormattedNode, explore, formatCodebaseEdge, formatCodebaseNode, formatCodebaseSearchHits, getGlobal, getHomeDir, getInstance, getParserManager, getProjectDirectory, getXdgCache, getXdgConfig, getXdgData, getXdgState, handleCodebaseCli, impact, initCodebase, llm, node, registerBusinessErrors, renderBanner, renderCalleesFromResult, renderCallersFromResult, renderContext, renderContextFromQuery, renderExploreFromResult, renderHelp, renderImpact, renderImpactFromTuples, renderNeighborList, renderNode, renderNodeDetail, renderSearch, renderSearchResult, renderStatusFromResult, resetGlobalAdapter, resetInstanceAdapter, resetParserManager, search, setGlobalAdapter, setInstanceAdapter, status, truncateAtSectionBoundary, truncateAtSectionBoundarySync };
|
|
2508
|
+
export { type ASTNodeType, CODEBASE_BUSINESS_CODES, CODEBASE_BUSINESS_HINTS, CODEBASE_JSON_REL_PATH, CODEBASE_PLUGIN_ID, CODEBASE_PLUGIN_MANIFEST, CODEBASE_PLUGIN_VERSION, type CalleeEntry, type CalleesParams, type CalleesResult, type CallerEntry, type CallersParams, type CallersResult, CodeBase, type CodeKnowledgeGraphConfig, CodebaseCache, type CodebaseCliDeps, type CodebaseCliResult, type CodebaseConfig, CodebaseError, type CodebaseJson, CodebaseJsonSchema, CodebasePlugin, CodebasePlugin as CodebasePluginEntry, CodebaseTool, type ContextInput, type ContextNode, type ContextParams, type ContextResult, DEFAULT_CODEBASE_JSON, DEFAULT_EMBEDDING_CONFIG, DEFAULT_INDEXER_CONFIG, DEFAULT_PARSER_CONFIG, DEFAULT_TOKENIZER_CONFIG, DatabaseManager, type DoctorParams, type DoctorResult, type Edge, EdgeExtractor, type EdgeQueryFilter, type EdgeWithNodes, type ExploreEntryPoint, type ExploreParams, type ExploreResult, type ExtractedEdge, type ExtractedNode, FILE_EXTENSION_MAP, type FileHashRecord, type FormattedEdge, type FormattedNode, type FormattedSearchHit, type GraphStatus, type HealthCheckResult, type HybridSearchResult, type ICodebase, type IEdgeExtractor, type INodeExtractor, type IParser, type ImpactBucket, type ImpactBucketEntry, type ImpactParams, type ImpactResult, type IndexResult, Indexer, type IndexerConfig, type Language, Llm, type LlmInitConfig, type LlmModels, type LlmOptions, type Node, NodeExtractor, type NodeKind, type NodeParams, type NodeQueryFilter, type NodeResult, type NodeWithEdges, ParserManager, type PendingFile, type ProgressCallback, QueryInterface, type RelationQueryOptions, type RelationType, type RenderOptions, SECTION_END, SECTION_MARKER, type SearchHit, type SearchOptions, type SearchParams, type SearchResult$1 as SearchResult, type ServiceContext, type StatusParams, type StatusResult, type SyncResult, type TruncateOptions, type TruncateResult, callees, callers, codebaseConfigPath, codebaseDbPath, context, createCodebase, createEdgeExtractor, createIndexer, createNodeExtractor, createQueryInterface, defaultRiskLabel, doctor, easbotDir, emptyFormattedNode, explore, formatCodebaseEdge, formatCodebaseNode, formatCodebaseSearchHits, getGlobal, getHomeDir, getInstance, getParserManager, getProjectDirectory, getXdgCache, getXdgConfig, getXdgData, getXdgState, handleCodebaseCli, impact, initCodebase, llm, node, registerBusinessErrors, renderBanner, renderCalleesFromResult, renderCallersFromResult, renderContext, renderContextFromQuery, renderExploreFromResult, renderHelp, renderImpact, renderImpactFromTuples, renderNeighborList, renderNode, renderNodeDetail, renderSearch, renderSearchResult, renderStatusFromResult, resetGlobalAdapter, resetInstanceAdapter, resetParserManager, search, setGlobalAdapter, setInstanceAdapter, status, truncateAtSectionBoundary, truncateAtSectionBoundarySync };
|