NAH 1.0.6
Native Application Host - Library API Reference
Loading...
Searching...
No Matches
nak_selection.hpp
Go to the documentation of this file.
1#pragma once
2
3#include "nah/types.hpp"
4#include "nah/manifest.hpp"
5#include "nah/nak_record.hpp"
7#include "nah/warnings.hpp"
8
9#include <string>
10#include <vector>
11
12namespace nah {
13
14// ============================================================================
15// NAK Registry Entry
16// ============================================================================
17
19 std::string id;
20 std::string version;
21 std::string record_path; // Full path to the record file
22 std::string record_ref; // Filename only (e.g., "com.example.nak@3.0.2.toml")
23};
24
25// ============================================================================
26// Install-Time NAK Selection (per SPEC L1151-L1187)
27// ============================================================================
28
30 bool resolved = false;
32 std::string selection_reason; // Audit-only
33};
34
35// Select a NAK for installation
36// Returns the selected NAK pin or unresolved status
38 const Manifest& manifest,
39 const HostProfile& profile,
40 const std::vector<NakRegistryEntry>& registry,
41 WarningCollector& warnings);
42
43// ============================================================================
44// Compose-Time Pinned NAK Load (per SPEC L1189-L1236)
45// ============================================================================
46
51
52// Load a pinned NAK record for contract composition
53// Validates schema, required fields, and compatibility with manifest
55 const NakPin& pin,
56 const Manifest& manifest,
57 const HostProfile& profile,
58 const std::string& nah_root,
59 WarningCollector& warnings);
60
61// ============================================================================
62// NAK Registry Scanning
63// ============================================================================
64
65// Scan the NAK registry directory and return all entries
66std::vector<NakRegistryEntry> scan_nak_registry(const std::string& nah_root);
67
68} // namespace nah
Result type for fallible operations.
Definition nahhost.hpp:109
ManifestBuilder manifest()
std::vector< NakRegistryEntry > scan_nak_registry(const std::string &nah_root)
NakSelectionResult select_nak_for_install(const Manifest &manifest, const HostProfile &profile, const std::vector< NakRegistryEntry > &registry, WarningCollector &warnings)
PinnedNakLoadResult load_pinned_nak(const NakPin &pin, const Manifest &manifest, const HostProfile &profile, const std::string &nah_root, WarningCollector &warnings)
NakInstallRecord nak_record