sourcewizard
Version:
SourceWizard - AI-powered setup wizard for dev tools and libraries with MCP integration
48 lines (47 loc) • 1.23 kB
TypeScript
import { ProjectContext } from "./repository-detector.js";
export interface NewAgentOptions {
serverUrl: string;
apiKey?: string;
jwt?: string;
cwd: string;
projectContext: ProjectContext;
onStepFinish?: (stepData: any) => void;
}
export interface NewAgentResult {
text: string;
toolCalls?: any[];
toolResults?: any[];
finishReason?: string;
usage?: any;
structuredData?: any;
packages?: any[];
query?: string;
totalAvailable?: number;
stage?: string;
description?: string;
error?: string;
}
export declare class NewAgent {
private projectContext;
private cwd;
private serverUrl;
private apiKey?;
private jwt?;
private onStepFinish?;
constructor(options: NewAgentOptions);
private getAuthHeaders;
searchPackages(query: string): Promise<NewAgentResult>;
installPackage(packageName: string): Promise<NewAgentResult>;
private runConversation;
private executeTool;
private readFile;
private writeFile;
private createFile;
private listDirectory;
private appendToFile;
private deleteFile;
private editFile;
private getBulkTargetData;
private typecheck;
private addPackage;
}