@redditech/agent-protocol 0.0.0-stage → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (55) hide show
  1. package/CHANGELOG.md +89 -0
  2. package/LICENSE +21 -0
  3. package/README.md +394 -2
  4. package/dist/adl.d.ts +141 -0
  5. package/dist/adl.js +3601 -0
  6. package/dist/agent-stack-fixtures.d.ts +743 -0
  7. package/dist/agent-stack-fixtures.js +1554 -0
  8. package/dist/ai-catalog.d.ts +128 -0
  9. package/dist/ai-catalog.js +373 -0
  10. package/dist/attestation-reputation.d.ts +102 -0
  11. package/dist/attestation-reputation.js +279 -0
  12. package/dist/audd-rail-config.d.ts +102 -0
  13. package/dist/audd-rail-config.js +294 -0
  14. package/dist/browser-wallet-approval.d.ts +293 -0
  15. package/dist/browser-wallet-approval.js +1201 -0
  16. package/dist/discovery-source.d.ts +115 -0
  17. package/dist/discovery-source.js +251 -0
  18. package/dist/evidence-archive.d.ts +73 -0
  19. package/dist/evidence-archive.js +238 -0
  20. package/dist/index.d.ts +23 -0
  21. package/dist/index.js +23 -0
  22. package/dist/mpp-tempo-receipt-shapes.d.ts +201 -0
  23. package/dist/mpp-tempo-receipt-shapes.js +330 -0
  24. package/dist/okf-adapter.d.ts +229 -0
  25. package/dist/okf-adapter.js +556 -0
  26. package/dist/okf-conformance.d.ts +208 -0
  27. package/dist/okf-conformance.js +651 -0
  28. package/dist/okf-instruction-safety.d.ts +192 -0
  29. package/dist/okf-instruction-safety.js +509 -0
  30. package/dist/onboarding-analyser-handoff.d.ts +391 -0
  31. package/dist/onboarding-analyser-handoff.js +959 -0
  32. package/dist/onboarding-state-machine.d.ts +228 -0
  33. package/dist/onboarding-state-machine.js +432 -0
  34. package/dist/payment-records.d.ts +181 -0
  35. package/dist/payment-records.js +599 -0
  36. package/dist/policy.d.ts +33 -0
  37. package/dist/policy.js +45 -0
  38. package/dist/provider-trust.d.ts +113 -0
  39. package/dist/provider-trust.js +346 -0
  40. package/dist/quasar-registry-compatibility.d.ts +113 -0
  41. package/dist/quasar-registry-compatibility.js +214 -0
  42. package/dist/ranking-explainability.d.ts +202 -0
  43. package/dist/ranking-explainability.js +302 -0
  44. package/dist/receipt-v2.d.ts +202 -0
  45. package/dist/receipt-v2.js +418 -0
  46. package/dist/repo-explorer-evidence-manifest.d.ts +387 -0
  47. package/dist/repo-explorer-evidence-manifest.js +1187 -0
  48. package/dist/source-diagnostics.d.ts +84 -0
  49. package/dist/source-diagnostics.js +193 -0
  50. package/dist/source-trust-conformance-matrix.d.ts +207 -0
  51. package/dist/source-trust-conformance-matrix.js +672 -0
  52. package/examples/ard-no-spend-ai-catalog.json +51 -0
  53. package/examples/ard-no-spend-demo.mjs +355 -0
  54. package/examples/interpretation-guide-scenarios.mjs +302 -0
  55. package/package.json +144 -4
