A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
a11::actions::ActionPortSchema Struct Reference

Schema for a single input or output port of an action. More...

#include <cpp/a11/actions/schema.h>

Public Member Functions

absl::Status Validate () const
 Validates the port schema.
 

Public Attributes

std::string name
 Port name (unique within its direction).
 
std::string type
 Payload type name.
 
std::string description = {}
 Human-readable description.
 
bool required = false
 Whether the port must be supplied.
 
bool unary = false
 Whether the port carries a single value.
 
std::vector< std::optional< data::NodeFragment > > autofills {}
 Input-default fragments; an autofilled input must otherwise be empty.
 
std::string json_schema = {}
 JSON Schema for the port's payload, as text.
 
std::shared_ptr< void > typeinfo {nullptr}
 Owning, opaque type handle installed by a language binding.
 

Friends

bool operator== (const ActionPortSchema &, const ActionPortSchema &)=default
 

Detailed Description

Schema for a single input or output port of an action.

Describes the port's name and payload type, whether it is required and unary (a single value rather than a stream), an optional description, and input autofills. Before applying autofills the runtime requires that input to be writable and empty; existing data causes the action to fail rather than overriding a receiver-owned default.

Member Function Documentation

◆ Validate()

absl::Status a11::actions::ActionPortSchema::Validate ( ) const

Validates the port schema.

Friends And Related Symbol Documentation

◆ operator==

bool operator== ( const ActionPortSchema &  ,
const ActionPortSchema &   
)
friend

Member Data Documentation

◆ autofills

std::vector<std::optional<data::NodeFragment> > a11::actions::ActionPortSchema::autofills {}

Input-default fragments; an autofilled input must otherwise be empty.

◆ description

std::string a11::actions::ActionPortSchema::description = {}

Human-readable description.

◆ json_schema

std::string a11::actions::ActionPortSchema::json_schema = {}

JSON Schema for the port's payload, as text.

Empty when unknown.

The describable half of typeinfo. A binding holds a live type handle it alone can interpret; this is what it can say about that type to somebody else – a peer asking what this side serves, a model being shown a tool. It is a plain string because the actions layer must be able to forward it without understanding it, and because a descriptor that crossed a wire has no type handle left to derive it from.

◆ name

std::string a11::actions::ActionPortSchema::name

Port name (unique within its direction).

◆ required

bool a11::actions::ActionPortSchema::required = false

Whether the port must be supplied.

◆ type

std::string a11::actions::ActionPortSchema::type

Payload type name.

◆ typeinfo

std::shared_ptr<void> a11::actions::ActionPortSchema::typeinfo {nullptr}

Owning, opaque type handle installed by a language binding.

The actions layer retains but never dereferences it. Empty when no type is bound.

◆ unary

bool a11::actions::ActionPortSchema::unary = false

Whether the port carries a single value.


The documentation for this struct was generated from the following files: