Documentation
¶
Index ¶
- func BuildPreviewArgs(args map[string]any) map[string]any
- func Enabled(args map[string]any) bool
- func MinimalResult(toolName string, args map[string]any) map[string]any
- func NotDestructiveError(toolName string) error
- func NotSupported(tool string) error
- func Preview(tool string, args map[string]any) map[string]any
- func PreviewToolFor(toolName string) (string, bool)
- func WrapResult(result any, toolName string) map[string]any
- type Action
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildPreviewArgs ¶ added in v0.6.0
BuildPreviewArgs extracts all keys ending in "_id" except "workspace_id" from args and returns a new map containing only those fields.
func MinimalResult ¶
MinimalResult produces a dry-run envelope when no preview data is available.
func NotDestructiveError ¶ added in v0.6.0
NotDestructiveError returns an error for non-destructive tools that received a dry_run flag.
func NotSupported ¶ added in v0.6.0
func PreviewToolFor ¶ added in v0.6.0
PreviewToolFor returns the GET counterpart for a destructive tool.
Types ¶
type Action ¶ added in v0.6.0
type Action int
func CheckDryRun ¶ added in v0.6.0
CheckDryRun inspects args for a dry_run flag and determines the interception strategy for destructive tools. For non-destructive tools, it leaves the flag in args and returns (0, false) so the handler's own dry-run logic can run. For destructive tools, it consumes the flag and returns the appropriate interception action.