tools

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package tools defines opsgate's structured MCP tools and the gate every call passes through: policy check -> human approval -> execute -> audit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(s *mcp.Server, g *Gate)

Register adds every enabled tool to the server.

Types

type Gate

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

Gate owns the shared state every tool needs.

func NewGate

func NewGate(cfg *config.Config, log *audit.Logger) *Gate

NewGate builds a Gate. Executors are created lazily on first use per host.

func (*Gate) Close

func (g *Gate) Close()

Close releases every open executor.

func (*Gate) Config

func (g *Gate) Config() *config.Config

Config exposes the loaded config (used by cmd for banners).

Jump to

Keyboard shortcuts

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