Add checkpoint types and stop signal for agent suspension

Introduce Checkpoint, CheckpointStore, SuspendedError, AgentRegistry,
and CompletedCall types. Add cooperative stop signal via context.
Export CompletedCall (was unexported completedCall) so checkpoints
can reference completed tool results. Add JSON tags to ToolResult
and ApprovalResult for checkpoint serialization.

Signed-off-by: Aurélien Sibiril <81782+aureliensibiril@users.noreply.github.com>
This commit is contained in:
Aurélien Sibiril
2026-04-10 18:52:57 +02:00
parent 19a2610056
commit 51df618c93
6 changed files with 180 additions and 11 deletions

View File

@@ -25,8 +25,8 @@ import (
type (
ToolResult struct {
Content string
IsError bool
Content string `json:"content"`
IsError bool `json:"is_error"`
}
// ToolDescriptor describes a tool's name and LLM definition.