Expand description
The onetaskgraph engine.
It drives the sources a configuration names and reports what it had to do to
answer. Everything a plugin author needs lives in onetaskgraph-plugin-api
instead, and no plugin crate may depend on this one: deny.toml permits
this crate exactly one wrapper, the binary, failing the required deny job, and
scripts/check-plugin-isolation.sh reads the real cargo metadata graph inside
just check.
§The invariant that shapes this crate
No work data may be stored, cached, indexed or mirrored outside a plugin. The
engine compensates for a missing capability transiently: it holds at most one
source page plus the caller’s page and writes nothing down. Three mechanisms
enforce that rather than asking for it: deny.toml refuses every embedded store,
index and cache crate, so reaching for one fails the required deny job; a sandboxed
journey plants sentinels, drives every verb, and fails if one reaches any file written
during the run; and a re-ask test fails if one query asked twice reaches the source
once. The latter two land with the verbs they drive.
Re-exports§
pub use config::Config;pub use config::ConfigError;pub use config::Loaded;pub use config::OutputFormat;pub use config::SourceConfig;pub use subprocess::MAX_LINE;pub use subprocess::Program;pub use subprocess::RequestDeadline;pub use subprocess::SubprocessConfig;pub use subprocess::SubprocessPlugin;pub use subprocess::SubprocessSource;pub use subprocess::serve;pub use subprocess::serve_plugin;
Modules§
- config
- The configuration document, the three layers over it, and what they resolve to.
- subprocess
- Sources that are other processes, on both sides of the pipe.
Structs§
- Credential
Name - The name of an environment variable a credential arrives under.
- Dependency
Request - A request for a page of one item’s dependency edges.
- Engine
- The sources a configuration resolved to, and the queries they answer.
- Environment
- A snapshot of the environment a process was started with.
- Filters
- The filters every list verb shares.
- Global
Id - One item, qualified by the source it came from.
- Label
Request - A request for a page of labels.
- Page
Token - The engine’s own resume token: one plugin cursor per source stream, opaque to the caller exactly as a plugin’s cursor is opaque to the engine.
- Paging
- Which page of a result set the caller wants.
- Project
Request - A request for a page of projects.
- Qualified
- One item, under the qualified id the engine addresses it by.
- Qualified
Edge - One dependency edge with both ends qualified.
- Query
Plan - What the engine did, per source.
- Query
Response - One page of engine output, with the plan that produced it.
- Resolved
Credential - One credential name the file supplied, and where its value comes from.
- Resolved
Source - One configured source, built and ready to answer.
- Search
Request - A request for a page of search hits.
- Secrets
- Where a plugin’s named credential is looked up.
- Secrets
Report - What the credentials file supplied, without supplying it.
- Source
Failure - One source’s failure, kept beside the results the other sources returned.
- Source
Listing - What one configured source is, as
sources listreports it. - Source
Plan - What one source was asked for, and what happened to each predicate.
- Task
Request - A request for a page of tasks.
- Unavailable
Source - One configured source that could not be built at all.
Enums§
- Configured
Source - One configured source, in exactly one of the two states a configured source has.
- Credential
Layer - Which layer answered for one credential name.
- Engine
Error - What the engine refuses before it asks any source.
- Plugin
Kind - One of the plugin kinds this build has.
- Predicate
- One thing a query can ask of a source.
- Project
Selector - Which project a task must belong to, as a command line names it.
- Search
Hit - One hit of a search that may cross entities.
- Search
Kind - Which entities a search covers.
- Source
State - Whether a configured source is answering.
Constants§
- SCHEMA_
BUNDLE_ VERSION - The bundle’s own version, bumped whenever a root is added, removed or renamed.
Functions§
- plugin_
for - The plugin registered for
kind, orNonewhen nothing answers to that name. - plugin_
kinds - The kind names in
registry, for help text and error messages. - registry
- Every plugin kind this build knows, in a stable order.
- resolve
- Build every configured source, in name order.
- resolve_
available - Build every configured source, keeping the ones that refused beside the ones that built.
- schema_
bundle - Every contract root, keyed by name, plus each registered plugin’s config schema.
- validate_
sources - Check every configured source without building any of them.