refactor(core)!: rework agent run lifecycle and status semantics
BREAKING CHANGE: stop() is now async and resolves after the run fully settles; status decouples from task outcome (new 'stopped' state, LLM self-reported failure now ends as 'completed'). Lifecycle hooks re-throw instead of being folded into the result; agent errors go to history. Adds agent.lastResult.
This commit is contained in:
@@ -14,6 +14,7 @@ export function StatusDot({ status }: { status: AgentStatus }) {
|
||||
running: 'bg-blue-500',
|
||||
completed: 'bg-green-500',
|
||||
error: 'bg-destructive',
|
||||
stopped: 'bg-muted-foreground',
|
||||
}[status]
|
||||
|
||||
const label = {
|
||||
@@ -21,6 +22,7 @@ export function StatusDot({ status }: { status: AgentStatus }) {
|
||||
running: 'Running',
|
||||
completed: 'Done',
|
||||
error: 'Error',
|
||||
stopped: 'Stopped',
|
||||
}[status]
|
||||
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user