host

package
v0.35.12 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: MIT Imports: 40 Imported by: ? 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

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Home   string
	Name   string
	Prompt string
	// Dial makes the client of each model; nil calls the provider's API.
	Dial Dial
	// ClientFor, when set, picks the client a user's call goes through
	// instead of the catalog's, as a deployment that bills each user's own
	// account would.
	ClientFor   func(user, connection string) (llm.Client, error)
	Tools       []kit.Provider
	Hub         bool
	OptIn       []string
	Allowlist   []string
	Permissions policy.Settings
	// Sandboxes are the providers a user's environments are sandboxes of,
	// by id: this machine, a cloud's. Sandbox names the one every user's
	// first environment is a sandbox of.
	Sandboxes map[string]sandbox.Provider
	Sandbox   string
	// Commands is how commands run in every environment: timeouts and the
	// commands never run.
	Commands      workspace.Config
	Slots         int
	UserSlots     int
	RunLimit      time.Duration
	TaskSlots     int
	UserTaskSlots int
	TaskLimit     time.Duration
	Location      *time.Location
	Gateway       *gateway.Options
}

type Dial added in v0.27.1

Dial makes the client that calls one model of the deployment. The default speaks the provider's API at its base URL with its key; a deployment replaces it to route calls elsewhere, and tests to answer them.

type Host

type Host struct {
	Store store.Store
	App   *app.App
	Users *mcp.Users

	Gateway *gateway.Server
	// contains filtered or unexported fields
}

func New

func New(ctx context.Context, cfg Config) (*Host, error)

func (*Host) Close

func (h *Host) Close() error

func (*Host) Run

func (h *Host) Run(ctx context.Context) error

Jump to

Keyboard shortcuts

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