Documentation
¶
Index ¶
- type DecisionRecord
- type LedgerBatch
- type LedgerExportOptions
- type LedgerReceiptChainAnchor
- type LedgerRecord
- type SessionRecord
- type SessionSummary
- type Store
- func (s *Store) AgentSessions(ctx context.Context, ids []string) ([]LedgerRecord, error)
- func (s *Store) AuthorizationActions(ctx context.Context, opts LedgerExportOptions) ([]LedgerRecord, error)
- func (s *Store) AuthorizationReceipts(ctx context.Context, opts LedgerExportOptions) ([]LedgerRecord, error)
- func (s *Store) Close() error
- func (s *Store) CloseSession(ctx context.Context, sessionID string) error
- func (s *Store) EnsureObservedSession(ctx context.Context, sessionID, agent, cwd string) (SessionRecord, error)
- func (s *Store) Events(ctx context.Context, sessionID string) ([]DecisionRecord, error)
- func (s *Store) LedgerBatch(ctx context.Context, opts LedgerExportOptions) (LedgerBatch, error)
- func (s *Store) OpenSession(ctx context.Context, sessionID, agent, cwd, source, externalID string) (SessionRecord, error)
- func (s *Store) Path() string
- func (s *Store) SaveDecision(ctx context.Context, event risk.HookEvent, decision risk.RiskDecision) (DecisionRecord, error)
- func (s *Store) Session(ctx context.Context, sessionID string) (SessionRecord, error)
- func (s *Store) SessionSummary(ctx context.Context, sessionID string) (SessionSummary, error)
- func (s *Store) Sessions(ctx context.Context) ([]SessionSummary, error)
- func (s *Store) Summary(ctx context.Context) (Summary, error)
- func (s *Store) VerifyReceipts(ctx context.Context) error
- type Summary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DecisionRecord ¶
type DecisionRecord struct {
ID string `json:"id"`
SessionID string `json:"session_id"`
ToolUseID string `json:"tool_use_id,omitempty"`
HookEventName string `json:"hook_event_name"`
ToolName string `json:"tool_name,omitempty"`
Decision risk.Decision `json:"decision"`
ReasonCode string `json:"reason_code"`
Reason string `json:"reason"`
RiskScore *float64 `json:"risk_score,omitempty"`
Threshold *float64 `json:"threshold,omitempty"`
ModelVersion string `json:"model_version,omitempty"`
RiskEvent risk.RiskEvent `json:"risk_event"`
CreatedAt time.Time `json:"created_at"`
}
type LedgerBatch ¶ added in v0.8.0
type LedgerBatch struct {
Sessions []LedgerRecord `json:"agent_sessions"`
Actions []LedgerRecord `json:"authorization_actions"`
Receipts []LedgerRecord `json:"authorization_receipts"`
ReceiptChainAnchor *LedgerReceiptChainAnchor `json:"receipt_chain_anchor,omitempty"`
}
type LedgerExportOptions ¶ added in v0.8.0
type LedgerReceiptChainAnchor ¶ added in v0.8.0
type LedgerReceiptChainAnchor struct {
PreviousReceiptHash string `json:"previous_receipt_hash"`
}
type LedgerRecord ¶ added in v0.8.0
type SessionRecord ¶ added in v0.7.0
type SessionRecord struct {
ID string `json:"id"`
Agent string `json:"agent,omitempty"`
CWD string `json:"cwd,omitempty"`
Source string `json:"source,omitempty"`
Status string `json:"status,omitempty"`
ExternalID string `json:"external_id,omitempty"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
ClosedAt *time.Time `json:"closed_at,omitempty"`
}
type SessionSummary ¶
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
func (*Store) AgentSessions ¶ added in v0.8.0
func (*Store) AuthorizationActions ¶ added in v0.8.0
func (s *Store) AuthorizationActions(ctx context.Context, opts LedgerExportOptions) ([]LedgerRecord, error)
func (*Store) AuthorizationReceipts ¶ added in v0.8.0
func (s *Store) AuthorizationReceipts(ctx context.Context, opts LedgerExportOptions) ([]LedgerRecord, error)
func (*Store) CloseSession ¶ added in v0.7.0
func (*Store) EnsureObservedSession ¶ added in v0.7.0
func (*Store) LedgerBatch ¶ added in v0.8.0
func (s *Store) LedgerBatch(ctx context.Context, opts LedgerExportOptions) (LedgerBatch, error)
func (*Store) OpenSession ¶ added in v0.7.0
func (*Store) SaveDecision ¶
func (s *Store) SaveDecision(ctx context.Context, event risk.HookEvent, decision risk.RiskDecision) (DecisionRecord, error)
func (*Store) SessionSummary ¶
Click to show internal directories.
Click to hide internal directories.