Help us shape the future of Go! Take the 2026 Go Developer Survey

config

package
v1.11.13 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 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

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

Tool implements the get_config tool.

func NewTool

func NewTool(workingDir string) *Tool

NewTool creates a new get_config tool.

func (*Tool) BackfillInput

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

func (*Tool) Call

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

func (*Tool) CheckPermissions

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

func (*Tool) Definition

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

func (*Tool) Description

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

func (*Tool) FormatResult

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

func (*Tool) IsConcurrencySafe

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

func (*Tool) IsEnabled

func (t *Tool) IsEnabled() bool

func (*Tool) IsReadOnly

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

func (*Tool) ValidateInput

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