fs

package
v1.8.13 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrOutsideWorkspace = errors.New("path outside workspace")

Functions

func ContextWithApprovedPath added in v1.8.10

func ContextWithApprovedPath(ctx context.Context, abs string) context.Context

func ContextWithApprovedPrefix added in v1.8.10

func ContextWithApprovedPrefix(ctx context.Context, dir string) context.Context

func EffectiveWorkingDir added in v1.8.10

func EffectiveWorkingDir(workspace string) string

func IsUnderWorkspaceRoot added in v1.8.10

func IsUnderWorkspaceRoot(absWorkspace, absRequested string) bool

func NewEditTool

func NewEditTool(workspace string) types.Tool

func NewFileTool

func NewFileTool(workspace string) types.Tool

func NewReadTool

func NewReadTool(workspace string) types.Tool

func NewWriteTool

func NewWriteTool(workspace string) types.Tool

func ResolveAbsRequested added in v1.8.10

func ResolveAbsRequested(workspace, requested string) (absWorkspace string, absRequested string, err error)

func SafePath

func SafePath(ctx context.Context, workspace, requested string) (string, error)

Types

type EditTool

type EditTool struct {
	// contains filtered or unexported fields
}

func (*EditTool) Description

func (t *EditTool) Description() string

func (*EditTool) Execute

func (t *EditTool) Execute(ctx context.Context, input map[string]interface{}) (interface{}, error)

func (*EditTool) Metadata

func (t *EditTool) Metadata() types.ToolMetadata

func (*EditTool) Name

func (t *EditTool) Name() string

func (*EditTool) Schema

func (t *EditTool) Schema() map[string]interface{}

type FileTool

type FileTool struct {
	// contains filtered or unexported fields
}

func (*FileTool) Description

func (t *FileTool) Description() string

func (*FileTool) Execute

func (t *FileTool) Execute(ctx context.Context, input map[string]interface{}) (interface{}, error)

func (*FileTool) Metadata

func (t *FileTool) Metadata() types.ToolMetadata

func (*FileTool) Name

func (t *FileTool) Name() string

func (*FileTool) Schema

func (t *FileTool) Schema() map[string]interface{}

type ReadTool

type ReadTool struct {
	// contains filtered or unexported fields
}

func (*ReadTool) Description

func (t *ReadTool) Description() string

func (*ReadTool) Execute

func (t *ReadTool) Execute(ctx context.Context, input map[string]interface{}) (interface{}, error)

func (*ReadTool) Metadata

func (t *ReadTool) Metadata() types.ToolMetadata

func (*ReadTool) Name

func (t *ReadTool) Name() string

func (*ReadTool) Schema

func (t *ReadTool) Schema() map[string]interface{}

type WriteTool

type WriteTool struct {
	// contains filtered or unexported fields
}

func (*WriteTool) Description

func (t *WriteTool) Description() string

func (*WriteTool) Execute

func (t *WriteTool) Execute(ctx context.Context, input map[string]interface{}) (interface{}, error)

func (*WriteTool) Metadata

func (t *WriteTool) Metadata() types.ToolMetadata

func (*WriteTool) Name

func (t *WriteTool) Name() string

func (*WriteTool) Schema

func (t *WriteTool) Schema() map[string]interface{}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL