config

package
v1.2.6 Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package config provides the get_config tool: a read-only view of seshat's effective security policy (the same values write_file, bash, and every other write-capable tool actually enforce, not a separately maintained description of them), mirroring DesktopCommanderMCP's get_config. Unlike DesktopCommanderMCP, there is no set_config_value counterpart - seshat's policy isn't user-editable at runtime, so exposing it read-only avoids implying a control surface that doesn't exist.

Index

Constants

View Source
const (
	// ToolName is the name of the get_config tool.
	ToolName = "get_config"

	// SearchHint is a hint for tool search functionality.
	SearchHint = "view the effective security policy (blocked commands, protected paths, read limits)"

	// ToolDescription is the description of the get_config tool.
	ToolDescription = "Get the currently effective security policy: which commands need approval or are always blocked, " +
		"which paths are protected from reads/writes, file-read size/line limits, the sandbox status, and the active working directory/shell.\n\n" +
		"## When to use\n\n" +
		"- Before running a command or touching a path you suspect might be restricted, to check without trial-and-error\n" +
		"- To explain to the user why a prior tool call was blocked or required approval\n\n" +
		"## Notes\n\n" +
		"- Read-only — this tool cannot change any policy setting.\n"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Tool added in v1.1.0

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

Tool implements the get_config tool.

func NewTool added in v1.1.0

func NewTool(workingDir string) *Tool

NewTool creates a new get_config tool.

func (*Tool) BackfillInput added in v1.1.0

func (t *Tool) BackfillInput(_ context.Context, input map[string]any) map[string]any

func (*Tool) Call added in v1.1.0

func (t *Tool) Call(
	_ context.Context,
	input tool.CallInput,
	_ types.CanUseToolFn,
) (tool.CallResult, error)

func (*Tool) CheckPermissions added in v1.1.0

func (t *Tool) CheckPermissions(_ context.Context, input map[string]any, _ tool.ToolUseContext) types.PermissionResult

func (*Tool) Definition added in v1.1.0

func (t *Tool) Definition() tool.Definition

func (*Tool) Description added in v1.1.0

func (t *Tool) Description(_ context.Context) (string, error)

func (*Tool) FormatResult added in v1.1.0

func (t *Tool) FormatResult(data any) string

func (*Tool) IsConcurrencySafe added in v1.1.0

func (t *Tool) IsConcurrencySafe(_ map[string]any) bool

func (*Tool) IsEnabled added in v1.1.0

func (t *Tool) IsEnabled() bool

func (*Tool) IsReadOnly added in v1.1.0

func (t *Tool) IsReadOnly(_ map[string]any) bool

func (*Tool) ValidateInput added in v1.1.0

func (t *Tool) ValidateInput(_ context.Context, input map[string]any) (map[string]any, error)

Jump to

Keyboard shortcuts

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