persistence

package
v0.4.4 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TouchTimestamp

func TouchTimestamp(ts time.Time) time.Time

TouchTimestamp normalizes zero-value timestamps before persistence.

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 ActivityCategoryCounts added in v0.4.4

type ActivityCategoryCounts struct {
	Security   int `json:"security"`
	Policy     int `json:"policy"`
	Risk       int `json:"risk"`
	Quality    int `json:"quality"`
	Compliance int `json:"compliance"`
}

ActivityCategoryCounts is a fixed-key map so every category is always present.

type ActivityFilter added in v0.4.4

type ActivityFilter struct {
	Start     int64  // unix milli, inclusive
	End       int64  // unix milli, inclusive
	Principal string // when set, restrict to this principal_id
}

ActivityFilter bounds the activity aggregation to a time window (inclusive) and, optionally, to a single principal.

type ActivityIntervention added in v0.4.4

type ActivityIntervention struct {
	ID                 string  `json:"id"`
	Category           string  `json:"category"`
	TimestampUnixMilli int64   `json:"timestampUnixMilli"`
	Severity           float64 `json:"severity"`
	Title              string  `json:"title"`
	Summary            string  `json:"summary"`
	RuleID             string  `json:"ruleId"`
	RuleExplanation    string  `json:"ruleExplanation"`
	ToolName           string  `json:"toolName"`
	Gateway            string  `json:"gateway"`
	ServerName         string  `json:"serverName"`
	Label              string  `json:"label,omitempty"`
}

ActivityIntervention is a single moment where a processor stepped in.

type ActivityStats added in v0.4.4

type ActivityStats struct {
	Interventions     int   `json:"interventions"`
	ActionsBlocked    int   `json:"actionsBlocked"`
	Redacted          int   `json:"redacted"`
	ContextCharsIn    int64 `json:"contextCharsIn"`
	ContextCharsOut   int64 `json:"contextCharsOut"`
	RequestsInspected int   `json:"requestsInspected"`
}

ActivityStats holds the headline counters shown above the skyline chart.

type ActivitySummary added in v0.4.4

type ActivitySummary struct {
	RangeStartUnixMilli int64                  `json:"rangeStartUnixMilli"`
	RangeEndUnixMilli   int64                  `json:"rangeEndUnixMilli"`
	Stats               ActivityStats          `json:"stats"`
	CategoryCounts      ActivityCategoryCounts `json:"categoryCounts"`
	Volume              []ActivityVolumePoint  `json:"volume"`
	Interventions       []ActivityIntervention `json:"interventions"`
}

ActivitySummary is the aggregated payload backing the UI "Activity" view. JSON tags intentionally match the frontend ActivitySummary type (web/src/api/activity.ts) so it can be consumed without transformation.

type ActivityVolumePoint added in v0.4.4

type ActivityVolumePoint struct {
	TimeUnixMilli int64   `json:"timeUnixMilli"`
	Volume        float64 `json:"volume"`
}

ActivityVolumePoint is one time-bucket of inspected request volume.

type BenchmarkRunFilter added in v0.4.0

type BenchmarkRunFilter struct {
	SuiteID         string
	SessionID       string
	CaseID          string
	Agent           string
	TemplateVariant string
}

BenchmarkRunFilter restricts benchmark run listing.

type BenchmarkRunRecord added in v0.4.0

type BenchmarkRunRecord struct {
	BenchmarkRunID       string          `json:"benchmarkRunId"`
	SessionID            string          `json:"sessionId"`
	CaseID               string          `json:"caseId"`
	CaseName             string          `json:"caseName,omitempty"`
	Agent                string          `json:"agent"`
	TemplateVariant      string          `json:"templateVariant"`
	Attempt              int             `json:"attempt"`
	TemplateID           string          `json:"templateId"`
	TemplateName         string          `json:"templateName,omitempty"`
	SelectedModel        string          `json:"selectedModel,omitempty"`
	StartedAtUnixMilli   int64           `json:"startedAtUnixMilli"`
	EndedAtUnixMilli     *int64          `json:"endedAtUnixMilli,omitempty"`
	Status               string          `json:"status"`
	LinkedTaskRunIDs     []string        `json:"linkedTaskRunIds,omitempty"`
	RunDir               string          `json:"runDir"`
	ProjectDir           string          `json:"projectDir"`
	LogsDir              string          `json:"logsDir"`
	AgentDir             string          `json:"agentDir"`
	ConfigPath           string          `json:"configPath"`
	EventStoreMode       string          `json:"eventStoreMode,omitempty"`
	EventStorePath       string          `json:"eventStorePath,omitempty"`
	RequestLogPath       string          `json:"requestLogPath,omitempty"`
	SelectedTemplatePath string          `json:"selectedTemplatePath,omitempty"`
	ErrorSummary         string          `json:"errorSummary,omitempty"`
	AgentMetadataJSON    json.RawMessage `json:"agentMetadataJson,omitempty"`
}

