Skip to main content

onetaskgraph_core/subprocess/
mod.rs

1//! Sources that are other processes, on both sides of the pipe.
2//!
3//! `docs/plugin-protocol.md` is the normative text; this module is its Rust
4//! implementation. [`SubprocessSource`] is the engine's half — a [`TaskSource`] that is a
5//! spawned program — and [`serve`] is the plugin's half, hosting any plugin of this build
6//! behind the same protocol so the two can be exercised against each other.
7//!
8//! Nothing here compensates for a capability. A subprocess-hosted source declares what it
9//! can do in the handshake exactly as a compiled-in one does, and the engine's one
10//! compensation layer reads that declaration and does the rest — which is what keeps a
11//! source's answers the same whichever side of a pipe it is on.
12//!
13//! # What this source declares, field by field
14//!
15//! One verdict per field of `Capabilities`. Every one of them is **supported and proven,
16//! and is the hosted source's own**: [`SubprocessSource`] reports the value the program
17//! behind the pipe sent in its handshake, unchanged, and holds no opinion of its own about
18//! any of them. Nothing here could be unsupported, because nothing here decides.
19//!
20//! | Field | Verdict |
21//! | --- | --- |
22//! | `projects` | **Supported and proven** — the hosted source's own, forwarded. |
23//! | `orphan_tasks` | **Supported and proven** — the hosted source's own, forwarded. |
24//! | `filter_by_label` | **Supported and proven** — the hosted source's own, forwarded. |
25//! | `filter_by_status` | **Supported and proven** — the hosted source's own, forwarded. |
26//! | `search_title` | **Supported and proven** — the hosted source's own, forwarded. |
27//! | `search_content` | **Supported and proven** — the hosted source's own, forwarded. |
28//! | `task_dependencies` | **Supported and proven** — the hosted source's own, forwarded. |
29//! | `project_dependencies` | **Supported and proven** — the hosted source's own, forwarded. |
30//! | `max_page_size` | **Supported and proven** — the hosted source's own, forwarded. |
31//!
32//! That is proven rather than asserted: the journey table's `subprocess` row hosts the
33//! in-memory source over a real pipe and answers every shared journey — every capability
34//! field included — with the same rows and the same plan the in-process row does.
35//!
36//! [`TaskSource`]: onetaskgraph_plugin_api::TaskSource
37
38mod connection;
39mod plugin;
40mod serve;
41mod source;
42mod wire;
43
44pub use connection::MAX_LINE;
45pub use plugin::{Plugin as SubprocessPlugin, Program, SubprocessConfig};
46pub use serve::{serve, serve_plugin};
47pub use source::{RequestDeadline, SubprocessSource};