This commit is contained in:
2025-12-15 15:11:22 +00:00
parent 8662b73adb
commit 19ba58ca40
3 changed files with 231 additions and 25 deletions

View File

@@ -30,6 +30,10 @@ export interface IDualAgentOptions extends plugins.smartai.ISmartAiOptions {
maxResultChars?: number;
/** Maximum history messages to pass to API (default: 20). Set to 0 for unlimited. */
maxHistoryMessages?: number;
/** Optional callback for live progress updates during execution */
onProgress?: (event: IProgressEvent) => void;
/** Prefix for log messages (e.g., "[README]", "[Commit]"). Default: empty */
logPrefix?: string;
}
// ================================
@@ -201,6 +205,58 @@ export interface IDualAgentRunResult {
error?: string;
}
// ================================
// Progress Event Interfaces
// ================================
/**
* Progress event types for live feedback during agent execution
*/
export type TProgressEventType =
| 'task_started'
| 'iteration_started'
| 'tool_proposed'
| 'guardian_evaluating'
| 'tool_approved'
| 'tool_rejected'
| 'tool_executing'
| 'tool_completed'
| 'task_completed'
| 'clarification_needed'
| 'max_iterations'
| 'max_rejections';
/**
* Log level for progress events
*/
export type TLogLevel = 'info' | 'warn' | 'error' | 'success';
/**
* Progress event for live feedback during agent execution
*/
export interface IProgressEvent {
/** Type of progress event */
type: TProgressEventType;
/** Current iteration number */
iteration?: number;
/** Maximum iterations configured */
maxIterations?: number;
/** Name of the tool being used */
toolName?: string;
/** Action being performed */
action?: string;
/** Reason for rejection or other explanation */
reason?: string;
/** Human-readable message about the event */
message?: string;
/** Timestamp of the event */
timestamp: Date;
/** Log level for this event (info, warn, error, success) */
logLevel: TLogLevel;
/** Pre-formatted log message ready for output */
logMessage: string;
}
// ================================
// Utility Types
// ================================