v1alpha1

package
v1.0.0-rc.4 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: Apache-2.0 Imports: 4 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package v1alpha1 holds Beekeeper's API: the runners that run agent sessions, the agent tasks runs offer, the sessions that run them and the provider subscriptions whose pace decides when a session may start.

Every resource lives in its organization's namespace. Beekeeper writes them; people and runs reach them only through Beekeeper's tools, which check the caller.

+kubebuilder:object:generate=true +groupName=beekeeper.giantswarm.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// SchemeBuilder registers Beekeeper's types with a scheme.
	SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes)
	// AddToScheme adds Beekeeper's types to a scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Classes lists the task classes in placement order.

View Source
var GroupVersion = schema.GroupVersion{Group: "beekeeper.giantswarm.io", Version: "v1alpha1"}

GroupVersion is the API group and version of Beekeeper's resources.

Functions

This section is empty.

Types

type AgentSession

type AgentSession struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   AgentSessionSpec   `json:"spec,omitempty"`
	Status AgentSessionStatus `json:"status,omitempty"`
}

AgentSession is one agent session, local or in the platform. Its liveness always comes through its runner's heartbeats.

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:categories=beekeeper +kubebuilder:printcolumn:name="Task",type=string,JSONPath=`.spec.task` +kubebuilder:printcolumn:name="Runner",type=string,JSONPath=`.spec.runner` +kubebuilder:printcolumn:name="Harness",type=string,JSONPath=`.spec.harness` +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`

func (*AgentSession) DeepCopy

func (in *AgentSession) DeepCopy() *AgentSession

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentSession.

func (*AgentSession) DeepCopyInto

func (in *AgentSession) DeepCopyInto(out *AgentSession)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AgentSession) DeepCopyObject

func (in *AgentSession) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AgentSessionList

type AgentSessionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []AgentSession `json:"items"`
}

AgentSessionList is a list of agent sessions.

func (*AgentSessionList) DeepCopy

func (in *AgentSessionList) DeepCopy() *AgentSessionList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentSessionList.

func (*AgentSessionList) DeepCopyInto

func (in *AgentSessionList) DeepCopyInto(out *AgentSessionList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AgentSessionList) DeepCopyObject

func (in *AgentSessionList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AgentSessionSpec

type AgentSessionSpec struct {
	// Task is the AgentTask the session runs.
	// +kubebuilder:validation:MinLength=1
	Task string `json:"task"`
	// Subject is the task's subject, so a later task of the same subject
	// can find the runner and transcript of its last session.
	// +kubebuilder:validation:MinLength=1
	Subject string `json:"subject"`
	// Runner is the runner the session runs on.
	// +kubebuilder:validation:MinLength=1
	Runner string `json:"runner"`
	// Host is the runner's host, as whom the session runs and pushes.
	// +kubebuilder:validation:MinLength=1
	Host string `json:"host"`
	// Harness is the agent CLI the session runs in.
	// +optional
	Harness string `json:"harness,omitempty"`
	// Model is the model the harness uses.
	// +optional
	Model string `json:"model,omitempty"`
	// Subscription is the subscription the session runs on.
	// +optional
	Subscription string `json:"subscription,omitempty"`
}

AgentSessionSpec is what a session is: one record wherever it runs.

func (*AgentSessionSpec) DeepCopy

func (in *AgentSessionSpec) DeepCopy() *AgentSessionSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentSessionSpec.

func (*AgentSessionSpec) DeepCopyInto

func (in *AgentSessionSpec) DeepCopyInto(out *AgentSessionSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AgentSessionStatus

type AgentSessionStatus struct {
	// Phase is where the session stands.
	// +optional
	Phase SessionPhase `json:"phase,omitempty"`
	// Reason says why the session failed or was lost.
	// +optional
	Reason string `json:"reason,omitempty"`
	// StartedAt is when the executor started the session.
	// +optional
	StartedAt *metav1.Time `json:"startedAt,omitempty"`
	// EndedAt is when the session ended.
	// +optional
	EndedAt *metav1.Time `json:"endedAt,omitempty"`
	// Progress is what the session has done so far.
	// +optional
	Progress Progress `json:"progress,omitempty"`
	// Result is the session's structured result.
	// +optional
	Result *Result `json:"result,omitempty"`
	// Transcript says where the session's turns are kept.
	// +optional
	Transcript Transcript `json:"transcript,omitempty"`
}

AgentSessionStatus is how a session went.

func (*AgentSessionStatus) DeepCopy

func (in *AgentSessionStatus) DeepCopy() *AgentSessionStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentSessionStatus.

func (*AgentSessionStatus) DeepCopyInto

func (in *AgentSessionStatus) DeepCopyInto(out *AgentSessionStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AgentTask

type AgentTask struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   AgentTaskSpec   `json:"spec,omitempty"`
	Status AgentTaskStatus `json:"status,omitempty"`
}

AgentTask is a piece of agent work a run offered, such as "implement issue X in repo Y with this context". Beekeeper places it on a runner of the task's organization, and the run follows its status.

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:categories=beekeeper +kubebuilder:printcolumn:name="Kind",type=string,JSONPath=`.spec.kind` +kubebuilder:printcolumn:name="Class",type=string,JSONPath=`.spec.class` +kubebuilder:printcolumn:name="Subject",type=string,JSONPath=`.spec.subject` +kubebuilder:printcolumn:name="Phase",type=string,JSONPath=`.status.phase` +kubebuilder:printcolumn:name="Runner",type=string,JSONPath=`.status.runner` +kubebuilder:printcolumn:name="Reason",type=string,JSONPath=`.status.reason`,priority=1 +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`

