autosnippet
Version:
Extract code patterns into a knowledge base for AI coding assistants
242 lines (241 loc) • 6.38 kB
TypeScript
/**
* ast-graph.js — AST 结构化分析 + Agent Memory 工具 (11)
*
* 44. get_project_overview 项目 AST 概览
* 45. get_class_hierarchy 类继承层级
* 46. get_class_info 类/结构体详细信息 (跨语言)
* 47. get_protocol_info 协议/接口/trait 详细信息 (跨语言)
* 48. get_method_overrides 方法覆写查询
* 49. get_category_map Category/Extension 扩展映射
* 50. get_previous_analysis 前序维度分析结果
* 51. note_finding 记录关键发现
* 52. get_previous_evidence 检索前序维度证据
* 53. query_code_graph 查询代码实体图谱
* 54. query_call_graph 查询方法调用链 (Phase 5)
*/
import type { ToolHandlerContext } from './_shared.js';
export declare const getProjectOverview: {
name: string;
description: string;
parameters: {
type: string;
properties: {};
};
handler: (_params: Record<string, never>, ctx: ToolHandlerContext) => Promise<string>;
};
export declare const getClassHierarchy: {
name: string;
description: string;
parameters: {
type: string;
properties: {
className: {
type: string;
description: string;
};
};
};
handler: (params: {
className?: string;
class_name?: string;
}, ctx: ToolHandlerContext) => Promise<string>;
};
export declare const getClassInfo: {
name: string;
description: string;
parameters: {
type: string;
properties: {
className: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: {
className: string;
class_name?: string;
}, ctx: ToolHandlerContext) => Promise<string>;
};
export declare const getProtocolInfo: {
name: string;
description: string;
parameters: {
type: string;
properties: {
protocolName: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: {
protocolName: string;
protocol_name?: string;
}, ctx: ToolHandlerContext) => Promise<string>;
};
export declare const getMethodOverrides: {
name: string;
description: string;
parameters: {
type: string;
properties: {
className: {
type: string;
description: string;
};
methodName: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: {
className: string;
class_name?: string;
methodName: string;
method_name?: string;
}, ctx: ToolHandlerContext) => Promise<string>;
};
export declare const getCategoryMap: {
name: string;
description: string;
parameters: {
type: string;
properties: {
className: {
type: string;
description: string;
};
};
};
handler: (params: {
className?: string;
class_name?: string;
}, ctx: ToolHandlerContext) => Promise<string>;
};
export declare const getPreviousAnalysis: {
name: string;
description: string;
parameters: {
type: string;
properties: {};
};
handler: (_params: Record<string, never>, ctx: ToolHandlerContext) => Promise<string>;
};
export declare const noteFinding: {
name: string;
description: string;
parameters: {
type: string;
properties: {
finding: {
type: string;
description: string;
};
evidence: {
type: string;
description: string;
};
importance: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: {
finding?: string;
evidence?: string | string[];
importance?: number;
}, ctx: ToolHandlerContext) => Promise<string>;
};
export declare const getPreviousEvidence: {
name: string;
description: string;
parameters: {
type: string;
properties: {
query: {
type: string;
description: string;
};
dimId: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: {
query: string;
dimId?: string;
}, ctx: ToolHandlerContext) => Promise<string>;
};
export declare const queryCodeGraph: {
name: string;
description: string;
parameters: {
type: string;
properties: {
action: {
type: string;
enum: string[];
description: string;
};
entity_id: {
type: string;
description: string;
};
entity_type: {
type: string;
enum: string[];
description: string;
};
max_depth: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: {
action: string;
entity_id: string;
entity_type?: string;
max_depth?: number;
}, ctx: ToolHandlerContext) => Promise<string>;
};
export declare const queryCallGraph: {
name: string;
description: string;
parameters: {
type: string;
properties: {
methodName: {
type: string;
description: string;
};
direction: {
type: string;
enum: string[];
description: string;
};
maxDepth: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: {
methodName?: string;
method_name?: string;
direction?: string;
maxDepth?: number;
max_depth?: number;
}, ctx: ToolHandlerContext) => Promise<string>;
};