BenchmarkRunRecord stores relational benchmark run metadata.

type BenchmarkRunScoreRecord added in v0.4.0

type BenchmarkRunScoreRecord struct {
	BenchmarkRunID            string          `json:"benchmarkRunId"`
	ScoreStatus               string          `json:"scoreStatus"`
	ScoreVersion              string          `json:"scoreVersion,omitempty"`
	GeneratedAtUnixMilli      int64           `json:"generatedAtUnixMilli"`
	ScorecardJSON             json.RawMessage `json:"scorecardJson,omitempty"`
	ScoreErrors               []string        `json:"scoreErrors,omitempty"`
	SelectedModel             string          `json:"selectedModel,omitempty"`
	CompletedSuccessfully     bool            `json:"completedSuccessfully"`
	FinalVerificationPassed   bool            `json:"finalVerificationPassed"`
	FirstPassSuccess          bool            `json:"firstPassSuccess"`
	RestartOccurred           bool            `json:"restartOccurred"`
	FailOccurred              bool            `json:"failOccurred"`
	TimeoutOccurred           bool            `json:"timeoutOccurred"`
	InvariantViolation        bool            `json:"invariantViolation"`
	WallClockSeconds          float64         `json:"wallClockSeconds"`
	TotalToolCalls            int             `json:"totalToolCalls"`
	TotalTaskToolCalls        int             `json:"totalTaskToolCalls"`
	TotalDownstreamToolCalls  int             `json:"totalDownstreamToolCalls"`
	FailedTaskToolCalls       int             `json:"failedTaskToolCalls"`
	FailedDownstreamToolCalls int             `json:"failedDownstreamToolCalls"`
	InputTokens               *int64          `json:"inputTokens,omitempty"`
	OutputTokens              *int64          `json:"outputTokens,omitempty"`
	EditedFilesCount          int             `json:"editedFilesCount"`
	ErrorActionabilityScore   *int            `json:"errorActionabilityScore,omitempty"`
}

BenchmarkRunScoreRecord stores the persisted DB-first score snapshot for one benchmark run.

type BenchmarkRunTaskRunLinkFilter added in v0.4.1

type BenchmarkRunTaskRunLinkFilter struct {
	BenchmarkRunID  string
	BenchmarkRunIDs []string
	TaskRunID       string
}

BenchmarkRunTaskRunLinkFilter restricts benchmark/task link listing.

type BenchmarkRunTaskRunLinkRecord added in v0.4.1

type BenchmarkRunTaskRunLinkRecord struct {
	BenchmarkRunID string `json:"benchmarkRunId"`
	TaskRunID      string `json:"taskRunId"`
	LinkOrder      *int   `json:"linkOrder,omitempty"`
}

BenchmarkRunTaskRunLinkRecord stores one relational link between a benchmark run and a task run.

type BenchmarkSessionFilter added in v0.4.0

type BenchmarkSessionFilter struct {
	SuiteID     string
	SessionID   string
	SessionPath string
}

BenchmarkSessionFilter restricts benchmark session listing.

type BenchmarkSessionRecord added in v0.4.0

type BenchmarkSessionRecord struct {
	SessionID          string `json:"sessionId"`
	SuiteID            string `json:"suiteId"`
	SuiteName          string `json:"suiteName,omitempty"`
	SuitePath          string `json:"suitePath"`
	SessionPath        string `json:"sessionPath"`
	OutputRoot         string `json:"outputRoot"`
	TemplateID         string `json:"templateId"`
	TemplateName       string `json:"templateName,omitempty"`
	StartedAtUnixMilli int64  `json:"startedAtUnixMilli"`
	EndedAtUnixMilli   *int64 `json:"endedAtUnixMilli,omitempty"`
	Status             string `json:"status"`
	RepeatCount        int    `json:"repeatCount"`
}

BenchmarkSessionRecord stores relational benchmark session metadata.

type EventListCursor added in v0.4.2

type EventListCursor struct {
	CreatedAtUnixMilli int64
	ID                 string
}

EventListCursor identifies the last row included in one event page.

func ParseEventCursor added in v0.4.2

func ParseEventCursor(raw string) (EventListCursor, bool, error)