func (*AgentTask) DeepCopy

func (in *AgentTask) DeepCopy() *AgentTask

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentTask.

func (*AgentTask) DeepCopyInto

func (in *AgentTask) DeepCopyInto(out *AgentTask)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AgentTask) DeepCopyObject

func (in *AgentTask) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AgentTaskList

type AgentTaskList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []AgentTask `json:"items"`
}

AgentTaskList is a list of agent tasks.

func (*AgentTaskList) DeepCopy

func (in *AgentTaskList) DeepCopy() *AgentTaskList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentTaskList.

func (*AgentTaskList) DeepCopyInto

func (in *AgentTaskList) DeepCopyInto(out *AgentTaskList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AgentTaskList) DeepCopyObject

func (in *AgentTaskList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AgentTaskSpec

type AgentTaskSpec struct {
	// Key is the run's idempotency key. Offering the same key again returns
	// the same task.
	// +kubebuilder:validation:MinLength=1
	Key string `json:"key"`
	// Kind is the work, such as implement, review or test.
	// +kubebuilder:validation:MinLength=1
	Kind string `json:"kind"`
	// Class orders the task for placement.
	Class TaskClass `json:"class"`
	// Priority is the run's priority, lower first, as a board's priority
	// field orders its options. Unset sorts after every set priority.
	// +optional
	Priority *int32 `json:"priority,omitempty"`
	// Subject is what the task is about, such as an issue. A continuing task
	// prefers the runner of its subject's last session.
	// +kubebuilder:validation:MinLength=1
	Subject string `json:"subject"`
	// Repo is the repository the session works in, as owner/name.
	// +optional
	Repo string `json:"repo,omitempty"`
	// Branch is the branch the session works on.
	// +optional
	Branch string `json:"branch,omitempty"`
	// Fields are the subject's board fields, such as team, matched against
	// runners' focus. A field may have several values.
	// +optional
	Fields map[string][]string `json:"fields,omitempty"`
	// Requires must hold on the runner.
	// +optional
	Requires TaskRequirements `json:"requires,omitempty"`
	// Prefer steers placement among runners that fit.
	// +optional
	Prefer TaskPreferences `json:"prefer,omitempty"`
	// Context is a reference to the task's context bundle, which the runner
	// fetches when it accepts the offer.
	// +optional
	Context string `json:"context,omitempty"`
	// Deadline is the latest time a session may start. A task not started by
	// then fails.
	// +optional
	Deadline *metav1.Time `json:"deadline,omitempty"`
	// Inputs are further arguments for the session, as the run passed them.
	// +optional
	// +kubebuilder:pruning:PreserveUnknownFields
	// +kubebuilder:validation:Schemaless
	Inputs *runtime.RawExtension `json:"inputs,omitempty"`
}

AgentTaskSpec is what a run offered.

func (*AgentTaskSpec) DeepCopy

func (in *AgentTaskSpec) DeepCopy() *AgentTaskSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentTaskSpec.

func (*AgentTaskSpec) DeepCopyInto

func (in *AgentTaskSpec) DeepCopyInto(out *AgentTaskSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AgentTaskStatus

type AgentTaskStatus struct {
	// Phase is where the task stands.
	// +optional
	Phase TaskPhase `json:"phase,omitempty"`
	// Reason says, while the task is queued, why it waits, naming the gate
	// with its numbers; once it failed, why it failed.
	// +optional
	Reason string `json:"reason,omitempty"`
	// QueuedAt is when the task was offered, by Beekeeper's clock. Within a
	// class and priority, older tasks go first.
	// +optional
	QueuedAt *metav1.Time `json:"queuedAt,omitempty"`
	// Runner is the runner the task is offered to or runs on.
	// +optional
	Runner string `json:"runner,omitempty"`
	// Host is the runner's host, as whom the session runs.
	// +optional
	Host string `json:"host,omitempty"`
	// Harness is the harness the session runs in.
	// +optional
	Harness string `json:"harness,omitempty"`
	// Subscription is the subscription the session runs on.
	// +optional
	Subscription string `json:"subscription,omitempty"`
	// Provider is the subscription's provider.
	// +optional
	Provider string `json:"provider,omitempty"`
	// Session is the name of the task's current AgentSession.
	// +optional
	Session string `json:"session,omitempty"`
	// Placements counts the sessions started for this task: one, unless a
	// session failed within seconds of its start and the task was placed
	// again.
	// +optional
	Placements int32 `json:"placements,omitempty"`
	// OfferedAt is when the current offer was made.
	// +optional
	OfferedAt *metav1.Time `json:"offeredAt,omitempty"`
	// StartedAt is when the session started.
	// +optional
	StartedAt *metav1.Time `json:"startedAt,omitempty"`
	// EndedAt is when the task ended.
	// +optional
	EndedAt *metav1.Time `json:"endedAt,omitempty"`
	// Progress is what the session has done so far.
	// +optional
	Progress Progress `json:"progress,omitempty"`
	// Result is the session's structured result.
	// +optional
	Result *Result `json:"result,omitempty"`
	// Reservation is the headroom held on the session's subscription.
	// +optional
	Reservation *Reservation `json:"reservation,omitempty"`
	// CancelRequestedAt is when the run asked to cancel the task. A started
	// session is canceled once its runner confirms; a task whose runner
	// never confirms ends Canceled, not Lost, when its lease expires.
	// +optional
	CancelRequestedAt *metav1.Time `json:"cancelRequestedAt,omitempty"`
	// CancelReason is the reason the run gave for the cancel.
	// +optional
	CancelReason string `json:"cancelReason,omitempty"`
	// Declines are the runners' refusals, the latest per runner.
	// +optional
	// +listType=map
	// +listMapKey=runner
	Declines []Decline `json:"declines,omitempty"`
}

AgentTaskStatus is where a task stands and what it led to.

func (*AgentTaskStatus) DeepCopy

func (in *AgentTaskStatus) DeepCopy() *AgentTaskStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AgentTaskStatus.

func (*AgentTaskStatus) DeepCopyInto

func (in *AgentTaskStatus) DeepCopyInto(out *AgentTaskStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Decline

type Decline struct {
	// Runner that declined.
	Runner string `json:"runner"`
	// Reason the runner gave.
	Reason string `json:"reason"`
	// At is when it declined.
	At metav1.Time `json:"at"`
}

Decline is a runner's refusal of an offer.

func (*Decline) DeepCopy

func (in *Decline) DeepCopy() *Decline

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Decline.

func (*Decline) DeepCopyInto

func (in *Decline) DeepCopyInto(out *Decline)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Harness

type Harness struct {
	// Name is the harness, such as claude, codex or gemini.
	// +kubebuilder:validation:MinLength=1
	Name string `json:"name"`
	// Subscription is the name of the Subscription the harness is logged in
	// to, in the runner's namespace.
	// +kubebuilder:validation:MinLength=1
	Subscription string `json:"subscription"`
}

Harness is an agent CLI a runner can run, logged in to one subscription.

func (*Harness) DeepCopy

func (in *Harness) DeepCopy() *Harness

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Harness.

func (*Harness) DeepCopyInto

func (in *Harness) DeepCopyInto(out *Harness)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type HostAccess

type HostAccess struct {
	// Allowed is true when the host's login was valid and the host may use
	// the organization's namespace.
	Allowed bool `json:"allowed"`
	// Reason says why access was refused.
	// +optional
	Reason string `json:"reason,omitempty"`
	// CheckedAt is when Beekeeper checked.
	CheckedAt metav1.Time `json:"checkedAt"`
}

HostAccess is the result of Beekeeper's latest check of a runner's host.

func (*HostAccess) DeepCopy

func (in *HostAccess) DeepCopy() *HostAccess

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HostAccess.

func (*HostAccess) DeepCopyInto

func (in *HostAccess) DeepCopyInto(out *HostAccess)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Pressure

type Pressure struct {
	// Load is the one-minute load average divided by the number of CPUs.
	// +optional
	Load float64 `json:"load,omitempty"`
	// FreeMemory is the memory available to new work.
	// +optional
	FreeMemory *resource.Quantity `json:"freeMemory,omitempty"`
	// FreeDisk is the free space where the runner keeps its workspaces.
	// +optional
	FreeDisk *resource.Quantity `json:"freeDisk,omitempty"`
	// GitHubRemaining is the host's remaining GitHub API budget, since
	// agents push and read as the host. Unset means unknown.
	// +optional
	GitHubRemaining *int32 `json:"gitHubRemaining,omitempty"`
	// Busy is set by the host to take no new work.
	// +optional
	Busy bool `json:"busy,omitempty"`
	// ObservedAt is when the runner measured this.
	// +optional
	ObservedAt *metav1.Time `json:"observedAt,omitempty"`
}

Pressure is the load on a runner's machine, as the runner reports it whenever it changes.

func (*Pressure) DeepCopy

func (in *Pressure) DeepCopy() *Pressure

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Pressure.

func (*Pressure) DeepCopyInto

func (in *Pressure) DeepCopyInto(out *Pressure)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type PressureLimits

type PressureLimits struct {
	// MaxLoad is the highest load per CPU.
	// +optional
	MaxLoad *float64 `json:"maxLoad,omitempty"`
	// MinFreeMemory is the least free memory.
	// +optional
	MinFreeMemory *resource.Quantity `json:"minFreeMemory,omitempty"`
	// MinFreeDisk is the least free disk.
	// +optional
	MinFreeDisk *resource.Quantity `json:"minFreeDisk,omitempty"`
	// MinGitHubRemaining is the least remaining GitHub budget of the host.
	// +optional
	MinGitHubRemaining *int32 `json:"minGitHubRemaining,omitempty"`
}

PressureLimits are the bounds a runner's pressure must be within for it to get an offer. An unset limit takes Beekeeper's default.

func (*PressureLimits) DeepCopy

func (in *PressureLimits) DeepCopy() *PressureLimits

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PressureLimits.

func (*PressureLimits) DeepCopyInto

func (in *PressureLimits) DeepCopyInto(out *PressureLimits)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Progress

type Progress struct {
	// Turns is the number of agent turns.
	// +optional
	Turns int32 `json:"turns,omitempty"`
	// ToolCalls is the number of tool calls the agent made.
	// +optional
	ToolCalls int32 `json:"toolCalls,omitempty"`
	// Pushes is the number of pushes to GitHub.
	// +optional
	Pushes int32 `json:"pushes,omitempty"`
	// Tokens is the number of model tokens used.
	// +optional
	Tokens int64 `json:"tokens,omitempty"`
	// FirstPushAt is when the session first pushed to GitHub.
	// +optional
	FirstPushAt *metav1.Time `json:"firstPushAt,omitempty"`
	// UpdatedAt is when the runner last reported progress.
	// +optional
	UpdatedAt *metav1.Time `json:"updatedAt,omitempty"`
}

Progress is what a session has done so far, as its runner reports it.

func (*Progress) DeepCopy

func (in *Progress) DeepCopy() *Progress

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Progress.

func (*Progress) DeepCopyInto

func (in *Progress) DeepCopyInto(out *Progress)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Reading

type Reading struct {
	Usage `json:",inline"`
	// WeeklyResetsAt is when the weekly window starts again.
	WeeklyResetsAt metav1.Time `json:"weeklyResetsAt"`
	// ShortWindowResetsAt is when the short window starts again.
	// +optional
	ShortWindowResetsAt *metav1.Time `json:"shortWindowResetsAt,omitempty"`
	// ObservedAt is when the provider's numbers were read.
	ObservedAt metav1.Time `json:"observedAt"`
	// Runner is the runner that read them.
	// +optional
	Runner string `json:"runner,omitempty"`
}

Reading is a subscription's use as the provider's CLI reported it to a runner. The provider's numbers cover all use of the account.

func (*Reading) DeepCopy

func (in *Reading) DeepCopy() *Reading

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Reading.

func (*Reading) DeepCopyInto

func (in *Reading) DeepCopyInto(out *Reading)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Reservation

type Reservation struct {
	// Subscription the headroom is held on.
	Subscription string `json:"subscription"`
	// Weekly is the share of the weekly window held, in percent.
	Weekly float64 `json:"weekly"`
	// ShortWindow is the share of the short window held, in percent.
	ShortWindow float64 `json:"shortWindow"`
	// At is when it was reserved. A reading taken after it includes the
	// session's use, which ends the reservation.
	At metav1.Time `json:"at"`
}

Reservation is subscription headroom held for a session between readings, so two runners on one subscription don't both spend its last headroom.

func (*Reservation) DeepCopy

func (in *Reservation) DeepCopy() *Reservation

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Reservation.

func (*Reservation) DeepCopyInto

func (in *Reservation) DeepCopyInto(out *Reservation)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Result

type Result struct {
	// Summary says in a few sentences what the session did.
	// +optional
	Summary string `json:"summary,omitempty"`
	// Commits are the SHAs the session pushed.
	// +optional
	Commits []string `json:"commits,omitempty"`
	// Findings are problems the agent found outside its task.
	// +optional
	Findings []string `json:"findings,omitempty"`
	// Questions are what the agent needs a person to answer.
	// +optional
	Questions []string `json:"questions,omitempty"`
}

Result is the structured result a session ends with.

func (*Result) DeepCopy

func (in *Result) DeepCopy() *Result

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Result.

func (*Result) DeepCopyInto

func (in *Result) DeepCopyInto(out *Result)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Runner

type Runner struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   RunnerSpec   `json:"spec,omitempty"`
	Status RunnerStatus `json:"status,omitempty"`
}

Runner is a process on a laptop, a build machine or in a cluster that runs an organization's agent sessions. An idle runner is one process waiting on its stream to Beekeeper.

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:categories=beekeeper +kubebuilder:printcolumn:name="Host",type=string,JSONPath=`.spec.host` +kubebuilder:printcolumn:name="Kind",type=string,JSONPath=`.spec.kind` +kubebuilder:printcolumn:name="Slots",type=integer,JSONPath=`.spec.slots` +kubebuilder:printcolumn:name="Connected",type=boolean,JSONPath=`.status.connected` +kubebuilder:printcolumn:name="Age",type=date,JSONPath=`.metadata.creationTimestamp`

func (*Runner) DeepCopy

func (in *Runner) DeepCopy() *Runner

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Runner.

func (*Runner) DeepCopyInto

func (in *Runner) DeepCopyInto(out *Runner)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Runner) DeepCopyObject

func (in *Runner) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RunnerKind

type RunnerKind string

RunnerKind says where a runner runs. +kubebuilder:validation:Enum=local;cluster;responder

const (
	// RunnerLocal runs on a laptop, a build machine or a personal machine.
	RunnerLocal RunnerKind = "local"
	// RunnerCluster runs in a cluster and starts platform sessions only.
	RunnerCluster RunnerKind = "cluster"
	// RunnerResponder takes only incident tasks for the installations its
	// host covers.
	RunnerResponder RunnerKind = "responder"
)

type RunnerList

type RunnerList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Runner `json:"items"`
}

