audit

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: MIT Imports: 7 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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