Skip to main content

onetaskgraph_plugin_api/
lib.rs

1//! The contract every onetaskgraph source is written against.
2//!
3//! This crate holds exactly what a plugin author needs in order to implement a
4//! source, and nothing else: the two traits, the work types, the query and paging
5//! types, the capability declaration, and the error enum. The engine that drives
6//! sources lives in `onetaskgraph-core`, and **no plugin crate may depend on it**:
7//! `deny.toml` permits that crate exactly one wrapper, the binary, failing the
8//! required `deny` job, and `scripts/check-plugin-isolation.sh` reads the real
9//! `cargo metadata` graph inside `just check`.
10//!
11//! Keeping this crate still is the point. Every change here rebuilds and re-tests
12//! every plugin, which is exactly the cost the split exists to avoid paying on an
13//! ordinary engine change. When a new type could plausibly sit on either side, it
14//! belongs in `onetaskgraph-core` unless a trait signature names it.
15#![deny(missing_docs)]
16
17mod capability;
18mod error;
19mod id;
20mod query;
21mod source;
22mod work;
23mod write;
24
25pub use capability::{Capabilities, DependencySupport, Support};
26pub use error::SourceError;
27pub use id::{NativeId, SOURCE_NAME_PATTERN, SourceName};
28pub use query::{
29    Cursor, LabelFilter, Page, PageRequest, ProjectFilter, ProjectQuery, TaskQuery, TextFields,
30    TextQuery,
31};
32pub use source::{Health, SecretResolver, SourcePlugin, TaskSource};
33pub use work::{
34    DependencyEdge, DependencyEndpoint, DependencyKind, Direction, ItemKind, Label, Project,
35    Repository, Status, StatusCategory, Task,
36};
37pub use write::{ItemWrite, WriteSupport, unwritable};