plugins/ppq/vendor/ppq-private-mode/lib/nitro architecture
Provides isomorphic AWS Nitro enclave attestation verification and an attestation-gated encrypted fetch transport, exporting byte helpers, verification, and secure-fetch construction while failing closed before protected requests can be sent.
Architectural role
Security-critical transport boundary within the pinned vendored proxy. For the local v0.1.0 candidate, this code should remain isolated from first-party orchestration and be treated as an implementation dependency whose documented ai-model-source v1 behavior requires funded live-flow verification before publication.
Source map
browser-verify.mjs— Exports hex conversion helpers and verifyAttestation, which validates ES384 COSE signatures, the pinned AWS Nitro certificate chain and validity, optional nonce freshness, and expected PCR0 before returning the enclave HPKE public key and PCRs.nitro-secure-fetch.mjs— Exports createNitroSecureFetch, which fetches nonce-bound attestation, verifies it before constructing an EHBP identity, and returns a fetch wrapper that encrypts requests, decrypts successful contextual responses, and passes plaintext non-200 responses through.
Integration details
browser-verify.mjs— Forms the trust-validation gate for the vendored transport; release verification should confirm that production attestation evidence and configured enclave identity satisfy its fail-closed checks.nitro-secure-fetch.mjs— Connects verified enclave identity to protected proxy traffic and is therefore a key funded live-flow test target before the local v0.1.0 candidate can be published.