agent

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Label holds the string label denoting the agent type in the database.
	Label = "agent"
	// FieldID holds the string denoting the id field in the database.
	FieldID = "id"
	// FieldProviderID holds the string denoting the provider_id field in the database.
	FieldProviderID = "provider_id"
	// FieldProjectID holds the string denoting the project_id field in the database.
	FieldProjectID = "project_id"
	// FieldName holds the string denoting the name field in the database.
	FieldName = "name"
	// FieldRuntimeControlState holds the string denoting the runtime_control_state field in the database.
	FieldRuntimeControlState = "runtime_control_state"
	// FieldTotalTokensUsed holds the string denoting the total_tokens_used field in the database.
	FieldTotalTokensUsed = "total_tokens_used"
	// FieldTotalTicketsCompleted holds the string denoting the total_tickets_completed field in the database.
	FieldTotalTicketsCompleted = "total_tickets_completed"
	// EdgeProvider holds the string denoting the provider edge name in mutations.
	EdgeProvider = "provider"
	// EdgeProject holds the string denoting the project edge name in mutations.
	EdgeProject = "project"
	// EdgeWorkflows holds the string denoting the workflows edge name in mutations.
	EdgeWorkflows = "workflows"
	// EdgeRuns holds the string denoting the runs edge name in mutations.
	EdgeRuns = "runs"
	// EdgeTokens holds the string denoting the tokens edge name in mutations.
	EdgeTokens = "tokens"
	// EdgeAgentTraceEvents holds the string denoting the agent_trace_events edge name in mutations.
	EdgeAgentTraceEvents = "agent_trace_events"
	// EdgeAgentStepEvents holds the string denoting the agent_step_events edge name in mutations.
	EdgeAgentStepEvents = "agent_step_events"
	// EdgeActivityEvents holds the string denoting the activity_events edge name in mutations.
	EdgeActivityEvents = "activity_events"
	// Table holds the table name of the agent in the database.
	Table = "agents"
	// ProviderTable is the table that holds the provider relation/edge.
	ProviderTable = "agents"
	// ProviderInverseTable is the table name for the AgentProvider entity.
	// It exists in this package in order to avoid circular dependency with the "agentprovider" package.
	ProviderInverseTable = "agent_providers"
	// ProviderColumn is the table column denoting the provider relation/edge.
	ProviderColumn = "provider_id"
	// ProjectTable is the table that holds the project relation/edge.
	ProjectTable = "agents"
	// ProjectInverseTable is the table name for the Project entity.
	// It exists in this package in order to avoid circular dependency with the "project" package.
	ProjectInverseTable = "projects"
	// ProjectColumn is the table column denoting the project relation/edge.
	ProjectColumn = "project_id"
	// WorkflowsTable is the table that holds the workflows relation/edge.
	WorkflowsTable = "workflows"
	// WorkflowsInverseTable is the table name for the Workflow entity.
	// It exists in this package in order to avoid circular dependency with the "workflow" package.
	WorkflowsInverseTable = "workflows"
	// WorkflowsColumn is the table column denoting the workflows relation/edge.
	WorkflowsColumn = "agent_id"
	// RunsTable is the table that holds the runs relation/edge.
	RunsTable = "agent_runs"
	// RunsInverseTable is the table name for the AgentRun entity.
	// It exists in this package in order to avoid circular dependency with the "agentrun" package.
	RunsInverseTable = "agent_runs"
	// RunsColumn is the table column denoting the runs relation/edge.
	RunsColumn = "agent_id"
	// TokensTable is the table that holds the tokens relation/edge.
	TokensTable = "agent_tokens"
	// TokensInverseTable is the table name for the AgentToken entity.
	// It exists in this package in order to avoid circular dependency with the "agenttoken" package.
	TokensInverseTable = "agent_tokens"
	// TokensColumn is the table column denoting the tokens relation/edge.
	TokensColumn = "agent_id"
	// AgentTraceEventsTable is the table that holds the agent_trace_events relation/edge.
	AgentTraceEventsTable = "agent_trace_events"
	// AgentTraceEventsInverseTable is the table name for the AgentTraceEvent entity.
	// It exists in this package in order to avoid circular dependency with the "agenttraceevent" package.
	AgentTraceEventsInverseTable = "agent_trace_events"
	// AgentTraceEventsColumn is the table column denoting the agent_trace_events relation/edge.
	AgentTraceEventsColumn = "agent_id"
	// AgentStepEventsTable is the table that holds the agent_step_events relation/edge.
	AgentStepEventsTable = "agent_step_events"
	// AgentStepEventsInverseTable is the table name for the AgentStepEvent entity.
	// It exists in this package in order to avoid circular dependency with the "agentstepevent" package.
	AgentStepEventsInverseTable = "agent_step_events"
	// AgentStepEventsColumn is the table column denoting the agent_step_events relation/edge.
	AgentStepEventsColumn = "agent_id"
	// ActivityEventsTable is the table that holds the activity_events relation/edge.
	ActivityEventsTable = "activity_events"
	// ActivityEventsInverseTable is the table name for the ActivityEvent entity.
	// It exists in this package in order to avoid circular dependency with the "activityevent" package.
	ActivityEventsInverseTable = "activity_events"
	// ActivityEventsColumn is the table column denoting the activity_events relation/edge.
	ActivityEventsColumn = "agent_id"
)
View Source
const DefaultRuntimeControlState = RuntimeControlStateActive