package/CHANGELOG.md ADDED
@@ -0,0 +1,89 @@
1
+ # Changelog — @redditech/agent-protocol
2
+
3
+ All notable changes to this package are documented here. Dates are AEST.
4
+
5
+ ## Unreleased
6
+
7
+ ### Added
8
+
9
+ - Agent Definition Language (ADL) v0.3, `@redditech/agent-protocol/adl`: `parseAdlDocument` (YAML or JSON, YAML 1.1 rules, at most 64 KB), `checkAdlConformance` (JSON Schema plus conformance Levels 0 to 4, the same verdict as the lab's `adl_v03_conformance.py` on every lab example), `buildProviderAdl` (the Level 3 document for a provider priced per token with metered escrow, or per call with escrow: Solana rail, the 5% protocol fee with the 2.5% launch rate to 2027-04-01 UTC and the 0.1 SOL cap, a `reddi.receipt.v2` receipt) and `providerTermsFromAdl` (a listing's terms read back from a document). The schema is a copy of nissan/reddiagent-lab `specs/ADL-v0.3.schema.json`, refreshed with `node scripts/sync-adl-v03.mjs --lab <path>`; `--check` reports a stale copy. New dependencies: `ajv`, `yaml`.
10
+
11
+ - Receipt v2 `session` block for metered sessions (#863): sequence, this call's tokens, running token totals and cost, the previous receipt's hash, and `closed`. Receipts of a session carry no `payment` block until the closing one, whose metered payment must equal the running cost. `hashReddiReceiptV2` (SHA-256 of the canonical form) and `verifyReddiReceiptV2Session`, which checks a whole chain: one provider and escrow, sequence 1 to n, hash links, running sums, a cost that never goes down, and only the last receipt closed. New error codes `session_mismatch` and `session_chain_broken`.
12
+
13
+ ### Removed
14
+
15
+ - `reddi.receipt.v1` and the 28 modules built on it (#776, breaking; owner decision, 20 November 2026): `receipts`, `fixtures`, `buyer-seller`, `receipt-evidence-binding`, `rail-neutral-payment-receipts`, `rail-neutral-proof-chain-fixture`, `buyer-authority-policy`, `audd-payment-plan`, `seller-wrapper-config`, `seller-wrapper-rail-fixtures`, `pay-sh-sandbox-evidence`, `attestation-reputation-bridge`, `hosted-attestation-claim`, `offchain-reputation-preview`, `quasar-reputation-intent`, `reputation-credential-export`, `erc8004-export`, `erc8004-export-conformance`, `ap2-mandate-ingestion`, `ap2-mandate-conformance`, `airwallex-hosted-checkout-rail`, `airwallex-webhook-receipt-normalization`, `framework-template-contract`, `framework-template-conformance`, `framework-template-conformance-fixtures`, and the LangGraph, ADK and Strands templates, with their subpath exports and tests. `reddi.receipt.v2` is the only receipt. Nothing had been published, so there is no migration path.
16
+ - `examples/buyer-seller-dry-run.mjs` and the `example:buyer-seller:dry-run` script.
17
+ - Entries further down this section that describe the AUDD payment plan, the AUDD x402 bridge and receipt/evidence binding describe code that was added and then removed inside this unreleased cycle. The AUDD rail config and payment record entries still apply.
18
+
19
+ ### Changed
20
+
21
+ - The ARD no-spend quickstart, the interpretation guide scenarios and the public conformance suite are rebuilt on `reddi.receipt.v2` (#776). The quickstart now has a fixture provider sign a receipt and the buyer verify it offline; its receipt names a made-up fixture transaction and no payment is made.
22
+
23
+ ### Added
24
+
25
+ - Receipt v2 (`@redditech/agent-protocol/receipt-v2`, `reddi.receipt.v2`, #739): a receipt the provider issues and signs, carrying its wallet, the model it declares it served, the request and response hashes and the payment transaction, signed with ed25519 over a fixed-order canonical form. `verifyReddiReceiptV2` checks the signature and any expected fields offline. A valid signature shows what the provider declared; it is not proof of which model ran. v2 is a separate version and rejects any other version string. This replaces the unreleased `reddi.receipt.provider-extension.v1` block (owner decision, 20 November 2026). Source-level helpers only: no deployed provider issues v2 receipts yet.
26
+ - Browser-wallet safety preflight contracts and offline validation helpers (`@redditech/agent-protocol/browser-wallet-approval`): single-use Devnet approval schema (`reddi.browser-wallet.single-use-approval.v1`) with future-date refusal, trusted resolved-program binding, the canonical Devnet USDC mint pinned for the gated USDC lane, official Solana mainnet mints rejected on every asset path, and independently trusted partner-confirmed AUDD Devnet mint/rail binding; dormant Tier 1 local browser harness contract; and a complete claim-local rail-identity/copy guard rejecting official AUDD, grant-eligible, observed settlement, and controlled-live claims across safety rows.
27
+ - Public AUDD rail config and identity validator for deterministic fixtures, generated local test mints, explicitly blocked/unverified devnet, and gated mainnet. Official Solana mainnet AUDD mint/token-program/decimals provenance is recorded, while mainnet stays disabled by default.
28
+ - Rail-neutral canonical payment job/agreement/intent/observation/refund records and deterministic canonical SHA-256 ID helpers, with environment and grant-eligibility labels that reject fixture/devnet evidence as eligible volume.
29
+ - AUDD x402 v2 SVM `exact` bridge helpers layered onto the existing `reddi.audd-payment-plan.v1` plan for deliberate legacy compatibility. Models can create draft intents only; non-fixture spend still requires policy and operator approval.
30
+ - Optional receipt/evidence binding for confirmed non-live payment observations, preserving no-wallet/no-RPC guardrails and rejecting fixture/devnet observations marked grant eligible or observations that do not exactly match the AUDD plan.
31
+
32
+ ### Changed
33
+
34
+ - Receipt v2 now states what was paid (#776, breaking for the unreleased v2 shape): `payment` gains `currency` (SOL, USDC, PYUSD, USDG, AUDD), `mint` (every currency except SOL), `amount` and `fee.amount` in smallest units as strings, `fee.treasury`, `settlement` (`direct` or `escrow`) and an optional `payer`; the receipt gains an optional `jobId`. `verifyReddiReceiptV2` compares each payment field the caller supplies. v2 is the receipt for V1 paid calls (owner decision, 20 November 2026).
35
+ - Browser-wallet approval/copy contracts now require canonical evaluation instants and query-free persisted RPC identities, validate concrete mint public keys, reject reserved-brand and Unicode ambiguity per positive claim occurrence, use closed dormant Tier 1 identifiers, and qualify parsed fixture x402 exports as `fixture-observed`; these remain offline/default-off checks and do not add durable approval consumption.
36
+ - The browser-wallet copy guard now rejects compact/separator-delimited official AUDD branding and direct AUDD endorsement claims across copy fields, preserving direct disclaimers while rejecting mixed affirmative claims and double negation. The deterministic lexical check does not claim complete natural-language detection and leaves all live-action gates unchanged.
37
+ - The AUDD mainnet gate now canonicalises the plan network alias and fires on any plan that names mainnet by alias or CAIP-2 network, or that names the official AUDD mainnet mint, whether or not the plan declares `railEnvironment`. `requireX402Exact` additionally rejects network aliases that do not resolve to a known CAIP-2 network.
38
+ - `createAuddPaymentIntentDraft` derives the environment label from the plan instead of always defaulting to `deterministic-fixture`: mainnet-targeting plans are labelled `mainnet-gated` (keeping operator approval required), a plan with no derivable environment throws `audd_payment_plan_environment_undeclared`, local test mints throw `audd_payment_plan_local_test_mint_not_exportable`, and supplied labels that do not exactly match the canonical rail throw `audd_payment_plan_label_environment_mismatch`.
39
+ - `controlled-live` payment record labels now require `partnerAcceptanceRef` before they can be marked grant eligible, matching the existing `mainnet-gated` rule.
40
+ - The AUDD rail environment is derived once from the plan identity (canonical network alias, CAIP-2 network, mint) and reused by `createAuddX402SvmExactPaymentPlan`, preflight rail-identity validation and intent-draft labelling, so a plan is no longer stamped `deterministic-fixture` regardless of the rail it names. An undeclared unverified devnet mint now derives `devnet-unverified` and is denied `devnet_audd_unverified`, and a rail that cannot be derived is denied or throws `audd_payment_plan_environment_undeclared` instead of silently defaulting to fixture.
41
+ - A supplied `railEnvironment` is treated only as an assertion: it must exactly equal the identity-derived canonical rail, so a seller cannot understate or overstate the network/CAIP-2/mint identity.
42
+ - Environment labels must equal the plan's rail on every AUDD surface: `createAuddPaymentIntentDraft` and `createAuddX402SvmExactPaymentRequired` both throw `audd_payment_plan_label_environment_mismatch` for labels that understate or overstate the rail, and receipt/evidence binding rejects a payment observation whose environment label does not equal the rail its observed mint/network belongs to. `controlled-live` is consequently not a reachable label for an AUDD plan in this non-live foundation. That binding check only applies to AUDD observations, so a non-AUDD SPL payment is not judged against the AUDD rail table.
43
+ - A plan whose identity resolves to no configured AUDD rail (for example `solana-testnet`) is rejected with `audd_payment_plan_environment_undeclared` at constructors and `blocked_rail_environment` at buyer preflight, even when it declares a `railEnvironment`, so a seller cannot self-assert a fixture rail on a network this config does not describe.
44
+ - The intent draft's `operatorApprovalRequired` is derived from the plan's rail OR-ed with `plan.authority.operatorApprovalRequired` instead of from the environment label, and `createAuddX402SvmExactPaymentRequired` throws `audd_payment_intent_operator_approval_mismatch` when an intent waives operator approval that the plan's rail requires. The 402 can no longer advertise a non-fixture AUDD rail as needing no operator approval.
45
+ - Local-test-mint remains a configuration/test-only rail with no public CAIP-2 identity; intent and x402 export boundaries reject it explicitly. AUDD rail provenance now uses public URLs and repository-relative references rather than maintainer-local absolute paths.
46
+ - `validateAuddX402SvmExactPaymentRequired` now fail-closes forged AUDD x402 payloads whose CAIP-2 network, RAP alias, mint, environment label, or configured grant-eligibility ceiling do not resolve to one exportable canonical rail.
47
+ - AUDD plan construction/preflight and generic payment-observation validation now enforce exact `AUDD` asset casing, the configured rail grant-eligibility ceiling, and canonical network/CAIP-2/mint identity. AUDD observations additionally require the `svm-spl-token-transfer-checked` rail and canonical SPL Token program; buyer budget-policy decisions cannot return lowercase or mixed-case AUDD metadata.
48
+
49
+ ## 0.1.0 — 2026-07-06
50
+
51
+ First release-candidate cut of the public RAP (Reddi Agent Protocol) primitives package. Everything below runs locally on deterministic fixtures — see Boundaries.
52
+
53
+ ### Added
54
+
55
+ Module areas (each area maps to one or more declared subpath exports; the full export map lives in `package.json` and every target is verified by the exports guard, `npm run check:exports` — do not treat any list here as exhaustive):
56
+
57
+ - **Receipts and policy** — receipt envelope validation, policy decisions, buyer-authority policy, and seller wrapper configuration for paid-agent-work workflows.
58
+ - **Discovery and catalog ingestion** — AI Catalog ingestion, discovery source candidates, provider trust records, and the static agent-stack fixture corpora. Static ingestion is metadata transformation only: publication stays disabled, payment activation stays disabled, provider trust stays unverified, and imported content stays untrusted until later operator and readiness gates pass.
59
+ - **Evidence and proof surfaces** — EvidenceArchive, receipt–evidence binding, rail-neutral payment receipts and the rail-neutral proof-chain fixture, Pay.sh sandbox evidence (fixture refs only), source-aware diagnostics, and the source/trust conformance matrix.
60
+ - **Attestation and reputation** — attestation/reputation primitives, off-chain reputation preview (projection only — it does not mutate reputation state), reputation credential export, and the hosted attestation claim shape (fails closed as `publication_gate_pending` without operator approval and publication-gate metadata).
61
+ - **Quasar registry compatibility** — metadata-only compatibility surface; no custody or program-execution claims.
62
+ - **Buyer client and seller middleware** — local buyer/seller flow helpers, including the buyer–seller dry-run example.
63
+ - **AUDD/Solana payment plans** — preflight-only planning helpers. These do not contact Airwallex, invoke providers, call wallets/RPC endpoints, transfer SPL tokens, activate Pay.sh, or settle funds.
64
+ - **Framework templates** — the framework template contract, framework-template conformance suite and fixtures, and the LangGraph, ADK, and Strands RAP templates.
65
+ - **Interop exports (external-standard status noted below)** — ERC-8004 export + conformance, AP2 mandate ingestion + conformance, Airwallex hosted-checkout rail + webhook receipt normalization, OKF adapter/conformance/instruction-safety, and MPP/Tempo receipt shapes.
66
+ - **Onboarding** — onboarding-analyser handoff and onboarding state machine surfaces.
67
+ - **Runnable no-spend examples** — `examples/ard-no-spend-demo.mjs`, `examples/buyer-seller-dry-run.mjs`, and the `examples/ard-no-spend-ai-catalog.json` fixture, shipped in the package tarball.
68
+
69
+ ### Draft / unverified labels (honest status)
70
+
71
+ - The RAP-side ERC-8004 mapping and the RAP-side AP2 adapter contract are promoted specs (#562/#563), but **ERC-8004 and AP2 are external draft standards** — external-standard field references carry inline `(unverified — <standard> draft)` tags in the source and type docs, and promotion of the RAP-side contract does not upgrade confidence in the external drafts.
72
+ - The **Airwallex hosted-checkout rail surface is DRAFT v1** (`AIRWALLEX_HOSTED_CHECKOUT_RAIL_DRAFT = true`): draft/unverified external-rail shapes, with the fiat asset kept in a draft namespace outside the frozen buyer-authority asset union.
73
+
74
+ ### Quickstart and conformance
75
+
76
+ ```bash
77
+ # ARD No-Spend Quickstart (Discover -> Decide -> Prove on fixtures)
78
+ npm run example:ard:no-spend
79
+
80
+ # Consolidated public conformance suite (from the repo root: npm run check:conformance:public)
81
+ npm run conformance
82
+
83
+ # Full local release gate
84
+ npm run release:dry-run
85
+ ```
86
+
87
+ ### Boundaries
88
+
89
+ All v0.1.0 surfaces are local-first and fail closed: **no spend, no custody, no live settlement**. The package does not require or perform live payments, does not hold or move funds, and makes no settlement-finality claims. It runs without hosted Reddi infrastructure, ARD registry access, wallet keys, RPC calls, SPL transfers, paid provider calls, secrets, marketplace publication, or trust/reputation mutation. Discovery relevance is never trust, budget, payment, or publication approval. These boundaries are consistent with the README and are enforced mechanically by the claim-boundary scan in `npm run check:oss-release-smoke`.
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Redditech Pty Ltd
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,395 @@
1
- # Temporary Holding Version
1
+ # @redditech/agent-protocol
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Open RAP Assurance primitives for paid agent work.
4
+
5
+ > Payments prove transfer; RAP Assurance proves paid work.
6
+
7
+ This package is the local-first Reddi Agent Protocol surface above payment rails such as `@redditech/x402-solana`. It defines the provider-signed receipt (`reddi.receipt.v2`), payment records, evidence and attestation records, discovery and trust metadata, deterministic fixtures, and validation helpers that run without hosted Reddi infrastructure, wallet keys, devnet/mainnet spend, or paid provider calls. It is not a payment facilitator, marketplace operator, custody provider, or production runtime.
8
+
9
+ **Publication status:** repo-local v0.1 candidate. It is not published on npm yet; real publication is tracked by issue #603 and requires explicit operator approval.
10
+
11
+ ## Install / local validation
12
+
13
+ Until #603 publishes the package, installability claims are limited to the repository checkout and dry-run tarball gates:
14
+
15
+ ```bash
16
+ cd packages/agent-protocol
17
+ npm ci
18
+ npm run release:dry-run
19
+ ```
20
+
21
+ ## Receipt v2
22
+
23
+ ```ts
24
+ import { hashReddiReceiptV2Body, verifyReddiReceiptV2 } from '@redditech/agent-protocol/receipt-v2';
25
+
26
+ const result = verifyReddiReceiptV2(signedReceipt, {
27
+ providerId: providerWalletYouPaid,
28
+ requestHash: hashReddiReceiptV2Body(requestBodyYouSent),
29
+ responseHash: hashReddiReceiptV2Body(responseBodyYouReceived),
30
+ payment: { network: 'solana-devnet', txSignature: paymentYouMade },
31
+ });
32
+ ```
33
+
34
+ `reddi.receipt.v2` is the receipt for every paid call in V1. The provider issues and signs it with its wallet key (ed25519 over a fixed-order canonical form). It carries:
35
+
36
+ - `providerId`, `declaredModel`, `requestHash`, `responseHash`, `issuedAt`, and optionally `jobId`;
37
+ - `payment`: `network`, `txSignature`, `currency` (SOL, USDC, PYUSD, USDG or AUDD), `mint` (every currency except SOL), `amount` (the listed price in the smallest unit), `fee` (`amount` and the `treasury` that received it), `settlement` (`direct` or `escrow`) and, when the provider checked it, `payer`.
38
+
39
+ Verification is offline. Pass what you know yourself as the expectation: without it, a pass only says that some key signed some statement. The payment fields are the provider's statement; check the named transaction on chain before relying on them. A valid signature shows what the provider declared. It does not show which model ran.
40
+
41
+ `reddi.receipt.v2` is the only receipt this package accepts. `reddi.receipt.v1` and the modules built on it were removed before V1 (#776), and `validateReddiReceiptV2` rejects any other version. These are source-level helpers; no deployed provider issues v2 receipts yet.
42
+
43
+ ## Policy Decisions
44
+
45
+ ```typescript
46
+ import { policyDecisionFromBudgetPolicyDecision } from '@redditech/agent-protocol';
47
+
48
+ const policyDecision = policyDecisionFromBudgetPolicyDecision({
49
+ allowed: false,
50
+ reasonCodes: ['request_amount_exceeds_limit'],
51
+ quotedAmount: { amount: '150000', asset: 'USDC', network: 'solana-devnet' },
52
+ remainingBudget: { perRequest: '0' },
53
+ auditNotes: ['Denied: request quote exceeds per-request limit.'],
54
+ });
55
+ ```
56
+
57
+ Use payment-rail packages to settle and verify payment-specific proofs. A RAP receipt records what the provider declared about one paid call; it does not upgrade payment proof into work-quality, settlement-finality, or production-readiness claims.
58
+
59
+ ## AUDD non-custodial foundation
60
+
61
+ `@redditech/agent-protocol/audd-rail-config` publishes the non-secret AUDD rail identity contract: deterministic fixture, generated local test mint, explicitly unverified/blocked devnet, and gated mainnet. The verified public mainnet identity is recorded as AUDD mint `AUDDttiEpCydTm7joUMbYddm72jAWXZnCpPZtDoxqBSw`, SPL Token program `TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA`, six decimals, with dated source provenance. Mainnet remains disabled by default.
62
+
63
+ `@redditech/agent-protocol/payment-records` adds rail-neutral canonical IDs for job, agreement, payment intent, payment observation, and refund records using stable canonical JSON SHA-256 hashing. Fixture, local-test-mint, and devnet-unverified labels are rejected if marked grant-volume eligible. Local-test-mint is configuration/test-only and has no public CAIP-2 export path.
64
+
65
+ The AUDD payment-plan and x402 bridge helpers were removed with receipt v1 (#776). AUDD here is rail identity and record metadata only.
66
+
67
+ ## AI Catalog Ingestion
68
+
69
+ ```typescript
70
+ import { createAiCatalogSnapshot, aiCatalogFixtures } from '@redditech/agent-protocol/ai-catalog';
71
+
72
+ const snapshot = createAiCatalogSnapshot(aiCatalogFixtures.happyPath, {
73
+ rawSnapshotRef: 'sha256:catalog-response',
74
+ });
75
+
76
+ console.log(snapshot.publisher.id); // reddi.tech
77
+ console.log(snapshot.resources[0].mediaType); // application/mcp-server-card+json
78
+ ```
79
+
80
+ AI Catalog ingestion stores discovery results as untrusted external metadata. Validation fails closed for malformed catalogs, unsupported resource types, invalid `urn:ai:*` identifiers, unsafe URLs, credential-bearing metadata, oversized catalogs, and nested-catalog boundary violations.
81
+
82
+ Catalog ingestion never performs network fetches, paid invocations, wallet actions, or auto-execution. Buyer policy preflight, quote/payment approval, receipts, evidence, attestations, and reputation remain separate RAP steps after discovery.
83
+
84
+ ## Agent-Stack Fixture Corpora
85
+
86
+ ```typescript
87
+ import {
88
+ agentStackFixtureCorpora,
89
+ createAgentStackFixtureCorpus,
90
+ createStaticAgentStackIngestionResult,
91
+ } from '@redditech/agent-protocol/agent-stack-fixtures';
92
+
93
+ const corpus = createAgentStackFixtureCorpus(agentStackFixtureCorpora.anthropicFinancialServices);
94
+ const result = createStaticAgentStackIngestionResult(corpus);
95
+ const solanaKit = createStaticAgentStackIngestionResult(agentStackFixtureCorpora.solanaAiKit);
96
+
97
+ console.log(corpus.source.checkedCommit); // 4bbabc7cd1a474c1667fa05a2bfe58e411dcf9c1
98
+ console.log(corpus.files.some((file) => file.parseStatus === 'malformed')); // true
99
+ console.log(result.status); // partial_success while malformed connector diagnostics block draft readiness
100
+ console.log(solanaKit.draftPayloadReadiness.status); // blocked until hooks, deploy commands, and MCPs are reviewed
101
+ console.log(solanaKit.riskDiagnostics.map((diagnostic) => diagnostic.category)); // static risk taxonomy for operator review
102
+ console.log(solanaKit.capabilityInventory.entries.map((entry) => entry.runtimeSurface)); // parsed static inventory handoff
103
+ console.log(solanaKit.draftPayloads.listing.publicationDisabled); // true until payment, endpoint, review, and readiness gates pass
104
+ console.log(solanaKit.operatorReviewPayload.publication.disabled); // true until operator approval and readiness gates pass
105
+ ```
106
+
107
+ Agent-stack fixture corpora are public, static inputs for onboarding-analyser parser and diagnostics work. The built-in Anthropic financial-services fixture records source URL, checked commit, license/source notes, authenticity notes, crawl timestamp, local research artifact path, high-level marketplace/plugin/managed-agent/MCP surfaces, and validation warnings. The built-in Solana AI Kit fixture records the same source provenance for a Solana-heavy agent-stack toolkit with plugin metadata, agent definitions, commands, MCP declarations, hooks, rules, skills, installer/update/test scripts, and external submodule declarations.
108
+
109
+ Fixture ingestion rejects credential-shaped metadata, unsafe source URLs, invalid commit refs, invalid timestamps, oversized corpora, and malformed corpus shapes. Public prompt, skill, command, and recipe text is always labelled as untrusted fixture content.
110
+
111
+ Static ingestion results are deterministic handoff envelopes for later parser, connector-diagnostics, draft-profile, and operator-review work. They combine fixture source metadata, normalized inventory entries, a parsed capability inventory bundle, MCP connector diagnostics, non-MCP static risk diagnostics, rejected entries, validation warnings, and draft-payload readiness without fetching the network or executing imported code.
112
+
113
+ The capability inventory bundle is the static #371/#403 handoff. It maps fixture surfaces into source paths, runtime surfaces, commands, skills, tool grants, auth/data dependencies, safety hints, human-review hints, write-capable flags, side-effect risk, content-trust boundaries, parser diagnostics, and fixture provenance. It does not parse or execute imported prompt/skill/command text; those remain untrusted metadata for later operator review.
114
+
115
+ Risk diagnostics normalize executable hooks, installer/update/test scripts, deploy-capable commands, wallet/RPC-capable command metadata, local binary requirements, env-required connector metadata, MCP launcher execution, permission policies, and external submodule declarations into the same static ingestion result. They are review payloads only; connector parsing still belongs to the MCP connector diagnostics lane.
116
+
117
+ Draft payloads produce a RAP agent profile draft, AI Catalog fragment, and registry/listing draft from static fixture metadata. They carry missing-payment, missing-endpoint, malformed-connector, rejected-entry, unsafe-metadata, and static-risk states forward while keeping publication disabled, payment activation disabled, provider trust unverified, and imported content untrusted until later operator and readiness gates pass.
118
+
119
+ Operator review payloads expose deterministic backend hooks for imported agent-stack review queues. They group parsed repo/plugin surfaces, validation warnings, rejected entries, raw snapshot references, missing payment and endpoint setup, malformed connector states, static risk blockers, and buyer-preview lanes for capability relevance, source authenticity, trust evidence, payment readiness, safety risk, and reputation. They are payloads only: approval, publication, payment activation, provider trust, and reputation remain disabled or unverified until explicit operator approval and #373/#377 readiness gates pass.
120
+
121
+ The fixture corpus never installs Claude plugins, executes repo scripts, invokes managed agents, contacts MCP servers, fetches paid/provider data, requires credentials, starts local services, calls wallets/RPC endpoints, or publishes imported surfaces as payable RAP listings. Parser, connector-diagnostics, draft-profile, and operator-review behavior are static metadata transformations only.
122
+
123
+ ## Repo Explorer Evidence Manifests
124
+
125
+ ```typescript
126
+ import {
127
+ validateRepoExplorerEvidenceManifest,
128
+ attachRepoExplorerEvidenceToSnapshot,
129
+ projectRepoExplorerEvidence,
130
+ repoExplorerEvidenceManifestFixtures,
131
+ } from '@redditech/agent-protocol/repo-explorer-evidence-manifest';
132
+
133
+ const report = validateRepoExplorerEvidenceManifest(repoExplorerEvidenceManifestFixtures.happyPath);
134
+ console.log(report.verdict); // valid
135
+ console.log(report.manifest?.sourceTrust); // external_untrusted (hard-coded)
136
+
137
+ const attachment = attachRepoExplorerEvidenceToSnapshot(report);
138
+ console.log(attachment.ok && attachment.attachment.source.snapshotRef); // repo-explorer-evidence:example-agent-stack@a3f18c9d02e1
139
+
140
+ const projections = projectRepoExplorerEvidence(report);
141
+ console.log(projections.draftReadiness.status); // needs_review — never 'ready' for external_untrusted evidence
142
+ console.log(projections.operatorReview.publication.disabled); // true
143
+
144
+ const blocked = validateRepoExplorerEvidenceManifest(repoExplorerEvidenceManifestFixtures.pathTraversal);
145
+ console.log(blocked.verdict, blocked.manifest); // blocked null — unsafe paths fail closed
146
+ ```
147
+
148
+ Repo explorer evidence manifests (`reddi.repo-explorer-evidence-manifest.v1`) carry FastContext-style read-only exploration evidence for static fixture ingestion: repo/source URL, resolved commit SHA, task-specific exploration query, read-only explorer contract, file paths with line ranges and short relevance reasons, generated/noisy exclusions, and open questions. The manifest DESCRIBES exploration a caller already performed elsewhere; the module never fetches, clones, ingests, or executes anything, and the source trust boundary is hard-coded `external_untrusted`.
149
+
150
+ Explorer output is localization evidence, not approval to install, run, or adopt the explored repository. A `valid` verdict permits static review/analysis and by-reference provenance attachment only — installation, execution, full-repo ingestion, dependency install, publication, hosted writes, provider calls, wallet/RPC, and trust mutation stay denied on every report regardless of verdict.
151
+
152
+ Validation is fail-closed with structured reason codes: malformed paths (backslashes, control characters, empty/`.` segments), unsafe paths (absolute, `..` traversal, `file://`/URI schemes, drive prefixes, home expansion, percent-encoded traversal), invalid line ranges (zero, negative, reversed, non-integer), empty evidence, missing relevance reasons, self-contradictory excluded-path citations, non-https or credentialed source URLs, unresolved commits, self-asserted trust levels, and non-read-only explorer contracts all block; citations into generated/noisy content (node_modules, dist, lockfiles, minified bundles) are accepted but flagged for review.
153
+
154
+ Accepted manifests attach to the onboarding `static-agent-stack-snapshot` intake surface by reference: the snapshot attachment's `source` block is a structural match for the intake `snapshotRef` contract, and per-citation evidence refs satisfy the provenanced-field rule that `verified` provenance requires non-empty evidence refs — static fixture ingestion preserves explorer evidence as provenance without a full-repo ingest. Projection helpers map accepted evidence toward the shipped static-ingestion vocabularies: capability-inventory provenance (#403), connector-diagnostic records (#404), risk-taxonomy categories (#421), draft-payload readiness (#405, never `ready`), and operator-review payloads (#406, publication disabled).
155
+
156
+ ## Provider Trust Records
157
+
158
+ ```typescript
159
+ import { createAiCatalogProviderTrustRecord, providerTrustFixtures } from '@redditech/agent-protocol/provider-trust';
160
+
161
+ const trust = createAiCatalogProviderTrustRecord(
162
+ providerTrustFixtures.verifiedCatalog,
163
+ 'urn:ai:reddi.tech:specialists:code-review',
164
+ { verification: { status: 'verified', verifier: 'rap:local-check' } },
165
+ );
166
+
167
+ console.log(trust.verification.status); // verified
168
+ ```
169
+
170
+ Provider trust records normalize ARD trust manifests, provenance links, attestations, detached-signature metadata, publisher identity, and verification references into a RAP-side trust shape.
171
+
172
+ External ARD trust metadata is treated as a claim until RAP-side verification marks it `verified` or `failed_verification`. Missing metadata remains `unverified`, malformed trust metadata fails closed, and credential-bearing auth/payment/trust metadata is rejected.
173
+
174
+ ## Discovery Source Candidates
175
+
176
+ ```typescript
177
+ import {
178
+ createAiCatalogDiscoveryCandidates,
179
+ evaluateDiscoveryCandidatePolicyPreflight,
180
+ } from '@redditech/agent-protocol/discovery-source';
181
+ import { providerTrustFixtures } from '@redditech/agent-protocol/provider-trust';
182
+
183
+ const candidates = createAiCatalogDiscoveryCandidates(providerTrustFixtures.verifiedCatalog, {
184
+ relevanceScores: {
185
+ 'urn:ai:reddi.tech:specialists:code-review': 0.91,
186
+ },
187
+ });
188
+
189
+ if (candidates.ok) {
190
+ const decision = evaluateDiscoveryCandidatePolicyPreflight(
191
+ {
192
+ ...candidates.candidates[0],
193
+ quote: { amount: '5000', asset: 'AUDD', network: 'solana-devnet' },
194
+ },
195
+ {
196
+ allowedSourceKinds: ['direct-ai-catalog'],
197
+ allowedAssets: ['AUDD'],
198
+ allowedNetworks: ['solana-devnet'],
199
+ maxQuote: { amount: '10000', asset: 'AUDD', network: 'solana-devnet' },
200
+ },
201
+ );
202
+
203
+ console.log(decision.allowed); // true only after explicit RAP policy preflight
204
+ }
205
+ ```
206
+
207
+ Discovery candidates are source-neutral buyer-client inputs for local specialists, direct AI Catalogs, ARD registry/search fixtures, source adapters, and future hosted RAP registries. Candidate relevance is informational only; it is never used as a trust, safety, payment, or budget decision. Quotes, policy preflight, payment approval, invocation, receipts, evidence, attestations, and reputation remain separate RAP steps.
208
+
209
+ Hosted RAP catalog/search surfaces follow the same source-neutral boundary. See [Hosted RAP Discovery Surfaces](../../docs/HOSTED-RAP-DISCOVERY-SURFACES.md) for the hosted-by-RAP, self-hosted, and externally listed source classes plus the future-safe federation/referral posture.
210
+
211
+ ## EvidenceArchive
212
+
213
+ ```typescript
214
+ import {
215
+ createEvidenceArchiveRecord,
216
+ createLocalEvidenceArchive,
217
+ } from '@redditech/agent-protocol/evidence-archive';
218
+
219
+ const record = createEvidenceArchiveRecord({
220
+ id: 'evidence:demo:001',
221
+ receiptId: 'receipt:demo:001',
222
+ sourceId: 'source:demo',
223
+ requestHash: 'sha256:7b2d0ef8455d0f0f41a37ea5e6a47f52c0d73d97f426097f159a98f8c8fb6b15',
224
+ responseHash: 'sha256:8c9d1f1e3d0f02b5afcbb31dfbb3ab3de70ce1b84ff3ca856d272b2f4f7f4501',
225
+ evidenceRef: 'file://fixtures/evidence/demo-001.json',
226
+ createdAt: new Date().toISOString(),
227
+ evidencePayload: { result: 'private payload stays outside the receipt' },
228
+ });
229
+
230
+ const archive = createLocalEvidenceArchive();
231
+ archive.put(record);
232
+ ```
233
+
234
+ EvidenceArchive v1 stores request, response, receipt, source, attestation, and evidence hash references without embedding private payloads in public receipts. The local archive is deterministic for tests and demos. Walrus, Seal, IPFS, and custom archive pointers are represented as future sidecar references, not required product-core dependencies.
235
+
236
+ ## Source-Aware Diagnostics
237
+
238
+ ```typescript
239
+ import { createSourceAwareCandidateDiagnostics } from '@redditech/agent-protocol/source-diagnostics';
240
+
241
+ const diagnostics = createSourceAwareCandidateDiagnostics(candidate, {
242
+ policyDecision: decision,
243
+ reputation: { receiptCount: 2, attestationCount: 1 },
244
+ });
245
+
246
+ console.log(diagnostics.capabilityMatch.scoreMeaning); // relevance_only_not_trust
247
+ console.log(diagnostics.policyDecision.reasonCodes); // machine-readable allow/deny reasons
248
+ ```
249
+
250
+ Source-aware diagnostics expose separate lanes, one per returned field: `capabilityMatch`, `discoverySource`, `publisherIdentity`, `trustEvidence` (the evidence a trust claim would rest on, not a trust verdict), `policyDecision`, `paymentFit`, and `reputationEvidence`. ARD and registry relevance scores are always labelled as relevance only; they are never collapsed into trust, policy, payment, or reputation approval.
251
+
252
+ ## Source/Trust Conformance Matrix
253
+
254
+ ```typescript
255
+ import {
256
+ buildSourceTrustConformanceMatrix,
257
+ classifySourceTrustCandidate,
258
+ } from '@redditech/agent-protocol/source-trust-conformance-matrix';
259
+
260
+ const matrix = buildSourceTrustConformanceMatrix();
261
+ console.log(matrix.coverage.complete); // true — all states, all required cases, both source kinds
262
+
263
+ const row = classifySourceTrustCandidate({
264
+ candidateId: 'auth-md:example.com',
265
+ source: { kind: 'auth-md', metadata: parsedAuthMdMetadata },
266
+ });
267
+ console.log(row.entryState); // listed_untrusted — always
268
+ console.log(row.registryProjection.verificationStatus); // provider-trust vocabulary
269
+ ```
270
+
271
+ The source/trust conformance matrix proves that `auth.md` documents and ARD/AI Catalog provider metadata enter RAP as untrusted source metadata until explicit RAP-side trust/evidence gates classify them across `trusted` / `listed_untrusted` / `claimed` / `unverified` / `failed_verification` / `blocked` / `needs_human_review`. Malformed metadata, credential leakage, anonymous write scopes, unsupported credential types, and unsupported identity assertions fail closed — even for maximally relevant candidates. Rows project onto the provider-trust registry vocabulary and the source-diagnostics lanes. See `docs/conformance/source-trust-matrix/README.md` and `docs/DISCOVER-DECIDE-PROVE-BOUNDARIES.md`.
272
+
273
+ ## Attestation And Reputation
274
+
275
+ ```typescript
276
+ import {
277
+ applyAttestationToReputation,
278
+ createInitialReputationState,
279
+ } from '@redditech/agent-protocol/attestation-reputation';
280
+
281
+ const state = createInitialReputationState({ id: 'specialist:coder', type: 'specialist' });
282
+ const update = applyAttestationToReputation(attestationRecord, state);
283
+
284
+ if (update.ok) {
285
+ console.log(update.event.schemaVersion); // reddi.reputation-event.v1
286
+ console.log(update.state.routingImpact); // eligible / watch / deprioritized / etc.
287
+ }
288
+ ```
289
+
290
+ Attestation v1 records include schema version, evidence reference, evidence hash, rubric dimensions, confidence, verdict, work status, and trust boundary. The required rubric dimensions are `evidence_integrity`, `policy_compliance`, and `delivery_quality`.
291
+
292
+ Reputation updates are deterministic and local-first. Invalid or incomplete rubrics fail closed and return the previous reputation state unchanged. Failed, disputed, and refunded work produce explicit status and routing-impact reason codes. Self-attested and external-attested records are evidence inputs, not verified claims; `reddi_attested` and `verified` boundaries must come from RAP-side verification or operator-controlled attestations.
293
+
294
+ ## Quasar Registry Compatibility
295
+
296
+ ```typescript
297
+ import {
298
+ deriveQuasarRegistryCompatibility,
299
+ } from '@redditech/agent-protocol/quasar-registry-compatibility';
300
+
301
+ const report = deriveQuasarRegistryCompatibility({
302
+ listingId: 'listing:research-agent',
303
+ displayName: 'Research Agent',
304
+ role: { callable: true },
305
+ model: 'qwen3:8b',
306
+ registrationIntent: 'metadata_only',
307
+ offchain: {
308
+ description: 'Rich listing copy remains off-chain.',
309
+ ardUrl: 'https://agents.example/.well-known/ai-catalog.json',
310
+ auddTerms: { asset: 'AUDD', network: 'solana-devnet' },
311
+ },
312
+ });
313
+
314
+ console.log(report.registrationStatus); // metadata_only / registerable / blocked
315
+ console.log(report.guardrails.instructionBuilt); // false
316
+ ```
317
+
318
+ Quasar registry compatibility separates compact on-chain `AgentAccount` fields from hosted RAP and ARD listing metadata. The compact projection is limited to owner, agent type, model, native lamport rate, minimum reputation, active state, and decoded read-only reputation/attestation aggregates. Rich descriptions, endpoints, ARD/catalog refs, AUDD/x402/payment-plan terms, EvidenceArchive refs, trust badges, capabilities, tags, health checks, review states, and operator approval evidence remain off-chain.
319
+
320
+ The mapper is a compatibility report only. It does not build Quasar instructions, sign wallets, call RPC, deploy programs, activate live payments, or publish hosted listings. Imported/static listings without an explicit owner and native SOL lamport rate stay `metadata_only` rather than becoming register instructions.
321
+
322
+ Future PRs that move from compatibility reports into instruction builders, transaction assembly, Surfpool validation, or devnet wallet use must follow the Quasar Surfpool/devnet promotion checklist in [`../../docs/QUASAR-SURFPOOL-DEVNET-PROMOTION-CHECKLIST.md`](../../docs/QUASAR-SURFPOOL-DEVNET-PROMOTION-CHECKLIST.md). Package/read-model work like this mapper does not require Surfpool or devnet.
323
+
324
+ ## Browser Wallet Approval Preflight
325
+
326
+ ```typescript
327
+ import {
328
+ validateBrowserWalletApprovalRecord,
329
+ validateBrowserWalletTier1LocalHarnessContract,
330
+ validateBrowserWalletIdentityCopyClaims,
331
+ DORMANT_TIER1_LOCAL_BROWSER_HARNESS_CONTRACT,
332
+ } from '@redditech/agent-protocol/browser-wallet-approval';
333
+
334
+ const result = validateBrowserWalletApprovalRecord(approvalJson, {
335
+ now: new Date(),
336
+ trustedDevnetProgramIds: resolvedDevnetProgramIds,
337
+ trustedDevnetRpcEndpoints: { rpcHttp: resolvedDevnetRpcHttp, rpcWs: resolvedDevnetRpcWs },
338
+ });
339
+ console.log(result.ok); // false for missing/expired/contradictory or unbound records
340
+ ```
341
+
342
+ Browser wallet approval helpers provide offline contracts and pure validators for browser-wallet safety preflight:
343
+
344
+ - `validateBrowserWalletApprovalRecord` verifies static Devnet approval records against `reddi.browser-wallet.single-use-approval.v1`. It requires trusted Devnet program IDs and trusted Devnet RPC endpoints (`rpcHttp`, `rpcWs`) from the caller and rejects records whose claimed resolved IDs or credential/query-bearing endpoints differ from them exactly. It enforces single-use metadata, provider/version/source pinning, disposable profile requirements, public-key-only custody, canonical network/program IDs, canonical UTC and ordered timestamps (`approvedAt` no later than evaluation time and before `expiresAt`, provider `retrievedAt` no later than `approvedAt`), and fail-closed AUDD/USDC asset constraints. A supplied string `now` must itself be canonical UTC ISO-8601; malformed or alternate encodings are rejected instead of falling back to the wall clock (omitting `now` still evaluates against the current time). Validation does not durably consume a record, and this package defines neither a maximum lifetime nor a consumption owner. The dormant future-AUDD option also requires independently supplied trusted identity data; fields inside the approval cannot attest themselves.
345
+ - `validateBrowserWalletTier1LocalHarnessContract` validates the dormant Tier 1 local browser harness contract (`DORMANT_TIER1_LOCAL_BROWSER_HARNESS_CONTRACT`), enforcing `enabledByDefault: false`, local-only loopback, a closed observation-field set, closed prohibited-action identifiers, and a six-decimal `AUDD_TEST`/`LOCAL_AUDD_TEST` SPL test mint with `grantEligibility=non_eligible`.
346
+ - `validateBrowserWalletIdentityCopyClaims` validates browser-wallet evidence and copy rows against `reddi.browser-wallet.identity-copy-guard.v1`, evaluating each official-AUDD, direct AUDD-endorsement, or grant-eligibility occurrence so an unrelated negation or badge cannot suppress an overclaim and double negation is refused. Compact and separator-delimited official branding and direct active/passive endorsement wording are rejected; directly negated identity/endorsement disclaimers remain allowed. This is a deterministic lexical guard, not complete natural-language endorsement detection. Safety rows must not claim official AUDD, AUDD endorsement, grant eligibility, observed settlement, or controlled-live status, and settlement/finality or controlled-live wording is refused even when negated. Reserved-brand derivatives and ambiguous Unicode fail closed. Every row must carry its full rail identity (`networkAlias`, `caip2`, `mint`, `tokenProgram`, `decimals`, `observationSource`); concrete mints must be valid Solana public keys, fields are required rather than optional, and each is bound to the row's rail environment. Parsed deterministic-fixture x402 output uses the qualified `fixture-observed` state, never unqualified `observed`.
347
+
348
+ These helpers are pure, offline validators. They never install extensions, access wallets or keypairs, request faucet tokens, start validators, or sign, simulate, or submit transactions. See [Browser Wallet Safety Preflight](../../docs/BROWSER-WALLET-SAFETY-PREFLIGHT.md) for full operational runbooks and rollback policies.
349
+
350
+ ## ARD No-Spend Quickstart
351
+
352
+ From a fresh checkout, the local proof path should complete in under five minutes:
353
+
354
+ ```bash
355
+ git clone https://github.com/nissan/reddi-agent-protocol.git
356
+ cd reddi-agent-protocol/packages/agent-protocol
357
+ npm ci
358
+ npm run example:ard:no-spend
359
+ ```
360
+
361
+ The ARD no-spend example is a deterministic Discover -> Decide -> Prove workflow. It starts from `examples/ard-no-spend-ai-catalog.json`, validates the AI Catalog fixture, creates a discovery candidate, runs source-aware diagnostics and the buyer's discovery policy preflight, calls a local fixture specialist, has the fixture provider sign a `reddi.receipt.v2`, verifies that receipt offline against what the buyer knows, and records evidence, an attestation and a reputation projection.
362
+
363
+ The JSON output labels the run as fixture-only and no-spend:
364
+
365
+ - `receipt` shows the verified `reddi.receipt.v2`: provider, declared model, request and response hashes and the payment the provider states. `payment.fixtureTransaction` is `true`: the transaction signature is a made-up fixture value and no payment was made.
366
+ - `receipt.reading` says what a pass means: the provider declared this model and this payment. It is not proof of which model ran.
367
+ - `evidence` links the EvidenceArchive record to the receipt's job id and names the signed receipt by hash.
368
+ - `boundaries` records that the run does not use a hosted service, paid provider, wallet, RPC call or SPL transfer, and does not claim Quasar custody, settlement finality, model execution, a trust upgrade, a reputation mutation or a live payment: every flag is false.
369
+
370
+ The example also prints failure states, each of which must refuse: discovery policy denial, unsupported network, a response that is not the one signed, a different provider than the one chosen, a receipt edited after signing, a different payment, a removed receipt version, missing evidence, and credential-shaped evidence metadata. The provider key in the example is derived from a public label in the file and is a fixture, not a wallet. The example does not start a server, fetch an ARD registry, call hosted Reddi infrastructure, use secrets, invoke a paid provider, access a wallet, submit RPC/SPL transfers, mutate trust or reputation state, publish to a marketplace, claim AUDD escrow custody, prove settlement finality, or perform a live payment.
371
+
372
+ Run the deterministic conformance check for this quickstart:
373
+
374
+ ```bash
375
+ npm test -- --test-name-pattern "ARD no-spend demo"
376
+ ```
377
+
378
+ ## Public Conformance Suite
379
+
380
+ A single deterministic command composes the per-module conformance suites (receipt v2 shape and signature, payment records, source metadata, challenge shapes, evidence and attestation, secret-leakage rejection, the quickstart workflow, interop conformance modules) and the packed-artifact secret/content guard:
381
+
382
+ ```bash
383
+ npm run conformance
384
+ ```
385
+
386
+ From the repo root the same suite runs as `npm run check:conformance:public`, and CI runs it on every pull request touching this package. See [RAP v0.1 Developer Quickstart and Conformance](https://github.com/nissan/reddi-agent-protocol/blob/main/docs/RAP-V0.1-DEVELOPER-QUICKSTART-AND-CONFORMANCE.md) for the area-by-area breakdown and the fixture coverage matrix.
387
+
388
+ ## Local Validation
389
+
390
+ ```bash
391
+ npm run build
392
+ npm test
393
+ ```
394
+
395
+ No secrets or network calls are required.