26#ifndef A11_FLOW_INTERPRETER_INTERPRETER_H_
27#define A11_FLOW_INTERPRETER_INTERPRETER_H_
34#include <absl/status/status.h>
35#include <absl/status/statusor.h>
36#include <absl/time/time.h>
42#include "sdk/flow/actions/policy.h"
65 std::shared_ptr<actions::ActionRegistry>
registry;
133 const sdk::flow::CapabilitiesPtr& capabilities,
bool standard_streams);
149absl::StatusOr<RunOutcome>
Check(
const Source& source);
A thread-safe catalogue mapping action names to schema and handler.
Definition registry.h:59
LexResult Run()
Definition lexer.cc:382
Definition interpreter.cc:48
absl::StatusOr< std::string > DescribeEntry(const Source &source)
The entry flow's ports, as text a person reads. Used by --check.
Definition interpreter.cc:196
absl::Status RegisterStandardLibrary(actions::ActionRegistry ®istry, const sdk::flow::CapabilitiesPtr &capabilities, bool standard_streams)
Registers the standard library on registry, under capabilities.
Definition interpreter.cc:161
absl::StatusOr< RunOutcome > Check(const Source &source)
Compiles source and says what its entry flow is, running nothing.
Definition interpreter.cc:190
The action registry: a catalogue of named schema/handler pairs.
How to run it.
Definition interpreter.h:53
std::shared_ptr< HostBridge > bridge
How the program reaches types and chunks its host knows about.
Definition interpreter.h:84
sdk::flow::CapabilitiesPtr capabilities
Required policy describing what the program may do.
Definition interpreter.h:62
std::vector< std::string > arguments
The program's argv.
Definition interpreter.h:59
std::shared_ptr< service::Session > session
The session the dispatch stream belongs to.
Definition interpreter.h:107
std::shared_ptr< net::WireStream > dispatch_stream
Where the program's call steps go, when they are to leave this process.
Definition interpreter.h:98
std::shared_ptr< actions::ActionRegistry > registry
Registry to run against. A null value creates a new registry.
Definition interpreter.h:65
bool standard_streams
Whether to bind this process's own standard streams.
Definition interpreter.h:76
std::optional< absl::Duration > timeout
Bound for the run and the standard-library actions it starts.
Definition interpreter.h:68
What came of it.
Definition interpreter.h:111
int exit_code
The program's exit code: what it put on an out exit_code: integer port, or 0.
Definition interpreter.h:114
std::vector< Diagnostic > diagnostics
Everything the compiler said that was not an error. Errors are the status.
Definition interpreter.h:116
What to run: the source, and a name for it that diagnostics will quote.
Definition interpreter.h:47
std::string name
Definition interpreter.h:49
std::string text
Definition interpreter.h:48
A11's transport abstraction: the bidirectional WireStream channel and the options/callbacks that driv...