Documentation
¶
Index ¶
- Variables
- func InvalidArgs(toolID string, err error) error
- func IsProcessProbeCommand(command string) bool
- type ApprovalMode
- type ApprovalRequest
- type BackgroundJob
- type BashParams
- type BashPermissionsParams
- type BashResponseMetadata
- type Call
- type Category
- type Definition
- type DuplicateToolError
- type EditOperation
- type EditParams
- type EditPermissionsParams
- type EditResponseMetadata
- type Effect
- type Executor
- func CoreCodingExecutors() []Executor
- func CoreReadOnlyExecutors() []Executor
- func NewBashExecutor() Executor
- func NewEditExecutor() Executor
- func NewGlobExecutor() Executor
- func NewGrepExecutor() Executor
- func NewJobKillExecutor() Executor
- func NewJobOutputExecutor() Executor
- func NewLSExecutor() Executor
- func NewMultiEditExecutor() Executor
- func NewReadExecutor() Executor
- func NewWebFetchExecutor() Executor
- func NewWebSearchExecutor(config func() (WebSearchProviderConfig, error)) Executor
- func NewWriteExecutor() Executor
- type FailedEdit
- type FileVersion
- type FilesystemPathMetadata
- type FilesystemPathPolicy
- type GlobParams
- type GlobResponseMetadata
- type GrepParams
- type GrepResponseMetadata
- type InvalidArgsError
- type InvalidToolSpecError
- type JobKillParams
- type JobKillResponseMetadata
- type JobOutputParams
- type JobOutputResponseMetadata
- type LSParams
- type LSResponseMetadata
- type MultiEditParams
- type MultiEditPermissionsParams
- type MultiEditResponseMetadata
- type NodeType
- type OutputKind
- type Policy
- type PolicyRegistry
- type Profile
- type ReadParams
- type ReadResponseMetadata
- type Registry
- func (r *Registry) Err() error
- func (r *Registry) Execute(ctx context.Context, toolID string, call Call) (Result, error)
- func (r *Registry) List() []Spec
- func (r *Registry) ListFor(policy Policy) []Spec
- func (r *Registry) Register(executors ...Executor) error
- func (r *Registry) Spec(toolID string) (Spec, bool)
- func (r *Registry) View(policy Policy) *PolicyRegistry
- type Result
- type ResultStatus
- type RiskLevel
- type SkillManagePermissionsParams
- type Spec
- type TreeNode
- type WebFetchParams
- type WebFetchResponseMetadata
- type WebSearchParams
- type WebSearchProviderConfig
- type WebSearchResponseMetadata
- type WebSearchResult
- type WriteParams
- type WritePermissionsParams
- type WriteResponseMetadata
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrInvalidArgs = errors.New("invalid tool arguments")
Functions ¶
func InvalidArgs ¶
func IsProcessProbeCommand ¶
Types ¶
type ApprovalMode ¶ added in v0.1.2
type ApprovalMode string
const ( ApprovalNever ApprovalMode = "never" ApprovalOnRequest ApprovalMode = "on_request" )
type ApprovalRequest ¶
type BackgroundJob ¶
type BashParams ¶
type BashPermissionsParams ¶
type BashResponseMetadata ¶
type BashResponseMetadata struct {
StartTime int64 `json:"start_time"`
EndTime int64 `json:"end_time"`
Output string `json:"output"`
ExitCode int `json:"exit_code,omitempty"`
Description string `json:"description,omitempty"`
WorkingDirectory string `json:"working_directory"`
Background bool `json:"background,omitempty"`
ShellID string `json:"shell_id,omitempty"`
}
type Definition ¶ added in v0.1.2
func CoreDefinitions ¶ added in v0.1.2
func CoreDefinitions() []Definition
func CoreDefinitionsFor ¶ added in v0.1.2
func CoreDefinitionsFor(policy Policy) []Definition
func (Definition) Executor ¶ added in v0.1.2
func (d Definition) Executor() Executor
type DuplicateToolError ¶ added in v0.1.1
type DuplicateToolError struct {
ID string
}
func (DuplicateToolError) Error ¶ added in v0.1.1
func (e DuplicateToolError) Error() string
type EditOperation ¶
type EditParams ¶
type EditPermissionsParams ¶
type EditPermissionsParams struct {
FilesystemPathMetadata
FilePath string `json:"file_path"`
OldContent string `json:"old_content,omitempty"`
NewContent string `json:"new_content,omitempty"`
OldContentTruncated bool `json:"old_content_truncated,omitempty"`
NewContentTruncated bool `json:"new_content_truncated,omitempty"`
OldContentBytes int `json:"old_content_bytes,omitempty"`
NewContentBytes int `json:"new_content_bytes,omitempty"`
}
type EditResponseMetadata ¶
type Executor ¶
func CoreCodingExecutors ¶ added in v0.1.1
func CoreCodingExecutors() []Executor
func CoreReadOnlyExecutors ¶ added in v0.1.1
func CoreReadOnlyExecutors() []Executor
func NewBashExecutor ¶
func NewBashExecutor() Executor
func NewEditExecutor ¶
func NewEditExecutor() Executor
func NewGlobExecutor ¶
func NewGlobExecutor() Executor
func NewGrepExecutor ¶
func NewGrepExecutor() Executor
func NewJobKillExecutor ¶
func NewJobKillExecutor() Executor
func NewJobOutputExecutor ¶
func NewJobOutputExecutor() Executor
func NewLSExecutor ¶
func NewLSExecutor() Executor
func NewMultiEditExecutor ¶
func NewMultiEditExecutor() Executor
func NewReadExecutor ¶
func NewReadExecutor() Executor
func NewWebFetchExecutor ¶ added in v0.1.11
func NewWebFetchExecutor() Executor
func NewWebSearchExecutor ¶ added in v0.1.11
func NewWebSearchExecutor(config func() (WebSearchProviderConfig, error)) Executor
func NewWriteExecutor ¶
func NewWriteExecutor() Executor
type FailedEdit ¶
type FailedEdit struct {
Index int `json:"index"`
Error string `json:"error"`
Edit EditOperation `json:"edit"`
}
type FileVersion ¶
type FilesystemPathMetadata ¶ added in v0.1.2
type FilesystemPathMetadata struct {
RequestedPath string `json:"requested_path,omitempty"`
ResolvedPath string `json:"resolved_path,omitempty"`
WorkingDir string `json:"working_dir,omitempty"`
RealPath string `json:"real_path,omitempty"`
RealWorkingDir string `json:"real_working_dir,omitempty"`
BoundaryKnown bool `json:"boundary_known,omitempty"`
WithinWorkingDir bool `json:"within_working_dir,omitempty"`
SymlinkEvalApplied bool `json:"symlink_eval_applied,omitempty"`
}
type FilesystemPathPolicy ¶
type FilesystemPathPolicy struct {
Input string
WorkingDir string
Path string
RealPath string
RealWorkingDir string
BoundaryKnown bool
WithinWorkingDir bool
EscapesWorkingDir bool
SymlinkEvalApplied bool
}
func ResolveFilesystemPath ¶
func ResolveFilesystemPath(workingDir string, value string) (FilesystemPathPolicy, error)
type GlobParams ¶
type GlobResponseMetadata ¶
type GlobResponseMetadata struct {
FilesystemPathMetadata
NumberOfFiles int `json:"number_of_files"`
Truncated bool `json:"truncated"`
}
type GrepParams ¶
type GrepResponseMetadata ¶
type GrepResponseMetadata struct {
FilesystemPathMetadata
NumberOfMatches int `json:"number_of_matches"`
Truncated bool `json:"truncated"`
}
type InvalidArgsError ¶
func (*InvalidArgsError) Error ¶
func (e *InvalidArgsError) Error() string
func (*InvalidArgsError) Is ¶
func (e *InvalidArgsError) Is(target error) bool
func (*InvalidArgsError) Unwrap ¶
func (e *InvalidArgsError) Unwrap() error
type InvalidToolSpecError ¶ added in v0.1.1
type InvalidToolSpecError struct {
Reason string
}
func (InvalidToolSpecError) Error ¶ added in v0.1.1
func (e InvalidToolSpecError) Error() string
type JobKillParams ¶
type JobKillParams struct {
ShellID string `json:"shell_id"`
}
type JobKillResponseMetadata ¶
type JobOutputParams ¶
type LSResponseMetadata ¶
type LSResponseMetadata struct {
FilesystemPathMetadata
NumberOfFiles int `json:"number_of_files"`
Truncated bool `json:"truncated"`
}
type MultiEditParams ¶
type MultiEditParams struct {
FilePath string `json:"file_path"`
Edits []EditOperation `json:"edits"`
}
type MultiEditPermissionsParams ¶
type MultiEditPermissionsParams struct {
FilesystemPathMetadata
FilePath string `json:"file_path"`
OldContent string `json:"old_content,omitempty"`
NewContent string `json:"new_content,omitempty"`
OldContentTruncated bool `json:"old_content_truncated,omitempty"`
NewContentTruncated bool `json:"new_content_truncated,omitempty"`
OldContentBytes int `json:"old_content_bytes,omitempty"`
NewContentBytes int `json:"new_content_bytes,omitempty"`
}
type MultiEditResponseMetadata ¶
type MultiEditResponseMetadata struct {
FilesystemPathMetadata
Diff string `json:"diff"`
Additions int `json:"additions"`
Removals int `json:"removals"`
OldContent string `json:"old_content,omitempty"`
NewContent string `json:"new_content,omitempty"`
EditsApplied int `json:"edits_applied"`
EditsFailed []FailedEdit `json:"edits_failed,omitempty"`
}
type OutputKind ¶ added in v0.1.1
type OutputKind string
const ( OutputText OutputKind = "text" OutputFileContent OutputKind = "file_content" OutputFileTree OutputKind = "file_tree" OutputSearchResults OutputKind = "search_results" OutputDiff OutputKind = "diff" OutputJob OutputKind = "job" OutputAudio OutputKind = "audio" OutputStorageEntry OutputKind = "storage_entry" OutputStorageList OutputKind = "storage_list" OutputWebContent OutputKind = "web_content" )
type Policy ¶ added in v0.1.1
type PolicyRegistry ¶ added in v0.1.1
type PolicyRegistry struct {
// contains filtered or unexported fields
}
func (*PolicyRegistry) List ¶ added in v0.1.1
func (r *PolicyRegistry) List() []Spec
type ReadParams ¶
type ReadResponseMetadata ¶
type ReadResponseMetadata struct {
FilesystemPathMetadata
FilePath string `json:"file_path"`
Content string `json:"content"`
}
type Registry ¶
type Registry struct {
// contains filtered or unexported fields
}
func NewCoreCodingRegistry ¶ added in v0.1.1
func NewCoreReadOnlyRegistry ¶ added in v0.1.1
func NewRegistry ¶
func (*Registry) View ¶ added in v0.1.1
func (r *Registry) View(policy Policy) *PolicyRegistry
type Result ¶
type Result struct {
Content string `json:"content"`
Metadata any `json:"metadata,omitempty"`
MIMEType string `json:"mime_type,omitempty"`
Status ResultStatus `json:"status,omitempty"`
IsError bool `json:"is_error,omitempty"`
Approval *ApprovalRequest `json:"approval,omitempty"`
FileVersion *FileVersion `json:"file_version,omitempty"`
Background *BackgroundJob `json:"background,omitempty"`
}
type ResultStatus ¶
type ResultStatus string
const ( ResultStatusSuccess ResultStatus = "success" ResultStatusError ResultStatus = "error" ResultStatusNeutral ResultStatus = "neutral" )
type SkillManagePermissionsParams ¶ added in v0.1.11
type Spec ¶
type Spec struct {
ID string `json:"id"`
Name string `json:"name"`
Description string `json:"description,omitempty"`
Risk RiskLevel `json:"risk"`
Effect Effect `json:"effect,omitempty"`
ApprovalMode ApprovalMode `json:"approval_mode,omitempty"`
PermissionParams string `json:"permission_params,omitempty"`
Namespace string `json:"namespace,omitempty"`
Category Category `json:"category,omitempty"`
Profiles []Profile `json:"profiles,omitempty"`
OutputKind OutputKind `json:"output_kind,omitempty"`
InputJSONSchema json.RawMessage `json:"input_json_schema,omitempty"`
}
func (Spec) IsFilesystemMutation ¶ added in v0.1.2
func (Spec) RequiresApproval ¶ added in v0.1.2
type WebFetchParams ¶ added in v0.1.11
type WebFetchResponseMetadata ¶ added in v0.1.11
type WebSearchParams ¶ added in v0.1.11
type WebSearchProviderConfig ¶ added in v0.1.11
type WebSearchProviderConfig struct {
Provider string
TavilyKey string
SerperKey string
BaseURL string
}
WebSearchProviderConfig holds the active provider credentials for web search.
type WebSearchResponseMetadata ¶ added in v0.1.11
type WebSearchResponseMetadata struct {
Query string `json:"query"`
Provider string `json:"provider"`
Results []WebSearchResult `json:"results"`
}
type WebSearchResult ¶ added in v0.1.11
type WriteParams ¶
type WritePermissionsParams ¶
type WritePermissionsParams struct {
FilesystemPathMetadata
FilePath string `json:"file_path"`
OldContent string `json:"old_content,omitempty"`
NewContent string `json:"new_content,omitempty"`
OldContentTruncated bool `json:"old_content_truncated,omitempty"`
NewContentTruncated bool `json:"new_content_truncated,omitempty"`
OldContentBytes int `json:"old_content_bytes,omitempty"`
NewContentBytes int `json:"new_content_bytes,omitempty"`
}
type WriteResponseMetadata ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.