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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
//! `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 `PrintObserver` skill, read from the tree when the
//! port is built. The prompt for a turn is the committed template at
//! [`SupervisorConfig::prompt_template_path`] with its three slots filled — the
//! triggering event, the materialized path of its image, and the context
//! command — 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 `PrintObserver` skill this crate ships, as bytes in the built artifact.
///
/// The port reads its system prompt from a *path*, because editing the skill 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 —
/// which is what makes an install that configures no skill of its own run the
/// committed one rather than none.
///
/// 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.
pub const DEFAULT_SKILL: &str = include_str!;
/// The committed prompt template this crate ships, for the same reason
/// [`DEFAULT_SKILL`] is here.
pub const DEFAULT_TURN_PROMPT: &str = include_str!;
/// Where the reference documents sit, relative to the skill's own directory.
///
/// The skill links to them by this path and nothing else, so one relative link
/// resolves the same way in the checkout — where `assets/reference` is the
/// repository's own `docs/reference` — and on an installed host, where the
/// composition root writes them beside the skill it materialized.
// llmlint: ignore[invalid_states_unrepresentable] This is the immutable literal "reference", not a field or caller-supplied path. No API can assign an absolute or traversing value to this constant; the docs bundle check holds its consumers to the declared layout.
pub const REFERENCE_DIRECTORY: &str = "reference";
/// Every reference document the skill links to, as bytes in the built artifact.
///
/// [`DEFAULT_SKILL`] is deliberately short and links out for everything else,
/// which is a promise an installed program has to keep: a link to a file no
/// install carries is worse than no link at all. So the documents travel with
/// the skill, and the composition root writes them beside it — an installed
/// host has no checkout to read them out of.
///
/// Each entry is the path the document is materialized at, relative to the
/// skill's own directory, and its bytes. `just check-repo` holds this array to
/// the document set `repo-policy.toml` declares, in both directions, so a
/// document the skill may link to is one this array carries.
// llmlint: ignore[invalid_states_unrepresentable] This immutable array contains seven literal bundle paths, not caller-constructed entries. The docs bundle check compares every path with the validated policy set in both directions, and the installed-assets journey opens the materialized references.
pub const DEFAULT_REFERENCES: = ;
pub use ;
pub use ;
pub use ;
pub use ;