topmark.toml.machine.payloads¶
topmark / toml / machine / payloads
Payload builders for TOML-domain machine-readable output.
This module contains pure helpers that build strongly typed payload dataclasses for machine-readable TOML provenance output.
Responsibilities
- Convert resolved TOML-side structures into JSON-friendly values.
- Build payload objects from
topmark.toml.machine.schemas.
This module performs no I/O and does not shape JSON envelopes or NDJSON records.
build_toml_provenance_payload ¶
Build a machine-readable layered TOML provenance payload.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
resolved_toml
|
ResolvedTopmarkTomlSources
|
Resolved TOML sources for the current run. |
required |
Returns:
| Type | Description |
|---|---|
TomlProvenancePayload
|
Provenance payload with ordered layers, starting with the built-in |
TomlProvenancePayload
|
defaults layer when present. |
Raises:
| Type | Description |
|---|---|
ValueError
|
If config provenance layers do not align with the resolved TOML sources, or if config provenance layer resolved to an invalid TOML source. |
TomlRenderError
|
If an invalid files serialization mode is specified while rendering API- or CLI-originated layers back to TopMark TOML. |