1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
//! `printobserver-oneharness`.
//!
//! Owns: the oneharness adapter — the one implementation of
//! `printobserver-supervisor-api` that drives an agentic coding harness through
//! `OneHarness`'s own Rust crate API, in process.
//!
//! May depend on: `printobserver-types` and `printobserver-supervisor-api`,
//! plus whatever it needs to drive oneharness. Never another implementation
//! crate, and never `printobserver-core`.
//!
//! # In process, and never by spawning a command
//!
//! Every turn goes through [`oneharness_core::io::run::run_supervised`], which
//! returns the report to this process. Nothing here builds a command, and
//! nothing here names the `oneharness` program: a check over this crate's own
//! sources refuses any use of a process-spawning interface at all, whatever
//! executable it would name. Processes still exist during a turn — `OneHarness`
//! spawns the harness itself — and [`TurnSeam::processes`] is where a caller
//! sees each one.
//!
//! # Nothing about a live session is held in memory
//!
//! A print's session is a file under the configured state directory, and so is
//! `OneHarness`'s own session store. That is what lets the supervisor be
//! restarted between two events of one print and have the second event continue
//! the first's conversation: this port rebuilt from the state directory alone
//! continues exactly where it left off.
//!
//! # What a prompt may say is one committed file
//!
//! The system prompt is the prose of the `PrintObserver` skill — the Agent
//! Skill's `SKILL.md` with its frontmatter split off by [`skill_prose`] — read
//! from the configured path when the port is built. The prompt for a turn is the committed template at
//! [`SupervisorConfig::prompt_template_path`] with its five slots filled — the
//! triggering event, the situation the turn began in, the materialized path of
//! its image, the context command and the agent's own actor — and nothing else. This port composes no sentence of its own, so
//! what a prompt may say is one small file a person reads.
//!
//! # The answer is constrained by the generated schema
//!
//! [`SupervisorConfig::assessment_schema`] names the assessment schema the
//! contracts generate, and the path is what reaches `OneHarness`: this crate
//! carries no schema of its own and embeds none, so the constraint the agent
//! answers under is the one the types declare.
/// The committed prompt template this crate ships, as bytes in the built
/// artifact.
///
/// The port reads its template from a *path*, because editing it on a running
/// host is a restart rather than a rebuild. An installed program has no
/// checkout to read that path out of, so the composition root writes this
/// constant to a file under its state directory and points the port at it.
/// It is `include_str!` of this crate's own committed asset rather than a copy,
/// so the file `just check-repo`'s supervisor checks read and the bytes an
/// installed program runs are one thing.
///
/// The skill is not carried here: it is an Agent Skill an operator installs
/// with `gh skill install`, and the port reads it from the path it is
/// configured with.
pub const DEFAULT_TURN_PROMPT: &str = include_str!;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;
pub use ;