RuntimeControlStateActive is the default value of the RuntimeControlState enum.

Variables

View Source
var (
	// NameValidator is a validator for the "name" field. It is called by the builders before save.
	NameValidator func(string) error
	// DefaultTotalTokensUsed holds the default value on creation for the "total_tokens_used" field.
	DefaultTotalTokensUsed int64
	// DefaultTotalTicketsCompleted holds the default value on creation for the "total_tickets_completed" field.
	DefaultTotalTicketsCompleted int
	// DefaultID holds the default value on creation for the "id" field.
	DefaultID func() uuid.UUID
)

Columns holds all SQL columns for agent fields.

Functions

func And

func And(predicates ...predicate.Agent) predicate.Agent

And groups predicates with the AND operator between them.

func HasActivityEvents

func HasActivityEvents() predicate.Agent

HasActivityEvents applies the HasEdge predicate on the "activity_events" edge.

func HasActivityEventsWith

func HasActivityEventsWith(preds ...predicate.ActivityEvent) predicate.Agent

HasActivityEventsWith applies the HasEdge predicate on the "activity_events" edge with a given conditions (other predicates).

func HasAgentStepEvents

func HasAgentStepEvents() predicate.Agent

HasAgentStepEvents applies the HasEdge predicate on the "agent_step_events" edge.

func HasAgentStepEventsWith

func HasAgentStepEventsWith(preds ...predicate.AgentStepEvent) predicate.Agent

HasAgentStepEventsWith applies the HasEdge predicate on the "agent_step_events" edge with a given conditions (other predicates).

func HasAgentTraceEvents

func HasAgentTraceEvents() predicate.Agent

HasAgentTraceEvents applies the HasEdge predicate on the "agent_trace_events" edge.

func HasAgentTraceEventsWith

func HasAgentTraceEventsWith(preds ...predicate.AgentTraceEvent) predicate.Agent

HasAgentTraceEventsWith applies the HasEdge predicate on the "agent_trace_events" edge with a given conditions (other predicates).

func HasProject

func HasProject() predicate.Agent

HasProject applies the HasEdge predicate on the "project" edge.

func HasProjectWith

func HasProjectWith(preds ...predicate.Project) predicate.Agent

HasProjectWith applies the HasEdge predicate on the "project" edge with a given conditions (other predicates).

func HasProvider

func HasProvider() predicate.Agent

HasProvider applies the HasEdge predicate on the "provider" edge.

func HasProviderWith

func HasProviderWith(preds ...predicate.AgentProvider) predicate.Agent

HasProviderWith applies the HasEdge predicate on the "provider" edge with a given conditions (other predicates).

func HasRuns

func HasRuns() predicate.Agent

HasRuns applies the HasEdge predicate on the "runs" edge.

func HasRunsWith

func HasRunsWith(preds ...predicate.AgentRun) predicate.Agent

HasRunsWith applies the HasEdge predicate on the "runs" edge with a given conditions (other predicates).

func HasTokens

func HasTokens() predicate.Agent

HasTokens applies the HasEdge predicate on the "tokens" edge.

func HasTokensWith

func HasTokensWith(preds ...predicate.AgentToken) predicate.Agent

HasTokensWith applies the HasEdge predicate on the "tokens" edge with a given conditions (other predicates).

func HasWorkflows

func HasWorkflows() predicate.Agent

HasWorkflows applies the HasEdge predicate on the "workflows" edge.

func HasWorkflowsWith

func HasWorkflowsWith(preds ...predicate.Workflow) predicate.Agent

