Expand description
Role-specific execution traits and command-line configuration values.
Each trait is a marker extending Execute. It identifies
the intended operation but adds no constructor, input parameter, or runtime
validation. T is the result type; the implementation chooses the associated
Error type. Bounds can constrain it with, for example,
Fetcher<T, Error = E>. Indexer has no type parameters and uses () for
its result; its error can likewise be constrained with Indexer<Error = E>.
§Pattern catalog
| Trait | Logical input | Logical output | Options |
|---|---|---|---|
Adapter | SPARQL query | RDF query result | AdapterOptions |
Compiler | Natural-language text | SPARQL query | CompilerOptions |
Emitter | None | Generated RDF | EmitterOptions |
Fetcher | One URL | RDF describing the resource | FetcherOptions |
Indexer | RDF | None; updates a persistent index | IndexerOptions |
Lister | One collection URL | RDF describing zero or more entries | ListerOptions |
Matcher | RDF | RDF describing matches | MatcherOptions |
Prompter | Prompt text | Response text | PrompterOptions |
Reader | Document or byte stream | Imported RDF | ReaderOptions |
Reasoner | RDF | Entailed RDF | ReasonerOptions |
Resolver | One URI | Zero or more URLs | ResolverOptions |
Runner | Program text | Execution result as text | RunnerOptions |
Writer | RDF | Exported document or byte stream | WriterOptions |
All thirteen patterns in the specification have corresponding traits
here and process wrappers in asimov-runner. RDF in this table denotes
graphs or datasets, not individual statements, records, or buffers.
§Results and streaming
These traits prescribe semantic roles, not buffering, stream types, or
process management. A streaming implementation must distinguish successful
startup from eventual completion and expose later errors through its result.
Receiving output alone does not establish success; see Execute.
Concrete behavior is documented in asimov-runner: consult its
execution and results section for result types, input ownership,
output routing, and cancellation; completion outcomes for error
precedence; and JSONL transport for graph framing, batching, and composition.
The runner’s linear pipelines connect compatible process-backed
programs and coordinate their completion independently of these marker traits.
§Native capabilities
ListerCapabilities describes optional native sorting, numeric offset,
URI cursor (before/after), and limit support separately from the requests
in ListerOptions. Each capability uses
OptionSupport: unknown, supported, or unsupported.
Callers can translate manifest metadata into these values without this crate
depending on a manifest schema. Capabilities do not imply host emulation;
forwarding and fallback policies are documented by the concrete executor.
§Options and defaults
Every options type supports Default, direct field access, and a
builder(). Defaults leave optional fields unset and collections empty;
builders accept values convertible to String for string fields. Values
are stored without checking whether the selected program supports them.
The companion asimov-runner wrappers emit configured fields as
individual --name=value arguments according to supplied capabilities. Hosts
may enforce a limit instead of forwarding an unsupported flag, and may also
enforce it independently to protect against program bugs. None omits an
option rather than supplying an empty value. Programs apply these defaults:
| Patterns | Input format | Output format | Other defaults |
|---|---|---|---|
| Adapter, emitter, fetcher | No input-format option | jsonl | — |
| Compiler | No input-format option | No output-format option | No pattern-specific options |
| Indexer | jsonl | No output-format option | Index destination required |
| Lister | No input-format option | jsonl | No limit or cursor bounds; offset 0; program-defined order |
| Matcher, reasoner | jsonl | jsonl | — |
| Prompter | text | text | Model auto |
| Reader | auto | jsonl | — |
| Resolver | No input-format option | No output-format option | No limit |
| Runner | No input-format option | No output-format option | No definitions |
| Writer | jsonl | auto | — |
text means UTF-8 without a standardized chat envelope. auto delegates
format detection or selection to the program. jsonl needs a documented
RDF mapping profile shared by producer and consumer. Setting
a format option does not encode, decode, or convert any bytes in this crate.
§Additional arguments and files
Each other vector is an ordered argument list, not a shell command. The
runner appends its entries after generated options and before a dedicated
URL or URI operand. Each entry is passed verbatim as one argument: use two
entries for --name value, or one for --name=value. Do not add shell quotes
or redirection syntax. Repeated builder other(...) calls append; the
maybe_other(...) helpers append only Some values.
Additional arguments can supply documented extensions or positional files.
Keep options before operands; use -- to end option parsing when a filename
begins with -. Avoid repeating singleton options already set in fields:
precedence is program-defined, so other is not an override mechanism.
Format selection and file selection are separate. For patterns with
optional input/output files, no operands select stdin/stdout, one operand
selects the input file, and two select input then output. To read stdin and
write a file, supply - followed by the output path. An indexer instead
requires its final operand to name the persistent index. See each trait’s
synopsis for the applicable operand rules.
A named input file replaces stdin as the payload source, and a named output file replaces stdout as the destination. Consult the concrete invocation API for file selection and stream-routing behavior; see the runner’s file operands.
Structs§
- Adapter
Options - Output-format selection and additional arguments for an
Adapter. - Adapter
Options Builder - Use builder syntax to set the inputs and finish with
build(). - Compiler
Options - Additional arguments and an optional input file for a
Compiler. - Compiler
Options Builder - Use builder syntax to set the inputs and finish with
build(). - Emitter
Options - Output-format selection and additional arguments for an
Emitter. - Emitter
Options Builder - Use builder syntax to set the inputs and finish with
build(). - Fetcher
Options - Output-format selection and additional arguments for a
Fetcher. - Fetcher
Options Builder - Use builder syntax to set the inputs and finish with
build(). - Indexer
Options - Input-format selection and additional arguments for an
Indexer. - Indexer
Options Builder - Use builder syntax to set the inputs and finish with
build(). - Lister
Capabilities - Declared native support for a lister program’s optional operations.
- Lister
Capabilities Builder - Use builder syntax to set the inputs and finish with
build(). - Lister
Options - Output-format and pagination requests for a
Lister. - Lister
Options Builder - Use builder syntax to set the inputs and finish with
build(). - Matcher
Options - Input/output formats and additional arguments for a
Matcher. - Matcher
Options Builder - Use builder syntax to set the inputs and finish with
build(). - Prompter
Options - Prompt/response formats and inference-model selection for a
Prompter. - Prompter
Options Builder - Use builder syntax to set the inputs and finish with
build(). - Reader
Options - Source and RDF output formats for a
Reader, plus additional arguments. - Reader
Options Builder - Use builder syntax to set the inputs and finish with
build(). - Reasoner
Options - RDF input/output formats and additional arguments for a
Reasoner. - Reasoner
Options Builder - Use builder syntax to set the inputs and finish with
build(). - Resolver
Options - Result-count selection and additional arguments for a
Resolver. - Resolver
Options Builder - Use builder syntax to set the inputs and finish with
build(). - Runner
Options - Runtime variable definitions and additional arguments for a
Runner. - Runner
Options Builder - Use builder syntax to set the inputs and finish with
build(). - Writer
Options - RDF input and export formats for a
Writer, plus additional arguments. - Writer
Options Builder - Use builder syntax to set the inputs and finish with
build().
Traits§
- Adapter
- An RDF dataset proxy that evaluates a SPARQL query and produces RDF.
- Compiler
- A prompt compiler that translates natural-language text into one SPARQL query.
- Emitter
- A value generator that produces RDF without consuming a payload input.
- Fetcher
- A URL protocol client that retrieves one resource and represents it as RDF.
- Indexer
- An RDF consumer that creates or updates a persistent index without payload output.
- Lister
- A directory or collection iterator that describes its entries as RDF.
- Matcher
- An exact or approximate matcher that consumes RDF and describes matches as RDF.
- Prompter
- A language-model inference provider that turns a prompt into a response.
- Reader
- An importer that maps a document or byte stream into an RDF graph or dataset.
- Reasoner
- An RDF entailer that derives consequences under a documented regime or rule system.
- Resolver
- A URI resolver that identifies zero or more resource locations as URLs.
- Runner
- A language runtime that executes program text and emits its result as text.
- Writer
- An exporter that converts an RDF graph or dataset into a supported representation.