andy-stack_vaultkeeper-ai/AIPrompts/IPrompt.ts
Andrew Beal 32c478249b housekeeping: remove unused execution agent code and clean up orchestration flow
- Remove unused agentExecutionDefinitions and gatedDefinitions methods
- Delete obsolete CreatePlan.ts (replaced by ExecuteWorkflow.ts)
- Rename PlanningAgentSystemPrompt to PlanningPrompt for consistency
- Fix orchestration agent promise returns and replan flag handling
- Make saveConversation calls async throughout AIController
- Simplify vault cache delete event handling
- Change debug logging from console.log to console.debug
- Fix function name references in execution and main agents
2026-01-29 12:26:41 +00:00

48 lines
No EOL
1.5 KiB
TypeScript

import { Resolve } from "Services/DependencyService";
import { Services } from "Services/Services";
import { SystemInstruction } from "./SystemPrompt";
import type { FileSystemService } from "Services/FileSystemService";
import type { SettingsService } from "Services/SettingsService";
import { PlanningPrompt } from "AIPrompts/PlanningPrompt";
import { ExecutionPrompt } from "./ExecutionPrompt";
import { OrchestrationPrompt } from "./OrchestrationPrompt";
export interface IPrompt {
systemInstruction(): string;
orchestrationInstruction(): string;
planningInstruction(): string;
executionInstruction(): string;
userInstruction(): Promise<string>;
}
export class AIPrompt implements IPrompt {
private readonly settingsService: SettingsService;
private readonly fileSystemService: FileSystemService;
public constructor() {
this.settingsService = Resolve<SettingsService>(Services.SettingsService);
this.fileSystemService = Resolve<FileSystemService>(Services.FileSystemService);
}
public systemInstruction(): string {
return SystemInstruction;
}
public orchestrationInstruction(): string {
return OrchestrationPrompt;
}
public planningInstruction(): string {
return PlanningPrompt;
}
public executionInstruction(): string {
return ExecutionPrompt;
}
public async userInstruction(): Promise<string> {
const result = await this.fileSystemService.readFile(this.settingsService.settings.userInstruction, true);
return result instanceof Error ? "" : result;
}
}