capabilities

package
v0.7.0 Latest Latest
Warning

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

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

Documentation

Overview

Package capabilities is the run-scoped authorization and dispatch boundary shared by direct tools and JavaScript capability callbacks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppInvoker

type AppInvoker interface {
	InvokeRuntime(context.Context, uuid.UUID, wire.RuntimeInvokeRequest) (wire.RuntimeInvokeResponse, error)
}

type Scope

type Scope struct {
	AgentID    uuid.UUID
	RunID      uuid.UUID
	OwnerToken uuid.UUID
}

Scope is supplied by the host, never by script input or public HTTP headers. OwnerToken fences a hosted conversation run against lease loss.

type Service

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

func New

func New(database *db.DB, app AppInvoker, platform Platform) *Service

func (*Service) CallTool

func (s *Service) CallTool(ctx context.Context, p authz.Principal, agentID uuid.UUID, name string, input json.RawMessage, onStart func(dbq.Run, json.RawMessage) (json.RawMessage, error)) (tool.Result, uuid.UUID, error)

CallTool admits a single externally initiated app tool without a model loop. Registered callers need an actual app grant; the public floor is not a grant.

func (*Service) Catalog

func (s *Service) Catalog(ctx context.Context, scope Scope) ([]capability.Definition, error)

func (*Service) Invoke

func (s *Service) Invoke(ctx context.Context, scope Scope, capabilityID, toolCallID string, input json.RawMessage) (result tool.Result, err error)

Jump to

Keyboard shortcuts

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