epwire

package
v1.148.0 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2026 License: Apache-2.0 Imports: 18 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 epwire assembles endpoints (#2170): the binding store, the bot check, the runner and manage_script's endpoint commands, from what the script wiring already holds. internal/platform/scriptwiring builds it and hands the commands to the script layer; the HTTP surface (internal/endpoint/ephttp) and the portal routes read the rest through the script layer's handle.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	DB      *sql.DB
	Server  *mcp.Server
	Audit   middleware.AuditLogger
	Metrics *observability.Metrics
	// Subjects resolves where an author's managed resources land.
	Subjects interface {
		ForRun(ctx context.Context, address string) string
	}
	Limits       scriptrun.PlatformLimits
	Destinations []script.Destination
	// Sources reads the managed-resource text a version loads.
	Sources *scriptsrc.Reader
	// Key signs proof-of-work challenges (botcheck.Key); nil leaves the
	// deployment unable to issue one.
	Key []byte
	// Encryptor decrypts the stored secret a bot check provider's key is in.
	Encryptor secretstore.Encryptor
	// BaseURL is the deployment's public address.
	BaseURL string
	// Authority resolves a run's roles to the persona a token key's
	// allow_personas is checked against.
	Authority scripttoken.Authority
}

Deps is what the script wiring hands over.

type Endpoints

type Endpoints struct {
	Bindings epbinding.Store
	Checker  *botcheck.Checker
	Runner   *eprun.Runner
	Commands *epcmd.Handler
	// Tokens answers the tokens a script mints and verifies (#2175), in an
	// endpoint request, a run and a draft alike.
	Tokens *scripttoken.Issuer
}

Endpoints is the assembled feature.

func Build

func Build(deps Deps) *Endpoints

Build assembles endpoints, or returns nil with no database: there is nowhere to keep a binding.

func (*Endpoints) TokenIssuer

func (e *Endpoints) TokenIssuer() *scripttoken.Issuer

TokenIssuer is the token issuer, nil on nil Endpoints: a deployment with no database issues no tokens.

Jump to

Keyboard shortcuts

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