audit

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Overview

Package audit writes structured records for runtime decisions and tool use.

Index

Constants

View Source
const DefaultLimit = 50

Variables

This section is empty.

Functions

func Bool

func Bool(value bool) *bool

func Clip

func Clip(value string, limit int) string

Types

type Event

type Event struct {
	Type               string    `json:"type"`
	Time               time.Time `json:"time"`
	SessionID          string    `json:"session_id,omitempty"`
	Workspace          string    `json:"workspace,omitempty"`
	ToolName           string    `json:"tool_name,omitempty"`
	Input              string    `json:"input,omitempty"`
	Output             string    `json:"output,omitempty"`
	IsError            bool      `json:"is_error,omitempty"`
	PermissionMode     string    `json:"permission_mode,omitempty"`
	RequiredPermission string    `json:"required_permission,omitempty"`
	Allowed            *bool     `json:"allowed,omitempty"`
	Reason             string    `json:"reason,omitempty"`
	Feedback           string    `json:"feedback,omitempty"`
	PermissionRule     string    `json:"permission_rule,omitempty"`
}

type Store

type Store struct {
	Path string
}

func NewStore

func NewStore(configHome string) *Store

func (*Store) Append

func (s *Store) Append(event Event) error

func (*Store) List

func (s *Store) List(limit int) ([]Event, error)

Jump to

Keyboard shortcuts

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