ParseEventCursor decodes one opaque cursor value.

func (EventListCursor) Encode added in v0.4.2

func (c EventListCursor) Encode() string

Encode returns the opaque string form used by the API.

type EventListFilter added in v0.4.2

type EventListFilter struct {
	Gateway     string
	ServerName  string
	ToolName    string
	Direction   string
	MessageType string
	RequestID   string
	SessionID   string
	Principal   string
	Success     *bool
	Cursor      *EventListCursor
	Limit       int
	// WithGovernanceEvent restricts the feed to events with direct or related task governance annotations.
	WithGovernanceEvent bool
}

EventListFilter restricts the global action-event feed.

type EventListItem added in v0.4.2

type EventListItem struct {
	ID                  string                   `json:"id"`
	CreatedAtUnixMilli  int64                    `json:"createdAtUnixMilli"`
	RequestID           string                   `json:"requestId,omitempty"`
	SessionID           string                   `json:"sessionId,omitempty"`
	Transport           string                   `json:"transport,omitempty"`
	Direction           string                   `json:"direction,omitempty"`
	MessageType         string                   `json:"messageType,omitempty"`
	Gateway             string                   `json:"gateway,omitempty"`
	ServerName          string                   `json:"serverName,omitempty"`
	Endpoint            string                   `json:"endpoint,omitempty"`
	ToolName            string                   `json:"toolName,omitempty"`
	OriginalToolName    string                   `json:"originalToolName,omitempty"`
	Success             bool                     `json:"success"`
	IsError             bool                     `json:"isError"`
	PayloadJSON         json.RawMessage          `json:"payloadJson,omitempty"`
	Annotations         []common.EventAnnotation `json:"annotations,omitempty"`
	TaskRunID           string                   `json:"taskRunId,omitempty"`
	InvocationPhasePath string                   `json:"invocationPhasePath,omitempty"`
	InvocationNodeKind  string                   `json:"invocationNodeKind,omitempty"`
}

EventListItem is one row in the global action-event feed.

type EventListPage added in v0.4.2

type EventListPage struct {
	Items      []EventListItem `json:"items"`
	NextCursor string          `json:"nextCursor,omitempty"`
}

EventListPage is the paginated response model for the global action-event feed.

type SchemaMigrationRequiredError

type SchemaMigrationRequiredError struct {
	StoredVersion   int
	ExpectedVersion int
}

SchemaMigrationRequiredError reports that an existing event store schema cannot be opened safely without an explicit migration path.

func (*SchemaMigrationRequiredError) Error

type Store

type Store struct {
	// contains filtered or unexported fields
}

Store persists task and action events to SQLite using Bun.

func NewSQLiteStore

func NewSQLiteStore(path string) (*Store, error)

NewSQLiteStore creates a Bun-backed SQLite store and bootstraps the schema.

func (*Store) ActionEventRowsByTaskRunID

func (s *Store) ActionEventRowsByTaskRunID(taskRunID string) ([]actionEventTaskContextRow, error)

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) ActivitySummary added in v0.4.4

func (s *Store) ActivitySummary(ctx context.Context, filter *ActivityFilter) (*ActivitySummary, error)

ActivitySummary aggregates interventions, request volume, and headline stats for the given window. It powers GET /api/{projectSlug}/activity.

func (*Store) AppendActionEvent

func (s *Store) AppendActionEvent(entry *common.LogEntry) error

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) Close

func (s *Store) Close() error

Close releases the underlying database handle.

func (*Store) DB

func (s *Store) DB() *bun.DB

DB exposes the Bun DB handle for focused tests.

func (*Store) DistinctPrincipals added in v0.4.4

func (s *Store) DistinctPrincipals(ctx context.Context, start, end int64) ([]string, error)

DistinctPrincipals returns the non-empty principal_ids that appear on action or task events. When both start and end are > 0 the scan is bounded to that window; otherwise it spans all events. Results are sorted and de-duplicated.

func (*Store) GetBenchmarkRun added in v0.4.0

func (s *Store) GetBenchmarkRun(ctx context.Context, benchmarkRunID string) (*BenchmarkRunRecord, error)

GetBenchmarkRun returns one benchmark run by id.

func (*Store) GetBenchmarkRunScore added in v0.4.0

func (s *Store) GetBenchmarkRunScore(ctx context.Context, benchmarkRunID string) (*BenchmarkRunScoreRecord, error)

GetBenchmarkRunScore returns one benchmark run score snapshot by run id.

func (*Store) GetBenchmarkSession added in v0.4.0

