bootstrap

package
v0.1.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2026 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Overview

Package bootstrap wires process startup dependencies.

Index

Constants

View Source
const ModelCommandUsage = `` /* 1004-byte string literal not displayed */

ModelCommandUsage is the help text for `buildmax-server model`.

View Source
const UserCommandUsage = `` /* 799-byte string literal not displayed */

UserCommandUsage is the help text for `buildmax-server user`.

Variables

View Source
var ErrAlreadyClaimed = errors.New("task run already claimed by another worker")

ErrAlreadyClaimed is returned by RunWorker when the run was already claimed by another worker.

Functions

func BuildArtifactStorage

func BuildArtifactStorage(cfg config.WorkspaceStorageConfig, runOutputDir func(userID, conversationID, taskID, taskRunID string) string, s3Client blob.S3Client) (blob.ArtifactStorage, error)

BuildArtifactStorage returns the configured artifact storage implementation. runOutputDir is (userID, conversationID, taskID, taskRunID) -> path for run output files.

func BuildPersistStorage

func BuildPersistStorage(cfg config.WorkspaceStorageConfig, persistRoot func(teamID string) string, s3Client blob.S3Client) (blob.PersistStorage, error)

BuildPersistStorage returns the configured persist storage implementation.

func BuildS3Client

func BuildS3Client(ctx context.Context, cfg config.WorkspaceStorageConfig) (blob.S3Client, error)

BuildS3Client creates an S3-compatible client. Use when either provider is minio.

Two shapes are supported, and the endpoint is what distinguishes them: a deployment naming an endpoint is talking to a store it runs or a vendor's S3-compatible service, while one that names none is talking to AWS S3 and wants the SDK's own regional endpoint resolution.

Credentials follow the same principle. Static keys are used when configured; leaving them empty falls through to the SDK's default chain, which is how a cluster reaches a bucket through IRSA, workload identity, or an instance profile instead of a long-lived key the deployment has to store and rotate.

func RunModelCommand

func RunModelCommand(ctx context.Context, args []string, out io.Writer) error

RunModelCommand executes `buildmax-server model ...`. args excludes the "model" word itself.

func RunServer

func RunServer(ctx context.Context, portOverride int) error

RunServer loads server.yaml, resolves the listen port (flag overrides config), opens the DB, builds blob storage, starts the scheduler, and runs the HTTP server. portOverride > 0 takes priority over the port in server.yaml.

func RunUserCommand

func RunUserCommand(ctx context.Context, args []string, out io.Writer) error

RunUserCommand executes `buildmax-server user ...`. args excludes the "user" word itself.

func RunWorker

func RunWorker(ctx context.Context, taskRunID string) error

RunWorker reads server.yaml for connection and storage config, fetches the task run from the server, marks it RUNNING, executes the agent, and uploads artifacts.

Types

This section is empty.

Jump to

Keyboard shortcuts

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