Pulp 1.88.0
Cross-platform audio plugin framework
Loading...
Searching...
No Matches
manifest.hpp
Go to the documentation of this file.
1#pragma once
2
9
14
15#include <cstdint>
16#include <string>
17#include <vector>
18
20
22inline constexpr std::string_view kFormatId = "org.pulp.audio-authoring-capsule";
23inline constexpr std::uint32_t kFormatVersion = 1;
24
36
42 std::string schema_version;
44 std::string extra_json = "{}";
45};
46
47struct Manifest {
48 std::string format = std::string(kFormatId);
50
51 // ── Routing. Authenticated, bounded, and the only routing input. ──
52 std::string profile;
53 std::uint32_t profile_version = 1;
54 std::string product;
55 std::string authoring_kind;
56 std::vector<std::string> subtypes;
58 std::string topology_json = "{}";
59 std::vector<std::string> required_capabilities;
60
61 // ── Identity. ──
63 std::string project_id;
65 std::string revision_id;
66 std::string parent_revision;
67
70 std::vector<FileEntry> files;
71 std::vector<DependencyEntry> dependencies;
72
73 // ── Descriptive. Excluded from the revision digest. ──
74 std::string title;
75 std::string created_at;
76 std::string exported_at;
77 std::string provenance_json = "{}";
78 std::string attestations_json = "[]";
79 std::string distribution_json = "{}";
80
85 std::string unknown_optional_json = "{}";
86};
87
98
102
123
127
128} // namespace pulp::authoring_capsule
Result<T, E> — either holds a T or an E, never both.
Definition result.hpp:76
Per-component policy.
Archive and path budgets.
Definition archive.hpp:24
constexpr std::string_view kFormatId
The vendor-neutral format identifier. Constant for format version 1.
Definition manifest.hpp:22
runtime::Result< std::string, CapsuleError > revision_digest(const Manifest &manifest)
sha256 over the canonical JSON of the whole manifest with exactly three fields removed: revision_id (...
constexpr std::uint32_t kFormatVersion
Definition manifest.hpp:23
Reproducibility
Definition manifest.hpp:25
@ reproducible
Declared inputs plus pinned dependencies regenerate the result, and receipts prove the claim.
Definition manifest.hpp:28
@ best_effort
Source and history are present, but a model, tool, or environment cannot be replayed exactly.
Definition manifest.hpp:32
@ frozen_output_only
Only playable derived artifacts are present.
Definition manifest.hpp:34
runtime::Result< Manifest, CapsuleError > parse_manifest(std::string_view json)
Parse and structurally validate.
Completeness
Derived from the component rows.
Definition component.hpp:170
runtime::Result< std::string, CapsuleError > to_canonical_json(const Manifest &manifest)
Serialize to canonical JSON: UTF-8 without BOM, LF, keys sorted by code point, no insignificant white...
Completeness derive_completeness(const Manifest &manifest)
Recomputed from the component rows.
Result<T, E> — success / failure union for fallible operations.
Admission failure vocabulary for authoring capsules.
Version floors the consuming runtime must satisfy.
Definition manifest.hpp:39
std::string extra_json
Additional profile-owned floors, as canonical JSON.
Definition manifest.hpp:44
std::string schema_version
Definition manifest.hpp:42
std::string min_runtime_version
Definition manifest.hpp:41
std::string min_product_version
Definition manifest.hpp:40
Definition manifest.hpp:47
std::vector< DependencyEntry > dependencies
Definition manifest.hpp:71
std::string product
Definition manifest.hpp:54
std::string title
Definition manifest.hpp:74
std::string parent_revision
Definition manifest.hpp:66
std::uint32_t profile_version
Definition manifest.hpp:53
std::string project_id
Stable across saves of the same project.
Definition manifest.hpp:63
std::vector< std::string > subtypes
Definition manifest.hpp:56
std::string unknown_optional_json
Unknown optional keys, preserved verbatim in canonical form so a round-trip through an older reader d...
Definition manifest.hpp:85
Compatibility compatibility
Definition manifest.hpp:69
std::uint32_t format_version
Definition manifest.hpp:49
std::string topology_json
Exact runtime topology, profile-owned canonical JSON.
Definition manifest.hpp:58
std::vector< std::string > required_capabilities
Definition manifest.hpp:59
std::string created_at
Definition manifest.hpp:75
std::string authoring_kind
Definition manifest.hpp:55
std::vector< FileEntry > files
Definition manifest.hpp:70
std::string attestations_json
Definition manifest.hpp:78
Reproducibility reproducibility
Definition manifest.hpp:68
std::string distribution_json
Definition manifest.hpp:79
std::string provenance_json
Definition manifest.hpp:77
std::string format
Definition manifest.hpp:48
std::string revision_id
Derived from canonical content; see revision_digest().
Definition manifest.hpp:65
std::string exported_at
Definition manifest.hpp:76
std::string profile
Definition manifest.hpp:52