Documentation
¶
Index ¶
- func TouchTimestamp(ts time.Time) time.Time
- type ActionEventRecord
- type SchemaMigrationRequiredError
- type Store
- func (s *Store) ActionEventRowsByTaskRunID(taskRunID string) ([]actionEventTaskContextRow, error)
- func (s *Store) ActionEventTaskContexts() ([]taskverification.ActionEventTaskContext, error)
- func (s *Store) ActionEvents() ([]ActionEventRecord, error)
- func (s *Store) ActionEventsByRequestID(requestID string) ([]ActionEventRecord, error)
- func (s *Store) AppendActionEvent(entry *common.LogEntry) error
- func (s *Store) AppendActionEventTaskContext(ctx taskverification.ActionEventTaskContext) error
- func (s *Store) AppendTaskEvent(event *taskverification.TaskEvent) error
- func (s *Store) Close() error
- func (s *Store) DB() *bun.DB
- func (s *Store) GetTaskRunEvents(ctx context.Context, runID string) ([]TaskRunEvent, error)
- func (s *Store) ListTaskRuns(ctx context.Context) ([]TaskRunSummary, error)
- func (s *Store) TaskEventRowsByTaskRunID(taskRunID string) ([]taskEventRow, error)
- func (s *Store) TaskEvents() ([]taskverification.TaskEvent, error)
- type TaskRunEvent
- type TaskRunEventSource
- type TaskRunSummary
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ActionEventRecord ¶
type ActionEventRecord struct {
bun.BaseModel `bun:"table:action_events"`
ID string `bun:",pk"`
SchemaVersion int
CreatedAtUnixMilli int64
RequestID string
SessionID string
PrincipalID string
Transport string
Direction string
MessageType string
Gateway string
ServerName string
Endpoint string
ToolName string
OriginalToolName string
Success bool
IsError bool
PayloadJSON json.RawMessage
}
ActionEventRecord is the persisted SQL projection of one MCP action log entry.
type SchemaMigrationRequiredError ¶
SchemaMigrationRequiredError reports that an existing event store schema cannot be opened safely without an explicit migration path.
func (*SchemaMigrationRequiredError) Error ¶
func (e *SchemaMigrationRequiredError) Error() string
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store persists task and action events to SQLite using Bun.
func NewSQLiteStore ¶
NewSQLiteStore creates a Bun-backed SQLite store and bootstraps the schema.
func (*Store) ActionEventRowsByTaskRunID ¶
ActionEventRowsByTaskRunID returns bridge rows for one task run.
func (*Store) ActionEventTaskContexts ¶
func (s *Store) ActionEventTaskContexts() ([]taskverification.ActionEventTaskContext, error)
ActionEventTaskContexts returns all persisted action-to-task bridge rows ordered by timestamp.
func (*Store) ActionEvents ¶
func (s *Store) ActionEvents() ([]ActionEventRecord, error)
ActionEvents returns all persisted action events ordered by timestamp.
func (*Store) ActionEventsByRequestID ¶
func (s *Store) ActionEventsByRequestID(requestID string) ([]ActionEventRecord, error)
ActionEventsByRequestID returns all persisted action events for a request id.
func (*Store) AppendActionEvent ¶
AppendActionEvent persists one action event projected from the MCP request log.
func (*Store) AppendActionEventTaskContext ¶
func (s *Store) AppendActionEventTaskContext(ctx taskverification.ActionEventTaskContext) error
AppendActionEventTaskContext persists one action-to-task bridge record.
func (*Store) AppendTaskEvent ¶
func (s *Store) AppendTaskEvent(event *taskverification.TaskEvent) error
AppendTaskEvent persists one task lifecycle event.
func (*Store) GetTaskRunEvents ¶
GetTaskRunEvents returns the unified task/action timeline for one run.
func (*Store) ListTaskRuns ¶
func (s *Store) ListTaskRuns(ctx context.Context) ([]TaskRunSummary, error)
ListTaskRuns returns aggregated task run summaries ordered by start time descending.
func (*Store) TaskEventRowsByTaskRunID ¶
TaskEventRowsByTaskRunID returns lifecycle rows for one task run.
func (*Store) TaskEvents ¶
func (s *Store) TaskEvents() ([]taskverification.TaskEvent, error)
TaskEvents returns all persisted task lifecycle events ordered by timestamp.
type TaskRunEvent ¶
type TaskRunEvent struct {
Source TaskRunEventSource `json:"source"`
ID string `json:"id"`
CreatedAtUnixMilli int64 `json:"createdAtUnixMilli"`
PayloadJSON json.RawMessage `json:"payloadJson,omitempty"`
EventType string `json:"eventType,omitempty"`
Outcome string `json:"outcome,omitempty"`
RelatedActionRequestID string `json:"relatedActionRequestId,omitempty"`
PhasePath string `json:"phasePath,omitempty"`
NodeKind string `json:"nodeKind,omitempty"`
ResultingPhasePath string `json:"resultingPhasePath,omitempty"`
ResultingNodeKind string `json:"resultingNodeKind,omitempty"`
RequestID string `json:"requestId,omitempty"`
Direction string `json:"direction,omitempty"`
MessageType string `json:"messageType,omitempty"`
ToolName string `json:"toolName,omitempty"`
OriginalToolName string `json:"originalToolName,omitempty"`
Success *bool `json:"success,omitempty"`
IsError *bool `json:"isError,omitempty"`
Transport string `json:"transport,omitempty"`
Gateway string `json:"gateway,omitempty"`
ServerName string `json:"serverName,omitempty"`
Endpoint string `json:"endpoint,omitempty"`
}
TaskRunEvent is the unified task timeline projection used by the UI.
type TaskRunEventSource ¶
type TaskRunEventSource string
TaskRunEventSource identifies where one timeline row originated.
const ( // TaskRunEventSourceTask marks a task lifecycle event. TaskRunEventSourceTask TaskRunEventSource = "task" // TaskRunEventSourceAction marks an MCP action event. TaskRunEventSourceAction TaskRunEventSource = "action" )
type TaskRunSummary ¶
type TaskRunSummary struct {
RunID string `json:"runId"`
TemplateID string `json:"templateId"`
PrincipalID string `json:"principalId,omitempty"`
SessionID string `json:"sessionId,omitempty"`
StartedAt int64 `json:"startedAt"`
EndedAt *int64 `json:"endedAt,omitempty"`
Status string `json:"status"`
CurrentPhase string `json:"currentPhase"`
CurrentNodeKind string `json:"currentNodeKind,omitempty"`
TaskEventCount int `json:"taskEventCount"`
ActionEventCount int `json:"actionEventCount"`
EventCount int `json:"eventCount"`
}
TaskRunSummary is the aggregated view of one persisted task run.