func (s *Store) GetBenchmarkSession(ctx context.Context, sessionID string) (*BenchmarkSessionRecord, error)

GetBenchmarkSession returns one benchmark session by id.

func (*Store) GetTaskRun added in v0.4.1

func (s *Store) GetTaskRun(ctx context.Context, runID string) (*TaskRunSummary, error)

GetTaskRun returns one aggregated task run summary by id.

func (*Store) GetTaskRunEvents

func (s *Store) GetTaskRunEvents(ctx context.Context, runID string) ([]TaskRunEvent, error)

GetTaskRunEvents returns the unified task/action timeline for one run.

func (*Store) GetTaskRunSnapshot added in v0.4.0

func (s *Store) GetTaskRunSnapshot(ctx context.Context, runID string) (*TaskRunSnapshotRecord, error)

GetTaskRunSnapshot returns one persisted run snapshot by id.

func (*Store) GetTaskRunStats added in v0.4.0

func (s *Store) GetTaskRunStats(ctx context.Context, runID string) (*TaskRunStatsRecord, error)

GetTaskRunStats returns one derived per-run stats row by run id.

func (*Store) ListBenchmarkRunScores added in v0.4.0

func (s *Store) ListBenchmarkRunScores(ctx context.Context) ([]BenchmarkRunScoreRecord, error)

ListBenchmarkRunScores returns all persisted benchmark run score snapshots.

func (s *Store) ListBenchmarkRunTaskRunLinks(ctx context.Context, filter *BenchmarkRunTaskRunLinkFilter) ([]BenchmarkRunTaskRunLinkRecord, error)

ListBenchmarkRunTaskRunLinks returns benchmark/task-run links filtered by run or task.

func (*Store) ListBenchmarkRuns added in v0.4.0

func (s *Store) ListBenchmarkRuns(ctx context.Context, filter *BenchmarkRunFilter) ([]BenchmarkRunRecord, error)

ListBenchmarkRuns returns relational benchmark runs filtered by lightweight metadata.

func (*Store) ListBenchmarkSessions added in v0.4.0

func (s *Store) ListBenchmarkSessions(ctx context.Context, filter BenchmarkSessionFilter) ([]BenchmarkSessionRecord, error)

ListBenchmarkSessions returns relational benchmark sessions filtered by lightweight metadata.

func (*Store) ListEvents added in v0.4.2

func (s *Store) ListEvents(ctx context.Context, filter *EventListFilter) (*EventListPage, error)

ListEvents returns paginated action events ordered newest-first.

func (s *Store) ListTaskRunBenchmarkLinks(ctx context.Context, runID string) ([]TaskRunBenchmarkLink, error)

ListTaskRunBenchmarkLinks returns benchmark runs linked to the given task run.

func (*Store) ListTaskRunSnapshots added in v0.4.0

func (s *Store) ListTaskRunSnapshots(ctx context.Context) ([]TaskRunSnapshotRecord, error)

ListTaskRunSnapshots returns persisted run snapshots ordered by update time descending.

func (*Store) ListTaskRunStats added in v0.4.0

func (s *Store) ListTaskRunStats(ctx context.Context) ([]TaskRunStatsRecord, error)

ListTaskRunStats returns all derived per-run stats ordered by start time descending.

func (*Store) ListTaskRuns

func (s *Store) ListTaskRuns(ctx context.Context, filter TaskRunFilter) ([]TaskRunSummary, error)

ListTaskRuns returns aggregated task run summaries ordered by start time descending.

func (*Store) RecomputeTaskRunStats added in v0.4.0

func (s *Store) RecomputeTaskRunStats(ctx context.Context, runID string) error

RecomputeTaskRunStats recomputes and persists stats for the given task run from raw events. Call this before reading stats when you need a guaranteed up-to-date view.

func (*Store) TaskEventRowsByTaskRunID

func (s *Store) TaskEventRowsByTaskRunID(taskRunID string) ([]taskEventRow, error)

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.

func (*Store) UpsertBenchmarkRun added in v0.4.0

func (s *Store) UpsertBenchmarkRun(ctx context.Context, record *BenchmarkRunRecord) error

UpsertBenchmarkRun persists or replaces one benchmark run row.

func (*Store) UpsertBenchmarkRunScore added in v0.4.0

func (s *Store) UpsertBenchmarkRunScore(ctx context.Context, record *BenchmarkRunScoreRecord) error

UpsertBenchmarkRunScore persists or replaces one benchmark run score snapshot row.

func (*Store) UpsertBenchmarkSession added in v0.4.0

