feat(agent): maxSteps configurable, défaut 8->24 (tâches multi-outils) (v0.37.0)

Construire un workflow n8n (flux SDK) dépasse 8 étapes. maxAgentSteps via
CHLOVA_MAX_AGENT_STEPS, passé config -> ChatService -> runAgentTurn. 83 tests
verts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016w5jRe87MGdd6AMvXQcHNi
This commit is contained in:
Kantin-Petit
2026-06-24 00:11:45 +02:00
parent cb82b3165b
commit a29c9dbdf0
6 changed files with 31 additions and 3 deletions
+3
View File
@@ -20,6 +20,8 @@ export interface ChatServiceDeps {
systemPrompt: string;
logger: Logger;
store?: ConversationStore;
/** Plafond d'étapes par tour (multi-outils). Défaut runAgentTurn sinon. */
maxSteps?: number;
}
export interface ChatResult {
@@ -75,6 +77,7 @@ export class ChatService {
actor,
guard: this.deps.guard,
logger: this.deps.logger,
...(this.deps.maxSteps ? { maxSteps: this.deps.maxSteps } : {}),
});
this.deps.logger.info({ actor, steps }, "tour d'agent terminé");
return reply;