A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
wasm_system_actions.h
Go to the documentation of this file.
1// Copyright 2026 The A11 Authors
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15#ifndef A11_WASM_SYSTEM_ACTIONS_H_
16#define A11_WASM_SYSTEM_ACTIONS_H_
17
18#include <memory>
19#include <string>
20
21#include <absl/container/flat_hash_map.h>
22#include <absl/container/flat_hash_set.h>
23#include <absl/status/status.h>
24#include <absl/status/statusor.h>
25
27#include "a11/actions/schema.h"
28
29namespace a11::wasm {
30
32 absl::flat_hash_map<std::string, std::string> values;
33 absl::flat_hash_set<std::string> allowed_names;
34};
35
36absl::StatusOr<actions::ActionSchema> SchemaFromCatalogue(
37 std::string_view name);
39 std::shared_ptr<const Environment> environment,
40 bool register_environment);
41
42} // namespace a11::wasm
43
44#endif // A11_WASM_SYSTEM_ACTIONS_H_
Schemas describing an action's typed interface and its settings.
A thread-safe catalogue mapping action names to schema and handler.
Definition registry.h:59
std::string name
The declaration name and its colon.
Definition format.cc:50
std::vector< std::string > environment
Definition main.cc:138
Definition async_task.cc:27
absl::StatusOr< actions::ActionSchema > SchemaFromCatalogue(std::string_view name)
Definition wasm_system_actions.cc:187
absl::Status RegisterSystemActions(actions::ActionRegistry &registry, std::shared_ptr< const Environment > environment, bool register_environment)
Definition wasm_system_actions.cc:239
The action registry: a catalogue of named schema/handler pairs.
Definition wasm_system_actions.h:31
absl::flat_hash_set< std::string > allowed_names
Definition wasm_system_actions.h:33
absl::flat_hash_map< std::string, std::string > values
Definition wasm_system_actions.h:32