Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsSafe ¶
IsSafe checks if a command is safe to execute against the blocklist. Returns (safe, reason).
func NormalizeName ¶
func ToolDefinitions ¶
ToolDefinitions returns the tool schemas to send in chat completion requests.
func TruncateOutput ¶
TruncateOutput truncates output to maxBytes, appending a truncation notice.
Types ¶
type ApprovalResult ¶
type ApprovalResult int
const ( Approved ApprovalResult = iota Denied Edited )
func RequestApproval ¶
func RequestApproval(toolName string, rawArgs string) (ApprovalResult, string, error)
RequestApproval displays a tool call approval card and asks the user to approve, deny, or edit. Returns the result and potentially edited arguments.
type ToolResult ¶
func Execute ¶
func Execute(name string, rawArgs string, timeout time.Duration) ToolResult
Execute runs a tool by name with the given arguments JSON and timeout. Tool names are normalized to strip server-appended suffixes (e.g., "_ct0").
func (ToolResult) String ¶
func (r ToolResult) String() string