autosnippet
Version:
Extract code patterns into a knowledge base for AI coding assistants
1,803 lines (1,802 loc) • 53.5 kB
TypeScript
/**
* tools/index.js — Barrel 导出文件
*
* 从各子模块导入所有工具,按原始顺序组装 ALL_TOOLS 数组并导出。
*/
import { enrichCandidate, refineBootstrapCandidates } from './ai-analysis.js';
import { getCategoryMap, getClassHierarchy, getClassInfo, getMethodOverrides, getPreviousAnalysis, getPreviousEvidence, getProjectOverview, getProtocolInfo, noteFinding, queryCallGraph, queryCodeGraph } from './ast-graph.js';
import { analyzeCode, getToolDetails, knowledgeOverview, planTask, reviewMyOutput, submitWithCheck } from './composite.js';
import { confirmDeprecation, proposeEvolution, skipEvolution } from './evolution-tools.js';
import { getRecommendations, guardCheckCode, listGuardRules, queryViolations } from './guard.js';
import { bootstrapKnowledgeTool, createSkillTool, graphImpactAnalysis, loadSkill, queryAuditLog, rebuildIndex, suggestSkills } from './infrastructure.js';
import { addGraphEdge, checkDuplicate } from './knowledge-graph.js';
import { approveCandidate, deprecateRecipe, getFeedbackStats, publishRecipe, qualityScore, recordUsage, rejectCandidate, submitCandidate, updateRecipe, validateCandidate } from './lifecycle.js';
import { getFileSummary, listProjectStructure, readProjectFile, searchProjectCode, semanticSearchCode } from './project-access.js';
import { getProjectStats, getRecipeDetail, getRelatedRecipes, searchCandidates, searchKnowledge, searchRecipes } from './query.js';
import { collectScanRecipe } from './scan-recipe.js';
import { getEnvironmentInfo, runSafeCommand, writeProjectFile } from './system-interaction.js';
export { searchProjectCode, readProjectFile, listProjectStructure, getFileSummary, semanticSearchCode, searchRecipes, searchCandidates, getRecipeDetail, getProjectStats, searchKnowledge, getRelatedRecipes, enrichCandidate, refineBootstrapCandidates, listGuardRules, getRecommendations, guardCheckCode, queryViolations, checkDuplicate, addGraphEdge, submitCandidate, approveCandidate, rejectCandidate, publishRecipe, deprecateRecipe, updateRecipe, recordUsage, qualityScore, validateCandidate, getFeedbackStats, graphImpactAnalysis, rebuildIndex, queryAuditLog, loadSkill, createSkillTool, suggestSkills, bootstrapKnowledgeTool, analyzeCode, knowledgeOverview, submitWithCheck, getToolDetails, planTask, reviewMyOutput, getProjectOverview, getClassHierarchy, getClassInfo, getProtocolInfo, getMethodOverrides, getCategoryMap, getPreviousAnalysis, noteFinding, getPreviousEvidence, queryCodeGraph, queryCallGraph, collectScanRecipe, runSafeCommand, writeProjectFile, getEnvironmentInfo, proposeEvolution, confirmDeprecation, skipEvolution, };
export declare const ALL_TOOLS: ({
name: string;
description: string;
parameters: {
type: string;
properties: {};
};
handler: (_params: Record<string, never>, ctx: import("./_shared.js").ToolHandlerContext) => Promise<string>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
className: {
type: string;
description: string;
};
};
};
handler: (params: {
className?: string;
class_name?: string;
}, ctx: import("./_shared.js").ToolHandlerContext) => Promise<string>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
className: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: {
className: string;
class_name?: string;
}, ctx: import("./_shared.js").ToolHandlerContext) => Promise<string>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
protocolName: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: {
protocolName: string;
protocol_name?: string;
}, ctx: import("./_shared.js").ToolHandlerContext) => Promise<string>;
} | {
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: import("./_shared.js").ToolHandlerContext) => Promise<string>;
} | {
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: import("./_shared.js").ToolHandlerContext) => Promise<string>;
} | {
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: import("./_shared.js").ToolHandlerContext) => Promise<string>;
} | {
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: import("./_shared.js").ToolHandlerContext) => Promise<string>;
} | {
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: import("./_shared.js").ToolHandlerContext) => Promise<string>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
code: {
type: string;
description: string;
};
language: {
type: string;
description: string;
};
filePath: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: import("./composite.js").AnalyzeCodeParams, ctx: import("./_shared.js").ToolHandlerContext) => Promise<Record<string, unknown>>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
includeTopRecipes: {
type: string;
description: string;
};
limit: {
type: string;
description: string;
};
};
};
handler: (params: import("./composite.js").KnowledgeOverviewParams, ctx: import("./_shared.js").ToolHandlerContext) => Promise<Record<string, unknown>>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
content: {
type: string;
description: string;
};
title: {
type: string;
description: string;
};
description: {
type: string;
description: string;
};
trigger: {
type: string;
description: string;
};
kind: {
type: string;
enum: string[];
};
topicHint: {
type: string;
enum: string[];
};
whenClause: {
type: string;
description: string;
};
doClause: {
type: string;
description: string;
};
dontClause: {
type: string;
description: string;
};
coreCode: {
type: string;
description: string;
};
tags: {
type: string;
items: {
type: string;
};
};
reasoning: {
type: string;
description: string;
};
headers: {
type: string;
items: {
type: string;
};
description: string;
};
usageGuide: {
type: string;
description: string;
};
scope: {
type: string;
enum: string[];
description: string;
};
complexity: {
type: string;
enum: string[];
description: string;
};
sourceFile: {
type: string;
description: string;
};
threshold: {
type: string;
description: string;
};
supersedes: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: import("./composite.js").SubmitWithCheckParams, ctx: import("./_shared.js").ToolHandlerContext) => Promise<{
submitted: boolean;
status: string;
reason: string;
errors: string[];
warnings: string[];
_meta: {
confidence: string;
hint: string;
};
error?: undefined;
similar?: undefined;
highestSimilarity?: undefined;
} | {
submitted: boolean;
reason: string;
error: string;
status?: undefined;
errors?: undefined;
warnings?: undefined;
_meta?: undefined;
similar?: undefined;
highestSimilarity?: undefined;
} | {
submitted: boolean;
reason: string;
similar: {
file: string;
title: string;
similarity: number;
}[];
highestSimilarity: number;
_meta: {
confidence: string;
hint: string;
};
status?: undefined;
errors?: undefined;
warnings?: undefined;
error?: undefined;
} | {
_meta: {
confidence: string;
hint: string;
};
_supersedeProposal?: {
proposalId: string;
} | undefined;
submitted: boolean;
entry: unknown;
similar: {
file: string;
title: string;
similarity: number;
}[];
status?: undefined;
reason?: undefined;
errors?: undefined;
warnings?: undefined;
error?: undefined;
highestSimilarity?: undefined;
}>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
toolName: {
type: string;
description: string;
};
};
required: string[];
};
handler: ({ toolName }: {
toolName: string;
}, context: import("./_shared.js").ToolHandlerContext) => Promise<{
error: string;
availableTools?: undefined;
name?: undefined;
description?: undefined;
parameters?: undefined;
} | {
error: string;
availableTools: any;
name?: undefined;
description?: undefined;
parameters?: undefined;
} | {
name: any;
description: any;
parameters: any;
error?: undefined;
availableTools?: undefined;
}>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
steps: {
type: string;
description: string;
items: {
type: string;
properties: {
id: {
type: string;
description: string;
};
action: {
type: string;
description: string;
};
tool: {
type: string;
description: string;
};
depends_on: {
type: string;
items: {
type: string;
};
description: string;
};
};
required: string[];
};
};
strategy: {
type: string;
description: string;
};
estimated_iterations: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: import("./composite.js").PlanTaskParams, context: import("./_shared.js").ToolHandlerContext) => Promise<{
status: string;
stepCount: number;
strategy: string;
message: string;
}>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
check_rules: {
type: string;
description: string;
items: {
type: string;
};
};
};
};
handler: (params: import("./composite.js").ReviewMyOutputParams, context: import("./_shared.js").ToolHandlerContext) => Promise<{
status: string;
message: string;
checkedCount?: undefined;
passedCount?: undefined;
failedCount?: undefined;
details?: undefined;
} | {
status: string;
checkedCount: number;
message: string;
passedCount?: undefined;
failedCount?: undefined;
details?: undefined;
} | {
status: string;
checkedCount: number;
passedCount: number;
failedCount: number;
details: {
title: string;
passed: boolean;
issueCount: number;
}[];
message: string;
}>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
recipeId: {
type: string;
description: string;
};
type: {
type: string;
enum: string[];
description: string;
};
description: {
type: string;
description: string;
};
evidence: {
type: string;
description: string;
properties: {
sourceStatus: {
type: string;
enum: string[];
description: string;
};
currentCode: {
type: string;
description: string;
};
newLocation: {
type: string;
description: string;
};
suggestedChanges: {
type: string;
description: string;
};
};
required: string[];
};
confidence: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: import("./evolution-tools.js").ProposeEvolutionParams, ctx: import("./_shared.js").ToolHandlerContext) => Promise<{
status: "error";
message: string;
recipeId: string;
proposalId?: undefined;
type?: undefined;
expiresAt?: undefined;
} | {
status: "proposed";
proposalId: string;
recipeId: string;
type: "enhance" | "correction";
expiresAt: number;
message?: undefined;
}>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
language: {
type: string;
description: string;
};
includeBuiltIn: {
type: string;
description: string;
};
limit: {
type: string;
description: string;
};
};
};
handler: (params: import("./guard.js").ListGuardRulesParams, ctx: import("./_shared.js").ToolHandlerContext) => Promise<{
total: number;
rules: import("./guard.js").GuardRule[];
}>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
limit: {
type: string;
description: string;
};
};
};
handler: (params: import("./guard.js").GetRecommendationsParams, ctx: import("./_shared.js").ToolHandlerContext) => Promise<any>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
code: {
type: string;
description: string;
};
language: {
type: string;
description: string;
};
scope: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: import("./guard.js").GuardCheckCodeParams, ctx: import("./_shared.js").ToolHandlerContext) => Promise<{
violationCount: any;
violations: any;
error?: undefined;
} | {
error: string;
violationCount?: undefined;
violations?: undefined;
}>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
file: {
type: string;
description: string;
};
limit: {
type: string;
description: string;
};
statsOnly: {
type: string;
description: string;
};
};
};
handler: (params: import("./guard.js").QueryViolationsParams, ctx: import("./_shared.js").ToolHandlerContext) => Promise<any>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
recipeId: {
type: string;
description: string;
};
maxDepth: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: {
recipeId: string;
maxDepth?: number;
}, ctx: import("./_shared.js").ToolHandlerContext) => Promise<{
recipeId: string;
impactedCount: any;
impacted: any;
}>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
force: {
type: string;
description: string;
};
dryRun: {
type: string;
description: string;
};
};
};
handler: (params: {
force?: boolean;
dryRun?: boolean;
}, ctx: import("./_shared.js").ToolHandlerContext) => Promise<any>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
action: {
type: string;
description: string;
};
actor: {
type: string;
description: string;
};
limit: {
type: string;
description: string;
};
};
};
handler: (params: {
action?: string;
actor?: string;
limit?: number;
}, ctx: import("./_shared.js").ToolHandlerContext) => Promise<any>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
skillName: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: {
skillName: string;
}) => Promise<{
skillName: string;
source: string;
content: string;
error?: undefined;
availableSkills?: undefined;
} | {
error: string;
availableSkills: unknown[];
skillName?: undefined;
source?: undefined;
content?: undefined;
}>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
name: {
type: string;
description: string;
};
description: {
type: string;
description: string;
};
content: {
type: string;
description: string;
};
overwrite: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: {
name: string;
description: string;
content: string;
overwrite?: boolean;
}, ctx: import("./_shared.js").ToolHandlerContext) => Promise<any>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {};
required: never[];
};
handler: (_params: Record<string, never>, ctx: import("./_shared.js").ToolHandlerContext) => Promise<{
suggestions: import("../../service/skills/SkillAdvisor.js").SkillSuggestion[];
existingProjectSkills: unknown[];
analysisContext: Record<string, unknown>;
hint: string;
}>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
maxFiles: {
type: string;
description: string;
};
skipGuard: {
type: string;
description: string;
};
contentMaxLines: {
type: string;
description: string;
};
loadSkills: {
type: string;
description: string;
};
skipAsyncFill: {
type: string;
description: string;
};
};
};
handler: (params: {
maxFiles?: number;
skipGuard?: boolean;
contentMaxLines?: number;
loadSkills?: boolean;
skipAsyncFill?: boolean;
}, ctx: import("./_shared.js").ToolHandlerContext) => Promise<any>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
candidate: {
type: string;
description: string;
};
candidateId: {
type: string;
description: string;
};
projectRoot: {
type: string;
description: string;
};
threshold: {
type: string;
description: string;
};
};
};
handler: (params: Record<string, unknown>, ctx: import("./_shared.js").ToolHandlerContext) => Promise<{
similar: never[];
message: string;
hasDuplicate?: undefined;
highestSimilarity?: undefined;
_meta?: undefined;
} | {
similar: {
file: string;
title: string;
similarity: number;
}[];
hasDuplicate: boolean;
highestSimilarity: number;
_meta: {
confidence: string;
hint: string;
};
message?: undefined;
}>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
fromId: {
type: string;
description: string;
};
fromType: {
type: string;
description: string;
};
toId: {
type: string;
description: string;
};
toType: {
type: string;
description: string;
};
relation: {
type: string;
description: string;
};
weight: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: Record<string, unknown>, ctx: import("./_shared.js").ToolHandlerContext) => Promise<any>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
content: {
type: string;
description: string;
};
title: {
type: string;
description: string;
};
description: {
type: string;
description: string;
};
tags: {
type: string;
items: {
type: string;
};
description: string;
};
trigger: {
type: string;
description: string;
};
kind: {
type: string;
enum: string[];
description: string;
};
topicHint: {
type: string;
enum: string[];
description: string;
};
whenClause: {
type: string;
description: string;
};
doClause: {
type: string;
description: string;
};
dontClause: {
type: string;
description: string;
};
coreCode: {
type: string;
description: string;
};
reasoning: {
type: string;
description: string;
};
scope: {
type: string;
enum: string[];
description: string;
};
complexity: {
type: string;
enum: string[];
description: string;
};
headers: {
type: string;
items: {
type: string;
};
description: string;
};
knowledgeType: {
type: string;
description: string;
};
usageGuide: {
type: string;
description: string;
};
sourceFile: {
type: string;
description: string;
};
supersedes: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: import("./lifecycle.js").SubmitKnowledgeParams, ctx: import("./_shared.js").ToolHandlerContext) => Promise<Record<string, unknown>>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
candidateId: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: {
candidateId: string;
}, ctx: import("./_shared.js").ToolHandlerContext) => Promise<any>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
candidateId: {
type: string;
description: string;
};
reason: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: {
candidateId: string;
reason: string;
}, ctx: import("./_shared.js").ToolHandlerContext) => Promise<any>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
recipeId: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: {
recipeId: string;
}, ctx: import("./_shared.js").ToolHandlerContext) => Promise<any>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
recipeId: {
type: string;
description: string;
};
reason: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: {
recipeId: string;
reason: string;
}, ctx: import("./_shared.js").ToolHandlerContext) => Promise<any>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
recipeId: {
type: string;
description: string;
};
updates: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: {
recipeId: string;
updates: Record<string, unknown>;
}, ctx: import("./_shared.js").ToolHandlerContext) => Promise<any>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
recipeId: {
type: string;
description: string;
};
type: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: {
recipeId: string;
type?: string;
}, ctx: import("./_shared.js").ToolHandlerContext) => Promise<{
success: boolean;
recipeId: string;
type: string;
}>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
recipeId: {
type: string;
description: string;
};
recipe: {
type: string;
description: string;
};
};
};
handler: (params: {
recipeId?: string;
recipe?: Record<string, unknown>;
}, ctx: import("./_shared.js").ToolHandlerContext) => Promise<any>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
candidate: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: {
candidate: Record<string, unknown>;
}, ctx: import("./_shared.js").ToolHandlerContext) => Promise<any>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
recipeId: {
type: string;
description: string;
};
topN: {
type: string;
description: string;
};
};
};
handler: (params: {
recipeId?: string;
topN?: number;
}, ctx: import("./_shared.js").ToolHandlerContext) => Promise<Record<string, unknown>>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
pattern: {
type: string;
description: string;
};
patterns: {
type: string;
items: {
type: string;
};
description: string;
};
isRegex: {
type: string;
description: string;
};
fileFilter: {
type: string;
description: string;
};
contextLines: {
type: string;
description: string;
};
maxResults: {
type: string;
description: string;
};
};
required: never[];
};
handler: (params: import("./project-access.js").SearchCodeParams, ctx: import("./project-access.js").ToolContext) => Promise<{
hint: string;
matches: import("./project-access.js").SearchMatch[];
total: number;
searchedFiles: number;
skippedThirdParty: number;
} | {
hint?: undefined;
matches: import("./project-access.js").SearchMatch[];
total: number;
searchedFiles: number;
skippedThirdParty: number;
} | {
_deduped?: number | undefined;
hint?: string | undefined;
batchResults: Record<string, import("./project-access.js").SearchCacheEntry>;
patternsSearched: number;
searchedFiles: number;
error?: undefined;
matches?: undefined;
total?: undefined;
} | {
error: string;
matches: never[];
total: number;
} | {
_cached: boolean;
hint: string;
matches?: import("./project-access.js").SearchMatch[] | undefined;
total?: number | undefined;
error?: undefined;
}>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
filePath: {
type: string;
description: string;
};
filePaths: {
type: string;
items: {
type: string;
};
description: string;
};
startLine: {
type: string;
description: string;
};
endLine: {
type: string;
description: string;
};
maxLines: {
type: string;
description: string;
};
};
required: never[];
};
handler: (params: import("./project-access.js").ReadFileParams, ctx: import("./project-access.js").ToolContext) => Promise<{
filePath: string;
totalLines: number;
startLine: number;
endLine: number;
content: string;
language: string;
} | {
_deduped?: number | undefined;
hint?: string | undefined;
batchResults: Record<string, import("./project-access.js").ReadCacheEntry>;
filesRead: number;
error?: undefined;
} | {
error: string;
} | {
_cached: boolean;
hint: string;
content?: string;
totalLines?: number;
language?: string;
error?: string;
}>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
directory: {
type: string;
description: string;
};
depth: {
type: string;
description: string;
};
includeStats: {
type: string;
description: string;
};
};
};
handler: (params: import("./project-access.js").ListStructureParams, ctx: import("./project-access.js").ToolContext) => Promise<{
error: string;
directory?: undefined;
tree?: undefined;
stats?: undefined;
} | {
directory: string;
tree: string;
stats: {
totalFiles: number;
totalDirs: number;
byLanguage: Record<string, number>;
totalLines: number;
} | undefined;
error?: undefined;
}>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
filePath: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: import("./project-access.js").FileSummaryParams, ctx: import("./project-access.js").ToolContext) => Promise<import("./project-access.js").FileSummaryResult | {
error: string;
}>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
query: {
type: string;
description: string;
};
topK: {
type: string;
description: string;
};
category: {
type: string;
description: string;
};
language: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: import("./project-access.js").SemanticSearchParams, ctx: import("./project-access.js").ToolContext) => Promise<{
error: string;
fallbackTool?: undefined;
mode?: undefined;
query?: undefined;
message?: undefined;
results?: undefined;
degraded?: undefined;
totalResults?: undefined;
} | {
error: string;
fallbackTool: string;
mode?: undefined;
query?: undefined;
message?: undefined;
results?: undefined;
degraded?: undefined;
totalResults?: undefined;
} | {
mode: string;
query: string;
message: string;
results: {
id: string;
content: string;
score: number;
metadata: Record<string, unknown>;
}[];
error?: undefined;
fallbackTool?: undefined;
degraded?: undefined;
totalResults?: undefined;
} | {
mode: string;
query: string;
results: {
id: string;
content: string;
score: number;
metadata: Record<string, unknown>;
}[];
error?: undefined;
fallbackTool?: undefined;
message?: undefined;
degraded?: undefined;
totalResults?: undefined;
} | {
mode: string;
query: string;
degraded: boolean;
totalResults: number;
results: {
id: string;
title: string;
content: string;
score: number;
knowledgeType: string;
category: string;
language: string;
}[];
error?: undefined;
fallbackTool?: undefined;
message?: undefined;
}>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
keyword: {
type: string;
description: string;
};
category: {
type: string;
description: string;
};
language: {
type: string;
description: string;
};
knowledgeType: {
type: string;
description: string;
};
limit: {
type: string;
description: string;
};
};
};
handler: (params: import("./query.js").SearchRecipesParams, ctx: import("./_shared.js").ToolHandlerContext) => Promise<any>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
keyword: {
type: string;
description: string;
};
status: {
type: string;
description: string;
};
language: {
type: string;
description: string;
};
category: {
type: string;
description: string;
};
limit: {
type: string;
description: string;
};
};
};
handler: (params: import("./query.js").SearchCandidatesParams, ctx: import("./_shared.js").ToolHandlerContext) => Promise<any>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {};
};
handler: (_params: Record<string, never>, ctx: import("./_shared.js").ToolHandlerContext) => Promise<{
knowledge: any;
knowledgeGraph: Record<string, unknown> | null;
}>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
query: {
type: string;
description: string;
};
topK: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: import("./query.js").SearchKnowledgeParams, ctx: import("./_shared.js").ToolHandlerContext) => Promise<{
source: string;
results: any;
_meta: {
confidence: string;
hint: string | null;
};
message?: undefined;
} | {
source: string;
results: never[];
message: string;
_meta: {
confidence: string;
hint: string;
};
}>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
recipeId: {
type: string;
description: string;
};
relation: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: {
recipeId: string;
relation?: string;
}, ctx: import("./_shared.js").ToolHandlerContext) => Promise<any>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
title: {
type: string;
description: string;
};
language: {
type: string;
description: string;
};
description: {
type: string;
description: string;
};
tags: {
type: string;
items: {
type: string;
};
description: string;
};
content: {
type: string;
description: string;
properties: {
pattern: {
type: string;
description: string;
};
markdown: {
type: string;
description: string;
};
rationale: {
type: string;
description: string;
};
};
required: string[];
};
kind: {
type: string;
enum: string[];
description: string;
};
category: {
type: string;
description: string;
};
trigger: {
type: string;
description: string;
};
doClause: {
type: string;
description: string;
};
dontClause: {
type: string;
description: string;
};
whenClause: {
type: string;
description: string;
};
coreCode: {
type: string;
description: string;
};
headers: {
type: string;
items: {
type: string;
};
description: string;
};
usageGuide: {
type: string;
description: string;
};
knowledgeType: {
type: string;
description: string;
};
reasoning: {
type: string;
description: string;
properties: {
whyStandard: {
type: string;
description: string;
};
sources: {
type: string;
items: {
type: string;
};
description: string;
};
confidence: {
type: string;
description: string;
};
};
required: string[];
};
complexity: {
type: string;
enum: string[];
};
scope: {
type: string;
enum: string[];
};
};
required: string[];
};
handler: (params: Record<string, unknown>, _ctx: unknown) => Promise<{
status: string;
error: string;
hint: string;
title?: undefined;
recipe?: undefined;
} | {
status: string;
title: string;
recipe: {
title: string;
language: string;
description: string;
tags: string[];
content: {
pattern: string;
markdown: string;
rationale: string;
};
kind: string | undefined;
category: string;
trigger: string | undefined;
doClause: string;
dontClause: string;
whenClause: string;
coreCode: string;
headers: string[];
usageGuide: string;
knowledgeType: string;
reasoning: {
whyStandard: string;
sources: string[];
confidence: number;
};
complexity: string;
scope: string;
};
error?: undefined;
hint?: undefined;
}>;
} | {
name: string;
description: string;
parameters: {
type: string;
properties: {
command: {
type: string;
description: string;
};
cwd: {
type: string;
description: string;
};
timeout: {
type: string;
description: string;
};
};
required: string[];
};
handler: (params: import("./system-interaction.js").RunSafeCommandParams, ctx: import("./system-interaction.js").SystemToolContext) => Promise<{
error: string;
command?: undefined;
stdout?: undefined;
stderr?: undefined;
exitCode?: undefined;
cwd?: undefined;
} | {
error: string;
command: string;
stdout: string;
stderr: string;
exitCode?: undefined;
cwd?: undefined;
} | {
exitCode: string | number;
stdout: string;
stderr: string;
command: string;
cwd: any;
error?: undefined;
}>;
} | {