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
// Metadata key used for KDL canonical round-trip mode.
//
// What:
// - `from kdl` writes this key into `PipelineMetadata.custom`.
//
// How:
// - `to kdl` checks this key to decide whether values should be interpreted as
// canonical node rows (`name/args/props/children`) instead of ordinary
// Nushell records.
//
// Why:
// - Shape-only detection is ambiguous because user data can legitimately contain
// the same field names; this explicit marker avoids misclassification.
pub const KDL_CANONICAL_METADATA_KEY: &str = "nu_kdl_canonical";
// Versioned metadata value paired with `KDL_CANONICAL_METADATA_KEY`.
//
// What:
// - Identifies the canonical KDL node-row schema variant.
//
// How:
// - `from kdl` writes this value.
// - `to kdl` only enables canonical handling when both key and value match.
//
// Why:
// - Versioning keeps the contract forward-compatible if the canonical schema
// evolves in future changes.
pub const KDL_CANONICAL_METADATA_VALUE: &str = "node_rows_v1";
pub use *;
pub use *;
pub use ;