Skip to main content

Crate onetaskgraph_core

Crate onetaskgraph_core 

Source
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§

CredentialName
The name of an environment variable a credential arrives under.
DependencyRequest
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.
GlobalId
One item, qualified by the source it came from.
LabelRequest
A request for a page of labels.
PageToken
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.
ProjectRequest
A request for a page of projects.
Qualified
One item, under the qualified id the engine addresses it by.
QualifiedEdge
One dependency edge with both ends qualified.
QueryPlan
What the engine did, per source.
QueryResponse
One page of engine output, with the plan that produced it.
ResolvedCredential
One credential name the file supplied, and where its value comes from.
ResolvedSource
One configured source, built and ready to answer.
SearchRequest
A request for a page of search hits.
Secrets
Where a plugin’s named credential is looked up.
SecretsReport
What the credentials file supplied, without supplying it.
SourceFailure
One source’s failure, kept beside the results the other sources returned.
SourceListing
What one configured source is, as sources list reports it.
SourcePlan
What one source was asked for, and what happened to each predicate.
TaskRequest
A request for a page of tasks.
UnavailableSource
One configured source that could not be built at all.

Enums§

ConfiguredSource
One configured source, in exactly one of the two states a configured source has.
CredentialLayer
Which layer answered for one credential name.
EngineError
What the engine refuses before it asks any source.
PluginKind
One of the plugin kinds this build has.
Predicate
One thing a query can ask of a source.
ProjectSelector
Which project a task must belong to, as a command line names it.
SearchHit
One hit of a search that may cross entities.
SearchKind
Which entities a search covers.
SourceState
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, or None when 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.