RunnerList is a list of runners.

func (*RunnerList) DeepCopy

func (in *RunnerList) DeepCopy() *RunnerList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerList.

func (*RunnerList) DeepCopyInto

func (in *RunnerList) DeepCopyInto(out *RunnerList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RunnerList) DeepCopyObject

func (in *RunnerList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RunnerSpec

type RunnerSpec struct {
	// Host is the person who registered the runner and is responsible for
	// it: the username Kubernetes knows them by. Sessions run and push as
	// the host.
	// +kubebuilder:validation:MinLength=1
	Host string `json:"host"`
	// Installation is the installation the runner is registered on.
	// +kubebuilder:validation:MinLength=1
	Installation string `json:"installation"`
	// Kind says where the runner runs.
	// +kubebuilder:default=local
	Kind RunnerKind `json:"kind,omitempty"`
	// Slots is how many sessions the runner runs at once.
	// +kubebuilder:validation:Minimum=0
	Slots int32 `json:"slots"`
	// Focus is a board filter in GitHub's syntax, such as `team:Bumblebee`
	// or `kind:"Bug 🐞"`, matched against a task's fields. Empty matches
	// every task.
	// +optional
	Focus string `json:"focus,omitempty"`
	// Purposes are the task kinds the runner takes, such as review. Empty
	// takes every kind.
	// +optional
	Purposes []string `json:"purposes,omitempty"`
	// Harnesses are the agent CLIs the runner can run, each with its
	// subscription.
	// +optional
	Harnesses []Harness `json:"harnesses,omitempty"`
	// Capabilities are what the runner can run beyond a harness, such as
	// docker or agentlab.
	// +optional
	Capabilities []string `json:"capabilities,omitempty"`
	// Limits bound the runner's pressure for it to get offers.
	// +optional
	Limits PressureLimits `json:"limits,omitempty"`
	// KeyHash is the SHA-256 of the runner's key, in hex. The key itself is
	// shown once, at registration, and never stored.
	// +kubebuilder:validation:Pattern=`^[0-9a-f]{64}$`
	KeyHash string `json:"keyHash"`
}

RunnerSpec is what a runner's host registered.

func (*RunnerSpec) DeepCopy

func (in *RunnerSpec) DeepCopy() *RunnerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerSpec.

func (*RunnerSpec) DeepCopyInto

func (in *RunnerSpec) DeepCopyInto(out *RunnerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type RunnerStatus

type RunnerStatus struct {
	// Connected is true while the runner holds its stream open.
	// +optional
	Connected bool `json:"connected,omitempty"`
	// LastSeen is when the runner last reached Beekeeper.
	// +optional
	LastSeen *metav1.Time `json:"lastSeen,omitempty"`
	// Pressure is the runner's latest report.
	// +optional
	Pressure *Pressure `json:"pressure,omitempty"`
	// HostAccess says whether the host may still use the organization's
	// namespace, as Beekeeper last checked before an offer.
	// +optional
	HostAccess *HostAccess `json:"hostAccess,omitempty"`
	// Conditions are the runner's conditions.
	// +optional
	// +listType=map
	// +listMapKey=type
	Conditions []metav1.Condition `json:"conditions,omitempty"`
}

RunnerStatus is what Beekeeper last learnt about a runner.

func (*RunnerStatus) DeepCopy

func (in *RunnerStatus) DeepCopy() *RunnerStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RunnerStatus.

func (*RunnerStatus) DeepCopyInto

func (in *RunnerStatus) DeepCopyInto(out *RunnerStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SessionPhase

type SessionPhase string

SessionPhase is where an agent session stands. +kubebuilder:validation:Enum=Started;Running;Succeeded;Failed;Lost;Canceled

const (
	// SessionStarted was started by the runner's executor.
	SessionStarted SessionPhase = "Started"
	// SessionRunning streams heartbeats and progress.
	SessionRunning SessionPhase = "Running"
	// SessionSucceeded ended with a result.
	SessionSucceeded SessionPhase = "Succeeded"
	// SessionFailed ended without success.
	SessionFailed SessionPhase = "Failed"
	// SessionLost stopped sending heartbeats before its lease expired.
	SessionLost SessionPhase = "Lost"
	// SessionCanceled was stopped by a cancel.
	SessionCanceled SessionPhase = "Canceled"
)

func (SessionPhase) Ended

func (p SessionPhase) Ended() bool

Ended reports whether the phase is an outcome.

type Subscription

type Subscription struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   SubscriptionSpec   `json:"spec,omitempty"`
	Status SubscriptionStatus `json:"status,omitempty"`
}

Subscription is a provider account, the login inside an agent CLI. Several runners, on one machine or many, may share one.

+kubebuilder:object:root=true +kubebuilder:subresource:status +kubebuilder:resource:categories=beekeeper +kubebuilder:printcolumn:name="Provider",type=string,JSONPath=`.spec.provider` +kubebuilder:printcolumn:name="Weekly",type=number,JSONPath=`.status.reading.weekly` +kubebuilder:printcolumn:name="Short",type=number,JSONPath=`.status.reading.shortWindow` +kubebuilder:printcolumn:name="Observed",type=date,JSONPath=`.status.reading.observedAt`

func (*Subscription) DeepCopy

func (in *Subscription) DeepCopy() *Subscription

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Subscription.

func (*Subscription) DeepCopyInto

func (in *Subscription) DeepCopyInto(out *Subscription)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Subscription) DeepCopyObject

func (in *Subscription) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SubscriptionList

type SubscriptionList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Subscription `json:"items"`
}

