environment

package
v1.132.0 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package environment exposes a single read-only tool the model can call to learn which OS and shell will run its shell-tool commands. The tool takes no arguments and returns a fixed shape — reads only runtime.GOOS and the already-detected shell binary — so it earns the ReadOnlyHint auto-approval used by other pure-info tools (git status, filesystem reads, memory reads, …).

Index

Constants

View Source
const (
	ToolNameGetEnvironmentInfo = "get_environment_info"
)

Variables

This section is empty.

Functions

func CreateToolSet

func CreateToolSet() (tools.ToolSet, error)

CreateToolSet is the registry entry point.

Types

type Args

type Args struct{}

Args intentionally has no fields: the tool must not accept model- or user-steered inputs, so the safety surface is what the code decides to read, not what the caller asks for.

type Info

type Info struct {
	OS    string `json:"os"`
	Shell string `json:"shell"`
}

Info is the tool's fixed output shape. Deliberately narrow: OS and shell only, no working directory, no full paths, no username. Anything user-controlled would land in the conversation transcript.

type ToolSet

type ToolSet struct{}

func New

func New() *ToolSet

func (*ToolSet) Instructions

func (t *ToolSet) Instructions() string

func (*ToolSet) Tools

func (t *ToolSet) Tools(context.Context) ([]tools.Tool, error)

Jump to

Keyboard shortcuts

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