mirror of
https://github.com/andy-stack/vaultkeeper-ai.git
synced 2026-07-22 06:42:03 +00:00
Replace the single Replan tool with three targeted alternatives: ReviseStep, RevisePlan, and SkipStep. This gives the orchestration agent more precise control over plan recovery — revising only the current step, replacing all remaining steps, or skipping a step entirely — rather than triggering a full replan each time. Also give the orchestration agent read access to vault files so it can resolve execution failures without routing back to the planning agent, and update the execution agent prompt to stop it from attempting self-recovery (gap resolution is now the orchestrator's responsibility).
50 lines
1.6 KiB
TypeScript
50 lines
1.6 KiB
TypeScript
import type { ExecutionStep } from "./ExecutionStep";
|
|
|
|
type OrchestrationResultInit = {
|
|
continue?: boolean;
|
|
continueContext?: string;
|
|
abort?: boolean;
|
|
abortContext?: string;
|
|
complete?: boolean;
|
|
skipStep?: boolean;
|
|
skipReason?: string;
|
|
reviseStep?: boolean;
|
|
revisedDescription?: string;
|
|
revisedInstruction?: string;
|
|
revisedContext?: string;
|
|
revisePlan?: boolean;
|
|
revisedSteps?: ExecutionStep[];
|
|
};
|
|
|
|
export class OrchestrationResult {
|
|
|
|
public continue: boolean;
|
|
public continueContext: string;
|
|
public abort: boolean;
|
|
public abortContext: string;
|
|
public complete: boolean;
|
|
public skipStep: boolean;
|
|
public skipReason: string;
|
|
public reviseStep: boolean;
|
|
public revisedDescription: string | undefined;
|
|
public revisedInstruction: string | undefined;
|
|
public revisedContext: string | undefined;
|
|
public revisePlan: boolean;
|
|
public revisedSteps: ExecutionStep[];
|
|
|
|
constructor(init: OrchestrationResultInit) {
|
|
this.continue = init.continue ?? false;
|
|
this.continueContext = init.continueContext ?? "";
|
|
this.abort = init.abort ?? false;
|
|
this.abortContext = init.abortContext ?? "";
|
|
this.complete = init.complete ?? false;
|
|
this.skipStep = init.skipStep ?? false;
|
|
this.skipReason = init.skipReason ?? "";
|
|
this.reviseStep = init.reviseStep ?? false;
|
|
this.revisedInstruction = init.revisedInstruction;
|
|
this.revisedContext = init.revisedContext;
|
|
this.revisePlan = init.revisePlan ?? false;
|
|
this.revisedSteps = init.revisedSteps ?? [];
|
|
}
|
|
|
|
}
|