Logo ProcessKit API Reference

ReportJson Module

 AOT-safe `System.Text.Json` metadata for the opt-in JSONL report serializer: one self-describing JSON
 object per line for `Outcome`, `ProcessResult<string>`/`ProcessResult<byte[]>`,
 `ProcessGroupStats`, `RunProfile`, `MemberInfo`, and `LimitEvidence` — the shapes this port has today.
 Ports the **shape**, not the code, of ProcessKit-rs's `report-serde` feature; see
 `docs/jsonl-reports.md` for the full schema, the versioning promise, and C#/F# consumer examples
 reading a JSONL stream.

 **Opt-in.** Nothing on `ProcessResult`/`ProcessGroupStats`/`RunProfile`/`MemberInfo`/`LimitEvidence`
 themselves changed — this is a separate serializer you reach for explicitly, via
 `JsonSerializer.Serialize(value, ReportJson.OutcomeTypeInfo)` or the `ToReportJson()` extension methods
 on `ReportJsonExtensions`.

 **Four rules, matching the source feature:**
  1. **A tagged shape carries a `"kind"` identifier**, spelled as this schema's own stable, documented
     machine name — never a raw union-case ordinal or a BCL `.ToString()`. `Outcome` is `exited` /
     `signalled` / `timed_out` / `unobserved`; each report line's own envelope is `process_result` /
     `process_group_stats` / `run_profile` / `member_info` / `limit_evidence`.
  2. **`Serialize` only — deliberately no `Deserialize`.** These are values the library *reports*, never
     values a caller supplies back to it; every converter's `Read` throws `NotSupportedException`. Every
     `JsonTypeInfo<'T>` below is still safe to pass to a `JsonSerializer.Deserialize` call by a
     caller who ignores this and does so anyway — it simply throws instead of fabricating a value.
  3. **Reports *about* processes, never what a process produced.** No converter here ever reads captured
     stdout/stderr content, argv, or environment values — `ProcessResult.Stdout`/`Stderr`/`Combined` are
     never touched, whatever `'T` is.
  4. **Fields are additive; a field's spelling and unit are frozen.** Every one of these report types is
     `[<Sealed>]` with an internal constructor and grows fields across minor releases without
     breaking this schema's readers — a JSONL consumer must ignore keys it does not recognize, the same
     discipline any self-describing format needs. Time is always a number of fractional seconds
     (`duration_secs`, `total_cpu_time_secs`, `cpu_time_secs`, …); a measurement the platform cannot
     report is `null`, never a fabricated `0`.

Functions and values

Function or value Description

ReportJson.LimitEvidenceTypeInfo

Full Usage: ReportJson.LimitEvidenceTypeInfo

Returns: JsonTypeInfo<LimitEvidence>

AOT-safe metadata for serializing a `LimitEvidence` report.

Returns: JsonTypeInfo<LimitEvidence>

ReportJson.MemberInfoTypeInfo

Full Usage: ReportJson.MemberInfoTypeInfo

Returns: JsonTypeInfo<MemberInfo>

AOT-safe metadata for serializing a `MemberInfo` snapshot.

Returns: JsonTypeInfo<MemberInfo>

ReportJson.OutcomeTypeInfo

Full Usage: ReportJson.OutcomeTypeInfo

Returns: JsonTypeInfo<Outcome>

AOT-safe metadata for serializing an `Outcome` on its own, e.g. from a supervision or streaming callback that only has the outcome in hand.

Returns: JsonTypeInfo<Outcome>

ReportJson.ProcessGroupStatsTypeInfo

Full Usage: ReportJson.ProcessGroupStatsTypeInfo

Returns: JsonTypeInfo<ProcessGroupStats>

AOT-safe metadata for serializing a `ProcessGroupStats` snapshot.

Returns: JsonTypeInfo<ProcessGroupStats>

ReportJson.ProcessResultBytesTypeInfo

Full Usage: ReportJson.ProcessResultBytesTypeInfo

Returns: JsonTypeInfo<ProcessResult<byte[]>>

AOT-safe metadata for serializing a `ProcessResult<byte[]>` — `OutputBytesAsync`'s result type.

Returns: JsonTypeInfo<ProcessResult<byte[]>>

ReportJson.ProcessResultStringTypeInfo

Full Usage: ReportJson.ProcessResultStringTypeInfo

Returns: JsonTypeInfo<ProcessResult<string>>

AOT-safe metadata for serializing a `ProcessResult<string>` — the text capture verbs' (`OutputStringAsync`, `RunAsync`, …) result type.

Returns: JsonTypeInfo<ProcessResult<string>>

ReportJson.RunProfileTypeInfo

Full Usage: ReportJson.RunProfileTypeInfo

Returns: JsonTypeInfo<RunProfile>

AOT-safe metadata for serializing a `RunProfile`.

Returns: JsonTypeInfo<RunProfile>

Type something to start searching.