A11 (C++ runtime)
Native C++ implementation of the A11 streaming action runtime
Loading...
Searching...
No Matches
a11::flow::discover Namespace Reference

Source scanning for project action declarations. More...

Classes

struct  Options
 What to read and what to leave alone. More...
 
struct  Result
 Discovered actions and limits reached during the scan. More...
 

Typedefs

using Origin = catalogue::Origin
 Catalogue origin of a source declaration.
 

Enumerations

enum class  Language { kPython , kCpp , kTypeScript }
 A language an ActionSchema may be declared in. More...
 

Functions

std::optional< Language > LanguageOf (std::string_view path)
 The language a path's extension says it is, or nullopt for a file this does not read.
 
catalogue::Catalogue DiscoverInSource (std::string_view source, std::string_view path, Language language)
 Scans supplied source and records path as its origin.
 
Result Discover (absl::Span< const std::string > roots, const Options &options=Options::Default())
 Scans directories or files under roots for action declarations.
 

Variables

constexpr std::string_view kScanFormat = catalogue::kCatalogueFormat
 Scan results use the catalogue envelope format.
 

Detailed Description

Source scanning for project action declarations.

Reads literal ActionSchema fields in Python, C++, and TypeScript. Partial entries retain known fields; schemas without a literal name are omitted. Origins support navigation to declarations.

Typedef Documentation

◆ Origin

Catalogue origin of a source declaration.

Enumeration Type Documentation

◆ Language

enum class a11::flow::discover::Language
strong

A language an ActionSchema may be declared in.

Enumerator
kPython 
kCpp 
kTypeScript 

Function Documentation

◆ Discover()

Result a11::flow::discover::Discover ( absl::Span< const std::string >  roots,
const Options &  options = Options::Default() 
)

Scans directories or files under roots for action declarations.

Unreadable paths are skipped; the result records scan limits.

◆ DiscoverInSource()

catalogue::Catalogue a11::flow::discover::DiscoverInSource ( std::string_view  source,
std::string_view  path,
Language  language 
)

Scans supplied source and records path as its origin.

◆ LanguageOf()

std::optional< Language > a11::flow::discover::LanguageOf ( std::string_view  path)

The language a path's extension says it is, or nullopt for a file this does not read.

Variable Documentation

◆ kScanFormat

constexpr std::string_view a11::flow::discover::kScanFormat = catalogue::kCatalogueFormat
inlineconstexpr

Scan results use the catalogue envelope format.