func (s *Store) UpsertBenchmarkSession(ctx context.Context, record *BenchmarkSessionRecord) error

UpsertBenchmarkSession persists or replaces one benchmark session row.

func (*Store) UpsertTaskRunSnapshot added in v0.4.0

func (s *Store) UpsertTaskRunSnapshot(ctx context.Context, snapshot *taskruns.PersistedRunSnapshot) error

UpsertTaskRunSnapshot persists or replaces the latest snapshot for one task run.

type TaskRunBenchmarkLink struct {
	BenchmarkRunID     string `json:"benchmarkRunId"`
	SessionID          string `json:"sessionId"`
	SessionPath        string `json:"sessionPath,omitempty"`
	SuiteID            string `json:"suiteId"`
	SuiteName          string `json:"suiteName,omitempty"`
	CaseID             string `json:"caseId"`
	CaseName           string `json:"caseName,omitempty"`
	Agent              string `json:"agent"`
	SelectedModel      string `json:"selectedModel,omitempty"`
	TemplateVariant    string `json:"templateVariant"`
	Attempt            int    `json:"attempt"`
	StartedAtUnixMilli int64  `json:"startedAtUnixMilli"`
}

TaskRunBenchmarkLink is the benchmark metadata associated with one task run.

type TaskRunDetailMetadata added in v0.4.1

type TaskRunDetailMetadata struct {
	RunID          string                         `json:"runId"`
	Summary        *TaskRunSummary                `json:"summary,omitempty"`
	Snapshot       *taskruns.PersistedRunSnapshot `json:"snapshot,omitempty"`
	BenchmarkLinks []TaskRunBenchmarkLink         `json:"benchmarkLinks,omitempty"`
}

TaskRunDetailMetadata is the non-event metadata used by the task-run detail view.

type TaskRunEvent

type TaskRunEvent struct {
	Source             TaskRunEventSource       `json:"source"`
	ID                 string                   `json:"id"`
	CreatedAtUnixMilli int64                    `json:"createdAtUnixMilli"`
	PayloadJSON        json.RawMessage          `json:"payloadJson,omitempty"`
	Annotations        []common.EventAnnotation `json:"annotations,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 TaskRunFilter added in v0.4.1

type TaskRunFilter struct {
	BenchmarkSuiteID string
}

TaskRunFilter restricts task-run listing to one subset.

type TaskRunSnapshotRecord added in v0.4.0

type TaskRunSnapshotRecord struct {
	RunID              string                         `json:"runId"`
	CreatedAtUnixMilli int64                          `json:"createdAtUnixMilli"`
	UpdatedAtUnixMilli int64                          `json:"updatedAtUnixMilli"`
	TemplateID         string                         `json:"templateId"`
	TemplateName       string                         `json:"templateName"`
	Status             string                         `json:"status"`
	Phase              string                         `json:"phase"`
	Payload            *taskruns.PersistedRunSnapshot `json:"payload"`
}

TaskRunSnapshotRecord is the persisted snapshot row metadata plus payload.

type TaskRunStatsRecord added in v0.4.0

type TaskRunStatsRecord struct {
	RunID                    string `json:"runId"`
	CreatedAtUnixMilli       int64  `json:"createdAtUnixMilli"`
	UpdatedAtUnixMilli       int64  `json:"updatedAtUnixMilli"`
	StartedAtUnixMilli       int64  `json:"startedAtUnixMilli"`
	EndedAtUnixMilli         *int64 `json:"endedAtUnixMilli,omitempty"`
	DurationMillis           *int64 `json:"durationMillis,omitempty"`
	TaskToolCallCount        int    `json:"taskToolCallCount"`
	DownstreamToolCallCount  int    `json:"downstreamToolCallCount"`
	TaskToolErrorCount       int    `json:"taskToolErrorCount"`
	DownstreamToolErrorCount int    `json:"downstreamToolErrorCount"`
	RestartCount             int    `json:"restartCount"`
	FailCount                int    `json:"failCount"`
	TimeoutCount             int    `json:"timeoutCount"`
}

TaskRunStatsRecord stores generic per-run operational counters derived from persisted task and action events.

type TaskRunSummary

type TaskRunSummary struct {
	RunID            string `json:"runId"`
	TemplateID       string `json:"templateId"`
	TemplateName     string `json:"templateName,omitempty"`
	PrincipalID      string `json:"principalId,omitempty"`
	SessionID        string `json:"sessionId,omitempty"`
	ClientName       string `json:"clientName,omitempty"`
	ClientVersion    string `json:"clientVersion,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.

Jump to

Keyboard shortcuts

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