HasWorkflowsWith applies the HasEdge predicate on the "workflows" edge with a given conditions (other predicates).

func ID

func ID(id uuid.UUID) predicate.Agent

ID filters vertices based on their ID field.

func IDEQ

func IDEQ(id uuid.UUID) predicate.Agent

IDEQ applies the EQ predicate on the ID field.

func IDGT

func IDGT(id uuid.UUID) predicate.Agent

IDGT applies the GT predicate on the ID field.

func IDGTE

func IDGTE(id uuid.UUID) predicate.Agent

IDGTE applies the GTE predicate on the ID field.

func IDIn

func IDIn(ids ...uuid.UUID) predicate.Agent

IDIn applies the In predicate on the ID field.

func IDLT

func IDLT(id uuid.UUID) predicate.Agent

IDLT applies the LT predicate on the ID field.

func IDLTE

func IDLTE(id uuid.UUID) predicate.Agent

IDLTE applies the LTE predicate on the ID field.

func IDNEQ

func IDNEQ(id uuid.UUID) predicate.Agent

IDNEQ applies the NEQ predicate on the ID field.

func IDNotIn

func IDNotIn(ids ...uuid.UUID) predicate.Agent

IDNotIn applies the NotIn predicate on the ID field.

func Name

func Name(v string) predicate.Agent

Name applies equality check predicate on the "name" field. It's identical to NameEQ.

func NameContains

func NameContains(v string) predicate.Agent

NameContains applies the Contains predicate on the "name" field.

func NameContainsFold

func NameContainsFold(v string) predicate.Agent

NameContainsFold applies the ContainsFold predicate on the "name" field.

func NameEQ

func NameEQ(v string) predicate.Agent

NameEQ applies the EQ predicate on the "name" field.

func NameEqualFold

func NameEqualFold(v string) predicate.Agent

NameEqualFold applies the EqualFold predicate on the "name" field.

func NameGT

func NameGT(v string) predicate.Agent

NameGT applies the GT predicate on the "name" field.

func NameGTE

func NameGTE(v string) predicate.Agent

NameGTE applies the GTE predicate on the "name" field.

func NameHasPrefix

func NameHasPrefix(v string) predicate.Agent

NameHasPrefix applies the HasPrefix predicate on the "name" field.

func NameHasSuffix

func NameHasSuffix(v string) predicate.Agent

NameHasSuffix applies the HasSuffix predicate on the "name" field.

func NameIn

func NameIn(vs ...string) predicate.Agent

NameIn applies the In predicate on the "name" field.

func NameLT

func NameLT(v string) predicate.Agent

NameLT applies the LT predicate on the "name" field.

func NameLTE

func NameLTE(v string) predicate.Agent

NameLTE applies the LTE predicate on the "name" field.

func NameNEQ

func NameNEQ(v string) predicate.Agent

NameNEQ applies the NEQ predicate on the "name" field.

func NameNotIn

func NameNotIn(vs ...string) predicate.Agent

NameNotIn applies the NotIn predicate on the "name" field.

func Not

Not applies the not operator on the given predicate.

func Or

func Or(predicates ...predicate.Agent) predicate.Agent

Or groups predicates with the OR operator between them.

func ProjectID

func ProjectID(v uuid.UUID) predicate.Agent

ProjectID applies equality check predicate on the "project_id" field. It's identical to ProjectIDEQ.

func ProjectIDEQ

func ProjectIDEQ(v uuid.UUID) predicate.Agent

ProjectIDEQ applies the EQ predicate on the "project_id" field.

func ProjectIDIn

func ProjectIDIn(vs ...uuid.UUID) predicate.Agent

ProjectIDIn applies the In predicate on the "project_id" field.

func ProjectIDNEQ

func ProjectIDNEQ(v uuid.UUID) predicate.Agent

ProjectIDNEQ applies the NEQ predicate on the "project_id" field.

func ProjectIDNotIn

func ProjectIDNotIn(vs ...uuid.UUID) predicate.Agent

ProjectIDNotIn applies the NotIn predicate on the "project_id" field.

func ProviderID

func ProviderID(v uuid.UUID) predicate.Agent

ProviderID applies equality check predicate on the "provider_id" field. It's identical to ProviderIDEQ.

func ProviderIDEQ

func ProviderIDEQ(v uuid.UUID) predicate.Agent

ProviderIDEQ applies the EQ predicate on the "provider_id" field.

func ProviderIDIn

func ProviderIDIn(vs ...uuid.UUID) predicate.Agent

