Documentation
¶
Index ¶
- Constants
- func ToolActorID(ctx context.Context) string
- func ToolAgentID(ctx context.Context) string
- func ToolApprovalBypass(ctx context.Context) bool
- func ToolApprovalContinuation(ctx context.Context) bool
- func ToolCallID(ctx context.Context) string
- func ToolChannel(ctx context.Context) string
- func ToolChatID(ctx context.Context) string
- func ToolExecutionID(ctx context.Context) string
- func ToolInboundContext(ctx context.Context) bus.InboundContext
- func ToolMessageID(ctx context.Context) string
- func ToolOriginID(ctx context.Context) string
- func ToolOriginType(ctx context.Context) string
- func ToolRecoverableOutbound(ctx context.Context) bool
- func ToolReplyToMessageID(ctx context.Context) string
- func ToolRouteSessionKey(ctx context.Context) string
- func ToolSenderID(ctx context.Context) string
- func ToolSessionKey(ctx context.Context) string
- func ToolSessionScope(ctx context.Context) *session.SessionScope
- func ToolSourceRef(ctx context.Context) string
- func ToolToSchema(tool Tool) map[string]any
- func ToolTopicID(ctx context.Context) string
- func ToolWorkspace(ctx context.Context) string
- func WithToolApprovalBypass(ctx context.Context, bypass bool) context.Context
- func WithToolApprovalContinuation(ctx context.Context, resumed bool) context.Context
- func WithToolCallID(ctx context.Context, toolCallID string) context.Context
- func WithToolContext(ctx context.Context, channel, chatID string) context.Context
- func WithToolExecutionIdentity(ctx context.Context, workspace, executionID string) context.Context
- func WithToolInboundContext(ctx context.Context, channel, chatID, messageID, replyToMessageID string) context.Context
- func WithToolInboundMetadata(ctx context.Context, inbound bus.InboundContext) context.Context
- func WithToolMessageContext(ctx context.Context, messageID, replyToMessageID string) context.Context
- func WithToolRecoverableOutbound(ctx context.Context, recoverable bool) context.Context
- func WithToolRouteSessionKey(ctx context.Context, routeSessionKey string) context.Context
- func WithToolSessionContext(ctx context.Context, agentID, sessionKey string, scope *session.SessionScope) context.Context
- func WithToolTopicID(ctx context.Context, topicID string) context.Context
- type AsyncCallback
- type AsyncDeliveryMode
- type AsyncExecutor
- type CompletionMedia
- type CompletionResult
- type DeliverableItem
- type DeliverableReport
- type DeliverableResult
- type DeliveryIntent
- type ExecRequest
- type ExecResponse
- type FunctionCall
- type LLMProvider
- type LLMResponse
- type LoopSemanticsProvider
- type Message
- type OutboundDelivery
- type PromptMetadata
- type PromptMetadataProvider
- type ReportClaim
- type ReportFieldDelta
- type SessionInfo
- type Tool
- type ToolCall
- type ToolDefinition
- type ToolFunctionDefinition
- type ToolResult
- func AsyncResult(forLLM string) *ToolResult
- func DiffResult(path string, before, after []byte) *ToolResult
- func ErrorResult(message string) *ToolResult
- func MediaResult(forLLM string, mediaRefs []string) *ToolResult
- func NewToolResult(forLLM string) *ToolResult
- func SilentResult(forLLM string) *ToolResult
- func UserResult(content string) *ToolResult
- func (tr *ToolResult) ContentForLLM() string
- func (tr *ToolResult) MarshalJSON() ([]byte, error)
- func (tr *ToolResult) WithAsyncDelivery(mode AsyncDeliveryMode) *ToolResult
- func (tr *ToolResult) WithAsyncTaskID(taskID string) *ToolResult
- func (tr *ToolResult) WithCompletion(completion *CompletionResult) *ToolResult
- func (tr *ToolResult) WithDeliverable(deliverable *DeliverableResult) *ToolResult
- func (tr *ToolResult) WithDeliveryIntent(intent DeliveryIntent) *ToolResult
- func (tr *ToolResult) WithError(err error) *ToolResult
- func (tr *ToolResult) WithFileWriteAudit(path, action, toolName string) *ToolResult
- func (tr *ToolResult) WithImmediateDelivery() *ToolResult
- func (tr *ToolResult) WithOutboundCommit(commit func(context.Context) error) *ToolResult
- func (tr *ToolResult) WithOutboundDelivery(outbound OutboundDelivery) *ToolResult
- func (tr *ToolResult) WithResponseHandled() *ToolResult
- func (tr *ToolResult) WithWriteAudit(entry WriteAuditEntry) *ToolResult
- type UsageInfo
- type WriteAuditEntry
Constants ¶
const ( ToolPromptLayerCapability = "capability" ToolPromptSlotTooling = "tooling" ToolPromptSlotMCP = "mcp" ToolPromptSourceRegistry = "tool_registry:native" ToolPromptSourceDiscovery = "tool_registry:discovery" )
const ( HandledToolLLMNote = "" /* 185-byte string literal not displayed */ ArtifactPathsLLMNote = "" /* 132-byte string literal not displayed */ )
Variables ¶
This section is empty.
Functions ¶
func ToolActorID ¶
ToolActorID extracts the effective actor ID from ctx. It usually equals sender ID.
func ToolAgentID ¶
ToolAgentID extracts the active turn's agent ID from ctx, or "" if unset.
func ToolApprovalBypass ¶
ToolApprovalBypass reports whether the configured policy bypasses approval.
func ToolApprovalContinuation ¶
ToolApprovalContinuation reports whether this call resumes human approval.
func ToolCallID ¶
ToolCallID extracts the active provider tool-call identity from ctx.
func ToolChannel ¶
ToolChannel extracts the channel from ctx, or "" if unset.
func ToolChatID ¶
ToolChatID extracts the chatID from ctx, or "" if unset.
func ToolExecutionID ¶
ToolExecutionID extracts the stable logical turn identity from ctx.
func ToolInboundContext ¶
func ToolInboundContext(ctx context.Context) bus.InboundContext
ToolInboundContext extracts the full inbound metadata from ctx, or zero value if unset.
func ToolMessageID ¶
ToolMessageID extracts the current inbound message ID from ctx, or "" if unset.
func ToolOriginID ¶
ToolOriginID extracts the optional content origin ID from ctx.
func ToolOriginType ¶
ToolOriginType extracts the optional content origin type from ctx.
func ToolRecoverableOutbound ¶
ToolRecoverableOutbound reports whether durable delivery admission can recover an outbound tool result after process interruption.
func ToolReplyToMessageID ¶
ToolReplyToMessageID extracts the current inbound reply target from ctx, or "" if unset.
func ToolRouteSessionKey ¶
ToolRouteSessionKey extracts the canonical routed conversation key from ctx.
func ToolSenderID ¶
ToolSenderID extracts the transport sender ID from ctx.
func ToolSessionKey ¶
ToolSessionKey extracts the active turn's session key from ctx, or "" if unset.
func ToolSessionScope ¶
func ToolSessionScope(ctx context.Context) *session.SessionScope
ToolSessionScope extracts the active turn's structured session scope from ctx.
func ToolSourceRef ¶
ToolSourceRef extracts the stable inbound source reference from ctx.
func ToolToSchema ¶
func ToolTopicID ¶
ToolTopicID extracts the inbound topic/thread id from ctx, or "" if unset.
func ToolWorkspace ¶
ToolWorkspace extracts the workspace namespace from ctx.
func WithToolApprovalBypass ¶
WithToolApprovalBypass marks execution as authorized by the configured allow-all approval policy. It does not represent a consumed human grant.
func WithToolApprovalContinuation ¶
WithToolApprovalContinuation marks execution resumed from a one-time human approval. Durable tools use it to fail closed when retained authority expired.
func WithToolCallID ¶
WithToolCallID carries the provider-assigned identity of the active tool call. Durable pre-execution state uses it to recover the same call after a human-approval restart.
func WithToolContext ¶
WithToolContext returns a child context carrying channel and chatID.
func WithToolExecutionIdentity ¶
WithToolExecutionIdentity carries the stable logical turn identity and workspace namespace for durable tool operations.
func WithToolInboundContext ¶
func WithToolInboundContext( ctx context.Context, channel, chatID, messageID, replyToMessageID string, ) context.Context
WithToolInboundContext returns a child context carrying channel/chat and inbound IDs.
func WithToolInboundMetadata ¶
WithToolInboundMetadata returns a child context carrying the full normalized inbound identity/source metadata available to tools.
func WithToolMessageContext ¶
func WithToolMessageContext(ctx context.Context, messageID, replyToMessageID string) context.Context
WithToolMessageContext returns a child context carrying inbound message IDs.
func WithToolRecoverableOutbound ¶
WithToolRecoverableOutbound marks a tool execution whose outbound results are owned by a durable, replayable delivery transaction.
func WithToolRouteSessionKey ¶
WithToolRouteSessionKey carries the canonical routed conversation key used for durable session-scoped state. It can differ from ToolSessionKey after a user starts a fresh history session through /new or /reset.
func WithToolSessionContext ¶
func WithToolSessionContext( ctx context.Context, agentID, sessionKey string, scope *session.SessionScope, ) context.Context
WithToolSessionContext returns a child context carrying turn-scoped session metadata.
Types ¶
type AsyncCallback ¶
type AsyncCallback func(ctx context.Context, result *ToolResult)
AsyncCallback is a function type that async tools use to notify completion. When an async tool finishes its work, it calls this callback with the result.
The ctx parameter allows the callback to be canceled if the agent is shutting down. The result parameter contains the tool's execution result.
type AsyncDeliveryMode ¶
type AsyncDeliveryMode string
const ( AsyncDeliveryUserOnly AsyncDeliveryMode = "user_only" AsyncDeliveryParentOnly AsyncDeliveryMode = "parent_only" AsyncDeliveryUserAndParent AsyncDeliveryMode = "user_and_parent" )
type AsyncExecutor ¶
type AsyncExecutor interface {
Tool
// ExecuteAsync runs the tool asynchronously. The callback cb will be
// invoked (possibly from another goroutine) when the async operation
// completes. cb is guaranteed to be non-nil by the caller (registry).
ExecuteAsync(ctx context.Context, args map[string]any, cb AsyncCallback) *ToolResult
}
AsyncExecutor is an optional interface that tools can implement to support asynchronous execution with completion callbacks.
Unlike the old AsyncTool pattern (SetCallback + Execute), AsyncExecutor receives the callback as a parameter of ExecuteAsync. This eliminates the data race where concurrent calls could overwrite each other's callbacks on a shared tool instance.
This is useful for:
- Long-running operations that shouldn't block the agent loop
- Subagent spawns that complete independently
- Background tasks that need to report results later
Example:
func (t *SpawnTool) ExecuteAsync(ctx context.Context, args map[string]any, cb AsyncCallback) *ToolResult {
go func() {
result := t.runSubagent(ctx, args)
if cb != nil { cb(ctx, result) }
}()
return AsyncResult("Subagent spawned, will report back")
}
type CompletionMedia ¶
type CompletionMedia struct {
Ref string `json:"ref"`
Type string `json:"type,omitempty"`
Filename string `json:"filename,omitempty"`
ContentType string `json:"content_type,omitempty"`
}
CompletionMedia describes a media artifact in a child completion handoff. Ref is the stable media:// reference used by the runtime to resolve bytes; the remaining fields are hints for delivery policy and UI mapping.
type CompletionResult ¶
type CompletionResult struct {
Text string `json:"text,omitempty"`
Media []CompletionMedia `json:"media,omitempty"`
}
CompletionResult is the structured handoff payload used when one agent run completes work for another. It intentionally describes data/artifacts only; the caller still owns any user-facing delivery decision.
type DeliverableItem ¶
type DeliverableItem struct {
Ref string `json:"ref"`
Kind string `json:"kind,omitempty"`
Filename string `json:"filename,omitempty"`
ContentType string `json:"content_type,omitempty"`
Delivered bool `json:"delivered,omitempty"`
}
DeliverableItem describes a concrete produced artifact. Ref may be a media:// ref, file path tag, external URL, or other stable runtime reference.
type DeliverableReport ¶
type DeliverableReport struct {
SchemaVersion string `json:"schema_version,omitempty"`
ReportID string `json:"report_id,omitempty"`
ContentHash string `json:"content_hash,omitempty"`
GeneratedAt int64 `json:"generated_at,omitempty"`
Summary string `json:"summary,omitempty"`
Claims []ReportClaim `json:"claims,omitempty"`
FieldDeltas []ReportFieldDelta `json:"field_deltas,omitempty"`
Provenance map[string]string `json:"provenance,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
Extra map[string]any `json:"extra,omitempty"`
}
DeliverableReport is the tool-level versioned report contract for durable outputs. Task registries may store it directly; chat/terminal text should be rendered from this structured report rather than parsed back into state.
type DeliverableResult ¶
type DeliverableResult struct {
Text string `json:"text,omitempty"`
Artifacts []DeliverableItem `json:"artifacts,omitempty"`
Metadata map[string]string `json:"metadata,omitempty"`
Report *DeliverableReport `json:"report,omitempty"`
}
DeliverableResult is the generic output ownership payload for tools and child runs. It represents what was produced, not how it should be worded to the LLM or user.
type DeliveryIntent ¶
type DeliveryIntent string
const ( DeliveryDefault DeliveryIntent = "" DeliveryImmediateContinue DeliveryIntent = "immediate_continue" DeliveryFinalHandled DeliveryIntent = "final_handled" DeliveryFinalWithFollowup DeliveryIntent = "final_with_followup" DeliveryParentOnly DeliveryIntent = "parent_only" DeliverySilent DeliveryIntent = "silent" )
type ExecRequest ¶
type ExecRequest struct {
Action string `json:"action"`
Command string `json:"command,omitempty"`
PTY bool `json:"pty,omitempty"`
Background bool `json:"background,omitempty"`
Timeout int `json:"timeout,omitempty"`
Env map[string]string `json:"env,omitempty"`
Cwd string `json:"cwd,omitempty"`
SessionID string `json:"sessionId,omitempty"`
Data string `json:"data,omitempty"`
}
type ExecResponse ¶
type ExecResponse struct {
SessionID string `json:"sessionId,omitempty"`
SessionScope string `json:"sessionScope,omitempty"`
RestartSafe *bool `json:"restartSafe,omitempty"`
Status string `json:"status,omitempty"`
ExitCode int `json:"exitCode,omitempty"`
Output string `json:"output,omitempty"`
Error string `json:"error,omitempty"`
Sessions []SessionInfo `json:"sessions,omitempty"`
}
type FunctionCall ¶
type LLMProvider ¶
type LLMProvider interface {
Chat(
ctx context.Context,
messages []Message,
tools []ToolDefinition,
model string,
options map[string]any,
) (*LLMResponse, error)
GetDefaultModel() string
}
type LLMResponse ¶
type LoopSemanticsProvider ¶
LoopSemanticsProvider explicitly classifies tool side-effect behavior for loop detection. Tools without this optional capability remain unknown.
type OutboundDelivery ¶
type OutboundDelivery struct {
Channel string `json:"channel,omitempty"`
ChatID string `json:"chat_id,omitempty"`
ReplyToMessageID string `json:"reply_to_message_id,omitempty"`
Text string `json:"text,omitempty"`
Media []bus.MediaPart `json:"media,omitempty"`
Recovery *bus.OutboundRecovery `json:"recovery,omitempty"`
}
type PromptMetadata ¶
type PromptMetadataProvider ¶
type PromptMetadataProvider interface {
PromptMetadata() PromptMetadata
}
type ReportClaim ¶
type ReportFieldDelta ¶
type SessionInfo ¶
type Tool ¶
type Tool interface {
Name() string
Description() string
Parameters() map[string]any
Execute(ctx context.Context, args map[string]any) *ToolResult
}
Tool is the interface that all tools must implement.
type ToolDefinition ¶
type ToolDefinition struct {
Type string `json:"type"`
Function ToolFunctionDefinition `json:"function"`
}
type ToolFunctionDefinition ¶
type ToolResult ¶
type ToolResult struct {
// ForLLM is the content sent to the LLM for context.
// Required for all results.
ForLLM string `json:"for_llm"`
// ForUser is the content sent directly to the user.
// If empty, no user message is sent.
// Silent=true overrides this field.
ForUser string `json:"for_user,omitempty"`
// Silent suppresses sending any message to the user.
// When true, ForUser is ignored even if set.
Silent bool `json:"silent"`
// IsError indicates whether the tool execution failed.
// When true, the result should be treated as an error.
IsError bool `json:"is_error"`
// Async indicates whether the tool is running asynchronously.
// When true, the tool will complete later and notify via callback.
Async bool `json:"async"`
// AsyncDelivery controls how the final async result should be routed when
// the background work completes.
//
// Empty means "use runtime default behavior".
// Supported values:
// - user_only
// - parent_only
// - user_and_parent
AsyncDelivery AsyncDeliveryMode `json:"async_delivery,omitempty"`
// AsyncTaskID links an async result back to a durable task registry record
// when the tool runtime has one, for example "subagent-42".
AsyncTaskID string `json:"async_task_id,omitempty"`
// TaskSuspended tells a durable task owner not to publish completion while
// the child turn is owned by a pending human interaction.
TaskSuspended bool `json:"-"`
// Err is the underlying error (not JSON serialized).
// Used for internal error handling and logging.
Err error `json:"-"`
// Media contains media store refs produced by this tool.
// When non-empty, the agent will publish these as OutboundMediaMessage.
Media []string `json:"media,omitempty"`
// Completion carries a structured child-run result for parent agents.
// It is populated by sub-turns/delegation/spawn handoffs so the parent can
// see both text and media refs without scraping prose.
// Deprecated for new consumers: use Deliverable for produced outputs and
// keep Completion only as a legacy child-run handoff adapter.
Completion *CompletionResult `json:"completion,omitempty"`
// Deliverable describes the actual artifact/result produced by the tool,
// independent from LLM context or user-facing phrasing. Use this for durable
// task state and follow-up ownership; Completion is kept as the legacy
// child-run handoff shape and is mirrored into Deliverable when possible.
Deliverable *DeliverableResult `json:"deliverable,omitempty"`
// Messages holds the ephemeral session history after execution.
// Only populated by SubTurn executions; used by evaluator_optimizer
// to carry stateful worker context across evaluation iterations.
Messages []providers.Message `json:"-"`
// ArtifactTags exposes local artifact paths back to the LLM in a structured
// form, e.g. "[file:/tmp/example.png]". This is used when a tool produced a
// reusable local artifact but did not deliver it to the user yet.
ArtifactTags []string `json:"artifact_tags,omitempty"`
// ResponseHandled indicates that this tool execution already satisfied the
// user's request at the channel/output level, so the agent loop can stop
// without a follow-up assistant response.
ResponseHandled bool `json:"response_handled,omitempty"`
// ImmediateDelivery asks the agent loop to deliver this tool result to the
// user immediately while still continuing the turn. This is the pipeline
// equivalent of the message tool's direct-send behavior for tools that
// produce MediaStore refs or other ToolResult outputs.
ImmediateDelivery bool `json:"immediate_delivery,omitempty"`
// DeliveryIntent is the canonical output ownership policy for this tool
// result. Legacy ResponseHandled/ImmediateDelivery fields remain as
// compatibility projections for older tools and callers.
DeliveryIntent DeliveryIntent `json:"delivery_intent,omitempty"`
// Outbound carries a fully resolved chat output for the runtime delivery
// coordinator. Tools should prefer this over sending directly.
Outbound *OutboundDelivery `json:"outbound,omitempty"`
// CommitOutbound durably records that the prepared outbound attempt is
// being scheduled. It runs only after the tool result is journaled and
// immediately before synchronous delivery. It is never model-visible.
CommitOutbound func(context.Context) error `json:"-"`
// WriteAudit records verified write-side effects performed by this tool.
// Agents should use this as the source of truth for claims like "saved",
// "updated", or "created"; prose in ForLLM/ForUser is only descriptive.
WriteAudit []WriteAuditEntry `json:"write_audit,omitempty"`
// Suspension asks the runtime to durably pause this tool call for human
// input. It is control-plane state, not model-visible tool output. The
// runtime must enrich it with trusted route and origin data before use.
Suspension *interactions.SuspensionRequest `json:"-"`
// SuspensionResolution performs a bounded domain transition when the
// durable interaction is answered, times out, is canceled, or fails. It is
// process-local; authoritative domain state must recover safely after a
// restart without it.
SuspensionResolution func(context.Context, interactions.Outcome) error `json:"-"`
}
ToolResult represents the structured return value from tool execution. It provides clear semantics for different types of results and supports async operations, user-facing messages, and error handling.
func AsyncResult ¶
func AsyncResult(forLLM string) *ToolResult
AsyncResult creates a ToolResult for async operations. The task will run in the background and complete later.
Use this for long-running operations like: - Subagent spawns - Background processing - External API calls with callbacks
Example:
result := AsyncResult("Subagent spawned, will report back")
func DiffResult ¶
func DiffResult(path string, before, after []byte) *ToolResult
DiffResult creates a user-visible tool result containing a unified diff for a successful file edit. The diff is included for both the LLM and the user so the follow-up assistant response can reason about the resulting change set, including EOF newline transitions.
func ErrorResult ¶
func ErrorResult(message string) *ToolResult
ErrorResult creates a ToolResult representing an error. Sets IsError=true and includes the error message.
Example:
result := ErrorResult("Failed to connect to database: connection refused")
func MediaResult ¶
func MediaResult(forLLM string, mediaRefs []string) *ToolResult
MediaResult creates a ToolResult with media refs for the user. The agent will publish these refs as OutboundMediaMessage.
Example:
result := MediaResult("Image generated successfully", []string{"media://abc123"})
func NewToolResult ¶
func NewToolResult(forLLM string) *ToolResult
NewToolResult creates a basic ToolResult with content for the LLM. Use this when you need a simple result with default behavior.
Example:
result := NewToolResult("File updated successfully")
func SilentResult ¶
func SilentResult(forLLM string) *ToolResult
SilentResult creates a ToolResult that is silent (no user message). The content is only sent to the LLM for context.
Use this for operations that should not spam the user, such as: - File reads/writes - Status updates - Background operations
Example:
result := SilentResult("Config file saved")
func UserResult ¶
func UserResult(content string) *ToolResult
UserResult creates a ToolResult with content for both LLM and user. Both ForLLM and ForUser are set to the same content.
Use this when the user needs to see the result directly: - Command execution output - Fetched web content - Query results
Example:
result := UserResult("Total files found: 42")
func (*ToolResult) ContentForLLM ¶
func (tr *ToolResult) ContentForLLM() string
ContentForLLM returns the normalized textual content to append to the conversation after a tool call. Errors fall back to Err when ForLLM is empty.
func (*ToolResult) MarshalJSON ¶
func (tr *ToolResult) MarshalJSON() ([]byte, error)
MarshalJSON implements custom JSON serialization. The Err field is excluded from JSON output via the json:"-" tag.
func (*ToolResult) WithAsyncDelivery ¶
func (tr *ToolResult) WithAsyncDelivery(mode AsyncDeliveryMode) *ToolResult
WithAsyncDelivery sets the async delivery policy for this tool result.
func (*ToolResult) WithAsyncTaskID ¶
func (tr *ToolResult) WithAsyncTaskID(taskID string) *ToolResult
WithAsyncTaskID links this result to a durable async task registry record.
func (*ToolResult) WithCompletion ¶
func (tr *ToolResult) WithCompletion(completion *CompletionResult) *ToolResult
WithCompletion attaches a structured completion payload to this result.
func (*ToolResult) WithDeliverable ¶
func (tr *ToolResult) WithDeliverable(deliverable *DeliverableResult) *ToolResult
WithDeliverable attaches a generic durable output payload to this result.
func (*ToolResult) WithDeliveryIntent ¶
func (tr *ToolResult) WithDeliveryIntent(intent DeliveryIntent) *ToolResult
func (*ToolResult) WithError ¶
func (tr *ToolResult) WithError(err error) *ToolResult
WithError sets the Err field and returns the result for chaining. This preserves the error for logging while keeping it out of JSON.
Example:
result := ErrorResult("Operation failed").WithError(err)
func (*ToolResult) WithFileWriteAudit ¶
func (tr *ToolResult) WithFileWriteAudit(path, action, toolName string) *ToolResult
WithFileWriteAudit records a successful file write/edit side effect.
func (*ToolResult) WithImmediateDelivery ¶
func (tr *ToolResult) WithImmediateDelivery() *ToolResult
WithImmediateDelivery asks the agent loop to publish this result to the user immediately without treating the whole turn as answered.
func (*ToolResult) WithOutboundCommit ¶
func (tr *ToolResult) WithOutboundCommit(commit func(context.Context) error) *ToolResult
func (*ToolResult) WithOutboundDelivery ¶
func (tr *ToolResult) WithOutboundDelivery(outbound OutboundDelivery) *ToolResult
func (*ToolResult) WithResponseHandled ¶
func (tr *ToolResult) WithResponseHandled() *ToolResult
WithResponseHandled marks the tool result as already delivered to the user.
func (*ToolResult) WithWriteAudit ¶
func (tr *ToolResult) WithWriteAudit(entry WriteAuditEntry) *ToolResult
WithWriteAudit appends a verified write-side effect to the result.