audit

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package audit records the tool calls an AI/MCP client makes, so the operator can always see what an assistant did to their containers. It is shared across processes: both the GUI server and the standalone `oriel mcp` process append to the same JSONL file (under the user data dir), and the server reads it for the UI. The operator's own UI clicks are NOT recorded, only non-interactive (agent) calls reach Record.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Record

func Record(tool string, args map[string]any, err error)

Record appends one entry for an agent tool call. String args that look like secrets are masked, so a tool argument can't leak a credential into the log. Best-effort: a logging failure must never break the tool call, so errors are swallowed.

Types

type Entry

type Entry struct {
	Time  string         `json:"time"` // RFC3339 UTC
	Tool  string         `json:"tool"`
	Args  map[string]any `json:"args,omitempty"`
	OK    bool           `json:"ok"`
	Error string         `json:"error,omitempty"`
}

Entry is one recorded agent tool call.

func Read

func Read(limit int) []Entry

Read returns the most recent entries, newest first (at most keepN).

Jump to

Keyboard shortcuts

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