ProviderIDIn applies the In predicate on the "provider_id" field.

func ProviderIDNEQ

func ProviderIDNEQ(v uuid.UUID) predicate.Agent

ProviderIDNEQ applies the NEQ predicate on the "provider_id" field.

func ProviderIDNotIn

func ProviderIDNotIn(vs ...uuid.UUID) predicate.Agent

ProviderIDNotIn applies the NotIn predicate on the "provider_id" field.

func RuntimeControlStateEQ

func RuntimeControlStateEQ(v RuntimeControlState) predicate.Agent

RuntimeControlStateEQ applies the EQ predicate on the "runtime_control_state" field.

func RuntimeControlStateIn

func RuntimeControlStateIn(vs ...RuntimeControlState) predicate.Agent

RuntimeControlStateIn applies the In predicate on the "runtime_control_state" field.

func RuntimeControlStateNEQ

func RuntimeControlStateNEQ(v RuntimeControlState) predicate.Agent

RuntimeControlStateNEQ applies the NEQ predicate on the "runtime_control_state" field.

func RuntimeControlStateNotIn

func RuntimeControlStateNotIn(vs ...RuntimeControlState) predicate.Agent

RuntimeControlStateNotIn applies the NotIn predicate on the "runtime_control_state" field.

func RuntimeControlStateValidator

func RuntimeControlStateValidator(rcs RuntimeControlState) error

RuntimeControlStateValidator is a validator for the "runtime_control_state" field enum values. It is called by the builders before save.

func TotalTicketsCompleted

func TotalTicketsCompleted(v int) predicate.Agent

TotalTicketsCompleted applies equality check predicate on the "total_tickets_completed" field. It's identical to TotalTicketsCompletedEQ.

func TotalTicketsCompletedEQ

func TotalTicketsCompletedEQ(v int) predicate.Agent

TotalTicketsCompletedEQ applies the EQ predicate on the "total_tickets_completed" field.

func TotalTicketsCompletedGT

func TotalTicketsCompletedGT(v int) predicate.Agent

TotalTicketsCompletedGT applies the GT predicate on the "total_tickets_completed" field.

func TotalTicketsCompletedGTE

func TotalTicketsCompletedGTE(v int) predicate.Agent

TotalTicketsCompletedGTE applies the GTE predicate on the "total_tickets_completed" field.

func TotalTicketsCompletedIn

func TotalTicketsCompletedIn(vs ...int) predicate.Agent

TotalTicketsCompletedIn applies the In predicate on the "total_tickets_completed" field.

func TotalTicketsCompletedLT

func TotalTicketsCompletedLT(v int) predicate.Agent

TotalTicketsCompletedLT applies the LT predicate on the "total_tickets_completed" field.

func TotalTicketsCompletedLTE

func TotalTicketsCompletedLTE(v int) predicate.Agent

TotalTicketsCompletedLTE applies the LTE predicate on the "total_tickets_completed" field.

func TotalTicketsCompletedNEQ

func TotalTicketsCompletedNEQ(v int) predicate.Agent

TotalTicketsCompletedNEQ applies the NEQ predicate on the "total_tickets_completed" field.

func TotalTicketsCompletedNotIn

func TotalTicketsCompletedNotIn(vs ...int) predicate.Agent

TotalTicketsCompletedNotIn applies the NotIn predicate on the "total_tickets_completed" field.

func TotalTokensUsed

func TotalTokensUsed(v int64) predicate.Agent

TotalTokensUsed applies equality check predicate on the "total_tokens_used" field. It's identical to TotalTokensUsedEQ.

func TotalTokensUsedEQ

func TotalTokensUsedEQ(v int64) predicate.Agent

TotalTokensUsedEQ applies the EQ predicate on the "total_tokens_used" field.

func TotalTokensUsedGT

func TotalTokensUsedGT(v int64) predicate.Agent

TotalTokensUsedGT applies the GT predicate on the "total_tokens_used" field.

func TotalTokensUsedGTE

func TotalTokensUsedGTE(v int64) predicate.Agent

TotalTokensUsedGTE applies the GTE predicate on the "total_tokens_used" field.

func TotalTokensUsedIn

func TotalTokensUsedIn(vs ...int64) predicate.Agent

TotalTokensUsedIn applies the In predicate on the "total_tokens_used" field.

func TotalTokensUsedLT

func TotalTokensUsedLT(v int64) predicate.Agent

TotalTokensUsedLT applies the LT predicate on the "total_tokens_used" field.

