secrets

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildTools added in v0.7.0

func BuildTools(secretsStore *security.SecretsStore, refs *security.RefStore, scanner *agent.SecretScanner) []*agent.Tool

BuildTools creates secrets agent tools.

Types

type DeleteParams

type DeleteParams struct {
	Name string `json:"name"`
}

DeleteParams are the parameters for the delete operation.

type GetParams

type GetParams struct {
	Name string `json:"name"`
}

GetParams are the parameters for the get operation.

type ListResult

type ListResult struct {
	Secrets []SecretEntry `json:"secrets"`
	Count   int           `json:"count"`
}

ListResult is the result of the list operation.

type SecretEntry

type SecretEntry struct {
	Name        string `json:"name"`
	CreatedAt   string `json:"createdAt"`
	UpdatedAt   string `json:"updatedAt"`
	AccessCount int    `json:"accessCount"`
}

SecretEntry represents a secret in the list response.

type StoreParams

type StoreParams struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

StoreParams are the parameters for the store operation.

type Tool

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

Tool provides secure secrets management for AI agents. Secret values are never returned as plaintext; instead, opaque reference tokens are returned that are resolved at execution time by the exec tool.

func New

func New(store *security.SecretsStore, refs *security.RefStore, scanner *agent.SecretScanner) *Tool

New creates a new secrets tool. If scanner is non-nil, retrieved secrets are registered for output scanning.

func (*Tool) Delete

func (t *Tool) Delete(ctx context.Context, params map[string]interface{}) (interface{}, error)

Delete removes a secret by name.

func (*Tool) Get

func (t *Tool) Get(ctx context.Context, params map[string]interface{}) (interface{}, error)

Get retrieves a secret and returns an opaque reference token. The plaintext value is stored in the RefStore and resolved at execution time. The agent never sees the actual secret value.

func (*Tool) List

func (t *Tool) List(ctx context.Context, params map[string]interface{}) (interface{}, error)

List returns metadata for all stored secrets.

func (*Tool) Store

func (t *Tool) Store(ctx context.Context, params map[string]interface{}) (interface{}, error)

Store encrypts and stores a secret value.

Jump to

Keyboard shortcuts

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