Project terminal execution observations into shared reports

This commit is contained in:
2026-09-26 15:41:54 +00:00
parent 7de2b02891
commit f77bd4b528
5 changed files with 240 additions and 1 deletions

View File

@@ -23,6 +23,8 @@ described by its tagged
and errors to HTTP DTOs.
- `internal/format` renders `promptkit.PreparedRun` values as deterministic text
or JSON.
- `internal/report` maps Promptkit's terminal execution event to a small
application-owned value without invoking the engine or writing output.
## Wiring Flows
@@ -71,6 +73,11 @@ Failure mapping uses `errors.Is` against Promptkit's public sentinels and the
HTTP reader's Scriptorium-owned containment and size errors. Wrapped reader
errors preserve their identity through Promptkit's artifact-load boundary.
The report collector is per invocation. It ignores nonterminal events and
copies terminal aggregates once, including usage presence and completeness.
It retains no history or shared state; adapters decide whether to attach it and
how to present its snapshot.
## Package-Local Guarantees
- Adapters contain no copied framework types or orchestration.