appruntime

package
v0.7.0-rc.7 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2026 License: AGPL-3.0 Imports: 51 Imported by: 0

Documentation

Overview

Package appruntime implements capabilities granted to a current app credential. App authority is confined to that app; it never certifies a human identity.

Index

Constants

View Source
const ActionStringPreviewBytes = 8 * 1024 // 8 KiB

ActionStringPreviewBytes caps verbose stream-like fields kept in the runs.actions audit log.

Variables

View Source
var ErrUpstream = errors.New("upstream operation failed")

Functions

This section is empty.

Types

type AuthorizationRequired

type AuthorizationRequired struct {
	Details map[string]string
}

func (*AuthorizationRequired) Error

func (e *AuthorizationRequired) Error() string

type Config

type Config struct {
	DB           *db.DB
	Runtime      *runtimesvc.Service
	Encryptor    secrets.Store
	OAuthClient  *oauth.Client
	S3           *storage.S3Client
	PubSub       *realtime.PubSub
	BridgeMgr    runtimesvc.BridgePartsDeliverer
	Scheduler    ScheduleReconciler
	PublicURL    string
	AgentBaseURL func(string) string
	HTTPNetwork  *networkpolicy.Policy
	Logger       *zap.Logger
	Builder      runtimesvc.UpgradeRunner
}

type ListMembersOptions

type ListMembersOptions struct {
	Limit  int
	Cursor string
}

type ModelStream

type ModelStream struct {
	Events   <-chan stream.Event
	Provider string
	Model    string
}

type ScheduleReconciler

type ScheduleReconciler interface {
	ReconcileAgentTx(context.Context, pgx.Tx, uuid.UUID, int64, []wire.JobCronDef) error
	Wake()
}

type Service

type Service struct {
	// contains filtered or unexported fields
}

func New

func New(c Config) *Service

func (*Service) CreateRun

func (*Service) Embed

func (h *Service) Embed(ctx context.Context, runIDHdr string, req wire.ModelProxyRequest) (*model.EmbedResult, error)

func (*Service) GetCheckpoint

func (h *Service) GetCheckpoint(ctx context.Context, runID uuid.UUID) (json.RawMessage, error)

func (*Service) GetEnvVarValue

func (h *Service) GetEnvVarValue(ctx context.Context, slug string) (wire.EnvVarValueResponse, error)

func (*Service) ImageGenerate

func (h *Service) ImageGenerate(ctx context.Context, runIDHdr string, req wire.ModelProxyRequest) (*model.ImageResult, error)

func (*Service) LLMStream

func (h *Service) LLMStream(ctx context.Context, runIDHeader string, req wire.LLMProxyRequest) (ModelStream, error)

func (*Service) ListMembers

ListMembers lists humans with direct or inherited grants on the current app. Directory entries describe membership, not execution authority or enrollment.

func (*Service) MCPToolCall

func (h *Service) MCPToolCall(ctx context.Context, slug string, req wire.MCPToolCallRequest) (*wire.MCPToolCallResponse, error)

func (*Service) Print

func (h *Service) Print(ctx context.Context, req wire.PrintRequest) error

func (*Service) ResolveRun

func (h *Service) ResolveRun(ctx context.Context, runID uuid.UUID) (execution.Context, error)

ResolveRun is the remote app callback gate. Native app-wide operations do not call it unless they associate their effects with an admitted run.

func (*Service) RunComplete

func (h *Service) RunComplete(ctx context.Context, req wire.RunCompleteRequest) error

func (*Service) ServiceProxy

func (h *Service) ServiceProxy(ctx context.Context, slug string, req wire.ProxyRequest) (*http.Response, error)

func (*Service) SessionAppend

func (h *Service) SessionAppend(ctx context.Context, convID uuid.UUID, req wire.SessionAppendRequest, runID pgtype.UUID) (wire.SessionAppendResponse, error)

func (*Service) SessionCompact

func (h *Service) SessionCompact(ctx context.Context, convID uuid.UUID, req wire.SessionCompactRequest) (wire.SessionCompactResponse, error)

func (*Service) SessionLoad

func (h *Service) SessionLoad(ctx context.Context, convID uuid.UUID) (wire.SessionLoadResponse, error)

func (*Service) SpeechGenerate

func (h *Service) SpeechGenerate(ctx context.Context, runIDHdr string, req wire.ModelProxyRequest) (*model.SpeechResult, error)

func (*Service) Sync

func (*Service) TopicSubscribe

func (h *Service) TopicSubscribe(ctx context.Context, slug string, convUUID uuid.UUID) error

func (*Service) TopicUnsubscribe

func (h *Service) TopicUnsubscribe(ctx context.Context, slug string, convUUID uuid.UUID) error

func (*Service) Transcribe

func (h *Service) Transcribe(ctx context.Context, runIDHdr string, req wire.ModelProxyRequest) (*model.TranscriptionResult, error)

func (*Service) Upgrade

func (h *Service) Upgrade(ctx context.Context, req wire.UpgradeRequest) error

func (*Service) UpsertEnvVar

func (h *Service) UpsertEnvVar(ctx context.Context, slug string, req wire.EnvVarDef) error

Jump to

Keyboard shortcuts

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