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 — a
19//! hosted source with no documents declares that itself, and this source forwards the
20//! declaration rather than holding one.
21//!
22//! | Field | Verdict |
23//! | --- | --- |
24//! | `projects` | **Supported and proven** — the hosted source's own, forwarded. |
25//! | `documents` | **Supported and proven** — the hosted source's own, forwarded. |
26//! | `orphan_tasks` | **Supported and proven** — the hosted source's own, forwarded. |
27//! | `filter_by_label` | **Supported and proven** — the hosted source's own, forwarded. |
28//! | `filter_by_status` | **Supported and proven** — the hosted source's own, forwarded. |
29//! | `search_title` | **Supported and proven** — the hosted source's own, forwarded. |
30//! | `search_content` | **Supported and proven** — the hosted source's own, forwarded. |
31//! | `task_dependencies` | **Supported and proven** — the hosted source's own, forwarded. |
32//! | `project_dependencies` | **Supported and proven** — the hosted source's own, forwarded. |
33//! | `max_page_size` | **Supported and proven** — the hosted source's own, forwarded. |
34//!
35//! That is proven rather than asserted: the journey table's `subprocess` row hosts the
36//! in-memory source over a real pipe and answers every shared journey — every capability
37//! field included — with the same rows and the same plan the in-process row does.
38//!
39//! [`TaskSource`]: onetaskgraph_plugin_api::TaskSource
40
41mod connection;
42mod plugin;
43mod serve;
44mod source;
45mod wire;
46
47pub use connection::MAX_LINE;
48pub use plugin::{Plugin as SubprocessPlugin, Program, SubprocessConfig};
49pub use serve::{serve, serve_plugin};
50pub use source::{RequestDeadline, SubprocessSource};