refactor(agent): tighten harness environment and resources

This commit is contained in:
Mario Zechner
2026-05-06 19:41:17 +02:00
parent e1ca501da8
commit 617d8b317d
21 changed files with 1305 additions and 389 deletions

View File

@@ -472,8 +472,9 @@ export class Agent {
errorMessage: error instanceof Error ? error.message : String(error),
timestamp: Date.now(),
} satisfies AgentMessage;
this._state.messages.push(failureMessage);
this._state.errorMessage = failureMessage.errorMessage;
await this.processEvents({ type: "message_start", message: failureMessage });
await this.processEvents({ type: "message_end", message: failureMessage });
await this.processEvents({ type: "turn_end", message: failureMessage, toolResults: [] });
await this.processEvents({ type: "agent_end", messages: [failureMessage] });
}