feat(streaming): add streaming support to DriverAgent and DualAgentOrchestrator

- Add onToken callback option to IDualAgentOptions interface
- Add onToken property and setOnToken method to DriverAgent
- Wire up streaming in startTask and continueWithMessage methods
- Pass source identifier ('driver'/'guardian') to onToken callback
This commit is contained in:
2026-01-20 00:38:36 +00:00
parent fe0de36b1a
commit 37d4069806
5 changed files with 64 additions and 17 deletions

View File

@@ -34,6 +34,8 @@ export interface IDualAgentOptions extends plugins.smartai.ISmartAiOptions {
onProgress?: (event: IProgressEvent) => void;
/** Prefix for log messages (e.g., "[README]", "[Commit]"). Default: empty */
logPrefix?: string;
/** Callback fired for each token during LLM generation (streaming mode) */
onToken?: (token: string, source: 'driver' | 'guardian') => void;
}
// ================================