Help us shape the future of Go! Take the 2026 Go Developer Survey

run

package
v0.1.21 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2026 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RunRowsFS embed.FS
View Source
var RunRowsPathURI = "/v1/api/agently/run/{id}"

Functions

func DefineRunRowsComponent

func DefineRunRowsComponent(ctx context.Context, srv *datly.Service) error

Types

type Filter

type Filter struct{}

func (*Filter) Compute

func (f *Filter) Compute(ctx context.Context, value interface{}) (*codec.Criteria, error)

Compute enforces run visibility using effective_user_id: - anonymous: only runs with empty effective_user_id (public/system) - authenticated: empty effective_user_id OR own effective_user_id

type RunRowsInput

type RunRowsInput struct {
	Id               string           `parameter:",kind=path,in=id" predicate:"equal,group=0,t,id"`
	TurnId           string           `parameter:",kind=query,in=turnId" predicate:"equal,group=0,t,turn_id"`
	ConversationId   string           `parameter:",kind=query,in=conversationId" predicate:"equal,group=0,t,conversation_id"`
	ScheduleId       string           `parameter:",kind=query,in=scheduleId" predicate:"equal,group=0,t,schedule_id"`
	WorkerId         string           `parameter:",kind=query,in=workerId" predicate:"equal,group=0,t,worker_id"`
	RunStatus        string           `parameter:",kind=query,in=status" predicate:"equal,group=0,t,status"`
	ExcludeStatuses  []string         `parameter:",kind=query,in=excludeStatuses" predicate:"not_in,group=0,t,status"`
	DefaultPredicate string           `parameter:",kind=const,in=value" predicate:"handler,group=0,*runfilter.Filter" value:"0"`
	Has              *RunRowsInputHas `setMarker:"true" format:"-" sqlx:"-" diff:"-" json:"-"`
}

func InputFromContext

func InputFromContext(ctx context.Context) *RunRowsInput

func (*RunRowsInput) EmbedFS

func (i *RunRowsInput) EmbedFS() *embed.FS

type RunRowsInputHas

type RunRowsInputHas struct {
	Id               bool
	TurnId           bool
	ConversationId   bool
	ScheduleId       bool
	WorkerId         bool
	RunStatus        bool
	ExcludeStatuses  bool
	DefaultPredicate bool
}

type RunRowsOutput

type RunRowsOutput struct {
	response.Status `parameter:",kind=output,in=status" json:",omitempty"`
	Data            []*RunRowsView   `parameter:",kind=output,in=view" view:"run_rows,batch=10000,relationalConcurrency=1" sql:"uri=run_rows/run_rows.sql"`
	Metrics         response.Metrics `parameter:",kind=output,in=metrics"`
}

type RunRowsView

type RunRowsView struct {
	AgentId               *string    `sqlx:"agent_id"`
	Attempt               int        `sqlx:"attempt"`
	AuthAudience          *string    `sqlx:"auth_audience"`
	AuthAuthority         *string    `sqlx:"auth_authority"`
	CheckpointData        *string    `sqlx:"checkpoint_data"`
	CheckpointMessageId   *string    `sqlx:"checkpoint_message_id"`
	CheckpointResponseId  *string    `sqlx:"checkpoint_response_id"`
	CompletedAt           *time.Time `sqlx:"completed_at"`
	ConversationId        *string    `sqlx:"conversation_id"`
	ConversationKind      string     `sqlx:"conversation_kind"`
	CreatedAt             time.Time  `sqlx:"created_at"`
	EffectiveUserId       *string    `sqlx:"effective_user_id"`
	ErrorCode             *string    `sqlx:"error_code"`
	ErrorMessage          *string    `sqlx:"error_message"`
	HeartbeatIntervalSec  *int       `sqlx:"heartbeat_interval_sec"`
	Id                    string     `sqlx:"id"`
	Iteration             int        `sqlx:"iteration"`
	LastHeartbeatAt       *time.Time `sqlx:"last_heartbeat_at"`
	LeaseOwner            *string    `sqlx:"lease_owner"`
	LeaseUntil            *time.Time `sqlx:"lease_until"`
	MaxIterations         *int       `sqlx:"max_iterations"`
	Model                 *string    `sqlx:"model"`
	ModelProvider         *string    `sqlx:"model_provider"`
	PreconditionPassed    *int       `sqlx:"precondition_passed"`
	PreconditionRanAt     *time.Time `sqlx:"precondition_ran_at"`
	PreconditionResult    *string    `sqlx:"precondition_result"`
	ResumedFromRunId      *string    `sqlx:"resumed_from_run_id"`
	ScheduleId            *string    `sqlx:"schedule_id"`
	ScheduledFor          *time.Time `sqlx:"scheduled_for"`
	SecurityContext       *string    `sqlx:"security_context"`
	StartedAt             *time.Time `sqlx:"started_at"`
	Status                string     `sqlx:"status"`
	TurnId                *string    `sqlx:"turn_id"`
	UpdatedAt             *time.Time `sqlx:"updated_at"`
	UsageCompletionTokens *int       `sqlx:"usage_completion_tokens"`
	UsageCost             *float64   `sqlx:"usage_cost"`
	UsagePromptTokens     *int       `sqlx:"usage_prompt_tokens"`
	UsageTotalTokens      *int       `sqlx:"usage_total_tokens"`
	UserCredUrl           *string    `sqlx:"user_cred_url"`
	WorkerHost            *string    `sqlx:"worker_host"`
	WorkerId              *string    `sqlx:"worker_id"`
	WorkerPid             *int       `sqlx:"worker_pid"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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