activitylog

package
v1.0.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAll

func RegisterAll(server *mcp.Server, client *sdk.APIClient)

RegisterAll registers all Activity Log tools with the MCP server.

func RegisterContractTools

func RegisterContractTools(server *mcp.Server, client *sdk.APIClient)

func RegisterEventTools

func RegisterEventTools(server *mcp.Server, client *sdk.APIClient)

Types

type CompactError

type CompactError struct {
	HTTPStatus string   `json:"http_status,omitempty"`
	Messages   []string `json:"messages,omitempty"`
}

type CompactEvent

type CompactEvent struct {
	Time      string            `json:"time,omitempty"`
	Type      string            `json:"type,omitempty"`
	Action    string            `json:"action,omitempty"`
	Status    string            `json:"status,omitempty"`
	Message   string            `json:"message,omitempty"`
	URI       string            `json:"uri,omitempty"`
	RequestID string            `json:"request_id,omitempty"`
	QueueRef  int32             `json:"queue_ref_id,omitempty"`
	User      string            `json:"user,omitempty"`
	Service   string            `json:"service,omitempty"`
	SourceIP  string            `json:"source_ip,omitempty"`
	Initiator string            `json:"initiator,omitempty"`
	ParamSvc  string            `json:"param_service,omitempty"`
	ErrorCode string            `json:"error_code,omitempty"`
	Error     *CompactError     `json:"error,omitempty"`
	Resources []CompactResource `json:"resources,omitempty"`
}

CompactEvent is the flattened, deduplicated view of a single audit event. Field naming is snake_case to match the rest of the MCP tool responses.

type CompactOptions

type CompactOptions struct {
	IncludeStatusUpdates bool
	User                 *string
	EventTypes           []string
}

CompactOptions controls which events are included in the output.

type CompactResource

type CompactResource struct {
	Type   string   `json:"type,omitempty"`
	ID     string   `json:"id,omitempty"`
	Action []string `json:"action,omitempty"`
}

type CompactResponse

type CompactResponse struct {
	Events []CompactEvent `json:"events"`
	Total  int32          `json:"total"`
}

CompactResponse is the shape returned by list_activitylog_events. It strips the Elasticsearch-style _source wrapper and other guaranteed-redundant fields from the SDK response to reduce output tokens for LLM consumers.

func Compact

func Compact(raw sdk.GetByContractResponse, inputContract int32, opts CompactOptions) CompactResponse

Compact projects a raw GetByContractResponse into CompactResponse.

inputContract is the contract number that was passed to GetByContract. Any principal.identity.contractNumber matching this value is dropped from the per-event output (it is guaranteed-redundant for that endpoint).

Jump to

Keyboard shortcuts

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