func TotalTokensUsedLTE

func TotalTokensUsedLTE(v int64) predicate.Agent

TotalTokensUsedLTE applies the LTE predicate on the "total_tokens_used" field.

func TotalTokensUsedNEQ

func TotalTokensUsedNEQ(v int64) predicate.Agent

TotalTokensUsedNEQ applies the NEQ predicate on the "total_tokens_used" field.

func TotalTokensUsedNotIn

func TotalTokensUsedNotIn(vs ...int64) predicate.Agent

TotalTokensUsedNotIn applies the NotIn predicate on the "total_tokens_used" field.

func ValidColumn

func ValidColumn(column string) bool

ValidColumn reports if the column name is valid (part of the table columns).

Types

type OrderOption

type OrderOption func(*sql.Selector)

OrderOption defines the ordering options for the Agent queries.

func ByActivityEvents

func ByActivityEvents(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByActivityEvents orders the results by activity_events terms.

func ByActivityEventsCount

func ByActivityEventsCount(opts ...sql.OrderTermOption) OrderOption

ByActivityEventsCount orders the results by activity_events count.

func ByAgentStepEvents

func ByAgentStepEvents(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByAgentStepEvents orders the results by agent_step_events terms.

func ByAgentStepEventsCount

func ByAgentStepEventsCount(opts ...sql.OrderTermOption) OrderOption

ByAgentStepEventsCount orders the results by agent_step_events count.

func ByAgentTraceEvents

func ByAgentTraceEvents(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByAgentTraceEvents orders the results by agent_trace_events terms.

func ByAgentTraceEventsCount

func ByAgentTraceEventsCount(opts ...sql.OrderTermOption) OrderOption

ByAgentTraceEventsCount orders the results by agent_trace_events count.

func ByID

func ByID(opts ...sql.OrderTermOption) OrderOption

ByID orders the results by the id field.

func ByName

func ByName(opts ...sql.OrderTermOption) OrderOption

ByName orders the results by the name field.

func ByProjectField

func ByProjectField(field string, opts ...sql.OrderTermOption) OrderOption

ByProjectField orders the results by project field.

func ByProjectID

func ByProjectID(opts ...sql.OrderTermOption) OrderOption

ByProjectID orders the results by the project_id field.

func ByProviderField

func ByProviderField(field string, opts ...sql.OrderTermOption) OrderOption

ByProviderField orders the results by provider field.

func ByProviderID

func ByProviderID(opts ...sql.OrderTermOption) OrderOption

ByProviderID orders the results by the provider_id field.

func ByRuns

func ByRuns(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByRuns orders the results by runs terms.

func ByRunsCount

func ByRunsCount(opts ...sql.OrderTermOption) OrderOption

ByRunsCount orders the results by runs count.

func ByRuntimeControlState

func ByRuntimeControlState(opts ...sql.OrderTermOption) OrderOption

ByRuntimeControlState orders the results by the runtime_control_state field.

func ByTokens

func ByTokens(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByTokens orders the results by tokens terms.

func ByTokensCount

func ByTokensCount(opts ...sql.OrderTermOption) OrderOption

ByTokensCount orders the results by tokens count.

func ByTotalTicketsCompleted

func ByTotalTicketsCompleted(opts ...sql.OrderTermOption) OrderOption

ByTotalTicketsCompleted orders the results by the total_tickets_completed field.

func ByTotalTokensUsed

func ByTotalTokensUsed(opts ...sql.OrderTermOption) OrderOption

ByTotalTokensUsed orders the results by the total_tokens_used field.

func ByWorkflows

func ByWorkflows(term sql.OrderTerm, terms ...sql.OrderTerm) OrderOption

ByWorkflows orders the results by workflows terms.

func ByWorkflowsCount

func ByWorkflowsCount(opts ...sql.OrderTermOption) OrderOption

ByWorkflowsCount orders the results by workflows count.

type RuntimeControlState

type RuntimeControlState string

RuntimeControlState defines the type for the "runtime_control_state" enum field.

const (
	RuntimeControlStateActive         RuntimeControlState = "active"
	RuntimeControlStatePauseRequested RuntimeControlState = "pause_requested"
	RuntimeControlStatePaused         RuntimeControlState = "paused"
	RuntimeControlStateRetired        RuntimeControlState = "retired"
)

RuntimeControlState values.

func (RuntimeControlState) String

func (rcs RuntimeControlState) String() string

Jump to

Keyboard shortcuts

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