Documentation
¶
Overview ¶
Package capabilities is the run-scoped authorization and dispatch boundary shared by direct tools and JavaScript capability callbacks.
Index ¶
- type AppInvoker
- type Platform
- type Scope
- type Service
- func (s *Service) CallTool(ctx context.Context, p authz.Principal, agentID uuid.UUID, name string, ...) (tool.Result, uuid.UUID, error)
- func (s *Service) Catalog(ctx context.Context, scope Scope) ([]capability.Definition, error)
- func (s *Service) Invoke(ctx context.Context, scope Scope, capabilityID, toolCallID string, ...) (result tool.Result, err error)
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 Platform ¶
type Platform interface {
InvokePlatform(context.Context, wire.RuntimeContext, capability.Definition, json.RawMessage) (tool.Result, error)
ValidateAppFiles(context.Context, wire.RuntimeContext, json.RawMessage, json.RawMessage) error
}
type Scope ¶
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 (*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)
Click to show internal directories.
Click to hide internal directories.