SubscriptionList is a list of subscriptions.

func (*SubscriptionList) DeepCopy

func (in *SubscriptionList) DeepCopy() *SubscriptionList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubscriptionList.

func (*SubscriptionList) DeepCopyInto

func (in *SubscriptionList) DeepCopyInto(out *SubscriptionList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*SubscriptionList) DeepCopyObject

func (in *SubscriptionList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type SubscriptionSpec

type SubscriptionSpec struct {
	// Provider is the account's provider, such as anthropic, openai or google.
	// +kubebuilder:validation:MinLength=1
	Provider string `json:"provider"`
	// Unpaced marks an account without a weekly budget, such as an API key:
	// it has no pace and no short window, and every reading fits.
	// +optional
	Unpaced bool `json:"unpaced,omitempty"`
	// WeekLength is the length of the weekly window. Default: 168h.
	// +optional
	WeekLength *metav1.Duration `json:"weekLength,omitempty"`
	// ShortWindowStop is the short window's use, in percent, at which no
	// session starts.
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=100
	// +optional
	ShortWindowStop *float64 `json:"shortWindowStop,omitempty"`
	// Headroom is how far, in percent of the week, a task that finishes
	// started work may run ahead of even pace.
	// +kubebuilder:validation:Minimum=0
	// +kubebuilder:validation:Maximum=100
	// +optional
	Headroom *float64 `json:"headroom,omitempty"`
	// StaleAfter is the age at which a reading counts as no room.
	// +optional
	StaleAfter *metav1.Duration `json:"staleAfter,omitempty"`
	// ReservePerSession is the headroom held for a session between its
	// start and the next reading.
	// +optional
	ReservePerSession *Usage `json:"reservePerSession,omitempty"`
}

SubscriptionSpec is a provider account and the rules for its pace. An unset rule takes Beekeeper's default.

func (*SubscriptionSpec) DeepCopy

func (in *SubscriptionSpec) DeepCopy() *SubscriptionSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubscriptionSpec.

func (*SubscriptionSpec) DeepCopyInto

func (in *SubscriptionSpec) DeepCopyInto(out *SubscriptionSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type SubscriptionStatus

type SubscriptionStatus struct {
	// Reading is the newest reading of any runner. An older one never
	// replaces it.
	// +optional
	Reading *Reading `json:"reading,omitempty"`
}

SubscriptionStatus holds a subscription's newest reading.

func (*SubscriptionStatus) DeepCopy

func (in *SubscriptionStatus) DeepCopy() *SubscriptionStatus

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new SubscriptionStatus.

func (*SubscriptionStatus) DeepCopyInto

func (in *SubscriptionStatus) DeepCopyInto(out *SubscriptionStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TaskClass

type TaskClass string

TaskClass orders agent tasks for placement: incidents first, then repairs, then work that continues something already started, then new work. +kubebuilder:validation:Enum=incident;repair;continuing;starting

const (
	// ClassIncident is an incident's investigation or repair.
	ClassIncident TaskClass = "incident"
	// ClassRepair repairs something broken, such as a red main branch.
	ClassRepair TaskClass = "repair"
	// ClassContinuing continues work a session already started, such as a
	// fix for review findings or a second attempt.
	ClassContinuing TaskClass = "continuing"
	// ClassStarting starts new work.
	ClassStarting TaskClass = "starting"
)

func (TaskClass) FinishesWork

func (c TaskClass) FinishesWork() bool

FinishesWork reports whether the class finishes work that has already started, which may run ahead of a subscription's pace up to its headroom.

func (TaskClass) Rank

func (c TaskClass) Rank() int

Rank is the class's place in the placement order, 0 first. An unknown class ranks after every known one.

func (TaskClass) Valid

func (c TaskClass) Valid() bool

Valid reports whether c is one of the known classes.

type TaskPhase

type TaskPhase string

TaskPhase is where an agent task stands. +kubebuilder:validation:Enum=Queued;Offered;Started;Running;Succeeded;Failed;Lost;Canceled

const (
	// TaskQueued waits for placement; the status's reason says why.
	TaskQueued TaskPhase = "Queued"
	// TaskOffered is offered to a runner, which hasn't answered yet.
	TaskOffered TaskPhase = "Offered"
	// TaskStarted was accepted, and the runner's executor started its session.
	TaskStarted TaskPhase = "Started"
	// TaskRunning has a session that streams heartbeats and progress.
	TaskRunning TaskPhase = "Running"
	// TaskSucceeded ended with its session's result.
	TaskSucceeded TaskPhase = "Succeeded"
	// TaskFailed ended without success; the status's reason says why.
	TaskFailed TaskPhase = "Failed"
	// TaskLost lost its session: the heartbeat lease expired.
	TaskLost TaskPhase = "Lost"
	// TaskCanceled was canceled by the run, and its session, if one
	// started, was stopped.
	TaskCanceled TaskPhase = "Canceled"
)

func (TaskPhase) Ended

func (p TaskPhase) Ended() bool

Ended reports whether the phase is an outcome. An ended task never changes phase again; a retry is a new task, which the run offers.

func (TaskPhase) HoldsSlot

func (p TaskPhase) HoldsSlot() bool

HoldsSlot reports whether a task in this phase holds a slot on its runner.

type TaskPreferences

type TaskPreferences struct {
	// Runner is the runner to offer the task to first. A continuing task
	// without one prefers the runner of its subject's last session.
	// +optional
	Runner string `json:"runner,omitempty"`
	// Provider is the provider whose subscriptions go first.
	// +optional
	Provider string `json:"provider,omitempty"`
	// ProviderOtherThan is a provider whose subscriptions go last, as a
	// review prefers a provider other than the implementer's.
	// +optional
	ProviderOtherThan string `json:"providerOtherThan,omitempty"`
	// Capabilities go first among runners that fit, such as a test target's.
	// +optional
	Capabilities []string `json:"capabilities,omitempty"`
}

TaskPreferences steer placement among runners that fit, and never hold a task back on their own, except that a preferred runner gets a short wait.

func (*TaskPreferences) DeepCopy

func (in *TaskPreferences) DeepCopy() *TaskPreferences

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskPreferences.

func (*TaskPreferences) DeepCopyInto

func (in *TaskPreferences) DeepCopyInto(out *TaskPreferences)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type TaskRequirements

type TaskRequirements struct {
	// Capabilities the runner must have, such as docker.
	// +optional
	Capabilities []string `json:"capabilities,omitempty"`
	// Harness the session must run in. Empty takes any.
	// +optional
	Harness string `json:"harness,omitempty"`
}

TaskRequirements must all hold on the runner that takes a task.

func (*TaskRequirements) DeepCopy

func (in *TaskRequirements) DeepCopy() *TaskRequirements

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new TaskRequirements.

func (*TaskRequirements) DeepCopyInto

func (in *TaskRequirements) DeepCopyInto(out *TaskRequirements)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Transcript

type Transcript struct {
	// Location is where the turns are: Beekeeper's session store for a
	// local session, the platform's session for a platform one.
	// +optional
	Location string `json:"location,omitempty"`
}

Transcript says where a session's turns are kept.

func (*Transcript) DeepCopy

func (in *Transcript) DeepCopy() *Transcript

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Transcript.

func (*Transcript) DeepCopyInto

func (in *Transcript) DeepCopyInto(out *Transcript)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Usage

type Usage struct {
	// Weekly is the share of the weekly window.
	// +kubebuilder:validation:Minimum=0
	// +optional
	Weekly float64 `json:"weekly,omitempty"`
	// ShortWindow is the share of the short window, such as five hours.
	// +kubebuilder:validation:Minimum=0
	// +optional
	ShortWindow float64 `json:"shortWindow,omitempty"`
}

Usage is a share of a subscription's windows, in percent.

func (*Usage) DeepCopy

func (in *Usage) DeepCopy() *Usage

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Usage.

func (*Usage) DeepCopyInto

func (in *Usage) DeepCopyInto(out *Usage)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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